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 | |
81ecdfbb | 596 | GDB_NM_FILE |
393fd4c3 YQ |
597 | LTLIBBABELTRACE |
598 | LIBBABELTRACE | |
599 | HAVE_LIBBABELTRACE | |
81ecdfbb RW |
600 | frags |
601 | target_subdir | |
602 | CONFIG_UNINSTALL | |
603 | CONFIG_INSTALL | |
604 | CONFIG_CLEAN | |
605 | CONFIG_ALL | |
606 | CONFIG_SRCS | |
607 | CONFIG_DEPS | |
608 | CONFIG_OBS | |
609 | PROFILE_CFLAGS | |
610 | ENABLE_CFLAGS | |
611 | SIM_OBS | |
612 | SIM | |
613 | XMKMF | |
614 | GDBTK_SRC_DIR | |
615 | GDBTK_CFLAGS | |
616 | GDBTKLIBS | |
617 | X_LIBS | |
618 | X_LDFLAGS | |
619 | X_CFLAGS | |
620 | TK_XINCLUDES | |
621 | TK_DEPS | |
622 | TK_LIBRARY | |
623 | TK_INCLUDE | |
624 | TK_STUB_LIB_SPEC | |
625 | TK_STUB_LIB_FLAG | |
626 | TK_STUB_LIB_FILE | |
627 | TK_LIB_SPEC | |
628 | TK_LIB_FLAG | |
629 | TK_LIB_FILE | |
630 | TK_SRC_DIR | |
631 | TK_BIN_DIR | |
632 | TK_VERSION | |
633 | TCL_DEPS | |
634 | TCL_LIBRARY | |
635 | TCL_INCLUDE | |
636 | TCL_STUB_LIB_SPEC | |
637 | TCL_STUB_LIB_FLAG | |
638 | TCL_STUB_LIB_FILE | |
639 | TCL_LIB_SPEC | |
640 | TCL_LIB_FLAG | |
641 | TCL_LIB_FILE | |
642 | TCL_SRC_DIR | |
643 | TCL_BIN_DIR | |
644 | TCL_PATCH_LEVEL | |
645 | TCL_VERSION | |
646 | WIN32LDAPP | |
647 | GUI_CFLAGS_X | |
648 | LIBGUI | |
608e2dbb TT |
649 | LTLIBLZMA |
650 | LIBLZMA | |
651 | HAVE_LIBLZMA | |
81ecdfbb RW |
652 | WIN32LIBS |
653 | SER_HARDWIRE | |
654 | WERROR_CFLAGS | |
655 | WARN_CFLAGS | |
656 | SYSTEM_GDBINIT | |
81ecdfbb RW |
657 | TARGET_SYSTEM_ROOT |
658 | CONFIG_LDFLAGS | |
f6528abd | 659 | RDYNAMIC |
81ecdfbb | 660 | ALLOCA |
4df42755 DE |
661 | HAVE_GUILE_FALSE |
662 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
663 | GUILE_LIBS |
664 | GUILE_CPPFLAGS | |
665 | pkg_config_prog_path | |
4df42755 DE |
666 | HAVE_PYTHON_FALSE |
667 | HAVE_PYTHON_TRUE | |
ac534cba JB |
668 | PYTHON_LIBS |
669 | PYTHON_CPPFLAGS | |
81ecdfbb | 670 | PYTHON_CFLAGS |
ec685c5e | 671 | python_prog_path |
81ecdfbb RW |
672 | LTLIBEXPAT |
673 | LIBEXPAT | |
674 | HAVE_LIBEXPAT | |
b8e0a31c | 675 | JIT_READER_DIR |
f997c383 | 676 | TARGET_PTR |
39037522 | 677 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
678 | READLINE_CFLAGS |
679 | READLINE_DEPS | |
680 | READLINE | |
681 | MIG | |
682 | WINDRES | |
683 | DLLTOOL | |
c971b7fa | 684 | AR |
81ecdfbb RW |
685 | YFLAGS |
686 | YACC | |
c971b7fa | 687 | RANLIB |
81ecdfbb | 688 | LN_S |
c971b7fa PA |
689 | INSTALL_DATA |
690 | INSTALL_SCRIPT | |
691 | INSTALL_PROGRAM | |
692 | AWK | |
81ecdfbb RW |
693 | REPORT_BUGS_TEXI |
694 | REPORT_BUGS_TO | |
695 | PKGVERSION | |
b292c783 | 696 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
697 | TARGET_OBS |
698 | subdirs | |
699 | GDB_DATADIR | |
700 | DEBUGDIR | |
5048e516 JK |
701 | MAKEINFO_EXTRA_FLAGS |
702 | MAKEINFOFLAGS | |
703 | MAKEINFO | |
81ecdfbb RW |
704 | PACKAGE |
705 | GNULIB_STDINT_H | |
81ecdfbb RW |
706 | CATOBJEXT |
707 | GENCAT | |
708 | INSTOBJEXT | |
709 | DATADIRNAME | |
710 | CATALOGS | |
711 | POSUB | |
712 | GMSGFMT | |
713 | XGETTEXT | |
714 | INCINTL | |
715 | LIBINTL_DEP | |
716 | LIBINTL | |
717 | USE_NLS | |
718 | SET_MAKE | |
719 | GMAKE_FALSE | |
720 | GMAKE_TRUE | |
721 | MAKE | |
722 | CCDEPMODE | |
723 | DEPDIR | |
724 | am__leading_dot | |
4869db5e RM |
725 | INSTALL_STRIP_PROGRAM |
726 | STRIP | |
727 | install_sh | |
81ecdfbb RW |
728 | target_os |
729 | target_vendor | |
730 | target_cpu | |
731 | target | |
732 | host_os | |
733 | host_vendor | |
734 | host_cpu | |
735 | host | |
736 | build_os | |
737 | build_vendor | |
738 | build_cpu | |
739 | build | |
c971b7fa PA |
740 | EGREP |
741 | GREP | |
742 | CPP | |
81ecdfbb RW |
743 | OBJEXT |
744 | EXEEXT | |
745 | ac_ct_CC | |
746 | CPPFLAGS | |
747 | LDFLAGS | |
748 | CFLAGS | |
749 | CC | |
750 | MAINT | |
751 | MAINTAINER_MODE_FALSE | |
752 | MAINTAINER_MODE_TRUE | |
753 | target_alias | |
754 | host_alias | |
755 | build_alias | |
756 | LIBS | |
757 | ECHO_T | |
758 | ECHO_N | |
759 | ECHO_C | |
760 | DEFS | |
761 | mandir | |
762 | localedir | |
763 | libdir | |
764 | psdir | |
765 | pdfdir | |
766 | dvidir | |
767 | htmldir | |
768 | infodir | |
769 | docdir | |
770 | oldincludedir | |
771 | includedir | |
772 | localstatedir | |
773 | sharedstatedir | |
774 | sysconfdir | |
775 | datadir | |
776 | datarootdir | |
777 | libexecdir | |
778 | sbindir | |
779 | bindir | |
780 | program_transform_name | |
781 | prefix | |
782 | exec_prefix | |
783 | PACKAGE_URL | |
784 | PACKAGE_BUGREPORT | |
785 | PACKAGE_STRING | |
786 | PACKAGE_VERSION | |
787 | PACKAGE_TARNAME | |
788 | PACKAGE_NAME | |
789 | PATH_SEPARATOR | |
790 | SHELL' | |
a4ce5b0d | 791 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
792 | ac_user_opts=' |
793 | enable_option_checking | |
794 | enable_maintainer_mode | |
da2f07f1 JK |
795 | enable_plugins |
796 | enable_largefile | |
81ecdfbb RW |
797 | with_separate_debug_dir |
798 | with_gdb_datadir | |
799 | with_relocated_sources | |
7349ff92 | 800 | with_auto_load_dir |
bccbefd2 | 801 | with_auto_load_safe_path |
81ecdfbb RW |
802 | enable_targets |
803 | enable_64_bit_bfd | |
804 | enable_gdbcli | |
805 | enable_gdbmi | |
806 | enable_tui | |
807 | enable_gdbtk | |
05e7c244 | 808 | with_libunwind_ia64 |
81ecdfbb RW |
809 | with_curses |
810 | enable_profiling | |
811 | with_pkgversion | |
812 | with_bugurl | |
b040ad30 | 813 | with_zlib |
81ecdfbb | 814 | with_libiconv_prefix |
478aac75 | 815 | with_iconv_bin |
81ecdfbb | 816 | with_system_readline |
b8e0a31c | 817 | with_jit_reader_dir |
81ecdfbb RW |
818 | with_expat |
819 | with_gnu_ld | |
820 | enable_rpath | |
821 | with_libexpat_prefix | |
822 | with_python | |
ed3ef339 | 823 | with_guile |
a8db4212 | 824 | enable_libmcheck |
81ecdfbb RW |
825 | with_included_regex |
826 | with_sysroot | |
827 | with_system_gdbinit | |
828 | enable_werror | |
829 | enable_build_warnings | |
830 | enable_gdb_build_warnings | |
608e2dbb TT |
831 | with_lzma |
832 | with_liblzma_prefix | |
81ecdfbb RW |
833 | with_tcl |
834 | with_tk | |
835 | with_x | |
836 | enable_sim | |
837 | enable_multi_ice | |
496c0e1b | 838 | enable_gdbserver |
393fd4c3 YQ |
839 | with_babeltrace |
840 | with_libbabeltrace_prefix | |
81ecdfbb RW |
841 | ' |
842 | ac_precious_vars='build_alias | |
843 | host_alias | |
844 | target_alias | |
845 | CC | |
846 | CFLAGS | |
847 | LDFLAGS | |
848 | LIBS | |
849 | CPPFLAGS | |
850 | CPP | |
f06e05e0 JK |
851 | MAKEINFO |
852 | MAKEINFOFLAGS | |
81ecdfbb RW |
853 | YACC |
854 | YFLAGS | |
855 | XMKMF' | |
5ae98d25 | 856 | ac_subdirs_all='testsuite |
81ecdfbb RW |
857 | gdbtk |
858 | multi-ice | |
859 | gdbserver' | |
c906108c SS |
860 | |
861 | # Initialize some variables set by options. | |
bec39cab AC |
862 | ac_init_help= |
863 | ac_init_version=false | |
81ecdfbb RW |
864 | ac_unrecognized_opts= |
865 | ac_unrecognized_sep= | |
c906108c SS |
866 | # The variables have the same names as the options, with |
867 | # dashes changed to underlines. | |
bec39cab | 868 | cache_file=/dev/null |
c906108c | 869 | exec_prefix=NONE |
c906108c | 870 | no_create= |
c906108c SS |
871 | no_recursion= |
872 | prefix=NONE | |
873 | program_prefix=NONE | |
874 | program_suffix=NONE | |
875 | program_transform_name=s,x,x, | |
876 | silent= | |
877 | site= | |
878 | srcdir= | |
c906108c SS |
879 | verbose= |
880 | x_includes=NONE | |
881 | x_libraries=NONE | |
bec39cab AC |
882 | |
883 | # Installation directory options. | |
884 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
885 | # and all the variables that are supposed to be based on exec_prefix | |
886 | # by default will actually change. | |
887 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 888 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
889 | bindir='${exec_prefix}/bin' |
890 | sbindir='${exec_prefix}/sbin' | |
891 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
892 | datarootdir='${prefix}/share' |
893 | datadir='${datarootdir}' | |
c906108c SS |
894 | sysconfdir='${prefix}/etc' |
895 | sharedstatedir='${prefix}/com' | |
896 | localstatedir='${prefix}/var' | |
c906108c SS |
897 | includedir='${prefix}/include' |
898 | oldincludedir='/usr/include' | |
81ecdfbb RW |
899 | docdir='${datarootdir}/doc/${PACKAGE}' |
900 | infodir='${datarootdir}/info' | |
901 | htmldir='${docdir}' | |
902 | dvidir='${docdir}' | |
903 | pdfdir='${docdir}' | |
904 | psdir='${docdir}' | |
905 | libdir='${exec_prefix}/lib' | |
906 | localedir='${datarootdir}/locale' | |
907 | mandir='${datarootdir}/man' | |
c906108c | 908 | |
c906108c | 909 | ac_prev= |
81ecdfbb | 910 | ac_dashdash= |
c906108c SS |
911 | for ac_option |
912 | do | |
c906108c SS |
913 | # If the previous option needs an argument, assign it. |
914 | if test -n "$ac_prev"; then | |
81ecdfbb | 915 | eval $ac_prev=\$ac_option |
c906108c SS |
916 | ac_prev= |
917 | continue | |
918 | fi | |
919 | ||
81ecdfbb RW |
920 | case $ac_option in |
921 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
922 | *) ac_optarg=yes ;; | |
923 | esac | |
c906108c SS |
924 | |
925 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
926 | ||
81ecdfbb RW |
927 | case $ac_dashdash$ac_option in |
928 | --) | |
929 | ac_dashdash=yes ;; | |
c906108c SS |
930 | |
931 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
932 | ac_prev=bindir ;; | |
933 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 934 | bindir=$ac_optarg ;; |
c906108c SS |
935 | |
936 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 937 | ac_prev=build_alias ;; |
c906108c | 938 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 939 | build_alias=$ac_optarg ;; |
c906108c SS |
940 | |
941 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
942 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
943 | ac_prev=cache_file ;; | |
944 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
945 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
946 | cache_file=$ac_optarg ;; |
947 | ||
948 | --config-cache | -C) | |
949 | cache_file=config.cache ;; | |
c906108c | 950 | |
81ecdfbb | 951 | -datadir | --datadir | --datadi | --datad) |
c906108c | 952 | ac_prev=datadir ;; |
81ecdfbb | 953 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 954 | datadir=$ac_optarg ;; |
c906108c | 955 | |
81ecdfbb RW |
956 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
957 | | --dataroo | --dataro | --datar) | |
958 | ac_prev=datarootdir ;; | |
959 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
960 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
961 | datarootdir=$ac_optarg ;; | |
962 | ||
c906108c | 963 | -disable-* | --disable-*) |
81ecdfbb | 964 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 965 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
966 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
967 | as_fn_error "invalid feature name: $ac_useropt" | |
968 | ac_useropt_orig=$ac_useropt | |
969 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
970 | case $ac_user_opts in | |
971 | *" | |
972 | "enable_$ac_useropt" | |
973 | "*) ;; | |
974 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
975 | ac_unrecognized_sep=', ';; | |
976 | esac | |
977 | eval enable_$ac_useropt=no ;; | |
978 | ||
979 | -docdir | --docdir | --docdi | --doc | --do) | |
980 | ac_prev=docdir ;; | |
981 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
982 | docdir=$ac_optarg ;; | |
983 | ||
984 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
985 | ac_prev=dvidir ;; | |
986 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
987 | dvidir=$ac_optarg ;; | |
c906108c SS |
988 | |
989 | -enable-* | --enable-*) | |
81ecdfbb | 990 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 991 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
992 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
993 | as_fn_error "invalid feature name: $ac_useropt" | |
994 | ac_useropt_orig=$ac_useropt | |
995 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
996 | case $ac_user_opts in | |
997 | *" | |
998 | "enable_$ac_useropt" | |
999 | "*) ;; | |
1000 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1001 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1002 | esac |
81ecdfbb | 1003 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1004 | |
1005 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1006 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1007 | | --exec | --exe | --ex) | |
1008 | ac_prev=exec_prefix ;; | |
1009 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1010 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1011 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1012 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1013 | |
1014 | -gas | --gas | --ga | --g) | |
1015 | # Obsolete; use --with-gas. | |
1016 | with_gas=yes ;; | |
1017 | ||
bec39cab AC |
1018 | -help | --help | --hel | --he | -h) |
1019 | ac_init_help=long ;; | |
1020 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1021 | ac_init_help=recursive ;; | |
1022 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1023 | ac_init_help=short ;; | |
c906108c SS |
1024 | |
1025 | -host | --host | --hos | --ho) | |
bec39cab | 1026 | ac_prev=host_alias ;; |
c906108c | 1027 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1028 | host_alias=$ac_optarg ;; |
c906108c | 1029 | |
81ecdfbb RW |
1030 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1031 | ac_prev=htmldir ;; | |
1032 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1033 | | --ht=*) | |
1034 | htmldir=$ac_optarg ;; | |
1035 | ||
c906108c SS |
1036 | -includedir | --includedir | --includedi | --included | --include \ |
1037 | | --includ | --inclu | --incl | --inc) | |
1038 | ac_prev=includedir ;; | |
1039 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1040 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1041 | includedir=$ac_optarg ;; |
c906108c SS |
1042 | |
1043 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1044 | ac_prev=infodir ;; | |
1045 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1046 | infodir=$ac_optarg ;; |
c906108c SS |
1047 | |
1048 | -libdir | --libdir | --libdi | --libd) | |
1049 | ac_prev=libdir ;; | |
1050 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1051 | libdir=$ac_optarg ;; |
c906108c SS |
1052 | |
1053 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1054 | | --libexe | --libex | --libe) | |
1055 | ac_prev=libexecdir ;; | |
1056 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1057 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1058 | libexecdir=$ac_optarg ;; |
c906108c | 1059 | |
81ecdfbb RW |
1060 | -localedir | --localedir | --localedi | --localed | --locale) |
1061 | ac_prev=localedir ;; | |
1062 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1063 | localedir=$ac_optarg ;; | |
1064 | ||
c906108c | 1065 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1066 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1067 | ac_prev=localstatedir ;; |
1068 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1069 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1070 | localstatedir=$ac_optarg ;; |
c906108c SS |
1071 | |
1072 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1073 | ac_prev=mandir ;; | |
1074 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1075 | mandir=$ac_optarg ;; |
c906108c SS |
1076 | |
1077 | -nfp | --nfp | --nf) | |
1078 | # Obsolete; use --without-fp. | |
1079 | with_fp=no ;; | |
1080 | ||
1081 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1082 | | --no-cr | --no-c | -n) |
c906108c SS |
1083 | no_create=yes ;; |
1084 | ||
1085 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1086 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1087 | no_recursion=yes ;; | |
1088 | ||
1089 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1090 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1091 | | --oldin | --oldi | --old | --ol | --o) | |
1092 | ac_prev=oldincludedir ;; | |
1093 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1094 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1095 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1096 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1097 | |
1098 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1099 | ac_prev=prefix ;; | |
1100 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1101 | prefix=$ac_optarg ;; |
c906108c SS |
1102 | |
1103 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1104 | | --program-pre | --program-pr | --program-p) | |
1105 | ac_prev=program_prefix ;; | |
1106 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1107 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1108 | program_prefix=$ac_optarg ;; |
c906108c SS |
1109 | |
1110 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1111 | | --program-suf | --program-su | --program-s) | |
1112 | ac_prev=program_suffix ;; | |
1113 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1114 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1115 | program_suffix=$ac_optarg ;; |
c906108c SS |
1116 | |
1117 | -program-transform-name | --program-transform-name \ | |
1118 | | --program-transform-nam | --program-transform-na \ | |
1119 | | --program-transform-n | --program-transform- \ | |
1120 | | --program-transform | --program-transfor \ | |
1121 | | --program-transfo | --program-transf \ | |
1122 | | --program-trans | --program-tran \ | |
1123 | | --progr-tra | --program-tr | --program-t) | |
1124 | ac_prev=program_transform_name ;; | |
1125 | -program-transform-name=* | --program-transform-name=* \ | |
1126 | | --program-transform-nam=* | --program-transform-na=* \ | |
1127 | | --program-transform-n=* | --program-transform-=* \ | |
1128 | | --program-transform=* | --program-transfor=* \ | |
1129 | | --program-transfo=* | --program-transf=* \ | |
1130 | | --program-trans=* | --program-tran=* \ | |
1131 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1132 | program_transform_name=$ac_optarg ;; |
c906108c | 1133 | |
81ecdfbb RW |
1134 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1135 | ac_prev=pdfdir ;; | |
1136 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1137 | pdfdir=$ac_optarg ;; | |
1138 | ||
1139 | -psdir | --psdir | --psdi | --psd | --ps) | |
1140 | ac_prev=psdir ;; | |
1141 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1142 | psdir=$ac_optarg ;; | |
1143 | ||
c906108c SS |
1144 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1145 | | -silent | --silent | --silen | --sile | --sil) | |
1146 | silent=yes ;; | |
1147 | ||
1148 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1149 | ac_prev=sbindir ;; | |
1150 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1151 | | --sbi=* | --sb=*) | |
bec39cab | 1152 | sbindir=$ac_optarg ;; |
c906108c SS |
1153 | |
1154 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1155 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1156 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1157 | | --sha | --sh) | |
1158 | ac_prev=sharedstatedir ;; | |
1159 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1160 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1161 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1162 | | --sha=* | --sh=*) | |
bec39cab | 1163 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1164 | |
1165 | -site | --site | --sit) | |
1166 | ac_prev=site ;; | |
1167 | -site=* | --site=* | --sit=*) | |
bec39cab | 1168 | site=$ac_optarg ;; |
3ace7edb | 1169 | |
c906108c SS |
1170 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1171 | ac_prev=srcdir ;; | |
1172 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1173 | srcdir=$ac_optarg ;; |
c906108c SS |
1174 | |
1175 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1176 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1177 | ac_prev=sysconfdir ;; | |
1178 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1179 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1180 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1181 | |
1182 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1183 | ac_prev=target_alias ;; |
c906108c | 1184 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1185 | target_alias=$ac_optarg ;; |
c906108c SS |
1186 | |
1187 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1188 | verbose=yes ;; | |
1189 | ||
bec39cab AC |
1190 | -version | --version | --versio | --versi | --vers | -V) |
1191 | ac_init_version=: ;; | |
c906108c SS |
1192 | |
1193 | -with-* | --with-*) | |
81ecdfbb | 1194 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1195 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1196 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1197 | as_fn_error "invalid package name: $ac_useropt" | |
1198 | ac_useropt_orig=$ac_useropt | |
1199 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1200 | case $ac_user_opts in | |
1201 | *" | |
1202 | "with_$ac_useropt" | |
1203 | "*) ;; | |
1204 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1205 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1206 | esac |
81ecdfbb | 1207 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1208 | |
1209 | -without-* | --without-*) | |
81ecdfbb | 1210 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1211 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1212 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1213 | as_fn_error "invalid package name: $ac_useropt" | |
1214 | ac_useropt_orig=$ac_useropt | |
1215 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1216 | case $ac_user_opts in | |
1217 | *" | |
1218 | "with_$ac_useropt" | |
1219 | "*) ;; | |
1220 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1221 | ac_unrecognized_sep=', ';; | |
1222 | esac | |
1223 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1224 | |
1225 | --x) | |
1226 | # Obsolete; use --with-x. | |
1227 | with_x=yes ;; | |
1228 | ||
1229 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1230 | | --x-incl | --x-inc | --x-in | --x-i) | |
1231 | ac_prev=x_includes ;; | |
1232 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1233 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1234 | x_includes=$ac_optarg ;; |
c906108c SS |
1235 | |
1236 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1237 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1238 | ac_prev=x_libraries ;; | |
1239 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1240 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1241 | x_libraries=$ac_optarg ;; |
c906108c | 1242 | |
81ecdfbb RW |
1243 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1244 | Try \`$0 --help' for more information." | |
c906108c SS |
1245 | ;; |
1246 | ||
bec39cab AC |
1247 | *=*) |
1248 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1249 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1250 | case $ac_envvar in #( |
1251 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1252 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1253 | esac | |
1254 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1255 | export $ac_envvar ;; |
1256 | ||
c906108c | 1257 | *) |
bec39cab | 1258 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1259 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1260 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1261 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1262 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1263 | ;; |
1264 | ||
1265 | esac | |
1266 | done | |
1267 | ||
1268 | if test -n "$ac_prev"; then | |
bec39cab | 1269 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1270 | as_fn_error "missing argument to $ac_option" |
c906108c | 1271 | fi |
c906108c | 1272 | |
81ecdfbb RW |
1273 | if test -n "$ac_unrecognized_opts"; then |
1274 | case $enable_option_checking in | |
1275 | no) ;; | |
1276 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1277 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1278 | esac |
81ecdfbb | 1279 | fi |
b4e70030 | 1280 | |
81ecdfbb RW |
1281 | # Check all directory arguments for consistency. |
1282 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1283 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1284 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1285 | libdir localedir mandir | |
b4e70030 | 1286 | do |
81ecdfbb RW |
1287 | eval ac_val=\$$ac_var |
1288 | # Remove trailing slashes. | |
1289 | case $ac_val in | |
1290 | */ ) | |
1291 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1292 | eval $ac_var=\$ac_val;; | |
1293 | esac | |
1294 | # Be sure to have absolute directory names. | |
b4e70030 | 1295 | case $ac_val in |
81ecdfbb RW |
1296 | [\\/$]* | ?:[\\/]* ) continue;; |
1297 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1298 | esac |
81ecdfbb | 1299 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1300 | done |
1301 | ||
bec39cab AC |
1302 | # There might be people who depend on the old broken behavior: `$host' |
1303 | # used to hold the argument of --host etc. | |
1304 | # FIXME: To remove some day. | |
1305 | build=$build_alias | |
1306 | host=$host_alias | |
1307 | target=$target_alias | |
1308 | ||
1309 | # FIXME: To remove some day. | |
1310 | if test "x$host_alias" != x; then | |
1311 | if test "x$build_alias" = x; then | |
1312 | cross_compiling=maybe | |
81ecdfbb | 1313 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1314 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1315 | elif test "x$build_alias" != "x$host_alias"; then | |
1316 | cross_compiling=yes | |
1317 | fi | |
1318 | fi | |
c906108c | 1319 | |
bec39cab AC |
1320 | ac_tool_prefix= |
1321 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1322 | ||
1323 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1324 | |
c906108c | 1325 | |
81ecdfbb RW |
1326 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1327 | ac_ls_di=`ls -di .` && | |
1328 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1329 | as_fn_error "working directory cannot be determined" | |
1330 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1331 | as_fn_error "pwd does not report name of working directory" | |
1332 | ||
1333 | ||
c906108c SS |
1334 | # Find the source files, if location was not specified. |
1335 | if test -z "$srcdir"; then | |
1336 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1337 | # Try the directory containing this script, then the parent directory. |
1338 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1339 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1340 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1341 | X"$as_myself" : 'X\(//\)$' \| \ | |
1342 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1343 | $as_echo X"$as_myself" | | |
1344 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1345 | s//\1/ | |
1346 | q | |
1347 | } | |
1348 | /^X\(\/\/\)[^/].*/{ | |
1349 | s//\1/ | |
1350 | q | |
1351 | } | |
1352 | /^X\(\/\/\)$/{ | |
1353 | s//\1/ | |
1354 | q | |
1355 | } | |
1356 | /^X\(\/\).*/{ | |
1357 | s//\1/ | |
1358 | q | |
1359 | } | |
1360 | s/.*/./; q'` | |
c906108c | 1361 | srcdir=$ac_confdir |
81ecdfbb | 1362 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1363 | srcdir=.. |
1364 | fi | |
1365 | else | |
1366 | ac_srcdir_defaulted=no | |
1367 | fi | |
81ecdfbb RW |
1368 | if test ! -r "$srcdir/$ac_unique_file"; then |
1369 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1370 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1371 | fi | |
1372 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1373 | ac_abs_confdir=`( | |
1374 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1375 | pwd)` | |
1376 | # When building in place, set srcdir=. | |
1377 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1378 | srcdir=. | |
1379 | fi | |
1380 | # Remove unnecessary trailing slashes from srcdir. | |
1381 | # Double slashes in file names in object file debugging info | |
1382 | # mess up M-x gdb in Emacs. | |
1383 | case $srcdir in | |
1384 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1385 | esac | |
1386 | for ac_var in $ac_precious_vars; do | |
1387 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1388 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1389 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1390 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1391 | done | |
c906108c | 1392 | |
bec39cab AC |
1393 | # |
1394 | # Report the --help message. | |
1395 | # | |
1396 | if test "$ac_init_help" = "long"; then | |
1397 | # Omit some internal or obsolete options to make the list less imposing. | |
1398 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1399 | cat <<_ACEOF | |
1400 | \`configure' configures this package to adapt to many kinds of systems. | |
1401 | ||
1402 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1403 | ||
1404 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1405 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1406 | ||
1407 | Defaults for the options are specified in brackets. | |
1408 | ||
1409 | Configuration: | |
1410 | -h, --help display this help and exit | |
1411 | --help=short display options specific to this package | |
1412 | --help=recursive display the short help of all the included packages | |
1413 | -V, --version display version information and exit | |
1414 | -q, --quiet, --silent do not print \`checking...' messages | |
1415 | --cache-file=FILE cache test results in FILE [disabled] | |
1416 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1417 | -n, --no-create do not create output files | |
1418 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1419 | ||
bec39cab AC |
1420 | Installation directories: |
1421 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1422 | [$ac_default_prefix] |
bec39cab | 1423 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1424 | [PREFIX] |
bec39cab AC |
1425 | |
1426 | By default, \`make install' will install all the files in | |
1427 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1428 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1429 | for instance \`--prefix=\$HOME'. | |
1430 | ||
1431 | For better control, use the options below. | |
1432 | ||
1433 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1434 | --bindir=DIR user executables [EPREFIX/bin] |
1435 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1436 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1437 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1438 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1439 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1440 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1441 | --includedir=DIR C header files [PREFIX/include] | |
1442 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1443 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1444 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1445 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1446 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1447 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1448 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1449 | --htmldir=DIR html documentation [DOCDIR] | |
1450 | --dvidir=DIR dvi documentation [DOCDIR] | |
1451 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1452 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1453 | _ACEOF |
1454 | ||
1455 | cat <<\_ACEOF | |
1456 | ||
9009e1ae MR |
1457 | Program names: |
1458 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1459 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1460 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1461 | ||
bec39cab AC |
1462 | X features: |
1463 | --x-includes=DIR X include files are in DIR | |
1464 | --x-libraries=DIR X library files are in DIR | |
1465 | ||
1466 | System types: | |
1467 | --build=BUILD configure for building on BUILD [guessed] | |
1468 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1469 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1470 | _ACEOF | |
1471 | fi | |
1472 | ||
1473 | if test -n "$ac_init_help"; then | |
1474 | ||
1475 | cat <<\_ACEOF | |
1476 | ||
1477 | Optional Features: | |
81ecdfbb | 1478 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1479 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1480 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1481 | --enable-maintainer-mode enable make rules and dependencies not useful |
1482 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1483 | --enable-plugins Enable support for plugins (defaults no) |
1484 | --disable-largefile omit support for large files | |
a1220294 TT |
1485 | --enable-targets=TARGETS |
1486 | alternative target configurations | |
c0993dbe | 1487 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1488 | --disable-gdbcli disable command-line interface (CLI) |
1489 | --disable-gdbmi disable machine-interface (MI) | |
1490 | --enable-tui enable full-screen terminal user interface (TUI) | |
1491 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1492 | --enable-profiling enable profiling of GDB | |
3841debe | 1493 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1494 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1495 | --enable-werror treat compile warnings as errors |
32c1c914 | 1496 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1497 | --enable-gdb-build-warnings |
32c1c914 | 1498 | enable GDB specific build-time compiler warnings if |
a1220294 | 1499 | gcc is used |
32c1c914 | 1500 | --enable-sim link gdb with simulator |
bec39cab | 1501 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1502 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1503 | is auto) | |
bec39cab AC |
1504 | |
1505 | Optional Packages: | |
1506 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1507 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1508 | --with-separate-debug-dir=PATH |
32c1c914 | 1509 | look for global separate debug info in this path |
62e4f60c | 1510 | [LIBDIR/debug] |
b14b1491 TT |
1511 | --with-gdb-datadir=PATH look for global separate data files in this path |
1512 | [DATADIR/gdb] | |
29b0e8a2 | 1513 | --with-relocated-sources=PATH |
32c1c914 | 1514 | automatically relocate this path for source files |
7349ff92 | 1515 | --with-auto-load-dir=PATH |
aff139ff | 1516 | directories from which to load auto-loaded scripts |
1564a261 | 1517 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1518 | --with-auto-load-safe-path=PATH |
aff139ff | 1519 | directories safe to hold auto-loaded files |
7349ff92 | 1520 | [--with-auto-load-dir] |
bccbefd2 JK |
1521 | --without-auto-load-safe-path |
1522 | do not restrict auto-loaded files locations | |
05e7c244 | 1523 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1524 | --with-curses use the curses library instead of the termcap |
1525 | library | |
c16158bc JM |
1526 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1527 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1528 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1529 | --with-libiconv-prefix=DIR |
1530 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1531 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1532 | --with-system-readline use installed readline library |
b8e0a31c SD |
1533 | --with-jit-reader-dir=PATH |
1534 | directory to load the JIT readers from | |
5c39566f | 1535 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1536 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1537 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1538 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1539 | --with-python[=PYTHON] include python support |
1540 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1541 | --with-guile[=GUILE] include guile support |
1542 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
a1220294 TT |
1543 | --without-included-regex |
1544 | don't use included regex; this is the default on | |
1545 | systems with version 2 of the GNU C library (use | |
1546 | with caution on other system) | |
81ecdfbb | 1547 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1548 | --with-system-gdbinit=PATH |
32c1c914 | 1549 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1550 | --with-lzma support lzma compression (auto/yes/no) |
1551 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1552 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1553 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1554 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1555 | --with-x use the X Window System |
393fd4c3 YQ |
1556 | --with-babeltrace include babeltrace support (auto/yes/no) |
1557 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1558 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1559 | |
1560 | Some influential environment variables: | |
1561 | CC C compiler command | |
1562 | CFLAGS C compiler flags | |
1563 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1564 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1565 | LIBS libraries to pass to the linker, e.g. -l<library> |
1566 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1567 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1568 | CPP C preprocessor |
f06e05e0 JK |
1569 | MAKEINFO Parent configure detects if it is of sufficient version. |
1570 | MAKEINFOFLAGS | |
1571 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1572 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1573 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1574 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1575 | This script will default YFLAGS to the empty string to avoid a | |
1576 | default value of `-d' given by some make applications. | |
1577 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1578 | |
1579 | Use these variables to override the choices made by `configure' or to help | |
1580 | it to find libraries and programs with nonstandard names/locations. | |
1581 | ||
81ecdfbb | 1582 | Report bugs to the package provider. |
bec39cab | 1583 | _ACEOF |
81ecdfbb | 1584 | ac_status=$? |
bec39cab AC |
1585 | fi |
1586 | ||
1587 | if test "$ac_init_help" = "recursive"; then | |
1588 | # If there are subdirs, report their specific --help. | |
bec39cab | 1589 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1590 | test -d "$ac_dir" || |
1591 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1592 | continue | |
bec39cab AC |
1593 | ac_builddir=. |
1594 | ||
81ecdfbb RW |
1595 | case "$ac_dir" in |
1596 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1597 | *) | |
1598 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1599 | # A ".." for each directory in $ac_dir_suffix. | |
1600 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1601 | case $ac_top_builddir_sub in | |
1602 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1603 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1604 | esac ;; | |
1605 | esac | |
1606 | ac_abs_top_builddir=$ac_pwd | |
1607 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1608 | # for backward compatibility: | |
1609 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1610 | |
1611 | case $srcdir in | |
81ecdfbb | 1612 | .) # We are building in place. |
bec39cab | 1613 | ac_srcdir=. |
81ecdfbb RW |
1614 | ac_top_srcdir=$ac_top_builddir_sub |
1615 | ac_abs_top_srcdir=$ac_pwd ;; | |
1616 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1617 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1618 | ac_top_srcdir=$srcdir |
1619 | ac_abs_top_srcdir=$srcdir ;; | |
1620 | *) # Relative name. | |
1621 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1622 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1623 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1624 | esac |
81ecdfbb | 1625 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1626 | |
81ecdfbb RW |
1627 | cd "$ac_dir" || { ac_status=$?; continue; } |
1628 | # Check for guested configure. | |
1629 | if test -f "$ac_srcdir/configure.gnu"; then | |
1630 | echo && | |
1631 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1632 | elif test -f "$ac_srcdir/configure"; then | |
1633 | echo && | |
1634 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1635 | else |
81ecdfbb RW |
1636 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1637 | fi || ac_status=$? | |
1638 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1639 | done |
1640 | fi | |
1641 | ||
81ecdfbb | 1642 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1643 | if $ac_init_version; then |
1644 | cat <<\_ACEOF | |
81ecdfbb RW |
1645 | configure |
1646 | generated by GNU Autoconf 2.64 | |
bec39cab | 1647 | |
81ecdfbb | 1648 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1649 | This configure script is free software; the Free Software Foundation |
1650 | gives unlimited permission to copy, distribute and modify it. | |
1651 | _ACEOF | |
81ecdfbb | 1652 | exit |
bec39cab | 1653 | fi |
bec39cab | 1654 | |
81ecdfbb RW |
1655 | ## ------------------------ ## |
1656 | ## Autoconf initialization. ## | |
1657 | ## ------------------------ ## | |
bec39cab | 1658 | |
81ecdfbb RW |
1659 | # ac_fn_c_try_compile LINENO |
1660 | # -------------------------- | |
1661 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1662 | ac_fn_c_try_compile () | |
1663 | { | |
1664 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1665 | rm -f conftest.$ac_objext | |
1666 | if { { ac_try="$ac_compile" | |
1667 | case "(($ac_try" in | |
1668 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1669 | *) ac_try_echo=$ac_try;; | |
1670 | esac | |
1671 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1672 | $as_echo "$ac_try_echo"; } >&5 | |
1673 | (eval "$ac_compile") 2>conftest.err | |
1674 | ac_status=$? | |
1675 | if test -s conftest.err; then | |
1676 | grep -v '^ *+' conftest.err >conftest.er1 | |
1677 | cat conftest.er1 >&5 | |
1678 | mv -f conftest.er1 conftest.err | |
1679 | fi | |
1680 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1681 | test $ac_status = 0; } && { | |
1682 | test -z "$ac_c_werror_flag" || | |
1683 | test ! -s conftest.err | |
1684 | } && test -s conftest.$ac_objext; then : | |
1685 | ac_retval=0 | |
1686 | else | |
1687 | $as_echo "$as_me: failed program was:" >&5 | |
1688 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1689 | |
81ecdfbb RW |
1690 | ac_retval=1 |
1691 | fi | |
1692 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1693 | return $ac_retval | |
1694 | ||
1695 | } # ac_fn_c_try_compile | |
1696 | ||
1697 | # ac_fn_c_try_cpp LINENO | |
1698 | # ---------------------- | |
1699 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1700 | ac_fn_c_try_cpp () | |
bec39cab | 1701 | { |
81ecdfbb RW |
1702 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1703 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1704 | case "(($ac_try" in | |
1705 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1706 | *) ac_try_echo=$ac_try;; | |
1707 | esac | |
1708 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1709 | $as_echo "$ac_try_echo"; } >&5 | |
1710 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1711 | ac_status=$? | |
1712 | if test -s conftest.err; then | |
1713 | grep -v '^ *+' conftest.err >conftest.er1 | |
1714 | cat conftest.er1 >&5 | |
1715 | mv -f conftest.er1 conftest.err | |
1716 | fi | |
1717 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1718 | test $ac_status = 0; } >/dev/null && { | |
1719 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1720 | test ! -s conftest.err | |
1721 | }; then : | |
1722 | ac_retval=0 | |
1723 | else | |
1724 | $as_echo "$as_me: failed program was:" >&5 | |
1725 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1726 | |
81ecdfbb RW |
1727 | ac_retval=1 |
1728 | fi | |
1729 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1730 | return $ac_retval | |
bec39cab | 1731 | |
81ecdfbb | 1732 | } # ac_fn_c_try_cpp |
bec39cab | 1733 | |
81ecdfbb RW |
1734 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1735 | # ------------------------------------------------------- | |
1736 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1737 | # the include files in INCLUDES and setting the cache variable VAR | |
1738 | # accordingly. | |
1739 | ac_fn_c_check_header_mongrel () | |
1740 | { | |
1741 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1742 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1744 | $as_echo_n "checking for $2... " >&6; } | |
1745 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1746 | $as_echo_n "(cached) " >&6 | |
1747 | fi | |
1748 | eval ac_res=\$$3 | |
1749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1750 | $as_echo "$ac_res" >&6; } | |
1751 | else | |
1752 | # Is the header compilable? | |
1753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1754 | $as_echo_n "checking $2 usability... " >&6; } | |
1755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1756 | /* end confdefs.h. */ | |
1757 | $4 | |
1758 | #include <$2> | |
1759 | _ACEOF | |
1760 | if ac_fn_c_try_compile "$LINENO"; then : | |
1761 | ac_header_compiler=yes | |
1762 | else | |
1763 | ac_header_compiler=no | |
1764 | fi | |
1765 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1767 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1768 | |
81ecdfbb RW |
1769 | # Is the header present? |
1770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1771 | $as_echo_n "checking $2 presence... " >&6; } | |
1772 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1773 | /* end confdefs.h. */ | |
1774 | #include <$2> | |
1775 | _ACEOF | |
1776 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1777 | ac_header_preproc=yes | |
1778 | else | |
1779 | ac_header_preproc=no | |
1780 | fi | |
1781 | rm -f conftest.err conftest.$ac_ext | |
1782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1783 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1784 | |
81ecdfbb RW |
1785 | # So? What about this header? |
1786 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1787 | yes:no: ) | |
1788 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1789 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1790 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1791 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1792 | ;; | |
1793 | no:yes:* ) | |
1794 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1795 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1796 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1797 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1798 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1799 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1800 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1801 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1802 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1803 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1804 | ;; | |
1805 | esac | |
1806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1807 | $as_echo_n "checking for $2... " >&6; } | |
1808 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1809 | $as_echo_n "(cached) " >&6 | |
1810 | else | |
1811 | eval "$3=\$ac_header_compiler" | |
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 | fi | |
1817 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1818 | |
81ecdfbb | 1819 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1820 | |
81ecdfbb RW |
1821 | # ac_fn_c_try_run LINENO |
1822 | # ---------------------- | |
1823 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1824 | # that executables *can* be run. | |
1825 | ac_fn_c_try_run () | |
1826 | { | |
1827 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1828 | if { { ac_try="$ac_link" | |
1829 | case "(($ac_try" in | |
1830 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1831 | *) ac_try_echo=$ac_try;; | |
1832 | esac | |
1833 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1834 | $as_echo "$ac_try_echo"; } >&5 | |
1835 | (eval "$ac_link") 2>&5 | |
1836 | ac_status=$? | |
1837 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1838 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1839 | { { case "(($ac_try" in | |
1840 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1841 | *) ac_try_echo=$ac_try;; | |
1842 | esac | |
1843 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1844 | $as_echo "$ac_try_echo"; } >&5 | |
1845 | (eval "$ac_try") 2>&5 | |
1846 | ac_status=$? | |
1847 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1848 | test $ac_status = 0; }; }; then : | |
1849 | ac_retval=0 | |
1850 | else | |
1851 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1852 | $as_echo "$as_me: failed program was:" >&5 | |
1853 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1854 | |
81ecdfbb RW |
1855 | ac_retval=$ac_status |
1856 | fi | |
1857 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1858 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1859 | return $ac_retval | |
bec39cab | 1860 | |
81ecdfbb | 1861 | } # ac_fn_c_try_run |
bec39cab | 1862 | |
81ecdfbb RW |
1863 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1864 | # ------------------------------------------------------- | |
1865 | # Tests whether HEADER exists and can be compiled using the include files in | |
1866 | # INCLUDES, setting the cache variable VAR accordingly. | |
1867 | ac_fn_c_check_header_compile () | |
1868 | { | |
1869 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1871 | $as_echo_n "checking for $2... " >&6; } | |
1872 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1873 | $as_echo_n "(cached) " >&6 | |
1874 | else | |
1875 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1876 | /* end confdefs.h. */ | |
1877 | $4 | |
1878 | #include <$2> | |
bec39cab | 1879 | _ACEOF |
81ecdfbb RW |
1880 | if ac_fn_c_try_compile "$LINENO"; then : |
1881 | eval "$3=yes" | |
1882 | else | |
1883 | eval "$3=no" | |
1884 | fi | |
1885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1886 | fi | |
1887 | eval ac_res=\$$3 | |
1888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1889 | $as_echo "$ac_res" >&6; } | |
1890 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1891 | |
81ecdfbb | 1892 | } # ac_fn_c_check_header_compile |
bec39cab | 1893 | |
81ecdfbb RW |
1894 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1895 | # -------------------------------------------- | |
1896 | # Tries to find the compile-time value of EXPR in a program that includes | |
1897 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1898 | # computed | |
1899 | ac_fn_c_compute_int () | |
1900 | { | |
1901 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1902 | if test "$cross_compiling" = yes; then | |
1903 | # Depending upon the size, compute the lo and hi bounds. | |
1904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1905 | /* end confdefs.h. */ | |
1906 | $4 | |
1907 | int | |
1908 | main () | |
1909 | { | |
1910 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1911 | test_array [0] = 0 | |
bec39cab | 1912 | |
81ecdfbb RW |
1913 | ; |
1914 | return 0; | |
1915 | } | |
1916 | _ACEOF | |
1917 | if ac_fn_c_try_compile "$LINENO"; then : | |
1918 | ac_lo=0 ac_mid=0 | |
1919 | while :; do | |
1920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1921 | /* end confdefs.h. */ | |
1922 | $4 | |
1923 | int | |
1924 | main () | |
1925 | { | |
1926 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1927 | test_array [0] = 0 | |
bec39cab | 1928 | |
81ecdfbb RW |
1929 | ; |
1930 | return 0; | |
1931 | } | |
1932 | _ACEOF | |
1933 | if ac_fn_c_try_compile "$LINENO"; then : | |
1934 | ac_hi=$ac_mid; break | |
1935 | else | |
1936 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1937 | if test $ac_lo -le $ac_mid; then | |
1938 | ac_lo= ac_hi= | |
1939 | break | |
1940 | fi | |
1941 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 1942 | fi |
81ecdfbb RW |
1943 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1944 | done | |
c906108c | 1945 | else |
81ecdfbb RW |
1946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1947 | /* end confdefs.h. */ | |
1948 | $4 | |
1949 | int | |
1950 | main () | |
1951 | { | |
1952 | static int test_array [1 - 2 * !(($2) < 0)]; | |
1953 | test_array [0] = 0 | |
bec39cab | 1954 | |
81ecdfbb RW |
1955 | ; |
1956 | return 0; | |
1957 | } | |
1958 | _ACEOF | |
1959 | if ac_fn_c_try_compile "$LINENO"; then : | |
1960 | ac_hi=-1 ac_mid=-1 | |
1961 | while :; do | |
1962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1963 | /* end confdefs.h. */ | |
1964 | $4 | |
1965 | int | |
1966 | main () | |
1967 | { | |
1968 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
1969 | test_array [0] = 0 | |
bec39cab | 1970 | |
81ecdfbb RW |
1971 | ; |
1972 | return 0; | |
1973 | } | |
1974 | _ACEOF | |
1975 | if ac_fn_c_try_compile "$LINENO"; then : | |
1976 | ac_lo=$ac_mid; break | |
1977 | else | |
1978 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1979 | if test $ac_mid -le $ac_hi; then | |
1980 | ac_lo= ac_hi= | |
1981 | break | |
1982 | fi | |
1983 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1984 | fi | |
1985 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1986 | done | |
1987 | else | |
1988 | ac_lo= ac_hi= | |
1989 | fi | |
1990 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1991 | fi | |
1992 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1993 | # Binary search between lo and hi bounds. | |
1994 | while test "x$ac_lo" != "x$ac_hi"; do | |
1995 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
1996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1997 | /* end confdefs.h. */ | |
1998 | $4 | |
1999 | int | |
2000 | main () | |
2001 | { | |
2002 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2003 | test_array [0] = 0 | |
bec39cab | 2004 | |
81ecdfbb RW |
2005 | ; |
2006 | return 0; | |
2007 | } | |
2008 | _ACEOF | |
2009 | if ac_fn_c_try_compile "$LINENO"; then : | |
2010 | ac_hi=$ac_mid | |
2011 | else | |
2012 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2013 | fi | |
2014 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2015 | done | |
2016 | case $ac_lo in #(( | |
2017 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2018 | '') ac_retval=1 ;; | |
2019 | esac | |
2020 | else | |
2021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2022 | /* end confdefs.h. */ | |
2023 | $4 | |
2024 | static long int longval () { return $2; } | |
2025 | static unsigned long int ulongval () { return $2; } | |
2026 | #include <stdio.h> | |
2027 | #include <stdlib.h> | |
2028 | int | |
2029 | main () | |
2030 | { | |
bec39cab | 2031 | |
81ecdfbb RW |
2032 | FILE *f = fopen ("conftest.val", "w"); |
2033 | if (! f) | |
2034 | return 1; | |
2035 | if (($2) < 0) | |
2036 | { | |
2037 | long int i = longval (); | |
2038 | if (i != ($2)) | |
2039 | return 1; | |
2040 | fprintf (f, "%ld", i); | |
2041 | } | |
2042 | else | |
2043 | { | |
2044 | unsigned long int i = ulongval (); | |
2045 | if (i != ($2)) | |
2046 | return 1; | |
2047 | fprintf (f, "%lu", i); | |
2048 | } | |
2049 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2050 | on some platforms. */ | |
2051 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2052 | |
81ecdfbb RW |
2053 | ; |
2054 | return 0; | |
2055 | } | |
2056 | _ACEOF | |
2057 | if ac_fn_c_try_run "$LINENO"; then : | |
2058 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2059 | else | |
2060 | ac_retval=1 | |
2061 | fi | |
2062 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2063 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2064 | rm -f conftest.val | |
bec39cab | 2065 | |
81ecdfbb RW |
2066 | fi |
2067 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2068 | return $ac_retval | |
bec39cab | 2069 | |
81ecdfbb | 2070 | } # ac_fn_c_compute_int |
bec39cab | 2071 | |
c971b7fa PA |
2072 | # ac_fn_c_try_link LINENO |
2073 | # ----------------------- | |
2074 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2075 | ac_fn_c_try_link () | |
2076 | { | |
2077 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2078 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2079 | if { { ac_try="$ac_link" | |
2080 | case "(($ac_try" in | |
2081 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2082 | *) ac_try_echo=$ac_try;; | |
2083 | esac | |
2084 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2085 | $as_echo "$ac_try_echo"; } >&5 | |
2086 | (eval "$ac_link") 2>conftest.err | |
2087 | ac_status=$? | |
2088 | if test -s conftest.err; then | |
2089 | grep -v '^ *+' conftest.err >conftest.er1 | |
2090 | cat conftest.er1 >&5 | |
2091 | mv -f conftest.er1 conftest.err | |
2092 | fi | |
2093 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2094 | test $ac_status = 0; } && { | |
2095 | test -z "$ac_c_werror_flag" || | |
2096 | test ! -s conftest.err | |
2097 | } && test -s conftest$ac_exeext && { | |
2098 | test "$cross_compiling" = yes || | |
2099 | $as_test_x conftest$ac_exeext | |
2100 | }; then : | |
2101 | ac_retval=0 | |
2102 | else | |
2103 | $as_echo "$as_me: failed program was:" >&5 | |
2104 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2105 | ||
2106 | ac_retval=1 | |
2107 | fi | |
2108 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2109 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2110 | # interfere with the next link command; also delete a directory that is | |
2111 | # left behind by Apple's compiler. We do this before executing the actions. | |
2112 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2113 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2114 | return $ac_retval | |
2115 | ||
2116 | } # ac_fn_c_try_link | |
2117 | ||
55a8c076 YQ |
2118 | # ac_fn_c_check_func LINENO FUNC VAR |
2119 | # ---------------------------------- | |
2120 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2121 | ac_fn_c_check_func () | |
81ecdfbb RW |
2122 | { |
2123 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2125 | $as_echo_n "checking for $2... " >&6; } | |
2126 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2127 | $as_echo_n "(cached) " >&6 | |
2128 | else | |
81ecdfbb RW |
2129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2130 | /* end confdefs.h. */ | |
55a8c076 YQ |
2131 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2132 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2133 | #define $2 innocuous_$2 | |
2134 | ||
2135 | /* System header to define __stub macros and hopefully few prototypes, | |
2136 | which can conflict with char $2 (); below. | |
2137 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2138 | <limits.h> exists even on freestanding compilers. */ | |
2139 | ||
2140 | #ifdef __STDC__ | |
2141 | # include <limits.h> | |
2142 | #else | |
2143 | # include <assert.h> | |
2144 | #endif | |
2145 | ||
2146 | #undef $2 | |
2147 | ||
2148 | /* Override any GCC internal prototype to avoid an error. | |
2149 | Use char because int might match the return type of a GCC | |
2150 | builtin and then its argument prototype would still apply. */ | |
2151 | #ifdef __cplusplus | |
2152 | extern "C" | |
2153 | #endif | |
2154 | char $2 (); | |
2155 | /* The GNU C library defines this for functions which it implements | |
2156 | to always fail with ENOSYS. Some functions are actually named | |
2157 | something starting with __ and the normal name is an alias. */ | |
2158 | #if defined __stub_$2 || defined __stub___$2 | |
2159 | choke me | |
2160 | #endif | |
2161 | ||
2162 | int | |
2163 | main () | |
2164 | { | |
2165 | return $2 (); | |
2166 | ; | |
2167 | return 0; | |
2168 | } | |
2169 | _ACEOF | |
2170 | if ac_fn_c_try_link "$LINENO"; then : | |
2171 | eval "$3=yes" | |
2172 | else | |
2173 | eval "$3=no" | |
2174 | fi | |
2175 | rm -f core conftest.err conftest.$ac_objext \ | |
2176 | conftest$ac_exeext conftest.$ac_ext | |
2177 | fi | |
2178 | eval ac_res=\$$3 | |
2179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2180 | $as_echo "$ac_res" >&6; } | |
2181 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2182 | ||
2183 | } # ac_fn_c_check_func | |
2184 | ||
770d76d7 PA |
2185 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2186 | # ------------------------------------ | |
2187 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2188 | ac_fn_c_check_decl () | |
2189 | { | |
2190 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2191 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2192 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2194 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2195 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2196 | $as_echo_n "(cached) " >&6 | |
2197 | else | |
2198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2199 | /* end confdefs.h. */ | |
2200 | $4 | |
2201 | int | |
2202 | main () | |
2203 | { | |
2204 | #ifndef $as_decl_name | |
2205 | #ifdef __cplusplus | |
2206 | (void) $as_decl_use; | |
2207 | #else | |
2208 | (void) $as_decl_name; | |
2209 | #endif | |
2210 | #endif | |
2211 | ||
2212 | ; | |
2213 | return 0; | |
2214 | } | |
2215 | _ACEOF | |
2216 | if ac_fn_c_try_compile "$LINENO"; then : | |
2217 | eval "$3=yes" | |
2218 | else | |
2219 | eval "$3=no" | |
2220 | fi | |
2221 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2222 | fi | |
2223 | eval ac_res=\$$3 | |
2224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2225 | $as_echo "$ac_res" >&6; } | |
2226 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2227 | ||
2228 | } # ac_fn_c_check_decl | |
2229 | ||
55a8c076 YQ |
2230 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2231 | # ---------------------------------------------------- | |
2232 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2233 | # INCLUDES, setting cache variable VAR accordingly. | |
2234 | ac_fn_c_check_member () | |
2235 | { | |
2236 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2237 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2238 | $as_echo_n "checking for $2.$3... " >&6; } | |
2239 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2240 | $as_echo_n "(cached) " >&6 | |
2241 | else | |
2242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2243 | /* end confdefs.h. */ | |
2244 | $5 | |
2245 | int | |
2246 | main () | |
2247 | { | |
2248 | static $2 ac_aggr; | |
2249 | if (ac_aggr.$3) | |
2250 | return 0; | |
2251 | ; | |
2252 | return 0; | |
2253 | } | |
2254 | _ACEOF | |
2255 | if ac_fn_c_try_compile "$LINENO"; then : | |
2256 | eval "$4=yes" | |
2257 | else | |
2258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2259 | /* end confdefs.h. */ | |
2260 | $5 | |
2261 | int | |
2262 | main () | |
2263 | { | |
2264 | static $2 ac_aggr; | |
2265 | if (sizeof ac_aggr.$3) | |
2266 | return 0; | |
2267 | ; | |
2268 | return 0; | |
2269 | } | |
2270 | _ACEOF | |
2271 | if ac_fn_c_try_compile "$LINENO"; then : | |
2272 | eval "$4=yes" | |
2273 | else | |
2274 | eval "$4=no" | |
2275 | fi | |
2276 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2277 | fi | |
2278 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2279 | fi | |
2280 | eval ac_res=\$$4 | |
2281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2282 | $as_echo "$ac_res" >&6; } | |
2283 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2284 | ||
2285 | } # ac_fn_c_check_member | |
2286 | ||
2287 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2288 | # ------------------------------------------- | |
2289 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2290 | # variable VAR accordingly. | |
2291 | ac_fn_c_check_type () | |
2292 | { | |
2293 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2295 | $as_echo_n "checking for $2... " >&6; } | |
2296 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2297 | $as_echo_n "(cached) " >&6 | |
2298 | else | |
2299 | eval "$3=no" | |
2300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2301 | /* end confdefs.h. */ | |
2302 | $4 | |
2303 | int | |
2304 | main () | |
2305 | { | |
2306 | if (sizeof ($2)) | |
2307 | return 0; | |
2308 | ; | |
2309 | return 0; | |
2310 | } | |
2311 | _ACEOF | |
2312 | if ac_fn_c_try_compile "$LINENO"; then : | |
2313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2314 | /* end confdefs.h. */ | |
2315 | $4 | |
2316 | int | |
2317 | main () | |
2318 | { | |
2319 | if (sizeof (($2))) | |
2320 | return 0; | |
2321 | ; | |
2322 | return 0; | |
2323 | } | |
2324 | _ACEOF | |
2325 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2326 | |
81ecdfbb RW |
2327 | else |
2328 | eval "$3=yes" | |
2329 | fi | |
2330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2331 | fi | |
2332 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2333 | fi | |
2334 | eval ac_res=\$$3 | |
2335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2336 | $as_echo "$ac_res" >&6; } | |
2337 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2338 | |
81ecdfbb RW |
2339 | } # ac_fn_c_check_type |
2340 | cat >config.log <<_ACEOF | |
2341 | This file contains any messages produced by compilers while | |
2342 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2343 | |
81ecdfbb RW |
2344 | It was created by $as_me, which was |
2345 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2346 | |
81ecdfbb | 2347 | $ $0 $@ |
413ccac7 | 2348 | |
81ecdfbb RW |
2349 | _ACEOF |
2350 | exec 5>>config.log | |
2351 | { | |
2352 | cat <<_ASUNAME | |
2353 | ## --------- ## | |
2354 | ## Platform. ## | |
2355 | ## --------- ## | |
413ccac7 | 2356 | |
81ecdfbb RW |
2357 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2358 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2359 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2360 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2361 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2362 | |
81ecdfbb RW |
2363 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2364 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2365 | |
81ecdfbb RW |
2366 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2367 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2368 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2369 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2370 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2371 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2372 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2373 | |
81ecdfbb | 2374 | _ASUNAME |
bec39cab | 2375 | |
bec39cab AC |
2376 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2377 | for as_dir in $PATH | |
2378 | do | |
2379 | IFS=$as_save_IFS | |
2380 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2381 | $as_echo "PATH: $as_dir" |
2382 | done | |
2383 | IFS=$as_save_IFS | |
bec39cab | 2384 | |
81ecdfbb | 2385 | } >&5 |
bec39cab | 2386 | |
81ecdfbb | 2387 | cat >&5 <<_ACEOF |
bec39cab | 2388 | |
bec39cab | 2389 | |
81ecdfbb RW |
2390 | ## ----------- ## |
2391 | ## Core tests. ## | |
2392 | ## ----------- ## | |
2393 | ||
2394 | _ACEOF | |
2395 | ||
2396 | ||
2397 | # Keep a trace of the command line. | |
2398 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2399 | # Strip out --silent because we don't want to record it for future runs. | |
2400 | # Also quote any args containing shell meta-characters. | |
2401 | # Make two passes to allow for proper duplicate-argument suppression. | |
2402 | ac_configure_args= | |
2403 | ac_configure_args0= | |
2404 | ac_configure_args1= | |
2405 | ac_must_keep_next=false | |
2406 | for ac_pass in 1 2 | |
2407 | do | |
2408 | for ac_arg | |
2409 | do | |
2410 | case $ac_arg in | |
2411 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2412 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2413 | | -silent | --silent | --silen | --sile | --sil) | |
2414 | continue ;; | |
2415 | *\'*) | |
2416 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2417 | esac | |
2418 | case $ac_pass in | |
2419 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2420 | 2) | |
2421 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2422 | if test $ac_must_keep_next = true; then | |
2423 | ac_must_keep_next=false # Got value, back to normal. | |
2424 | else | |
2425 | case $ac_arg in | |
2426 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2427 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2428 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2429 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2430 | case "$ac_configure_args0 " in | |
2431 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2432 | esac | |
2433 | ;; | |
2434 | -* ) ac_must_keep_next=true ;; | |
2435 | esac | |
2436 | fi | |
2437 | as_fn_append ac_configure_args " '$ac_arg'" | |
2438 | ;; | |
2439 | esac | |
2440 | done | |
2441 | done | |
2442 | { ac_configure_args0=; unset ac_configure_args0;} | |
2443 | { ac_configure_args1=; unset ac_configure_args1;} | |
2444 | ||
2445 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2446 | # config.log. We remove comments because anyway the quotes in there | |
2447 | # would cause problems or look ugly. | |
2448 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2449 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2450 | trap 'exit_status=$? | |
2451 | # Save into config.log some information that might help in debugging. | |
2452 | { | |
2453 | echo | |
2454 | ||
2455 | cat <<\_ASBOX | |
2456 | ## ---------------- ## | |
2457 | ## Cache variables. ## | |
2458 | ## ---------------- ## | |
2459 | _ASBOX | |
2460 | echo | |
2461 | # The following way of writing the cache mishandles newlines in values, | |
2462 | ( | |
2463 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2464 | eval ac_val=\$$ac_var | |
2465 | case $ac_val in #( | |
2466 | *${as_nl}*) | |
2467 | case $ac_var in #( | |
2468 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2469 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2470 | esac | |
2471 | case $ac_var in #( | |
2472 | _ | IFS | as_nl) ;; #( | |
2473 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2474 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2475 | esac ;; | |
2476 | esac | |
2477 | done | |
2478 | (set) 2>&1 | | |
2479 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2480 | *${as_nl}ac_space=\ *) | |
2481 | sed -n \ | |
2482 | "s/'\''/'\''\\\\'\'''\''/g; | |
2483 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2484 | ;; #( | |
2485 | *) | |
2486 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2487 | ;; | |
2488 | esac | | |
2489 | sort | |
2490 | ) | |
2491 | echo | |
2492 | ||
2493 | cat <<\_ASBOX | |
2494 | ## ----------------- ## | |
2495 | ## Output variables. ## | |
2496 | ## ----------------- ## | |
2497 | _ASBOX | |
2498 | echo | |
2499 | for ac_var in $ac_subst_vars | |
2500 | do | |
2501 | eval ac_val=\$$ac_var | |
2502 | case $ac_val in | |
2503 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2504 | esac | |
2505 | $as_echo "$ac_var='\''$ac_val'\''" | |
2506 | done | sort | |
2507 | echo | |
2508 | ||
2509 | if test -n "$ac_subst_files"; then | |
2510 | cat <<\_ASBOX | |
2511 | ## ------------------- ## | |
2512 | ## File substitutions. ## | |
2513 | ## ------------------- ## | |
2514 | _ASBOX | |
2515 | echo | |
2516 | for ac_var in $ac_subst_files | |
2517 | do | |
2518 | eval ac_val=\$$ac_var | |
2519 | case $ac_val in | |
2520 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2521 | esac | |
2522 | $as_echo "$ac_var='\''$ac_val'\''" | |
2523 | done | sort | |
2524 | echo | |
2525 | fi | |
2526 | ||
2527 | if test -s confdefs.h; then | |
2528 | cat <<\_ASBOX | |
2529 | ## ----------- ## | |
2530 | ## confdefs.h. ## | |
2531 | ## ----------- ## | |
2532 | _ASBOX | |
2533 | echo | |
2534 | cat confdefs.h | |
2535 | echo | |
2536 | fi | |
2537 | test "$ac_signal" != 0 && | |
2538 | $as_echo "$as_me: caught signal $ac_signal" | |
2539 | $as_echo "$as_me: exit $exit_status" | |
2540 | } >&5 | |
2541 | rm -f core *.core core.conftest.* && | |
2542 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2543 | exit $exit_status | |
2544 | ' 0 | |
2545 | for ac_signal in 1 2 13 15; do | |
2546 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2547 | done | |
2548 | ac_signal=0 | |
2549 | ||
2550 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2551 | rm -f -r conftest* confdefs.h | |
2552 | ||
2553 | $as_echo "/* confdefs.h */" > confdefs.h | |
2554 | ||
2555 | # Predefined preprocessor variables. | |
2556 | ||
2557 | cat >>confdefs.h <<_ACEOF | |
2558 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2559 | _ACEOF | |
2560 | ||
2561 | cat >>confdefs.h <<_ACEOF | |
2562 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2563 | _ACEOF | |
2564 | ||
2565 | cat >>confdefs.h <<_ACEOF | |
2566 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2567 | _ACEOF | |
2568 | ||
2569 | cat >>confdefs.h <<_ACEOF | |
2570 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2571 | _ACEOF | |
2572 | ||
2573 | cat >>confdefs.h <<_ACEOF | |
2574 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2575 | _ACEOF | |
2576 | ||
2577 | cat >>confdefs.h <<_ACEOF | |
2578 | #define PACKAGE_URL "$PACKAGE_URL" | |
2579 | _ACEOF | |
2580 | ||
2581 | ||
2582 | # Let the site file select an alternate cache file if it wants to. | |
2583 | # Prefer an explicitly selected file to automatically selected ones. | |
2584 | ac_site_file1=NONE | |
2585 | ac_site_file2=NONE | |
2586 | if test -n "$CONFIG_SITE"; then | |
2587 | ac_site_file1=$CONFIG_SITE | |
2588 | elif test "x$prefix" != xNONE; then | |
2589 | ac_site_file1=$prefix/share/config.site | |
2590 | ac_site_file2=$prefix/etc/config.site | |
2591 | else | |
2592 | ac_site_file1=$ac_default_prefix/share/config.site | |
2593 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2594 | fi | |
2595 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2596 | do | |
2597 | test "x$ac_site_file" = xNONE && continue | |
2598 | if test -r "$ac_site_file"; then | |
2599 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2600 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2601 | sed 's/^/| /' "$ac_site_file" >&5 | |
2602 | . "$ac_site_file" | |
2603 | fi | |
2604 | done | |
2605 | ||
2606 | if test -r "$cache_file"; then | |
2607 | # Some versions of bash will fail to source /dev/null (special | |
2608 | # files actually), so we avoid doing that. | |
2609 | if test -f "$cache_file"; then | |
2610 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2611 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2612 | case $cache_file in | |
2613 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2614 | *) . "./$cache_file";; | |
2615 | esac | |
2616 | fi | |
2617 | else | |
2618 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2619 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2620 | >$cache_file | |
bec39cab AC |
2621 | fi |
2622 | ||
81ecdfbb RW |
2623 | # Check that the precious variables saved in the cache have kept the same |
2624 | # value. | |
2625 | ac_cache_corrupted=false | |
2626 | for ac_var in $ac_precious_vars; do | |
2627 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2628 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2629 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2630 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2631 | case $ac_old_set,$ac_new_set in | |
2632 | set,) | |
2633 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2634 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2635 | ac_cache_corrupted=: ;; | |
2636 | ,set) | |
2637 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2638 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2639 | ac_cache_corrupted=: ;; | |
2640 | ,);; | |
2641 | *) | |
2642 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2643 | # differences in whitespace do not lead to failure. | |
2644 | ac_old_val_w=`echo x $ac_old_val` | |
2645 | ac_new_val_w=`echo x $ac_new_val` | |
2646 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2647 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2648 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2649 | ac_cache_corrupted=: | |
2650 | else | |
2651 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2652 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2653 | eval $ac_var=\$ac_old_val | |
2654 | fi | |
2655 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2656 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2657 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2658 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2659 | fi;; | |
2660 | esac | |
2661 | # Pass precious variables to config.status. | |
2662 | if test "$ac_new_set" = set; then | |
2663 | case $ac_new_val in | |
2664 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2665 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2666 | esac | |
2667 | case " $ac_configure_args " in | |
2668 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2669 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2670 | esac | |
2671 | fi | |
2672 | done | |
2673 | if $ac_cache_corrupted; then | |
2674 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2675 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2676 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2677 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2678 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2679 | fi | |
2680 | ## -------------------- ## | |
2681 | ## Main body of script. ## | |
2682 | ## -------------------- ## | |
2683 | ||
2684 | ac_ext=c | |
2685 | ac_cpp='$CPP $CPPFLAGS' | |
2686 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2687 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2688 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2689 | ||
2690 | ||
2691 | ||
2692 | ||
2693 | ||
2694 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2695 | ||
2696 | ||
2697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2698 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2699 | # Check whether --enable-maintainer-mode was given. | |
2700 | if test "${enable_maintainer_mode+set}" = set; then : | |
2701 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2702 | else | |
2703 | USE_MAINTAINER_MODE=no | |
2704 | fi | |
2705 | ||
2706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2707 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2708 | if test $USE_MAINTAINER_MODE = yes; then | |
2709 | MAINTAINER_MODE_TRUE= | |
2710 | MAINTAINER_MODE_FALSE='#' | |
2711 | else | |
2712 | MAINTAINER_MODE_TRUE='#' | |
2713 | MAINTAINER_MODE_FALSE= | |
2714 | fi | |
2715 | ||
2716 | MAINT=$MAINTAINER_MODE_TRUE | |
2717 | ||
2718 | ||
2719 | ||
17ef446e | 2720 | # Set the 'development' global. |
270c9937 | 2721 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2722 | |
81ecdfbb RW |
2723 | ac_ext=c |
2724 | ac_cpp='$CPP $CPPFLAGS' | |
2725 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2726 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2727 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2728 | if test -n "$ac_tool_prefix"; then | |
2729 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2730 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2732 | $as_echo_n "checking for $ac_word... " >&6; } | |
2733 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2734 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2735 | else |
2736 | if test -n "$CC"; then | |
2737 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2738 | else | |
bec39cab AC |
2739 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2740 | for as_dir in $PATH | |
2741 | do | |
2742 | IFS=$as_save_IFS | |
2743 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2744 | for ac_exec_ext in '' $ac_executable_extensions; do |
2745 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2746 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2747 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2748 | break 2 |
2749 | fi | |
2750 | done | |
81ecdfbb RW |
2751 | done |
2752 | IFS=$as_save_IFS | |
bec39cab | 2753 | |
c906108c SS |
2754 | fi |
2755 | fi | |
bec39cab | 2756 | CC=$ac_cv_prog_CC |
c906108c | 2757 | if test -n "$CC"; then |
81ecdfbb RW |
2758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2759 | $as_echo "$CC" >&6; } | |
c906108c | 2760 | else |
81ecdfbb RW |
2761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2762 | $as_echo "no" >&6; } | |
c906108c SS |
2763 | fi |
2764 | ||
81ecdfbb | 2765 | |
b4e70030 JB |
2766 | fi |
2767 | if test -z "$ac_cv_prog_CC"; then | |
2768 | ac_ct_CC=$CC | |
81ecdfbb RW |
2769 | # Extract the first word of "gcc", so it can be a program name with args. |
2770 | set dummy gcc; ac_word=$2 | |
2771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2772 | $as_echo_n "checking for $ac_word... " >&6; } | |
2773 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2774 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2775 | else |
2776 | if test -n "$ac_ct_CC"; then | |
2777 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2778 | else | |
2779 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2780 | for as_dir in $PATH | |
2781 | do | |
2782 | IFS=$as_save_IFS | |
2783 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2784 | for ac_exec_ext in '' $ac_executable_extensions; do |
2785 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2786 | ac_cv_prog_ac_ct_CC="gcc" | |
2787 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2788 | break 2 |
4e8d927d | 2789 | fi |
b4e70030 | 2790 | done |
81ecdfbb RW |
2791 | done |
2792 | IFS=$as_save_IFS | |
b4e70030 JB |
2793 | |
2794 | fi | |
2795 | fi | |
2796 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2797 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2799 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2800 | else |
81ecdfbb RW |
2801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2802 | $as_echo "no" >&6; } | |
b4e70030 JB |
2803 | fi |
2804 | ||
81ecdfbb RW |
2805 | if test "x$ac_ct_CC" = x; then |
2806 | CC="" | |
2807 | else | |
2808 | case $cross_compiling:$ac_tool_warned in | |
2809 | yes:) | |
2810 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2811 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2812 | ac_tool_warned=yes ;; | |
2813 | esac | |
2814 | CC=$ac_ct_CC | |
2815 | fi | |
b4e70030 JB |
2816 | else |
2817 | CC="$ac_cv_prog_CC" | |
2818 | fi | |
2819 | ||
c906108c | 2820 | if test -z "$CC"; then |
81ecdfbb RW |
2821 | if test -n "$ac_tool_prefix"; then |
2822 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2823 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2825 | $as_echo_n "checking for $ac_word... " >&6; } | |
2826 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2827 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2828 | else |
2829 | if test -n "$CC"; then | |
2830 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2831 | else | |
bec39cab AC |
2832 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2833 | for as_dir in $PATH | |
2834 | do | |
2835 | IFS=$as_save_IFS | |
2836 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2837 | for ac_exec_ext in '' $ac_executable_extensions; do |
2838 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2839 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2840 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2841 | break 2 |
2842 | fi | |
2843 | done | |
81ecdfbb RW |
2844 | done |
2845 | IFS=$as_save_IFS | |
2846 | ||
2847 | fi | |
2848 | fi | |
2849 | CC=$ac_cv_prog_CC | |
2850 | if test -n "$CC"; then | |
2851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2852 | $as_echo "$CC" >&6; } | |
2853 | else | |
2854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2855 | $as_echo "no" >&6; } | |
2856 | fi | |
2857 | ||
2858 | ||
2859 | fi | |
2860 | fi | |
2861 | if test -z "$CC"; then | |
2862 | # Extract the first word of "cc", so it can be a program name with args. | |
2863 | set dummy cc; ac_word=$2 | |
2864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2865 | $as_echo_n "checking for $ac_word... " >&6; } | |
2866 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2867 | $as_echo_n "(cached) " >&6 | |
2868 | else | |
2869 | if test -n "$CC"; then | |
2870 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2871 | else | |
2872 | ac_prog_rejected=no | |
2873 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2874 | for as_dir in $PATH | |
2875 | do | |
2876 | IFS=$as_save_IFS | |
2877 | test -z "$as_dir" && as_dir=. | |
2878 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2879 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2880 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2881 | ac_prog_rejected=yes | |
2882 | continue | |
2883 | fi | |
2884 | ac_cv_prog_CC="cc" | |
2885 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2886 | break 2 | |
2887 | fi | |
2888 | done | |
2889 | done | |
2890 | IFS=$as_save_IFS | |
bec39cab | 2891 | |
c906108c SS |
2892 | if test $ac_prog_rejected = yes; then |
2893 | # We found a bogon in the path, so make sure we never use it. | |
2894 | set dummy $ac_cv_prog_CC | |
2895 | shift | |
bec39cab | 2896 | if test $# != 0; then |
c906108c SS |
2897 | # We chose a different compiler from the bogus one. |
2898 | # However, it has the same basename, so the bogon will be chosen | |
2899 | # first if we set CC to just the basename; use the full file name. | |
2900 | shift | |
bec39cab | 2901 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2902 | fi |
2903 | fi | |
2904 | fi | |
2905 | fi | |
bec39cab | 2906 | CC=$ac_cv_prog_CC |
c906108c | 2907 | if test -n "$CC"; then |
81ecdfbb RW |
2908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2909 | $as_echo "$CC" >&6; } | |
c906108c | 2910 | else |
81ecdfbb RW |
2911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2912 | $as_echo "no" >&6; } | |
c906108c SS |
2913 | fi |
2914 | ||
81ecdfbb | 2915 | |
bec39cab AC |
2916 | fi |
2917 | if test -z "$CC"; then | |
2918 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2919 | for ac_prog in cl.exe |
bec39cab AC |
2920 | do |
2921 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2922 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2924 | $as_echo_n "checking for $ac_word... " >&6; } | |
2925 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2926 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2927 | else |
2928 | if test -n "$CC"; then | |
2929 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2930 | else | |
bec39cab AC |
2931 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2932 | for as_dir in $PATH | |
2933 | do | |
2934 | IFS=$as_save_IFS | |
2935 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2936 | for ac_exec_ext in '' $ac_executable_extensions; do |
2937 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2938 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2939 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2940 | break 2 |
2941 | fi | |
2942 | done | |
81ecdfbb RW |
2943 | done |
2944 | IFS=$as_save_IFS | |
bec39cab | 2945 | |
c906108c SS |
2946 | fi |
2947 | fi | |
bec39cab | 2948 | CC=$ac_cv_prog_CC |
c906108c | 2949 | if test -n "$CC"; then |
81ecdfbb RW |
2950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2951 | $as_echo "$CC" >&6; } | |
c906108c | 2952 | else |
81ecdfbb RW |
2953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2954 | $as_echo "no" >&6; } | |
c906108c | 2955 | fi |
bec39cab | 2956 | |
81ecdfbb | 2957 | |
bec39cab AC |
2958 | test -n "$CC" && break |
2959 | done | |
2960 | fi | |
2961 | if test -z "$CC"; then | |
2962 | ac_ct_CC=$CC | |
81ecdfbb | 2963 | for ac_prog in cl.exe |
bec39cab AC |
2964 | do |
2965 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2966 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2968 | $as_echo_n "checking for $ac_word... " >&6; } | |
2969 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2970 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
2971 | else |
2972 | if test -n "$ac_ct_CC"; then | |
2973 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2974 | else | |
2975 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2976 | for as_dir in $PATH | |
2977 | do | |
2978 | IFS=$as_save_IFS | |
2979 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2980 | for ac_exec_ext in '' $ac_executable_extensions; do |
2981 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2982 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2983 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2984 | break 2 |
c906108c | 2985 | fi |
bec39cab | 2986 | done |
81ecdfbb RW |
2987 | done |
2988 | IFS=$as_save_IFS | |
bec39cab AC |
2989 | |
2990 | fi | |
2991 | fi | |
2992 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2993 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2995 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2996 | else |
81ecdfbb RW |
2997 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2998 | $as_echo "no" >&6; } | |
c906108c SS |
2999 | fi |
3000 | ||
81ecdfbb | 3001 | |
bec39cab AC |
3002 | test -n "$ac_ct_CC" && break |
3003 | done | |
c906108c | 3004 | |
81ecdfbb RW |
3005 | if test "x$ac_ct_CC" = x; then |
3006 | CC="" | |
3007 | else | |
3008 | case $cross_compiling:$ac_tool_warned in | |
3009 | yes:) | |
3010 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3011 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3012 | ac_tool_warned=yes ;; | |
3013 | esac | |
3014 | CC=$ac_ct_CC | |
3015 | fi | |
bec39cab AC |
3016 | fi |
3017 | ||
3018 | fi | |
3019 | ||
3020 | ||
81ecdfbb RW |
3021 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3022 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3023 | as_fn_error "no acceptable C compiler found in \$PATH | |
3024 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3025 | |
3026 | # Provide some information about the compiler. | |
81ecdfbb RW |
3027 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3028 | set X $ac_compile | |
3029 | ac_compiler=$2 | |
3030 | for ac_option in --version -v -V -qversion; do | |
3031 | { { ac_try="$ac_compiler $ac_option >&5" | |
3032 | case "(($ac_try" in | |
3033 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3034 | *) ac_try_echo=$ac_try;; | |
3035 | esac | |
3036 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3037 | $as_echo "$ac_try_echo"; } >&5 | |
3038 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3039 | ac_status=$? |
81ecdfbb RW |
3040 | if test -s conftest.err; then |
3041 | sed '10a\ | |
3042 | ... rest of stderr output deleted ... | |
3043 | 10q' conftest.err >conftest.er1 | |
3044 | cat conftest.er1 >&5 | |
3045 | rm -f conftest.er1 conftest.err | |
3046 | fi | |
3047 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3048 | test $ac_status = 0; } | |
3049 | done | |
bec39cab | 3050 | |
81ecdfbb | 3051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3052 | /* end confdefs.h. */ |
3053 | ||
3054 | int | |
3055 | main () | |
3056 | { | |
3057 | ||
3058 | ; | |
3059 | return 0; | |
3060 | } | |
3061 | _ACEOF | |
3062 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3063 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3064 | # Try to create an executable without -o first, disregard a.out. |
3065 | # It will help us diagnose broken compilers, and finding out an intuition | |
3066 | # of exeext. | |
81ecdfbb RW |
3067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3068 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3069 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3070 | ||
3071 | # The possible output files: | |
3072 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3073 | ||
3074 | ac_rmfiles= | |
3075 | for ac_file in $ac_files | |
3076 | do | |
3077 | case $ac_file in | |
3078 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3079 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3080 | esac | |
3081 | done | |
3082 | rm -f $ac_rmfiles | |
3083 | ||
3084 | if { { ac_try="$ac_link_default" | |
3085 | case "(($ac_try" in | |
3086 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3087 | *) ac_try_echo=$ac_try;; | |
3088 | esac | |
3089 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3090 | $as_echo "$ac_try_echo"; } >&5 | |
3091 | (eval "$ac_link_default") 2>&5 | |
3092 | ac_status=$? | |
3093 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3094 | test $ac_status = 0; }; then : | |
3095 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3096 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3097 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3098 | # so that the user can short-circuit this test for compilers unknown to | |
3099 | # Autoconf. | |
3100 | for ac_file in $ac_files '' | |
bec39cab AC |
3101 | do |
3102 | test -f "$ac_file" || continue | |
3103 | case $ac_file in | |
81ecdfbb | 3104 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3105 | ;; |
3106 | [ab].out ) | |
3107 | # We found the default executable, but exeext='' is most | |
3108 | # certainly right. | |
3109 | break;; | |
3110 | *.* ) | |
81ecdfbb RW |
3111 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3112 | then :; else | |
3113 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3114 | fi | |
3115 | # We set ac_cv_exeext here because the later test for it is not | |
3116 | # safe: cross compilers may not add the suffix if given an `-o' | |
3117 | # argument, so we may need to know it at that point already. | |
3118 | # Even if this section looks crufty: it has the advantage of | |
3119 | # actually working. | |
b4e70030 JB |
3120 | break;; |
3121 | * ) | |
3122 | break;; | |
bec39cab AC |
3123 | esac |
3124 | done | |
81ecdfbb RW |
3125 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3126 | ||
bec39cab | 3127 | else |
81ecdfbb RW |
3128 | ac_file='' |
3129 | fi | |
3130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3131 | $as_echo "$ac_file" >&6; } | |
3132 | if test -z "$ac_file"; then : | |
3133 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3134 | sed 's/^/| /' conftest.$ac_ext >&5 |
3135 | ||
81ecdfbb RW |
3136 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3137 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3138 | { as_fn_set_status 77 | |
3139 | as_fn_error "C compiler cannot create executables | |
3140 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3141 | fi |
b4e70030 | 3142 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3143 | |
81ecdfbb | 3144 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3145 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3146 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3147 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3148 | # If not cross compiling, check that we can run a simple program. |
3149 | if test "$cross_compiling" != yes; then | |
3150 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3151 | { { case "(($ac_try" in |
3152 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3153 | *) ac_try_echo=$ac_try;; | |
3154 | esac | |
3155 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3156 | $as_echo "$ac_try_echo"; } >&5 | |
3157 | (eval "$ac_try") 2>&5 | |
bec39cab | 3158 | ac_status=$? |
81ecdfbb RW |
3159 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3160 | test $ac_status = 0; }; }; then | |
bec39cab | 3161 | cross_compiling=no |
c906108c | 3162 | else |
bec39cab AC |
3163 | if test "$cross_compiling" = maybe; then |
3164 | cross_compiling=yes | |
3165 | else | |
81ecdfbb RW |
3166 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3167 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3168 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3169 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3170 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3171 | fi |
c906108c | 3172 | fi |
bec39cab | 3173 | fi |
81ecdfbb RW |
3174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3175 | $as_echo "yes" >&6; } | |
bec39cab | 3176 | |
81ecdfbb | 3177 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3178 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3179 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3180 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3182 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3184 | $as_echo "$cross_compiling" >&6; } | |
3185 | ||
3186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3187 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3188 | if { { ac_try="$ac_link" | |
3189 | case "(($ac_try" in | |
3190 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3191 | *) ac_try_echo=$ac_try;; | |
3192 | esac | |
3193 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3194 | $as_echo "$ac_try_echo"; } >&5 | |
3195 | (eval "$ac_link") 2>&5 | |
bec39cab | 3196 | ac_status=$? |
81ecdfbb RW |
3197 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3198 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3199 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3200 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3201 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3202 | # `rm'. | |
3203 | for ac_file in conftest.exe conftest conftest.*; do | |
3204 | test -f "$ac_file" || continue | |
3205 | case $ac_file in | |
81ecdfbb | 3206 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3207 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3208 | break;; |
3209 | * ) break;; | |
3210 | esac | |
3211 | done | |
c906108c | 3212 | else |
81ecdfbb RW |
3213 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3214 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3215 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3216 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3217 | fi |
b4e70030 | 3218 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3220 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3221 | |
b4e70030 | 3222 | rm -f conftest.$ac_ext |
bec39cab AC |
3223 | EXEEXT=$ac_cv_exeext |
3224 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3226 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3227 | if test "${ac_cv_objext+set}" = set; then : | |
3228 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3229 | else |
81ecdfbb | 3230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3231 | /* end confdefs.h. */ |
3232 | ||
3233 | int | |
3234 | main () | |
3235 | { | |
3236 | ||
3237 | ; | |
3238 | return 0; | |
3239 | } | |
3240 | _ACEOF | |
3241 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3242 | if { { ac_try="$ac_compile" |
3243 | case "(($ac_try" in | |
3244 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3245 | *) ac_try_echo=$ac_try;; | |
3246 | esac | |
3247 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3248 | $as_echo "$ac_try_echo"; } >&5 | |
3249 | (eval "$ac_compile") 2>&5 | |
3250 | ac_status=$? | |
3251 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3252 | test $ac_status = 0; }; then : | |
3253 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3254 | test -f "$ac_file" || continue; | |
bec39cab | 3255 | case $ac_file in |
81ecdfbb | 3256 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3257 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3258 | break;; | |
3259 | esac | |
3260 | done | |
c906108c | 3261 | else |
81ecdfbb | 3262 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3263 | sed 's/^/| /' conftest.$ac_ext >&5 |
3264 | ||
81ecdfbb RW |
3265 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3266 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3267 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3268 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3269 | fi |
b4e70030 | 3270 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3271 | fi |
81ecdfbb RW |
3272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3273 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3274 | OBJEXT=$ac_cv_objext |
3275 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3277 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3278 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3279 | $as_echo_n "(cached) " >&6 | |
c906108c | 3280 | else |
81ecdfbb | 3281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3282 | /* end confdefs.h. */ |
3283 | ||
3284 | int | |
3285 | main () | |
3286 | { | |
3287 | #ifndef __GNUC__ | |
3288 | choke me | |
3289 | #endif | |
3290 | ||
3291 | ; | |
3292 | return 0; | |
3293 | } | |
3294 | _ACEOF | |
81ecdfbb | 3295 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3296 | ac_compiler_gnu=yes |
3297 | else | |
81ecdfbb | 3298 | ac_compiler_gnu=no |
bec39cab | 3299 | fi |
81ecdfbb | 3300 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3301 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3302 | ||
3303 | fi | |
81ecdfbb RW |
3304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3305 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3306 | if test $ac_compiler_gnu = yes; then | |
3307 | GCC=yes | |
3308 | else | |
3309 | GCC= | |
3310 | fi | |
bec39cab AC |
3311 | ac_test_CFLAGS=${CFLAGS+set} |
3312 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3314 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3315 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3316 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3317 | else |
81ecdfbb RW |
3318 | ac_save_c_werror_flag=$ac_c_werror_flag |
3319 | ac_c_werror_flag=yes | |
3320 | ac_cv_prog_cc_g=no | |
3321 | CFLAGS="-g" | |
3322 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3323 | /* end confdefs.h. */ |
3324 | ||
3325 | int | |
3326 | main () | |
3327 | { | |
3328 | ||
3329 | ; | |
3330 | return 0; | |
3331 | } | |
3332 | _ACEOF | |
81ecdfbb | 3333 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3334 | ac_cv_prog_cc_g=yes |
3335 | else | |
81ecdfbb RW |
3336 | CFLAGS="" |
3337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3338 | /* end confdefs.h. */ | |
3339 | ||
3340 | int | |
3341 | main () | |
3342 | { | |
3343 | ||
3344 | ; | |
3345 | return 0; | |
3346 | } | |
3347 | _ACEOF | |
3348 | if ac_fn_c_try_compile "$LINENO"; then : | |
3349 | ||
3350 | else | |
3351 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3352 | CFLAGS="-g" | |
3353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3354 | /* end confdefs.h. */ | |
3355 | ||
3356 | int | |
3357 | main () | |
3358 | { | |
c906108c | 3359 | |
81ecdfbb RW |
3360 | ; |
3361 | return 0; | |
3362 | } | |
3363 | _ACEOF | |
3364 | if ac_fn_c_try_compile "$LINENO"; then : | |
3365 | ac_cv_prog_cc_g=yes | |
3366 | fi | |
3367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3368 | fi | |
3369 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3370 | fi |
81ecdfbb RW |
3371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3372 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3373 | fi |
81ecdfbb RW |
3374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3375 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3376 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3377 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3378 | elif test $ac_cv_prog_cc_g = yes; then |
3379 | if test "$GCC" = yes; then | |
3380 | CFLAGS="-g -O2" | |
3381 | else | |
3382 | CFLAGS="-g" | |
3383 | fi | |
3384 | else | |
3385 | if test "$GCC" = yes; then | |
3386 | CFLAGS="-O2" | |
3387 | else | |
3388 | CFLAGS= | |
3389 | fi | |
3390 | fi | |
81ecdfbb RW |
3391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3392 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3393 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3394 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3395 | else |
81ecdfbb | 3396 | ac_cv_prog_cc_c89=no |
bec39cab | 3397 | ac_save_CC=$CC |
81ecdfbb | 3398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3399 | /* end confdefs.h. */ |
c906108c SS |
3400 | #include <stdarg.h> |
3401 | #include <stdio.h> | |
3402 | #include <sys/types.h> | |
3403 | #include <sys/stat.h> | |
3404 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3405 | struct buf { int x; }; | |
3406 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3407 | static char *e (p, i) | |
3408 | char **p; | |
3409 | int i; | |
3410 | { | |
3411 | return p[i]; | |
3412 | } | |
3413 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3414 | { | |
3415 | char *s; | |
3416 | va_list v; | |
3417 | va_start (v,p); | |
3418 | s = g (p, va_arg (v,int)); | |
3419 | va_end (v); | |
3420 | return s; | |
3421 | } | |
bec39cab AC |
3422 | |
3423 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3424 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3425 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3426 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3427 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3428 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3429 | that's true only with -std. */ |
bec39cab AC |
3430 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3431 | ||
81ecdfbb RW |
3432 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3433 | inside strings and character constants. */ | |
3434 | #define FOO(x) 'x' | |
3435 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3436 | ||
c906108c SS |
3437 | int test (int i, double x); |
3438 | struct s1 {int (*f) (int a);}; | |
3439 | struct s2 {int (*f) (double a);}; | |
3440 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3441 | int argc; | |
3442 | char **argv; | |
bec39cab AC |
3443 | int |
3444 | main () | |
3445 | { | |
c906108c | 3446 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3447 | ; |
3448 | return 0; | |
3449 | } | |
3450 | _ACEOF | |
81ecdfbb RW |
3451 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3452 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3453 | do |
3454 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3455 | if ac_fn_c_try_compile "$LINENO"; then : |
3456 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3457 | fi |
81ecdfbb RW |
3458 | rm -f core conftest.err conftest.$ac_objext |
3459 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3460 | done |
81ecdfbb | 3461 | rm -f conftest.$ac_ext |
bec39cab | 3462 | CC=$ac_save_CC |
c906108c SS |
3463 | |
3464 | fi | |
81ecdfbb RW |
3465 | # AC_CACHE_VAL |
3466 | case "x$ac_cv_prog_cc_c89" in | |
3467 | x) | |
3468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3469 | $as_echo "none needed" >&6; } ;; | |
3470 | xno) | |
3471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3472 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3473 | *) |
81ecdfbb RW |
3474 | CC="$CC $ac_cv_prog_cc_c89" |
3475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3476 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3477 | esac |
81ecdfbb | 3478 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3479 | |
b4e70030 JB |
3480 | fi |
3481 | ||
bec39cab AC |
3482 | ac_ext=c |
3483 | ac_cpp='$CPP $CPPFLAGS' | |
3484 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3485 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3486 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3487 | |
60ca704f | 3488 | |
bec39cab AC |
3489 | ac_ext=c |
3490 | ac_cpp='$CPP $CPPFLAGS' | |
3491 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3492 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3493 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3495 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3496 | # On Suns, sometimes $CPP names a directory. |
3497 | if test -n "$CPP" && test -d "$CPP"; then | |
3498 | CPP= | |
8bb2c122 | 3499 | fi |
bec39cab | 3500 | if test -z "$CPP"; then |
81ecdfbb RW |
3501 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3502 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3503 | else |
3504 | # Double quotes because CPP needs to be expanded | |
3505 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3506 | do | |
3507 | ac_preproc_ok=false | |
3508 | for ac_c_preproc_warn_flag in '' yes | |
3509 | do | |
3510 | # Use a header file that comes with gcc, so configuring glibc | |
3511 | # with a fresh cross-compiler works. | |
3512 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3513 | # <limits.h> exists even on freestanding compilers. | |
3514 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3515 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3516 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3517 | /* end confdefs.h. */ |
3518 | #ifdef __STDC__ | |
3519 | # include <limits.h> | |
3520 | #else | |
3521 | # include <assert.h> | |
3522 | #endif | |
3523 | Syntax error | |
3524 | _ACEOF | |
81ecdfbb | 3525 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3526 | |
81ecdfbb | 3527 | else |
bec39cab AC |
3528 | # Broken: fails on valid input. |
3529 | continue | |
3530 | fi | |
3531 | rm -f conftest.err conftest.$ac_ext | |
3532 | ||
81ecdfbb | 3533 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3534 | # can be detected and how. |
81ecdfbb | 3535 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3536 | /* end confdefs.h. */ |
3537 | #include <ac_nonexistent.h> | |
3538 | _ACEOF | |
81ecdfbb | 3539 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3540 | # Broken: success on invalid input. |
3541 | continue | |
8bb2c122 | 3542 | else |
bec39cab AC |
3543 | # Passes both tests. |
3544 | ac_preproc_ok=: | |
3545 | break | |
8bb2c122 | 3546 | fi |
bec39cab | 3547 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3548 | |
bec39cab AC |
3549 | done |
3550 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3551 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3552 | if $ac_preproc_ok; then : |
bec39cab AC |
3553 | break |
3554 | fi | |
8bb2c122 | 3555 | |
bec39cab AC |
3556 | done |
3557 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3558 | |
c906108c | 3559 | fi |
bec39cab AC |
3560 | CPP=$ac_cv_prog_CPP |
3561 | else | |
3562 | ac_cv_prog_CPP=$CPP | |
c906108c | 3563 | fi |
81ecdfbb RW |
3564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3565 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3566 | ac_preproc_ok=false |
3567 | for ac_c_preproc_warn_flag in '' yes | |
3568 | do | |
3569 | # Use a header file that comes with gcc, so configuring glibc | |
3570 | # with a fresh cross-compiler works. | |
3571 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3572 | # <limits.h> exists even on freestanding compilers. | |
3573 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3574 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3576 | /* end confdefs.h. */ |
3577 | #ifdef __STDC__ | |
3578 | # include <limits.h> | |
3579 | #else | |
3580 | # include <assert.h> | |
3581 | #endif | |
3582 | Syntax error | |
3583 | _ACEOF | |
81ecdfbb | 3584 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3585 | |
81ecdfbb | 3586 | else |
bec39cab AC |
3587 | # Broken: fails on valid input. |
3588 | continue | |
3589 | fi | |
3590 | rm -f conftest.err conftest.$ac_ext | |
3591 | ||
81ecdfbb | 3592 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3593 | # can be detected and how. |
81ecdfbb | 3594 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3595 | /* end confdefs.h. */ |
3596 | #include <ac_nonexistent.h> | |
3597 | _ACEOF | |
81ecdfbb | 3598 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3599 | # Broken: success on invalid input. |
3600 | continue | |
c906108c | 3601 | else |
bec39cab AC |
3602 | # Passes both tests. |
3603 | ac_preproc_ok=: | |
3604 | break | |
c906108c | 3605 | fi |
bec39cab | 3606 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3607 | |
bec39cab AC |
3608 | done |
3609 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3610 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3611 | if $ac_preproc_ok; then : |
3612 | ||
c906108c | 3613 | else |
81ecdfbb RW |
3614 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3615 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3616 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3617 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3618 | fi |
c906108c | 3619 | |
bec39cab AC |
3620 | ac_ext=c |
3621 | ac_cpp='$CPP $CPPFLAGS' | |
3622 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3623 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3624 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3625 | ||
3626 | ||
81ecdfbb RW |
3627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3628 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3629 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3630 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3631 | else |
81ecdfbb RW |
3632 | if test -z "$GREP"; then |
3633 | ac_path_GREP_found=false | |
3634 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3635 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3636 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3637 | do | |
3638 | IFS=$as_save_IFS | |
3639 | test -z "$as_dir" && as_dir=. | |
3640 | for ac_prog in grep ggrep; do | |
3641 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3642 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3643 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3644 | # Check for GNU ac_path_GREP and select it if it is found. | |
3645 | # Check for GNU $ac_path_GREP | |
3646 | case `"$ac_path_GREP" --version 2>&1` in | |
3647 | *GNU*) | |
3648 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3649 | *) | |
3650 | ac_count=0 | |
3651 | $as_echo_n 0123456789 >"conftest.in" | |
3652 | while : | |
3653 | do | |
3654 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3655 | mv "conftest.tmp" "conftest.in" | |
3656 | cp "conftest.in" "conftest.nl" | |
3657 | $as_echo 'GREP' >> "conftest.nl" | |
3658 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3659 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3660 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3661 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3662 | # Best one so far, save it but keep looking for a better one | |
3663 | ac_cv_path_GREP="$ac_path_GREP" | |
3664 | ac_path_GREP_max=$ac_count | |
bec39cab | 3665 | fi |
81ecdfbb RW |
3666 | # 10*(2^10) chars as input seems more than enough |
3667 | test $ac_count -gt 10 && break | |
3668 | done | |
3669 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3670 | esac | |
bec39cab | 3671 | |
81ecdfbb RW |
3672 | $ac_path_GREP_found && break 3 |
3673 | done | |
3674 | done | |
3675 | done | |
3676 | IFS=$as_save_IFS | |
3677 | if test -z "$ac_cv_path_GREP"; then | |
3678 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3679 | fi | |
c906108c | 3680 | else |
81ecdfbb | 3681 | ac_cv_path_GREP=$GREP |
c906108c | 3682 | fi |
c906108c | 3683 | |
81ecdfbb RW |
3684 | fi |
3685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3686 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3687 | GREP="$ac_cv_path_GREP" | |
c906108c | 3688 | |
c906108c | 3689 | |
81ecdfbb RW |
3690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3691 | $as_echo_n "checking for egrep... " >&6; } | |
3692 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3693 | $as_echo_n "(cached) " >&6 | |
783e057b | 3694 | else |
81ecdfbb RW |
3695 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3696 | then ac_cv_path_EGREP="$GREP -E" | |
3697 | else | |
3698 | if test -z "$EGREP"; then | |
3699 | ac_path_EGREP_found=false | |
3700 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3701 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3702 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3703 | do |
3704 | IFS=$as_save_IFS | |
3705 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3706 | for ac_prog in egrep; do |
3707 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3708 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3709 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3710 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3711 | # Check for GNU $ac_path_EGREP | |
3712 | case `"$ac_path_EGREP" --version 2>&1` in | |
3713 | *GNU*) | |
3714 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3715 | *) | |
3716 | ac_count=0 | |
3717 | $as_echo_n 0123456789 >"conftest.in" | |
3718 | while : | |
3719 | do | |
3720 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3721 | mv "conftest.tmp" "conftest.in" | |
3722 | cp "conftest.in" "conftest.nl" | |
3723 | $as_echo 'EGREP' >> "conftest.nl" | |
3724 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3725 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3726 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3727 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3728 | # Best one so far, save it but keep looking for a better one | |
3729 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3730 | ac_path_EGREP_max=$ac_count | |
3731 | fi | |
3732 | # 10*(2^10) chars as input seems more than enough | |
3733 | test $ac_count -gt 10 && break | |
3734 | done | |
3735 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3736 | esac | |
bec39cab | 3737 | |
81ecdfbb RW |
3738 | $ac_path_EGREP_found && break 3 |
3739 | done | |
3740 | done | |
3741 | done | |
3742 | IFS=$as_save_IFS | |
3743 | if test -z "$ac_cv_path_EGREP"; then | |
3744 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3745 | fi |
783e057b | 3746 | else |
81ecdfbb | 3747 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3748 | fi |
3749 | ||
81ecdfbb | 3750 | fi |
783e057b | 3751 | fi |
81ecdfbb RW |
3752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3753 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3754 | EGREP="$ac_cv_path_EGREP" | |
3755 | ||
783e057b | 3756 | |
81ecdfbb RW |
3757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3758 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3759 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3760 | $as_echo_n "(cached) " >&6 | |
783e057b | 3761 | else |
81ecdfbb | 3762 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3763 | /* end confdefs.h. */ |
783e057b | 3764 | #include <stdlib.h> |
bec39cab | 3765 | #include <stdarg.h> |
783e057b DJ |
3766 | #include <string.h> |
3767 | #include <float.h> | |
c906108c | 3768 | |
bec39cab AC |
3769 | int |
3770 | main () | |
3771 | { | |
c906108c | 3772 | |
bec39cab AC |
3773 | ; |
3774 | return 0; | |
3775 | } | |
3776 | _ACEOF | |
81ecdfbb | 3777 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3778 | ac_cv_header_stdc=yes |
c906108c | 3779 | else |
81ecdfbb | 3780 | ac_cv_header_stdc=no |
c906108c | 3781 | fi |
81ecdfbb | 3782 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3783 | |
783e057b DJ |
3784 | if test $ac_cv_header_stdc = yes; then |
3785 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3787 | /* end confdefs.h. */ |
3788 | #include <string.h> | |
c906108c | 3789 | |
783e057b DJ |
3790 | _ACEOF |
3791 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3792 | $EGREP "memchr" >/dev/null 2>&1; then : |
3793 | ||
c906108c | 3794 | else |
783e057b | 3795 | ac_cv_header_stdc=no |
c906108c | 3796 | fi |
783e057b | 3797 | rm -f conftest* |
c906108c SS |
3798 | |
3799 | fi | |
3800 | ||
783e057b DJ |
3801 | if test $ac_cv_header_stdc = yes; then |
3802 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3803 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3804 | /* end confdefs.h. */ |
3805 | #include <stdlib.h> | |
bec39cab | 3806 | |
783e057b DJ |
3807 | _ACEOF |
3808 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3809 | $EGREP "free" >/dev/null 2>&1; then : |
3810 | ||
bec39cab | 3811 | else |
783e057b | 3812 | ac_cv_header_stdc=no |
bec39cab | 3813 | fi |
783e057b | 3814 | rm -f conftest* |
bec39cab AC |
3815 | |
3816 | fi | |
bec39cab | 3817 | |
783e057b DJ |
3818 | if test $ac_cv_header_stdc = yes; then |
3819 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3820 | if test "$cross_compiling" = yes; then : |
783e057b | 3821 | : |
bec39cab | 3822 | else |
81ecdfbb | 3823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3824 | /* end confdefs.h. */ |
3825 | #include <ctype.h> | |
81ecdfbb | 3826 | #include <stdlib.h> |
783e057b DJ |
3827 | #if ((' ' & 0x0FF) == 0x020) |
3828 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3829 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3830 | #else | |
3831 | # define ISLOWER(c) \ | |
3832 | (('a' <= (c) && (c) <= 'i') \ | |
3833 | || ('j' <= (c) && (c) <= 'r') \ | |
3834 | || ('s' <= (c) && (c) <= 'z')) | |
3835 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3836 | #endif | |
3837 | ||
3838 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3839 | int | |
3840 | main () | |
3841 | { | |
3842 | int i; | |
3843 | for (i = 0; i < 256; i++) | |
3844 | if (XOR (islower (i), ISLOWER (i)) | |
3845 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3846 | return 2; |
3847 | return 0; | |
783e057b DJ |
3848 | } |
3849 | _ACEOF | |
81ecdfbb | 3850 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3851 | |
81ecdfbb RW |
3852 | else |
3853 | ac_cv_header_stdc=no | |
783e057b | 3854 | fi |
81ecdfbb RW |
3855 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3856 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3857 | fi |
81ecdfbb | 3858 | |
783e057b DJ |
3859 | fi |
3860 | fi | |
81ecdfbb RW |
3861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3862 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3863 | if test $ac_cv_header_stdc = yes; then |
3864 | ||
81ecdfbb | 3865 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3866 | |
3867 | fi | |
3868 | ||
3869 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3870 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3871 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3872 | do : |
3873 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3874 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3875 | " | |
3876 | eval as_val=\$$as_ac_Header | |
3877 | if test "x$as_val" = x""yes; then : | |
783e057b | 3878 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3879 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3880 | _ACEOF |
3881 | ||
3882 | fi | |
3883 | ||
3884 | done | |
3885 | ||
3886 | ||
3887 | ||
81ecdfbb RW |
3888 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3889 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3890 | MINIX=yes |
3891 | else | |
3892 | MINIX= | |
3893 | fi | |
3894 | ||
3895 | ||
3896 | if test "$MINIX" = yes; then | |
3897 | ||
81ecdfbb | 3898 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3899 | |
3900 | ||
81ecdfbb | 3901 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3902 | |
3903 | ||
81ecdfbb | 3904 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3905 | |
3906 | fi | |
3907 | ||
3908 | ||
81ecdfbb RW |
3909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3910 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3911 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3912 | $as_echo_n "(cached) " >&6 | |
783e057b | 3913 | else |
81ecdfbb | 3914 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3915 | /* end confdefs.h. */ |
3916 | ||
c971b7fa PA |
3917 | # define __EXTENSIONS__ 1 |
3918 | $ac_includes_default | |
783e057b DJ |
3919 | int |
3920 | main () | |
3921 | { | |
3922 | ||
3923 | ; | |
3924 | return 0; | |
3925 | } | |
3926 | _ACEOF | |
81ecdfbb | 3927 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3928 | ac_cv_safe_to_define___extensions__=yes |
3929 | else | |
81ecdfbb | 3930 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3931 | fi |
81ecdfbb | 3932 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3933 | fi |
81ecdfbb RW |
3934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3935 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3936 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3937 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3938 | |
81ecdfbb | 3939 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3940 | |
81ecdfbb | 3941 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3942 | |
81ecdfbb | 3943 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3944 | |
81ecdfbb | 3945 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3946 | |
3947 | ||
c971b7fa PA |
3948 | ac_aux_dir= |
3949 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3950 | for ac_t in install-sh install.sh shtool; do | |
3951 | if test -f "$ac_dir/$ac_t"; then | |
3952 | ac_aux_dir=$ac_dir | |
3953 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3954 | break 2 | |
3955 | fi | |
3956 | done | |
3957 | done | |
3958 | if test -z "$ac_aux_dir"; then | |
3959 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3960 | fi | |
770d76d7 | 3961 | |
c971b7fa PA |
3962 | # These three variables are undocumented and unsupported, |
3963 | # and are intended to be withdrawn in a future Autoconf release. | |
3964 | # They can cause serious problems if a builder's source tree is in a directory | |
3965 | # whose full name contains unusual characters. | |
3966 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3967 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3968 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 3969 | |
770d76d7 | 3970 | |
c971b7fa PA |
3971 | # Make sure we can run config.sub. |
3972 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3973 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 3974 | |
c971b7fa PA |
3975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
3976 | $as_echo_n "checking build system type... " >&6; } | |
3977 | if test "${ac_cv_build+set}" = set; then : | |
3978 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 3979 | else |
c971b7fa PA |
3980 | ac_build_alias=$build_alias |
3981 | test "x$ac_build_alias" = x && | |
3982 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3983 | test "x$ac_build_alias" = x && | |
3984 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3985 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3986 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3987 | ||
770d76d7 | 3988 | fi |
c971b7fa PA |
3989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3990 | $as_echo "$ac_cv_build" >&6; } | |
3991 | case $ac_cv_build in | |
3992 | *-*-*) ;; | |
3993 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 3994 | esac |
c971b7fa PA |
3995 | build=$ac_cv_build |
3996 | ac_save_IFS=$IFS; IFS='-' | |
3997 | set x $ac_cv_build | |
3998 | shift | |
3999 | build_cpu=$1 | |
4000 | build_vendor=$2 | |
4001 | shift; shift | |
4002 | # Remember, the first character of IFS is used to create $*, | |
4003 | # except with old shells: | |
4004 | build_os=$* | |
4005 | IFS=$ac_save_IFS | |
4006 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4007 | |
4008 | ||
c971b7fa PA |
4009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4010 | $as_echo_n "checking host system type... " >&6; } | |
4011 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
4012 | $as_echo_n "(cached) " >&6 |
4013 | else | |
c971b7fa PA |
4014 | if test "x$host_alias" = x; then |
4015 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4016 | else |
c971b7fa PA |
4017 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4018 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 4019 | fi |
81ecdfbb RW |
4020 | |
4021 | fi | |
c971b7fa PA |
4022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4023 | $as_echo "$ac_cv_host" >&6; } | |
4024 | case $ac_cv_host in | |
4025 | *-*-*) ;; | |
4026 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4027 | esac |
c971b7fa PA |
4028 | host=$ac_cv_host |
4029 | ac_save_IFS=$IFS; IFS='-' | |
4030 | set x $ac_cv_host | |
4031 | shift | |
4032 | host_cpu=$1 | |
4033 | host_vendor=$2 | |
4034 | shift; shift | |
4035 | # Remember, the first character of IFS is used to create $*, | |
4036 | # except with old shells: | |
4037 | host_os=$* | |
4038 | IFS=$ac_save_IFS | |
4039 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4040 | |
4041 | ||
4042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4043 | $as_echo_n "checking target system type... " >&6; } | |
4044 | if test "${ac_cv_target+set}" = set; then : | |
4045 | $as_echo_n "(cached) " >&6 | |
4046 | else | |
4047 | if test "x$target_alias" = x; then | |
4048 | ac_cv_target=$ac_cv_host | |
4049 | else | |
4050 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4051 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4052 | fi | |
4053 | ||
4054 | fi | |
4055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4056 | $as_echo "$ac_cv_target" >&6; } | |
4057 | case $ac_cv_target in | |
4058 | *-*-*) ;; | |
4059 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4060 | esac | |
4061 | target=$ac_cv_target | |
4062 | ac_save_IFS=$IFS; IFS='-' | |
4063 | set x $ac_cv_target | |
4064 | shift | |
4065 | target_cpu=$1 | |
4066 | target_vendor=$2 | |
4067 | shift; shift | |
4068 | # Remember, the first character of IFS is used to create $*, | |
4069 | # except with old shells: | |
4070 | target_os=$* | |
4071 | IFS=$ac_save_IFS | |
4072 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4073 | ||
4074 | ||
4075 | # The aliases save the names the user supplied, while $host etc. | |
4076 | # will get canonicalized. | |
4077 | test -n "$target_alias" && | |
4078 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4079 | NONENONEs,x,x, && | |
4080 | program_prefix=${target_alias}- | |
4081 | ||
4082 | # The tests for host and target for $enable_largefile require | |
4083 | # canonical names. | |
4084 | ||
4085 | ||
81ecdfbb | 4086 | |
da2f07f1 JK |
4087 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4088 | # even in directories otherwise not depending on the $plugins option. | |
4089 | ||
4090 | ||
4091 | # Check whether --enable-plugins was given. | |
4092 | if test "${enable_plugins+set}" = set; then : | |
4093 | enableval=$enable_plugins; case "${enableval}" in | |
4094 | yes | "") plugins=yes ;; | |
4095 | no) plugins=no ;; | |
4096 | *) plugins=yes ;; | |
4097 | esac | |
4098 | else | |
4099 | plugins=no | |
4100 | fi | |
4101 | ||
4102 | ||
4103 | ||
4104 | case "${host}" in | |
4105 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4106 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4107 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4108 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4109 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4110 | # large-file support through the --enable-largefile switch, disable | |
4111 | # large-file support in favor of procfs support. | |
4112 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4113 | && : ${enable_largefile="no"} | |
4114 | ;; | |
4115 | esac | |
4116 | ||
4117 | # Check whether --enable-largefile was given. | |
4118 | if test "${enable_largefile+set}" = set; then : | |
4119 | enableval=$enable_largefile; | |
4120 | fi | |
4121 | ||
4122 | if test "$enable_largefile" != no; then | |
4123 | ||
4124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4125 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4126 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4127 | $as_echo_n "(cached) " >&6 | |
4128 | else | |
4129 | ac_cv_sys_largefile_CC=no | |
4130 | if test "$GCC" != yes; then | |
4131 | ac_save_CC=$CC | |
4132 | while :; do | |
4133 | # IRIX 6.2 and later do not support large files by default, | |
4134 | # so use the C compiler's -n32 option if that helps. | |
4135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4136 | /* end confdefs.h. */ | |
4137 | #include <sys/types.h> | |
4138 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4139 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4140 | since some C++ compilers masquerading as C compilers | |
4141 | incorrectly reject 9223372036854775807. */ | |
4142 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4143 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4144 | && LARGE_OFF_T % 2147483647 == 1) | |
4145 | ? 1 : -1]; | |
4146 | int | |
4147 | main () | |
4148 | { | |
4149 | ||
4150 | ; | |
4151 | return 0; | |
4152 | } | |
4153 | _ACEOF | |
4154 | if ac_fn_c_try_compile "$LINENO"; then : | |
4155 | break | |
4156 | fi | |
4157 | rm -f core conftest.err conftest.$ac_objext | |
4158 | CC="$CC -n32" | |
4159 | if ac_fn_c_try_compile "$LINENO"; then : | |
4160 | ac_cv_sys_largefile_CC=' -n32'; break | |
4161 | fi | |
4162 | rm -f core conftest.err conftest.$ac_objext | |
4163 | break | |
4164 | done | |
4165 | CC=$ac_save_CC | |
4166 | rm -f conftest.$ac_ext | |
4167 | fi | |
4168 | fi | |
4169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4170 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4171 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4172 | CC=$CC$ac_cv_sys_largefile_CC | |
4173 | fi | |
4174 | ||
4175 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4176 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4177 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4178 | $as_echo_n "(cached) " >&6 | |
4179 | else | |
4180 | while :; do | |
4181 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4182 | /* end confdefs.h. */ | |
4183 | #include <sys/types.h> | |
4184 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4185 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4186 | since some C++ compilers masquerading as C compilers | |
4187 | incorrectly reject 9223372036854775807. */ | |
4188 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4189 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4190 | && LARGE_OFF_T % 2147483647 == 1) | |
4191 | ? 1 : -1]; | |
4192 | int | |
4193 | main () | |
4194 | { | |
4195 | ||
4196 | ; | |
4197 | return 0; | |
4198 | } | |
4199 | _ACEOF | |
4200 | if ac_fn_c_try_compile "$LINENO"; then : | |
4201 | ac_cv_sys_file_offset_bits=no; break | |
4202 | fi | |
4203 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4204 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4205 | /* end confdefs.h. */ | |
4206 | #define _FILE_OFFSET_BITS 64 | |
4207 | #include <sys/types.h> | |
4208 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4209 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4210 | since some C++ compilers masquerading as C compilers | |
4211 | incorrectly reject 9223372036854775807. */ | |
4212 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4213 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4214 | && LARGE_OFF_T % 2147483647 == 1) | |
4215 | ? 1 : -1]; | |
4216 | int | |
4217 | main () | |
4218 | { | |
4219 | ||
4220 | ; | |
4221 | return 0; | |
4222 | } | |
4223 | _ACEOF | |
4224 | if ac_fn_c_try_compile "$LINENO"; then : | |
4225 | ac_cv_sys_file_offset_bits=64; break | |
4226 | fi | |
4227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4228 | ac_cv_sys_file_offset_bits=unknown | |
4229 | break | |
4230 | done | |
4231 | fi | |
4232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4233 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4234 | case $ac_cv_sys_file_offset_bits in #( | |
4235 | no | unknown) ;; | |
4236 | *) | |
4237 | cat >>confdefs.h <<_ACEOF | |
4238 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4239 | _ACEOF | |
4240 | ;; | |
4241 | esac | |
4242 | rm -rf conftest* | |
4243 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4245 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4246 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4247 | $as_echo_n "(cached) " >&6 | |
4248 | else | |
4249 | while :; do | |
4250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4251 | /* end confdefs.h. */ | |
4252 | #include <sys/types.h> | |
4253 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4254 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4255 | since some C++ compilers masquerading as C compilers | |
4256 | incorrectly reject 9223372036854775807. */ | |
4257 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4258 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4259 | && LARGE_OFF_T % 2147483647 == 1) | |
4260 | ? 1 : -1]; | |
4261 | int | |
4262 | main () | |
4263 | { | |
4264 | ||
4265 | ; | |
4266 | return 0; | |
4267 | } | |
4268 | _ACEOF | |
4269 | if ac_fn_c_try_compile "$LINENO"; then : | |
4270 | ac_cv_sys_large_files=no; break | |
4271 | fi | |
4272 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4274 | /* end confdefs.h. */ | |
4275 | #define _LARGE_FILES 1 | |
4276 | #include <sys/types.h> | |
4277 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4278 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4279 | since some C++ compilers masquerading as C compilers | |
4280 | incorrectly reject 9223372036854775807. */ | |
4281 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4282 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4283 | && LARGE_OFF_T % 2147483647 == 1) | |
4284 | ? 1 : -1]; | |
4285 | int | |
4286 | main () | |
4287 | { | |
4288 | ||
4289 | ; | |
4290 | return 0; | |
4291 | } | |
4292 | _ACEOF | |
4293 | if ac_fn_c_try_compile "$LINENO"; then : | |
4294 | ac_cv_sys_large_files=1; break | |
4295 | fi | |
4296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4297 | ac_cv_sys_large_files=unknown | |
4298 | break | |
4299 | done | |
4300 | fi | |
4301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4302 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4303 | case $ac_cv_sys_large_files in #( | |
4304 | no | unknown) ;; | |
4305 | *) | |
4306 | cat >>confdefs.h <<_ACEOF | |
4307 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4308 | _ACEOF | |
4309 | ;; | |
4310 | esac | |
4311 | rm -rf conftest* | |
4312 | fi | |
4313 | fi | |
4314 | ||
4315 | ||
4316 | ||
81ecdfbb RW |
4317 | |
4318 | ||
4319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4320 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4321 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4322 | $as_echo_n "(cached) " >&6 | |
4323 | else | |
4324 | am_cv_prog_cc_stdc=no | |
4325 | ac_save_CC="$CC" | |
4326 | # Don't try gcc -ansi; that turns off useful extensions and | |
4327 | # breaks some systems' header files. | |
4328 | # AIX -qlanglvl=ansi | |
4329 | # Ultrix and OSF/1 -std1 | |
4330 | # HP-UX 10.20 and later -Ae | |
4331 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4332 | # SVR4 -Xc -D__EXTENSIONS__ | |
4333 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4334 | do | |
783e057b | 4335 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4337 | /* end confdefs.h. */ |
4338 | #include <stdarg.h> | |
4339 | #include <stdio.h> | |
4340 | #include <sys/types.h> | |
4341 | #include <sys/stat.h> | |
4342 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4343 | struct buf { int x; }; | |
4344 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4345 | static char *e (p, i) | |
4346 | char **p; | |
4347 | int i; | |
4348 | { | |
4349 | return p[i]; | |
4350 | } | |
4351 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4352 | { | |
4353 | char *s; | |
4354 | va_list v; | |
4355 | va_start (v,p); | |
4356 | s = g (p, va_arg (v,int)); | |
4357 | va_end (v); | |
4358 | return s; | |
4359 | } | |
4360 | int test (int i, double x); | |
4361 | struct s1 {int (*f) (int a);}; | |
4362 | struct s2 {int (*f) (double a);}; | |
4363 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4364 | int argc; | |
4365 | char **argv; | |
4366 | ||
4367 | int | |
4368 | main () | |
4369 | { | |
4370 | ||
4371 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4372 | ||
4373 | ; | |
4374 | return 0; | |
4375 | } | |
4376 | _ACEOF | |
81ecdfbb | 4377 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4378 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4379 | fi |
81ecdfbb | 4380 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4381 | done |
4382 | CC="$ac_save_CC" | |
4383 | ||
4384 | fi | |
4385 | ||
4386 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4388 | $as_echo "none needed" >&6; } | |
783e057b | 4389 | else |
81ecdfbb RW |
4390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4391 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4392 | fi |
4393 | case "x$am_cv_prog_cc_stdc" in | |
4394 | x|xno) ;; | |
4395 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4396 | esac | |
4397 | ||
4869db5e RM |
4398 | # expand $ac_aux_dir to an absolute path |
4399 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4400 | ||
4401 | if test x"${install_sh}" != xset; then | |
4402 | case $am_aux_dir in | |
4403 | *\ * | *\ *) | |
4404 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4405 | *) | |
4406 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4407 | esac | |
4408 | fi | |
4409 | ||
4410 | # Installed binaries are usually stripped using `strip' when the user | |
4411 | # run `make install-strip'. However `strip' might not be the right | |
4412 | # tool to use in cross-compilation environments, therefore Automake | |
4413 | # will honor the `STRIP' environment variable to overrule this program. | |
4414 | if test "$cross_compiling" != no; then | |
4415 | if test -n "$ac_tool_prefix"; then | |
4416 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4417 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4419 | $as_echo_n "checking for $ac_word... " >&6; } | |
4420 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
4421 | $as_echo_n "(cached) " >&6 | |
4422 | else | |
4423 | if test -n "$STRIP"; then | |
4424 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4425 | else | |
4426 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4427 | for as_dir in $PATH | |
4428 | do | |
4429 | IFS=$as_save_IFS | |
4430 | test -z "$as_dir" && as_dir=. | |
4431 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4432 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4433 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4434 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4435 | break 2 | |
4436 | fi | |
4437 | done | |
4438 | done | |
4439 | IFS=$as_save_IFS | |
4440 | ||
4441 | fi | |
4442 | fi | |
4443 | STRIP=$ac_cv_prog_STRIP | |
4444 | if test -n "$STRIP"; then | |
4445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4446 | $as_echo "$STRIP" >&6; } | |
4447 | else | |
4448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4449 | $as_echo "no" >&6; } | |
4450 | fi | |
4451 | ||
4452 | ||
4453 | fi | |
4454 | if test -z "$ac_cv_prog_STRIP"; then | |
4455 | ac_ct_STRIP=$STRIP | |
4456 | # Extract the first word of "strip", so it can be a program name with args. | |
4457 | set dummy strip; ac_word=$2 | |
4458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4459 | $as_echo_n "checking for $ac_word... " >&6; } | |
4460 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
4461 | $as_echo_n "(cached) " >&6 | |
4462 | else | |
4463 | if test -n "$ac_ct_STRIP"; then | |
4464 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4465 | else | |
4466 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4467 | for as_dir in $PATH | |
4468 | do | |
4469 | IFS=$as_save_IFS | |
4470 | test -z "$as_dir" && as_dir=. | |
4471 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4472 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4473 | ac_cv_prog_ac_ct_STRIP="strip" | |
4474 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4475 | break 2 | |
4476 | fi | |
4477 | done | |
4478 | done | |
4479 | IFS=$as_save_IFS | |
4480 | ||
4481 | fi | |
4482 | fi | |
4483 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4484 | if test -n "$ac_ct_STRIP"; then | |
4485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4486 | $as_echo "$ac_ct_STRIP" >&6; } | |
4487 | else | |
4488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4489 | $as_echo "no" >&6; } | |
4490 | fi | |
4491 | ||
4492 | if test "x$ac_ct_STRIP" = x; then | |
4493 | STRIP=":" | |
4494 | else | |
4495 | case $cross_compiling:$ac_tool_warned in | |
4496 | yes:) | |
4497 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4498 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4499 | ac_tool_warned=yes ;; | |
4500 | esac | |
4501 | STRIP=$ac_ct_STRIP | |
4502 | fi | |
4503 | else | |
4504 | STRIP="$ac_cv_prog_STRIP" | |
4505 | fi | |
4506 | ||
4507 | fi | |
4508 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4509 | ||
783e057b DJ |
4510 | |
4511 | ac_aux_dir= | |
81ecdfbb RW |
4512 | for ac_dir in .. "$srcdir"/..; do |
4513 | for ac_t in install-sh install.sh shtool; do | |
4514 | if test -f "$ac_dir/$ac_t"; then | |
4515 | ac_aux_dir=$ac_dir | |
4516 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4517 | break 2 | |
4518 | fi | |
4519 | done | |
783e057b DJ |
4520 | done |
4521 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4522 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4523 | fi |
81ecdfbb RW |
4524 | |
4525 | # These three variables are undocumented and unsupported, | |
4526 | # and are intended to be withdrawn in a future Autoconf release. | |
4527 | # They can cause serious problems if a builder's source tree is in a directory | |
4528 | # whose full name contains unusual characters. | |
4529 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4530 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4531 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4532 | ||
783e057b | 4533 | |
783e057b | 4534 | |
9009e1ae MR |
4535 | test "$program_prefix" != NONE && |
4536 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4537 | # Use a double $ so make ignores it. | |
4538 | test "$program_suffix" != NONE && | |
4539 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4540 | # Double any \ or $. | |
4541 | # By default was `s,x,x', remove it if useless. | |
4542 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4543 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4544 | ||
81ecdfbb | 4545 | |
a417dc56 RW |
4546 | # Dependency checking. |
4547 | rm -rf .tst 2>/dev/null | |
4548 | mkdir .tst 2>/dev/null | |
4549 | if test -d .tst; then | |
4550 | am__leading_dot=. | |
4551 | else | |
4552 | am__leading_dot=_ | |
4553 | fi | |
4554 | rmdir .tst 2>/dev/null | |
4555 | ||
4556 | DEPDIR="${am__leading_dot}deps" | |
4557 | ||
81ecdfbb | 4558 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4559 | |
4560 | ||
4561 | depcc="$CC" am_compiler_list= | |
4562 | ||
4563 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4565 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4566 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4567 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4568 | else |
4569 | if test -f "$am_depcomp"; then | |
4570 | # We make a subdir and do the tests there. Otherwise we can end up | |
4571 | # making bogus files that we don't know about and never remove. For | |
4572 | # instance it was reported that on HP-UX the gcc test will end up | |
4573 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4574 | # in D'. | |
4575 | mkdir conftest.dir | |
4576 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4577 | # using a relative directory. | |
4578 | cp "$am_depcomp" conftest.dir | |
4579 | cd conftest.dir | |
4580 | # We will build objects and dependencies in a subdirectory because | |
4581 | # it helps to detect inapplicable dependency modes. For instance | |
4582 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4583 | # side effect of compilation, but ICC will put the dependencies in | |
4584 | # the current directory while Tru64 will put them in the object | |
4585 | # directory. | |
4586 | mkdir sub | |
4587 | ||
4588 | am_cv_CC_dependencies_compiler_type=none | |
4589 | if test "$am_compiler_list" = ""; then | |
4590 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4591 | fi | |
4592 | for depmode in $am_compiler_list; do | |
4593 | if test $depmode = none; then break; fi | |
4594 | ||
81ecdfbb | 4595 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4596 | # Setup a source with many dependencies, because some compilers |
4597 | # like to wrap large dependency lists on column 80 (with \), and | |
4598 | # we should not choose a depcomp mode which is confused by this. | |
4599 | # | |
4600 | # We need to recreate these files for each test, as the compiler may | |
4601 | # overwrite some of them when testing with obscure command lines. | |
4602 | # This happens at least with the AIX C compiler. | |
4603 | : > sub/conftest.c | |
4604 | for i in 1 2 3 4 5 6; do | |
4605 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4606 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4607 | # Solaris 8's {/usr,}/bin/sh. | |
4608 | touch sub/conftst$i.h | |
4609 | done | |
4610 | echo "include sub/conftest.Po" > confmf | |
4611 | ||
4612 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4613 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4614 | # handle `-M -o', and we need to detect this. | |
4615 | depcmd="depmode=$depmode \ | |
4616 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4617 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4618 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4619 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4620 | if env $depcmd > conftest.err 2>&1 && | |
4621 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4622 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4623 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4624 | # icc doesn't choke on unknown options, it will just issue warnings | |
4625 | # or remarks (even with -Werror). So we grep stderr for any message | |
4626 | # that says an option was ignored or not supported. | |
4627 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4628 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4629 | # The diagnosis changed in icc 8.0: | |
4630 | # icc: Command line remark: option '-MP' not supported | |
4631 | if (grep 'ignoring option' conftest.err || | |
4632 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4633 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4634 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4635 | break |
4636 | fi | |
4637 | fi | |
81ecdfbb | 4638 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4639 | sed -e 's/^/| /' < conftest.err >&5 |
4640 | done | |
4641 | ||
4642 | cd .. | |
4643 | rm -rf conftest.dir | |
4644 | else | |
4645 | am_cv_CC_dependencies_compiler_type=none | |
4646 | fi | |
4647 | ||
4648 | fi | |
81ecdfbb RW |
4649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4650 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4651 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4652 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4653 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4654 | ||
4655 | fi | |
4656 | ||
4657 | ||
4658 | # Check for the 'make' the user wants to use. | |
4659 | for ac_prog in make | |
4660 | do | |
4661 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4662 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4663 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4664 | $as_echo_n "checking for $ac_word... " >&6; } | |
4665 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4666 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4667 | else |
4668 | if test -n "$MAKE"; then | |
4669 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4670 | else | |
4671 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4672 | for as_dir in $PATH | |
4673 | do | |
4674 | IFS=$as_save_IFS | |
4675 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4676 | for ac_exec_ext in '' $ac_executable_extensions; do |
4677 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4678 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4679 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4680 | break 2 |
4681 | fi | |
4682 | done | |
81ecdfbb RW |
4683 | done |
4684 | IFS=$as_save_IFS | |
a417dc56 RW |
4685 | |
4686 | fi | |
4687 | fi | |
4688 | MAKE=$ac_cv_prog_MAKE | |
4689 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4691 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4692 | else |
81ecdfbb RW |
4693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4694 | $as_echo "no" >&6; } | |
a417dc56 RW |
4695 | fi |
4696 | ||
81ecdfbb | 4697 | |
a417dc56 RW |
4698 | test -n "$MAKE" && break |
4699 | done | |
4700 | ||
4701 | MAKE_IS_GNU= | |
4702 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4703 | *GNU*) | |
4704 | MAKE_IS_GNU=yes | |
4705 | ;; | |
4706 | esac | |
81ecdfbb | 4707 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4708 | GMAKE_TRUE= |
4709 | GMAKE_FALSE='#' | |
4710 | else | |
4711 | GMAKE_TRUE='#' | |
4712 | GMAKE_FALSE= | |
4713 | fi | |
4714 | ||
81ecdfbb RW |
4715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4716 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4717 | set x ${MAKE-make} | |
4718 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4719 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4720 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4721 | else |
4722 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4723 | SHELL = /bin/sh |
a417dc56 | 4724 | all: |
81ecdfbb | 4725 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4726 | _ACEOF |
4727 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4728 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4729 | *@@@%%%=?*=@@@%%%*) | |
4730 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4731 | *) | |
4732 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4733 | esac | |
a417dc56 RW |
4734 | rm -f conftest.make |
4735 | fi | |
81ecdfbb RW |
4736 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4738 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4739 | SET_MAKE= |
4740 | else | |
81ecdfbb RW |
4741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4742 | $as_echo "no" >&6; } | |
a417dc56 RW |
4743 | SET_MAKE="MAKE=${MAKE-make}" |
4744 | fi | |
4745 | ||
4746 | ||
c971b7fa PA |
4747 | # Configure gnulib. We need to build gnulib under some other |
4748 | # directory not "gnulib", to avoid the problem of both GDB and | |
4749 | # GDBserver wanting to build it in the same directory, when building | |
4750 | # in the source dir. | |
783e057b | 4751 | |
c971b7fa PA |
4752 | in_src="gnulib" |
4753 | in_build="build-gnulib" | |
4754 | ||
4755 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
4756 | # so they do not pile up. | |
4757 | ac_sub_configure_args= | |
4758 | ac_prev= | |
4759 | eval "set x $ac_configure_args" | |
4760 | shift | |
4761 | for ac_arg | |
4762 | do | |
4763 | if test -n "$ac_prev"; then | |
4764 | ac_prev= | |
4765 | continue | |
4766 | fi | |
4767 | case $ac_arg in | |
4768 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
4769 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
4770 | ac_prev=cache_file ;; | |
4771 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
4772 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
4773 | | --c=*) | |
4774 | ;; | |
4775 | --config-cache | -C) | |
4776 | ;; | |
4777 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
4778 | ac_prev=srcdir ;; | |
4779 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
4780 | ;; | |
4781 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
4782 | ac_prev=prefix ;; | |
4783 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
4784 | ;; | |
4785 | --disable-option-checking) | |
4786 | ;; | |
4787 | *) | |
4788 | case $ac_arg in | |
4789 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4790 | esac | |
4791 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
4792 | esac | |
4793 | done | |
4794 | ||
4795 | # Always prepend --prefix to ensure using the same prefix | |
4796 | # in subdir configurations. | |
4797 | ac_arg="--prefix=$prefix" | |
4798 | case $ac_arg in | |
4799 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4800 | esac | |
4801 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
4802 | ||
4803 | # Pass --silent | |
4804 | if test "$silent" = yes; then | |
4805 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
4806 | fi | |
4807 | ||
4808 | # Always prepend --disable-option-checking to silence warnings, since | |
4809 | # different subdirs can have different --enable and --with options. | |
4810 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
4811 | ||
4812 | ac_popdir=`pwd` | |
4813 | ac_dir=$in_build | |
4814 | ||
4815 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
4816 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
4817 | $as_echo "$ac_msg" >&6 | |
4818 | as_dir="$ac_dir"; as_fn_mkdir_p | |
4819 | ||
38ea300a PA |
4820 | case $srcdir in |
4821 | [\\/]* | ?:[\\/]* ) | |
4822 | ac_srcdir=$srcdir/$in_src ;; | |
4823 | *) # Relative name. | |
4824 | ac_srcdir=../$srcdir/$in_src ;; | |
4825 | esac | |
c971b7fa PA |
4826 | |
4827 | cd "$ac_dir" | |
4828 | ||
4829 | ac_sub_configure=$ac_srcdir/configure | |
4830 | ||
4831 | # Make the cache file name correct relative to the subdirectory. | |
4832 | case $cache_file in | |
4833 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
4834 | *) # Relative name. | |
4835 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
4836 | esac | |
4837 | ||
4838 | { $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 | |
4839 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
4840 | # The eval makes quoting arguments work. | |
4841 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
4842 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
4843 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
4844 | ||
4845 | cd "$ac_popdir" | |
783e057b | 4846 | |
c971b7fa PA |
4847 | |
4848 | ||
4849 | CONFIG_OBS= | |
4850 | CONFIG_DEPS= | |
4851 | CONFIG_SRCS= | |
4852 | ENABLE_CFLAGS= | |
4853 | ||
4854 | CONFIG_ALL= | |
4855 | CONFIG_CLEAN= | |
4856 | CONFIG_INSTALL= | |
4857 | CONFIG_UNINSTALL= | |
4858 | ||
4859 | # If we haven't got the data from the intl directory, | |
4860 | # assume NLS is disabled. | |
4861 | USE_NLS=no | |
4862 | LIBINTL= | |
4863 | LIBINTL_DEP= | |
4864 | INCINTL= | |
4865 | XGETTEXT= | |
4866 | GMSGFMT= | |
4867 | POSUB= | |
783e057b DJ |
4868 | |
4869 | if test -f ../intl/config.intl; then | |
4870 | . ../intl/config.intl | |
4871 | fi | |
81ecdfbb RW |
4872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4873 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4874 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4876 | $as_echo "no" >&6; } | |
783e057b | 4877 | else |
81ecdfbb RW |
4878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4879 | $as_echo "yes" >&6; } | |
783e057b | 4880 | |
81ecdfbb | 4881 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4882 | |
4883 | ||
81ecdfbb RW |
4884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4885 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4886 | # Look for .po and .gmo files in the source directory. |
4887 | CATALOGS= | |
4888 | XLINGUAS= | |
4889 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4890 | # If there aren't any .gmo files the shell will give us the | |
4891 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4892 | # weeded out. | |
4893 | case "$cat" in *\**) | |
4894 | continue;; | |
4895 | esac | |
4896 | # The quadruple backslash is collapsed to a double backslash | |
4897 | # by the backticks, then collapsed again by the double quotes, | |
4898 | # leaving us with one backslash in the sed expression (right | |
4899 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
4900 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
4901 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4902 | # The user is allowed to set LINGUAS to a list of languages to | |
4903 | # install catalogs for. If it's empty that means "all of them." | |
4904 | if test "x$LINGUAS" = x; then | |
4905 | CATALOGS="$CATALOGS $cat" | |
4906 | XLINGUAS="$XLINGUAS $lang" | |
4907 | else | |
4908 | case "$LINGUAS" in *$lang*) | |
4909 | CATALOGS="$CATALOGS $cat" | |
4910 | XLINGUAS="$XLINGUAS $lang" | |
4911 | ;; | |
4912 | esac | |
e28b3332 DJ |
4913 | fi |
4914 | done | |
c971b7fa PA |
4915 | LINGUAS="$XLINGUAS" |
4916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
4917 | $as_echo "$LINGUAS" >&6; } | |
4918 | ||
4919 | ||
4920 | DATADIRNAME=share | |
4921 | ||
4922 | INSTOBJEXT=.mo | |
4923 | ||
4924 | GENCAT=gencat | |
4925 | ||
4926 | CATOBJEXT=.gmo | |
e28b3332 | 4927 | |
e28b3332 DJ |
4928 | fi |
4929 | ||
c971b7fa PA |
4930 | localedir='${datadir}/locale' |
4931 | ||
4932 | ||
4933 | if test x"$USE_NLS" = xyes; then | |
4934 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4935 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4936 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4937 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 4938 | fi |
e28b3332 | 4939 | |
c971b7fa PA |
4940 | GNULIB=build-gnulib/import |
4941 | ||
4942 | # For Makefile dependencies. | |
4943 | GNULIB_STDINT_H= | |
4944 | if test x"$STDINT_H" != x; then | |
4945 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
4946 | fi |
4947 | ||
4948 | ||
c971b7fa PA |
4949 | PACKAGE=gdb |
4950 | ||
4951 | cat >>confdefs.h <<_ACEOF | |
4952 | #define PACKAGE "$PACKAGE" | |
4953 | _ACEOF | |
4954 | ||
4955 | ||
4956 | ||
4957 | # We never need to detect it in this sub-configure. | |
4958 | # But preserve it for config.status --recheck. | |
4959 | ||
4960 | ||
4961 | ||
4962 | MAKEINFO_EXTRA_FLAGS="" | |
4963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
4964 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
4965 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
4966 | $as_echo_n "(cached) " >&6 | |
4967 | else | |
4968 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
4969 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
4970 | gdb_cv_have_makeinfo_click=yes | |
4971 | else | |
4972 | gdb_cv_have_makeinfo_click=no | |
4973 | fi | |
4974 | fi | |
4975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
4976 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
4977 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
4978 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
4979 | fi | |
e28b3332 DJ |
4980 | |
4981 | ||
bec39cab AC |
4982 | |
4983 | ||
81ecdfbb RW |
4984 | # Check whether --with-separate-debug-dir was given. |
4985 | if test "${with_separate_debug_dir+set}" = set; then : | |
4986 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
4987 | DEBUGDIR=$withval |
4988 | else | |
4989 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
4990 | fi |
4991 | ||
20e95c23 | 4992 | |
783e057b DJ |
4993 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4994 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 4995 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 4996 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 4997 | |
783e057b DJ |
4998 | cat >>confdefs.h <<_ACEOF |
4999 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 5000 | _ACEOF |
20e95c23 | 5001 | |
20e95c23 | 5002 | |
20e95c23 | 5003 | |
0c4a4063 | 5004 | |
b14b1491 TT |
5005 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5006 | if test "x$prefix" = xNONE; then | |
5007 | test_prefix=/usr/local | |
5008 | else | |
5009 | test_prefix=$prefix | |
5010 | fi | |
783e057b | 5011 | else |
b14b1491 | 5012 | test_prefix=$exec_prefix |
783e057b | 5013 | fi |
b14b1491 TT |
5014 | value=0 |
5015 | case ${ac_define_dir} in | |
5016 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5017 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5018 | value=1 | |
5019 | ;; | |
5020 | esac | |
5021 | ||
5022 | cat >>confdefs.h <<_ACEOF | |
5023 | #define DEBUGDIR_RELOCATABLE $value | |
5024 | _ACEOF | |
5025 | ||
5026 | ||
5027 | ||
0c4a4063 | 5028 | |
f83d8a90 DE |
5029 | # We can't pass paths as command line arguments. |
5030 | # Mingw32 tries to be clever and will convert the paths for us. | |
5031 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
5032 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
5033 | # This breaks GDB's relocatable path conversions since paths passed in | |
5034 | # config.h would not get so translated, the path prefixes no longer match. | |
5035 | ||
5036 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5037 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5038 | ac_define_dir=`eval echo $bindir` | |
5039 | ac_define_dir=`eval echo $ac_define_dir` | |
5040 | ||
5041 | cat >>confdefs.h <<_ACEOF | |
5042 | #define BINDIR "$ac_define_dir" | |
5043 | _ACEOF | |
5044 | ||
5045 | ||
5046 | ||
b14b1491 TT |
5047 | # GDB's datadir relocation |
5048 | ||
5049 | ||
5050 | ||
81ecdfbb RW |
5051 | # Check whether --with-gdb-datadir was given. |
5052 | if test "${with_gdb_datadir+set}" = set; then : | |
5053 | withval=$with_gdb_datadir; | |
b14b1491 | 5054 | GDB_DATADIR=$withval |
20e95c23 | 5055 | else |
b14b1491 | 5056 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
5057 | fi |
5058 | ||
20e95c23 | 5059 | |
b14b1491 TT |
5060 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
5061 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5062 | ac_define_dir=`eval echo $GDB_DATADIR` | |
5063 | ac_define_dir=`eval echo $ac_define_dir` | |
5064 | ||
5065 | cat >>confdefs.h <<_ACEOF | |
5066 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
5067 | _ACEOF |
5068 | ||
b14b1491 TT |
5069 | |
5070 | ||
0c4a4063 | 5071 | |
b14b1491 TT |
5072 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5073 | if test "x$prefix" = xNONE; then | |
5074 | test_prefix=/usr/local | |
5075 | else | |
5076 | test_prefix=$prefix | |
5077 | fi | |
5078 | else | |
5079 | test_prefix=$exec_prefix | |
5080 | fi | |
5081 | value=0 | |
5082 | case ${ac_define_dir} in | |
5083 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5084 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5085 | value=1 | |
5086 | ;; | |
5087 | esac | |
5088 | ||
5089 | cat >>confdefs.h <<_ACEOF | |
5090 | #define GDB_DATADIR_RELOCATABLE $value | |
5091 | _ACEOF | |
5092 | ||
5093 | ||
783e057b | 5094 | |
20e95c23 | 5095 | |
0c4a4063 | 5096 | |
81ecdfbb RW |
5097 | # Check whether --with-relocated-sources was given. |
5098 | if test "${with_relocated_sources+set}" = set; then : | |
5099 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
5100 | |
5101 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5102 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5103 | ac_define_dir=`eval echo $reloc_srcdir` | |
5104 | ac_define_dir=`eval echo $ac_define_dir` | |
5105 | ||
5106 | cat >>confdefs.h <<_ACEOF | |
5107 | #define RELOC_SRCDIR "$ac_define_dir" | |
5108 | _ACEOF | |
5109 | ||
5110 | ||
5111 | ||
81ecdfbb RW |
5112 | fi |
5113 | ||
29b0e8a2 | 5114 | |
7349ff92 JK |
5115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
5116 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
5117 | ||
5118 | # Check whether --with-auto-load-dir was given. | |
5119 | if test "${with_auto_load_dir+set}" = set; then : | |
5120 | withval=$with_auto_load_dir; | |
5121 | else | |
1564a261 | 5122 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
5123 | fi |
5124 | ||
1564a261 | 5125 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
5126 | |
5127 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5128 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5129 | ac_define_dir=`eval echo $escape_dir` | |
5130 | ac_define_dir=`eval echo $ac_define_dir` | |
5131 | ||
5132 | cat >>confdefs.h <<_ACEOF | |
5133 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
5134 | _ACEOF | |
5135 | ||
5136 | ||
5137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
5138 | $as_echo "$with_auto_load_dir" >&6; } | |
5139 | ||
bccbefd2 JK |
5140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
5141 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
5142 | ||
5143 | # Check whether --with-auto-load-safe-path was given. | |
5144 | if test "${with_auto_load_safe_path+set}" = set; then : | |
5145 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
5146 | with_auto_load_safe_path="/" |
5147 | fi | |
bccbefd2 | 5148 | else |
7349ff92 | 5149 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5150 | fi |
5151 | ||
1564a261 | 5152 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5153 | |
5154 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5155 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5156 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5157 | ac_define_dir=`eval echo $ac_define_dir` |
5158 | ||
5159 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5160 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5161 | _ACEOF |
5162 | ||
5163 | ||
5164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5165 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5166 | ||
29b0e8a2 | 5167 | |
20e95c23 | 5168 | |
5ae98d25 | 5169 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5170 | |
5171 | ||
783e057b | 5172 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5173 | # Check whether --enable-targets was given. |
5174 | if test "${enable_targets+set}" = set; then : | |
5175 | enableval=$enable_targets; case "${enableval}" in | |
5176 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5177 | ;; |
5178 | no) enable_targets= ;; | |
5179 | *) enable_targets=$enableval ;; | |
5180 | esac | |
81ecdfbb RW |
5181 | fi |
5182 | ||
20e95c23 | 5183 | |
783e057b | 5184 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5185 | # Check whether --enable-64-bit-bfd was given. |
5186 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5187 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5188 | yes) want64=true ;; |
5189 | no) want64=false ;; | |
81ecdfbb | 5190 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5191 | esac |
5192 | else | |
5193 | want64=false | |
81ecdfbb RW |
5194 | fi |
5195 | ||
783e057b DJ |
5196 | # Provide defaults for some variables set by the per-host and per-target |
5197 | # configuration. | |
5198 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5199 | |
783e057b DJ |
5200 | if test "${target}" = "${host}"; then |
5201 | gdb_native=yes | |
5202 | else | |
5203 | gdb_native=no | |
5204 | fi | |
20e95c23 | 5205 | |
783e057b | 5206 | . $srcdir/configure.host |
20e95c23 | 5207 | |
783e057b | 5208 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5209 | |
783e057b DJ |
5210 | TARGET_OBS= |
5211 | all_targets= | |
b292c783 | 5212 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 5213 | |
783e057b | 5214 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5215 | do |
783e057b DJ |
5216 | if test "$targ_alias" = "all"; then |
5217 | all_targets=true | |
5218 | else | |
5219 | # Canonicalize the secondary target names. | |
5220 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5221 | if test -n "$result"; then | |
5222 | targ=$result | |
5223 | else | |
5224 | targ=$targ_alias | |
5225 | fi | |
20e95c23 | 5226 | |
783e057b | 5227 | . ${srcdir}/configure.tgt |
20e95c23 | 5228 | |
bf307134 JB |
5229 | if test -z "${gdb_target_obs}"; then : |
5230 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5231 | fi | |
5232 | ||
783e057b DJ |
5233 | # Target-specific object files |
5234 | for i in ${gdb_target_obs}; do | |
5235 | case " $TARGET_OBS " in | |
5236 | *" ${i} "*) ;; | |
5237 | *) | |
5238 | TARGET_OBS="$TARGET_OBS ${i}" | |
5239 | ;; | |
5240 | esac | |
5241 | done | |
20e95c23 | 5242 | |
783e057b DJ |
5243 | # Check whether this target needs 64-bit CORE_ADDR |
5244 | if test x${want64} = xfalse; then | |
5245 | . ${srcdir}/../bfd/config.bfd | |
5246 | fi | |
b292c783 JK |
5247 | |
5248 | # Check whether this target is native and supports gcore. | |
5249 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
5250 | && $gdb_have_gcore; then | |
5251 | HAVE_NATIVE_GCORE_TARGET=1 | |
5252 | fi | |
783e057b | 5253 | fi |
20e95c23 DJ |
5254 | done |
5255 | ||
783e057b DJ |
5256 | if test x${all_targets} = xtrue; then |
5257 | ||
5258 | # We want all 64-bit targets if we either: | |
5259 | # - run on a 64-bit host or | |
5260 | # - already require 64-bit support for some other target or | |
5261 | # - the --enable-64-bit-bfd option was supplied | |
5262 | # Otherwise we only support all 32-bit targets. | |
5263 | # | |
5264 | # NOTE: This test must be in sync with the corresponding | |
5265 | # tests in BFD! | |
20e95c23 | 5266 | |
783e057b | 5267 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5268 | # The cast to long int works around a bug in the HP C Compiler |
5269 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5270 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5271 | # This bug is HP SR number 8606223364. | |
5272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5273 | $as_echo_n "checking size of long... " >&6; } | |
5274 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5275 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5276 | else |
81ecdfbb | 5277 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5278 | |
81ecdfbb RW |
5279 | else |
5280 | if test "$ac_cv_type_long" = yes; then | |
5281 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5282 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5283 | { as_fn_set_status 77 | |
5284 | as_fn_error "cannot compute sizeof (long) | |
5285 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5286 | else | |
5287 | ac_cv_sizeof_long=0 | |
5288 | fi | |
c0993dbe | 5289 | fi |
81ecdfbb | 5290 | |
c0993dbe | 5291 | fi |
81ecdfbb RW |
5292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5293 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5294 | |
c0993dbe | 5295 | |
c0993dbe | 5296 | |
c0993dbe UW |
5297 | cat >>confdefs.h <<_ACEOF |
5298 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5299 | _ACEOF | |
5300 | ||
5301 | ||
5302 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5303 | want64=true | |
5304 | fi | |
5305 | fi | |
5306 | if test x${want64} = xtrue; then | |
5307 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5308 | else | |
5309 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5310 | fi | |
5311 | fi | |
5312 | ||
5313 | ||
5314 | ||
b292c783 | 5315 | |
c0993dbe UW |
5316 | # For other settings, only the main target counts. |
5317 | gdb_sim= | |
5318 | gdb_osabi= | |
5319 | build_gdbserver= | |
5320 | targ=$target; . ${srcdir}/configure.tgt | |
5321 | ||
5322 | # Fetch the default architecture and default target vector from BFD. | |
5323 | targ=$target; . $srcdir/../bfd/config.bfd | |
5324 | ||
5325 | # We only want the first architecture, so strip off the others if | |
5326 | # there is more than one. | |
5327 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5328 | ||
5329 | if test "x$targ_archs" != x; then | |
5330 | ||
5331 | cat >>confdefs.h <<_ACEOF | |
5332 | #define DEFAULT_BFD_ARCH $targ_archs | |
5333 | _ACEOF | |
5334 | ||
5335 | fi | |
5336 | if test "x$targ_defvec" != x; then | |
5337 | ||
5338 | cat >>confdefs.h <<_ACEOF | |
5339 | #define DEFAULT_BFD_VEC $targ_defvec | |
5340 | _ACEOF | |
5341 | ||
5342 | fi | |
5343 | ||
c0993dbe UW |
5344 | # The CLI cannot be disabled yet, but may be in the future. |
5345 | ||
5346 | # Enable CLI. | |
81ecdfbb RW |
5347 | # Check whether --enable-gdbcli was given. |
5348 | if test "${enable_gdbcli+set}" = set; then : | |
5349 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5350 | yes) |
5351 | ;; | |
5352 | no) | |
81ecdfbb | 5353 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5354 | *) |
81ecdfbb | 5355 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5356 | esac |
5357 | else | |
5358 | enable_gdbcli=yes | |
81ecdfbb RW |
5359 | fi |
5360 | ||
c0993dbe UW |
5361 | if test x"$enable_gdbcli" = xyes; then |
5362 | if test -d $srcdir/cli; then | |
5363 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5364 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5365 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5366 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5367 | fi | |
5368 | fi | |
5369 | ||
5370 | # Enable MI. | |
81ecdfbb RW |
5371 | # Check whether --enable-gdbmi was given. |
5372 | if test "${enable_gdbmi+set}" = set; then : | |
5373 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5374 | yes | no) |
5375 | ;; | |
5376 | *) | |
81ecdfbb | 5377 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5378 | esac |
5379 | else | |
5380 | enable_gdbmi=yes | |
81ecdfbb RW |
5381 | fi |
5382 | ||
c0993dbe UW |
5383 | if test x"$enable_gdbmi" = xyes; then |
5384 | if test -d $srcdir/mi; then | |
5385 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5386 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5387 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5388 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5389 | fi | |
5390 | fi | |
5391 | ||
5392 | # Enable TUI. | |
81ecdfbb RW |
5393 | # Check whether --enable-tui was given. |
5394 | if test "${enable_tui+set}" = set; then : | |
5395 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5396 | yes | no | auto) |
c0993dbe UW |
5397 | ;; |
5398 | *) | |
81ecdfbb | 5399 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5400 | esac |
5401 | else | |
3ca64bd3 | 5402 | enable_tui=auto |
81ecdfbb RW |
5403 | fi |
5404 | ||
c0993dbe UW |
5405 | |
5406 | # Enable gdbtk. | |
81ecdfbb RW |
5407 | # Check whether --enable-gdbtk was given. |
5408 | if test "${enable_gdbtk+set}" = set; then : | |
5409 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5410 | yes | no) |
5411 | ;; | |
5412 | *) | |
81ecdfbb | 5413 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5414 | esac |
5415 | else | |
5062cc19 | 5416 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5417 | enable_gdbtk=yes |
5418 | else | |
5419 | enable_gdbtk=no | |
5420 | fi | |
81ecdfbb RW |
5421 | fi |
5422 | ||
c0993dbe UW |
5423 | # We unconditionally disable gdbtk tests on selected platforms. |
5424 | case $host_os in | |
5425 | go32* | windows*) | |
81ecdfbb RW |
5426 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5427 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5428 | enable_gdbtk=no ;; |
5429 | esac | |
5430 | ||
05e7c244 | 5431 | # Libunwind support for ia64. |
bec39cab | 5432 | |
05e7c244 JK |
5433 | |
5434 | # Check whether --with-libunwind-ia64 was given. | |
5435 | if test "${with_libunwind_ia64+set}" = set; then : | |
5436 | withval=$with_libunwind_ia64; | |
bec39cab | 5437 | else |
05e7c244 JK |
5438 | with_libunwind_ia64=auto |
5439 | fi | |
bec39cab | 5440 | |
05e7c244 JK |
5441 | |
5442 | # Backward compatibility option. | |
5443 | if test "${with_libunwind+set}" = set; then | |
5444 | if test x"$with_libunwind_ia64" != xauto; then | |
5445 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5446 | fi | |
5447 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5448 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5449 | with_libunwind_ia64="$with_libunwind" | |
5450 | fi | |
5451 | ||
5452 | case "$with_libunwind_ia64" in | |
5453 | yes | no) | |
5454 | ;; | |
5455 | auto) | |
5456 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5457 | do : |
b54a8fd7 PA |
5458 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5459 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5460 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5461 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5462 | _ACEOF |
5463 | ||
5464 | fi | |
5465 | ||
5466 | done | |
5467 | ||
05e7c244 JK |
5468 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5469 | ;; | |
5470 | *) | |
5471 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5472 | ;; | |
5473 | esac | |
bec39cab | 5474 | |
05e7c244 | 5475 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5476 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5477 | do : |
b54a8fd7 PA |
5478 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5479 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5480 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5481 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5482 | _ACEOF |
5483 | ||
5484 | fi | |
5485 | ||
5486 | done | |
5487 | ||
05e7c244 JK |
5488 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5489 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5490 | fi | |
5491 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5492 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5493 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5494 | fi |
5495 | ||
cb01cfba JB |
5496 | opt_curses=no |
5497 | ||
81ecdfbb RW |
5498 | # Check whether --with-curses was given. |
5499 | if test "${with_curses+set}" = set; then : | |
5500 | withval=$with_curses; opt_curses=$withval | |
5501 | fi | |
5502 | ||
cb01cfba | 5503 | |
76a39ba7 | 5504 | prefer_curses=no |
cb01cfba | 5505 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5506 | prefer_curses=yes |
cb01cfba JB |
5507 | fi |
5508 | ||
a9322a30 | 5509 | # Profiling support. |
81ecdfbb RW |
5510 | # Check whether --enable-profiling was given. |
5511 | if test "${enable_profiling+set}" = set; then : | |
5512 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5513 | yes | no) |
5514 | ;; | |
5515 | *) | |
81ecdfbb | 5516 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5517 | esac |
5518 | else | |
5519 | enable_profiling=no | |
81ecdfbb | 5520 | fi |
bec39cab | 5521 | |
a9322a30 TT |
5522 | |
5523 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5524 | do : |
5525 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5526 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5527 | eval as_val=\$$as_ac_var | |
5528 | if test "x$as_val" = x""yes; then : | |
5529 | cat >>confdefs.h <<_ACEOF | |
5530 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5531 | _ACEOF |
a9322a30 | 5532 | |
81ecdfbb RW |
5533 | fi |
5534 | done | |
a9322a30 | 5535 | |
81ecdfbb RW |
5536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5537 | $as_echo_n "checking for _etext... " >&6; } | |
5538 | if test "${ac_cv_var__etext+set}" = set; then : | |
5539 | $as_echo_n "(cached) " >&6 | |
5540 | else | |
5541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5542 | /* end confdefs.h. */ | |
5543 | #include <stdlib.h> | |
5544 | extern char _etext; | |
a9322a30 TT |
5545 | |
5546 | int | |
5547 | main () | |
5548 | { | |
5549 | free (&_etext); | |
5550 | ; | |
5551 | return 0; | |
5552 | } | |
bec39cab | 5553 | _ACEOF |
81ecdfbb | 5554 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5555 | ac_cv_var__etext=yes |
bec39cab | 5556 | else |
81ecdfbb | 5557 | ac_cv_var__etext=no |
bec39cab | 5558 | fi |
81ecdfbb RW |
5559 | rm -f core conftest.err conftest.$ac_objext \ |
5560 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5561 | fi |
81ecdfbb RW |
5562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
5563 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 5564 | if test $ac_cv_var__etext = yes; then |
60ca704f | 5565 | |
81ecdfbb | 5566 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 5567 | |
bec39cab | 5568 | fi |
81ecdfbb RW |
5569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
5570 | $as_echo_n "checking for etext... " >&6; } | |
5571 | if test "${ac_cv_var_etext+set}" = set; then : | |
5572 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5573 | else |
81ecdfbb | 5574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5575 | /* end confdefs.h. */ |
a9322a30 TT |
5576 | #include <stdlib.h> |
5577 | extern char etext; | |
bec39cab AC |
5578 | |
5579 | int | |
5580 | main () | |
5581 | { | |
a9322a30 | 5582 | free (&etext); |
bec39cab AC |
5583 | ; |
5584 | return 0; | |
5585 | } | |
5586 | _ACEOF | |
81ecdfbb | 5587 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5588 | ac_cv_var_etext=yes |
bec39cab | 5589 | else |
81ecdfbb | 5590 | ac_cv_var_etext=no |
bec39cab | 5591 | fi |
81ecdfbb RW |
5592 | rm -f core conftest.err conftest.$ac_objext \ |
5593 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5594 | fi |
81ecdfbb RW |
5595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
5596 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
5597 | if test $ac_cv_var_etext = yes; then |
5598 | ||
81ecdfbb | 5599 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
5600 | |
5601 | fi | |
a9322a30 TT |
5602 | if test "$enable_profiling" = yes ; then |
5603 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 5604 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
5605 | fi |
5606 | PROFILE_CFLAGS=-pg | |
5607 | OLD_CFLAGS="$CFLAGS" | |
5608 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 5609 | |
81ecdfbb RW |
5610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
5611 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
5612 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
5613 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5614 | else |
81ecdfbb | 5615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5616 | /* end confdefs.h. */ |
bec39cab AC |
5617 | |
5618 | int | |
5619 | main () | |
5620 | { | |
a9322a30 | 5621 | int x; |
bec39cab AC |
5622 | ; |
5623 | return 0; | |
5624 | } | |
5625 | _ACEOF | |
81ecdfbb | 5626 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 5627 | ac_cv_cc_supports_pg=yes |
bec39cab | 5628 | else |
81ecdfbb | 5629 | ac_cv_cc_supports_pg=no |
bec39cab | 5630 | fi |
81ecdfbb | 5631 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 5632 | fi |
81ecdfbb RW |
5633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
5634 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 5635 | |
a9322a30 | 5636 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 5637 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 5638 | fi |
bec39cab | 5639 | |
a9322a30 | 5640 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
5641 | fi |
5642 | ||
c16158bc JM |
5643 | |
5644 | ||
81ecdfbb RW |
5645 | # Check whether --with-pkgversion was given. |
5646 | if test "${with_pkgversion+set}" = set; then : | |
5647 | withval=$with_pkgversion; case "$withval" in | |
5648 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5649 | no) PKGVERSION= ;; |
5650 | *) PKGVERSION="($withval) " ;; | |
5651 | esac | |
5652 | else | |
5653 | PKGVERSION="(GDB) " | |
5654 | ||
81ecdfbb | 5655 | fi |
c16158bc JM |
5656 | |
5657 | ||
5658 | ||
5659 | ||
81ecdfbb RW |
5660 | |
5661 | # Check whether --with-bugurl was given. | |
5662 | if test "${with_bugurl+set}" = set; then : | |
5663 | withval=$with_bugurl; case "$withval" in | |
5664 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5665 | no) BUGURL= |
5666 | ;; | |
5667 | *) BUGURL="$withval" | |
5668 | ;; | |
5669 | esac | |
5670 | else | |
5671 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
5672 | ||
81ecdfbb RW |
5673 | fi |
5674 | ||
c16158bc JM |
5675 | case ${BUGURL} in |
5676 | "") | |
5677 | REPORT_BUGS_TO= | |
5678 | REPORT_BUGS_TEXI= | |
5679 | ;; | |
5680 | *) | |
5681 | REPORT_BUGS_TO="<$BUGURL>" | |
5682 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
5683 | ;; | |
5684 | esac; | |
5685 | ||
5686 | ||
5687 | ||
5688 | ||
5689 | cat >>confdefs.h <<_ACEOF | |
5690 | #define PKGVERSION "$PKGVERSION" | |
5691 | _ACEOF | |
5692 | ||
5693 | ||
5694 | cat >>confdefs.h <<_ACEOF | |
5695 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
5696 | _ACEOF | |
5697 | ||
5698 | ||
bec39cab AC |
5699 | # --------------------- # |
5700 | # Checks for programs. # | |
5701 | # --------------------- # | |
5702 | ||
5703 | for ac_prog in gawk mawk nawk awk | |
5704 | do | |
5705 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5706 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5707 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5708 | $as_echo_n "checking for $ac_word... " >&6; } | |
5709 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
5710 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5711 | else |
5712 | if test -n "$AWK"; then | |
5713 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
5714 | else | |
5715 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5716 | for as_dir in $PATH | |
5717 | do | |
5718 | IFS=$as_save_IFS | |
5719 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5720 | for ac_exec_ext in '' $ac_executable_extensions; do |
5721 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5722 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 5723 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5724 | break 2 |
5725 | fi | |
5726 | done | |
81ecdfbb RW |
5727 | done |
5728 | IFS=$as_save_IFS | |
bec39cab AC |
5729 | |
5730 | fi | |
5731 | fi | |
5732 | AWK=$ac_cv_prog_AWK | |
5733 | if test -n "$AWK"; then | |
81ecdfbb RW |
5734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
5735 | $as_echo "$AWK" >&6; } | |
bec39cab | 5736 | else |
81ecdfbb RW |
5737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5738 | $as_echo "no" >&6; } | |
bec39cab AC |
5739 | fi |
5740 | ||
bec39cab | 5741 | |
81ecdfbb | 5742 | test -n "$AWK" && break |
bec39cab AC |
5743 | done |
5744 | ||
c971b7fa PA |
5745 | # Find a good install program. We prefer a C program (faster), |
5746 | # so one script is as good as another. But avoid the broken or | |
5747 | # incompatible versions: | |
5748 | # SysV /etc/install, /usr/sbin/install | |
5749 | # SunOS /usr/etc/install | |
5750 | # IRIX /sbin/install | |
5751 | # AIX /bin/install | |
5752 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5753 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5754 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5755 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5756 | # OS/2's system install, which has a completely different semantic | |
5757 | # ./install, which can be erroneously created by make from ./install.sh. | |
5758 | # Reject install programs that cannot install multiple files. | |
5759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5760 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5761 | if test -z "$INSTALL"; then | |
5762 | if test "${ac_cv_path_install+set}" = set; then : | |
5763 | $as_echo_n "(cached) " >&6 | |
5764 | else | |
5765 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5766 | for as_dir in $PATH | |
5767 | do | |
5768 | IFS=$as_save_IFS | |
5769 | test -z "$as_dir" && as_dir=. | |
5770 | # Account for people who put trailing slashes in PATH elements. | |
5771 | case $as_dir/ in #(( | |
5772 | ./ | .// | /[cC]/* | \ | |
5773 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5774 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5775 | /usr/ucb/* ) ;; | |
5776 | *) | |
5777 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5778 | # Don't use installbsd from OSF since it installs stuff as root | |
5779 | # by default. | |
5780 | for ac_prog in ginstall scoinst install; do | |
5781 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5782 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5783 | if test $ac_prog = install && | |
5784 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5785 | # AIX install. It has an incompatible calling convention. | |
5786 | : | |
5787 | elif test $ac_prog = install && | |
5788 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5789 | # program-specific install script used by HP pwplus--don't use. | |
5790 | : | |
5791 | else | |
5792 | rm -rf conftest.one conftest.two conftest.dir | |
5793 | echo one > conftest.one | |
5794 | echo two > conftest.two | |
5795 | mkdir conftest.dir | |
5796 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5797 | test -s conftest.one && test -s conftest.two && | |
5798 | test -s conftest.dir/conftest.one && | |
5799 | test -s conftest.dir/conftest.two | |
5800 | then | |
5801 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5802 | break 3 | |
5803 | fi | |
5804 | fi | |
5805 | fi | |
5806 | done | |
5807 | done | |
5808 | ;; | |
5809 | esac | |
5810 | ||
5811 | done | |
5812 | IFS=$as_save_IFS | |
5813 | ||
5814 | rm -rf conftest.one conftest.two conftest.dir | |
5815 | ||
5816 | fi | |
5817 | if test "${ac_cv_path_install+set}" = set; then | |
5818 | INSTALL=$ac_cv_path_install | |
5819 | else | |
5820 | # As a last resort, use the slow shell script. Don't cache a | |
5821 | # value for INSTALL within a source directory, because that will | |
5822 | # break other packages using the cache if that directory is | |
5823 | # removed, or if the value is a relative name. | |
5824 | INSTALL=$ac_install_sh | |
5825 | fi | |
5826 | fi | |
5827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5828 | $as_echo "$INSTALL" >&6; } | |
5829 | ||
5830 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5831 | # It thinks the first close brace ends the variable substitution. | |
5832 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5833 | ||
5834 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5835 | ||
5836 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 5837 | |
81ecdfbb RW |
5838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
5839 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
5840 | LN_S=$as_ln_s |
5841 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
5842 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5843 | $as_echo "yes" >&6; } | |
bec39cab | 5844 | else |
81ecdfbb RW |
5845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
5846 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
5847 | fi |
5848 | ||
5849 | if test -n "$ac_tool_prefix"; then | |
5850 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5851 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
5852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5853 | $as_echo_n "checking for $ac_word... " >&6; } | |
5854 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
5855 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5856 | else |
5857 | if test -n "$RANLIB"; then | |
5858 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5859 | else | |
5860 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5861 | for as_dir in $PATH | |
5862 | do | |
5863 | IFS=$as_save_IFS | |
5864 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5865 | for ac_exec_ext in '' $ac_executable_extensions; do |
5866 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5867 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 5868 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5869 | break 2 |
5870 | fi | |
5871 | done | |
81ecdfbb RW |
5872 | done |
5873 | IFS=$as_save_IFS | |
bec39cab AC |
5874 | |
5875 | fi | |
5876 | fi | |
5877 | RANLIB=$ac_cv_prog_RANLIB | |
5878 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
5879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
5880 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 5881 | else |
81ecdfbb RW |
5882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5883 | $as_echo "no" >&6; } | |
bec39cab AC |
5884 | fi |
5885 | ||
81ecdfbb | 5886 | |
bec39cab AC |
5887 | fi |
5888 | if test -z "$ac_cv_prog_RANLIB"; then | |
5889 | ac_ct_RANLIB=$RANLIB | |
5890 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5891 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
5892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5893 | $as_echo_n "checking for $ac_word... " >&6; } | |
5894 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5895 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5896 | else |
5897 | if test -n "$ac_ct_RANLIB"; then | |
5898 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5899 | else | |
5900 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5901 | for as_dir in $PATH | |
5902 | do | |
5903 | IFS=$as_save_IFS | |
5904 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5905 | for ac_exec_ext in '' $ac_executable_extensions; do |
5906 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5907 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 5908 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5909 | break 2 |
5910 | fi | |
5911 | done | |
81ecdfbb RW |
5912 | done |
5913 | IFS=$as_save_IFS | |
bec39cab | 5914 | |
bec39cab AC |
5915 | fi |
5916 | fi | |
5917 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5918 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
5919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
5920 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 5921 | else |
81ecdfbb RW |
5922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5923 | $as_echo "no" >&6; } | |
bec39cab AC |
5924 | fi |
5925 | ||
81ecdfbb RW |
5926 | if test "x$ac_ct_RANLIB" = x; then |
5927 | RANLIB=":" | |
5928 | else | |
5929 | case $cross_compiling:$ac_tool_warned in | |
5930 | yes:) | |
5931 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5932 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5933 | ac_tool_warned=yes ;; | |
5934 | esac | |
5935 | RANLIB=$ac_ct_RANLIB | |
5936 | fi | |
bec39cab AC |
5937 | else |
5938 | RANLIB="$ac_cv_prog_RANLIB" | |
5939 | fi | |
5940 | ||
5941 | for ac_prog in 'bison -y' byacc | |
5942 | do | |
5943 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5944 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5946 | $as_echo_n "checking for $ac_word... " >&6; } | |
5947 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
5948 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5949 | else |
5950 | if test -n "$YACC"; then | |
5951 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
5952 | else | |
5953 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5954 | for as_dir in $PATH | |
5955 | do | |
5956 | IFS=$as_save_IFS | |
5957 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5958 | for ac_exec_ext in '' $ac_executable_extensions; do |
5959 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5960 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 5961 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5962 | break 2 |
5963 | fi | |
5964 | done | |
81ecdfbb RW |
5965 | done |
5966 | IFS=$as_save_IFS | |
bec39cab AC |
5967 | |
5968 | fi | |
5969 | fi | |
5970 | YACC=$ac_cv_prog_YACC | |
5971 | if test -n "$YACC"; then | |
81ecdfbb RW |
5972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
5973 | $as_echo "$YACC" >&6; } | |
bec39cab | 5974 | else |
81ecdfbb RW |
5975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5976 | $as_echo "no" >&6; } | |
bec39cab AC |
5977 | fi |
5978 | ||
81ecdfbb | 5979 | |
bec39cab AC |
5980 | test -n "$YACC" && break |
5981 | done | |
5982 | test -n "$YACC" || YACC="yacc" | |
5983 | ||
5984 | ||
5985 | if test -n "$ac_tool_prefix"; then | |
5986 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
5987 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
5988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5989 | $as_echo_n "checking for $ac_word... " >&6; } | |
5990 | if test "${ac_cv_prog_AR+set}" = set; then : | |
5991 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5992 | else |
5993 | if test -n "$AR"; then | |
5994 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5995 | else | |
5996 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5997 | for as_dir in $PATH | |
5998 | do | |
5999 | IFS=$as_save_IFS | |
6000 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6001 | for ac_exec_ext in '' $ac_executable_extensions; do |
6002 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6003 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 6004 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6005 | break 2 |
6006 | fi | |
6007 | done | |
81ecdfbb RW |
6008 | done |
6009 | IFS=$as_save_IFS | |
bec39cab AC |
6010 | |
6011 | fi | |
6012 | fi | |
6013 | AR=$ac_cv_prog_AR | |
6014 | if test -n "$AR"; then | |
81ecdfbb RW |
6015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
6016 | $as_echo "$AR" >&6; } | |
bec39cab | 6017 | else |
81ecdfbb RW |
6018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6019 | $as_echo "no" >&6; } | |
bec39cab AC |
6020 | fi |
6021 | ||
81ecdfbb | 6022 | |
bec39cab AC |
6023 | fi |
6024 | if test -z "$ac_cv_prog_AR"; then | |
6025 | ac_ct_AR=$AR | |
6026 | # Extract the first word of "ar", so it can be a program name with args. | |
6027 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
6028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6029 | $as_echo_n "checking for $ac_word... " >&6; } | |
6030 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
6031 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6032 | else |
6033 | if test -n "$ac_ct_AR"; then | |
6034 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
6035 | else | |
6036 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6037 | for as_dir in $PATH | |
6038 | do | |
6039 | IFS=$as_save_IFS | |
6040 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6041 | for ac_exec_ext in '' $ac_executable_extensions; do |
6042 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6043 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 6044 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6045 | break 2 |
6046 | fi | |
6047 | done | |
81ecdfbb RW |
6048 | done |
6049 | IFS=$as_save_IFS | |
bec39cab AC |
6050 | |
6051 | fi | |
6052 | fi | |
6053 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6054 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
6055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
6056 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 6057 | else |
81ecdfbb RW |
6058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6059 | $as_echo "no" >&6; } | |
bec39cab AC |
6060 | fi |
6061 | ||
81ecdfbb RW |
6062 | if test "x$ac_ct_AR" = x; then |
6063 | AR="" | |
6064 | else | |
6065 | case $cross_compiling:$ac_tool_warned in | |
6066 | yes:) | |
6067 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6068 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6069 | ac_tool_warned=yes ;; | |
6070 | esac | |
6071 | AR=$ac_ct_AR | |
6072 | fi | |
bec39cab AC |
6073 | else |
6074 | AR="$ac_cv_prog_AR" | |
6075 | fi | |
6076 | ||
6077 | if test -n "$ac_tool_prefix"; then | |
6078 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
6079 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
6080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6081 | $as_echo_n "checking for $ac_word... " >&6; } | |
6082 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
6083 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6084 | else |
6085 | if test -n "$DLLTOOL"; then | |
6086 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
6087 | else | |
6088 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6089 | for as_dir in $PATH | |
6090 | do | |
6091 | IFS=$as_save_IFS | |
6092 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6093 | for ac_exec_ext in '' $ac_executable_extensions; do |
6094 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6095 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 6096 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6097 | break 2 |
6098 | fi | |
6099 | done | |
81ecdfbb RW |
6100 | done |
6101 | IFS=$as_save_IFS | |
bec39cab AC |
6102 | |
6103 | fi | |
6104 | fi | |
6105 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
6106 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
6107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
6108 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 6109 | else |
81ecdfbb RW |
6110 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6111 | $as_echo "no" >&6; } | |
bec39cab AC |
6112 | fi |
6113 | ||
81ecdfbb | 6114 | |
bec39cab AC |
6115 | fi |
6116 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
6117 | ac_ct_DLLTOOL=$DLLTOOL | |
6118 | # Extract the first word of "dlltool", so it can be a program name with args. | |
6119 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
6120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6121 | $as_echo_n "checking for $ac_word... " >&6; } | |
6122 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
6123 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6124 | else |
6125 | if test -n "$ac_ct_DLLTOOL"; then | |
6126 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
6127 | else | |
6128 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6129 | for as_dir in $PATH | |
6130 | do | |
6131 | IFS=$as_save_IFS | |
6132 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6133 | for ac_exec_ext in '' $ac_executable_extensions; do |
6134 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6135 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 6136 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6137 | break 2 |
6138 | fi | |
6139 | done | |
81ecdfbb RW |
6140 | done |
6141 | IFS=$as_save_IFS | |
bec39cab AC |
6142 | |
6143 | fi | |
6144 | fi | |
6145 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
6146 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
6147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
6148 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 6149 | else |
81ecdfbb RW |
6150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6151 | $as_echo "no" >&6; } | |
bec39cab AC |
6152 | fi |
6153 | ||
81ecdfbb RW |
6154 | if test "x$ac_ct_DLLTOOL" = x; then |
6155 | DLLTOOL="" | |
6156 | else | |
6157 | case $cross_compiling:$ac_tool_warned in | |
6158 | yes:) | |
6159 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6160 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6161 | ac_tool_warned=yes ;; | |
6162 | esac | |
6163 | DLLTOOL=$ac_ct_DLLTOOL | |
6164 | fi | |
bec39cab AC |
6165 | else |
6166 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6167 | fi | |
6168 | ||
6169 | if test -n "$ac_tool_prefix"; then | |
6170 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6171 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6172 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6173 | $as_echo_n "checking for $ac_word... " >&6; } | |
6174 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6175 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6176 | else |
6177 | if test -n "$WINDRES"; then | |
6178 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6179 | else | |
6180 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6181 | for as_dir in $PATH | |
6182 | do | |
6183 | IFS=$as_save_IFS | |
6184 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6185 | for ac_exec_ext in '' $ac_executable_extensions; do |
6186 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6187 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6188 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6189 | break 2 |
6190 | fi | |
6191 | done | |
81ecdfbb RW |
6192 | done |
6193 | IFS=$as_save_IFS | |
bec39cab AC |
6194 | |
6195 | fi | |
6196 | fi | |
6197 | WINDRES=$ac_cv_prog_WINDRES | |
6198 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6200 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6201 | else |
81ecdfbb RW |
6202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6203 | $as_echo "no" >&6; } | |
bec39cab AC |
6204 | fi |
6205 | ||
81ecdfbb | 6206 | |
bec39cab AC |
6207 | fi |
6208 | if test -z "$ac_cv_prog_WINDRES"; then | |
6209 | ac_ct_WINDRES=$WINDRES | |
6210 | # Extract the first word of "windres", so it can be a program name with args. | |
6211 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6213 | $as_echo_n "checking for $ac_word... " >&6; } | |
6214 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6215 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6216 | else |
6217 | if test -n "$ac_ct_WINDRES"; then | |
6218 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6219 | else | |
6220 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6221 | for as_dir in $PATH | |
6222 | do | |
6223 | IFS=$as_save_IFS | |
6224 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6225 | for ac_exec_ext in '' $ac_executable_extensions; do |
6226 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6227 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6228 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6229 | break 2 |
6230 | fi | |
6231 | done | |
81ecdfbb RW |
6232 | done |
6233 | IFS=$as_save_IFS | |
bec39cab AC |
6234 | |
6235 | fi | |
6236 | fi | |
6237 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6238 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6240 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6241 | else |
81ecdfbb RW |
6242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6243 | $as_echo "no" >&6; } | |
c906108c | 6244 | fi |
bec39cab | 6245 | |
81ecdfbb RW |
6246 | if test "x$ac_ct_WINDRES" = x; then |
6247 | WINDRES="" | |
6248 | else | |
6249 | case $cross_compiling:$ac_tool_warned in | |
6250 | yes:) | |
6251 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6252 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6253 | ac_tool_warned=yes ;; | |
6254 | esac | |
6255 | WINDRES=$ac_ct_WINDRES | |
6256 | fi | |
c906108c | 6257 | else |
bec39cab | 6258 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6259 | fi |
6260 | ||
bec39cab | 6261 | |
036c3acb TS |
6262 | case $host_os in |
6263 | gnu*) | |
6264 | # Needed for GNU Hurd hosts. | |
6265 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
6266 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
6267 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6269 | $as_echo_n "checking for $ac_word... " >&6; } | |
6270 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6271 | $as_echo_n "(cached) " >&6 | |
c906108c | 6272 | else |
bec39cab AC |
6273 | if test -n "$MIG"; then |
6274 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6275 | else | |
6276 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6277 | for as_dir in $PATH | |
6278 | do | |
6279 | IFS=$as_save_IFS | |
6280 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6281 | for ac_exec_ext in '' $ac_executable_extensions; do |
6282 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6283 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6284 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6285 | break 2 |
6286 | fi | |
6287 | done | |
81ecdfbb RW |
6288 | done |
6289 | IFS=$as_save_IFS | |
bec39cab | 6290 | |
c906108c | 6291 | fi |
bec39cab AC |
6292 | fi |
6293 | MIG=$ac_cv_prog_MIG | |
6294 | if test -n "$MIG"; then | |
81ecdfbb RW |
6295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6296 | $as_echo "$MIG" >&6; } | |
c906108c | 6297 | else |
81ecdfbb RW |
6298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6299 | $as_echo "no" >&6; } | |
c906108c SS |
6300 | fi |
6301 | ||
81ecdfbb | 6302 | |
bec39cab AC |
6303 | fi |
6304 | if test -z "$ac_cv_prog_MIG"; then | |
6305 | ac_ct_MIG=$MIG | |
6306 | # Extract the first word of "mig", so it can be a program name with args. | |
6307 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6309 | $as_echo_n "checking for $ac_word... " >&6; } | |
6310 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6311 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6312 | else |
6313 | if test -n "$ac_ct_MIG"; then | |
6314 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6315 | else | |
6316 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6317 | for as_dir in $PATH | |
6318 | do | |
6319 | IFS=$as_save_IFS | |
6320 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6321 | for ac_exec_ext in '' $ac_executable_extensions; do |
6322 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6323 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6324 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6325 | break 2 |
6326 | fi | |
6327 | done | |
81ecdfbb RW |
6328 | done |
6329 | IFS=$as_save_IFS | |
c906108c | 6330 | |
bec39cab AC |
6331 | fi |
6332 | fi | |
6333 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6334 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6336 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6337 | else |
81ecdfbb RW |
6338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6339 | $as_echo "no" >&6; } | |
bec39cab | 6340 | fi |
c906108c | 6341 | |
81ecdfbb RW |
6342 | if test "x$ac_ct_MIG" = x; then |
6343 | MIG="" | |
6344 | else | |
6345 | case $cross_compiling:$ac_tool_warned in | |
6346 | yes:) | |
6347 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6348 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6349 | ac_tool_warned=yes ;; | |
6350 | esac | |
6351 | MIG=$ac_ct_MIG | |
6352 | fi | |
bec39cab AC |
6353 | else |
6354 | MIG="$ac_cv_prog_MIG" | |
6355 | fi | |
c906108c | 6356 | |
036c3acb TS |
6357 | if test x"$MIG" = x; then |
6358 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
6359 | fi | |
6360 | ;; | |
6361 | esac | |
c906108c | 6362 | |
bec39cab AC |
6363 | # ---------------------- # |
6364 | # Checks for libraries. # | |
6365 | # ---------------------- # | |
c906108c | 6366 | |
bec39cab | 6367 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6369 | $as_echo_n "checking for main in -lm... " >&6; } | |
6370 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6371 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6372 | else |
6373 | ac_check_lib_save_LIBS=$LIBS | |
6374 | LIBS="-lm $LIBS" | |
81ecdfbb | 6375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6376 | /* end confdefs.h. */ |
c906108c | 6377 | |
c906108c | 6378 | |
bec39cab AC |
6379 | int |
6380 | main () | |
6381 | { | |
81ecdfbb | 6382 | return main (); |
bec39cab AC |
6383 | ; |
6384 | return 0; | |
6385 | } | |
6386 | _ACEOF | |
81ecdfbb | 6387 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6388 | ac_cv_lib_m_main=yes |
6389 | else | |
81ecdfbb | 6390 | ac_cv_lib_m_main=no |
bec39cab | 6391 | fi |
81ecdfbb RW |
6392 | rm -f core conftest.err conftest.$ac_objext \ |
6393 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6394 | LIBS=$ac_check_lib_save_LIBS |
6395 | fi | |
81ecdfbb RW |
6396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6397 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6398 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6399 | cat >>confdefs.h <<_ACEOF |
6400 | #define HAVE_LIBM 1 | |
6401 | _ACEOF | |
6402 | ||
6403 | LIBS="-lm $LIBS" | |
c906108c | 6404 | |
c906108c | 6405 | fi |
bec39cab AC |
6406 | |
6407 | ||
6408 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6409 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6410 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6411 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6412 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6413 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6414 | |
c906108c | 6415 | else |
81ecdfbb RW |
6416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6417 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6418 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6419 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6420 | else |
6421 | ac_check_lib_save_LIBS=$LIBS | |
6422 | LIBS="-lw $LIBS" | |
81ecdfbb | 6423 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6424 | /* end confdefs.h. */ |
c906108c | 6425 | |
81ecdfbb RW |
6426 | /* Override any GCC internal prototype to avoid an error. |
6427 | Use char because int might match the return type of a GCC | |
6428 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6429 | #ifdef __cplusplus |
6430 | extern "C" | |
6431 | #endif | |
bec39cab AC |
6432 | char wctype (); |
6433 | int | |
6434 | main () | |
6435 | { | |
81ecdfbb | 6436 | return wctype (); |
bec39cab AC |
6437 | ; |
6438 | return 0; | |
6439 | } | |
6440 | _ACEOF | |
81ecdfbb | 6441 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6442 | ac_cv_lib_w_wctype=yes |
6443 | else | |
81ecdfbb | 6444 | ac_cv_lib_w_wctype=no |
bec39cab | 6445 | fi |
81ecdfbb RW |
6446 | rm -f core conftest.err conftest.$ac_objext \ |
6447 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6448 | LIBS=$ac_check_lib_save_LIBS |
6449 | fi | |
81ecdfbb RW |
6450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6451 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6452 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6453 | cat >>confdefs.h <<_ACEOF |
6454 | #define HAVE_LIBW 1 | |
6455 | _ACEOF | |
c906108c | 6456 | |
bec39cab | 6457 | LIBS="-lw $LIBS" |
c906108c | 6458 | |
bec39cab | 6459 | fi |
c906108c | 6460 | |
bec39cab | 6461 | fi |
c906108c | 6462 | |
ddc9cd0f | 6463 | |
bec39cab | 6464 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6465 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6466 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6467 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6468 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6469 | else |
6470 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6472 | /* end confdefs.h. */ |
ddc9cd0f | 6473 | |
81ecdfbb RW |
6474 | /* Override any GCC internal prototype to avoid an error. |
6475 | Use char because int might match the return type of a GCC | |
6476 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6477 | #ifdef __cplusplus |
6478 | extern "C" | |
6479 | #endif | |
bec39cab AC |
6480 | char gethostbyname (); |
6481 | int | |
6482 | main () | |
6483 | { | |
81ecdfbb | 6484 | return gethostbyname (); |
bec39cab AC |
6485 | ; |
6486 | return 0; | |
6487 | } | |
6488 | _ACEOF | |
81ecdfbb RW |
6489 | for ac_lib in '' nsl; do |
6490 | if test -z "$ac_lib"; then | |
6491 | ac_res="none required" | |
6492 | else | |
6493 | ac_res=-l$ac_lib | |
b4e70030 | 6494 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6495 | fi |
6496 | if ac_fn_c_try_link "$LINENO"; then : | |
6497 | ac_cv_search_gethostbyname=$ac_res | |
6498 | fi | |
6499 | rm -f core conftest.err conftest.$ac_objext \ | |
6500 | conftest$ac_exeext | |
6501 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6502 | break | |
6503 | fi | |
6504 | done | |
6505 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6506 | |
bec39cab | 6507 | else |
81ecdfbb | 6508 | ac_cv_search_gethostbyname=no |
bec39cab | 6509 | fi |
81ecdfbb | 6510 | rm conftest.$ac_ext |
bec39cab AC |
6511 | LIBS=$ac_func_search_save_LIBS |
6512 | fi | |
81ecdfbb RW |
6513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6514 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6515 | ac_res=$ac_cv_search_gethostbyname | |
6516 | if test "$ac_res" != no; then : | |
6517 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6518 | |
bec39cab | 6519 | fi |
96baa820 | 6520 | |
c906108c | 6521 | |
b4e70030 | 6522 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6524 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6525 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6526 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6527 | else |
6528 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6530 | /* end confdefs.h. */ |
6531 | ||
81ecdfbb RW |
6532 | /* Override any GCC internal prototype to avoid an error. |
6533 | Use char because int might match the return type of a GCC | |
6534 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6535 | #ifdef __cplusplus |
6536 | extern "C" | |
6537 | #endif | |
b4e70030 JB |
6538 | char socketpair (); |
6539 | int | |
6540 | main () | |
6541 | { | |
81ecdfbb | 6542 | return socketpair (); |
b4e70030 JB |
6543 | ; |
6544 | return 0; | |
6545 | } | |
6546 | _ACEOF | |
81ecdfbb RW |
6547 | for ac_lib in '' socket; do |
6548 | if test -z "$ac_lib"; then | |
6549 | ac_res="none required" | |
6550 | else | |
6551 | ac_res=-l$ac_lib | |
b4e70030 | 6552 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6553 | fi |
6554 | if ac_fn_c_try_link "$LINENO"; then : | |
6555 | ac_cv_search_socketpair=$ac_res | |
6556 | fi | |
6557 | rm -f core conftest.err conftest.$ac_objext \ | |
6558 | conftest$ac_exeext | |
6559 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6560 | break | |
6561 | fi | |
6562 | done | |
6563 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 6564 | |
b4e70030 | 6565 | else |
81ecdfbb | 6566 | ac_cv_search_socketpair=no |
b4e70030 | 6567 | fi |
81ecdfbb | 6568 | rm conftest.$ac_ext |
b4e70030 JB |
6569 | LIBS=$ac_func_search_save_LIBS |
6570 | fi | |
81ecdfbb RW |
6571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
6572 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
6573 | ac_res=$ac_cv_search_socketpair | |
6574 | if test "$ac_res" != no; then : | |
6575 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
6576 | |
6577 | fi | |
6578 | ||
6579 | ||
233a11ab | 6580 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
6581 | |
6582 | # See if the user specified whether he wants zlib support or not. | |
6583 | ||
6584 | # Check whether --with-zlib was given. | |
6585 | if test "${with_zlib+set}" = set; then : | |
6586 | withval=$with_zlib; | |
6587 | else | |
6588 | with_zlib=auto | |
6589 | fi | |
6590 | ||
6591 | ||
6592 | if test "$with_zlib" != "no"; then | |
6593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
6594 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
6595 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6596 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
6597 | else |
6598 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6599 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
6600 | /* end confdefs.h. */ |
6601 | ||
81ecdfbb RW |
6602 | /* Override any GCC internal prototype to avoid an error. |
6603 | Use char because int might match the return type of a GCC | |
233a11ab | 6604 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
6605 | #ifdef __cplusplus |
6606 | extern "C" | |
6607 | #endif | |
233a11ab CS |
6608 | char zlibVersion (); |
6609 | int | |
6610 | main () | |
6611 | { | |
81ecdfbb | 6612 | return zlibVersion (); |
233a11ab CS |
6613 | ; |
6614 | return 0; | |
6615 | } | |
6616 | _ACEOF | |
81ecdfbb RW |
6617 | for ac_lib in '' z; do |
6618 | if test -z "$ac_lib"; then | |
6619 | ac_res="none required" | |
233a11ab | 6620 | else |
81ecdfbb RW |
6621 | ac_res=-l$ac_lib |
6622 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 6623 | fi |
81ecdfbb RW |
6624 | if ac_fn_c_try_link "$LINENO"; then : |
6625 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 6626 | fi |
81ecdfbb RW |
6627 | rm -f core conftest.err conftest.$ac_objext \ |
6628 | conftest$ac_exeext | |
6629 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6630 | break | |
233a11ab | 6631 | fi |
81ecdfbb RW |
6632 | done |
6633 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 6634 | |
233a11ab | 6635 | else |
81ecdfbb | 6636 | ac_cv_search_zlibVersion=no |
233a11ab | 6637 | fi |
81ecdfbb RW |
6638 | rm conftest.$ac_ext |
6639 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 6640 | fi |
81ecdfbb RW |
6641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
6642 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
6643 | ac_res=$ac_cv_search_zlibVersion | |
6644 | if test "$ac_res" != no; then : | |
6645 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6646 | for ac_header in zlib.h | |
6647 | do : | |
6648 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
6649 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 6650 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6651 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
6652 | _ACEOF |
6653 | ||
6654 | fi | |
6655 | ||
6656 | done | |
6657 | ||
6658 | fi | |
6659 | ||
b040ad30 JB |
6660 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
6661 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
6662 | fi | |
6663 | fi | |
6664 | ||
233a11ab | 6665 | |
77f120bf | 6666 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
6667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
6668 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
6669 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6670 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6671 | else |
6672 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6673 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6674 | /* end confdefs.h. */ |
c906108c | 6675 | |
81ecdfbb RW |
6676 | /* Override any GCC internal prototype to avoid an error. |
6677 | Use char because int might match the return type of a GCC | |
6678 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6679 | #ifdef __cplusplus |
6680 | extern "C" | |
6681 | #endif | |
77f120bf | 6682 | char dlgetmodinfo (); |
bec39cab AC |
6683 | int |
6684 | main () | |
6685 | { | |
81ecdfbb | 6686 | return dlgetmodinfo (); |
bec39cab AC |
6687 | ; |
6688 | return 0; | |
6689 | } | |
6690 | _ACEOF | |
81ecdfbb RW |
6691 | for ac_lib in '' dl xpdl; do |
6692 | if test -z "$ac_lib"; then | |
6693 | ac_res="none required" | |
6694 | else | |
6695 | ac_res=-l$ac_lib | |
b4e70030 | 6696 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6697 | fi |
6698 | if ac_fn_c_try_link "$LINENO"; then : | |
6699 | ac_cv_search_dlgetmodinfo=$ac_res | |
6700 | fi | |
6701 | rm -f core conftest.err conftest.$ac_objext \ | |
6702 | conftest$ac_exeext | |
6703 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6704 | break | |
6705 | fi | |
6706 | done | |
6707 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 6708 | |
4e8d927d | 6709 | else |
81ecdfbb | 6710 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 6711 | fi |
81ecdfbb | 6712 | rm conftest.$ac_ext |
bec39cab AC |
6713 | LIBS=$ac_func_search_save_LIBS |
6714 | fi | |
81ecdfbb RW |
6715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
6716 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
6717 | ac_res=$ac_cv_search_dlgetmodinfo | |
6718 | if test "$ac_res" != no; then : | |
6719 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 6720 | |
8bb2c122 | 6721 | fi |
8bb2c122 | 6722 | |
8bb2c122 | 6723 | |
77f120bf | 6724 | |
77f120bf | 6725 | |
6c7a06a3 | 6726 | |
81ecdfbb RW |
6727 | # Check whether --with-libiconv-prefix was given. |
6728 | if test "${with_libiconv_prefix+set}" = set; then : | |
6729 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 6730 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
6731 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
6732 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
6733 | done |
6734 | ||
81ecdfbb RW |
6735 | fi |
6736 | ||
6c7a06a3 | 6737 | |
f18c4681 | 6738 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
6739 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
6740 | ||
81ecdfbb RW |
6741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
6742 | $as_echo_n "checking for iconv... " >&6; } | |
6743 | if test "${am_cv_func_iconv+set}" = set; then : | |
6744 | $as_echo_n "(cached) " >&6 | |
d542061a | 6745 | else |
6c7a06a3 TT |
6746 | |
6747 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
6748 | am_cv_lib_iconv=no | |
6749 | am_cv_use_build_libiconv=no | |
f0f20949 | 6750 | am_cv_build_libiconv_path= |
4edb1e84 JB |
6751 | |
6752 | # If libiconv is part of the build tree, then try using it over | |
6753 | # any system iconv. | |
6754 | if test -d ../libiconv; then | |
f18c4681 JB |
6755 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
6756 | am_save_LIBS="$LIBS" | |
6757 | am_save_CPPFLAGS="$CPPFLAGS" | |
6758 | LIBS="$LIBS $lib_dir/libiconv.a" | |
6759 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
6760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 6761 | /* end confdefs.h. */ |
6c7a06a3 TT |
6762 | #include <stdlib.h> |
6763 | #include <iconv.h> | |
d542061a UW |
6764 | int |
6765 | main () | |
6766 | { | |
6c7a06a3 | 6767 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
6768 | iconv(cd,NULL,NULL,NULL,NULL); |
6769 | iconv_close(cd); | |
d542061a UW |
6770 | ; |
6771 | return 0; | |
6772 | } | |
6773 | _ACEOF | |
81ecdfbb | 6774 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6775 | am_cv_use_build_libiconv=yes |
f0f20949 | 6776 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
6777 | am_cv_lib_iconv=yes |
6778 | am_cv_func_iconv=yes | |
d542061a | 6779 | fi |
81ecdfbb RW |
6780 | rm -f core conftest.err conftest.$ac_objext \ |
6781 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
6782 | LIBS="$am_save_LIBS" |
6783 | CPPFLAGS="$am_save_CPPFLAGS" | |
6784 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
6785 | break |
6786 | fi | |
6787 | done | |
4edb1e84 | 6788 | fi |
94ae1714 | 6789 | |
4edb1e84 | 6790 | # Next, try to find iconv in libc. |
6c7a06a3 | 6791 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 6792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 6793 | /* end confdefs.h. */ |
6c7a06a3 TT |
6794 | #include <stdlib.h> |
6795 | #include <iconv.h> | |
d542061a UW |
6796 | int |
6797 | main () | |
6798 | { | |
6c7a06a3 TT |
6799 | iconv_t cd = iconv_open("",""); |
6800 | iconv(cd,NULL,NULL,NULL,NULL); | |
6801 | iconv_close(cd); | |
d542061a UW |
6802 | ; |
6803 | return 0; | |
6804 | } | |
6805 | _ACEOF | |
81ecdfbb | 6806 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6807 | am_cv_func_iconv=yes |
d542061a | 6808 | fi |
81ecdfbb RW |
6809 | rm -f core conftest.err conftest.$ac_objext \ |
6810 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 6811 | fi |
94ae1714 | 6812 | |
4edb1e84 JB |
6813 | # If iconv was not in libc, try -liconv. In this case, arrange to |
6814 | # look in the libiconv prefix, if it was specified by the user. | |
6815 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 6816 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
6817 | am_save_LIBS="$LIBS" |
6818 | if test -n "$LIBICONV_INCLUDE"; then | |
6819 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6820 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
6821 | fi | |
6822 | LIBS="$LIBS -liconv" | |
81ecdfbb | 6823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6824 | /* end confdefs.h. */ |
6c7a06a3 TT |
6825 | #include <stdlib.h> |
6826 | #include <iconv.h> | |
bec39cab AC |
6827 | int |
6828 | main () | |
6829 | { | |
6c7a06a3 TT |
6830 | iconv_t cd = iconv_open("",""); |
6831 | iconv(cd,NULL,NULL,NULL,NULL); | |
6832 | iconv_close(cd); | |
bec39cab AC |
6833 | ; |
6834 | return 0; | |
6835 | } | |
6836 | _ACEOF | |
81ecdfbb | 6837 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6838 | am_cv_lib_iconv=yes |
6c7a06a3 | 6839 | am_cv_func_iconv=yes |
627af7ea | 6840 | fi |
81ecdfbb RW |
6841 | rm -f core conftest.err conftest.$ac_objext \ |
6842 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 6843 | LIBS="$am_save_LIBS" |
fc3b640d | 6844 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
6845 | fi |
6846 | ||
6847 | fi | |
81ecdfbb RW |
6848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
6849 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
6850 | |
6851 | # Set the various flags based on the cache variables. We can't rely | |
6852 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
6853 | LIBICONV= |
6854 | if test "$am_cv_lib_iconv" = yes; then | |
6855 | LIBICONV="-liconv" | |
94ae1714 TT |
6856 | else |
6857 | LIBICONV_LIBDIR= | |
6858 | LIBICONV_INCLUDE= | |
fc3b640d TT |
6859 | fi |
6860 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 6861 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 6862 | LIBICONV_LIBDIR="" |
fc3b640d TT |
6863 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
6864 | fi | |
6865 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6866 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 6867 | |
6c7a06a3 TT |
6868 | if test "$am_cv_func_iconv" = yes; then |
6869 | ||
81ecdfbb | 6870 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 6871 | |
81ecdfbb RW |
6872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
6873 | $as_echo_n "checking for iconv declaration... " >&6; } | |
6874 | if test "${am_cv_proto_iconv+set}" = set; then : | |
6875 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6876 | else |
6877 | ||
81ecdfbb | 6878 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6879 | /* end confdefs.h. */ |
6880 | ||
6c7a06a3 TT |
6881 | #include <stdlib.h> |
6882 | #include <iconv.h> | |
6883 | extern | |
b4e70030 | 6884 | #ifdef __cplusplus |
6c7a06a3 | 6885 | "C" |
b4e70030 | 6886 | #endif |
6c7a06a3 TT |
6887 | #if defined(__STDC__) || defined(__cplusplus) |
6888 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6889 | #else | |
6890 | size_t iconv(); | |
6891 | #endif | |
6892 | ||
b4e70030 JB |
6893 | int |
6894 | main () | |
6895 | { | |
6c7a06a3 | 6896 | |
b4e70030 JB |
6897 | ; |
6898 | return 0; | |
6899 | } | |
6900 | _ACEOF | |
81ecdfbb | 6901 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 6902 | am_cv_proto_iconv_arg1="" |
4e8d927d | 6903 | else |
81ecdfbb | 6904 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 6905 | fi |
81ecdfbb | 6906 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
6907 | 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);" |
6908 | fi | |
6909 | ||
6910 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 6911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 6912 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
6913 | $as_echo "${ac_t:- |
6914 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
6915 | |
6916 | cat >>confdefs.h <<_ACEOF | |
6917 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
6918 | _ACEOF | |
6919 | ||
6920 | fi | |
6c7a06a3 TT |
6921 | |
6922 | ||
478aac75 DE |
6923 | # GDB may fork/exec the iconv program to get the list of supported character |
6924 | # sets. Allow the user to specify where to find it. | |
6925 | # There are several factors affecting the choice of option name: | |
6926 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
6927 | # the build-time location of libiconv files. | |
6928 | # - The program we need to find is iconv, which comes with glibc. The user | |
6929 | # doesn't necessarily have libiconv installed. Therefore naming this | |
6930 | # --with-libiconv-foo feels wrong. | |
6931 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
6932 | # defined to work on directories not files (though it really doesn't know | |
6933 | # the difference). | |
6934 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
6935 | # with --with-libiconv-prefix. | |
6936 | # Putting these together is why the option name is --with-iconv-bin. | |
6937 | ||
6938 | ||
6939 | # Check whether --with-iconv-bin was given. | |
6940 | if test "${with_iconv_bin+set}" = set; then : | |
6941 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
6942 | ||
6943 | cat >>confdefs.h <<_ACEOF | |
6944 | #define ICONV_BIN "${iconv_bin}" | |
6945 | _ACEOF | |
6946 | ||
6947 | ||
6948 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
6949 | if test "x$prefix" = xNONE; then | |
6950 | test_prefix=/usr/local | |
6951 | else | |
6952 | test_prefix=$prefix | |
6953 | fi | |
6954 | else | |
6955 | test_prefix=$exec_prefix | |
6956 | fi | |
6957 | value=0 | |
6958 | case ${iconv_bin} in | |
6959 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6960 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6961 | value=1 | |
6962 | ;; | |
6963 | esac | |
6964 | ||
6965 | cat >>confdefs.h <<_ACEOF | |
6966 | #define ICONV_BIN_RELOCATABLE $value | |
6967 | _ACEOF | |
6968 | ||
6969 | ||
6970 | ||
6971 | fi | |
6972 | ||
6973 | ||
6c7a06a3 TT |
6974 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
6975 | # There is a very specific comment in /usr/include/curses.h explaining that | |
6976 | # termcap routines built into libcurses must not be used. | |
6977 | # | |
6978 | # The symptoms we observed so far is GDB unexpectedly changing | |
6979 | # the terminal settings when tgetent is called - this is particularly | |
6980 | # visible as the output is missing carriage returns, and so rapidly | |
6981 | # becomes very hard to read. | |
6982 | # | |
6983 | # The readline configure script has already decided that libtermcap | |
6984 | # was enough for its purposes, and so decided to build readline using | |
6985 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
6986 | # TUI enabled results in both libraries to be used at the same time, | |
6987 | # which is not allowed. This basically means that GDB with TUI is | |
6988 | # broken on alpha-osf. | |
6989 | ||
6990 | case $host_os in | |
6bcc772d RO |
6991 | osf* ) |
6992 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6993 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 6994 | fi |
6bcc772d | 6995 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
6996 | enable_tui=no |
6997 | fi | |
6998 | ;; | |
6999 | esac | |
7000 | ||
cb01cfba | 7001 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 7002 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
7003 | prefer_curses=yes |
7004 | fi | |
7005 | ||
7006 | curses_found=no | |
7007 | if test x"$prefer_curses" = xyes; then | |
7008 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
7009 | # curses library because the latter might not provide all the | |
7010 | # functionality we need. However, this leads to problems on systems | |
7011 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
7012 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
7013 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
7014 | # a situation. | |
81ecdfbb RW |
7015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
7016 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
7017 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7018 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7019 | else |
7020 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
7022 | /* end confdefs.h. */ |
7023 | ||
81ecdfbb RW |
7024 | /* Override any GCC internal prototype to avoid an error. |
7025 | Use char because int might match the return type of a GCC | |
7026 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7027 | #ifdef __cplusplus |
7028 | extern "C" | |
7029 | #endif | |
6c7a06a3 TT |
7030 | char waddstr (); |
7031 | int | |
7032 | main () | |
7033 | { | |
81ecdfbb | 7034 | return waddstr (); |
6c7a06a3 TT |
7035 | ; |
7036 | return 0; | |
7037 | } | |
7038 | _ACEOF | |
81ecdfbb RW |
7039 | for ac_lib in '' ncurses cursesX curses; do |
7040 | if test -z "$ac_lib"; then | |
7041 | ac_res="none required" | |
7042 | else | |
7043 | ac_res=-l$ac_lib | |
7044 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7045 | fi | |
7046 | if ac_fn_c_try_link "$LINENO"; then : | |
7047 | ac_cv_search_waddstr=$ac_res | |
7048 | fi | |
7049 | rm -f core conftest.err conftest.$ac_objext \ | |
7050 | conftest$ac_exeext | |
7051 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7052 | break | |
7053 | fi | |
7054 | done | |
7055 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7056 | ||
6c7a06a3 | 7057 | else |
81ecdfbb RW |
7058 | ac_cv_search_waddstr=no |
7059 | fi | |
7060 | rm conftest.$ac_ext | |
7061 | LIBS=$ac_func_search_save_LIBS | |
7062 | fi | |
7063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
7064 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
7065 | ac_res=$ac_cv_search_waddstr | |
7066 | if test "$ac_res" != no; then : | |
7067 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
7068 | |
7069 | fi | |
7070 | ||
7071 | ||
cb01cfba JB |
7072 | if test "$ac_cv_search_waddstr" != no; then |
7073 | curses_found=yes | |
7074 | fi | |
7075 | fi | |
7076 | ||
7077 | # Check whether we should enable the TUI, but only do so if we really | |
7078 | # can. | |
7079 | if test x"$enable_tui" != xno; then | |
7080 | if test -d $srcdir/tui; then | |
7081 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
7082 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
7083 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
7084 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
7085 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
7086 | else |
7087 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 7088 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 7089 | else |
81ecdfbb RW |
7090 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
7091 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
7092 | fi |
7093 | fi | |
7094 | fi | |
7095 | fi | |
7096 | ||
7097 | # Since GDB uses Readline, we need termcap functionality. In many | |
7098 | # cases this will be provided by the curses library, but some systems | |
7099 | # have a seperate termcap library, or no curses library at all. | |
7100 | ||
7101 | case $host_os in | |
7102 | cygwin*) | |
7103 | if test -d $srcdir/libtermcap; then | |
7104 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
7105 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
7106 | fi ;; | |
7107 | go32* | *djgpp*) | |
7108 | ac_cv_search_tgetent="none required" | |
7109 | ;; | |
7110 | *mingw32*) | |
7111 | ac_cv_search_tgetent="none required" | |
7112 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
7113 | ;; | |
7114 | esac | |
7115 | ||
7116 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
7117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
7118 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
7119 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7120 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7121 | else |
7122 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7123 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
7124 | /* end confdefs.h. */ |
7125 | ||
81ecdfbb RW |
7126 | /* Override any GCC internal prototype to avoid an error. |
7127 | Use char because int might match the return type of a GCC | |
7128 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7129 | #ifdef __cplusplus |
7130 | extern "C" | |
7131 | #endif | |
6c7a06a3 TT |
7132 | char tgetent (); |
7133 | int | |
7134 | main () | |
7135 | { | |
81ecdfbb | 7136 | return tgetent (); |
6c7a06a3 TT |
7137 | ; |
7138 | return 0; | |
7139 | } | |
7140 | _ACEOF | |
81ecdfbb RW |
7141 | for ac_lib in '' termcap tinfo curses ncurses; do |
7142 | if test -z "$ac_lib"; then | |
7143 | ac_res="none required" | |
7144 | else | |
7145 | ac_res=-l$ac_lib | |
6c7a06a3 | 7146 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7147 | fi |
7148 | if ac_fn_c_try_link "$LINENO"; then : | |
7149 | ac_cv_search_tgetent=$ac_res | |
7150 | fi | |
7151 | rm -f core conftest.err conftest.$ac_objext \ | |
7152 | conftest$ac_exeext | |
7153 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7154 | break | |
7155 | fi | |
7156 | done | |
7157 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 7158 | |
6c7a06a3 | 7159 | else |
81ecdfbb | 7160 | ac_cv_search_tgetent=no |
6c7a06a3 | 7161 | fi |
81ecdfbb | 7162 | rm conftest.$ac_ext |
6c7a06a3 TT |
7163 | LIBS=$ac_func_search_save_LIBS |
7164 | fi | |
81ecdfbb RW |
7165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7166 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7167 | ac_res=$ac_cv_search_tgetent | |
7168 | if test "$ac_res" != no; then : | |
7169 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7170 | |
06825bd1 MK |
7171 | fi |
7172 | ||
06825bd1 | 7173 | |
bec39cab | 7174 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 7175 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
7176 | fi |
7177 | ||
3841debe | 7178 | |
81ecdfbb RW |
7179 | # Check whether --with-system-readline was given. |
7180 | if test "${with_system_readline+set}" = set; then : | |
7181 | withval=$with_system_readline; | |
7182 | fi | |
6a30b0a5 | 7183 | |
6a30b0a5 AS |
7184 | |
7185 | if test "$with_system_readline" = yes; then | |
7186 | READLINE=-lreadline | |
7187 | READLINE_DEPS= | |
7188 | READLINE_CFLAGS= | |
39037522 | 7189 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7190 | else |
7191 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7192 | READLINE_DEPS='$(READLINE)' | |
7193 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7194 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7195 | fi |
7196 | ||
7197 | ||
7198 | ||
7199 | ||
7200 | ||
f997c383 SD |
7201 | # Generate jit-reader.h |
7202 | ||
7203 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7204 | TARGET_PTR= | |
7205 | ||
7206 | # The cast to long int works around a bug in the HP C Compiler | |
7207 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7208 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7209 | # This bug is HP SR number 8606223364. | |
7210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7211 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7212 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7213 | $as_echo_n "(cached) " >&6 | |
7214 | else | |
7215 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7216 | ||
7217 | else | |
7218 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7219 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7220 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7221 | { as_fn_set_status 77 | |
7222 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7223 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7224 | else | |
7225 | ac_cv_sizeof_unsigned_long_long=0 | |
7226 | fi | |
7227 | fi | |
7228 | ||
7229 | fi | |
7230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7231 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7232 | ||
7233 | ||
7234 | ||
7235 | cat >>confdefs.h <<_ACEOF | |
7236 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7237 | _ACEOF | |
7238 | ||
7239 | ||
7240 | # The cast to long int works around a bug in the HP C Compiler | |
7241 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7242 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7243 | # This bug is HP SR number 8606223364. | |
7244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7245 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7246 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7247 | $as_echo_n "(cached) " >&6 | |
7248 | else | |
7249 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7250 | ||
7251 | else | |
7252 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7253 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7254 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7255 | { as_fn_set_status 77 | |
7256 | as_fn_error "cannot compute sizeof (unsigned long) | |
7257 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7258 | else | |
7259 | ac_cv_sizeof_unsigned_long=0 | |
7260 | fi | |
7261 | fi | |
7262 | ||
7263 | fi | |
7264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7265 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7266 | ||
7267 | ||
7268 | ||
7269 | cat >>confdefs.h <<_ACEOF | |
7270 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7271 | _ACEOF | |
7272 | ||
7273 | ||
7274 | # The cast to long int works around a bug in the HP C Compiler | |
7275 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7276 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7277 | # This bug is HP SR number 8606223364. | |
7278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7279 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7280 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7281 | $as_echo_n "(cached) " >&6 | |
7282 | else | |
7283 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7284 | ||
7285 | else | |
7286 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7287 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7288 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7289 | { as_fn_set_status 77 | |
7290 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7291 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7292 | else | |
7293 | ac_cv_sizeof_unsigned___int128=0 | |
7294 | fi | |
7295 | fi | |
7296 | ||
7297 | fi | |
7298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7299 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7300 | ||
7301 | ||
7302 | ||
7303 | cat >>confdefs.h <<_ACEOF | |
7304 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7305 | _ACEOF | |
7306 | ||
7307 | ||
7308 | ||
7309 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7310 | TARGET_PTR="unsigned long" | |
7311 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7312 | TARGET_PTR="unsigned long long" | |
7313 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7314 | TARGET_PTR="unsigned __int128" | |
7315 | else | |
7316 | TARGET_PTR="unsigned long" | |
7317 | fi | |
7318 | ||
7319 | ||
7320 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7321 | ||
7322 | ||
a2d08b9e SD |
7323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7324 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7325 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7326 | $as_echo_n "(cached) " >&6 | |
7327 | else | |
7328 | ac_func_search_save_LIBS=$LIBS | |
7329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7330 | /* end confdefs.h. */ | |
7331 | ||
7332 | /* Override any GCC internal prototype to avoid an error. | |
7333 | Use char because int might match the return type of a GCC | |
7334 | builtin and then its argument prototype would still apply. */ | |
7335 | #ifdef __cplusplus | |
7336 | extern "C" | |
7337 | #endif | |
7338 | char dlopen (); | |
7339 | int | |
7340 | main () | |
7341 | { | |
7342 | return dlopen (); | |
7343 | ; | |
7344 | return 0; | |
7345 | } | |
7346 | _ACEOF | |
7347 | for ac_lib in '' dl; do | |
7348 | if test -z "$ac_lib"; then | |
7349 | ac_res="none required" | |
7350 | else | |
7351 | ac_res=-l$ac_lib | |
7352 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7353 | fi | |
7354 | if ac_fn_c_try_link "$LINENO"; then : | |
7355 | ac_cv_search_dlopen=$ac_res | |
7356 | fi | |
7357 | rm -f core conftest.err conftest.$ac_objext \ | |
7358 | conftest$ac_exeext | |
7359 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7360 | break | |
7361 | fi | |
7362 | done | |
7363 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7364 | ||
7365 | else | |
7366 | ac_cv_search_dlopen=no | |
7367 | fi | |
7368 | rm conftest.$ac_ext | |
7369 | LIBS=$ac_func_search_save_LIBS | |
7370 | fi | |
7371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7372 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7373 | ac_res=$ac_cv_search_dlopen | |
7374 | if test "$ac_res" != no; then : | |
7375 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7376 | ||
7377 | fi | |
7378 | ||
7379 | ||
39037522 | 7380 | |
b8e0a31c SD |
7381 | |
7382 | # Check whether --with-jit-reader-dir was given. | |
7383 | if test "${with_jit_reader_dir+set}" = set; then : | |
7384 | withval=$with_jit_reader_dir; | |
7385 | JIT_READER_DIR=$withval | |
7386 | else | |
7387 | JIT_READER_DIR=${libdir}/gdb | |
7388 | fi | |
7389 | ||
7390 | ||
7391 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7392 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7393 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7394 | ac_define_dir=`eval echo $ac_define_dir` | |
7395 | ||
7396 | cat >>confdefs.h <<_ACEOF | |
7397 | #define JIT_READER_DIR "$ac_define_dir" | |
7398 | _ACEOF | |
7399 | ||
7400 | ||
7401 | ||
7402 | ||
7403 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7404 | if test "x$prefix" = xNONE; then | |
7405 | test_prefix=/usr/local | |
7406 | else | |
7407 | test_prefix=$prefix | |
7408 | fi | |
7409 | else | |
7410 | test_prefix=$exec_prefix | |
7411 | fi | |
7412 | value=0 | |
7413 | case ${ac_define_dir} in | |
7414 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7415 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7416 | value=1 | |
7417 | ;; | |
7418 | esac | |
7419 | ||
7420 | cat >>confdefs.h <<_ACEOF | |
7421 | #define JIT_READER_DIR_RELOCATABLE $value | |
7422 | _ACEOF | |
7423 | ||
7424 | ||
7425 | ||
7426 | ||
7427 | ||
81ecdfbb RW |
7428 | # Check whether --with-expat was given. |
7429 | if test "${with_expat+set}" = set; then : | |
7430 | withval=$with_expat; | |
5c39566f DJ |
7431 | else |
7432 | with_expat=auto | |
81ecdfbb RW |
7433 | fi |
7434 | ||
7435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7436 | $as_echo_n "checking whether to use expat... " >&6; } | |
7437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7438 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7439 | |
7440 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7441 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7442 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7443 | HAVE_LIBEXPAT=no |
7444 | else | |
7445 | ||
3841debe DJ |
7446 | if test "X$prefix" = "XNONE"; then |
7447 | acl_final_prefix="$ac_default_prefix" | |
7448 | else | |
7449 | acl_final_prefix="$prefix" | |
7450 | fi | |
7451 | if test "X$exec_prefix" = "XNONE"; then | |
7452 | acl_final_exec_prefix='${prefix}' | |
7453 | else | |
7454 | acl_final_exec_prefix="$exec_prefix" | |
7455 | fi | |
7456 | acl_save_prefix="$prefix" | |
7457 | prefix="$acl_final_prefix" | |
7458 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7459 | prefix="$acl_save_prefix" | |
7460 | ||
7461 | ||
81ecdfbb RW |
7462 | # Check whether --with-gnu-ld was given. |
7463 | if test "${with_gnu_ld+set}" = set; then : | |
7464 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7465 | else |
7466 | with_gnu_ld=no | |
81ecdfbb RW |
7467 | fi |
7468 | ||
3841debe DJ |
7469 | # Prepare PATH_SEPARATOR. |
7470 | # The user is always right. | |
7471 | if test "${PATH_SEPARATOR+set}" != set; then | |
7472 | echo "#! /bin/sh" >conf$$.sh | |
7473 | echo "exit 0" >>conf$$.sh | |
7474 | chmod +x conf$$.sh | |
7475 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7476 | PATH_SEPARATOR=';' | |
7477 | else | |
7478 | PATH_SEPARATOR=: | |
7479 | fi | |
7480 | rm -f conf$$.sh | |
7481 | fi | |
7482 | ac_prog=ld | |
7483 | if test "$GCC" = yes; then | |
7484 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7486 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7487 | case $host in |
7488 | *-*-mingw*) | |
7489 | # gcc leaves a trailing carriage return which upsets mingw | |
7490 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7491 | *) | |
7492 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7493 | esac | |
7494 | case $ac_prog in | |
7495 | # Accept absolute paths. | |
7496 | [\\/]* | [A-Za-z]:[\\/]*) | |
7497 | re_direlt='/[^/][^/]*/\.\./' | |
7498 | # Canonicalize the path of ld | |
7499 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7500 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7501 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7502 | done | |
7503 | test -z "$LD" && LD="$ac_prog" | |
7504 | ;; | |
7505 | "") | |
7506 | # If it fails, then pretend we aren't using GCC. | |
7507 | ac_prog=ld | |
7508 | ;; | |
7509 | *) | |
7510 | # If it is relative, then search for the first ld in PATH. | |
7511 | with_gnu_ld=unknown | |
7512 | ;; | |
7513 | esac | |
7514 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7516 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7517 | else |
81ecdfbb RW |
7518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7519 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7520 | fi |
81ecdfbb RW |
7521 | if test "${acl_cv_path_LD+set}" = set; then : |
7522 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7523 | else |
7524 | if test -z "$LD"; then | |
7525 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7526 | for ac_dir in $PATH; do | |
7527 | test -z "$ac_dir" && ac_dir=. | |
7528 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7529 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7530 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7531 | # but apparently some GNU ld's only accept -v. | |
7532 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7533 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7534 | test "$with_gnu_ld" != no && break | |
7535 | else | |
7536 | test "$with_gnu_ld" != yes && break | |
7537 | fi | |
7538 | fi | |
7539 | done | |
7540 | IFS="$ac_save_ifs" | |
7541 | else | |
7542 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7543 | fi | |
7544 | fi | |
7545 | ||
7546 | LD="$acl_cv_path_LD" | |
7547 | if test -n "$LD"; then | |
81ecdfbb RW |
7548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7549 | $as_echo "$LD" >&6; } | |
3841debe | 7550 | else |
81ecdfbb RW |
7551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7552 | $as_echo "no" >&6; } | |
3841debe | 7553 | fi |
81ecdfbb RW |
7554 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7556 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7557 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7558 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7559 | else |
7560 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7561 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7562 | acl_cv_prog_gnu_ld=yes | |
7563 | else | |
7564 | acl_cv_prog_gnu_ld=no | |
7565 | fi | |
7566 | fi | |
81ecdfbb RW |
7567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7568 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7569 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7570 | ||
7571 | ||
7572 | ||
81ecdfbb RW |
7573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7574 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7575 | if test "${acl_cv_rpath+set}" = set; then : | |
7576 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7577 | else |
7578 | ||
7579 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7580 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7581 | . ./conftest.sh | |
7582 | rm -f ./conftest.sh | |
7583 | acl_cv_rpath=done | |
7584 | ||
7585 | fi | |
81ecdfbb RW |
7586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7587 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7588 | wl="$acl_cv_wl" |
7589 | libext="$acl_cv_libext" | |
7590 | shlibext="$acl_cv_shlibext" | |
7591 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7592 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7593 | hardcode_direct="$acl_cv_hardcode_direct" | |
7594 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7595 | # Check whether --enable-rpath was given. |
7596 | if test "${enable_rpath+set}" = set; then : | |
7597 | enableval=$enable_rpath; : | |
3841debe DJ |
7598 | else |
7599 | enable_rpath=yes | |
81ecdfbb RW |
7600 | fi |
7601 | ||
3841debe DJ |
7602 | |
7603 | ||
7604 | ||
7605 | ||
7606 | ||
7607 | ||
7608 | ||
7609 | ||
7610 | ||
7611 | use_additional=yes | |
7612 | ||
7613 | acl_save_prefix="$prefix" | |
7614 | prefix="$acl_final_prefix" | |
7615 | acl_save_exec_prefix="$exec_prefix" | |
7616 | exec_prefix="$acl_final_exec_prefix" | |
7617 | ||
7618 | eval additional_includedir=\"$includedir\" | |
7619 | eval additional_libdir=\"$libdir\" | |
7620 | ||
7621 | exec_prefix="$acl_save_exec_prefix" | |
7622 | prefix="$acl_save_prefix" | |
7623 | ||
7624 | ||
81ecdfbb RW |
7625 | # Check whether --with-libexpat-prefix was given. |
7626 | if test "${with_libexpat_prefix+set}" = set; then : | |
7627 | withval=$with_libexpat_prefix; | |
3841debe DJ |
7628 | if test "X$withval" = "Xno"; then |
7629 | use_additional=no | |
7630 | else | |
7631 | if test "X$withval" = "X"; then | |
7632 | ||
7633 | acl_save_prefix="$prefix" | |
7634 | prefix="$acl_final_prefix" | |
7635 | acl_save_exec_prefix="$exec_prefix" | |
7636 | exec_prefix="$acl_final_exec_prefix" | |
7637 | ||
7638 | eval additional_includedir=\"$includedir\" | |
7639 | eval additional_libdir=\"$libdir\" | |
7640 | ||
7641 | exec_prefix="$acl_save_exec_prefix" | |
7642 | prefix="$acl_save_prefix" | |
7643 | ||
7644 | else | |
7645 | additional_includedir="$withval/include" | |
7646 | additional_libdir="$withval/lib" | |
7647 | fi | |
7648 | fi | |
7649 | ||
81ecdfbb RW |
7650 | fi |
7651 | ||
3841debe DJ |
7652 | LIBEXPAT= |
7653 | LTLIBEXPAT= | |
7654 | INCEXPAT= | |
7655 | rpathdirs= | |
7656 | ltrpathdirs= | |
7657 | names_already_handled= | |
7658 | names_next_round='expat ' | |
7659 | while test -n "$names_next_round"; do | |
7660 | names_this_round="$names_next_round" | |
7661 | names_next_round= | |
7662 | for name in $names_this_round; do | |
7663 | already_handled= | |
7664 | for n in $names_already_handled; do | |
7665 | if test "$n" = "$name"; then | |
7666 | already_handled=yes | |
7667 | break | |
7668 | fi | |
7669 | done | |
7670 | if test -z "$already_handled"; then | |
7671 | names_already_handled="$names_already_handled $name" | |
7672 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7673 | eval value=\"\$HAVE_LIB$uppername\" | |
7674 | if test -n "$value"; then | |
7675 | if test "$value" = yes; then | |
7676 | eval value=\"\$LIB$uppername\" | |
7677 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
7678 | eval value=\"\$LTLIB$uppername\" | |
7679 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
7680 | else | |
7681 | : | |
7682 | fi | |
7683 | else | |
7684 | found_dir= | |
7685 | found_la= | |
7686 | found_so= | |
7687 | found_a= | |
7688 | if test $use_additional = yes; then | |
7689 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7690 | found_dir="$additional_libdir" | |
7691 | found_so="$additional_libdir/lib$name.$shlibext" | |
7692 | if test -f "$additional_libdir/lib$name.la"; then | |
7693 | found_la="$additional_libdir/lib$name.la" | |
7694 | fi | |
7695 | else | |
7696 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7697 | found_dir="$additional_libdir" | |
7698 | found_a="$additional_libdir/lib$name.$libext" | |
7699 | if test -f "$additional_libdir/lib$name.la"; then | |
7700 | found_la="$additional_libdir/lib$name.la" | |
7701 | fi | |
7702 | fi | |
7703 | fi | |
7704 | fi | |
7705 | if test "X$found_dir" = "X"; then | |
7706 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7707 | ||
7708 | acl_save_prefix="$prefix" | |
7709 | prefix="$acl_final_prefix" | |
7710 | acl_save_exec_prefix="$exec_prefix" | |
7711 | exec_prefix="$acl_final_exec_prefix" | |
7712 | eval x=\"$x\" | |
7713 | exec_prefix="$acl_save_exec_prefix" | |
7714 | prefix="$acl_save_prefix" | |
7715 | ||
7716 | case "$x" in | |
7717 | -L*) | |
7718 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7719 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7720 | found_dir="$dir" | |
7721 | found_so="$dir/lib$name.$shlibext" | |
7722 | if test -f "$dir/lib$name.la"; then | |
7723 | found_la="$dir/lib$name.la" | |
7724 | fi | |
7725 | else | |
7726 | if test -f "$dir/lib$name.$libext"; then | |
7727 | found_dir="$dir" | |
7728 | found_a="$dir/lib$name.$libext" | |
7729 | if test -f "$dir/lib$name.la"; then | |
7730 | found_la="$dir/lib$name.la" | |
7731 | fi | |
7732 | fi | |
7733 | fi | |
7734 | ;; | |
7735 | esac | |
7736 | if test "X$found_dir" != "X"; then | |
7737 | break | |
7738 | fi | |
7739 | done | |
7740 | fi | |
7741 | if test "X$found_dir" != "X"; then | |
7742 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
7743 | if test "X$found_so" != "X"; then | |
7744 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7745 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7746 | else | |
7747 | haveit= | |
7748 | for x in $ltrpathdirs; do | |
7749 | if test "X$x" = "X$found_dir"; then | |
7750 | haveit=yes | |
7751 | break | |
7752 | fi | |
7753 | done | |
7754 | if test -z "$haveit"; then | |
7755 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7756 | fi | |
7757 | if test "$hardcode_direct" = yes; then | |
7758 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7759 | else | |
7760 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7761 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7762 | haveit= | |
7763 | for x in $rpathdirs; do | |
7764 | if test "X$x" = "X$found_dir"; then | |
7765 | haveit=yes | |
7766 | break | |
7767 | fi | |
7768 | done | |
7769 | if test -z "$haveit"; then | |
7770 | rpathdirs="$rpathdirs $found_dir" | |
7771 | fi | |
7772 | else | |
7773 | haveit= | |
7774 | for x in $LDFLAGS $LIBEXPAT; do | |
7775 | ||
7776 | acl_save_prefix="$prefix" | |
7777 | prefix="$acl_final_prefix" | |
7778 | acl_save_exec_prefix="$exec_prefix" | |
7779 | exec_prefix="$acl_final_exec_prefix" | |
7780 | eval x=\"$x\" | |
7781 | exec_prefix="$acl_save_exec_prefix" | |
7782 | prefix="$acl_save_prefix" | |
7783 | ||
7784 | if test "X$x" = "X-L$found_dir"; then | |
7785 | haveit=yes | |
7786 | break | |
7787 | fi | |
7788 | done | |
7789 | if test -z "$haveit"; then | |
7790 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
7791 | fi | |
7792 | if test "$hardcode_minus_L" != no; then | |
7793 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7794 | else | |
7795 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7796 | fi | |
7797 | fi | |
7798 | fi | |
7799 | fi | |
7800 | else | |
7801 | if test "X$found_a" != "X"; then | |
7802 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
7803 | else | |
7804 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
7805 | fi | |
7806 | fi | |
7807 | additional_includedir= | |
7808 | case "$found_dir" in | |
7809 | */lib | */lib/) | |
7810 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7811 | additional_includedir="$basedir/include" | |
7812 | ;; | |
7813 | esac | |
7814 | if test "X$additional_includedir" != "X"; then | |
7815 | if test "X$additional_includedir" != "X/usr/include"; then | |
7816 | haveit= | |
7817 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7818 | if test -n "$GCC"; then | |
7819 | case $host_os in | |
7820 | linux*) haveit=yes;; | |
7821 | esac | |
7822 | fi | |
7823 | fi | |
7824 | if test -z "$haveit"; then | |
7825 | for x in $CPPFLAGS $INCEXPAT; do | |
7826 | ||
7827 | acl_save_prefix="$prefix" | |
7828 | prefix="$acl_final_prefix" | |
7829 | acl_save_exec_prefix="$exec_prefix" | |
7830 | exec_prefix="$acl_final_exec_prefix" | |
7831 | eval x=\"$x\" | |
7832 | exec_prefix="$acl_save_exec_prefix" | |
7833 | prefix="$acl_save_prefix" | |
7834 | ||
7835 | if test "X$x" = "X-I$additional_includedir"; then | |
7836 | haveit=yes | |
7837 | break | |
7838 | fi | |
7839 | done | |
7840 | if test -z "$haveit"; then | |
7841 | if test -d "$additional_includedir"; then | |
7842 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
7843 | fi | |
7844 | fi | |
7845 | fi | |
7846 | fi | |
7847 | fi | |
7848 | if test -n "$found_la"; then | |
7849 | save_libdir="$libdir" | |
7850 | case "$found_la" in | |
7851 | */* | *\\*) . "$found_la" ;; | |
7852 | *) . "./$found_la" ;; | |
7853 | esac | |
7854 | libdir="$save_libdir" | |
7855 | for dep in $dependency_libs; do | |
7856 | case "$dep" in | |
7857 | -L*) | |
7858 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7859 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7860 | haveit= | |
7861 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7862 | if test -n "$GCC"; then | |
7863 | case $host_os in | |
7864 | linux*) haveit=yes;; | |
7865 | esac | |
7866 | fi | |
7867 | fi | |
7868 | if test -z "$haveit"; then | |
7869 | haveit= | |
7870 | for x in $LDFLAGS $LIBEXPAT; do | |
7871 | ||
7872 | acl_save_prefix="$prefix" | |
7873 | prefix="$acl_final_prefix" | |
7874 | acl_save_exec_prefix="$exec_prefix" | |
7875 | exec_prefix="$acl_final_exec_prefix" | |
7876 | eval x=\"$x\" | |
7877 | exec_prefix="$acl_save_exec_prefix" | |
7878 | prefix="$acl_save_prefix" | |
7879 | ||
7880 | if test "X$x" = "X-L$additional_libdir"; then | |
7881 | haveit=yes | |
7882 | break | |
7883 | fi | |
7884 | done | |
7885 | if test -z "$haveit"; then | |
7886 | if test -d "$additional_libdir"; then | |
7887 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
7888 | fi | |
7889 | fi | |
7890 | haveit= | |
7891 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7892 | ||
7893 | acl_save_prefix="$prefix" | |
7894 | prefix="$acl_final_prefix" | |
7895 | acl_save_exec_prefix="$exec_prefix" | |
7896 | exec_prefix="$acl_final_exec_prefix" | |
7897 | eval x=\"$x\" | |
7898 | exec_prefix="$acl_save_exec_prefix" | |
7899 | prefix="$acl_save_prefix" | |
7900 | ||
7901 | if test "X$x" = "X-L$additional_libdir"; then | |
7902 | haveit=yes | |
7903 | break | |
7904 | fi | |
7905 | done | |
7906 | if test -z "$haveit"; then | |
7907 | if test -d "$additional_libdir"; then | |
7908 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
7909 | fi | |
7910 | fi | |
7911 | fi | |
7912 | fi | |
7913 | ;; | |
7914 | -R*) | |
7915 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7916 | if test "$enable_rpath" != no; then | |
7917 | haveit= | |
7918 | for x in $rpathdirs; do | |
7919 | if test "X$x" = "X$dir"; then | |
7920 | haveit=yes | |
7921 | break | |
7922 | fi | |
7923 | done | |
7924 | if test -z "$haveit"; then | |
7925 | rpathdirs="$rpathdirs $dir" | |
7926 | fi | |
7927 | haveit= | |
7928 | for x in $ltrpathdirs; do | |
7929 | if test "X$x" = "X$dir"; then | |
7930 | haveit=yes | |
7931 | break | |
7932 | fi | |
7933 | done | |
7934 | if test -z "$haveit"; then | |
7935 | ltrpathdirs="$ltrpathdirs $dir" | |
7936 | fi | |
7937 | fi | |
7938 | ;; | |
7939 | -l*) | |
7940 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
7941 | ;; | |
7942 | *.la) | |
7943 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
7944 | ;; | |
7945 | *) | |
7946 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
7947 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
7948 | ;; | |
81ecdfbb RW |
7949 | esac |
7950 | done | |
7951 | fi | |
7952 | else | |
7953 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7954 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
7955 | fi | |
7956 | fi | |
7957 | fi | |
7958 | done | |
7959 | done | |
7960 | if test "X$rpathdirs" != "X"; then | |
7961 | if test -n "$hardcode_libdir_separator"; then | |
7962 | alldirs= | |
7963 | for found_dir in $rpathdirs; do | |
7964 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
7965 | done | |
7966 | acl_save_libdir="$libdir" | |
7967 | libdir="$alldirs" | |
7968 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7969 | libdir="$acl_save_libdir" | |
7970 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7971 | else | |
7972 | for found_dir in $rpathdirs; do | |
7973 | acl_save_libdir="$libdir" | |
7974 | libdir="$found_dir" | |
7975 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7976 | libdir="$acl_save_libdir" | |
7977 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7978 | done | |
7979 | fi | |
7980 | fi | |
7981 | if test "X$ltrpathdirs" != "X"; then | |
7982 | for found_dir in $ltrpathdirs; do | |
7983 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
7984 | done | |
7985 | fi | |
a9322a30 TT |
7986 | |
7987 | ||
81ecdfbb | 7988 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 7989 | |
81ecdfbb RW |
7990 | for element in $INCEXPAT; do |
7991 | haveit= | |
7992 | for x in $CPPFLAGS; do | |
a9322a30 | 7993 | |
81ecdfbb RW |
7994 | acl_save_prefix="$prefix" |
7995 | prefix="$acl_final_prefix" | |
7996 | acl_save_exec_prefix="$exec_prefix" | |
7997 | exec_prefix="$acl_final_exec_prefix" | |
7998 | eval x=\"$x\" | |
7999 | exec_prefix="$acl_save_exec_prefix" | |
8000 | prefix="$acl_save_prefix" | |
a8111142 | 8001 | |
81ecdfbb RW |
8002 | if test "X$x" = "X$element"; then |
8003 | haveit=yes | |
8004 | break | |
8005 | fi | |
8006 | done | |
8007 | if test -z "$haveit"; then | |
8008 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8009 | fi | |
8010 | done | |
a9322a30 TT |
8011 | |
8012 | ||
81ecdfbb RW |
8013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
8014 | $as_echo_n "checking for libexpat... " >&6; } | |
8015 | if test "${ac_cv_libexpat+set}" = set; then : | |
8016 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8017 | else |
bec39cab | 8018 | |
81ecdfbb RW |
8019 | ac_save_LIBS="$LIBS" |
8020 | LIBS="$LIBS $LIBEXPAT" | |
8021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8022 | /* end confdefs.h. */ |
81ecdfbb RW |
8023 | #include "expat.h" |
8024 | int | |
8025 | main () | |
8026 | { | |
8027 | XML_Parser p = XML_ParserCreate (0); | |
8028 | ; | |
8029 | return 0; | |
8030 | } | |
bec39cab | 8031 | _ACEOF |
81ecdfbb RW |
8032 | if ac_fn_c_try_link "$LINENO"; then : |
8033 | ac_cv_libexpat=yes | |
c906108c | 8034 | else |
81ecdfbb | 8035 | ac_cv_libexpat=no |
bec39cab | 8036 | fi |
81ecdfbb RW |
8037 | rm -f core conftest.err conftest.$ac_objext \ |
8038 | conftest$ac_exeext conftest.$ac_ext | |
8039 | LIBS="$ac_save_LIBS" | |
c906108c | 8040 | |
95ca63c4 | 8041 | fi |
81ecdfbb RW |
8042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
8043 | $as_echo "$ac_cv_libexpat" >&6; } | |
8044 | if test "$ac_cv_libexpat" = yes; then | |
8045 | HAVE_LIBEXPAT=yes | |
bec39cab | 8046 | |
81ecdfbb | 8047 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 8048 | |
81ecdfbb RW |
8049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
8050 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
8051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
8052 | $as_echo "$LIBEXPAT" >&6; } | |
8053 | else | |
8054 | HAVE_LIBEXPAT=no | |
8055 | CPPFLAGS="$ac_save_CPPFLAGS" | |
8056 | LIBEXPAT= | |
8057 | LTLIBEXPAT= | |
8058 | fi | |
95ca63c4 CF |
8059 | |
8060 | ||
8061 | ||
7cb9022a MK |
8062 | |
8063 | ||
bec39cab | 8064 | |
81ecdfbb RW |
8065 | if test "$HAVE_LIBEXPAT" != yes; then |
8066 | if test "$with_expat" = yes; then | |
8067 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
8068 | else | |
8069 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
8070 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
8071 | fi | |
8072 | else | |
8073 | save_LIBS=$LIBS | |
8074 | LIBS="$LIBS $LIBEXPAT" | |
8075 | for ac_func in XML_StopParser | |
8076 | do : | |
8077 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
8078 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 8079 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8080 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 8081 | _ACEOF |
95ca63c4 | 8082 | |
bec39cab | 8083 | fi |
bec39cab | 8084 | done |
95ca63c4 | 8085 | |
81ecdfbb RW |
8086 | LIBS=$save_LIBS |
8087 | fi | |
a9322a30 TT |
8088 | fi |
8089 | ||
d344e670 DE |
8090 | # --------------------- # |
8091 | # Check for libpython. # | |
8092 | # --------------------- # | |
8093 | ||
a9322a30 | 8094 | |
a9322a30 TT |
8095 | |
8096 | ||
ec685c5e | 8097 | |
0c4a4063 | 8098 | |
81ecdfbb RW |
8099 | # Check whether --with-python was given. |
8100 | if test "${with_python+set}" = set; then : | |
8101 | withval=$with_python; | |
bec39cab | 8102 | else |
81ecdfbb | 8103 | with_python=auto |
bec39cab | 8104 | fi |
bec39cab | 8105 | |
81ecdfbb RW |
8106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
8107 | $as_echo_n "checking whether to use python... " >&6; } | |
8108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
8109 | $as_echo "$with_python" >&6; } | |
9a156167 | 8110 | |
81ecdfbb RW |
8111 | if test "${with_python}" = no; then |
8112 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
8113 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
8114 | have_libpython=no | |
bec39cab | 8115 | else |
81ecdfbb | 8116 | case "${with_python}" in |
8c85a4e2 | 8117 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
8118 | if test -d ${with_python}; then |
8119 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 8120 | python_prog="${with_python}/bin/python" |
0c4a4063 | 8121 | python_prefix= |
9c4ea6c5 JB |
8122 | # If python does not exit ${with_python}/bin, then try in |
8123 | # ${with_python}. On Windows/MinGW, this is where the Python | |
8124 | # executable is. | |
8125 | if test ! -x "${python_prog}"; then | |
8126 | python_prog="${with_python}/python" | |
8127 | python_prefix= | |
8128 | fi | |
e7a30f46 | 8129 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
8130 | # Fall back to gdb 7.0/7.1 behaviour. |
8131 | python_prog=missing | |
0c4a4063 | 8132 | python_prefix=${with_python} |
ec685c5e | 8133 | fi |
e7a30f46 | 8134 | elif test -x "${with_python}"; then |
ec685c5e DE |
8135 | # While we can't run python compiled for $host (unless host == build), |
8136 | # the user could write a script that provides the needed information, | |
8137 | # so we support that. | |
ec685c5e | 8138 | python_prog=${with_python} |
0c4a4063 | 8139 | python_prefix= |
ec685c5e DE |
8140 | else |
8141 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
8142 | fi | |
81ecdfbb | 8143 | ;; |
ec685c5e DE |
8144 | */*) |
8145 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
8146 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
8147 | ;; | |
ec685c5e DE |
8148 | *) |
8149 | # The user has either specified auto, yes, or the name of the python | |
8150 | # program assumed to be in $PATH. | |
8151 | python_prefix= | |
8152 | case "${with_python}" in | |
8153 | yes | auto) | |
8154 | if test ${build} = ${host}; then | |
8155 | # Extract the first word of "python", so it can be a program name with args. | |
8156 | set dummy python; ac_word=$2 | |
8157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8158 | $as_echo_n "checking for $ac_word... " >&6; } | |
8159 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8160 | $as_echo_n "(cached) " >&6 | |
8161 | else | |
8162 | case $python_prog_path in | |
8163 | [\\/]* | ?:[\\/]*) | |
8164 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8165 | ;; | |
8166 | *) | |
8167 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8168 | for as_dir in $PATH | |
8169 | do | |
8170 | IFS=$as_save_IFS | |
8171 | test -z "$as_dir" && as_dir=. | |
8172 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8173 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8174 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8175 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8176 | break 2 | |
8177 | fi | |
8178 | done | |
8179 | done | |
8180 | IFS=$as_save_IFS | |
8181 | ||
8182 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8183 | ;; | |
8184 | esac | |
8185 | fi | |
8186 | python_prog_path=$ac_cv_path_python_prog_path | |
8187 | if test -n "$python_prog_path"; then | |
8188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8189 | $as_echo "$python_prog_path" >&6; } | |
8190 | else | |
8191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8192 | $as_echo "no" >&6; } | |
8193 | fi | |
8194 | ||
8195 | ||
8196 | if test "${python_prog_path}" = missing; then | |
8197 | python_prog=missing | |
8198 | else | |
8199 | python_prog=${python_prog_path} | |
8200 | fi | |
8201 | else | |
8202 | # Not much we can do except assume the cross-compiler will find the | |
8203 | # right files. | |
8204 | python_prog=missing | |
8205 | fi | |
8206 | ;; | |
8207 | *) | |
8208 | # While we can't run python compiled for $host (unless host == build), | |
8209 | # the user could write a script that provides the needed information, | |
8210 | # so we support that. | |
8211 | python_prog="${with_python}" | |
8212 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8213 | set dummy ${python_prog}; ac_word=$2 | |
8214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8215 | $as_echo_n "checking for $ac_word... " >&6; } | |
8216 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8217 | $as_echo_n "(cached) " >&6 | |
8218 | else | |
8219 | case $python_prog_path in | |
8220 | [\\/]* | ?:[\\/]*) | |
8221 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8222 | ;; | |
8223 | *) | |
8224 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8225 | for as_dir in $PATH | |
8226 | do | |
8227 | IFS=$as_save_IFS | |
8228 | test -z "$as_dir" && as_dir=. | |
8229 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8230 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8231 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8232 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8233 | break 2 | |
8234 | fi | |
8235 | done | |
8236 | done | |
8237 | IFS=$as_save_IFS | |
8238 | ||
8239 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8240 | ;; | |
8241 | esac | |
8242 | fi | |
8243 | python_prog_path=$ac_cv_path_python_prog_path | |
8244 | if test -n "$python_prog_path"; then | |
8245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8246 | $as_echo "$python_prog_path" >&6; } | |
8247 | else | |
8248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8249 | $as_echo "no" >&6; } | |
8250 | fi | |
8251 | ||
8252 | ||
8253 | if test "${python_prog_path}" = missing; then | |
8254 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8255 | fi | |
8256 | ;; | |
8257 | esac | |
81ecdfbb RW |
8258 | esac |
8259 | ||
ec685c5e | 8260 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8261 | # We have a python program to use, but it may be too old. |
8262 | # Don't flag an error for --with-python=auto (the default). | |
8263 | have_python_config=yes | |
ec685c5e DE |
8264 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8265 | if test $? != 0; then | |
e7a30f46 DE |
8266 | have_python_config=failed |
8267 | if test "${with_python}" != auto; then | |
8268 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8269 | fi | |
ec685c5e DE |
8270 | fi |
8271 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8272 | if test $? != 0; then | |
e7a30f46 DE |
8273 | have_python_config=failed |
8274 | if test "${with_python}" != auto; then | |
8275 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8276 | fi | |
ec685c5e | 8277 | fi |
0c4a4063 DE |
8278 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8279 | if test $? != 0; then | |
e7a30f46 DE |
8280 | have_python_config=failed |
8281 | if test "${with_python}" != auto; then | |
8282 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8283 | fi | |
0c4a4063 | 8284 | fi |
ec685c5e | 8285 | else |
ac534cba JB |
8286 | # We do not have a python executable we can use to determine where |
8287 | # to find the Python headers and libs. We cannot guess the include | |
8288 | # path from the python_prefix either, because that include path | |
8289 | # depends on the Python version. So, there is nothing much we can | |
8290 | # do except assume that the compiler will be able to find those files. | |
8291 | python_includes= | |
8292 | python_libs= | |
0c4a4063 | 8293 | have_python_config=no |
ec685c5e | 8294 | fi |
bec39cab | 8295 | |
ec685c5e DE |
8296 | # If we have python-config, only try the configuration it provides. |
8297 | # Otherwise fallback on the old way of trying different versions of | |
8298 | # python in turn. | |
81ecdfbb | 8299 | |
ec685c5e DE |
8300 | have_libpython=no |
8301 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8302 | # Determine the Python version by extracting "-lpython<version>" |
8303 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8304 | # being decimal numbers, but can also be XY (seen on Windows). | |
8305 | # | |
8306 | # The extraction is performed using sed with a regular expression. | |
8307 | # Initially, the regexp used was using the '?' quantifier to make | |
8308 | # the dot in the version number optional. Unfortunately, this | |
8309 | # does not work with non-GNU versions of sed because, because of | |
8310 | # what looks like a limitation (the '?' quantifier does not work | |
8311 | # with back-references). We work around this limitation by using | |
8312 | # the '*' quantifier instead. It means that, in theory, we might | |
8313 | # match unexpected version strings such as "-lpython2..7", but | |
8314 | # this seems unlikely in practice. And even if that happens, | |
8315 | # an error will be triggered later on, when checking that version | |
8316 | # number. | |
ec685c5e | 8317 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8318 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8319 | case "${python_version}" in |
8320 | python*) | |
ec685c5e DE |
8321 | |
8322 | version=${python_version} | |
8323 | ||
8324 | new_CPPFLAGS=${python_includes} | |
8325 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8327 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8328 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8329 | save_LIBS=$LIBS |
ec685c5e DE |
8330 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8331 | LIBS="$LIBS $new_LIBS" | |
8332 | found_usable_python=no | |
81ecdfbb | 8333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8334 | /* end confdefs.h. */ |
ac534cba | 8335 | #include "Python.h" |
81ecdfbb RW |
8336 | int |
8337 | main () | |
8338 | { | |
8339 | Py_Initialize (); | |
8340 | ; | |
8341 | return 0; | |
8342 | } | |
bec39cab | 8343 | _ACEOF |
81ecdfbb | 8344 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8345 | have_libpython=${version} |
8346 | found_usable_python=yes | |
ac534cba JB |
8347 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8348 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8349 | fi |
81ecdfbb RW |
8350 | rm -f core conftest.err conftest.$ac_objext \ |
8351 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8352 | CPPFLAGS=$save_CPPFLAGS |
8353 | LIBS=$save_LIBS | |
ec685c5e DE |
8354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8355 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8356 | |
0c4a4063 DE |
8357 | ;; |
8358 | *) | |
ec685c5e | 8359 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8360 | ;; |
8361 | esac | |
e7a30f46 | 8362 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8363 | if test "${have_libpython}" = no; then |
9a156167 | 8364 | |
420697bb TT |
8365 | version=python2.7 |
8366 | ||
8367 | new_CPPFLAGS=${python_includes} | |
8368 | new_LIBS="${python_libs} -lpython2.7" | |
8369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8370 | $as_echo_n "checking for ${version}... " >&6; } | |
8371 | save_CPPFLAGS=$CPPFLAGS | |
8372 | save_LIBS=$LIBS | |
8373 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8374 | LIBS="$LIBS $new_LIBS" | |
8375 | found_usable_python=no | |
8376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8377 | /* end confdefs.h. */ | |
ac534cba | 8378 | #include "Python.h" |
420697bb TT |
8379 | int |
8380 | main () | |
8381 | { | |
8382 | Py_Initialize (); | |
8383 | ; | |
8384 | return 0; | |
8385 | } | |
8386 | _ACEOF | |
8387 | if ac_fn_c_try_link "$LINENO"; then : | |
8388 | have_libpython=${version} | |
8389 | found_usable_python=yes | |
ac534cba JB |
8390 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8391 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
8392 | fi |
8393 | rm -f core conftest.err conftest.$ac_objext \ | |
8394 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8395 | CPPFLAGS=$save_CPPFLAGS |
8396 | LIBS=$save_LIBS | |
420697bb TT |
8397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8398 | $as_echo "${found_usable_python}" >&6; } | |
8399 | ||
8400 | fi | |
8401 | if test "${have_libpython}" = no; then | |
8402 | ||
ec685c5e DE |
8403 | version=python2.6 |
8404 | ||
8405 | new_CPPFLAGS=${python_includes} | |
8406 | new_LIBS="${python_libs} -lpython2.6" | |
8407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8408 | $as_echo_n "checking for ${version}... " >&6; } | |
8409 | save_CPPFLAGS=$CPPFLAGS | |
8410 | save_LIBS=$LIBS | |
8411 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8412 | LIBS="$LIBS $new_LIBS" | |
8413 | found_usable_python=no | |
8414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8415 | /* end confdefs.h. */ | |
ac534cba | 8416 | #include "Python.h" |
ec685c5e DE |
8417 | int |
8418 | main () | |
8419 | { | |
8420 | Py_Initialize (); | |
8421 | ; | |
8422 | return 0; | |
8423 | } | |
8424 | _ACEOF | |
8425 | if ac_fn_c_try_link "$LINENO"; then : | |
8426 | have_libpython=${version} | |
8427 | found_usable_python=yes | |
ac534cba JB |
8428 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8429 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8430 | fi |
8431 | rm -f core conftest.err conftest.$ac_objext \ | |
8432 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8433 | CPPFLAGS=$save_CPPFLAGS |
8434 | LIBS=$save_LIBS | |
ec685c5e DE |
8435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8436 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8437 | |
81ecdfbb | 8438 | fi |
ec685c5e | 8439 | if test ${have_libpython} = no; then |
9a156167 | 8440 | |
81ecdfbb | 8441 | version=python2.5 |
9a156167 | 8442 | |
ec685c5e DE |
8443 | new_CPPFLAGS=${python_includes} |
8444 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
8445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8446 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8447 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8448 | save_LIBS=$LIBS |
ec685c5e DE |
8449 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8450 | LIBS="$LIBS $new_LIBS" | |
8451 | found_usable_python=no | |
81ecdfbb | 8452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8453 | /* end confdefs.h. */ |
ac534cba | 8454 | #include "Python.h" |
81ecdfbb RW |
8455 | int |
8456 | main () | |
8457 | { | |
8458 | Py_Initialize (); | |
8459 | ; | |
8460 | return 0; | |
8461 | } | |
436868fb | 8462 | _ACEOF |
81ecdfbb | 8463 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8464 | have_libpython=${version} |
8465 | found_usable_python=yes | |
ac534cba JB |
8466 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8467 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8468 | fi |
81ecdfbb RW |
8469 | rm -f core conftest.err conftest.$ac_objext \ |
8470 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8471 | CPPFLAGS=$save_CPPFLAGS |
8472 | LIBS=$save_LIBS | |
ec685c5e DE |
8473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8474 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 8475 | |
81ecdfbb | 8476 | fi |
ec685c5e | 8477 | if test ${have_libpython} = no; then |
a9322a30 | 8478 | |
81ecdfbb | 8479 | version=python2.4 |
a9322a30 | 8480 | |
ec685c5e DE |
8481 | new_CPPFLAGS=${python_includes} |
8482 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8483 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8484 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8485 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8486 | save_LIBS=$LIBS |
ec685c5e DE |
8487 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8488 | LIBS="$LIBS $new_LIBS" | |
8489 | found_usable_python=no | |
81ecdfbb | 8490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8491 | /* end confdefs.h. */ |
ac534cba | 8492 | #include "Python.h" |
a9322a30 TT |
8493 | int |
8494 | main () | |
8495 | { | |
81ecdfbb | 8496 | Py_Initialize (); |
a9322a30 TT |
8497 | ; |
8498 | return 0; | |
8499 | } | |
436868fb | 8500 | _ACEOF |
81ecdfbb | 8501 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8502 | have_libpython=${version} |
8503 | found_usable_python=yes | |
ac534cba JB |
8504 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8505 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8506 | fi |
81ecdfbb RW |
8507 | rm -f core conftest.err conftest.$ac_objext \ |
8508 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8509 | CPPFLAGS=$save_CPPFLAGS |
8510 | LIBS=$save_LIBS | |
ec685c5e DE |
8511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8512 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8513 | |
ec685c5e DE |
8514 | fi |
8515 | fi | |
9c4ea6c5 | 8516 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8517 | |
8518 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8519 | ||
9c4ea6c5 | 8520 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8521 | |
8522 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8523 | ||
9c4ea6c5 | 8524 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8525 | |
8526 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8527 | ||
9c4ea6c5 | 8528 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8529 | |
8530 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8531 | ||
81ecdfbb | 8532 | fi |
ec685c5e DE |
8533 | |
8534 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8535 | case "${with_python}" in |
8536 | yes) | |
8537 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8538 | ;; | |
8539 | auto) | |
8540 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8541 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8542 | ;; | |
8543 | *) | |
8544 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8545 | ;; | |
8546 | esac | |
0c4a4063 DE |
8547 | else |
8548 | if test -n "${python_prefix}"; then | |
8549 | ||
8550 | cat >>confdefs.h <<_ACEOF | |
8551 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8552 | _ACEOF | |
8553 | ||
8554 | ||
8555 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8556 | if test "x$prefix" = xNONE; then | |
8557 | test_prefix=/usr/local | |
8558 | else | |
8559 | test_prefix=$prefix | |
8560 | fi | |
8561 | else | |
8562 | test_prefix=$exec_prefix | |
8563 | fi | |
8564 | value=0 | |
8565 | case ${python_prefix} in | |
8566 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8567 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8568 | value=1 | |
8569 | ;; | |
8570 | esac | |
8571 | ||
8572 | cat >>confdefs.h <<_ACEOF | |
8573 | #define PYTHON_PATH_RELOCATABLE $value | |
8574 | _ACEOF | |
8575 | ||
8576 | ||
8577 | fi | |
81ecdfbb | 8578 | fi |
436868fb | 8579 | fi |
436868fb | 8580 | |
ec685c5e | 8581 | if test "${have_libpython}" != no; then |
436868fb | 8582 | |
81ecdfbb | 8583 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8584 | |
81ecdfbb RW |
8585 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8586 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8587 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8588 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8589 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8590 | |
81ecdfbb RW |
8591 | # Flags needed to compile Python code (taken from python-config --cflags). |
8592 | # We cannot call python-config directly because it will output whatever was | |
8593 | # used when compiling the Python interpreter itself, including flags which | |
8594 | # would make the python-related objects be compiled differently from the | |
8595 | # rest of GDB (e.g., -O2 and -fPIC). | |
8596 | if test "${GCC}" = yes; then | |
8597 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8598 | fi | |
436868fb | 8599 | |
81ecdfbb RW |
8600 | if test "x${tentative_python_cflags}" != x; then |
8601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8602 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
8603 | for flag in ${tentative_python_cflags}; do | |
8604 | # Check that the compiler accepts it | |
8605 | saved_CFLAGS="$CFLAGS" | |
8606 | CFLAGS="$CFLAGS $flag" | |
8607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8608 | /* end confdefs.h. */ |
81ecdfbb | 8609 | |
a9322a30 TT |
8610 | int |
8611 | main () | |
8612 | { | |
a9322a30 TT |
8613 | |
8614 | ; | |
8615 | return 0; | |
8616 | } | |
bec39cab | 8617 | _ACEOF |
81ecdfbb RW |
8618 | if ac_fn_c_try_compile "$LINENO"; then : |
8619 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 8620 | fi |
81ecdfbb RW |
8621 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8622 | CFLAGS="$saved_CFLAGS" | |
8623 | done | |
8624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
8625 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
8626 | fi | |
043b6510 JB |
8627 | |
8628 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
8629 | # #if _SGIAPI | |
8630 | # #define siginfo __siginfo | |
8631 | # #endif | |
8632 | # The problem is that including Python causes some XOPEN macros to be | |
8633 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
8634 | # to false. So, we work around this issue by defining siginfo ourself | |
8635 | # though the command-line. | |
c83393b9 JB |
8636 | # |
8637 | # On x64 Windows, Python's include headers, and pyconfig.h in | |
8638 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
8639 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
8640 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
8641 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
8642 | # The issue was reported to the Python community, but still isn't | |
8643 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
8644 | ||
043b6510 JB |
8645 | case "$gdb_host" in |
8646 | irix*) if test "${GCC}" = yes; then | |
8647 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
8648 | fi | |
8649 | ;; | |
c83393b9 JB |
8650 | mingw64) |
8651 | if test "${GCC}" = yes; then | |
8652 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
8653 | fi | |
8654 | ;; | |
043b6510 | 8655 | esac |
a8db4212 YPK |
8656 | |
8657 | # Note that "python -m threading" cannot be used to check for | |
8658 | # threading support due to a bug in Python 2.7.3 | |
8659 | # (http://bugs.python.org/issue15567). | |
8660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
8661 | $as_echo_n "checking whether python supports threads... " >&6; } | |
8662 | saved_CPPFLAGS="${CPPFLAGS}" | |
8663 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
8664 | # Note that the test is reversed so that python_has_threads=yes on | |
8665 | # unexpected failures. | |
8666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8667 | /* end confdefs.h. */ | |
8668 | ||
8669 | #include <Python.h> | |
8670 | #ifdef WITH_THREAD | |
8671 | # error | |
8672 | #endif | |
8673 | ||
8674 | _ACEOF | |
8675 | if ac_fn_c_try_cpp "$LINENO"; then : | |
8676 | python_has_threads=no | |
8677 | else | |
8678 | python_has_threads=yes | |
8679 | fi | |
8680 | rm -f conftest.err conftest.$ac_ext | |
8681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
8682 | $as_echo "${python_has_threads}" >&6; } | |
8683 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 8684 | else |
6dddc817 DE |
8685 | # Even if Python support is not compiled in, we need to have this file |
8686 | # included so that the "python" command, et.al., still exists. | |
8687 | CONFIG_OBS="$CONFIG_OBS python.o" | |
8688 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" | |
a9322a30 | 8689 | fi |
9a156167 | 8690 | |
ed3ef339 DE |
8691 | |
8692 | ||
4df42755 DE |
8693 | if test "${have_libpython}" != no; then |
8694 | HAVE_PYTHON_TRUE= | |
8695 | HAVE_PYTHON_FALSE='#' | |
8696 | else | |
8697 | HAVE_PYTHON_TRUE='#' | |
8698 | HAVE_PYTHON_FALSE= | |
8699 | fi | |
8700 | ||
ed3ef339 DE |
8701 | |
8702 | # -------------------- # | |
8703 | # Check for libguile. # | |
8704 | # -------------------- # | |
8705 | ||
8706 | ||
e1402065 DE |
8707 | |
8708 | ||
8709 | ||
8710 | ||
8711 | # Check whether --with-guile was given. | |
8712 | if test "${with_guile+set}" = set; then : | |
8713 | withval=$with_guile; | |
8714 | else | |
8715 | with_guile=auto | |
8716 | fi | |
8717 | ||
8718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
8719 | $as_echo_n "checking whether to use guile... " >&6; } | |
8720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
8721 | $as_echo "$with_guile" >&6; } | |
8722 | ||
ed3ef339 DE |
8723 | # Extract the first word of "pkg-config", so it can be a program name with args. |
8724 | set dummy pkg-config; ac_word=$2 | |
8725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8726 | $as_echo_n "checking for $ac_word... " >&6; } | |
8727 | if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : | |
8728 | $as_echo_n "(cached) " >&6 | |
8729 | else | |
8730 | case $pkg_config_prog_path in | |
8731 | [\\/]* | ?:[\\/]*) | |
8732 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
8733 | ;; | |
8734 | *) | |
8735 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8736 | for as_dir in $PATH | |
8737 | do | |
8738 | IFS=$as_save_IFS | |
8739 | test -z "$as_dir" && as_dir=. | |
8740 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8741 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8742 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8743 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8744 | break 2 | |
8745 | fi | |
8746 | done | |
8747 | done | |
8748 | IFS=$as_save_IFS | |
8749 | ||
8750 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
8751 | ;; | |
8752 | esac | |
8753 | fi | |
8754 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
8755 | if test -n "$pkg_config_prog_path"; then | |
8756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
8757 | $as_echo "$pkg_config_prog_path" >&6; } | |
8758 | else | |
8759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8760 | $as_echo "no" >&6; } | |
8761 | fi | |
8762 | ||
8763 | ||
8764 | ||
214ab2da | 8765 | try_guile_versions="guile-2.2 guile-2.0" |
ed3ef339 DE |
8766 | have_libguile=no |
8767 | case "${with_guile}" in | |
8768 | no) | |
8769 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
8770 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
8771 | ;; | |
8772 | auto) | |
e1402065 DE |
8773 | if test "${pkg_config_prog_path}" = "missing"; then |
8774 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
8775 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
8776 | else | |
ed3ef339 DE |
8777 | |
8778 | pkg_config=${pkg_config_prog_path} | |
8779 | guile_version_list=${try_guile_versions} | |
8780 | flag_errors=no | |
8781 | ||
ed3ef339 DE |
8782 | found_usable_guile=checking |
8783 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
8784 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
8785 | for guile_version in ${guile_version_list}; do | |
8786 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
8787 | if test $? != 0; then | |
8788 | continue | |
8789 | fi | |
8790 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
8791 | if test $? != 0; then | |
8792 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
8793 | fi | |
8794 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
8795 | if test $? != 0; then | |
8796 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
8797 | fi | |
8798 | found_usable_guile=${guile_version} | |
8799 | break | |
8800 | done | |
8801 | if test "${found_usable_guile}" = "checking"; then | |
8802 | if test "${flag_errors}" = "yes"; then | |
8803 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
8804 | else | |
8805 | found_usable_guile=no | |
8806 | fi | |
8807 | fi | |
8808 | if test "${found_usable_guile}" != no; then | |
8809 | save_CPPFLAGS=$CPPFLAGS | |
8810 | save_LIBS=$LIBS | |
8811 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8812 | LIBS="$LIBS $new_LIBS" | |
8813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8814 | /* end confdefs.h. */ | |
8815 | #include "libguile.h" | |
8816 | int | |
8817 | main () | |
8818 | { | |
8819 | scm_init_guile (); | |
8820 | ; | |
8821 | return 0; | |
8822 | } | |
8823 | _ACEOF | |
8824 | if ac_fn_c_try_link "$LINENO"; then : | |
8825 | have_libguile=yes | |
8826 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
8827 | GUILE_LIBS=$new_LIBS | |
8828 | else | |
8829 | found_usable_guile=no | |
8830 | fi | |
8831 | rm -f core conftest.err conftest.$ac_objext \ | |
8832 | conftest$ac_exeext conftest.$ac_ext | |
8833 | CPPFLAGS=$save_CPPFLAGS | |
8834 | LIBS=$save_LIBS | |
8835 | if test "${found_usable_guile}" = no; then | |
8836 | if test "${flag_errors}" = yes; then | |
8837 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8838 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8839 | as_fn_error "linking guile version ${guile_version} test program failed | |
8840 | See \`config.log' for more details." "$LINENO" 5; } | |
8841 | fi | |
8842 | fi | |
8843 | fi | |
8844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
8845 | $as_echo "${found_usable_guile}" >&6; } | |
8846 | ||
e1402065 | 8847 | fi |
ed3ef339 DE |
8848 | ;; |
8849 | yes) | |
e1402065 DE |
8850 | if test "${pkg_config_prog_path}" = "missing"; then |
8851 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
8852 | fi | |
ed3ef339 DE |
8853 | |
8854 | pkg_config=${pkg_config_prog_path} | |
8855 | guile_version_list=${try_guile_versions} | |
8856 | flag_errors=yes | |
8857 | ||
ed3ef339 DE |
8858 | found_usable_guile=checking |
8859 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
8860 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
8861 | for guile_version in ${guile_version_list}; do | |
8862 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
8863 | if test $? != 0; then | |
8864 | continue | |
8865 | fi | |
8866 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
8867 | if test $? != 0; then | |
8868 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
8869 | fi | |
8870 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
8871 | if test $? != 0; then | |
8872 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
8873 | fi | |
8874 | found_usable_guile=${guile_version} | |
8875 | break | |
8876 | done | |
8877 | if test "${found_usable_guile}" = "checking"; then | |
8878 | if test "${flag_errors}" = "yes"; then | |
8879 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
8880 | else | |
8881 | found_usable_guile=no | |
8882 | fi | |
8883 | fi | |
8884 | if test "${found_usable_guile}" != no; then | |
8885 | save_CPPFLAGS=$CPPFLAGS | |
8886 | save_LIBS=$LIBS | |
8887 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8888 | LIBS="$LIBS $new_LIBS" | |
8889 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8890 | /* end confdefs.h. */ | |
8891 | #include "libguile.h" | |
8892 | int | |
8893 | main () | |
8894 | { | |
8895 | scm_init_guile (); | |
8896 | ; | |
8897 | return 0; | |
8898 | } | |
8899 | _ACEOF | |
8900 | if ac_fn_c_try_link "$LINENO"; then : | |
8901 | have_libguile=yes | |
8902 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
8903 | GUILE_LIBS=$new_LIBS | |
8904 | else | |
8905 | found_usable_guile=no | |
8906 | fi | |
8907 | rm -f core conftest.err conftest.$ac_objext \ | |
8908 | conftest$ac_exeext conftest.$ac_ext | |
8909 | CPPFLAGS=$save_CPPFLAGS | |
8910 | LIBS=$save_LIBS | |
8911 | if test "${found_usable_guile}" = no; then | |
8912 | if test "${flag_errors}" = yes; then | |
8913 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8914 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8915 | as_fn_error "linking guile version ${guile_version} test program failed | |
8916 | See \`config.log' for more details." "$LINENO" 5; } | |
8917 | fi | |
8918 | fi | |
8919 | fi | |
8920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
8921 | $as_echo "${found_usable_guile}" >&6; } | |
8922 | ||
8923 | ;; | |
8924 | [\\/]* | ?:[\\/]*) | |
e1402065 | 8925 | if test -x "${with_guile}"; then |
ed3ef339 DE |
8926 | |
8927 | pkg_config=${with_guile} | |
8928 | guile_version_list=${try_guile_versions} | |
8929 | flag_errors=yes | |
8930 | ||
ed3ef339 DE |
8931 | found_usable_guile=checking |
8932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
8933 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
8934 | for guile_version in ${guile_version_list}; do | |
8935 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
8936 | if test $? != 0; then | |
8937 | continue | |
8938 | fi | |
8939 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
8940 | if test $? != 0; then | |
8941 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
8942 | fi | |
8943 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
8944 | if test $? != 0; then | |
8945 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
8946 | fi | |
8947 | found_usable_guile=${guile_version} | |
8948 | break | |
8949 | done | |
8950 | if test "${found_usable_guile}" = "checking"; then | |
8951 | if test "${flag_errors}" = "yes"; then | |
8952 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
8953 | else | |
8954 | found_usable_guile=no | |
8955 | fi | |
8956 | fi | |
8957 | if test "${found_usable_guile}" != no; then | |
8958 | save_CPPFLAGS=$CPPFLAGS | |
8959 | save_LIBS=$LIBS | |
8960 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8961 | LIBS="$LIBS $new_LIBS" | |
8962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8963 | /* end confdefs.h. */ | |
8964 | #include "libguile.h" | |
8965 | int | |
8966 | main () | |
8967 | { | |
8968 | scm_init_guile (); | |
8969 | ; | |
8970 | return 0; | |
8971 | } | |
8972 | _ACEOF | |
8973 | if ac_fn_c_try_link "$LINENO"; then : | |
8974 | have_libguile=yes | |
8975 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
8976 | GUILE_LIBS=$new_LIBS | |
8977 | else | |
8978 | found_usable_guile=no | |
8979 | fi | |
8980 | rm -f core conftest.err conftest.$ac_objext \ | |
8981 | conftest$ac_exeext conftest.$ac_ext | |
8982 | CPPFLAGS=$save_CPPFLAGS | |
8983 | LIBS=$save_LIBS | |
8984 | if test "${found_usable_guile}" = no; then | |
8985 | if test "${flag_errors}" = yes; then | |
8986 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8987 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8988 | as_fn_error "linking guile version ${guile_version} test program failed | |
8989 | See \`config.log' for more details." "$LINENO" 5; } | |
8990 | fi | |
8991 | fi | |
8992 | fi | |
8993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
8994 | $as_echo "${found_usable_guile}" >&6; } | |
8995 | ||
e1402065 DE |
8996 | else |
8997 | as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 | |
8998 | fi | |
ed3ef339 DE |
8999 | ;; |
9000 | "" | */*) | |
9001 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
9002 | as_fn_error "invalid value for --with-guile" "$LINENO" 5 | |
9003 | ;; | |
9004 | *) | |
9005 | # A space separate list of guile versions to try, in order. | |
e1402065 DE |
9006 | if test "${pkg_config_prog_path}" = "missing"; then |
9007 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
9008 | fi | |
ed3ef339 DE |
9009 | |
9010 | pkg_config=${pkg_config_prog_path} | |
9011 | guile_version_list=${with_guile} | |
9012 | flag_errors=yes | |
9013 | ||
ed3ef339 DE |
9014 | found_usable_guile=checking |
9015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9016 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9017 | for guile_version in ${guile_version_list}; do | |
9018 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9019 | if test $? != 0; then | |
9020 | continue | |
9021 | fi | |
9022 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9023 | if test $? != 0; then | |
9024 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9025 | fi | |
9026 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9027 | if test $? != 0; then | |
9028 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9029 | fi | |
9030 | found_usable_guile=${guile_version} | |
9031 | break | |
9032 | done | |
9033 | if test "${found_usable_guile}" = "checking"; then | |
9034 | if test "${flag_errors}" = "yes"; then | |
9035 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9036 | else | |
9037 | found_usable_guile=no | |
9038 | fi | |
9039 | fi | |
9040 | if test "${found_usable_guile}" != no; then | |
9041 | save_CPPFLAGS=$CPPFLAGS | |
9042 | save_LIBS=$LIBS | |
9043 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9044 | LIBS="$LIBS $new_LIBS" | |
9045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9046 | /* end confdefs.h. */ | |
9047 | #include "libguile.h" | |
9048 | int | |
9049 | main () | |
9050 | { | |
9051 | scm_init_guile (); | |
9052 | ; | |
9053 | return 0; | |
9054 | } | |
9055 | _ACEOF | |
9056 | if ac_fn_c_try_link "$LINENO"; then : | |
9057 | have_libguile=yes | |
9058 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9059 | GUILE_LIBS=$new_LIBS | |
9060 | else | |
9061 | found_usable_guile=no | |
9062 | fi | |
9063 | rm -f core conftest.err conftest.$ac_objext \ | |
9064 | conftest$ac_exeext conftest.$ac_ext | |
9065 | CPPFLAGS=$save_CPPFLAGS | |
9066 | LIBS=$save_LIBS | |
9067 | if test "${found_usable_guile}" = no; then | |
9068 | if test "${flag_errors}" = yes; then | |
9069 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9070 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9071 | as_fn_error "linking guile version ${guile_version} test program failed | |
9072 | See \`config.log' for more details." "$LINENO" 5; } | |
9073 | fi | |
9074 | fi | |
9075 | fi | |
9076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9077 | $as_echo "${found_usable_guile}" >&6; } | |
9078 | ||
9079 | ;; | |
9080 | esac | |
9081 | ||
9082 | if test "${have_libguile}" != no; then | |
9083 | ||
9084 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
9085 | ||
9086 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
9087 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
9088 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
9089 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
9090 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
9091 | |
9092 | save_LIBS="$LIBS" | |
9093 | save_CPPFLAGS="$CPPFLAGS" | |
9094 | LIBS="$GUILE_LIBS" | |
9095 | CPPFLAGS="$GUILE_CPPFLAGS" | |
9096 | for ac_func in scm_new_smob | |
9097 | do : | |
9098 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
9099 | if test "x$ac_cv_func_scm_new_smob" = x""yes; then : | |
9100 | cat >>confdefs.h <<_ACEOF | |
9101 | #define HAVE_SCM_NEW_SMOB 1 | |
9102 | _ACEOF | |
9103 | ||
9104 | fi | |
9105 | done | |
9106 | ||
9107 | LIBS="$save_LIBS" | |
9108 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
9109 | else |
9110 | # Even if Guile support is not compiled in, we need to have these files | |
9111 | # included. | |
9112 | CONFIG_OBS="$CONFIG_OBS guile.o" | |
9113 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" | |
9114 | fi | |
9a156167 | 9115 | |
ac534cba | 9116 | |
4df42755 DE |
9117 | if test "${have_libguile}" != no; then |
9118 | HAVE_GUILE_TRUE= | |
9119 | HAVE_GUILE_FALSE='#' | |
9120 | else | |
9121 | HAVE_GUILE_TRUE='#' | |
9122 | HAVE_GUILE_FALSE= | |
9123 | fi | |
9124 | ||
ac534cba | 9125 | |
74edf516 DE |
9126 | # PR 17185, see if we can get the libgc version to see if we need |
9127 | # to apply the workaround. | |
9128 | for ac_header in gc/gc.h | |
9129 | do : | |
9130 | ac_fn_c_check_header_mongrel "$LINENO" "gc/gc.h" "ac_cv_header_gc_gc_h" "$ac_includes_default" | |
9131 | if test "x$ac_cv_header_gc_gc_h" = x""yes; then : | |
9132 | cat >>confdefs.h <<_ACEOF | |
9133 | #define HAVE_GC_GC_H 1 | |
9134 | _ACEOF | |
9135 | ||
9136 | fi | |
9137 | ||
9138 | done | |
9139 | ||
9140 | for ac_func in setenv | |
9141 | do : | |
9142 | ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" | |
9143 | if test "x$ac_cv_func_setenv" = x""yes; then : | |
9144 | cat >>confdefs.h <<_ACEOF | |
9145 | #define HAVE_SETENV 1 | |
9146 | _ACEOF | |
9147 | ||
9148 | fi | |
9149 | done | |
9150 | ||
9151 | ||
d344e670 DE |
9152 | # --------------------- # |
9153 | # Check for libmcheck. # | |
9154 | # --------------------- # | |
9155 | ||
a8db4212 YPK |
9156 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
9157 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
9158 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
9159 | # and for releases. | |
17ef446e PA |
9160 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
9161 | && $development; then | |
9162 | libmcheck_default=yes | |
9163 | else | |
9164 | libmcheck_default=no | |
a8db4212 YPK |
9165 | fi |
9166 | ||
17ef446e PA |
9167 | # Check whether --enable-libmcheck was given. |
9168 | if test "${enable_libmcheck+set}" = set; then : | |
9169 | enableval=$enable_libmcheck; case "${enableval}" in | |
9170 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
9171 | no | n) ENABLE_LIBMCHECK="no" ;; | |
9172 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
9173 | esac | |
9174 | fi | |
9175 | ||
9176 | ||
9177 | if test -z "${ENABLE_LIBMCHECK}"; then | |
9178 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 9179 | fi |
17ef446e PA |
9180 | |
9181 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
9182 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
9183 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
9184 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
9185 | $as_echo_n "(cached) " >&6 | |
9186 | else | |
9187 | ac_check_lib_save_LIBS=$LIBS | |
9188 | LIBS="-lmcheck $LIBS" | |
9189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9190 | /* end confdefs.h. */ | |
9191 | ||
9192 | ||
9193 | int | |
9194 | main () | |
9195 | { | |
9196 | return main (); | |
9197 | ; | |
9198 | return 0; | |
9199 | } | |
9200 | _ACEOF | |
9201 | if ac_fn_c_try_link "$LINENO"; then : | |
9202 | ac_cv_lib_mcheck_main=yes | |
9203 | else | |
9204 | ac_cv_lib_mcheck_main=no | |
9205 | fi | |
9206 | rm -f core conftest.err conftest.$ac_objext \ | |
9207 | conftest$ac_exeext conftest.$ac_ext | |
9208 | LIBS=$ac_check_lib_save_LIBS | |
9209 | fi | |
9210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
9211 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
9212 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
9213 | cat >>confdefs.h <<_ACEOF | |
9214 | #define HAVE_LIBMCHECK 1 | |
9215 | _ACEOF | |
9216 | ||
9217 | LIBS="-lmcheck $LIBS" | |
9218 | ||
9219 | fi | |
9220 | ||
17ef446e PA |
9221 | fi |
9222 | ||
9223 | ||
9224 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
9225 | -a "${have_libpython}" != "no" \ | |
9226 | -a "${python_has_threads}" = "yes" ; then | |
9227 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
9228 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
9229 | fi |
9230 | ||
81ecdfbb RW |
9231 | # ------------------------- # |
9232 | # Checks for header files. # | |
9233 | # ------------------------- # | |
c890192f | 9234 | |
81ecdfbb RW |
9235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
9236 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
9237 | if test "${ac_cv_header_stdc+set}" = set; then : | |
9238 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9239 | else |
81ecdfbb | 9240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9241 | /* end confdefs.h. */ |
81ecdfbb RW |
9242 | #include <stdlib.h> |
9243 | #include <stdarg.h> | |
9244 | #include <string.h> | |
9245 | #include <float.h> | |
9246 | ||
a9322a30 TT |
9247 | int |
9248 | main () | |
9249 | { | |
a9322a30 TT |
9250 | |
9251 | ; | |
9252 | return 0; | |
9253 | } | |
bec39cab | 9254 | _ACEOF |
81ecdfbb RW |
9255 | if ac_fn_c_try_compile "$LINENO"; then : |
9256 | ac_cv_header_stdc=yes | |
bec39cab | 9257 | else |
81ecdfbb | 9258 | ac_cv_header_stdc=no |
a9322a30 | 9259 | fi |
81ecdfbb | 9260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9261 | |
81ecdfbb RW |
9262 | if test $ac_cv_header_stdc = yes; then |
9263 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
9264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9265 | /* end confdefs.h. */ | |
9266 | #include <string.h> | |
bec39cab | 9267 | |
81ecdfbb RW |
9268 | _ACEOF |
9269 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9270 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 9271 | |
bec39cab | 9272 | else |
81ecdfbb RW |
9273 | ac_cv_header_stdc=no |
9274 | fi | |
9275 | rm -f conftest* | |
9276 | ||
9277 | fi | |
9278 | ||
9279 | if test $ac_cv_header_stdc = yes; then | |
9280 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
9281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9282 | /* end confdefs.h. */ | |
9283 | #include <stdlib.h> | |
9284 | ||
bec39cab | 9285 | _ACEOF |
81ecdfbb RW |
9286 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
9287 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 9288 | |
81ecdfbb RW |
9289 | else |
9290 | ac_cv_header_stdc=no | |
9291 | fi | |
9292 | rm -f conftest* | |
bec39cab | 9293 | |
bec39cab | 9294 | fi |
81ecdfbb RW |
9295 | |
9296 | if test $ac_cv_header_stdc = yes; then | |
9297 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
9298 | if test "$cross_compiling" = yes; then : | |
9299 | : | |
bec39cab | 9300 | else |
81ecdfbb | 9301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9302 | /* end confdefs.h. */ |
81ecdfbb RW |
9303 | #include <ctype.h> |
9304 | #include <stdlib.h> | |
9305 | #if ((' ' & 0x0FF) == 0x020) | |
9306 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
9307 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
9308 | #else | |
9309 | # define ISLOWER(c) \ | |
9310 | (('a' <= (c) && (c) <= 'i') \ | |
9311 | || ('j' <= (c) && (c) <= 'r') \ | |
9312 | || ('s' <= (c) && (c) <= 'z')) | |
9313 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
9314 | #endif | |
9315 | ||
9316 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
9317 | int |
9318 | main () | |
9319 | { | |
81ecdfbb RW |
9320 | int i; |
9321 | for (i = 0; i < 256; i++) | |
9322 | if (XOR (islower (i), ISLOWER (i)) | |
9323 | || toupper (i) != TOUPPER (i)) | |
9324 | return 2; | |
a9322a30 TT |
9325 | return 0; |
9326 | } | |
bec39cab | 9327 | _ACEOF |
81ecdfbb RW |
9328 | if ac_fn_c_try_run "$LINENO"; then : |
9329 | ||
bec39cab | 9330 | else |
81ecdfbb RW |
9331 | ac_cv_header_stdc=no |
9332 | fi | |
9333 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9334 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9335 | fi | |
bec39cab | 9336 | |
bec39cab | 9337 | fi |
a9322a30 | 9338 | fi |
81ecdfbb RW |
9339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
9340 | $as_echo "$ac_cv_header_stdc" >&6; } | |
9341 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 9342 | |
81ecdfbb | 9343 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 9344 | |
81ecdfbb | 9345 | fi |
bec39cab | 9346 | |
81ecdfbb | 9347 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 9348 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 9349 | thread_db.h \ |
0080a2f6 | 9350 | sys/fault.h \ |
81ecdfbb RW |
9351 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
9352 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
9353 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
9467110b | 9354 | termios.h termio.h \ |
3447c057 | 9355 | sgtty.h elf_hp.h \ |
9467110b | 9356 | dlfcn.h |
81ecdfbb RW |
9357 | do : |
9358 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9359 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9360 | eval as_val=\$$as_ac_Header | |
9361 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9362 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9363 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9364 | _ACEOF |
c906108c | 9365 | |
bec39cab | 9366 | fi |
81ecdfbb RW |
9367 | |
9368 | done | |
9369 | ||
81ecdfbb RW |
9370 | for ac_header in sys/proc.h |
9371 | do : | |
9372 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
9373 | # include <sys/param.h> | |
9374 | #endif | |
c906108c | 9375 | |
81ecdfbb RW |
9376 | " |
9377 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 9378 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9379 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 9380 | _ACEOF |
5ee754fc | 9381 | |
bec39cab | 9382 | fi |
81ecdfbb RW |
9383 | |
9384 | done | |
9385 | ||
9386 | for ac_header in sys/user.h | |
9387 | do : | |
9388 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
9389 | # include <sys/param.h> | |
a9322a30 TT |
9390 | #endif |
9391 | ||
81ecdfbb RW |
9392 | " |
9393 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
9394 | cat >>confdefs.h <<_ACEOF | |
9395 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 9396 | _ACEOF |
bec39cab | 9397 | |
a9322a30 | 9398 | fi |
bec39cab | 9399 | |
81ecdfbb | 9400 | done |
5ee754fc | 9401 | |
5ee754fc | 9402 | |
81ecdfbb RW |
9403 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
9404 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
9405 | # think that we don't have <curses.h> if we're using GCC. | |
9406 | case $host_os in | |
9407 | solaris2.[789]) | |
9408 | if test "$GCC" = yes; then | |
9409 | ||
9410 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
9411 | ||
9412 | fi ;; | |
9413 | esac | |
9414 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
9415 | do : | |
9416 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9417 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9418 | eval as_val=\$$as_ac_Header | |
9419 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9420 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9421 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9422 | _ACEOF |
5ee754fc MK |
9423 | |
9424 | fi | |
9425 | ||
81ecdfbb | 9426 | done |
bec39cab | 9427 | |
81ecdfbb RW |
9428 | for ac_header in term.h |
9429 | do : | |
9430 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
9431 | # include <curses.h> | |
9432 | #endif | |
bec39cab | 9433 | |
81ecdfbb RW |
9434 | " |
9435 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
9436 | cat >>confdefs.h <<_ACEOF | |
9437 | #define HAVE_TERM_H 1 | |
a8111142 | 9438 | _ACEOF |
a8111142 | 9439 | |
a8111142 | 9440 | fi |
a8111142 | 9441 | |
81ecdfbb | 9442 | done |
a8111142 TT |
9443 | |
9444 | ||
81ecdfbb RW |
9445 | # ------------------------- # |
9446 | # Checks for declarations. # | |
9447 | # ------------------------- # | |
a9322a30 | 9448 | |
81ecdfbb RW |
9449 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
9450 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
9451 | ac_have_decl=1 | |
bec39cab | 9452 | else |
81ecdfbb RW |
9453 | ac_have_decl=0 |
9454 | fi | |
9455 | ||
9456 | cat >>confdefs.h <<_ACEOF | |
9457 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 9458 | _ACEOF |
81ecdfbb RW |
9459 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
9460 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
9461 | ac_have_decl=1 | |
9462 | else | |
9463 | ac_have_decl=0 | |
9464 | fi | |
9465 | ||
9466 | cat >>confdefs.h <<_ACEOF | |
9467 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 9468 | _ACEOF |
81ecdfbb RW |
9469 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
9470 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
9471 | ac_have_decl=1 | |
bec39cab | 9472 | else |
81ecdfbb RW |
9473 | ac_have_decl=0 |
9474 | fi | |
bec39cab | 9475 | |
81ecdfbb RW |
9476 | cat >>confdefs.h <<_ACEOF |
9477 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 9478 | _ACEOF |
81ecdfbb RW |
9479 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
9480 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
9481 | ac_have_decl=1 | |
9482 | else | |
9483 | ac_have_decl=0 | |
5ee754fc | 9484 | fi |
81ecdfbb RW |
9485 | |
9486 | cat >>confdefs.h <<_ACEOF | |
9487 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 9488 | _ACEOF |
5ee754fc | 9489 | |
5ee754fc | 9490 | |
81ecdfbb RW |
9491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9492 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9493 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9494 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9495 | else |
81ecdfbb | 9496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9497 | /* end confdefs.h. */ |
81ecdfbb | 9498 | #include <locale.h> |
a9322a30 TT |
9499 | int |
9500 | main () | |
9501 | { | |
81ecdfbb | 9502 | return LC_MESSAGES |
a9322a30 TT |
9503 | ; |
9504 | return 0; | |
9505 | } | |
bec39cab | 9506 | _ACEOF |
81ecdfbb RW |
9507 | if ac_fn_c_try_link "$LINENO"; then : |
9508 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9509 | else |
81ecdfbb RW |
9510 | am_cv_val_LC_MESSAGES=no |
9511 | fi | |
9512 | rm -f core conftest.err conftest.$ac_objext \ | |
9513 | conftest$ac_exeext conftest.$ac_ext | |
9514 | fi | |
9515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9516 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9517 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9518 | |
81ecdfbb RW |
9519 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9520 | ||
9521 | fi | |
9522 | ||
9523 | ||
9524 | # ----------------------- # | |
9525 | # Checks for structures. # | |
9526 | # ----------------------- # | |
9527 | ||
9528 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9529 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9530 | ||
9531 | cat >>confdefs.h <<_ACEOF | |
9532 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9533 | _ACEOF |
7eb368b3 | 9534 | |
81ecdfbb | 9535 | |
7eb368b3 | 9536 | fi |
81ecdfbb RW |
9537 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9538 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9539 | |
a9322a30 TT |
9540 | cat >>confdefs.h <<_ACEOF |
9541 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9542 | _ACEOF |
9543 | ||
a9322a30 | 9544 | |
7eb368b3 NR |
9545 | fi |
9546 | ||
7eb368b3 | 9547 | |
a9322a30 TT |
9548 | # ------------------ # |
9549 | # Checks for types. # | |
9550 | # ------------------ # | |
7eb368b3 | 9551 | |
81ecdfbb RW |
9552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9553 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9554 | if test "${ac_cv_type_signal+set}" = set; then : | |
9555 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9556 | else |
81ecdfbb | 9557 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9558 | /* end confdefs.h. */ |
a9322a30 TT |
9559 | #include <sys/types.h> |
9560 | #include <signal.h> | |
7cb9022a | 9561 | |
a9322a30 TT |
9562 | int |
9563 | main () | |
9564 | { | |
81ecdfbb | 9565 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9566 | ; |
9567 | return 0; | |
9568 | } | |
bec39cab | 9569 | _ACEOF |
81ecdfbb RW |
9570 | if ac_fn_c_try_compile "$LINENO"; then : |
9571 | ac_cv_type_signal=int | |
bec39cab | 9572 | else |
81ecdfbb | 9573 | ac_cv_type_signal=void |
bec39cab | 9574 | fi |
81ecdfbb | 9575 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9576 | fi |
81ecdfbb RW |
9577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9578 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9579 | |
a9322a30 TT |
9580 | cat >>confdefs.h <<_ACEOF |
9581 | #define RETSIGTYPE $ac_cv_type_signal | |
9582 | _ACEOF | |
5ee754fc | 9583 | |
bec39cab | 9584 | |
81ecdfbb | 9585 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9586 | #include <sys/socket.h> |
9587 | ||
81ecdfbb RW |
9588 | " |
9589 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9590 | |
a9322a30 TT |
9591 | cat >>confdefs.h <<_ACEOF |
9592 | #define HAVE_SOCKLEN_T 1 | |
9593 | _ACEOF | |
9594 | ||
9595 | ||
9596 | fi | |
9597 | ||
9598 | ||
9599 | # ------------------------------------- # | |
9600 | # Checks for compiler characteristics. # | |
9601 | # ------------------------------------- # | |
9602 | ||
81ecdfbb RW |
9603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9604 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9605 | if test "${ac_cv_c_const+set}" = set; then : | |
9606 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9607 | else |
81ecdfbb | 9608 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9609 | /* end confdefs.h. */ |
a9322a30 TT |
9610 | |
9611 | int | |
9612 | main () | |
9613 | { | |
9614 | /* FIXME: Include the comments suggested by Paul. */ | |
9615 | #ifndef __cplusplus | |
9616 | /* Ultrix mips cc rejects this. */ | |
9617 | typedef int charset[2]; | |
81ecdfbb | 9618 | const charset cs; |
a9322a30 | 9619 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
9620 | char const *const *pcpcc; |
9621 | char **ppc; | |
a9322a30 TT |
9622 | /* NEC SVR4.0.2 mips cc rejects this. */ |
9623 | struct point {int x, y;}; | |
9624 | static struct point const zero = {0,0}; | |
9625 | /* AIX XL C 1.02.0.0 rejects this. | |
9626 | It does not let you subtract one const X* pointer from another in | |
9627 | an arm of an if-expression whose if-part is not a constant | |
9628 | expression */ | |
9629 | const char *g = "string"; | |
81ecdfbb | 9630 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 9631 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
9632 | ++pcpcc; |
9633 | ppc = (char**) pcpcc; | |
9634 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
9635 | { /* SCO 3.2v4 cc rejects this. */ |
9636 | char *t; | |
9637 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
9638 | ||
9639 | *t++ = 0; | |
81ecdfbb | 9640 | if (s) return 0; |
a9322a30 TT |
9641 | } |
9642 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
9643 | int x[] = {25, 17}; | |
9644 | const int *foo = &x[0]; | |
9645 | ++foo; | |
9646 | } | |
9647 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
9648 | typedef const int *iptr; | |
9649 | iptr p = 0; | |
9650 | ++p; | |
9651 | } | |
9652 | { /* AIX XL C 1.02.0.0 rejects this saying | |
9653 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
9654 | struct s { int j; const int *ap[3]; }; | |
9655 | struct s *b; b->j = 5; | |
9656 | } | |
9657 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
9658 | const int foo = 10; | |
81ecdfbb | 9659 | if (!foo) return 0; |
a9322a30 | 9660 | } |
81ecdfbb | 9661 | return !cs[0] && !zero.x; |
a9322a30 TT |
9662 | #endif |
9663 | ||
9664 | ; | |
9665 | return 0; | |
9666 | } | |
bec39cab | 9667 | _ACEOF |
81ecdfbb | 9668 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9669 | ac_cv_c_const=yes |
5ee754fc | 9670 | else |
81ecdfbb | 9671 | ac_cv_c_const=no |
5ee754fc | 9672 | fi |
81ecdfbb | 9673 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9674 | fi |
81ecdfbb RW |
9675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
9676 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 9677 | if test $ac_cv_c_const = no; then |
bec39cab | 9678 | |
81ecdfbb | 9679 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 9680 | |
5ee754fc | 9681 | fi |
bec39cab | 9682 | |
81ecdfbb RW |
9683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
9684 | $as_echo_n "checking for inline... " >&6; } | |
9685 | if test "${ac_cv_c_inline+set}" = set; then : | |
9686 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9687 | else |
a9322a30 TT |
9688 | ac_cv_c_inline=no |
9689 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 9690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9691 | /* end confdefs.h. */ |
a9322a30 TT |
9692 | #ifndef __cplusplus |
9693 | typedef int foo_t; | |
9694 | static $ac_kw foo_t static_foo () {return 0; } | |
9695 | $ac_kw foo_t foo () {return 0; } | |
9696 | #endif | |
9697 | ||
bec39cab | 9698 | _ACEOF |
81ecdfbb RW |
9699 | if ac_fn_c_try_compile "$LINENO"; then : |
9700 | ac_cv_c_inline=$ac_kw | |
bec39cab | 9701 | fi |
81ecdfbb RW |
9702 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9703 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 9704 | done |
bec39cab | 9705 | |
5ee754fc | 9706 | fi |
81ecdfbb RW |
9707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
9708 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 9709 | |
a9322a30 TT |
9710 | case $ac_cv_c_inline in |
9711 | inline | yes) ;; | |
9712 | *) | |
9713 | case $ac_cv_c_inline in | |
9714 | no) ac_val=;; | |
9715 | *) ac_val=$ac_cv_c_inline;; | |
9716 | esac | |
9717 | cat >>confdefs.h <<_ACEOF | |
9718 | #ifndef __cplusplus | |
9719 | #define inline $ac_val | |
9720 | #endif | |
9721 | _ACEOF | |
bec39cab AC |
9722 | ;; |
9723 | esac | |
bec39cab | 9724 | |
81ecdfbb RW |
9725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
9726 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9727 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
9728 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9729 | else |
81ecdfbb RW |
9730 | ac_cv_c_bigendian=unknown |
9731 | # See if we're dealing with a universal compiler. | |
9732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9733 | /* end confdefs.h. */ | |
9734 | #ifndef __APPLE_CC__ | |
9735 | not a universal capable compiler | |
9736 | #endif | |
9737 | typedef int dummy; | |
9738 | ||
9739 | _ACEOF | |
9740 | if ac_fn_c_try_compile "$LINENO"; then : | |
9741 | ||
9742 | # Check for potential -arch flags. It is not universal unless | |
9743 | # there are at least two -arch flags with different values. | |
9744 | ac_arch= | |
9745 | ac_prev= | |
9746 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
9747 | if test -n "$ac_prev"; then | |
9748 | case $ac_word in | |
9749 | i?86 | x86_64 | ppc | ppc64) | |
9750 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
9751 | ac_arch=$ac_word | |
9752 | else | |
9753 | ac_cv_c_bigendian=universal | |
9754 | break | |
9755 | fi | |
9756 | ;; | |
9757 | esac | |
9758 | ac_prev= | |
9759 | elif test "x$ac_word" = "x-arch"; then | |
9760 | ac_prev=arch | |
9761 | fi | |
9762 | done | |
9763 | fi | |
9764 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9765 | if test $ac_cv_c_bigendian = unknown; then | |
9766 | # See if sys/param.h defines the BYTE_ORDER macro. | |
9767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9768 | /* end confdefs.h. */ |
a9322a30 | 9769 | #include <sys/types.h> |
81ecdfbb | 9770 | #include <sys/param.h> |
a9322a30 TT |
9771 | |
9772 | int | |
9773 | main () | |
9774 | { | |
81ecdfbb RW |
9775 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
9776 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
9777 | && LITTLE_ENDIAN) | |
9778 | bogus endian macros | |
9779 | #endif | |
a9322a30 TT |
9780 | |
9781 | ; | |
9782 | return 0; | |
9783 | } | |
bec39cab | 9784 | _ACEOF |
81ecdfbb | 9785 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9786 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 9787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9788 | /* end confdefs.h. */ |
a9322a30 | 9789 | #include <sys/types.h> |
81ecdfbb | 9790 | #include <sys/param.h> |
a9322a30 TT |
9791 | |
9792 | int | |
9793 | main () | |
9794 | { | |
9795 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
9796 | not big endian |
9797 | #endif | |
a9322a30 TT |
9798 | |
9799 | ; | |
9800 | return 0; | |
9801 | } | |
bec39cab | 9802 | _ACEOF |
81ecdfbb | 9803 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9804 | ac_cv_c_bigendian=yes |
5ee754fc | 9805 | else |
81ecdfbb | 9806 | ac_cv_c_bigendian=no |
5ee754fc | 9807 | fi |
81ecdfbb RW |
9808 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9809 | fi | |
9810 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9811 | fi | |
9812 | if test $ac_cv_c_bigendian = unknown; then | |
9813 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
9814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9815 | /* end confdefs.h. */ | |
9816 | #include <limits.h> | |
bec39cab | 9817 | |
81ecdfbb RW |
9818 | int |
9819 | main () | |
9820 | { | |
9821 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
9822 | bogus endian macros | |
9823 | #endif | |
9824 | ||
9825 | ; | |
9826 | return 0; | |
9827 | } | |
7eb368b3 | 9828 | _ACEOF |
81ecdfbb RW |
9829 | if ac_fn_c_try_compile "$LINENO"; then : |
9830 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
9831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 9832 | /* end confdefs.h. */ |
81ecdfbb RW |
9833 | #include <limits.h> |
9834 | ||
7eb368b3 NR |
9835 | int |
9836 | main () | |
9837 | { | |
81ecdfbb RW |
9838 | #ifndef _BIG_ENDIAN |
9839 | not big endian | |
9840 | #endif | |
9841 | ||
7eb368b3 NR |
9842 | ; |
9843 | return 0; | |
9844 | } | |
9845 | _ACEOF | |
81ecdfbb | 9846 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9847 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
9848 | else |
9849 | ac_cv_c_bigendian=no | |
a9322a30 | 9850 | fi |
81ecdfbb | 9851 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9852 | fi |
81ecdfbb RW |
9853 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9854 | fi | |
9855 | if test $ac_cv_c_bigendian = unknown; then | |
9856 | # Compile a test program. | |
9857 | if test "$cross_compiling" = yes; then : | |
9858 | # Try to guess by grepping values from an object file. | |
9859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9860 | /* end confdefs.h. */ | |
9861 | short int ascii_mm[] = | |
9862 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
9863 | short int ascii_ii[] = | |
9864 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9865 | int use_ascii (int i) { | |
9866 | return ascii_mm[i] + ascii_ii[i]; | |
9867 | } | |
9868 | short int ebcdic_ii[] = | |
9869 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
9870 | short int ebcdic_mm[] = | |
9871 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9872 | int use_ebcdic (int i) { | |
9873 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
9874 | } | |
9875 | extern int foo; | |
7eb368b3 | 9876 | |
81ecdfbb RW |
9877 | int |
9878 | main () | |
9879 | { | |
9880 | return use_ascii (foo) == use_ebcdic (foo); | |
9881 | ; | |
9882 | return 0; | |
9883 | } | |
9884 | _ACEOF | |
9885 | if ac_fn_c_try_compile "$LINENO"; then : | |
9886 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
9887 | ac_cv_c_bigendian=yes | |
9888 | fi | |
9889 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9890 | if test "$ac_cv_c_bigendian" = unknown; then | |
9891 | ac_cv_c_bigendian=no | |
9892 | else | |
9893 | # finding both strings is unlikely to happen, but who knows? | |
9894 | ac_cv_c_bigendian=unknown | |
9895 | fi | |
9896 | fi | |
7eb368b3 | 9897 | fi |
81ecdfbb | 9898 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9899 | else |
81ecdfbb | 9900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9901 | /* end confdefs.h. */ |
81ecdfbb | 9902 | $ac_includes_default |
d3ea6809 MM |
9903 | int |
9904 | main () | |
9905 | { | |
81ecdfbb RW |
9906 | |
9907 | /* Are we little or big endian? From Harbison&Steele. */ | |
9908 | union | |
9909 | { | |
9910 | long int l; | |
9911 | char c[sizeof (long int)]; | |
9912 | } u; | |
9913 | u.l = 1; | |
9914 | return u.c[sizeof (long int) - 1] == 1; | |
9915 | ||
9916 | ; | |
9917 | return 0; | |
d3ea6809 MM |
9918 | } |
9919 | _ACEOF | |
81ecdfbb | 9920 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9921 | ac_cv_c_bigendian=no |
d3ea6809 | 9922 | else |
81ecdfbb | 9923 | ac_cv_c_bigendian=yes |
d3ea6809 | 9924 | fi |
81ecdfbb RW |
9925 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9926 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9927 | fi |
a9322a30 | 9928 | |
81ecdfbb RW |
9929 | fi |
9930 | fi | |
9931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9932 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9933 | case $ac_cv_c_bigendian in #( | |
9934 | yes) | |
9935 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9936 | ;; #( | |
9937 | no) | |
9938 | ;; #( | |
9939 | universal) | |
9940 | ||
9941 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9942 | ||
9943 | ;; #( | |
9944 | *) | |
9945 | as_fn_error "unknown endianness | |
9946 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
9947 | esac | |
d3ea6809 MM |
9948 | |
9949 | ||
a9322a30 TT |
9950 | # ------------------------------ # |
9951 | # Checks for library functions. # | |
9952 | # ------------------------------ # | |
d3ea6809 | 9953 | |
a9322a30 TT |
9954 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
9955 | # for constant arguments. Useless! | |
81ecdfbb RW |
9956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
9957 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9958 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
9959 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 9960 | else |
81ecdfbb | 9961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 9962 | /* end confdefs.h. */ |
a9322a30 | 9963 | #include <alloca.h> |
bec39cab AC |
9964 | int |
9965 | main () | |
9966 | { | |
a9322a30 | 9967 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 9968 | if (p) return 0; |
bec39cab AC |
9969 | ; |
9970 | return 0; | |
9971 | } | |
9972 | _ACEOF | |
81ecdfbb | 9973 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9974 | ac_cv_working_alloca_h=yes |
bec39cab | 9975 | else |
81ecdfbb | 9976 | ac_cv_working_alloca_h=no |
bec39cab | 9977 | fi |
81ecdfbb RW |
9978 | rm -f core conftest.err conftest.$ac_objext \ |
9979 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9980 | fi |
81ecdfbb RW |
9981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
9982 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
9983 | if test $ac_cv_working_alloca_h = yes; then |
9984 | ||
81ecdfbb | 9985 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 9986 | |
c906108c | 9987 | fi |
bec39cab | 9988 | |
81ecdfbb RW |
9989 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
9990 | $as_echo_n "checking for alloca... " >&6; } | |
9991 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
9992 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9993 | else |
81ecdfbb | 9994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9995 | /* end confdefs.h. */ |
a9322a30 TT |
9996 | #ifdef __GNUC__ |
9997 | # define alloca __builtin_alloca | |
b4e70030 | 9998 | #else |
a9322a30 TT |
9999 | # ifdef _MSC_VER |
10000 | # include <malloc.h> | |
10001 | # define alloca _alloca | |
10002 | # else | |
81ecdfbb | 10003 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
10004 | # include <alloca.h> |
10005 | # else | |
10006 | # ifdef _AIX | |
10007 | #pragma alloca | |
10008 | # else | |
10009 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
10010 | char *alloca (); | |
10011 | # endif | |
10012 | # endif | |
10013 | # endif | |
10014 | # endif | |
c906108c | 10015 | #endif |
97bf5e38 | 10016 | |
bec39cab AC |
10017 | int |
10018 | main () | |
10019 | { | |
a9322a30 | 10020 | char *p = (char *) alloca (1); |
81ecdfbb | 10021 | if (p) return 0; |
bec39cab AC |
10022 | ; |
10023 | return 0; | |
10024 | } | |
10025 | _ACEOF | |
81ecdfbb | 10026 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 10027 | ac_cv_func_alloca_works=yes |
bec39cab | 10028 | else |
81ecdfbb | 10029 | ac_cv_func_alloca_works=no |
bec39cab | 10030 | fi |
81ecdfbb RW |
10031 | rm -f core conftest.err conftest.$ac_objext \ |
10032 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 10033 | fi |
81ecdfbb RW |
10034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
10035 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
10036 | |
10037 | if test $ac_cv_func_alloca_works = yes; then | |
10038 | ||
81ecdfbb | 10039 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 10040 | |
a9322a30 TT |
10041 | else |
10042 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
10043 | # that cause trouble. Some versions do not even contain alloca or | |
10044 | # contain a buggy version. If you still want to use their alloca, | |
10045 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
10046 | ||
81ecdfbb | 10047 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 10048 | |
81ecdfbb | 10049 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 10050 | |
bec39cab | 10051 | |
81ecdfbb RW |
10052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
10053 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
10054 | if test "${ac_cv_os_cray+set}" = set; then : | |
10055 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10056 | else |
81ecdfbb | 10057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 10058 | /* end confdefs.h. */ |
81ecdfbb | 10059 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
10060 | webecray |
10061 | #else | |
10062 | wenotbecray | |
10063 | #endif | |
10064 | ||
10065 | _ACEOF | |
10066 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 10067 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
10068 | ac_cv_os_cray=yes |
10069 | else | |
81ecdfbb | 10070 | ac_cv_os_cray=no |
bec39cab | 10071 | fi |
81ecdfbb RW |
10072 | rm -f conftest* |
10073 | ||
bec39cab | 10074 | fi |
81ecdfbb RW |
10075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
10076 | $as_echo "$ac_cv_os_cray" >&6; } | |
10077 | if test $ac_cv_os_cray = yes; then | |
10078 | for ac_func in _getb67 GETB67 getb67; do | |
10079 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10080 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10081 | eval as_val=\$$as_ac_var | |
10082 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
10083 | |
10084 | cat >>confdefs.h <<_ACEOF | |
10085 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 10086 | _ACEOF |
c906108c | 10087 | |
a9322a30 | 10088 | break |
c906108c SS |
10089 | fi |
10090 | ||
a9322a30 TT |
10091 | done |
10092 | fi | |
bec39cab | 10093 | |
81ecdfbb RW |
10094 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
10095 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
10096 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
10097 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10098 | else |
81ecdfbb | 10099 | if test "$cross_compiling" = yes; then : |
a9322a30 | 10100 | ac_cv_c_stack_direction=0 |
bec39cab | 10101 | else |
81ecdfbb | 10102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10103 | /* end confdefs.h. */ |
81ecdfbb | 10104 | $ac_includes_default |
a9322a30 TT |
10105 | int |
10106 | find_stack_direction () | |
b4e70030 | 10107 | { |
a9322a30 TT |
10108 | static char *addr = 0; |
10109 | auto char dummy; | |
10110 | if (addr == 0) | |
10111 | { | |
10112 | addr = &dummy; | |
10113 | return find_stack_direction (); | |
10114 | } | |
10115 | else | |
10116 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 10117 | } |
b757528f | 10118 | |
bec39cab AC |
10119 | int |
10120 | main () | |
10121 | { | |
81ecdfbb | 10122 | return find_stack_direction () < 0; |
bec39cab AC |
10123 | } |
10124 | _ACEOF | |
81ecdfbb | 10125 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10126 | ac_cv_c_stack_direction=1 |
10127 | else | |
81ecdfbb | 10128 | ac_cv_c_stack_direction=-1 |
a9322a30 | 10129 | fi |
81ecdfbb RW |
10130 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10131 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10132 | fi |
a9322a30 | 10133 | |
81ecdfbb RW |
10134 | fi |
10135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
10136 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
10137 | cat >>confdefs.h <<_ACEOF |
10138 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
10139 | _ACEOF | |
10140 | ||
10141 | ||
10142 | fi | |
10143 | ||
a9322a30 | 10144 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
10145 | do : |
10146 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10147 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10148 | eval as_val=\$$as_ac_Header | |
10149 | if test "x$as_val" = x""yes; then : | |
bec39cab | 10150 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10151 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 10152 | _ACEOF |
b757528f | 10153 | |
b757528f | 10154 | fi |
bec39cab | 10155 | |
a9322a30 | 10156 | done |
a3828db0 | 10157 | |
a9322a30 | 10158 | for ac_func in getpagesize |
81ecdfbb RW |
10159 | do : |
10160 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
10161 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 10162 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10163 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 10164 | _ACEOF |
bcb3dc3d | 10165 | |
bcb3dc3d MK |
10166 | fi |
10167 | done | |
10168 | ||
81ecdfbb RW |
10169 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
10170 | $as_echo_n "checking for working mmap... " >&6; } | |
10171 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
10172 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10173 | else |
81ecdfbb | 10174 | if test "$cross_compiling" = yes; then : |
a9322a30 | 10175 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 10176 | else |
81ecdfbb | 10177 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10178 | /* end confdefs.h. */ |
a9322a30 TT |
10179 | $ac_includes_default |
10180 | /* malloc might have been renamed as rpl_malloc. */ | |
10181 | #undef malloc | |
bec39cab | 10182 | |
a9322a30 TT |
10183 | /* Thanks to Mike Haertel and Jim Avera for this test. |
10184 | Here is a matrix of mmap possibilities: | |
10185 | mmap private not fixed | |
10186 | mmap private fixed at somewhere currently unmapped | |
10187 | mmap private fixed at somewhere already mapped | |
10188 | mmap shared not fixed | |
10189 | mmap shared fixed at somewhere currently unmapped | |
10190 | mmap shared fixed at somewhere already mapped | |
10191 | For private mappings, we should verify that changes cannot be read() | |
10192 | back from the file, nor mmap's back from the file at a different | |
10193 | address. (There have been systems where private was not correctly | |
10194 | implemented like the infamous i386 svr4.0, and systems where the | |
10195 | VM page cache was not coherent with the file system buffer cache | |
10196 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
10197 | For shared mappings, we should conversely verify that changes get | |
10198 | propagated back to all the places they're supposed to be. | |
bec39cab | 10199 | |
a9322a30 TT |
10200 | Grep wants private fixed already mapped. |
10201 | The main things grep needs to know about mmap are: | |
10202 | * does it exist and is it safe to write into the mmap'd area | |
10203 | * how to use it (BSD variants) */ | |
8b9cf735 | 10204 | |
a9322a30 TT |
10205 | #include <fcntl.h> |
10206 | #include <sys/mman.h> | |
8b9cf735 | 10207 | |
81ecdfbb | 10208 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 10209 | char *malloc (); |
a3828db0 MK |
10210 | #endif |
10211 | ||
a9322a30 | 10212 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 10213 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 10214 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 10215 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
10216 | # define HAVE_SYS_PARAM_H 1 |
10217 | # endif | |
10218 | ||
10219 | # ifdef _SC_PAGESIZE | |
10220 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
10221 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 10222 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
10223 | # include <sys/param.h> |
10224 | # ifdef EXEC_PAGESIZE | |
10225 | # define getpagesize() EXEC_PAGESIZE | |
10226 | # else /* no EXEC_PAGESIZE */ | |
10227 | # ifdef NBPG | |
10228 | # define getpagesize() NBPG * CLSIZE | |
10229 | # ifndef CLSIZE | |
10230 | # define CLSIZE 1 | |
10231 | # endif /* no CLSIZE */ | |
10232 | # else /* no NBPG */ | |
10233 | # ifdef NBPC | |
10234 | # define getpagesize() NBPC | |
10235 | # else /* no NBPC */ | |
10236 | # ifdef PAGESIZE | |
10237 | # define getpagesize() PAGESIZE | |
10238 | # endif /* PAGESIZE */ | |
10239 | # endif /* no NBPC */ | |
10240 | # endif /* no NBPG */ | |
10241 | # endif /* no EXEC_PAGESIZE */ | |
10242 | # else /* no HAVE_SYS_PARAM_H */ | |
10243 | # define getpagesize() 8192 /* punt totally */ | |
10244 | # endif /* no HAVE_SYS_PARAM_H */ | |
10245 | # endif /* no _SC_PAGESIZE */ | |
10246 | ||
10247 | #endif /* no HAVE_GETPAGESIZE */ | |
10248 | ||
bec39cab AC |
10249 | int |
10250 | main () | |
10251 | { | |
a9322a30 TT |
10252 | char *data, *data2, *data3; |
10253 | int i, pagesize; | |
10254 | int fd; | |
10255 | ||
10256 | pagesize = getpagesize (); | |
10257 | ||
10258 | /* First, make a file with some known garbage in it. */ | |
10259 | data = (char *) malloc (pagesize); | |
10260 | if (!data) | |
81ecdfbb | 10261 | return 1; |
a9322a30 TT |
10262 | for (i = 0; i < pagesize; ++i) |
10263 | *(data + i) = rand (); | |
10264 | umask (0); | |
10265 | fd = creat ("conftest.mmap", 0600); | |
10266 | if (fd < 0) | |
81ecdfbb | 10267 | return 1; |
a9322a30 | 10268 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 10269 | return 1; |
a9322a30 TT |
10270 | close (fd); |
10271 | ||
10272 | /* Next, try to mmap the file at a fixed address which already has | |
10273 | something else allocated at it. If we can, also make sure that | |
10274 | we see the same garbage. */ | |
10275 | fd = open ("conftest.mmap", O_RDWR); | |
10276 | if (fd < 0) | |
81ecdfbb | 10277 | return 1; |
a9322a30 TT |
10278 | data2 = (char *) malloc (2 * pagesize); |
10279 | if (!data2) | |
81ecdfbb RW |
10280 | return 1; |
10281 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
10282 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
10283 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 10284 | return 1; |
a9322a30 TT |
10285 | for (i = 0; i < pagesize; ++i) |
10286 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 10287 | return 1; |
a9322a30 TT |
10288 | |
10289 | /* Finally, make sure that changes to the mapped area do not | |
10290 | percolate back to the file as seen by read(). (This is a bug on | |
10291 | some variants of i386 svr4.0.) */ | |
10292 | for (i = 0; i < pagesize; ++i) | |
10293 | *(data2 + i) = *(data2 + i) + 1; | |
10294 | data3 = (char *) malloc (pagesize); | |
10295 | if (!data3) | |
81ecdfbb | 10296 | return 1; |
a9322a30 | 10297 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 10298 | return 1; |
a9322a30 TT |
10299 | for (i = 0; i < pagesize; ++i) |
10300 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 10301 | return 1; |
a9322a30 | 10302 | close (fd); |
81ecdfbb | 10303 | return 0; |
bec39cab AC |
10304 | } |
10305 | _ACEOF | |
81ecdfbb | 10306 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 10307 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 10308 | else |
81ecdfbb | 10309 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 10310 | fi |
81ecdfbb RW |
10311 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10312 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 10313 | fi |
81ecdfbb | 10314 | |
a9322a30 | 10315 | fi |
81ecdfbb RW |
10316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
10317 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
10318 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
10319 | ||
81ecdfbb | 10320 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 10321 | |
086ec9eb | 10322 | fi |
a9322a30 | 10323 | rm -f conftest.mmap |
a3828db0 | 10324 | |
81ecdfbb RW |
10325 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
10326 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 10327 | |
a9322a30 TT |
10328 | else |
10329 | ||
10330 | cat >>confdefs.h <<_ACEOF | |
10331 | #define pid_t int | |
bec39cab | 10332 | _ACEOF |
086ec9eb MK |
10333 | |
10334 | fi | |
10335 | ||
81ecdfbb RW |
10336 | for ac_header in vfork.h |
10337 | do : | |
10338 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
10339 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 10340 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10341 | #define HAVE_VFORK_H 1 |
bec39cab | 10342 | _ACEOF |
c906108c SS |
10343 | |
10344 | fi | |
a9322a30 | 10345 | |
a3828db0 | 10346 | done |
c906108c | 10347 | |
a9322a30 | 10348 | for ac_func in fork vfork |
81ecdfbb RW |
10349 | do : |
10350 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10351 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10352 | eval as_val=\$$as_ac_var | |
10353 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 10354 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10355 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 10356 | _ACEOF |
b83266a0 | 10357 | |
97bf5e38 | 10358 | fi |
a3828db0 | 10359 | done |
b83266a0 | 10360 | |
a9322a30 | 10361 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
10362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
10363 | $as_echo_n "checking for working fork... " >&6; } | |
10364 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
10365 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10366 | else |
81ecdfbb | 10367 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10368 | ac_cv_func_fork_works=cross |
10369 | else | |
81ecdfbb RW |
10370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10371 | /* end confdefs.h. */ | |
10372 | $ac_includes_default | |
10373 | int | |
10374 | main () | |
10375 | { | |
10376 | ||
10377 | /* By Ruediger Kuhlmann. */ | |
10378 | return fork () < 0; | |
10379 | ||
10380 | ; | |
10381 | return 0; | |
10382 | } | |
a9322a30 | 10383 | _ACEOF |
81ecdfbb | 10384 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10385 | ac_cv_func_fork_works=yes |
10386 | else | |
81ecdfbb | 10387 | ac_cv_func_fork_works=no |
a9322a30 | 10388 | fi |
81ecdfbb RW |
10389 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10390 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10391 | fi |
81ecdfbb | 10392 | |
a9322a30 | 10393 | fi |
81ecdfbb RW |
10394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
10395 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
10396 | |
10397 | else | |
10398 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10399 | fi | |
10400 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10401 | case $host in | |
10402 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10403 | # Override, as these systems have only a dummy fork() stub | |
10404 | ac_cv_func_fork_works=no | |
10405 | ;; | |
10406 | *) | |
10407 | ac_cv_func_fork_works=yes | |
10408 | ;; | |
10409 | esac | |
81ecdfbb RW |
10410 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
10411 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10412 | fi |
10413 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
10414 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
10415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
10416 | $as_echo_n "checking for working vfork... " >&6; } | |
10417 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
10418 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10419 | else |
81ecdfbb | 10420 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10421 | ac_cv_func_vfork_works=cross |
10422 | else | |
81ecdfbb | 10423 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
10424 | /* end confdefs.h. */ |
10425 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 10426 | $ac_includes_default |
a9322a30 | 10427 | #include <sys/wait.h> |
81ecdfbb | 10428 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
10429 | # include <vfork.h> |
10430 | #endif | |
10431 | /* On some sparc systems, changes by the child to local and incoming | |
10432 | argument registers are propagated back to the parent. The compiler | |
10433 | is told about this with #include <vfork.h>, but some compilers | |
10434 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10435 | static variable whose address is put into a register that is | |
10436 | clobbered by the vfork. */ | |
10437 | static void | |
10438 | #ifdef __cplusplus | |
10439 | sparc_address_test (int arg) | |
10440 | # else | |
10441 | sparc_address_test (arg) int arg; | |
10442 | #endif | |
10443 | { | |
10444 | static pid_t child; | |
10445 | if (!child) { | |
10446 | child = vfork (); | |
10447 | if (child < 0) { | |
10448 | perror ("vfork"); | |
10449 | _exit(2); | |
10450 | } | |
10451 | if (!child) { | |
10452 | arg = getpid(); | |
10453 | write(-1, "", 0); | |
10454 | _exit (arg); | |
10455 | } | |
10456 | } | |
10457 | } | |
10458 | ||
10459 | int | |
10460 | main () | |
10461 | { | |
10462 | pid_t parent = getpid (); | |
10463 | pid_t child; | |
10464 | ||
10465 | sparc_address_test (0); | |
10466 | ||
10467 | child = vfork (); | |
10468 | ||
10469 | if (child == 0) { | |
10470 | /* Here is another test for sparc vfork register problems. This | |
10471 | test uses lots of local variables, at least as many local | |
10472 | variables as main has allocated so far including compiler | |
10473 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10474 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10475 | reuse the register of parent for one of the local variables, | |
10476 | since it will think that parent can't possibly be used any more | |
10477 | in this routine. Assigning to the local variable will thus | |
10478 | munge parent in the parent process. */ | |
10479 | pid_t | |
10480 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10481 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10482 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10483 | use the same hardware register for all 8 local variables. */ | |
10484 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10485 | || p != p5 || p != p6 || p != p7) | |
10486 | _exit(1); | |
10487 | ||
10488 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10489 | from child file descriptors. If the child closes a descriptor | |
10490 | before it execs or exits, this munges the parent's descriptor | |
10491 | as well. Test for this by closing stdout in the child. */ | |
10492 | _exit(close(fileno(stdout)) != 0); | |
10493 | } else { | |
10494 | int status; | |
10495 | struct stat st; | |
10496 | ||
10497 | while (wait(&status) != child) | |
10498 | ; | |
81ecdfbb | 10499 | return ( |
a9322a30 TT |
10500 | /* Was there some problem with vforking? */ |
10501 | child < 0 | |
10502 | ||
10503 | /* Did the child fail? (This shouldn't happen.) */ | |
10504 | || status | |
10505 | ||
10506 | /* Did the vfork/compiler bug occur? */ | |
10507 | || parent != getpid() | |
10508 | ||
10509 | /* Did the file descriptor bug occur? */ | |
10510 | || fstat(fileno(stdout), &st) != 0 | |
10511 | ); | |
10512 | } | |
10513 | } | |
10514 | _ACEOF | |
81ecdfbb | 10515 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10516 | ac_cv_func_vfork_works=yes |
10517 | else | |
81ecdfbb | 10518 | ac_cv_func_vfork_works=no |
a9322a30 | 10519 | fi |
81ecdfbb RW |
10520 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10521 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10522 | fi |
81ecdfbb | 10523 | |
a9322a30 | 10524 | fi |
81ecdfbb RW |
10525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10526 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10527 | |
10528 | fi; | |
10529 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10530 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10531 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10532 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10533 | fi |
10534 | ||
10535 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10536 | ||
81ecdfbb | 10537 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10538 | |
10539 | else | |
10540 | ||
81ecdfbb | 10541 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10542 | |
10543 | fi | |
10544 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10545 | ||
81ecdfbb | 10546 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10547 | |
10548 | fi | |
10549 | ||
7313baad | 10550 | for ac_func in canonicalize_file_name realpath getrusage getuid getgid \ |
b9e7b9c3 | 10551 | pipe poll pread pread64 pwrite readlink resize_term \ |
7313baad | 10552 | sbrk setpgid setpgrp setsid \ |
9467110b | 10553 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 10554 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
614c279d | 10555 | setrlimit getrlimit posix_madvise waitpid lstat \ |
992c7d70 | 10556 | ptrace64 sigaltstack |
81ecdfbb RW |
10557 | do : |
10558 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10559 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10560 | eval as_val=\$$as_ac_var | |
10561 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10562 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10563 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10564 | _ACEOF |
10565 | ||
10566 | fi | |
10567 | done | |
10568 | ||
10569 | ||
81ecdfbb RW |
10570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10571 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10572 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10573 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10574 | else |
81ecdfbb | 10575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10576 | /* end confdefs.h. */ |
10577 | #include <langinfo.h> | |
10578 | int | |
10579 | main () | |
10580 | { | |
10581 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10582 | ; |
10583 | return 0; | |
10584 | } | |
10585 | _ACEOF | |
81ecdfbb | 10586 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10587 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10588 | else |
81ecdfbb | 10589 | am_cv_langinfo_codeset=no |
a4db0f07 | 10590 | fi |
81ecdfbb RW |
10591 | rm -f core conftest.err conftest.$ac_objext \ |
10592 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10593 | |
a4db0f07 | 10594 | fi |
81ecdfbb RW |
10595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10596 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10597 | if test $am_cv_langinfo_codeset = yes; then |
10598 | ||
81ecdfbb | 10599 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10600 | |
6c7a06a3 | 10601 | fi |
c906108c | 10602 | |
06825bd1 | 10603 | |
3266f10b TT |
10604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
10605 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
10606 | if test "${ac_cv_header_stdc+set}" = set; then : | |
10607 | $as_echo_n "(cached) " >&6 | |
10608 | else | |
10609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10610 | /* end confdefs.h. */ | |
10611 | #include <stdlib.h> | |
10612 | #include <stdarg.h> | |
10613 | #include <string.h> | |
10614 | #include <float.h> | |
10615 | ||
10616 | int | |
10617 | main () | |
10618 | { | |
10619 | ||
10620 | ; | |
10621 | return 0; | |
10622 | } | |
10623 | _ACEOF | |
10624 | if ac_fn_c_try_compile "$LINENO"; then : | |
10625 | ac_cv_header_stdc=yes | |
10626 | else | |
10627 | ac_cv_header_stdc=no | |
10628 | fi | |
10629 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10630 | ||
10631 | if test $ac_cv_header_stdc = yes; then | |
10632 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
10633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10634 | /* end confdefs.h. */ | |
10635 | #include <string.h> | |
10636 | ||
10637 | _ACEOF | |
10638 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10639 | $EGREP "memchr" >/dev/null 2>&1; then : | |
10640 | ||
10641 | else | |
10642 | ac_cv_header_stdc=no | |
10643 | fi | |
10644 | rm -f conftest* | |
10645 | ||
10646 | fi | |
10647 | ||
10648 | if test $ac_cv_header_stdc = yes; then | |
10649 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
10650 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10651 | /* end confdefs.h. */ | |
10652 | #include <stdlib.h> | |
10653 | ||
10654 | _ACEOF | |
10655 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10656 | $EGREP "free" >/dev/null 2>&1; then : | |
10657 | ||
10658 | else | |
10659 | ac_cv_header_stdc=no | |
10660 | fi | |
10661 | rm -f conftest* | |
10662 | ||
10663 | fi | |
10664 | ||
10665 | if test $ac_cv_header_stdc = yes; then | |
10666 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
10667 | if test "$cross_compiling" = yes; then : | |
10668 | : | |
10669 | else | |
10670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10671 | /* end confdefs.h. */ | |
10672 | #include <ctype.h> | |
10673 | #include <stdlib.h> | |
10674 | #if ((' ' & 0x0FF) == 0x020) | |
10675 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
10676 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
10677 | #else | |
10678 | # define ISLOWER(c) \ | |
10679 | (('a' <= (c) && (c) <= 'i') \ | |
10680 | || ('j' <= (c) && (c) <= 'r') \ | |
10681 | || ('s' <= (c) && (c) <= 'z')) | |
10682 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
10683 | #endif | |
10684 | ||
10685 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
10686 | int | |
10687 | main () | |
10688 | { | |
10689 | int i; | |
10690 | for (i = 0; i < 256; i++) | |
10691 | if (XOR (islower (i), ISLOWER (i)) | |
10692 | || toupper (i) != TOUPPER (i)) | |
10693 | return 2; | |
10694 | return 0; | |
10695 | } | |
10696 | _ACEOF | |
10697 | if ac_fn_c_try_run "$LINENO"; then : | |
10698 | ||
10699 | else | |
10700 | ac_cv_header_stdc=no | |
10701 | fi | |
10702 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10703 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10704 | fi | |
10705 | ||
10706 | fi | |
10707 | fi | |
10708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
10709 | $as_echo "$ac_cv_header_stdc" >&6; } | |
10710 | if test $ac_cv_header_stdc = yes; then | |
10711 | ||
10712 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
10713 | ||
3266f10b TT |
10714 | fi |
10715 | ||
10716 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
10717 | # for constant arguments. Useless! | |
10718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
10719 | $as_echo_n "checking for working alloca.h... " >&6; } | |
10720 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
10721 | $as_echo_n "(cached) " >&6 | |
10722 | else | |
10723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10724 | /* end confdefs.h. */ | |
10725 | #include <alloca.h> | |
10726 | int | |
10727 | main () | |
10728 | { | |
10729 | char *p = (char *) alloca (2 * sizeof (int)); | |
10730 | if (p) return 0; | |
10731 | ; | |
10732 | return 0; | |
10733 | } | |
10734 | _ACEOF | |
10735 | if ac_fn_c_try_link "$LINENO"; then : | |
10736 | ac_cv_working_alloca_h=yes | |
10737 | else | |
10738 | ac_cv_working_alloca_h=no | |
10739 | fi | |
10740 | rm -f core conftest.err conftest.$ac_objext \ | |
10741 | conftest$ac_exeext conftest.$ac_ext | |
10742 | fi | |
10743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
10744 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
10745 | if test $ac_cv_working_alloca_h = yes; then | |
10746 | ||
10747 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
10748 | ||
10749 | fi | |
10750 | ||
10751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
10752 | $as_echo_n "checking for alloca... " >&6; } | |
10753 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
10754 | $as_echo_n "(cached) " >&6 | |
10755 | else | |
10756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10757 | /* end confdefs.h. */ | |
10758 | #ifdef __GNUC__ | |
10759 | # define alloca __builtin_alloca | |
10760 | #else | |
10761 | # ifdef _MSC_VER | |
10762 | # include <malloc.h> | |
10763 | # define alloca _alloca | |
10764 | # else | |
10765 | # ifdef HAVE_ALLOCA_H | |
10766 | # include <alloca.h> | |
10767 | # else | |
10768 | # ifdef _AIX | |
10769 | #pragma alloca | |
10770 | # else | |
10771 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
10772 | char *alloca (); | |
10773 | # endif | |
10774 | # endif | |
10775 | # endif | |
10776 | # endif | |
10777 | #endif | |
10778 | ||
10779 | int | |
10780 | main () | |
10781 | { | |
10782 | char *p = (char *) alloca (1); | |
10783 | if (p) return 0; | |
10784 | ; | |
10785 | return 0; | |
10786 | } | |
10787 | _ACEOF | |
10788 | if ac_fn_c_try_link "$LINENO"; then : | |
10789 | ac_cv_func_alloca_works=yes | |
10790 | else | |
10791 | ac_cv_func_alloca_works=no | |
10792 | fi | |
10793 | rm -f core conftest.err conftest.$ac_objext \ | |
10794 | conftest$ac_exeext conftest.$ac_ext | |
10795 | fi | |
10796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
10797 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
10798 | ||
10799 | if test $ac_cv_func_alloca_works = yes; then | |
10800 | ||
10801 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
10802 | ||
10803 | else | |
10804 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
10805 | # that cause trouble. Some versions do not even contain alloca or | |
10806 | # contain a buggy version. If you still want to use their alloca, | |
10807 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
10808 | ||
10809 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
10810 | ||
10811 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
10812 | ||
10813 | ||
10814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
10815 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
10816 | if test "${ac_cv_os_cray+set}" = set; then : | |
10817 | $as_echo_n "(cached) " >&6 | |
10818 | else | |
10819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10820 | /* end confdefs.h. */ | |
10821 | #if defined CRAY && ! defined CRAY2 | |
10822 | webecray | |
10823 | #else | |
10824 | wenotbecray | |
10825 | #endif | |
10826 | ||
10827 | _ACEOF | |
10828 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10829 | $EGREP "webecray" >/dev/null 2>&1; then : | |
10830 | ac_cv_os_cray=yes | |
10831 | else | |
10832 | ac_cv_os_cray=no | |
10833 | fi | |
10834 | rm -f conftest* | |
10835 | ||
10836 | fi | |
10837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
10838 | $as_echo "$ac_cv_os_cray" >&6; } | |
10839 | if test $ac_cv_os_cray = yes; then | |
10840 | for ac_func in _getb67 GETB67 getb67; do | |
10841 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10842 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10843 | eval as_val=\$$as_ac_var | |
10844 | if test "x$as_val" = x""yes; then : | |
10845 | ||
10846 | cat >>confdefs.h <<_ACEOF | |
10847 | #define CRAY_STACKSEG_END $ac_func | |
10848 | _ACEOF | |
10849 | ||
10850 | break | |
10851 | fi | |
10852 | ||
10853 | done | |
10854 | fi | |
10855 | ||
10856 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
10857 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
10858 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
10859 | $as_echo_n "(cached) " >&6 | |
10860 | else | |
10861 | if test "$cross_compiling" = yes; then : | |
10862 | ac_cv_c_stack_direction=0 | |
10863 | else | |
10864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10865 | /* end confdefs.h. */ | |
10866 | $ac_includes_default | |
10867 | int | |
10868 | find_stack_direction () | |
10869 | { | |
10870 | static char *addr = 0; | |
10871 | auto char dummy; | |
10872 | if (addr == 0) | |
10873 | { | |
10874 | addr = &dummy; | |
10875 | return find_stack_direction (); | |
10876 | } | |
10877 | else | |
10878 | return (&dummy > addr) ? 1 : -1; | |
10879 | } | |
10880 | ||
10881 | int | |
10882 | main () | |
10883 | { | |
10884 | return find_stack_direction () < 0; | |
10885 | } | |
10886 | _ACEOF | |
10887 | if ac_fn_c_try_run "$LINENO"; then : | |
10888 | ac_cv_c_stack_direction=1 | |
10889 | else | |
10890 | ac_cv_c_stack_direction=-1 | |
10891 | fi | |
10892 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10893 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10894 | fi | |
10895 | ||
10896 | fi | |
10897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
10898 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
10899 | cat >>confdefs.h <<_ACEOF | |
10900 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
10901 | _ACEOF | |
10902 | ||
10903 | ||
10904 | fi | |
10905 | ||
10906 | ||
10907 | ||
10908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
10909 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10910 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10911 | $as_echo_n "(cached) " >&6 | |
10912 | else | |
10913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10914 | /* end confdefs.h. */ | |
10915 | #include <langinfo.h> | |
10916 | int | |
10917 | main () | |
10918 | { | |
10919 | char* cs = nl_langinfo(CODESET); | |
10920 | ; | |
10921 | return 0; | |
10922 | } | |
10923 | _ACEOF | |
10924 | if ac_fn_c_try_link "$LINENO"; then : | |
10925 | am_cv_langinfo_codeset=yes | |
10926 | else | |
10927 | am_cv_langinfo_codeset=no | |
10928 | fi | |
10929 | rm -f core conftest.err conftest.$ac_objext \ | |
10930 | conftest$ac_exeext conftest.$ac_ext | |
10931 | ||
10932 | fi | |
10933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
10934 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
10935 | if test $am_cv_langinfo_codeset = yes; then | |
10936 | ||
10937 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
10938 | ||
10939 | fi | |
10940 | ||
10941 | ||
a3d08894 | 10942 | 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 |
10943 | do : |
10944 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10945 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10946 | eval as_val=\$$as_ac_Header | |
10947 | if test "x$as_val" = x""yes; then : | |
10948 | cat >>confdefs.h <<_ACEOF | |
10949 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10950 | _ACEOF | |
10951 | ||
10952 | fi | |
10953 | ||
10954 | done | |
10955 | ||
10956 | ||
10957 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair | |
10958 | do : | |
10959 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10960 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10961 | eval as_val=\$$as_ac_var | |
10962 | if test "x$as_val" = x""yes; then : | |
10963 | cat >>confdefs.h <<_ACEOF | |
10964 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10965 | _ACEOF | |
10966 | ||
10967 | fi | |
10968 | done | |
10969 | ||
10970 | ||
10971 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
10972 | if test "x$ac_cv_have_decl_strerror" = 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_STRERROR $ac_have_decl | |
10980 | _ACEOF | |
10981 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
10982 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
10983 | ac_have_decl=1 | |
10984 | else | |
10985 | ac_have_decl=0 | |
10986 | fi | |
10987 | ||
10988 | cat >>confdefs.h <<_ACEOF | |
10989 | #define HAVE_DECL_STRSTR $ac_have_decl | |
10990 | _ACEOF | |
10991 | ||
10992 | ||
10993 | ||
a3828db0 MK |
10994 | # Check the return and argument types of ptrace. No canned test for |
10995 | # this, so roll our own. | |
10996 | gdb_ptrace_headers=' | |
4ff70b84 | 10997 | #include <sys/types.h> |
a3828db0 MK |
10998 | #if HAVE_SYS_PTRACE_H |
10999 | # include <sys/ptrace.h> | |
11000 | #endif | |
11001 | #if HAVE_UNISTD_H | |
11002 | # include <unistd.h> | |
11003 | #endif | |
11004 | ' | |
11005 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
11006 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
11007 | " | |
11008 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
11009 | ac_have_decl=1 | |
06825bd1 | 11010 | else |
81ecdfbb | 11011 | ac_have_decl=0 |
06825bd1 | 11012 | fi |
06825bd1 | 11013 | |
a3828db0 | 11014 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11015 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 11016 | _ACEOF |
81ecdfbb | 11017 | if test $ac_have_decl = 1; then : |
bec39cab | 11018 | |
a3828db0 | 11019 | else |
a3828db0 MK |
11020 | |
11021 | : ${gdb_cv_func_ptrace_ret='int'} | |
11022 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
11023 | ||
06825bd1 MK |
11024 | fi |
11025 | ||
064ef605 DJ |
11026 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
11027 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
11028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
11029 | $as_echo_n "checking return type of ptrace... " >&6; } | |
11030 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
11031 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11032 | else |
81ecdfbb | 11033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11034 | /* end confdefs.h. */ |
a3828db0 | 11035 | $gdb_ptrace_headers |
bec39cab AC |
11036 | int |
11037 | main () | |
11038 | { | |
064ef605 DJ |
11039 | extern long ptrace (enum __ptrace_request, ...); |
11040 | ; | |
11041 | return 0; | |
11042 | } | |
11043 | _ACEOF | |
81ecdfbb | 11044 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
11045 | gdb_cv_func_ptrace_ret='long' |
11046 | else | |
81ecdfbb | 11047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
11048 | /* end confdefs.h. */ |
11049 | $gdb_ptrace_headers | |
11050 | int | |
11051 | main () | |
11052 | { | |
a3828db0 | 11053 | extern int ptrace (); |
bec39cab AC |
11054 | ; |
11055 | return 0; | |
11056 | } | |
11057 | _ACEOF | |
81ecdfbb | 11058 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11059 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 11060 | else |
81ecdfbb | 11061 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 11062 | fi |
81ecdfbb | 11063 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 11064 | fi |
81ecdfbb | 11065 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 11066 | fi |
81ecdfbb RW |
11067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
11068 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 11069 | |
a3828db0 MK |
11070 | cat >>confdefs.h <<_ACEOF |
11071 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 11072 | _ACEOF |
70f9f479 | 11073 | |
a3828db0 | 11074 | # Check argument types. |
81ecdfbb RW |
11075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
11076 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
11077 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
11078 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11079 | else |
a3828db0 | 11080 | |
81ecdfbb | 11081 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
11082 | /* end confdefs.h. */ |
11083 | $gdb_ptrace_headers | |
11084 | int | |
11085 | main () | |
11086 | { | |
11087 | extern long ptrace (enum __ptrace_request, ...); | |
11088 | ; | |
11089 | return 0; | |
11090 | } | |
11091 | _ACEOF | |
81ecdfbb | 11092 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
11093 | gdb_cv_func_ptrace_args='int,int,long,long' |
11094 | else | |
064ef605 | 11095 | |
a3828db0 MK |
11096 | for gdb_arg1 in 'int' 'long'; do |
11097 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 11098 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 11099 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 11100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11101 | /* end confdefs.h. */ |
a3828db0 | 11102 | $gdb_ptrace_headers |
bec39cab AC |
11103 | int |
11104 | main () | |
11105 | { | |
a3828db0 MK |
11106 | |
11107 | extern $gdb_cv_func_ptrace_ret | |
11108 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
11109 | ||
bec39cab AC |
11110 | ; |
11111 | return 0; | |
11112 | } | |
11113 | _ACEOF | |
81ecdfbb | 11114 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
11115 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
11116 | break 4; | |
5c7f2947 | 11117 | fi |
81ecdfbb | 11118 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 11119 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 11120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11121 | /* end confdefs.h. */ |
a3828db0 | 11122 | $gdb_ptrace_headers |
bec39cab AC |
11123 | int |
11124 | main () | |
11125 | { | |
a3828db0 MK |
11126 | |
11127 | extern $gdb_cv_func_ptrace_ret | |
11128 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
11129 | ||
bec39cab AC |
11130 | ; |
11131 | return 0; | |
11132 | } | |
11133 | _ACEOF | |
81ecdfbb | 11134 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
11135 | |
11136 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
11137 | break 5; | |
78434e59 | 11138 | fi |
81ecdfbb | 11139 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
11140 | done |
11141 | done | |
11142 | done | |
11143 | done | |
11144 | done | |
11145 | # Provide a safe default value. | |
11146 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
11147 | ||
064ef605 | 11148 | fi |
81ecdfbb | 11149 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 11150 | fi |
81ecdfbb RW |
11151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
11152 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
11153 | ac_save_IFS=$IFS; IFS=',' |
11154 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
11155 | IFS=$ac_save_IFS | |
11156 | shift | |
bec39cab | 11157 | |
a3828db0 MK |
11158 | cat >>confdefs.h <<_ACEOF |
11159 | #define PTRACE_TYPE_ARG3 $3 | |
11160 | _ACEOF | |
11161 | ||
96d7229d LM |
11162 | |
11163 | cat >>confdefs.h <<_ACEOF | |
11164 | #define PTRACE_TYPE_ARG4 $4 | |
11165 | _ACEOF | |
11166 | ||
a3828db0 MK |
11167 | if test -n "$5"; then |
11168 | ||
11169 | cat >>confdefs.h <<_ACEOF | |
11170 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 11171 | _ACEOF |
78434e59 MK |
11172 | |
11173 | fi | |
11174 | ||
a3828db0 | 11175 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
11176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
11177 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
11178 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
11179 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 11180 | else |
81ecdfbb RW |
11181 | if test "$cross_compiling" = yes; then : |
11182 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 11183 | else |
81ecdfbb | 11184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11185 | /* end confdefs.h. */ |
81ecdfbb | 11186 | $ac_includes_default |
bec39cab AC |
11187 | int |
11188 | main () | |
11189 | { | |
a3828db0 MK |
11190 | /* If this system has a BSD-style setpgrp which takes arguments, |
11191 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
11192 | exit successfully. */ | |
81ecdfbb | 11193 | return setpgrp (1,1) != -1; |
bec39cab AC |
11194 | ; |
11195 | return 0; | |
11196 | } | |
11197 | _ACEOF | |
81ecdfbb | 11198 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 11199 | ac_cv_func_setpgrp_void=no |
c906108c | 11200 | else |
81ecdfbb | 11201 | ac_cv_func_setpgrp_void=yes |
c906108c | 11202 | fi |
81ecdfbb RW |
11203 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11204 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11205 | fi |
81ecdfbb | 11206 | |
a3828db0 | 11207 | fi |
81ecdfbb RW |
11208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
11209 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
11210 | if test $ac_cv_func_setpgrp_void = yes; then |
11211 | ||
81ecdfbb | 11212 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
11213 | |
11214 | fi | |
a3828db0 MK |
11215 | |
11216 | else | |
81ecdfbb RW |
11217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
11218 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
11219 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
11220 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11221 | else |
81ecdfbb | 11222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11223 | /* end confdefs.h. */ |
a3828db0 MK |
11224 | |
11225 | #include <unistd.h> | |
11226 | ||
bec39cab AC |
11227 | int |
11228 | main () | |
11229 | { | |
a3828db0 MK |
11230 | |
11231 | if (setpgrp(1,1) == -1) | |
11232 | exit (0); | |
11233 | else | |
11234 | exit (1); | |
11235 | ||
bec39cab AC |
11236 | ; |
11237 | return 0; | |
11238 | } | |
11239 | _ACEOF | |
81ecdfbb | 11240 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11241 | ac_cv_func_setpgrp_void=no |
c906108c | 11242 | else |
81ecdfbb | 11243 | ac_cv_func_setpgrp_void=yes |
c906108c | 11244 | fi |
81ecdfbb | 11245 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11246 | fi |
81ecdfbb RW |
11247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
11248 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 11249 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 11250 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 11251 | |
a3828db0 | 11252 | fi |
c906108c SS |
11253 | fi |
11254 | ||
a3828db0 MK |
11255 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
11256 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
11257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
11258 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
11259 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
11260 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11261 | else |
81ecdfbb | 11262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11263 | /* end confdefs.h. */ |
a3828db0 MK |
11264 | |
11265 | #include <setjmp.h> | |
11266 | ||
bec39cab AC |
11267 | int |
11268 | main () | |
11269 | { | |
a3828db0 | 11270 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
11271 | ; |
11272 | return 0; | |
11273 | } | |
11274 | _ACEOF | |
81ecdfbb | 11275 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11276 | gdb_cv_func_sigsetjmp=yes |
c906108c | 11277 | else |
81ecdfbb | 11278 | gdb_cv_func_sigsetjmp=no |
c906108c | 11279 | fi |
81ecdfbb | 11280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11281 | fi |
81ecdfbb RW |
11282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
11283 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 11284 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 11285 | |
81ecdfbb | 11286 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 11287 | |
97bf5e38 | 11288 | fi |
c906108c | 11289 | |
a3828db0 MK |
11290 | # Assume we'll default to using the included libiberty regex. |
11291 | gdb_use_included_regex=yes | |
11292 | ||
11293 | # However, if the system regex is GNU regex, then default to *not* | |
11294 | # using the included regex. | |
81ecdfbb RW |
11295 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
11296 | $as_echo_n "checking for GNU regex... " >&6; } | |
11297 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
11298 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11299 | else |
81ecdfbb | 11300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11301 | /* end confdefs.h. */ |
a3828db0 | 11302 | #include <gnu-versions.h> |
bec39cab AC |
11303 | int |
11304 | main () | |
11305 | { | |
81ecdfbb RW |
11306 | #define REGEX_INTERFACE_VERSION 1 |
11307 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
11308 | # error "Version mismatch" | |
11309 | #endif | |
5c45e068 MK |
11310 | ; |
11311 | return 0; | |
11312 | } | |
11313 | _ACEOF | |
81ecdfbb RW |
11314 | if ac_fn_c_try_compile "$LINENO"; then : |
11315 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 11316 | else |
81ecdfbb RW |
11317 | gdb_cv_have_gnu_regex=no |
11318 | fi | |
11319 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11320 | fi | |
11321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
11322 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
11323 | if test $gdb_cv_have_gnu_regex = yes; then | |
11324 | gdb_use_included_regex=no | |
5c45e068 | 11325 | fi |
81ecdfbb RW |
11326 | |
11327 | ||
11328 | # Check whether --with-included-regex was given. | |
11329 | if test "${with_included_regex+set}" = set; then : | |
11330 | withval=$with_included_regex; gdb_with_regex=$withval | |
11331 | else | |
11332 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 11333 | fi |
81ecdfbb RW |
11334 | |
11335 | if test "$gdb_with_regex" = yes; then | |
11336 | ||
11337 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
11338 | ||
c906108c | 11339 | fi |
81ecdfbb RW |
11340 | |
11341 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
11342 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
11343 | #include <sys/proc.h> | |
11344 | ||
11345 | " | |
11346 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 11347 | |
5c45e068 | 11348 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 11349 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 11350 | _ACEOF |
c906108c | 11351 | |
5c45e068 | 11352 | |
97bf5e38 | 11353 | fi |
c906108c | 11354 | |
5c45e068 | 11355 | |
a3828db0 | 11356 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
11357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
11358 | $as_echo_n "checking for struct lwp... " >&6; } | |
11359 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
11360 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11361 | else |
81ecdfbb | 11362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11363 | /* end confdefs.h. */ |
a3828db0 MK |
11364 | #include <sys/param.h> |
11365 | #include <sys/lwp.h> | |
bec39cab AC |
11366 | int |
11367 | main () | |
11368 | { | |
a3828db0 | 11369 | struct lwp l; |
bec39cab AC |
11370 | ; |
11371 | return 0; | |
11372 | } | |
11373 | _ACEOF | |
81ecdfbb | 11374 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11375 | gdb_cv_struct_lwp=yes |
c906108c | 11376 | else |
81ecdfbb | 11377 | gdb_cv_struct_lwp=no |
c906108c | 11378 | fi |
81ecdfbb | 11379 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11380 | fi |
81ecdfbb RW |
11381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
11382 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 11383 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 11384 | |
81ecdfbb | 11385 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 11386 | |
97bf5e38 | 11387 | fi |
c906108c | 11388 | |
a3828db0 | 11389 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
11390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
11391 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
11392 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
11393 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11394 | else |
81ecdfbb | 11395 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11396 | /* end confdefs.h. */ |
a3828db0 MK |
11397 | #include <sys/types.h> |
11398 | #include <machine/reg.h> | |
bec39cab AC |
11399 | int |
11400 | main () | |
11401 | { | |
a3828db0 | 11402 | struct reg r; |
bec39cab AC |
11403 | ; |
11404 | return 0; | |
11405 | } | |
11406 | _ACEOF | |
81ecdfbb | 11407 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11408 | gdb_cv_struct_reg=yes |
27ca5dad | 11409 | else |
81ecdfbb | 11410 | gdb_cv_struct_reg=no |
27ca5dad | 11411 | fi |
81ecdfbb | 11412 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 11413 | fi |
81ecdfbb RW |
11414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
11415 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 11416 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 11417 | |
81ecdfbb | 11418 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
11419 | |
11420 | fi | |
97bf5e38 | 11421 | |
a3828db0 MK |
11422 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
11423 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
11424 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
11425 | " | |
11426 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
11427 | |
11428 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 11429 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 11430 | _ACEOF |
3862412b | 11431 | |
5c45e068 | 11432 | |
97bf5e38 | 11433 | fi |
81ecdfbb RW |
11434 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
11435 | " | |
11436 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
11437 | |
11438 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 11439 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 11440 | _ACEOF |
3862412b | 11441 | |
5c45e068 | 11442 | |
97bf5e38 | 11443 | fi |
3862412b | 11444 | |
5c45e068 | 11445 | |
6fea9e18 L |
11446 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
11447 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
11448 | # `struct user_regs_struct'. | |
11449 | 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> | |
11450 | " | |
11451 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
11452 | ||
11453 | cat >>confdefs.h <<_ACEOF | |
11454 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
11455 | _ACEOF | |
11456 | ||
11457 | ||
11458 | fi | |
11459 | 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> | |
11460 | " | |
11461 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
11462 | ||
11463 | cat >>confdefs.h <<_ACEOF | |
11464 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
11465 | _ACEOF | |
11466 | ||
11467 | ||
11468 | fi | |
11469 | ||
11470 | ||
a3828db0 | 11471 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
11473 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
11474 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
11475 | $as_echo_n "(cached) " >&6 | |
451928c5 | 11476 | else |
81ecdfbb | 11477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11478 | /* end confdefs.h. */ |
a3828db0 | 11479 | #include <sys/ptrace.h> |
bec39cab AC |
11480 | int |
11481 | main () | |
11482 | { | |
a3828db0 | 11483 | PTRACE_GETREGS; |
bec39cab AC |
11484 | ; |
11485 | return 0; | |
11486 | } | |
11487 | _ACEOF | |
81ecdfbb | 11488 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11489 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 11490 | else |
81ecdfbb | 11491 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 11492 | fi |
81ecdfbb | 11493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
11494 | fi |
11495 | ||
81ecdfbb RW |
11496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
11497 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 11498 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 11499 | |
81ecdfbb | 11500 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 11501 | |
97bf5e38 | 11502 | fi |
451928c5 | 11503 | |
a3828db0 | 11504 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
11505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
11506 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
11507 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
11508 | $as_echo_n "(cached) " >&6 | |
451928c5 | 11509 | else |
81ecdfbb | 11510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11511 | /* end confdefs.h. */ |
a3828db0 | 11512 | #include <sys/ptrace.h> |
bec39cab AC |
11513 | int |
11514 | main () | |
11515 | { | |
a3828db0 | 11516 | PTRACE_GETFPXREGS; |
bec39cab AC |
11517 | ; |
11518 | return 0; | |
11519 | } | |
11520 | _ACEOF | |
81ecdfbb | 11521 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11522 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 11523 | else |
81ecdfbb | 11524 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 11525 | fi |
81ecdfbb | 11526 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
11527 | fi |
11528 | ||
81ecdfbb RW |
11529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
11530 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 11531 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 11532 | |
81ecdfbb | 11533 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 11534 | |
97bf5e38 | 11535 | fi |
451928c5 | 11536 | |
a3828db0 | 11537 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
11538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
11539 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
11540 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
11541 | $as_echo_n "(cached) " >&6 | |
3862412b | 11542 | else |
81ecdfbb | 11543 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11544 | /* end confdefs.h. */ |
a3828db0 MK |
11545 | #include <sys/types.h> |
11546 | #include <sys/ptrace.h> | |
bec39cab AC |
11547 | int |
11548 | main () | |
11549 | { | |
a3828db0 | 11550 | PT_GETDBREGS; |
bec39cab AC |
11551 | ; |
11552 | return 0; | |
11553 | } | |
11554 | _ACEOF | |
81ecdfbb | 11555 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11556 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 11557 | else |
81ecdfbb | 11558 | gdb_cv_have_pt_getdbregs=no |
3862412b | 11559 | fi |
81ecdfbb | 11560 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
11561 | fi |
11562 | ||
81ecdfbb RW |
11563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
11564 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 11565 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 11566 | |
81ecdfbb | 11567 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 11568 | |
97bf5e38 | 11569 | fi |
3862412b | 11570 | |
a3828db0 | 11571 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
11572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
11573 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
11574 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
11575 | $as_echo_n "(cached) " >&6 | |
3862412b | 11576 | else |
81ecdfbb | 11577 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11578 | /* end confdefs.h. */ |
a3828db0 MK |
11579 | #include <sys/types.h> |
11580 | #include <sys/ptrace.h> | |
bec39cab AC |
11581 | int |
11582 | main () | |
11583 | { | |
a3828db0 | 11584 | PT_GETXMMREGS; |
bec39cab AC |
11585 | ; |
11586 | return 0; | |
11587 | } | |
11588 | _ACEOF | |
81ecdfbb | 11589 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11590 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 11591 | else |
81ecdfbb | 11592 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 11593 | fi |
81ecdfbb | 11594 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
11595 | fi |
11596 | ||
81ecdfbb RW |
11597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
11598 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 11599 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 11600 | |
81ecdfbb | 11601 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 11602 | |
97bf5e38 | 11603 | fi |
3862412b | 11604 | |
05b4bd79 | 11605 | # Detect which type of /proc is in use, such as for Solaris. |
97bf5e38 MK |
11606 | |
11607 | if test "${target}" = "${host}"; then | |
11608 | case "${host}" in | |
7b00db47 | 11609 | *-*-sysv4.2* | *-*-sysv5* ) |
60ca704f | 11610 | |
81ecdfbb | 11611 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
11612 | |
11613 | ;; | |
c162e8c9 | 11614 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 11615 | |
81ecdfbb | 11616 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
11617 | |
11618 | ;; | |
11619 | mips-sgi-irix5*) | |
11620 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 11621 | |
81ecdfbb | 11622 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
11623 | |
11624 | ;; | |
11625 | esac | |
11626 | fi | |
11627 | ||
11628 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
11629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
11630 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
11631 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
11632 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 11633 | else |
81ecdfbb | 11634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11635 | /* end confdefs.h. */ |
596c9d4b KB |
11636 | |
11637 | #define _SYSCALL32 | |
d30c5336 JK |
11638 | /* Needed for new procfs interface on sparc-solaris. */ |
11639 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 11640 | #include <sys/procfs.h> |
bec39cab AC |
11641 | int |
11642 | main () | |
11643 | { | |
97bf5e38 | 11644 | gregset_t avar |
bec39cab AC |
11645 | ; |
11646 | return 0; | |
11647 | } | |
11648 | _ACEOF | |
81ecdfbb | 11649 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11650 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 11651 | else |
81ecdfbb | 11652 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 11653 | |
596c9d4b | 11654 | fi |
81ecdfbb | 11655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
11656 | fi |
11657 | ||
97bf5e38 | 11658 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 11659 | |
81ecdfbb | 11660 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
11661 | |
11662 | fi | |
81ecdfbb RW |
11663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
11664 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 11665 | |
81ecdfbb RW |
11666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
11667 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
11668 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
11669 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 11670 | else |
81ecdfbb | 11671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11672 | /* end confdefs.h. */ |
97bf5e38 MK |
11673 | |
11674 | #define _SYSCALL32 | |
d30c5336 JK |
11675 | /* Needed for new procfs interface on sparc-solaris. */ |
11676 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 11677 | #include <sys/procfs.h> |
bec39cab AC |
11678 | int |
11679 | main () | |
11680 | { | |
97bf5e38 | 11681 | fpregset_t avar |
bec39cab AC |
11682 | ; |
11683 | return 0; | |
11684 | } | |
11685 | _ACEOF | |
81ecdfbb | 11686 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11687 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 11688 | else |
81ecdfbb | 11689 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 11690 | |
d84dd0c5 | 11691 | fi |
81ecdfbb | 11692 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
11693 | fi |
11694 | ||
97bf5e38 | 11695 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 11696 | |
81ecdfbb | 11697 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 11698 | |
97bf5e38 | 11699 | fi |
81ecdfbb RW |
11700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
11701 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 11702 | |
81ecdfbb RW |
11703 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
11704 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
11705 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
11706 | $as_echo_n "(cached) " >&6 | |
c906108c | 11707 | else |
81ecdfbb | 11708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11709 | /* end confdefs.h. */ |
c906108c | 11710 | |
97bf5e38 | 11711 | #define _SYSCALL32 |
d30c5336 JK |
11712 | /* Needed for new procfs interface on sparc-solaris. */ |
11713 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11714 | #include <sys/procfs.h> |
bec39cab AC |
11715 | int |
11716 | main () | |
11717 | { | |
97bf5e38 | 11718 | prgregset_t avar |
bec39cab AC |
11719 | ; |
11720 | return 0; | |
11721 | } | |
11722 | _ACEOF | |
81ecdfbb | 11723 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11724 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 11725 | else |
81ecdfbb | 11726 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 11727 | |
c906108c | 11728 | fi |
81ecdfbb | 11729 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11730 | fi |
11731 | ||
97bf5e38 | 11732 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 11733 | |
81ecdfbb | 11734 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 11735 | |
97bf5e38 | 11736 | fi |
81ecdfbb RW |
11737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
11738 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 11739 | |
81ecdfbb RW |
11740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
11741 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
11742 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
11743 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11744 | else |
81ecdfbb | 11745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11746 | /* end confdefs.h. */ |
97bf5e38 MK |
11747 | |
11748 | #define _SYSCALL32 | |
d30c5336 JK |
11749 | /* Needed for new procfs interface on sparc-solaris. */ |
11750 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11751 | #include <sys/procfs.h> |
bec39cab AC |
11752 | int |
11753 | main () | |
11754 | { | |
97bf5e38 | 11755 | prfpregset_t avar |
bec39cab AC |
11756 | ; |
11757 | return 0; | |
11758 | } | |
11759 | _ACEOF | |
81ecdfbb | 11760 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11761 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 11762 | else |
81ecdfbb | 11763 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 11764 | |
d45fe813 | 11765 | fi |
81ecdfbb | 11766 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11767 | fi |
11768 | ||
97bf5e38 | 11769 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 11770 | |
81ecdfbb | 11771 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 11772 | |
97bf5e38 | 11773 | fi |
81ecdfbb RW |
11774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
11775 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 11776 | |
81ecdfbb RW |
11777 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
11778 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
11779 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
11780 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11781 | else |
81ecdfbb | 11782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11783 | /* end confdefs.h. */ |
97bf5e38 MK |
11784 | |
11785 | #define _SYSCALL32 | |
d30c5336 JK |
11786 | /* Needed for new procfs interface on sparc-solaris. */ |
11787 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11788 | #include <sys/procfs.h> |
bec39cab AC |
11789 | int |
11790 | main () | |
11791 | { | |
97bf5e38 | 11792 | prgregset32_t avar |
bec39cab AC |
11793 | ; |
11794 | return 0; | |
11795 | } | |
11796 | _ACEOF | |
81ecdfbb | 11797 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11798 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 11799 | else |
81ecdfbb | 11800 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 11801 | |
d45fe813 | 11802 | fi |
81ecdfbb | 11803 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11804 | fi |
11805 | ||
97bf5e38 | 11806 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 11807 | |
81ecdfbb | 11808 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 11809 | |
97bf5e38 | 11810 | fi |
81ecdfbb RW |
11811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
11812 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 11813 | |
81ecdfbb RW |
11814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11815 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11816 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11817 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11818 | else |
81ecdfbb | 11819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11820 | /* end confdefs.h. */ |
97bf5e38 | 11821 | |
d45fe813 | 11822 | #define _SYSCALL32 |
d30c5336 JK |
11823 | /* Needed for new procfs interface on sparc-solaris. */ |
11824 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11825 | #include <sys/procfs.h> |
bec39cab AC |
11826 | int |
11827 | main () | |
11828 | { | |
97bf5e38 | 11829 | lwpid_t avar |
bec39cab AC |
11830 | ; |
11831 | return 0; | |
11832 | } | |
11833 | _ACEOF | |
81ecdfbb | 11834 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11835 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11836 | else |
81ecdfbb | 11837 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11838 | |
d45fe813 | 11839 | fi |
81ecdfbb | 11840 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11841 | fi |
11842 | ||
97bf5e38 | 11843 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11844 | |
81ecdfbb | 11845 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11846 | |
97bf5e38 | 11847 | fi |
81ecdfbb RW |
11848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11849 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11850 | |
81ecdfbb RW |
11851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11852 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11853 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11854 | $as_echo_n "(cached) " >&6 | |
c906108c | 11855 | else |
81ecdfbb | 11856 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11857 | /* end confdefs.h. */ |
c906108c | 11858 | |
97bf5e38 | 11859 | #define _SYSCALL32 |
d30c5336 JK |
11860 | /* Needed for new procfs interface on sparc-solaris. */ |
11861 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11862 | #include <sys/procfs.h> |
bec39cab AC |
11863 | int |
11864 | main () | |
11865 | { | |
97bf5e38 | 11866 | psaddr_t avar |
bec39cab AC |
11867 | ; |
11868 | return 0; | |
11869 | } | |
11870 | _ACEOF | |
81ecdfbb | 11871 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11872 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11873 | else |
81ecdfbb | 11874 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11875 | |
c906108c | 11876 | fi |
81ecdfbb | 11877 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11878 | fi |
11879 | ||
97bf5e38 | 11880 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11881 | |
81ecdfbb | 11882 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11883 | |
97bf5e38 | 11884 | fi |
81ecdfbb RW |
11885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11886 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11887 | |
81ecdfbb RW |
11888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11889 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11890 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11891 | $as_echo_n "(cached) " >&6 | |
c906108c | 11892 | else |
81ecdfbb | 11893 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11894 | /* end confdefs.h. */ |
c906108c | 11895 | |
97bf5e38 | 11896 | #define _SYSCALL32 |
d30c5336 JK |
11897 | /* Needed for new procfs interface on sparc-solaris. */ |
11898 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11899 | #include <sys/procfs.h> |
bec39cab AC |
11900 | int |
11901 | main () | |
11902 | { | |
97bf5e38 | 11903 | prsysent_t avar |
bec39cab AC |
11904 | ; |
11905 | return 0; | |
11906 | } | |
11907 | _ACEOF | |
81ecdfbb | 11908 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11909 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11910 | else |
81ecdfbb | 11911 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11912 | |
c906108c | 11913 | fi |
81ecdfbb | 11914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11915 | fi |
11916 | ||
97bf5e38 | 11917 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11918 | |
81ecdfbb | 11919 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11920 | |
97bf5e38 | 11921 | fi |
81ecdfbb RW |
11922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11923 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11924 | |
81ecdfbb RW |
11925 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11926 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11927 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11928 | $as_echo_n "(cached) " >&6 | |
c906108c | 11929 | else |
81ecdfbb | 11930 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11931 | /* end confdefs.h. */ |
c906108c | 11932 | |
97bf5e38 | 11933 | #define _SYSCALL32 |
d30c5336 JK |
11934 | /* Needed for new procfs interface on sparc-solaris. */ |
11935 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11936 | #include <sys/procfs.h> |
bec39cab AC |
11937 | int |
11938 | main () | |
11939 | { | |
97bf5e38 | 11940 | pr_sigset_t avar |
bec39cab AC |
11941 | ; |
11942 | return 0; | |
11943 | } | |
11944 | _ACEOF | |
81ecdfbb | 11945 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11946 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 11947 | else |
81ecdfbb | 11948 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 11949 | |
c906108c | 11950 | fi |
81ecdfbb | 11951 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11952 | fi |
11953 | ||
97bf5e38 | 11954 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 11955 | |
81ecdfbb | 11956 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 11957 | |
97bf5e38 | 11958 | fi |
81ecdfbb RW |
11959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
11960 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 11961 | |
81ecdfbb RW |
11962 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
11963 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
11964 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
11965 | $as_echo_n "(cached) " >&6 | |
c906108c | 11966 | else |
81ecdfbb | 11967 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11968 | /* end confdefs.h. */ |
c906108c | 11969 | |
97bf5e38 | 11970 | #define _SYSCALL32 |
d30c5336 JK |
11971 | /* Needed for new procfs interface on sparc-solaris. */ |
11972 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11973 | #include <sys/procfs.h> |
bec39cab AC |
11974 | int |
11975 | main () | |
11976 | { | |
97bf5e38 | 11977 | pr_sigaction64_t avar |
bec39cab AC |
11978 | ; |
11979 | return 0; | |
11980 | } | |
11981 | _ACEOF | |
81ecdfbb | 11982 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11983 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 11984 | else |
81ecdfbb | 11985 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 11986 | |
c906108c | 11987 | fi |
81ecdfbb | 11988 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11989 | fi |
11990 | ||
97bf5e38 | 11991 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 11992 | |
81ecdfbb | 11993 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 11994 | |
97bf5e38 | 11995 | fi |
81ecdfbb RW |
11996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
11997 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 11998 | |
81ecdfbb RW |
11999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
12000 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
12001 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
12002 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12003 | else |
81ecdfbb | 12004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12005 | /* end confdefs.h. */ |
97bf5e38 MK |
12006 | |
12007 | #define _SYSCALL32 | |
d30c5336 JK |
12008 | /* Needed for new procfs interface on sparc-solaris. */ |
12009 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12010 | #include <sys/procfs.h> |
bec39cab AC |
12011 | int |
12012 | main () | |
12013 | { | |
97bf5e38 | 12014 | pr_siginfo64_t avar |
bec39cab AC |
12015 | ; |
12016 | return 0; | |
12017 | } | |
12018 | _ACEOF | |
81ecdfbb | 12019 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12020 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
12021 | else | |
81ecdfbb | 12022 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 12023 | |
97bf5e38 | 12024 | fi |
81ecdfbb | 12025 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12026 | fi |
c906108c | 12027 | |
97bf5e38 | 12028 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 12029 | |
81ecdfbb | 12030 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 12031 | |
97bf5e38 | 12032 | fi |
81ecdfbb RW |
12033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
12034 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
12035 | |
12036 | ||
97bf5e38 MK |
12037 | |
12038 | ||
12039 | ||
97bf5e38 | 12040 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
12041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
12042 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
12043 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
12044 | $as_echo_n "(cached) " >&6 | |
c906108c | 12045 | else |
81ecdfbb | 12046 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 12047 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 12048 | else |
81ecdfbb | 12049 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12050 | /* end confdefs.h. */ |
97bf5e38 MK |
12051 | #include <sys/procfs.h> |
12052 | int main () | |
12053 | { | |
12054 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
12055 | return 1; | |
12056 | return 0; | |
12057 | } | |
bec39cab | 12058 | _ACEOF |
81ecdfbb | 12059 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 12060 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
12061 | else |
12062 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 12063 | fi |
81ecdfbb RW |
12064 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12065 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 12066 | fi |
81ecdfbb | 12067 | |
c906108c SS |
12068 | fi |
12069 | ||
81ecdfbb RW |
12070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
12071 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 12072 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 12073 | |
81ecdfbb | 12074 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 12075 | |
97bf5e38 MK |
12076 | fi |
12077 | fi | |
c906108c | 12078 | fi |
c906108c | 12079 | |
bc8bcb4b | 12080 | # Check if the compiler supports the `long long' type. |
c906108c | 12081 | |
81ecdfbb RW |
12082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
12083 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
12084 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
12085 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12086 | else |
81ecdfbb | 12087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12088 | /* end confdefs.h. */ |
bc8bcb4b | 12089 | extern long long foo; |
bec39cab AC |
12090 | int |
12091 | main () | |
12092 | { | |
bc8bcb4b | 12093 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
12094 | ; |
12095 | return 0; | |
12096 | } | |
12097 | _ACEOF | |
81ecdfbb | 12098 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12099 | gdb_cv_c_long_long=yes |
12100 | else | |
81ecdfbb | 12101 | gdb_cv_c_long_long=no |
97bf5e38 | 12102 | fi |
81ecdfbb | 12103 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12104 | fi |
81ecdfbb RW |
12105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
12106 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
12107 | if test $gdb_cv_c_long_long != yes; then |
12108 | # libdecnumber requires long long. | |
12109 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
12110 | fi |
12111 | ||
bc8bcb4b | 12112 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 12113 | |
81ecdfbb RW |
12114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
12115 | $as_echo_n "checking for long long support in printf... " >&6; } | |
12116 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
12117 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12118 | else |
81ecdfbb | 12119 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12120 | gdb_cv_printf_has_long_long=no |
12121 | else | |
81ecdfbb | 12122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12123 | /* end confdefs.h. */ |
bc8bcb4b MK |
12124 | $ac_includes_default |
12125 | int | |
12126 | main () | |
12127 | { | |
12128 | char buf[32]; | |
97bf5e38 MK |
12129 | long long l = 0; |
12130 | l = (l << 16) + 0x0123; | |
12131 | l = (l << 16) + 0x4567; | |
12132 | l = (l << 16) + 0x89ab; | |
12133 | l = (l << 16) + 0xcdef; | |
12134 | sprintf (buf, "0x%016llx", l); | |
12135 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
12136 | ; |
12137 | return 0; | |
c906108c | 12138 | } |
bec39cab | 12139 | _ACEOF |
81ecdfbb | 12140 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
12141 | gdb_cv_printf_has_long_long=yes |
12142 | else | |
81ecdfbb | 12143 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 12144 | fi |
81ecdfbb RW |
12145 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12146 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12147 | fi |
81ecdfbb | 12148 | |
97bf5e38 | 12149 | fi |
81ecdfbb RW |
12150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
12151 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 12152 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 12153 | |
81ecdfbb | 12154 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
12155 | |
12156 | fi | |
97bf5e38 | 12157 | |
1a619819 LM |
12158 | # Check if the compiler and runtime support printing decfloats. |
12159 | ||
81ecdfbb RW |
12160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
12161 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
12162 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
12163 | $as_echo_n "(cached) " >&6 | |
1a619819 | 12164 | else |
81ecdfbb | 12165 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
12166 | gdb_cv_printf_has_decfloat=no |
12167 | else | |
81ecdfbb | 12168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
12169 | /* end confdefs.h. */ |
12170 | $ac_includes_default | |
12171 | int | |
12172 | main () | |
12173 | { | |
12174 | char buf[64]; | |
12175 | _Decimal32 d32 = 1.2345df; | |
12176 | _Decimal64 d64 = 1.2345dd; | |
12177 | _Decimal128 d128 = 1.2345dl; | |
12178 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
12179 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
12180 | ; | |
12181 | return 0; | |
12182 | } | |
12183 | _ACEOF | |
81ecdfbb | 12184 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
12185 | gdb_cv_printf_has_decfloat=yes |
12186 | else | |
81ecdfbb | 12187 | gdb_cv_printf_has_decfloat=no |
1a619819 | 12188 | fi |
81ecdfbb RW |
12189 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12190 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 12191 | fi |
81ecdfbb | 12192 | |
1a619819 | 12193 | fi |
81ecdfbb RW |
12194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
12195 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
12196 | if test $gdb_cv_printf_has_decfloat = yes; then |
12197 | ||
81ecdfbb | 12198 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
12199 | |
12200 | fi | |
12201 | ||
bc8bcb4b MK |
12202 | # Check if the compiler supports the `long double' type. We can't use |
12203 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
12204 | # constants defined in <float.h> that fail on some systems, | |
12205 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 12206 | |
81ecdfbb RW |
12207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
12208 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
12209 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
12210 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12211 | else |
81ecdfbb | 12212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12213 | /* end confdefs.h. */ |
97bf5e38 | 12214 | long double foo; |
bec39cab | 12215 | _ACEOF |
81ecdfbb | 12216 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 12217 | gdb_cv_c_long_double=yes |
97bf5e38 | 12218 | else |
81ecdfbb | 12219 | gdb_cv_c_long_double=no |
97bf5e38 | 12220 | fi |
81ecdfbb | 12221 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12222 | fi |
81ecdfbb RW |
12223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
12224 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 12225 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 12226 | |
81ecdfbb | 12227 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12228 | |
12229 | fi | |
12230 | ||
bc8bcb4b | 12231 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 12232 | |
81ecdfbb RW |
12233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
12234 | $as_echo_n "checking for long double support in printf... " >&6; } | |
12235 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
12236 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12237 | else |
81ecdfbb | 12238 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12239 | gdb_cv_printf_has_long_double=no |
12240 | else | |
81ecdfbb | 12241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12242 | /* end confdefs.h. */ |
bc8bcb4b MK |
12243 | $ac_includes_default |
12244 | int | |
12245 | main () | |
12246 | { | |
12247 | char buf[16]; | |
97bf5e38 MK |
12248 | long double f = 3.141592653; |
12249 | sprintf (buf, "%Lg", f); | |
12250 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
12251 | ; |
12252 | return 0; | |
97bf5e38 | 12253 | } |
bec39cab | 12254 | _ACEOF |
81ecdfbb | 12255 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 12256 | gdb_cv_printf_has_long_double=yes |
c906108c | 12257 | else |
81ecdfbb | 12258 | gdb_cv_printf_has_long_double=no |
c906108c | 12259 | fi |
81ecdfbb RW |
12260 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12261 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 12262 | fi |
81ecdfbb | 12263 | |
c906108c | 12264 | fi |
81ecdfbb RW |
12265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
12266 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 12267 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 12268 | |
81ecdfbb | 12269 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12270 | |
12271 | fi | |
97bf5e38 | 12272 | |
bc8bcb4b | 12273 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 12274 | |
81ecdfbb RW |
12275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
12276 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
12277 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
12278 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12279 | else |
81ecdfbb | 12280 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12281 | gdb_cv_scanf_has_long_double=no |
12282 | else | |
81ecdfbb | 12283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12284 | /* end confdefs.h. */ |
bc8bcb4b MK |
12285 | #include <stdio.h> |
12286 | int | |
12287 | main () | |
12288 | { | |
12289 | char *buf = "3.141592653"; | |
97bf5e38 MK |
12290 | long double f = 0; |
12291 | sscanf (buf, "%Lg", &f); | |
12292 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
12293 | ; |
12294 | return 0; | |
97bf5e38 | 12295 | } |
bec39cab | 12296 | _ACEOF |
81ecdfbb | 12297 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
12298 | gdb_cv_scanf_has_long_double=yes |
12299 | else | |
81ecdfbb | 12300 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 12301 | fi |
81ecdfbb RW |
12302 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12303 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12304 | fi |
81ecdfbb | 12305 | |
c906108c | 12306 | fi |
81ecdfbb RW |
12307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
12308 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 12309 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 12310 | |
81ecdfbb | 12311 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12312 | |
12313 | fi | |
c906108c | 12314 | |
438013df AO |
12315 | case ${host_os} in |
12316 | aix*) | |
81ecdfbb RW |
12317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
12318 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
12319 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
12320 | $as_echo_n "(cached) " >&6 | |
438013df | 12321 | else |
bec39cab | 12322 | |
438013df AO |
12323 | SAVE_LDFLAGS=$LDFLAGS |
12324 | ||
12325 | case $GCC in | |
12326 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
12327 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
12328 | esac | |
12329 | ||
12330 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 12331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12332 | /* end confdefs.h. */ |
438013df | 12333 | |
bec39cab AC |
12334 | int |
12335 | main () | |
12336 | { | |
438013df | 12337 | int i; |
bec39cab AC |
12338 | ; |
12339 | return 0; | |
12340 | } | |
12341 | _ACEOF | |
81ecdfbb | 12342 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 12343 | |
81ecdfbb RW |
12344 | else |
12345 | gdb_cv_bigtoc= | |
438013df | 12346 | fi |
81ecdfbb RW |
12347 | rm -f core conftest.err conftest.$ac_objext \ |
12348 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 12349 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 12350 | |
bec39cab | 12351 | fi |
81ecdfbb RW |
12352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
12353 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
12354 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
12355 | ;; | |
12356 | esac | |
12357 | ||
38f6b338 | 12358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 12359 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
12360 | dynamic_list=false |
12361 | if test "${gdb_native}" = yes; then | |
12362 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
12363 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
12364 | # may not be supported there. | |
12365 | old_LDFLAGS="$LDFLAGS" | |
12366 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
12367 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
12368 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
12369 | if test "${have_libpython}" = no; then | |
12370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
12371 | /* end confdefs.h. */ |
12372 | ||
12373 | int | |
12374 | main () | |
12375 | { | |
12376 | ||
12377 | ; | |
12378 | return 0; | |
12379 | } | |
12380 | _ACEOF | |
12381 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
12382 | dynamic_list=true |
12383 | fi | |
12384 | rm -f core conftest.err conftest.$ac_objext \ | |
12385 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
12386 | else |
12387 | # Workaround http://bugs.python.org/issue4434 where static | |
12388 | # libpythonX.Y.a would get its symbols required for | |
12389 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
12390 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
12391 | old_CFLAGS="$CFLAGS" | |
12392 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
12393 | old_LIBS="$LIBS" |
12394 | LIBS="$LIBS $PYTHON_LIBS" | |
38f6b338 | 12395 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 12396 | true |
f6528abd | 12397 | else |
3bebe2f2 JK |
12398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12399 | /* end confdefs.h. */ | |
12400 | #include "${have_libpython}/Python.h" | |
12401 | int | |
12402 | main () | |
12403 | { | |
12404 | int err; | |
38f6b338 JK |
12405 | Py_Initialize (); |
12406 | err = PyRun_SimpleString ("import itertools\n"); | |
12407 | Py_Finalize (); | |
12408 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
12409 | ; |
12410 | return 0; | |
12411 | } | |
12412 | _ACEOF | |
12413 | if ac_fn_c_try_run "$LINENO"; then : | |
12414 | dynamic_list=true | |
12415 | fi | |
12416 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12417 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12418 | fi | |
12419 | ||
8c1fb155 | 12420 | LIBS="$old_LIBS" |
38f6b338 JK |
12421 | CFLAGS="$old_CFLAGS" |
12422 | fi | |
12423 | LDFLAGS="$old_LDFLAGS" | |
12424 | fi | |
12425 | if $dynamic_list; then | |
12426 | found="-Wl,--dynamic-list" | |
12427 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 12428 | else |
38f6b338 JK |
12429 | found="-rdynamic" |
12430 | RDYNAMIC="-rdynamic" | |
f6528abd | 12431 | fi |
f6528abd | 12432 | |
38f6b338 | 12433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 12434 | $as_echo "$found" >&6; } |
0407b3f1 | 12435 | |
f6528abd | 12436 | |
0407b3f1 | 12437 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 12438 | case ${host_os} in |
c906108c | 12439 | solaris*) |
d92419e5 JB |
12440 | # See if thread_db library is around for Solaris thread debugging. |
12441 | # Note that we must explicitly test for version 1 of the library | |
12442 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
12443 | # the same API. | |
81ecdfbb RW |
12444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
12445 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 12446 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
12447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12448 | $as_echo "yes" >&6; } | |
60ca704f | 12449 | |
81ecdfbb | 12450 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 12451 | |
3483b318 | 12452 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 12453 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
12454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
12455 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
12456 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
12457 | $as_echo_n "(cached) " >&6 | |
c906108c | 12458 | else |
bec39cab | 12459 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 12460 | LIBS="-ldl $LIBS" |
81ecdfbb | 12461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
12462 | /* end confdefs.h. */ |
12463 | ||
81ecdfbb RW |
12464 | /* Override any GCC internal prototype to avoid an error. |
12465 | Use char because int might match the return type of a GCC | |
12466 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
12467 | #ifdef __cplusplus |
12468 | extern "C" | |
12469 | #endif | |
bec39cab AC |
12470 | char dlopen (); |
12471 | int | |
12472 | main () | |
12473 | { | |
81ecdfbb | 12474 | return dlopen (); |
bec39cab AC |
12475 | ; |
12476 | return 0; | |
12477 | } | |
12478 | _ACEOF | |
81ecdfbb | 12479 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
12480 | ac_cv_lib_dl_dlopen=yes |
12481 | else | |
81ecdfbb | 12482 | ac_cv_lib_dl_dlopen=no |
bec39cab | 12483 | fi |
81ecdfbb RW |
12484 | rm -f core conftest.err conftest.$ac_objext \ |
12485 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
12486 | LIBS=$ac_check_lib_save_LIBS |
12487 | fi | |
81ecdfbb RW |
12488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
12489 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
12490 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
12491 | cat >>confdefs.h <<_ACEOF |
12492 | #define HAVE_LIBDL 1 | |
12493 | _ACEOF | |
c906108c SS |
12494 | |
12495 | LIBS="-ldl $LIBS" | |
12496 | ||
c906108c SS |
12497 | fi |
12498 | ||
f6528abd | 12499 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
12500 | # Sun randomly tweaked the prototypes in <proc_service.h> |
12501 | # at one point. | |
81ecdfbb RW |
12502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
12503 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
12504 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
12505 | $as_echo_n "(cached) " >&6 | |
c906108c | 12506 | else |
bec39cab | 12507 | |
81ecdfbb | 12508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12509 | /* end confdefs.h. */ |
c906108c SS |
12510 | |
12511 | #include <proc_service.h> | |
12512 | ps_err_e ps_pdwrite | |
12513 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 12514 | |
bec39cab AC |
12515 | int |
12516 | main () | |
12517 | { | |
12518 | ||
12519 | ; | |
12520 | return 0; | |
12521 | } | |
12522 | _ACEOF | |
81ecdfbb | 12523 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
12524 | gdb_cv_proc_service_is_old=no |
12525 | else | |
81ecdfbb | 12526 | gdb_cv_proc_service_is_old=yes |
c906108c | 12527 | fi |
81ecdfbb | 12528 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12529 | |
c906108c SS |
12530 | fi |
12531 | ||
81ecdfbb RW |
12532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
12533 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 12534 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 12535 | |
81ecdfbb | 12536 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
12537 | |
12538 | fi | |
12539 | else | |
81ecdfbb RW |
12540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12541 | $as_echo "no" >&6; } | |
c906108c SS |
12542 | fi |
12543 | ;; | |
d92419e5 | 12544 | aix*) |
81ecdfbb RW |
12545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
12546 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
12547 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
12548 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12549 | else |
81ecdfbb | 12550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12551 | /* end confdefs.h. */ |
d92419e5 | 12552 | #include <sys/pthdebug.h> |
bec39cab AC |
12553 | int |
12554 | main () | |
12555 | { | |
d92419e5 JB |
12556 | #ifndef PTHDB_VERSION_3 |
12557 | #error | |
12558 | #endif | |
bec39cab AC |
12559 | ; |
12560 | return 0; | |
12561 | } | |
12562 | _ACEOF | |
81ecdfbb | 12563 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
12564 | gdb_cv_have_aix_thread_debug=yes |
12565 | else | |
81ecdfbb | 12566 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 12567 | fi |
81ecdfbb | 12568 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
12569 | fi |
12570 | ||
81ecdfbb RW |
12571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
12572 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
12573 | if test $gdb_cv_have_aix_thread_debug = yes; then |
12574 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 12575 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 12576 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
12577 | |
12578 | # Older versions of AIX do not provide the declaration for | |
12579 | # the getthrds function (it appears that it was introduced | |
12580 | # with AIX 6.x). | |
12581 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
12582 | " | |
12583 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
12584 | ac_have_decl=1 | |
12585 | else | |
12586 | ac_have_decl=0 | |
12587 | fi | |
12588 | ||
12589 | cat >>confdefs.h <<_ACEOF | |
12590 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
12591 | _ACEOF | |
12592 | ||
d92419e5 JB |
12593 | fi |
12594 | ;; | |
c906108c | 12595 | esac |
bec39cab | 12596 | |
c906108c SS |
12597 | fi |
12598 | ||
3f47be5c | 12599 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
12600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
12601 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
12602 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
12603 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12604 | else |
81ecdfbb | 12605 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12606 | /* end confdefs.h. */ |
3f47be5c | 12607 | #include <thread_db.h> |
bec39cab AC |
12608 | int |
12609 | main () | |
12610 | { | |
3f47be5c | 12611 | int i = TD_NOTALLOC; |
bec39cab AC |
12612 | ; |
12613 | return 0; | |
12614 | } | |
12615 | _ACEOF | |
81ecdfbb | 12616 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12617 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12618 | else | |
81ecdfbb | 12619 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12620 | |
3f47be5c | 12621 | fi |
81ecdfbb | 12622 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12623 | |
bec39cab | 12624 | fi |
81ecdfbb RW |
12625 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12626 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12628 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12629 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12630 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12631 | else |
81ecdfbb | 12632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12633 | /* end confdefs.h. */ |
12634 | #include <thread_db.h> | |
12635 | int | |
12636 | main () | |
12637 | { | |
12638 | int i = TD_VERSION; | |
12639 | ; | |
12640 | return 0; | |
12641 | } | |
12642 | _ACEOF | |
81ecdfbb | 12643 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12644 | gdb_cv_thread_db_h_has_td_version=yes |
12645 | else | |
81ecdfbb | 12646 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12647 | |
12648 | fi | |
81ecdfbb | 12649 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12650 | |
12651 | fi | |
81ecdfbb RW |
12652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12653 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12655 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12656 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12657 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12658 | else |
81ecdfbb | 12659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12660 | /* end confdefs.h. */ |
12661 | #include <thread_db.h> | |
12662 | int | |
12663 | main () | |
12664 | { | |
12665 | int i = TD_NOTLS; | |
12666 | ; | |
12667 | return 0; | |
12668 | } | |
12669 | _ACEOF | |
81ecdfbb | 12670 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12671 | gdb_cv_thread_db_h_has_td_notls=yes |
12672 | else | |
81ecdfbb | 12673 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12674 | |
12675 | fi | |
81ecdfbb | 12676 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12677 | |
12678 | fi | |
81ecdfbb RW |
12679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12680 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12681 | fi |
12682 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12683 | |
81ecdfbb | 12684 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12685 | |
59f80f10 DJ |
12686 | fi |
12687 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12688 | ||
81ecdfbb | 12689 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12690 | |
12691 | fi | |
12692 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12693 | ||
81ecdfbb | 12694 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12695 | |
3f47be5c EZ |
12696 | fi |
12697 | ||
b757528f | 12698 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12700 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12701 | if test "${gdb_cv_sys_syscall_h_has_tkill+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. */ |
b757528f | 12706 | #include <sys/syscall.h> |
bec39cab AC |
12707 | int |
12708 | main () | |
12709 | { | |
b757528f | 12710 | int i = __NR_tkill; |
bec39cab AC |
12711 | ; |
12712 | return 0; | |
12713 | } | |
12714 | _ACEOF | |
81ecdfbb | 12715 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12716 | gdb_cv_sys_syscall_h_has_tkill=yes |
12717 | else | |
81ecdfbb | 12718 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12719 | |
b757528f | 12720 | fi |
81ecdfbb | 12721 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12722 | |
bec39cab | 12723 | fi |
81ecdfbb RW |
12724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12725 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f | 12726 | fi |
99c1d451 TT |
12727 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then |
12728 | ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall" | |
12729 | if test "x$ac_cv_func_syscall" = x""yes; then : | |
bec39cab | 12730 | |
81ecdfbb | 12731 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f | 12732 | |
99c1d451 TT |
12733 | |
12734 | fi | |
12735 | ||
b757528f JJ |
12736 | fi |
12737 | ||
81ecdfbb RW |
12738 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12739 | " | |
12740 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12741 | ac_have_decl=1 | |
10568435 | 12742 | else |
81ecdfbb | 12743 | ac_have_decl=0 |
10568435 | 12744 | fi |
10568435 JK |
12745 | |
12746 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12747 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12748 | _ACEOF |
12749 | ||
12750 | ||
81ecdfbb RW |
12751 | if test "$cross_compiling" = yes; then : |
12752 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12753 | /* end confdefs.h. */ |
12754 | #include <sys/personality.h> | |
12755 | int | |
12756 | main () | |
12757 | { | |
12758 | ||
12759 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12760 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12761 | # endif | |
12762 | /* Test the flag could be set and stays set. */ | |
12763 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12764 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12765 | return 1 | |
12766 | ; | |
12767 | return 0; | |
12768 | } | |
12769 | _ACEOF | |
81ecdfbb | 12770 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12771 | have_personality=true |
12772 | else | |
81ecdfbb | 12773 | have_personality=false |
10568435 | 12774 | fi |
81ecdfbb RW |
12775 | rm -f core conftest.err conftest.$ac_objext \ |
12776 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12777 | else |
81ecdfbb | 12778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12779 | /* end confdefs.h. */ |
12780 | #include <sys/personality.h> | |
12781 | int | |
12782 | main () | |
12783 | { | |
12784 | ||
12785 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12786 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12787 | # endif | |
12788 | /* Test the flag could be set and stays set. */ | |
12789 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12790 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12791 | return 1 | |
12792 | ; | |
12793 | return 0; | |
12794 | } | |
12795 | _ACEOF | |
81ecdfbb | 12796 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12797 | have_personality=true |
12798 | else | |
81ecdfbb | 12799 | have_personality=false |
10568435 | 12800 | fi |
81ecdfbb RW |
12801 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12802 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12803 | fi |
81ecdfbb | 12804 | |
10568435 JK |
12805 | if $have_personality |
12806 | then | |
12807 | ||
81ecdfbb | 12808 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
12809 | |
12810 | fi | |
12811 | ||
e655c1a2 PA |
12812 | case $host_os in |
12813 | go32* | *djgpp*) | |
12814 | gdbinit=gdb.ini | |
12815 | ;; | |
12816 | *) | |
12817 | gdbinit=.gdbinit | |
12818 | ;; | |
12819 | esac | |
12820 | ||
12821 | cat >>confdefs.h <<_ACEOF | |
12822 | #define GDBINIT "$gdbinit" | |
12823 | _ACEOF | |
12824 | ||
12825 | ||
fb40c209 | 12826 | |
f83d8a90 DE |
12827 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
12828 | # except that the argument to --with-sysroot is optional. | |
12829 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
12830 | if test "x$with_sysroot" = xyes; then | |
12831 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
12832 | fi | |
bec39cab | 12833 | |
81ecdfbb RW |
12834 | # Check whether --with-sysroot was given. |
12835 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
12836 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
12837 | else | |
12838 | TARGET_SYSTEM_ROOT= | |
12839 | fi | |
030292b7 | 12840 | |
030292b7 | 12841 | |
f83d8a90 DE |
12842 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
12843 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12844 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
12845 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 12846 | |
f83d8a90 DE |
12847 | cat >>confdefs.h <<_ACEOF |
12848 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
12849 | _ACEOF | |
bec39cab | 12850 | |
030292b7 | 12851 | |
b14b1491 | 12852 | |
f83d8a90 DE |
12853 | |
12854 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12855 | if test "x$prefix" = xNONE; then | |
12856 | test_prefix=/usr/local | |
12857 | else | |
12858 | test_prefix=$prefix | |
12859 | fi | |
12860 | else | |
12861 | test_prefix=$exec_prefix | |
12862 | fi | |
12863 | value=0 | |
12864 | case ${ac_define_dir} in | |
12865 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12866 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12867 | value=1 | |
12868 | ;; | |
12869 | esac | |
12870 | ||
12871 | cat >>confdefs.h <<_ACEOF | |
12872 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
12873 | _ACEOF | |
030292b7 DJ |
12874 | |
12875 | ||
12876 | ||
16e7150e | 12877 | |
16e7150e | 12878 | |
81ecdfbb RW |
12879 | # Check whether --with-system-gdbinit was given. |
12880 | if test "${with_system_gdbinit+set}" = set; then : | |
12881 | withval=$with_system_gdbinit; | |
b14b1491 TT |
12882 | SYSTEM_GDBINIT=$withval |
12883 | else | |
12884 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
12885 | fi |
12886 | ||
16e7150e JG |
12887 | |
12888 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
12889 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 12890 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
12891 | ac_define_dir=`eval echo $ac_define_dir` |
12892 | ||
12893 | cat >>confdefs.h <<_ACEOF | |
12894 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
12895 | _ACEOF | |
12896 | ||
12897 | ||
12898 | ||
0c4a4063 | 12899 | |
b14b1491 TT |
12900 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
12901 | if test "x$prefix" = xNONE; then | |
12902 | test_prefix=/usr/local | |
12903 | else | |
12904 | test_prefix=$prefix | |
12905 | fi | |
12906 | else | |
12907 | test_prefix=$exec_prefix | |
12908 | fi | |
12909 | value=0 | |
12910 | case ${ac_define_dir} in | |
12911 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12912 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12913 | value=1 | |
12914 | ;; | |
12915 | esac | |
16e7150e | 12916 | |
b14b1491 TT |
12917 | cat >>confdefs.h <<_ACEOF |
12918 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
12919 | _ACEOF |
12920 | ||
b14b1491 | 12921 | |
16e7150e | 12922 | |
0c4a4063 | 12923 | |
81ecdfbb RW |
12924 | # Check whether --enable-werror was given. |
12925 | if test "${enable_werror+set}" = set; then : | |
12926 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
12927 | yes | y) ERROR_ON_WARNING="yes" ;; |
12928 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 12929 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 12930 | esac |
81ecdfbb RW |
12931 | fi |
12932 | ||
094a342e | 12933 | |
a68ffae9 JK |
12934 | # Enable -Werror by default when using gcc. Turn it off for releases. |
12935 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
12936 | ERROR_ON_WARNING=yes |
12937 | fi | |
12938 | ||
12939 | WERROR_CFLAGS="" | |
12940 | if test "${ERROR_ON_WARNING}" = yes ; then | |
12941 | WERROR_CFLAGS="-Werror" | |
12942 | fi | |
12943 | ||
aa79a185 | 12944 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
d3685d60 | 12945 | -Wpointer-sign \ |
1cb5e2a4 | 12946 | -Wno-unused -Wunused-value -Wunused-function \ |
352b3eda | 12947 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ |
44d100c3 | 12948 | -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ |
dd9aa048 | 12949 | -Wold-style-declaration -Wold-style-definition" |
a3b362c4 | 12950 | |
3526781e DJ |
12951 | # Enable -Wno-format by default when using gcc on mingw since many |
12952 | # GCC versions complain about %I64. | |
12953 | case "${host}" in | |
12954 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
d3685d60 | 12955 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
12956 | esac |
12957 | ||
81ecdfbb RW |
12958 | # Check whether --enable-build-warnings was given. |
12959 | if test "${enable_build_warnings+set}" = set; then : | |
12960 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
12961 | yes) ;; |
12962 | no) build_warnings="-w";; | |
12963 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12964 | build_warnings="${build_warnings} ${t}";; | |
12965 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12966 | build_warnings="${t} ${build_warnings}";; | |
12967 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12968 | esac | |
d4f3574e | 12969 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 12970 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 12971 | fi |
81ecdfbb RW |
12972 | fi |
12973 | # Check whether --enable-gdb-build-warnings was given. | |
12974 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
12975 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
12976 | yes) ;; |
12977 | no) build_warnings="-w";; | |
12978 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12979 | build_warnings="${build_warnings} ${t}";; | |
12980 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12981 | build_warnings="${t} ${build_warnings}";; | |
12982 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12983 | esac | |
12984 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
12985 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
12986 | fi | |
81ecdfbb RW |
12987 | fi |
12988 | WARN_CFLAGS="" | |
c906108c SS |
12989 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
12990 | then | |
81ecdfbb RW |
12991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
12992 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
12993 | # Separate out the -Werror flag as some files just cannot be |
12994 | # compiled with it enabled. | |
12995 | for w in ${build_warnings}; do | |
12996 | case $w in | |
12997 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
12998 | *) # Check that GCC accepts it | |
4536bbc6 AC |
12999 | saved_CFLAGS="$CFLAGS" |
13000 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 13001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13002 | /* end confdefs.h. */ |
4536bbc6 | 13003 | |
bec39cab AC |
13004 | int |
13005 | main () | |
13006 | { | |
4536bbc6 | 13007 | |
bec39cab AC |
13008 | ; |
13009 | return 0; | |
13010 | } | |
13011 | _ACEOF | |
81ecdfbb | 13012 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 13013 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 13014 | fi |
81ecdfbb | 13015 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 13016 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
13017 | esac |
13018 | done | |
81ecdfbb RW |
13019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
13020 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
13021 | fi |
13022 | ||
13023 | ||
104c1213 | 13024 | |
7a292a7a | 13025 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
13026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
13027 | $as_echo_n "checking for cygwin... " >&6; } | |
13028 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
13029 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13030 | else |
81ecdfbb | 13031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13032 | /* end confdefs.h. */ |
7a292a7a SS |
13033 | |
13034 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
13035 | lose | |
13036 | #endif | |
bec39cab | 13037 | _ACEOF |
7a292a7a | 13038 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 13039 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
13040 | gdb_cv_os_cygwin=yes |
13041 | else | |
7a292a7a SS |
13042 | gdb_cv_os_cygwin=no |
13043 | fi | |
13044 | rm -f conftest* | |
13045 | ||
13046 | fi | |
81ecdfbb RW |
13047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
13048 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 13049 | |
aff38e61 | 13050 | |
3eb25fda | 13051 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 13052 | case ${host} in |
95cbc983 AC |
13053 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
13054 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 13055 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
13056 | esac |
13057 | ||
13058 | ||
cd0fc7c3 SS |
13059 | # libreadline needs libuser32.a in a cygwin environment |
13060 | WIN32LIBS= | |
13061 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
13062 | WIN32LIBS="-luser32" |
13063 | case "${target}" in | |
13064 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
13065 | ;; | |
13066 | esac | |
cd0fc7c3 | 13067 | fi |
c906108c | 13068 | |
b4505029 MM |
13069 | # The ser-tcp.c module requires sockets. |
13070 | case ${host} in | |
13071 | *mingw32*) | |
13072 | ||
81ecdfbb | 13073 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
13074 | |
13075 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
13076 | ;; | |
13077 | esac | |
13078 | ||
7a292a7a | 13079 | |
31d99776 | 13080 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
13081 | |
13082 | OLD_CFLAGS=$CFLAGS | |
13083 | OLD_LDFLAGS=$LDFLAGS | |
13084 | OLD_LIBS=$LIBS | |
13085 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
13086 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
13087 | # always want our bfd. | |
13088 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
13089 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
13090 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
13091 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | |
13092 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
13093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
13094 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
13095 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13096 | $as_echo_n "(cached) " >&6 | |
13097 | else | |
13098 | ac_func_search_save_LIBS=$LIBS | |
13099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13100 | /* end confdefs.h. */ | |
13101 | ||
13102 | /* Override any GCC internal prototype to avoid an error. | |
13103 | Use char because int might match the return type of a GCC | |
13104 | builtin and then its argument prototype would still apply. */ | |
13105 | #ifdef __cplusplus | |
13106 | extern "C" | |
13107 | #endif | |
13108 | char dlopen (); | |
13109 | int | |
13110 | main () | |
13111 | { | |
13112 | return dlopen (); | |
13113 | ; | |
13114 | return 0; | |
13115 | } | |
13116 | _ACEOF | |
13117 | for ac_lib in '' dl; do | |
13118 | if test -z "$ac_lib"; then | |
13119 | ac_res="none required" | |
13120 | else | |
13121 | ac_res=-l$ac_lib | |
13122 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13123 | fi | |
13124 | if ac_fn_c_try_link "$LINENO"; then : | |
13125 | ac_cv_search_dlopen=$ac_res | |
13126 | fi | |
13127 | rm -f core conftest.err conftest.$ac_objext \ | |
13128 | conftest$ac_exeext | |
13129 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13130 | break | |
13131 | fi | |
13132 | done | |
13133 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13134 | ||
13135 | else | |
13136 | ac_cv_search_dlopen=no | |
13137 | fi | |
13138 | rm conftest.$ac_ext | |
13139 | LIBS=$ac_func_search_save_LIBS | |
13140 | fi | |
13141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
13142 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
13143 | ac_res=$ac_cv_search_dlopen | |
13144 | if test "$ac_res" != no; then : | |
13145 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13146 | ||
13147 | fi | |
13148 | ||
def63ff0 TT |
13149 | fi |
13150 | LIBS="-lbfd -liberty $intl $LIBS" | |
13151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 | |
81ecdfbb RW |
13152 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
13153 | if test "${gdb_cv_var_elf+set}" = set; then : | |
13154 | $as_echo_n "(cached) " >&6 | |
31d99776 | 13155 | else |
81ecdfbb | 13156 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
13157 | /* end confdefs.h. */ |
13158 | #include <stdlib.h> | |
def63ff0 TT |
13159 | #include "bfd.h" |
13160 | #include "elf-bfd.h" | |
31d99776 DJ |
13161 | |
13162 | int | |
13163 | main () | |
13164 | { | |
def63ff0 | 13165 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
13166 | ; |
13167 | return 0; | |
13168 | } | |
13169 | _ACEOF | |
81ecdfbb | 13170 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
13171 | gdb_cv_var_elf=yes |
13172 | else | |
81ecdfbb | 13173 | gdb_cv_var_elf=no |
31d99776 | 13174 | fi |
81ecdfbb RW |
13175 | rm -f core conftest.err conftest.$ac_objext \ |
13176 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 13177 | fi |
81ecdfbb RW |
13178 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
13179 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
13180 | CFLAGS=$OLD_CFLAGS |
13181 | LDFLAGS=$OLD_LDFLAGS | |
13182 | LIBS=$OLD_LIBS | |
31d99776 | 13183 | if test $gdb_cv_var_elf = yes; then |
55aa24fb | 13184 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
31d99776 | 13185 | |
81ecdfbb | 13186 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 13187 | |
075ff26d JK |
13188 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
13189 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
13190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
13191 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
13192 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13193 | $as_echo_n "(cached) " >&6 | |
13194 | else | |
13195 | ac_func_search_save_LIBS=$LIBS | |
13196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13197 | /* end confdefs.h. */ | |
13198 | ||
13199 | /* Override any GCC internal prototype to avoid an error. | |
13200 | Use char because int might match the return type of a GCC | |
13201 | builtin and then its argument prototype would still apply. */ | |
13202 | #ifdef __cplusplus | |
13203 | extern "C" | |
13204 | #endif | |
13205 | char dlopen (); | |
13206 | int | |
13207 | main () | |
13208 | { | |
13209 | return dlopen (); | |
13210 | ; | |
13211 | return 0; | |
13212 | } | |
13213 | _ACEOF | |
13214 | for ac_lib in '' dl; do | |
13215 | if test -z "$ac_lib"; then | |
13216 | ac_res="none required" | |
13217 | else | |
13218 | ac_res=-l$ac_lib | |
13219 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13220 | fi | |
13221 | if ac_fn_c_try_link "$LINENO"; then : | |
13222 | ac_cv_search_dlopen=$ac_res | |
13223 | fi | |
13224 | rm -f core conftest.err conftest.$ac_objext \ | |
13225 | conftest$ac_exeext | |
13226 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13227 | break | |
13228 | fi | |
13229 | done | |
13230 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13231 | ||
13232 | else | |
13233 | ac_cv_search_dlopen=no | |
13234 | fi | |
13235 | rm conftest.$ac_ext | |
13236 | LIBS=$ac_func_search_save_LIBS | |
13237 | fi | |
13238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
13239 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
13240 | ac_res=$ac_cv_search_dlopen | |
13241 | if test "$ac_res" != no; then : | |
13242 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13243 | ||
13244 | fi | |
13245 | ||
075ff26d | 13246 | fi |
31d99776 | 13247 | fi |
31d99776 | 13248 | |
4f05add4 TT |
13249 | # Add macho support to GDB, but only if BFD includes it. |
13250 | ||
13251 | OLD_CFLAGS=$CFLAGS | |
13252 | OLD_LDFLAGS=$LDFLAGS | |
13253 | OLD_LIBS=$LIBS | |
13254 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
13255 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
13256 | # always want our bfd. | |
13257 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
13258 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
13259 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
13260 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | |
13261 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
13262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
13263 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
13264 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13265 | $as_echo_n "(cached) " >&6 | |
13266 | else | |
13267 | ac_func_search_save_LIBS=$LIBS | |
13268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13269 | /* end confdefs.h. */ | |
13270 | ||
13271 | /* Override any GCC internal prototype to avoid an error. | |
13272 | Use char because int might match the return type of a GCC | |
13273 | builtin and then its argument prototype would still apply. */ | |
13274 | #ifdef __cplusplus | |
13275 | extern "C" | |
13276 | #endif | |
13277 | char dlopen (); | |
13278 | int | |
13279 | main () | |
13280 | { | |
13281 | return dlopen (); | |
13282 | ; | |
13283 | return 0; | |
13284 | } | |
13285 | _ACEOF | |
13286 | for ac_lib in '' dl; do | |
13287 | if test -z "$ac_lib"; then | |
13288 | ac_res="none required" | |
13289 | else | |
13290 | ac_res=-l$ac_lib | |
13291 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13292 | fi | |
13293 | if ac_fn_c_try_link "$LINENO"; then : | |
13294 | ac_cv_search_dlopen=$ac_res | |
13295 | fi | |
13296 | rm -f core conftest.err conftest.$ac_objext \ | |
13297 | conftest$ac_exeext | |
13298 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13299 | break | |
13300 | fi | |
13301 | done | |
13302 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13303 | ||
13304 | else | |
13305 | ac_cv_search_dlopen=no | |
13306 | fi | |
13307 | rm conftest.$ac_ext | |
13308 | LIBS=$ac_func_search_save_LIBS | |
13309 | fi | |
13310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
13311 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
13312 | ac_res=$ac_cv_search_dlopen | |
13313 | if test "$ac_res" != no; then : | |
13314 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13315 | ||
13316 | fi | |
13317 | ||
4f05add4 TT |
13318 | fi |
13319 | LIBS="-lbfd -liberty $intl $LIBS" | |
13320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 | |
13321 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
13322 | if test "${gdb_cv_var_macho+set}" = set; then : | |
13323 | $as_echo_n "(cached) " >&6 | |
13324 | else | |
13325 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13326 | /* end confdefs.h. */ | |
13327 | #include <stdlib.h> | |
13328 | #include "bfd.h" | |
13329 | #include "mach-o.h" | |
13330 | ||
13331 | int | |
13332 | main () | |
13333 | { | |
13334 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
13335 | ; | |
13336 | return 0; | |
13337 | } | |
13338 | _ACEOF | |
13339 | if ac_fn_c_try_link "$LINENO"; then : | |
13340 | gdb_cv_var_macho=yes | |
13341 | else | |
13342 | gdb_cv_var_macho=no | |
13343 | fi | |
13344 | rm -f core conftest.err conftest.$ac_objext \ | |
13345 | conftest$ac_exeext conftest.$ac_ext | |
13346 | fi | |
13347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
13348 | $as_echo "$gdb_cv_var_macho" >&6; } | |
13349 | CFLAGS=$OLD_CFLAGS | |
13350 | LDFLAGS=$OLD_LDFLAGS | |
13351 | LIBS=$OLD_LIBS | |
13352 | if test $gdb_cv_var_macho = yes; then | |
13353 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
13354 | fi | |
13355 | ||
b2259038 TT |
13356 | # Add SOM support to GDB, but only if BFD includes it. |
13357 | ||
13358 | OLD_CFLAGS=$CFLAGS | |
13359 | OLD_LDFLAGS=$LDFLAGS | |
13360 | OLD_LIBS=$LIBS | |
13361 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
13362 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
13363 | # always want our bfd. | |
13364 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
13365 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
13366 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
13367 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | |
13368 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
13369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
13370 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
13371 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13372 | $as_echo_n "(cached) " >&6 | |
13373 | else | |
13374 | ac_func_search_save_LIBS=$LIBS | |
13375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13376 | /* end confdefs.h. */ | |
13377 | ||
13378 | /* Override any GCC internal prototype to avoid an error. | |
13379 | Use char because int might match the return type of a GCC | |
13380 | builtin and then its argument prototype would still apply. */ | |
13381 | #ifdef __cplusplus | |
13382 | extern "C" | |
13383 | #endif | |
13384 | char dlopen (); | |
13385 | int | |
13386 | main () | |
13387 | { | |
13388 | return dlopen (); | |
13389 | ; | |
13390 | return 0; | |
13391 | } | |
13392 | _ACEOF | |
13393 | for ac_lib in '' dl; do | |
13394 | if test -z "$ac_lib"; then | |
13395 | ac_res="none required" | |
13396 | else | |
13397 | ac_res=-l$ac_lib | |
13398 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13399 | fi | |
13400 | if ac_fn_c_try_link "$LINENO"; then : | |
13401 | ac_cv_search_dlopen=$ac_res | |
13402 | fi | |
13403 | rm -f core conftest.err conftest.$ac_objext \ | |
13404 | conftest$ac_exeext | |
13405 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13406 | break | |
13407 | fi | |
13408 | done | |
13409 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13410 | ||
13411 | else | |
13412 | ac_cv_search_dlopen=no | |
13413 | fi | |
13414 | rm conftest.$ac_ext | |
13415 | LIBS=$ac_func_search_save_LIBS | |
13416 | fi | |
13417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
13418 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
13419 | ac_res=$ac_cv_search_dlopen | |
13420 | if test "$ac_res" != no; then : | |
13421 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13422 | ||
13423 | fi | |
13424 | ||
b2259038 TT |
13425 | fi |
13426 | LIBS="-lbfd -liberty $intl $LIBS" | |
13427 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5 | |
13428 | $as_echo_n "checking for SOM support in BFD... " >&6; } | |
13429 | if test "${gdb_cv_var_som+set}" = set; then : | |
13430 | $as_echo_n "(cached) " >&6 | |
13431 | else | |
13432 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13433 | /* end confdefs.h. */ | |
13434 | #include <stdlib.h> | |
13435 | #include "bfd.h" | |
13436 | #include "som.h" | |
13437 | ||
13438 | int | |
13439 | main () | |
13440 | { | |
13441 | return bfd_som_attach_aux_hdr (NULL, 0, NULL); | |
13442 | ; | |
13443 | return 0; | |
13444 | } | |
13445 | _ACEOF | |
13446 | if ac_fn_c_try_link "$LINENO"; then : | |
13447 | gdb_cv_var_som=yes | |
13448 | else | |
13449 | gdb_cv_var_som=no | |
13450 | fi | |
13451 | rm -f core conftest.err conftest.$ac_objext \ | |
13452 | conftest$ac_exeext conftest.$ac_ext | |
13453 | fi | |
13454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5 | |
13455 | $as_echo "$gdb_cv_var_som" >&6; } | |
13456 | CFLAGS=$OLD_CFLAGS | |
13457 | LDFLAGS=$OLD_LDFLAGS | |
13458 | LIBS=$OLD_LIBS | |
13459 | if test $gdb_cv_var_som = yes; then | |
13460 | CONFIG_OBS="$CONFIG_OBS somread.o" | |
13461 | fi | |
13462 | ||
121ce6e5 DJ |
13463 | # Add any host-specific objects to GDB. |
13464 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
13465 | ||
608e2dbb TT |
13466 | # If building on ELF, look for lzma support for embedded compressed debug info. |
13467 | if test $gdb_cv_var_elf = yes; then | |
13468 | ||
13469 | # Check whether --with-lzma was given. | |
13470 | if test "${with_lzma+set}" = set; then : | |
13471 | withval=$with_lzma; | |
13472 | else | |
13473 | with_lzma=auto | |
13474 | fi | |
13475 | ||
13476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
13477 | $as_echo_n "checking whether to use lzma... " >&6; } | |
13478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
13479 | $as_echo "$with_lzma" >&6; } | |
13480 | ||
13481 | if test "${with_lzma}" != no; then | |
13482 | ||
13483 | ||
13484 | ||
13485 | ||
13486 | ||
13487 | ||
13488 | ||
13489 | ||
13490 | use_additional=yes | |
13491 | ||
13492 | acl_save_prefix="$prefix" | |
13493 | prefix="$acl_final_prefix" | |
13494 | acl_save_exec_prefix="$exec_prefix" | |
13495 | exec_prefix="$acl_final_exec_prefix" | |
13496 | ||
13497 | eval additional_includedir=\"$includedir\" | |
13498 | eval additional_libdir=\"$libdir\" | |
13499 | ||
13500 | exec_prefix="$acl_save_exec_prefix" | |
13501 | prefix="$acl_save_prefix" | |
13502 | ||
13503 | ||
13504 | # Check whether --with-liblzma-prefix was given. | |
13505 | if test "${with_liblzma_prefix+set}" = set; then : | |
13506 | withval=$with_liblzma_prefix; | |
13507 | if test "X$withval" = "Xno"; then | |
13508 | use_additional=no | |
13509 | else | |
13510 | if test "X$withval" = "X"; then | |
13511 | ||
13512 | acl_save_prefix="$prefix" | |
13513 | prefix="$acl_final_prefix" | |
13514 | acl_save_exec_prefix="$exec_prefix" | |
13515 | exec_prefix="$acl_final_exec_prefix" | |
13516 | ||
13517 | eval additional_includedir=\"$includedir\" | |
13518 | eval additional_libdir=\"$libdir\" | |
13519 | ||
13520 | exec_prefix="$acl_save_exec_prefix" | |
13521 | prefix="$acl_save_prefix" | |
13522 | ||
13523 | else | |
13524 | additional_includedir="$withval/include" | |
13525 | additional_libdir="$withval/lib" | |
13526 | fi | |
13527 | fi | |
13528 | ||
13529 | fi | |
13530 | ||
13531 | LIBLZMA= | |
13532 | LTLIBLZMA= | |
13533 | INCLZMA= | |
13534 | rpathdirs= | |
13535 | ltrpathdirs= | |
13536 | names_already_handled= | |
13537 | names_next_round='lzma ' | |
13538 | while test -n "$names_next_round"; do | |
13539 | names_this_round="$names_next_round" | |
13540 | names_next_round= | |
13541 | for name in $names_this_round; do | |
13542 | already_handled= | |
13543 | for n in $names_already_handled; do | |
13544 | if test "$n" = "$name"; then | |
13545 | already_handled=yes | |
13546 | break | |
13547 | fi | |
13548 | done | |
13549 | if test -z "$already_handled"; then | |
13550 | names_already_handled="$names_already_handled $name" | |
13551 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
13552 | eval value=\"\$HAVE_LIB$uppername\" | |
13553 | if test -n "$value"; then | |
13554 | if test "$value" = yes; then | |
13555 | eval value=\"\$LIB$uppername\" | |
13556 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
13557 | eval value=\"\$LTLIB$uppername\" | |
13558 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
13559 | else | |
13560 | : | |
13561 | fi | |
13562 | else | |
13563 | found_dir= | |
13564 | found_la= | |
13565 | found_so= | |
13566 | found_a= | |
13567 | if test $use_additional = yes; then | |
13568 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
13569 | found_dir="$additional_libdir" | |
13570 | found_so="$additional_libdir/lib$name.$shlibext" | |
13571 | if test -f "$additional_libdir/lib$name.la"; then | |
13572 | found_la="$additional_libdir/lib$name.la" | |
13573 | fi | |
13574 | else | |
13575 | if test -f "$additional_libdir/lib$name.$libext"; then | |
13576 | found_dir="$additional_libdir" | |
13577 | found_a="$additional_libdir/lib$name.$libext" | |
13578 | if test -f "$additional_libdir/lib$name.la"; then | |
13579 | found_la="$additional_libdir/lib$name.la" | |
13580 | fi | |
13581 | fi | |
13582 | fi | |
13583 | fi | |
13584 | if test "X$found_dir" = "X"; then | |
13585 | for x in $LDFLAGS $LTLIBLZMA; do | |
13586 | ||
13587 | acl_save_prefix="$prefix" | |
13588 | prefix="$acl_final_prefix" | |
13589 | acl_save_exec_prefix="$exec_prefix" | |
13590 | exec_prefix="$acl_final_exec_prefix" | |
13591 | eval x=\"$x\" | |
13592 | exec_prefix="$acl_save_exec_prefix" | |
13593 | prefix="$acl_save_prefix" | |
13594 | ||
13595 | case "$x" in | |
13596 | -L*) | |
13597 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
13598 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
13599 | found_dir="$dir" | |
13600 | found_so="$dir/lib$name.$shlibext" | |
13601 | if test -f "$dir/lib$name.la"; then | |
13602 | found_la="$dir/lib$name.la" | |
13603 | fi | |
13604 | else | |
13605 | if test -f "$dir/lib$name.$libext"; then | |
13606 | found_dir="$dir" | |
13607 | found_a="$dir/lib$name.$libext" | |
13608 | if test -f "$dir/lib$name.la"; then | |
13609 | found_la="$dir/lib$name.la" | |
13610 | fi | |
13611 | fi | |
13612 | fi | |
13613 | ;; | |
13614 | esac | |
13615 | if test "X$found_dir" != "X"; then | |
13616 | break | |
13617 | fi | |
13618 | done | |
13619 | fi | |
13620 | if test "X$found_dir" != "X"; then | |
13621 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
13622 | if test "X$found_so" != "X"; then | |
13623 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
13624 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13625 | else | |
13626 | haveit= | |
13627 | for x in $ltrpathdirs; do | |
13628 | if test "X$x" = "X$found_dir"; then | |
13629 | haveit=yes | |
13630 | break | |
13631 | fi | |
13632 | done | |
13633 | if test -z "$haveit"; then | |
13634 | ltrpathdirs="$ltrpathdirs $found_dir" | |
13635 | fi | |
13636 | if test "$hardcode_direct" = yes; then | |
13637 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13638 | else | |
13639 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
13640 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13641 | haveit= | |
13642 | for x in $rpathdirs; do | |
13643 | if test "X$x" = "X$found_dir"; then | |
13644 | haveit=yes | |
13645 | break | |
13646 | fi | |
13647 | done | |
13648 | if test -z "$haveit"; then | |
13649 | rpathdirs="$rpathdirs $found_dir" | |
13650 | fi | |
13651 | else | |
13652 | haveit= | |
13653 | for x in $LDFLAGS $LIBLZMA; do | |
13654 | ||
13655 | acl_save_prefix="$prefix" | |
13656 | prefix="$acl_final_prefix" | |
13657 | acl_save_exec_prefix="$exec_prefix" | |
13658 | exec_prefix="$acl_final_exec_prefix" | |
13659 | eval x=\"$x\" | |
13660 | exec_prefix="$acl_save_exec_prefix" | |
13661 | prefix="$acl_save_prefix" | |
13662 | ||
13663 | if test "X$x" = "X-L$found_dir"; then | |
13664 | haveit=yes | |
13665 | break | |
13666 | fi | |
13667 | done | |
13668 | if test -z "$haveit"; then | |
13669 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
13670 | fi | |
13671 | if test "$hardcode_minus_L" != no; then | |
13672 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13673 | else | |
13674 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
13675 | fi | |
13676 | fi | |
13677 | fi | |
13678 | fi | |
13679 | else | |
13680 | if test "X$found_a" != "X"; then | |
13681 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
13682 | else | |
13683 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
13684 | fi | |
13685 | fi | |
13686 | additional_includedir= | |
13687 | case "$found_dir" in | |
13688 | */lib | */lib/) | |
13689 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
13690 | additional_includedir="$basedir/include" | |
13691 | ;; | |
13692 | esac | |
13693 | if test "X$additional_includedir" != "X"; then | |
13694 | if test "X$additional_includedir" != "X/usr/include"; then | |
13695 | haveit= | |
13696 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
13697 | if test -n "$GCC"; then | |
13698 | case $host_os in | |
13699 | linux*) haveit=yes;; | |
13700 | esac | |
13701 | fi | |
13702 | fi | |
13703 | if test -z "$haveit"; then | |
13704 | for x in $CPPFLAGS $INCLZMA; do | |
13705 | ||
13706 | acl_save_prefix="$prefix" | |
13707 | prefix="$acl_final_prefix" | |
13708 | acl_save_exec_prefix="$exec_prefix" | |
13709 | exec_prefix="$acl_final_exec_prefix" | |
13710 | eval x=\"$x\" | |
13711 | exec_prefix="$acl_save_exec_prefix" | |
13712 | prefix="$acl_save_prefix" | |
13713 | ||
13714 | if test "X$x" = "X-I$additional_includedir"; then | |
13715 | haveit=yes | |
13716 | break | |
13717 | fi | |
13718 | done | |
13719 | if test -z "$haveit"; then | |
13720 | if test -d "$additional_includedir"; then | |
13721 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
13722 | fi | |
13723 | fi | |
13724 | fi | |
13725 | fi | |
13726 | fi | |
13727 | if test -n "$found_la"; then | |
13728 | save_libdir="$libdir" | |
13729 | case "$found_la" in | |
13730 | */* | *\\*) . "$found_la" ;; | |
13731 | *) . "./$found_la" ;; | |
13732 | esac | |
13733 | libdir="$save_libdir" | |
13734 | for dep in $dependency_libs; do | |
13735 | case "$dep" in | |
13736 | -L*) | |
13737 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
13738 | if test "X$additional_libdir" != "X/usr/lib"; then | |
13739 | haveit= | |
13740 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
13741 | if test -n "$GCC"; then | |
13742 | case $host_os in | |
13743 | linux*) haveit=yes;; | |
13744 | esac | |
13745 | fi | |
13746 | fi | |
13747 | if test -z "$haveit"; then | |
13748 | haveit= | |
13749 | for x in $LDFLAGS $LIBLZMA; do | |
13750 | ||
13751 | acl_save_prefix="$prefix" | |
13752 | prefix="$acl_final_prefix" | |
13753 | acl_save_exec_prefix="$exec_prefix" | |
13754 | exec_prefix="$acl_final_exec_prefix" | |
13755 | eval x=\"$x\" | |
13756 | exec_prefix="$acl_save_exec_prefix" | |
13757 | prefix="$acl_save_prefix" | |
13758 | ||
13759 | if test "X$x" = "X-L$additional_libdir"; then | |
13760 | haveit=yes | |
13761 | break | |
13762 | fi | |
13763 | done | |
13764 | if test -z "$haveit"; then | |
13765 | if test -d "$additional_libdir"; then | |
13766 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
13767 | fi | |
13768 | fi | |
13769 | haveit= | |
13770 | for x in $LDFLAGS $LTLIBLZMA; do | |
13771 | ||
13772 | acl_save_prefix="$prefix" | |
13773 | prefix="$acl_final_prefix" | |
13774 | acl_save_exec_prefix="$exec_prefix" | |
13775 | exec_prefix="$acl_final_exec_prefix" | |
13776 | eval x=\"$x\" | |
13777 | exec_prefix="$acl_save_exec_prefix" | |
13778 | prefix="$acl_save_prefix" | |
13779 | ||
13780 | if test "X$x" = "X-L$additional_libdir"; then | |
13781 | haveit=yes | |
13782 | break | |
13783 | fi | |
13784 | done | |
13785 | if test -z "$haveit"; then | |
13786 | if test -d "$additional_libdir"; then | |
13787 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
13788 | fi | |
13789 | fi | |
13790 | fi | |
13791 | fi | |
13792 | ;; | |
13793 | -R*) | |
13794 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
13795 | if test "$enable_rpath" != no; then | |
13796 | haveit= | |
13797 | for x in $rpathdirs; do | |
13798 | if test "X$x" = "X$dir"; then | |
13799 | haveit=yes | |
13800 | break | |
13801 | fi | |
13802 | done | |
13803 | if test -z "$haveit"; then | |
13804 | rpathdirs="$rpathdirs $dir" | |
13805 | fi | |
13806 | haveit= | |
13807 | for x in $ltrpathdirs; do | |
13808 | if test "X$x" = "X$dir"; then | |
13809 | haveit=yes | |
13810 | break | |
13811 | fi | |
13812 | done | |
13813 | if test -z "$haveit"; then | |
13814 | ltrpathdirs="$ltrpathdirs $dir" | |
13815 | fi | |
13816 | fi | |
13817 | ;; | |
13818 | -l*) | |
13819 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
13820 | ;; | |
13821 | *.la) | |
13822 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
13823 | ;; | |
13824 | *) | |
13825 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
13826 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
13827 | ;; | |
13828 | esac | |
13829 | done | |
13830 | fi | |
13831 | else | |
13832 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
13833 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
13834 | fi | |
13835 | fi | |
13836 | fi | |
13837 | done | |
13838 | done | |
13839 | if test "X$rpathdirs" != "X"; then | |
13840 | if test -n "$hardcode_libdir_separator"; then | |
13841 | alldirs= | |
13842 | for found_dir in $rpathdirs; do | |
13843 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
13844 | done | |
13845 | acl_save_libdir="$libdir" | |
13846 | libdir="$alldirs" | |
13847 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13848 | libdir="$acl_save_libdir" | |
13849 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13850 | else | |
13851 | for found_dir in $rpathdirs; do | |
13852 | acl_save_libdir="$libdir" | |
13853 | libdir="$found_dir" | |
13854 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13855 | libdir="$acl_save_libdir" | |
13856 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13857 | done | |
13858 | fi | |
13859 | fi | |
13860 | if test "X$ltrpathdirs" != "X"; then | |
13861 | for found_dir in $ltrpathdirs; do | |
13862 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
13863 | done | |
13864 | fi | |
13865 | ||
13866 | ||
13867 | ac_save_CPPFLAGS="$CPPFLAGS" | |
13868 | ||
13869 | for element in $INCLZMA; do | |
13870 | haveit= | |
13871 | for x in $CPPFLAGS; do | |
13872 | ||
13873 | acl_save_prefix="$prefix" | |
13874 | prefix="$acl_final_prefix" | |
13875 | acl_save_exec_prefix="$exec_prefix" | |
13876 | exec_prefix="$acl_final_exec_prefix" | |
13877 | eval x=\"$x\" | |
13878 | exec_prefix="$acl_save_exec_prefix" | |
13879 | prefix="$acl_save_prefix" | |
13880 | ||
13881 | if test "X$x" = "X$element"; then | |
13882 | haveit=yes | |
13883 | break | |
13884 | fi | |
13885 | done | |
13886 | if test -z "$haveit"; then | |
13887 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
13888 | fi | |
13889 | done | |
13890 | ||
13891 | ||
13892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
13893 | $as_echo_n "checking for liblzma... " >&6; } | |
13894 | if test "${ac_cv_liblzma+set}" = set; then : | |
13895 | $as_echo_n "(cached) " >&6 | |
13896 | else | |
13897 | ||
13898 | ac_save_LIBS="$LIBS" | |
13899 | LIBS="$LIBS $LIBLZMA" | |
13900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13901 | /* end confdefs.h. */ | |
13902 | #include "lzma.h" | |
13903 | int | |
13904 | main () | |
13905 | { | |
13906 | lzma_index_iter iter; | |
13907 | lzma_index_iter_init (&iter, 0); | |
13908 | lzma_mf_is_supported (LZMA_MF_HC3); | |
13909 | ; | |
13910 | return 0; | |
13911 | } | |
13912 | _ACEOF | |
13913 | if ac_fn_c_try_link "$LINENO"; then : | |
13914 | ac_cv_liblzma=yes | |
13915 | else | |
13916 | ac_cv_liblzma=no | |
13917 | fi | |
13918 | rm -f core conftest.err conftest.$ac_objext \ | |
13919 | conftest$ac_exeext conftest.$ac_ext | |
13920 | LIBS="$ac_save_LIBS" | |
13921 | ||
13922 | fi | |
13923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
13924 | $as_echo "$ac_cv_liblzma" >&6; } | |
13925 | if test "$ac_cv_liblzma" = yes; then | |
13926 | HAVE_LIBLZMA=yes | |
13927 | ||
13928 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
13929 | ||
13930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
13931 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
13932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
13933 | $as_echo "$LIBLZMA" >&6; } | |
13934 | else | |
13935 | HAVE_LIBLZMA=no | |
13936 | CPPFLAGS="$ac_save_CPPFLAGS" | |
13937 | LIBLZMA= | |
13938 | LTLIBLZMA= | |
13939 | fi | |
13940 | ||
13941 | ||
13942 | ||
13943 | ||
13944 | ||
13945 | ||
13946 | if test "$HAVE_LIBLZMA" != yes; then | |
13947 | if test "$with_lzma" = yes; then | |
13948 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
13949 | fi | |
13950 | fi | |
13951 | fi | |
13952 | fi | |
13953 | ||
3fc11d3e JM |
13954 | LIBGUI="../libgui/src/libgui.a" |
13955 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
13956 | ||
13957 | ||
7a292a7a | 13958 | |
3fc11d3e JM |
13959 | WIN32LDAPP= |
13960 | ||
13961 | ||
13962 | ||
d91670b9 | 13963 | case "${host}" in |
686a5eed | 13964 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
13965 | configdir="win" |
13966 | ;; | |
13967 | *) | |
13968 | configdir="unix" | |
13969 | ;; | |
13970 | esac | |
3fc11d3e JM |
13971 | |
13972 | GDBTKLIBS= | |
13973 | if test "${enable_gdbtk}" = "yes"; then | |
13974 | ||
d1c3b63a KS |
13975 | # Gdbtk must have an absolute path to srcdir in order to run |
13976 | # properly when not installed. | |
13977 | here=`pwd` | |
13978 | cd ${srcdir} | |
13979 | GDBTK_SRC_DIR=`pwd` | |
13980 | cd $here | |
13981 | ||
bec39cab | 13982 | |
5062cc19 KS |
13983 | # |
13984 | # Ok, lets find the tcl configuration | |
13985 | # First, look for one uninstalled. | |
13986 | # the alternative search directory is invoked by --with-tcl | |
13987 | # | |
3fc11d3e | 13988 | |
5062cc19 KS |
13989 | if test x"${no_tcl}" = x ; then |
13990 | # we reset no_tcl in case something fails here | |
13991 | no_tcl=true | |
bec39cab | 13992 | |
81ecdfbb RW |
13993 | # Check whether --with-tcl was given. |
13994 | if test "${with_tcl+set}" = set; then : | |
13995 | withval=$with_tcl; with_tclconfig=${withval} | |
13996 | fi | |
13997 | ||
13998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
13999 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
14000 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
14001 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 14002 | else |
bec39cab | 14003 | |
3fc11d3e | 14004 | |
5062cc19 KS |
14005 | # First check to see if --with-tcl was specified. |
14006 | case "${host}" in | |
14007 | *-*-cygwin*) platDir="win" ;; | |
14008 | *) platDir="unix" ;; | |
14009 | esac | |
14010 | if test x"${with_tclconfig}" != x ; then | |
14011 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
14012 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
14013 | else | |
81ecdfbb | 14014 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
14015 | fi |
14016 | fi | |
14017 | ||
14018 | # then check for a private Tcl installation | |
14019 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14020 | for i in \ | |
14021 | ../tcl \ | |
14022 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14023 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
14024 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14025 | ../../tcl \ | |
14026 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14027 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14028 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14029 | ../../../tcl \ | |
14030 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14031 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14032 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
14033 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
14034 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
14035 | break | |
14036 | fi | |
14037 | done | |
14038 | fi | |
14039 | ||
14040 | # on Darwin, check in Framework installation locations | |
14041 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
14042 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
14043 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
14044 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
14045 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
14046 | ; do | |
14047 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
14048 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
14049 | break | |
14050 | fi | |
14051 | done | |
14052 | fi | |
14053 | ||
14054 | # check in a few common install locations | |
14055 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14056 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
14057 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
14058 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
14059 | `ls -d /usr/local/lib 2>/dev/null` \ | |
14060 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
14061 | `ls -d /usr/lib 2>/dev/null` \ | |
14062 | ; do | |
14063 | if test -f "$i/tclConfig.sh" ; then | |
14064 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
14065 | break | |
14066 | fi | |
14067 | done | |
14068 | fi | |
3fc11d3e | 14069 | |
5062cc19 KS |
14070 | # check in a few other private locations |
14071 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14072 | for i in \ | |
14073 | ${srcdir}/../tcl \ | |
14074 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14075 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
14076 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
14077 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
14078 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
14079 | break | |
14080 | fi | |
14081 | done | |
14082 | fi | |
bec39cab | 14083 | |
3fc11d3e JM |
14084 | fi |
14085 | ||
5062cc19 KS |
14086 | |
14087 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14088 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
14089 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
14090 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
14091 | else |
14092 | no_tcl= | |
14093 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
14094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
14095 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
14096 | fi |
14097 | fi | |
3fc11d3e | 14098 | |
bec39cab | 14099 | |
85541719 DE |
14100 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
14101 | # point to doing Tcl. | |
bec39cab | 14102 | |
5062cc19 KS |
14103 | # |
14104 | # Ok, lets find the tk configuration | |
14105 | # First, look for one uninstalled. | |
14106 | # the alternative search directory is invoked by --with-tk | |
14107 | # | |
3fc11d3e | 14108 | |
5062cc19 KS |
14109 | if test x"${no_tk}" = x ; then |
14110 | # we reset no_tk in case something fails here | |
14111 | no_tk=true | |
bec39cab | 14112 | |
81ecdfbb RW |
14113 | # Check whether --with-tk was given. |
14114 | if test "${with_tk+set}" = set; then : | |
14115 | withval=$with_tk; with_tkconfig=${withval} | |
14116 | fi | |
14117 | ||
14118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
14119 | $as_echo_n "checking for Tk configuration... " >&6; } | |
14120 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
14121 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14122 | else |
3fc11d3e JM |
14123 | |
14124 | ||
5062cc19 KS |
14125 | # First check to see if --with-tkconfig was specified. |
14126 | if test x"${with_tkconfig}" != x ; then | |
14127 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
14128 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
14129 | else | |
81ecdfbb | 14130 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
14131 | fi |
14132 | fi | |
3fc11d3e | 14133 | |
5062cc19 KS |
14134 | # then check for a private Tk library |
14135 | case "${host}" in | |
14136 | *-*-cygwin*) platDir="win" ;; | |
14137 | *) platDir="unix" ;; | |
14138 | esac | |
14139 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
14140 | for i in \ | |
14141 | ../tk \ | |
14142 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14143 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
14144 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
14145 | ../../tk \ | |
14146 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14147 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
14148 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
14149 | ../../../tk \ | |
14150 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14151 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
14152 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
14153 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
14154 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
14155 | break | |
14156 | fi | |
14157 | done | |
14158 | fi | |
14159 | ||
14160 | # on Darwin, check in Framework installation locations | |
14161 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
14162 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
14163 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
14164 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
14165 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
14166 | ; do | |
14167 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
14168 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
14169 | break | |
14170 | fi | |
14171 | done | |
14172 | fi | |
14173 | ||
14174 | # check in a few common install locations | |
14175 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
14176 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
14177 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
14178 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
14179 | `ls -d /usr/local/lib 2>/dev/null` \ | |
14180 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
14181 | `ls -d /usr/lib 2>/dev/null` \ | |
14182 | ; do | |
14183 | if test -f "$i/tkConfig.sh" ; then | |
14184 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
14185 | break | |
14186 | fi | |
14187 | done | |
14188 | fi | |
14189 | # check in a few other private locations | |
14190 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
14191 | for i in \ | |
14192 | ${srcdir}/../tk \ | |
14193 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14194 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
14195 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
14196 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
14197 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
14198 | break | |
14199 | fi | |
14200 | done | |
14201 | fi | |
3fc11d3e | 14202 | |
3fc11d3e JM |
14203 | fi |
14204 | ||
14205 | ||
5062cc19 KS |
14206 | if test x"${ac_cv_c_tkconfig}" = x ; then |
14207 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
14208 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
14209 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
14210 | else |
14211 | no_tk= | |
14212 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
14213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
14214 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 14215 | fi |
3fc11d3e | 14216 | fi |
dd2504ab | 14217 | |
dd2504ab | 14218 | |
85541719 DE |
14219 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
14220 | ||
81ecdfbb RW |
14221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
14222 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
14223 | |
14224 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
14225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
14226 | $as_echo "loading" >&6; } | |
85541719 DE |
14227 | . ${TCL_BIN_DIR}/tclConfig.sh |
14228 | else | |
81ecdfbb RW |
14229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
14230 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
14231 | fi |
14232 | ||
14233 | # eval is required to do the TCL_DBGX substitution | |
14234 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
14235 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
14236 | ||
14237 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
14238 | # then set the common variable name to the value of the build variables. | |
14239 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
14240 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
14241 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
14242 | # installed and uninstalled version of Tcl. | |
14243 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
14244 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
14245 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
14246 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
14247 | elif test "`uname -s`" = "Darwin"; then | |
14248 | # If Tcl was built as a framework, attempt to use the libraries | |
14249 | # from the framework at the given location so that linking works | |
a68ffae9 | 14250 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
14251 | case ${TCL_DEFS} in |
14252 | *TCL_FRAMEWORK*) | |
14253 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
14254 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
14255 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
14256 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
14257 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
14258 | break | |
14259 | fi | |
14260 | done | |
14261 | fi | |
14262 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
14263 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
14264 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
14265 | fi | |
14266 | ;; | |
14267 | esac | |
14268 | fi | |
14269 | ||
14270 | # eval is required to do the TCL_DBGX substitution | |
14271 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
14272 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
14273 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
14274 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
14275 | ||
14276 | ||
14277 | ||
14278 | ||
14279 | ||
14280 | ||
14281 | ||
14282 | ||
14283 | ||
14284 | ||
14285 | ||
14286 | ||
14287 | ||
14288 | ||
14289 | ||
14290 | # Check for in-tree tcl | |
14291 | here=`pwd` | |
14292 | cd ${srcdir}/.. | |
14293 | topdir=`pwd` | |
14294 | cd ${here} | |
14295 | ||
14296 | intree="no" | |
14297 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
14298 | intree="yes" | |
14299 | fi | |
14300 | ||
14301 | # Find Tcl private headers | |
14302 | if test x"${intree}" = xno; then | |
14303 | ||
81ecdfbb RW |
14304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
14305 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
14306 | private_dir="" |
14307 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
14308 | if test -f ${dir}/tclInt.h ; then | |
14309 | private_dir=${dir} | |
14310 | fi | |
14311 | ||
14312 | if test x"${private_dir}" = x; then | |
81ecdfbb | 14313 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
14314 | else |
14315 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
14316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
14317 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
14318 | fi |
14319 | ||
14320 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
14321 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
14322 | TCL_DEPS="" | |
14323 | else | |
14324 | # If building tcl in the same src tree, private headers | |
14325 | # are not needed, but we need to be sure to use the right | |
14326 | # headers library | |
14327 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
14328 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
14329 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
14330 | fi | |
14331 | ||
14332 | ||
14333 | ||
14334 | ||
14335 | ||
81ecdfbb RW |
14336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
14337 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 14338 | |
5062cc19 | 14339 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
14340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
14341 | $as_echo "loading" >&6; } | |
5062cc19 | 14342 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 14343 | else |
81ecdfbb RW |
14344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
14345 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 14346 | fi |
bec39cab | 14347 | |
5062cc19 KS |
14348 | # eval is required to do the TK_DBGX substitution |
14349 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
14350 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
14351 | ||
14352 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
14353 | # then set the common variable name to the value of the build variables. | |
14354 | # For example, the variable TK_LIB_SPEC will be set to the value | |
14355 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
14356 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
14357 | # installed and uninstalled version of Tcl. | |
85541719 | 14358 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
14359 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
14360 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
14361 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
14362 | elif test "`uname -s`" = "Darwin"; then | |
14363 | # If Tk was built as a framework, attempt to use the libraries | |
14364 | # from the framework at the given location so that linking works | |
a68ffae9 | 14365 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
14366 | case ${TK_DEFS} in |
14367 | *TK_FRAMEWORK*) | |
85541719 | 14368 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
14369 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
14370 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
14371 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
14372 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
14373 | break | |
14374 | fi | |
14375 | done | |
14376 | fi | |
85541719 | 14377 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
14378 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
14379 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
14380 | fi | |
14381 | ;; | |
14382 | esac | |
3fc11d3e JM |
14383 | fi |
14384 | ||
5062cc19 KS |
14385 | # eval is required to do the TK_DBGX substitution |
14386 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
14387 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
14388 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
14389 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 14390 | |
3fc11d3e JM |
14391 | |
14392 | ||
bec39cab AC |
14393 | |
14394 | ||
14395 | ||
14396 | ||
14397 | ||
14398 | ||
14399 | ||
3fc11d3e | 14400 | |
3fc11d3e | 14401 | |
bec39cab | 14402 | |
bec39cab | 14403 | |
85541719 DE |
14404 | # Check for in-tree Tk |
14405 | intree="no" | |
14406 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
14407 | intree="yes" | |
14408 | fi | |
3fc11d3e | 14409 | |
85541719 DE |
14410 | # Find Tk private headers |
14411 | if test x"${intree}" = xno; then | |
3fc11d3e | 14412 | |
81ecdfbb RW |
14413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
14414 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
14415 | private_dir="" |
14416 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
14417 | if test -f ${dir}/tkInt.h; then | |
14418 | private_dir=${dir} | |
3fc11d3e | 14419 | fi |
bec39cab | 14420 | |
5062cc19 | 14421 | if test x"${private_dir}" = x; then |
81ecdfbb | 14422 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 14423 | else |
5062cc19 | 14424 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
14425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
14426 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 14427 | fi |
3fc11d3e | 14428 | |
85541719 DE |
14429 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
14430 | TK_LIBRARY=${TK_LIB_SPEC} | |
14431 | TK_DEPS="" | |
14432 | else | |
14433 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
14434 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
14435 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
14436 | fi | |
3fc11d3e JM |
14437 | |
14438 | ||
3fc11d3e JM |
14439 | |
14440 | ||
3fc11d3e | 14441 | |
85541719 | 14442 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 14443 | |
85541719 DE |
14444 | # Include some libraries that Tcl and Tk want. |
14445 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
14446 | # Yes, the ordering seems wrong here. But it isn't. | |
14447 | # TK_LIBS is the list of libraries that need to be linked | |
14448 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
14449 | # were in LIBS then any link tests after this point would | |
14450 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
14451 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 14452 | |
85541719 DE |
14453 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
14454 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
14455 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
14456 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
14457 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
14458 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
14459 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 14460 | |
85541719 DE |
14461 | if test x$gdb_cv_os_cygwin = xyes; then |
14462 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
14463 | WIN32LDAPP="-Wl,--subsystem,console" | |
14464 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 14465 | fi |
ffc6a242 | 14466 | |
81ecdfbb | 14467 | subdirs="$subdirs gdbtk" |
3ace7edb | 14468 | |
85541719 | 14469 | fi |
3fc11d3e JM |
14470 | fi |
14471 | ||
14472 | ||
14473 | ||
14474 | ||
14475 | ||
14476 | ||
14477 | ||
14478 | ||
81ecdfbb RW |
14479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
14480 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 14481 | |
c906108c | 14482 | |
81ecdfbb RW |
14483 | # Check whether --with-x was given. |
14484 | if test "${with_x+set}" = set; then : | |
14485 | withval=$with_x; | |
14486 | fi | |
c906108c SS |
14487 | |
14488 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
14489 | if test "x$with_x" = xno; then | |
14490 | # The user explicitly disabled X. | |
14491 | have_x=disabled | |
14492 | else | |
81ecdfbb RW |
14493 | case $x_includes,$x_libraries in #( |
14494 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
14495 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
14496 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
14497 | else |
14498 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 14499 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 14500 | rm -f -r conftest.dir |
bec39cab AC |
14501 | if mkdir conftest.dir; then |
14502 | cd conftest.dir | |
bec39cab | 14503 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
14504 | incroot: |
14505 | @echo incroot='${INCROOT}' | |
14506 | usrlibdir: | |
14507 | @echo usrlibdir='${USRLIBDIR}' | |
14508 | libdir: | |
14509 | @echo libdir='${LIBDIR}' | |
14510 | _ACEOF | |
14511 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 14512 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
14513 | for ac_var in incroot usrlibdir libdir; do |
14514 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
14515 | done | |
c906108c | 14516 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
14517 | for ac_extension in a so sl dylib la dll; do |
14518 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
14519 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 14520 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
14521 | fi |
14522 | done | |
14523 | # Screen out bogus values from the imake configuration. They are | |
14524 | # bogus both because they are the default anyway, and because | |
14525 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 14526 | case $ac_im_incroot in |
81ecdfbb | 14527 | /usr/include) ac_x_includes= ;; |
bec39cab | 14528 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 14529 | esac |
bec39cab | 14530 | case $ac_im_usrlibdir in |
81ecdfbb | 14531 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 14532 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
14533 | esac |
14534 | fi | |
14535 | cd .. | |
81ecdfbb | 14536 | rm -f -r conftest.dir |
c906108c SS |
14537 | fi |
14538 | ||
bec39cab AC |
14539 | # Standard set of common directories for X headers. |
14540 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
14541 | ac_x_header_dirs=' | |
14542 | /usr/X11/include | |
81ecdfbb | 14543 | /usr/X11R7/include |
bec39cab AC |
14544 | /usr/X11R6/include |
14545 | /usr/X11R5/include | |
14546 | /usr/X11R4/include | |
14547 | ||
14548 | /usr/include/X11 | |
81ecdfbb | 14549 | /usr/include/X11R7 |
bec39cab AC |
14550 | /usr/include/X11R6 |
14551 | /usr/include/X11R5 | |
14552 | /usr/include/X11R4 | |
14553 | ||
14554 | /usr/local/X11/include | |
81ecdfbb | 14555 | /usr/local/X11R7/include |
bec39cab AC |
14556 | /usr/local/X11R6/include |
14557 | /usr/local/X11R5/include | |
14558 | /usr/local/X11R4/include | |
14559 | ||
14560 | /usr/local/include/X11 | |
81ecdfbb | 14561 | /usr/local/include/X11R7 |
bec39cab AC |
14562 | /usr/local/include/X11R6 |
14563 | /usr/local/include/X11R5 | |
14564 | /usr/local/include/X11R4 | |
14565 | ||
14566 | /usr/X386/include | |
14567 | /usr/x386/include | |
14568 | /usr/XFree86/include/X11 | |
14569 | ||
14570 | /usr/include | |
14571 | /usr/local/include | |
14572 | /usr/unsupported/include | |
14573 | /usr/athena/include | |
14574 | /usr/local/x11r5/include | |
14575 | /usr/lpp/Xamples/include | |
14576 | ||
14577 | /usr/openwin/include | |
14578 | /usr/openwin/share/include' | |
14579 | ||
14580 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 14581 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 14582 | # First, try using that file with no special directory specified. |
81ecdfbb | 14583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14584 | /* end confdefs.h. */ |
81ecdfbb | 14585 | #include <X11/Xlib.h> |
bec39cab | 14586 | _ACEOF |
81ecdfbb | 14587 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
14588 | # We can compile using X headers with no special include directory. |
14589 | ac_x_includes= | |
14590 | else | |
bec39cab | 14591 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 14592 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
14593 | ac_x_includes=$ac_dir |
14594 | break | |
14595 | fi | |
14596 | done | |
c906108c | 14597 | fi |
bec39cab AC |
14598 | rm -f conftest.err conftest.$ac_ext |
14599 | fi # $ac_x_includes = no | |
c906108c | 14600 | |
bec39cab | 14601 | if test "$ac_x_libraries" = no; then |
c906108c | 14602 | # Check for the libraries. |
c906108c SS |
14603 | # See if we find them without any special options. |
14604 | # Don't add to $LIBS permanently. | |
bec39cab | 14605 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
14606 | LIBS="-lX11 $LIBS" |
14607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 14608 | /* end confdefs.h. */ |
81ecdfbb | 14609 | #include <X11/Xlib.h> |
bec39cab AC |
14610 | int |
14611 | main () | |
14612 | { | |
81ecdfbb | 14613 | XrmInitialize () |
bec39cab AC |
14614 | ; |
14615 | return 0; | |
14616 | } | |
14617 | _ACEOF | |
81ecdfbb | 14618 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14619 | LIBS=$ac_save_LIBS |
c906108c SS |
14620 | # We can link X programs with no special library path. |
14621 | ac_x_libraries= | |
14622 | else | |
81ecdfbb RW |
14623 | LIBS=$ac_save_LIBS |
14624 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 14625 | do |
bec39cab | 14626 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
14627 | for ac_extension in a so sl dylib la dll; do |
14628 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
14629 | ac_x_libraries=$ac_dir |
14630 | break 2 | |
14631 | fi | |
14632 | done | |
14633 | done | |
14634 | fi | |
81ecdfbb RW |
14635 | rm -f core conftest.err conftest.$ac_objext \ |
14636 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 14637 | fi # $ac_x_libraries = no |
c906108c | 14638 | |
81ecdfbb RW |
14639 | case $ac_x_includes,$ac_x_libraries in #( |
14640 | no,* | *,no | *\'*) | |
14641 | # Didn't find X, or a directory has "'" in its name. | |
14642 | ac_cv_have_x="have_x=no";; #( | |
14643 | *) | |
14644 | # Record where we found X for the cache. | |
14645 | ac_cv_have_x="have_x=yes\ | |
14646 | ac_x_includes='$ac_x_includes'\ | |
14647 | ac_x_libraries='$ac_x_libraries'" | |
14648 | esac | |
c906108c | 14649 | fi |
81ecdfbb RW |
14650 | ;; #( |
14651 | *) have_x=yes;; | |
14652 | esac | |
c906108c SS |
14653 | eval "$ac_cv_have_x" |
14654 | fi # $with_x != no | |
14655 | ||
14656 | if test "$have_x" != yes; then | |
81ecdfbb RW |
14657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
14658 | $as_echo "$have_x" >&6; } | |
c906108c SS |
14659 | no_x=yes |
14660 | else | |
14661 | # If each of the values was on the command line, it overrides each guess. | |
14662 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
14663 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
14664 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
14665 | ac_cv_have_x="have_x=yes\ |
14666 | ac_x_includes='$x_includes'\ | |
14667 | ac_x_libraries='$x_libraries'" | |
14668 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
14669 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
14670 | fi |
14671 | ||
14672 | ||
bec39cab | 14673 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 14674 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
14675 | # This code just checks for a few cases where we'd like to ignore those |
14676 | # definitions, even when they're present in the '.mt' file. These cases | |
14677 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 14678 | # not part of the source tree. |
7a292a7a | 14679 | # |
81ecdfbb RW |
14680 | # Check whether --enable-sim was given. |
14681 | if test "${enable_sim+set}" = set; then : | |
14682 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
14683 | echo "enableval = ${enableval}"; |
14684 | case "${enableval}" in | |
14685 | yes) ignore_sim=false ;; | |
14686 | no) ignore_sim=true ;; | |
14687 | *) ignore_sim=false ;; | |
14688 | esac | |
14689 | else | |
14690 | ignore_sim=false | |
81ecdfbb RW |
14691 | fi |
14692 | ||
7a292a7a SS |
14693 | |
14694 | if test ! -d "${srcdir}/../sim"; then | |
14695 | ignore_sim=true | |
14696 | fi | |
14697 | ||
9b624dbe UW |
14698 | SIM= |
14699 | SIM_OBS= | |
14700 | if test "${ignore_sim}" = "false"; then | |
14701 | if test x"${gdb_sim}" != x ; then | |
14702 | SIM="${gdb_sim}" | |
14703 | SIM_OBS="remote-sim.o" | |
60ca704f | 14704 | |
81ecdfbb | 14705 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 14706 | |
9b624dbe | 14707 | fi |
7a292a7a SS |
14708 | fi |
14709 | ||
14710 | ||
14711 | ||
c906108c SS |
14712 | |
14713 | ||
14714 | ||
14715 | ||
14716 | ||
14717 | ||
dfcd3bfb | 14718 | |
e56ac5c3 AC |
14719 | |
14720 | ||
b3a90332 AC |
14721 | |
14722 | ||
c35f4ffc | 14723 | # List of host floatformats. |
bec39cab AC |
14724 | |
14725 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14726 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 14727 | _ACEOF |
c35f4ffc | 14728 | |
bec39cab AC |
14729 | |
14730 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14731 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
14732 | _ACEOF |
14733 | ||
c35f4ffc | 14734 | |
bec39cab | 14735 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 14736 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 14737 | _ACEOF |
c35f4ffc AC |
14738 | |
14739 | ||
c906108c SS |
14740 | # target_subdir is used by the testsuite to find the target libraries. |
14741 | target_subdir= | |
14742 | if test "${host}" != "${target}"; then | |
14743 | target_subdir="${target_alias}/" | |
14744 | fi | |
14745 | ||
14746 | ||
14747 | frags= | |
771b4502 | 14748 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
14749 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
14750 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 14751 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
14752 | fi |
14753 | frags="$frags $host_makefile_frag" | |
14754 | else | |
14755 | host_makefile_frag=/dev/null | |
c906108c | 14756 | fi |
c906108c | 14757 | |
c906108c SS |
14758 | |
14759 | ||
14760 | ||
771b4502 | 14761 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
14762 | # We pick this up from the host configuration file (.mh) because we |
14763 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
14764 | nativefile=`sed -n ' |
14765 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
14766 | ' ${host_makefile_frag}` | |
c906108c SS |
14767 | fi |
14768 | ||
14769 | ||
b00a8037 | 14770 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
14771 | |
14772 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 14773 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 14774 | _ACEOF |
b00a8037 DJ |
14775 | |
14776 | fi | |
14777 | ||
8dcde887 | 14778 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
14779 | # Check whether --enable-multi-ice was given. |
14780 | if test "${enable_multi_ice+set}" = set; then : | |
14781 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
14782 | yes | no) |
14783 | ;; | |
81ecdfbb | 14784 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 14785 | esac |
81ecdfbb | 14786 | fi |
b4e70030 | 14787 | |
81ecdfbb RW |
14788 | if test "x$enable_multi_ice" = xyes; then |
14789 | subdirs="$subdirs multi-ice" | |
3ace7edb | 14790 | |
a85f51e7 DJ |
14791 | fi |
14792 | ||
496c0e1b JB |
14793 | # Check whether --enable-gdbserver was given. |
14794 | if test "${enable_gdbserver+set}" = set; then : | |
14795 | enableval=$enable_gdbserver; case "${enableval}" in | |
14796 | yes| no|auto) ;; | |
14797 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
14798 | esac | |
14799 | else | |
14800 | enable_gdbserver=auto | |
14801 | fi | |
14802 | ||
14803 | ||
14804 | # We only build gdbserver automatically in a native configuration, and | |
14805 | # only if the user did not explicitly disable its build. | |
14806 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
14807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
14808 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 14809 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
14810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14811 | $as_echo "yes" >&6; } | |
14812 | subdirs="$subdirs gdbserver" | |
3ace7edb | 14813 | |
496c0e1b | 14814 | gdbserver_build_enabled=yes |
8dcde887 | 14815 | else |
81ecdfbb RW |
14816 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14817 | $as_echo "no" >&6; } | |
8dcde887 MK |
14818 | fi |
14819 | fi | |
14820 | ||
496c0e1b JB |
14821 | # If the user explicitly request the gdbserver to be built, verify that |
14822 | # we were in fact able to enable it. | |
14823 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
14824 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
14825 | fi | |
14826 | ||
393fd4c3 YQ |
14827 | # Check for babeltrace and babeltrace-ctf |
14828 | ||
14829 | # Check whether --with-babeltrace was given. | |
14830 | if test "${with_babeltrace+set}" = set; then : | |
14831 | withval=$with_babeltrace; | |
14832 | else | |
14833 | with_babeltrace=auto | |
14834 | fi | |
14835 | ||
14836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
14837 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
14838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
14839 | $as_echo "$with_babeltrace" >&6; } | |
14840 | ||
14841 | if test "x$with_babeltrace" = "xno"; then | |
14842 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
14843 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
14844 | else | |
14845 | # Append -Werror to CFLAGS so that configure can catch the warning | |
14846 | # "assignment from incompatible pointer type", which is related to | |
14847 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
14848 | # in GDB, while babeltrace 1.0.3 is broken. | |
14849 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
14850 | # safe to save and restore CFLAGS here. | |
14851 | saved_CFLAGS=$CFLAGS | |
14852 | CFLAGS="$CFLAGS -Werror" | |
14853 | ||
14854 | ||
14855 | ||
14856 | ||
14857 | ||
14858 | ||
14859 | ||
14860 | ||
14861 | use_additional=yes | |
14862 | ||
14863 | acl_save_prefix="$prefix" | |
14864 | prefix="$acl_final_prefix" | |
14865 | acl_save_exec_prefix="$exec_prefix" | |
14866 | exec_prefix="$acl_final_exec_prefix" | |
14867 | ||
14868 | eval additional_includedir=\"$includedir\" | |
14869 | eval additional_libdir=\"$libdir\" | |
14870 | ||
14871 | exec_prefix="$acl_save_exec_prefix" | |
14872 | prefix="$acl_save_prefix" | |
14873 | ||
14874 | ||
14875 | # Check whether --with-libbabeltrace-prefix was given. | |
14876 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
14877 | withval=$with_libbabeltrace_prefix; | |
14878 | if test "X$withval" = "Xno"; then | |
14879 | use_additional=no | |
14880 | else | |
14881 | if test "X$withval" = "X"; then | |
14882 | ||
14883 | acl_save_prefix="$prefix" | |
14884 | prefix="$acl_final_prefix" | |
14885 | acl_save_exec_prefix="$exec_prefix" | |
14886 | exec_prefix="$acl_final_exec_prefix" | |
14887 | ||
14888 | eval additional_includedir=\"$includedir\" | |
14889 | eval additional_libdir=\"$libdir\" | |
14890 | ||
14891 | exec_prefix="$acl_save_exec_prefix" | |
14892 | prefix="$acl_save_prefix" | |
14893 | ||
14894 | else | |
14895 | additional_includedir="$withval/include" | |
14896 | additional_libdir="$withval/lib" | |
14897 | fi | |
14898 | fi | |
14899 | ||
14900 | fi | |
14901 | ||
14902 | LIBBABELTRACE= | |
14903 | LTLIBBABELTRACE= | |
14904 | INCBABELTRACE= | |
14905 | rpathdirs= | |
14906 | ltrpathdirs= | |
14907 | names_already_handled= | |
14908 | names_next_round='babeltrace babeltrace-ctf' | |
14909 | while test -n "$names_next_round"; do | |
14910 | names_this_round="$names_next_round" | |
14911 | names_next_round= | |
14912 | for name in $names_this_round; do | |
14913 | already_handled= | |
14914 | for n in $names_already_handled; do | |
14915 | if test "$n" = "$name"; then | |
14916 | already_handled=yes | |
14917 | break | |
14918 | fi | |
14919 | done | |
14920 | if test -z "$already_handled"; then | |
14921 | names_already_handled="$names_already_handled $name" | |
14922 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14923 | eval value=\"\$HAVE_LIB$uppername\" | |
14924 | if test -n "$value"; then | |
14925 | if test "$value" = yes; then | |
14926 | eval value=\"\$LIB$uppername\" | |
14927 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
14928 | eval value=\"\$LTLIB$uppername\" | |
14929 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
14930 | else | |
14931 | : | |
14932 | fi | |
14933 | else | |
14934 | found_dir= | |
14935 | found_la= | |
14936 | found_so= | |
14937 | found_a= | |
14938 | if test $use_additional = yes; then | |
14939 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
14940 | found_dir="$additional_libdir" | |
14941 | found_so="$additional_libdir/lib$name.$shlibext" | |
14942 | if test -f "$additional_libdir/lib$name.la"; then | |
14943 | found_la="$additional_libdir/lib$name.la" | |
14944 | fi | |
14945 | else | |
14946 | if test -f "$additional_libdir/lib$name.$libext"; then | |
14947 | found_dir="$additional_libdir" | |
14948 | found_a="$additional_libdir/lib$name.$libext" | |
14949 | if test -f "$additional_libdir/lib$name.la"; then | |
14950 | found_la="$additional_libdir/lib$name.la" | |
14951 | fi | |
14952 | fi | |
14953 | fi | |
14954 | fi | |
14955 | if test "X$found_dir" = "X"; then | |
14956 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
14957 | ||
14958 | acl_save_prefix="$prefix" | |
14959 | prefix="$acl_final_prefix" | |
14960 | acl_save_exec_prefix="$exec_prefix" | |
14961 | exec_prefix="$acl_final_exec_prefix" | |
14962 | eval x=\"$x\" | |
14963 | exec_prefix="$acl_save_exec_prefix" | |
14964 | prefix="$acl_save_prefix" | |
14965 | ||
14966 | case "$x" in | |
14967 | -L*) | |
14968 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
14969 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
14970 | found_dir="$dir" | |
14971 | found_so="$dir/lib$name.$shlibext" | |
14972 | if test -f "$dir/lib$name.la"; then | |
14973 | found_la="$dir/lib$name.la" | |
14974 | fi | |
14975 | else | |
14976 | if test -f "$dir/lib$name.$libext"; then | |
14977 | found_dir="$dir" | |
14978 | found_a="$dir/lib$name.$libext" | |
14979 | if test -f "$dir/lib$name.la"; then | |
14980 | found_la="$dir/lib$name.la" | |
14981 | fi | |
14982 | fi | |
14983 | fi | |
14984 | ;; | |
14985 | esac | |
14986 | if test "X$found_dir" != "X"; then | |
14987 | break | |
14988 | fi | |
14989 | done | |
14990 | fi | |
14991 | if test "X$found_dir" != "X"; then | |
14992 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
14993 | if test "X$found_so" != "X"; then | |
14994 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14995 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14996 | else | |
14997 | haveit= | |
14998 | for x in $ltrpathdirs; do | |
14999 | if test "X$x" = "X$found_dir"; then | |
15000 | haveit=yes | |
15001 | break | |
15002 | fi | |
15003 | done | |
15004 | if test -z "$haveit"; then | |
15005 | ltrpathdirs="$ltrpathdirs $found_dir" | |
15006 | fi | |
15007 | if test "$hardcode_direct" = yes; then | |
15008 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
15009 | else | |
15010 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
15011 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
15012 | haveit= | |
15013 | for x in $rpathdirs; do | |
15014 | if test "X$x" = "X$found_dir"; then | |
15015 | haveit=yes | |
15016 | break | |
15017 | fi | |
15018 | done | |
15019 | if test -z "$haveit"; then | |
15020 | rpathdirs="$rpathdirs $found_dir" | |
15021 | fi | |
15022 | else | |
15023 | haveit= | |
15024 | for x in $LDFLAGS $LIBBABELTRACE; do | |
15025 | ||
15026 | acl_save_prefix="$prefix" | |
15027 | prefix="$acl_final_prefix" | |
15028 | acl_save_exec_prefix="$exec_prefix" | |
15029 | exec_prefix="$acl_final_exec_prefix" | |
15030 | eval x=\"$x\" | |
15031 | exec_prefix="$acl_save_exec_prefix" | |
15032 | prefix="$acl_save_prefix" | |
15033 | ||
15034 | if test "X$x" = "X-L$found_dir"; then | |
15035 | haveit=yes | |
15036 | break | |
15037 | fi | |
15038 | done | |
15039 | if test -z "$haveit"; then | |
15040 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
15041 | fi | |
15042 | if test "$hardcode_minus_L" != no; then | |
15043 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
15044 | else | |
15045 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
15046 | fi | |
15047 | fi | |
15048 | fi | |
15049 | fi | |
15050 | else | |
15051 | if test "X$found_a" != "X"; then | |
15052 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
15053 | else | |
15054 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
15055 | fi | |
15056 | fi | |
15057 | additional_includedir= | |
15058 | case "$found_dir" in | |
15059 | */lib | */lib/) | |
15060 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
15061 | additional_includedir="$basedir/include" | |
15062 | ;; | |
15063 | esac | |
15064 | if test "X$additional_includedir" != "X"; then | |
15065 | if test "X$additional_includedir" != "X/usr/include"; then | |
15066 | haveit= | |
15067 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
15068 | if test -n "$GCC"; then | |
15069 | case $host_os in | |
15070 | linux*) haveit=yes;; | |
15071 | esac | |
15072 | fi | |
15073 | fi | |
15074 | if test -z "$haveit"; then | |
15075 | for x in $CPPFLAGS $INCBABELTRACE; do | |
15076 | ||
15077 | acl_save_prefix="$prefix" | |
15078 | prefix="$acl_final_prefix" | |
15079 | acl_save_exec_prefix="$exec_prefix" | |
15080 | exec_prefix="$acl_final_exec_prefix" | |
15081 | eval x=\"$x\" | |
15082 | exec_prefix="$acl_save_exec_prefix" | |
15083 | prefix="$acl_save_prefix" | |
15084 | ||
15085 | if test "X$x" = "X-I$additional_includedir"; then | |
15086 | haveit=yes | |
15087 | break | |
15088 | fi | |
15089 | done | |
15090 | if test -z "$haveit"; then | |
15091 | if test -d "$additional_includedir"; then | |
15092 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
15093 | fi | |
15094 | fi | |
15095 | fi | |
15096 | fi | |
15097 | fi | |
15098 | if test -n "$found_la"; then | |
15099 | save_libdir="$libdir" | |
15100 | case "$found_la" in | |
15101 | */* | *\\*) . "$found_la" ;; | |
15102 | *) . "./$found_la" ;; | |
15103 | esac | |
15104 | libdir="$save_libdir" | |
15105 | for dep in $dependency_libs; do | |
15106 | case "$dep" in | |
15107 | -L*) | |
15108 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15109 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15110 | haveit= | |
15111 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15112 | if test -n "$GCC"; then | |
15113 | case $host_os in | |
15114 | linux*) haveit=yes;; | |
15115 | esac | |
15116 | fi | |
15117 | fi | |
15118 | if test -z "$haveit"; then | |
15119 | haveit= | |
15120 | for x in $LDFLAGS $LIBBABELTRACE; do | |
15121 | ||
15122 | acl_save_prefix="$prefix" | |
15123 | prefix="$acl_final_prefix" | |
15124 | acl_save_exec_prefix="$exec_prefix" | |
15125 | exec_prefix="$acl_final_exec_prefix" | |
15126 | eval x=\"$x\" | |
15127 | exec_prefix="$acl_save_exec_prefix" | |
15128 | prefix="$acl_save_prefix" | |
15129 | ||
15130 | if test "X$x" = "X-L$additional_libdir"; then | |
15131 | haveit=yes | |
15132 | break | |
15133 | fi | |
15134 | done | |
15135 | if test -z "$haveit"; then | |
15136 | if test -d "$additional_libdir"; then | |
15137 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
15138 | fi | |
15139 | fi | |
15140 | haveit= | |
15141 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
15142 | ||
15143 | acl_save_prefix="$prefix" | |
15144 | prefix="$acl_final_prefix" | |
15145 | acl_save_exec_prefix="$exec_prefix" | |
15146 | exec_prefix="$acl_final_exec_prefix" | |
15147 | eval x=\"$x\" | |
15148 | exec_prefix="$acl_save_exec_prefix" | |
15149 | prefix="$acl_save_prefix" | |
15150 | ||
15151 | if test "X$x" = "X-L$additional_libdir"; then | |
15152 | haveit=yes | |
15153 | break | |
15154 | fi | |
15155 | done | |
15156 | if test -z "$haveit"; then | |
15157 | if test -d "$additional_libdir"; then | |
15158 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
15159 | fi | |
15160 | fi | |
15161 | fi | |
15162 | fi | |
15163 | ;; | |
15164 | -R*) | |
15165 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
15166 | if test "$enable_rpath" != no; then | |
15167 | haveit= | |
15168 | for x in $rpathdirs; do | |
15169 | if test "X$x" = "X$dir"; then | |
15170 | haveit=yes | |
15171 | break | |
15172 | fi | |
15173 | done | |
15174 | if test -z "$haveit"; then | |
15175 | rpathdirs="$rpathdirs $dir" | |
15176 | fi | |
15177 | haveit= | |
15178 | for x in $ltrpathdirs; do | |
15179 | if test "X$x" = "X$dir"; then | |
15180 | haveit=yes | |
15181 | break | |
15182 | fi | |
15183 | done | |
15184 | if test -z "$haveit"; then | |
15185 | ltrpathdirs="$ltrpathdirs $dir" | |
15186 | fi | |
15187 | fi | |
15188 | ;; | |
15189 | -l*) | |
15190 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
15191 | ;; | |
15192 | *.la) | |
15193 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
15194 | ;; | |
15195 | *) | |
15196 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
15197 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
15198 | ;; | |
15199 | esac | |
15200 | done | |
15201 | fi | |
15202 | else | |
15203 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
15204 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
15205 | fi | |
15206 | fi | |
15207 | fi | |
15208 | done | |
15209 | done | |
15210 | if test "X$rpathdirs" != "X"; then | |
15211 | if test -n "$hardcode_libdir_separator"; then | |
15212 | alldirs= | |
15213 | for found_dir in $rpathdirs; do | |
15214 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
15215 | done | |
15216 | acl_save_libdir="$libdir" | |
15217 | libdir="$alldirs" | |
15218 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15219 | libdir="$acl_save_libdir" | |
15220 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
15221 | else | |
15222 | for found_dir in $rpathdirs; do | |
15223 | acl_save_libdir="$libdir" | |
15224 | libdir="$found_dir" | |
15225 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15226 | libdir="$acl_save_libdir" | |
15227 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
15228 | done | |
15229 | fi | |
15230 | fi | |
15231 | if test "X$ltrpathdirs" != "X"; then | |
15232 | for found_dir in $ltrpathdirs; do | |
15233 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
15234 | done | |
15235 | fi | |
15236 | ||
15237 | ||
15238 | ac_save_CPPFLAGS="$CPPFLAGS" | |
15239 | ||
15240 | for element in $INCBABELTRACE; do | |
15241 | haveit= | |
15242 | for x in $CPPFLAGS; do | |
15243 | ||
15244 | acl_save_prefix="$prefix" | |
15245 | prefix="$acl_final_prefix" | |
15246 | acl_save_exec_prefix="$exec_prefix" | |
15247 | exec_prefix="$acl_final_exec_prefix" | |
15248 | eval x=\"$x\" | |
15249 | exec_prefix="$acl_save_exec_prefix" | |
15250 | prefix="$acl_save_prefix" | |
15251 | ||
15252 | if test "X$x" = "X$element"; then | |
15253 | haveit=yes | |
15254 | break | |
15255 | fi | |
15256 | done | |
15257 | if test -z "$haveit"; then | |
15258 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15259 | fi | |
15260 | done | |
15261 | ||
15262 | ||
15263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
15264 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
15265 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
15266 | $as_echo_n "(cached) " >&6 | |
15267 | else | |
15268 | ||
15269 | ac_save_LIBS="$LIBS" | |
15270 | LIBS="$LIBS $LIBBABELTRACE" | |
15271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15272 | /* end confdefs.h. */ | |
15273 | #include <babeltrace/babeltrace.h> | |
15274 | #include <babeltrace/ctf/events.h> | |
15275 | #include <babeltrace/ctf/iterator.h> | |
15276 | int | |
15277 | main () | |
15278 | { | |
15279 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
15280 | struct bt_ctf_event *event = NULL; | |
15281 | const struct bt_definition *scope; | |
15282 | ||
15283 | scope = bt_ctf_get_top_level_scope (event, | |
15284 | BT_STREAM_EVENT_HEADER); | |
15285 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
15286 | ||
15287 | ; | |
15288 | return 0; | |
15289 | } | |
15290 | _ACEOF | |
15291 | if ac_fn_c_try_link "$LINENO"; then : | |
15292 | ac_cv_libbabeltrace=yes | |
15293 | else | |
15294 | ac_cv_libbabeltrace=no | |
15295 | fi | |
15296 | rm -f core conftest.err conftest.$ac_objext \ | |
15297 | conftest$ac_exeext conftest.$ac_ext | |
15298 | LIBS="$ac_save_LIBS" | |
15299 | ||
15300 | fi | |
15301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
15302 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
15303 | if test "$ac_cv_libbabeltrace" = yes; then | |
15304 | HAVE_LIBBABELTRACE=yes | |
15305 | ||
15306 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
15307 | ||
15308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
15309 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
15310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
15311 | $as_echo "$LIBBABELTRACE" >&6; } | |
15312 | else | |
15313 | HAVE_LIBBABELTRACE=no | |
15314 | CPPFLAGS="$ac_save_CPPFLAGS" | |
15315 | LIBBABELTRACE= | |
15316 | LTLIBBABELTRACE= | |
15317 | fi | |
15318 | ||
15319 | ||
15320 | ||
15321 | ||
15322 | ||
15323 | ||
15324 | CFLAGS=$saved_CFLAGS | |
15325 | ||
15326 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
15327 | if test "$with_babeltrace" = yes; then | |
15328 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
15329 | else | |
15330 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
15331 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
15332 | fi | |
15333 | fi | |
15334 | fi | |
15335 | ||
db985757 | 15336 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 15337 | # to an empty version. |
c906108c SS |
15338 | |
15339 | files= | |
15340 | links= | |
5a2402b8 | 15341 | |
c906108c SS |
15342 | rm -f nm.h |
15343 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
15344 | case "${nativefile}" in |
15345 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
15346 | * ) GDB_NM_FILE="${nativefile}" | |
15347 | esac | |
5a2402b8 AC |
15348 | files="${files} ${GDB_NM_FILE}" |
15349 | links="${links} nm.h" | |
60ca704f SE |
15350 | |
15351 | cat >>confdefs.h <<_ACEOF | |
b78960be | 15352 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 15353 | _ACEOF |
5a2402b8 | 15354 | |
c906108c | 15355 | fi |
5a2402b8 AC |
15356 | |
15357 | ||
bec39cab AC |
15358 | ac_sources="$files" |
15359 | ac_dests="$links" | |
15360 | while test -n "$ac_sources"; do | |
15361 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
15362 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
15363 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
15364 | done | |
81ecdfbb | 15365 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
15366 | |
15367 | ||
c906108c SS |
15368 | |
15369 | ||
c906108c | 15370 | |
81ecdfbb | 15371 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 15372 | |
bec39cab | 15373 | |
b292c783 JK |
15374 | # Undo the $ec_script escaping suitable for Makefile. |
15375 | transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
15376 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"` | |
15377 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
15378 | GDB_TRANSFORM_NAME=gdb | |
15379 | fi | |
15380 | ||
15381 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"` | |
15382 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
15383 | GCORE_TRANSFORM_NAME=gcore | |
15384 | fi | |
15385 | ||
15386 | ac_config_files="$ac_config_files gcore" | |
15387 | ||
15388 | ||
c971b7fa | 15389 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
15390 | |
15391 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 15392 | |
bec39cab AC |
15393 | cat >confcache <<\_ACEOF |
15394 | # This file is a shell script that caches the results of configure | |
15395 | # tests run on this system so they can be shared between configure | |
15396 | # scripts and configure runs, see configure's option --config-cache. | |
15397 | # It is not useful on other systems. If it contains results you don't | |
15398 | # want to keep, you may remove or edit it. | |
15399 | # | |
15400 | # config.status only pays attention to the cache file if you give it | |
15401 | # the --recheck option to rerun configure. | |
15402 | # | |
15403 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
15404 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15405 | # following values. | |
15406 | ||
15407 | _ACEOF | |
15408 | ||
15409 | # The following way of writing the cache mishandles newlines in values, | |
15410 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 15411 | # So, we kill variables containing newlines. |
bec39cab AC |
15412 | # Ultrix sh set writes to stderr and can't be redirected directly, |
15413 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
15414 | ( |
15415 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
15416 | eval ac_val=\$$ac_var | |
15417 | case $ac_val in #( | |
15418 | *${as_nl}*) | |
15419 | case $ac_var in #( | |
15420 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
15421 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
15422 | esac | |
15423 | case $ac_var in #( | |
15424 | _ | IFS | as_nl) ;; #( | |
15425 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
15426 | *) { eval $ac_var=; unset $ac_var;} ;; | |
15427 | esac ;; | |
15428 | esac | |
15429 | done | |
15430 | ||
bec39cab | 15431 | (set) 2>&1 | |
81ecdfbb RW |
15432 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
15433 | *${as_nl}ac_space=\ *) | |
15434 | # `set' does not quote correctly, so add quotes: double-quote | |
15435 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
15436 | sed -n \ |
15437 | "s/'/'\\\\''/g; | |
15438 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 15439 | ;; #( |
bec39cab AC |
15440 | *) |
15441 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 15442 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 15443 | ;; |
81ecdfbb RW |
15444 | esac | |
15445 | sort | |
15446 | ) | | |
bec39cab | 15447 | sed ' |
81ecdfbb | 15448 | /^ac_cv_env_/b end |
bec39cab | 15449 | t clear |
81ecdfbb | 15450 | :clear |
bec39cab AC |
15451 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
15452 | t end | |
81ecdfbb RW |
15453 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
15454 | :end' >>confcache | |
15455 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
15456 | if test -w "$cache_file"; then | |
15457 | test "x$cache_file" != "x/dev/null" && | |
15458 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
15459 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
15460 | cat confcache >$cache_file |
15461 | else | |
81ecdfbb RW |
15462 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
15463 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
15464 | fi |
15465 | fi | |
15466 | rm -f confcache | |
15467 | ||
15468 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15469 | # Let make expand exec_prefix. | |
15470 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15471 | ||
bec39cab AC |
15472 | DEFS=-DHAVE_CONFIG_H |
15473 | ||
15474 | ac_libobjs= | |
15475 | ac_ltlibobjs= | |
15476 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
15477 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
15478 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
15479 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
15480 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
15481 | # will be set to the directory where LIBOBJS objects are built. | |
15482 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
15483 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
15484 | done |
15485 | LIBOBJS=$ac_libobjs | |
15486 | ||
15487 | LTLIBOBJS=$ac_ltlibobjs | |
15488 | ||
15489 | ||
85981d60 | 15490 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
15491 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
15492 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 15493 | fi |
a417dc56 | 15494 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
15495 | as_fn_error "conditional \"GMAKE\" was never defined. |
15496 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 15497 | fi |
4df42755 DE |
15498 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
15499 | as_fn_error "conditional \"HAVE_PYTHON\" was never defined. | |
15500 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
15501 | fi | |
15502 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
15503 | as_fn_error "conditional \"HAVE_GUILE\" was never defined. | |
15504 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
15505 | fi | |
81ecdfbb RW |
15506 | |
15507 | ||
bec39cab | 15508 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 15509 | ac_write_fail=0 |
bec39cab AC |
15510 | ac_clean_files_save=$ac_clean_files |
15511 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
15512 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
15513 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
15514 | as_write_fail=0 | |
15515 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
15516 | #! $SHELL |
15517 | # Generated by $as_me. | |
15518 | # Run this file to recreate the current configuration. | |
15519 | # Compiler output produced by configure, useful for debugging | |
15520 | # configure, is in config.log if it exists. | |
15521 | ||
15522 | debug=false | |
15523 | ac_cs_recheck=false | |
15524 | ac_cs_silent=false | |
bec39cab | 15525 | |
81ecdfbb RW |
15526 | SHELL=\${CONFIG_SHELL-$SHELL} |
15527 | export SHELL | |
15528 | _ASEOF | |
15529 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
15530 | ## -------------------- ## | |
15531 | ## M4sh Initialization. ## | |
15532 | ## -------------------- ## | |
15533 | ||
15534 | # Be more Bourne compatible | |
15535 | DUALCASE=1; export DUALCASE # for MKS sh | |
15536 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
15537 | emulate sh |
15538 | NULLCMD=: | |
81ecdfbb | 15539 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
15540 | # is contrary to our usage. Disable this feature. |
15541 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
15542 | setopt NO_GLOB_SUBST |
15543 | else | |
15544 | case `(set -o) 2>/dev/null` in #( | |
15545 | *posix*) : | |
15546 | set -o posix ;; #( | |
15547 | *) : | |
15548 | ;; | |
15549 | esac | |
bec39cab | 15550 | fi |
bec39cab | 15551 | |
81ecdfbb RW |
15552 | |
15553 | as_nl=' | |
15554 | ' | |
15555 | export as_nl | |
15556 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
15557 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
15558 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
15559 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
15560 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
15561 | # but without wasting forks for bash or zsh. | |
15562 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
15563 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15564 | as_echo='print -r --' | |
15565 | as_echo_n='print -rn --' | |
15566 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15567 | as_echo='printf %s\n' | |
15568 | as_echo_n='printf %s' | |
15569 | else | |
15570 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
15571 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
15572 | as_echo_n='/usr/ucb/echo -n' | |
15573 | else | |
15574 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
15575 | as_echo_n_body='eval | |
15576 | arg=$1; | |
15577 | case $arg in #( | |
15578 | *"$as_nl"*) | |
15579 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
15580 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
15581 | esac; | |
15582 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
15583 | ' | |
15584 | export as_echo_n_body | |
15585 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
15586 | fi | |
15587 | export as_echo_body | |
15588 | as_echo='sh -c $as_echo_body as_echo' | |
15589 | fi | |
15590 | ||
15591 | # The user is always right. | |
15592 | if test "${PATH_SEPARATOR+set}" != set; then | |
15593 | PATH_SEPARATOR=: | |
15594 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
15595 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
15596 | PATH_SEPARATOR=';' | |
15597 | } | |
bec39cab AC |
15598 | fi |
15599 | ||
15600 | ||
81ecdfbb RW |
15601 | # IFS |
15602 | # We need space, tab and new line, in precisely that order. Quoting is | |
15603 | # there to prevent editors from complaining about space-tab. | |
15604 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
15605 | # splitting by setting IFS to empty value.) | |
15606 | IFS=" "" $as_nl" | |
15607 | ||
15608 | # Find who we are. Look in the path if we contain no directory separator. | |
15609 | case $0 in #(( | |
15610 | *[\\/]* ) as_myself=$0 ;; | |
15611 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
15612 | for as_dir in $PATH | |
15613 | do | |
15614 | IFS=$as_save_IFS | |
15615 | test -z "$as_dir" && as_dir=. | |
15616 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
15617 | done | |
15618 | IFS=$as_save_IFS | |
15619 | ||
15620 | ;; | |
15621 | esac | |
15622 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
15623 | # in which case we are not to be found in the path. | |
15624 | if test "x$as_myself" = x; then | |
15625 | as_myself=$0 | |
15626 | fi | |
15627 | if test ! -f "$as_myself"; then | |
15628 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
15629 | exit 1 | |
15630 | fi | |
15631 | ||
15632 | # Unset variables that we do not need and which cause bugs (e.g. in | |
15633 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
15634 | # suppresses any "Segmentation fault" message there. '((' could | |
15635 | # trigger a bug in pdksh 5.2.14. | |
15636 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
15637 | do eval test x\${$as_var+set} = xset \ | |
15638 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
15639 | done | |
bec39cab AC |
15640 | PS1='$ ' |
15641 | PS2='> ' | |
15642 | PS4='+ ' | |
15643 | ||
15644 | # NLS nuisances. | |
81ecdfbb RW |
15645 | LC_ALL=C |
15646 | export LC_ALL | |
15647 | LANGUAGE=C | |
15648 | export LANGUAGE | |
15649 | ||
15650 | # CDPATH. | |
15651 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
15652 | ||
15653 | ||
15654 | # as_fn_error ERROR [LINENO LOG_FD] | |
15655 | # --------------------------------- | |
15656 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
15657 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
15658 | # script with status $?, using 1 if that was 0. | |
15659 | as_fn_error () | |
15660 | { | |
15661 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
15662 | if test "$3"; then | |
15663 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
15664 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
15665 | fi | |
15666 | $as_echo "$as_me: error: $1" >&2 | |
15667 | as_fn_exit $as_status | |
15668 | } # as_fn_error | |
15669 | ||
15670 | ||
15671 | # as_fn_set_status STATUS | |
15672 | # ----------------------- | |
15673 | # Set $? to STATUS, without forking. | |
15674 | as_fn_set_status () | |
15675 | { | |
15676 | return $1 | |
15677 | } # as_fn_set_status | |
15678 | ||
15679 | # as_fn_exit STATUS | |
15680 | # ----------------- | |
15681 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
15682 | as_fn_exit () | |
15683 | { | |
15684 | set +e | |
15685 | as_fn_set_status $1 | |
15686 | exit $1 | |
15687 | } # as_fn_exit | |
15688 | ||
15689 | # as_fn_unset VAR | |
15690 | # --------------- | |
15691 | # Portably unset VAR. | |
15692 | as_fn_unset () | |
15693 | { | |
15694 | { eval $1=; unset $1;} | |
15695 | } | |
15696 | as_unset=as_fn_unset | |
15697 | # as_fn_append VAR VALUE | |
15698 | # ---------------------- | |
15699 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
15700 | # advantage of any shell optimizations that allow amortized linear growth over | |
15701 | # repeated appends, instead of the typical quadratic growth present in naive | |
15702 | # implementations. | |
15703 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
15704 | eval 'as_fn_append () | |
15705 | { | |
15706 | eval $1+=\$2 | |
15707 | }' | |
15708 | else | |
15709 | as_fn_append () | |
15710 | { | |
15711 | eval $1=\$$1\$2 | |
15712 | } | |
15713 | fi # as_fn_append | |
15714 | ||
15715 | # as_fn_arith ARG... | |
15716 | # ------------------ | |
15717 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
15718 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
15719 | # must be portable across $(()) and expr. | |
15720 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
15721 | eval 'as_fn_arith () | |
15722 | { | |
15723 | as_val=$(( $* )) | |
15724 | }' | |
15725 | else | |
15726 | as_fn_arith () | |
15727 | { | |
15728 | as_val=`expr "$@" || test $? -eq 1` | |
15729 | } | |
15730 | fi # as_fn_arith | |
bec39cab | 15731 | |
81ecdfbb RW |
15732 | |
15733 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
15734 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
15735 | as_expr=expr |
15736 | else | |
15737 | as_expr=false | |
15738 | fi | |
15739 | ||
81ecdfbb | 15740 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
15741 | as_basename=basename |
15742 | else | |
15743 | as_basename=false | |
15744 | fi | |
15745 | ||
81ecdfbb RW |
15746 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
15747 | as_dirname=dirname | |
15748 | else | |
15749 | as_dirname=false | |
15750 | fi | |
bec39cab | 15751 | |
81ecdfbb | 15752 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
15753 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
15754 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
15755 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
15756 | $as_echo X/"$0" | | |
15757 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
15758 | s//\1/ | |
15759 | q | |
15760 | } | |
15761 | /^X\/\(\/\/\)$/{ | |
15762 | s//\1/ | |
15763 | q | |
15764 | } | |
15765 | /^X\/\(\/\).*/{ | |
15766 | s//\1/ | |
15767 | q | |
15768 | } | |
15769 | s/.*/./; q'` | |
b4e70030 | 15770 | |
b4e70030 JB |
15771 | # Avoid depending upon Character Ranges. |
15772 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
15773 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
15774 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
15775 | as_cr_digits='0123456789' | |
15776 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
15777 | ||
81ecdfbb RW |
15778 | ECHO_C= ECHO_N= ECHO_T= |
15779 | case `echo -n x` in #((((( | |
15780 | -n*) | |
15781 | case `echo 'xy\c'` in | |
15782 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
15783 | xy) ECHO_C='\c';; | |
15784 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
15785 | ECHO_T=' ';; | |
15786 | esac;; | |
15787 | *) | |
15788 | ECHO_N='-n';; | |
bec39cab AC |
15789 | esac |
15790 | ||
81ecdfbb RW |
15791 | rm -f conf$$ conf$$.exe conf$$.file |
15792 | if test -d conf$$.dir; then | |
15793 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 15794 | else |
81ecdfbb RW |
15795 | rm -f conf$$.dir |
15796 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 15797 | fi |
81ecdfbb RW |
15798 | if (echo >conf$$.file) 2>/dev/null; then |
15799 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 15800 | as_ln_s='ln -s' |
81ecdfbb RW |
15801 | # ... but there are two gotchas: |
15802 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
15803 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
15804 | # In both cases, we have to default to `cp -p'. | |
15805 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
15806 | as_ln_s='cp -p' | |
15807 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
15808 | as_ln_s=ln | |
15809 | else | |
15810 | as_ln_s='cp -p' | |
b4e70030 | 15811 | fi |
bec39cab AC |
15812 | else |
15813 | as_ln_s='cp -p' | |
15814 | fi | |
81ecdfbb RW |
15815 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
15816 | rmdir conf$$.dir 2>/dev/null | |
15817 | ||
15818 | ||
15819 | # as_fn_mkdir_p | |
15820 | # ------------- | |
15821 | # Create "$as_dir" as a directory, including parents if necessary. | |
15822 | as_fn_mkdir_p () | |
15823 | { | |
15824 | ||
15825 | case $as_dir in #( | |
15826 | -*) as_dir=./$as_dir;; | |
15827 | esac | |
15828 | test -d "$as_dir" || eval $as_mkdir_p || { | |
15829 | as_dirs= | |
15830 | while :; do | |
15831 | case $as_dir in #( | |
15832 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
15833 | *) as_qdir=$as_dir;; | |
15834 | esac | |
15835 | as_dirs="'$as_qdir' $as_dirs" | |
15836 | as_dir=`$as_dirname -- "$as_dir" || | |
15837 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
15838 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
15839 | X"$as_dir" : 'X\(//\)$' \| \ | |
15840 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
15841 | $as_echo X"$as_dir" | | |
15842 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15843 | s//\1/ | |
15844 | q | |
15845 | } | |
15846 | /^X\(\/\/\)[^/].*/{ | |
15847 | s//\1/ | |
15848 | q | |
15849 | } | |
15850 | /^X\(\/\/\)$/{ | |
15851 | s//\1/ | |
15852 | q | |
15853 | } | |
15854 | /^X\(\/\).*/{ | |
15855 | s//\1/ | |
15856 | q | |
15857 | } | |
15858 | s/.*/./; q'` | |
15859 | test -d "$as_dir" && break | |
15860 | done | |
15861 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
15862 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
15863 | ||
bec39cab | 15864 | |
81ecdfbb | 15865 | } # as_fn_mkdir_p |
bec39cab | 15866 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 15867 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
15868 | else |
15869 | test -d ./-p && rmdir ./-p | |
15870 | as_mkdir_p=false | |
15871 | fi | |
15872 | ||
81ecdfbb RW |
15873 | if test -x / >/dev/null 2>&1; then |
15874 | as_test_x='test -x' | |
15875 | else | |
15876 | if ls -dL / >/dev/null 2>&1; then | |
15877 | as_ls_L_option=L | |
15878 | else | |
15879 | as_ls_L_option= | |
15880 | fi | |
15881 | as_test_x=' | |
15882 | eval sh -c '\'' | |
15883 | if test -d "$1"; then | |
15884 | test -d "$1/."; | |
15885 | else | |
15886 | case $1 in #( | |
15887 | -*)set "./$1";; | |
15888 | esac; | |
15889 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
15890 | ???[sx]*):;;*)false;;esac;fi | |
15891 | '\'' sh | |
15892 | ' | |
15893 | fi | |
15894 | as_executable_p=$as_test_x | |
bec39cab AC |
15895 | |
15896 | # Sed expression to map a string onto a valid CPP name. | |
15897 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
15898 | ||
15899 | # Sed expression to map a string onto a valid variable name. | |
15900 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
15901 | ||
15902 | ||
bec39cab | 15903 | exec 6>&1 |
81ecdfbb RW |
15904 | ## ----------------------------------- ## |
15905 | ## Main body of $CONFIG_STATUS script. ## | |
15906 | ## ----------------------------------- ## | |
15907 | _ASEOF | |
15908 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
15909 | ||
15910 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15911 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 15912 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
15913 | # values after options handling. |
15914 | ac_log=" | |
bec39cab | 15915 | This file was extended by $as_me, which was |
81ecdfbb | 15916 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
15917 | |
15918 | CONFIG_FILES = $CONFIG_FILES | |
15919 | CONFIG_HEADERS = $CONFIG_HEADERS | |
15920 | CONFIG_LINKS = $CONFIG_LINKS | |
15921 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
15922 | $ $0 $@ | |
15923 | ||
81ecdfbb RW |
15924 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
15925 | " | |
15926 | ||
bec39cab AC |
15927 | _ACEOF |
15928 | ||
81ecdfbb RW |
15929 | case $ac_config_files in *" |
15930 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
15931 | esac | |
234b45d4 | 15932 | |
81ecdfbb RW |
15933 | case $ac_config_headers in *" |
15934 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
15935 | esac | |
b4e70030 | 15936 | |
b4e70030 | 15937 | |
81ecdfbb RW |
15938 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
15939 | # Files that config.status was made for. | |
15940 | config_files="$ac_config_files" | |
15941 | config_headers="$ac_config_headers" | |
15942 | config_links="$ac_config_links" | |
15943 | config_commands="$ac_config_commands" | |
234b45d4 | 15944 | |
81ecdfbb | 15945 | _ACEOF |
b4e70030 | 15946 | |
81ecdfbb | 15947 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 15948 | ac_cs_usage="\ |
81ecdfbb RW |
15949 | \`$as_me' instantiates files and other configuration actions |
15950 | from templates according to the current configuration. Unless the files | |
15951 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 15952 | |
81ecdfbb | 15953 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 15954 | |
bec39cab | 15955 | -h, --help print this help, then exit |
81ecdfbb RW |
15956 | -V, --version print version number and configuration settings, then exit |
15957 | -q, --quiet, --silent | |
15958 | do not print progress messages | |
bec39cab AC |
15959 | -d, --debug don't remove temporary files |
15960 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
15961 | --file=FILE[:TEMPLATE] |
15962 | instantiate the configuration file FILE | |
15963 | --header=FILE[:TEMPLATE] | |
15964 | instantiate the configuration header FILE | |
234b45d4 | 15965 | |
bec39cab AC |
15966 | Configuration files: |
15967 | $config_files | |
234b45d4 | 15968 | |
bec39cab AC |
15969 | Configuration headers: |
15970 | $config_headers | |
234b45d4 | 15971 | |
bec39cab AC |
15972 | Configuration links: |
15973 | $config_links | |
234b45d4 | 15974 | |
bec39cab AC |
15975 | Configuration commands: |
15976 | $config_commands | |
15977 | ||
81ecdfbb | 15978 | Report bugs to the package provider." |
b4e70030 | 15979 | |
81ecdfbb RW |
15980 | _ACEOF |
15981 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
15982 | ac_cs_version="\\ |
15983 | config.status | |
81ecdfbb RW |
15984 | configured by $0, generated by GNU Autoconf 2.64, |
15985 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 15986 | |
81ecdfbb | 15987 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
15988 | This config.status script is free software; the Free Software Foundation |
15989 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
15990 | |
15991 | ac_pwd='$ac_pwd' | |
15992 | srcdir='$srcdir' | |
15993 | INSTALL='$INSTALL' | |
81ecdfbb RW |
15994 | AWK='$AWK' |
15995 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
15996 | _ACEOF |
15997 | ||
81ecdfbb RW |
15998 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15999 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
16000 | ac_need_defaults=: |
16001 | while test $# != 0 | |
16002 | do | |
16003 | case $1 in | |
16004 | --*=*) | |
81ecdfbb RW |
16005 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
16006 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 16007 | ac_shift=: |
c906108c | 16008 | ;; |
81ecdfbb | 16009 | *) |
bec39cab AC |
16010 | ac_option=$1 |
16011 | ac_optarg=$2 | |
16012 | ac_shift=shift | |
c906108c | 16013 | ;; |
bec39cab | 16014 | esac |
c906108c | 16015 | |
bec39cab AC |
16016 | case $ac_option in |
16017 | # Handling of the options. | |
bec39cab AC |
16018 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
16019 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
16020 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
16021 | $as_echo "$ac_cs_version"; exit ;; | |
16022 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
16023 | debug=: ;; |
16024 | --file | --fil | --fi | --f ) | |
16025 | $ac_shift | |
81ecdfbb RW |
16026 | case $ac_optarg in |
16027 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16028 | esac | |
16029 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
16030 | ac_need_defaults=false;; |
16031 | --header | --heade | --head | --hea ) | |
16032 | $ac_shift | |
81ecdfbb RW |
16033 | case $ac_optarg in |
16034 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16035 | esac | |
16036 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 16037 | ac_need_defaults=false;; |
81ecdfbb RW |
16038 | --he | --h) |
16039 | # Conflict between --help and --header | |
16040 | as_fn_error "ambiguous option: \`$1' | |
16041 | Try \`$0 --help' for more information.";; | |
16042 | --help | --hel | -h ) | |
16043 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
16044 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
16045 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16046 | ac_cs_silent=: ;; | |
c906108c | 16047 | |
bec39cab | 16048 | # This is an error. |
81ecdfbb RW |
16049 | -*) as_fn_error "unrecognized option: \`$1' |
16050 | Try \`$0 --help' for more information." ;; | |
c906108c | 16051 | |
81ecdfbb RW |
16052 | *) as_fn_append ac_config_targets " $1" |
16053 | ac_need_defaults=false ;; | |
c906108c | 16054 | |
bec39cab AC |
16055 | esac |
16056 | shift | |
16057 | done | |
c906108c | 16058 | |
bec39cab | 16059 | ac_configure_extra_args= |
c906108c | 16060 | |
bec39cab AC |
16061 | if $ac_cs_silent; then |
16062 | exec 6>/dev/null | |
16063 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
16064 | fi | |
c906108c | 16065 | |
bec39cab | 16066 | _ACEOF |
81ecdfbb | 16067 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 16068 | if \$ac_cs_recheck; then |
81ecdfbb RW |
16069 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
16070 | shift | |
16071 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
16072 | CONFIG_SHELL='$SHELL' | |
16073 | export CONFIG_SHELL | |
16074 | exec "\$@" | |
bec39cab AC |
16075 | fi |
16076 | ||
16077 | _ACEOF | |
81ecdfbb RW |
16078 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16079 | exec 5>>config.log | |
16080 | { | |
16081 | echo | |
16082 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16083 | ## Running $as_me. ## | |
16084 | _ASBOX | |
16085 | $as_echo "$ac_log" | |
16086 | } >&5 | |
bec39cab | 16087 | |
81ecdfbb RW |
16088 | _ACEOF |
16089 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 16090 | # |
81ecdfbb | 16091 | # INIT-COMMANDS |
c906108c | 16092 | # |
a417dc56 | 16093 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 16094 | |
bec39cab AC |
16095 | _ACEOF |
16096 | ||
81ecdfbb | 16097 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 16098 | |
81ecdfbb | 16099 | # Handling of arguments. |
bec39cab | 16100 | for ac_config_target in $ac_config_targets |
c906108c | 16101 | do |
81ecdfbb RW |
16102 | case $ac_config_target in |
16103 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
16104 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 16105 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 16106 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 16107 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 16108 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 16109 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 16110 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 16111 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
16112 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
16113 | ||
16114 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
16115 | esac |
16116 | done | |
16117 | ||
81ecdfbb | 16118 | |
bec39cab AC |
16119 | # If the user did not use the arguments to specify the items to instantiate, |
16120 | # then the envvar interface is used. Set only those that are not. | |
16121 | # We use the long form for the default assignment because of an extremely | |
16122 | # bizarre bug on SunOS 4.1.3. | |
16123 | if $ac_need_defaults; then | |
16124 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16125 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16126 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
16127 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16128 | fi | |
16129 | ||
b4e70030 | 16130 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 16131 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 16132 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
16133 | # Hook for its removal unless debugging. |
16134 | # Note that there is a small window in which the directory will not be cleaned: | |
16135 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
16136 | $debug || |
16137 | { | |
81ecdfbb RW |
16138 | tmp= |
16139 | trap 'exit_status=$? | |
16140 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
16141 | ' 0 | |
16142 | trap 'as_fn_exit 1' 1 2 13 15 | |
16143 | } | |
16144 | # Create a (secure) tmp directory for tmp files. | |
16145 | ||
16146 | { | |
16147 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
16148 | test -n "$tmp" && test -d "$tmp" | |
16149 | } || | |
16150 | { | |
16151 | tmp=./conf$$-$RANDOM | |
16152 | (umask 077 && mkdir "$tmp") | |
16153 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
16154 | ||
16155 | # Set up the scripts for CONFIG_FILES section. | |
16156 | # No need to generate them if there are no CONFIG_FILES. | |
16157 | # This happens for instance with `./config.status config.h'. | |
16158 | if test -n "$CONFIG_FILES"; then | |
16159 | ||
16160 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
16161 | ac_cs_awk_getline=: | |
16162 | ac_cs_awk_pipe_init= | |
16163 | ac_cs_awk_read_file=' | |
16164 | while ((getline aline < (F[key])) > 0) | |
16165 | print(aline) | |
16166 | close(F[key])' | |
16167 | ac_cs_awk_pipe_fini= | |
16168 | else | |
16169 | ac_cs_awk_getline=false | |
16170 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
16171 | ac_cs_awk_read_file=' | |
16172 | print "|#_!!_#|" | |
16173 | print "cat " F[key] " &&" | |
16174 | '$ac_cs_awk_pipe_init | |
16175 | # The final `:' finishes the AND list. | |
16176 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
16177 | fi | |
16178 | ac_cr=`echo X | tr X '\015'` | |
16179 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
16180 | # But we know of no other shell where ac_cr would be empty at this | |
16181 | # point, so we can use a bashism as a fallback. | |
16182 | if test "x$ac_cr" = x; then | |
16183 | eval ac_cr=\$\'\\r\' | |
16184 | fi | |
16185 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
16186 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
16187 | ac_cs_awk_cr='\r' | |
16188 | else | |
16189 | ac_cs_awk_cr=$ac_cr | |
16190 | fi | |
16191 | ||
16192 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
16193 | _ACEOF | |
16194 | ||
16195 | # Create commands to substitute file output variables. | |
16196 | { | |
16197 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
16198 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
16199 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
16200 | echo "_ACAWK" && | |
16201 | echo "_ACEOF" | |
16202 | } >conf$$files.sh && | |
16203 | . ./conf$$files.sh || | |
16204 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16205 | rm -f conf$$files.sh | |
16206 | ||
16207 | { | |
16208 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
16209 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
16210 | echo "_ACEOF" | |
16211 | } >conf$$subs.sh || | |
16212 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16213 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
16214 | ac_delim='%!_!# ' | |
16215 | for ac_last_try in false false false false false :; do | |
16216 | . ./conf$$subs.sh || | |
16217 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16218 | ||
16219 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
16220 | if test $ac_delim_n = $ac_delim_num; then | |
16221 | break | |
16222 | elif $ac_last_try; then | |
16223 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16224 | else | |
16225 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16226 | fi | |
16227 | done | |
16228 | rm -f conf$$subs.sh | |
16229 | ||
16230 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16231 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
16232 | _ACEOF | |
16233 | sed -n ' | |
16234 | h | |
16235 | s/^/S["/; s/!.*/"]=/ | |
16236 | p | |
16237 | g | |
16238 | s/^[^!]*!// | |
16239 | :repl | |
16240 | t repl | |
16241 | s/'"$ac_delim"'$// | |
16242 | t delim | |
16243 | :nl | |
16244 | h | |
16245 | s/\(.\{148\}\).*/\1/ | |
16246 | t more1 | |
16247 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
16248 | p | |
16249 | n | |
16250 | b repl | |
16251 | :more1 | |
16252 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16253 | p | |
16254 | g | |
16255 | s/.\{148\}// | |
16256 | t nl | |
16257 | :delim | |
16258 | h | |
16259 | s/\(.\{148\}\).*/\1/ | |
16260 | t more2 | |
16261 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
16262 | p | |
16263 | b | |
16264 | :more2 | |
16265 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16266 | p | |
16267 | g | |
16268 | s/.\{148\}// | |
16269 | t delim | |
16270 | ' <conf$$subs.awk | sed ' | |
16271 | /^[^""]/{ | |
16272 | N | |
16273 | s/\n// | |
16274 | } | |
16275 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
16276 | rm -f conf$$subs.awk | |
16277 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16278 | _ACAWK | |
16279 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
16280 | for (key in S) S_is_set[key] = 1 | |
16281 | FS = "\a" | |
16282 | \$ac_cs_awk_pipe_init | |
16283 | } | |
16284 | { | |
16285 | line = $ 0 | |
16286 | nfields = split(line, field, "@") | |
16287 | substed = 0 | |
16288 | len = length(field[1]) | |
16289 | for (i = 2; i < nfields; i++) { | |
16290 | key = field[i] | |
16291 | keylen = length(key) | |
16292 | if (S_is_set[key]) { | |
16293 | value = S[key] | |
16294 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
16295 | len += length(value) + length(field[++i]) | |
16296 | substed = 1 | |
16297 | } else | |
16298 | len += 1 + keylen | |
16299 | } | |
16300 | if (nfields == 3 && !substed) { | |
16301 | key = field[2] | |
16302 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
16303 | \$ac_cs_awk_read_file | |
16304 | next | |
16305 | } | |
16306 | } | |
16307 | print line | |
b4e70030 | 16308 | } |
81ecdfbb RW |
16309 | \$ac_cs_awk_pipe_fini |
16310 | _ACAWK | |
16311 | _ACEOF | |
16312 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16313 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
16314 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
16315 | else | |
16316 | cat | |
16317 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
16318 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
16319 | _ACEOF | |
16320 | ||
16321 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
16322 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16323 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16324 | # (actually we leave an empty line to preserve line numbers). | |
16325 | if test "x$srcdir" = x.; then | |
16326 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
16327 | s/:*\$(srcdir):*/:/ | |
16328 | s/:*\${srcdir}:*/:/ | |
16329 | s/:*@srcdir@:*/:/ | |
16330 | s/^\([^=]*=[ ]*\):*/\1/ | |
16331 | s/:*$// | |
16332 | s/^[^=]*=[ ]*$// | |
16333 | }' | |
16334 | fi | |
16335 | ||
16336 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16337 | fi # test -n "$CONFIG_FILES" | |
16338 | ||
16339 | # Set up the scripts for CONFIG_HEADERS section. | |
16340 | # No need to generate them if there are no CONFIG_HEADERS. | |
16341 | # This happens for instance with `./config.status Makefile'. | |
16342 | if test -n "$CONFIG_HEADERS"; then | |
16343 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
16344 | BEGIN { | |
16345 | _ACEOF | |
16346 | ||
16347 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
16348 | # here-document in config.status, that substitutes the proper values into | |
16349 | # config.h.in to produce config.h. | |
4e8d927d | 16350 | |
81ecdfbb RW |
16351 | # Create a delimiter string that does not exist in confdefs.h, to ease |
16352 | # handling of long lines. | |
16353 | ac_delim='%!_!# ' | |
16354 | for ac_last_try in false false :; do | |
16355 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
16356 | if test -z "$ac_t"; then | |
16357 | break | |
16358 | elif $ac_last_try; then | |
16359 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
16360 | else | |
16361 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16362 | fi | |
16363 | done | |
4e8d927d | 16364 | |
81ecdfbb RW |
16365 | # For the awk script, D is an array of macro values keyed by name, |
16366 | # likewise P contains macro parameters if any. Preserve backslash | |
16367 | # newline sequences. | |
16368 | ||
16369 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
16370 | sed -n ' | |
16371 | s/.\{148\}/&'"$ac_delim"'/g | |
16372 | t rset | |
16373 | :rset | |
16374 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
16375 | t def | |
16376 | d | |
16377 | :def | |
16378 | s/\\$// | |
16379 | t bsnl | |
16380 | s/["\\]/\\&/g | |
16381 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16382 | D["\1"]=" \3"/p | |
16383 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
16384 | d | |
16385 | :bsnl | |
16386 | s/["\\]/\\&/g | |
16387 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16388 | D["\1"]=" \3\\\\\\n"\\/p | |
16389 | t cont | |
16390 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
16391 | t cont | |
16392 | d | |
16393 | :cont | |
16394 | n | |
16395 | s/.\{148\}/&'"$ac_delim"'/g | |
16396 | t clear | |
16397 | :clear | |
16398 | s/\\$// | |
16399 | t bsnlc | |
16400 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
16401 | d | |
16402 | :bsnlc | |
16403 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
16404 | b cont | |
16405 | ' <confdefs.h | sed ' | |
16406 | s/'"$ac_delim"'/"\\\ | |
16407 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
16408 | ||
16409 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16410 | for (key in D) D_is_set[key] = 1 | |
16411 | FS = "\a" | |
16412 | } | |
16413 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
16414 | line = \$ 0 | |
16415 | split(line, arg, " ") | |
16416 | if (arg[1] == "#") { | |
16417 | defundef = arg[2] | |
16418 | mac1 = arg[3] | |
16419 | } else { | |
16420 | defundef = substr(arg[1], 2) | |
16421 | mac1 = arg[2] | |
16422 | } | |
16423 | split(mac1, mac2, "(") #) | |
16424 | macro = mac2[1] | |
16425 | prefix = substr(line, 1, index(line, defundef) - 1) | |
16426 | if (D_is_set[macro]) { | |
16427 | # Preserve the white space surrounding the "#". | |
16428 | print prefix "define", macro P[macro] D[macro] | |
16429 | next | |
16430 | } else { | |
16431 | # Replace #undef with comments. This is necessary, for example, | |
16432 | # in the case of _POSIX_SOURCE, which is predefined and required | |
16433 | # on some systems where configure will not decide to define it. | |
16434 | if (defundef == "undef") { | |
16435 | print "/*", prefix defundef, macro, "*/" | |
16436 | next | |
16437 | } | |
16438 | } | |
b4e70030 | 16439 | } |
81ecdfbb RW |
16440 | { print } |
16441 | _ACAWK | |
b4e70030 | 16442 | _ACEOF |
81ecdfbb RW |
16443 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16444 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
16445 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 16446 | |
4e8d927d | 16447 | |
81ecdfbb RW |
16448 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
16449 | shift | |
16450 | for ac_tag | |
16451 | do | |
16452 | case $ac_tag in | |
16453 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
16454 | esac | |
16455 | case $ac_mode$ac_tag in | |
16456 | :[FHL]*:*);; | |
16457 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
16458 | :[FH]-) ac_tag=-:-;; | |
16459 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
16460 | esac | |
16461 | ac_save_IFS=$IFS | |
16462 | IFS=: | |
16463 | set x $ac_tag | |
16464 | IFS=$ac_save_IFS | |
16465 | shift | |
16466 | ac_file=$1 | |
16467 | shift | |
4e8d927d | 16468 | |
81ecdfbb RW |
16469 | case $ac_mode in |
16470 | :L) ac_source=$1;; | |
16471 | :[FH]) | |
16472 | ac_file_inputs= | |
16473 | for ac_f | |
16474 | do | |
16475 | case $ac_f in | |
16476 | -) ac_f="$tmp/stdin";; | |
16477 | *) # Look for the file first in the build tree, then in the source tree | |
16478 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
16479 | # because $ac_f cannot contain `:'. | |
16480 | test -f "$ac_f" || | |
16481 | case $ac_f in | |
16482 | [\\/$]*) false;; | |
16483 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
16484 | esac || | |
16485 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
16486 | esac | |
16487 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
16488 | as_fn_append ac_file_inputs " '$ac_f'" | |
16489 | done | |
16490 | ||
16491 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
16492 | # use $as_me), people would be surprised to read: | |
16493 | # /* config.h. Generated by config.status. */ | |
16494 | configure_input='Generated from '` | |
16495 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
16496 | `' by configure.' | |
16497 | if test x"$ac_file" != x-; then | |
16498 | configure_input="$ac_file. $configure_input" | |
16499 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
16500 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 16501 | fi |
81ecdfbb RW |
16502 | # Neutralize special characters interpreted by sed in replacement strings. |
16503 | case $configure_input in #( | |
16504 | *\&* | *\|* | *\\* ) | |
16505 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
16506 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
16507 | *) ac_sed_conf_input=$configure_input;; | |
16508 | esac | |
4e8d927d | 16509 | |
81ecdfbb RW |
16510 | case $ac_tag in |
16511 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
16512 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
16513 | esac | |
16514 | ;; | |
c906108c SS |
16515 | esac |
16516 | ||
81ecdfbb | 16517 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
16518 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
16519 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
16520 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16521 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
16522 | $as_echo X"$ac_file" | | |
16523 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16524 | s//\1/ | |
16525 | q | |
16526 | } | |
16527 | /^X\(\/\/\)[^/].*/{ | |
16528 | s//\1/ | |
16529 | q | |
16530 | } | |
16531 | /^X\(\/\/\)$/{ | |
16532 | s//\1/ | |
16533 | q | |
16534 | } | |
16535 | /^X\(\/\).*/{ | |
16536 | s//\1/ | |
16537 | q | |
16538 | } | |
16539 | s/.*/./; q'` | |
16540 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16541 | ac_builddir=. |
16542 | ||
81ecdfbb RW |
16543 | case "$ac_dir" in |
16544 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16545 | *) | |
16546 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16547 | # A ".." for each directory in $ac_dir_suffix. | |
16548 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16549 | case $ac_top_builddir_sub in | |
16550 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16551 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16552 | esac ;; | |
16553 | esac | |
16554 | ac_abs_top_builddir=$ac_pwd | |
16555 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16556 | # for backward compatibility: | |
16557 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16558 | |
16559 | case $srcdir in | |
81ecdfbb | 16560 | .) # We are building in place. |
bec39cab | 16561 | ac_srcdir=. |
81ecdfbb RW |
16562 | ac_top_srcdir=$ac_top_builddir_sub |
16563 | ac_abs_top_srcdir=$ac_pwd ;; | |
16564 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16565 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16566 | ac_top_srcdir=$srcdir |
16567 | ac_abs_top_srcdir=$srcdir ;; | |
16568 | *) # Relative name. | |
16569 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16570 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16571 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16572 | esac |
81ecdfbb | 16573 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 16574 | |
c906108c | 16575 | |
81ecdfbb RW |
16576 | case $ac_mode in |
16577 | :F) | |
16578 | # | |
16579 | # CONFIG_FILE | |
16580 | # | |
c906108c | 16581 | |
bec39cab AC |
16582 | case $INSTALL in |
16583 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 16584 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 16585 | esac |
81ecdfbb | 16586 | _ACEOF |
121ce6e5 | 16587 | |
81ecdfbb RW |
16588 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16589 | # If the template does not know about datarootdir, expand it. | |
16590 | # FIXME: This hack should be removed a few years after 2.60. | |
16591 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
16592 | ac_sed_dataroot=' | |
16593 | /datarootdir/ { | |
16594 | p | |
16595 | q | |
16596 | } | |
16597 | /@datadir@/p | |
16598 | /@docdir@/p | |
16599 | /@infodir@/p | |
16600 | /@localedir@/p | |
16601 | /@mandir@/p' | |
16602 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
16603 | *datarootdir*) ac_datarootdir_seen=yes;; | |
16604 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
16605 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
16606 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
16607 | _ACEOF | |
16608 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16609 | ac_datarootdir_hack=' | |
16610 | s&@datadir@&$datadir&g | |
16611 | s&@docdir@&$docdir&g | |
16612 | s&@infodir@&$infodir&g | |
16613 | s&@localedir@&$localedir&g | |
16614 | s&@mandir@&$mandir&g | |
16615 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
16616 | esac | |
4e8d927d | 16617 | _ACEOF |
81ecdfbb RW |
16618 | |
16619 | # Neutralize VPATH when `$srcdir' = `.'. | |
16620 | # Shell code in configure.ac might set extrasub. | |
16621 | # FIXME: do we really want to maintain this feature? | |
16622 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16623 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
16624 | $extrasub |
16625 | _ACEOF | |
81ecdfbb | 16626 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
16627 | :t |
16628 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
16629 | s|@configure_input@|$ac_sed_conf_input|;t t |
16630 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
16631 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
16632 | s&@srcdir@&$ac_srcdir&;t t | |
16633 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
16634 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
16635 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
16636 | s&@builddir@&$ac_builddir&;t t | |
16637 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
16638 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
16639 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
16640 | $ac_datarootdir_hack |
16641 | " | |
16642 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
16643 | if $ac_cs_awk_getline; then | |
16644 | $AWK -f "$tmp/subs.awk" | |
16645 | else | |
16646 | $AWK -f "$tmp/subs.awk" | $SHELL | |
16647 | fi >$tmp/out \ | |
16648 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16649 | ||
16650 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
16651 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
16652 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
16653 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
16654 | which seems to be undefined. Please make sure it is defined." >&5 | |
16655 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
16656 | which seems to be undefined. Please make sure it is defined." >&2;} | |
16657 | ||
16658 | rm -f "$tmp/stdin" | |
bec39cab | 16659 | case $ac_file in |
81ecdfbb RW |
16660 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
16661 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
16662 | esac \ | |
16663 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16664 | ;; | |
16665 | :H) | |
16666 | # | |
16667 | # CONFIG_HEADER | |
16668 | # | |
bec39cab | 16669 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
16670 | { |
16671 | $as_echo "/* $configure_input */" \ | |
16672 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
16673 | } >"$tmp/config.h" \ | |
16674 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16675 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
16676 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
16677 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 16678 | else |
81ecdfbb RW |
16679 | rm -f "$ac_file" |
16680 | mv "$tmp/config.h" "$ac_file" \ | |
16681 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
16682 | fi |
16683 | else | |
81ecdfbb RW |
16684 | $as_echo "/* $configure_input */" \ |
16685 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
16686 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 16687 | fi |
81ecdfbb RW |
16688 | ;; |
16689 | :L) | |
16690 | # | |
16691 | # CONFIG_LINK | |
16692 | # | |
c906108c | 16693 | |
81ecdfbb RW |
16694 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
16695 | : | |
b4e70030 | 16696 | else |
81ecdfbb RW |
16697 | # Prefer the file from the source tree if names are identical. |
16698 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
16699 | ac_source=$srcdir/$ac_source | |
16700 | fi | |
b4e70030 | 16701 | |
81ecdfbb RW |
16702 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
16703 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 16704 | |
81ecdfbb RW |
16705 | if test ! -r "$ac_source"; then |
16706 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
16707 | fi | |
16708 | rm -f "$ac_file" | |
bec39cab | 16709 | |
81ecdfbb RW |
16710 | # Try a relative symlink, then a hard link, then a copy. |
16711 | case $srcdir in | |
16712 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
16713 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
16714 | esac | |
16715 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
16716 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
16717 | cp -p "$ac_source" "$ac_file" || | |
16718 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
16719 | fi | |
16720 | ;; | |
16721 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
16722 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
16723 | ;; | |
c906108c | 16724 | esac |
b4e70030 | 16725 | |
bec39cab | 16726 | |
81ecdfbb RW |
16727 | case $ac_file$ac_mode in |
16728 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 16729 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 16730 | "default":C) |
c906108c SS |
16731 | case x$CONFIG_HEADERS in |
16732 | xconfig.h:config.in) | |
16733 | echo > stamp-h ;; | |
16734 | esac | |
bec39cab | 16735 | ;; |
81ecdfbb | 16736 | |
bec39cab | 16737 | esac |
81ecdfbb | 16738 | done # for ac_tag |
c906108c | 16739 | |
bec39cab | 16740 | |
81ecdfbb | 16741 | as_fn_exit 0 |
bec39cab | 16742 | _ACEOF |
bec39cab AC |
16743 | ac_clean_files=$ac_clean_files_save |
16744 | ||
81ecdfbb RW |
16745 | test $ac_write_fail = 0 || |
16746 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
16747 | ||
bec39cab AC |
16748 | |
16749 | # configure is writing to config.log, and then calls config.status. | |
16750 | # config.status does its own redirection, appending to config.log. | |
16751 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
16752 | # by configure, so config.status won't be able to write to it; its | |
16753 | # output is simply discarded. So we exec the FD to /dev/null, | |
16754 | # effectively closing config.log, so it can be properly (re)opened and | |
16755 | # appended to by config.status. When coming back to configure, we | |
16756 | # need to make the FD available again. | |
16757 | if test "$no_create" != yes; then | |
16758 | ac_cs_success=: | |
16759 | ac_config_status_args= | |
16760 | test "$silent" = yes && | |
16761 | ac_config_status_args="$ac_config_status_args --quiet" | |
16762 | exec 5>/dev/null | |
16763 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
16764 | exec 5>>config.log | |
16765 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
16766 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 16767 | $ac_cs_success || as_fn_exit $? |
bec39cab | 16768 | fi |
c906108c | 16769 | |
bec39cab | 16770 | # |
81ecdfbb | 16771 | # CONFIG_SUBDIRS section. |
bec39cab | 16772 | # |
c906108c SS |
16773 | if test "$no_recursion" != yes; then |
16774 | ||
81ecdfbb RW |
16775 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
16776 | # so they do not pile up. | |
c906108c SS |
16777 | ac_sub_configure_args= |
16778 | ac_prev= | |
fdc59709 PB |
16779 | eval "set x $ac_configure_args" |
16780 | shift | |
16781 | for ac_arg | |
16782 | do | |
c906108c SS |
16783 | if test -n "$ac_prev"; then |
16784 | ac_prev= | |
16785 | continue | |
16786 | fi | |
bec39cab | 16787 | case $ac_arg in |
c906108c SS |
16788 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
16789 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
16790 | ac_prev=cache_file ;; | |
16791 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
16792 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
16793 | | --c=*) | |
16794 | ;; | |
16795 | --config-cache | -C) | |
c906108c SS |
16796 | ;; |
16797 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
16798 | ac_prev=srcdir ;; | |
16799 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
16800 | ;; | |
bec39cab AC |
16801 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
16802 | ac_prev=prefix ;; | |
16803 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
16804 | ;; | |
81ecdfbb RW |
16805 | --disable-option-checking) |
16806 | ;; | |
fdc59709 PB |
16807 | *) |
16808 | case $ac_arg in | |
81ecdfbb | 16809 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 16810 | esac |
81ecdfbb | 16811 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
16812 | esac |
16813 | done | |
16814 | ||
bec39cab AC |
16815 | # Always prepend --prefix to ensure using the same prefix |
16816 | # in subdir configurations. | |
fdc59709 PB |
16817 | ac_arg="--prefix=$prefix" |
16818 | case $ac_arg in | |
81ecdfbb | 16819 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 16820 | esac |
81ecdfbb RW |
16821 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
16822 | ||
16823 | # Pass --silent | |
16824 | if test "$silent" = yes; then | |
16825 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
16826 | fi | |
16827 | ||
16828 | # Always prepend --disable-option-checking to silence warnings, since | |
16829 | # different subdirs can have different --enable and --with options. | |
16830 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 16831 | |
b4e70030 | 16832 | ac_popdir=`pwd` |
bec39cab | 16833 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
16834 | |
16835 | # Do not complain, so a configure script can configure whichever | |
16836 | # parts of a large source tree are present. | |
fdc59709 | 16837 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 16838 | |
81ecdfbb RW |
16839 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
16840 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
16841 | $as_echo "$ac_msg" >&6 | |
16842 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16843 | ac_builddir=. |
16844 | ||
81ecdfbb RW |
16845 | case "$ac_dir" in |
16846 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16847 | *) | |
16848 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16849 | # A ".." for each directory in $ac_dir_suffix. | |
16850 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16851 | case $ac_top_builddir_sub in | |
16852 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16853 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16854 | esac ;; | |
16855 | esac | |
16856 | ac_abs_top_builddir=$ac_pwd | |
16857 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16858 | # for backward compatibility: | |
16859 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16860 | |
16861 | case $srcdir in | |
81ecdfbb | 16862 | .) # We are building in place. |
bec39cab | 16863 | ac_srcdir=. |
81ecdfbb RW |
16864 | ac_top_srcdir=$ac_top_builddir_sub |
16865 | ac_abs_top_srcdir=$ac_pwd ;; | |
16866 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16867 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16868 | ac_top_srcdir=$srcdir |
16869 | ac_abs_top_srcdir=$srcdir ;; | |
16870 | *) # Relative name. | |
16871 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16872 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16873 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16874 | esac |
81ecdfbb | 16875 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 16876 | |
c906108c | 16877 | |
fdc59709 | 16878 | cd "$ac_dir" |
c906108c SS |
16879 | |
16880 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
16881 | if test -f "$ac_srcdir/configure.gnu"; then |
16882 | ac_sub_configure=$ac_srcdir/configure.gnu | |
16883 | elif test -f "$ac_srcdir/configure"; then | |
16884 | ac_sub_configure=$ac_srcdir/configure | |
16885 | elif test -f "$ac_srcdir/configure.in"; then | |
16886 | # This should be Cygnus configure. | |
16887 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 16888 | else |
81ecdfbb RW |
16889 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
16890 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
16891 | ac_sub_configure= |
16892 | fi | |
16893 | ||
16894 | # The recursion is here. | |
16895 | if test -n "$ac_sub_configure"; then | |
c906108c | 16896 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
16897 | case $cache_file in |
16898 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
16899 | *) # Relative name. |
16900 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 16901 | esac |
c906108c | 16902 | |
81ecdfbb RW |
16903 | { $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 |
16904 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 16905 | # The eval makes quoting arguments work. |
fdc59709 PB |
16906 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
16907 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 16908 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
16909 | fi |
16910 | ||
fdc59709 | 16911 | cd "$ac_popdir" |
c906108c SS |
16912 | done |
16913 | fi | |
81ecdfbb RW |
16914 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
16915 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
16916 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
16917 | fi | |
c906108c SS |
16918 | |
16919 | ||
16920 | exit 0 |