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 | |
e76c5d17 DE |
665 | GUILD_TARGET_FLAG |
666 | GUILD | |
ed3ef339 | 667 | pkg_config_prog_path |
4df42755 DE |
668 | HAVE_PYTHON_FALSE |
669 | HAVE_PYTHON_TRUE | |
ac534cba JB |
670 | PYTHON_LIBS |
671 | PYTHON_CPPFLAGS | |
81ecdfbb | 672 | PYTHON_CFLAGS |
ec685c5e | 673 | python_prog_path |
81ecdfbb RW |
674 | LTLIBEXPAT |
675 | LIBEXPAT | |
676 | HAVE_LIBEXPAT | |
b8e0a31c | 677 | JIT_READER_DIR |
f997c383 | 678 | TARGET_PTR |
39037522 | 679 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
680 | READLINE_CFLAGS |
681 | READLINE_DEPS | |
682 | READLINE | |
683 | MIG | |
684 | WINDRES | |
685 | DLLTOOL | |
c971b7fa | 686 | AR |
81ecdfbb RW |
687 | YFLAGS |
688 | YACC | |
c971b7fa | 689 | RANLIB |
81ecdfbb | 690 | LN_S |
c971b7fa PA |
691 | INSTALL_DATA |
692 | INSTALL_SCRIPT | |
693 | INSTALL_PROGRAM | |
694 | AWK | |
81ecdfbb RW |
695 | REPORT_BUGS_TEXI |
696 | REPORT_BUGS_TO | |
697 | PKGVERSION | |
b292c783 | 698 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
699 | TARGET_OBS |
700 | subdirs | |
701 | GDB_DATADIR | |
702 | DEBUGDIR | |
5048e516 JK |
703 | MAKEINFO_EXTRA_FLAGS |
704 | MAKEINFOFLAGS | |
705 | MAKEINFO | |
81ecdfbb RW |
706 | PACKAGE |
707 | GNULIB_STDINT_H | |
81ecdfbb RW |
708 | CATOBJEXT |
709 | GENCAT | |
710 | INSTOBJEXT | |
711 | DATADIRNAME | |
712 | CATALOGS | |
713 | POSUB | |
714 | GMSGFMT | |
715 | XGETTEXT | |
716 | INCINTL | |
717 | LIBINTL_DEP | |
718 | LIBINTL | |
719 | USE_NLS | |
720 | SET_MAKE | |
721 | GMAKE_FALSE | |
722 | GMAKE_TRUE | |
723 | MAKE | |
724 | CCDEPMODE | |
725 | DEPDIR | |
726 | am__leading_dot | |
4869db5e RM |
727 | INSTALL_STRIP_PROGRAM |
728 | STRIP | |
729 | install_sh | |
81ecdfbb RW |
730 | target_os |
731 | target_vendor | |
732 | target_cpu | |
733 | target | |
734 | host_os | |
735 | host_vendor | |
736 | host_cpu | |
737 | host | |
738 | build_os | |
739 | build_vendor | |
740 | build_cpu | |
741 | build | |
c971b7fa PA |
742 | EGREP |
743 | GREP | |
744 | CPP | |
81ecdfbb RW |
745 | OBJEXT |
746 | EXEEXT | |
747 | ac_ct_CC | |
748 | CPPFLAGS | |
749 | LDFLAGS | |
750 | CFLAGS | |
751 | CC | |
752 | MAINT | |
753 | MAINTAINER_MODE_FALSE | |
754 | MAINTAINER_MODE_TRUE | |
755 | target_alias | |
756 | host_alias | |
757 | build_alias | |
758 | LIBS | |
759 | ECHO_T | |
760 | ECHO_N | |
761 | ECHO_C | |
762 | DEFS | |
763 | mandir | |
764 | localedir | |
765 | libdir | |
766 | psdir | |
767 | pdfdir | |
768 | dvidir | |
769 | htmldir | |
770 | infodir | |
771 | docdir | |
772 | oldincludedir | |
773 | includedir | |
774 | localstatedir | |
775 | sharedstatedir | |
776 | sysconfdir | |
777 | datadir | |
778 | datarootdir | |
779 | libexecdir | |
780 | sbindir | |
781 | bindir | |
782 | program_transform_name | |
783 | prefix | |
784 | exec_prefix | |
785 | PACKAGE_URL | |
786 | PACKAGE_BUGREPORT | |
787 | PACKAGE_STRING | |
788 | PACKAGE_VERSION | |
789 | PACKAGE_TARNAME | |
790 | PACKAGE_NAME | |
791 | PATH_SEPARATOR | |
792 | SHELL' | |
a4ce5b0d | 793 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
794 | ac_user_opts=' |
795 | enable_option_checking | |
796 | enable_maintainer_mode | |
da2f07f1 JK |
797 | enable_plugins |
798 | enable_largefile | |
81ecdfbb RW |
799 | with_separate_debug_dir |
800 | with_gdb_datadir | |
801 | with_relocated_sources | |
7349ff92 | 802 | with_auto_load_dir |
bccbefd2 | 803 | with_auto_load_safe_path |
81ecdfbb RW |
804 | enable_targets |
805 | enable_64_bit_bfd | |
806 | enable_gdbcli | |
807 | enable_gdbmi | |
808 | enable_tui | |
809 | enable_gdbtk | |
05e7c244 | 810 | with_libunwind_ia64 |
81ecdfbb RW |
811 | with_curses |
812 | enable_profiling | |
813 | with_pkgversion | |
814 | with_bugurl | |
b040ad30 | 815 | with_zlib |
81ecdfbb | 816 | with_libiconv_prefix |
478aac75 | 817 | with_iconv_bin |
81ecdfbb | 818 | with_system_readline |
b8e0a31c | 819 | with_jit_reader_dir |
81ecdfbb RW |
820 | with_expat |
821 | with_gnu_ld | |
822 | enable_rpath | |
823 | with_libexpat_prefix | |
824 | with_python | |
ed3ef339 | 825 | with_guile |
a8db4212 | 826 | enable_libmcheck |
81ecdfbb RW |
827 | with_included_regex |
828 | with_sysroot | |
829 | with_system_gdbinit | |
830 | enable_werror | |
831 | enable_build_warnings | |
832 | enable_gdb_build_warnings | |
608e2dbb TT |
833 | with_lzma |
834 | with_liblzma_prefix | |
81ecdfbb RW |
835 | with_tcl |
836 | with_tk | |
837 | with_x | |
838 | enable_sim | |
839 | enable_multi_ice | |
496c0e1b | 840 | enable_gdbserver |
393fd4c3 YQ |
841 | with_babeltrace |
842 | with_libbabeltrace_prefix | |
81ecdfbb RW |
843 | ' |
844 | ac_precious_vars='build_alias | |
845 | host_alias | |
846 | target_alias | |
847 | CC | |
848 | CFLAGS | |
849 | LDFLAGS | |
850 | LIBS | |
851 | CPPFLAGS | |
852 | CPP | |
f06e05e0 JK |
853 | MAKEINFO |
854 | MAKEINFOFLAGS | |
81ecdfbb RW |
855 | YACC |
856 | YFLAGS | |
857 | XMKMF' | |
5ae98d25 | 858 | ac_subdirs_all='testsuite |
81ecdfbb RW |
859 | gdbtk |
860 | multi-ice | |
861 | gdbserver' | |
c906108c SS |
862 | |
863 | # Initialize some variables set by options. | |
bec39cab AC |
864 | ac_init_help= |
865 | ac_init_version=false | |
81ecdfbb RW |
866 | ac_unrecognized_opts= |
867 | ac_unrecognized_sep= | |
c906108c SS |
868 | # The variables have the same names as the options, with |
869 | # dashes changed to underlines. | |
bec39cab | 870 | cache_file=/dev/null |
c906108c | 871 | exec_prefix=NONE |
c906108c | 872 | no_create= |
c906108c SS |
873 | no_recursion= |
874 | prefix=NONE | |
875 | program_prefix=NONE | |
876 | program_suffix=NONE | |
877 | program_transform_name=s,x,x, | |
878 | silent= | |
879 | site= | |
880 | srcdir= | |
c906108c SS |
881 | verbose= |
882 | x_includes=NONE | |
883 | x_libraries=NONE | |
bec39cab AC |
884 | |
885 | # Installation directory options. | |
886 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
887 | # and all the variables that are supposed to be based on exec_prefix | |
888 | # by default will actually change. | |
889 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 890 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
891 | bindir='${exec_prefix}/bin' |
892 | sbindir='${exec_prefix}/sbin' | |
893 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
894 | datarootdir='${prefix}/share' |
895 | datadir='${datarootdir}' | |
c906108c SS |
896 | sysconfdir='${prefix}/etc' |
897 | sharedstatedir='${prefix}/com' | |
898 | localstatedir='${prefix}/var' | |
c906108c SS |
899 | includedir='${prefix}/include' |
900 | oldincludedir='/usr/include' | |
81ecdfbb RW |
901 | docdir='${datarootdir}/doc/${PACKAGE}' |
902 | infodir='${datarootdir}/info' | |
903 | htmldir='${docdir}' | |
904 | dvidir='${docdir}' | |
905 | pdfdir='${docdir}' | |
906 | psdir='${docdir}' | |
907 | libdir='${exec_prefix}/lib' | |
908 | localedir='${datarootdir}/locale' | |
909 | mandir='${datarootdir}/man' | |
c906108c | 910 | |
c906108c | 911 | ac_prev= |
81ecdfbb | 912 | ac_dashdash= |
c906108c SS |
913 | for ac_option |
914 | do | |
c906108c SS |
915 | # If the previous option needs an argument, assign it. |
916 | if test -n "$ac_prev"; then | |
81ecdfbb | 917 | eval $ac_prev=\$ac_option |
c906108c SS |
918 | ac_prev= |
919 | continue | |
920 | fi | |
921 | ||
81ecdfbb RW |
922 | case $ac_option in |
923 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
924 | *) ac_optarg=yes ;; | |
925 | esac | |
c906108c SS |
926 | |
927 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
928 | ||
81ecdfbb RW |
929 | case $ac_dashdash$ac_option in |
930 | --) | |
931 | ac_dashdash=yes ;; | |
c906108c SS |
932 | |
933 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
934 | ac_prev=bindir ;; | |
935 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 936 | bindir=$ac_optarg ;; |
c906108c SS |
937 | |
938 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 939 | ac_prev=build_alias ;; |
c906108c | 940 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 941 | build_alias=$ac_optarg ;; |
c906108c SS |
942 | |
943 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
944 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
945 | ac_prev=cache_file ;; | |
946 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
947 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
948 | cache_file=$ac_optarg ;; |
949 | ||
950 | --config-cache | -C) | |
951 | cache_file=config.cache ;; | |
c906108c | 952 | |
81ecdfbb | 953 | -datadir | --datadir | --datadi | --datad) |
c906108c | 954 | ac_prev=datadir ;; |
81ecdfbb | 955 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 956 | datadir=$ac_optarg ;; |
c906108c | 957 | |
81ecdfbb RW |
958 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
959 | | --dataroo | --dataro | --datar) | |
960 | ac_prev=datarootdir ;; | |
961 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
962 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
963 | datarootdir=$ac_optarg ;; | |
964 | ||
c906108c | 965 | -disable-* | --disable-*) |
81ecdfbb | 966 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 967 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
968 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
969 | as_fn_error "invalid feature name: $ac_useropt" | |
970 | ac_useropt_orig=$ac_useropt | |
971 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
972 | case $ac_user_opts in | |
973 | *" | |
974 | "enable_$ac_useropt" | |
975 | "*) ;; | |
976 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
977 | ac_unrecognized_sep=', ';; | |
978 | esac | |
979 | eval enable_$ac_useropt=no ;; | |
980 | ||
981 | -docdir | --docdir | --docdi | --doc | --do) | |
982 | ac_prev=docdir ;; | |
983 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
984 | docdir=$ac_optarg ;; | |
985 | ||
986 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
987 | ac_prev=dvidir ;; | |
988 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
989 | dvidir=$ac_optarg ;; | |
c906108c SS |
990 | |
991 | -enable-* | --enable-*) | |
81ecdfbb | 992 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 993 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
994 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
995 | as_fn_error "invalid feature name: $ac_useropt" | |
996 | ac_useropt_orig=$ac_useropt | |
997 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
998 | case $ac_user_opts in | |
999 | *" | |
1000 | "enable_$ac_useropt" | |
1001 | "*) ;; | |
1002 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1003 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1004 | esac |
81ecdfbb | 1005 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1006 | |
1007 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1008 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1009 | | --exec | --exe | --ex) | |
1010 | ac_prev=exec_prefix ;; | |
1011 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1012 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1013 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1014 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1015 | |
1016 | -gas | --gas | --ga | --g) | |
1017 | # Obsolete; use --with-gas. | |
1018 | with_gas=yes ;; | |
1019 | ||
bec39cab AC |
1020 | -help | --help | --hel | --he | -h) |
1021 | ac_init_help=long ;; | |
1022 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1023 | ac_init_help=recursive ;; | |
1024 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1025 | ac_init_help=short ;; | |
c906108c SS |
1026 | |
1027 | -host | --host | --hos | --ho) | |
bec39cab | 1028 | ac_prev=host_alias ;; |
c906108c | 1029 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1030 | host_alias=$ac_optarg ;; |
c906108c | 1031 | |
81ecdfbb RW |
1032 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1033 | ac_prev=htmldir ;; | |
1034 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1035 | | --ht=*) | |
1036 | htmldir=$ac_optarg ;; | |
1037 | ||
c906108c SS |
1038 | -includedir | --includedir | --includedi | --included | --include \ |
1039 | | --includ | --inclu | --incl | --inc) | |
1040 | ac_prev=includedir ;; | |
1041 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1042 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1043 | includedir=$ac_optarg ;; |
c906108c SS |
1044 | |
1045 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1046 | ac_prev=infodir ;; | |
1047 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1048 | infodir=$ac_optarg ;; |
c906108c SS |
1049 | |
1050 | -libdir | --libdir | --libdi | --libd) | |
1051 | ac_prev=libdir ;; | |
1052 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1053 | libdir=$ac_optarg ;; |
c906108c SS |
1054 | |
1055 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1056 | | --libexe | --libex | --libe) | |
1057 | ac_prev=libexecdir ;; | |
1058 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1059 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1060 | libexecdir=$ac_optarg ;; |
c906108c | 1061 | |
81ecdfbb RW |
1062 | -localedir | --localedir | --localedi | --localed | --locale) |
1063 | ac_prev=localedir ;; | |
1064 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1065 | localedir=$ac_optarg ;; | |
1066 | ||
c906108c | 1067 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1068 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1069 | ac_prev=localstatedir ;; |
1070 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1071 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1072 | localstatedir=$ac_optarg ;; |
c906108c SS |
1073 | |
1074 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1075 | ac_prev=mandir ;; | |
1076 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1077 | mandir=$ac_optarg ;; |
c906108c SS |
1078 | |
1079 | -nfp | --nfp | --nf) | |
1080 | # Obsolete; use --without-fp. | |
1081 | with_fp=no ;; | |
1082 | ||
1083 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1084 | | --no-cr | --no-c | -n) |
c906108c SS |
1085 | no_create=yes ;; |
1086 | ||
1087 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1088 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1089 | no_recursion=yes ;; | |
1090 | ||
1091 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1092 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1093 | | --oldin | --oldi | --old | --ol | --o) | |
1094 | ac_prev=oldincludedir ;; | |
1095 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1096 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1097 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1098 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1099 | |
1100 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1101 | ac_prev=prefix ;; | |
1102 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1103 | prefix=$ac_optarg ;; |
c906108c SS |
1104 | |
1105 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1106 | | --program-pre | --program-pr | --program-p) | |
1107 | ac_prev=program_prefix ;; | |
1108 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1109 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1110 | program_prefix=$ac_optarg ;; |
c906108c SS |
1111 | |
1112 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1113 | | --program-suf | --program-su | --program-s) | |
1114 | ac_prev=program_suffix ;; | |
1115 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1116 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1117 | program_suffix=$ac_optarg ;; |
c906108c SS |
1118 | |
1119 | -program-transform-name | --program-transform-name \ | |
1120 | | --program-transform-nam | --program-transform-na \ | |
1121 | | --program-transform-n | --program-transform- \ | |
1122 | | --program-transform | --program-transfor \ | |
1123 | | --program-transfo | --program-transf \ | |
1124 | | --program-trans | --program-tran \ | |
1125 | | --progr-tra | --program-tr | --program-t) | |
1126 | ac_prev=program_transform_name ;; | |
1127 | -program-transform-name=* | --program-transform-name=* \ | |
1128 | | --program-transform-nam=* | --program-transform-na=* \ | |
1129 | | --program-transform-n=* | --program-transform-=* \ | |
1130 | | --program-transform=* | --program-transfor=* \ | |
1131 | | --program-transfo=* | --program-transf=* \ | |
1132 | | --program-trans=* | --program-tran=* \ | |
1133 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1134 | program_transform_name=$ac_optarg ;; |
c906108c | 1135 | |
81ecdfbb RW |
1136 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1137 | ac_prev=pdfdir ;; | |
1138 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1139 | pdfdir=$ac_optarg ;; | |
1140 | ||
1141 | -psdir | --psdir | --psdi | --psd | --ps) | |
1142 | ac_prev=psdir ;; | |
1143 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1144 | psdir=$ac_optarg ;; | |
1145 | ||
c906108c SS |
1146 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1147 | | -silent | --silent | --silen | --sile | --sil) | |
1148 | silent=yes ;; | |
1149 | ||
1150 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1151 | ac_prev=sbindir ;; | |
1152 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1153 | | --sbi=* | --sb=*) | |
bec39cab | 1154 | sbindir=$ac_optarg ;; |
c906108c SS |
1155 | |
1156 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1157 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1158 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1159 | | --sha | --sh) | |
1160 | ac_prev=sharedstatedir ;; | |
1161 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1162 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1163 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1164 | | --sha=* | --sh=*) | |
bec39cab | 1165 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1166 | |
1167 | -site | --site | --sit) | |
1168 | ac_prev=site ;; | |
1169 | -site=* | --site=* | --sit=*) | |
bec39cab | 1170 | site=$ac_optarg ;; |
3ace7edb | 1171 | |
c906108c SS |
1172 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1173 | ac_prev=srcdir ;; | |
1174 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1175 | srcdir=$ac_optarg ;; |
c906108c SS |
1176 | |
1177 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1178 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1179 | ac_prev=sysconfdir ;; | |
1180 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1181 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1182 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1183 | |
1184 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1185 | ac_prev=target_alias ;; |
c906108c | 1186 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1187 | target_alias=$ac_optarg ;; |
c906108c SS |
1188 | |
1189 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1190 | verbose=yes ;; | |
1191 | ||
bec39cab AC |
1192 | -version | --version | --versio | --versi | --vers | -V) |
1193 | ac_init_version=: ;; | |
c906108c SS |
1194 | |
1195 | -with-* | --with-*) | |
81ecdfbb | 1196 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1197 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1198 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1199 | as_fn_error "invalid package name: $ac_useropt" | |
1200 | ac_useropt_orig=$ac_useropt | |
1201 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1202 | case $ac_user_opts in | |
1203 | *" | |
1204 | "with_$ac_useropt" | |
1205 | "*) ;; | |
1206 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1207 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1208 | esac |
81ecdfbb | 1209 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1210 | |
1211 | -without-* | --without-*) | |
81ecdfbb | 1212 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1213 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1214 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1215 | as_fn_error "invalid package name: $ac_useropt" | |
1216 | ac_useropt_orig=$ac_useropt | |
1217 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1218 | case $ac_user_opts in | |
1219 | *" | |
1220 | "with_$ac_useropt" | |
1221 | "*) ;; | |
1222 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1223 | ac_unrecognized_sep=', ';; | |
1224 | esac | |
1225 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1226 | |
1227 | --x) | |
1228 | # Obsolete; use --with-x. | |
1229 | with_x=yes ;; | |
1230 | ||
1231 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1232 | | --x-incl | --x-inc | --x-in | --x-i) | |
1233 | ac_prev=x_includes ;; | |
1234 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1235 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1236 | x_includes=$ac_optarg ;; |
c906108c SS |
1237 | |
1238 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1239 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1240 | ac_prev=x_libraries ;; | |
1241 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1242 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1243 | x_libraries=$ac_optarg ;; |
c906108c | 1244 | |
81ecdfbb RW |
1245 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1246 | Try \`$0 --help' for more information." | |
c906108c SS |
1247 | ;; |
1248 | ||
bec39cab AC |
1249 | *=*) |
1250 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1251 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1252 | case $ac_envvar in #( |
1253 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1254 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1255 | esac | |
1256 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1257 | export $ac_envvar ;; |
1258 | ||
c906108c | 1259 | *) |
bec39cab | 1260 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1261 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1262 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1263 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1264 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1265 | ;; |
1266 | ||
1267 | esac | |
1268 | done | |
1269 | ||
1270 | if test -n "$ac_prev"; then | |
bec39cab | 1271 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1272 | as_fn_error "missing argument to $ac_option" |
c906108c | 1273 | fi |
c906108c | 1274 | |
81ecdfbb RW |
1275 | if test -n "$ac_unrecognized_opts"; then |
1276 | case $enable_option_checking in | |
1277 | no) ;; | |
1278 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1279 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1280 | esac |
81ecdfbb | 1281 | fi |
b4e70030 | 1282 | |
81ecdfbb RW |
1283 | # Check all directory arguments for consistency. |
1284 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1285 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1286 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1287 | libdir localedir mandir | |
b4e70030 | 1288 | do |
81ecdfbb RW |
1289 | eval ac_val=\$$ac_var |
1290 | # Remove trailing slashes. | |
1291 | case $ac_val in | |
1292 | */ ) | |
1293 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1294 | eval $ac_var=\$ac_val;; | |
1295 | esac | |
1296 | # Be sure to have absolute directory names. | |
b4e70030 | 1297 | case $ac_val in |
81ecdfbb RW |
1298 | [\\/$]* | ?:[\\/]* ) continue;; |
1299 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1300 | esac |
81ecdfbb | 1301 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1302 | done |
1303 | ||
bec39cab AC |
1304 | # There might be people who depend on the old broken behavior: `$host' |
1305 | # used to hold the argument of --host etc. | |
1306 | # FIXME: To remove some day. | |
1307 | build=$build_alias | |
1308 | host=$host_alias | |
1309 | target=$target_alias | |
1310 | ||
1311 | # FIXME: To remove some day. | |
1312 | if test "x$host_alias" != x; then | |
1313 | if test "x$build_alias" = x; then | |
1314 | cross_compiling=maybe | |
81ecdfbb | 1315 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1316 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1317 | elif test "x$build_alias" != "x$host_alias"; then | |
1318 | cross_compiling=yes | |
1319 | fi | |
1320 | fi | |
c906108c | 1321 | |
bec39cab AC |
1322 | ac_tool_prefix= |
1323 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1324 | ||
1325 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1326 | |
c906108c | 1327 | |
81ecdfbb RW |
1328 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1329 | ac_ls_di=`ls -di .` && | |
1330 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1331 | as_fn_error "working directory cannot be determined" | |
1332 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1333 | as_fn_error "pwd does not report name of working directory" | |
1334 | ||
1335 | ||
c906108c SS |
1336 | # Find the source files, if location was not specified. |
1337 | if test -z "$srcdir"; then | |
1338 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1339 | # Try the directory containing this script, then the parent directory. |
1340 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1341 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1342 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1343 | X"$as_myself" : 'X\(//\)$' \| \ | |
1344 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1345 | $as_echo X"$as_myself" | | |
1346 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1347 | s//\1/ | |
1348 | q | |
1349 | } | |
1350 | /^X\(\/\/\)[^/].*/{ | |
1351 | s//\1/ | |
1352 | q | |
1353 | } | |
1354 | /^X\(\/\/\)$/{ | |
1355 | s//\1/ | |
1356 | q | |
1357 | } | |
1358 | /^X\(\/\).*/{ | |
1359 | s//\1/ | |
1360 | q | |
1361 | } | |
1362 | s/.*/./; q'` | |
c906108c | 1363 | srcdir=$ac_confdir |
81ecdfbb | 1364 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1365 | srcdir=.. |
1366 | fi | |
1367 | else | |
1368 | ac_srcdir_defaulted=no | |
1369 | fi | |
81ecdfbb RW |
1370 | if test ! -r "$srcdir/$ac_unique_file"; then |
1371 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1372 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1373 | fi | |
1374 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1375 | ac_abs_confdir=`( | |
1376 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1377 | pwd)` | |
1378 | # When building in place, set srcdir=. | |
1379 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1380 | srcdir=. | |
1381 | fi | |
1382 | # Remove unnecessary trailing slashes from srcdir. | |
1383 | # Double slashes in file names in object file debugging info | |
1384 | # mess up M-x gdb in Emacs. | |
1385 | case $srcdir in | |
1386 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1387 | esac | |
1388 | for ac_var in $ac_precious_vars; do | |
1389 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1390 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1391 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1392 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1393 | done | |
c906108c | 1394 | |
bec39cab AC |
1395 | # |
1396 | # Report the --help message. | |
1397 | # | |
1398 | if test "$ac_init_help" = "long"; then | |
1399 | # Omit some internal or obsolete options to make the list less imposing. | |
1400 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1401 | cat <<_ACEOF | |
1402 | \`configure' configures this package to adapt to many kinds of systems. | |
1403 | ||
1404 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1405 | ||
1406 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1407 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1408 | ||
1409 | Defaults for the options are specified in brackets. | |
1410 | ||
1411 | Configuration: | |
1412 | -h, --help display this help and exit | |
1413 | --help=short display options specific to this package | |
1414 | --help=recursive display the short help of all the included packages | |
1415 | -V, --version display version information and exit | |
1416 | -q, --quiet, --silent do not print \`checking...' messages | |
1417 | --cache-file=FILE cache test results in FILE [disabled] | |
1418 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1419 | -n, --no-create do not create output files | |
1420 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1421 | ||
bec39cab AC |
1422 | Installation directories: |
1423 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1424 | [$ac_default_prefix] |
bec39cab | 1425 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1426 | [PREFIX] |
bec39cab AC |
1427 | |
1428 | By default, \`make install' will install all the files in | |
1429 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1430 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1431 | for instance \`--prefix=\$HOME'. | |
1432 | ||
1433 | For better control, use the options below. | |
1434 | ||
1435 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1436 | --bindir=DIR user executables [EPREFIX/bin] |
1437 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1438 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1439 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1440 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1441 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1442 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1443 | --includedir=DIR C header files [PREFIX/include] | |
1444 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1445 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1446 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1447 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1448 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1449 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1450 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1451 | --htmldir=DIR html documentation [DOCDIR] | |
1452 | --dvidir=DIR dvi documentation [DOCDIR] | |
1453 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1454 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1455 | _ACEOF |
1456 | ||
1457 | cat <<\_ACEOF | |
1458 | ||
9009e1ae MR |
1459 | Program names: |
1460 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1461 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1462 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1463 | ||
bec39cab AC |
1464 | X features: |
1465 | --x-includes=DIR X include files are in DIR | |
1466 | --x-libraries=DIR X library files are in DIR | |
1467 | ||
1468 | System types: | |
1469 | --build=BUILD configure for building on BUILD [guessed] | |
1470 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1471 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1472 | _ACEOF | |
1473 | fi | |
1474 | ||
1475 | if test -n "$ac_init_help"; then | |
1476 | ||
1477 | cat <<\_ACEOF | |
1478 | ||
1479 | Optional Features: | |
81ecdfbb | 1480 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1481 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1482 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1483 | --enable-maintainer-mode enable make rules and dependencies not useful |
1484 | (and sometimes confusing) to the casual installer | |
2974be62 | 1485 | --enable-plugins Enable support for plugins |
da2f07f1 | 1486 | --disable-largefile omit support for large files |
a1220294 TT |
1487 | --enable-targets=TARGETS |
1488 | alternative target configurations | |
c0993dbe | 1489 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1490 | --disable-gdbcli disable command-line interface (CLI) |
1491 | --disable-gdbmi disable machine-interface (MI) | |
1492 | --enable-tui enable full-screen terminal user interface (TUI) | |
1493 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1494 | --enable-profiling enable profiling of GDB | |
3841debe | 1495 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1496 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1497 | --enable-werror treat compile warnings as errors |
32c1c914 | 1498 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1499 | --enable-gdb-build-warnings |
32c1c914 | 1500 | enable GDB specific build-time compiler warnings if |
a1220294 | 1501 | gcc is used |
32c1c914 | 1502 | --enable-sim link gdb with simulator |
bec39cab | 1503 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1504 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1505 | is auto) | |
bec39cab AC |
1506 | |
1507 | Optional Packages: | |
1508 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1509 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1510 | --with-separate-debug-dir=PATH |
32c1c914 | 1511 | look for global separate debug info in this path |
62e4f60c | 1512 | [LIBDIR/debug] |
b14b1491 TT |
1513 | --with-gdb-datadir=PATH look for global separate data files in this path |
1514 | [DATADIR/gdb] | |
29b0e8a2 | 1515 | --with-relocated-sources=PATH |
32c1c914 | 1516 | automatically relocate this path for source files |
7349ff92 | 1517 | --with-auto-load-dir=PATH |
aff139ff | 1518 | directories from which to load auto-loaded scripts |
1564a261 | 1519 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1520 | --with-auto-load-safe-path=PATH |
aff139ff | 1521 | directories safe to hold auto-loaded files |
7349ff92 | 1522 | [--with-auto-load-dir] |
bccbefd2 JK |
1523 | --without-auto-load-safe-path |
1524 | do not restrict auto-loaded files locations | |
05e7c244 | 1525 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1526 | --with-curses use the curses library instead of the termcap |
1527 | library | |
c16158bc JM |
1528 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1529 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1530 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1531 | --with-libiconv-prefix=DIR |
1532 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1533 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1534 | --with-system-readline use installed readline library |
b8e0a31c SD |
1535 | --with-jit-reader-dir=PATH |
1536 | directory to load the JIT readers from | |
5c39566f | 1537 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1538 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1539 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1540 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1541 | --with-python[=PYTHON] include python support |
1542 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1543 | --with-guile[=GUILE] include guile support |
1544 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
a1220294 TT |
1545 | --without-included-regex |
1546 | don't use included regex; this is the default on | |
1547 | systems with version 2 of the GNU C library (use | |
1548 | with caution on other system) | |
81ecdfbb | 1549 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1550 | --with-system-gdbinit=PATH |
32c1c914 | 1551 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1552 | --with-lzma support lzma compression (auto/yes/no) |
1553 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1554 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1555 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1556 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1557 | --with-x use the X Window System |
393fd4c3 YQ |
1558 | --with-babeltrace include babeltrace support (auto/yes/no) |
1559 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1560 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1561 | |
1562 | Some influential environment variables: | |
1563 | CC C compiler command | |
1564 | CFLAGS C compiler flags | |
1565 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1566 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1567 | LIBS libraries to pass to the linker, e.g. -l<library> |
1568 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1569 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1570 | CPP C preprocessor |
f06e05e0 JK |
1571 | MAKEINFO Parent configure detects if it is of sufficient version. |
1572 | MAKEINFOFLAGS | |
1573 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1574 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1575 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1576 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1577 | This script will default YFLAGS to the empty string to avoid a | |
1578 | default value of `-d' given by some make applications. | |
1579 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1580 | |
1581 | Use these variables to override the choices made by `configure' or to help | |
1582 | it to find libraries and programs with nonstandard names/locations. | |
1583 | ||
81ecdfbb | 1584 | Report bugs to the package provider. |
bec39cab | 1585 | _ACEOF |
81ecdfbb | 1586 | ac_status=$? |
bec39cab AC |
1587 | fi |
1588 | ||
1589 | if test "$ac_init_help" = "recursive"; then | |
1590 | # If there are subdirs, report their specific --help. | |
bec39cab | 1591 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1592 | test -d "$ac_dir" || |
1593 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1594 | continue | |
bec39cab AC |
1595 | ac_builddir=. |
1596 | ||
81ecdfbb RW |
1597 | case "$ac_dir" in |
1598 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1599 | *) | |
1600 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1601 | # A ".." for each directory in $ac_dir_suffix. | |
1602 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1603 | case $ac_top_builddir_sub in | |
1604 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1605 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1606 | esac ;; | |
1607 | esac | |
1608 | ac_abs_top_builddir=$ac_pwd | |
1609 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1610 | # for backward compatibility: | |
1611 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1612 | |
1613 | case $srcdir in | |
81ecdfbb | 1614 | .) # We are building in place. |
bec39cab | 1615 | ac_srcdir=. |
81ecdfbb RW |
1616 | ac_top_srcdir=$ac_top_builddir_sub |
1617 | ac_abs_top_srcdir=$ac_pwd ;; | |
1618 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1619 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1620 | ac_top_srcdir=$srcdir |
1621 | ac_abs_top_srcdir=$srcdir ;; | |
1622 | *) # Relative name. | |
1623 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1624 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1625 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1626 | esac |
81ecdfbb | 1627 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1628 | |
81ecdfbb RW |
1629 | cd "$ac_dir" || { ac_status=$?; continue; } |
1630 | # Check for guested configure. | |
1631 | if test -f "$ac_srcdir/configure.gnu"; then | |
1632 | echo && | |
1633 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1634 | elif test -f "$ac_srcdir/configure"; then | |
1635 | echo && | |
1636 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1637 | else |
81ecdfbb RW |
1638 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1639 | fi || ac_status=$? | |
1640 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1641 | done |
1642 | fi | |
1643 | ||
81ecdfbb | 1644 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1645 | if $ac_init_version; then |
1646 | cat <<\_ACEOF | |
81ecdfbb RW |
1647 | configure |
1648 | generated by GNU Autoconf 2.64 | |
bec39cab | 1649 | |
81ecdfbb | 1650 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1651 | This configure script is free software; the Free Software Foundation |
1652 | gives unlimited permission to copy, distribute and modify it. | |
1653 | _ACEOF | |
81ecdfbb | 1654 | exit |
bec39cab | 1655 | fi |
bec39cab | 1656 | |
81ecdfbb RW |
1657 | ## ------------------------ ## |
1658 | ## Autoconf initialization. ## | |
1659 | ## ------------------------ ## | |
bec39cab | 1660 | |
81ecdfbb RW |
1661 | # ac_fn_c_try_compile LINENO |
1662 | # -------------------------- | |
1663 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1664 | ac_fn_c_try_compile () | |
1665 | { | |
1666 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1667 | rm -f conftest.$ac_objext | |
1668 | if { { ac_try="$ac_compile" | |
1669 | case "(($ac_try" in | |
1670 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1671 | *) ac_try_echo=$ac_try;; | |
1672 | esac | |
1673 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1674 | $as_echo "$ac_try_echo"; } >&5 | |
1675 | (eval "$ac_compile") 2>conftest.err | |
1676 | ac_status=$? | |
1677 | if test -s conftest.err; then | |
1678 | grep -v '^ *+' conftest.err >conftest.er1 | |
1679 | cat conftest.er1 >&5 | |
1680 | mv -f conftest.er1 conftest.err | |
1681 | fi | |
1682 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1683 | test $ac_status = 0; } && { | |
1684 | test -z "$ac_c_werror_flag" || | |
1685 | test ! -s conftest.err | |
1686 | } && test -s conftest.$ac_objext; then : | |
1687 | ac_retval=0 | |
1688 | else | |
1689 | $as_echo "$as_me: failed program was:" >&5 | |
1690 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1691 | |
81ecdfbb RW |
1692 | ac_retval=1 |
1693 | fi | |
1694 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1695 | return $ac_retval | |
1696 | ||
1697 | } # ac_fn_c_try_compile | |
1698 | ||
1699 | # ac_fn_c_try_cpp LINENO | |
1700 | # ---------------------- | |
1701 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1702 | ac_fn_c_try_cpp () | |
bec39cab | 1703 | { |
81ecdfbb RW |
1704 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1705 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1706 | case "(($ac_try" in | |
1707 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1708 | *) ac_try_echo=$ac_try;; | |
1709 | esac | |
1710 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1711 | $as_echo "$ac_try_echo"; } >&5 | |
1712 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1713 | ac_status=$? | |
1714 | if test -s conftest.err; then | |
1715 | grep -v '^ *+' conftest.err >conftest.er1 | |
1716 | cat conftest.er1 >&5 | |
1717 | mv -f conftest.er1 conftest.err | |
1718 | fi | |
1719 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1720 | test $ac_status = 0; } >/dev/null && { | |
1721 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1722 | test ! -s conftest.err | |
1723 | }; then : | |
1724 | ac_retval=0 | |
1725 | else | |
1726 | $as_echo "$as_me: failed program was:" >&5 | |
1727 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1728 | |
81ecdfbb RW |
1729 | ac_retval=1 |
1730 | fi | |
1731 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1732 | return $ac_retval | |
bec39cab | 1733 | |
81ecdfbb | 1734 | } # ac_fn_c_try_cpp |
bec39cab | 1735 | |
81ecdfbb RW |
1736 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1737 | # ------------------------------------------------------- | |
1738 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1739 | # the include files in INCLUDES and setting the cache variable VAR | |
1740 | # accordingly. | |
1741 | ac_fn_c_check_header_mongrel () | |
1742 | { | |
1743 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1744 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1746 | $as_echo_n "checking for $2... " >&6; } | |
1747 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1748 | $as_echo_n "(cached) " >&6 | |
1749 | fi | |
1750 | eval ac_res=\$$3 | |
1751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1752 | $as_echo "$ac_res" >&6; } | |
1753 | else | |
1754 | # Is the header compilable? | |
1755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1756 | $as_echo_n "checking $2 usability... " >&6; } | |
1757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1758 | /* end confdefs.h. */ | |
1759 | $4 | |
1760 | #include <$2> | |
1761 | _ACEOF | |
1762 | if ac_fn_c_try_compile "$LINENO"; then : | |
1763 | ac_header_compiler=yes | |
1764 | else | |
1765 | ac_header_compiler=no | |
1766 | fi | |
1767 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1769 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1770 | |
81ecdfbb RW |
1771 | # Is the header present? |
1772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1773 | $as_echo_n "checking $2 presence... " >&6; } | |
1774 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1775 | /* end confdefs.h. */ | |
1776 | #include <$2> | |
1777 | _ACEOF | |
1778 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1779 | ac_header_preproc=yes | |
1780 | else | |
1781 | ac_header_preproc=no | |
1782 | fi | |
1783 | rm -f conftest.err conftest.$ac_ext | |
1784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1785 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1786 | |
81ecdfbb RW |
1787 | # So? What about this header? |
1788 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1789 | yes:no: ) | |
1790 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1791 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1792 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1793 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1794 | ;; | |
1795 | no:yes:* ) | |
1796 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1797 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1798 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1799 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1800 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1801 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1802 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1803 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1804 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1805 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1806 | ;; | |
1807 | esac | |
1808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1809 | $as_echo_n "checking for $2... " >&6; } | |
1810 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1811 | $as_echo_n "(cached) " >&6 | |
1812 | else | |
1813 | eval "$3=\$ac_header_compiler" | |
1814 | fi | |
1815 | eval ac_res=\$$3 | |
1816 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1817 | $as_echo "$ac_res" >&6; } | |
1818 | fi | |
1819 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1820 | |
81ecdfbb | 1821 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1822 | |
81ecdfbb RW |
1823 | # ac_fn_c_try_run LINENO |
1824 | # ---------------------- | |
1825 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1826 | # that executables *can* be run. | |
1827 | ac_fn_c_try_run () | |
1828 | { | |
1829 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1830 | if { { ac_try="$ac_link" | |
1831 | case "(($ac_try" in | |
1832 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1833 | *) ac_try_echo=$ac_try;; | |
1834 | esac | |
1835 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1836 | $as_echo "$ac_try_echo"; } >&5 | |
1837 | (eval "$ac_link") 2>&5 | |
1838 | ac_status=$? | |
1839 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1840 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1841 | { { case "(($ac_try" in | |
1842 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1843 | *) ac_try_echo=$ac_try;; | |
1844 | esac | |
1845 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1846 | $as_echo "$ac_try_echo"; } >&5 | |
1847 | (eval "$ac_try") 2>&5 | |
1848 | ac_status=$? | |
1849 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1850 | test $ac_status = 0; }; }; then : | |
1851 | ac_retval=0 | |
1852 | else | |
1853 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1854 | $as_echo "$as_me: failed program was:" >&5 | |
1855 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1856 | |
81ecdfbb RW |
1857 | ac_retval=$ac_status |
1858 | fi | |
1859 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1860 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1861 | return $ac_retval | |
bec39cab | 1862 | |
81ecdfbb | 1863 | } # ac_fn_c_try_run |
bec39cab | 1864 | |
81ecdfbb RW |
1865 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1866 | # ------------------------------------------------------- | |
1867 | # Tests whether HEADER exists and can be compiled using the include files in | |
1868 | # INCLUDES, setting the cache variable VAR accordingly. | |
1869 | ac_fn_c_check_header_compile () | |
1870 | { | |
1871 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1873 | $as_echo_n "checking for $2... " >&6; } | |
1874 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1875 | $as_echo_n "(cached) " >&6 | |
1876 | else | |
1877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1878 | /* end confdefs.h. */ | |
1879 | $4 | |
1880 | #include <$2> | |
bec39cab | 1881 | _ACEOF |
81ecdfbb RW |
1882 | if ac_fn_c_try_compile "$LINENO"; then : |
1883 | eval "$3=yes" | |
1884 | else | |
1885 | eval "$3=no" | |
1886 | fi | |
1887 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1888 | fi | |
1889 | eval ac_res=\$$3 | |
1890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1891 | $as_echo "$ac_res" >&6; } | |
1892 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1893 | |
81ecdfbb | 1894 | } # ac_fn_c_check_header_compile |
bec39cab | 1895 | |
2974be62 AM |
1896 | # ac_fn_c_try_link LINENO |
1897 | # ----------------------- | |
1898 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1899 | ac_fn_c_try_link () | |
1900 | { | |
1901 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1902 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1903 | if { { ac_try="$ac_link" | |
1904 | case "(($ac_try" in | |
1905 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1906 | *) ac_try_echo=$ac_try;; | |
1907 | esac | |
1908 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1909 | $as_echo "$ac_try_echo"; } >&5 | |
1910 | (eval "$ac_link") 2>conftest.err | |
1911 | ac_status=$? | |
1912 | if test -s conftest.err; then | |
1913 | grep -v '^ *+' conftest.err >conftest.er1 | |
1914 | cat conftest.er1 >&5 | |
1915 | mv -f conftest.er1 conftest.err | |
1916 | fi | |
1917 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1918 | test $ac_status = 0; } && { | |
1919 | test -z "$ac_c_werror_flag" || | |
1920 | test ! -s conftest.err | |
1921 | } && test -s conftest$ac_exeext && { | |
1922 | test "$cross_compiling" = yes || | |
1923 | $as_test_x conftest$ac_exeext | |
1924 | }; then : | |
1925 | ac_retval=0 | |
1926 | else | |
1927 | $as_echo "$as_me: failed program was:" >&5 | |
1928 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1929 | ||
1930 | ac_retval=1 | |
1931 | fi | |
1932 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1933 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1934 | # interfere with the next link command; also delete a directory that is | |
1935 | # left behind by Apple's compiler. We do this before executing the actions. | |
1936 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1937 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1938 | return $ac_retval | |
1939 | ||
1940 | } # ac_fn_c_try_link | |
1941 | ||
81ecdfbb RW |
1942 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1943 | # -------------------------------------------- | |
1944 | # Tries to find the compile-time value of EXPR in a program that includes | |
1945 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1946 | # computed | |
1947 | ac_fn_c_compute_int () | |
1948 | { | |
1949 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1950 | if test "$cross_compiling" = yes; then | |
1951 | # Depending upon the size, compute the lo and hi bounds. | |
1952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1953 | /* end confdefs.h. */ | |
1954 | $4 | |
1955 | int | |
1956 | main () | |
1957 | { | |
1958 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1959 | test_array [0] = 0 | |
bec39cab | 1960 | |
81ecdfbb RW |
1961 | ; |
1962 | return 0; | |
1963 | } | |
1964 | _ACEOF | |
1965 | if ac_fn_c_try_compile "$LINENO"; then : | |
1966 | ac_lo=0 ac_mid=0 | |
1967 | while :; do | |
1968 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1969 | /* end confdefs.h. */ | |
1970 | $4 | |
1971 | int | |
1972 | main () | |
1973 | { | |
1974 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1975 | test_array [0] = 0 | |
bec39cab | 1976 | |
81ecdfbb RW |
1977 | ; |
1978 | return 0; | |
1979 | } | |
1980 | _ACEOF | |
1981 | if ac_fn_c_try_compile "$LINENO"; then : | |
1982 | ac_hi=$ac_mid; break | |
1983 | else | |
1984 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1985 | if test $ac_lo -le $ac_mid; then | |
1986 | ac_lo= ac_hi= | |
1987 | break | |
1988 | fi | |
1989 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 1990 | fi |
81ecdfbb RW |
1991 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1992 | done | |
c906108c | 1993 | else |
81ecdfbb RW |
1994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1995 | /* end confdefs.h. */ | |
1996 | $4 | |
1997 | int | |
1998 | main () | |
1999 | { | |
2000 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2001 | test_array [0] = 0 | |
bec39cab | 2002 | |
81ecdfbb RW |
2003 | ; |
2004 | return 0; | |
2005 | } | |
2006 | _ACEOF | |
2007 | if ac_fn_c_try_compile "$LINENO"; then : | |
2008 | ac_hi=-1 ac_mid=-1 | |
2009 | while :; do | |
2010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2011 | /* end confdefs.h. */ | |
2012 | $4 | |
2013 | int | |
2014 | main () | |
2015 | { | |
2016 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2017 | test_array [0] = 0 | |
bec39cab | 2018 | |
81ecdfbb RW |
2019 | ; |
2020 | return 0; | |
2021 | } | |
2022 | _ACEOF | |
2023 | if ac_fn_c_try_compile "$LINENO"; then : | |
2024 | ac_lo=$ac_mid; break | |
2025 | else | |
2026 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2027 | if test $ac_mid -le $ac_hi; then | |
2028 | ac_lo= ac_hi= | |
2029 | break | |
2030 | fi | |
2031 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2032 | fi | |
2033 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2034 | done | |
2035 | else | |
2036 | ac_lo= ac_hi= | |
2037 | fi | |
2038 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2039 | fi | |
2040 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2041 | # Binary search between lo and hi bounds. | |
2042 | while test "x$ac_lo" != "x$ac_hi"; do | |
2043 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2045 | /* end confdefs.h. */ | |
2046 | $4 | |
2047 | int | |
2048 | main () | |
2049 | { | |
2050 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2051 | test_array [0] = 0 | |
bec39cab | 2052 | |
81ecdfbb RW |
2053 | ; |
2054 | return 0; | |
2055 | } | |
2056 | _ACEOF | |
2057 | if ac_fn_c_try_compile "$LINENO"; then : | |
2058 | ac_hi=$ac_mid | |
2059 | else | |
2060 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2061 | fi | |
2062 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2063 | done | |
2064 | case $ac_lo in #(( | |
2065 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2066 | '') ac_retval=1 ;; | |
2067 | esac | |
2068 | else | |
2069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2070 | /* end confdefs.h. */ | |
2071 | $4 | |
2072 | static long int longval () { return $2; } | |
2073 | static unsigned long int ulongval () { return $2; } | |
2074 | #include <stdio.h> | |
2075 | #include <stdlib.h> | |
2076 | int | |
2077 | main () | |
2078 | { | |
bec39cab | 2079 | |
81ecdfbb RW |
2080 | FILE *f = fopen ("conftest.val", "w"); |
2081 | if (! f) | |
2082 | return 1; | |
2083 | if (($2) < 0) | |
2084 | { | |
2085 | long int i = longval (); | |
2086 | if (i != ($2)) | |
2087 | return 1; | |
2088 | fprintf (f, "%ld", i); | |
2089 | } | |
2090 | else | |
2091 | { | |
2092 | unsigned long int i = ulongval (); | |
2093 | if (i != ($2)) | |
2094 | return 1; | |
2095 | fprintf (f, "%lu", i); | |
2096 | } | |
2097 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2098 | on some platforms. */ | |
2099 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2100 | |
81ecdfbb RW |
2101 | ; |
2102 | return 0; | |
2103 | } | |
2104 | _ACEOF | |
2105 | if ac_fn_c_try_run "$LINENO"; then : | |
2106 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2107 | else | |
2108 | ac_retval=1 | |
2109 | fi | |
2110 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2111 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2112 | rm -f conftest.val | |
bec39cab | 2113 | |
81ecdfbb RW |
2114 | fi |
2115 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2116 | return $ac_retval | |
bec39cab | 2117 | |
81ecdfbb | 2118 | } # ac_fn_c_compute_int |
bec39cab | 2119 | |
55a8c076 YQ |
2120 | # ac_fn_c_check_func LINENO FUNC VAR |
2121 | # ---------------------------------- | |
2122 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2123 | ac_fn_c_check_func () | |
81ecdfbb RW |
2124 | { |
2125 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2127 | $as_echo_n "checking for $2... " >&6; } | |
2128 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2129 | $as_echo_n "(cached) " >&6 | |
2130 | else | |
81ecdfbb RW |
2131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2132 | /* end confdefs.h. */ | |
55a8c076 YQ |
2133 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2134 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2135 | #define $2 innocuous_$2 | |
2136 | ||
2137 | /* System header to define __stub macros and hopefully few prototypes, | |
2138 | which can conflict with char $2 (); below. | |
2139 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2140 | <limits.h> exists even on freestanding compilers. */ | |
2141 | ||
2142 | #ifdef __STDC__ | |
2143 | # include <limits.h> | |
2144 | #else | |
2145 | # include <assert.h> | |
2146 | #endif | |
2147 | ||
2148 | #undef $2 | |
2149 | ||
2150 | /* Override any GCC internal prototype to avoid an error. | |
2151 | Use char because int might match the return type of a GCC | |
2152 | builtin and then its argument prototype would still apply. */ | |
2153 | #ifdef __cplusplus | |
2154 | extern "C" | |
2155 | #endif | |
2156 | char $2 (); | |
2157 | /* The GNU C library defines this for functions which it implements | |
2158 | to always fail with ENOSYS. Some functions are actually named | |
2159 | something starting with __ and the normal name is an alias. */ | |
2160 | #if defined __stub_$2 || defined __stub___$2 | |
2161 | choke me | |
2162 | #endif | |
2163 | ||
2164 | int | |
2165 | main () | |
2166 | { | |
2167 | return $2 (); | |
2168 | ; | |
2169 | return 0; | |
2170 | } | |
2171 | _ACEOF | |
2172 | if ac_fn_c_try_link "$LINENO"; then : | |
2173 | eval "$3=yes" | |
2174 | else | |
2175 | eval "$3=no" | |
2176 | fi | |
2177 | rm -f core conftest.err conftest.$ac_objext \ | |
2178 | conftest$ac_exeext conftest.$ac_ext | |
2179 | fi | |
2180 | eval ac_res=\$$3 | |
2181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2182 | $as_echo "$ac_res" >&6; } | |
2183 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2184 | ||
2185 | } # ac_fn_c_check_func | |
2186 | ||
770d76d7 PA |
2187 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2188 | # ------------------------------------ | |
2189 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2190 | ac_fn_c_check_decl () | |
2191 | { | |
2192 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2193 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2194 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2196 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2197 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2198 | $as_echo_n "(cached) " >&6 | |
2199 | else | |
2200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2201 | /* end confdefs.h. */ | |
2202 | $4 | |
2203 | int | |
2204 | main () | |
2205 | { | |
2206 | #ifndef $as_decl_name | |
2207 | #ifdef __cplusplus | |
2208 | (void) $as_decl_use; | |
2209 | #else | |
2210 | (void) $as_decl_name; | |
2211 | #endif | |
2212 | #endif | |
2213 | ||
2214 | ; | |
2215 | return 0; | |
2216 | } | |
2217 | _ACEOF | |
2218 | if ac_fn_c_try_compile "$LINENO"; then : | |
2219 | eval "$3=yes" | |
2220 | else | |
2221 | eval "$3=no" | |
2222 | fi | |
2223 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2224 | fi | |
2225 | eval ac_res=\$$3 | |
2226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2227 | $as_echo "$ac_res" >&6; } | |
2228 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2229 | ||
2230 | } # ac_fn_c_check_decl | |
2231 | ||
55a8c076 YQ |
2232 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2233 | # ---------------------------------------------------- | |
2234 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2235 | # INCLUDES, setting cache variable VAR accordingly. | |
2236 | ac_fn_c_check_member () | |
2237 | { | |
2238 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2240 | $as_echo_n "checking for $2.$3... " >&6; } | |
2241 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2242 | $as_echo_n "(cached) " >&6 | |
2243 | else | |
2244 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2245 | /* end confdefs.h. */ | |
2246 | $5 | |
2247 | int | |
2248 | main () | |
2249 | { | |
2250 | static $2 ac_aggr; | |
2251 | if (ac_aggr.$3) | |
2252 | return 0; | |
2253 | ; | |
2254 | return 0; | |
2255 | } | |
2256 | _ACEOF | |
2257 | if ac_fn_c_try_compile "$LINENO"; then : | |
2258 | eval "$4=yes" | |
2259 | else | |
2260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2261 | /* end confdefs.h. */ | |
2262 | $5 | |
2263 | int | |
2264 | main () | |
2265 | { | |
2266 | static $2 ac_aggr; | |
2267 | if (sizeof ac_aggr.$3) | |
2268 | return 0; | |
2269 | ; | |
2270 | return 0; | |
2271 | } | |
2272 | _ACEOF | |
2273 | if ac_fn_c_try_compile "$LINENO"; then : | |
2274 | eval "$4=yes" | |
2275 | else | |
2276 | eval "$4=no" | |
2277 | fi | |
2278 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2279 | fi | |
2280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2281 | fi | |
2282 | eval ac_res=\$$4 | |
2283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2284 | $as_echo "$ac_res" >&6; } | |
2285 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2286 | ||
2287 | } # ac_fn_c_check_member | |
2288 | ||
2289 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2290 | # ------------------------------------------- | |
2291 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2292 | # variable VAR accordingly. | |
2293 | ac_fn_c_check_type () | |
2294 | { | |
2295 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2297 | $as_echo_n "checking for $2... " >&6; } | |
2298 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2299 | $as_echo_n "(cached) " >&6 | |
2300 | else | |
2301 | eval "$3=no" | |
2302 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2303 | /* end confdefs.h. */ | |
2304 | $4 | |
2305 | int | |
2306 | main () | |
2307 | { | |
2308 | if (sizeof ($2)) | |
2309 | return 0; | |
2310 | ; | |
2311 | return 0; | |
2312 | } | |
2313 | _ACEOF | |
2314 | if ac_fn_c_try_compile "$LINENO"; then : | |
2315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2316 | /* end confdefs.h. */ | |
2317 | $4 | |
2318 | int | |
2319 | main () | |
2320 | { | |
2321 | if (sizeof (($2))) | |
2322 | return 0; | |
2323 | ; | |
2324 | return 0; | |
2325 | } | |
2326 | _ACEOF | |
2327 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2328 | |
81ecdfbb RW |
2329 | else |
2330 | eval "$3=yes" | |
2331 | fi | |
2332 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2333 | fi | |
2334 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2335 | fi | |
2336 | eval ac_res=\$$3 | |
2337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2338 | $as_echo "$ac_res" >&6; } | |
2339 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2340 | |
81ecdfbb RW |
2341 | } # ac_fn_c_check_type |
2342 | cat >config.log <<_ACEOF | |
2343 | This file contains any messages produced by compilers while | |
2344 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2345 | |
81ecdfbb RW |
2346 | It was created by $as_me, which was |
2347 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2348 | |
81ecdfbb | 2349 | $ $0 $@ |
413ccac7 | 2350 | |
81ecdfbb RW |
2351 | _ACEOF |
2352 | exec 5>>config.log | |
2353 | { | |
2354 | cat <<_ASUNAME | |
2355 | ## --------- ## | |
2356 | ## Platform. ## | |
2357 | ## --------- ## | |
413ccac7 | 2358 | |
81ecdfbb RW |
2359 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2360 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2361 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2362 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2363 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2364 | |
81ecdfbb RW |
2365 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2366 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2367 | |
81ecdfbb RW |
2368 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2369 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2370 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2371 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2372 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2373 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2374 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2375 | |
81ecdfbb | 2376 | _ASUNAME |
bec39cab | 2377 | |
bec39cab AC |
2378 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2379 | for as_dir in $PATH | |
2380 | do | |
2381 | IFS=$as_save_IFS | |
2382 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2383 | $as_echo "PATH: $as_dir" |
2384 | done | |
2385 | IFS=$as_save_IFS | |
bec39cab | 2386 | |
81ecdfbb | 2387 | } >&5 |
bec39cab | 2388 | |
81ecdfbb | 2389 | cat >&5 <<_ACEOF |
bec39cab | 2390 | |
bec39cab | 2391 | |
81ecdfbb RW |
2392 | ## ----------- ## |
2393 | ## Core tests. ## | |
2394 | ## ----------- ## | |
2395 | ||
2396 | _ACEOF | |
2397 | ||
2398 | ||
2399 | # Keep a trace of the command line. | |
2400 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2401 | # Strip out --silent because we don't want to record it for future runs. | |
2402 | # Also quote any args containing shell meta-characters. | |
2403 | # Make two passes to allow for proper duplicate-argument suppression. | |
2404 | ac_configure_args= | |
2405 | ac_configure_args0= | |
2406 | ac_configure_args1= | |
2407 | ac_must_keep_next=false | |
2408 | for ac_pass in 1 2 | |
2409 | do | |
2410 | for ac_arg | |
2411 | do | |
2412 | case $ac_arg in | |
2413 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2414 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2415 | | -silent | --silent | --silen | --sile | --sil) | |
2416 | continue ;; | |
2417 | *\'*) | |
2418 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2419 | esac | |
2420 | case $ac_pass in | |
2421 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2422 | 2) | |
2423 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2424 | if test $ac_must_keep_next = true; then | |
2425 | ac_must_keep_next=false # Got value, back to normal. | |
2426 | else | |
2427 | case $ac_arg in | |
2428 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2429 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2430 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2431 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2432 | case "$ac_configure_args0 " in | |
2433 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2434 | esac | |
2435 | ;; | |
2436 | -* ) ac_must_keep_next=true ;; | |
2437 | esac | |
2438 | fi | |
2439 | as_fn_append ac_configure_args " '$ac_arg'" | |
2440 | ;; | |
2441 | esac | |
2442 | done | |
2443 | done | |
2444 | { ac_configure_args0=; unset ac_configure_args0;} | |
2445 | { ac_configure_args1=; unset ac_configure_args1;} | |
2446 | ||
2447 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2448 | # config.log. We remove comments because anyway the quotes in there | |
2449 | # would cause problems or look ugly. | |
2450 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2451 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2452 | trap 'exit_status=$? | |
2453 | # Save into config.log some information that might help in debugging. | |
2454 | { | |
2455 | echo | |
2456 | ||
2457 | cat <<\_ASBOX | |
2458 | ## ---------------- ## | |
2459 | ## Cache variables. ## | |
2460 | ## ---------------- ## | |
2461 | _ASBOX | |
2462 | echo | |
2463 | # The following way of writing the cache mishandles newlines in values, | |
2464 | ( | |
2465 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2466 | eval ac_val=\$$ac_var | |
2467 | case $ac_val in #( | |
2468 | *${as_nl}*) | |
2469 | case $ac_var in #( | |
2470 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2471 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2472 | esac | |
2473 | case $ac_var in #( | |
2474 | _ | IFS | as_nl) ;; #( | |
2475 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2476 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2477 | esac ;; | |
2478 | esac | |
2479 | done | |
2480 | (set) 2>&1 | | |
2481 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2482 | *${as_nl}ac_space=\ *) | |
2483 | sed -n \ | |
2484 | "s/'\''/'\''\\\\'\'''\''/g; | |
2485 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2486 | ;; #( | |
2487 | *) | |
2488 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2489 | ;; | |
2490 | esac | | |
2491 | sort | |
2492 | ) | |
2493 | echo | |
2494 | ||
2495 | cat <<\_ASBOX | |
2496 | ## ----------------- ## | |
2497 | ## Output variables. ## | |
2498 | ## ----------------- ## | |
2499 | _ASBOX | |
2500 | echo | |
2501 | for ac_var in $ac_subst_vars | |
2502 | do | |
2503 | eval ac_val=\$$ac_var | |
2504 | case $ac_val in | |
2505 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2506 | esac | |
2507 | $as_echo "$ac_var='\''$ac_val'\''" | |
2508 | done | sort | |
2509 | echo | |
2510 | ||
2511 | if test -n "$ac_subst_files"; then | |
2512 | cat <<\_ASBOX | |
2513 | ## ------------------- ## | |
2514 | ## File substitutions. ## | |
2515 | ## ------------------- ## | |
2516 | _ASBOX | |
2517 | echo | |
2518 | for ac_var in $ac_subst_files | |
2519 | do | |
2520 | eval ac_val=\$$ac_var | |
2521 | case $ac_val in | |
2522 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2523 | esac | |
2524 | $as_echo "$ac_var='\''$ac_val'\''" | |
2525 | done | sort | |
2526 | echo | |
2527 | fi | |
2528 | ||
2529 | if test -s confdefs.h; then | |
2530 | cat <<\_ASBOX | |
2531 | ## ----------- ## | |
2532 | ## confdefs.h. ## | |
2533 | ## ----------- ## | |
2534 | _ASBOX | |
2535 | echo | |
2536 | cat confdefs.h | |
2537 | echo | |
2538 | fi | |
2539 | test "$ac_signal" != 0 && | |
2540 | $as_echo "$as_me: caught signal $ac_signal" | |
2541 | $as_echo "$as_me: exit $exit_status" | |
2542 | } >&5 | |
2543 | rm -f core *.core core.conftest.* && | |
2544 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2545 | exit $exit_status | |
2546 | ' 0 | |
2547 | for ac_signal in 1 2 13 15; do | |
2548 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2549 | done | |
2550 | ac_signal=0 | |
2551 | ||
2552 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2553 | rm -f -r conftest* confdefs.h | |
2554 | ||
2555 | $as_echo "/* confdefs.h */" > confdefs.h | |
2556 | ||
2557 | # Predefined preprocessor variables. | |
2558 | ||
2559 | cat >>confdefs.h <<_ACEOF | |
2560 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2561 | _ACEOF | |
2562 | ||
2563 | cat >>confdefs.h <<_ACEOF | |
2564 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2565 | _ACEOF | |
2566 | ||
2567 | cat >>confdefs.h <<_ACEOF | |
2568 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2569 | _ACEOF | |
2570 | ||
2571 | cat >>confdefs.h <<_ACEOF | |
2572 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2573 | _ACEOF | |
2574 | ||
2575 | cat >>confdefs.h <<_ACEOF | |
2576 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2577 | _ACEOF | |
2578 | ||
2579 | cat >>confdefs.h <<_ACEOF | |
2580 | #define PACKAGE_URL "$PACKAGE_URL" | |
2581 | _ACEOF | |
2582 | ||
2583 | ||
2584 | # Let the site file select an alternate cache file if it wants to. | |
2585 | # Prefer an explicitly selected file to automatically selected ones. | |
2586 | ac_site_file1=NONE | |
2587 | ac_site_file2=NONE | |
2588 | if test -n "$CONFIG_SITE"; then | |
2589 | ac_site_file1=$CONFIG_SITE | |
2590 | elif test "x$prefix" != xNONE; then | |
2591 | ac_site_file1=$prefix/share/config.site | |
2592 | ac_site_file2=$prefix/etc/config.site | |
2593 | else | |
2594 | ac_site_file1=$ac_default_prefix/share/config.site | |
2595 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2596 | fi | |
2597 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2598 | do | |
2599 | test "x$ac_site_file" = xNONE && continue | |
2600 | if test -r "$ac_site_file"; then | |
2601 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2602 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2603 | sed 's/^/| /' "$ac_site_file" >&5 | |
2604 | . "$ac_site_file" | |
2605 | fi | |
2606 | done | |
2607 | ||
2608 | if test -r "$cache_file"; then | |
2609 | # Some versions of bash will fail to source /dev/null (special | |
2610 | # files actually), so we avoid doing that. | |
2611 | if test -f "$cache_file"; then | |
2612 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2613 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2614 | case $cache_file in | |
2615 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2616 | *) . "./$cache_file";; | |
2617 | esac | |
2618 | fi | |
2619 | else | |
2620 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2621 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2622 | >$cache_file | |
bec39cab AC |
2623 | fi |
2624 | ||
81ecdfbb RW |
2625 | # Check that the precious variables saved in the cache have kept the same |
2626 | # value. | |
2627 | ac_cache_corrupted=false | |
2628 | for ac_var in $ac_precious_vars; do | |
2629 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2630 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2631 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2632 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2633 | case $ac_old_set,$ac_new_set in | |
2634 | set,) | |
2635 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2636 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2637 | ac_cache_corrupted=: ;; | |
2638 | ,set) | |
2639 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2640 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2641 | ac_cache_corrupted=: ;; | |
2642 | ,);; | |
2643 | *) | |
2644 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2645 | # differences in whitespace do not lead to failure. | |
2646 | ac_old_val_w=`echo x $ac_old_val` | |
2647 | ac_new_val_w=`echo x $ac_new_val` | |
2648 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2649 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2650 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2651 | ac_cache_corrupted=: | |
2652 | else | |
2653 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2654 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2655 | eval $ac_var=\$ac_old_val | |
2656 | fi | |
2657 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2658 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2659 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2660 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2661 | fi;; | |
2662 | esac | |
2663 | # Pass precious variables to config.status. | |
2664 | if test "$ac_new_set" = set; then | |
2665 | case $ac_new_val in | |
2666 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2667 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2668 | esac | |
2669 | case " $ac_configure_args " in | |
2670 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2671 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2672 | esac | |
2673 | fi | |
2674 | done | |
2675 | if $ac_cache_corrupted; then | |
2676 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2677 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2678 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2679 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2680 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2681 | fi | |
2682 | ## -------------------- ## | |
2683 | ## Main body of script. ## | |
2684 | ## -------------------- ## | |
2685 | ||
2686 | ac_ext=c | |
2687 | ac_cpp='$CPP $CPPFLAGS' | |
2688 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2689 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2690 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2691 | ||
2692 | ||
2693 | ||
2694 | ||
2695 | ||
2696 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2697 | ||
2698 | ||
2699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2700 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2701 | # Check whether --enable-maintainer-mode was given. | |
2702 | if test "${enable_maintainer_mode+set}" = set; then : | |
2703 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2704 | else | |
2705 | USE_MAINTAINER_MODE=no | |
2706 | fi | |
2707 | ||
2708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2709 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2710 | if test $USE_MAINTAINER_MODE = yes; then | |
2711 | MAINTAINER_MODE_TRUE= | |
2712 | MAINTAINER_MODE_FALSE='#' | |
2713 | else | |
2714 | MAINTAINER_MODE_TRUE='#' | |
2715 | MAINTAINER_MODE_FALSE= | |
2716 | fi | |
2717 | ||
2718 | MAINT=$MAINTAINER_MODE_TRUE | |
2719 | ||
2720 | ||
2721 | ||
17ef446e | 2722 | # Set the 'development' global. |
270c9937 | 2723 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2724 | |
81ecdfbb RW |
2725 | ac_ext=c |
2726 | ac_cpp='$CPP $CPPFLAGS' | |
2727 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2728 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2729 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2730 | if test -n "$ac_tool_prefix"; then | |
2731 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2732 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2734 | $as_echo_n "checking for $ac_word... " >&6; } | |
2735 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2736 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2737 | else |
2738 | if test -n "$CC"; then | |
2739 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2740 | else | |
bec39cab AC |
2741 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2742 | for as_dir in $PATH | |
2743 | do | |
2744 | IFS=$as_save_IFS | |
2745 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2746 | for ac_exec_ext in '' $ac_executable_extensions; do |
2747 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2748 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2749 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2750 | break 2 |
2751 | fi | |
2752 | done | |
81ecdfbb RW |
2753 | done |
2754 | IFS=$as_save_IFS | |
bec39cab | 2755 | |
c906108c SS |
2756 | fi |
2757 | fi | |
bec39cab | 2758 | CC=$ac_cv_prog_CC |
c906108c | 2759 | if test -n "$CC"; then |
81ecdfbb RW |
2760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2761 | $as_echo "$CC" >&6; } | |
c906108c | 2762 | else |
81ecdfbb RW |
2763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2764 | $as_echo "no" >&6; } | |
c906108c SS |
2765 | fi |
2766 | ||
81ecdfbb | 2767 | |
b4e70030 JB |
2768 | fi |
2769 | if test -z "$ac_cv_prog_CC"; then | |
2770 | ac_ct_CC=$CC | |
81ecdfbb RW |
2771 | # Extract the first word of "gcc", so it can be a program name with args. |
2772 | set dummy gcc; ac_word=$2 | |
2773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2774 | $as_echo_n "checking for $ac_word... " >&6; } | |
2775 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2776 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2777 | else |
2778 | if test -n "$ac_ct_CC"; then | |
2779 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2780 | else | |
2781 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2782 | for as_dir in $PATH | |
2783 | do | |
2784 | IFS=$as_save_IFS | |
2785 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2786 | for ac_exec_ext in '' $ac_executable_extensions; do |
2787 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2788 | ac_cv_prog_ac_ct_CC="gcc" | |
2789 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2790 | break 2 |
4e8d927d | 2791 | fi |
b4e70030 | 2792 | done |
81ecdfbb RW |
2793 | done |
2794 | IFS=$as_save_IFS | |
b4e70030 JB |
2795 | |
2796 | fi | |
2797 | fi | |
2798 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2799 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2801 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2802 | else |
81ecdfbb RW |
2803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2804 | $as_echo "no" >&6; } | |
b4e70030 JB |
2805 | fi |
2806 | ||
81ecdfbb RW |
2807 | if test "x$ac_ct_CC" = x; then |
2808 | CC="" | |
2809 | else | |
2810 | case $cross_compiling:$ac_tool_warned in | |
2811 | yes:) | |
2812 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2813 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2814 | ac_tool_warned=yes ;; | |
2815 | esac | |
2816 | CC=$ac_ct_CC | |
2817 | fi | |
b4e70030 JB |
2818 | else |
2819 | CC="$ac_cv_prog_CC" | |
2820 | fi | |
2821 | ||
c906108c | 2822 | if test -z "$CC"; then |
81ecdfbb RW |
2823 | if test -n "$ac_tool_prefix"; then |
2824 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2825 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2827 | $as_echo_n "checking for $ac_word... " >&6; } | |
2828 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2829 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2830 | else |
2831 | if test -n "$CC"; then | |
2832 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2833 | else | |
bec39cab AC |
2834 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2835 | for as_dir in $PATH | |
2836 | do | |
2837 | IFS=$as_save_IFS | |
2838 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2839 | for ac_exec_ext in '' $ac_executable_extensions; do |
2840 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2841 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2842 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2843 | break 2 |
2844 | fi | |
2845 | done | |
81ecdfbb RW |
2846 | done |
2847 | IFS=$as_save_IFS | |
2848 | ||
2849 | fi | |
2850 | fi | |
2851 | CC=$ac_cv_prog_CC | |
2852 | if test -n "$CC"; then | |
2853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2854 | $as_echo "$CC" >&6; } | |
2855 | else | |
2856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2857 | $as_echo "no" >&6; } | |
2858 | fi | |
2859 | ||
2860 | ||
2861 | fi | |
2862 | fi | |
2863 | if test -z "$CC"; then | |
2864 | # Extract the first word of "cc", so it can be a program name with args. | |
2865 | set dummy cc; ac_word=$2 | |
2866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2867 | $as_echo_n "checking for $ac_word... " >&6; } | |
2868 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2869 | $as_echo_n "(cached) " >&6 | |
2870 | else | |
2871 | if test -n "$CC"; then | |
2872 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2873 | else | |
2874 | ac_prog_rejected=no | |
2875 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2876 | for as_dir in $PATH | |
2877 | do | |
2878 | IFS=$as_save_IFS | |
2879 | test -z "$as_dir" && as_dir=. | |
2880 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2881 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2882 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2883 | ac_prog_rejected=yes | |
2884 | continue | |
2885 | fi | |
2886 | ac_cv_prog_CC="cc" | |
2887 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2888 | break 2 | |
2889 | fi | |
2890 | done | |
2891 | done | |
2892 | IFS=$as_save_IFS | |
bec39cab | 2893 | |
c906108c SS |
2894 | if test $ac_prog_rejected = yes; then |
2895 | # We found a bogon in the path, so make sure we never use it. | |
2896 | set dummy $ac_cv_prog_CC | |
2897 | shift | |
bec39cab | 2898 | if test $# != 0; then |
c906108c SS |
2899 | # We chose a different compiler from the bogus one. |
2900 | # However, it has the same basename, so the bogon will be chosen | |
2901 | # first if we set CC to just the basename; use the full file name. | |
2902 | shift | |
bec39cab | 2903 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2904 | fi |
2905 | fi | |
2906 | fi | |
2907 | fi | |
bec39cab | 2908 | CC=$ac_cv_prog_CC |
c906108c | 2909 | if test -n "$CC"; then |
81ecdfbb RW |
2910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2911 | $as_echo "$CC" >&6; } | |
c906108c | 2912 | else |
81ecdfbb RW |
2913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2914 | $as_echo "no" >&6; } | |
c906108c SS |
2915 | fi |
2916 | ||
81ecdfbb | 2917 | |
bec39cab AC |
2918 | fi |
2919 | if test -z "$CC"; then | |
2920 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2921 | for ac_prog in cl.exe |
bec39cab AC |
2922 | do |
2923 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2924 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2925 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2926 | $as_echo_n "checking for $ac_word... " >&6; } | |
2927 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2928 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2929 | else |
2930 | if test -n "$CC"; then | |
2931 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2932 | else | |
bec39cab AC |
2933 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2934 | for as_dir in $PATH | |
2935 | do | |
2936 | IFS=$as_save_IFS | |
2937 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2938 | for ac_exec_ext in '' $ac_executable_extensions; do |
2939 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2940 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2941 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2942 | break 2 |
2943 | fi | |
2944 | done | |
81ecdfbb RW |
2945 | done |
2946 | IFS=$as_save_IFS | |
bec39cab | 2947 | |
c906108c SS |
2948 | fi |
2949 | fi | |
bec39cab | 2950 | CC=$ac_cv_prog_CC |
c906108c | 2951 | if test -n "$CC"; then |
81ecdfbb RW |
2952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2953 | $as_echo "$CC" >&6; } | |
c906108c | 2954 | else |
81ecdfbb RW |
2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2956 | $as_echo "no" >&6; } | |
c906108c | 2957 | fi |
bec39cab | 2958 | |
81ecdfbb | 2959 | |
bec39cab AC |
2960 | test -n "$CC" && break |
2961 | done | |
2962 | fi | |
2963 | if test -z "$CC"; then | |
2964 | ac_ct_CC=$CC | |
81ecdfbb | 2965 | for ac_prog in cl.exe |
bec39cab AC |
2966 | do |
2967 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2968 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2970 | $as_echo_n "checking for $ac_word... " >&6; } | |
2971 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2972 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
2973 | else |
2974 | if test -n "$ac_ct_CC"; then | |
2975 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2976 | else | |
2977 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2978 | for as_dir in $PATH | |
2979 | do | |
2980 | IFS=$as_save_IFS | |
2981 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2982 | for ac_exec_ext in '' $ac_executable_extensions; do |
2983 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2984 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2985 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2986 | break 2 |
c906108c | 2987 | fi |
bec39cab | 2988 | done |
81ecdfbb RW |
2989 | done |
2990 | IFS=$as_save_IFS | |
bec39cab AC |
2991 | |
2992 | fi | |
2993 | fi | |
2994 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2995 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2997 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2998 | else |
81ecdfbb RW |
2999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3000 | $as_echo "no" >&6; } | |
c906108c SS |
3001 | fi |
3002 | ||
81ecdfbb | 3003 | |
bec39cab AC |
3004 | test -n "$ac_ct_CC" && break |
3005 | done | |
c906108c | 3006 | |
81ecdfbb RW |
3007 | if test "x$ac_ct_CC" = x; then |
3008 | CC="" | |
3009 | else | |
3010 | case $cross_compiling:$ac_tool_warned in | |
3011 | yes:) | |
3012 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3013 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3014 | ac_tool_warned=yes ;; | |
3015 | esac | |
3016 | CC=$ac_ct_CC | |
3017 | fi | |
bec39cab AC |
3018 | fi |
3019 | ||
3020 | fi | |
3021 | ||
3022 | ||
81ecdfbb RW |
3023 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3024 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3025 | as_fn_error "no acceptable C compiler found in \$PATH | |
3026 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3027 | |
3028 | # Provide some information about the compiler. | |
81ecdfbb RW |
3029 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3030 | set X $ac_compile | |
3031 | ac_compiler=$2 | |
3032 | for ac_option in --version -v -V -qversion; do | |
3033 | { { ac_try="$ac_compiler $ac_option >&5" | |
3034 | case "(($ac_try" in | |
3035 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3036 | *) ac_try_echo=$ac_try;; | |
3037 | esac | |
3038 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3039 | $as_echo "$ac_try_echo"; } >&5 | |
3040 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3041 | ac_status=$? |
81ecdfbb RW |
3042 | if test -s conftest.err; then |
3043 | sed '10a\ | |
3044 | ... rest of stderr output deleted ... | |
3045 | 10q' conftest.err >conftest.er1 | |
3046 | cat conftest.er1 >&5 | |
3047 | rm -f conftest.er1 conftest.err | |
3048 | fi | |
3049 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3050 | test $ac_status = 0; } | |
3051 | done | |
bec39cab | 3052 | |
81ecdfbb | 3053 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3054 | /* end confdefs.h. */ |
3055 | ||
3056 | int | |
3057 | main () | |
3058 | { | |
3059 | ||
3060 | ; | |
3061 | return 0; | |
3062 | } | |
3063 | _ACEOF | |
3064 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3065 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3066 | # Try to create an executable without -o first, disregard a.out. |
3067 | # It will help us diagnose broken compilers, and finding out an intuition | |
3068 | # of exeext. | |
81ecdfbb RW |
3069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3070 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3071 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3072 | ||
3073 | # The possible output files: | |
3074 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3075 | ||
3076 | ac_rmfiles= | |
3077 | for ac_file in $ac_files | |
3078 | do | |
3079 | case $ac_file in | |
3080 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3081 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3082 | esac | |
3083 | done | |
3084 | rm -f $ac_rmfiles | |
3085 | ||
3086 | if { { ac_try="$ac_link_default" | |
3087 | case "(($ac_try" in | |
3088 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3089 | *) ac_try_echo=$ac_try;; | |
3090 | esac | |
3091 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3092 | $as_echo "$ac_try_echo"; } >&5 | |
3093 | (eval "$ac_link_default") 2>&5 | |
3094 | ac_status=$? | |
3095 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3096 | test $ac_status = 0; }; then : | |
3097 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3098 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3099 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3100 | # so that the user can short-circuit this test for compilers unknown to | |
3101 | # Autoconf. | |
3102 | for ac_file in $ac_files '' | |
bec39cab AC |
3103 | do |
3104 | test -f "$ac_file" || continue | |
3105 | case $ac_file in | |
81ecdfbb | 3106 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3107 | ;; |
3108 | [ab].out ) | |
3109 | # We found the default executable, but exeext='' is most | |
3110 | # certainly right. | |
3111 | break;; | |
3112 | *.* ) | |
81ecdfbb RW |
3113 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3114 | then :; else | |
3115 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3116 | fi | |
3117 | # We set ac_cv_exeext here because the later test for it is not | |
3118 | # safe: cross compilers may not add the suffix if given an `-o' | |
3119 | # argument, so we may need to know it at that point already. | |
3120 | # Even if this section looks crufty: it has the advantage of | |
3121 | # actually working. | |
b4e70030 JB |
3122 | break;; |
3123 | * ) | |
3124 | break;; | |
bec39cab AC |
3125 | esac |
3126 | done | |
81ecdfbb RW |
3127 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3128 | ||
bec39cab | 3129 | else |
81ecdfbb RW |
3130 | ac_file='' |
3131 | fi | |
3132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3133 | $as_echo "$ac_file" >&6; } | |
3134 | if test -z "$ac_file"; then : | |
3135 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3136 | sed 's/^/| /' conftest.$ac_ext >&5 |
3137 | ||
81ecdfbb RW |
3138 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3139 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3140 | { as_fn_set_status 77 | |
3141 | as_fn_error "C compiler cannot create executables | |
3142 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3143 | fi |
b4e70030 | 3144 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3145 | |
81ecdfbb | 3146 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3147 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3149 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3150 | # If not cross compiling, check that we can run a simple program. |
3151 | if test "$cross_compiling" != yes; then | |
3152 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3153 | { { case "(($ac_try" in |
3154 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3155 | *) ac_try_echo=$ac_try;; | |
3156 | esac | |
3157 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3158 | $as_echo "$ac_try_echo"; } >&5 | |
3159 | (eval "$ac_try") 2>&5 | |
bec39cab | 3160 | ac_status=$? |
81ecdfbb RW |
3161 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3162 | test $ac_status = 0; }; }; then | |
bec39cab | 3163 | cross_compiling=no |
c906108c | 3164 | else |
bec39cab AC |
3165 | if test "$cross_compiling" = maybe; then |
3166 | cross_compiling=yes | |
3167 | else | |
81ecdfbb RW |
3168 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3169 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3170 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3171 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3172 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3173 | fi |
c906108c | 3174 | fi |
bec39cab | 3175 | fi |
81ecdfbb RW |
3176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3177 | $as_echo "yes" >&6; } | |
bec39cab | 3178 | |
81ecdfbb | 3179 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3180 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3181 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3182 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3184 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3186 | $as_echo "$cross_compiling" >&6; } | |
3187 | ||
3188 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3189 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3190 | if { { ac_try="$ac_link" | |
3191 | case "(($ac_try" in | |
3192 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3193 | *) ac_try_echo=$ac_try;; | |
3194 | esac | |
3195 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3196 | $as_echo "$ac_try_echo"; } >&5 | |
3197 | (eval "$ac_link") 2>&5 | |
bec39cab | 3198 | ac_status=$? |
81ecdfbb RW |
3199 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3200 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3201 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3202 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3203 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3204 | # `rm'. | |
3205 | for ac_file in conftest.exe conftest conftest.*; do | |
3206 | test -f "$ac_file" || continue | |
3207 | case $ac_file in | |
81ecdfbb | 3208 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3209 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3210 | break;; |
3211 | * ) break;; | |
3212 | esac | |
3213 | done | |
c906108c | 3214 | else |
81ecdfbb RW |
3215 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3216 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3217 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3218 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3219 | fi |
b4e70030 | 3220 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3222 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3223 | |
b4e70030 | 3224 | rm -f conftest.$ac_ext |
bec39cab AC |
3225 | EXEEXT=$ac_cv_exeext |
3226 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3227 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3228 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3229 | if test "${ac_cv_objext+set}" = set; then : | |
3230 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3231 | else |
81ecdfbb | 3232 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3233 | /* end confdefs.h. */ |
3234 | ||
3235 | int | |
3236 | main () | |
3237 | { | |
3238 | ||
3239 | ; | |
3240 | return 0; | |
3241 | } | |
3242 | _ACEOF | |
3243 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3244 | if { { ac_try="$ac_compile" |
3245 | case "(($ac_try" in | |
3246 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3247 | *) ac_try_echo=$ac_try;; | |
3248 | esac | |
3249 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3250 | $as_echo "$ac_try_echo"; } >&5 | |
3251 | (eval "$ac_compile") 2>&5 | |
3252 | ac_status=$? | |
3253 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3254 | test $ac_status = 0; }; then : | |
3255 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3256 | test -f "$ac_file" || continue; | |
bec39cab | 3257 | case $ac_file in |
81ecdfbb | 3258 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3259 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3260 | break;; | |
3261 | esac | |
3262 | done | |
c906108c | 3263 | else |
81ecdfbb | 3264 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3265 | sed 's/^/| /' conftest.$ac_ext >&5 |
3266 | ||
81ecdfbb RW |
3267 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3268 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3269 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3270 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3271 | fi |
b4e70030 | 3272 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3273 | fi |
81ecdfbb RW |
3274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3275 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3276 | OBJEXT=$ac_cv_objext |
3277 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3279 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3280 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3281 | $as_echo_n "(cached) " >&6 | |
c906108c | 3282 | else |
81ecdfbb | 3283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3284 | /* end confdefs.h. */ |
3285 | ||
3286 | int | |
3287 | main () | |
3288 | { | |
3289 | #ifndef __GNUC__ | |
3290 | choke me | |
3291 | #endif | |
3292 | ||
3293 | ; | |
3294 | return 0; | |
3295 | } | |
3296 | _ACEOF | |
81ecdfbb | 3297 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3298 | ac_compiler_gnu=yes |
3299 | else | |
81ecdfbb | 3300 | ac_compiler_gnu=no |
bec39cab | 3301 | fi |
81ecdfbb | 3302 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3303 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3304 | ||
3305 | fi | |
81ecdfbb RW |
3306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3307 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3308 | if test $ac_compiler_gnu = yes; then | |
3309 | GCC=yes | |
3310 | else | |
3311 | GCC= | |
3312 | fi | |
bec39cab AC |
3313 | ac_test_CFLAGS=${CFLAGS+set} |
3314 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3316 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3317 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3318 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3319 | else |
81ecdfbb RW |
3320 | ac_save_c_werror_flag=$ac_c_werror_flag |
3321 | ac_c_werror_flag=yes | |
3322 | ac_cv_prog_cc_g=no | |
3323 | CFLAGS="-g" | |
3324 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3325 | /* end confdefs.h. */ |
3326 | ||
3327 | int | |
3328 | main () | |
3329 | { | |
3330 | ||
3331 | ; | |
3332 | return 0; | |
3333 | } | |
3334 | _ACEOF | |
81ecdfbb | 3335 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3336 | ac_cv_prog_cc_g=yes |
3337 | else | |
81ecdfbb RW |
3338 | CFLAGS="" |
3339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3340 | /* end confdefs.h. */ | |
3341 | ||
3342 | int | |
3343 | main () | |
3344 | { | |
3345 | ||
3346 | ; | |
3347 | return 0; | |
3348 | } | |
3349 | _ACEOF | |
3350 | if ac_fn_c_try_compile "$LINENO"; then : | |
3351 | ||
3352 | else | |
3353 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3354 | CFLAGS="-g" | |
3355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3356 | /* end confdefs.h. */ | |
3357 | ||
3358 | int | |
3359 | main () | |
3360 | { | |
c906108c | 3361 | |
81ecdfbb RW |
3362 | ; |
3363 | return 0; | |
3364 | } | |
3365 | _ACEOF | |
3366 | if ac_fn_c_try_compile "$LINENO"; then : | |
3367 | ac_cv_prog_cc_g=yes | |
3368 | fi | |
3369 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3370 | fi | |
3371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3372 | fi |
81ecdfbb RW |
3373 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3374 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3375 | fi |
81ecdfbb RW |
3376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3377 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3378 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3379 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3380 | elif test $ac_cv_prog_cc_g = yes; then |
3381 | if test "$GCC" = yes; then | |
3382 | CFLAGS="-g -O2" | |
3383 | else | |
3384 | CFLAGS="-g" | |
3385 | fi | |
3386 | else | |
3387 | if test "$GCC" = yes; then | |
3388 | CFLAGS="-O2" | |
3389 | else | |
3390 | CFLAGS= | |
3391 | fi | |
3392 | fi | |
81ecdfbb RW |
3393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3394 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3395 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3396 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3397 | else |
81ecdfbb | 3398 | ac_cv_prog_cc_c89=no |
bec39cab | 3399 | ac_save_CC=$CC |
81ecdfbb | 3400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3401 | /* end confdefs.h. */ |
c906108c SS |
3402 | #include <stdarg.h> |
3403 | #include <stdio.h> | |
3404 | #include <sys/types.h> | |
3405 | #include <sys/stat.h> | |
3406 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3407 | struct buf { int x; }; | |
3408 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3409 | static char *e (p, i) | |
3410 | char **p; | |
3411 | int i; | |
3412 | { | |
3413 | return p[i]; | |
3414 | } | |
3415 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3416 | { | |
3417 | char *s; | |
3418 | va_list v; | |
3419 | va_start (v,p); | |
3420 | s = g (p, va_arg (v,int)); | |
3421 | va_end (v); | |
3422 | return s; | |
3423 | } | |
bec39cab AC |
3424 | |
3425 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3426 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3427 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3428 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3429 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3430 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3431 | that's true only with -std. */ |
bec39cab AC |
3432 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3433 | ||
81ecdfbb RW |
3434 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3435 | inside strings and character constants. */ | |
3436 | #define FOO(x) 'x' | |
3437 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3438 | ||
c906108c SS |
3439 | int test (int i, double x); |
3440 | struct s1 {int (*f) (int a);}; | |
3441 | struct s2 {int (*f) (double a);}; | |
3442 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3443 | int argc; | |
3444 | char **argv; | |
bec39cab AC |
3445 | int |
3446 | main () | |
3447 | { | |
c906108c | 3448 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3449 | ; |
3450 | return 0; | |
3451 | } | |
3452 | _ACEOF | |
81ecdfbb RW |
3453 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3454 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3455 | do |
3456 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3457 | if ac_fn_c_try_compile "$LINENO"; then : |
3458 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3459 | fi |
81ecdfbb RW |
3460 | rm -f core conftest.err conftest.$ac_objext |
3461 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3462 | done |
81ecdfbb | 3463 | rm -f conftest.$ac_ext |
bec39cab | 3464 | CC=$ac_save_CC |
c906108c SS |
3465 | |
3466 | fi | |
81ecdfbb RW |
3467 | # AC_CACHE_VAL |
3468 | case "x$ac_cv_prog_cc_c89" in | |
3469 | x) | |
3470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3471 | $as_echo "none needed" >&6; } ;; | |
3472 | xno) | |
3473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3474 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3475 | *) |
81ecdfbb RW |
3476 | CC="$CC $ac_cv_prog_cc_c89" |
3477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3478 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3479 | esac |
81ecdfbb | 3480 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3481 | |
b4e70030 JB |
3482 | fi |
3483 | ||
bec39cab AC |
3484 | ac_ext=c |
3485 | ac_cpp='$CPP $CPPFLAGS' | |
3486 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3487 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3488 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3489 | |
60ca704f | 3490 | |
bec39cab AC |
3491 | ac_ext=c |
3492 | ac_cpp='$CPP $CPPFLAGS' | |
3493 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3494 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3495 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3497 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3498 | # On Suns, sometimes $CPP names a directory. |
3499 | if test -n "$CPP" && test -d "$CPP"; then | |
3500 | CPP= | |
8bb2c122 | 3501 | fi |
bec39cab | 3502 | if test -z "$CPP"; then |
81ecdfbb RW |
3503 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3504 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3505 | else |
3506 | # Double quotes because CPP needs to be expanded | |
3507 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3508 | do | |
3509 | ac_preproc_ok=false | |
3510 | for ac_c_preproc_warn_flag in '' yes | |
3511 | do | |
3512 | # Use a header file that comes with gcc, so configuring glibc | |
3513 | # with a fresh cross-compiler works. | |
3514 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3515 | # <limits.h> exists even on freestanding compilers. | |
3516 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3517 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3518 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3519 | /* end confdefs.h. */ |
3520 | #ifdef __STDC__ | |
3521 | # include <limits.h> | |
3522 | #else | |
3523 | # include <assert.h> | |
3524 | #endif | |
3525 | Syntax error | |
3526 | _ACEOF | |
81ecdfbb | 3527 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3528 | |
81ecdfbb | 3529 | else |
bec39cab AC |
3530 | # Broken: fails on valid input. |
3531 | continue | |
3532 | fi | |
3533 | rm -f conftest.err conftest.$ac_ext | |
3534 | ||
81ecdfbb | 3535 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3536 | # can be detected and how. |
81ecdfbb | 3537 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3538 | /* end confdefs.h. */ |
3539 | #include <ac_nonexistent.h> | |
3540 | _ACEOF | |
81ecdfbb | 3541 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3542 | # Broken: success on invalid input. |
3543 | continue | |
8bb2c122 | 3544 | else |
bec39cab AC |
3545 | # Passes both tests. |
3546 | ac_preproc_ok=: | |
3547 | break | |
8bb2c122 | 3548 | fi |
bec39cab | 3549 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3550 | |
bec39cab AC |
3551 | done |
3552 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3553 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3554 | if $ac_preproc_ok; then : |
bec39cab AC |
3555 | break |
3556 | fi | |
8bb2c122 | 3557 | |
bec39cab AC |
3558 | done |
3559 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3560 | |
c906108c | 3561 | fi |
bec39cab AC |
3562 | CPP=$ac_cv_prog_CPP |
3563 | else | |
3564 | ac_cv_prog_CPP=$CPP | |
c906108c | 3565 | fi |
81ecdfbb RW |
3566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3567 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3568 | ac_preproc_ok=false |
3569 | for ac_c_preproc_warn_flag in '' yes | |
3570 | do | |
3571 | # Use a header file that comes with gcc, so configuring glibc | |
3572 | # with a fresh cross-compiler works. | |
3573 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3574 | # <limits.h> exists even on freestanding compilers. | |
3575 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3576 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3577 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3578 | /* end confdefs.h. */ |
3579 | #ifdef __STDC__ | |
3580 | # include <limits.h> | |
3581 | #else | |
3582 | # include <assert.h> | |
3583 | #endif | |
3584 | Syntax error | |
3585 | _ACEOF | |
81ecdfbb | 3586 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3587 | |
81ecdfbb | 3588 | else |
bec39cab AC |
3589 | # Broken: fails on valid input. |
3590 | continue | |
3591 | fi | |
3592 | rm -f conftest.err conftest.$ac_ext | |
3593 | ||
81ecdfbb | 3594 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3595 | # can be detected and how. |
81ecdfbb | 3596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3597 | /* end confdefs.h. */ |
3598 | #include <ac_nonexistent.h> | |
3599 | _ACEOF | |
81ecdfbb | 3600 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3601 | # Broken: success on invalid input. |
3602 | continue | |
c906108c | 3603 | else |
bec39cab AC |
3604 | # Passes both tests. |
3605 | ac_preproc_ok=: | |
3606 | break | |
c906108c | 3607 | fi |
bec39cab | 3608 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3609 | |
bec39cab AC |
3610 | done |
3611 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3612 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3613 | if $ac_preproc_ok; then : |
3614 | ||
c906108c | 3615 | else |
81ecdfbb RW |
3616 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3617 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3618 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3619 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3620 | fi |
c906108c | 3621 | |
bec39cab AC |
3622 | ac_ext=c |
3623 | ac_cpp='$CPP $CPPFLAGS' | |
3624 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3625 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3626 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3627 | ||
3628 | ||
81ecdfbb RW |
3629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3630 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3631 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3632 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3633 | else |
81ecdfbb RW |
3634 | if test -z "$GREP"; then |
3635 | ac_path_GREP_found=false | |
3636 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3637 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3638 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3639 | do | |
3640 | IFS=$as_save_IFS | |
3641 | test -z "$as_dir" && as_dir=. | |
3642 | for ac_prog in grep ggrep; do | |
3643 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3644 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3645 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3646 | # Check for GNU ac_path_GREP and select it if it is found. | |
3647 | # Check for GNU $ac_path_GREP | |
3648 | case `"$ac_path_GREP" --version 2>&1` in | |
3649 | *GNU*) | |
3650 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3651 | *) | |
3652 | ac_count=0 | |
3653 | $as_echo_n 0123456789 >"conftest.in" | |
3654 | while : | |
3655 | do | |
3656 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3657 | mv "conftest.tmp" "conftest.in" | |
3658 | cp "conftest.in" "conftest.nl" | |
3659 | $as_echo 'GREP' >> "conftest.nl" | |
3660 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3661 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3662 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3663 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3664 | # Best one so far, save it but keep looking for a better one | |
3665 | ac_cv_path_GREP="$ac_path_GREP" | |
3666 | ac_path_GREP_max=$ac_count | |
bec39cab | 3667 | fi |
81ecdfbb RW |
3668 | # 10*(2^10) chars as input seems more than enough |
3669 | test $ac_count -gt 10 && break | |
3670 | done | |
3671 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3672 | esac | |
bec39cab | 3673 | |
81ecdfbb RW |
3674 | $ac_path_GREP_found && break 3 |
3675 | done | |
3676 | done | |
3677 | done | |
3678 | IFS=$as_save_IFS | |
3679 | if test -z "$ac_cv_path_GREP"; then | |
3680 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3681 | fi | |
c906108c | 3682 | else |
81ecdfbb | 3683 | ac_cv_path_GREP=$GREP |
c906108c | 3684 | fi |
c906108c | 3685 | |
81ecdfbb RW |
3686 | fi |
3687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3688 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3689 | GREP="$ac_cv_path_GREP" | |
c906108c | 3690 | |
c906108c | 3691 | |
81ecdfbb RW |
3692 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3693 | $as_echo_n "checking for egrep... " >&6; } | |
3694 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3695 | $as_echo_n "(cached) " >&6 | |
783e057b | 3696 | else |
81ecdfbb RW |
3697 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3698 | then ac_cv_path_EGREP="$GREP -E" | |
3699 | else | |
3700 | if test -z "$EGREP"; then | |
3701 | ac_path_EGREP_found=false | |
3702 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3703 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3704 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3705 | do |
3706 | IFS=$as_save_IFS | |
3707 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3708 | for ac_prog in egrep; do |
3709 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3710 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3711 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3712 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3713 | # Check for GNU $ac_path_EGREP | |
3714 | case `"$ac_path_EGREP" --version 2>&1` in | |
3715 | *GNU*) | |
3716 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3717 | *) | |
3718 | ac_count=0 | |
3719 | $as_echo_n 0123456789 >"conftest.in" | |
3720 | while : | |
3721 | do | |
3722 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3723 | mv "conftest.tmp" "conftest.in" | |
3724 | cp "conftest.in" "conftest.nl" | |
3725 | $as_echo 'EGREP' >> "conftest.nl" | |
3726 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3727 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3728 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3729 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3730 | # Best one so far, save it but keep looking for a better one | |
3731 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3732 | ac_path_EGREP_max=$ac_count | |
3733 | fi | |
3734 | # 10*(2^10) chars as input seems more than enough | |
3735 | test $ac_count -gt 10 && break | |
3736 | done | |
3737 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3738 | esac | |
bec39cab | 3739 | |
81ecdfbb RW |
3740 | $ac_path_EGREP_found && break 3 |
3741 | done | |
3742 | done | |
3743 | done | |
3744 | IFS=$as_save_IFS | |
3745 | if test -z "$ac_cv_path_EGREP"; then | |
3746 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3747 | fi |
783e057b | 3748 | else |
81ecdfbb | 3749 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3750 | fi |
3751 | ||
81ecdfbb | 3752 | fi |
783e057b | 3753 | fi |
81ecdfbb RW |
3754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3755 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3756 | EGREP="$ac_cv_path_EGREP" | |
3757 | ||
783e057b | 3758 | |
81ecdfbb RW |
3759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3760 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3761 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3762 | $as_echo_n "(cached) " >&6 | |
783e057b | 3763 | else |
81ecdfbb | 3764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3765 | /* end confdefs.h. */ |
783e057b | 3766 | #include <stdlib.h> |
bec39cab | 3767 | #include <stdarg.h> |
783e057b DJ |
3768 | #include <string.h> |
3769 | #include <float.h> | |
c906108c | 3770 | |
bec39cab AC |
3771 | int |
3772 | main () | |
3773 | { | |
c906108c | 3774 | |
bec39cab AC |
3775 | ; |
3776 | return 0; | |
3777 | } | |
3778 | _ACEOF | |
81ecdfbb | 3779 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3780 | ac_cv_header_stdc=yes |
c906108c | 3781 | else |
81ecdfbb | 3782 | ac_cv_header_stdc=no |
c906108c | 3783 | fi |
81ecdfbb | 3784 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3785 | |
783e057b DJ |
3786 | if test $ac_cv_header_stdc = yes; then |
3787 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3789 | /* end confdefs.h. */ |
3790 | #include <string.h> | |
c906108c | 3791 | |
783e057b DJ |
3792 | _ACEOF |
3793 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3794 | $EGREP "memchr" >/dev/null 2>&1; then : |
3795 | ||
c906108c | 3796 | else |
783e057b | 3797 | ac_cv_header_stdc=no |
c906108c | 3798 | fi |
783e057b | 3799 | rm -f conftest* |
c906108c SS |
3800 | |
3801 | fi | |
3802 | ||
783e057b DJ |
3803 | if test $ac_cv_header_stdc = yes; then |
3804 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3806 | /* end confdefs.h. */ |
3807 | #include <stdlib.h> | |
bec39cab | 3808 | |
783e057b DJ |
3809 | _ACEOF |
3810 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3811 | $EGREP "free" >/dev/null 2>&1; then : |
3812 | ||
bec39cab | 3813 | else |
783e057b | 3814 | ac_cv_header_stdc=no |
bec39cab | 3815 | fi |
783e057b | 3816 | rm -f conftest* |
bec39cab AC |
3817 | |
3818 | fi | |
bec39cab | 3819 | |
783e057b DJ |
3820 | if test $ac_cv_header_stdc = yes; then |
3821 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3822 | if test "$cross_compiling" = yes; then : |
783e057b | 3823 | : |
bec39cab | 3824 | else |
81ecdfbb | 3825 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3826 | /* end confdefs.h. */ |
3827 | #include <ctype.h> | |
81ecdfbb | 3828 | #include <stdlib.h> |
783e057b DJ |
3829 | #if ((' ' & 0x0FF) == 0x020) |
3830 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3831 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3832 | #else | |
3833 | # define ISLOWER(c) \ | |
3834 | (('a' <= (c) && (c) <= 'i') \ | |
3835 | || ('j' <= (c) && (c) <= 'r') \ | |
3836 | || ('s' <= (c) && (c) <= 'z')) | |
3837 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3838 | #endif | |
3839 | ||
3840 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3841 | int | |
3842 | main () | |
3843 | { | |
3844 | int i; | |
3845 | for (i = 0; i < 256; i++) | |
3846 | if (XOR (islower (i), ISLOWER (i)) | |
3847 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3848 | return 2; |
3849 | return 0; | |
783e057b DJ |
3850 | } |
3851 | _ACEOF | |
81ecdfbb | 3852 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3853 | |
81ecdfbb RW |
3854 | else |
3855 | ac_cv_header_stdc=no | |
783e057b | 3856 | fi |
81ecdfbb RW |
3857 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3858 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3859 | fi |
81ecdfbb | 3860 | |
783e057b DJ |
3861 | fi |
3862 | fi | |
81ecdfbb RW |
3863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3864 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3865 | if test $ac_cv_header_stdc = yes; then |
3866 | ||
81ecdfbb | 3867 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3868 | |
3869 | fi | |
3870 | ||
3871 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3872 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3873 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3874 | do : |
3875 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3876 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3877 | " | |
3878 | eval as_val=\$$as_ac_Header | |
3879 | if test "x$as_val" = x""yes; then : | |
783e057b | 3880 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3881 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3882 | _ACEOF |
3883 | ||
3884 | fi | |
3885 | ||
3886 | done | |
3887 | ||
3888 | ||
3889 | ||
81ecdfbb RW |
3890 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3891 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3892 | MINIX=yes |
3893 | else | |
3894 | MINIX= | |
3895 | fi | |
3896 | ||
3897 | ||
3898 | if test "$MINIX" = yes; then | |
3899 | ||
81ecdfbb | 3900 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3901 | |
3902 | ||
81ecdfbb | 3903 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3904 | |
3905 | ||
81ecdfbb | 3906 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3907 | |
3908 | fi | |
3909 | ||
3910 | ||
81ecdfbb RW |
3911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3912 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3913 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3914 | $as_echo_n "(cached) " >&6 | |
783e057b | 3915 | else |
81ecdfbb | 3916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3917 | /* end confdefs.h. */ |
3918 | ||
c971b7fa PA |
3919 | # define __EXTENSIONS__ 1 |
3920 | $ac_includes_default | |
783e057b DJ |
3921 | int |
3922 | main () | |
3923 | { | |
3924 | ||
3925 | ; | |
3926 | return 0; | |
3927 | } | |
3928 | _ACEOF | |
81ecdfbb | 3929 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3930 | ac_cv_safe_to_define___extensions__=yes |
3931 | else | |
81ecdfbb | 3932 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3933 | fi |
81ecdfbb | 3934 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3935 | fi |
81ecdfbb RW |
3936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3937 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3938 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3939 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3940 | |
81ecdfbb | 3941 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3942 | |
81ecdfbb | 3943 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3944 | |
81ecdfbb | 3945 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3946 | |
81ecdfbb | 3947 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3948 | |
3949 | ||
c971b7fa PA |
3950 | ac_aux_dir= |
3951 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3952 | for ac_t in install-sh install.sh shtool; do | |
3953 | if test -f "$ac_dir/$ac_t"; then | |
3954 | ac_aux_dir=$ac_dir | |
3955 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3956 | break 2 | |
3957 | fi | |
3958 | done | |
3959 | done | |
3960 | if test -z "$ac_aux_dir"; then | |
3961 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3962 | fi | |
770d76d7 | 3963 | |
c971b7fa PA |
3964 | # These three variables are undocumented and unsupported, |
3965 | # and are intended to be withdrawn in a future Autoconf release. | |
3966 | # They can cause serious problems if a builder's source tree is in a directory | |
3967 | # whose full name contains unusual characters. | |
3968 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3969 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3970 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 3971 | |
770d76d7 | 3972 | |
c971b7fa PA |
3973 | # Make sure we can run config.sub. |
3974 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3975 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 3976 | |
c971b7fa PA |
3977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
3978 | $as_echo_n "checking build system type... " >&6; } | |
3979 | if test "${ac_cv_build+set}" = set; then : | |
3980 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 3981 | else |
c971b7fa PA |
3982 | ac_build_alias=$build_alias |
3983 | test "x$ac_build_alias" = x && | |
3984 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3985 | test "x$ac_build_alias" = x && | |
3986 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3987 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3988 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3989 | ||
770d76d7 | 3990 | fi |
c971b7fa PA |
3991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3992 | $as_echo "$ac_cv_build" >&6; } | |
3993 | case $ac_cv_build in | |
3994 | *-*-*) ;; | |
3995 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 3996 | esac |
c971b7fa PA |
3997 | build=$ac_cv_build |
3998 | ac_save_IFS=$IFS; IFS='-' | |
3999 | set x $ac_cv_build | |
4000 | shift | |
4001 | build_cpu=$1 | |
4002 | build_vendor=$2 | |
4003 | shift; shift | |
4004 | # Remember, the first character of IFS is used to create $*, | |
4005 | # except with old shells: | |
4006 | build_os=$* | |
4007 | IFS=$ac_save_IFS | |
4008 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4009 | |
4010 | ||
c971b7fa PA |
4011 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4012 | $as_echo_n "checking host system type... " >&6; } | |
4013 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
4014 | $as_echo_n "(cached) " >&6 |
4015 | else | |
c971b7fa PA |
4016 | if test "x$host_alias" = x; then |
4017 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4018 | else |
c971b7fa PA |
4019 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4020 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 4021 | fi |
81ecdfbb RW |
4022 | |
4023 | fi | |
c971b7fa PA |
4024 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4025 | $as_echo "$ac_cv_host" >&6; } | |
4026 | case $ac_cv_host in | |
4027 | *-*-*) ;; | |
4028 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4029 | esac |
c971b7fa PA |
4030 | host=$ac_cv_host |
4031 | ac_save_IFS=$IFS; IFS='-' | |
4032 | set x $ac_cv_host | |
4033 | shift | |
4034 | host_cpu=$1 | |
4035 | host_vendor=$2 | |
4036 | shift; shift | |
4037 | # Remember, the first character of IFS is used to create $*, | |
4038 | # except with old shells: | |
4039 | host_os=$* | |
4040 | IFS=$ac_save_IFS | |
4041 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4042 | |
4043 | ||
4044 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4045 | $as_echo_n "checking target system type... " >&6; } | |
4046 | if test "${ac_cv_target+set}" = set; then : | |
4047 | $as_echo_n "(cached) " >&6 | |
4048 | else | |
4049 | if test "x$target_alias" = x; then | |
4050 | ac_cv_target=$ac_cv_host | |
4051 | else | |
4052 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4053 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4054 | fi | |
4055 | ||
4056 | fi | |
4057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4058 | $as_echo "$ac_cv_target" >&6; } | |
4059 | case $ac_cv_target in | |
4060 | *-*-*) ;; | |
4061 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4062 | esac | |
4063 | target=$ac_cv_target | |
4064 | ac_save_IFS=$IFS; IFS='-' | |
4065 | set x $ac_cv_target | |
4066 | shift | |
4067 | target_cpu=$1 | |
4068 | target_vendor=$2 | |
4069 | shift; shift | |
4070 | # Remember, the first character of IFS is used to create $*, | |
4071 | # except with old shells: | |
4072 | target_os=$* | |
4073 | IFS=$ac_save_IFS | |
4074 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4075 | ||
4076 | ||
4077 | # The aliases save the names the user supplied, while $host etc. | |
4078 | # will get canonicalized. | |
4079 | test -n "$target_alias" && | |
4080 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4081 | NONENONEs,x,x, && | |
4082 | program_prefix=${target_alias}- | |
4083 | ||
4084 | # The tests for host and target for $enable_largefile require | |
4085 | # canonical names. | |
4086 | ||
4087 | ||
81ecdfbb | 4088 | |
da2f07f1 JK |
4089 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4090 | # even in directories otherwise not depending on the $plugins option. | |
4091 | ||
4092 | ||
2974be62 AM |
4093 | maybe_plugins=no |
4094 | for ac_header in dlfcn.h | |
4095 | do : | |
4096 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4097 | " | |
4098 | if test "x$ac_cv_header_dlfcn_h" = x""yes; then : | |
4099 | cat >>confdefs.h <<_ACEOF | |
4100 | #define HAVE_DLFCN_H 1 | |
4101 | _ACEOF | |
4102 | maybe_plugins=yes | |
4103 | fi | |
4104 | ||
4105 | done | |
4106 | ||
4107 | for ac_header in windows.h | |
4108 | do : | |
4109 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4110 | " | |
4111 | if test "x$ac_cv_header_windows_h" = x""yes; then : | |
4112 | cat >>confdefs.h <<_ACEOF | |
4113 | #define HAVE_WINDOWS_H 1 | |
4114 | _ACEOF | |
4115 | maybe_plugins=yes | |
4116 | fi | |
4117 | ||
4118 | done | |
4119 | ||
4120 | ||
4121 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4122 | if test "${enable_plugins+set}" = set; then : |
4123 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4124 | no) plugins=no ;; |
4125 | *) plugins=yes | |
4126 | if test "$maybe_plugins" != "yes" ; then | |
4127 | as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
4128 | fi ;; | |
4129 | esac | |
da2f07f1 | 4130 | else |
2974be62 AM |
4131 | plugins=$maybe_plugins |
4132 | ||
da2f07f1 JK |
4133 | fi |
4134 | ||
2974be62 AM |
4135 | if test "$plugins" = "yes"; then |
4136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 | |
4137 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
4138 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4139 | $as_echo_n "(cached) " >&6 | |
4140 | else | |
4141 | ac_func_search_save_LIBS=$LIBS | |
4142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4143 | /* end confdefs.h. */ | |
4144 | ||
4145 | /* Override any GCC internal prototype to avoid an error. | |
4146 | Use char because int might match the return type of a GCC | |
4147 | builtin and then its argument prototype would still apply. */ | |
4148 | #ifdef __cplusplus | |
4149 | extern "C" | |
4150 | #endif | |
4151 | char dlopen (); | |
4152 | int | |
4153 | main () | |
4154 | { | |
4155 | return dlopen (); | |
4156 | ; | |
4157 | return 0; | |
4158 | } | |
4159 | _ACEOF | |
4160 | for ac_lib in '' dl; do | |
4161 | if test -z "$ac_lib"; then | |
4162 | ac_res="none required" | |
4163 | else | |
4164 | ac_res=-l$ac_lib | |
4165 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4166 | fi | |
4167 | if ac_fn_c_try_link "$LINENO"; then : | |
4168 | ac_cv_search_dlopen=$ac_res | |
4169 | fi | |
4170 | rm -f core conftest.err conftest.$ac_objext \ | |
4171 | conftest$ac_exeext | |
4172 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4173 | break | |
4174 | fi | |
4175 | done | |
4176 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4177 | ||
4178 | else | |
4179 | ac_cv_search_dlopen=no | |
4180 | fi | |
4181 | rm conftest.$ac_ext | |
4182 | LIBS=$ac_func_search_save_LIBS | |
4183 | fi | |
4184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
4185 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
4186 | ac_res=$ac_cv_search_dlopen | |
4187 | if test "$ac_res" != no; then : | |
4188 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4189 | ||
4190 | fi | |
4191 | ||
4192 | fi | |
da2f07f1 JK |
4193 | |
4194 | ||
4195 | case "${host}" in | |
4196 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4197 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4198 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4199 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4200 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4201 | # large-file support through the --enable-largefile switch, disable | |
4202 | # large-file support in favor of procfs support. | |
4203 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4204 | && : ${enable_largefile="no"} | |
4205 | ;; | |
4206 | esac | |
4207 | ||
4208 | # Check whether --enable-largefile was given. | |
4209 | if test "${enable_largefile+set}" = set; then : | |
4210 | enableval=$enable_largefile; | |
4211 | fi | |
4212 | ||
4213 | if test "$enable_largefile" != no; then | |
4214 | ||
4215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4216 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4217 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4218 | $as_echo_n "(cached) " >&6 | |
4219 | else | |
4220 | ac_cv_sys_largefile_CC=no | |
4221 | if test "$GCC" != yes; then | |
4222 | ac_save_CC=$CC | |
4223 | while :; do | |
4224 | # IRIX 6.2 and later do not support large files by default, | |
4225 | # so use the C compiler's -n32 option if that helps. | |
4226 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4227 | /* end confdefs.h. */ | |
4228 | #include <sys/types.h> | |
4229 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4230 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4231 | since some C++ compilers masquerading as C compilers | |
4232 | incorrectly reject 9223372036854775807. */ | |
4233 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4234 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4235 | && LARGE_OFF_T % 2147483647 == 1) | |
4236 | ? 1 : -1]; | |
4237 | int | |
4238 | main () | |
4239 | { | |
4240 | ||
4241 | ; | |
4242 | return 0; | |
4243 | } | |
4244 | _ACEOF | |
4245 | if ac_fn_c_try_compile "$LINENO"; then : | |
4246 | break | |
4247 | fi | |
4248 | rm -f core conftest.err conftest.$ac_objext | |
4249 | CC="$CC -n32" | |
4250 | if ac_fn_c_try_compile "$LINENO"; then : | |
4251 | ac_cv_sys_largefile_CC=' -n32'; break | |
4252 | fi | |
4253 | rm -f core conftest.err conftest.$ac_objext | |
4254 | break | |
4255 | done | |
4256 | CC=$ac_save_CC | |
4257 | rm -f conftest.$ac_ext | |
4258 | fi | |
4259 | fi | |
4260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4261 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4262 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4263 | CC=$CC$ac_cv_sys_largefile_CC | |
4264 | fi | |
4265 | ||
4266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4267 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4268 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4269 | $as_echo_n "(cached) " >&6 | |
4270 | else | |
4271 | while :; do | |
4272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4273 | /* end confdefs.h. */ | |
4274 | #include <sys/types.h> | |
4275 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4276 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4277 | since some C++ compilers masquerading as C compilers | |
4278 | incorrectly reject 9223372036854775807. */ | |
4279 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4280 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4281 | && LARGE_OFF_T % 2147483647 == 1) | |
4282 | ? 1 : -1]; | |
4283 | int | |
4284 | main () | |
4285 | { | |
4286 | ||
4287 | ; | |
4288 | return 0; | |
4289 | } | |
4290 | _ACEOF | |
4291 | if ac_fn_c_try_compile "$LINENO"; then : | |
4292 | ac_cv_sys_file_offset_bits=no; break | |
4293 | fi | |
4294 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4296 | /* end confdefs.h. */ | |
4297 | #define _FILE_OFFSET_BITS 64 | |
4298 | #include <sys/types.h> | |
4299 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4300 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4301 | since some C++ compilers masquerading as C compilers | |
4302 | incorrectly reject 9223372036854775807. */ | |
4303 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4304 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4305 | && LARGE_OFF_T % 2147483647 == 1) | |
4306 | ? 1 : -1]; | |
4307 | int | |
4308 | main () | |
4309 | { | |
4310 | ||
4311 | ; | |
4312 | return 0; | |
4313 | } | |
4314 | _ACEOF | |
4315 | if ac_fn_c_try_compile "$LINENO"; then : | |
4316 | ac_cv_sys_file_offset_bits=64; break | |
4317 | fi | |
4318 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4319 | ac_cv_sys_file_offset_bits=unknown | |
4320 | break | |
4321 | done | |
4322 | fi | |
4323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4324 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4325 | case $ac_cv_sys_file_offset_bits in #( | |
4326 | no | unknown) ;; | |
4327 | *) | |
4328 | cat >>confdefs.h <<_ACEOF | |
4329 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4330 | _ACEOF | |
4331 | ;; | |
4332 | esac | |
4333 | rm -rf conftest* | |
4334 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4336 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4337 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4338 | $as_echo_n "(cached) " >&6 | |
4339 | else | |
4340 | while :; do | |
4341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4342 | /* end confdefs.h. */ | |
4343 | #include <sys/types.h> | |
4344 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4345 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4346 | since some C++ compilers masquerading as C compilers | |
4347 | incorrectly reject 9223372036854775807. */ | |
4348 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4349 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4350 | && LARGE_OFF_T % 2147483647 == 1) | |
4351 | ? 1 : -1]; | |
4352 | int | |
4353 | main () | |
4354 | { | |
4355 | ||
4356 | ; | |
4357 | return 0; | |
4358 | } | |
4359 | _ACEOF | |
4360 | if ac_fn_c_try_compile "$LINENO"; then : | |
4361 | ac_cv_sys_large_files=no; break | |
4362 | fi | |
4363 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4364 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4365 | /* end confdefs.h. */ | |
4366 | #define _LARGE_FILES 1 | |
4367 | #include <sys/types.h> | |
4368 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4369 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4370 | since some C++ compilers masquerading as C compilers | |
4371 | incorrectly reject 9223372036854775807. */ | |
4372 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4373 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4374 | && LARGE_OFF_T % 2147483647 == 1) | |
4375 | ? 1 : -1]; | |
4376 | int | |
4377 | main () | |
4378 | { | |
4379 | ||
4380 | ; | |
4381 | return 0; | |
4382 | } | |
4383 | _ACEOF | |
4384 | if ac_fn_c_try_compile "$LINENO"; then : | |
4385 | ac_cv_sys_large_files=1; break | |
4386 | fi | |
4387 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4388 | ac_cv_sys_large_files=unknown | |
4389 | break | |
4390 | done | |
4391 | fi | |
4392 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4393 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4394 | case $ac_cv_sys_large_files in #( | |
4395 | no | unknown) ;; | |
4396 | *) | |
4397 | cat >>confdefs.h <<_ACEOF | |
4398 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4399 | _ACEOF | |
4400 | ;; | |
4401 | esac | |
4402 | rm -rf conftest* | |
4403 | fi | |
4404 | fi | |
4405 | ||
4406 | ||
4407 | ||
81ecdfbb RW |
4408 | |
4409 | ||
4410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4411 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4412 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4413 | $as_echo_n "(cached) " >&6 | |
4414 | else | |
4415 | am_cv_prog_cc_stdc=no | |
4416 | ac_save_CC="$CC" | |
4417 | # Don't try gcc -ansi; that turns off useful extensions and | |
4418 | # breaks some systems' header files. | |
4419 | # AIX -qlanglvl=ansi | |
4420 | # Ultrix and OSF/1 -std1 | |
4421 | # HP-UX 10.20 and later -Ae | |
4422 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4423 | # SVR4 -Xc -D__EXTENSIONS__ | |
4424 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4425 | do | |
783e057b | 4426 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4428 | /* end confdefs.h. */ |
4429 | #include <stdarg.h> | |
4430 | #include <stdio.h> | |
4431 | #include <sys/types.h> | |
4432 | #include <sys/stat.h> | |
4433 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4434 | struct buf { int x; }; | |
4435 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4436 | static char *e (p, i) | |
4437 | char **p; | |
4438 | int i; | |
4439 | { | |
4440 | return p[i]; | |
4441 | } | |
4442 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4443 | { | |
4444 | char *s; | |
4445 | va_list v; | |
4446 | va_start (v,p); | |
4447 | s = g (p, va_arg (v,int)); | |
4448 | va_end (v); | |
4449 | return s; | |
4450 | } | |
4451 | int test (int i, double x); | |
4452 | struct s1 {int (*f) (int a);}; | |
4453 | struct s2 {int (*f) (double a);}; | |
4454 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4455 | int argc; | |
4456 | char **argv; | |
4457 | ||
4458 | int | |
4459 | main () | |
4460 | { | |
4461 | ||
4462 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4463 | ||
4464 | ; | |
4465 | return 0; | |
4466 | } | |
4467 | _ACEOF | |
81ecdfbb | 4468 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4469 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4470 | fi |
81ecdfbb | 4471 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4472 | done |
4473 | CC="$ac_save_CC" | |
4474 | ||
4475 | fi | |
4476 | ||
4477 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4479 | $as_echo "none needed" >&6; } | |
783e057b | 4480 | else |
81ecdfbb RW |
4481 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4482 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4483 | fi |
4484 | case "x$am_cv_prog_cc_stdc" in | |
4485 | x|xno) ;; | |
4486 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4487 | esac | |
4488 | ||
4869db5e RM |
4489 | # expand $ac_aux_dir to an absolute path |
4490 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4491 | ||
4492 | if test x"${install_sh}" != xset; then | |
4493 | case $am_aux_dir in | |
4494 | *\ * | *\ *) | |
4495 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4496 | *) | |
4497 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4498 | esac | |
4499 | fi | |
4500 | ||
4501 | # Installed binaries are usually stripped using `strip' when the user | |
4502 | # run `make install-strip'. However `strip' might not be the right | |
4503 | # tool to use in cross-compilation environments, therefore Automake | |
4504 | # will honor the `STRIP' environment variable to overrule this program. | |
4505 | if test "$cross_compiling" != no; then | |
4506 | if test -n "$ac_tool_prefix"; then | |
4507 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4508 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4510 | $as_echo_n "checking for $ac_word... " >&6; } | |
4511 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
4512 | $as_echo_n "(cached) " >&6 | |
4513 | else | |
4514 | if test -n "$STRIP"; then | |
4515 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4516 | else | |
4517 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4518 | for as_dir in $PATH | |
4519 | do | |
4520 | IFS=$as_save_IFS | |
4521 | test -z "$as_dir" && as_dir=. | |
4522 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4523 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4524 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4525 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4526 | break 2 | |
4527 | fi | |
4528 | done | |
4529 | done | |
4530 | IFS=$as_save_IFS | |
4531 | ||
4532 | fi | |
4533 | fi | |
4534 | STRIP=$ac_cv_prog_STRIP | |
4535 | if test -n "$STRIP"; then | |
4536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4537 | $as_echo "$STRIP" >&6; } | |
4538 | else | |
4539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4540 | $as_echo "no" >&6; } | |
4541 | fi | |
4542 | ||
4543 | ||
4544 | fi | |
4545 | if test -z "$ac_cv_prog_STRIP"; then | |
4546 | ac_ct_STRIP=$STRIP | |
4547 | # Extract the first word of "strip", so it can be a program name with args. | |
4548 | set dummy strip; ac_word=$2 | |
4549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4550 | $as_echo_n "checking for $ac_word... " >&6; } | |
4551 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
4552 | $as_echo_n "(cached) " >&6 | |
4553 | else | |
4554 | if test -n "$ac_ct_STRIP"; then | |
4555 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4556 | else | |
4557 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4558 | for as_dir in $PATH | |
4559 | do | |
4560 | IFS=$as_save_IFS | |
4561 | test -z "$as_dir" && as_dir=. | |
4562 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4563 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4564 | ac_cv_prog_ac_ct_STRIP="strip" | |
4565 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4566 | break 2 | |
4567 | fi | |
4568 | done | |
4569 | done | |
4570 | IFS=$as_save_IFS | |
4571 | ||
4572 | fi | |
4573 | fi | |
4574 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4575 | if test -n "$ac_ct_STRIP"; then | |
4576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4577 | $as_echo "$ac_ct_STRIP" >&6; } | |
4578 | else | |
4579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4580 | $as_echo "no" >&6; } | |
4581 | fi | |
4582 | ||
4583 | if test "x$ac_ct_STRIP" = x; then | |
4584 | STRIP=":" | |
4585 | else | |
4586 | case $cross_compiling:$ac_tool_warned in | |
4587 | yes:) | |
4588 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4589 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4590 | ac_tool_warned=yes ;; | |
4591 | esac | |
4592 | STRIP=$ac_ct_STRIP | |
4593 | fi | |
4594 | else | |
4595 | STRIP="$ac_cv_prog_STRIP" | |
4596 | fi | |
4597 | ||
4598 | fi | |
4599 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4600 | ||
783e057b DJ |
4601 | |
4602 | ac_aux_dir= | |
81ecdfbb RW |
4603 | for ac_dir in .. "$srcdir"/..; do |
4604 | for ac_t in install-sh install.sh shtool; do | |
4605 | if test -f "$ac_dir/$ac_t"; then | |
4606 | ac_aux_dir=$ac_dir | |
4607 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4608 | break 2 | |
4609 | fi | |
4610 | done | |
783e057b DJ |
4611 | done |
4612 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4613 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4614 | fi |
81ecdfbb RW |
4615 | |
4616 | # These three variables are undocumented and unsupported, | |
4617 | # and are intended to be withdrawn in a future Autoconf release. | |
4618 | # They can cause serious problems if a builder's source tree is in a directory | |
4619 | # whose full name contains unusual characters. | |
4620 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4621 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4622 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4623 | ||
783e057b | 4624 | |
783e057b | 4625 | |
9009e1ae MR |
4626 | test "$program_prefix" != NONE && |
4627 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4628 | # Use a double $ so make ignores it. | |
4629 | test "$program_suffix" != NONE && | |
4630 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4631 | # Double any \ or $. | |
4632 | # By default was `s,x,x', remove it if useless. | |
4633 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4634 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4635 | ||
81ecdfbb | 4636 | |
a417dc56 RW |
4637 | # Dependency checking. |
4638 | rm -rf .tst 2>/dev/null | |
4639 | mkdir .tst 2>/dev/null | |
4640 | if test -d .tst; then | |
4641 | am__leading_dot=. | |
4642 | else | |
4643 | am__leading_dot=_ | |
4644 | fi | |
4645 | rmdir .tst 2>/dev/null | |
4646 | ||
4647 | DEPDIR="${am__leading_dot}deps" | |
4648 | ||
81ecdfbb | 4649 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4650 | |
4651 | ||
4652 | depcc="$CC" am_compiler_list= | |
4653 | ||
4654 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4656 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4657 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4658 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4659 | else |
4660 | if test -f "$am_depcomp"; then | |
4661 | # We make a subdir and do the tests there. Otherwise we can end up | |
4662 | # making bogus files that we don't know about and never remove. For | |
4663 | # instance it was reported that on HP-UX the gcc test will end up | |
4664 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4665 | # in D'. | |
4666 | mkdir conftest.dir | |
4667 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4668 | # using a relative directory. | |
4669 | cp "$am_depcomp" conftest.dir | |
4670 | cd conftest.dir | |
4671 | # We will build objects and dependencies in a subdirectory because | |
4672 | # it helps to detect inapplicable dependency modes. For instance | |
4673 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4674 | # side effect of compilation, but ICC will put the dependencies in | |
4675 | # the current directory while Tru64 will put them in the object | |
4676 | # directory. | |
4677 | mkdir sub | |
4678 | ||
4679 | am_cv_CC_dependencies_compiler_type=none | |
4680 | if test "$am_compiler_list" = ""; then | |
4681 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4682 | fi | |
4683 | for depmode in $am_compiler_list; do | |
4684 | if test $depmode = none; then break; fi | |
4685 | ||
81ecdfbb | 4686 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4687 | # Setup a source with many dependencies, because some compilers |
4688 | # like to wrap large dependency lists on column 80 (with \), and | |
4689 | # we should not choose a depcomp mode which is confused by this. | |
4690 | # | |
4691 | # We need to recreate these files for each test, as the compiler may | |
4692 | # overwrite some of them when testing with obscure command lines. | |
4693 | # This happens at least with the AIX C compiler. | |
4694 | : > sub/conftest.c | |
4695 | for i in 1 2 3 4 5 6; do | |
4696 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4697 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4698 | # Solaris 8's {/usr,}/bin/sh. | |
4699 | touch sub/conftst$i.h | |
4700 | done | |
4701 | echo "include sub/conftest.Po" > confmf | |
4702 | ||
4703 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4704 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4705 | # handle `-M -o', and we need to detect this. | |
4706 | depcmd="depmode=$depmode \ | |
4707 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4708 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4709 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4710 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4711 | if env $depcmd > conftest.err 2>&1 && | |
4712 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4713 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4714 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4715 | # icc doesn't choke on unknown options, it will just issue warnings | |
4716 | # or remarks (even with -Werror). So we grep stderr for any message | |
4717 | # that says an option was ignored or not supported. | |
4718 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4719 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4720 | # The diagnosis changed in icc 8.0: | |
4721 | # icc: Command line remark: option '-MP' not supported | |
4722 | if (grep 'ignoring option' conftest.err || | |
4723 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4724 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4725 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4726 | break |
4727 | fi | |
4728 | fi | |
81ecdfbb | 4729 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4730 | sed -e 's/^/| /' < conftest.err >&5 |
4731 | done | |
4732 | ||
4733 | cd .. | |
4734 | rm -rf conftest.dir | |
4735 | else | |
4736 | am_cv_CC_dependencies_compiler_type=none | |
4737 | fi | |
4738 | ||
4739 | fi | |
81ecdfbb RW |
4740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4741 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4742 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4743 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4744 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4745 | ||
4746 | fi | |
4747 | ||
4748 | ||
4749 | # Check for the 'make' the user wants to use. | |
4750 | for ac_prog in make | |
4751 | do | |
4752 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4753 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4755 | $as_echo_n "checking for $ac_word... " >&6; } | |
4756 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4757 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4758 | else |
4759 | if test -n "$MAKE"; then | |
4760 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4761 | else | |
4762 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4763 | for as_dir in $PATH | |
4764 | do | |
4765 | IFS=$as_save_IFS | |
4766 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4767 | for ac_exec_ext in '' $ac_executable_extensions; do |
4768 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4769 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4770 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4771 | break 2 |
4772 | fi | |
4773 | done | |
81ecdfbb RW |
4774 | done |
4775 | IFS=$as_save_IFS | |
a417dc56 RW |
4776 | |
4777 | fi | |
4778 | fi | |
4779 | MAKE=$ac_cv_prog_MAKE | |
4780 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4782 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4783 | else |
81ecdfbb RW |
4784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4785 | $as_echo "no" >&6; } | |
a417dc56 RW |
4786 | fi |
4787 | ||
81ecdfbb | 4788 | |
a417dc56 RW |
4789 | test -n "$MAKE" && break |
4790 | done | |
4791 | ||
4792 | MAKE_IS_GNU= | |
4793 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4794 | *GNU*) | |
4795 | MAKE_IS_GNU=yes | |
4796 | ;; | |
4797 | esac | |
81ecdfbb | 4798 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4799 | GMAKE_TRUE= |
4800 | GMAKE_FALSE='#' | |
4801 | else | |
4802 | GMAKE_TRUE='#' | |
4803 | GMAKE_FALSE= | |
4804 | fi | |
4805 | ||
81ecdfbb RW |
4806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4807 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4808 | set x ${MAKE-make} | |
4809 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4810 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4811 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4812 | else |
4813 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4814 | SHELL = /bin/sh |
a417dc56 | 4815 | all: |
81ecdfbb | 4816 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4817 | _ACEOF |
4818 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4819 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4820 | *@@@%%%=?*=@@@%%%*) | |
4821 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4822 | *) | |
4823 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4824 | esac | |
a417dc56 RW |
4825 | rm -f conftest.make |
4826 | fi | |
81ecdfbb RW |
4827 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4829 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4830 | SET_MAKE= |
4831 | else | |
81ecdfbb RW |
4832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4833 | $as_echo "no" >&6; } | |
a417dc56 RW |
4834 | SET_MAKE="MAKE=${MAKE-make}" |
4835 | fi | |
4836 | ||
4837 | ||
c971b7fa PA |
4838 | # Configure gnulib. We need to build gnulib under some other |
4839 | # directory not "gnulib", to avoid the problem of both GDB and | |
4840 | # GDBserver wanting to build it in the same directory, when building | |
4841 | # in the source dir. | |
783e057b | 4842 | |
c971b7fa PA |
4843 | in_src="gnulib" |
4844 | in_build="build-gnulib" | |
4845 | ||
4846 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
4847 | # so they do not pile up. | |
4848 | ac_sub_configure_args= | |
4849 | ac_prev= | |
4850 | eval "set x $ac_configure_args" | |
4851 | shift | |
4852 | for ac_arg | |
4853 | do | |
4854 | if test -n "$ac_prev"; then | |
4855 | ac_prev= | |
4856 | continue | |
4857 | fi | |
4858 | case $ac_arg in | |
4859 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
4860 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
4861 | ac_prev=cache_file ;; | |
4862 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
4863 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
4864 | | --c=*) | |
4865 | ;; | |
4866 | --config-cache | -C) | |
4867 | ;; | |
4868 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
4869 | ac_prev=srcdir ;; | |
4870 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
4871 | ;; | |
4872 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
4873 | ac_prev=prefix ;; | |
4874 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
4875 | ;; | |
4876 | --disable-option-checking) | |
4877 | ;; | |
4878 | *) | |
4879 | case $ac_arg in | |
4880 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4881 | esac | |
4882 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
4883 | esac | |
4884 | done | |
4885 | ||
4886 | # Always prepend --prefix to ensure using the same prefix | |
4887 | # in subdir configurations. | |
4888 | ac_arg="--prefix=$prefix" | |
4889 | case $ac_arg in | |
4890 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4891 | esac | |
4892 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
4893 | ||
4894 | # Pass --silent | |
4895 | if test "$silent" = yes; then | |
4896 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
4897 | fi | |
4898 | ||
4899 | # Always prepend --disable-option-checking to silence warnings, since | |
4900 | # different subdirs can have different --enable and --with options. | |
4901 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
4902 | ||
4903 | ac_popdir=`pwd` | |
4904 | ac_dir=$in_build | |
4905 | ||
4906 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
4907 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
4908 | $as_echo "$ac_msg" >&6 | |
4909 | as_dir="$ac_dir"; as_fn_mkdir_p | |
4910 | ||
38ea300a PA |
4911 | case $srcdir in |
4912 | [\\/]* | ?:[\\/]* ) | |
4913 | ac_srcdir=$srcdir/$in_src ;; | |
4914 | *) # Relative name. | |
4915 | ac_srcdir=../$srcdir/$in_src ;; | |
4916 | esac | |
c971b7fa PA |
4917 | |
4918 | cd "$ac_dir" | |
4919 | ||
4920 | ac_sub_configure=$ac_srcdir/configure | |
4921 | ||
4922 | # Make the cache file name correct relative to the subdirectory. | |
4923 | case $cache_file in | |
4924 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
4925 | *) # Relative name. | |
4926 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
4927 | esac | |
4928 | ||
4929 | { $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 | |
4930 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
4931 | # The eval makes quoting arguments work. | |
4932 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
4933 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
4934 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
4935 | ||
4936 | cd "$ac_popdir" | |
783e057b | 4937 | |
c971b7fa PA |
4938 | |
4939 | ||
4940 | CONFIG_OBS= | |
4941 | CONFIG_DEPS= | |
4942 | CONFIG_SRCS= | |
4943 | ENABLE_CFLAGS= | |
4944 | ||
4945 | CONFIG_ALL= | |
4946 | CONFIG_CLEAN= | |
4947 | CONFIG_INSTALL= | |
4948 | CONFIG_UNINSTALL= | |
4949 | ||
4950 | # If we haven't got the data from the intl directory, | |
4951 | # assume NLS is disabled. | |
4952 | USE_NLS=no | |
4953 | LIBINTL= | |
4954 | LIBINTL_DEP= | |
4955 | INCINTL= | |
4956 | XGETTEXT= | |
4957 | GMSGFMT= | |
4958 | POSUB= | |
783e057b DJ |
4959 | |
4960 | if test -f ../intl/config.intl; then | |
4961 | . ../intl/config.intl | |
4962 | fi | |
81ecdfbb RW |
4963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4964 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4965 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4967 | $as_echo "no" >&6; } | |
783e057b | 4968 | else |
81ecdfbb RW |
4969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4970 | $as_echo "yes" >&6; } | |
783e057b | 4971 | |
81ecdfbb | 4972 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4973 | |
4974 | ||
81ecdfbb RW |
4975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4976 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4977 | # Look for .po and .gmo files in the source directory. |
4978 | CATALOGS= | |
4979 | XLINGUAS= | |
4980 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4981 | # If there aren't any .gmo files the shell will give us the | |
4982 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4983 | # weeded out. | |
4984 | case "$cat" in *\**) | |
4985 | continue;; | |
4986 | esac | |
4987 | # The quadruple backslash is collapsed to a double backslash | |
4988 | # by the backticks, then collapsed again by the double quotes, | |
4989 | # leaving us with one backslash in the sed expression (right | |
4990 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
4991 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
4992 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4993 | # The user is allowed to set LINGUAS to a list of languages to | |
4994 | # install catalogs for. If it's empty that means "all of them." | |
4995 | if test "x$LINGUAS" = x; then | |
4996 | CATALOGS="$CATALOGS $cat" | |
4997 | XLINGUAS="$XLINGUAS $lang" | |
4998 | else | |
4999 | case "$LINGUAS" in *$lang*) | |
5000 | CATALOGS="$CATALOGS $cat" | |
5001 | XLINGUAS="$XLINGUAS $lang" | |
5002 | ;; | |
5003 | esac | |
e28b3332 DJ |
5004 | fi |
5005 | done | |
c971b7fa PA |
5006 | LINGUAS="$XLINGUAS" |
5007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
5008 | $as_echo "$LINGUAS" >&6; } | |
5009 | ||
5010 | ||
5011 | DATADIRNAME=share | |
5012 | ||
5013 | INSTOBJEXT=.mo | |
5014 | ||
5015 | GENCAT=gencat | |
5016 | ||
5017 | CATOBJEXT=.gmo | |
e28b3332 | 5018 | |
e28b3332 DJ |
5019 | fi |
5020 | ||
c971b7fa PA |
5021 | localedir='${datadir}/locale' |
5022 | ||
5023 | ||
5024 | if test x"$USE_NLS" = xyes; then | |
5025 | CONFIG_ALL="$CONFIG_ALL all-po" | |
5026 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
5027 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
5028 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 5029 | fi |
e28b3332 | 5030 | |
c971b7fa PA |
5031 | GNULIB=build-gnulib/import |
5032 | ||
5033 | # For Makefile dependencies. | |
5034 | GNULIB_STDINT_H= | |
5035 | if test x"$STDINT_H" != x; then | |
5036 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
5037 | fi |
5038 | ||
5039 | ||
c971b7fa PA |
5040 | PACKAGE=gdb |
5041 | ||
5042 | cat >>confdefs.h <<_ACEOF | |
5043 | #define PACKAGE "$PACKAGE" | |
5044 | _ACEOF | |
5045 | ||
5046 | ||
5047 | ||
5048 | # We never need to detect it in this sub-configure. | |
5049 | # But preserve it for config.status --recheck. | |
5050 | ||
5051 | ||
5052 | ||
5053 | MAKEINFO_EXTRA_FLAGS="" | |
5054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
5055 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
5056 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
5057 | $as_echo_n "(cached) " >&6 | |
5058 | else | |
5059 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
5060 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
5061 | gdb_cv_have_makeinfo_click=yes | |
5062 | else | |
5063 | gdb_cv_have_makeinfo_click=no | |
5064 | fi | |
5065 | fi | |
5066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
5067 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
5068 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
5069 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
5070 | fi | |
e28b3332 DJ |
5071 | |
5072 | ||
bec39cab AC |
5073 | |
5074 | ||
81ecdfbb RW |
5075 | # Check whether --with-separate-debug-dir was given. |
5076 | if test "${with_separate_debug_dir+set}" = set; then : | |
5077 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
5078 | DEBUGDIR=$withval |
5079 | else | |
5080 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
5081 | fi |
5082 | ||
20e95c23 | 5083 | |
783e057b DJ |
5084 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
5085 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 5086 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 5087 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 5088 | |
783e057b DJ |
5089 | cat >>confdefs.h <<_ACEOF |
5090 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 5091 | _ACEOF |
20e95c23 | 5092 | |
20e95c23 | 5093 | |
20e95c23 | 5094 | |
0c4a4063 | 5095 | |
b14b1491 TT |
5096 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5097 | if test "x$prefix" = xNONE; then | |
5098 | test_prefix=/usr/local | |
5099 | else | |
5100 | test_prefix=$prefix | |
5101 | fi | |
783e057b | 5102 | else |
b14b1491 | 5103 | test_prefix=$exec_prefix |
783e057b | 5104 | fi |
b14b1491 TT |
5105 | value=0 |
5106 | case ${ac_define_dir} in | |
5107 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5108 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5109 | value=1 | |
5110 | ;; | |
5111 | esac | |
5112 | ||
5113 | cat >>confdefs.h <<_ACEOF | |
5114 | #define DEBUGDIR_RELOCATABLE $value | |
5115 | _ACEOF | |
5116 | ||
5117 | ||
5118 | ||
0c4a4063 | 5119 | |
f83d8a90 DE |
5120 | # We can't pass paths as command line arguments. |
5121 | # Mingw32 tries to be clever and will convert the paths for us. | |
5122 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
5123 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
5124 | # This breaks GDB's relocatable path conversions since paths passed in | |
5125 | # config.h would not get so translated, the path prefixes no longer match. | |
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 $bindir` | |
5130 | ac_define_dir=`eval echo $ac_define_dir` | |
5131 | ||
5132 | cat >>confdefs.h <<_ACEOF | |
5133 | #define BINDIR "$ac_define_dir" | |
5134 | _ACEOF | |
5135 | ||
5136 | ||
5137 | ||
b14b1491 TT |
5138 | # GDB's datadir relocation |
5139 | ||
5140 | ||
5141 | ||
81ecdfbb RW |
5142 | # Check whether --with-gdb-datadir was given. |
5143 | if test "${with_gdb_datadir+set}" = set; then : | |
5144 | withval=$with_gdb_datadir; | |
b14b1491 | 5145 | GDB_DATADIR=$withval |
20e95c23 | 5146 | else |
b14b1491 | 5147 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
5148 | fi |
5149 | ||
20e95c23 | 5150 | |
b14b1491 TT |
5151 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
5152 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5153 | ac_define_dir=`eval echo $GDB_DATADIR` | |
5154 | ac_define_dir=`eval echo $ac_define_dir` | |
5155 | ||
5156 | cat >>confdefs.h <<_ACEOF | |
5157 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
5158 | _ACEOF |
5159 | ||
b14b1491 TT |
5160 | |
5161 | ||
0c4a4063 | 5162 | |
b14b1491 TT |
5163 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5164 | if test "x$prefix" = xNONE; then | |
5165 | test_prefix=/usr/local | |
5166 | else | |
5167 | test_prefix=$prefix | |
5168 | fi | |
5169 | else | |
5170 | test_prefix=$exec_prefix | |
5171 | fi | |
5172 | value=0 | |
5173 | case ${ac_define_dir} in | |
5174 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5175 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5176 | value=1 | |
5177 | ;; | |
5178 | esac | |
5179 | ||
5180 | cat >>confdefs.h <<_ACEOF | |
5181 | #define GDB_DATADIR_RELOCATABLE $value | |
5182 | _ACEOF | |
5183 | ||
5184 | ||
783e057b | 5185 | |
20e95c23 | 5186 | |
0c4a4063 | 5187 | |
81ecdfbb RW |
5188 | # Check whether --with-relocated-sources was given. |
5189 | if test "${with_relocated_sources+set}" = set; then : | |
5190 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
5191 | |
5192 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5193 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5194 | ac_define_dir=`eval echo $reloc_srcdir` | |
5195 | ac_define_dir=`eval echo $ac_define_dir` | |
5196 | ||
5197 | cat >>confdefs.h <<_ACEOF | |
5198 | #define RELOC_SRCDIR "$ac_define_dir" | |
5199 | _ACEOF | |
5200 | ||
5201 | ||
5202 | ||
81ecdfbb RW |
5203 | fi |
5204 | ||
29b0e8a2 | 5205 | |
7349ff92 JK |
5206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
5207 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
5208 | ||
5209 | # Check whether --with-auto-load-dir was given. | |
5210 | if test "${with_auto_load_dir+set}" = set; then : | |
5211 | withval=$with_auto_load_dir; | |
5212 | else | |
1564a261 | 5213 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
5214 | fi |
5215 | ||
1564a261 | 5216 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
5217 | |
5218 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5219 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5220 | ac_define_dir=`eval echo $escape_dir` | |
5221 | ac_define_dir=`eval echo $ac_define_dir` | |
5222 | ||
5223 | cat >>confdefs.h <<_ACEOF | |
5224 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
5225 | _ACEOF | |
5226 | ||
5227 | ||
5228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
5229 | $as_echo "$with_auto_load_dir" >&6; } | |
5230 | ||
bccbefd2 JK |
5231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
5232 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
5233 | ||
5234 | # Check whether --with-auto-load-safe-path was given. | |
5235 | if test "${with_auto_load_safe_path+set}" = set; then : | |
5236 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
5237 | with_auto_load_safe_path="/" |
5238 | fi | |
bccbefd2 | 5239 | else |
7349ff92 | 5240 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5241 | fi |
5242 | ||
1564a261 | 5243 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5244 | |
5245 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5246 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5247 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5248 | ac_define_dir=`eval echo $ac_define_dir` |
5249 | ||
5250 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5251 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5252 | _ACEOF |
5253 | ||
5254 | ||
5255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5256 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5257 | ||
29b0e8a2 | 5258 | |
20e95c23 | 5259 | |
5ae98d25 | 5260 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5261 | |
5262 | ||
783e057b | 5263 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5264 | # Check whether --enable-targets was given. |
5265 | if test "${enable_targets+set}" = set; then : | |
5266 | enableval=$enable_targets; case "${enableval}" in | |
5267 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5268 | ;; |
5269 | no) enable_targets= ;; | |
5270 | *) enable_targets=$enableval ;; | |
5271 | esac | |
81ecdfbb RW |
5272 | fi |
5273 | ||
20e95c23 | 5274 | |
783e057b | 5275 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5276 | # Check whether --enable-64-bit-bfd was given. |
5277 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5278 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5279 | yes) want64=true ;; |
5280 | no) want64=false ;; | |
81ecdfbb | 5281 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5282 | esac |
5283 | else | |
5284 | want64=false | |
81ecdfbb RW |
5285 | fi |
5286 | ||
783e057b DJ |
5287 | # Provide defaults for some variables set by the per-host and per-target |
5288 | # configuration. | |
5289 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5290 | |
783e057b DJ |
5291 | if test "${target}" = "${host}"; then |
5292 | gdb_native=yes | |
5293 | else | |
5294 | gdb_native=no | |
5295 | fi | |
20e95c23 | 5296 | |
783e057b | 5297 | . $srcdir/configure.host |
20e95c23 | 5298 | |
783e057b | 5299 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5300 | |
783e057b DJ |
5301 | TARGET_OBS= |
5302 | all_targets= | |
b292c783 | 5303 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 5304 | |
783e057b | 5305 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5306 | do |
783e057b DJ |
5307 | if test "$targ_alias" = "all"; then |
5308 | all_targets=true | |
5309 | else | |
5310 | # Canonicalize the secondary target names. | |
5311 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5312 | if test -n "$result"; then | |
5313 | targ=$result | |
5314 | else | |
5315 | targ=$targ_alias | |
5316 | fi | |
20e95c23 | 5317 | |
783e057b | 5318 | . ${srcdir}/configure.tgt |
20e95c23 | 5319 | |
bf307134 JB |
5320 | if test -z "${gdb_target_obs}"; then : |
5321 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5322 | fi | |
5323 | ||
783e057b DJ |
5324 | # Target-specific object files |
5325 | for i in ${gdb_target_obs}; do | |
5326 | case " $TARGET_OBS " in | |
5327 | *" ${i} "*) ;; | |
5328 | *) | |
5329 | TARGET_OBS="$TARGET_OBS ${i}" | |
5330 | ;; | |
5331 | esac | |
5332 | done | |
20e95c23 | 5333 | |
783e057b DJ |
5334 | # Check whether this target needs 64-bit CORE_ADDR |
5335 | if test x${want64} = xfalse; then | |
5336 | . ${srcdir}/../bfd/config.bfd | |
5337 | fi | |
b292c783 JK |
5338 | |
5339 | # Check whether this target is native and supports gcore. | |
5340 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
5341 | && $gdb_have_gcore; then | |
5342 | HAVE_NATIVE_GCORE_TARGET=1 | |
5343 | fi | |
783e057b | 5344 | fi |
20e95c23 DJ |
5345 | done |
5346 | ||
783e057b DJ |
5347 | if test x${all_targets} = xtrue; then |
5348 | ||
5349 | # We want all 64-bit targets if we either: | |
5350 | # - run on a 64-bit host or | |
5351 | # - already require 64-bit support for some other target or | |
5352 | # - the --enable-64-bit-bfd option was supplied | |
5353 | # Otherwise we only support all 32-bit targets. | |
5354 | # | |
5355 | # NOTE: This test must be in sync with the corresponding | |
5356 | # tests in BFD! | |
20e95c23 | 5357 | |
783e057b | 5358 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5359 | # The cast to long int works around a bug in the HP C Compiler |
5360 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5361 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5362 | # This bug is HP SR number 8606223364. | |
5363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5364 | $as_echo_n "checking size of long... " >&6; } | |
5365 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5366 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5367 | else |
81ecdfbb | 5368 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5369 | |
81ecdfbb RW |
5370 | else |
5371 | if test "$ac_cv_type_long" = yes; then | |
5372 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5373 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5374 | { as_fn_set_status 77 | |
5375 | as_fn_error "cannot compute sizeof (long) | |
5376 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5377 | else | |
5378 | ac_cv_sizeof_long=0 | |
5379 | fi | |
c0993dbe | 5380 | fi |
81ecdfbb | 5381 | |
c0993dbe | 5382 | fi |
81ecdfbb RW |
5383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5384 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5385 | |
c0993dbe | 5386 | |
c0993dbe | 5387 | |
c0993dbe UW |
5388 | cat >>confdefs.h <<_ACEOF |
5389 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5390 | _ACEOF | |
5391 | ||
5392 | ||
5393 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5394 | want64=true | |
5395 | fi | |
5396 | fi | |
5397 | if test x${want64} = xtrue; then | |
5398 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5399 | else | |
5400 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5401 | fi | |
5402 | fi | |
5403 | ||
5404 | ||
5405 | ||
b292c783 | 5406 | |
c0993dbe UW |
5407 | # For other settings, only the main target counts. |
5408 | gdb_sim= | |
5409 | gdb_osabi= | |
5410 | build_gdbserver= | |
5411 | targ=$target; . ${srcdir}/configure.tgt | |
5412 | ||
5413 | # Fetch the default architecture and default target vector from BFD. | |
5414 | targ=$target; . $srcdir/../bfd/config.bfd | |
5415 | ||
5416 | # We only want the first architecture, so strip off the others if | |
5417 | # there is more than one. | |
5418 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5419 | ||
5420 | if test "x$targ_archs" != x; then | |
5421 | ||
5422 | cat >>confdefs.h <<_ACEOF | |
5423 | #define DEFAULT_BFD_ARCH $targ_archs | |
5424 | _ACEOF | |
5425 | ||
5426 | fi | |
5427 | if test "x$targ_defvec" != x; then | |
5428 | ||
5429 | cat >>confdefs.h <<_ACEOF | |
5430 | #define DEFAULT_BFD_VEC $targ_defvec | |
5431 | _ACEOF | |
5432 | ||
5433 | fi | |
5434 | ||
c0993dbe UW |
5435 | # The CLI cannot be disabled yet, but may be in the future. |
5436 | ||
5437 | # Enable CLI. | |
81ecdfbb RW |
5438 | # Check whether --enable-gdbcli was given. |
5439 | if test "${enable_gdbcli+set}" = set; then : | |
5440 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5441 | yes) |
5442 | ;; | |
5443 | no) | |
81ecdfbb | 5444 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5445 | *) |
81ecdfbb | 5446 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5447 | esac |
5448 | else | |
5449 | enable_gdbcli=yes | |
81ecdfbb RW |
5450 | fi |
5451 | ||
c0993dbe UW |
5452 | if test x"$enable_gdbcli" = xyes; then |
5453 | if test -d $srcdir/cli; then | |
5454 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5455 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5456 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5457 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5458 | fi | |
5459 | fi | |
5460 | ||
5461 | # Enable MI. | |
81ecdfbb RW |
5462 | # Check whether --enable-gdbmi was given. |
5463 | if test "${enable_gdbmi+set}" = set; then : | |
5464 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5465 | yes | no) |
5466 | ;; | |
5467 | *) | |
81ecdfbb | 5468 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5469 | esac |
5470 | else | |
5471 | enable_gdbmi=yes | |
81ecdfbb RW |
5472 | fi |
5473 | ||
c0993dbe UW |
5474 | if test x"$enable_gdbmi" = xyes; then |
5475 | if test -d $srcdir/mi; then | |
5476 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5477 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5478 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5479 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5480 | fi | |
5481 | fi | |
5482 | ||
5483 | # Enable TUI. | |
81ecdfbb RW |
5484 | # Check whether --enable-tui was given. |
5485 | if test "${enable_tui+set}" = set; then : | |
5486 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5487 | yes | no | auto) |
c0993dbe UW |
5488 | ;; |
5489 | *) | |
81ecdfbb | 5490 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5491 | esac |
5492 | else | |
3ca64bd3 | 5493 | enable_tui=auto |
81ecdfbb RW |
5494 | fi |
5495 | ||
c0993dbe UW |
5496 | |
5497 | # Enable gdbtk. | |
81ecdfbb RW |
5498 | # Check whether --enable-gdbtk was given. |
5499 | if test "${enable_gdbtk+set}" = set; then : | |
5500 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5501 | yes | no) |
5502 | ;; | |
5503 | *) | |
81ecdfbb | 5504 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5505 | esac |
5506 | else | |
5062cc19 | 5507 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5508 | enable_gdbtk=yes |
5509 | else | |
5510 | enable_gdbtk=no | |
5511 | fi | |
81ecdfbb RW |
5512 | fi |
5513 | ||
c0993dbe UW |
5514 | # We unconditionally disable gdbtk tests on selected platforms. |
5515 | case $host_os in | |
5516 | go32* | windows*) | |
81ecdfbb RW |
5517 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5518 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5519 | enable_gdbtk=no ;; |
5520 | esac | |
5521 | ||
05e7c244 | 5522 | # Libunwind support for ia64. |
bec39cab | 5523 | |
05e7c244 JK |
5524 | |
5525 | # Check whether --with-libunwind-ia64 was given. | |
5526 | if test "${with_libunwind_ia64+set}" = set; then : | |
5527 | withval=$with_libunwind_ia64; | |
bec39cab | 5528 | else |
05e7c244 JK |
5529 | with_libunwind_ia64=auto |
5530 | fi | |
bec39cab | 5531 | |
05e7c244 JK |
5532 | |
5533 | # Backward compatibility option. | |
5534 | if test "${with_libunwind+set}" = set; then | |
5535 | if test x"$with_libunwind_ia64" != xauto; then | |
5536 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5537 | fi | |
5538 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5539 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5540 | with_libunwind_ia64="$with_libunwind" | |
5541 | fi | |
5542 | ||
5543 | case "$with_libunwind_ia64" in | |
5544 | yes | no) | |
5545 | ;; | |
5546 | auto) | |
5547 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5548 | do : |
b54a8fd7 PA |
5549 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5550 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5551 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5552 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5553 | _ACEOF |
5554 | ||
5555 | fi | |
5556 | ||
5557 | done | |
5558 | ||
05e7c244 JK |
5559 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5560 | ;; | |
5561 | *) | |
5562 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5563 | ;; | |
5564 | esac | |
bec39cab | 5565 | |
05e7c244 | 5566 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5567 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5568 | do : |
b54a8fd7 PA |
5569 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5570 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5571 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5572 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5573 | _ACEOF |
5574 | ||
5575 | fi | |
5576 | ||
5577 | done | |
5578 | ||
05e7c244 JK |
5579 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5580 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5581 | fi | |
5582 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5583 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5584 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5585 | fi |
5586 | ||
cb01cfba JB |
5587 | opt_curses=no |
5588 | ||
81ecdfbb RW |
5589 | # Check whether --with-curses was given. |
5590 | if test "${with_curses+set}" = set; then : | |
5591 | withval=$with_curses; opt_curses=$withval | |
5592 | fi | |
5593 | ||
cb01cfba | 5594 | |
76a39ba7 | 5595 | prefer_curses=no |
cb01cfba | 5596 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5597 | prefer_curses=yes |
cb01cfba JB |
5598 | fi |
5599 | ||
a9322a30 | 5600 | # Profiling support. |
81ecdfbb RW |
5601 | # Check whether --enable-profiling was given. |
5602 | if test "${enable_profiling+set}" = set; then : | |
5603 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5604 | yes | no) |
5605 | ;; | |
5606 | *) | |
81ecdfbb | 5607 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5608 | esac |
5609 | else | |
5610 | enable_profiling=no | |
81ecdfbb | 5611 | fi |
bec39cab | 5612 | |
a9322a30 TT |
5613 | |
5614 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5615 | do : |
5616 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5617 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5618 | eval as_val=\$$as_ac_var | |
5619 | if test "x$as_val" = x""yes; then : | |
5620 | cat >>confdefs.h <<_ACEOF | |
5621 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5622 | _ACEOF |
a9322a30 | 5623 | |
81ecdfbb RW |
5624 | fi |
5625 | done | |
a9322a30 | 5626 | |
81ecdfbb RW |
5627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5628 | $as_echo_n "checking for _etext... " >&6; } | |
5629 | if test "${ac_cv_var__etext+set}" = set; then : | |
5630 | $as_echo_n "(cached) " >&6 | |
5631 | else | |
5632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5633 | /* end confdefs.h. */ | |
5634 | #include <stdlib.h> | |
5635 | extern char _etext; | |
a9322a30 TT |
5636 | |
5637 | int | |
5638 | main () | |
5639 | { | |
5640 | free (&_etext); | |
5641 | ; | |
5642 | return 0; | |
5643 | } | |
bec39cab | 5644 | _ACEOF |
81ecdfbb | 5645 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5646 | ac_cv_var__etext=yes |
bec39cab | 5647 | else |
81ecdfbb | 5648 | ac_cv_var__etext=no |
bec39cab | 5649 | fi |
81ecdfbb RW |
5650 | rm -f core conftest.err conftest.$ac_objext \ |
5651 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5652 | fi |
81ecdfbb RW |
5653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
5654 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 5655 | if test $ac_cv_var__etext = yes; then |
60ca704f | 5656 | |
81ecdfbb | 5657 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 5658 | |
bec39cab | 5659 | fi |
81ecdfbb RW |
5660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
5661 | $as_echo_n "checking for etext... " >&6; } | |
5662 | if test "${ac_cv_var_etext+set}" = set; then : | |
5663 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5664 | else |
81ecdfbb | 5665 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5666 | /* end confdefs.h. */ |
a9322a30 TT |
5667 | #include <stdlib.h> |
5668 | extern char etext; | |
bec39cab AC |
5669 | |
5670 | int | |
5671 | main () | |
5672 | { | |
a9322a30 | 5673 | free (&etext); |
bec39cab AC |
5674 | ; |
5675 | return 0; | |
5676 | } | |
5677 | _ACEOF | |
81ecdfbb | 5678 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5679 | ac_cv_var_etext=yes |
bec39cab | 5680 | else |
81ecdfbb | 5681 | ac_cv_var_etext=no |
bec39cab | 5682 | fi |
81ecdfbb RW |
5683 | rm -f core conftest.err conftest.$ac_objext \ |
5684 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5685 | fi |
81ecdfbb RW |
5686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
5687 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
5688 | if test $ac_cv_var_etext = yes; then |
5689 | ||
81ecdfbb | 5690 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
5691 | |
5692 | fi | |
a9322a30 TT |
5693 | if test "$enable_profiling" = yes ; then |
5694 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 5695 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
5696 | fi |
5697 | PROFILE_CFLAGS=-pg | |
5698 | OLD_CFLAGS="$CFLAGS" | |
5699 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 5700 | |
81ecdfbb RW |
5701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
5702 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
5703 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
5704 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5705 | else |
81ecdfbb | 5706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5707 | /* end confdefs.h. */ |
bec39cab AC |
5708 | |
5709 | int | |
5710 | main () | |
5711 | { | |
a9322a30 | 5712 | int x; |
bec39cab AC |
5713 | ; |
5714 | return 0; | |
5715 | } | |
5716 | _ACEOF | |
81ecdfbb | 5717 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 5718 | ac_cv_cc_supports_pg=yes |
bec39cab | 5719 | else |
81ecdfbb | 5720 | ac_cv_cc_supports_pg=no |
bec39cab | 5721 | fi |
81ecdfbb | 5722 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 5723 | fi |
81ecdfbb RW |
5724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
5725 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 5726 | |
a9322a30 | 5727 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 5728 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 5729 | fi |
bec39cab | 5730 | |
a9322a30 | 5731 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
5732 | fi |
5733 | ||
c16158bc JM |
5734 | |
5735 | ||
81ecdfbb RW |
5736 | # Check whether --with-pkgversion was given. |
5737 | if test "${with_pkgversion+set}" = set; then : | |
5738 | withval=$with_pkgversion; case "$withval" in | |
5739 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5740 | no) PKGVERSION= ;; |
5741 | *) PKGVERSION="($withval) " ;; | |
5742 | esac | |
5743 | else | |
5744 | PKGVERSION="(GDB) " | |
5745 | ||
81ecdfbb | 5746 | fi |
c16158bc JM |
5747 | |
5748 | ||
5749 | ||
5750 | ||
81ecdfbb RW |
5751 | |
5752 | # Check whether --with-bugurl was given. | |
5753 | if test "${with_bugurl+set}" = set; then : | |
5754 | withval=$with_bugurl; case "$withval" in | |
5755 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5756 | no) BUGURL= |
5757 | ;; | |
5758 | *) BUGURL="$withval" | |
5759 | ;; | |
5760 | esac | |
5761 | else | |
5762 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
5763 | ||
81ecdfbb RW |
5764 | fi |
5765 | ||
c16158bc JM |
5766 | case ${BUGURL} in |
5767 | "") | |
5768 | REPORT_BUGS_TO= | |
5769 | REPORT_BUGS_TEXI= | |
5770 | ;; | |
5771 | *) | |
5772 | REPORT_BUGS_TO="<$BUGURL>" | |
5773 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
5774 | ;; | |
5775 | esac; | |
5776 | ||
5777 | ||
5778 | ||
5779 | ||
5780 | cat >>confdefs.h <<_ACEOF | |
5781 | #define PKGVERSION "$PKGVERSION" | |
5782 | _ACEOF | |
5783 | ||
5784 | ||
5785 | cat >>confdefs.h <<_ACEOF | |
5786 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
5787 | _ACEOF | |
5788 | ||
5789 | ||
bec39cab AC |
5790 | # --------------------- # |
5791 | # Checks for programs. # | |
5792 | # --------------------- # | |
5793 | ||
5794 | for ac_prog in gawk mawk nawk awk | |
5795 | do | |
5796 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5797 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5798 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5799 | $as_echo_n "checking for $ac_word... " >&6; } | |
5800 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
5801 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5802 | else |
5803 | if test -n "$AWK"; then | |
5804 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
5805 | else | |
5806 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5807 | for as_dir in $PATH | |
5808 | do | |
5809 | IFS=$as_save_IFS | |
5810 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5811 | for ac_exec_ext in '' $ac_executable_extensions; do |
5812 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5813 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 5814 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5815 | break 2 |
5816 | fi | |
5817 | done | |
81ecdfbb RW |
5818 | done |
5819 | IFS=$as_save_IFS | |
bec39cab AC |
5820 | |
5821 | fi | |
5822 | fi | |
5823 | AWK=$ac_cv_prog_AWK | |
5824 | if test -n "$AWK"; then | |
81ecdfbb RW |
5825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
5826 | $as_echo "$AWK" >&6; } | |
bec39cab | 5827 | else |
81ecdfbb RW |
5828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5829 | $as_echo "no" >&6; } | |
bec39cab AC |
5830 | fi |
5831 | ||
bec39cab | 5832 | |
81ecdfbb | 5833 | test -n "$AWK" && break |
bec39cab AC |
5834 | done |
5835 | ||
c971b7fa PA |
5836 | # Find a good install program. We prefer a C program (faster), |
5837 | # so one script is as good as another. But avoid the broken or | |
5838 | # incompatible versions: | |
5839 | # SysV /etc/install, /usr/sbin/install | |
5840 | # SunOS /usr/etc/install | |
5841 | # IRIX /sbin/install | |
5842 | # AIX /bin/install | |
5843 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5844 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5845 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5846 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5847 | # OS/2's system install, which has a completely different semantic | |
5848 | # ./install, which can be erroneously created by make from ./install.sh. | |
5849 | # Reject install programs that cannot install multiple files. | |
5850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5851 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5852 | if test -z "$INSTALL"; then | |
5853 | if test "${ac_cv_path_install+set}" = set; then : | |
5854 | $as_echo_n "(cached) " >&6 | |
5855 | else | |
5856 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5857 | for as_dir in $PATH | |
5858 | do | |
5859 | IFS=$as_save_IFS | |
5860 | test -z "$as_dir" && as_dir=. | |
5861 | # Account for people who put trailing slashes in PATH elements. | |
5862 | case $as_dir/ in #(( | |
5863 | ./ | .// | /[cC]/* | \ | |
5864 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5865 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5866 | /usr/ucb/* ) ;; | |
5867 | *) | |
5868 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5869 | # Don't use installbsd from OSF since it installs stuff as root | |
5870 | # by default. | |
5871 | for ac_prog in ginstall scoinst install; do | |
5872 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5873 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5874 | if test $ac_prog = install && | |
5875 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5876 | # AIX install. It has an incompatible calling convention. | |
5877 | : | |
5878 | elif test $ac_prog = install && | |
5879 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5880 | # program-specific install script used by HP pwplus--don't use. | |
5881 | : | |
5882 | else | |
5883 | rm -rf conftest.one conftest.two conftest.dir | |
5884 | echo one > conftest.one | |
5885 | echo two > conftest.two | |
5886 | mkdir conftest.dir | |
5887 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5888 | test -s conftest.one && test -s conftest.two && | |
5889 | test -s conftest.dir/conftest.one && | |
5890 | test -s conftest.dir/conftest.two | |
5891 | then | |
5892 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5893 | break 3 | |
5894 | fi | |
5895 | fi | |
5896 | fi | |
5897 | done | |
5898 | done | |
5899 | ;; | |
5900 | esac | |
5901 | ||
5902 | done | |
5903 | IFS=$as_save_IFS | |
5904 | ||
5905 | rm -rf conftest.one conftest.two conftest.dir | |
5906 | ||
5907 | fi | |
5908 | if test "${ac_cv_path_install+set}" = set; then | |
5909 | INSTALL=$ac_cv_path_install | |
5910 | else | |
5911 | # As a last resort, use the slow shell script. Don't cache a | |
5912 | # value for INSTALL within a source directory, because that will | |
5913 | # break other packages using the cache if that directory is | |
5914 | # removed, or if the value is a relative name. | |
5915 | INSTALL=$ac_install_sh | |
5916 | fi | |
5917 | fi | |
5918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5919 | $as_echo "$INSTALL" >&6; } | |
5920 | ||
5921 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5922 | # It thinks the first close brace ends the variable substitution. | |
5923 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5924 | ||
5925 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5926 | ||
5927 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 5928 | |
81ecdfbb RW |
5929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
5930 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
5931 | LN_S=$as_ln_s |
5932 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
5933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5934 | $as_echo "yes" >&6; } | |
bec39cab | 5935 | else |
81ecdfbb RW |
5936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
5937 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
5938 | fi |
5939 | ||
5940 | if test -n "$ac_tool_prefix"; then | |
5941 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5942 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
5943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5944 | $as_echo_n "checking for $ac_word... " >&6; } | |
5945 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
5946 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5947 | else |
5948 | if test -n "$RANLIB"; then | |
5949 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5950 | else | |
5951 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5952 | for as_dir in $PATH | |
5953 | do | |
5954 | IFS=$as_save_IFS | |
5955 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5956 | for ac_exec_ext in '' $ac_executable_extensions; do |
5957 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5958 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 5959 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5960 | break 2 |
5961 | fi | |
5962 | done | |
81ecdfbb RW |
5963 | done |
5964 | IFS=$as_save_IFS | |
bec39cab AC |
5965 | |
5966 | fi | |
5967 | fi | |
5968 | RANLIB=$ac_cv_prog_RANLIB | |
5969 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
5970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
5971 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 5972 | else |
81ecdfbb RW |
5973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5974 | $as_echo "no" >&6; } | |
bec39cab AC |
5975 | fi |
5976 | ||
81ecdfbb | 5977 | |
bec39cab AC |
5978 | fi |
5979 | if test -z "$ac_cv_prog_RANLIB"; then | |
5980 | ac_ct_RANLIB=$RANLIB | |
5981 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5982 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
5983 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5984 | $as_echo_n "checking for $ac_word... " >&6; } | |
5985 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5986 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5987 | else |
5988 | if test -n "$ac_ct_RANLIB"; then | |
5989 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5990 | else | |
5991 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5992 | for as_dir in $PATH | |
5993 | do | |
5994 | IFS=$as_save_IFS | |
5995 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5996 | for ac_exec_ext in '' $ac_executable_extensions; do |
5997 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5998 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 5999 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6000 | break 2 |
6001 | fi | |
6002 | done | |
81ecdfbb RW |
6003 | done |
6004 | IFS=$as_save_IFS | |
bec39cab | 6005 | |
bec39cab AC |
6006 | fi |
6007 | fi | |
6008 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6009 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
6010 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
6011 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 6012 | else |
81ecdfbb RW |
6013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6014 | $as_echo "no" >&6; } | |
bec39cab AC |
6015 | fi |
6016 | ||
81ecdfbb RW |
6017 | if test "x$ac_ct_RANLIB" = x; then |
6018 | RANLIB=":" | |
6019 | else | |
6020 | case $cross_compiling:$ac_tool_warned in | |
6021 | yes:) | |
6022 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6023 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6024 | ac_tool_warned=yes ;; | |
6025 | esac | |
6026 | RANLIB=$ac_ct_RANLIB | |
6027 | fi | |
bec39cab AC |
6028 | else |
6029 | RANLIB="$ac_cv_prog_RANLIB" | |
6030 | fi | |
6031 | ||
6032 | for ac_prog in 'bison -y' byacc | |
6033 | do | |
6034 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6035 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
6036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6037 | $as_echo_n "checking for $ac_word... " >&6; } | |
6038 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
6039 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6040 | else |
6041 | if test -n "$YACC"; then | |
6042 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
6043 | else | |
6044 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6045 | for as_dir in $PATH | |
6046 | do | |
6047 | IFS=$as_save_IFS | |
6048 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6049 | for ac_exec_ext in '' $ac_executable_extensions; do |
6050 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6051 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 6052 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6053 | break 2 |
6054 | fi | |
6055 | done | |
81ecdfbb RW |
6056 | done |
6057 | IFS=$as_save_IFS | |
bec39cab AC |
6058 | |
6059 | fi | |
6060 | fi | |
6061 | YACC=$ac_cv_prog_YACC | |
6062 | if test -n "$YACC"; then | |
81ecdfbb RW |
6063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
6064 | $as_echo "$YACC" >&6; } | |
bec39cab | 6065 | else |
81ecdfbb RW |
6066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6067 | $as_echo "no" >&6; } | |
bec39cab AC |
6068 | fi |
6069 | ||
81ecdfbb | 6070 | |
bec39cab AC |
6071 | test -n "$YACC" && break |
6072 | done | |
6073 | test -n "$YACC" || YACC="yacc" | |
6074 | ||
6075 | ||
6076 | if test -n "$ac_tool_prefix"; then | |
6077 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6078 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
6079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6080 | $as_echo_n "checking for $ac_word... " >&6; } | |
6081 | if test "${ac_cv_prog_AR+set}" = set; then : | |
6082 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6083 | else |
6084 | if test -n "$AR"; then | |
6085 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6086 | else | |
6087 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6088 | for as_dir in $PATH | |
6089 | do | |
6090 | IFS=$as_save_IFS | |
6091 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6092 | for ac_exec_ext in '' $ac_executable_extensions; do |
6093 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6094 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 6095 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6096 | break 2 |
6097 | fi | |
6098 | done | |
81ecdfbb RW |
6099 | done |
6100 | IFS=$as_save_IFS | |
bec39cab AC |
6101 | |
6102 | fi | |
6103 | fi | |
6104 | AR=$ac_cv_prog_AR | |
6105 | if test -n "$AR"; then | |
81ecdfbb RW |
6106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
6107 | $as_echo "$AR" >&6; } | |
bec39cab | 6108 | else |
81ecdfbb RW |
6109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6110 | $as_echo "no" >&6; } | |
bec39cab AC |
6111 | fi |
6112 | ||
81ecdfbb | 6113 | |
bec39cab AC |
6114 | fi |
6115 | if test -z "$ac_cv_prog_AR"; then | |
6116 | ac_ct_AR=$AR | |
6117 | # Extract the first word of "ar", so it can be a program name with args. | |
6118 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
6119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6120 | $as_echo_n "checking for $ac_word... " >&6; } | |
6121 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
6122 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6123 | else |
6124 | if test -n "$ac_ct_AR"; then | |
6125 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
6126 | else | |
6127 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6128 | for as_dir in $PATH | |
6129 | do | |
6130 | IFS=$as_save_IFS | |
6131 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6132 | for ac_exec_ext in '' $ac_executable_extensions; do |
6133 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6134 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 6135 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6136 | break 2 |
6137 | fi | |
6138 | done | |
81ecdfbb RW |
6139 | done |
6140 | IFS=$as_save_IFS | |
bec39cab AC |
6141 | |
6142 | fi | |
6143 | fi | |
6144 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6145 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
6146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
6147 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 6148 | else |
81ecdfbb RW |
6149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6150 | $as_echo "no" >&6; } | |
bec39cab AC |
6151 | fi |
6152 | ||
81ecdfbb RW |
6153 | if test "x$ac_ct_AR" = x; then |
6154 | AR="" | |
6155 | else | |
6156 | case $cross_compiling:$ac_tool_warned in | |
6157 | yes:) | |
6158 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6159 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6160 | ac_tool_warned=yes ;; | |
6161 | esac | |
6162 | AR=$ac_ct_AR | |
6163 | fi | |
bec39cab AC |
6164 | else |
6165 | AR="$ac_cv_prog_AR" | |
6166 | fi | |
6167 | ||
6168 | if test -n "$ac_tool_prefix"; then | |
6169 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
6170 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
6171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6172 | $as_echo_n "checking for $ac_word... " >&6; } | |
6173 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
6174 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6175 | else |
6176 | if test -n "$DLLTOOL"; then | |
6177 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
6178 | else | |
6179 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6180 | for as_dir in $PATH | |
6181 | do | |
6182 | IFS=$as_save_IFS | |
6183 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6184 | for ac_exec_ext in '' $ac_executable_extensions; do |
6185 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6186 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 6187 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6188 | break 2 |
6189 | fi | |
6190 | done | |
81ecdfbb RW |
6191 | done |
6192 | IFS=$as_save_IFS | |
bec39cab AC |
6193 | |
6194 | fi | |
6195 | fi | |
6196 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
6197 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
6198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
6199 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 6200 | else |
81ecdfbb RW |
6201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6202 | $as_echo "no" >&6; } | |
bec39cab AC |
6203 | fi |
6204 | ||
81ecdfbb | 6205 | |
bec39cab AC |
6206 | fi |
6207 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
6208 | ac_ct_DLLTOOL=$DLLTOOL | |
6209 | # Extract the first word of "dlltool", so it can be a program name with args. | |
6210 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
6211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6212 | $as_echo_n "checking for $ac_word... " >&6; } | |
6213 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
6214 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6215 | else |
6216 | if test -n "$ac_ct_DLLTOOL"; then | |
6217 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
6218 | else | |
6219 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6220 | for as_dir in $PATH | |
6221 | do | |
6222 | IFS=$as_save_IFS | |
6223 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6224 | for ac_exec_ext in '' $ac_executable_extensions; do |
6225 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6226 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 6227 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6228 | break 2 |
6229 | fi | |
6230 | done | |
81ecdfbb RW |
6231 | done |
6232 | IFS=$as_save_IFS | |
bec39cab AC |
6233 | |
6234 | fi | |
6235 | fi | |
6236 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
6237 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
6238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
6239 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 6240 | else |
81ecdfbb RW |
6241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6242 | $as_echo "no" >&6; } | |
bec39cab AC |
6243 | fi |
6244 | ||
81ecdfbb RW |
6245 | if test "x$ac_ct_DLLTOOL" = x; then |
6246 | DLLTOOL="" | |
6247 | else | |
6248 | case $cross_compiling:$ac_tool_warned in | |
6249 | yes:) | |
6250 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6251 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6252 | ac_tool_warned=yes ;; | |
6253 | esac | |
6254 | DLLTOOL=$ac_ct_DLLTOOL | |
6255 | fi | |
bec39cab AC |
6256 | else |
6257 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6258 | fi | |
6259 | ||
6260 | if test -n "$ac_tool_prefix"; then | |
6261 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6262 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6264 | $as_echo_n "checking for $ac_word... " >&6; } | |
6265 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6266 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6267 | else |
6268 | if test -n "$WINDRES"; then | |
6269 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6270 | else | |
6271 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6272 | for as_dir in $PATH | |
6273 | do | |
6274 | IFS=$as_save_IFS | |
6275 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6276 | for ac_exec_ext in '' $ac_executable_extensions; do |
6277 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6278 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6279 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6280 | break 2 |
6281 | fi | |
6282 | done | |
81ecdfbb RW |
6283 | done |
6284 | IFS=$as_save_IFS | |
bec39cab AC |
6285 | |
6286 | fi | |
6287 | fi | |
6288 | WINDRES=$ac_cv_prog_WINDRES | |
6289 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6291 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6292 | else |
81ecdfbb RW |
6293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6294 | $as_echo "no" >&6; } | |
bec39cab AC |
6295 | fi |
6296 | ||
81ecdfbb | 6297 | |
bec39cab AC |
6298 | fi |
6299 | if test -z "$ac_cv_prog_WINDRES"; then | |
6300 | ac_ct_WINDRES=$WINDRES | |
6301 | # Extract the first word of "windres", so it can be a program name with args. | |
6302 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6304 | $as_echo_n "checking for $ac_word... " >&6; } | |
6305 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6306 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6307 | else |
6308 | if test -n "$ac_ct_WINDRES"; then | |
6309 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6310 | else | |
6311 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6312 | for as_dir in $PATH | |
6313 | do | |
6314 | IFS=$as_save_IFS | |
6315 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6316 | for ac_exec_ext in '' $ac_executable_extensions; do |
6317 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6318 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6319 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6320 | break 2 |
6321 | fi | |
6322 | done | |
81ecdfbb RW |
6323 | done |
6324 | IFS=$as_save_IFS | |
bec39cab AC |
6325 | |
6326 | fi | |
6327 | fi | |
6328 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6329 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6331 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6332 | else |
81ecdfbb RW |
6333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6334 | $as_echo "no" >&6; } | |
c906108c | 6335 | fi |
bec39cab | 6336 | |
81ecdfbb RW |
6337 | if test "x$ac_ct_WINDRES" = x; then |
6338 | WINDRES="" | |
6339 | else | |
6340 | case $cross_compiling:$ac_tool_warned in | |
6341 | yes:) | |
6342 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6343 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6344 | ac_tool_warned=yes ;; | |
6345 | esac | |
6346 | WINDRES=$ac_ct_WINDRES | |
6347 | fi | |
c906108c | 6348 | else |
bec39cab | 6349 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6350 | fi |
6351 | ||
bec39cab | 6352 | |
036c3acb TS |
6353 | case $host_os in |
6354 | gnu*) | |
6355 | # Needed for GNU Hurd hosts. | |
6356 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
6357 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
6358 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6360 | $as_echo_n "checking for $ac_word... " >&6; } | |
6361 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6362 | $as_echo_n "(cached) " >&6 | |
c906108c | 6363 | else |
bec39cab AC |
6364 | if test -n "$MIG"; then |
6365 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6366 | else | |
6367 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6368 | for as_dir in $PATH | |
6369 | do | |
6370 | IFS=$as_save_IFS | |
6371 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6372 | for ac_exec_ext in '' $ac_executable_extensions; do |
6373 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6374 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6375 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6376 | break 2 |
6377 | fi | |
6378 | done | |
81ecdfbb RW |
6379 | done |
6380 | IFS=$as_save_IFS | |
bec39cab | 6381 | |
c906108c | 6382 | fi |
bec39cab AC |
6383 | fi |
6384 | MIG=$ac_cv_prog_MIG | |
6385 | if test -n "$MIG"; then | |
81ecdfbb RW |
6386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6387 | $as_echo "$MIG" >&6; } | |
c906108c | 6388 | else |
81ecdfbb RW |
6389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6390 | $as_echo "no" >&6; } | |
c906108c SS |
6391 | fi |
6392 | ||
81ecdfbb | 6393 | |
bec39cab AC |
6394 | fi |
6395 | if test -z "$ac_cv_prog_MIG"; then | |
6396 | ac_ct_MIG=$MIG | |
6397 | # Extract the first word of "mig", so it can be a program name with args. | |
6398 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6400 | $as_echo_n "checking for $ac_word... " >&6; } | |
6401 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6402 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6403 | else |
6404 | if test -n "$ac_ct_MIG"; then | |
6405 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6406 | else | |
6407 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6408 | for as_dir in $PATH | |
6409 | do | |
6410 | IFS=$as_save_IFS | |
6411 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6412 | for ac_exec_ext in '' $ac_executable_extensions; do |
6413 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6414 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6415 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6416 | break 2 |
6417 | fi | |
6418 | done | |
81ecdfbb RW |
6419 | done |
6420 | IFS=$as_save_IFS | |
c906108c | 6421 | |
bec39cab AC |
6422 | fi |
6423 | fi | |
6424 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6425 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6427 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6428 | else |
81ecdfbb RW |
6429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6430 | $as_echo "no" >&6; } | |
bec39cab | 6431 | fi |
c906108c | 6432 | |
81ecdfbb RW |
6433 | if test "x$ac_ct_MIG" = x; then |
6434 | MIG="" | |
6435 | else | |
6436 | case $cross_compiling:$ac_tool_warned in | |
6437 | yes:) | |
6438 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6439 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6440 | ac_tool_warned=yes ;; | |
6441 | esac | |
6442 | MIG=$ac_ct_MIG | |
6443 | fi | |
bec39cab AC |
6444 | else |
6445 | MIG="$ac_cv_prog_MIG" | |
6446 | fi | |
c906108c | 6447 | |
036c3acb TS |
6448 | if test x"$MIG" = x; then |
6449 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
6450 | fi | |
6451 | ;; | |
6452 | esac | |
c906108c | 6453 | |
bec39cab AC |
6454 | # ---------------------- # |
6455 | # Checks for libraries. # | |
6456 | # ---------------------- # | |
c906108c | 6457 | |
bec39cab | 6458 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6460 | $as_echo_n "checking for main in -lm... " >&6; } | |
6461 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6462 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6463 | else |
6464 | ac_check_lib_save_LIBS=$LIBS | |
6465 | LIBS="-lm $LIBS" | |
81ecdfbb | 6466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6467 | /* end confdefs.h. */ |
c906108c | 6468 | |
c906108c | 6469 | |
bec39cab AC |
6470 | int |
6471 | main () | |
6472 | { | |
81ecdfbb | 6473 | return main (); |
bec39cab AC |
6474 | ; |
6475 | return 0; | |
6476 | } | |
6477 | _ACEOF | |
81ecdfbb | 6478 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6479 | ac_cv_lib_m_main=yes |
6480 | else | |
81ecdfbb | 6481 | ac_cv_lib_m_main=no |
bec39cab | 6482 | fi |
81ecdfbb RW |
6483 | rm -f core conftest.err conftest.$ac_objext \ |
6484 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6485 | LIBS=$ac_check_lib_save_LIBS |
6486 | fi | |
81ecdfbb RW |
6487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6488 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6489 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6490 | cat >>confdefs.h <<_ACEOF |
6491 | #define HAVE_LIBM 1 | |
6492 | _ACEOF | |
6493 | ||
6494 | LIBS="-lm $LIBS" | |
c906108c | 6495 | |
c906108c | 6496 | fi |
bec39cab AC |
6497 | |
6498 | ||
6499 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6500 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6501 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6502 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6503 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6504 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6505 | |
c906108c | 6506 | else |
81ecdfbb RW |
6507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6508 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6509 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6510 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6511 | else |
6512 | ac_check_lib_save_LIBS=$LIBS | |
6513 | LIBS="-lw $LIBS" | |
81ecdfbb | 6514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6515 | /* end confdefs.h. */ |
c906108c | 6516 | |
81ecdfbb RW |
6517 | /* Override any GCC internal prototype to avoid an error. |
6518 | Use char because int might match the return type of a GCC | |
6519 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6520 | #ifdef __cplusplus |
6521 | extern "C" | |
6522 | #endif | |
bec39cab AC |
6523 | char wctype (); |
6524 | int | |
6525 | main () | |
6526 | { | |
81ecdfbb | 6527 | return wctype (); |
bec39cab AC |
6528 | ; |
6529 | return 0; | |
6530 | } | |
6531 | _ACEOF | |
81ecdfbb | 6532 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6533 | ac_cv_lib_w_wctype=yes |
6534 | else | |
81ecdfbb | 6535 | ac_cv_lib_w_wctype=no |
bec39cab | 6536 | fi |
81ecdfbb RW |
6537 | rm -f core conftest.err conftest.$ac_objext \ |
6538 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6539 | LIBS=$ac_check_lib_save_LIBS |
6540 | fi | |
81ecdfbb RW |
6541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6542 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6543 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6544 | cat >>confdefs.h <<_ACEOF |
6545 | #define HAVE_LIBW 1 | |
6546 | _ACEOF | |
c906108c | 6547 | |
bec39cab | 6548 | LIBS="-lw $LIBS" |
c906108c | 6549 | |
bec39cab | 6550 | fi |
c906108c | 6551 | |
bec39cab | 6552 | fi |
c906108c | 6553 | |
ddc9cd0f | 6554 | |
bec39cab | 6555 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6557 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6558 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6559 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6560 | else |
6561 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6563 | /* end confdefs.h. */ |
ddc9cd0f | 6564 | |
81ecdfbb RW |
6565 | /* Override any GCC internal prototype to avoid an error. |
6566 | Use char because int might match the return type of a GCC | |
6567 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6568 | #ifdef __cplusplus |
6569 | extern "C" | |
6570 | #endif | |
bec39cab AC |
6571 | char gethostbyname (); |
6572 | int | |
6573 | main () | |
6574 | { | |
81ecdfbb | 6575 | return gethostbyname (); |
bec39cab AC |
6576 | ; |
6577 | return 0; | |
6578 | } | |
6579 | _ACEOF | |
81ecdfbb RW |
6580 | for ac_lib in '' nsl; do |
6581 | if test -z "$ac_lib"; then | |
6582 | ac_res="none required" | |
6583 | else | |
6584 | ac_res=-l$ac_lib | |
b4e70030 | 6585 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6586 | fi |
6587 | if ac_fn_c_try_link "$LINENO"; then : | |
6588 | ac_cv_search_gethostbyname=$ac_res | |
6589 | fi | |
6590 | rm -f core conftest.err conftest.$ac_objext \ | |
6591 | conftest$ac_exeext | |
6592 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6593 | break | |
6594 | fi | |
6595 | done | |
6596 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6597 | |
bec39cab | 6598 | else |
81ecdfbb | 6599 | ac_cv_search_gethostbyname=no |
bec39cab | 6600 | fi |
81ecdfbb | 6601 | rm conftest.$ac_ext |
bec39cab AC |
6602 | LIBS=$ac_func_search_save_LIBS |
6603 | fi | |
81ecdfbb RW |
6604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6605 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6606 | ac_res=$ac_cv_search_gethostbyname | |
6607 | if test "$ac_res" != no; then : | |
6608 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6609 | |
bec39cab | 6610 | fi |
96baa820 | 6611 | |
c906108c | 6612 | |
b4e70030 | 6613 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6615 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6616 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6617 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6618 | else |
6619 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6621 | /* end confdefs.h. */ |
6622 | ||
81ecdfbb RW |
6623 | /* Override any GCC internal prototype to avoid an error. |
6624 | Use char because int might match the return type of a GCC | |
6625 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6626 | #ifdef __cplusplus |
6627 | extern "C" | |
6628 | #endif | |
b4e70030 JB |
6629 | char socketpair (); |
6630 | int | |
6631 | main () | |
6632 | { | |
81ecdfbb | 6633 | return socketpair (); |
b4e70030 JB |
6634 | ; |
6635 | return 0; | |
6636 | } | |
6637 | _ACEOF | |
81ecdfbb RW |
6638 | for ac_lib in '' socket; do |
6639 | if test -z "$ac_lib"; then | |
6640 | ac_res="none required" | |
6641 | else | |
6642 | ac_res=-l$ac_lib | |
b4e70030 | 6643 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6644 | fi |
6645 | if ac_fn_c_try_link "$LINENO"; then : | |
6646 | ac_cv_search_socketpair=$ac_res | |
6647 | fi | |
6648 | rm -f core conftest.err conftest.$ac_objext \ | |
6649 | conftest$ac_exeext | |
6650 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6651 | break | |
6652 | fi | |
6653 | done | |
6654 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 6655 | |
b4e70030 | 6656 | else |
81ecdfbb | 6657 | ac_cv_search_socketpair=no |
b4e70030 | 6658 | fi |
81ecdfbb | 6659 | rm conftest.$ac_ext |
b4e70030 JB |
6660 | LIBS=$ac_func_search_save_LIBS |
6661 | fi | |
81ecdfbb RW |
6662 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
6663 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
6664 | ac_res=$ac_cv_search_socketpair | |
6665 | if test "$ac_res" != no; then : | |
6666 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
6667 | |
6668 | fi | |
6669 | ||
6670 | ||
233a11ab | 6671 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
6672 | |
6673 | # See if the user specified whether he wants zlib support or not. | |
6674 | ||
6675 | # Check whether --with-zlib was given. | |
6676 | if test "${with_zlib+set}" = set; then : | |
6677 | withval=$with_zlib; | |
6678 | else | |
6679 | with_zlib=auto | |
6680 | fi | |
6681 | ||
6682 | ||
6683 | if test "$with_zlib" != "no"; then | |
6684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
6685 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
6686 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6687 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
6688 | else |
6689 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
6691 | /* end confdefs.h. */ |
6692 | ||
81ecdfbb RW |
6693 | /* Override any GCC internal prototype to avoid an error. |
6694 | Use char because int might match the return type of a GCC | |
233a11ab | 6695 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
6696 | #ifdef __cplusplus |
6697 | extern "C" | |
6698 | #endif | |
233a11ab CS |
6699 | char zlibVersion (); |
6700 | int | |
6701 | main () | |
6702 | { | |
81ecdfbb | 6703 | return zlibVersion (); |
233a11ab CS |
6704 | ; |
6705 | return 0; | |
6706 | } | |
6707 | _ACEOF | |
81ecdfbb RW |
6708 | for ac_lib in '' z; do |
6709 | if test -z "$ac_lib"; then | |
6710 | ac_res="none required" | |
233a11ab | 6711 | else |
81ecdfbb RW |
6712 | ac_res=-l$ac_lib |
6713 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 6714 | fi |
81ecdfbb RW |
6715 | if ac_fn_c_try_link "$LINENO"; then : |
6716 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 6717 | fi |
81ecdfbb RW |
6718 | rm -f core conftest.err conftest.$ac_objext \ |
6719 | conftest$ac_exeext | |
6720 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6721 | break | |
233a11ab | 6722 | fi |
81ecdfbb RW |
6723 | done |
6724 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 6725 | |
233a11ab | 6726 | else |
81ecdfbb | 6727 | ac_cv_search_zlibVersion=no |
233a11ab | 6728 | fi |
81ecdfbb RW |
6729 | rm conftest.$ac_ext |
6730 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 6731 | fi |
81ecdfbb RW |
6732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
6733 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
6734 | ac_res=$ac_cv_search_zlibVersion | |
6735 | if test "$ac_res" != no; then : | |
6736 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6737 | for ac_header in zlib.h | |
6738 | do : | |
6739 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
6740 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 6741 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6742 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
6743 | _ACEOF |
6744 | ||
6745 | fi | |
6746 | ||
6747 | done | |
6748 | ||
6749 | fi | |
6750 | ||
b040ad30 JB |
6751 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
6752 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
6753 | fi | |
6754 | fi | |
6755 | ||
233a11ab | 6756 | |
77f120bf | 6757 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
6758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
6759 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
6760 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6761 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6762 | else |
6763 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6765 | /* end confdefs.h. */ |
c906108c | 6766 | |
81ecdfbb RW |
6767 | /* Override any GCC internal prototype to avoid an error. |
6768 | Use char because int might match the return type of a GCC | |
6769 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6770 | #ifdef __cplusplus |
6771 | extern "C" | |
6772 | #endif | |
77f120bf | 6773 | char dlgetmodinfo (); |
bec39cab AC |
6774 | int |
6775 | main () | |
6776 | { | |
81ecdfbb | 6777 | return dlgetmodinfo (); |
bec39cab AC |
6778 | ; |
6779 | return 0; | |
6780 | } | |
6781 | _ACEOF | |
81ecdfbb RW |
6782 | for ac_lib in '' dl xpdl; do |
6783 | if test -z "$ac_lib"; then | |
6784 | ac_res="none required" | |
6785 | else | |
6786 | ac_res=-l$ac_lib | |
b4e70030 | 6787 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6788 | fi |
6789 | if ac_fn_c_try_link "$LINENO"; then : | |
6790 | ac_cv_search_dlgetmodinfo=$ac_res | |
6791 | fi | |
6792 | rm -f core conftest.err conftest.$ac_objext \ | |
6793 | conftest$ac_exeext | |
6794 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6795 | break | |
6796 | fi | |
6797 | done | |
6798 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 6799 | |
4e8d927d | 6800 | else |
81ecdfbb | 6801 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 6802 | fi |
81ecdfbb | 6803 | rm conftest.$ac_ext |
bec39cab AC |
6804 | LIBS=$ac_func_search_save_LIBS |
6805 | fi | |
81ecdfbb RW |
6806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
6807 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
6808 | ac_res=$ac_cv_search_dlgetmodinfo | |
6809 | if test "$ac_res" != no; then : | |
6810 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 6811 | |
8bb2c122 | 6812 | fi |
8bb2c122 | 6813 | |
8bb2c122 | 6814 | |
77f120bf | 6815 | |
77f120bf | 6816 | |
6c7a06a3 | 6817 | |
81ecdfbb RW |
6818 | # Check whether --with-libiconv-prefix was given. |
6819 | if test "${with_libiconv_prefix+set}" = set; then : | |
6820 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 6821 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
6822 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
6823 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
6824 | done |
6825 | ||
81ecdfbb RW |
6826 | fi |
6827 | ||
6c7a06a3 | 6828 | |
f18c4681 | 6829 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
6830 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
6831 | ||
81ecdfbb RW |
6832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
6833 | $as_echo_n "checking for iconv... " >&6; } | |
6834 | if test "${am_cv_func_iconv+set}" = set; then : | |
6835 | $as_echo_n "(cached) " >&6 | |
d542061a | 6836 | else |
6c7a06a3 TT |
6837 | |
6838 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
6839 | am_cv_lib_iconv=no | |
6840 | am_cv_use_build_libiconv=no | |
f0f20949 | 6841 | am_cv_build_libiconv_path= |
4edb1e84 JB |
6842 | |
6843 | # If libiconv is part of the build tree, then try using it over | |
6844 | # any system iconv. | |
6845 | if test -d ../libiconv; then | |
f18c4681 JB |
6846 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
6847 | am_save_LIBS="$LIBS" | |
6848 | am_save_CPPFLAGS="$CPPFLAGS" | |
6849 | LIBS="$LIBS $lib_dir/libiconv.a" | |
6850 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
6851 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 6852 | /* end confdefs.h. */ |
6c7a06a3 TT |
6853 | #include <stdlib.h> |
6854 | #include <iconv.h> | |
d542061a UW |
6855 | int |
6856 | main () | |
6857 | { | |
6c7a06a3 | 6858 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
6859 | iconv(cd,NULL,NULL,NULL,NULL); |
6860 | iconv_close(cd); | |
d542061a UW |
6861 | ; |
6862 | return 0; | |
6863 | } | |
6864 | _ACEOF | |
81ecdfbb | 6865 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6866 | am_cv_use_build_libiconv=yes |
f0f20949 | 6867 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
6868 | am_cv_lib_iconv=yes |
6869 | am_cv_func_iconv=yes | |
d542061a | 6870 | fi |
81ecdfbb RW |
6871 | rm -f core conftest.err conftest.$ac_objext \ |
6872 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
6873 | LIBS="$am_save_LIBS" |
6874 | CPPFLAGS="$am_save_CPPFLAGS" | |
6875 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
6876 | break |
6877 | fi | |
6878 | done | |
4edb1e84 | 6879 | fi |
94ae1714 | 6880 | |
4edb1e84 | 6881 | # Next, try to find iconv in libc. |
6c7a06a3 | 6882 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 6883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 6884 | /* end confdefs.h. */ |
6c7a06a3 TT |
6885 | #include <stdlib.h> |
6886 | #include <iconv.h> | |
d542061a UW |
6887 | int |
6888 | main () | |
6889 | { | |
6c7a06a3 TT |
6890 | iconv_t cd = iconv_open("",""); |
6891 | iconv(cd,NULL,NULL,NULL,NULL); | |
6892 | iconv_close(cd); | |
d542061a UW |
6893 | ; |
6894 | return 0; | |
6895 | } | |
6896 | _ACEOF | |
81ecdfbb | 6897 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6898 | am_cv_func_iconv=yes |
d542061a | 6899 | fi |
81ecdfbb RW |
6900 | rm -f core conftest.err conftest.$ac_objext \ |
6901 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 6902 | fi |
94ae1714 | 6903 | |
4edb1e84 JB |
6904 | # If iconv was not in libc, try -liconv. In this case, arrange to |
6905 | # look in the libiconv prefix, if it was specified by the user. | |
6906 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 6907 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
6908 | am_save_LIBS="$LIBS" |
6909 | if test -n "$LIBICONV_INCLUDE"; then | |
6910 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6911 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
6912 | fi | |
6913 | LIBS="$LIBS -liconv" | |
81ecdfbb | 6914 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6915 | /* end confdefs.h. */ |
6c7a06a3 TT |
6916 | #include <stdlib.h> |
6917 | #include <iconv.h> | |
bec39cab AC |
6918 | int |
6919 | main () | |
6920 | { | |
6c7a06a3 TT |
6921 | iconv_t cd = iconv_open("",""); |
6922 | iconv(cd,NULL,NULL,NULL,NULL); | |
6923 | iconv_close(cd); | |
bec39cab AC |
6924 | ; |
6925 | return 0; | |
6926 | } | |
6927 | _ACEOF | |
81ecdfbb | 6928 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6929 | am_cv_lib_iconv=yes |
6c7a06a3 | 6930 | am_cv_func_iconv=yes |
627af7ea | 6931 | fi |
81ecdfbb RW |
6932 | rm -f core conftest.err conftest.$ac_objext \ |
6933 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 6934 | LIBS="$am_save_LIBS" |
fc3b640d | 6935 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
6936 | fi |
6937 | ||
6938 | fi | |
81ecdfbb RW |
6939 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
6940 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
6941 | |
6942 | # Set the various flags based on the cache variables. We can't rely | |
6943 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
6944 | LIBICONV= |
6945 | if test "$am_cv_lib_iconv" = yes; then | |
6946 | LIBICONV="-liconv" | |
94ae1714 TT |
6947 | else |
6948 | LIBICONV_LIBDIR= | |
6949 | LIBICONV_INCLUDE= | |
fc3b640d TT |
6950 | fi |
6951 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 6952 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 6953 | LIBICONV_LIBDIR="" |
fc3b640d TT |
6954 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
6955 | fi | |
6956 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6957 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 6958 | |
6c7a06a3 TT |
6959 | if test "$am_cv_func_iconv" = yes; then |
6960 | ||
81ecdfbb | 6961 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 6962 | |
81ecdfbb RW |
6963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
6964 | $as_echo_n "checking for iconv declaration... " >&6; } | |
6965 | if test "${am_cv_proto_iconv+set}" = set; then : | |
6966 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6967 | else |
6968 | ||
81ecdfbb | 6969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6970 | /* end confdefs.h. */ |
6971 | ||
6c7a06a3 TT |
6972 | #include <stdlib.h> |
6973 | #include <iconv.h> | |
6974 | extern | |
b4e70030 | 6975 | #ifdef __cplusplus |
6c7a06a3 | 6976 | "C" |
b4e70030 | 6977 | #endif |
6c7a06a3 TT |
6978 | #if defined(__STDC__) || defined(__cplusplus) |
6979 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6980 | #else | |
6981 | size_t iconv(); | |
6982 | #endif | |
6983 | ||
b4e70030 JB |
6984 | int |
6985 | main () | |
6986 | { | |
6c7a06a3 | 6987 | |
b4e70030 JB |
6988 | ; |
6989 | return 0; | |
6990 | } | |
6991 | _ACEOF | |
81ecdfbb | 6992 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 6993 | am_cv_proto_iconv_arg1="" |
4e8d927d | 6994 | else |
81ecdfbb | 6995 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 6996 | fi |
81ecdfbb | 6997 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
6998 | 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);" |
6999 | fi | |
7000 | ||
7001 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 7002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 7003 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
7004 | $as_echo "${ac_t:- |
7005 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
7006 | |
7007 | cat >>confdefs.h <<_ACEOF | |
7008 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
7009 | _ACEOF | |
7010 | ||
7011 | fi | |
6c7a06a3 TT |
7012 | |
7013 | ||
478aac75 DE |
7014 | # GDB may fork/exec the iconv program to get the list of supported character |
7015 | # sets. Allow the user to specify where to find it. | |
7016 | # There are several factors affecting the choice of option name: | |
7017 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
7018 | # the build-time location of libiconv files. | |
7019 | # - The program we need to find is iconv, which comes with glibc. The user | |
7020 | # doesn't necessarily have libiconv installed. Therefore naming this | |
7021 | # --with-libiconv-foo feels wrong. | |
7022 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
7023 | # defined to work on directories not files (though it really doesn't know | |
7024 | # the difference). | |
7025 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
7026 | # with --with-libiconv-prefix. | |
7027 | # Putting these together is why the option name is --with-iconv-bin. | |
7028 | ||
7029 | ||
7030 | # Check whether --with-iconv-bin was given. | |
7031 | if test "${with_iconv_bin+set}" = set; then : | |
7032 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
7033 | ||
7034 | cat >>confdefs.h <<_ACEOF | |
7035 | #define ICONV_BIN "${iconv_bin}" | |
7036 | _ACEOF | |
7037 | ||
7038 | ||
7039 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7040 | if test "x$prefix" = xNONE; then | |
7041 | test_prefix=/usr/local | |
7042 | else | |
7043 | test_prefix=$prefix | |
7044 | fi | |
7045 | else | |
7046 | test_prefix=$exec_prefix | |
7047 | fi | |
7048 | value=0 | |
7049 | case ${iconv_bin} in | |
7050 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7051 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7052 | value=1 | |
7053 | ;; | |
7054 | esac | |
7055 | ||
7056 | cat >>confdefs.h <<_ACEOF | |
7057 | #define ICONV_BIN_RELOCATABLE $value | |
7058 | _ACEOF | |
7059 | ||
7060 | ||
7061 | ||
7062 | fi | |
7063 | ||
7064 | ||
cb01cfba | 7065 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 7066 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
7067 | prefer_curses=yes |
7068 | fi | |
7069 | ||
7070 | curses_found=no | |
7071 | if test x"$prefer_curses" = xyes; then | |
7072 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
7073 | # curses library because the latter might not provide all the | |
7074 | # functionality we need. However, this leads to problems on systems | |
7075 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
7076 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
7077 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
7078 | # a situation. | |
81ecdfbb RW |
7079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
7080 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
7081 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7082 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7083 | else |
7084 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
7086 | /* end confdefs.h. */ |
7087 | ||
81ecdfbb RW |
7088 | /* Override any GCC internal prototype to avoid an error. |
7089 | Use char because int might match the return type of a GCC | |
7090 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7091 | #ifdef __cplusplus |
7092 | extern "C" | |
7093 | #endif | |
6c7a06a3 TT |
7094 | char waddstr (); |
7095 | int | |
7096 | main () | |
7097 | { | |
81ecdfbb | 7098 | return waddstr (); |
6c7a06a3 TT |
7099 | ; |
7100 | return 0; | |
7101 | } | |
7102 | _ACEOF | |
81ecdfbb RW |
7103 | for ac_lib in '' ncurses cursesX curses; do |
7104 | if test -z "$ac_lib"; then | |
7105 | ac_res="none required" | |
7106 | else | |
7107 | ac_res=-l$ac_lib | |
7108 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7109 | fi | |
7110 | if ac_fn_c_try_link "$LINENO"; then : | |
7111 | ac_cv_search_waddstr=$ac_res | |
7112 | fi | |
7113 | rm -f core conftest.err conftest.$ac_objext \ | |
7114 | conftest$ac_exeext | |
7115 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7116 | break | |
7117 | fi | |
7118 | done | |
7119 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7120 | ||
6c7a06a3 | 7121 | else |
81ecdfbb RW |
7122 | ac_cv_search_waddstr=no |
7123 | fi | |
7124 | rm conftest.$ac_ext | |
7125 | LIBS=$ac_func_search_save_LIBS | |
7126 | fi | |
7127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
7128 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
7129 | ac_res=$ac_cv_search_waddstr | |
7130 | if test "$ac_res" != no; then : | |
7131 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
7132 | |
7133 | fi | |
7134 | ||
7135 | ||
cb01cfba JB |
7136 | if test "$ac_cv_search_waddstr" != no; then |
7137 | curses_found=yes | |
7138 | fi | |
7139 | fi | |
7140 | ||
7141 | # Check whether we should enable the TUI, but only do so if we really | |
7142 | # can. | |
7143 | if test x"$enable_tui" != xno; then | |
7144 | if test -d $srcdir/tui; then | |
7145 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
7146 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
7147 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
7148 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
7149 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
7150 | else |
7151 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 7152 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 7153 | else |
81ecdfbb RW |
7154 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
7155 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
7156 | fi |
7157 | fi | |
7158 | fi | |
7159 | fi | |
7160 | ||
7161 | # Since GDB uses Readline, we need termcap functionality. In many | |
7162 | # cases this will be provided by the curses library, but some systems | |
7163 | # have a seperate termcap library, or no curses library at all. | |
7164 | ||
7165 | case $host_os in | |
7166 | cygwin*) | |
7167 | if test -d $srcdir/libtermcap; then | |
7168 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
7169 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
7170 | fi ;; | |
7171 | go32* | *djgpp*) | |
7172 | ac_cv_search_tgetent="none required" | |
7173 | ;; | |
7174 | *mingw32*) | |
7175 | ac_cv_search_tgetent="none required" | |
7176 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
7177 | ;; | |
7178 | esac | |
7179 | ||
7180 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
7181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
7182 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
7183 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7184 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7185 | else |
7186 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7187 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
7188 | /* end confdefs.h. */ |
7189 | ||
81ecdfbb RW |
7190 | /* Override any GCC internal prototype to avoid an error. |
7191 | Use char because int might match the return type of a GCC | |
7192 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7193 | #ifdef __cplusplus |
7194 | extern "C" | |
7195 | #endif | |
6c7a06a3 TT |
7196 | char tgetent (); |
7197 | int | |
7198 | main () | |
7199 | { | |
81ecdfbb | 7200 | return tgetent (); |
6c7a06a3 TT |
7201 | ; |
7202 | return 0; | |
7203 | } | |
7204 | _ACEOF | |
81ecdfbb RW |
7205 | for ac_lib in '' termcap tinfo curses ncurses; do |
7206 | if test -z "$ac_lib"; then | |
7207 | ac_res="none required" | |
7208 | else | |
7209 | ac_res=-l$ac_lib | |
6c7a06a3 | 7210 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7211 | fi |
7212 | if ac_fn_c_try_link "$LINENO"; then : | |
7213 | ac_cv_search_tgetent=$ac_res | |
7214 | fi | |
7215 | rm -f core conftest.err conftest.$ac_objext \ | |
7216 | conftest$ac_exeext | |
7217 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7218 | break | |
7219 | fi | |
7220 | done | |
7221 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 7222 | |
6c7a06a3 | 7223 | else |
81ecdfbb | 7224 | ac_cv_search_tgetent=no |
6c7a06a3 | 7225 | fi |
81ecdfbb | 7226 | rm conftest.$ac_ext |
6c7a06a3 TT |
7227 | LIBS=$ac_func_search_save_LIBS |
7228 | fi | |
81ecdfbb RW |
7229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7230 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7231 | ac_res=$ac_cv_search_tgetent | |
7232 | if test "$ac_res" != no; then : | |
7233 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7234 | |
06825bd1 MK |
7235 | fi |
7236 | ||
06825bd1 | 7237 | |
bec39cab | 7238 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 7239 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
7240 | fi |
7241 | ||
3841debe | 7242 | |
81ecdfbb RW |
7243 | # Check whether --with-system-readline was given. |
7244 | if test "${with_system_readline+set}" = set; then : | |
7245 | withval=$with_system_readline; | |
7246 | fi | |
6a30b0a5 | 7247 | |
6a30b0a5 AS |
7248 | |
7249 | if test "$with_system_readline" = yes; then | |
7250 | READLINE=-lreadline | |
7251 | READLINE_DEPS= | |
7252 | READLINE_CFLAGS= | |
39037522 | 7253 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7254 | else |
7255 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7256 | READLINE_DEPS='$(READLINE)' | |
7257 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7258 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7259 | fi |
7260 | ||
7261 | ||
7262 | ||
7263 | ||
7264 | ||
f997c383 SD |
7265 | # Generate jit-reader.h |
7266 | ||
7267 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7268 | TARGET_PTR= | |
7269 | ||
7270 | # The cast to long int works around a bug in the HP C Compiler | |
7271 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7272 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7273 | # This bug is HP SR number 8606223364. | |
7274 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7275 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7276 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7277 | $as_echo_n "(cached) " >&6 | |
7278 | else | |
7279 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7280 | ||
7281 | else | |
7282 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7283 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7284 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7285 | { as_fn_set_status 77 | |
7286 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7287 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7288 | else | |
7289 | ac_cv_sizeof_unsigned_long_long=0 | |
7290 | fi | |
7291 | fi | |
7292 | ||
7293 | fi | |
7294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7295 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7296 | ||
7297 | ||
7298 | ||
7299 | cat >>confdefs.h <<_ACEOF | |
7300 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7301 | _ACEOF | |
7302 | ||
7303 | ||
7304 | # The cast to long int works around a bug in the HP C Compiler | |
7305 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7306 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7307 | # This bug is HP SR number 8606223364. | |
7308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7309 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7310 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7311 | $as_echo_n "(cached) " >&6 | |
7312 | else | |
7313 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7314 | ||
7315 | else | |
7316 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7317 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7318 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7319 | { as_fn_set_status 77 | |
7320 | as_fn_error "cannot compute sizeof (unsigned long) | |
7321 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7322 | else | |
7323 | ac_cv_sizeof_unsigned_long=0 | |
7324 | fi | |
7325 | fi | |
7326 | ||
7327 | fi | |
7328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7329 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7330 | ||
7331 | ||
7332 | ||
7333 | cat >>confdefs.h <<_ACEOF | |
7334 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7335 | _ACEOF | |
7336 | ||
7337 | ||
7338 | # The cast to long int works around a bug in the HP C Compiler | |
7339 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7340 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7341 | # This bug is HP SR number 8606223364. | |
7342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7343 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7344 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7345 | $as_echo_n "(cached) " >&6 | |
7346 | else | |
7347 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7348 | ||
7349 | else | |
7350 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7351 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7352 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7353 | { as_fn_set_status 77 | |
7354 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7355 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7356 | else | |
7357 | ac_cv_sizeof_unsigned___int128=0 | |
7358 | fi | |
7359 | fi | |
7360 | ||
7361 | fi | |
7362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7363 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7364 | ||
7365 | ||
7366 | ||
7367 | cat >>confdefs.h <<_ACEOF | |
7368 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7369 | _ACEOF | |
7370 | ||
7371 | ||
7372 | ||
7373 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7374 | TARGET_PTR="unsigned long" | |
7375 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7376 | TARGET_PTR="unsigned long long" | |
7377 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7378 | TARGET_PTR="unsigned __int128" | |
7379 | else | |
7380 | TARGET_PTR="unsigned long" | |
7381 | fi | |
7382 | ||
7383 | ||
7384 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7385 | ||
7386 | ||
a2d08b9e SD |
7387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7388 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7389 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7390 | $as_echo_n "(cached) " >&6 | |
7391 | else | |
7392 | ac_func_search_save_LIBS=$LIBS | |
7393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7394 | /* end confdefs.h. */ | |
7395 | ||
7396 | /* Override any GCC internal prototype to avoid an error. | |
7397 | Use char because int might match the return type of a GCC | |
7398 | builtin and then its argument prototype would still apply. */ | |
7399 | #ifdef __cplusplus | |
7400 | extern "C" | |
7401 | #endif | |
7402 | char dlopen (); | |
7403 | int | |
7404 | main () | |
7405 | { | |
7406 | return dlopen (); | |
7407 | ; | |
7408 | return 0; | |
7409 | } | |
7410 | _ACEOF | |
7411 | for ac_lib in '' dl; do | |
7412 | if test -z "$ac_lib"; then | |
7413 | ac_res="none required" | |
7414 | else | |
7415 | ac_res=-l$ac_lib | |
7416 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7417 | fi | |
7418 | if ac_fn_c_try_link "$LINENO"; then : | |
7419 | ac_cv_search_dlopen=$ac_res | |
7420 | fi | |
7421 | rm -f core conftest.err conftest.$ac_objext \ | |
7422 | conftest$ac_exeext | |
7423 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7424 | break | |
7425 | fi | |
7426 | done | |
7427 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7428 | ||
7429 | else | |
7430 | ac_cv_search_dlopen=no | |
7431 | fi | |
7432 | rm conftest.$ac_ext | |
7433 | LIBS=$ac_func_search_save_LIBS | |
7434 | fi | |
7435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7436 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7437 | ac_res=$ac_cv_search_dlopen | |
7438 | if test "$ac_res" != no; then : | |
7439 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7440 | ||
7441 | fi | |
7442 | ||
7443 | ||
39037522 | 7444 | |
b8e0a31c SD |
7445 | |
7446 | # Check whether --with-jit-reader-dir was given. | |
7447 | if test "${with_jit_reader_dir+set}" = set; then : | |
7448 | withval=$with_jit_reader_dir; | |
7449 | JIT_READER_DIR=$withval | |
7450 | else | |
7451 | JIT_READER_DIR=${libdir}/gdb | |
7452 | fi | |
7453 | ||
7454 | ||
7455 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7456 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7457 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7458 | ac_define_dir=`eval echo $ac_define_dir` | |
7459 | ||
7460 | cat >>confdefs.h <<_ACEOF | |
7461 | #define JIT_READER_DIR "$ac_define_dir" | |
7462 | _ACEOF | |
7463 | ||
7464 | ||
7465 | ||
7466 | ||
7467 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7468 | if test "x$prefix" = xNONE; then | |
7469 | test_prefix=/usr/local | |
7470 | else | |
7471 | test_prefix=$prefix | |
7472 | fi | |
7473 | else | |
7474 | test_prefix=$exec_prefix | |
7475 | fi | |
7476 | value=0 | |
7477 | case ${ac_define_dir} in | |
7478 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7479 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7480 | value=1 | |
7481 | ;; | |
7482 | esac | |
7483 | ||
7484 | cat >>confdefs.h <<_ACEOF | |
7485 | #define JIT_READER_DIR_RELOCATABLE $value | |
7486 | _ACEOF | |
7487 | ||
7488 | ||
7489 | ||
7490 | ||
7491 | ||
81ecdfbb RW |
7492 | # Check whether --with-expat was given. |
7493 | if test "${with_expat+set}" = set; then : | |
7494 | withval=$with_expat; | |
5c39566f DJ |
7495 | else |
7496 | with_expat=auto | |
81ecdfbb RW |
7497 | fi |
7498 | ||
7499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7500 | $as_echo_n "checking whether to use expat... " >&6; } | |
7501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7502 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7503 | |
7504 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7505 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7506 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7507 | HAVE_LIBEXPAT=no |
7508 | else | |
7509 | ||
3841debe DJ |
7510 | if test "X$prefix" = "XNONE"; then |
7511 | acl_final_prefix="$ac_default_prefix" | |
7512 | else | |
7513 | acl_final_prefix="$prefix" | |
7514 | fi | |
7515 | if test "X$exec_prefix" = "XNONE"; then | |
7516 | acl_final_exec_prefix='${prefix}' | |
7517 | else | |
7518 | acl_final_exec_prefix="$exec_prefix" | |
7519 | fi | |
7520 | acl_save_prefix="$prefix" | |
7521 | prefix="$acl_final_prefix" | |
7522 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7523 | prefix="$acl_save_prefix" | |
7524 | ||
7525 | ||
81ecdfbb RW |
7526 | # Check whether --with-gnu-ld was given. |
7527 | if test "${with_gnu_ld+set}" = set; then : | |
7528 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7529 | else |
7530 | with_gnu_ld=no | |
81ecdfbb RW |
7531 | fi |
7532 | ||
3841debe DJ |
7533 | # Prepare PATH_SEPARATOR. |
7534 | # The user is always right. | |
7535 | if test "${PATH_SEPARATOR+set}" != set; then | |
7536 | echo "#! /bin/sh" >conf$$.sh | |
7537 | echo "exit 0" >>conf$$.sh | |
7538 | chmod +x conf$$.sh | |
7539 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7540 | PATH_SEPARATOR=';' | |
7541 | else | |
7542 | PATH_SEPARATOR=: | |
7543 | fi | |
7544 | rm -f conf$$.sh | |
7545 | fi | |
7546 | ac_prog=ld | |
7547 | if test "$GCC" = yes; then | |
7548 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7550 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7551 | case $host in |
7552 | *-*-mingw*) | |
7553 | # gcc leaves a trailing carriage return which upsets mingw | |
7554 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7555 | *) | |
7556 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7557 | esac | |
7558 | case $ac_prog in | |
7559 | # Accept absolute paths. | |
7560 | [\\/]* | [A-Za-z]:[\\/]*) | |
7561 | re_direlt='/[^/][^/]*/\.\./' | |
7562 | # Canonicalize the path of ld | |
7563 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7564 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7565 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7566 | done | |
7567 | test -z "$LD" && LD="$ac_prog" | |
7568 | ;; | |
7569 | "") | |
7570 | # If it fails, then pretend we aren't using GCC. | |
7571 | ac_prog=ld | |
7572 | ;; | |
7573 | *) | |
7574 | # If it is relative, then search for the first ld in PATH. | |
7575 | with_gnu_ld=unknown | |
7576 | ;; | |
7577 | esac | |
7578 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7580 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7581 | else |
81ecdfbb RW |
7582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7583 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7584 | fi |
81ecdfbb RW |
7585 | if test "${acl_cv_path_LD+set}" = set; then : |
7586 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7587 | else |
7588 | if test -z "$LD"; then | |
7589 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7590 | for ac_dir in $PATH; do | |
7591 | test -z "$ac_dir" && ac_dir=. | |
7592 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7593 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7594 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7595 | # but apparently some GNU ld's only accept -v. | |
7596 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7597 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7598 | test "$with_gnu_ld" != no && break | |
7599 | else | |
7600 | test "$with_gnu_ld" != yes && break | |
7601 | fi | |
7602 | fi | |
7603 | done | |
7604 | IFS="$ac_save_ifs" | |
7605 | else | |
7606 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7607 | fi | |
7608 | fi | |
7609 | ||
7610 | LD="$acl_cv_path_LD" | |
7611 | if test -n "$LD"; then | |
81ecdfbb RW |
7612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7613 | $as_echo "$LD" >&6; } | |
3841debe | 7614 | else |
81ecdfbb RW |
7615 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7616 | $as_echo "no" >&6; } | |
3841debe | 7617 | fi |
81ecdfbb RW |
7618 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7620 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7621 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7622 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7623 | else |
7624 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7625 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7626 | acl_cv_prog_gnu_ld=yes | |
7627 | else | |
7628 | acl_cv_prog_gnu_ld=no | |
7629 | fi | |
7630 | fi | |
81ecdfbb RW |
7631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7632 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7633 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7634 | ||
7635 | ||
7636 | ||
81ecdfbb RW |
7637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7638 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7639 | if test "${acl_cv_rpath+set}" = set; then : | |
7640 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7641 | else |
7642 | ||
7643 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7644 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7645 | . ./conftest.sh | |
7646 | rm -f ./conftest.sh | |
7647 | acl_cv_rpath=done | |
7648 | ||
7649 | fi | |
81ecdfbb RW |
7650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7651 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7652 | wl="$acl_cv_wl" |
7653 | libext="$acl_cv_libext" | |
7654 | shlibext="$acl_cv_shlibext" | |
7655 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7656 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7657 | hardcode_direct="$acl_cv_hardcode_direct" | |
7658 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7659 | # Check whether --enable-rpath was given. |
7660 | if test "${enable_rpath+set}" = set; then : | |
7661 | enableval=$enable_rpath; : | |
3841debe DJ |
7662 | else |
7663 | enable_rpath=yes | |
81ecdfbb RW |
7664 | fi |
7665 | ||
3841debe DJ |
7666 | |
7667 | ||
7668 | ||
7669 | ||
7670 | ||
7671 | ||
7672 | ||
7673 | ||
7674 | ||
7675 | use_additional=yes | |
7676 | ||
7677 | acl_save_prefix="$prefix" | |
7678 | prefix="$acl_final_prefix" | |
7679 | acl_save_exec_prefix="$exec_prefix" | |
7680 | exec_prefix="$acl_final_exec_prefix" | |
7681 | ||
7682 | eval additional_includedir=\"$includedir\" | |
7683 | eval additional_libdir=\"$libdir\" | |
7684 | ||
7685 | exec_prefix="$acl_save_exec_prefix" | |
7686 | prefix="$acl_save_prefix" | |
7687 | ||
7688 | ||
81ecdfbb RW |
7689 | # Check whether --with-libexpat-prefix was given. |
7690 | if test "${with_libexpat_prefix+set}" = set; then : | |
7691 | withval=$with_libexpat_prefix; | |
3841debe DJ |
7692 | if test "X$withval" = "Xno"; then |
7693 | use_additional=no | |
7694 | else | |
7695 | if test "X$withval" = "X"; then | |
7696 | ||
7697 | acl_save_prefix="$prefix" | |
7698 | prefix="$acl_final_prefix" | |
7699 | acl_save_exec_prefix="$exec_prefix" | |
7700 | exec_prefix="$acl_final_exec_prefix" | |
7701 | ||
7702 | eval additional_includedir=\"$includedir\" | |
7703 | eval additional_libdir=\"$libdir\" | |
7704 | ||
7705 | exec_prefix="$acl_save_exec_prefix" | |
7706 | prefix="$acl_save_prefix" | |
7707 | ||
7708 | else | |
7709 | additional_includedir="$withval/include" | |
7710 | additional_libdir="$withval/lib" | |
7711 | fi | |
7712 | fi | |
7713 | ||
81ecdfbb RW |
7714 | fi |
7715 | ||
3841debe DJ |
7716 | LIBEXPAT= |
7717 | LTLIBEXPAT= | |
7718 | INCEXPAT= | |
7719 | rpathdirs= | |
7720 | ltrpathdirs= | |
7721 | names_already_handled= | |
7722 | names_next_round='expat ' | |
7723 | while test -n "$names_next_round"; do | |
7724 | names_this_round="$names_next_round" | |
7725 | names_next_round= | |
7726 | for name in $names_this_round; do | |
7727 | already_handled= | |
7728 | for n in $names_already_handled; do | |
7729 | if test "$n" = "$name"; then | |
7730 | already_handled=yes | |
7731 | break | |
7732 | fi | |
7733 | done | |
7734 | if test -z "$already_handled"; then | |
7735 | names_already_handled="$names_already_handled $name" | |
7736 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7737 | eval value=\"\$HAVE_LIB$uppername\" | |
7738 | if test -n "$value"; then | |
7739 | if test "$value" = yes; then | |
7740 | eval value=\"\$LIB$uppername\" | |
7741 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
7742 | eval value=\"\$LTLIB$uppername\" | |
7743 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
7744 | else | |
7745 | : | |
7746 | fi | |
7747 | else | |
7748 | found_dir= | |
7749 | found_la= | |
7750 | found_so= | |
7751 | found_a= | |
7752 | if test $use_additional = yes; then | |
7753 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7754 | found_dir="$additional_libdir" | |
7755 | found_so="$additional_libdir/lib$name.$shlibext" | |
7756 | if test -f "$additional_libdir/lib$name.la"; then | |
7757 | found_la="$additional_libdir/lib$name.la" | |
7758 | fi | |
7759 | else | |
7760 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7761 | found_dir="$additional_libdir" | |
7762 | found_a="$additional_libdir/lib$name.$libext" | |
7763 | if test -f "$additional_libdir/lib$name.la"; then | |
7764 | found_la="$additional_libdir/lib$name.la" | |
7765 | fi | |
7766 | fi | |
7767 | fi | |
7768 | fi | |
7769 | if test "X$found_dir" = "X"; then | |
7770 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7771 | ||
7772 | acl_save_prefix="$prefix" | |
7773 | prefix="$acl_final_prefix" | |
7774 | acl_save_exec_prefix="$exec_prefix" | |
7775 | exec_prefix="$acl_final_exec_prefix" | |
7776 | eval x=\"$x\" | |
7777 | exec_prefix="$acl_save_exec_prefix" | |
7778 | prefix="$acl_save_prefix" | |
7779 | ||
7780 | case "$x" in | |
7781 | -L*) | |
7782 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7783 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7784 | found_dir="$dir" | |
7785 | found_so="$dir/lib$name.$shlibext" | |
7786 | if test -f "$dir/lib$name.la"; then | |
7787 | found_la="$dir/lib$name.la" | |
7788 | fi | |
7789 | else | |
7790 | if test -f "$dir/lib$name.$libext"; then | |
7791 | found_dir="$dir" | |
7792 | found_a="$dir/lib$name.$libext" | |
7793 | if test -f "$dir/lib$name.la"; then | |
7794 | found_la="$dir/lib$name.la" | |
7795 | fi | |
7796 | fi | |
7797 | fi | |
7798 | ;; | |
7799 | esac | |
7800 | if test "X$found_dir" != "X"; then | |
7801 | break | |
7802 | fi | |
7803 | done | |
7804 | fi | |
7805 | if test "X$found_dir" != "X"; then | |
7806 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
7807 | if test "X$found_so" != "X"; then | |
7808 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7809 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7810 | else | |
7811 | haveit= | |
7812 | for x in $ltrpathdirs; do | |
7813 | if test "X$x" = "X$found_dir"; then | |
7814 | haveit=yes | |
7815 | break | |
7816 | fi | |
7817 | done | |
7818 | if test -z "$haveit"; then | |
7819 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7820 | fi | |
7821 | if test "$hardcode_direct" = yes; then | |
7822 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7823 | else | |
7824 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7825 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7826 | haveit= | |
7827 | for x in $rpathdirs; do | |
7828 | if test "X$x" = "X$found_dir"; then | |
7829 | haveit=yes | |
7830 | break | |
7831 | fi | |
7832 | done | |
7833 | if test -z "$haveit"; then | |
7834 | rpathdirs="$rpathdirs $found_dir" | |
7835 | fi | |
7836 | else | |
7837 | haveit= | |
7838 | for x in $LDFLAGS $LIBEXPAT; do | |
7839 | ||
7840 | acl_save_prefix="$prefix" | |
7841 | prefix="$acl_final_prefix" | |
7842 | acl_save_exec_prefix="$exec_prefix" | |
7843 | exec_prefix="$acl_final_exec_prefix" | |
7844 | eval x=\"$x\" | |
7845 | exec_prefix="$acl_save_exec_prefix" | |
7846 | prefix="$acl_save_prefix" | |
7847 | ||
7848 | if test "X$x" = "X-L$found_dir"; then | |
7849 | haveit=yes | |
7850 | break | |
7851 | fi | |
7852 | done | |
7853 | if test -z "$haveit"; then | |
7854 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
7855 | fi | |
7856 | if test "$hardcode_minus_L" != no; then | |
7857 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7858 | else | |
7859 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7860 | fi | |
7861 | fi | |
7862 | fi | |
7863 | fi | |
7864 | else | |
7865 | if test "X$found_a" != "X"; then | |
7866 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
7867 | else | |
7868 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
7869 | fi | |
7870 | fi | |
7871 | additional_includedir= | |
7872 | case "$found_dir" in | |
7873 | */lib | */lib/) | |
7874 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7875 | additional_includedir="$basedir/include" | |
7876 | ;; | |
7877 | esac | |
7878 | if test "X$additional_includedir" != "X"; then | |
7879 | if test "X$additional_includedir" != "X/usr/include"; then | |
7880 | haveit= | |
7881 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7882 | if test -n "$GCC"; then | |
7883 | case $host_os in | |
7884 | linux*) haveit=yes;; | |
7885 | esac | |
7886 | fi | |
7887 | fi | |
7888 | if test -z "$haveit"; then | |
7889 | for x in $CPPFLAGS $INCEXPAT; do | |
7890 | ||
7891 | acl_save_prefix="$prefix" | |
7892 | prefix="$acl_final_prefix" | |
7893 | acl_save_exec_prefix="$exec_prefix" | |
7894 | exec_prefix="$acl_final_exec_prefix" | |
7895 | eval x=\"$x\" | |
7896 | exec_prefix="$acl_save_exec_prefix" | |
7897 | prefix="$acl_save_prefix" | |
7898 | ||
7899 | if test "X$x" = "X-I$additional_includedir"; then | |
7900 | haveit=yes | |
7901 | break | |
7902 | fi | |
7903 | done | |
7904 | if test -z "$haveit"; then | |
7905 | if test -d "$additional_includedir"; then | |
7906 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
7907 | fi | |
7908 | fi | |
7909 | fi | |
7910 | fi | |
7911 | fi | |
7912 | if test -n "$found_la"; then | |
7913 | save_libdir="$libdir" | |
7914 | case "$found_la" in | |
7915 | */* | *\\*) . "$found_la" ;; | |
7916 | *) . "./$found_la" ;; | |
7917 | esac | |
7918 | libdir="$save_libdir" | |
7919 | for dep in $dependency_libs; do | |
7920 | case "$dep" in | |
7921 | -L*) | |
7922 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7923 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7924 | haveit= | |
7925 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7926 | if test -n "$GCC"; then | |
7927 | case $host_os in | |
7928 | linux*) haveit=yes;; | |
7929 | esac | |
7930 | fi | |
7931 | fi | |
7932 | if test -z "$haveit"; then | |
7933 | haveit= | |
7934 | for x in $LDFLAGS $LIBEXPAT; do | |
7935 | ||
7936 | acl_save_prefix="$prefix" | |
7937 | prefix="$acl_final_prefix" | |
7938 | acl_save_exec_prefix="$exec_prefix" | |
7939 | exec_prefix="$acl_final_exec_prefix" | |
7940 | eval x=\"$x\" | |
7941 | exec_prefix="$acl_save_exec_prefix" | |
7942 | prefix="$acl_save_prefix" | |
7943 | ||
7944 | if test "X$x" = "X-L$additional_libdir"; then | |
7945 | haveit=yes | |
7946 | break | |
7947 | fi | |
7948 | done | |
7949 | if test -z "$haveit"; then | |
7950 | if test -d "$additional_libdir"; then | |
7951 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
7952 | fi | |
7953 | fi | |
7954 | haveit= | |
7955 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7956 | ||
7957 | acl_save_prefix="$prefix" | |
7958 | prefix="$acl_final_prefix" | |
7959 | acl_save_exec_prefix="$exec_prefix" | |
7960 | exec_prefix="$acl_final_exec_prefix" | |
7961 | eval x=\"$x\" | |
7962 | exec_prefix="$acl_save_exec_prefix" | |
7963 | prefix="$acl_save_prefix" | |
7964 | ||
7965 | if test "X$x" = "X-L$additional_libdir"; then | |
7966 | haveit=yes | |
7967 | break | |
7968 | fi | |
7969 | done | |
7970 | if test -z "$haveit"; then | |
7971 | if test -d "$additional_libdir"; then | |
7972 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
7973 | fi | |
7974 | fi | |
7975 | fi | |
7976 | fi | |
7977 | ;; | |
7978 | -R*) | |
7979 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7980 | if test "$enable_rpath" != no; then | |
7981 | haveit= | |
7982 | for x in $rpathdirs; do | |
7983 | if test "X$x" = "X$dir"; then | |
7984 | haveit=yes | |
7985 | break | |
7986 | fi | |
7987 | done | |
7988 | if test -z "$haveit"; then | |
7989 | rpathdirs="$rpathdirs $dir" | |
7990 | fi | |
7991 | haveit= | |
7992 | for x in $ltrpathdirs; do | |
7993 | if test "X$x" = "X$dir"; then | |
7994 | haveit=yes | |
7995 | break | |
7996 | fi | |
7997 | done | |
7998 | if test -z "$haveit"; then | |
7999 | ltrpathdirs="$ltrpathdirs $dir" | |
8000 | fi | |
8001 | fi | |
8002 | ;; | |
8003 | -l*) | |
8004 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8005 | ;; | |
8006 | *.la) | |
8007 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8008 | ;; | |
8009 | *) | |
8010 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
8011 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
8012 | ;; | |
81ecdfbb RW |
8013 | esac |
8014 | done | |
8015 | fi | |
8016 | else | |
8017 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
8018 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
8019 | fi | |
8020 | fi | |
8021 | fi | |
8022 | done | |
8023 | done | |
8024 | if test "X$rpathdirs" != "X"; then | |
8025 | if test -n "$hardcode_libdir_separator"; then | |
8026 | alldirs= | |
8027 | for found_dir in $rpathdirs; do | |
8028 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8029 | done | |
8030 | acl_save_libdir="$libdir" | |
8031 | libdir="$alldirs" | |
8032 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8033 | libdir="$acl_save_libdir" | |
8034 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
8035 | else | |
8036 | for found_dir in $rpathdirs; do | |
8037 | acl_save_libdir="$libdir" | |
8038 | libdir="$found_dir" | |
8039 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8040 | libdir="$acl_save_libdir" | |
8041 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
8042 | done | |
8043 | fi | |
8044 | fi | |
8045 | if test "X$ltrpathdirs" != "X"; then | |
8046 | for found_dir in $ltrpathdirs; do | |
8047 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
8048 | done | |
8049 | fi | |
a9322a30 TT |
8050 | |
8051 | ||
81ecdfbb | 8052 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 8053 | |
81ecdfbb RW |
8054 | for element in $INCEXPAT; do |
8055 | haveit= | |
8056 | for x in $CPPFLAGS; do | |
a9322a30 | 8057 | |
81ecdfbb RW |
8058 | acl_save_prefix="$prefix" |
8059 | prefix="$acl_final_prefix" | |
8060 | acl_save_exec_prefix="$exec_prefix" | |
8061 | exec_prefix="$acl_final_exec_prefix" | |
8062 | eval x=\"$x\" | |
8063 | exec_prefix="$acl_save_exec_prefix" | |
8064 | prefix="$acl_save_prefix" | |
a8111142 | 8065 | |
81ecdfbb RW |
8066 | if test "X$x" = "X$element"; then |
8067 | haveit=yes | |
8068 | break | |
8069 | fi | |
8070 | done | |
8071 | if test -z "$haveit"; then | |
8072 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8073 | fi | |
8074 | done | |
a9322a30 TT |
8075 | |
8076 | ||
81ecdfbb RW |
8077 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
8078 | $as_echo_n "checking for libexpat... " >&6; } | |
8079 | if test "${ac_cv_libexpat+set}" = set; then : | |
8080 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8081 | else |
bec39cab | 8082 | |
81ecdfbb RW |
8083 | ac_save_LIBS="$LIBS" |
8084 | LIBS="$LIBS $LIBEXPAT" | |
8085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8086 | /* end confdefs.h. */ |
81ecdfbb RW |
8087 | #include "expat.h" |
8088 | int | |
8089 | main () | |
8090 | { | |
8091 | XML_Parser p = XML_ParserCreate (0); | |
8092 | ; | |
8093 | return 0; | |
8094 | } | |
bec39cab | 8095 | _ACEOF |
81ecdfbb RW |
8096 | if ac_fn_c_try_link "$LINENO"; then : |
8097 | ac_cv_libexpat=yes | |
c906108c | 8098 | else |
81ecdfbb | 8099 | ac_cv_libexpat=no |
bec39cab | 8100 | fi |
81ecdfbb RW |
8101 | rm -f core conftest.err conftest.$ac_objext \ |
8102 | conftest$ac_exeext conftest.$ac_ext | |
8103 | LIBS="$ac_save_LIBS" | |
c906108c | 8104 | |
95ca63c4 | 8105 | fi |
81ecdfbb RW |
8106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
8107 | $as_echo "$ac_cv_libexpat" >&6; } | |
8108 | if test "$ac_cv_libexpat" = yes; then | |
8109 | HAVE_LIBEXPAT=yes | |
bec39cab | 8110 | |
81ecdfbb | 8111 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 8112 | |
81ecdfbb RW |
8113 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
8114 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
8115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
8116 | $as_echo "$LIBEXPAT" >&6; } | |
8117 | else | |
8118 | HAVE_LIBEXPAT=no | |
8119 | CPPFLAGS="$ac_save_CPPFLAGS" | |
8120 | LIBEXPAT= | |
8121 | LTLIBEXPAT= | |
8122 | fi | |
95ca63c4 CF |
8123 | |
8124 | ||
8125 | ||
7cb9022a MK |
8126 | |
8127 | ||
bec39cab | 8128 | |
81ecdfbb RW |
8129 | if test "$HAVE_LIBEXPAT" != yes; then |
8130 | if test "$with_expat" = yes; then | |
8131 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
8132 | else | |
8133 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
8134 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
8135 | fi | |
8136 | else | |
8137 | save_LIBS=$LIBS | |
8138 | LIBS="$LIBS $LIBEXPAT" | |
8139 | for ac_func in XML_StopParser | |
8140 | do : | |
8141 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
8142 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 8143 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8144 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 8145 | _ACEOF |
95ca63c4 | 8146 | |
bec39cab | 8147 | fi |
bec39cab | 8148 | done |
95ca63c4 | 8149 | |
81ecdfbb RW |
8150 | LIBS=$save_LIBS |
8151 | fi | |
a9322a30 TT |
8152 | fi |
8153 | ||
d344e670 DE |
8154 | # --------------------- # |
8155 | # Check for libpython. # | |
8156 | # --------------------- # | |
8157 | ||
a9322a30 | 8158 | |
a9322a30 TT |
8159 | |
8160 | ||
ec685c5e | 8161 | |
0c4a4063 | 8162 | |
81ecdfbb RW |
8163 | # Check whether --with-python was given. |
8164 | if test "${with_python+set}" = set; then : | |
8165 | withval=$with_python; | |
bec39cab | 8166 | else |
81ecdfbb | 8167 | with_python=auto |
bec39cab | 8168 | fi |
bec39cab | 8169 | |
81ecdfbb RW |
8170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
8171 | $as_echo_n "checking whether to use python... " >&6; } | |
8172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
8173 | $as_echo "$with_python" >&6; } | |
9a156167 | 8174 | |
81ecdfbb RW |
8175 | if test "${with_python}" = no; then |
8176 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
8177 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
8178 | have_libpython=no | |
bec39cab | 8179 | else |
81ecdfbb | 8180 | case "${with_python}" in |
8c85a4e2 | 8181 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
8182 | if test -d ${with_python}; then |
8183 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 8184 | python_prog="${with_python}/bin/python" |
0c4a4063 | 8185 | python_prefix= |
9c4ea6c5 JB |
8186 | # If python does not exit ${with_python}/bin, then try in |
8187 | # ${with_python}. On Windows/MinGW, this is where the Python | |
8188 | # executable is. | |
8189 | if test ! -x "${python_prog}"; then | |
8190 | python_prog="${with_python}/python" | |
8191 | python_prefix= | |
8192 | fi | |
e7a30f46 | 8193 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
8194 | # Fall back to gdb 7.0/7.1 behaviour. |
8195 | python_prog=missing | |
0c4a4063 | 8196 | python_prefix=${with_python} |
ec685c5e | 8197 | fi |
e7a30f46 | 8198 | elif test -x "${with_python}"; then |
ec685c5e DE |
8199 | # While we can't run python compiled for $host (unless host == build), |
8200 | # the user could write a script that provides the needed information, | |
8201 | # so we support that. | |
ec685c5e | 8202 | python_prog=${with_python} |
0c4a4063 | 8203 | python_prefix= |
ec685c5e DE |
8204 | else |
8205 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
8206 | fi | |
81ecdfbb | 8207 | ;; |
ec685c5e DE |
8208 | */*) |
8209 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
8210 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
8211 | ;; | |
ec685c5e DE |
8212 | *) |
8213 | # The user has either specified auto, yes, or the name of the python | |
8214 | # program assumed to be in $PATH. | |
8215 | python_prefix= | |
8216 | case "${with_python}" in | |
8217 | yes | auto) | |
8218 | if test ${build} = ${host}; then | |
8219 | # Extract the first word of "python", so it can be a program name with args. | |
8220 | set dummy python; ac_word=$2 | |
8221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8222 | $as_echo_n "checking for $ac_word... " >&6; } | |
8223 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8224 | $as_echo_n "(cached) " >&6 | |
8225 | else | |
8226 | case $python_prog_path in | |
8227 | [\\/]* | ?:[\\/]*) | |
8228 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8229 | ;; | |
8230 | *) | |
8231 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8232 | for as_dir in $PATH | |
8233 | do | |
8234 | IFS=$as_save_IFS | |
8235 | test -z "$as_dir" && as_dir=. | |
8236 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8237 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8238 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8239 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8240 | break 2 | |
8241 | fi | |
8242 | done | |
8243 | done | |
8244 | IFS=$as_save_IFS | |
8245 | ||
8246 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8247 | ;; | |
8248 | esac | |
8249 | fi | |
8250 | python_prog_path=$ac_cv_path_python_prog_path | |
8251 | if test -n "$python_prog_path"; then | |
8252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8253 | $as_echo "$python_prog_path" >&6; } | |
8254 | else | |
8255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8256 | $as_echo "no" >&6; } | |
8257 | fi | |
8258 | ||
8259 | ||
8260 | if test "${python_prog_path}" = missing; then | |
8261 | python_prog=missing | |
8262 | else | |
8263 | python_prog=${python_prog_path} | |
8264 | fi | |
8265 | else | |
8266 | # Not much we can do except assume the cross-compiler will find the | |
8267 | # right files. | |
8268 | python_prog=missing | |
8269 | fi | |
8270 | ;; | |
8271 | *) | |
8272 | # While we can't run python compiled for $host (unless host == build), | |
8273 | # the user could write a script that provides the needed information, | |
8274 | # so we support that. | |
8275 | python_prog="${with_python}" | |
8276 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8277 | set dummy ${python_prog}; ac_word=$2 | |
8278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8279 | $as_echo_n "checking for $ac_word... " >&6; } | |
8280 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8281 | $as_echo_n "(cached) " >&6 | |
8282 | else | |
8283 | case $python_prog_path in | |
8284 | [\\/]* | ?:[\\/]*) | |
8285 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8286 | ;; | |
8287 | *) | |
8288 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8289 | for as_dir in $PATH | |
8290 | do | |
8291 | IFS=$as_save_IFS | |
8292 | test -z "$as_dir" && as_dir=. | |
8293 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8294 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8295 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8296 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8297 | break 2 | |
8298 | fi | |
8299 | done | |
8300 | done | |
8301 | IFS=$as_save_IFS | |
8302 | ||
8303 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8304 | ;; | |
8305 | esac | |
8306 | fi | |
8307 | python_prog_path=$ac_cv_path_python_prog_path | |
8308 | if test -n "$python_prog_path"; then | |
8309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8310 | $as_echo "$python_prog_path" >&6; } | |
8311 | else | |
8312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8313 | $as_echo "no" >&6; } | |
8314 | fi | |
8315 | ||
8316 | ||
8317 | if test "${python_prog_path}" = missing; then | |
8318 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8319 | fi | |
8320 | ;; | |
8321 | esac | |
81ecdfbb RW |
8322 | esac |
8323 | ||
ec685c5e | 8324 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8325 | # We have a python program to use, but it may be too old. |
8326 | # Don't flag an error for --with-python=auto (the default). | |
8327 | have_python_config=yes | |
ec685c5e DE |
8328 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8329 | if test $? != 0; then | |
e7a30f46 DE |
8330 | have_python_config=failed |
8331 | if test "${with_python}" != auto; then | |
8332 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8333 | fi | |
ec685c5e DE |
8334 | fi |
8335 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8336 | if test $? != 0; then | |
e7a30f46 DE |
8337 | have_python_config=failed |
8338 | if test "${with_python}" != auto; then | |
8339 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8340 | fi | |
ec685c5e | 8341 | fi |
0c4a4063 DE |
8342 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8343 | if test $? != 0; then | |
e7a30f46 DE |
8344 | have_python_config=failed |
8345 | if test "${with_python}" != auto; then | |
8346 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8347 | fi | |
0c4a4063 | 8348 | fi |
ec685c5e | 8349 | else |
ac534cba JB |
8350 | # We do not have a python executable we can use to determine where |
8351 | # to find the Python headers and libs. We cannot guess the include | |
8352 | # path from the python_prefix either, because that include path | |
8353 | # depends on the Python version. So, there is nothing much we can | |
8354 | # do except assume that the compiler will be able to find those files. | |
8355 | python_includes= | |
8356 | python_libs= | |
0c4a4063 | 8357 | have_python_config=no |
ec685c5e | 8358 | fi |
bec39cab | 8359 | |
ec685c5e DE |
8360 | # If we have python-config, only try the configuration it provides. |
8361 | # Otherwise fallback on the old way of trying different versions of | |
8362 | # python in turn. | |
81ecdfbb | 8363 | |
ec685c5e DE |
8364 | have_libpython=no |
8365 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8366 | # Determine the Python version by extracting "-lpython<version>" |
8367 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8368 | # being decimal numbers, but can also be XY (seen on Windows). | |
8369 | # | |
8370 | # The extraction is performed using sed with a regular expression. | |
8371 | # Initially, the regexp used was using the '?' quantifier to make | |
8372 | # the dot in the version number optional. Unfortunately, this | |
8373 | # does not work with non-GNU versions of sed because, because of | |
8374 | # what looks like a limitation (the '?' quantifier does not work | |
8375 | # with back-references). We work around this limitation by using | |
8376 | # the '*' quantifier instead. It means that, in theory, we might | |
8377 | # match unexpected version strings such as "-lpython2..7", but | |
8378 | # this seems unlikely in practice. And even if that happens, | |
8379 | # an error will be triggered later on, when checking that version | |
8380 | # number. | |
ec685c5e | 8381 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8382 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8383 | case "${python_version}" in |
8384 | python*) | |
ec685c5e DE |
8385 | |
8386 | version=${python_version} | |
8387 | ||
8388 | new_CPPFLAGS=${python_includes} | |
8389 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8391 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8392 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8393 | save_LIBS=$LIBS |
ec685c5e DE |
8394 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8395 | LIBS="$LIBS $new_LIBS" | |
8396 | found_usable_python=no | |
81ecdfbb | 8397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8398 | /* end confdefs.h. */ |
ac534cba | 8399 | #include "Python.h" |
81ecdfbb RW |
8400 | int |
8401 | main () | |
8402 | { | |
8403 | Py_Initialize (); | |
8404 | ; | |
8405 | return 0; | |
8406 | } | |
bec39cab | 8407 | _ACEOF |
81ecdfbb | 8408 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8409 | have_libpython=${version} |
8410 | found_usable_python=yes | |
ac534cba JB |
8411 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8412 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8413 | fi |
81ecdfbb RW |
8414 | rm -f core conftest.err conftest.$ac_objext \ |
8415 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8416 | CPPFLAGS=$save_CPPFLAGS |
8417 | LIBS=$save_LIBS | |
ec685c5e DE |
8418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8419 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8420 | |
0c4a4063 DE |
8421 | ;; |
8422 | *) | |
ec685c5e | 8423 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8424 | ;; |
8425 | esac | |
e7a30f46 | 8426 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8427 | if test "${have_libpython}" = no; then |
9a156167 | 8428 | |
420697bb TT |
8429 | version=python2.7 |
8430 | ||
8431 | new_CPPFLAGS=${python_includes} | |
8432 | new_LIBS="${python_libs} -lpython2.7" | |
8433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8434 | $as_echo_n "checking for ${version}... " >&6; } | |
8435 | save_CPPFLAGS=$CPPFLAGS | |
8436 | save_LIBS=$LIBS | |
8437 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8438 | LIBS="$LIBS $new_LIBS" | |
8439 | found_usable_python=no | |
8440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8441 | /* end confdefs.h. */ | |
ac534cba | 8442 | #include "Python.h" |
420697bb TT |
8443 | int |
8444 | main () | |
8445 | { | |
8446 | Py_Initialize (); | |
8447 | ; | |
8448 | return 0; | |
8449 | } | |
8450 | _ACEOF | |
8451 | if ac_fn_c_try_link "$LINENO"; then : | |
8452 | have_libpython=${version} | |
8453 | found_usable_python=yes | |
ac534cba JB |
8454 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8455 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
8456 | fi |
8457 | rm -f core conftest.err conftest.$ac_objext \ | |
8458 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8459 | CPPFLAGS=$save_CPPFLAGS |
8460 | LIBS=$save_LIBS | |
420697bb TT |
8461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8462 | $as_echo "${found_usable_python}" >&6; } | |
8463 | ||
8464 | fi | |
8465 | if test "${have_libpython}" = no; then | |
8466 | ||
ec685c5e DE |
8467 | version=python2.6 |
8468 | ||
8469 | new_CPPFLAGS=${python_includes} | |
8470 | new_LIBS="${python_libs} -lpython2.6" | |
8471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8472 | $as_echo_n "checking for ${version}... " >&6; } | |
8473 | save_CPPFLAGS=$CPPFLAGS | |
8474 | save_LIBS=$LIBS | |
8475 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8476 | LIBS="$LIBS $new_LIBS" | |
8477 | found_usable_python=no | |
8478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8479 | /* end confdefs.h. */ | |
ac534cba | 8480 | #include "Python.h" |
ec685c5e DE |
8481 | int |
8482 | main () | |
8483 | { | |
8484 | Py_Initialize (); | |
8485 | ; | |
8486 | return 0; | |
8487 | } | |
8488 | _ACEOF | |
8489 | if ac_fn_c_try_link "$LINENO"; then : | |
8490 | have_libpython=${version} | |
8491 | found_usable_python=yes | |
ac534cba JB |
8492 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8493 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8494 | fi |
8495 | rm -f core conftest.err conftest.$ac_objext \ | |
8496 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8497 | CPPFLAGS=$save_CPPFLAGS |
8498 | LIBS=$save_LIBS | |
ec685c5e DE |
8499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8500 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8501 | |
81ecdfbb | 8502 | fi |
ec685c5e | 8503 | if test ${have_libpython} = no; then |
9a156167 | 8504 | |
81ecdfbb | 8505 | version=python2.5 |
9a156167 | 8506 | |
ec685c5e DE |
8507 | new_CPPFLAGS=${python_includes} |
8508 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
8509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8510 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8511 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8512 | save_LIBS=$LIBS |
ec685c5e DE |
8513 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8514 | LIBS="$LIBS $new_LIBS" | |
8515 | found_usable_python=no | |
81ecdfbb | 8516 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8517 | /* end confdefs.h. */ |
ac534cba | 8518 | #include "Python.h" |
81ecdfbb RW |
8519 | int |
8520 | main () | |
8521 | { | |
8522 | Py_Initialize (); | |
8523 | ; | |
8524 | return 0; | |
8525 | } | |
436868fb | 8526 | _ACEOF |
81ecdfbb | 8527 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8528 | have_libpython=${version} |
8529 | found_usable_python=yes | |
ac534cba JB |
8530 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8531 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8532 | fi |
81ecdfbb RW |
8533 | rm -f core conftest.err conftest.$ac_objext \ |
8534 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8535 | CPPFLAGS=$save_CPPFLAGS |
8536 | LIBS=$save_LIBS | |
ec685c5e DE |
8537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8538 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 8539 | |
81ecdfbb | 8540 | fi |
ec685c5e | 8541 | if test ${have_libpython} = no; then |
a9322a30 | 8542 | |
81ecdfbb | 8543 | version=python2.4 |
a9322a30 | 8544 | |
ec685c5e DE |
8545 | new_CPPFLAGS=${python_includes} |
8546 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8548 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8549 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8550 | save_LIBS=$LIBS |
ec685c5e DE |
8551 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8552 | LIBS="$LIBS $new_LIBS" | |
8553 | found_usable_python=no | |
81ecdfbb | 8554 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8555 | /* end confdefs.h. */ |
ac534cba | 8556 | #include "Python.h" |
a9322a30 TT |
8557 | int |
8558 | main () | |
8559 | { | |
81ecdfbb | 8560 | Py_Initialize (); |
a9322a30 TT |
8561 | ; |
8562 | return 0; | |
8563 | } | |
436868fb | 8564 | _ACEOF |
81ecdfbb | 8565 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8566 | have_libpython=${version} |
8567 | found_usable_python=yes | |
ac534cba JB |
8568 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8569 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8570 | fi |
81ecdfbb RW |
8571 | rm -f core conftest.err conftest.$ac_objext \ |
8572 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8573 | CPPFLAGS=$save_CPPFLAGS |
8574 | LIBS=$save_LIBS | |
ec685c5e DE |
8575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8576 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8577 | |
ec685c5e DE |
8578 | fi |
8579 | fi | |
9c4ea6c5 | 8580 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8581 | |
8582 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8583 | ||
9c4ea6c5 | 8584 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8585 | |
8586 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8587 | ||
9c4ea6c5 | 8588 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8589 | |
8590 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8591 | ||
9c4ea6c5 | 8592 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8593 | |
8594 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8595 | ||
81ecdfbb | 8596 | fi |
ec685c5e DE |
8597 | |
8598 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8599 | case "${with_python}" in |
8600 | yes) | |
8601 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8602 | ;; | |
8603 | auto) | |
8604 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8605 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8606 | ;; | |
8607 | *) | |
8608 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8609 | ;; | |
8610 | esac | |
0c4a4063 DE |
8611 | else |
8612 | if test -n "${python_prefix}"; then | |
8613 | ||
8614 | cat >>confdefs.h <<_ACEOF | |
8615 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8616 | _ACEOF | |
8617 | ||
8618 | ||
8619 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8620 | if test "x$prefix" = xNONE; then | |
8621 | test_prefix=/usr/local | |
8622 | else | |
8623 | test_prefix=$prefix | |
8624 | fi | |
8625 | else | |
8626 | test_prefix=$exec_prefix | |
8627 | fi | |
8628 | value=0 | |
8629 | case ${python_prefix} in | |
8630 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8631 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8632 | value=1 | |
8633 | ;; | |
8634 | esac | |
8635 | ||
8636 | cat >>confdefs.h <<_ACEOF | |
8637 | #define PYTHON_PATH_RELOCATABLE $value | |
8638 | _ACEOF | |
8639 | ||
8640 | ||
8641 | fi | |
81ecdfbb | 8642 | fi |
436868fb | 8643 | fi |
436868fb | 8644 | |
ec685c5e | 8645 | if test "${have_libpython}" != no; then |
436868fb | 8646 | |
81ecdfbb | 8647 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8648 | |
81ecdfbb RW |
8649 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8650 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8651 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8652 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8653 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8654 | |
81ecdfbb RW |
8655 | # Flags needed to compile Python code (taken from python-config --cflags). |
8656 | # We cannot call python-config directly because it will output whatever was | |
8657 | # used when compiling the Python interpreter itself, including flags which | |
8658 | # would make the python-related objects be compiled differently from the | |
8659 | # rest of GDB (e.g., -O2 and -fPIC). | |
8660 | if test "${GCC}" = yes; then | |
8661 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8662 | fi | |
436868fb | 8663 | |
81ecdfbb RW |
8664 | if test "x${tentative_python_cflags}" != x; then |
8665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8666 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
8667 | for flag in ${tentative_python_cflags}; do | |
8668 | # Check that the compiler accepts it | |
8669 | saved_CFLAGS="$CFLAGS" | |
8670 | CFLAGS="$CFLAGS $flag" | |
8671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8672 | /* end confdefs.h. */ |
81ecdfbb | 8673 | |
a9322a30 TT |
8674 | int |
8675 | main () | |
8676 | { | |
a9322a30 TT |
8677 | |
8678 | ; | |
8679 | return 0; | |
8680 | } | |
bec39cab | 8681 | _ACEOF |
81ecdfbb RW |
8682 | if ac_fn_c_try_compile "$LINENO"; then : |
8683 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 8684 | fi |
81ecdfbb RW |
8685 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8686 | CFLAGS="$saved_CFLAGS" | |
8687 | done | |
8688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
8689 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
8690 | fi | |
043b6510 | 8691 | |
c83393b9 JB |
8692 | # On x64 Windows, Python's include headers, and pyconfig.h in |
8693 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
8694 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
8695 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
8696 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
8697 | # The issue was reported to the Python community, but still isn't | |
8698 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
8699 | ||
043b6510 | 8700 | case "$gdb_host" in |
c83393b9 JB |
8701 | mingw64) |
8702 | if test "${GCC}" = yes; then | |
8703 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
8704 | fi | |
8705 | ;; | |
043b6510 | 8706 | esac |
a8db4212 YPK |
8707 | |
8708 | # Note that "python -m threading" cannot be used to check for | |
8709 | # threading support due to a bug in Python 2.7.3 | |
8710 | # (http://bugs.python.org/issue15567). | |
8711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
8712 | $as_echo_n "checking whether python supports threads... " >&6; } | |
8713 | saved_CPPFLAGS="${CPPFLAGS}" | |
8714 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
8715 | # Note that the test is reversed so that python_has_threads=yes on | |
8716 | # unexpected failures. | |
8717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8718 | /* end confdefs.h. */ | |
8719 | ||
8720 | #include <Python.h> | |
8721 | #ifdef WITH_THREAD | |
8722 | # error | |
8723 | #endif | |
8724 | ||
8725 | _ACEOF | |
8726 | if ac_fn_c_try_cpp "$LINENO"; then : | |
8727 | python_has_threads=no | |
8728 | else | |
8729 | python_has_threads=yes | |
8730 | fi | |
8731 | rm -f conftest.err conftest.$ac_ext | |
8732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
8733 | $as_echo "${python_has_threads}" >&6; } | |
8734 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 8735 | else |
6dddc817 DE |
8736 | # Even if Python support is not compiled in, we need to have this file |
8737 | # included so that the "python" command, et.al., still exists. | |
8738 | CONFIG_OBS="$CONFIG_OBS python.o" | |
8739 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" | |
a9322a30 | 8740 | fi |
9a156167 | 8741 | |
ed3ef339 DE |
8742 | |
8743 | ||
4df42755 DE |
8744 | if test "${have_libpython}" != no; then |
8745 | HAVE_PYTHON_TRUE= | |
8746 | HAVE_PYTHON_FALSE='#' | |
8747 | else | |
8748 | HAVE_PYTHON_TRUE='#' | |
8749 | HAVE_PYTHON_FALSE= | |
8750 | fi | |
8751 | ||
ed3ef339 DE |
8752 | |
8753 | # -------------------- # | |
8754 | # Check for libguile. # | |
8755 | # -------------------- # | |
8756 | ||
8757 | ||
e1402065 DE |
8758 | |
8759 | ||
8760 | ||
8761 | ||
8762 | # Check whether --with-guile was given. | |
8763 | if test "${with_guile+set}" = set; then : | |
8764 | withval=$with_guile; | |
8765 | else | |
8766 | with_guile=auto | |
8767 | fi | |
8768 | ||
8769 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
8770 | $as_echo_n "checking whether to use guile... " >&6; } | |
8771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
8772 | $as_echo "$with_guile" >&6; } | |
8773 | ||
ed3ef339 DE |
8774 | # Extract the first word of "pkg-config", so it can be a program name with args. |
8775 | set dummy pkg-config; ac_word=$2 | |
8776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8777 | $as_echo_n "checking for $ac_word... " >&6; } | |
8778 | if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : | |
8779 | $as_echo_n "(cached) " >&6 | |
8780 | else | |
8781 | case $pkg_config_prog_path in | |
8782 | [\\/]* | ?:[\\/]*) | |
8783 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
8784 | ;; | |
8785 | *) | |
8786 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8787 | for as_dir in $PATH | |
8788 | do | |
8789 | IFS=$as_save_IFS | |
8790 | test -z "$as_dir" && as_dir=. | |
8791 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8792 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8793 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8794 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8795 | break 2 | |
8796 | fi | |
8797 | done | |
8798 | done | |
8799 | IFS=$as_save_IFS | |
8800 | ||
8801 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
8802 | ;; | |
8803 | esac | |
8804 | fi | |
8805 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
8806 | if test -n "$pkg_config_prog_path"; then | |
8807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
8808 | $as_echo "$pkg_config_prog_path" >&6; } | |
8809 | else | |
8810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8811 | $as_echo "no" >&6; } | |
8812 | fi | |
8813 | ||
8814 | ||
8815 | ||
214ab2da | 8816 | try_guile_versions="guile-2.2 guile-2.0" |
ed3ef339 DE |
8817 | have_libguile=no |
8818 | case "${with_guile}" in | |
8819 | no) | |
8820 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
8821 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
8822 | ;; | |
8823 | auto) | |
e1402065 DE |
8824 | if test "${pkg_config_prog_path}" = "missing"; then |
8825 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
8826 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
8827 | else | |
ed3ef339 DE |
8828 | |
8829 | pkg_config=${pkg_config_prog_path} | |
8830 | guile_version_list=${try_guile_versions} | |
8831 | flag_errors=no | |
8832 | ||
ed3ef339 DE |
8833 | found_usable_guile=checking |
8834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
8835 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
8836 | for guile_version in ${guile_version_list}; do | |
8837 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
8838 | if test $? != 0; then | |
8839 | continue | |
8840 | fi | |
8841 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
8842 | if test $? != 0; then | |
8843 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
8844 | fi | |
8845 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
8846 | if test $? != 0; then | |
8847 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
8848 | fi | |
8849 | found_usable_guile=${guile_version} | |
8850 | break | |
8851 | done | |
8852 | if test "${found_usable_guile}" = "checking"; then | |
8853 | if test "${flag_errors}" = "yes"; then | |
8854 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
8855 | else | |
8856 | found_usable_guile=no | |
8857 | fi | |
8858 | fi | |
8859 | if test "${found_usable_guile}" != no; then | |
8860 | save_CPPFLAGS=$CPPFLAGS | |
8861 | save_LIBS=$LIBS | |
8862 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8863 | LIBS="$LIBS $new_LIBS" | |
8864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8865 | /* end confdefs.h. */ | |
8866 | #include "libguile.h" | |
8867 | int | |
8868 | main () | |
8869 | { | |
8870 | scm_init_guile (); | |
8871 | ; | |
8872 | return 0; | |
8873 | } | |
8874 | _ACEOF | |
8875 | if ac_fn_c_try_link "$LINENO"; then : | |
8876 | have_libguile=yes | |
8877 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
8878 | GUILE_LIBS=$new_LIBS | |
8879 | else | |
8880 | found_usable_guile=no | |
8881 | fi | |
8882 | rm -f core conftest.err conftest.$ac_objext \ | |
8883 | conftest$ac_exeext conftest.$ac_ext | |
8884 | CPPFLAGS=$save_CPPFLAGS | |
8885 | LIBS=$save_LIBS | |
8886 | if test "${found_usable_guile}" = no; then | |
8887 | if test "${flag_errors}" = yes; then | |
8888 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8889 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8890 | as_fn_error "linking guile version ${guile_version} test program failed | |
8891 | See \`config.log' for more details." "$LINENO" 5; } | |
8892 | fi | |
8893 | fi | |
8894 | fi | |
8895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
8896 | $as_echo "${found_usable_guile}" >&6; } | |
8897 | ||
e1402065 | 8898 | fi |
ed3ef339 DE |
8899 | ;; |
8900 | yes) | |
e1402065 DE |
8901 | if test "${pkg_config_prog_path}" = "missing"; then |
8902 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
8903 | fi | |
ed3ef339 DE |
8904 | |
8905 | pkg_config=${pkg_config_prog_path} | |
8906 | guile_version_list=${try_guile_versions} | |
8907 | flag_errors=yes | |
8908 | ||
ed3ef339 DE |
8909 | found_usable_guile=checking |
8910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
8911 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
8912 | for guile_version in ${guile_version_list}; do | |
8913 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
8914 | if test $? != 0; then | |
8915 | continue | |
8916 | fi | |
8917 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
8918 | if test $? != 0; then | |
8919 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
8920 | fi | |
8921 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
8922 | if test $? != 0; then | |
8923 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
8924 | fi | |
8925 | found_usable_guile=${guile_version} | |
8926 | break | |
8927 | done | |
8928 | if test "${found_usable_guile}" = "checking"; then | |
8929 | if test "${flag_errors}" = "yes"; then | |
8930 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
8931 | else | |
8932 | found_usable_guile=no | |
8933 | fi | |
8934 | fi | |
8935 | if test "${found_usable_guile}" != no; then | |
8936 | save_CPPFLAGS=$CPPFLAGS | |
8937 | save_LIBS=$LIBS | |
8938 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8939 | LIBS="$LIBS $new_LIBS" | |
8940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8941 | /* end confdefs.h. */ | |
8942 | #include "libguile.h" | |
8943 | int | |
8944 | main () | |
8945 | { | |
8946 | scm_init_guile (); | |
8947 | ; | |
8948 | return 0; | |
8949 | } | |
8950 | _ACEOF | |
8951 | if ac_fn_c_try_link "$LINENO"; then : | |
8952 | have_libguile=yes | |
8953 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
8954 | GUILE_LIBS=$new_LIBS | |
8955 | else | |
8956 | found_usable_guile=no | |
8957 | fi | |
8958 | rm -f core conftest.err conftest.$ac_objext \ | |
8959 | conftest$ac_exeext conftest.$ac_ext | |
8960 | CPPFLAGS=$save_CPPFLAGS | |
8961 | LIBS=$save_LIBS | |
8962 | if test "${found_usable_guile}" = no; then | |
8963 | if test "${flag_errors}" = yes; then | |
8964 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8965 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8966 | as_fn_error "linking guile version ${guile_version} test program failed | |
8967 | See \`config.log' for more details." "$LINENO" 5; } | |
8968 | fi | |
8969 | fi | |
8970 | fi | |
8971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
8972 | $as_echo "${found_usable_guile}" >&6; } | |
8973 | ||
8974 | ;; | |
8975 | [\\/]* | ?:[\\/]*) | |
e1402065 | 8976 | if test -x "${with_guile}"; then |
ed3ef339 DE |
8977 | |
8978 | pkg_config=${with_guile} | |
8979 | guile_version_list=${try_guile_versions} | |
8980 | flag_errors=yes | |
8981 | ||
ed3ef339 DE |
8982 | found_usable_guile=checking |
8983 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
8984 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
8985 | for guile_version in ${guile_version_list}; do | |
8986 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
8987 | if test $? != 0; then | |
8988 | continue | |
8989 | fi | |
8990 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
8991 | if test $? != 0; then | |
8992 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
8993 | fi | |
8994 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
8995 | if test $? != 0; then | |
8996 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
8997 | fi | |
8998 | found_usable_guile=${guile_version} | |
8999 | break | |
9000 | done | |
9001 | if test "${found_usable_guile}" = "checking"; then | |
9002 | if test "${flag_errors}" = "yes"; then | |
9003 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9004 | else | |
9005 | found_usable_guile=no | |
9006 | fi | |
9007 | fi | |
9008 | if test "${found_usable_guile}" != no; then | |
9009 | save_CPPFLAGS=$CPPFLAGS | |
9010 | save_LIBS=$LIBS | |
9011 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9012 | LIBS="$LIBS $new_LIBS" | |
9013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9014 | /* end confdefs.h. */ | |
9015 | #include "libguile.h" | |
9016 | int | |
9017 | main () | |
9018 | { | |
9019 | scm_init_guile (); | |
9020 | ; | |
9021 | return 0; | |
9022 | } | |
9023 | _ACEOF | |
9024 | if ac_fn_c_try_link "$LINENO"; then : | |
9025 | have_libguile=yes | |
9026 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9027 | GUILE_LIBS=$new_LIBS | |
9028 | else | |
9029 | found_usable_guile=no | |
9030 | fi | |
9031 | rm -f core conftest.err conftest.$ac_objext \ | |
9032 | conftest$ac_exeext conftest.$ac_ext | |
9033 | CPPFLAGS=$save_CPPFLAGS | |
9034 | LIBS=$save_LIBS | |
9035 | if test "${found_usable_guile}" = no; then | |
9036 | if test "${flag_errors}" = yes; then | |
9037 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9038 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9039 | as_fn_error "linking guile version ${guile_version} test program failed | |
9040 | See \`config.log' for more details." "$LINENO" 5; } | |
9041 | fi | |
9042 | fi | |
9043 | fi | |
9044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9045 | $as_echo "${found_usable_guile}" >&6; } | |
9046 | ||
e1402065 DE |
9047 | else |
9048 | as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 | |
9049 | fi | |
ed3ef339 DE |
9050 | ;; |
9051 | "" | */*) | |
9052 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
9053 | as_fn_error "invalid value for --with-guile" "$LINENO" 5 | |
9054 | ;; | |
9055 | *) | |
9056 | # A space separate list of guile versions to try, in order. | |
e1402065 DE |
9057 | if test "${pkg_config_prog_path}" = "missing"; then |
9058 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
9059 | fi | |
ed3ef339 DE |
9060 | |
9061 | pkg_config=${pkg_config_prog_path} | |
9062 | guile_version_list=${with_guile} | |
9063 | flag_errors=yes | |
9064 | ||
ed3ef339 DE |
9065 | found_usable_guile=checking |
9066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9067 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9068 | for guile_version in ${guile_version_list}; do | |
9069 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9070 | if test $? != 0; then | |
9071 | continue | |
9072 | fi | |
9073 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9074 | if test $? != 0; then | |
9075 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9076 | fi | |
9077 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9078 | if test $? != 0; then | |
9079 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9080 | fi | |
9081 | found_usable_guile=${guile_version} | |
9082 | break | |
9083 | done | |
9084 | if test "${found_usable_guile}" = "checking"; then | |
9085 | if test "${flag_errors}" = "yes"; then | |
9086 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9087 | else | |
9088 | found_usable_guile=no | |
9089 | fi | |
9090 | fi | |
9091 | if test "${found_usable_guile}" != no; then | |
9092 | save_CPPFLAGS=$CPPFLAGS | |
9093 | save_LIBS=$LIBS | |
9094 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9095 | LIBS="$LIBS $new_LIBS" | |
9096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9097 | /* end confdefs.h. */ | |
9098 | #include "libguile.h" | |
9099 | int | |
9100 | main () | |
9101 | { | |
9102 | scm_init_guile (); | |
9103 | ; | |
9104 | return 0; | |
9105 | } | |
9106 | _ACEOF | |
9107 | if ac_fn_c_try_link "$LINENO"; then : | |
9108 | have_libguile=yes | |
9109 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9110 | GUILE_LIBS=$new_LIBS | |
9111 | else | |
9112 | found_usable_guile=no | |
9113 | fi | |
9114 | rm -f core conftest.err conftest.$ac_objext \ | |
9115 | conftest$ac_exeext conftest.$ac_ext | |
9116 | CPPFLAGS=$save_CPPFLAGS | |
9117 | LIBS=$save_LIBS | |
9118 | if test "${found_usable_guile}" = no; then | |
9119 | if test "${flag_errors}" = yes; then | |
9120 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9121 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9122 | as_fn_error "linking guile version ${guile_version} test program failed | |
9123 | See \`config.log' for more details." "$LINENO" 5; } | |
9124 | fi | |
9125 | fi | |
9126 | fi | |
9127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9128 | $as_echo "${found_usable_guile}" >&6; } | |
9129 | ||
9130 | ;; | |
9131 | esac | |
9132 | ||
e76c5d17 | 9133 | if test "${have_libguile}" != no; then |
d342a0da DE |
9134 | case "${with_guile}" in |
9135 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
9136 | |
9137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
9138 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
9139 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
9140 | $as_echo_n "(cached) " >&6 | |
9141 | else | |
d342a0da | 9142 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
9143 | |
9144 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
9145 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
9146 | # what the program name is, at the risk of getting it wrong if | |
9147 | # Guile was configured with '--program-suffix' or similar. | |
9148 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 9149 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
9150 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
9151 | fi | |
9152 | ||
9153 | fi | |
9154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
9155 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
9156 | ||
9157 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
9158 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
9159 | fi | |
9160 | ||
9161 | GUILD="$ac_cv_guild_program_name" | |
9162 | ||
9163 | ||
d342a0da DE |
9164 | ;; |
9165 | *) | |
9166 | ||
9167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
9168 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
9169 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
9170 | $as_echo_n "(cached) " >&6 | |
9171 | else | |
9172 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
9173 | ||
9174 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
9175 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
9176 | # what the program name is, at the risk of getting it wrong if | |
9177 | # Guile was configured with '--program-suffix' or similar. | |
9178 | if test "x$ac_cv_guild_program_name" = "x"; then | |
9179 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
9180 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
9181 | fi | |
9182 | ||
9183 | fi | |
9184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
9185 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
9186 | ||
9187 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
9188 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
9189 | fi | |
9190 | ||
9191 | GUILD="$ac_cv_guild_program_name" | |
9192 | ||
9193 | ||
9194 | ;; | |
9195 | esac | |
e76c5d17 DE |
9196 | |
9197 | ||
9198 | if test "$cross_compiling" = no; then | |
9199 | GUILD_TARGET_FLAG= | |
9200 | else | |
9201 | GUILD_TARGET_FLAG="--target=$host" | |
9202 | fi | |
9203 | ||
9204 | ||
9205 | ||
9206 | ||
9207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
9208 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
9209 | if test "${ac_cv_guild_ok+set}" = set; then : | |
9210 | $as_echo_n "(cached) " >&6 | |
9211 | else | |
9212 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
9213 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
9214 | ac_cv_guild_ok=yes | |
9215 | else | |
9216 | ac_cv_guild_ok=no | |
9217 | fi | |
9218 | fi | |
9219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
9220 | $as_echo "$ac_cv_guild_ok" >&6; } | |
9221 | ||
9222 | if test "$ac_cv_guild_ok" = no; then | |
9223 | have_libguile=no | |
9224 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
9225 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
9226 | fi | |
9227 | fi | |
9228 | ||
ed3ef339 DE |
9229 | if test "${have_libguile}" != no; then |
9230 | ||
9231 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
9232 | ||
9233 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
9234 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
9235 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
9236 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
9237 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
9238 | |
9239 | save_LIBS="$LIBS" | |
9240 | save_CPPFLAGS="$CPPFLAGS" | |
9241 | LIBS="$GUILE_LIBS" | |
9242 | CPPFLAGS="$GUILE_CPPFLAGS" | |
9243 | for ac_func in scm_new_smob | |
9244 | do : | |
9245 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
9246 | if test "x$ac_cv_func_scm_new_smob" = x""yes; then : | |
9247 | cat >>confdefs.h <<_ACEOF | |
9248 | #define HAVE_SCM_NEW_SMOB 1 | |
9249 | _ACEOF | |
9250 | ||
9251 | fi | |
9252 | done | |
9253 | ||
9254 | LIBS="$save_LIBS" | |
9255 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
9256 | else |
9257 | # Even if Guile support is not compiled in, we need to have these files | |
9258 | # included. | |
9259 | CONFIG_OBS="$CONFIG_OBS guile.o" | |
9260 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" | |
9261 | fi | |
9a156167 | 9262 | |
ac534cba | 9263 | |
4df42755 DE |
9264 | if test "${have_libguile}" != no; then |
9265 | HAVE_GUILE_TRUE= | |
9266 | HAVE_GUILE_FALSE='#' | |
9267 | else | |
9268 | HAVE_GUILE_TRUE='#' | |
9269 | HAVE_GUILE_FALSE= | |
9270 | fi | |
9271 | ||
ac534cba | 9272 | |
d344e670 DE |
9273 | # --------------------- # |
9274 | # Check for libmcheck. # | |
9275 | # --------------------- # | |
9276 | ||
a8db4212 YPK |
9277 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
9278 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
9279 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
9280 | # and for releases. | |
17ef446e PA |
9281 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
9282 | && $development; then | |
9283 | libmcheck_default=yes | |
9284 | else | |
9285 | libmcheck_default=no | |
a8db4212 YPK |
9286 | fi |
9287 | ||
17ef446e PA |
9288 | # Check whether --enable-libmcheck was given. |
9289 | if test "${enable_libmcheck+set}" = set; then : | |
9290 | enableval=$enable_libmcheck; case "${enableval}" in | |
9291 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
9292 | no | n) ENABLE_LIBMCHECK="no" ;; | |
9293 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
9294 | esac | |
9295 | fi | |
9296 | ||
9297 | ||
9298 | if test -z "${ENABLE_LIBMCHECK}"; then | |
9299 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 9300 | fi |
17ef446e PA |
9301 | |
9302 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
9303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
9304 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
9305 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
9306 | $as_echo_n "(cached) " >&6 | |
9307 | else | |
9308 | ac_check_lib_save_LIBS=$LIBS | |
9309 | LIBS="-lmcheck $LIBS" | |
9310 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9311 | /* end confdefs.h. */ | |
9312 | ||
9313 | ||
9314 | int | |
9315 | main () | |
9316 | { | |
9317 | return main (); | |
9318 | ; | |
9319 | return 0; | |
9320 | } | |
9321 | _ACEOF | |
9322 | if ac_fn_c_try_link "$LINENO"; then : | |
9323 | ac_cv_lib_mcheck_main=yes | |
9324 | else | |
9325 | ac_cv_lib_mcheck_main=no | |
9326 | fi | |
9327 | rm -f core conftest.err conftest.$ac_objext \ | |
9328 | conftest$ac_exeext conftest.$ac_ext | |
9329 | LIBS=$ac_check_lib_save_LIBS | |
9330 | fi | |
9331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
9332 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
9333 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
9334 | cat >>confdefs.h <<_ACEOF | |
9335 | #define HAVE_LIBMCHECK 1 | |
9336 | _ACEOF | |
9337 | ||
9338 | LIBS="-lmcheck $LIBS" | |
9339 | ||
9340 | fi | |
9341 | ||
17ef446e PA |
9342 | fi |
9343 | ||
9344 | ||
9345 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
9346 | -a "${have_libpython}" != "no" \ | |
9347 | -a "${python_has_threads}" = "yes" ; then | |
9348 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
9349 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
9350 | fi |
9351 | ||
81ecdfbb RW |
9352 | # ------------------------- # |
9353 | # Checks for header files. # | |
9354 | # ------------------------- # | |
c890192f | 9355 | |
81ecdfbb RW |
9356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
9357 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
9358 | if test "${ac_cv_header_stdc+set}" = set; then : | |
9359 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9360 | else |
81ecdfbb | 9361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9362 | /* end confdefs.h. */ |
81ecdfbb RW |
9363 | #include <stdlib.h> |
9364 | #include <stdarg.h> | |
9365 | #include <string.h> | |
9366 | #include <float.h> | |
9367 | ||
a9322a30 TT |
9368 | int |
9369 | main () | |
9370 | { | |
a9322a30 TT |
9371 | |
9372 | ; | |
9373 | return 0; | |
9374 | } | |
bec39cab | 9375 | _ACEOF |
81ecdfbb RW |
9376 | if ac_fn_c_try_compile "$LINENO"; then : |
9377 | ac_cv_header_stdc=yes | |
bec39cab | 9378 | else |
81ecdfbb | 9379 | ac_cv_header_stdc=no |
a9322a30 | 9380 | fi |
81ecdfbb | 9381 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9382 | |
81ecdfbb RW |
9383 | if test $ac_cv_header_stdc = yes; then |
9384 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
9385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9386 | /* end confdefs.h. */ | |
9387 | #include <string.h> | |
bec39cab | 9388 | |
81ecdfbb RW |
9389 | _ACEOF |
9390 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9391 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 9392 | |
bec39cab | 9393 | else |
81ecdfbb RW |
9394 | ac_cv_header_stdc=no |
9395 | fi | |
9396 | rm -f conftest* | |
9397 | ||
9398 | fi | |
9399 | ||
9400 | if test $ac_cv_header_stdc = yes; then | |
9401 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
9402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9403 | /* end confdefs.h. */ | |
9404 | #include <stdlib.h> | |
9405 | ||
bec39cab | 9406 | _ACEOF |
81ecdfbb RW |
9407 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
9408 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 9409 | |
81ecdfbb RW |
9410 | else |
9411 | ac_cv_header_stdc=no | |
9412 | fi | |
9413 | rm -f conftest* | |
bec39cab | 9414 | |
bec39cab | 9415 | fi |
81ecdfbb RW |
9416 | |
9417 | if test $ac_cv_header_stdc = yes; then | |
9418 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
9419 | if test "$cross_compiling" = yes; then : | |
9420 | : | |
bec39cab | 9421 | else |
81ecdfbb | 9422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9423 | /* end confdefs.h. */ |
81ecdfbb RW |
9424 | #include <ctype.h> |
9425 | #include <stdlib.h> | |
9426 | #if ((' ' & 0x0FF) == 0x020) | |
9427 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
9428 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
9429 | #else | |
9430 | # define ISLOWER(c) \ | |
9431 | (('a' <= (c) && (c) <= 'i') \ | |
9432 | || ('j' <= (c) && (c) <= 'r') \ | |
9433 | || ('s' <= (c) && (c) <= 'z')) | |
9434 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
9435 | #endif | |
9436 | ||
9437 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
9438 | int |
9439 | main () | |
9440 | { | |
81ecdfbb RW |
9441 | int i; |
9442 | for (i = 0; i < 256; i++) | |
9443 | if (XOR (islower (i), ISLOWER (i)) | |
9444 | || toupper (i) != TOUPPER (i)) | |
9445 | return 2; | |
a9322a30 TT |
9446 | return 0; |
9447 | } | |
bec39cab | 9448 | _ACEOF |
81ecdfbb RW |
9449 | if ac_fn_c_try_run "$LINENO"; then : |
9450 | ||
bec39cab | 9451 | else |
81ecdfbb RW |
9452 | ac_cv_header_stdc=no |
9453 | fi | |
9454 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9455 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9456 | fi | |
bec39cab | 9457 | |
bec39cab | 9458 | fi |
a9322a30 | 9459 | fi |
81ecdfbb RW |
9460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
9461 | $as_echo "$ac_cv_header_stdc" >&6; } | |
9462 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 9463 | |
81ecdfbb | 9464 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 9465 | |
81ecdfbb | 9466 | fi |
bec39cab | 9467 | |
81ecdfbb | 9468 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 9469 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 9470 | thread_db.h \ |
0080a2f6 | 9471 | sys/fault.h \ |
81ecdfbb RW |
9472 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
9473 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
9474 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
9467110b | 9475 | termios.h termio.h \ |
3447c057 | 9476 | sgtty.h elf_hp.h \ |
9467110b | 9477 | dlfcn.h |
81ecdfbb RW |
9478 | do : |
9479 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9480 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9481 | eval as_val=\$$as_ac_Header | |
9482 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9483 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9484 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9485 | _ACEOF |
c906108c | 9486 | |
bec39cab | 9487 | fi |
81ecdfbb RW |
9488 | |
9489 | done | |
9490 | ||
81ecdfbb RW |
9491 | for ac_header in sys/proc.h |
9492 | do : | |
9493 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
9494 | # include <sys/param.h> | |
9495 | #endif | |
c906108c | 9496 | |
81ecdfbb RW |
9497 | " |
9498 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 9499 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9500 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 9501 | _ACEOF |
5ee754fc | 9502 | |
bec39cab | 9503 | fi |
81ecdfbb RW |
9504 | |
9505 | done | |
9506 | ||
9507 | for ac_header in sys/user.h | |
9508 | do : | |
9509 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
9510 | # include <sys/param.h> | |
a9322a30 TT |
9511 | #endif |
9512 | ||
81ecdfbb RW |
9513 | " |
9514 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
9515 | cat >>confdefs.h <<_ACEOF | |
9516 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 9517 | _ACEOF |
bec39cab | 9518 | |
a9322a30 | 9519 | fi |
bec39cab | 9520 | |
81ecdfbb | 9521 | done |
5ee754fc | 9522 | |
5ee754fc | 9523 | |
81ecdfbb RW |
9524 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
9525 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
9526 | # think that we don't have <curses.h> if we're using GCC. | |
9527 | case $host_os in | |
9528 | solaris2.[789]) | |
9529 | if test "$GCC" = yes; then | |
9530 | ||
9531 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
9532 | ||
9533 | fi ;; | |
9534 | esac | |
9535 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
9536 | do : | |
9537 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9538 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9539 | eval as_val=\$$as_ac_Header | |
9540 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9541 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9542 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9543 | _ACEOF |
5ee754fc MK |
9544 | |
9545 | fi | |
9546 | ||
81ecdfbb | 9547 | done |
bec39cab | 9548 | |
81ecdfbb RW |
9549 | for ac_header in term.h |
9550 | do : | |
9551 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
9552 | # include <curses.h> | |
9553 | #endif | |
bec39cab | 9554 | |
81ecdfbb RW |
9555 | " |
9556 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
9557 | cat >>confdefs.h <<_ACEOF | |
9558 | #define HAVE_TERM_H 1 | |
a8111142 | 9559 | _ACEOF |
a8111142 | 9560 | |
a8111142 | 9561 | fi |
a8111142 | 9562 | |
81ecdfbb | 9563 | done |
a8111142 TT |
9564 | |
9565 | ||
81ecdfbb RW |
9566 | # ------------------------- # |
9567 | # Checks for declarations. # | |
9568 | # ------------------------- # | |
a9322a30 | 9569 | |
81ecdfbb RW |
9570 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
9571 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
9572 | ac_have_decl=1 | |
bec39cab | 9573 | else |
81ecdfbb RW |
9574 | ac_have_decl=0 |
9575 | fi | |
9576 | ||
9577 | cat >>confdefs.h <<_ACEOF | |
9578 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 9579 | _ACEOF |
81ecdfbb RW |
9580 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
9581 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
9582 | ac_have_decl=1 | |
9583 | else | |
9584 | ac_have_decl=0 | |
9585 | fi | |
9586 | ||
9587 | cat >>confdefs.h <<_ACEOF | |
9588 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 9589 | _ACEOF |
81ecdfbb RW |
9590 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
9591 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
9592 | ac_have_decl=1 | |
bec39cab | 9593 | else |
81ecdfbb RW |
9594 | ac_have_decl=0 |
9595 | fi | |
bec39cab | 9596 | |
81ecdfbb RW |
9597 | cat >>confdefs.h <<_ACEOF |
9598 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 9599 | _ACEOF |
81ecdfbb RW |
9600 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
9601 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
9602 | ac_have_decl=1 | |
9603 | else | |
9604 | ac_have_decl=0 | |
5ee754fc | 9605 | fi |
81ecdfbb RW |
9606 | |
9607 | cat >>confdefs.h <<_ACEOF | |
9608 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 9609 | _ACEOF |
5ee754fc | 9610 | |
5ee754fc | 9611 | |
81ecdfbb RW |
9612 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9613 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9614 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9615 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9616 | else |
81ecdfbb | 9617 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9618 | /* end confdefs.h. */ |
81ecdfbb | 9619 | #include <locale.h> |
a9322a30 TT |
9620 | int |
9621 | main () | |
9622 | { | |
81ecdfbb | 9623 | return LC_MESSAGES |
a9322a30 TT |
9624 | ; |
9625 | return 0; | |
9626 | } | |
bec39cab | 9627 | _ACEOF |
81ecdfbb RW |
9628 | if ac_fn_c_try_link "$LINENO"; then : |
9629 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9630 | else |
81ecdfbb RW |
9631 | am_cv_val_LC_MESSAGES=no |
9632 | fi | |
9633 | rm -f core conftest.err conftest.$ac_objext \ | |
9634 | conftest$ac_exeext conftest.$ac_ext | |
9635 | fi | |
9636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9637 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9638 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9639 | |
81ecdfbb RW |
9640 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9641 | ||
9642 | fi | |
9643 | ||
9644 | ||
9645 | # ----------------------- # | |
9646 | # Checks for structures. # | |
9647 | # ----------------------- # | |
9648 | ||
9649 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9650 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9651 | ||
9652 | cat >>confdefs.h <<_ACEOF | |
9653 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9654 | _ACEOF |
7eb368b3 | 9655 | |
81ecdfbb | 9656 | |
7eb368b3 | 9657 | fi |
81ecdfbb RW |
9658 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9659 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9660 | |
a9322a30 TT |
9661 | cat >>confdefs.h <<_ACEOF |
9662 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9663 | _ACEOF |
9664 | ||
a9322a30 | 9665 | |
7eb368b3 NR |
9666 | fi |
9667 | ||
7eb368b3 | 9668 | |
a9322a30 TT |
9669 | # ------------------ # |
9670 | # Checks for types. # | |
9671 | # ------------------ # | |
7eb368b3 | 9672 | |
81ecdfbb RW |
9673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9674 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9675 | if test "${ac_cv_type_signal+set}" = set; then : | |
9676 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9677 | else |
81ecdfbb | 9678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9679 | /* end confdefs.h. */ |
a9322a30 TT |
9680 | #include <sys/types.h> |
9681 | #include <signal.h> | |
7cb9022a | 9682 | |
a9322a30 TT |
9683 | int |
9684 | main () | |
9685 | { | |
81ecdfbb | 9686 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9687 | ; |
9688 | return 0; | |
9689 | } | |
bec39cab | 9690 | _ACEOF |
81ecdfbb RW |
9691 | if ac_fn_c_try_compile "$LINENO"; then : |
9692 | ac_cv_type_signal=int | |
bec39cab | 9693 | else |
81ecdfbb | 9694 | ac_cv_type_signal=void |
bec39cab | 9695 | fi |
81ecdfbb | 9696 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9697 | fi |
81ecdfbb RW |
9698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9699 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9700 | |
a9322a30 TT |
9701 | cat >>confdefs.h <<_ACEOF |
9702 | #define RETSIGTYPE $ac_cv_type_signal | |
9703 | _ACEOF | |
5ee754fc | 9704 | |
bec39cab | 9705 | |
81ecdfbb | 9706 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9707 | #include <sys/socket.h> |
9708 | ||
81ecdfbb RW |
9709 | " |
9710 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9711 | |
a9322a30 TT |
9712 | cat >>confdefs.h <<_ACEOF |
9713 | #define HAVE_SOCKLEN_T 1 | |
9714 | _ACEOF | |
9715 | ||
9716 | ||
9717 | fi | |
9718 | ||
9719 | ||
9720 | # ------------------------------------- # | |
9721 | # Checks for compiler characteristics. # | |
9722 | # ------------------------------------- # | |
9723 | ||
81ecdfbb RW |
9724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9725 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9726 | if test "${ac_cv_c_const+set}" = set; then : | |
9727 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9728 | else |
81ecdfbb | 9729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9730 | /* end confdefs.h. */ |
a9322a30 TT |
9731 | |
9732 | int | |
9733 | main () | |
9734 | { | |
9735 | /* FIXME: Include the comments suggested by Paul. */ | |
9736 | #ifndef __cplusplus | |
9737 | /* Ultrix mips cc rejects this. */ | |
9738 | typedef int charset[2]; | |
81ecdfbb | 9739 | const charset cs; |
a9322a30 | 9740 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
9741 | char const *const *pcpcc; |
9742 | char **ppc; | |
a9322a30 TT |
9743 | /* NEC SVR4.0.2 mips cc rejects this. */ |
9744 | struct point {int x, y;}; | |
9745 | static struct point const zero = {0,0}; | |
9746 | /* AIX XL C 1.02.0.0 rejects this. | |
9747 | It does not let you subtract one const X* pointer from another in | |
9748 | an arm of an if-expression whose if-part is not a constant | |
9749 | expression */ | |
9750 | const char *g = "string"; | |
81ecdfbb | 9751 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 9752 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
9753 | ++pcpcc; |
9754 | ppc = (char**) pcpcc; | |
9755 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
9756 | { /* SCO 3.2v4 cc rejects this. */ |
9757 | char *t; | |
9758 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
9759 | ||
9760 | *t++ = 0; | |
81ecdfbb | 9761 | if (s) return 0; |
a9322a30 TT |
9762 | } |
9763 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
9764 | int x[] = {25, 17}; | |
9765 | const int *foo = &x[0]; | |
9766 | ++foo; | |
9767 | } | |
9768 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
9769 | typedef const int *iptr; | |
9770 | iptr p = 0; | |
9771 | ++p; | |
9772 | } | |
9773 | { /* AIX XL C 1.02.0.0 rejects this saying | |
9774 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
9775 | struct s { int j; const int *ap[3]; }; | |
9776 | struct s *b; b->j = 5; | |
9777 | } | |
9778 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
9779 | const int foo = 10; | |
81ecdfbb | 9780 | if (!foo) return 0; |
a9322a30 | 9781 | } |
81ecdfbb | 9782 | return !cs[0] && !zero.x; |
a9322a30 TT |
9783 | #endif |
9784 | ||
9785 | ; | |
9786 | return 0; | |
9787 | } | |
bec39cab | 9788 | _ACEOF |
81ecdfbb | 9789 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9790 | ac_cv_c_const=yes |
5ee754fc | 9791 | else |
81ecdfbb | 9792 | ac_cv_c_const=no |
5ee754fc | 9793 | fi |
81ecdfbb | 9794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9795 | fi |
81ecdfbb RW |
9796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
9797 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 9798 | if test $ac_cv_c_const = no; then |
bec39cab | 9799 | |
81ecdfbb | 9800 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 9801 | |
5ee754fc | 9802 | fi |
bec39cab | 9803 | |
81ecdfbb RW |
9804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
9805 | $as_echo_n "checking for inline... " >&6; } | |
9806 | if test "${ac_cv_c_inline+set}" = set; then : | |
9807 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9808 | else |
a9322a30 TT |
9809 | ac_cv_c_inline=no |
9810 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 9811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9812 | /* end confdefs.h. */ |
a9322a30 TT |
9813 | #ifndef __cplusplus |
9814 | typedef int foo_t; | |
9815 | static $ac_kw foo_t static_foo () {return 0; } | |
9816 | $ac_kw foo_t foo () {return 0; } | |
9817 | #endif | |
9818 | ||
bec39cab | 9819 | _ACEOF |
81ecdfbb RW |
9820 | if ac_fn_c_try_compile "$LINENO"; then : |
9821 | ac_cv_c_inline=$ac_kw | |
bec39cab | 9822 | fi |
81ecdfbb RW |
9823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9824 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 9825 | done |
bec39cab | 9826 | |
5ee754fc | 9827 | fi |
81ecdfbb RW |
9828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
9829 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 9830 | |
a9322a30 TT |
9831 | case $ac_cv_c_inline in |
9832 | inline | yes) ;; | |
9833 | *) | |
9834 | case $ac_cv_c_inline in | |
9835 | no) ac_val=;; | |
9836 | *) ac_val=$ac_cv_c_inline;; | |
9837 | esac | |
9838 | cat >>confdefs.h <<_ACEOF | |
9839 | #ifndef __cplusplus | |
9840 | #define inline $ac_val | |
9841 | #endif | |
9842 | _ACEOF | |
bec39cab AC |
9843 | ;; |
9844 | esac | |
bec39cab | 9845 | |
81ecdfbb RW |
9846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
9847 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9848 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
9849 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9850 | else |
81ecdfbb RW |
9851 | ac_cv_c_bigendian=unknown |
9852 | # See if we're dealing with a universal compiler. | |
9853 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9854 | /* end confdefs.h. */ | |
9855 | #ifndef __APPLE_CC__ | |
9856 | not a universal capable compiler | |
9857 | #endif | |
9858 | typedef int dummy; | |
9859 | ||
9860 | _ACEOF | |
9861 | if ac_fn_c_try_compile "$LINENO"; then : | |
9862 | ||
9863 | # Check for potential -arch flags. It is not universal unless | |
9864 | # there are at least two -arch flags with different values. | |
9865 | ac_arch= | |
9866 | ac_prev= | |
9867 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
9868 | if test -n "$ac_prev"; then | |
9869 | case $ac_word in | |
9870 | i?86 | x86_64 | ppc | ppc64) | |
9871 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
9872 | ac_arch=$ac_word | |
9873 | else | |
9874 | ac_cv_c_bigendian=universal | |
9875 | break | |
9876 | fi | |
9877 | ;; | |
9878 | esac | |
9879 | ac_prev= | |
9880 | elif test "x$ac_word" = "x-arch"; then | |
9881 | ac_prev=arch | |
9882 | fi | |
9883 | done | |
9884 | fi | |
9885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9886 | if test $ac_cv_c_bigendian = unknown; then | |
9887 | # See if sys/param.h defines the BYTE_ORDER macro. | |
9888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9889 | /* end confdefs.h. */ |
a9322a30 | 9890 | #include <sys/types.h> |
81ecdfbb | 9891 | #include <sys/param.h> |
a9322a30 TT |
9892 | |
9893 | int | |
9894 | main () | |
9895 | { | |
81ecdfbb RW |
9896 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
9897 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
9898 | && LITTLE_ENDIAN) | |
9899 | bogus endian macros | |
9900 | #endif | |
a9322a30 TT |
9901 | |
9902 | ; | |
9903 | return 0; | |
9904 | } | |
bec39cab | 9905 | _ACEOF |
81ecdfbb | 9906 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9907 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 9908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9909 | /* end confdefs.h. */ |
a9322a30 | 9910 | #include <sys/types.h> |
81ecdfbb | 9911 | #include <sys/param.h> |
a9322a30 TT |
9912 | |
9913 | int | |
9914 | main () | |
9915 | { | |
9916 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
9917 | not big endian |
9918 | #endif | |
a9322a30 TT |
9919 | |
9920 | ; | |
9921 | return 0; | |
9922 | } | |
bec39cab | 9923 | _ACEOF |
81ecdfbb | 9924 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9925 | ac_cv_c_bigendian=yes |
5ee754fc | 9926 | else |
81ecdfbb | 9927 | ac_cv_c_bigendian=no |
5ee754fc | 9928 | fi |
81ecdfbb RW |
9929 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9930 | fi | |
9931 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9932 | fi | |
9933 | if test $ac_cv_c_bigendian = unknown; then | |
9934 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
9935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9936 | /* end confdefs.h. */ | |
9937 | #include <limits.h> | |
bec39cab | 9938 | |
81ecdfbb RW |
9939 | int |
9940 | main () | |
9941 | { | |
9942 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
9943 | bogus endian macros | |
9944 | #endif | |
9945 | ||
9946 | ; | |
9947 | return 0; | |
9948 | } | |
7eb368b3 | 9949 | _ACEOF |
81ecdfbb RW |
9950 | if ac_fn_c_try_compile "$LINENO"; then : |
9951 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
9952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 9953 | /* end confdefs.h. */ |
81ecdfbb RW |
9954 | #include <limits.h> |
9955 | ||
7eb368b3 NR |
9956 | int |
9957 | main () | |
9958 | { | |
81ecdfbb RW |
9959 | #ifndef _BIG_ENDIAN |
9960 | not big endian | |
9961 | #endif | |
9962 | ||
7eb368b3 NR |
9963 | ; |
9964 | return 0; | |
9965 | } | |
9966 | _ACEOF | |
81ecdfbb | 9967 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9968 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
9969 | else |
9970 | ac_cv_c_bigendian=no | |
a9322a30 | 9971 | fi |
81ecdfbb | 9972 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9973 | fi |
81ecdfbb RW |
9974 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9975 | fi | |
9976 | if test $ac_cv_c_bigendian = unknown; then | |
9977 | # Compile a test program. | |
9978 | if test "$cross_compiling" = yes; then : | |
9979 | # Try to guess by grepping values from an object file. | |
9980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9981 | /* end confdefs.h. */ | |
9982 | short int ascii_mm[] = | |
9983 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
9984 | short int ascii_ii[] = | |
9985 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9986 | int use_ascii (int i) { | |
9987 | return ascii_mm[i] + ascii_ii[i]; | |
9988 | } | |
9989 | short int ebcdic_ii[] = | |
9990 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
9991 | short int ebcdic_mm[] = | |
9992 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9993 | int use_ebcdic (int i) { | |
9994 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
9995 | } | |
9996 | extern int foo; | |
7eb368b3 | 9997 | |
81ecdfbb RW |
9998 | int |
9999 | main () | |
10000 | { | |
10001 | return use_ascii (foo) == use_ebcdic (foo); | |
10002 | ; | |
10003 | return 0; | |
10004 | } | |
10005 | _ACEOF | |
10006 | if ac_fn_c_try_compile "$LINENO"; then : | |
10007 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
10008 | ac_cv_c_bigendian=yes | |
10009 | fi | |
10010 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
10011 | if test "$ac_cv_c_bigendian" = unknown; then | |
10012 | ac_cv_c_bigendian=no | |
10013 | else | |
10014 | # finding both strings is unlikely to happen, but who knows? | |
10015 | ac_cv_c_bigendian=unknown | |
10016 | fi | |
10017 | fi | |
7eb368b3 | 10018 | fi |
81ecdfbb | 10019 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 10020 | else |
81ecdfbb | 10021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10022 | /* end confdefs.h. */ |
81ecdfbb | 10023 | $ac_includes_default |
d3ea6809 MM |
10024 | int |
10025 | main () | |
10026 | { | |
81ecdfbb RW |
10027 | |
10028 | /* Are we little or big endian? From Harbison&Steele. */ | |
10029 | union | |
10030 | { | |
10031 | long int l; | |
10032 | char c[sizeof (long int)]; | |
10033 | } u; | |
10034 | u.l = 1; | |
10035 | return u.c[sizeof (long int) - 1] == 1; | |
10036 | ||
10037 | ; | |
10038 | return 0; | |
d3ea6809 MM |
10039 | } |
10040 | _ACEOF | |
81ecdfbb | 10041 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 10042 | ac_cv_c_bigendian=no |
d3ea6809 | 10043 | else |
81ecdfbb | 10044 | ac_cv_c_bigendian=yes |
d3ea6809 | 10045 | fi |
81ecdfbb RW |
10046 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10047 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10048 | fi |
a9322a30 | 10049 | |
81ecdfbb RW |
10050 | fi |
10051 | fi | |
10052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
10053 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
10054 | case $ac_cv_c_bigendian in #( | |
10055 | yes) | |
10056 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
10057 | ;; #( | |
10058 | no) | |
10059 | ;; #( | |
10060 | universal) | |
10061 | ||
10062 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
10063 | ||
10064 | ;; #( | |
10065 | *) | |
10066 | as_fn_error "unknown endianness | |
10067 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
10068 | esac | |
d3ea6809 MM |
10069 | |
10070 | ||
a9322a30 TT |
10071 | # ------------------------------ # |
10072 | # Checks for library functions. # | |
10073 | # ------------------------------ # | |
d3ea6809 | 10074 | |
a9322a30 | 10075 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
10076 | do : |
10077 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10078 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10079 | eval as_val=\$$as_ac_Header | |
10080 | if test "x$as_val" = x""yes; then : | |
bec39cab | 10081 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10082 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 10083 | _ACEOF |
b757528f | 10084 | |
b757528f | 10085 | fi |
bec39cab | 10086 | |
a9322a30 | 10087 | done |
a3828db0 | 10088 | |
a9322a30 | 10089 | for ac_func in getpagesize |
81ecdfbb RW |
10090 | do : |
10091 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
10092 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 10093 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10094 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 10095 | _ACEOF |
bcb3dc3d | 10096 | |
bcb3dc3d MK |
10097 | fi |
10098 | done | |
10099 | ||
81ecdfbb RW |
10100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
10101 | $as_echo_n "checking for working mmap... " >&6; } | |
10102 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
10103 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10104 | else |
81ecdfbb | 10105 | if test "$cross_compiling" = yes; then : |
a9322a30 | 10106 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 10107 | else |
81ecdfbb | 10108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10109 | /* end confdefs.h. */ |
a9322a30 TT |
10110 | $ac_includes_default |
10111 | /* malloc might have been renamed as rpl_malloc. */ | |
10112 | #undef malloc | |
bec39cab | 10113 | |
a9322a30 TT |
10114 | /* Thanks to Mike Haertel and Jim Avera for this test. |
10115 | Here is a matrix of mmap possibilities: | |
10116 | mmap private not fixed | |
10117 | mmap private fixed at somewhere currently unmapped | |
10118 | mmap private fixed at somewhere already mapped | |
10119 | mmap shared not fixed | |
10120 | mmap shared fixed at somewhere currently unmapped | |
10121 | mmap shared fixed at somewhere already mapped | |
10122 | For private mappings, we should verify that changes cannot be read() | |
10123 | back from the file, nor mmap's back from the file at a different | |
10124 | address. (There have been systems where private was not correctly | |
10125 | implemented like the infamous i386 svr4.0, and systems where the | |
10126 | VM page cache was not coherent with the file system buffer cache | |
10127 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
10128 | For shared mappings, we should conversely verify that changes get | |
10129 | propagated back to all the places they're supposed to be. | |
bec39cab | 10130 | |
a9322a30 TT |
10131 | Grep wants private fixed already mapped. |
10132 | The main things grep needs to know about mmap are: | |
10133 | * does it exist and is it safe to write into the mmap'd area | |
10134 | * how to use it (BSD variants) */ | |
8b9cf735 | 10135 | |
a9322a30 TT |
10136 | #include <fcntl.h> |
10137 | #include <sys/mman.h> | |
8b9cf735 | 10138 | |
81ecdfbb | 10139 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 10140 | char *malloc (); |
a3828db0 MK |
10141 | #endif |
10142 | ||
a9322a30 | 10143 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 10144 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 10145 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 10146 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
10147 | # define HAVE_SYS_PARAM_H 1 |
10148 | # endif | |
10149 | ||
10150 | # ifdef _SC_PAGESIZE | |
10151 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
10152 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 10153 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
10154 | # include <sys/param.h> |
10155 | # ifdef EXEC_PAGESIZE | |
10156 | # define getpagesize() EXEC_PAGESIZE | |
10157 | # else /* no EXEC_PAGESIZE */ | |
10158 | # ifdef NBPG | |
10159 | # define getpagesize() NBPG * CLSIZE | |
10160 | # ifndef CLSIZE | |
10161 | # define CLSIZE 1 | |
10162 | # endif /* no CLSIZE */ | |
10163 | # else /* no NBPG */ | |
10164 | # ifdef NBPC | |
10165 | # define getpagesize() NBPC | |
10166 | # else /* no NBPC */ | |
10167 | # ifdef PAGESIZE | |
10168 | # define getpagesize() PAGESIZE | |
10169 | # endif /* PAGESIZE */ | |
10170 | # endif /* no NBPC */ | |
10171 | # endif /* no NBPG */ | |
10172 | # endif /* no EXEC_PAGESIZE */ | |
10173 | # else /* no HAVE_SYS_PARAM_H */ | |
10174 | # define getpagesize() 8192 /* punt totally */ | |
10175 | # endif /* no HAVE_SYS_PARAM_H */ | |
10176 | # endif /* no _SC_PAGESIZE */ | |
10177 | ||
10178 | #endif /* no HAVE_GETPAGESIZE */ | |
10179 | ||
bec39cab AC |
10180 | int |
10181 | main () | |
10182 | { | |
a9322a30 TT |
10183 | char *data, *data2, *data3; |
10184 | int i, pagesize; | |
10185 | int fd; | |
10186 | ||
10187 | pagesize = getpagesize (); | |
10188 | ||
10189 | /* First, make a file with some known garbage in it. */ | |
10190 | data = (char *) malloc (pagesize); | |
10191 | if (!data) | |
81ecdfbb | 10192 | return 1; |
a9322a30 TT |
10193 | for (i = 0; i < pagesize; ++i) |
10194 | *(data + i) = rand (); | |
10195 | umask (0); | |
10196 | fd = creat ("conftest.mmap", 0600); | |
10197 | if (fd < 0) | |
81ecdfbb | 10198 | return 1; |
a9322a30 | 10199 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 10200 | return 1; |
a9322a30 TT |
10201 | close (fd); |
10202 | ||
10203 | /* Next, try to mmap the file at a fixed address which already has | |
10204 | something else allocated at it. If we can, also make sure that | |
10205 | we see the same garbage. */ | |
10206 | fd = open ("conftest.mmap", O_RDWR); | |
10207 | if (fd < 0) | |
81ecdfbb | 10208 | return 1; |
a9322a30 TT |
10209 | data2 = (char *) malloc (2 * pagesize); |
10210 | if (!data2) | |
81ecdfbb RW |
10211 | return 1; |
10212 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
10213 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
10214 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 10215 | return 1; |
a9322a30 TT |
10216 | for (i = 0; i < pagesize; ++i) |
10217 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 10218 | return 1; |
a9322a30 TT |
10219 | |
10220 | /* Finally, make sure that changes to the mapped area do not | |
10221 | percolate back to the file as seen by read(). (This is a bug on | |
10222 | some variants of i386 svr4.0.) */ | |
10223 | for (i = 0; i < pagesize; ++i) | |
10224 | *(data2 + i) = *(data2 + i) + 1; | |
10225 | data3 = (char *) malloc (pagesize); | |
10226 | if (!data3) | |
81ecdfbb | 10227 | return 1; |
a9322a30 | 10228 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 10229 | return 1; |
a9322a30 TT |
10230 | for (i = 0; i < pagesize; ++i) |
10231 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 10232 | return 1; |
a9322a30 | 10233 | close (fd); |
81ecdfbb | 10234 | return 0; |
bec39cab AC |
10235 | } |
10236 | _ACEOF | |
81ecdfbb | 10237 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 10238 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 10239 | else |
81ecdfbb | 10240 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 10241 | fi |
81ecdfbb RW |
10242 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10243 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 10244 | fi |
81ecdfbb | 10245 | |
a9322a30 | 10246 | fi |
81ecdfbb RW |
10247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
10248 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
10249 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
10250 | ||
81ecdfbb | 10251 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 10252 | |
086ec9eb | 10253 | fi |
a9322a30 | 10254 | rm -f conftest.mmap |
a3828db0 | 10255 | |
81ecdfbb RW |
10256 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
10257 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 10258 | |
a9322a30 TT |
10259 | else |
10260 | ||
10261 | cat >>confdefs.h <<_ACEOF | |
10262 | #define pid_t int | |
bec39cab | 10263 | _ACEOF |
086ec9eb MK |
10264 | |
10265 | fi | |
10266 | ||
81ecdfbb RW |
10267 | for ac_header in vfork.h |
10268 | do : | |
10269 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
10270 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 10271 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10272 | #define HAVE_VFORK_H 1 |
bec39cab | 10273 | _ACEOF |
c906108c SS |
10274 | |
10275 | fi | |
a9322a30 | 10276 | |
a3828db0 | 10277 | done |
c906108c | 10278 | |
a9322a30 | 10279 | for ac_func in fork vfork |
81ecdfbb RW |
10280 | do : |
10281 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10282 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10283 | eval as_val=\$$as_ac_var | |
10284 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 10285 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10286 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 10287 | _ACEOF |
b83266a0 | 10288 | |
97bf5e38 | 10289 | fi |
a3828db0 | 10290 | done |
b83266a0 | 10291 | |
a9322a30 | 10292 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
10293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
10294 | $as_echo_n "checking for working fork... " >&6; } | |
10295 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
10296 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10297 | else |
81ecdfbb | 10298 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10299 | ac_cv_func_fork_works=cross |
10300 | else | |
81ecdfbb RW |
10301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10302 | /* end confdefs.h. */ | |
10303 | $ac_includes_default | |
10304 | int | |
10305 | main () | |
10306 | { | |
10307 | ||
10308 | /* By Ruediger Kuhlmann. */ | |
10309 | return fork () < 0; | |
10310 | ||
10311 | ; | |
10312 | return 0; | |
10313 | } | |
a9322a30 | 10314 | _ACEOF |
81ecdfbb | 10315 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10316 | ac_cv_func_fork_works=yes |
10317 | else | |
81ecdfbb | 10318 | ac_cv_func_fork_works=no |
a9322a30 | 10319 | fi |
81ecdfbb RW |
10320 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10321 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10322 | fi |
81ecdfbb | 10323 | |
a9322a30 | 10324 | fi |
81ecdfbb RW |
10325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
10326 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
10327 | |
10328 | else | |
10329 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10330 | fi | |
10331 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10332 | case $host in | |
10333 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10334 | # Override, as these systems have only a dummy fork() stub | |
10335 | ac_cv_func_fork_works=no | |
10336 | ;; | |
10337 | *) | |
10338 | ac_cv_func_fork_works=yes | |
10339 | ;; | |
10340 | esac | |
81ecdfbb RW |
10341 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
10342 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10343 | fi |
10344 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
10345 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
10346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
10347 | $as_echo_n "checking for working vfork... " >&6; } | |
10348 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
10349 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10350 | else |
81ecdfbb | 10351 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10352 | ac_cv_func_vfork_works=cross |
10353 | else | |
81ecdfbb | 10354 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
10355 | /* end confdefs.h. */ |
10356 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 10357 | $ac_includes_default |
a9322a30 | 10358 | #include <sys/wait.h> |
81ecdfbb | 10359 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
10360 | # include <vfork.h> |
10361 | #endif | |
10362 | /* On some sparc systems, changes by the child to local and incoming | |
10363 | argument registers are propagated back to the parent. The compiler | |
10364 | is told about this with #include <vfork.h>, but some compilers | |
10365 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10366 | static variable whose address is put into a register that is | |
10367 | clobbered by the vfork. */ | |
10368 | static void | |
10369 | #ifdef __cplusplus | |
10370 | sparc_address_test (int arg) | |
10371 | # else | |
10372 | sparc_address_test (arg) int arg; | |
10373 | #endif | |
10374 | { | |
10375 | static pid_t child; | |
10376 | if (!child) { | |
10377 | child = vfork (); | |
10378 | if (child < 0) { | |
10379 | perror ("vfork"); | |
10380 | _exit(2); | |
10381 | } | |
10382 | if (!child) { | |
10383 | arg = getpid(); | |
10384 | write(-1, "", 0); | |
10385 | _exit (arg); | |
10386 | } | |
10387 | } | |
10388 | } | |
10389 | ||
10390 | int | |
10391 | main () | |
10392 | { | |
10393 | pid_t parent = getpid (); | |
10394 | pid_t child; | |
10395 | ||
10396 | sparc_address_test (0); | |
10397 | ||
10398 | child = vfork (); | |
10399 | ||
10400 | if (child == 0) { | |
10401 | /* Here is another test for sparc vfork register problems. This | |
10402 | test uses lots of local variables, at least as many local | |
10403 | variables as main has allocated so far including compiler | |
10404 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10405 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10406 | reuse the register of parent for one of the local variables, | |
10407 | since it will think that parent can't possibly be used any more | |
10408 | in this routine. Assigning to the local variable will thus | |
10409 | munge parent in the parent process. */ | |
10410 | pid_t | |
10411 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10412 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10413 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10414 | use the same hardware register for all 8 local variables. */ | |
10415 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10416 | || p != p5 || p != p6 || p != p7) | |
10417 | _exit(1); | |
10418 | ||
10419 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10420 | from child file descriptors. If the child closes a descriptor | |
10421 | before it execs or exits, this munges the parent's descriptor | |
10422 | as well. Test for this by closing stdout in the child. */ | |
10423 | _exit(close(fileno(stdout)) != 0); | |
10424 | } else { | |
10425 | int status; | |
10426 | struct stat st; | |
10427 | ||
10428 | while (wait(&status) != child) | |
10429 | ; | |
81ecdfbb | 10430 | return ( |
a9322a30 TT |
10431 | /* Was there some problem with vforking? */ |
10432 | child < 0 | |
10433 | ||
10434 | /* Did the child fail? (This shouldn't happen.) */ | |
10435 | || status | |
10436 | ||
10437 | /* Did the vfork/compiler bug occur? */ | |
10438 | || parent != getpid() | |
10439 | ||
10440 | /* Did the file descriptor bug occur? */ | |
10441 | || fstat(fileno(stdout), &st) != 0 | |
10442 | ); | |
10443 | } | |
10444 | } | |
10445 | _ACEOF | |
81ecdfbb | 10446 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10447 | ac_cv_func_vfork_works=yes |
10448 | else | |
81ecdfbb | 10449 | ac_cv_func_vfork_works=no |
a9322a30 | 10450 | fi |
81ecdfbb RW |
10451 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10452 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10453 | fi |
81ecdfbb | 10454 | |
a9322a30 | 10455 | fi |
81ecdfbb RW |
10456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10457 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10458 | |
10459 | fi; | |
10460 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10461 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10462 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10463 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10464 | fi |
10465 | ||
10466 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10467 | ||
81ecdfbb | 10468 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10469 | |
10470 | else | |
10471 | ||
81ecdfbb | 10472 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10473 | |
10474 | fi | |
10475 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10476 | ||
81ecdfbb | 10477 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10478 | |
10479 | fi | |
10480 | ||
abbffc89 | 10481 | for ac_func in getrusage getuid getgid \ |
bdca27a2 | 10482 | pipe poll pread pread64 pwrite resize_term \ |
7313baad | 10483 | sbrk setpgid setpgrp setsid \ |
9467110b | 10484 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 10485 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
3332aaf2 | 10486 | setrlimit getrlimit posix_madvise waitpid \ |
992c7d70 | 10487 | ptrace64 sigaltstack |
81ecdfbb RW |
10488 | do : |
10489 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10490 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10491 | eval as_val=\$$as_ac_var | |
10492 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10493 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10494 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10495 | _ACEOF |
10496 | ||
10497 | fi | |
10498 | done | |
10499 | ||
10500 | ||
81ecdfbb RW |
10501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10502 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10503 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10504 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10505 | else |
81ecdfbb | 10506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10507 | /* end confdefs.h. */ |
10508 | #include <langinfo.h> | |
10509 | int | |
10510 | main () | |
10511 | { | |
10512 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10513 | ; |
10514 | return 0; | |
10515 | } | |
10516 | _ACEOF | |
81ecdfbb | 10517 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10518 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10519 | else |
81ecdfbb | 10520 | am_cv_langinfo_codeset=no |
a4db0f07 | 10521 | fi |
81ecdfbb RW |
10522 | rm -f core conftest.err conftest.$ac_objext \ |
10523 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10524 | |
a4db0f07 | 10525 | fi |
81ecdfbb RW |
10526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10527 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10528 | if test $am_cv_langinfo_codeset = yes; then |
10529 | ||
81ecdfbb | 10530 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10531 | |
6c7a06a3 | 10532 | fi |
c906108c | 10533 | |
06825bd1 | 10534 | |
3266f10b TT |
10535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
10536 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
10537 | if test "${ac_cv_header_stdc+set}" = set; then : | |
10538 | $as_echo_n "(cached) " >&6 | |
10539 | else | |
10540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10541 | /* end confdefs.h. */ | |
10542 | #include <stdlib.h> | |
10543 | #include <stdarg.h> | |
10544 | #include <string.h> | |
10545 | #include <float.h> | |
10546 | ||
10547 | int | |
10548 | main () | |
10549 | { | |
10550 | ||
10551 | ; | |
10552 | return 0; | |
10553 | } | |
10554 | _ACEOF | |
10555 | if ac_fn_c_try_compile "$LINENO"; then : | |
10556 | ac_cv_header_stdc=yes | |
10557 | else | |
10558 | ac_cv_header_stdc=no | |
10559 | fi | |
10560 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10561 | ||
10562 | if test $ac_cv_header_stdc = yes; then | |
10563 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
10564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10565 | /* end confdefs.h. */ | |
10566 | #include <string.h> | |
10567 | ||
10568 | _ACEOF | |
10569 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10570 | $EGREP "memchr" >/dev/null 2>&1; then : | |
10571 | ||
10572 | else | |
10573 | ac_cv_header_stdc=no | |
10574 | fi | |
10575 | rm -f conftest* | |
10576 | ||
10577 | fi | |
10578 | ||
10579 | if test $ac_cv_header_stdc = yes; then | |
10580 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
10581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10582 | /* end confdefs.h. */ | |
10583 | #include <stdlib.h> | |
10584 | ||
10585 | _ACEOF | |
10586 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10587 | $EGREP "free" >/dev/null 2>&1; then : | |
10588 | ||
10589 | else | |
10590 | ac_cv_header_stdc=no | |
10591 | fi | |
10592 | rm -f conftest* | |
10593 | ||
10594 | fi | |
10595 | ||
10596 | if test $ac_cv_header_stdc = yes; then | |
10597 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
10598 | if test "$cross_compiling" = yes; then : | |
10599 | : | |
10600 | else | |
10601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10602 | /* end confdefs.h. */ | |
10603 | #include <ctype.h> | |
10604 | #include <stdlib.h> | |
10605 | #if ((' ' & 0x0FF) == 0x020) | |
10606 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
10607 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
10608 | #else | |
10609 | # define ISLOWER(c) \ | |
10610 | (('a' <= (c) && (c) <= 'i') \ | |
10611 | || ('j' <= (c) && (c) <= 'r') \ | |
10612 | || ('s' <= (c) && (c) <= 'z')) | |
10613 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
10614 | #endif | |
10615 | ||
10616 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
10617 | int | |
10618 | main () | |
10619 | { | |
10620 | int i; | |
10621 | for (i = 0; i < 256; i++) | |
10622 | if (XOR (islower (i), ISLOWER (i)) | |
10623 | || toupper (i) != TOUPPER (i)) | |
10624 | return 2; | |
10625 | return 0; | |
10626 | } | |
10627 | _ACEOF | |
10628 | if ac_fn_c_try_run "$LINENO"; then : | |
10629 | ||
10630 | else | |
10631 | ac_cv_header_stdc=no | |
10632 | fi | |
10633 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10634 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10635 | fi | |
10636 | ||
10637 | fi | |
10638 | fi | |
10639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
10640 | $as_echo "$ac_cv_header_stdc" >&6; } | |
10641 | if test $ac_cv_header_stdc = yes; then | |
10642 | ||
10643 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
10644 | ||
3266f10b TT |
10645 | fi |
10646 | ||
10647 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
10648 | # for constant arguments. Useless! | |
10649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
10650 | $as_echo_n "checking for working alloca.h... " >&6; } | |
10651 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
10652 | $as_echo_n "(cached) " >&6 | |
10653 | else | |
10654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10655 | /* end confdefs.h. */ | |
10656 | #include <alloca.h> | |
10657 | int | |
10658 | main () | |
10659 | { | |
10660 | char *p = (char *) alloca (2 * sizeof (int)); | |
10661 | if (p) return 0; | |
10662 | ; | |
10663 | return 0; | |
10664 | } | |
10665 | _ACEOF | |
10666 | if ac_fn_c_try_link "$LINENO"; then : | |
10667 | ac_cv_working_alloca_h=yes | |
10668 | else | |
10669 | ac_cv_working_alloca_h=no | |
10670 | fi | |
10671 | rm -f core conftest.err conftest.$ac_objext \ | |
10672 | conftest$ac_exeext conftest.$ac_ext | |
10673 | fi | |
10674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
10675 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
10676 | if test $ac_cv_working_alloca_h = yes; then | |
10677 | ||
10678 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
10679 | ||
10680 | fi | |
10681 | ||
10682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
10683 | $as_echo_n "checking for alloca... " >&6; } | |
10684 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
10685 | $as_echo_n "(cached) " >&6 | |
10686 | else | |
10687 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10688 | /* end confdefs.h. */ | |
10689 | #ifdef __GNUC__ | |
10690 | # define alloca __builtin_alloca | |
10691 | #else | |
10692 | # ifdef _MSC_VER | |
10693 | # include <malloc.h> | |
10694 | # define alloca _alloca | |
10695 | # else | |
10696 | # ifdef HAVE_ALLOCA_H | |
10697 | # include <alloca.h> | |
10698 | # else | |
10699 | # ifdef _AIX | |
10700 | #pragma alloca | |
10701 | # else | |
10702 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
10703 | char *alloca (); | |
10704 | # endif | |
10705 | # endif | |
10706 | # endif | |
10707 | # endif | |
10708 | #endif | |
10709 | ||
10710 | int | |
10711 | main () | |
10712 | { | |
10713 | char *p = (char *) alloca (1); | |
10714 | if (p) return 0; | |
10715 | ; | |
10716 | return 0; | |
10717 | } | |
10718 | _ACEOF | |
10719 | if ac_fn_c_try_link "$LINENO"; then : | |
10720 | ac_cv_func_alloca_works=yes | |
10721 | else | |
10722 | ac_cv_func_alloca_works=no | |
10723 | fi | |
10724 | rm -f core conftest.err conftest.$ac_objext \ | |
10725 | conftest$ac_exeext conftest.$ac_ext | |
10726 | fi | |
10727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
10728 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
10729 | ||
10730 | if test $ac_cv_func_alloca_works = yes; then | |
10731 | ||
10732 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
10733 | ||
10734 | else | |
10735 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
10736 | # that cause trouble. Some versions do not even contain alloca or | |
10737 | # contain a buggy version. If you still want to use their alloca, | |
10738 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
10739 | ||
10740 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
10741 | ||
10742 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
10743 | ||
10744 | ||
10745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
10746 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
10747 | if test "${ac_cv_os_cray+set}" = set; then : | |
10748 | $as_echo_n "(cached) " >&6 | |
10749 | else | |
10750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10751 | /* end confdefs.h. */ | |
10752 | #if defined CRAY && ! defined CRAY2 | |
10753 | webecray | |
10754 | #else | |
10755 | wenotbecray | |
10756 | #endif | |
10757 | ||
10758 | _ACEOF | |
10759 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10760 | $EGREP "webecray" >/dev/null 2>&1; then : | |
10761 | ac_cv_os_cray=yes | |
10762 | else | |
10763 | ac_cv_os_cray=no | |
10764 | fi | |
10765 | rm -f conftest* | |
10766 | ||
10767 | fi | |
10768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
10769 | $as_echo "$ac_cv_os_cray" >&6; } | |
10770 | if test $ac_cv_os_cray = yes; then | |
10771 | for ac_func in _getb67 GETB67 getb67; do | |
10772 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10773 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10774 | eval as_val=\$$as_ac_var | |
10775 | if test "x$as_val" = x""yes; then : | |
10776 | ||
10777 | cat >>confdefs.h <<_ACEOF | |
10778 | #define CRAY_STACKSEG_END $ac_func | |
10779 | _ACEOF | |
10780 | ||
10781 | break | |
10782 | fi | |
10783 | ||
10784 | done | |
10785 | fi | |
10786 | ||
10787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
10788 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
10789 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
10790 | $as_echo_n "(cached) " >&6 | |
10791 | else | |
10792 | if test "$cross_compiling" = yes; then : | |
10793 | ac_cv_c_stack_direction=0 | |
10794 | else | |
10795 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10796 | /* end confdefs.h. */ | |
10797 | $ac_includes_default | |
10798 | int | |
10799 | find_stack_direction () | |
10800 | { | |
10801 | static char *addr = 0; | |
10802 | auto char dummy; | |
10803 | if (addr == 0) | |
10804 | { | |
10805 | addr = &dummy; | |
10806 | return find_stack_direction (); | |
10807 | } | |
10808 | else | |
10809 | return (&dummy > addr) ? 1 : -1; | |
10810 | } | |
10811 | ||
10812 | int | |
10813 | main () | |
10814 | { | |
10815 | return find_stack_direction () < 0; | |
10816 | } | |
10817 | _ACEOF | |
10818 | if ac_fn_c_try_run "$LINENO"; then : | |
10819 | ac_cv_c_stack_direction=1 | |
10820 | else | |
10821 | ac_cv_c_stack_direction=-1 | |
10822 | fi | |
10823 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10824 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10825 | fi | |
10826 | ||
10827 | fi | |
10828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
10829 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
10830 | cat >>confdefs.h <<_ACEOF | |
10831 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
10832 | _ACEOF | |
10833 | ||
10834 | ||
10835 | fi | |
10836 | ||
10837 | ||
10838 | ||
10839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
10840 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10841 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10842 | $as_echo_n "(cached) " >&6 | |
10843 | else | |
10844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10845 | /* end confdefs.h. */ | |
10846 | #include <langinfo.h> | |
10847 | int | |
10848 | main () | |
10849 | { | |
10850 | char* cs = nl_langinfo(CODESET); | |
10851 | ; | |
10852 | return 0; | |
10853 | } | |
10854 | _ACEOF | |
10855 | if ac_fn_c_try_link "$LINENO"; then : | |
10856 | am_cv_langinfo_codeset=yes | |
10857 | else | |
10858 | am_cv_langinfo_codeset=no | |
10859 | fi | |
10860 | rm -f core conftest.err conftest.$ac_objext \ | |
10861 | conftest$ac_exeext conftest.$ac_ext | |
10862 | ||
10863 | fi | |
10864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
10865 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
10866 | if test $am_cv_langinfo_codeset = yes; then | |
10867 | ||
10868 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
10869 | ||
10870 | fi | |
10871 | ||
10872 | ||
a3d08894 | 10873 | 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 |
10874 | do : |
10875 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10876 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10877 | eval as_val=\$$as_ac_Header | |
10878 | if test "x$as_val" = x""yes; then : | |
10879 | cat >>confdefs.h <<_ACEOF | |
10880 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10881 | _ACEOF | |
10882 | ||
10883 | fi | |
10884 | ||
10885 | done | |
10886 | ||
10887 | ||
10888 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair | |
10889 | do : | |
10890 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10891 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10892 | eval as_val=\$$as_ac_var | |
10893 | if test "x$as_val" = x""yes; then : | |
10894 | cat >>confdefs.h <<_ACEOF | |
10895 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10896 | _ACEOF | |
10897 | ||
10898 | fi | |
10899 | done | |
10900 | ||
10901 | ||
10902 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
10903 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
10904 | ac_have_decl=1 | |
10905 | else | |
10906 | ac_have_decl=0 | |
10907 | fi | |
10908 | ||
10909 | cat >>confdefs.h <<_ACEOF | |
10910 | #define HAVE_DECL_STRERROR $ac_have_decl | |
10911 | _ACEOF | |
10912 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
10913 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
10914 | ac_have_decl=1 | |
10915 | else | |
10916 | ac_have_decl=0 | |
10917 | fi | |
10918 | ||
10919 | cat >>confdefs.h <<_ACEOF | |
10920 | #define HAVE_DECL_STRSTR $ac_have_decl | |
10921 | _ACEOF | |
10922 | ||
10923 | ||
e9bcb658 GB |
10924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
10925 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
10926 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
10927 | $as_echo_n "(cached) " >&6 | |
10928 | else | |
10929 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10930 | /* end confdefs.h. */ | |
10931 | ||
10932 | #include <setjmp.h> | |
10933 | ||
10934 | int | |
10935 | main () | |
10936 | { | |
10937 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
10938 | ; | |
10939 | return 0; | |
10940 | } | |
10941 | _ACEOF | |
10942 | if ac_fn_c_try_compile "$LINENO"; then : | |
10943 | gdb_cv_func_sigsetjmp=yes | |
10944 | else | |
10945 | gdb_cv_func_sigsetjmp=no | |
10946 | fi | |
10947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10948 | fi | |
10949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
10950 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
10951 | if test $gdb_cv_func_sigsetjmp = yes; then | |
10952 | ||
10953 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
10954 | ||
10955 | fi | |
10956 | ||
3266f10b | 10957 | |
a3828db0 MK |
10958 | # Check the return and argument types of ptrace. No canned test for |
10959 | # this, so roll our own. | |
10960 | gdb_ptrace_headers=' | |
4ff70b84 | 10961 | #include <sys/types.h> |
a3828db0 MK |
10962 | #if HAVE_SYS_PTRACE_H |
10963 | # include <sys/ptrace.h> | |
10964 | #endif | |
10965 | #if HAVE_UNISTD_H | |
10966 | # include <unistd.h> | |
10967 | #endif | |
10968 | ' | |
10969 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
10970 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
10971 | " | |
10972 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
10973 | ac_have_decl=1 | |
06825bd1 | 10974 | else |
81ecdfbb | 10975 | ac_have_decl=0 |
06825bd1 | 10976 | fi |
06825bd1 | 10977 | |
a3828db0 | 10978 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10979 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 10980 | _ACEOF |
81ecdfbb | 10981 | if test $ac_have_decl = 1; then : |
bec39cab | 10982 | |
a3828db0 | 10983 | else |
a3828db0 MK |
10984 | |
10985 | : ${gdb_cv_func_ptrace_ret='int'} | |
10986 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10987 | ||
06825bd1 MK |
10988 | fi |
10989 | ||
064ef605 DJ |
10990 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
10991 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
10992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
10993 | $as_echo_n "checking return type of ptrace... " >&6; } | |
10994 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
10995 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10996 | else |
81ecdfbb | 10997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10998 | /* end confdefs.h. */ |
a3828db0 | 10999 | $gdb_ptrace_headers |
bec39cab AC |
11000 | int |
11001 | main () | |
11002 | { | |
064ef605 DJ |
11003 | extern long ptrace (enum __ptrace_request, ...); |
11004 | ; | |
11005 | return 0; | |
11006 | } | |
11007 | _ACEOF | |
81ecdfbb | 11008 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
11009 | gdb_cv_func_ptrace_ret='long' |
11010 | else | |
81ecdfbb | 11011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
11012 | /* end confdefs.h. */ |
11013 | $gdb_ptrace_headers | |
11014 | int | |
11015 | main () | |
11016 | { | |
a3828db0 | 11017 | extern int ptrace (); |
bec39cab AC |
11018 | ; |
11019 | return 0; | |
11020 | } | |
11021 | _ACEOF | |
81ecdfbb | 11022 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11023 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 11024 | else |
81ecdfbb | 11025 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 11026 | fi |
81ecdfbb | 11027 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 11028 | fi |
81ecdfbb | 11029 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 11030 | fi |
81ecdfbb RW |
11031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
11032 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 11033 | |
a3828db0 MK |
11034 | cat >>confdefs.h <<_ACEOF |
11035 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 11036 | _ACEOF |
70f9f479 | 11037 | |
a3828db0 | 11038 | # Check argument types. |
81ecdfbb RW |
11039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
11040 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
11041 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
11042 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11043 | else |
a3828db0 | 11044 | |
81ecdfbb | 11045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
11046 | /* end confdefs.h. */ |
11047 | $gdb_ptrace_headers | |
11048 | int | |
11049 | main () | |
11050 | { | |
11051 | extern long ptrace (enum __ptrace_request, ...); | |
11052 | ; | |
11053 | return 0; | |
11054 | } | |
11055 | _ACEOF | |
81ecdfbb | 11056 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
11057 | gdb_cv_func_ptrace_args='int,int,long,long' |
11058 | else | |
064ef605 | 11059 | |
a3828db0 MK |
11060 | for gdb_arg1 in 'int' 'long'; do |
11061 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 11062 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 11063 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 11064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11065 | /* end confdefs.h. */ |
a3828db0 | 11066 | $gdb_ptrace_headers |
bec39cab AC |
11067 | int |
11068 | main () | |
11069 | { | |
a3828db0 MK |
11070 | |
11071 | extern $gdb_cv_func_ptrace_ret | |
11072 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
11073 | ||
bec39cab AC |
11074 | ; |
11075 | return 0; | |
11076 | } | |
11077 | _ACEOF | |
81ecdfbb | 11078 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
11079 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
11080 | break 4; | |
5c7f2947 | 11081 | fi |
81ecdfbb | 11082 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 11083 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 11084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11085 | /* end confdefs.h. */ |
a3828db0 | 11086 | $gdb_ptrace_headers |
bec39cab AC |
11087 | int |
11088 | main () | |
11089 | { | |
a3828db0 MK |
11090 | |
11091 | extern $gdb_cv_func_ptrace_ret | |
11092 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
11093 | ||
bec39cab AC |
11094 | ; |
11095 | return 0; | |
11096 | } | |
11097 | _ACEOF | |
81ecdfbb | 11098 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
11099 | |
11100 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
11101 | break 5; | |
78434e59 | 11102 | fi |
81ecdfbb | 11103 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
11104 | done |
11105 | done | |
11106 | done | |
11107 | done | |
11108 | done | |
11109 | # Provide a safe default value. | |
11110 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
11111 | ||
064ef605 | 11112 | fi |
81ecdfbb | 11113 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 11114 | fi |
81ecdfbb RW |
11115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
11116 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
11117 | ac_save_IFS=$IFS; IFS=',' |
11118 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
11119 | IFS=$ac_save_IFS | |
11120 | shift | |
bec39cab | 11121 | |
a3828db0 MK |
11122 | cat >>confdefs.h <<_ACEOF |
11123 | #define PTRACE_TYPE_ARG3 $3 | |
11124 | _ACEOF | |
11125 | ||
96d7229d LM |
11126 | |
11127 | cat >>confdefs.h <<_ACEOF | |
11128 | #define PTRACE_TYPE_ARG4 $4 | |
11129 | _ACEOF | |
11130 | ||
a3828db0 MK |
11131 | if test -n "$5"; then |
11132 | ||
11133 | cat >>confdefs.h <<_ACEOF | |
11134 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 11135 | _ACEOF |
78434e59 MK |
11136 | |
11137 | fi | |
11138 | ||
a3828db0 | 11139 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
11140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
11141 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
11142 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
11143 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 11144 | else |
81ecdfbb RW |
11145 | if test "$cross_compiling" = yes; then : |
11146 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 11147 | else |
81ecdfbb | 11148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11149 | /* end confdefs.h. */ |
81ecdfbb | 11150 | $ac_includes_default |
bec39cab AC |
11151 | int |
11152 | main () | |
11153 | { | |
a3828db0 MK |
11154 | /* If this system has a BSD-style setpgrp which takes arguments, |
11155 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
11156 | exit successfully. */ | |
81ecdfbb | 11157 | return setpgrp (1,1) != -1; |
bec39cab AC |
11158 | ; |
11159 | return 0; | |
11160 | } | |
11161 | _ACEOF | |
81ecdfbb | 11162 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 11163 | ac_cv_func_setpgrp_void=no |
c906108c | 11164 | else |
81ecdfbb | 11165 | ac_cv_func_setpgrp_void=yes |
c906108c | 11166 | fi |
81ecdfbb RW |
11167 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11168 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11169 | fi |
81ecdfbb | 11170 | |
a3828db0 | 11171 | fi |
81ecdfbb RW |
11172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
11173 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
11174 | if test $ac_cv_func_setpgrp_void = yes; then |
11175 | ||
81ecdfbb | 11176 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
11177 | |
11178 | fi | |
a3828db0 MK |
11179 | |
11180 | else | |
81ecdfbb RW |
11181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
11182 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
11183 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
11184 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11185 | else |
81ecdfbb | 11186 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11187 | /* end confdefs.h. */ |
a3828db0 MK |
11188 | |
11189 | #include <unistd.h> | |
11190 | ||
bec39cab AC |
11191 | int |
11192 | main () | |
11193 | { | |
a3828db0 MK |
11194 | |
11195 | if (setpgrp(1,1) == -1) | |
11196 | exit (0); | |
11197 | else | |
11198 | exit (1); | |
11199 | ||
bec39cab AC |
11200 | ; |
11201 | return 0; | |
11202 | } | |
11203 | _ACEOF | |
81ecdfbb | 11204 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11205 | ac_cv_func_setpgrp_void=no |
c906108c | 11206 | else |
81ecdfbb | 11207 | ac_cv_func_setpgrp_void=yes |
c906108c | 11208 | fi |
81ecdfbb | 11209 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11210 | fi |
81ecdfbb RW |
11211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
11212 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 11213 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 11214 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 11215 | |
a3828db0 | 11216 | fi |
c906108c SS |
11217 | fi |
11218 | ||
a3828db0 MK |
11219 | # Assume we'll default to using the included libiberty regex. |
11220 | gdb_use_included_regex=yes | |
11221 | ||
11222 | # However, if the system regex is GNU regex, then default to *not* | |
11223 | # using the included regex. | |
81ecdfbb RW |
11224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
11225 | $as_echo_n "checking for GNU regex... " >&6; } | |
11226 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
11227 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11228 | else |
81ecdfbb | 11229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11230 | /* end confdefs.h. */ |
a3828db0 | 11231 | #include <gnu-versions.h> |
bec39cab AC |
11232 | int |
11233 | main () | |
11234 | { | |
81ecdfbb RW |
11235 | #define REGEX_INTERFACE_VERSION 1 |
11236 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
11237 | # error "Version mismatch" | |
11238 | #endif | |
5c45e068 MK |
11239 | ; |
11240 | return 0; | |
11241 | } | |
11242 | _ACEOF | |
81ecdfbb RW |
11243 | if ac_fn_c_try_compile "$LINENO"; then : |
11244 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 11245 | else |
81ecdfbb RW |
11246 | gdb_cv_have_gnu_regex=no |
11247 | fi | |
11248 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11249 | fi | |
11250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
11251 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
11252 | if test $gdb_cv_have_gnu_regex = yes; then | |
11253 | gdb_use_included_regex=no | |
5c45e068 | 11254 | fi |
81ecdfbb RW |
11255 | |
11256 | ||
11257 | # Check whether --with-included-regex was given. | |
11258 | if test "${with_included_regex+set}" = set; then : | |
11259 | withval=$with_included_regex; gdb_with_regex=$withval | |
11260 | else | |
11261 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 11262 | fi |
81ecdfbb RW |
11263 | |
11264 | if test "$gdb_with_regex" = yes; then | |
11265 | ||
11266 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
11267 | ||
c906108c | 11268 | fi |
81ecdfbb RW |
11269 | |
11270 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
11271 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
11272 | #include <sys/proc.h> | |
11273 | ||
11274 | " | |
11275 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 11276 | |
5c45e068 | 11277 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 11278 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 11279 | _ACEOF |
c906108c | 11280 | |
5c45e068 | 11281 | |
97bf5e38 | 11282 | fi |
c906108c | 11283 | |
5c45e068 | 11284 | |
a3828db0 | 11285 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
11286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
11287 | $as_echo_n "checking for struct lwp... " >&6; } | |
11288 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
11289 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11290 | else |
81ecdfbb | 11291 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11292 | /* end confdefs.h. */ |
a3828db0 MK |
11293 | #include <sys/param.h> |
11294 | #include <sys/lwp.h> | |
bec39cab AC |
11295 | int |
11296 | main () | |
11297 | { | |
a3828db0 | 11298 | struct lwp l; |
bec39cab AC |
11299 | ; |
11300 | return 0; | |
11301 | } | |
11302 | _ACEOF | |
81ecdfbb | 11303 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11304 | gdb_cv_struct_lwp=yes |
c906108c | 11305 | else |
81ecdfbb | 11306 | gdb_cv_struct_lwp=no |
c906108c | 11307 | fi |
81ecdfbb | 11308 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11309 | fi |
81ecdfbb RW |
11310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
11311 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 11312 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 11313 | |
81ecdfbb | 11314 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 11315 | |
97bf5e38 | 11316 | fi |
c906108c | 11317 | |
a3828db0 | 11318 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
11319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
11320 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
11321 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
11322 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11323 | else |
81ecdfbb | 11324 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11325 | /* end confdefs.h. */ |
a3828db0 MK |
11326 | #include <sys/types.h> |
11327 | #include <machine/reg.h> | |
bec39cab AC |
11328 | int |
11329 | main () | |
11330 | { | |
a3828db0 | 11331 | struct reg r; |
bec39cab AC |
11332 | ; |
11333 | return 0; | |
11334 | } | |
11335 | _ACEOF | |
81ecdfbb | 11336 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11337 | gdb_cv_struct_reg=yes |
27ca5dad | 11338 | else |
81ecdfbb | 11339 | gdb_cv_struct_reg=no |
27ca5dad | 11340 | fi |
81ecdfbb | 11341 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 11342 | fi |
81ecdfbb RW |
11343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
11344 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 11345 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 11346 | |
81ecdfbb | 11347 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
11348 | |
11349 | fi | |
97bf5e38 | 11350 | |
a3828db0 MK |
11351 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
11352 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
11353 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
11354 | " | |
11355 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
11356 | |
11357 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 11358 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 11359 | _ACEOF |
3862412b | 11360 | |
5c45e068 | 11361 | |
97bf5e38 | 11362 | fi |
81ecdfbb RW |
11363 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
11364 | " | |
11365 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
11366 | |
11367 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 11368 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 11369 | _ACEOF |
3862412b | 11370 | |
5c45e068 | 11371 | |
97bf5e38 | 11372 | fi |
3862412b | 11373 | |
5c45e068 | 11374 | |
6fea9e18 L |
11375 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
11376 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
11377 | # `struct user_regs_struct'. | |
11378 | 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> | |
11379 | " | |
11380 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
11381 | ||
11382 | cat >>confdefs.h <<_ACEOF | |
11383 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
11384 | _ACEOF | |
11385 | ||
11386 | ||
11387 | fi | |
11388 | 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> | |
11389 | " | |
11390 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
11391 | ||
11392 | cat >>confdefs.h <<_ACEOF | |
11393 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
11394 | _ACEOF | |
11395 | ||
11396 | ||
11397 | fi | |
11398 | ||
11399 | ||
a3828db0 | 11400 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
11401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
11402 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
11403 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
11404 | $as_echo_n "(cached) " >&6 | |
451928c5 | 11405 | else |
81ecdfbb | 11406 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11407 | /* end confdefs.h. */ |
a3828db0 | 11408 | #include <sys/ptrace.h> |
bec39cab AC |
11409 | int |
11410 | main () | |
11411 | { | |
a3828db0 | 11412 | PTRACE_GETREGS; |
bec39cab AC |
11413 | ; |
11414 | return 0; | |
11415 | } | |
11416 | _ACEOF | |
81ecdfbb | 11417 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11418 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 11419 | else |
81ecdfbb | 11420 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 11421 | fi |
81ecdfbb | 11422 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
11423 | fi |
11424 | ||
81ecdfbb RW |
11425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
11426 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 11427 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 11428 | |
81ecdfbb | 11429 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 11430 | |
97bf5e38 | 11431 | fi |
451928c5 | 11432 | |
a3828db0 | 11433 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
11434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
11435 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
11436 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
11437 | $as_echo_n "(cached) " >&6 | |
451928c5 | 11438 | else |
81ecdfbb | 11439 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11440 | /* end confdefs.h. */ |
a3828db0 | 11441 | #include <sys/ptrace.h> |
bec39cab AC |
11442 | int |
11443 | main () | |
11444 | { | |
a3828db0 | 11445 | PTRACE_GETFPXREGS; |
bec39cab AC |
11446 | ; |
11447 | return 0; | |
11448 | } | |
11449 | _ACEOF | |
81ecdfbb | 11450 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11451 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 11452 | else |
81ecdfbb | 11453 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 11454 | fi |
81ecdfbb | 11455 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
11456 | fi |
11457 | ||
81ecdfbb RW |
11458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
11459 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 11460 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 11461 | |
81ecdfbb | 11462 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 11463 | |
97bf5e38 | 11464 | fi |
451928c5 | 11465 | |
a3828db0 | 11466 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
11467 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
11468 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
11469 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
11470 | $as_echo_n "(cached) " >&6 | |
3862412b | 11471 | else |
81ecdfbb | 11472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11473 | /* end confdefs.h. */ |
a3828db0 MK |
11474 | #include <sys/types.h> |
11475 | #include <sys/ptrace.h> | |
bec39cab AC |
11476 | int |
11477 | main () | |
11478 | { | |
a3828db0 | 11479 | PT_GETDBREGS; |
bec39cab AC |
11480 | ; |
11481 | return 0; | |
11482 | } | |
11483 | _ACEOF | |
81ecdfbb | 11484 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11485 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 11486 | else |
81ecdfbb | 11487 | gdb_cv_have_pt_getdbregs=no |
3862412b | 11488 | fi |
81ecdfbb | 11489 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
11490 | fi |
11491 | ||
81ecdfbb RW |
11492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
11493 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 11494 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 11495 | |
81ecdfbb | 11496 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 11497 | |
97bf5e38 | 11498 | fi |
3862412b | 11499 | |
a3828db0 | 11500 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
11501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
11502 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
11503 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
11504 | $as_echo_n "(cached) " >&6 | |
3862412b | 11505 | else |
81ecdfbb | 11506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11507 | /* end confdefs.h. */ |
a3828db0 MK |
11508 | #include <sys/types.h> |
11509 | #include <sys/ptrace.h> | |
bec39cab AC |
11510 | int |
11511 | main () | |
11512 | { | |
a3828db0 | 11513 | PT_GETXMMREGS; |
bec39cab AC |
11514 | ; |
11515 | return 0; | |
11516 | } | |
11517 | _ACEOF | |
81ecdfbb | 11518 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11519 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 11520 | else |
81ecdfbb | 11521 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 11522 | fi |
81ecdfbb | 11523 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
11524 | fi |
11525 | ||
81ecdfbb RW |
11526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
11527 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 11528 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 11529 | |
81ecdfbb | 11530 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 11531 | |
97bf5e38 | 11532 | fi |
3862412b | 11533 | |
05b4bd79 | 11534 | # Detect which type of /proc is in use, such as for Solaris. |
97bf5e38 MK |
11535 | |
11536 | if test "${target}" = "${host}"; then | |
11537 | case "${host}" in | |
7b00db47 | 11538 | *-*-sysv4.2* | *-*-sysv5* ) |
60ca704f | 11539 | |
81ecdfbb | 11540 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
11541 | |
11542 | ;; | |
c162e8c9 | 11543 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 11544 | |
81ecdfbb | 11545 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
11546 | |
11547 | ;; | |
11548 | mips-sgi-irix5*) | |
11549 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 11550 | |
81ecdfbb | 11551 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
11552 | |
11553 | ;; | |
11554 | esac | |
11555 | fi | |
11556 | ||
11557 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
11558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
11559 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
11560 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
11561 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 11562 | else |
81ecdfbb | 11563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11564 | /* end confdefs.h. */ |
596c9d4b KB |
11565 | |
11566 | #define _SYSCALL32 | |
d30c5336 JK |
11567 | /* Needed for new procfs interface on sparc-solaris. */ |
11568 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 11569 | #include <sys/procfs.h> |
bec39cab AC |
11570 | int |
11571 | main () | |
11572 | { | |
97bf5e38 | 11573 | gregset_t avar |
bec39cab AC |
11574 | ; |
11575 | return 0; | |
11576 | } | |
11577 | _ACEOF | |
81ecdfbb | 11578 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11579 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 11580 | else |
81ecdfbb | 11581 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 11582 | |
596c9d4b | 11583 | fi |
81ecdfbb | 11584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
11585 | fi |
11586 | ||
97bf5e38 | 11587 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 11588 | |
81ecdfbb | 11589 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
11590 | |
11591 | fi | |
81ecdfbb RW |
11592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
11593 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 11594 | |
81ecdfbb RW |
11595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
11596 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
11597 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
11598 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 11599 | else |
81ecdfbb | 11600 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11601 | /* end confdefs.h. */ |
97bf5e38 MK |
11602 | |
11603 | #define _SYSCALL32 | |
d30c5336 JK |
11604 | /* Needed for new procfs interface on sparc-solaris. */ |
11605 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 11606 | #include <sys/procfs.h> |
bec39cab AC |
11607 | int |
11608 | main () | |
11609 | { | |
97bf5e38 | 11610 | fpregset_t avar |
bec39cab AC |
11611 | ; |
11612 | return 0; | |
11613 | } | |
11614 | _ACEOF | |
81ecdfbb | 11615 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11616 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 11617 | else |
81ecdfbb | 11618 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 11619 | |
d84dd0c5 | 11620 | fi |
81ecdfbb | 11621 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
11622 | fi |
11623 | ||
97bf5e38 | 11624 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 11625 | |
81ecdfbb | 11626 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 11627 | |
97bf5e38 | 11628 | fi |
81ecdfbb RW |
11629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
11630 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 11631 | |
81ecdfbb RW |
11632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
11633 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
11634 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
11635 | $as_echo_n "(cached) " >&6 | |
c906108c | 11636 | else |
81ecdfbb | 11637 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11638 | /* end confdefs.h. */ |
c906108c | 11639 | |
97bf5e38 | 11640 | #define _SYSCALL32 |
d30c5336 JK |
11641 | /* Needed for new procfs interface on sparc-solaris. */ |
11642 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11643 | #include <sys/procfs.h> |
bec39cab AC |
11644 | int |
11645 | main () | |
11646 | { | |
97bf5e38 | 11647 | prgregset_t avar |
bec39cab AC |
11648 | ; |
11649 | return 0; | |
11650 | } | |
11651 | _ACEOF | |
81ecdfbb | 11652 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11653 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 11654 | else |
81ecdfbb | 11655 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 11656 | |
c906108c | 11657 | fi |
81ecdfbb | 11658 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11659 | fi |
11660 | ||
97bf5e38 | 11661 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 11662 | |
81ecdfbb | 11663 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 11664 | |
97bf5e38 | 11665 | fi |
81ecdfbb RW |
11666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
11667 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 11668 | |
81ecdfbb RW |
11669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
11670 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
11671 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
11672 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11673 | else |
81ecdfbb | 11674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11675 | /* end confdefs.h. */ |
97bf5e38 MK |
11676 | |
11677 | #define _SYSCALL32 | |
d30c5336 JK |
11678 | /* Needed for new procfs interface on sparc-solaris. */ |
11679 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11680 | #include <sys/procfs.h> |
bec39cab AC |
11681 | int |
11682 | main () | |
11683 | { | |
97bf5e38 | 11684 | prfpregset_t avar |
bec39cab AC |
11685 | ; |
11686 | return 0; | |
11687 | } | |
11688 | _ACEOF | |
81ecdfbb | 11689 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11690 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 11691 | else |
81ecdfbb | 11692 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 11693 | |
d45fe813 | 11694 | fi |
81ecdfbb | 11695 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11696 | fi |
11697 | ||
97bf5e38 | 11698 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 11699 | |
81ecdfbb | 11700 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 11701 | |
97bf5e38 | 11702 | fi |
81ecdfbb RW |
11703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
11704 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 11705 | |
81ecdfbb RW |
11706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
11707 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
11708 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
11709 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11710 | else |
81ecdfbb | 11711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11712 | /* end confdefs.h. */ |
97bf5e38 MK |
11713 | |
11714 | #define _SYSCALL32 | |
d30c5336 JK |
11715 | /* Needed for new procfs interface on sparc-solaris. */ |
11716 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11717 | #include <sys/procfs.h> |
bec39cab AC |
11718 | int |
11719 | main () | |
11720 | { | |
97bf5e38 | 11721 | prgregset32_t avar |
bec39cab AC |
11722 | ; |
11723 | return 0; | |
11724 | } | |
11725 | _ACEOF | |
81ecdfbb | 11726 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11727 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 11728 | else |
81ecdfbb | 11729 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 11730 | |
d45fe813 | 11731 | fi |
81ecdfbb | 11732 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11733 | fi |
11734 | ||
97bf5e38 | 11735 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 11736 | |
81ecdfbb | 11737 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 11738 | |
97bf5e38 | 11739 | fi |
81ecdfbb RW |
11740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
11741 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 11742 | |
81ecdfbb RW |
11743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11744 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11745 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11746 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11747 | else |
81ecdfbb | 11748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11749 | /* end confdefs.h. */ |
97bf5e38 | 11750 | |
d45fe813 | 11751 | #define _SYSCALL32 |
d30c5336 JK |
11752 | /* Needed for new procfs interface on sparc-solaris. */ |
11753 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11754 | #include <sys/procfs.h> |
bec39cab AC |
11755 | int |
11756 | main () | |
11757 | { | |
97bf5e38 | 11758 | lwpid_t avar |
bec39cab AC |
11759 | ; |
11760 | return 0; | |
11761 | } | |
11762 | _ACEOF | |
81ecdfbb | 11763 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11764 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11765 | else |
81ecdfbb | 11766 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11767 | |
d45fe813 | 11768 | fi |
81ecdfbb | 11769 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11770 | fi |
11771 | ||
97bf5e38 | 11772 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11773 | |
81ecdfbb | 11774 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11775 | |
97bf5e38 | 11776 | fi |
81ecdfbb RW |
11777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11778 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11779 | |
81ecdfbb RW |
11780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11781 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11782 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11783 | $as_echo_n "(cached) " >&6 | |
c906108c | 11784 | else |
81ecdfbb | 11785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11786 | /* end confdefs.h. */ |
c906108c | 11787 | |
97bf5e38 | 11788 | #define _SYSCALL32 |
d30c5336 JK |
11789 | /* Needed for new procfs interface on sparc-solaris. */ |
11790 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11791 | #include <sys/procfs.h> |
bec39cab AC |
11792 | int |
11793 | main () | |
11794 | { | |
97bf5e38 | 11795 | psaddr_t avar |
bec39cab AC |
11796 | ; |
11797 | return 0; | |
11798 | } | |
11799 | _ACEOF | |
81ecdfbb | 11800 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11801 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11802 | else |
81ecdfbb | 11803 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11804 | |
c906108c | 11805 | fi |
81ecdfbb | 11806 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11807 | fi |
11808 | ||
97bf5e38 | 11809 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11810 | |
81ecdfbb | 11811 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11812 | |
97bf5e38 | 11813 | fi |
81ecdfbb RW |
11814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11815 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11816 | |
81ecdfbb RW |
11817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11818 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11819 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11820 | $as_echo_n "(cached) " >&6 | |
c906108c | 11821 | else |
81ecdfbb | 11822 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11823 | /* end confdefs.h. */ |
c906108c | 11824 | |
97bf5e38 | 11825 | #define _SYSCALL32 |
d30c5336 JK |
11826 | /* Needed for new procfs interface on sparc-solaris. */ |
11827 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11828 | #include <sys/procfs.h> |
bec39cab AC |
11829 | int |
11830 | main () | |
11831 | { | |
97bf5e38 | 11832 | prsysent_t avar |
bec39cab AC |
11833 | ; |
11834 | return 0; | |
11835 | } | |
11836 | _ACEOF | |
81ecdfbb | 11837 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11838 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11839 | else |
81ecdfbb | 11840 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11841 | |
c906108c | 11842 | fi |
81ecdfbb | 11843 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11844 | fi |
11845 | ||
97bf5e38 | 11846 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11847 | |
81ecdfbb | 11848 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11849 | |
97bf5e38 | 11850 | fi |
81ecdfbb RW |
11851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11852 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11853 | |
81ecdfbb RW |
11854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11855 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11856 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11857 | $as_echo_n "(cached) " >&6 | |
c906108c | 11858 | else |
81ecdfbb | 11859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11860 | /* end confdefs.h. */ |
c906108c | 11861 | |
97bf5e38 | 11862 | #define _SYSCALL32 |
d30c5336 JK |
11863 | /* Needed for new procfs interface on sparc-solaris. */ |
11864 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11865 | #include <sys/procfs.h> |
bec39cab AC |
11866 | int |
11867 | main () | |
11868 | { | |
97bf5e38 | 11869 | pr_sigset_t avar |
bec39cab AC |
11870 | ; |
11871 | return 0; | |
11872 | } | |
11873 | _ACEOF | |
81ecdfbb | 11874 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11875 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 11876 | else |
81ecdfbb | 11877 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 11878 | |
c906108c | 11879 | fi |
81ecdfbb | 11880 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11881 | fi |
11882 | ||
97bf5e38 | 11883 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 11884 | |
81ecdfbb | 11885 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 11886 | |
97bf5e38 | 11887 | fi |
81ecdfbb RW |
11888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
11889 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 11890 | |
81ecdfbb RW |
11891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
11892 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
11893 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
11894 | $as_echo_n "(cached) " >&6 | |
c906108c | 11895 | else |
81ecdfbb | 11896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11897 | /* end confdefs.h. */ |
c906108c | 11898 | |
97bf5e38 | 11899 | #define _SYSCALL32 |
d30c5336 JK |
11900 | /* Needed for new procfs interface on sparc-solaris. */ |
11901 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11902 | #include <sys/procfs.h> |
bec39cab AC |
11903 | int |
11904 | main () | |
11905 | { | |
97bf5e38 | 11906 | pr_sigaction64_t avar |
bec39cab AC |
11907 | ; |
11908 | return 0; | |
11909 | } | |
11910 | _ACEOF | |
81ecdfbb | 11911 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11912 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 11913 | else |
81ecdfbb | 11914 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 11915 | |
c906108c | 11916 | fi |
81ecdfbb | 11917 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11918 | fi |
11919 | ||
97bf5e38 | 11920 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 11921 | |
81ecdfbb | 11922 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 11923 | |
97bf5e38 | 11924 | fi |
81ecdfbb RW |
11925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
11926 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 11927 | |
81ecdfbb RW |
11928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
11929 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
11930 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
11931 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11932 | else |
81ecdfbb | 11933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11934 | /* end confdefs.h. */ |
97bf5e38 MK |
11935 | |
11936 | #define _SYSCALL32 | |
d30c5336 JK |
11937 | /* Needed for new procfs interface on sparc-solaris. */ |
11938 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11939 | #include <sys/procfs.h> |
bec39cab AC |
11940 | int |
11941 | main () | |
11942 | { | |
97bf5e38 | 11943 | pr_siginfo64_t avar |
bec39cab AC |
11944 | ; |
11945 | return 0; | |
11946 | } | |
11947 | _ACEOF | |
81ecdfbb | 11948 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11949 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
11950 | else | |
81ecdfbb | 11951 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 11952 | |
97bf5e38 | 11953 | fi |
81ecdfbb | 11954 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11955 | fi |
c906108c | 11956 | |
97bf5e38 | 11957 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 11958 | |
81ecdfbb | 11959 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 11960 | |
97bf5e38 | 11961 | fi |
81ecdfbb RW |
11962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
11963 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
11964 | |
11965 | ||
97bf5e38 MK |
11966 | |
11967 | ||
11968 | ||
97bf5e38 | 11969 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
11970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
11971 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
11972 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
11973 | $as_echo_n "(cached) " >&6 | |
c906108c | 11974 | else |
81ecdfbb | 11975 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 11976 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 11977 | else |
81ecdfbb | 11978 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11979 | /* end confdefs.h. */ |
97bf5e38 MK |
11980 | #include <sys/procfs.h> |
11981 | int main () | |
11982 | { | |
11983 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
11984 | return 1; | |
11985 | return 0; | |
11986 | } | |
bec39cab | 11987 | _ACEOF |
81ecdfbb | 11988 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11989 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
11990 | else |
11991 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 11992 | fi |
81ecdfbb RW |
11993 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11994 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11995 | fi |
81ecdfbb | 11996 | |
c906108c SS |
11997 | fi |
11998 | ||
81ecdfbb RW |
11999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
12000 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 12001 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 12002 | |
81ecdfbb | 12003 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 12004 | |
97bf5e38 MK |
12005 | fi |
12006 | fi | |
c906108c | 12007 | fi |
c906108c | 12008 | |
bc8bcb4b | 12009 | # Check if the compiler supports the `long long' type. |
c906108c | 12010 | |
81ecdfbb RW |
12011 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
12012 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
12013 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
12014 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12015 | else |
81ecdfbb | 12016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12017 | /* end confdefs.h. */ |
bc8bcb4b | 12018 | extern long long foo; |
bec39cab AC |
12019 | int |
12020 | main () | |
12021 | { | |
bc8bcb4b | 12022 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
12023 | ; |
12024 | return 0; | |
12025 | } | |
12026 | _ACEOF | |
81ecdfbb | 12027 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12028 | gdb_cv_c_long_long=yes |
12029 | else | |
81ecdfbb | 12030 | gdb_cv_c_long_long=no |
97bf5e38 | 12031 | fi |
81ecdfbb | 12032 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12033 | fi |
81ecdfbb RW |
12034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
12035 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
12036 | if test $gdb_cv_c_long_long != yes; then |
12037 | # libdecnumber requires long long. | |
12038 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
12039 | fi |
12040 | ||
bc8bcb4b | 12041 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 12042 | |
81ecdfbb RW |
12043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
12044 | $as_echo_n "checking for long long support in printf... " >&6; } | |
12045 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
12046 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12047 | else |
81ecdfbb | 12048 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12049 | gdb_cv_printf_has_long_long=no |
12050 | else | |
81ecdfbb | 12051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12052 | /* end confdefs.h. */ |
bc8bcb4b MK |
12053 | $ac_includes_default |
12054 | int | |
12055 | main () | |
12056 | { | |
12057 | char buf[32]; | |
97bf5e38 MK |
12058 | long long l = 0; |
12059 | l = (l << 16) + 0x0123; | |
12060 | l = (l << 16) + 0x4567; | |
12061 | l = (l << 16) + 0x89ab; | |
12062 | l = (l << 16) + 0xcdef; | |
12063 | sprintf (buf, "0x%016llx", l); | |
12064 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
12065 | ; |
12066 | return 0; | |
c906108c | 12067 | } |
bec39cab | 12068 | _ACEOF |
81ecdfbb | 12069 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
12070 | gdb_cv_printf_has_long_long=yes |
12071 | else | |
81ecdfbb | 12072 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 12073 | fi |
81ecdfbb RW |
12074 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12075 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12076 | fi |
81ecdfbb | 12077 | |
97bf5e38 | 12078 | fi |
81ecdfbb RW |
12079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
12080 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 12081 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 12082 | |
81ecdfbb | 12083 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
12084 | |
12085 | fi | |
97bf5e38 | 12086 | |
1a619819 LM |
12087 | # Check if the compiler and runtime support printing decfloats. |
12088 | ||
81ecdfbb RW |
12089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
12090 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
12091 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
12092 | $as_echo_n "(cached) " >&6 | |
1a619819 | 12093 | else |
81ecdfbb | 12094 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
12095 | gdb_cv_printf_has_decfloat=no |
12096 | else | |
81ecdfbb | 12097 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
12098 | /* end confdefs.h. */ |
12099 | $ac_includes_default | |
12100 | int | |
12101 | main () | |
12102 | { | |
12103 | char buf[64]; | |
12104 | _Decimal32 d32 = 1.2345df; | |
12105 | _Decimal64 d64 = 1.2345dd; | |
12106 | _Decimal128 d128 = 1.2345dl; | |
12107 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
12108 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
12109 | ; | |
12110 | return 0; | |
12111 | } | |
12112 | _ACEOF | |
81ecdfbb | 12113 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
12114 | gdb_cv_printf_has_decfloat=yes |
12115 | else | |
81ecdfbb | 12116 | gdb_cv_printf_has_decfloat=no |
1a619819 | 12117 | fi |
81ecdfbb RW |
12118 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12119 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 12120 | fi |
81ecdfbb | 12121 | |
1a619819 | 12122 | fi |
81ecdfbb RW |
12123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
12124 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
12125 | if test $gdb_cv_printf_has_decfloat = yes; then |
12126 | ||
81ecdfbb | 12127 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
12128 | |
12129 | fi | |
12130 | ||
bc8bcb4b MK |
12131 | # Check if the compiler supports the `long double' type. We can't use |
12132 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
12133 | # constants defined in <float.h> that fail on some systems, | |
12134 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 12135 | |
81ecdfbb RW |
12136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
12137 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
12138 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
12139 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12140 | else |
81ecdfbb | 12141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12142 | /* end confdefs.h. */ |
97bf5e38 | 12143 | long double foo; |
bec39cab | 12144 | _ACEOF |
81ecdfbb | 12145 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 12146 | gdb_cv_c_long_double=yes |
97bf5e38 | 12147 | else |
81ecdfbb | 12148 | gdb_cv_c_long_double=no |
97bf5e38 | 12149 | fi |
81ecdfbb | 12150 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12151 | fi |
81ecdfbb RW |
12152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
12153 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 12154 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 12155 | |
81ecdfbb | 12156 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12157 | |
12158 | fi | |
12159 | ||
bc8bcb4b | 12160 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 12161 | |
81ecdfbb RW |
12162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
12163 | $as_echo_n "checking for long double support in printf... " >&6; } | |
12164 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
12165 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12166 | else |
81ecdfbb | 12167 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12168 | gdb_cv_printf_has_long_double=no |
12169 | else | |
81ecdfbb | 12170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12171 | /* end confdefs.h. */ |
bc8bcb4b MK |
12172 | $ac_includes_default |
12173 | int | |
12174 | main () | |
12175 | { | |
12176 | char buf[16]; | |
97bf5e38 MK |
12177 | long double f = 3.141592653; |
12178 | sprintf (buf, "%Lg", f); | |
12179 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
12180 | ; |
12181 | return 0; | |
97bf5e38 | 12182 | } |
bec39cab | 12183 | _ACEOF |
81ecdfbb | 12184 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 12185 | gdb_cv_printf_has_long_double=yes |
c906108c | 12186 | else |
81ecdfbb | 12187 | gdb_cv_printf_has_long_double=no |
c906108c | 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 | |
c906108c | 12191 | fi |
81ecdfbb | 12192 | |
c906108c | 12193 | fi |
81ecdfbb RW |
12194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
12195 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 12196 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 12197 | |
81ecdfbb | 12198 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12199 | |
12200 | fi | |
97bf5e38 | 12201 | |
bc8bcb4b | 12202 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 12203 | |
81ecdfbb RW |
12204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
12205 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
12206 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
12207 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12208 | else |
81ecdfbb | 12209 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12210 | gdb_cv_scanf_has_long_double=no |
12211 | else | |
81ecdfbb | 12212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12213 | /* end confdefs.h. */ |
bc8bcb4b MK |
12214 | #include <stdio.h> |
12215 | int | |
12216 | main () | |
12217 | { | |
12218 | char *buf = "3.141592653"; | |
97bf5e38 MK |
12219 | long double f = 0; |
12220 | sscanf (buf, "%Lg", &f); | |
12221 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
12222 | ; |
12223 | return 0; | |
97bf5e38 | 12224 | } |
bec39cab | 12225 | _ACEOF |
81ecdfbb | 12226 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
12227 | gdb_cv_scanf_has_long_double=yes |
12228 | else | |
81ecdfbb | 12229 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 12230 | fi |
81ecdfbb RW |
12231 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12232 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12233 | fi |
81ecdfbb | 12234 | |
c906108c | 12235 | fi |
81ecdfbb RW |
12236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
12237 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 12238 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 12239 | |
81ecdfbb | 12240 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12241 | |
12242 | fi | |
c906108c | 12243 | |
438013df AO |
12244 | case ${host_os} in |
12245 | aix*) | |
81ecdfbb RW |
12246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
12247 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
12248 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
12249 | $as_echo_n "(cached) " >&6 | |
438013df | 12250 | else |
bec39cab | 12251 | |
438013df AO |
12252 | SAVE_LDFLAGS=$LDFLAGS |
12253 | ||
12254 | case $GCC in | |
12255 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
12256 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
12257 | esac | |
12258 | ||
12259 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 12260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12261 | /* end confdefs.h. */ |
438013df | 12262 | |
bec39cab AC |
12263 | int |
12264 | main () | |
12265 | { | |
438013df | 12266 | int i; |
bec39cab AC |
12267 | ; |
12268 | return 0; | |
12269 | } | |
12270 | _ACEOF | |
81ecdfbb | 12271 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 12272 | |
81ecdfbb RW |
12273 | else |
12274 | gdb_cv_bigtoc= | |
438013df | 12275 | fi |
81ecdfbb RW |
12276 | rm -f core conftest.err conftest.$ac_objext \ |
12277 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 12278 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 12279 | |
bec39cab | 12280 | fi |
81ecdfbb RW |
12281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
12282 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
12283 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
12284 | ;; | |
12285 | esac | |
12286 | ||
38f6b338 | 12287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 12288 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
12289 | dynamic_list=false |
12290 | if test "${gdb_native}" = yes; then | |
12291 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
12292 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
12293 | # may not be supported there. | |
12294 | old_LDFLAGS="$LDFLAGS" | |
12295 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
12296 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
12297 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
12298 | if test "${have_libpython}" = no; then | |
12299 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
12300 | /* end confdefs.h. */ |
12301 | ||
12302 | int | |
12303 | main () | |
12304 | { | |
12305 | ||
12306 | ; | |
12307 | return 0; | |
12308 | } | |
12309 | _ACEOF | |
12310 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
12311 | dynamic_list=true |
12312 | fi | |
12313 | rm -f core conftest.err conftest.$ac_objext \ | |
12314 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
12315 | else |
12316 | # Workaround http://bugs.python.org/issue4434 where static | |
12317 | # libpythonX.Y.a would get its symbols required for | |
12318 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
12319 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
12320 | old_CFLAGS="$CFLAGS" | |
12321 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
12322 | old_LIBS="$LIBS" |
12323 | LIBS="$LIBS $PYTHON_LIBS" | |
38f6b338 | 12324 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 12325 | true |
f6528abd | 12326 | else |
3bebe2f2 JK |
12327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12328 | /* end confdefs.h. */ | |
12329 | #include "${have_libpython}/Python.h" | |
12330 | int | |
12331 | main () | |
12332 | { | |
12333 | int err; | |
38f6b338 JK |
12334 | Py_Initialize (); |
12335 | err = PyRun_SimpleString ("import itertools\n"); | |
12336 | Py_Finalize (); | |
12337 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
12338 | ; |
12339 | return 0; | |
12340 | } | |
12341 | _ACEOF | |
12342 | if ac_fn_c_try_run "$LINENO"; then : | |
12343 | dynamic_list=true | |
12344 | fi | |
12345 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12346 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12347 | fi | |
12348 | ||
8c1fb155 | 12349 | LIBS="$old_LIBS" |
38f6b338 JK |
12350 | CFLAGS="$old_CFLAGS" |
12351 | fi | |
12352 | LDFLAGS="$old_LDFLAGS" | |
12353 | fi | |
12354 | if $dynamic_list; then | |
12355 | found="-Wl,--dynamic-list" | |
12356 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 12357 | else |
38f6b338 JK |
12358 | found="-rdynamic" |
12359 | RDYNAMIC="-rdynamic" | |
f6528abd | 12360 | fi |
f6528abd | 12361 | |
38f6b338 | 12362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 12363 | $as_echo "$found" >&6; } |
0407b3f1 | 12364 | |
f6528abd | 12365 | |
0407b3f1 | 12366 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 12367 | case ${host_os} in |
c906108c | 12368 | solaris*) |
d92419e5 JB |
12369 | # See if thread_db library is around for Solaris thread debugging. |
12370 | # Note that we must explicitly test for version 1 of the library | |
12371 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
12372 | # the same API. | |
81ecdfbb RW |
12373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
12374 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 12375 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
12376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12377 | $as_echo "yes" >&6; } | |
60ca704f | 12378 | |
81ecdfbb | 12379 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 12380 | |
3483b318 | 12381 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 12382 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
12383 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
12384 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
12385 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
12386 | $as_echo_n "(cached) " >&6 | |
c906108c | 12387 | else |
bec39cab | 12388 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 12389 | LIBS="-ldl $LIBS" |
81ecdfbb | 12390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
12391 | /* end confdefs.h. */ |
12392 | ||
81ecdfbb RW |
12393 | /* Override any GCC internal prototype to avoid an error. |
12394 | Use char because int might match the return type of a GCC | |
12395 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
12396 | #ifdef __cplusplus |
12397 | extern "C" | |
12398 | #endif | |
bec39cab AC |
12399 | char dlopen (); |
12400 | int | |
12401 | main () | |
12402 | { | |
81ecdfbb | 12403 | return dlopen (); |
bec39cab AC |
12404 | ; |
12405 | return 0; | |
12406 | } | |
12407 | _ACEOF | |
81ecdfbb | 12408 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
12409 | ac_cv_lib_dl_dlopen=yes |
12410 | else | |
81ecdfbb | 12411 | ac_cv_lib_dl_dlopen=no |
bec39cab | 12412 | fi |
81ecdfbb RW |
12413 | rm -f core conftest.err conftest.$ac_objext \ |
12414 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
12415 | LIBS=$ac_check_lib_save_LIBS |
12416 | fi | |
81ecdfbb RW |
12417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
12418 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
12419 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
12420 | cat >>confdefs.h <<_ACEOF |
12421 | #define HAVE_LIBDL 1 | |
12422 | _ACEOF | |
c906108c SS |
12423 | |
12424 | LIBS="-ldl $LIBS" | |
12425 | ||
c906108c SS |
12426 | fi |
12427 | ||
f6528abd | 12428 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
12429 | # Sun randomly tweaked the prototypes in <proc_service.h> |
12430 | # at one point. | |
81ecdfbb RW |
12431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
12432 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
12433 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
12434 | $as_echo_n "(cached) " >&6 | |
c906108c | 12435 | else |
bec39cab | 12436 | |
81ecdfbb | 12437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12438 | /* end confdefs.h. */ |
c906108c SS |
12439 | |
12440 | #include <proc_service.h> | |
12441 | ps_err_e ps_pdwrite | |
12442 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 12443 | |
bec39cab AC |
12444 | int |
12445 | main () | |
12446 | { | |
12447 | ||
12448 | ; | |
12449 | return 0; | |
12450 | } | |
12451 | _ACEOF | |
81ecdfbb | 12452 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
12453 | gdb_cv_proc_service_is_old=no |
12454 | else | |
81ecdfbb | 12455 | gdb_cv_proc_service_is_old=yes |
c906108c | 12456 | fi |
81ecdfbb | 12457 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12458 | |
c906108c SS |
12459 | fi |
12460 | ||
81ecdfbb RW |
12461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
12462 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 12463 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 12464 | |
81ecdfbb | 12465 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
12466 | |
12467 | fi | |
12468 | else | |
81ecdfbb RW |
12469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12470 | $as_echo "no" >&6; } | |
c906108c SS |
12471 | fi |
12472 | ;; | |
d92419e5 | 12473 | aix*) |
81ecdfbb RW |
12474 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
12475 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
12476 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
12477 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12478 | else |
81ecdfbb | 12479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12480 | /* end confdefs.h. */ |
d92419e5 | 12481 | #include <sys/pthdebug.h> |
bec39cab AC |
12482 | int |
12483 | main () | |
12484 | { | |
d92419e5 JB |
12485 | #ifndef PTHDB_VERSION_3 |
12486 | #error | |
12487 | #endif | |
bec39cab AC |
12488 | ; |
12489 | return 0; | |
12490 | } | |
12491 | _ACEOF | |
81ecdfbb | 12492 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
12493 | gdb_cv_have_aix_thread_debug=yes |
12494 | else | |
81ecdfbb | 12495 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 12496 | fi |
81ecdfbb | 12497 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
12498 | fi |
12499 | ||
81ecdfbb RW |
12500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
12501 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
12502 | if test $gdb_cv_have_aix_thread_debug = yes; then |
12503 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 12504 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 12505 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
12506 | |
12507 | # Older versions of AIX do not provide the declaration for | |
12508 | # the getthrds function (it appears that it was introduced | |
12509 | # with AIX 6.x). | |
12510 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
12511 | " | |
12512 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
12513 | ac_have_decl=1 | |
12514 | else | |
12515 | ac_have_decl=0 | |
12516 | fi | |
12517 | ||
12518 | cat >>confdefs.h <<_ACEOF | |
12519 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
12520 | _ACEOF | |
12521 | ||
d92419e5 JB |
12522 | fi |
12523 | ;; | |
c906108c | 12524 | esac |
bec39cab | 12525 | |
c906108c SS |
12526 | fi |
12527 | ||
3f47be5c | 12528 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
12529 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
12530 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
12531 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
12532 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12533 | else |
81ecdfbb | 12534 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12535 | /* end confdefs.h. */ |
3f47be5c | 12536 | #include <thread_db.h> |
bec39cab AC |
12537 | int |
12538 | main () | |
12539 | { | |
3f47be5c | 12540 | int i = TD_NOTALLOC; |
bec39cab AC |
12541 | ; |
12542 | return 0; | |
12543 | } | |
12544 | _ACEOF | |
81ecdfbb | 12545 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12546 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12547 | else | |
81ecdfbb | 12548 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12549 | |
3f47be5c | 12550 | fi |
81ecdfbb | 12551 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12552 | |
bec39cab | 12553 | fi |
81ecdfbb RW |
12554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12555 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12557 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12558 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12559 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12560 | else |
81ecdfbb | 12561 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12562 | /* end confdefs.h. */ |
12563 | #include <thread_db.h> | |
12564 | int | |
12565 | main () | |
12566 | { | |
12567 | int i = TD_VERSION; | |
12568 | ; | |
12569 | return 0; | |
12570 | } | |
12571 | _ACEOF | |
81ecdfbb | 12572 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12573 | gdb_cv_thread_db_h_has_td_version=yes |
12574 | else | |
81ecdfbb | 12575 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12576 | |
12577 | fi | |
81ecdfbb | 12578 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12579 | |
12580 | fi | |
81ecdfbb RW |
12581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12582 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12584 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12585 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12586 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12587 | else |
81ecdfbb | 12588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12589 | /* end confdefs.h. */ |
12590 | #include <thread_db.h> | |
12591 | int | |
12592 | main () | |
12593 | { | |
12594 | int i = TD_NOTLS; | |
12595 | ; | |
12596 | return 0; | |
12597 | } | |
12598 | _ACEOF | |
81ecdfbb | 12599 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12600 | gdb_cv_thread_db_h_has_td_notls=yes |
12601 | else | |
81ecdfbb | 12602 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12603 | |
12604 | fi | |
81ecdfbb | 12605 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12606 | |
12607 | fi | |
81ecdfbb RW |
12608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12609 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12610 | fi |
12611 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12612 | |
81ecdfbb | 12613 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12614 | |
59f80f10 DJ |
12615 | fi |
12616 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12617 | ||
81ecdfbb | 12618 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12619 | |
12620 | fi | |
12621 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12622 | ||
81ecdfbb | 12623 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12624 | |
3f47be5c EZ |
12625 | fi |
12626 | ||
b757528f | 12627 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12628 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12629 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12630 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
12631 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12632 | else |
81ecdfbb | 12633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12634 | /* end confdefs.h. */ |
b757528f | 12635 | #include <sys/syscall.h> |
bec39cab AC |
12636 | int |
12637 | main () | |
12638 | { | |
b757528f | 12639 | int i = __NR_tkill; |
bec39cab AC |
12640 | ; |
12641 | return 0; | |
12642 | } | |
12643 | _ACEOF | |
81ecdfbb | 12644 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12645 | gdb_cv_sys_syscall_h_has_tkill=yes |
12646 | else | |
81ecdfbb | 12647 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12648 | |
b757528f | 12649 | fi |
81ecdfbb | 12650 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12651 | |
bec39cab | 12652 | fi |
81ecdfbb RW |
12653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12654 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f | 12655 | fi |
99c1d451 TT |
12656 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then |
12657 | ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall" | |
12658 | if test "x$ac_cv_func_syscall" = x""yes; then : | |
bec39cab | 12659 | |
81ecdfbb | 12660 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f | 12661 | |
99c1d451 TT |
12662 | |
12663 | fi | |
12664 | ||
b757528f JJ |
12665 | fi |
12666 | ||
81ecdfbb RW |
12667 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12668 | " | |
12669 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12670 | ac_have_decl=1 | |
10568435 | 12671 | else |
81ecdfbb | 12672 | ac_have_decl=0 |
10568435 | 12673 | fi |
10568435 JK |
12674 | |
12675 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12676 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12677 | _ACEOF |
12678 | ||
12679 | ||
81ecdfbb RW |
12680 | if test "$cross_compiling" = yes; then : |
12681 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12682 | /* end confdefs.h. */ |
12683 | #include <sys/personality.h> | |
12684 | int | |
12685 | main () | |
12686 | { | |
12687 | ||
12688 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12689 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12690 | # endif | |
12691 | /* Test the flag could be set and stays set. */ | |
12692 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12693 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12694 | return 1 | |
12695 | ; | |
12696 | return 0; | |
12697 | } | |
12698 | _ACEOF | |
81ecdfbb | 12699 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12700 | have_personality=true |
12701 | else | |
81ecdfbb | 12702 | have_personality=false |
10568435 | 12703 | fi |
81ecdfbb RW |
12704 | rm -f core conftest.err conftest.$ac_objext \ |
12705 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12706 | else |
81ecdfbb | 12707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12708 | /* end confdefs.h. */ |
12709 | #include <sys/personality.h> | |
12710 | int | |
12711 | main () | |
12712 | { | |
12713 | ||
12714 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12715 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12716 | # endif | |
12717 | /* Test the flag could be set and stays set. */ | |
12718 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12719 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12720 | return 1 | |
12721 | ; | |
12722 | return 0; | |
12723 | } | |
12724 | _ACEOF | |
81ecdfbb | 12725 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12726 | have_personality=true |
12727 | else | |
81ecdfbb | 12728 | have_personality=false |
10568435 | 12729 | fi |
81ecdfbb RW |
12730 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12731 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12732 | fi |
81ecdfbb | 12733 | |
10568435 JK |
12734 | if $have_personality |
12735 | then | |
12736 | ||
81ecdfbb | 12737 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
12738 | |
12739 | fi | |
12740 | ||
e655c1a2 PA |
12741 | case $host_os in |
12742 | go32* | *djgpp*) | |
12743 | gdbinit=gdb.ini | |
12744 | ;; | |
12745 | *) | |
12746 | gdbinit=.gdbinit | |
12747 | ;; | |
12748 | esac | |
12749 | ||
12750 | cat >>confdefs.h <<_ACEOF | |
12751 | #define GDBINIT "$gdbinit" | |
12752 | _ACEOF | |
12753 | ||
12754 | ||
fb40c209 | 12755 | |
f83d8a90 DE |
12756 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
12757 | # except that the argument to --with-sysroot is optional. | |
12758 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
12759 | if test "x$with_sysroot" = xyes; then | |
12760 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
12761 | fi | |
bec39cab | 12762 | |
81ecdfbb RW |
12763 | # Check whether --with-sysroot was given. |
12764 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
12765 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
12766 | else | |
12767 | TARGET_SYSTEM_ROOT= | |
12768 | fi | |
030292b7 | 12769 | |
030292b7 | 12770 | |
f83d8a90 DE |
12771 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
12772 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12773 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
12774 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 12775 | |
f83d8a90 DE |
12776 | cat >>confdefs.h <<_ACEOF |
12777 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
12778 | _ACEOF | |
bec39cab | 12779 | |
030292b7 | 12780 | |
b14b1491 | 12781 | |
f83d8a90 DE |
12782 | |
12783 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12784 | if test "x$prefix" = xNONE; then | |
12785 | test_prefix=/usr/local | |
12786 | else | |
12787 | test_prefix=$prefix | |
12788 | fi | |
12789 | else | |
12790 | test_prefix=$exec_prefix | |
12791 | fi | |
12792 | value=0 | |
12793 | case ${ac_define_dir} in | |
12794 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12795 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12796 | value=1 | |
12797 | ;; | |
12798 | esac | |
12799 | ||
12800 | cat >>confdefs.h <<_ACEOF | |
12801 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
12802 | _ACEOF | |
030292b7 DJ |
12803 | |
12804 | ||
12805 | ||
16e7150e | 12806 | |
16e7150e | 12807 | |
81ecdfbb RW |
12808 | # Check whether --with-system-gdbinit was given. |
12809 | if test "${with_system_gdbinit+set}" = set; then : | |
12810 | withval=$with_system_gdbinit; | |
b14b1491 TT |
12811 | SYSTEM_GDBINIT=$withval |
12812 | else | |
12813 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
12814 | fi |
12815 | ||
16e7150e JG |
12816 | |
12817 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
12818 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 12819 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
12820 | ac_define_dir=`eval echo $ac_define_dir` |
12821 | ||
12822 | cat >>confdefs.h <<_ACEOF | |
12823 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
12824 | _ACEOF | |
12825 | ||
12826 | ||
12827 | ||
0c4a4063 | 12828 | |
b14b1491 TT |
12829 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
12830 | if test "x$prefix" = xNONE; then | |
12831 | test_prefix=/usr/local | |
12832 | else | |
12833 | test_prefix=$prefix | |
12834 | fi | |
12835 | else | |
12836 | test_prefix=$exec_prefix | |
12837 | fi | |
12838 | value=0 | |
12839 | case ${ac_define_dir} in | |
12840 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12841 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12842 | value=1 | |
12843 | ;; | |
12844 | esac | |
16e7150e | 12845 | |
b14b1491 TT |
12846 | cat >>confdefs.h <<_ACEOF |
12847 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
12848 | _ACEOF |
12849 | ||
b14b1491 | 12850 | |
16e7150e | 12851 | |
0c4a4063 | 12852 | |
81ecdfbb RW |
12853 | # Check whether --enable-werror was given. |
12854 | if test "${enable_werror+set}" = set; then : | |
12855 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
12856 | yes | y) ERROR_ON_WARNING="yes" ;; |
12857 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 12858 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 12859 | esac |
81ecdfbb RW |
12860 | fi |
12861 | ||
094a342e | 12862 | |
a68ffae9 JK |
12863 | # Enable -Werror by default when using gcc. Turn it off for releases. |
12864 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
12865 | ERROR_ON_WARNING=yes |
12866 | fi | |
12867 | ||
12868 | WERROR_CFLAGS="" | |
12869 | if test "${ERROR_ON_WARNING}" = yes ; then | |
12870 | WERROR_CFLAGS="-Werror" | |
12871 | fi | |
12872 | ||
aa79a185 | 12873 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
d3685d60 | 12874 | -Wpointer-sign \ |
1cb5e2a4 | 12875 | -Wno-unused -Wunused-value -Wunused-function \ |
352b3eda | 12876 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ |
44d100c3 | 12877 | -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ |
dd9aa048 | 12878 | -Wold-style-declaration -Wold-style-definition" |
a3b362c4 | 12879 | |
3526781e DJ |
12880 | # Enable -Wno-format by default when using gcc on mingw since many |
12881 | # GCC versions complain about %I64. | |
12882 | case "${host}" in | |
12883 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
d3685d60 | 12884 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
12885 | esac |
12886 | ||
81ecdfbb RW |
12887 | # Check whether --enable-build-warnings was given. |
12888 | if test "${enable_build_warnings+set}" = set; then : | |
12889 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
12890 | yes) ;; |
12891 | no) build_warnings="-w";; | |
12892 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12893 | build_warnings="${build_warnings} ${t}";; | |
12894 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12895 | build_warnings="${t} ${build_warnings}";; | |
12896 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12897 | esac | |
d4f3574e | 12898 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 12899 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 12900 | fi |
81ecdfbb RW |
12901 | fi |
12902 | # Check whether --enable-gdb-build-warnings was given. | |
12903 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
12904 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
12905 | yes) ;; |
12906 | no) build_warnings="-w";; | |
12907 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12908 | build_warnings="${build_warnings} ${t}";; | |
12909 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12910 | build_warnings="${t} ${build_warnings}";; | |
12911 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12912 | esac | |
12913 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
12914 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
12915 | fi | |
81ecdfbb RW |
12916 | fi |
12917 | WARN_CFLAGS="" | |
c906108c SS |
12918 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
12919 | then | |
81ecdfbb RW |
12920 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
12921 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
12922 | # Separate out the -Werror flag as some files just cannot be |
12923 | # compiled with it enabled. | |
12924 | for w in ${build_warnings}; do | |
12925 | case $w in | |
12926 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
12927 | *) # Check that GCC accepts it | |
4536bbc6 AC |
12928 | saved_CFLAGS="$CFLAGS" |
12929 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 12930 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12931 | /* end confdefs.h. */ |
4536bbc6 | 12932 | |
bec39cab AC |
12933 | int |
12934 | main () | |
12935 | { | |
4536bbc6 | 12936 | |
bec39cab AC |
12937 | ; |
12938 | return 0; | |
12939 | } | |
12940 | _ACEOF | |
81ecdfbb | 12941 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 12942 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 12943 | fi |
81ecdfbb | 12944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 12945 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
12946 | esac |
12947 | done | |
81ecdfbb RW |
12948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
12949 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
12950 | fi |
12951 | ||
12952 | ||
104c1213 | 12953 | |
7a292a7a | 12954 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
12955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
12956 | $as_echo_n "checking for cygwin... " >&6; } | |
12957 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
12958 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12959 | else |
81ecdfbb | 12960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12961 | /* end confdefs.h. */ |
7a292a7a SS |
12962 | |
12963 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
12964 | lose | |
12965 | #endif | |
bec39cab | 12966 | _ACEOF |
7a292a7a | 12967 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 12968 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
12969 | gdb_cv_os_cygwin=yes |
12970 | else | |
7a292a7a SS |
12971 | gdb_cv_os_cygwin=no |
12972 | fi | |
12973 | rm -f conftest* | |
12974 | ||
12975 | fi | |
81ecdfbb RW |
12976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
12977 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 12978 | |
aff38e61 | 12979 | |
3eb25fda | 12980 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 12981 | case ${host} in |
95cbc983 AC |
12982 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
12983 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 12984 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
12985 | esac |
12986 | ||
12987 | ||
cd0fc7c3 SS |
12988 | # libreadline needs libuser32.a in a cygwin environment |
12989 | WIN32LIBS= | |
12990 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
12991 | WIN32LIBS="-luser32" |
12992 | case "${target}" in | |
12993 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
12994 | ;; | |
12995 | esac | |
cd0fc7c3 | 12996 | fi |
c906108c | 12997 | |
b4505029 MM |
12998 | # The ser-tcp.c module requires sockets. |
12999 | case ${host} in | |
13000 | *mingw32*) | |
13001 | ||
81ecdfbb | 13002 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
13003 | |
13004 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
13005 | ;; | |
13006 | esac | |
13007 | ||
7a292a7a | 13008 | |
31d99776 | 13009 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
13010 | |
13011 | OLD_CFLAGS=$CFLAGS | |
13012 | OLD_LDFLAGS=$LDFLAGS | |
13013 | OLD_LIBS=$LIBS | |
13014 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
13015 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
13016 | # always want our bfd. | |
13017 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
13018 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
13019 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
def63ff0 TT |
13020 | LIBS="-lbfd -liberty $intl $LIBS" |
13021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 | |
81ecdfbb RW |
13022 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
13023 | if test "${gdb_cv_var_elf+set}" = set; then : | |
13024 | $as_echo_n "(cached) " >&6 | |
31d99776 | 13025 | else |
81ecdfbb | 13026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
13027 | /* end confdefs.h. */ |
13028 | #include <stdlib.h> | |
def63ff0 TT |
13029 | #include "bfd.h" |
13030 | #include "elf-bfd.h" | |
31d99776 DJ |
13031 | |
13032 | int | |
13033 | main () | |
13034 | { | |
def63ff0 | 13035 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
13036 | ; |
13037 | return 0; | |
13038 | } | |
13039 | _ACEOF | |
81ecdfbb | 13040 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
13041 | gdb_cv_var_elf=yes |
13042 | else | |
81ecdfbb | 13043 | gdb_cv_var_elf=no |
31d99776 | 13044 | fi |
81ecdfbb RW |
13045 | rm -f core conftest.err conftest.$ac_objext \ |
13046 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 13047 | fi |
81ecdfbb RW |
13048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
13049 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
13050 | CFLAGS=$OLD_CFLAGS |
13051 | LDFLAGS=$OLD_LDFLAGS | |
13052 | LIBS=$OLD_LIBS | |
31d99776 | 13053 | if test $gdb_cv_var_elf = yes; then |
55aa24fb | 13054 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
31d99776 | 13055 | |
81ecdfbb | 13056 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 13057 | |
075ff26d JK |
13058 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
13059 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
13060 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
13061 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
13062 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13063 | $as_echo_n "(cached) " >&6 | |
13064 | else | |
13065 | ac_func_search_save_LIBS=$LIBS | |
13066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13067 | /* end confdefs.h. */ | |
13068 | ||
13069 | /* Override any GCC internal prototype to avoid an error. | |
13070 | Use char because int might match the return type of a GCC | |
13071 | builtin and then its argument prototype would still apply. */ | |
13072 | #ifdef __cplusplus | |
13073 | extern "C" | |
13074 | #endif | |
13075 | char dlopen (); | |
13076 | int | |
13077 | main () | |
13078 | { | |
13079 | return dlopen (); | |
13080 | ; | |
13081 | return 0; | |
13082 | } | |
13083 | _ACEOF | |
13084 | for ac_lib in '' dl; do | |
13085 | if test -z "$ac_lib"; then | |
13086 | ac_res="none required" | |
13087 | else | |
13088 | ac_res=-l$ac_lib | |
13089 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13090 | fi | |
13091 | if ac_fn_c_try_link "$LINENO"; then : | |
13092 | ac_cv_search_dlopen=$ac_res | |
13093 | fi | |
13094 | rm -f core conftest.err conftest.$ac_objext \ | |
13095 | conftest$ac_exeext | |
13096 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13097 | break | |
13098 | fi | |
13099 | done | |
13100 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
13101 | ||
13102 | else | |
13103 | ac_cv_search_dlopen=no | |
13104 | fi | |
13105 | rm conftest.$ac_ext | |
13106 | LIBS=$ac_func_search_save_LIBS | |
13107 | fi | |
13108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
13109 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
13110 | ac_res=$ac_cv_search_dlopen | |
13111 | if test "$ac_res" != no; then : | |
13112 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13113 | ||
13114 | fi | |
13115 | ||
075ff26d | 13116 | fi |
31d99776 | 13117 | fi |
31d99776 | 13118 | |
4f05add4 TT |
13119 | # Add macho support to GDB, but only if BFD includes it. |
13120 | ||
13121 | OLD_CFLAGS=$CFLAGS | |
13122 | OLD_LDFLAGS=$LDFLAGS | |
13123 | OLD_LIBS=$LIBS | |
13124 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
13125 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
13126 | # always want our bfd. | |
13127 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
13128 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
13129 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
4f05add4 TT |
13130 | LIBS="-lbfd -liberty $intl $LIBS" |
13131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 | |
13132 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
13133 | if test "${gdb_cv_var_macho+set}" = set; then : | |
13134 | $as_echo_n "(cached) " >&6 | |
13135 | else | |
13136 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13137 | /* end confdefs.h. */ | |
13138 | #include <stdlib.h> | |
13139 | #include "bfd.h" | |
13140 | #include "mach-o.h" | |
13141 | ||
13142 | int | |
13143 | main () | |
13144 | { | |
13145 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
13146 | ; | |
13147 | return 0; | |
13148 | } | |
13149 | _ACEOF | |
13150 | if ac_fn_c_try_link "$LINENO"; then : | |
13151 | gdb_cv_var_macho=yes | |
13152 | else | |
13153 | gdb_cv_var_macho=no | |
13154 | fi | |
13155 | rm -f core conftest.err conftest.$ac_objext \ | |
13156 | conftest$ac_exeext conftest.$ac_ext | |
13157 | fi | |
13158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
13159 | $as_echo "$gdb_cv_var_macho" >&6; } | |
13160 | CFLAGS=$OLD_CFLAGS | |
13161 | LDFLAGS=$OLD_LDFLAGS | |
13162 | LIBS=$OLD_LIBS | |
13163 | if test $gdb_cv_var_macho = yes; then | |
13164 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
13165 | fi | |
13166 | ||
b2259038 TT |
13167 | # Add SOM support to GDB, but only if BFD includes it. |
13168 | ||
13169 | OLD_CFLAGS=$CFLAGS | |
13170 | OLD_LDFLAGS=$LDFLAGS | |
13171 | OLD_LIBS=$LIBS | |
13172 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
13173 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
13174 | # always want our bfd. | |
13175 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
13176 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
13177 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
b2259038 TT |
13178 | LIBS="-lbfd -liberty $intl $LIBS" |
13179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5 | |
13180 | $as_echo_n "checking for SOM support in BFD... " >&6; } | |
13181 | if test "${gdb_cv_var_som+set}" = set; then : | |
13182 | $as_echo_n "(cached) " >&6 | |
13183 | else | |
13184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13185 | /* end confdefs.h. */ | |
13186 | #include <stdlib.h> | |
13187 | #include "bfd.h" | |
13188 | #include "som.h" | |
13189 | ||
13190 | int | |
13191 | main () | |
13192 | { | |
13193 | return bfd_som_attach_aux_hdr (NULL, 0, NULL); | |
13194 | ; | |
13195 | return 0; | |
13196 | } | |
13197 | _ACEOF | |
13198 | if ac_fn_c_try_link "$LINENO"; then : | |
13199 | gdb_cv_var_som=yes | |
13200 | else | |
13201 | gdb_cv_var_som=no | |
13202 | fi | |
13203 | rm -f core conftest.err conftest.$ac_objext \ | |
13204 | conftest$ac_exeext conftest.$ac_ext | |
13205 | fi | |
13206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5 | |
13207 | $as_echo "$gdb_cv_var_som" >&6; } | |
13208 | CFLAGS=$OLD_CFLAGS | |
13209 | LDFLAGS=$OLD_LDFLAGS | |
13210 | LIBS=$OLD_LIBS | |
13211 | if test $gdb_cv_var_som = yes; then | |
13212 | CONFIG_OBS="$CONFIG_OBS somread.o" | |
13213 | fi | |
13214 | ||
121ce6e5 DJ |
13215 | # Add any host-specific objects to GDB. |
13216 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
13217 | ||
608e2dbb TT |
13218 | # If building on ELF, look for lzma support for embedded compressed debug info. |
13219 | if test $gdb_cv_var_elf = yes; then | |
13220 | ||
13221 | # Check whether --with-lzma was given. | |
13222 | if test "${with_lzma+set}" = set; then : | |
13223 | withval=$with_lzma; | |
13224 | else | |
13225 | with_lzma=auto | |
13226 | fi | |
13227 | ||
13228 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
13229 | $as_echo_n "checking whether to use lzma... " >&6; } | |
13230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
13231 | $as_echo "$with_lzma" >&6; } | |
13232 | ||
13233 | if test "${with_lzma}" != no; then | |
13234 | ||
13235 | ||
13236 | ||
13237 | ||
13238 | ||
13239 | ||
13240 | ||
13241 | ||
13242 | use_additional=yes | |
13243 | ||
13244 | acl_save_prefix="$prefix" | |
13245 | prefix="$acl_final_prefix" | |
13246 | acl_save_exec_prefix="$exec_prefix" | |
13247 | exec_prefix="$acl_final_exec_prefix" | |
13248 | ||
13249 | eval additional_includedir=\"$includedir\" | |
13250 | eval additional_libdir=\"$libdir\" | |
13251 | ||
13252 | exec_prefix="$acl_save_exec_prefix" | |
13253 | prefix="$acl_save_prefix" | |
13254 | ||
13255 | ||
13256 | # Check whether --with-liblzma-prefix was given. | |
13257 | if test "${with_liblzma_prefix+set}" = set; then : | |
13258 | withval=$with_liblzma_prefix; | |
13259 | if test "X$withval" = "Xno"; then | |
13260 | use_additional=no | |
13261 | else | |
13262 | if test "X$withval" = "X"; then | |
13263 | ||
13264 | acl_save_prefix="$prefix" | |
13265 | prefix="$acl_final_prefix" | |
13266 | acl_save_exec_prefix="$exec_prefix" | |
13267 | exec_prefix="$acl_final_exec_prefix" | |
13268 | ||
13269 | eval additional_includedir=\"$includedir\" | |
13270 | eval additional_libdir=\"$libdir\" | |
13271 | ||
13272 | exec_prefix="$acl_save_exec_prefix" | |
13273 | prefix="$acl_save_prefix" | |
13274 | ||
13275 | else | |
13276 | additional_includedir="$withval/include" | |
13277 | additional_libdir="$withval/lib" | |
13278 | fi | |
13279 | fi | |
13280 | ||
13281 | fi | |
13282 | ||
13283 | LIBLZMA= | |
13284 | LTLIBLZMA= | |
13285 | INCLZMA= | |
13286 | rpathdirs= | |
13287 | ltrpathdirs= | |
13288 | names_already_handled= | |
13289 | names_next_round='lzma ' | |
13290 | while test -n "$names_next_round"; do | |
13291 | names_this_round="$names_next_round" | |
13292 | names_next_round= | |
13293 | for name in $names_this_round; do | |
13294 | already_handled= | |
13295 | for n in $names_already_handled; do | |
13296 | if test "$n" = "$name"; then | |
13297 | already_handled=yes | |
13298 | break | |
13299 | fi | |
13300 | done | |
13301 | if test -z "$already_handled"; then | |
13302 | names_already_handled="$names_already_handled $name" | |
13303 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
13304 | eval value=\"\$HAVE_LIB$uppername\" | |
13305 | if test -n "$value"; then | |
13306 | if test "$value" = yes; then | |
13307 | eval value=\"\$LIB$uppername\" | |
13308 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
13309 | eval value=\"\$LTLIB$uppername\" | |
13310 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
13311 | else | |
13312 | : | |
13313 | fi | |
13314 | else | |
13315 | found_dir= | |
13316 | found_la= | |
13317 | found_so= | |
13318 | found_a= | |
13319 | if test $use_additional = yes; then | |
13320 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
13321 | found_dir="$additional_libdir" | |
13322 | found_so="$additional_libdir/lib$name.$shlibext" | |
13323 | if test -f "$additional_libdir/lib$name.la"; then | |
13324 | found_la="$additional_libdir/lib$name.la" | |
13325 | fi | |
13326 | else | |
13327 | if test -f "$additional_libdir/lib$name.$libext"; then | |
13328 | found_dir="$additional_libdir" | |
13329 | found_a="$additional_libdir/lib$name.$libext" | |
13330 | if test -f "$additional_libdir/lib$name.la"; then | |
13331 | found_la="$additional_libdir/lib$name.la" | |
13332 | fi | |
13333 | fi | |
13334 | fi | |
13335 | fi | |
13336 | if test "X$found_dir" = "X"; then | |
13337 | for x in $LDFLAGS $LTLIBLZMA; do | |
13338 | ||
13339 | acl_save_prefix="$prefix" | |
13340 | prefix="$acl_final_prefix" | |
13341 | acl_save_exec_prefix="$exec_prefix" | |
13342 | exec_prefix="$acl_final_exec_prefix" | |
13343 | eval x=\"$x\" | |
13344 | exec_prefix="$acl_save_exec_prefix" | |
13345 | prefix="$acl_save_prefix" | |
13346 | ||
13347 | case "$x" in | |
13348 | -L*) | |
13349 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
13350 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
13351 | found_dir="$dir" | |
13352 | found_so="$dir/lib$name.$shlibext" | |
13353 | if test -f "$dir/lib$name.la"; then | |
13354 | found_la="$dir/lib$name.la" | |
13355 | fi | |
13356 | else | |
13357 | if test -f "$dir/lib$name.$libext"; then | |
13358 | found_dir="$dir" | |
13359 | found_a="$dir/lib$name.$libext" | |
13360 | if test -f "$dir/lib$name.la"; then | |
13361 | found_la="$dir/lib$name.la" | |
13362 | fi | |
13363 | fi | |
13364 | fi | |
13365 | ;; | |
13366 | esac | |
13367 | if test "X$found_dir" != "X"; then | |
13368 | break | |
13369 | fi | |
13370 | done | |
13371 | fi | |
13372 | if test "X$found_dir" != "X"; then | |
13373 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
13374 | if test "X$found_so" != "X"; then | |
13375 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
13376 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13377 | else | |
13378 | haveit= | |
13379 | for x in $ltrpathdirs; do | |
13380 | if test "X$x" = "X$found_dir"; then | |
13381 | haveit=yes | |
13382 | break | |
13383 | fi | |
13384 | done | |
13385 | if test -z "$haveit"; then | |
13386 | ltrpathdirs="$ltrpathdirs $found_dir" | |
13387 | fi | |
13388 | if test "$hardcode_direct" = yes; then | |
13389 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13390 | else | |
13391 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
13392 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13393 | haveit= | |
13394 | for x in $rpathdirs; do | |
13395 | if test "X$x" = "X$found_dir"; then | |
13396 | haveit=yes | |
13397 | break | |
13398 | fi | |
13399 | done | |
13400 | if test -z "$haveit"; then | |
13401 | rpathdirs="$rpathdirs $found_dir" | |
13402 | fi | |
13403 | else | |
13404 | haveit= | |
13405 | for x in $LDFLAGS $LIBLZMA; do | |
13406 | ||
13407 | acl_save_prefix="$prefix" | |
13408 | prefix="$acl_final_prefix" | |
13409 | acl_save_exec_prefix="$exec_prefix" | |
13410 | exec_prefix="$acl_final_exec_prefix" | |
13411 | eval x=\"$x\" | |
13412 | exec_prefix="$acl_save_exec_prefix" | |
13413 | prefix="$acl_save_prefix" | |
13414 | ||
13415 | if test "X$x" = "X-L$found_dir"; then | |
13416 | haveit=yes | |
13417 | break | |
13418 | fi | |
13419 | done | |
13420 | if test -z "$haveit"; then | |
13421 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
13422 | fi | |
13423 | if test "$hardcode_minus_L" != no; then | |
13424 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13425 | else | |
13426 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
13427 | fi | |
13428 | fi | |
13429 | fi | |
13430 | fi | |
13431 | else | |
13432 | if test "X$found_a" != "X"; then | |
13433 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
13434 | else | |
13435 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
13436 | fi | |
13437 | fi | |
13438 | additional_includedir= | |
13439 | case "$found_dir" in | |
13440 | */lib | */lib/) | |
13441 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
13442 | additional_includedir="$basedir/include" | |
13443 | ;; | |
13444 | esac | |
13445 | if test "X$additional_includedir" != "X"; then | |
13446 | if test "X$additional_includedir" != "X/usr/include"; then | |
13447 | haveit= | |
13448 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
13449 | if test -n "$GCC"; then | |
13450 | case $host_os in | |
13451 | linux*) haveit=yes;; | |
13452 | esac | |
13453 | fi | |
13454 | fi | |
13455 | if test -z "$haveit"; then | |
13456 | for x in $CPPFLAGS $INCLZMA; do | |
13457 | ||
13458 | acl_save_prefix="$prefix" | |
13459 | prefix="$acl_final_prefix" | |
13460 | acl_save_exec_prefix="$exec_prefix" | |
13461 | exec_prefix="$acl_final_exec_prefix" | |
13462 | eval x=\"$x\" | |
13463 | exec_prefix="$acl_save_exec_prefix" | |
13464 | prefix="$acl_save_prefix" | |
13465 | ||
13466 | if test "X$x" = "X-I$additional_includedir"; then | |
13467 | haveit=yes | |
13468 | break | |
13469 | fi | |
13470 | done | |
13471 | if test -z "$haveit"; then | |
13472 | if test -d "$additional_includedir"; then | |
13473 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
13474 | fi | |
13475 | fi | |
13476 | fi | |
13477 | fi | |
13478 | fi | |
13479 | if test -n "$found_la"; then | |
13480 | save_libdir="$libdir" | |
13481 | case "$found_la" in | |
13482 | */* | *\\*) . "$found_la" ;; | |
13483 | *) . "./$found_la" ;; | |
13484 | esac | |
13485 | libdir="$save_libdir" | |
13486 | for dep in $dependency_libs; do | |
13487 | case "$dep" in | |
13488 | -L*) | |
13489 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
13490 | if test "X$additional_libdir" != "X/usr/lib"; then | |
13491 | haveit= | |
13492 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
13493 | if test -n "$GCC"; then | |
13494 | case $host_os in | |
13495 | linux*) haveit=yes;; | |
13496 | esac | |
13497 | fi | |
13498 | fi | |
13499 | if test -z "$haveit"; then | |
13500 | haveit= | |
13501 | for x in $LDFLAGS $LIBLZMA; do | |
13502 | ||
13503 | acl_save_prefix="$prefix" | |
13504 | prefix="$acl_final_prefix" | |
13505 | acl_save_exec_prefix="$exec_prefix" | |
13506 | exec_prefix="$acl_final_exec_prefix" | |
13507 | eval x=\"$x\" | |
13508 | exec_prefix="$acl_save_exec_prefix" | |
13509 | prefix="$acl_save_prefix" | |
13510 | ||
13511 | if test "X$x" = "X-L$additional_libdir"; then | |
13512 | haveit=yes | |
13513 | break | |
13514 | fi | |
13515 | done | |
13516 | if test -z "$haveit"; then | |
13517 | if test -d "$additional_libdir"; then | |
13518 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
13519 | fi | |
13520 | fi | |
13521 | haveit= | |
13522 | for x in $LDFLAGS $LTLIBLZMA; do | |
13523 | ||
13524 | acl_save_prefix="$prefix" | |
13525 | prefix="$acl_final_prefix" | |
13526 | acl_save_exec_prefix="$exec_prefix" | |
13527 | exec_prefix="$acl_final_exec_prefix" | |
13528 | eval x=\"$x\" | |
13529 | exec_prefix="$acl_save_exec_prefix" | |
13530 | prefix="$acl_save_prefix" | |
13531 | ||
13532 | if test "X$x" = "X-L$additional_libdir"; then | |
13533 | haveit=yes | |
13534 | break | |
13535 | fi | |
13536 | done | |
13537 | if test -z "$haveit"; then | |
13538 | if test -d "$additional_libdir"; then | |
13539 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
13540 | fi | |
13541 | fi | |
13542 | fi | |
13543 | fi | |
13544 | ;; | |
13545 | -R*) | |
13546 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
13547 | if test "$enable_rpath" != no; then | |
13548 | haveit= | |
13549 | for x in $rpathdirs; do | |
13550 | if test "X$x" = "X$dir"; then | |
13551 | haveit=yes | |
13552 | break | |
13553 | fi | |
13554 | done | |
13555 | if test -z "$haveit"; then | |
13556 | rpathdirs="$rpathdirs $dir" | |
13557 | fi | |
13558 | haveit= | |
13559 | for x in $ltrpathdirs; do | |
13560 | if test "X$x" = "X$dir"; then | |
13561 | haveit=yes | |
13562 | break | |
13563 | fi | |
13564 | done | |
13565 | if test -z "$haveit"; then | |
13566 | ltrpathdirs="$ltrpathdirs $dir" | |
13567 | fi | |
13568 | fi | |
13569 | ;; | |
13570 | -l*) | |
13571 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
13572 | ;; | |
13573 | *.la) | |
13574 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
13575 | ;; | |
13576 | *) | |
13577 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
13578 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
13579 | ;; | |
13580 | esac | |
13581 | done | |
13582 | fi | |
13583 | else | |
13584 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
13585 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
13586 | fi | |
13587 | fi | |
13588 | fi | |
13589 | done | |
13590 | done | |
13591 | if test "X$rpathdirs" != "X"; then | |
13592 | if test -n "$hardcode_libdir_separator"; then | |
13593 | alldirs= | |
13594 | for found_dir in $rpathdirs; do | |
13595 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
13596 | done | |
13597 | acl_save_libdir="$libdir" | |
13598 | libdir="$alldirs" | |
13599 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13600 | libdir="$acl_save_libdir" | |
13601 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13602 | else | |
13603 | for found_dir in $rpathdirs; do | |
13604 | acl_save_libdir="$libdir" | |
13605 | libdir="$found_dir" | |
13606 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13607 | libdir="$acl_save_libdir" | |
13608 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13609 | done | |
13610 | fi | |
13611 | fi | |
13612 | if test "X$ltrpathdirs" != "X"; then | |
13613 | for found_dir in $ltrpathdirs; do | |
13614 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
13615 | done | |
13616 | fi | |
13617 | ||
13618 | ||
13619 | ac_save_CPPFLAGS="$CPPFLAGS" | |
13620 | ||
13621 | for element in $INCLZMA; do | |
13622 | haveit= | |
13623 | for x in $CPPFLAGS; do | |
13624 | ||
13625 | acl_save_prefix="$prefix" | |
13626 | prefix="$acl_final_prefix" | |
13627 | acl_save_exec_prefix="$exec_prefix" | |
13628 | exec_prefix="$acl_final_exec_prefix" | |
13629 | eval x=\"$x\" | |
13630 | exec_prefix="$acl_save_exec_prefix" | |
13631 | prefix="$acl_save_prefix" | |
13632 | ||
13633 | if test "X$x" = "X$element"; then | |
13634 | haveit=yes | |
13635 | break | |
13636 | fi | |
13637 | done | |
13638 | if test -z "$haveit"; then | |
13639 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
13640 | fi | |
13641 | done | |
13642 | ||
13643 | ||
13644 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
13645 | $as_echo_n "checking for liblzma... " >&6; } | |
13646 | if test "${ac_cv_liblzma+set}" = set; then : | |
13647 | $as_echo_n "(cached) " >&6 | |
13648 | else | |
13649 | ||
13650 | ac_save_LIBS="$LIBS" | |
13651 | LIBS="$LIBS $LIBLZMA" | |
13652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13653 | /* end confdefs.h. */ | |
13654 | #include "lzma.h" | |
13655 | int | |
13656 | main () | |
13657 | { | |
13658 | lzma_index_iter iter; | |
13659 | lzma_index_iter_init (&iter, 0); | |
13660 | lzma_mf_is_supported (LZMA_MF_HC3); | |
13661 | ; | |
13662 | return 0; | |
13663 | } | |
13664 | _ACEOF | |
13665 | if ac_fn_c_try_link "$LINENO"; then : | |
13666 | ac_cv_liblzma=yes | |
13667 | else | |
13668 | ac_cv_liblzma=no | |
13669 | fi | |
13670 | rm -f core conftest.err conftest.$ac_objext \ | |
13671 | conftest$ac_exeext conftest.$ac_ext | |
13672 | LIBS="$ac_save_LIBS" | |
13673 | ||
13674 | fi | |
13675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
13676 | $as_echo "$ac_cv_liblzma" >&6; } | |
13677 | if test "$ac_cv_liblzma" = yes; then | |
13678 | HAVE_LIBLZMA=yes | |
13679 | ||
13680 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
13681 | ||
13682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
13683 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
13684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
13685 | $as_echo "$LIBLZMA" >&6; } | |
13686 | else | |
13687 | HAVE_LIBLZMA=no | |
13688 | CPPFLAGS="$ac_save_CPPFLAGS" | |
13689 | LIBLZMA= | |
13690 | LTLIBLZMA= | |
13691 | fi | |
13692 | ||
13693 | ||
13694 | ||
13695 | ||
13696 | ||
13697 | ||
13698 | if test "$HAVE_LIBLZMA" != yes; then | |
13699 | if test "$with_lzma" = yes; then | |
13700 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
13701 | fi | |
13702 | fi | |
13703 | fi | |
13704 | fi | |
13705 | ||
3fc11d3e JM |
13706 | LIBGUI="../libgui/src/libgui.a" |
13707 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
13708 | ||
13709 | ||
7a292a7a | 13710 | |
3fc11d3e JM |
13711 | WIN32LDAPP= |
13712 | ||
13713 | ||
13714 | ||
d91670b9 | 13715 | case "${host}" in |
686a5eed | 13716 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
13717 | configdir="win" |
13718 | ;; | |
13719 | *) | |
13720 | configdir="unix" | |
13721 | ;; | |
13722 | esac | |
3fc11d3e JM |
13723 | |
13724 | GDBTKLIBS= | |
13725 | if test "${enable_gdbtk}" = "yes"; then | |
13726 | ||
d1c3b63a KS |
13727 | # Gdbtk must have an absolute path to srcdir in order to run |
13728 | # properly when not installed. | |
13729 | here=`pwd` | |
13730 | cd ${srcdir} | |
13731 | GDBTK_SRC_DIR=`pwd` | |
13732 | cd $here | |
13733 | ||
bec39cab | 13734 | |
5062cc19 KS |
13735 | # |
13736 | # Ok, lets find the tcl configuration | |
13737 | # First, look for one uninstalled. | |
13738 | # the alternative search directory is invoked by --with-tcl | |
13739 | # | |
3fc11d3e | 13740 | |
5062cc19 KS |
13741 | if test x"${no_tcl}" = x ; then |
13742 | # we reset no_tcl in case something fails here | |
13743 | no_tcl=true | |
bec39cab | 13744 | |
81ecdfbb RW |
13745 | # Check whether --with-tcl was given. |
13746 | if test "${with_tcl+set}" = set; then : | |
13747 | withval=$with_tcl; with_tclconfig=${withval} | |
13748 | fi | |
13749 | ||
13750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
13751 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
13752 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
13753 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 13754 | else |
bec39cab | 13755 | |
3fc11d3e | 13756 | |
5062cc19 KS |
13757 | # First check to see if --with-tcl was specified. |
13758 | case "${host}" in | |
13759 | *-*-cygwin*) platDir="win" ;; | |
13760 | *) platDir="unix" ;; | |
13761 | esac | |
13762 | if test x"${with_tclconfig}" != x ; then | |
13763 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
13764 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
13765 | else | |
81ecdfbb | 13766 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13767 | fi |
13768 | fi | |
13769 | ||
13770 | # then check for a private Tcl installation | |
13771 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13772 | for i in \ | |
13773 | ../tcl \ | |
13774 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13775 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
13776 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13777 | ../../tcl \ | |
13778 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13779 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13780 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13781 | ../../../tcl \ | |
13782 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13783 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13784 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13785 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13786 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13787 | break | |
13788 | fi | |
13789 | done | |
13790 | fi | |
13791 | ||
13792 | # on Darwin, check in Framework installation locations | |
13793 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
13794 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13795 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13796 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13797 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13798 | ; do | |
13799 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
13800 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
13801 | break | |
13802 | fi | |
13803 | done | |
13804 | fi | |
13805 | ||
13806 | # check in a few common install locations | |
13807 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13808 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13809 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13810 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13811 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13812 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13813 | `ls -d /usr/lib 2>/dev/null` \ | |
13814 | ; do | |
13815 | if test -f "$i/tclConfig.sh" ; then | |
13816 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
13817 | break | |
13818 | fi | |
13819 | done | |
13820 | fi | |
3fc11d3e | 13821 | |
5062cc19 KS |
13822 | # check in a few other private locations |
13823 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13824 | for i in \ | |
13825 | ${srcdir}/../tcl \ | |
13826 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13827 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
13828 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13829 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13830 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13831 | break | |
13832 | fi | |
13833 | done | |
13834 | fi | |
bec39cab | 13835 | |
3fc11d3e JM |
13836 | fi |
13837 | ||
5062cc19 KS |
13838 | |
13839 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13840 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
13841 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
13842 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
13843 | else |
13844 | no_tcl= | |
13845 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
13846 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13847 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
13848 | fi |
13849 | fi | |
3fc11d3e | 13850 | |
bec39cab | 13851 | |
85541719 DE |
13852 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
13853 | # point to doing Tcl. | |
bec39cab | 13854 | |
5062cc19 KS |
13855 | # |
13856 | # Ok, lets find the tk configuration | |
13857 | # First, look for one uninstalled. | |
13858 | # the alternative search directory is invoked by --with-tk | |
13859 | # | |
3fc11d3e | 13860 | |
5062cc19 KS |
13861 | if test x"${no_tk}" = x ; then |
13862 | # we reset no_tk in case something fails here | |
13863 | no_tk=true | |
bec39cab | 13864 | |
81ecdfbb RW |
13865 | # Check whether --with-tk was given. |
13866 | if test "${with_tk+set}" = set; then : | |
13867 | withval=$with_tk; with_tkconfig=${withval} | |
13868 | fi | |
13869 | ||
13870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
13871 | $as_echo_n "checking for Tk configuration... " >&6; } | |
13872 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
13873 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13874 | else |
3fc11d3e JM |
13875 | |
13876 | ||
5062cc19 KS |
13877 | # First check to see if --with-tkconfig was specified. |
13878 | if test x"${with_tkconfig}" != x ; then | |
13879 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
13880 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
13881 | else | |
81ecdfbb | 13882 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13883 | fi |
13884 | fi | |
3fc11d3e | 13885 | |
5062cc19 KS |
13886 | # then check for a private Tk library |
13887 | case "${host}" in | |
13888 | *-*-cygwin*) platDir="win" ;; | |
13889 | *) platDir="unix" ;; | |
13890 | esac | |
13891 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13892 | for i in \ | |
13893 | ../tk \ | |
13894 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13895 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
13896 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
13897 | ../../tk \ | |
13898 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13899 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
13900 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
13901 | ../../../tk \ | |
13902 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13903 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
13904 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13905 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13906 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13907 | break | |
13908 | fi | |
13909 | done | |
13910 | fi | |
13911 | ||
13912 | # on Darwin, check in Framework installation locations | |
13913 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
13914 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13915 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13916 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13917 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13918 | ; do | |
13919 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
13920 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
13921 | break | |
13922 | fi | |
13923 | done | |
13924 | fi | |
13925 | ||
13926 | # check in a few common install locations | |
13927 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13928 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13929 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13930 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13931 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13932 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13933 | `ls -d /usr/lib 2>/dev/null` \ | |
13934 | ; do | |
13935 | if test -f "$i/tkConfig.sh" ; then | |
13936 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
13937 | break | |
13938 | fi | |
13939 | done | |
13940 | fi | |
13941 | # check in a few other private locations | |
13942 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13943 | for i in \ | |
13944 | ${srcdir}/../tk \ | |
13945 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13946 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
13947 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13948 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13949 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13950 | break | |
13951 | fi | |
13952 | done | |
13953 | fi | |
3fc11d3e | 13954 | |
3fc11d3e JM |
13955 | fi |
13956 | ||
13957 | ||
5062cc19 KS |
13958 | if test x"${ac_cv_c_tkconfig}" = x ; then |
13959 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
13960 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
13961 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
13962 | else |
13963 | no_tk= | |
13964 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
13965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13966 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 13967 | fi |
3fc11d3e | 13968 | fi |
dd2504ab | 13969 | |
dd2504ab | 13970 | |
85541719 DE |
13971 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
13972 | ||
81ecdfbb RW |
13973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13974 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
13975 | |
13976 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
13977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
13978 | $as_echo "loading" >&6; } | |
85541719 DE |
13979 | . ${TCL_BIN_DIR}/tclConfig.sh |
13980 | else | |
81ecdfbb RW |
13981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13982 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
13983 | fi |
13984 | ||
13985 | # eval is required to do the TCL_DBGX substitution | |
13986 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
13987 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
13988 | ||
13989 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
13990 | # then set the common variable name to the value of the build variables. | |
13991 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
13992 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
13993 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
13994 | # installed and uninstalled version of Tcl. | |
13995 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
13996 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
13997 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
13998 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
13999 | elif test "`uname -s`" = "Darwin"; then | |
14000 | # If Tcl was built as a framework, attempt to use the libraries | |
14001 | # from the framework at the given location so that linking works | |
a68ffae9 | 14002 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
14003 | case ${TCL_DEFS} in |
14004 | *TCL_FRAMEWORK*) | |
14005 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
14006 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
14007 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
14008 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
14009 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
14010 | break | |
14011 | fi | |
14012 | done | |
14013 | fi | |
14014 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
14015 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
14016 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
14017 | fi | |
14018 | ;; | |
14019 | esac | |
14020 | fi | |
14021 | ||
14022 | # eval is required to do the TCL_DBGX substitution | |
14023 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
14024 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
14025 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
14026 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
14027 | ||
14028 | ||
14029 | ||
14030 | ||
14031 | ||
14032 | ||
14033 | ||
14034 | ||
14035 | ||
14036 | ||
14037 | ||
14038 | ||
14039 | ||
14040 | ||
14041 | ||
14042 | # Check for in-tree tcl | |
14043 | here=`pwd` | |
14044 | cd ${srcdir}/.. | |
14045 | topdir=`pwd` | |
14046 | cd ${here} | |
14047 | ||
14048 | intree="no" | |
14049 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
14050 | intree="yes" | |
14051 | fi | |
14052 | ||
14053 | # Find Tcl private headers | |
14054 | if test x"${intree}" = xno; then | |
14055 | ||
81ecdfbb RW |
14056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
14057 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
14058 | private_dir="" |
14059 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
14060 | if test -f ${dir}/tclInt.h ; then | |
14061 | private_dir=${dir} | |
14062 | fi | |
14063 | ||
14064 | if test x"${private_dir}" = x; then | |
81ecdfbb | 14065 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
14066 | else |
14067 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
14068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
14069 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
14070 | fi |
14071 | ||
14072 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
14073 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
14074 | TCL_DEPS="" | |
14075 | else | |
14076 | # If building tcl in the same src tree, private headers | |
14077 | # are not needed, but we need to be sure to use the right | |
14078 | # headers library | |
14079 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
14080 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
14081 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
14082 | fi | |
14083 | ||
14084 | ||
14085 | ||
14086 | ||
14087 | ||
81ecdfbb RW |
14088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
14089 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 14090 | |
5062cc19 | 14091 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
14092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
14093 | $as_echo "loading" >&6; } | |
5062cc19 | 14094 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 14095 | else |
81ecdfbb RW |
14096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
14097 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 14098 | fi |
bec39cab | 14099 | |
5062cc19 KS |
14100 | # eval is required to do the TK_DBGX substitution |
14101 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
14102 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
14103 | ||
14104 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
14105 | # then set the common variable name to the value of the build variables. | |
14106 | # For example, the variable TK_LIB_SPEC will be set to the value | |
14107 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
14108 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
14109 | # installed and uninstalled version of Tcl. | |
85541719 | 14110 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
14111 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
14112 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
14113 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
14114 | elif test "`uname -s`" = "Darwin"; then | |
14115 | # If Tk was built as a framework, attempt to use the libraries | |
14116 | # from the framework at the given location so that linking works | |
a68ffae9 | 14117 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
14118 | case ${TK_DEFS} in |
14119 | *TK_FRAMEWORK*) | |
85541719 | 14120 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
14121 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
14122 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
14123 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
14124 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
14125 | break | |
14126 | fi | |
14127 | done | |
14128 | fi | |
85541719 | 14129 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
14130 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
14131 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
14132 | fi | |
14133 | ;; | |
14134 | esac | |
3fc11d3e JM |
14135 | fi |
14136 | ||
5062cc19 KS |
14137 | # eval is required to do the TK_DBGX substitution |
14138 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
14139 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
14140 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
14141 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 14142 | |
3fc11d3e JM |
14143 | |
14144 | ||
bec39cab AC |
14145 | |
14146 | ||
14147 | ||
14148 | ||
14149 | ||
14150 | ||
14151 | ||
3fc11d3e | 14152 | |
3fc11d3e | 14153 | |
bec39cab | 14154 | |
bec39cab | 14155 | |
85541719 DE |
14156 | # Check for in-tree Tk |
14157 | intree="no" | |
14158 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
14159 | intree="yes" | |
14160 | fi | |
3fc11d3e | 14161 | |
85541719 DE |
14162 | # Find Tk private headers |
14163 | if test x"${intree}" = xno; then | |
3fc11d3e | 14164 | |
81ecdfbb RW |
14165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
14166 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
14167 | private_dir="" |
14168 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
14169 | if test -f ${dir}/tkInt.h; then | |
14170 | private_dir=${dir} | |
3fc11d3e | 14171 | fi |
bec39cab | 14172 | |
5062cc19 | 14173 | if test x"${private_dir}" = x; then |
81ecdfbb | 14174 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 14175 | else |
5062cc19 | 14176 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
14177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
14178 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 14179 | fi |
3fc11d3e | 14180 | |
85541719 DE |
14181 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
14182 | TK_LIBRARY=${TK_LIB_SPEC} | |
14183 | TK_DEPS="" | |
14184 | else | |
14185 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
14186 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
14187 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
14188 | fi | |
3fc11d3e JM |
14189 | |
14190 | ||
3fc11d3e JM |
14191 | |
14192 | ||
3fc11d3e | 14193 | |
85541719 | 14194 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 14195 | |
85541719 DE |
14196 | # Include some libraries that Tcl and Tk want. |
14197 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
14198 | # Yes, the ordering seems wrong here. But it isn't. | |
14199 | # TK_LIBS is the list of libraries that need to be linked | |
14200 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
14201 | # were in LIBS then any link tests after this point would | |
14202 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
14203 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 14204 | |
85541719 DE |
14205 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
14206 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
14207 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
14208 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
14209 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
14210 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
14211 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 14212 | |
85541719 DE |
14213 | if test x$gdb_cv_os_cygwin = xyes; then |
14214 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
14215 | WIN32LDAPP="-Wl,--subsystem,console" | |
14216 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 14217 | fi |
ffc6a242 | 14218 | |
81ecdfbb | 14219 | subdirs="$subdirs gdbtk" |
3ace7edb | 14220 | |
85541719 | 14221 | fi |
3fc11d3e JM |
14222 | fi |
14223 | ||
14224 | ||
14225 | ||
14226 | ||
14227 | ||
14228 | ||
14229 | ||
14230 | ||
81ecdfbb RW |
14231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
14232 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 14233 | |
c906108c | 14234 | |
81ecdfbb RW |
14235 | # Check whether --with-x was given. |
14236 | if test "${with_x+set}" = set; then : | |
14237 | withval=$with_x; | |
14238 | fi | |
c906108c SS |
14239 | |
14240 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
14241 | if test "x$with_x" = xno; then | |
14242 | # The user explicitly disabled X. | |
14243 | have_x=disabled | |
14244 | else | |
81ecdfbb RW |
14245 | case $x_includes,$x_libraries in #( |
14246 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
14247 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
14248 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
14249 | else |
14250 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 14251 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 14252 | rm -f -r conftest.dir |
bec39cab AC |
14253 | if mkdir conftest.dir; then |
14254 | cd conftest.dir | |
bec39cab | 14255 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
14256 | incroot: |
14257 | @echo incroot='${INCROOT}' | |
14258 | usrlibdir: | |
14259 | @echo usrlibdir='${USRLIBDIR}' | |
14260 | libdir: | |
14261 | @echo libdir='${LIBDIR}' | |
14262 | _ACEOF | |
14263 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 14264 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
14265 | for ac_var in incroot usrlibdir libdir; do |
14266 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
14267 | done | |
c906108c | 14268 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
14269 | for ac_extension in a so sl dylib la dll; do |
14270 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
14271 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 14272 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
14273 | fi |
14274 | done | |
14275 | # Screen out bogus values from the imake configuration. They are | |
14276 | # bogus both because they are the default anyway, and because | |
14277 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 14278 | case $ac_im_incroot in |
81ecdfbb | 14279 | /usr/include) ac_x_includes= ;; |
bec39cab | 14280 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 14281 | esac |
bec39cab | 14282 | case $ac_im_usrlibdir in |
81ecdfbb | 14283 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 14284 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
14285 | esac |
14286 | fi | |
14287 | cd .. | |
81ecdfbb | 14288 | rm -f -r conftest.dir |
c906108c SS |
14289 | fi |
14290 | ||
bec39cab AC |
14291 | # Standard set of common directories for X headers. |
14292 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
14293 | ac_x_header_dirs=' | |
14294 | /usr/X11/include | |
81ecdfbb | 14295 | /usr/X11R7/include |
bec39cab AC |
14296 | /usr/X11R6/include |
14297 | /usr/X11R5/include | |
14298 | /usr/X11R4/include | |
14299 | ||
14300 | /usr/include/X11 | |
81ecdfbb | 14301 | /usr/include/X11R7 |
bec39cab AC |
14302 | /usr/include/X11R6 |
14303 | /usr/include/X11R5 | |
14304 | /usr/include/X11R4 | |
14305 | ||
14306 | /usr/local/X11/include | |
81ecdfbb | 14307 | /usr/local/X11R7/include |
bec39cab AC |
14308 | /usr/local/X11R6/include |
14309 | /usr/local/X11R5/include | |
14310 | /usr/local/X11R4/include | |
14311 | ||
14312 | /usr/local/include/X11 | |
81ecdfbb | 14313 | /usr/local/include/X11R7 |
bec39cab AC |
14314 | /usr/local/include/X11R6 |
14315 | /usr/local/include/X11R5 | |
14316 | /usr/local/include/X11R4 | |
14317 | ||
14318 | /usr/X386/include | |
14319 | /usr/x386/include | |
14320 | /usr/XFree86/include/X11 | |
14321 | ||
14322 | /usr/include | |
14323 | /usr/local/include | |
14324 | /usr/unsupported/include | |
14325 | /usr/athena/include | |
14326 | /usr/local/x11r5/include | |
14327 | /usr/lpp/Xamples/include | |
14328 | ||
14329 | /usr/openwin/include | |
14330 | /usr/openwin/share/include' | |
14331 | ||
14332 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 14333 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 14334 | # First, try using that file with no special directory specified. |
81ecdfbb | 14335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14336 | /* end confdefs.h. */ |
81ecdfbb | 14337 | #include <X11/Xlib.h> |
bec39cab | 14338 | _ACEOF |
81ecdfbb | 14339 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
14340 | # We can compile using X headers with no special include directory. |
14341 | ac_x_includes= | |
14342 | else | |
bec39cab | 14343 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 14344 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
14345 | ac_x_includes=$ac_dir |
14346 | break | |
14347 | fi | |
14348 | done | |
c906108c | 14349 | fi |
bec39cab AC |
14350 | rm -f conftest.err conftest.$ac_ext |
14351 | fi # $ac_x_includes = no | |
c906108c | 14352 | |
bec39cab | 14353 | if test "$ac_x_libraries" = no; then |
c906108c | 14354 | # Check for the libraries. |
c906108c SS |
14355 | # See if we find them without any special options. |
14356 | # Don't add to $LIBS permanently. | |
bec39cab | 14357 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
14358 | LIBS="-lX11 $LIBS" |
14359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 14360 | /* end confdefs.h. */ |
81ecdfbb | 14361 | #include <X11/Xlib.h> |
bec39cab AC |
14362 | int |
14363 | main () | |
14364 | { | |
81ecdfbb | 14365 | XrmInitialize () |
bec39cab AC |
14366 | ; |
14367 | return 0; | |
14368 | } | |
14369 | _ACEOF | |
81ecdfbb | 14370 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14371 | LIBS=$ac_save_LIBS |
c906108c SS |
14372 | # We can link X programs with no special library path. |
14373 | ac_x_libraries= | |
14374 | else | |
81ecdfbb RW |
14375 | LIBS=$ac_save_LIBS |
14376 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 14377 | do |
bec39cab | 14378 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
14379 | for ac_extension in a so sl dylib la dll; do |
14380 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
14381 | ac_x_libraries=$ac_dir |
14382 | break 2 | |
14383 | fi | |
14384 | done | |
14385 | done | |
14386 | fi | |
81ecdfbb RW |
14387 | rm -f core conftest.err conftest.$ac_objext \ |
14388 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 14389 | fi # $ac_x_libraries = no |
c906108c | 14390 | |
81ecdfbb RW |
14391 | case $ac_x_includes,$ac_x_libraries in #( |
14392 | no,* | *,no | *\'*) | |
14393 | # Didn't find X, or a directory has "'" in its name. | |
14394 | ac_cv_have_x="have_x=no";; #( | |
14395 | *) | |
14396 | # Record where we found X for the cache. | |
14397 | ac_cv_have_x="have_x=yes\ | |
14398 | ac_x_includes='$ac_x_includes'\ | |
14399 | ac_x_libraries='$ac_x_libraries'" | |
14400 | esac | |
c906108c | 14401 | fi |
81ecdfbb RW |
14402 | ;; #( |
14403 | *) have_x=yes;; | |
14404 | esac | |
c906108c SS |
14405 | eval "$ac_cv_have_x" |
14406 | fi # $with_x != no | |
14407 | ||
14408 | if test "$have_x" != yes; then | |
81ecdfbb RW |
14409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
14410 | $as_echo "$have_x" >&6; } | |
c906108c SS |
14411 | no_x=yes |
14412 | else | |
14413 | # If each of the values was on the command line, it overrides each guess. | |
14414 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
14415 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
14416 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
14417 | ac_cv_have_x="have_x=yes\ |
14418 | ac_x_includes='$x_includes'\ | |
14419 | ac_x_libraries='$x_libraries'" | |
14420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
14421 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
14422 | fi |
14423 | ||
14424 | ||
bec39cab | 14425 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 14426 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
14427 | # This code just checks for a few cases where we'd like to ignore those |
14428 | # definitions, even when they're present in the '.mt' file. These cases | |
14429 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 14430 | # not part of the source tree. |
7a292a7a | 14431 | # |
81ecdfbb RW |
14432 | # Check whether --enable-sim was given. |
14433 | if test "${enable_sim+set}" = set; then : | |
14434 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
14435 | echo "enableval = ${enableval}"; |
14436 | case "${enableval}" in | |
14437 | yes) ignore_sim=false ;; | |
14438 | no) ignore_sim=true ;; | |
14439 | *) ignore_sim=false ;; | |
14440 | esac | |
14441 | else | |
14442 | ignore_sim=false | |
81ecdfbb RW |
14443 | fi |
14444 | ||
7a292a7a SS |
14445 | |
14446 | if test ! -d "${srcdir}/../sim"; then | |
14447 | ignore_sim=true | |
14448 | fi | |
14449 | ||
9b624dbe UW |
14450 | SIM= |
14451 | SIM_OBS= | |
14452 | if test "${ignore_sim}" = "false"; then | |
14453 | if test x"${gdb_sim}" != x ; then | |
14454 | SIM="${gdb_sim}" | |
14455 | SIM_OBS="remote-sim.o" | |
60ca704f | 14456 | |
81ecdfbb | 14457 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 14458 | |
9b624dbe | 14459 | fi |
7a292a7a SS |
14460 | fi |
14461 | ||
14462 | ||
14463 | ||
c906108c SS |
14464 | |
14465 | ||
14466 | ||
14467 | ||
14468 | ||
14469 | ||
dfcd3bfb | 14470 | |
e56ac5c3 AC |
14471 | |
14472 | ||
b3a90332 AC |
14473 | |
14474 | ||
c35f4ffc | 14475 | # List of host floatformats. |
bec39cab AC |
14476 | |
14477 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14478 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 14479 | _ACEOF |
c35f4ffc | 14480 | |
bec39cab AC |
14481 | |
14482 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14483 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
14484 | _ACEOF |
14485 | ||
c35f4ffc | 14486 | |
bec39cab | 14487 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 14488 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 14489 | _ACEOF |
c35f4ffc AC |
14490 | |
14491 | ||
c906108c SS |
14492 | # target_subdir is used by the testsuite to find the target libraries. |
14493 | target_subdir= | |
14494 | if test "${host}" != "${target}"; then | |
14495 | target_subdir="${target_alias}/" | |
14496 | fi | |
14497 | ||
14498 | ||
14499 | frags= | |
771b4502 | 14500 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
14501 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
14502 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 14503 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
14504 | fi |
14505 | frags="$frags $host_makefile_frag" | |
14506 | else | |
14507 | host_makefile_frag=/dev/null | |
c906108c | 14508 | fi |
c906108c | 14509 | |
c906108c SS |
14510 | |
14511 | ||
14512 | ||
771b4502 | 14513 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
14514 | # We pick this up from the host configuration file (.mh) because we |
14515 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
14516 | nativefile=`sed -n ' |
14517 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
14518 | ' ${host_makefile_frag}` | |
c906108c SS |
14519 | fi |
14520 | ||
14521 | ||
b00a8037 | 14522 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
14523 | |
14524 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 14525 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 14526 | _ACEOF |
b00a8037 DJ |
14527 | |
14528 | fi | |
14529 | ||
8dcde887 | 14530 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
14531 | # Check whether --enable-multi-ice was given. |
14532 | if test "${enable_multi_ice+set}" = set; then : | |
14533 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
14534 | yes | no) |
14535 | ;; | |
81ecdfbb | 14536 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 14537 | esac |
81ecdfbb | 14538 | fi |
b4e70030 | 14539 | |
81ecdfbb RW |
14540 | if test "x$enable_multi_ice" = xyes; then |
14541 | subdirs="$subdirs multi-ice" | |
3ace7edb | 14542 | |
a85f51e7 DJ |
14543 | fi |
14544 | ||
496c0e1b JB |
14545 | # Check whether --enable-gdbserver was given. |
14546 | if test "${enable_gdbserver+set}" = set; then : | |
14547 | enableval=$enable_gdbserver; case "${enableval}" in | |
14548 | yes| no|auto) ;; | |
14549 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
14550 | esac | |
14551 | else | |
14552 | enable_gdbserver=auto | |
14553 | fi | |
14554 | ||
14555 | ||
14556 | # We only build gdbserver automatically in a native configuration, and | |
14557 | # only if the user did not explicitly disable its build. | |
14558 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
14559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
14560 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 14561 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
14562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14563 | $as_echo "yes" >&6; } | |
14564 | subdirs="$subdirs gdbserver" | |
3ace7edb | 14565 | |
496c0e1b | 14566 | gdbserver_build_enabled=yes |
8dcde887 | 14567 | else |
81ecdfbb RW |
14568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14569 | $as_echo "no" >&6; } | |
8dcde887 MK |
14570 | fi |
14571 | fi | |
14572 | ||
496c0e1b JB |
14573 | # If the user explicitly request the gdbserver to be built, verify that |
14574 | # we were in fact able to enable it. | |
14575 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
14576 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
14577 | fi | |
14578 | ||
393fd4c3 YQ |
14579 | # Check for babeltrace and babeltrace-ctf |
14580 | ||
14581 | # Check whether --with-babeltrace was given. | |
14582 | if test "${with_babeltrace+set}" = set; then : | |
14583 | withval=$with_babeltrace; | |
14584 | else | |
14585 | with_babeltrace=auto | |
14586 | fi | |
14587 | ||
14588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
14589 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
14590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
14591 | $as_echo "$with_babeltrace" >&6; } | |
14592 | ||
14593 | if test "x$with_babeltrace" = "xno"; then | |
14594 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
14595 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
14596 | else | |
14597 | # Append -Werror to CFLAGS so that configure can catch the warning | |
14598 | # "assignment from incompatible pointer type", which is related to | |
14599 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
14600 | # in GDB, while babeltrace 1.0.3 is broken. | |
14601 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
14602 | # safe to save and restore CFLAGS here. | |
14603 | saved_CFLAGS=$CFLAGS | |
14604 | CFLAGS="$CFLAGS -Werror" | |
14605 | ||
14606 | ||
14607 | ||
14608 | ||
14609 | ||
14610 | ||
14611 | ||
14612 | ||
14613 | use_additional=yes | |
14614 | ||
14615 | acl_save_prefix="$prefix" | |
14616 | prefix="$acl_final_prefix" | |
14617 | acl_save_exec_prefix="$exec_prefix" | |
14618 | exec_prefix="$acl_final_exec_prefix" | |
14619 | ||
14620 | eval additional_includedir=\"$includedir\" | |
14621 | eval additional_libdir=\"$libdir\" | |
14622 | ||
14623 | exec_prefix="$acl_save_exec_prefix" | |
14624 | prefix="$acl_save_prefix" | |
14625 | ||
14626 | ||
14627 | # Check whether --with-libbabeltrace-prefix was given. | |
14628 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
14629 | withval=$with_libbabeltrace_prefix; | |
14630 | if test "X$withval" = "Xno"; then | |
14631 | use_additional=no | |
14632 | else | |
14633 | if test "X$withval" = "X"; then | |
14634 | ||
14635 | acl_save_prefix="$prefix" | |
14636 | prefix="$acl_final_prefix" | |
14637 | acl_save_exec_prefix="$exec_prefix" | |
14638 | exec_prefix="$acl_final_exec_prefix" | |
14639 | ||
14640 | eval additional_includedir=\"$includedir\" | |
14641 | eval additional_libdir=\"$libdir\" | |
14642 | ||
14643 | exec_prefix="$acl_save_exec_prefix" | |
14644 | prefix="$acl_save_prefix" | |
14645 | ||
14646 | else | |
14647 | additional_includedir="$withval/include" | |
14648 | additional_libdir="$withval/lib" | |
14649 | fi | |
14650 | fi | |
14651 | ||
14652 | fi | |
14653 | ||
14654 | LIBBABELTRACE= | |
14655 | LTLIBBABELTRACE= | |
14656 | INCBABELTRACE= | |
14657 | rpathdirs= | |
14658 | ltrpathdirs= | |
14659 | names_already_handled= | |
14660 | names_next_round='babeltrace babeltrace-ctf' | |
14661 | while test -n "$names_next_round"; do | |
14662 | names_this_round="$names_next_round" | |
14663 | names_next_round= | |
14664 | for name in $names_this_round; do | |
14665 | already_handled= | |
14666 | for n in $names_already_handled; do | |
14667 | if test "$n" = "$name"; then | |
14668 | already_handled=yes | |
14669 | break | |
14670 | fi | |
14671 | done | |
14672 | if test -z "$already_handled"; then | |
14673 | names_already_handled="$names_already_handled $name" | |
14674 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14675 | eval value=\"\$HAVE_LIB$uppername\" | |
14676 | if test -n "$value"; then | |
14677 | if test "$value" = yes; then | |
14678 | eval value=\"\$LIB$uppername\" | |
14679 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
14680 | eval value=\"\$LTLIB$uppername\" | |
14681 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
14682 | else | |
14683 | : | |
14684 | fi | |
14685 | else | |
14686 | found_dir= | |
14687 | found_la= | |
14688 | found_so= | |
14689 | found_a= | |
14690 | if test $use_additional = yes; then | |
14691 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
14692 | found_dir="$additional_libdir" | |
14693 | found_so="$additional_libdir/lib$name.$shlibext" | |
14694 | if test -f "$additional_libdir/lib$name.la"; then | |
14695 | found_la="$additional_libdir/lib$name.la" | |
14696 | fi | |
14697 | else | |
14698 | if test -f "$additional_libdir/lib$name.$libext"; then | |
14699 | found_dir="$additional_libdir" | |
14700 | found_a="$additional_libdir/lib$name.$libext" | |
14701 | if test -f "$additional_libdir/lib$name.la"; then | |
14702 | found_la="$additional_libdir/lib$name.la" | |
14703 | fi | |
14704 | fi | |
14705 | fi | |
14706 | fi | |
14707 | if test "X$found_dir" = "X"; then | |
14708 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
14709 | ||
14710 | acl_save_prefix="$prefix" | |
14711 | prefix="$acl_final_prefix" | |
14712 | acl_save_exec_prefix="$exec_prefix" | |
14713 | exec_prefix="$acl_final_exec_prefix" | |
14714 | eval x=\"$x\" | |
14715 | exec_prefix="$acl_save_exec_prefix" | |
14716 | prefix="$acl_save_prefix" | |
14717 | ||
14718 | case "$x" in | |
14719 | -L*) | |
14720 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
14721 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
14722 | found_dir="$dir" | |
14723 | found_so="$dir/lib$name.$shlibext" | |
14724 | if test -f "$dir/lib$name.la"; then | |
14725 | found_la="$dir/lib$name.la" | |
14726 | fi | |
14727 | else | |
14728 | if test -f "$dir/lib$name.$libext"; then | |
14729 | found_dir="$dir" | |
14730 | found_a="$dir/lib$name.$libext" | |
14731 | if test -f "$dir/lib$name.la"; then | |
14732 | found_la="$dir/lib$name.la" | |
14733 | fi | |
14734 | fi | |
14735 | fi | |
14736 | ;; | |
14737 | esac | |
14738 | if test "X$found_dir" != "X"; then | |
14739 | break | |
14740 | fi | |
14741 | done | |
14742 | fi | |
14743 | if test "X$found_dir" != "X"; then | |
14744 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
14745 | if test "X$found_so" != "X"; then | |
14746 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14747 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14748 | else | |
14749 | haveit= | |
14750 | for x in $ltrpathdirs; do | |
14751 | if test "X$x" = "X$found_dir"; then | |
14752 | haveit=yes | |
14753 | break | |
14754 | fi | |
14755 | done | |
14756 | if test -z "$haveit"; then | |
14757 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14758 | fi | |
14759 | if test "$hardcode_direct" = yes; then | |
14760 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14761 | else | |
14762 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14763 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14764 | haveit= | |
14765 | for x in $rpathdirs; do | |
14766 | if test "X$x" = "X$found_dir"; then | |
14767 | haveit=yes | |
14768 | break | |
14769 | fi | |
14770 | done | |
14771 | if test -z "$haveit"; then | |
14772 | rpathdirs="$rpathdirs $found_dir" | |
14773 | fi | |
14774 | else | |
14775 | haveit= | |
14776 | for x in $LDFLAGS $LIBBABELTRACE; do | |
14777 | ||
14778 | acl_save_prefix="$prefix" | |
14779 | prefix="$acl_final_prefix" | |
14780 | acl_save_exec_prefix="$exec_prefix" | |
14781 | exec_prefix="$acl_final_exec_prefix" | |
14782 | eval x=\"$x\" | |
14783 | exec_prefix="$acl_save_exec_prefix" | |
14784 | prefix="$acl_save_prefix" | |
14785 | ||
14786 | if test "X$x" = "X-L$found_dir"; then | |
14787 | haveit=yes | |
14788 | break | |
14789 | fi | |
14790 | done | |
14791 | if test -z "$haveit"; then | |
14792 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
14793 | fi | |
14794 | if test "$hardcode_minus_L" != no; then | |
14795 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14796 | else | |
14797 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
14798 | fi | |
14799 | fi | |
14800 | fi | |
14801 | fi | |
14802 | else | |
14803 | if test "X$found_a" != "X"; then | |
14804 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
14805 | else | |
14806 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
14807 | fi | |
14808 | fi | |
14809 | additional_includedir= | |
14810 | case "$found_dir" in | |
14811 | */lib | */lib/) | |
14812 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14813 | additional_includedir="$basedir/include" | |
14814 | ;; | |
14815 | esac | |
14816 | if test "X$additional_includedir" != "X"; then | |
14817 | if test "X$additional_includedir" != "X/usr/include"; then | |
14818 | haveit= | |
14819 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14820 | if test -n "$GCC"; then | |
14821 | case $host_os in | |
14822 | linux*) haveit=yes;; | |
14823 | esac | |
14824 | fi | |
14825 | fi | |
14826 | if test -z "$haveit"; then | |
14827 | for x in $CPPFLAGS $INCBABELTRACE; do | |
14828 | ||
14829 | acl_save_prefix="$prefix" | |
14830 | prefix="$acl_final_prefix" | |
14831 | acl_save_exec_prefix="$exec_prefix" | |
14832 | exec_prefix="$acl_final_exec_prefix" | |
14833 | eval x=\"$x\" | |
14834 | exec_prefix="$acl_save_exec_prefix" | |
14835 | prefix="$acl_save_prefix" | |
14836 | ||
14837 | if test "X$x" = "X-I$additional_includedir"; then | |
14838 | haveit=yes | |
14839 | break | |
14840 | fi | |
14841 | done | |
14842 | if test -z "$haveit"; then | |
14843 | if test -d "$additional_includedir"; then | |
14844 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
14845 | fi | |
14846 | fi | |
14847 | fi | |
14848 | fi | |
14849 | fi | |
14850 | if test -n "$found_la"; then | |
14851 | save_libdir="$libdir" | |
14852 | case "$found_la" in | |
14853 | */* | *\\*) . "$found_la" ;; | |
14854 | *) . "./$found_la" ;; | |
14855 | esac | |
14856 | libdir="$save_libdir" | |
14857 | for dep in $dependency_libs; do | |
14858 | case "$dep" in | |
14859 | -L*) | |
14860 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
14861 | if test "X$additional_libdir" != "X/usr/lib"; then | |
14862 | haveit= | |
14863 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
14864 | if test -n "$GCC"; then | |
14865 | case $host_os in | |
14866 | linux*) haveit=yes;; | |
14867 | esac | |
14868 | fi | |
14869 | fi | |
14870 | if test -z "$haveit"; then | |
14871 | haveit= | |
14872 | for x in $LDFLAGS $LIBBABELTRACE; do | |
14873 | ||
14874 | acl_save_prefix="$prefix" | |
14875 | prefix="$acl_final_prefix" | |
14876 | acl_save_exec_prefix="$exec_prefix" | |
14877 | exec_prefix="$acl_final_exec_prefix" | |
14878 | eval x=\"$x\" | |
14879 | exec_prefix="$acl_save_exec_prefix" | |
14880 | prefix="$acl_save_prefix" | |
14881 | ||
14882 | if test "X$x" = "X-L$additional_libdir"; then | |
14883 | haveit=yes | |
14884 | break | |
14885 | fi | |
14886 | done | |
14887 | if test -z "$haveit"; then | |
14888 | if test -d "$additional_libdir"; then | |
14889 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
14890 | fi | |
14891 | fi | |
14892 | haveit= | |
14893 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
14894 | ||
14895 | acl_save_prefix="$prefix" | |
14896 | prefix="$acl_final_prefix" | |
14897 | acl_save_exec_prefix="$exec_prefix" | |
14898 | exec_prefix="$acl_final_exec_prefix" | |
14899 | eval x=\"$x\" | |
14900 | exec_prefix="$acl_save_exec_prefix" | |
14901 | prefix="$acl_save_prefix" | |
14902 | ||
14903 | if test "X$x" = "X-L$additional_libdir"; then | |
14904 | haveit=yes | |
14905 | break | |
14906 | fi | |
14907 | done | |
14908 | if test -z "$haveit"; then | |
14909 | if test -d "$additional_libdir"; then | |
14910 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
14911 | fi | |
14912 | fi | |
14913 | fi | |
14914 | fi | |
14915 | ;; | |
14916 | -R*) | |
14917 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
14918 | if test "$enable_rpath" != no; then | |
14919 | haveit= | |
14920 | for x in $rpathdirs; do | |
14921 | if test "X$x" = "X$dir"; then | |
14922 | haveit=yes | |
14923 | break | |
14924 | fi | |
14925 | done | |
14926 | if test -z "$haveit"; then | |
14927 | rpathdirs="$rpathdirs $dir" | |
14928 | fi | |
14929 | haveit= | |
14930 | for x in $ltrpathdirs; do | |
14931 | if test "X$x" = "X$dir"; then | |
14932 | haveit=yes | |
14933 | break | |
14934 | fi | |
14935 | done | |
14936 | if test -z "$haveit"; then | |
14937 | ltrpathdirs="$ltrpathdirs $dir" | |
14938 | fi | |
14939 | fi | |
14940 | ;; | |
14941 | -l*) | |
14942 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
14943 | ;; | |
14944 | *.la) | |
14945 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
14946 | ;; | |
14947 | *) | |
14948 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
14949 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
14950 | ;; | |
14951 | esac | |
14952 | done | |
14953 | fi | |
14954 | else | |
14955 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
14956 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
14957 | fi | |
14958 | fi | |
14959 | fi | |
14960 | done | |
14961 | done | |
14962 | if test "X$rpathdirs" != "X"; then | |
14963 | if test -n "$hardcode_libdir_separator"; then | |
14964 | alldirs= | |
14965 | for found_dir in $rpathdirs; do | |
14966 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
14967 | done | |
14968 | acl_save_libdir="$libdir" | |
14969 | libdir="$alldirs" | |
14970 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14971 | libdir="$acl_save_libdir" | |
14972 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
14973 | else | |
14974 | for found_dir in $rpathdirs; do | |
14975 | acl_save_libdir="$libdir" | |
14976 | libdir="$found_dir" | |
14977 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14978 | libdir="$acl_save_libdir" | |
14979 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
14980 | done | |
14981 | fi | |
14982 | fi | |
14983 | if test "X$ltrpathdirs" != "X"; then | |
14984 | for found_dir in $ltrpathdirs; do | |
14985 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
14986 | done | |
14987 | fi | |
14988 | ||
14989 | ||
14990 | ac_save_CPPFLAGS="$CPPFLAGS" | |
14991 | ||
14992 | for element in $INCBABELTRACE; do | |
14993 | haveit= | |
14994 | for x in $CPPFLAGS; do | |
14995 | ||
14996 | acl_save_prefix="$prefix" | |
14997 | prefix="$acl_final_prefix" | |
14998 | acl_save_exec_prefix="$exec_prefix" | |
14999 | exec_prefix="$acl_final_exec_prefix" | |
15000 | eval x=\"$x\" | |
15001 | exec_prefix="$acl_save_exec_prefix" | |
15002 | prefix="$acl_save_prefix" | |
15003 | ||
15004 | if test "X$x" = "X$element"; then | |
15005 | haveit=yes | |
15006 | break | |
15007 | fi | |
15008 | done | |
15009 | if test -z "$haveit"; then | |
15010 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15011 | fi | |
15012 | done | |
15013 | ||
15014 | ||
15015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
15016 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
15017 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
15018 | $as_echo_n "(cached) " >&6 | |
15019 | else | |
15020 | ||
15021 | ac_save_LIBS="$LIBS" | |
15022 | LIBS="$LIBS $LIBBABELTRACE" | |
15023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15024 | /* end confdefs.h. */ | |
15025 | #include <babeltrace/babeltrace.h> | |
15026 | #include <babeltrace/ctf/events.h> | |
15027 | #include <babeltrace/ctf/iterator.h> | |
15028 | int | |
15029 | main () | |
15030 | { | |
15031 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
15032 | struct bt_ctf_event *event = NULL; | |
15033 | const struct bt_definition *scope; | |
15034 | ||
65c749e7 | 15035 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
15036 | scope = bt_ctf_get_top_level_scope (event, |
15037 | BT_STREAM_EVENT_HEADER); | |
15038 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
15039 | ||
15040 | ; | |
15041 | return 0; | |
15042 | } | |
15043 | _ACEOF | |
15044 | if ac_fn_c_try_link "$LINENO"; then : | |
15045 | ac_cv_libbabeltrace=yes | |
15046 | else | |
15047 | ac_cv_libbabeltrace=no | |
15048 | fi | |
15049 | rm -f core conftest.err conftest.$ac_objext \ | |
15050 | conftest$ac_exeext conftest.$ac_ext | |
15051 | LIBS="$ac_save_LIBS" | |
15052 | ||
15053 | fi | |
15054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
15055 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
15056 | if test "$ac_cv_libbabeltrace" = yes; then | |
15057 | HAVE_LIBBABELTRACE=yes | |
15058 | ||
15059 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
15060 | ||
15061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
15062 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
15063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
15064 | $as_echo "$LIBBABELTRACE" >&6; } | |
15065 | else | |
15066 | HAVE_LIBBABELTRACE=no | |
15067 | CPPFLAGS="$ac_save_CPPFLAGS" | |
15068 | LIBBABELTRACE= | |
15069 | LTLIBBABELTRACE= | |
15070 | fi | |
15071 | ||
15072 | ||
15073 | ||
15074 | ||
15075 | ||
15076 | ||
15077 | CFLAGS=$saved_CFLAGS | |
15078 | ||
15079 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
15080 | if test "$with_babeltrace" = yes; then | |
15081 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
15082 | else | |
15083 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
15084 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
15085 | fi | |
15086 | fi | |
15087 | fi | |
15088 | ||
db985757 | 15089 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 15090 | # to an empty version. |
c906108c SS |
15091 | |
15092 | files= | |
15093 | links= | |
5a2402b8 | 15094 | |
c906108c SS |
15095 | rm -f nm.h |
15096 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
15097 | case "${nativefile}" in |
15098 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
15099 | * ) GDB_NM_FILE="${nativefile}" | |
15100 | esac | |
5a2402b8 AC |
15101 | files="${files} ${GDB_NM_FILE}" |
15102 | links="${links} nm.h" | |
60ca704f SE |
15103 | |
15104 | cat >>confdefs.h <<_ACEOF | |
b78960be | 15105 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 15106 | _ACEOF |
5a2402b8 | 15107 | |
c906108c | 15108 | fi |
5a2402b8 AC |
15109 | |
15110 | ||
bec39cab AC |
15111 | ac_sources="$files" |
15112 | ac_dests="$links" | |
15113 | while test -n "$ac_sources"; do | |
15114 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
15115 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
15116 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
15117 | done | |
81ecdfbb | 15118 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
15119 | |
15120 | ||
c906108c SS |
15121 | |
15122 | ||
c906108c | 15123 | |
81ecdfbb | 15124 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 15125 | |
bec39cab | 15126 | |
b292c783 JK |
15127 | # Undo the $ec_script escaping suitable for Makefile. |
15128 | transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
15129 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"` | |
15130 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
15131 | GDB_TRANSFORM_NAME=gdb | |
15132 | fi | |
15133 | ||
15134 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"` | |
15135 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
15136 | GCORE_TRANSFORM_NAME=gcore | |
15137 | fi | |
15138 | ||
15139 | ac_config_files="$ac_config_files gcore" | |
15140 | ||
15141 | ||
c971b7fa | 15142 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
15143 | |
15144 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 15145 | |
bec39cab AC |
15146 | cat >confcache <<\_ACEOF |
15147 | # This file is a shell script that caches the results of configure | |
15148 | # tests run on this system so they can be shared between configure | |
15149 | # scripts and configure runs, see configure's option --config-cache. | |
15150 | # It is not useful on other systems. If it contains results you don't | |
15151 | # want to keep, you may remove or edit it. | |
15152 | # | |
15153 | # config.status only pays attention to the cache file if you give it | |
15154 | # the --recheck option to rerun configure. | |
15155 | # | |
15156 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
15157 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15158 | # following values. | |
15159 | ||
15160 | _ACEOF | |
15161 | ||
15162 | # The following way of writing the cache mishandles newlines in values, | |
15163 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 15164 | # So, we kill variables containing newlines. |
bec39cab AC |
15165 | # Ultrix sh set writes to stderr and can't be redirected directly, |
15166 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
15167 | ( |
15168 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
15169 | eval ac_val=\$$ac_var | |
15170 | case $ac_val in #( | |
15171 | *${as_nl}*) | |
15172 | case $ac_var in #( | |
15173 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
15174 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
15175 | esac | |
15176 | case $ac_var in #( | |
15177 | _ | IFS | as_nl) ;; #( | |
15178 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
15179 | *) { eval $ac_var=; unset $ac_var;} ;; | |
15180 | esac ;; | |
15181 | esac | |
15182 | done | |
15183 | ||
bec39cab | 15184 | (set) 2>&1 | |
81ecdfbb RW |
15185 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
15186 | *${as_nl}ac_space=\ *) | |
15187 | # `set' does not quote correctly, so add quotes: double-quote | |
15188 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
15189 | sed -n \ |
15190 | "s/'/'\\\\''/g; | |
15191 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 15192 | ;; #( |
bec39cab AC |
15193 | *) |
15194 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 15195 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 15196 | ;; |
81ecdfbb RW |
15197 | esac | |
15198 | sort | |
15199 | ) | | |
bec39cab | 15200 | sed ' |
81ecdfbb | 15201 | /^ac_cv_env_/b end |
bec39cab | 15202 | t clear |
81ecdfbb | 15203 | :clear |
bec39cab AC |
15204 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
15205 | t end | |
81ecdfbb RW |
15206 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
15207 | :end' >>confcache | |
15208 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
15209 | if test -w "$cache_file"; then | |
15210 | test "x$cache_file" != "x/dev/null" && | |
15211 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
15212 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
15213 | cat confcache >$cache_file |
15214 | else | |
81ecdfbb RW |
15215 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
15216 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
15217 | fi |
15218 | fi | |
15219 | rm -f confcache | |
15220 | ||
15221 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15222 | # Let make expand exec_prefix. | |
15223 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15224 | ||
bec39cab AC |
15225 | DEFS=-DHAVE_CONFIG_H |
15226 | ||
15227 | ac_libobjs= | |
15228 | ac_ltlibobjs= | |
15229 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
15230 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
15231 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
15232 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
15233 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
15234 | # will be set to the directory where LIBOBJS objects are built. | |
15235 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
15236 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
15237 | done |
15238 | LIBOBJS=$ac_libobjs | |
15239 | ||
15240 | LTLIBOBJS=$ac_ltlibobjs | |
15241 | ||
15242 | ||
85981d60 | 15243 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
15244 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
15245 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 15246 | fi |
a417dc56 | 15247 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
15248 | as_fn_error "conditional \"GMAKE\" was never defined. |
15249 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 15250 | fi |
4df42755 DE |
15251 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
15252 | as_fn_error "conditional \"HAVE_PYTHON\" was never defined. | |
15253 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
15254 | fi | |
15255 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
15256 | as_fn_error "conditional \"HAVE_GUILE\" was never defined. | |
15257 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
15258 | fi | |
81ecdfbb RW |
15259 | |
15260 | ||
bec39cab | 15261 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 15262 | ac_write_fail=0 |
bec39cab AC |
15263 | ac_clean_files_save=$ac_clean_files |
15264 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
15265 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
15266 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
15267 | as_write_fail=0 | |
15268 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
15269 | #! $SHELL |
15270 | # Generated by $as_me. | |
15271 | # Run this file to recreate the current configuration. | |
15272 | # Compiler output produced by configure, useful for debugging | |
15273 | # configure, is in config.log if it exists. | |
15274 | ||
15275 | debug=false | |
15276 | ac_cs_recheck=false | |
15277 | ac_cs_silent=false | |
bec39cab | 15278 | |
81ecdfbb RW |
15279 | SHELL=\${CONFIG_SHELL-$SHELL} |
15280 | export SHELL | |
15281 | _ASEOF | |
15282 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
15283 | ## -------------------- ## | |
15284 | ## M4sh Initialization. ## | |
15285 | ## -------------------- ## | |
15286 | ||
15287 | # Be more Bourne compatible | |
15288 | DUALCASE=1; export DUALCASE # for MKS sh | |
15289 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
15290 | emulate sh |
15291 | NULLCMD=: | |
81ecdfbb | 15292 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
15293 | # is contrary to our usage. Disable this feature. |
15294 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
15295 | setopt NO_GLOB_SUBST |
15296 | else | |
15297 | case `(set -o) 2>/dev/null` in #( | |
15298 | *posix*) : | |
15299 | set -o posix ;; #( | |
15300 | *) : | |
15301 | ;; | |
15302 | esac | |
bec39cab | 15303 | fi |
bec39cab | 15304 | |
81ecdfbb RW |
15305 | |
15306 | as_nl=' | |
15307 | ' | |
15308 | export as_nl | |
15309 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
15310 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
15311 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
15312 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
15313 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
15314 | # but without wasting forks for bash or zsh. | |
15315 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
15316 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15317 | as_echo='print -r --' | |
15318 | as_echo_n='print -rn --' | |
15319 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15320 | as_echo='printf %s\n' | |
15321 | as_echo_n='printf %s' | |
15322 | else | |
15323 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
15324 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
15325 | as_echo_n='/usr/ucb/echo -n' | |
15326 | else | |
15327 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
15328 | as_echo_n_body='eval | |
15329 | arg=$1; | |
15330 | case $arg in #( | |
15331 | *"$as_nl"*) | |
15332 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
15333 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
15334 | esac; | |
15335 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
15336 | ' | |
15337 | export as_echo_n_body | |
15338 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
15339 | fi | |
15340 | export as_echo_body | |
15341 | as_echo='sh -c $as_echo_body as_echo' | |
15342 | fi | |
15343 | ||
15344 | # The user is always right. | |
15345 | if test "${PATH_SEPARATOR+set}" != set; then | |
15346 | PATH_SEPARATOR=: | |
15347 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
15348 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
15349 | PATH_SEPARATOR=';' | |
15350 | } | |
bec39cab AC |
15351 | fi |
15352 | ||
15353 | ||
81ecdfbb RW |
15354 | # IFS |
15355 | # We need space, tab and new line, in precisely that order. Quoting is | |
15356 | # there to prevent editors from complaining about space-tab. | |
15357 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
15358 | # splitting by setting IFS to empty value.) | |
15359 | IFS=" "" $as_nl" | |
15360 | ||
15361 | # Find who we are. Look in the path if we contain no directory separator. | |
15362 | case $0 in #(( | |
15363 | *[\\/]* ) as_myself=$0 ;; | |
15364 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
15365 | for as_dir in $PATH | |
15366 | do | |
15367 | IFS=$as_save_IFS | |
15368 | test -z "$as_dir" && as_dir=. | |
15369 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
15370 | done | |
15371 | IFS=$as_save_IFS | |
15372 | ||
15373 | ;; | |
15374 | esac | |
15375 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
15376 | # in which case we are not to be found in the path. | |
15377 | if test "x$as_myself" = x; then | |
15378 | as_myself=$0 | |
15379 | fi | |
15380 | if test ! -f "$as_myself"; then | |
15381 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
15382 | exit 1 | |
15383 | fi | |
15384 | ||
15385 | # Unset variables that we do not need and which cause bugs (e.g. in | |
15386 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
15387 | # suppresses any "Segmentation fault" message there. '((' could | |
15388 | # trigger a bug in pdksh 5.2.14. | |
15389 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
15390 | do eval test x\${$as_var+set} = xset \ | |
15391 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
15392 | done | |
bec39cab AC |
15393 | PS1='$ ' |
15394 | PS2='> ' | |
15395 | PS4='+ ' | |
15396 | ||
15397 | # NLS nuisances. | |
81ecdfbb RW |
15398 | LC_ALL=C |
15399 | export LC_ALL | |
15400 | LANGUAGE=C | |
15401 | export LANGUAGE | |
15402 | ||
15403 | # CDPATH. | |
15404 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
15405 | ||
15406 | ||
15407 | # as_fn_error ERROR [LINENO LOG_FD] | |
15408 | # --------------------------------- | |
15409 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
15410 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
15411 | # script with status $?, using 1 if that was 0. | |
15412 | as_fn_error () | |
15413 | { | |
15414 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
15415 | if test "$3"; then | |
15416 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
15417 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
15418 | fi | |
15419 | $as_echo "$as_me: error: $1" >&2 | |
15420 | as_fn_exit $as_status | |
15421 | } # as_fn_error | |
15422 | ||
15423 | ||
15424 | # as_fn_set_status STATUS | |
15425 | # ----------------------- | |
15426 | # Set $? to STATUS, without forking. | |
15427 | as_fn_set_status () | |
15428 | { | |
15429 | return $1 | |
15430 | } # as_fn_set_status | |
15431 | ||
15432 | # as_fn_exit STATUS | |
15433 | # ----------------- | |
15434 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
15435 | as_fn_exit () | |
15436 | { | |
15437 | set +e | |
15438 | as_fn_set_status $1 | |
15439 | exit $1 | |
15440 | } # as_fn_exit | |
15441 | ||
15442 | # as_fn_unset VAR | |
15443 | # --------------- | |
15444 | # Portably unset VAR. | |
15445 | as_fn_unset () | |
15446 | { | |
15447 | { eval $1=; unset $1;} | |
15448 | } | |
15449 | as_unset=as_fn_unset | |
15450 | # as_fn_append VAR VALUE | |
15451 | # ---------------------- | |
15452 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
15453 | # advantage of any shell optimizations that allow amortized linear growth over | |
15454 | # repeated appends, instead of the typical quadratic growth present in naive | |
15455 | # implementations. | |
15456 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
15457 | eval 'as_fn_append () | |
15458 | { | |
15459 | eval $1+=\$2 | |
15460 | }' | |
15461 | else | |
15462 | as_fn_append () | |
15463 | { | |
15464 | eval $1=\$$1\$2 | |
15465 | } | |
15466 | fi # as_fn_append | |
15467 | ||
15468 | # as_fn_arith ARG... | |
15469 | # ------------------ | |
15470 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
15471 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
15472 | # must be portable across $(()) and expr. | |
15473 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
15474 | eval 'as_fn_arith () | |
15475 | { | |
15476 | as_val=$(( $* )) | |
15477 | }' | |
15478 | else | |
15479 | as_fn_arith () | |
15480 | { | |
15481 | as_val=`expr "$@" || test $? -eq 1` | |
15482 | } | |
15483 | fi # as_fn_arith | |
bec39cab | 15484 | |
81ecdfbb RW |
15485 | |
15486 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
15487 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
15488 | as_expr=expr |
15489 | else | |
15490 | as_expr=false | |
15491 | fi | |
15492 | ||
81ecdfbb | 15493 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
15494 | as_basename=basename |
15495 | else | |
15496 | as_basename=false | |
15497 | fi | |
15498 | ||
81ecdfbb RW |
15499 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
15500 | as_dirname=dirname | |
15501 | else | |
15502 | as_dirname=false | |
15503 | fi | |
bec39cab | 15504 | |
81ecdfbb | 15505 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
15506 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
15507 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
15508 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
15509 | $as_echo X/"$0" | | |
15510 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
15511 | s//\1/ | |
15512 | q | |
15513 | } | |
15514 | /^X\/\(\/\/\)$/{ | |
15515 | s//\1/ | |
15516 | q | |
15517 | } | |
15518 | /^X\/\(\/\).*/{ | |
15519 | s//\1/ | |
15520 | q | |
15521 | } | |
15522 | s/.*/./; q'` | |
b4e70030 | 15523 | |
b4e70030 JB |
15524 | # Avoid depending upon Character Ranges. |
15525 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
15526 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
15527 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
15528 | as_cr_digits='0123456789' | |
15529 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
15530 | ||
81ecdfbb RW |
15531 | ECHO_C= ECHO_N= ECHO_T= |
15532 | case `echo -n x` in #((((( | |
15533 | -n*) | |
15534 | case `echo 'xy\c'` in | |
15535 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
15536 | xy) ECHO_C='\c';; | |
15537 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
15538 | ECHO_T=' ';; | |
15539 | esac;; | |
15540 | *) | |
15541 | ECHO_N='-n';; | |
bec39cab AC |
15542 | esac |
15543 | ||
81ecdfbb RW |
15544 | rm -f conf$$ conf$$.exe conf$$.file |
15545 | if test -d conf$$.dir; then | |
15546 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 15547 | else |
81ecdfbb RW |
15548 | rm -f conf$$.dir |
15549 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 15550 | fi |
81ecdfbb RW |
15551 | if (echo >conf$$.file) 2>/dev/null; then |
15552 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 15553 | as_ln_s='ln -s' |
81ecdfbb RW |
15554 | # ... but there are two gotchas: |
15555 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
15556 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
15557 | # In both cases, we have to default to `cp -p'. | |
15558 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
15559 | as_ln_s='cp -p' | |
15560 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
15561 | as_ln_s=ln | |
15562 | else | |
15563 | as_ln_s='cp -p' | |
b4e70030 | 15564 | fi |
bec39cab AC |
15565 | else |
15566 | as_ln_s='cp -p' | |
15567 | fi | |
81ecdfbb RW |
15568 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
15569 | rmdir conf$$.dir 2>/dev/null | |
15570 | ||
15571 | ||
15572 | # as_fn_mkdir_p | |
15573 | # ------------- | |
15574 | # Create "$as_dir" as a directory, including parents if necessary. | |
15575 | as_fn_mkdir_p () | |
15576 | { | |
15577 | ||
15578 | case $as_dir in #( | |
15579 | -*) as_dir=./$as_dir;; | |
15580 | esac | |
15581 | test -d "$as_dir" || eval $as_mkdir_p || { | |
15582 | as_dirs= | |
15583 | while :; do | |
15584 | case $as_dir in #( | |
15585 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
15586 | *) as_qdir=$as_dir;; | |
15587 | esac | |
15588 | as_dirs="'$as_qdir' $as_dirs" | |
15589 | as_dir=`$as_dirname -- "$as_dir" || | |
15590 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
15591 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
15592 | X"$as_dir" : 'X\(//\)$' \| \ | |
15593 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
15594 | $as_echo X"$as_dir" | | |
15595 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15596 | s//\1/ | |
15597 | q | |
15598 | } | |
15599 | /^X\(\/\/\)[^/].*/{ | |
15600 | s//\1/ | |
15601 | q | |
15602 | } | |
15603 | /^X\(\/\/\)$/{ | |
15604 | s//\1/ | |
15605 | q | |
15606 | } | |
15607 | /^X\(\/\).*/{ | |
15608 | s//\1/ | |
15609 | q | |
15610 | } | |
15611 | s/.*/./; q'` | |
15612 | test -d "$as_dir" && break | |
15613 | done | |
15614 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
15615 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
15616 | ||
bec39cab | 15617 | |
81ecdfbb | 15618 | } # as_fn_mkdir_p |
bec39cab | 15619 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 15620 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
15621 | else |
15622 | test -d ./-p && rmdir ./-p | |
15623 | as_mkdir_p=false | |
15624 | fi | |
15625 | ||
81ecdfbb RW |
15626 | if test -x / >/dev/null 2>&1; then |
15627 | as_test_x='test -x' | |
15628 | else | |
15629 | if ls -dL / >/dev/null 2>&1; then | |
15630 | as_ls_L_option=L | |
15631 | else | |
15632 | as_ls_L_option= | |
15633 | fi | |
15634 | as_test_x=' | |
15635 | eval sh -c '\'' | |
15636 | if test -d "$1"; then | |
15637 | test -d "$1/."; | |
15638 | else | |
15639 | case $1 in #( | |
15640 | -*)set "./$1";; | |
15641 | esac; | |
15642 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
15643 | ???[sx]*):;;*)false;;esac;fi | |
15644 | '\'' sh | |
15645 | ' | |
15646 | fi | |
15647 | as_executable_p=$as_test_x | |
bec39cab AC |
15648 | |
15649 | # Sed expression to map a string onto a valid CPP name. | |
15650 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
15651 | ||
15652 | # Sed expression to map a string onto a valid variable name. | |
15653 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
15654 | ||
15655 | ||
bec39cab | 15656 | exec 6>&1 |
81ecdfbb RW |
15657 | ## ----------------------------------- ## |
15658 | ## Main body of $CONFIG_STATUS script. ## | |
15659 | ## ----------------------------------- ## | |
15660 | _ASEOF | |
15661 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
15662 | ||
15663 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15664 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 15665 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
15666 | # values after options handling. |
15667 | ac_log=" | |
bec39cab | 15668 | This file was extended by $as_me, which was |
81ecdfbb | 15669 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
15670 | |
15671 | CONFIG_FILES = $CONFIG_FILES | |
15672 | CONFIG_HEADERS = $CONFIG_HEADERS | |
15673 | CONFIG_LINKS = $CONFIG_LINKS | |
15674 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
15675 | $ $0 $@ | |
15676 | ||
81ecdfbb RW |
15677 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
15678 | " | |
15679 | ||
bec39cab AC |
15680 | _ACEOF |
15681 | ||
81ecdfbb RW |
15682 | case $ac_config_files in *" |
15683 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
15684 | esac | |
234b45d4 | 15685 | |
81ecdfbb RW |
15686 | case $ac_config_headers in *" |
15687 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
15688 | esac | |
b4e70030 | 15689 | |
b4e70030 | 15690 | |
81ecdfbb RW |
15691 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
15692 | # Files that config.status was made for. | |
15693 | config_files="$ac_config_files" | |
15694 | config_headers="$ac_config_headers" | |
15695 | config_links="$ac_config_links" | |
15696 | config_commands="$ac_config_commands" | |
234b45d4 | 15697 | |
81ecdfbb | 15698 | _ACEOF |
b4e70030 | 15699 | |
81ecdfbb | 15700 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 15701 | ac_cs_usage="\ |
81ecdfbb RW |
15702 | \`$as_me' instantiates files and other configuration actions |
15703 | from templates according to the current configuration. Unless the files | |
15704 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 15705 | |
81ecdfbb | 15706 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 15707 | |
bec39cab | 15708 | -h, --help print this help, then exit |
81ecdfbb RW |
15709 | -V, --version print version number and configuration settings, then exit |
15710 | -q, --quiet, --silent | |
15711 | do not print progress messages | |
bec39cab AC |
15712 | -d, --debug don't remove temporary files |
15713 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
15714 | --file=FILE[:TEMPLATE] |
15715 | instantiate the configuration file FILE | |
15716 | --header=FILE[:TEMPLATE] | |
15717 | instantiate the configuration header FILE | |
234b45d4 | 15718 | |
bec39cab AC |
15719 | Configuration files: |
15720 | $config_files | |
234b45d4 | 15721 | |
bec39cab AC |
15722 | Configuration headers: |
15723 | $config_headers | |
234b45d4 | 15724 | |
bec39cab AC |
15725 | Configuration links: |
15726 | $config_links | |
234b45d4 | 15727 | |
bec39cab AC |
15728 | Configuration commands: |
15729 | $config_commands | |
15730 | ||
81ecdfbb | 15731 | Report bugs to the package provider." |
b4e70030 | 15732 | |
81ecdfbb RW |
15733 | _ACEOF |
15734 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
15735 | ac_cs_version="\\ |
15736 | config.status | |
81ecdfbb RW |
15737 | configured by $0, generated by GNU Autoconf 2.64, |
15738 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 15739 | |
81ecdfbb | 15740 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
15741 | This config.status script is free software; the Free Software Foundation |
15742 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
15743 | |
15744 | ac_pwd='$ac_pwd' | |
15745 | srcdir='$srcdir' | |
15746 | INSTALL='$INSTALL' | |
81ecdfbb RW |
15747 | AWK='$AWK' |
15748 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
15749 | _ACEOF |
15750 | ||
81ecdfbb RW |
15751 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15752 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
15753 | ac_need_defaults=: |
15754 | while test $# != 0 | |
15755 | do | |
15756 | case $1 in | |
15757 | --*=*) | |
81ecdfbb RW |
15758 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
15759 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 15760 | ac_shift=: |
c906108c | 15761 | ;; |
81ecdfbb | 15762 | *) |
bec39cab AC |
15763 | ac_option=$1 |
15764 | ac_optarg=$2 | |
15765 | ac_shift=shift | |
c906108c | 15766 | ;; |
bec39cab | 15767 | esac |
c906108c | 15768 | |
bec39cab AC |
15769 | case $ac_option in |
15770 | # Handling of the options. | |
bec39cab AC |
15771 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
15772 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
15773 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
15774 | $as_echo "$ac_cs_version"; exit ;; | |
15775 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
15776 | debug=: ;; |
15777 | --file | --fil | --fi | --f ) | |
15778 | $ac_shift | |
81ecdfbb RW |
15779 | case $ac_optarg in |
15780 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
15781 | esac | |
15782 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
15783 | ac_need_defaults=false;; |
15784 | --header | --heade | --head | --hea ) | |
15785 | $ac_shift | |
81ecdfbb RW |
15786 | case $ac_optarg in |
15787 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
15788 | esac | |
15789 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 15790 | ac_need_defaults=false;; |
81ecdfbb RW |
15791 | --he | --h) |
15792 | # Conflict between --help and --header | |
15793 | as_fn_error "ambiguous option: \`$1' | |
15794 | Try \`$0 --help' for more information.";; | |
15795 | --help | --hel | -h ) | |
15796 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
15797 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
15798 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
15799 | ac_cs_silent=: ;; | |
c906108c | 15800 | |
bec39cab | 15801 | # This is an error. |
81ecdfbb RW |
15802 | -*) as_fn_error "unrecognized option: \`$1' |
15803 | Try \`$0 --help' for more information." ;; | |
c906108c | 15804 | |
81ecdfbb RW |
15805 | *) as_fn_append ac_config_targets " $1" |
15806 | ac_need_defaults=false ;; | |
c906108c | 15807 | |
bec39cab AC |
15808 | esac |
15809 | shift | |
15810 | done | |
c906108c | 15811 | |
bec39cab | 15812 | ac_configure_extra_args= |
c906108c | 15813 | |
bec39cab AC |
15814 | if $ac_cs_silent; then |
15815 | exec 6>/dev/null | |
15816 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
15817 | fi | |
c906108c | 15818 | |
bec39cab | 15819 | _ACEOF |
81ecdfbb | 15820 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 15821 | if \$ac_cs_recheck; then |
81ecdfbb RW |
15822 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
15823 | shift | |
15824 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
15825 | CONFIG_SHELL='$SHELL' | |
15826 | export CONFIG_SHELL | |
15827 | exec "\$@" | |
bec39cab AC |
15828 | fi |
15829 | ||
15830 | _ACEOF | |
81ecdfbb RW |
15831 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15832 | exec 5>>config.log | |
15833 | { | |
15834 | echo | |
15835 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
15836 | ## Running $as_me. ## | |
15837 | _ASBOX | |
15838 | $as_echo "$ac_log" | |
15839 | } >&5 | |
bec39cab | 15840 | |
81ecdfbb RW |
15841 | _ACEOF |
15842 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 15843 | # |
81ecdfbb | 15844 | # INIT-COMMANDS |
c906108c | 15845 | # |
a417dc56 | 15846 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 15847 | |
bec39cab AC |
15848 | _ACEOF |
15849 | ||
81ecdfbb | 15850 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 15851 | |
81ecdfbb | 15852 | # Handling of arguments. |
bec39cab | 15853 | for ac_config_target in $ac_config_targets |
c906108c | 15854 | do |
81ecdfbb RW |
15855 | case $ac_config_target in |
15856 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
15857 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 15858 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 15859 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 15860 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 15861 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 15862 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 15863 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 15864 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
15865 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
15866 | ||
15867 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
15868 | esac |
15869 | done | |
15870 | ||
81ecdfbb | 15871 | |
bec39cab AC |
15872 | # If the user did not use the arguments to specify the items to instantiate, |
15873 | # then the envvar interface is used. Set only those that are not. | |
15874 | # We use the long form for the default assignment because of an extremely | |
15875 | # bizarre bug on SunOS 4.1.3. | |
15876 | if $ac_need_defaults; then | |
15877 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
15878 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
15879 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
15880 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
15881 | fi | |
15882 | ||
b4e70030 | 15883 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 15884 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 15885 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
15886 | # Hook for its removal unless debugging. |
15887 | # Note that there is a small window in which the directory will not be cleaned: | |
15888 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
15889 | $debug || |
15890 | { | |
81ecdfbb RW |
15891 | tmp= |
15892 | trap 'exit_status=$? | |
15893 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
15894 | ' 0 | |
15895 | trap 'as_fn_exit 1' 1 2 13 15 | |
15896 | } | |
15897 | # Create a (secure) tmp directory for tmp files. | |
15898 | ||
15899 | { | |
15900 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
15901 | test -n "$tmp" && test -d "$tmp" | |
15902 | } || | |
15903 | { | |
15904 | tmp=./conf$$-$RANDOM | |
15905 | (umask 077 && mkdir "$tmp") | |
15906 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
15907 | ||
15908 | # Set up the scripts for CONFIG_FILES section. | |
15909 | # No need to generate them if there are no CONFIG_FILES. | |
15910 | # This happens for instance with `./config.status config.h'. | |
15911 | if test -n "$CONFIG_FILES"; then | |
15912 | ||
15913 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
15914 | ac_cs_awk_getline=: | |
15915 | ac_cs_awk_pipe_init= | |
15916 | ac_cs_awk_read_file=' | |
15917 | while ((getline aline < (F[key])) > 0) | |
15918 | print(aline) | |
15919 | close(F[key])' | |
15920 | ac_cs_awk_pipe_fini= | |
15921 | else | |
15922 | ac_cs_awk_getline=false | |
15923 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
15924 | ac_cs_awk_read_file=' | |
15925 | print "|#_!!_#|" | |
15926 | print "cat " F[key] " &&" | |
15927 | '$ac_cs_awk_pipe_init | |
15928 | # The final `:' finishes the AND list. | |
15929 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
15930 | fi | |
15931 | ac_cr=`echo X | tr X '\015'` | |
15932 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
15933 | # But we know of no other shell where ac_cr would be empty at this | |
15934 | # point, so we can use a bashism as a fallback. | |
15935 | if test "x$ac_cr" = x; then | |
15936 | eval ac_cr=\$\'\\r\' | |
15937 | fi | |
15938 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
15939 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
15940 | ac_cs_awk_cr='\r' | |
15941 | else | |
15942 | ac_cs_awk_cr=$ac_cr | |
15943 | fi | |
15944 | ||
15945 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
15946 | _ACEOF | |
15947 | ||
15948 | # Create commands to substitute file output variables. | |
15949 | { | |
15950 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
15951 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
15952 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
15953 | echo "_ACAWK" && | |
15954 | echo "_ACEOF" | |
15955 | } >conf$$files.sh && | |
15956 | . ./conf$$files.sh || | |
15957 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15958 | rm -f conf$$files.sh | |
15959 | ||
15960 | { | |
15961 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
15962 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
15963 | echo "_ACEOF" | |
15964 | } >conf$$subs.sh || | |
15965 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15966 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
15967 | ac_delim='%!_!# ' | |
15968 | for ac_last_try in false false false false false :; do | |
15969 | . ./conf$$subs.sh || | |
15970 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15971 | ||
15972 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
15973 | if test $ac_delim_n = $ac_delim_num; then | |
15974 | break | |
15975 | elif $ac_last_try; then | |
15976 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15977 | else | |
15978 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15979 | fi | |
15980 | done | |
15981 | rm -f conf$$subs.sh | |
15982 | ||
15983 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15984 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
15985 | _ACEOF | |
15986 | sed -n ' | |
15987 | h | |
15988 | s/^/S["/; s/!.*/"]=/ | |
15989 | p | |
15990 | g | |
15991 | s/^[^!]*!// | |
15992 | :repl | |
15993 | t repl | |
15994 | s/'"$ac_delim"'$// | |
15995 | t delim | |
15996 | :nl | |
15997 | h | |
15998 | s/\(.\{148\}\).*/\1/ | |
15999 | t more1 | |
16000 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
16001 | p | |
16002 | n | |
16003 | b repl | |
16004 | :more1 | |
16005 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16006 | p | |
16007 | g | |
16008 | s/.\{148\}// | |
16009 | t nl | |
16010 | :delim | |
16011 | h | |
16012 | s/\(.\{148\}\).*/\1/ | |
16013 | t more2 | |
16014 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
16015 | p | |
16016 | b | |
16017 | :more2 | |
16018 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16019 | p | |
16020 | g | |
16021 | s/.\{148\}// | |
16022 | t delim | |
16023 | ' <conf$$subs.awk | sed ' | |
16024 | /^[^""]/{ | |
16025 | N | |
16026 | s/\n// | |
16027 | } | |
16028 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
16029 | rm -f conf$$subs.awk | |
16030 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16031 | _ACAWK | |
16032 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
16033 | for (key in S) S_is_set[key] = 1 | |
16034 | FS = "\a" | |
16035 | \$ac_cs_awk_pipe_init | |
16036 | } | |
16037 | { | |
16038 | line = $ 0 | |
16039 | nfields = split(line, field, "@") | |
16040 | substed = 0 | |
16041 | len = length(field[1]) | |
16042 | for (i = 2; i < nfields; i++) { | |
16043 | key = field[i] | |
16044 | keylen = length(key) | |
16045 | if (S_is_set[key]) { | |
16046 | value = S[key] | |
16047 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
16048 | len += length(value) + length(field[++i]) | |
16049 | substed = 1 | |
16050 | } else | |
16051 | len += 1 + keylen | |
16052 | } | |
16053 | if (nfields == 3 && !substed) { | |
16054 | key = field[2] | |
16055 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
16056 | \$ac_cs_awk_read_file | |
16057 | next | |
16058 | } | |
16059 | } | |
16060 | print line | |
b4e70030 | 16061 | } |
81ecdfbb RW |
16062 | \$ac_cs_awk_pipe_fini |
16063 | _ACAWK | |
16064 | _ACEOF | |
16065 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16066 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
16067 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
16068 | else | |
16069 | cat | |
16070 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
16071 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
16072 | _ACEOF | |
16073 | ||
16074 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
16075 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16076 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16077 | # (actually we leave an empty line to preserve line numbers). | |
16078 | if test "x$srcdir" = x.; then | |
16079 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
16080 | s/:*\$(srcdir):*/:/ | |
16081 | s/:*\${srcdir}:*/:/ | |
16082 | s/:*@srcdir@:*/:/ | |
16083 | s/^\([^=]*=[ ]*\):*/\1/ | |
16084 | s/:*$// | |
16085 | s/^[^=]*=[ ]*$// | |
16086 | }' | |
16087 | fi | |
16088 | ||
16089 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16090 | fi # test -n "$CONFIG_FILES" | |
16091 | ||
16092 | # Set up the scripts for CONFIG_HEADERS section. | |
16093 | # No need to generate them if there are no CONFIG_HEADERS. | |
16094 | # This happens for instance with `./config.status Makefile'. | |
16095 | if test -n "$CONFIG_HEADERS"; then | |
16096 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
16097 | BEGIN { | |
16098 | _ACEOF | |
16099 | ||
16100 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
16101 | # here-document in config.status, that substitutes the proper values into | |
16102 | # config.h.in to produce config.h. | |
4e8d927d | 16103 | |
81ecdfbb RW |
16104 | # Create a delimiter string that does not exist in confdefs.h, to ease |
16105 | # handling of long lines. | |
16106 | ac_delim='%!_!# ' | |
16107 | for ac_last_try in false false :; do | |
16108 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
16109 | if test -z "$ac_t"; then | |
16110 | break | |
16111 | elif $ac_last_try; then | |
16112 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
16113 | else | |
16114 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16115 | fi | |
16116 | done | |
4e8d927d | 16117 | |
81ecdfbb RW |
16118 | # For the awk script, D is an array of macro values keyed by name, |
16119 | # likewise P contains macro parameters if any. Preserve backslash | |
16120 | # newline sequences. | |
16121 | ||
16122 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
16123 | sed -n ' | |
16124 | s/.\{148\}/&'"$ac_delim"'/g | |
16125 | t rset | |
16126 | :rset | |
16127 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
16128 | t def | |
16129 | d | |
16130 | :def | |
16131 | s/\\$// | |
16132 | t bsnl | |
16133 | s/["\\]/\\&/g | |
16134 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16135 | D["\1"]=" \3"/p | |
16136 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
16137 | d | |
16138 | :bsnl | |
16139 | s/["\\]/\\&/g | |
16140 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16141 | D["\1"]=" \3\\\\\\n"\\/p | |
16142 | t cont | |
16143 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
16144 | t cont | |
16145 | d | |
16146 | :cont | |
16147 | n | |
16148 | s/.\{148\}/&'"$ac_delim"'/g | |
16149 | t clear | |
16150 | :clear | |
16151 | s/\\$// | |
16152 | t bsnlc | |
16153 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
16154 | d | |
16155 | :bsnlc | |
16156 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
16157 | b cont | |
16158 | ' <confdefs.h | sed ' | |
16159 | s/'"$ac_delim"'/"\\\ | |
16160 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
16161 | ||
16162 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16163 | for (key in D) D_is_set[key] = 1 | |
16164 | FS = "\a" | |
16165 | } | |
16166 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
16167 | line = \$ 0 | |
16168 | split(line, arg, " ") | |
16169 | if (arg[1] == "#") { | |
16170 | defundef = arg[2] | |
16171 | mac1 = arg[3] | |
16172 | } else { | |
16173 | defundef = substr(arg[1], 2) | |
16174 | mac1 = arg[2] | |
16175 | } | |
16176 | split(mac1, mac2, "(") #) | |
16177 | macro = mac2[1] | |
16178 | prefix = substr(line, 1, index(line, defundef) - 1) | |
16179 | if (D_is_set[macro]) { | |
16180 | # Preserve the white space surrounding the "#". | |
16181 | print prefix "define", macro P[macro] D[macro] | |
16182 | next | |
16183 | } else { | |
16184 | # Replace #undef with comments. This is necessary, for example, | |
16185 | # in the case of _POSIX_SOURCE, which is predefined and required | |
16186 | # on some systems where configure will not decide to define it. | |
16187 | if (defundef == "undef") { | |
16188 | print "/*", prefix defundef, macro, "*/" | |
16189 | next | |
16190 | } | |
16191 | } | |
b4e70030 | 16192 | } |
81ecdfbb RW |
16193 | { print } |
16194 | _ACAWK | |
b4e70030 | 16195 | _ACEOF |
81ecdfbb RW |
16196 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16197 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
16198 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 16199 | |
4e8d927d | 16200 | |
81ecdfbb RW |
16201 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
16202 | shift | |
16203 | for ac_tag | |
16204 | do | |
16205 | case $ac_tag in | |
16206 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
16207 | esac | |
16208 | case $ac_mode$ac_tag in | |
16209 | :[FHL]*:*);; | |
16210 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
16211 | :[FH]-) ac_tag=-:-;; | |
16212 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
16213 | esac | |
16214 | ac_save_IFS=$IFS | |
16215 | IFS=: | |
16216 | set x $ac_tag | |
16217 | IFS=$ac_save_IFS | |
16218 | shift | |
16219 | ac_file=$1 | |
16220 | shift | |
4e8d927d | 16221 | |
81ecdfbb RW |
16222 | case $ac_mode in |
16223 | :L) ac_source=$1;; | |
16224 | :[FH]) | |
16225 | ac_file_inputs= | |
16226 | for ac_f | |
16227 | do | |
16228 | case $ac_f in | |
16229 | -) ac_f="$tmp/stdin";; | |
16230 | *) # Look for the file first in the build tree, then in the source tree | |
16231 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
16232 | # because $ac_f cannot contain `:'. | |
16233 | test -f "$ac_f" || | |
16234 | case $ac_f in | |
16235 | [\\/$]*) false;; | |
16236 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
16237 | esac || | |
16238 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
16239 | esac | |
16240 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
16241 | as_fn_append ac_file_inputs " '$ac_f'" | |
16242 | done | |
16243 | ||
16244 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
16245 | # use $as_me), people would be surprised to read: | |
16246 | # /* config.h. Generated by config.status. */ | |
16247 | configure_input='Generated from '` | |
16248 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
16249 | `' by configure.' | |
16250 | if test x"$ac_file" != x-; then | |
16251 | configure_input="$ac_file. $configure_input" | |
16252 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
16253 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 16254 | fi |
81ecdfbb RW |
16255 | # Neutralize special characters interpreted by sed in replacement strings. |
16256 | case $configure_input in #( | |
16257 | *\&* | *\|* | *\\* ) | |
16258 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
16259 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
16260 | *) ac_sed_conf_input=$configure_input;; | |
16261 | esac | |
4e8d927d | 16262 | |
81ecdfbb RW |
16263 | case $ac_tag in |
16264 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
16265 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
16266 | esac | |
16267 | ;; | |
c906108c SS |
16268 | esac |
16269 | ||
81ecdfbb | 16270 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
16271 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
16272 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
16273 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16274 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
16275 | $as_echo X"$ac_file" | | |
16276 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16277 | s//\1/ | |
16278 | q | |
16279 | } | |
16280 | /^X\(\/\/\)[^/].*/{ | |
16281 | s//\1/ | |
16282 | q | |
16283 | } | |
16284 | /^X\(\/\/\)$/{ | |
16285 | s//\1/ | |
16286 | q | |
16287 | } | |
16288 | /^X\(\/\).*/{ | |
16289 | s//\1/ | |
16290 | q | |
16291 | } | |
16292 | s/.*/./; q'` | |
16293 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16294 | ac_builddir=. |
16295 | ||
81ecdfbb RW |
16296 | case "$ac_dir" in |
16297 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16298 | *) | |
16299 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16300 | # A ".." for each directory in $ac_dir_suffix. | |
16301 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16302 | case $ac_top_builddir_sub in | |
16303 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16304 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16305 | esac ;; | |
16306 | esac | |
16307 | ac_abs_top_builddir=$ac_pwd | |
16308 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16309 | # for backward compatibility: | |
16310 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16311 | |
16312 | case $srcdir in | |
81ecdfbb | 16313 | .) # We are building in place. |
bec39cab | 16314 | ac_srcdir=. |
81ecdfbb RW |
16315 | ac_top_srcdir=$ac_top_builddir_sub |
16316 | ac_abs_top_srcdir=$ac_pwd ;; | |
16317 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16318 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16319 | ac_top_srcdir=$srcdir |
16320 | ac_abs_top_srcdir=$srcdir ;; | |
16321 | *) # Relative name. | |
16322 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16323 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16324 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16325 | esac |
81ecdfbb | 16326 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 16327 | |
c906108c | 16328 | |
81ecdfbb RW |
16329 | case $ac_mode in |
16330 | :F) | |
16331 | # | |
16332 | # CONFIG_FILE | |
16333 | # | |
c906108c | 16334 | |
bec39cab AC |
16335 | case $INSTALL in |
16336 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 16337 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 16338 | esac |
81ecdfbb | 16339 | _ACEOF |
121ce6e5 | 16340 | |
81ecdfbb RW |
16341 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16342 | # If the template does not know about datarootdir, expand it. | |
16343 | # FIXME: This hack should be removed a few years after 2.60. | |
16344 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
16345 | ac_sed_dataroot=' | |
16346 | /datarootdir/ { | |
16347 | p | |
16348 | q | |
16349 | } | |
16350 | /@datadir@/p | |
16351 | /@docdir@/p | |
16352 | /@infodir@/p | |
16353 | /@localedir@/p | |
16354 | /@mandir@/p' | |
16355 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
16356 | *datarootdir*) ac_datarootdir_seen=yes;; | |
16357 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
16358 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
16359 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
16360 | _ACEOF | |
16361 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16362 | ac_datarootdir_hack=' | |
16363 | s&@datadir@&$datadir&g | |
16364 | s&@docdir@&$docdir&g | |
16365 | s&@infodir@&$infodir&g | |
16366 | s&@localedir@&$localedir&g | |
16367 | s&@mandir@&$mandir&g | |
16368 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
16369 | esac | |
4e8d927d | 16370 | _ACEOF |
81ecdfbb RW |
16371 | |
16372 | # Neutralize VPATH when `$srcdir' = `.'. | |
16373 | # Shell code in configure.ac might set extrasub. | |
16374 | # FIXME: do we really want to maintain this feature? | |
16375 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16376 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
16377 | $extrasub |
16378 | _ACEOF | |
81ecdfbb | 16379 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
16380 | :t |
16381 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
16382 | s|@configure_input@|$ac_sed_conf_input|;t t |
16383 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
16384 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
16385 | s&@srcdir@&$ac_srcdir&;t t | |
16386 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
16387 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
16388 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
16389 | s&@builddir@&$ac_builddir&;t t | |
16390 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
16391 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
16392 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
16393 | $ac_datarootdir_hack |
16394 | " | |
16395 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
16396 | if $ac_cs_awk_getline; then | |
16397 | $AWK -f "$tmp/subs.awk" | |
16398 | else | |
16399 | $AWK -f "$tmp/subs.awk" | $SHELL | |
16400 | fi >$tmp/out \ | |
16401 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16402 | ||
16403 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
16404 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
16405 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
16406 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
16407 | which seems to be undefined. Please make sure it is defined." >&5 | |
16408 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
16409 | which seems to be undefined. Please make sure it is defined." >&2;} | |
16410 | ||
16411 | rm -f "$tmp/stdin" | |
bec39cab | 16412 | case $ac_file in |
81ecdfbb RW |
16413 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
16414 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
16415 | esac \ | |
16416 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16417 | ;; | |
16418 | :H) | |
16419 | # | |
16420 | # CONFIG_HEADER | |
16421 | # | |
bec39cab | 16422 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
16423 | { |
16424 | $as_echo "/* $configure_input */" \ | |
16425 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
16426 | } >"$tmp/config.h" \ | |
16427 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16428 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
16429 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
16430 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 16431 | else |
81ecdfbb RW |
16432 | rm -f "$ac_file" |
16433 | mv "$tmp/config.h" "$ac_file" \ | |
16434 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
16435 | fi |
16436 | else | |
81ecdfbb RW |
16437 | $as_echo "/* $configure_input */" \ |
16438 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
16439 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 16440 | fi |
81ecdfbb RW |
16441 | ;; |
16442 | :L) | |
16443 | # | |
16444 | # CONFIG_LINK | |
16445 | # | |
c906108c | 16446 | |
81ecdfbb RW |
16447 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
16448 | : | |
b4e70030 | 16449 | else |
81ecdfbb RW |
16450 | # Prefer the file from the source tree if names are identical. |
16451 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
16452 | ac_source=$srcdir/$ac_source | |
16453 | fi | |
b4e70030 | 16454 | |
81ecdfbb RW |
16455 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
16456 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 16457 | |
81ecdfbb RW |
16458 | if test ! -r "$ac_source"; then |
16459 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
16460 | fi | |
16461 | rm -f "$ac_file" | |
bec39cab | 16462 | |
81ecdfbb RW |
16463 | # Try a relative symlink, then a hard link, then a copy. |
16464 | case $srcdir in | |
16465 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
16466 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
16467 | esac | |
16468 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
16469 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
16470 | cp -p "$ac_source" "$ac_file" || | |
16471 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
16472 | fi | |
16473 | ;; | |
16474 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
16475 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
16476 | ;; | |
c906108c | 16477 | esac |
b4e70030 | 16478 | |
bec39cab | 16479 | |
81ecdfbb RW |
16480 | case $ac_file$ac_mode in |
16481 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 16482 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 16483 | "default":C) |
c906108c SS |
16484 | case x$CONFIG_HEADERS in |
16485 | xconfig.h:config.in) | |
16486 | echo > stamp-h ;; | |
16487 | esac | |
bec39cab | 16488 | ;; |
81ecdfbb | 16489 | |
bec39cab | 16490 | esac |
81ecdfbb | 16491 | done # for ac_tag |
c906108c | 16492 | |
bec39cab | 16493 | |
81ecdfbb | 16494 | as_fn_exit 0 |
bec39cab | 16495 | _ACEOF |
bec39cab AC |
16496 | ac_clean_files=$ac_clean_files_save |
16497 | ||
81ecdfbb RW |
16498 | test $ac_write_fail = 0 || |
16499 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
16500 | ||
bec39cab AC |
16501 | |
16502 | # configure is writing to config.log, and then calls config.status. | |
16503 | # config.status does its own redirection, appending to config.log. | |
16504 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
16505 | # by configure, so config.status won't be able to write to it; its | |
16506 | # output is simply discarded. So we exec the FD to /dev/null, | |
16507 | # effectively closing config.log, so it can be properly (re)opened and | |
16508 | # appended to by config.status. When coming back to configure, we | |
16509 | # need to make the FD available again. | |
16510 | if test "$no_create" != yes; then | |
16511 | ac_cs_success=: | |
16512 | ac_config_status_args= | |
16513 | test "$silent" = yes && | |
16514 | ac_config_status_args="$ac_config_status_args --quiet" | |
16515 | exec 5>/dev/null | |
16516 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
16517 | exec 5>>config.log | |
16518 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
16519 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 16520 | $ac_cs_success || as_fn_exit $? |
bec39cab | 16521 | fi |
c906108c | 16522 | |
bec39cab | 16523 | # |
81ecdfbb | 16524 | # CONFIG_SUBDIRS section. |
bec39cab | 16525 | # |
c906108c SS |
16526 | if test "$no_recursion" != yes; then |
16527 | ||
81ecdfbb RW |
16528 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
16529 | # so they do not pile up. | |
c906108c SS |
16530 | ac_sub_configure_args= |
16531 | ac_prev= | |
fdc59709 PB |
16532 | eval "set x $ac_configure_args" |
16533 | shift | |
16534 | for ac_arg | |
16535 | do | |
c906108c SS |
16536 | if test -n "$ac_prev"; then |
16537 | ac_prev= | |
16538 | continue | |
16539 | fi | |
bec39cab | 16540 | case $ac_arg in |
c906108c SS |
16541 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
16542 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
16543 | ac_prev=cache_file ;; | |
16544 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
16545 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
16546 | | --c=*) | |
16547 | ;; | |
16548 | --config-cache | -C) | |
c906108c SS |
16549 | ;; |
16550 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
16551 | ac_prev=srcdir ;; | |
16552 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
16553 | ;; | |
bec39cab AC |
16554 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
16555 | ac_prev=prefix ;; | |
16556 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
16557 | ;; | |
81ecdfbb RW |
16558 | --disable-option-checking) |
16559 | ;; | |
fdc59709 PB |
16560 | *) |
16561 | case $ac_arg in | |
81ecdfbb | 16562 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 16563 | esac |
81ecdfbb | 16564 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
16565 | esac |
16566 | done | |
16567 | ||
bec39cab AC |
16568 | # Always prepend --prefix to ensure using the same prefix |
16569 | # in subdir configurations. | |
fdc59709 PB |
16570 | ac_arg="--prefix=$prefix" |
16571 | case $ac_arg in | |
81ecdfbb | 16572 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 16573 | esac |
81ecdfbb RW |
16574 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
16575 | ||
16576 | # Pass --silent | |
16577 | if test "$silent" = yes; then | |
16578 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
16579 | fi | |
16580 | ||
16581 | # Always prepend --disable-option-checking to silence warnings, since | |
16582 | # different subdirs can have different --enable and --with options. | |
16583 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 16584 | |
b4e70030 | 16585 | ac_popdir=`pwd` |
bec39cab | 16586 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
16587 | |
16588 | # Do not complain, so a configure script can configure whichever | |
16589 | # parts of a large source tree are present. | |
fdc59709 | 16590 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 16591 | |
81ecdfbb RW |
16592 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
16593 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
16594 | $as_echo "$ac_msg" >&6 | |
16595 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16596 | ac_builddir=. |
16597 | ||
81ecdfbb RW |
16598 | case "$ac_dir" in |
16599 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16600 | *) | |
16601 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16602 | # A ".." for each directory in $ac_dir_suffix. | |
16603 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16604 | case $ac_top_builddir_sub in | |
16605 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16606 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16607 | esac ;; | |
16608 | esac | |
16609 | ac_abs_top_builddir=$ac_pwd | |
16610 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16611 | # for backward compatibility: | |
16612 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16613 | |
16614 | case $srcdir in | |
81ecdfbb | 16615 | .) # We are building in place. |
bec39cab | 16616 | ac_srcdir=. |
81ecdfbb RW |
16617 | ac_top_srcdir=$ac_top_builddir_sub |
16618 | ac_abs_top_srcdir=$ac_pwd ;; | |
16619 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16620 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16621 | ac_top_srcdir=$srcdir |
16622 | ac_abs_top_srcdir=$srcdir ;; | |
16623 | *) # Relative name. | |
16624 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16625 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16626 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16627 | esac |
81ecdfbb | 16628 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 16629 | |
c906108c | 16630 | |
fdc59709 | 16631 | cd "$ac_dir" |
c906108c SS |
16632 | |
16633 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
16634 | if test -f "$ac_srcdir/configure.gnu"; then |
16635 | ac_sub_configure=$ac_srcdir/configure.gnu | |
16636 | elif test -f "$ac_srcdir/configure"; then | |
16637 | ac_sub_configure=$ac_srcdir/configure | |
16638 | elif test -f "$ac_srcdir/configure.in"; then | |
16639 | # This should be Cygnus configure. | |
16640 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 16641 | else |
81ecdfbb RW |
16642 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
16643 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
16644 | ac_sub_configure= |
16645 | fi | |
16646 | ||
16647 | # The recursion is here. | |
16648 | if test -n "$ac_sub_configure"; then | |
c906108c | 16649 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
16650 | case $cache_file in |
16651 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
16652 | *) # Relative name. |
16653 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 16654 | esac |
c906108c | 16655 | |
81ecdfbb RW |
16656 | { $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 |
16657 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 16658 | # The eval makes quoting arguments work. |
fdc59709 PB |
16659 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
16660 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 16661 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
16662 | fi |
16663 | ||
fdc59709 | 16664 | cd "$ac_popdir" |
c906108c SS |
16665 | done |
16666 | fi | |
81ecdfbb RW |
16667 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
16668 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
16669 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
16670 | fi | |
c906108c SS |
16671 | |
16672 | ||
16673 | exit 0 |