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 RW |
593 | LIBOBJS |
594 | GDB_NM_FILE | |
595 | frags | |
596 | target_subdir | |
597 | CONFIG_UNINSTALL | |
598 | CONFIG_INSTALL | |
599 | CONFIG_CLEAN | |
600 | CONFIG_ALL | |
601 | CONFIG_SRCS | |
602 | CONFIG_DEPS | |
603 | CONFIG_OBS | |
604 | PROFILE_CFLAGS | |
605 | ENABLE_CFLAGS | |
606 | SIM_OBS | |
607 | SIM | |
608 | XMKMF | |
609 | GDBTK_SRC_DIR | |
610 | GDBTK_CFLAGS | |
611 | GDBTKLIBS | |
612 | X_LIBS | |
613 | X_LDFLAGS | |
614 | X_CFLAGS | |
615 | TK_XINCLUDES | |
616 | TK_DEPS | |
617 | TK_LIBRARY | |
618 | TK_INCLUDE | |
619 | TK_STUB_LIB_SPEC | |
620 | TK_STUB_LIB_FLAG | |
621 | TK_STUB_LIB_FILE | |
622 | TK_LIB_SPEC | |
623 | TK_LIB_FLAG | |
624 | TK_LIB_FILE | |
625 | TK_SRC_DIR | |
626 | TK_BIN_DIR | |
627 | TK_VERSION | |
628 | TCL_DEPS | |
629 | TCL_LIBRARY | |
630 | TCL_INCLUDE | |
631 | TCL_STUB_LIB_SPEC | |
632 | TCL_STUB_LIB_FLAG | |
633 | TCL_STUB_LIB_FILE | |
634 | TCL_LIB_SPEC | |
635 | TCL_LIB_FLAG | |
636 | TCL_LIB_FILE | |
637 | TCL_SRC_DIR | |
638 | TCL_BIN_DIR | |
639 | TCL_PATCH_LEVEL | |
640 | TCL_VERSION | |
641 | WIN32LDAPP | |
642 | GUI_CFLAGS_X | |
643 | LIBGUI | |
608e2dbb TT |
644 | LTLIBLZMA |
645 | LIBLZMA | |
646 | HAVE_LIBLZMA | |
81ecdfbb RW |
647 | WIN32LIBS |
648 | SER_HARDWIRE | |
649 | WERROR_CFLAGS | |
650 | WARN_CFLAGS | |
651 | SYSTEM_GDBINIT | |
81ecdfbb RW |
652 | TARGET_SYSTEM_ROOT |
653 | CONFIG_LDFLAGS | |
f6528abd | 654 | RDYNAMIC |
81ecdfbb | 655 | ALLOCA |
ac534cba JB |
656 | PYTHON_LIBS |
657 | PYTHON_CPPFLAGS | |
81ecdfbb | 658 | PYTHON_CFLAGS |
ec685c5e | 659 | python_prog_path |
81ecdfbb RW |
660 | LTLIBEXPAT |
661 | LIBEXPAT | |
662 | HAVE_LIBEXPAT | |
b8e0a31c | 663 | JIT_READER_DIR |
f997c383 | 664 | TARGET_PTR |
39037522 | 665 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
666 | READLINE_CFLAGS |
667 | READLINE_DEPS | |
668 | READLINE | |
669 | MIG | |
670 | WINDRES | |
671 | DLLTOOL | |
c971b7fa | 672 | AR |
81ecdfbb RW |
673 | YFLAGS |
674 | YACC | |
c971b7fa | 675 | RANLIB |
81ecdfbb | 676 | LN_S |
c971b7fa PA |
677 | INSTALL_DATA |
678 | INSTALL_SCRIPT | |
679 | INSTALL_PROGRAM | |
680 | AWK | |
81ecdfbb RW |
681 | REPORT_BUGS_TEXI |
682 | REPORT_BUGS_TO | |
683 | PKGVERSION | |
684 | TARGET_OBS | |
685 | subdirs | |
686 | GDB_DATADIR | |
687 | DEBUGDIR | |
5048e516 JK |
688 | MAKEINFO_EXTRA_FLAGS |
689 | MAKEINFOFLAGS | |
690 | MAKEINFO | |
81ecdfbb RW |
691 | PACKAGE |
692 | GNULIB_STDINT_H | |
81ecdfbb RW |
693 | CATOBJEXT |
694 | GENCAT | |
695 | INSTOBJEXT | |
696 | DATADIRNAME | |
697 | CATALOGS | |
698 | POSUB | |
699 | GMSGFMT | |
700 | XGETTEXT | |
701 | INCINTL | |
702 | LIBINTL_DEP | |
703 | LIBINTL | |
704 | USE_NLS | |
705 | SET_MAKE | |
706 | GMAKE_FALSE | |
707 | GMAKE_TRUE | |
708 | MAKE | |
709 | CCDEPMODE | |
710 | DEPDIR | |
711 | am__leading_dot | |
712 | target_os | |
713 | target_vendor | |
714 | target_cpu | |
715 | target | |
716 | host_os | |
717 | host_vendor | |
718 | host_cpu | |
719 | host | |
720 | build_os | |
721 | build_vendor | |
722 | build_cpu | |
723 | build | |
c971b7fa PA |
724 | EGREP |
725 | GREP | |
726 | CPP | |
81ecdfbb RW |
727 | OBJEXT |
728 | EXEEXT | |
729 | ac_ct_CC | |
730 | CPPFLAGS | |
731 | LDFLAGS | |
732 | CFLAGS | |
733 | CC | |
734 | MAINT | |
735 | MAINTAINER_MODE_FALSE | |
736 | MAINTAINER_MODE_TRUE | |
737 | target_alias | |
738 | host_alias | |
739 | build_alias | |
740 | LIBS | |
741 | ECHO_T | |
742 | ECHO_N | |
743 | ECHO_C | |
744 | DEFS | |
745 | mandir | |
746 | localedir | |
747 | libdir | |
748 | psdir | |
749 | pdfdir | |
750 | dvidir | |
751 | htmldir | |
752 | infodir | |
753 | docdir | |
754 | oldincludedir | |
755 | includedir | |
756 | localstatedir | |
757 | sharedstatedir | |
758 | sysconfdir | |
759 | datadir | |
760 | datarootdir | |
761 | libexecdir | |
762 | sbindir | |
763 | bindir | |
764 | program_transform_name | |
765 | prefix | |
766 | exec_prefix | |
767 | PACKAGE_URL | |
768 | PACKAGE_BUGREPORT | |
769 | PACKAGE_STRING | |
770 | PACKAGE_VERSION | |
771 | PACKAGE_TARNAME | |
772 | PACKAGE_NAME | |
773 | PATH_SEPARATOR | |
774 | SHELL' | |
a4ce5b0d | 775 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
776 | ac_user_opts=' |
777 | enable_option_checking | |
778 | enable_maintainer_mode | |
da2f07f1 JK |
779 | enable_plugins |
780 | enable_largefile | |
81ecdfbb RW |
781 | with_separate_debug_dir |
782 | with_gdb_datadir | |
783 | with_relocated_sources | |
7349ff92 | 784 | with_auto_load_dir |
bccbefd2 | 785 | with_auto_load_safe_path |
81ecdfbb RW |
786 | enable_targets |
787 | enable_64_bit_bfd | |
788 | enable_gdbcli | |
789 | enable_gdbmi | |
790 | enable_tui | |
791 | enable_gdbtk | |
05e7c244 | 792 | with_libunwind_ia64 |
81ecdfbb RW |
793 | with_curses |
794 | enable_profiling | |
795 | with_pkgversion | |
796 | with_bugurl | |
b040ad30 | 797 | with_zlib |
81ecdfbb | 798 | with_libiconv_prefix |
478aac75 | 799 | with_iconv_bin |
81ecdfbb | 800 | with_system_readline |
b8e0a31c | 801 | with_jit_reader_dir |
81ecdfbb RW |
802 | with_expat |
803 | with_gnu_ld | |
804 | enable_rpath | |
805 | with_libexpat_prefix | |
806 | with_python | |
a8db4212 | 807 | enable_libmcheck |
81ecdfbb RW |
808 | with_included_regex |
809 | with_sysroot | |
810 | with_system_gdbinit | |
811 | enable_werror | |
812 | enable_build_warnings | |
813 | enable_gdb_build_warnings | |
608e2dbb TT |
814 | with_lzma |
815 | with_liblzma_prefix | |
81ecdfbb RW |
816 | with_tcl |
817 | with_tk | |
818 | with_x | |
819 | enable_sim | |
820 | enable_multi_ice | |
496c0e1b | 821 | enable_gdbserver |
81ecdfbb RW |
822 | ' |
823 | ac_precious_vars='build_alias | |
824 | host_alias | |
825 | target_alias | |
826 | CC | |
827 | CFLAGS | |
828 | LDFLAGS | |
829 | LIBS | |
830 | CPPFLAGS | |
831 | CPP | |
f06e05e0 JK |
832 | MAKEINFO |
833 | MAKEINFOFLAGS | |
81ecdfbb RW |
834 | YACC |
835 | YFLAGS | |
836 | XMKMF' | |
5ae98d25 | 837 | ac_subdirs_all='testsuite |
81ecdfbb RW |
838 | gdbtk |
839 | multi-ice | |
840 | gdbserver' | |
c906108c SS |
841 | |
842 | # Initialize some variables set by options. | |
bec39cab AC |
843 | ac_init_help= |
844 | ac_init_version=false | |
81ecdfbb RW |
845 | ac_unrecognized_opts= |
846 | ac_unrecognized_sep= | |
c906108c SS |
847 | # The variables have the same names as the options, with |
848 | # dashes changed to underlines. | |
bec39cab | 849 | cache_file=/dev/null |
c906108c | 850 | exec_prefix=NONE |
c906108c | 851 | no_create= |
c906108c SS |
852 | no_recursion= |
853 | prefix=NONE | |
854 | program_prefix=NONE | |
855 | program_suffix=NONE | |
856 | program_transform_name=s,x,x, | |
857 | silent= | |
858 | site= | |
859 | srcdir= | |
c906108c SS |
860 | verbose= |
861 | x_includes=NONE | |
862 | x_libraries=NONE | |
bec39cab AC |
863 | |
864 | # Installation directory options. | |
865 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
866 | # and all the variables that are supposed to be based on exec_prefix | |
867 | # by default will actually change. | |
868 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 869 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
870 | bindir='${exec_prefix}/bin' |
871 | sbindir='${exec_prefix}/sbin' | |
872 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
873 | datarootdir='${prefix}/share' |
874 | datadir='${datarootdir}' | |
c906108c SS |
875 | sysconfdir='${prefix}/etc' |
876 | sharedstatedir='${prefix}/com' | |
877 | localstatedir='${prefix}/var' | |
c906108c SS |
878 | includedir='${prefix}/include' |
879 | oldincludedir='/usr/include' | |
81ecdfbb RW |
880 | docdir='${datarootdir}/doc/${PACKAGE}' |
881 | infodir='${datarootdir}/info' | |
882 | htmldir='${docdir}' | |
883 | dvidir='${docdir}' | |
884 | pdfdir='${docdir}' | |
885 | psdir='${docdir}' | |
886 | libdir='${exec_prefix}/lib' | |
887 | localedir='${datarootdir}/locale' | |
888 | mandir='${datarootdir}/man' | |
c906108c | 889 | |
c906108c | 890 | ac_prev= |
81ecdfbb | 891 | ac_dashdash= |
c906108c SS |
892 | for ac_option |
893 | do | |
c906108c SS |
894 | # If the previous option needs an argument, assign it. |
895 | if test -n "$ac_prev"; then | |
81ecdfbb | 896 | eval $ac_prev=\$ac_option |
c906108c SS |
897 | ac_prev= |
898 | continue | |
899 | fi | |
900 | ||
81ecdfbb RW |
901 | case $ac_option in |
902 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
903 | *) ac_optarg=yes ;; | |
904 | esac | |
c906108c SS |
905 | |
906 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
907 | ||
81ecdfbb RW |
908 | case $ac_dashdash$ac_option in |
909 | --) | |
910 | ac_dashdash=yes ;; | |
c906108c SS |
911 | |
912 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
913 | ac_prev=bindir ;; | |
914 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 915 | bindir=$ac_optarg ;; |
c906108c SS |
916 | |
917 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 918 | ac_prev=build_alias ;; |
c906108c | 919 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 920 | build_alias=$ac_optarg ;; |
c906108c SS |
921 | |
922 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
923 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
924 | ac_prev=cache_file ;; | |
925 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
926 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
927 | cache_file=$ac_optarg ;; |
928 | ||
929 | --config-cache | -C) | |
930 | cache_file=config.cache ;; | |
c906108c | 931 | |
81ecdfbb | 932 | -datadir | --datadir | --datadi | --datad) |
c906108c | 933 | ac_prev=datadir ;; |
81ecdfbb | 934 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 935 | datadir=$ac_optarg ;; |
c906108c | 936 | |
81ecdfbb RW |
937 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
938 | | --dataroo | --dataro | --datar) | |
939 | ac_prev=datarootdir ;; | |
940 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
941 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
942 | datarootdir=$ac_optarg ;; | |
943 | ||
c906108c | 944 | -disable-* | --disable-*) |
81ecdfbb | 945 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 946 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
947 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
948 | as_fn_error "invalid feature name: $ac_useropt" | |
949 | ac_useropt_orig=$ac_useropt | |
950 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
951 | case $ac_user_opts in | |
952 | *" | |
953 | "enable_$ac_useropt" | |
954 | "*) ;; | |
955 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
956 | ac_unrecognized_sep=', ';; | |
957 | esac | |
958 | eval enable_$ac_useropt=no ;; | |
959 | ||
960 | -docdir | --docdir | --docdi | --doc | --do) | |
961 | ac_prev=docdir ;; | |
962 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
963 | docdir=$ac_optarg ;; | |
964 | ||
965 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
966 | ac_prev=dvidir ;; | |
967 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
968 | dvidir=$ac_optarg ;; | |
c906108c SS |
969 | |
970 | -enable-* | --enable-*) | |
81ecdfbb | 971 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 972 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
973 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
974 | as_fn_error "invalid feature name: $ac_useropt" | |
975 | ac_useropt_orig=$ac_useropt | |
976 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
977 | case $ac_user_opts in | |
978 | *" | |
979 | "enable_$ac_useropt" | |
980 | "*) ;; | |
981 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
982 | ac_unrecognized_sep=', ';; | |
b4e70030 | 983 | esac |
81ecdfbb | 984 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
985 | |
986 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
987 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
988 | | --exec | --exe | --ex) | |
989 | ac_prev=exec_prefix ;; | |
990 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
991 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
992 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 993 | exec_prefix=$ac_optarg ;; |
c906108c SS |
994 | |
995 | -gas | --gas | --ga | --g) | |
996 | # Obsolete; use --with-gas. | |
997 | with_gas=yes ;; | |
998 | ||
bec39cab AC |
999 | -help | --help | --hel | --he | -h) |
1000 | ac_init_help=long ;; | |
1001 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1002 | ac_init_help=recursive ;; | |
1003 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1004 | ac_init_help=short ;; | |
c906108c SS |
1005 | |
1006 | -host | --host | --hos | --ho) | |
bec39cab | 1007 | ac_prev=host_alias ;; |
c906108c | 1008 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1009 | host_alias=$ac_optarg ;; |
c906108c | 1010 | |
81ecdfbb RW |
1011 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1012 | ac_prev=htmldir ;; | |
1013 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1014 | | --ht=*) | |
1015 | htmldir=$ac_optarg ;; | |
1016 | ||
c906108c SS |
1017 | -includedir | --includedir | --includedi | --included | --include \ |
1018 | | --includ | --inclu | --incl | --inc) | |
1019 | ac_prev=includedir ;; | |
1020 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1021 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1022 | includedir=$ac_optarg ;; |
c906108c SS |
1023 | |
1024 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1025 | ac_prev=infodir ;; | |
1026 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1027 | infodir=$ac_optarg ;; |
c906108c SS |
1028 | |
1029 | -libdir | --libdir | --libdi | --libd) | |
1030 | ac_prev=libdir ;; | |
1031 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1032 | libdir=$ac_optarg ;; |
c906108c SS |
1033 | |
1034 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1035 | | --libexe | --libex | --libe) | |
1036 | ac_prev=libexecdir ;; | |
1037 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1038 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1039 | libexecdir=$ac_optarg ;; |
c906108c | 1040 | |
81ecdfbb RW |
1041 | -localedir | --localedir | --localedi | --localed | --locale) |
1042 | ac_prev=localedir ;; | |
1043 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1044 | localedir=$ac_optarg ;; | |
1045 | ||
c906108c | 1046 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1047 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1048 | ac_prev=localstatedir ;; |
1049 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1050 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1051 | localstatedir=$ac_optarg ;; |
c906108c SS |
1052 | |
1053 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1054 | ac_prev=mandir ;; | |
1055 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1056 | mandir=$ac_optarg ;; |
c906108c SS |
1057 | |
1058 | -nfp | --nfp | --nf) | |
1059 | # Obsolete; use --without-fp. | |
1060 | with_fp=no ;; | |
1061 | ||
1062 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1063 | | --no-cr | --no-c | -n) |
c906108c SS |
1064 | no_create=yes ;; |
1065 | ||
1066 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1067 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1068 | no_recursion=yes ;; | |
1069 | ||
1070 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1071 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1072 | | --oldin | --oldi | --old | --ol | --o) | |
1073 | ac_prev=oldincludedir ;; | |
1074 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1075 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1076 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1077 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1078 | |
1079 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1080 | ac_prev=prefix ;; | |
1081 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1082 | prefix=$ac_optarg ;; |
c906108c SS |
1083 | |
1084 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1085 | | --program-pre | --program-pr | --program-p) | |
1086 | ac_prev=program_prefix ;; | |
1087 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1088 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1089 | program_prefix=$ac_optarg ;; |
c906108c SS |
1090 | |
1091 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1092 | | --program-suf | --program-su | --program-s) | |
1093 | ac_prev=program_suffix ;; | |
1094 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1095 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1096 | program_suffix=$ac_optarg ;; |
c906108c SS |
1097 | |
1098 | -program-transform-name | --program-transform-name \ | |
1099 | | --program-transform-nam | --program-transform-na \ | |
1100 | | --program-transform-n | --program-transform- \ | |
1101 | | --program-transform | --program-transfor \ | |
1102 | | --program-transfo | --program-transf \ | |
1103 | | --program-trans | --program-tran \ | |
1104 | | --progr-tra | --program-tr | --program-t) | |
1105 | ac_prev=program_transform_name ;; | |
1106 | -program-transform-name=* | --program-transform-name=* \ | |
1107 | | --program-transform-nam=* | --program-transform-na=* \ | |
1108 | | --program-transform-n=* | --program-transform-=* \ | |
1109 | | --program-transform=* | --program-transfor=* \ | |
1110 | | --program-transfo=* | --program-transf=* \ | |
1111 | | --program-trans=* | --program-tran=* \ | |
1112 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1113 | program_transform_name=$ac_optarg ;; |
c906108c | 1114 | |
81ecdfbb RW |
1115 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1116 | ac_prev=pdfdir ;; | |
1117 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1118 | pdfdir=$ac_optarg ;; | |
1119 | ||
1120 | -psdir | --psdir | --psdi | --psd | --ps) | |
1121 | ac_prev=psdir ;; | |
1122 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1123 | psdir=$ac_optarg ;; | |
1124 | ||
c906108c SS |
1125 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1126 | | -silent | --silent | --silen | --sile | --sil) | |
1127 | silent=yes ;; | |
1128 | ||
1129 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1130 | ac_prev=sbindir ;; | |
1131 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1132 | | --sbi=* | --sb=*) | |
bec39cab | 1133 | sbindir=$ac_optarg ;; |
c906108c SS |
1134 | |
1135 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1136 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1137 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1138 | | --sha | --sh) | |
1139 | ac_prev=sharedstatedir ;; | |
1140 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1141 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1142 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1143 | | --sha=* | --sh=*) | |
bec39cab | 1144 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1145 | |
1146 | -site | --site | --sit) | |
1147 | ac_prev=site ;; | |
1148 | -site=* | --site=* | --sit=*) | |
bec39cab | 1149 | site=$ac_optarg ;; |
3ace7edb | 1150 | |
c906108c SS |
1151 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1152 | ac_prev=srcdir ;; | |
1153 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1154 | srcdir=$ac_optarg ;; |
c906108c SS |
1155 | |
1156 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1157 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1158 | ac_prev=sysconfdir ;; | |
1159 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1160 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1161 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1162 | |
1163 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1164 | ac_prev=target_alias ;; |
c906108c | 1165 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1166 | target_alias=$ac_optarg ;; |
c906108c SS |
1167 | |
1168 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1169 | verbose=yes ;; | |
1170 | ||
bec39cab AC |
1171 | -version | --version | --versio | --versi | --vers | -V) |
1172 | ac_init_version=: ;; | |
c906108c SS |
1173 | |
1174 | -with-* | --with-*) | |
81ecdfbb | 1175 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1176 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1177 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1178 | as_fn_error "invalid package name: $ac_useropt" | |
1179 | ac_useropt_orig=$ac_useropt | |
1180 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1181 | case $ac_user_opts in | |
1182 | *" | |
1183 | "with_$ac_useropt" | |
1184 | "*) ;; | |
1185 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1186 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1187 | esac |
81ecdfbb | 1188 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1189 | |
1190 | -without-* | --without-*) | |
81ecdfbb | 1191 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1192 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1193 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1194 | as_fn_error "invalid package name: $ac_useropt" | |
1195 | ac_useropt_orig=$ac_useropt | |
1196 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1197 | case $ac_user_opts in | |
1198 | *" | |
1199 | "with_$ac_useropt" | |
1200 | "*) ;; | |
1201 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1202 | ac_unrecognized_sep=', ';; | |
1203 | esac | |
1204 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1205 | |
1206 | --x) | |
1207 | # Obsolete; use --with-x. | |
1208 | with_x=yes ;; | |
1209 | ||
1210 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1211 | | --x-incl | --x-inc | --x-in | --x-i) | |
1212 | ac_prev=x_includes ;; | |
1213 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1214 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1215 | x_includes=$ac_optarg ;; |
c906108c SS |
1216 | |
1217 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1218 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1219 | ac_prev=x_libraries ;; | |
1220 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1221 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1222 | x_libraries=$ac_optarg ;; |
c906108c | 1223 | |
81ecdfbb RW |
1224 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1225 | Try \`$0 --help' for more information." | |
c906108c SS |
1226 | ;; |
1227 | ||
bec39cab AC |
1228 | *=*) |
1229 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1230 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1231 | case $ac_envvar in #( |
1232 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1233 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1234 | esac | |
1235 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1236 | export $ac_envvar ;; |
1237 | ||
c906108c | 1238 | *) |
bec39cab | 1239 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1240 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1241 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1242 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1243 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1244 | ;; |
1245 | ||
1246 | esac | |
1247 | done | |
1248 | ||
1249 | if test -n "$ac_prev"; then | |
bec39cab | 1250 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1251 | as_fn_error "missing argument to $ac_option" |
c906108c | 1252 | fi |
c906108c | 1253 | |
81ecdfbb RW |
1254 | if test -n "$ac_unrecognized_opts"; then |
1255 | case $enable_option_checking in | |
1256 | no) ;; | |
1257 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1258 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1259 | esac |
81ecdfbb | 1260 | fi |
b4e70030 | 1261 | |
81ecdfbb RW |
1262 | # Check all directory arguments for consistency. |
1263 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1264 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1265 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1266 | libdir localedir mandir | |
b4e70030 | 1267 | do |
81ecdfbb RW |
1268 | eval ac_val=\$$ac_var |
1269 | # Remove trailing slashes. | |
1270 | case $ac_val in | |
1271 | */ ) | |
1272 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1273 | eval $ac_var=\$ac_val;; | |
1274 | esac | |
1275 | # Be sure to have absolute directory names. | |
b4e70030 | 1276 | case $ac_val in |
81ecdfbb RW |
1277 | [\\/$]* | ?:[\\/]* ) continue;; |
1278 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1279 | esac |
81ecdfbb | 1280 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1281 | done |
1282 | ||
bec39cab AC |
1283 | # There might be people who depend on the old broken behavior: `$host' |
1284 | # used to hold the argument of --host etc. | |
1285 | # FIXME: To remove some day. | |
1286 | build=$build_alias | |
1287 | host=$host_alias | |
1288 | target=$target_alias | |
1289 | ||
1290 | # FIXME: To remove some day. | |
1291 | if test "x$host_alias" != x; then | |
1292 | if test "x$build_alias" = x; then | |
1293 | cross_compiling=maybe | |
81ecdfbb | 1294 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1295 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1296 | elif test "x$build_alias" != "x$host_alias"; then | |
1297 | cross_compiling=yes | |
1298 | fi | |
1299 | fi | |
c906108c | 1300 | |
bec39cab AC |
1301 | ac_tool_prefix= |
1302 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1303 | ||
1304 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1305 | |
c906108c | 1306 | |
81ecdfbb RW |
1307 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1308 | ac_ls_di=`ls -di .` && | |
1309 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1310 | as_fn_error "working directory cannot be determined" | |
1311 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1312 | as_fn_error "pwd does not report name of working directory" | |
1313 | ||
1314 | ||
c906108c SS |
1315 | # Find the source files, if location was not specified. |
1316 | if test -z "$srcdir"; then | |
1317 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1318 | # Try the directory containing this script, then the parent directory. |
1319 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1320 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1321 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1322 | X"$as_myself" : 'X\(//\)$' \| \ | |
1323 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1324 | $as_echo X"$as_myself" | | |
1325 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1326 | s//\1/ | |
1327 | q | |
1328 | } | |
1329 | /^X\(\/\/\)[^/].*/{ | |
1330 | s//\1/ | |
1331 | q | |
1332 | } | |
1333 | /^X\(\/\/\)$/{ | |
1334 | s//\1/ | |
1335 | q | |
1336 | } | |
1337 | /^X\(\/\).*/{ | |
1338 | s//\1/ | |
1339 | q | |
1340 | } | |
1341 | s/.*/./; q'` | |
c906108c | 1342 | srcdir=$ac_confdir |
81ecdfbb | 1343 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1344 | srcdir=.. |
1345 | fi | |
1346 | else | |
1347 | ac_srcdir_defaulted=no | |
1348 | fi | |
81ecdfbb RW |
1349 | if test ! -r "$srcdir/$ac_unique_file"; then |
1350 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1351 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1352 | fi | |
1353 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1354 | ac_abs_confdir=`( | |
1355 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1356 | pwd)` | |
1357 | # When building in place, set srcdir=. | |
1358 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1359 | srcdir=. | |
1360 | fi | |
1361 | # Remove unnecessary trailing slashes from srcdir. | |
1362 | # Double slashes in file names in object file debugging info | |
1363 | # mess up M-x gdb in Emacs. | |
1364 | case $srcdir in | |
1365 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1366 | esac | |
1367 | for ac_var in $ac_precious_vars; do | |
1368 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1369 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1370 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1371 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1372 | done | |
c906108c | 1373 | |
bec39cab AC |
1374 | # |
1375 | # Report the --help message. | |
1376 | # | |
1377 | if test "$ac_init_help" = "long"; then | |
1378 | # Omit some internal or obsolete options to make the list less imposing. | |
1379 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1380 | cat <<_ACEOF | |
1381 | \`configure' configures this package to adapt to many kinds of systems. | |
1382 | ||
1383 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1384 | ||
1385 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1386 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1387 | ||
1388 | Defaults for the options are specified in brackets. | |
1389 | ||
1390 | Configuration: | |
1391 | -h, --help display this help and exit | |
1392 | --help=short display options specific to this package | |
1393 | --help=recursive display the short help of all the included packages | |
1394 | -V, --version display version information and exit | |
1395 | -q, --quiet, --silent do not print \`checking...' messages | |
1396 | --cache-file=FILE cache test results in FILE [disabled] | |
1397 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1398 | -n, --no-create do not create output files | |
1399 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1400 | ||
bec39cab AC |
1401 | Installation directories: |
1402 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1403 | [$ac_default_prefix] |
bec39cab | 1404 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1405 | [PREFIX] |
bec39cab AC |
1406 | |
1407 | By default, \`make install' will install all the files in | |
1408 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1409 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1410 | for instance \`--prefix=\$HOME'. | |
1411 | ||
1412 | For better control, use the options below. | |
1413 | ||
1414 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1415 | --bindir=DIR user executables [EPREFIX/bin] |
1416 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1417 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1418 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1419 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1420 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1421 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1422 | --includedir=DIR C header files [PREFIX/include] | |
1423 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1424 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1425 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1426 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1427 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1428 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1429 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1430 | --htmldir=DIR html documentation [DOCDIR] | |
1431 | --dvidir=DIR dvi documentation [DOCDIR] | |
1432 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1433 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1434 | _ACEOF |
1435 | ||
1436 | cat <<\_ACEOF | |
1437 | ||
9009e1ae MR |
1438 | Program names: |
1439 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1440 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1441 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1442 | ||
bec39cab AC |
1443 | X features: |
1444 | --x-includes=DIR X include files are in DIR | |
1445 | --x-libraries=DIR X library files are in DIR | |
1446 | ||
1447 | System types: | |
1448 | --build=BUILD configure for building on BUILD [guessed] | |
1449 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1450 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1451 | _ACEOF | |
1452 | fi | |
1453 | ||
1454 | if test -n "$ac_init_help"; then | |
1455 | ||
1456 | cat <<\_ACEOF | |
1457 | ||
1458 | Optional Features: | |
81ecdfbb | 1459 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1460 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1461 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1462 | --enable-maintainer-mode enable make rules and dependencies not useful |
1463 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1464 | --enable-plugins Enable support for plugins (defaults no) |
1465 | --disable-largefile omit support for large files | |
a1220294 TT |
1466 | --enable-targets=TARGETS |
1467 | alternative target configurations | |
c0993dbe | 1468 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1469 | --disable-gdbcli disable command-line interface (CLI) |
1470 | --disable-gdbmi disable machine-interface (MI) | |
1471 | --enable-tui enable full-screen terminal user interface (TUI) | |
1472 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1473 | --enable-profiling enable profiling of GDB | |
3841debe | 1474 | --disable-rpath do not hardcode runtime library paths |
a8db4212 | 1475 | --enable-libmcheck Try building GDB with -lmcheck if available |
a1220294 | 1476 | --enable-werror treat compile warnings as errors |
32c1c914 | 1477 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1478 | --enable-gdb-build-warnings |
32c1c914 | 1479 | enable GDB specific build-time compiler warnings if |
a1220294 | 1480 | gcc is used |
32c1c914 | 1481 | --enable-sim link gdb with simulator |
bec39cab | 1482 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1483 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1484 | is auto) | |
bec39cab AC |
1485 | |
1486 | Optional Packages: | |
1487 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1488 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1489 | --with-separate-debug-dir=PATH |
32c1c914 | 1490 | look for global separate debug info in this path |
62e4f60c | 1491 | [LIBDIR/debug] |
b14b1491 TT |
1492 | --with-gdb-datadir=PATH look for global separate data files in this path |
1493 | [DATADIR/gdb] | |
29b0e8a2 | 1494 | --with-relocated-sources=PATH |
32c1c914 | 1495 | automatically relocate this path for source files |
7349ff92 | 1496 | --with-auto-load-dir=PATH |
aff139ff | 1497 | directories from which to load auto-loaded scripts |
1564a261 | 1498 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1499 | --with-auto-load-safe-path=PATH |
aff139ff | 1500 | directories safe to hold auto-loaded files |
7349ff92 | 1501 | [--with-auto-load-dir] |
bccbefd2 JK |
1502 | --without-auto-load-safe-path |
1503 | do not restrict auto-loaded files locations | |
05e7c244 | 1504 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1505 | --with-curses use the curses library instead of the termcap |
1506 | library | |
c16158bc JM |
1507 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1508 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1509 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1510 | --with-libiconv-prefix=DIR |
1511 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1512 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1513 | --with-system-readline use installed readline library |
b8e0a31c SD |
1514 | --with-jit-reader-dir=PATH |
1515 | directory to load the JIT readers from | |
5c39566f | 1516 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1517 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1518 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1519 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1520 | --with-python[=PYTHON] include python support |
1521 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1522 | --without-included-regex |
1523 | don't use included regex; this is the default on | |
1524 | systems with version 2 of the GNU C library (use | |
1525 | with caution on other system) | |
81ecdfbb | 1526 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1527 | --with-system-gdbinit=PATH |
32c1c914 | 1528 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1529 | --with-lzma support lzma compression (auto/yes/no) |
1530 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1531 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1532 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1533 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1534 | --with-x use the X Window System |
bec39cab AC |
1535 | |
1536 | Some influential environment variables: | |
1537 | CC C compiler command | |
1538 | CFLAGS C compiler flags | |
1539 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1540 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1541 | LIBS libraries to pass to the linker, e.g. -l<library> |
1542 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1543 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1544 | CPP C preprocessor |
f06e05e0 JK |
1545 | MAKEINFO Parent configure detects if it is of sufficient version. |
1546 | MAKEINFOFLAGS | |
1547 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1548 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1549 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1550 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1551 | This script will default YFLAGS to the empty string to avoid a | |
1552 | default value of `-d' given by some make applications. | |
1553 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1554 | |
1555 | Use these variables to override the choices made by `configure' or to help | |
1556 | it to find libraries and programs with nonstandard names/locations. | |
1557 | ||
81ecdfbb | 1558 | Report bugs to the package provider. |
bec39cab | 1559 | _ACEOF |
81ecdfbb | 1560 | ac_status=$? |
bec39cab AC |
1561 | fi |
1562 | ||
1563 | if test "$ac_init_help" = "recursive"; then | |
1564 | # If there are subdirs, report their specific --help. | |
bec39cab | 1565 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1566 | test -d "$ac_dir" || |
1567 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1568 | continue | |
bec39cab AC |
1569 | ac_builddir=. |
1570 | ||
81ecdfbb RW |
1571 | case "$ac_dir" in |
1572 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1573 | *) | |
1574 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1575 | # A ".." for each directory in $ac_dir_suffix. | |
1576 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1577 | case $ac_top_builddir_sub in | |
1578 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1579 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1580 | esac ;; | |
1581 | esac | |
1582 | ac_abs_top_builddir=$ac_pwd | |
1583 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1584 | # for backward compatibility: | |
1585 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1586 | |
1587 | case $srcdir in | |
81ecdfbb | 1588 | .) # We are building in place. |
bec39cab | 1589 | ac_srcdir=. |
81ecdfbb RW |
1590 | ac_top_srcdir=$ac_top_builddir_sub |
1591 | ac_abs_top_srcdir=$ac_pwd ;; | |
1592 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1593 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1594 | ac_top_srcdir=$srcdir |
1595 | ac_abs_top_srcdir=$srcdir ;; | |
1596 | *) # Relative name. | |
1597 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1598 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1599 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1600 | esac |
81ecdfbb | 1601 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1602 | |
81ecdfbb RW |
1603 | cd "$ac_dir" || { ac_status=$?; continue; } |
1604 | # Check for guested configure. | |
1605 | if test -f "$ac_srcdir/configure.gnu"; then | |
1606 | echo && | |
1607 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1608 | elif test -f "$ac_srcdir/configure"; then | |
1609 | echo && | |
1610 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1611 | else |
81ecdfbb RW |
1612 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1613 | fi || ac_status=$? | |
1614 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1615 | done |
1616 | fi | |
1617 | ||
81ecdfbb | 1618 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1619 | if $ac_init_version; then |
1620 | cat <<\_ACEOF | |
81ecdfbb RW |
1621 | configure |
1622 | generated by GNU Autoconf 2.64 | |
bec39cab | 1623 | |
81ecdfbb | 1624 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1625 | This configure script is free software; the Free Software Foundation |
1626 | gives unlimited permission to copy, distribute and modify it. | |
1627 | _ACEOF | |
81ecdfbb | 1628 | exit |
bec39cab | 1629 | fi |
bec39cab | 1630 | |
81ecdfbb RW |
1631 | ## ------------------------ ## |
1632 | ## Autoconf initialization. ## | |
1633 | ## ------------------------ ## | |
bec39cab | 1634 | |
81ecdfbb RW |
1635 | # ac_fn_c_try_compile LINENO |
1636 | # -------------------------- | |
1637 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1638 | ac_fn_c_try_compile () | |
1639 | { | |
1640 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1641 | rm -f conftest.$ac_objext | |
1642 | if { { ac_try="$ac_compile" | |
1643 | case "(($ac_try" in | |
1644 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1645 | *) ac_try_echo=$ac_try;; | |
1646 | esac | |
1647 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1648 | $as_echo "$ac_try_echo"; } >&5 | |
1649 | (eval "$ac_compile") 2>conftest.err | |
1650 | ac_status=$? | |
1651 | if test -s conftest.err; then | |
1652 | grep -v '^ *+' conftest.err >conftest.er1 | |
1653 | cat conftest.er1 >&5 | |
1654 | mv -f conftest.er1 conftest.err | |
1655 | fi | |
1656 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1657 | test $ac_status = 0; } && { | |
1658 | test -z "$ac_c_werror_flag" || | |
1659 | test ! -s conftest.err | |
1660 | } && test -s conftest.$ac_objext; then : | |
1661 | ac_retval=0 | |
1662 | else | |
1663 | $as_echo "$as_me: failed program was:" >&5 | |
1664 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1665 | |
81ecdfbb RW |
1666 | ac_retval=1 |
1667 | fi | |
1668 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1669 | return $ac_retval | |
1670 | ||
1671 | } # ac_fn_c_try_compile | |
1672 | ||
1673 | # ac_fn_c_try_cpp LINENO | |
1674 | # ---------------------- | |
1675 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1676 | ac_fn_c_try_cpp () | |
bec39cab | 1677 | { |
81ecdfbb RW |
1678 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1679 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1680 | case "(($ac_try" in | |
1681 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1682 | *) ac_try_echo=$ac_try;; | |
1683 | esac | |
1684 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1685 | $as_echo "$ac_try_echo"; } >&5 | |
1686 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1687 | ac_status=$? | |
1688 | if test -s conftest.err; then | |
1689 | grep -v '^ *+' conftest.err >conftest.er1 | |
1690 | cat conftest.er1 >&5 | |
1691 | mv -f conftest.er1 conftest.err | |
1692 | fi | |
1693 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1694 | test $ac_status = 0; } >/dev/null && { | |
1695 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1696 | test ! -s conftest.err | |
1697 | }; then : | |
1698 | ac_retval=0 | |
1699 | else | |
1700 | $as_echo "$as_me: failed program was:" >&5 | |
1701 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1702 | |
81ecdfbb RW |
1703 | ac_retval=1 |
1704 | fi | |
1705 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1706 | return $ac_retval | |
bec39cab | 1707 | |
81ecdfbb | 1708 | } # ac_fn_c_try_cpp |
bec39cab | 1709 | |
81ecdfbb RW |
1710 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1711 | # ------------------------------------------------------- | |
1712 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1713 | # the include files in INCLUDES and setting the cache variable VAR | |
1714 | # accordingly. | |
1715 | ac_fn_c_check_header_mongrel () | |
1716 | { | |
1717 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1718 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1720 | $as_echo_n "checking for $2... " >&6; } | |
1721 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1722 | $as_echo_n "(cached) " >&6 | |
1723 | fi | |
1724 | eval ac_res=\$$3 | |
1725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1726 | $as_echo "$ac_res" >&6; } | |
1727 | else | |
1728 | # Is the header compilable? | |
1729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1730 | $as_echo_n "checking $2 usability... " >&6; } | |
1731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1732 | /* end confdefs.h. */ | |
1733 | $4 | |
1734 | #include <$2> | |
1735 | _ACEOF | |
1736 | if ac_fn_c_try_compile "$LINENO"; then : | |
1737 | ac_header_compiler=yes | |
1738 | else | |
1739 | ac_header_compiler=no | |
1740 | fi | |
1741 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1743 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1744 | |
81ecdfbb RW |
1745 | # Is the header present? |
1746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1747 | $as_echo_n "checking $2 presence... " >&6; } | |
1748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1749 | /* end confdefs.h. */ | |
1750 | #include <$2> | |
1751 | _ACEOF | |
1752 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1753 | ac_header_preproc=yes | |
1754 | else | |
1755 | ac_header_preproc=no | |
1756 | fi | |
1757 | rm -f conftest.err conftest.$ac_ext | |
1758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1759 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1760 | |
81ecdfbb RW |
1761 | # So? What about this header? |
1762 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1763 | yes:no: ) | |
1764 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1765 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1766 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1767 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1768 | ;; | |
1769 | no:yes:* ) | |
1770 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1771 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1772 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1773 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1774 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1775 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1776 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1777 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1778 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1779 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1780 | ;; | |
1781 | esac | |
1782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1783 | $as_echo_n "checking for $2... " >&6; } | |
1784 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1785 | $as_echo_n "(cached) " >&6 | |
1786 | else | |
1787 | eval "$3=\$ac_header_compiler" | |
1788 | fi | |
1789 | eval ac_res=\$$3 | |
1790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1791 | $as_echo "$ac_res" >&6; } | |
1792 | fi | |
1793 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1794 | |
81ecdfbb | 1795 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1796 | |
81ecdfbb RW |
1797 | # ac_fn_c_try_run LINENO |
1798 | # ---------------------- | |
1799 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1800 | # that executables *can* be run. | |
1801 | ac_fn_c_try_run () | |
1802 | { | |
1803 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1804 | if { { ac_try="$ac_link" | |
1805 | case "(($ac_try" in | |
1806 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1807 | *) ac_try_echo=$ac_try;; | |
1808 | esac | |
1809 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1810 | $as_echo "$ac_try_echo"; } >&5 | |
1811 | (eval "$ac_link") 2>&5 | |
1812 | ac_status=$? | |
1813 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1814 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1815 | { { case "(($ac_try" in | |
1816 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1817 | *) ac_try_echo=$ac_try;; | |
1818 | esac | |
1819 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1820 | $as_echo "$ac_try_echo"; } >&5 | |
1821 | (eval "$ac_try") 2>&5 | |
1822 | ac_status=$? | |
1823 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1824 | test $ac_status = 0; }; }; then : | |
1825 | ac_retval=0 | |
1826 | else | |
1827 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1828 | $as_echo "$as_me: failed program was:" >&5 | |
1829 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1830 | |
81ecdfbb RW |
1831 | ac_retval=$ac_status |
1832 | fi | |
1833 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1834 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1835 | return $ac_retval | |
bec39cab | 1836 | |
81ecdfbb | 1837 | } # ac_fn_c_try_run |
bec39cab | 1838 | |
81ecdfbb RW |
1839 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1840 | # ------------------------------------------------------- | |
1841 | # Tests whether HEADER exists and can be compiled using the include files in | |
1842 | # INCLUDES, setting the cache variable VAR accordingly. | |
1843 | ac_fn_c_check_header_compile () | |
1844 | { | |
1845 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1847 | $as_echo_n "checking for $2... " >&6; } | |
1848 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1849 | $as_echo_n "(cached) " >&6 | |
1850 | else | |
1851 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1852 | /* end confdefs.h. */ | |
1853 | $4 | |
1854 | #include <$2> | |
bec39cab | 1855 | _ACEOF |
81ecdfbb RW |
1856 | if ac_fn_c_try_compile "$LINENO"; then : |
1857 | eval "$3=yes" | |
1858 | else | |
1859 | eval "$3=no" | |
1860 | fi | |
1861 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1862 | fi | |
1863 | eval ac_res=\$$3 | |
1864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1865 | $as_echo "$ac_res" >&6; } | |
1866 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1867 | |
81ecdfbb | 1868 | } # ac_fn_c_check_header_compile |
bec39cab | 1869 | |
81ecdfbb RW |
1870 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1871 | # -------------------------------------------- | |
1872 | # Tries to find the compile-time value of EXPR in a program that includes | |
1873 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1874 | # computed | |
1875 | ac_fn_c_compute_int () | |
1876 | { | |
1877 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1878 | if test "$cross_compiling" = yes; then | |
1879 | # Depending upon the size, compute the lo and hi bounds. | |
1880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1881 | /* end confdefs.h. */ | |
1882 | $4 | |
1883 | int | |
1884 | main () | |
1885 | { | |
1886 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1887 | test_array [0] = 0 | |
bec39cab | 1888 | |
81ecdfbb RW |
1889 | ; |
1890 | return 0; | |
1891 | } | |
1892 | _ACEOF | |
1893 | if ac_fn_c_try_compile "$LINENO"; then : | |
1894 | ac_lo=0 ac_mid=0 | |
1895 | while :; do | |
1896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1897 | /* end confdefs.h. */ | |
1898 | $4 | |
1899 | int | |
1900 | main () | |
1901 | { | |
1902 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1903 | test_array [0] = 0 | |
bec39cab | 1904 | |
81ecdfbb RW |
1905 | ; |
1906 | return 0; | |
1907 | } | |
1908 | _ACEOF | |
1909 | if ac_fn_c_try_compile "$LINENO"; then : | |
1910 | ac_hi=$ac_mid; break | |
1911 | else | |
1912 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1913 | if test $ac_lo -le $ac_mid; then | |
1914 | ac_lo= ac_hi= | |
1915 | break | |
1916 | fi | |
1917 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 1918 | fi |
81ecdfbb RW |
1919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1920 | done | |
c906108c | 1921 | else |
81ecdfbb RW |
1922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1923 | /* end confdefs.h. */ | |
1924 | $4 | |
1925 | int | |
1926 | main () | |
1927 | { | |
1928 | static int test_array [1 - 2 * !(($2) < 0)]; | |
1929 | test_array [0] = 0 | |
bec39cab | 1930 | |
81ecdfbb RW |
1931 | ; |
1932 | return 0; | |
1933 | } | |
1934 | _ACEOF | |
1935 | if ac_fn_c_try_compile "$LINENO"; then : | |
1936 | ac_hi=-1 ac_mid=-1 | |
1937 | while :; do | |
1938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1939 | /* end confdefs.h. */ | |
1940 | $4 | |
1941 | int | |
1942 | main () | |
1943 | { | |
1944 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
1945 | test_array [0] = 0 | |
bec39cab | 1946 | |
81ecdfbb RW |
1947 | ; |
1948 | return 0; | |
1949 | } | |
1950 | _ACEOF | |
1951 | if ac_fn_c_try_compile "$LINENO"; then : | |
1952 | ac_lo=$ac_mid; break | |
1953 | else | |
1954 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1955 | if test $ac_mid -le $ac_hi; then | |
1956 | ac_lo= ac_hi= | |
1957 | break | |
1958 | fi | |
1959 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1960 | fi | |
1961 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1962 | done | |
1963 | else | |
1964 | ac_lo= ac_hi= | |
1965 | fi | |
1966 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1967 | fi | |
1968 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1969 | # Binary search between lo and hi bounds. | |
1970 | while test "x$ac_lo" != "x$ac_hi"; do | |
1971 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
1972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1973 | /* end confdefs.h. */ | |
1974 | $4 | |
1975 | int | |
1976 | main () | |
1977 | { | |
1978 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1979 | test_array [0] = 0 | |
bec39cab | 1980 | |
81ecdfbb RW |
1981 | ; |
1982 | return 0; | |
1983 | } | |
1984 | _ACEOF | |
1985 | if ac_fn_c_try_compile "$LINENO"; then : | |
1986 | ac_hi=$ac_mid | |
1987 | else | |
1988 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
1989 | fi | |
1990 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1991 | done | |
1992 | case $ac_lo in #(( | |
1993 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
1994 | '') ac_retval=1 ;; | |
1995 | esac | |
1996 | else | |
1997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1998 | /* end confdefs.h. */ | |
1999 | $4 | |
2000 | static long int longval () { return $2; } | |
2001 | static unsigned long int ulongval () { return $2; } | |
2002 | #include <stdio.h> | |
2003 | #include <stdlib.h> | |
2004 | int | |
2005 | main () | |
2006 | { | |
bec39cab | 2007 | |
81ecdfbb RW |
2008 | FILE *f = fopen ("conftest.val", "w"); |
2009 | if (! f) | |
2010 | return 1; | |
2011 | if (($2) < 0) | |
2012 | { | |
2013 | long int i = longval (); | |
2014 | if (i != ($2)) | |
2015 | return 1; | |
2016 | fprintf (f, "%ld", i); | |
2017 | } | |
2018 | else | |
2019 | { | |
2020 | unsigned long int i = ulongval (); | |
2021 | if (i != ($2)) | |
2022 | return 1; | |
2023 | fprintf (f, "%lu", i); | |
2024 | } | |
2025 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2026 | on some platforms. */ | |
2027 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2028 | |
81ecdfbb RW |
2029 | ; |
2030 | return 0; | |
2031 | } | |
2032 | _ACEOF | |
2033 | if ac_fn_c_try_run "$LINENO"; then : | |
2034 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2035 | else | |
2036 | ac_retval=1 | |
2037 | fi | |
2038 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2039 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2040 | rm -f conftest.val | |
bec39cab | 2041 | |
81ecdfbb RW |
2042 | fi |
2043 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2044 | return $ac_retval | |
bec39cab | 2045 | |
81ecdfbb | 2046 | } # ac_fn_c_compute_int |
bec39cab | 2047 | |
c971b7fa PA |
2048 | # ac_fn_c_try_link LINENO |
2049 | # ----------------------- | |
2050 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2051 | ac_fn_c_try_link () | |
2052 | { | |
2053 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2054 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2055 | if { { ac_try="$ac_link" | |
2056 | case "(($ac_try" in | |
2057 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2058 | *) ac_try_echo=$ac_try;; | |
2059 | esac | |
2060 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2061 | $as_echo "$ac_try_echo"; } >&5 | |
2062 | (eval "$ac_link") 2>conftest.err | |
2063 | ac_status=$? | |
2064 | if test -s conftest.err; then | |
2065 | grep -v '^ *+' conftest.err >conftest.er1 | |
2066 | cat conftest.er1 >&5 | |
2067 | mv -f conftest.er1 conftest.err | |
2068 | fi | |
2069 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2070 | test $ac_status = 0; } && { | |
2071 | test -z "$ac_c_werror_flag" || | |
2072 | test ! -s conftest.err | |
2073 | } && test -s conftest$ac_exeext && { | |
2074 | test "$cross_compiling" = yes || | |
2075 | $as_test_x conftest$ac_exeext | |
2076 | }; then : | |
2077 | ac_retval=0 | |
2078 | else | |
2079 | $as_echo "$as_me: failed program was:" >&5 | |
2080 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2081 | ||
2082 | ac_retval=1 | |
2083 | fi | |
2084 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2085 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2086 | # interfere with the next link command; also delete a directory that is | |
2087 | # left behind by Apple's compiler. We do this before executing the actions. | |
2088 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2089 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2090 | return $ac_retval | |
2091 | ||
2092 | } # ac_fn_c_try_link | |
2093 | ||
55a8c076 YQ |
2094 | # ac_fn_c_check_func LINENO FUNC VAR |
2095 | # ---------------------------------- | |
2096 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2097 | ac_fn_c_check_func () | |
81ecdfbb RW |
2098 | { |
2099 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2101 | $as_echo_n "checking for $2... " >&6; } | |
2102 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2103 | $as_echo_n "(cached) " >&6 | |
2104 | else | |
81ecdfbb RW |
2105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2106 | /* end confdefs.h. */ | |
55a8c076 YQ |
2107 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2108 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2109 | #define $2 innocuous_$2 | |
2110 | ||
2111 | /* System header to define __stub macros and hopefully few prototypes, | |
2112 | which can conflict with char $2 (); below. | |
2113 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2114 | <limits.h> exists even on freestanding compilers. */ | |
2115 | ||
2116 | #ifdef __STDC__ | |
2117 | # include <limits.h> | |
2118 | #else | |
2119 | # include <assert.h> | |
2120 | #endif | |
2121 | ||
2122 | #undef $2 | |
2123 | ||
2124 | /* Override any GCC internal prototype to avoid an error. | |
2125 | Use char because int might match the return type of a GCC | |
2126 | builtin and then its argument prototype would still apply. */ | |
2127 | #ifdef __cplusplus | |
2128 | extern "C" | |
2129 | #endif | |
2130 | char $2 (); | |
2131 | /* The GNU C library defines this for functions which it implements | |
2132 | to always fail with ENOSYS. Some functions are actually named | |
2133 | something starting with __ and the normal name is an alias. */ | |
2134 | #if defined __stub_$2 || defined __stub___$2 | |
2135 | choke me | |
2136 | #endif | |
2137 | ||
2138 | int | |
2139 | main () | |
2140 | { | |
2141 | return $2 (); | |
2142 | ; | |
2143 | return 0; | |
2144 | } | |
2145 | _ACEOF | |
2146 | if ac_fn_c_try_link "$LINENO"; then : | |
2147 | eval "$3=yes" | |
2148 | else | |
2149 | eval "$3=no" | |
2150 | fi | |
2151 | rm -f core conftest.err conftest.$ac_objext \ | |
2152 | conftest$ac_exeext conftest.$ac_ext | |
2153 | fi | |
2154 | eval ac_res=\$$3 | |
2155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2156 | $as_echo "$ac_res" >&6; } | |
2157 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2158 | ||
2159 | } # ac_fn_c_check_func | |
2160 | ||
770d76d7 PA |
2161 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2162 | # ------------------------------------ | |
2163 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2164 | ac_fn_c_check_decl () | |
2165 | { | |
2166 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2167 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2168 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2169 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2170 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2171 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2172 | $as_echo_n "(cached) " >&6 | |
2173 | else | |
2174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2175 | /* end confdefs.h. */ | |
2176 | $4 | |
2177 | int | |
2178 | main () | |
2179 | { | |
2180 | #ifndef $as_decl_name | |
2181 | #ifdef __cplusplus | |
2182 | (void) $as_decl_use; | |
2183 | #else | |
2184 | (void) $as_decl_name; | |
2185 | #endif | |
2186 | #endif | |
2187 | ||
2188 | ; | |
2189 | return 0; | |
2190 | } | |
2191 | _ACEOF | |
2192 | if ac_fn_c_try_compile "$LINENO"; then : | |
2193 | eval "$3=yes" | |
2194 | else | |
2195 | eval "$3=no" | |
2196 | fi | |
2197 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2198 | fi | |
2199 | eval ac_res=\$$3 | |
2200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2201 | $as_echo "$ac_res" >&6; } | |
2202 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2203 | ||
2204 | } # ac_fn_c_check_decl | |
2205 | ||
55a8c076 YQ |
2206 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2207 | # ---------------------------------------------------- | |
2208 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2209 | # INCLUDES, setting cache variable VAR accordingly. | |
2210 | ac_fn_c_check_member () | |
2211 | { | |
2212 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2214 | $as_echo_n "checking for $2.$3... " >&6; } | |
2215 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2216 | $as_echo_n "(cached) " >&6 | |
2217 | else | |
2218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2219 | /* end confdefs.h. */ | |
2220 | $5 | |
2221 | int | |
2222 | main () | |
2223 | { | |
2224 | static $2 ac_aggr; | |
2225 | if (ac_aggr.$3) | |
2226 | return 0; | |
2227 | ; | |
2228 | return 0; | |
2229 | } | |
2230 | _ACEOF | |
2231 | if ac_fn_c_try_compile "$LINENO"; then : | |
2232 | eval "$4=yes" | |
2233 | else | |
2234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2235 | /* end confdefs.h. */ | |
2236 | $5 | |
2237 | int | |
2238 | main () | |
2239 | { | |
2240 | static $2 ac_aggr; | |
2241 | if (sizeof ac_aggr.$3) | |
2242 | return 0; | |
2243 | ; | |
2244 | return 0; | |
2245 | } | |
2246 | _ACEOF | |
2247 | if ac_fn_c_try_compile "$LINENO"; then : | |
2248 | eval "$4=yes" | |
2249 | else | |
2250 | eval "$4=no" | |
2251 | fi | |
2252 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2253 | fi | |
2254 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2255 | fi | |
2256 | eval ac_res=\$$4 | |
2257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2258 | $as_echo "$ac_res" >&6; } | |
2259 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2260 | ||
2261 | } # ac_fn_c_check_member | |
2262 | ||
2263 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2264 | # ------------------------------------------- | |
2265 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2266 | # variable VAR accordingly. | |
2267 | ac_fn_c_check_type () | |
2268 | { | |
2269 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2271 | $as_echo_n "checking for $2... " >&6; } | |
2272 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2273 | $as_echo_n "(cached) " >&6 | |
2274 | else | |
2275 | eval "$3=no" | |
2276 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2277 | /* end confdefs.h. */ | |
2278 | $4 | |
2279 | int | |
2280 | main () | |
2281 | { | |
2282 | if (sizeof ($2)) | |
2283 | return 0; | |
2284 | ; | |
2285 | return 0; | |
2286 | } | |
2287 | _ACEOF | |
2288 | if ac_fn_c_try_compile "$LINENO"; then : | |
2289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2290 | /* end confdefs.h. */ | |
2291 | $4 | |
2292 | int | |
2293 | main () | |
2294 | { | |
2295 | if (sizeof (($2))) | |
2296 | return 0; | |
2297 | ; | |
2298 | return 0; | |
2299 | } | |
2300 | _ACEOF | |
2301 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2302 | |
81ecdfbb RW |
2303 | else |
2304 | eval "$3=yes" | |
2305 | fi | |
2306 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2307 | fi | |
2308 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2309 | fi | |
2310 | eval ac_res=\$$3 | |
2311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2312 | $as_echo "$ac_res" >&6; } | |
2313 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2314 | |
81ecdfbb RW |
2315 | } # ac_fn_c_check_type |
2316 | cat >config.log <<_ACEOF | |
2317 | This file contains any messages produced by compilers while | |
2318 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2319 | |
81ecdfbb RW |
2320 | It was created by $as_me, which was |
2321 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2322 | |
81ecdfbb | 2323 | $ $0 $@ |
413ccac7 | 2324 | |
81ecdfbb RW |
2325 | _ACEOF |
2326 | exec 5>>config.log | |
2327 | { | |
2328 | cat <<_ASUNAME | |
2329 | ## --------- ## | |
2330 | ## Platform. ## | |
2331 | ## --------- ## | |
413ccac7 | 2332 | |
81ecdfbb RW |
2333 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2334 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2335 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2336 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2337 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2338 | |
81ecdfbb RW |
2339 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2340 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2341 | |
81ecdfbb RW |
2342 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2343 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2344 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2345 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2346 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2347 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2348 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2349 | |
81ecdfbb | 2350 | _ASUNAME |
bec39cab | 2351 | |
bec39cab AC |
2352 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2353 | for as_dir in $PATH | |
2354 | do | |
2355 | IFS=$as_save_IFS | |
2356 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2357 | $as_echo "PATH: $as_dir" |
2358 | done | |
2359 | IFS=$as_save_IFS | |
bec39cab | 2360 | |
81ecdfbb | 2361 | } >&5 |
bec39cab | 2362 | |
81ecdfbb | 2363 | cat >&5 <<_ACEOF |
bec39cab | 2364 | |
bec39cab | 2365 | |
81ecdfbb RW |
2366 | ## ----------- ## |
2367 | ## Core tests. ## | |
2368 | ## ----------- ## | |
2369 | ||
2370 | _ACEOF | |
2371 | ||
2372 | ||
2373 | # Keep a trace of the command line. | |
2374 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2375 | # Strip out --silent because we don't want to record it for future runs. | |
2376 | # Also quote any args containing shell meta-characters. | |
2377 | # Make two passes to allow for proper duplicate-argument suppression. | |
2378 | ac_configure_args= | |
2379 | ac_configure_args0= | |
2380 | ac_configure_args1= | |
2381 | ac_must_keep_next=false | |
2382 | for ac_pass in 1 2 | |
2383 | do | |
2384 | for ac_arg | |
2385 | do | |
2386 | case $ac_arg in | |
2387 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2388 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2389 | | -silent | --silent | --silen | --sile | --sil) | |
2390 | continue ;; | |
2391 | *\'*) | |
2392 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2393 | esac | |
2394 | case $ac_pass in | |
2395 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2396 | 2) | |
2397 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2398 | if test $ac_must_keep_next = true; then | |
2399 | ac_must_keep_next=false # Got value, back to normal. | |
2400 | else | |
2401 | case $ac_arg in | |
2402 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2403 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2404 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2405 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2406 | case "$ac_configure_args0 " in | |
2407 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2408 | esac | |
2409 | ;; | |
2410 | -* ) ac_must_keep_next=true ;; | |
2411 | esac | |
2412 | fi | |
2413 | as_fn_append ac_configure_args " '$ac_arg'" | |
2414 | ;; | |
2415 | esac | |
2416 | done | |
2417 | done | |
2418 | { ac_configure_args0=; unset ac_configure_args0;} | |
2419 | { ac_configure_args1=; unset ac_configure_args1;} | |
2420 | ||
2421 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2422 | # config.log. We remove comments because anyway the quotes in there | |
2423 | # would cause problems or look ugly. | |
2424 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2425 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2426 | trap 'exit_status=$? | |
2427 | # Save into config.log some information that might help in debugging. | |
2428 | { | |
2429 | echo | |
2430 | ||
2431 | cat <<\_ASBOX | |
2432 | ## ---------------- ## | |
2433 | ## Cache variables. ## | |
2434 | ## ---------------- ## | |
2435 | _ASBOX | |
2436 | echo | |
2437 | # The following way of writing the cache mishandles newlines in values, | |
2438 | ( | |
2439 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2440 | eval ac_val=\$$ac_var | |
2441 | case $ac_val in #( | |
2442 | *${as_nl}*) | |
2443 | case $ac_var in #( | |
2444 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2445 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2446 | esac | |
2447 | case $ac_var in #( | |
2448 | _ | IFS | as_nl) ;; #( | |
2449 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2450 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2451 | esac ;; | |
2452 | esac | |
2453 | done | |
2454 | (set) 2>&1 | | |
2455 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2456 | *${as_nl}ac_space=\ *) | |
2457 | sed -n \ | |
2458 | "s/'\''/'\''\\\\'\'''\''/g; | |
2459 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2460 | ;; #( | |
2461 | *) | |
2462 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2463 | ;; | |
2464 | esac | | |
2465 | sort | |
2466 | ) | |
2467 | echo | |
2468 | ||
2469 | cat <<\_ASBOX | |
2470 | ## ----------------- ## | |
2471 | ## Output variables. ## | |
2472 | ## ----------------- ## | |
2473 | _ASBOX | |
2474 | echo | |
2475 | for ac_var in $ac_subst_vars | |
2476 | do | |
2477 | eval ac_val=\$$ac_var | |
2478 | case $ac_val in | |
2479 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2480 | esac | |
2481 | $as_echo "$ac_var='\''$ac_val'\''" | |
2482 | done | sort | |
2483 | echo | |
2484 | ||
2485 | if test -n "$ac_subst_files"; then | |
2486 | cat <<\_ASBOX | |
2487 | ## ------------------- ## | |
2488 | ## File substitutions. ## | |
2489 | ## ------------------- ## | |
2490 | _ASBOX | |
2491 | echo | |
2492 | for ac_var in $ac_subst_files | |
2493 | do | |
2494 | eval ac_val=\$$ac_var | |
2495 | case $ac_val in | |
2496 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2497 | esac | |
2498 | $as_echo "$ac_var='\''$ac_val'\''" | |
2499 | done | sort | |
2500 | echo | |
2501 | fi | |
2502 | ||
2503 | if test -s confdefs.h; then | |
2504 | cat <<\_ASBOX | |
2505 | ## ----------- ## | |
2506 | ## confdefs.h. ## | |
2507 | ## ----------- ## | |
2508 | _ASBOX | |
2509 | echo | |
2510 | cat confdefs.h | |
2511 | echo | |
2512 | fi | |
2513 | test "$ac_signal" != 0 && | |
2514 | $as_echo "$as_me: caught signal $ac_signal" | |
2515 | $as_echo "$as_me: exit $exit_status" | |
2516 | } >&5 | |
2517 | rm -f core *.core core.conftest.* && | |
2518 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2519 | exit $exit_status | |
2520 | ' 0 | |
2521 | for ac_signal in 1 2 13 15; do | |
2522 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2523 | done | |
2524 | ac_signal=0 | |
2525 | ||
2526 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2527 | rm -f -r conftest* confdefs.h | |
2528 | ||
2529 | $as_echo "/* confdefs.h */" > confdefs.h | |
2530 | ||
2531 | # Predefined preprocessor variables. | |
2532 | ||
2533 | cat >>confdefs.h <<_ACEOF | |
2534 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2535 | _ACEOF | |
2536 | ||
2537 | cat >>confdefs.h <<_ACEOF | |
2538 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2539 | _ACEOF | |
2540 | ||
2541 | cat >>confdefs.h <<_ACEOF | |
2542 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2543 | _ACEOF | |
2544 | ||
2545 | cat >>confdefs.h <<_ACEOF | |
2546 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2547 | _ACEOF | |
2548 | ||
2549 | cat >>confdefs.h <<_ACEOF | |
2550 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2551 | _ACEOF | |
2552 | ||
2553 | cat >>confdefs.h <<_ACEOF | |
2554 | #define PACKAGE_URL "$PACKAGE_URL" | |
2555 | _ACEOF | |
2556 | ||
2557 | ||
2558 | # Let the site file select an alternate cache file if it wants to. | |
2559 | # Prefer an explicitly selected file to automatically selected ones. | |
2560 | ac_site_file1=NONE | |
2561 | ac_site_file2=NONE | |
2562 | if test -n "$CONFIG_SITE"; then | |
2563 | ac_site_file1=$CONFIG_SITE | |
2564 | elif test "x$prefix" != xNONE; then | |
2565 | ac_site_file1=$prefix/share/config.site | |
2566 | ac_site_file2=$prefix/etc/config.site | |
2567 | else | |
2568 | ac_site_file1=$ac_default_prefix/share/config.site | |
2569 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2570 | fi | |
2571 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2572 | do | |
2573 | test "x$ac_site_file" = xNONE && continue | |
2574 | if test -r "$ac_site_file"; then | |
2575 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2576 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2577 | sed 's/^/| /' "$ac_site_file" >&5 | |
2578 | . "$ac_site_file" | |
2579 | fi | |
2580 | done | |
2581 | ||
2582 | if test -r "$cache_file"; then | |
2583 | # Some versions of bash will fail to source /dev/null (special | |
2584 | # files actually), so we avoid doing that. | |
2585 | if test -f "$cache_file"; then | |
2586 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2587 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2588 | case $cache_file in | |
2589 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2590 | *) . "./$cache_file";; | |
2591 | esac | |
2592 | fi | |
2593 | else | |
2594 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2595 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2596 | >$cache_file | |
bec39cab AC |
2597 | fi |
2598 | ||
81ecdfbb RW |
2599 | # Check that the precious variables saved in the cache have kept the same |
2600 | # value. | |
2601 | ac_cache_corrupted=false | |
2602 | for ac_var in $ac_precious_vars; do | |
2603 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2604 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2605 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2606 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2607 | case $ac_old_set,$ac_new_set in | |
2608 | set,) | |
2609 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2610 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2611 | ac_cache_corrupted=: ;; | |
2612 | ,set) | |
2613 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2614 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2615 | ac_cache_corrupted=: ;; | |
2616 | ,);; | |
2617 | *) | |
2618 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2619 | # differences in whitespace do not lead to failure. | |
2620 | ac_old_val_w=`echo x $ac_old_val` | |
2621 | ac_new_val_w=`echo x $ac_new_val` | |
2622 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2623 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2624 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2625 | ac_cache_corrupted=: | |
2626 | else | |
2627 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2628 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2629 | eval $ac_var=\$ac_old_val | |
2630 | fi | |
2631 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2632 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2633 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2634 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2635 | fi;; | |
2636 | esac | |
2637 | # Pass precious variables to config.status. | |
2638 | if test "$ac_new_set" = set; then | |
2639 | case $ac_new_val in | |
2640 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2641 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2642 | esac | |
2643 | case " $ac_configure_args " in | |
2644 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2645 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2646 | esac | |
2647 | fi | |
2648 | done | |
2649 | if $ac_cache_corrupted; then | |
2650 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2651 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2652 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2653 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2654 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2655 | fi | |
2656 | ## -------------------- ## | |
2657 | ## Main body of script. ## | |
2658 | ## -------------------- ## | |
2659 | ||
2660 | ac_ext=c | |
2661 | ac_cpp='$CPP $CPPFLAGS' | |
2662 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2663 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2664 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2665 | ||
2666 | ||
2667 | ||
2668 | ||
2669 | ||
2670 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2671 | ||
2672 | ||
2673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2674 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2675 | # Check whether --enable-maintainer-mode was given. | |
2676 | if test "${enable_maintainer_mode+set}" = set; then : | |
2677 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2678 | else | |
2679 | USE_MAINTAINER_MODE=no | |
2680 | fi | |
2681 | ||
2682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2683 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2684 | if test $USE_MAINTAINER_MODE = yes; then | |
2685 | MAINTAINER_MODE_TRUE= | |
2686 | MAINTAINER_MODE_FALSE='#' | |
2687 | else | |
2688 | MAINTAINER_MODE_TRUE='#' | |
2689 | MAINTAINER_MODE_FALSE= | |
2690 | fi | |
2691 | ||
2692 | MAINT=$MAINTAINER_MODE_TRUE | |
2693 | ||
2694 | ||
2695 | ||
f5f1cdb6 JK |
2696 | # Provide more thorough testing by -lmcheck. |
2697 | # Set it to 'true' for development snapshots, 'false' for releases or | |
2698 | # pre-releases. | |
2699 | development=true | |
2700 | ||
81ecdfbb RW |
2701 | ac_ext=c |
2702 | ac_cpp='$CPP $CPPFLAGS' | |
2703 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2704 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2705 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2706 | if test -n "$ac_tool_prefix"; then | |
2707 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2708 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2710 | $as_echo_n "checking for $ac_word... " >&6; } | |
2711 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2712 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2713 | else |
2714 | if test -n "$CC"; then | |
2715 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2716 | else | |
bec39cab AC |
2717 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2718 | for as_dir in $PATH | |
2719 | do | |
2720 | IFS=$as_save_IFS | |
2721 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2722 | for ac_exec_ext in '' $ac_executable_extensions; do |
2723 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2724 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2725 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2726 | break 2 |
2727 | fi | |
2728 | done | |
81ecdfbb RW |
2729 | done |
2730 | IFS=$as_save_IFS | |
bec39cab | 2731 | |
c906108c SS |
2732 | fi |
2733 | fi | |
bec39cab | 2734 | CC=$ac_cv_prog_CC |
c906108c | 2735 | if test -n "$CC"; then |
81ecdfbb RW |
2736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2737 | $as_echo "$CC" >&6; } | |
c906108c | 2738 | else |
81ecdfbb RW |
2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2740 | $as_echo "no" >&6; } | |
c906108c SS |
2741 | fi |
2742 | ||
81ecdfbb | 2743 | |
b4e70030 JB |
2744 | fi |
2745 | if test -z "$ac_cv_prog_CC"; then | |
2746 | ac_ct_CC=$CC | |
81ecdfbb RW |
2747 | # Extract the first word of "gcc", so it can be a program name with args. |
2748 | set dummy gcc; ac_word=$2 | |
2749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2750 | $as_echo_n "checking for $ac_word... " >&6; } | |
2751 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2752 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2753 | else |
2754 | if test -n "$ac_ct_CC"; then | |
2755 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2756 | else | |
2757 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2758 | for as_dir in $PATH | |
2759 | do | |
2760 | IFS=$as_save_IFS | |
2761 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2762 | for ac_exec_ext in '' $ac_executable_extensions; do |
2763 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2764 | ac_cv_prog_ac_ct_CC="gcc" | |
2765 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2766 | break 2 |
4e8d927d | 2767 | fi |
b4e70030 | 2768 | done |
81ecdfbb RW |
2769 | done |
2770 | IFS=$as_save_IFS | |
b4e70030 JB |
2771 | |
2772 | fi | |
2773 | fi | |
2774 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2775 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2777 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2778 | else |
81ecdfbb RW |
2779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2780 | $as_echo "no" >&6; } | |
b4e70030 JB |
2781 | fi |
2782 | ||
81ecdfbb RW |
2783 | if test "x$ac_ct_CC" = x; then |
2784 | CC="" | |
2785 | else | |
2786 | case $cross_compiling:$ac_tool_warned in | |
2787 | yes:) | |
2788 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2789 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2790 | ac_tool_warned=yes ;; | |
2791 | esac | |
2792 | CC=$ac_ct_CC | |
2793 | fi | |
b4e70030 JB |
2794 | else |
2795 | CC="$ac_cv_prog_CC" | |
2796 | fi | |
2797 | ||
c906108c | 2798 | if test -z "$CC"; then |
81ecdfbb RW |
2799 | if test -n "$ac_tool_prefix"; then |
2800 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2801 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2803 | $as_echo_n "checking for $ac_word... " >&6; } | |
2804 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2805 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2806 | else |
2807 | if test -n "$CC"; then | |
2808 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2809 | else | |
bec39cab AC |
2810 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2811 | for as_dir in $PATH | |
2812 | do | |
2813 | IFS=$as_save_IFS | |
2814 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2815 | for ac_exec_ext in '' $ac_executable_extensions; do |
2816 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2817 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2818 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2819 | break 2 |
2820 | fi | |
2821 | done | |
81ecdfbb RW |
2822 | done |
2823 | IFS=$as_save_IFS | |
2824 | ||
2825 | fi | |
2826 | fi | |
2827 | CC=$ac_cv_prog_CC | |
2828 | if test -n "$CC"; then | |
2829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2830 | $as_echo "$CC" >&6; } | |
2831 | else | |
2832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2833 | $as_echo "no" >&6; } | |
2834 | fi | |
2835 | ||
2836 | ||
2837 | fi | |
2838 | fi | |
2839 | if test -z "$CC"; then | |
2840 | # Extract the first word of "cc", so it can be a program name with args. | |
2841 | set dummy cc; ac_word=$2 | |
2842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2843 | $as_echo_n "checking for $ac_word... " >&6; } | |
2844 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2845 | $as_echo_n "(cached) " >&6 | |
2846 | else | |
2847 | if test -n "$CC"; then | |
2848 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2849 | else | |
2850 | ac_prog_rejected=no | |
2851 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2852 | for as_dir in $PATH | |
2853 | do | |
2854 | IFS=$as_save_IFS | |
2855 | test -z "$as_dir" && as_dir=. | |
2856 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2857 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2858 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2859 | ac_prog_rejected=yes | |
2860 | continue | |
2861 | fi | |
2862 | ac_cv_prog_CC="cc" | |
2863 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2864 | break 2 | |
2865 | fi | |
2866 | done | |
2867 | done | |
2868 | IFS=$as_save_IFS | |
bec39cab | 2869 | |
c906108c SS |
2870 | if test $ac_prog_rejected = yes; then |
2871 | # We found a bogon in the path, so make sure we never use it. | |
2872 | set dummy $ac_cv_prog_CC | |
2873 | shift | |
bec39cab | 2874 | if test $# != 0; then |
c906108c SS |
2875 | # We chose a different compiler from the bogus one. |
2876 | # However, it has the same basename, so the bogon will be chosen | |
2877 | # first if we set CC to just the basename; use the full file name. | |
2878 | shift | |
bec39cab | 2879 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2880 | fi |
2881 | fi | |
2882 | fi | |
2883 | fi | |
bec39cab | 2884 | CC=$ac_cv_prog_CC |
c906108c | 2885 | if test -n "$CC"; then |
81ecdfbb RW |
2886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2887 | $as_echo "$CC" >&6; } | |
c906108c | 2888 | else |
81ecdfbb RW |
2889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2890 | $as_echo "no" >&6; } | |
c906108c SS |
2891 | fi |
2892 | ||
81ecdfbb | 2893 | |
bec39cab AC |
2894 | fi |
2895 | if test -z "$CC"; then | |
2896 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2897 | for ac_prog in cl.exe |
bec39cab AC |
2898 | do |
2899 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2900 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2902 | $as_echo_n "checking for $ac_word... " >&6; } | |
2903 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2904 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2905 | else |
2906 | if test -n "$CC"; then | |
2907 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2908 | else | |
bec39cab AC |
2909 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2910 | for as_dir in $PATH | |
2911 | do | |
2912 | IFS=$as_save_IFS | |
2913 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2914 | for ac_exec_ext in '' $ac_executable_extensions; do |
2915 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2916 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2917 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2918 | break 2 |
2919 | fi | |
2920 | done | |
81ecdfbb RW |
2921 | done |
2922 | IFS=$as_save_IFS | |
bec39cab | 2923 | |
c906108c SS |
2924 | fi |
2925 | fi | |
bec39cab | 2926 | CC=$ac_cv_prog_CC |
c906108c | 2927 | if test -n "$CC"; then |
81ecdfbb RW |
2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2929 | $as_echo "$CC" >&6; } | |
c906108c | 2930 | else |
81ecdfbb RW |
2931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2932 | $as_echo "no" >&6; } | |
c906108c | 2933 | fi |
bec39cab | 2934 | |
81ecdfbb | 2935 | |
bec39cab AC |
2936 | test -n "$CC" && break |
2937 | done | |
2938 | fi | |
2939 | if test -z "$CC"; then | |
2940 | ac_ct_CC=$CC | |
81ecdfbb | 2941 | for ac_prog in cl.exe |
bec39cab AC |
2942 | do |
2943 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2944 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2946 | $as_echo_n "checking for $ac_word... " >&6; } | |
2947 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2948 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
2949 | else |
2950 | if test -n "$ac_ct_CC"; then | |
2951 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2952 | else | |
2953 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2954 | for as_dir in $PATH | |
2955 | do | |
2956 | IFS=$as_save_IFS | |
2957 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2958 | for ac_exec_ext in '' $ac_executable_extensions; do |
2959 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2960 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2961 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2962 | break 2 |
c906108c | 2963 | fi |
bec39cab | 2964 | done |
81ecdfbb RW |
2965 | done |
2966 | IFS=$as_save_IFS | |
bec39cab AC |
2967 | |
2968 | fi | |
2969 | fi | |
2970 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2971 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2973 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2974 | else |
81ecdfbb RW |
2975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2976 | $as_echo "no" >&6; } | |
c906108c SS |
2977 | fi |
2978 | ||
81ecdfbb | 2979 | |
bec39cab AC |
2980 | test -n "$ac_ct_CC" && break |
2981 | done | |
c906108c | 2982 | |
81ecdfbb RW |
2983 | if test "x$ac_ct_CC" = x; then |
2984 | CC="" | |
2985 | else | |
2986 | case $cross_compiling:$ac_tool_warned in | |
2987 | yes:) | |
2988 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2989 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2990 | ac_tool_warned=yes ;; | |
2991 | esac | |
2992 | CC=$ac_ct_CC | |
2993 | fi | |
bec39cab AC |
2994 | fi |
2995 | ||
2996 | fi | |
2997 | ||
2998 | ||
81ecdfbb RW |
2999 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3000 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3001 | as_fn_error "no acceptable C compiler found in \$PATH | |
3002 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3003 | |
3004 | # Provide some information about the compiler. | |
81ecdfbb RW |
3005 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3006 | set X $ac_compile | |
3007 | ac_compiler=$2 | |
3008 | for ac_option in --version -v -V -qversion; do | |
3009 | { { ac_try="$ac_compiler $ac_option >&5" | |
3010 | case "(($ac_try" in | |
3011 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3012 | *) ac_try_echo=$ac_try;; | |
3013 | esac | |
3014 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3015 | $as_echo "$ac_try_echo"; } >&5 | |
3016 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3017 | ac_status=$? |
81ecdfbb RW |
3018 | if test -s conftest.err; then |
3019 | sed '10a\ | |
3020 | ... rest of stderr output deleted ... | |
3021 | 10q' conftest.err >conftest.er1 | |
3022 | cat conftest.er1 >&5 | |
3023 | rm -f conftest.er1 conftest.err | |
3024 | fi | |
3025 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3026 | test $ac_status = 0; } | |
3027 | done | |
bec39cab | 3028 | |
81ecdfbb | 3029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3030 | /* end confdefs.h. */ |
3031 | ||
3032 | int | |
3033 | main () | |
3034 | { | |
3035 | ||
3036 | ; | |
3037 | return 0; | |
3038 | } | |
3039 | _ACEOF | |
3040 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3041 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3042 | # Try to create an executable without -o first, disregard a.out. |
3043 | # It will help us diagnose broken compilers, and finding out an intuition | |
3044 | # of exeext. | |
81ecdfbb RW |
3045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3046 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3047 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3048 | ||
3049 | # The possible output files: | |
3050 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3051 | ||
3052 | ac_rmfiles= | |
3053 | for ac_file in $ac_files | |
3054 | do | |
3055 | case $ac_file in | |
3056 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3057 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3058 | esac | |
3059 | done | |
3060 | rm -f $ac_rmfiles | |
3061 | ||
3062 | if { { ac_try="$ac_link_default" | |
3063 | case "(($ac_try" in | |
3064 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3065 | *) ac_try_echo=$ac_try;; | |
3066 | esac | |
3067 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3068 | $as_echo "$ac_try_echo"; } >&5 | |
3069 | (eval "$ac_link_default") 2>&5 | |
3070 | ac_status=$? | |
3071 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3072 | test $ac_status = 0; }; then : | |
3073 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3074 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3075 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3076 | # so that the user can short-circuit this test for compilers unknown to | |
3077 | # Autoconf. | |
3078 | for ac_file in $ac_files '' | |
bec39cab AC |
3079 | do |
3080 | test -f "$ac_file" || continue | |
3081 | case $ac_file in | |
81ecdfbb | 3082 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3083 | ;; |
3084 | [ab].out ) | |
3085 | # We found the default executable, but exeext='' is most | |
3086 | # certainly right. | |
3087 | break;; | |
3088 | *.* ) | |
81ecdfbb RW |
3089 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3090 | then :; else | |
3091 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3092 | fi | |
3093 | # We set ac_cv_exeext here because the later test for it is not | |
3094 | # safe: cross compilers may not add the suffix if given an `-o' | |
3095 | # argument, so we may need to know it at that point already. | |
3096 | # Even if this section looks crufty: it has the advantage of | |
3097 | # actually working. | |
b4e70030 JB |
3098 | break;; |
3099 | * ) | |
3100 | break;; | |
bec39cab AC |
3101 | esac |
3102 | done | |
81ecdfbb RW |
3103 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3104 | ||
bec39cab | 3105 | else |
81ecdfbb RW |
3106 | ac_file='' |
3107 | fi | |
3108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3109 | $as_echo "$ac_file" >&6; } | |
3110 | if test -z "$ac_file"; then : | |
3111 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3112 | sed 's/^/| /' conftest.$ac_ext >&5 |
3113 | ||
81ecdfbb RW |
3114 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3115 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3116 | { as_fn_set_status 77 | |
3117 | as_fn_error "C compiler cannot create executables | |
3118 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3119 | fi |
b4e70030 | 3120 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3121 | |
81ecdfbb | 3122 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3123 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3125 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3126 | # If not cross compiling, check that we can run a simple program. |
3127 | if test "$cross_compiling" != yes; then | |
3128 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3129 | { { case "(($ac_try" in |
3130 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3131 | *) ac_try_echo=$ac_try;; | |
3132 | esac | |
3133 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3134 | $as_echo "$ac_try_echo"; } >&5 | |
3135 | (eval "$ac_try") 2>&5 | |
bec39cab | 3136 | ac_status=$? |
81ecdfbb RW |
3137 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3138 | test $ac_status = 0; }; }; then | |
bec39cab | 3139 | cross_compiling=no |
c906108c | 3140 | else |
bec39cab AC |
3141 | if test "$cross_compiling" = maybe; then |
3142 | cross_compiling=yes | |
3143 | else | |
81ecdfbb RW |
3144 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3145 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3146 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3147 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3148 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3149 | fi |
c906108c | 3150 | fi |
bec39cab | 3151 | fi |
81ecdfbb RW |
3152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3153 | $as_echo "yes" >&6; } | |
bec39cab | 3154 | |
81ecdfbb | 3155 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3156 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3157 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3158 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3160 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3162 | $as_echo "$cross_compiling" >&6; } | |
3163 | ||
3164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3165 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3166 | if { { ac_try="$ac_link" | |
3167 | case "(($ac_try" in | |
3168 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3169 | *) ac_try_echo=$ac_try;; | |
3170 | esac | |
3171 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3172 | $as_echo "$ac_try_echo"; } >&5 | |
3173 | (eval "$ac_link") 2>&5 | |
bec39cab | 3174 | ac_status=$? |
81ecdfbb RW |
3175 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3176 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3177 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3178 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3179 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3180 | # `rm'. | |
3181 | for ac_file in conftest.exe conftest conftest.*; do | |
3182 | test -f "$ac_file" || continue | |
3183 | case $ac_file in | |
81ecdfbb | 3184 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3185 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3186 | break;; |
3187 | * ) break;; | |
3188 | esac | |
3189 | done | |
c906108c | 3190 | else |
81ecdfbb RW |
3191 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3192 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3193 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3194 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3195 | fi |
b4e70030 | 3196 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3198 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3199 | |
b4e70030 | 3200 | rm -f conftest.$ac_ext |
bec39cab AC |
3201 | EXEEXT=$ac_cv_exeext |
3202 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3204 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3205 | if test "${ac_cv_objext+set}" = set; then : | |
3206 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3207 | else |
81ecdfbb | 3208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3209 | /* end confdefs.h. */ |
3210 | ||
3211 | int | |
3212 | main () | |
3213 | { | |
3214 | ||
3215 | ; | |
3216 | return 0; | |
3217 | } | |
3218 | _ACEOF | |
3219 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3220 | if { { ac_try="$ac_compile" |
3221 | case "(($ac_try" in | |
3222 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3223 | *) ac_try_echo=$ac_try;; | |
3224 | esac | |
3225 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3226 | $as_echo "$ac_try_echo"; } >&5 | |
3227 | (eval "$ac_compile") 2>&5 | |
3228 | ac_status=$? | |
3229 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3230 | test $ac_status = 0; }; then : | |
3231 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3232 | test -f "$ac_file" || continue; | |
bec39cab | 3233 | case $ac_file in |
81ecdfbb | 3234 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3235 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3236 | break;; | |
3237 | esac | |
3238 | done | |
c906108c | 3239 | else |
81ecdfbb | 3240 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3241 | sed 's/^/| /' conftest.$ac_ext >&5 |
3242 | ||
81ecdfbb RW |
3243 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3244 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3245 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3246 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3247 | fi |
b4e70030 | 3248 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3249 | fi |
81ecdfbb RW |
3250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3251 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3252 | OBJEXT=$ac_cv_objext |
3253 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3255 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3256 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3257 | $as_echo_n "(cached) " >&6 | |
c906108c | 3258 | else |
81ecdfbb | 3259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3260 | /* end confdefs.h. */ |
3261 | ||
3262 | int | |
3263 | main () | |
3264 | { | |
3265 | #ifndef __GNUC__ | |
3266 | choke me | |
3267 | #endif | |
3268 | ||
3269 | ; | |
3270 | return 0; | |
3271 | } | |
3272 | _ACEOF | |
81ecdfbb | 3273 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3274 | ac_compiler_gnu=yes |
3275 | else | |
81ecdfbb | 3276 | ac_compiler_gnu=no |
bec39cab | 3277 | fi |
81ecdfbb | 3278 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3279 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3280 | ||
3281 | fi | |
81ecdfbb RW |
3282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3283 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3284 | if test $ac_compiler_gnu = yes; then | |
3285 | GCC=yes | |
3286 | else | |
3287 | GCC= | |
3288 | fi | |
bec39cab AC |
3289 | ac_test_CFLAGS=${CFLAGS+set} |
3290 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3292 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3293 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3294 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3295 | else |
81ecdfbb RW |
3296 | ac_save_c_werror_flag=$ac_c_werror_flag |
3297 | ac_c_werror_flag=yes | |
3298 | ac_cv_prog_cc_g=no | |
3299 | CFLAGS="-g" | |
3300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3301 | /* end confdefs.h. */ |
3302 | ||
3303 | int | |
3304 | main () | |
3305 | { | |
3306 | ||
3307 | ; | |
3308 | return 0; | |
3309 | } | |
3310 | _ACEOF | |
81ecdfbb | 3311 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3312 | ac_cv_prog_cc_g=yes |
3313 | else | |
81ecdfbb RW |
3314 | CFLAGS="" |
3315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3316 | /* end confdefs.h. */ | |
3317 | ||
3318 | int | |
3319 | main () | |
3320 | { | |
3321 | ||
3322 | ; | |
3323 | return 0; | |
3324 | } | |
3325 | _ACEOF | |
3326 | if ac_fn_c_try_compile "$LINENO"; then : | |
3327 | ||
3328 | else | |
3329 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3330 | CFLAGS="-g" | |
3331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3332 | /* end confdefs.h. */ | |
3333 | ||
3334 | int | |
3335 | main () | |
3336 | { | |
c906108c | 3337 | |
81ecdfbb RW |
3338 | ; |
3339 | return 0; | |
3340 | } | |
3341 | _ACEOF | |
3342 | if ac_fn_c_try_compile "$LINENO"; then : | |
3343 | ac_cv_prog_cc_g=yes | |
3344 | fi | |
3345 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3346 | fi | |
3347 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3348 | fi |
81ecdfbb RW |
3349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3350 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3351 | fi |
81ecdfbb RW |
3352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3353 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3354 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3355 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3356 | elif test $ac_cv_prog_cc_g = yes; then |
3357 | if test "$GCC" = yes; then | |
3358 | CFLAGS="-g -O2" | |
3359 | else | |
3360 | CFLAGS="-g" | |
3361 | fi | |
3362 | else | |
3363 | if test "$GCC" = yes; then | |
3364 | CFLAGS="-O2" | |
3365 | else | |
3366 | CFLAGS= | |
3367 | fi | |
3368 | fi | |
81ecdfbb RW |
3369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3370 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3371 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3372 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3373 | else |
81ecdfbb | 3374 | ac_cv_prog_cc_c89=no |
bec39cab | 3375 | ac_save_CC=$CC |
81ecdfbb | 3376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3377 | /* end confdefs.h. */ |
c906108c SS |
3378 | #include <stdarg.h> |
3379 | #include <stdio.h> | |
3380 | #include <sys/types.h> | |
3381 | #include <sys/stat.h> | |
3382 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3383 | struct buf { int x; }; | |
3384 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3385 | static char *e (p, i) | |
3386 | char **p; | |
3387 | int i; | |
3388 | { | |
3389 | return p[i]; | |
3390 | } | |
3391 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3392 | { | |
3393 | char *s; | |
3394 | va_list v; | |
3395 | va_start (v,p); | |
3396 | s = g (p, va_arg (v,int)); | |
3397 | va_end (v); | |
3398 | return s; | |
3399 | } | |
bec39cab AC |
3400 | |
3401 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3402 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3403 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3404 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3405 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3406 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3407 | that's true only with -std. */ |
bec39cab AC |
3408 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3409 | ||
81ecdfbb RW |
3410 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3411 | inside strings and character constants. */ | |
3412 | #define FOO(x) 'x' | |
3413 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3414 | ||
c906108c SS |
3415 | int test (int i, double x); |
3416 | struct s1 {int (*f) (int a);}; | |
3417 | struct s2 {int (*f) (double a);}; | |
3418 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3419 | int argc; | |
3420 | char **argv; | |
bec39cab AC |
3421 | int |
3422 | main () | |
3423 | { | |
c906108c | 3424 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3425 | ; |
3426 | return 0; | |
3427 | } | |
3428 | _ACEOF | |
81ecdfbb RW |
3429 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3430 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3431 | do |
3432 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3433 | if ac_fn_c_try_compile "$LINENO"; then : |
3434 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3435 | fi |
81ecdfbb RW |
3436 | rm -f core conftest.err conftest.$ac_objext |
3437 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3438 | done |
81ecdfbb | 3439 | rm -f conftest.$ac_ext |
bec39cab | 3440 | CC=$ac_save_CC |
c906108c SS |
3441 | |
3442 | fi | |
81ecdfbb RW |
3443 | # AC_CACHE_VAL |
3444 | case "x$ac_cv_prog_cc_c89" in | |
3445 | x) | |
3446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3447 | $as_echo "none needed" >&6; } ;; | |
3448 | xno) | |
3449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3450 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3451 | *) |
81ecdfbb RW |
3452 | CC="$CC $ac_cv_prog_cc_c89" |
3453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3454 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3455 | esac |
81ecdfbb | 3456 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3457 | |
b4e70030 JB |
3458 | fi |
3459 | ||
bec39cab AC |
3460 | ac_ext=c |
3461 | ac_cpp='$CPP $CPPFLAGS' | |
3462 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3463 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3464 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3465 | |
60ca704f | 3466 | |
bec39cab AC |
3467 | ac_ext=c |
3468 | ac_cpp='$CPP $CPPFLAGS' | |
3469 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3470 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3471 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3473 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3474 | # On Suns, sometimes $CPP names a directory. |
3475 | if test -n "$CPP" && test -d "$CPP"; then | |
3476 | CPP= | |
8bb2c122 | 3477 | fi |
bec39cab | 3478 | if test -z "$CPP"; then |
81ecdfbb RW |
3479 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3480 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3481 | else |
3482 | # Double quotes because CPP needs to be expanded | |
3483 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3484 | do | |
3485 | ac_preproc_ok=false | |
3486 | for ac_c_preproc_warn_flag in '' yes | |
3487 | do | |
3488 | # Use a header file that comes with gcc, so configuring glibc | |
3489 | # with a fresh cross-compiler works. | |
3490 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3491 | # <limits.h> exists even on freestanding compilers. | |
3492 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3493 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3494 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3495 | /* end confdefs.h. */ |
3496 | #ifdef __STDC__ | |
3497 | # include <limits.h> | |
3498 | #else | |
3499 | # include <assert.h> | |
3500 | #endif | |
3501 | Syntax error | |
3502 | _ACEOF | |
81ecdfbb | 3503 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3504 | |
81ecdfbb | 3505 | else |
bec39cab AC |
3506 | # Broken: fails on valid input. |
3507 | continue | |
3508 | fi | |
3509 | rm -f conftest.err conftest.$ac_ext | |
3510 | ||
81ecdfbb | 3511 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3512 | # can be detected and how. |
81ecdfbb | 3513 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3514 | /* end confdefs.h. */ |
3515 | #include <ac_nonexistent.h> | |
3516 | _ACEOF | |
81ecdfbb | 3517 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3518 | # Broken: success on invalid input. |
3519 | continue | |
8bb2c122 | 3520 | else |
bec39cab AC |
3521 | # Passes both tests. |
3522 | ac_preproc_ok=: | |
3523 | break | |
8bb2c122 | 3524 | fi |
bec39cab | 3525 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3526 | |
bec39cab AC |
3527 | done |
3528 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3529 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3530 | if $ac_preproc_ok; then : |
bec39cab AC |
3531 | break |
3532 | fi | |
8bb2c122 | 3533 | |
bec39cab AC |
3534 | done |
3535 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3536 | |
c906108c | 3537 | fi |
bec39cab AC |
3538 | CPP=$ac_cv_prog_CPP |
3539 | else | |
3540 | ac_cv_prog_CPP=$CPP | |
c906108c | 3541 | fi |
81ecdfbb RW |
3542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3543 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3544 | ac_preproc_ok=false |
3545 | for ac_c_preproc_warn_flag in '' yes | |
3546 | do | |
3547 | # Use a header file that comes with gcc, so configuring glibc | |
3548 | # with a fresh cross-compiler works. | |
3549 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3550 | # <limits.h> exists even on freestanding compilers. | |
3551 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3552 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3553 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3554 | /* end confdefs.h. */ |
3555 | #ifdef __STDC__ | |
3556 | # include <limits.h> | |
3557 | #else | |
3558 | # include <assert.h> | |
3559 | #endif | |
3560 | Syntax error | |
3561 | _ACEOF | |
81ecdfbb | 3562 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3563 | |
81ecdfbb | 3564 | else |
bec39cab AC |
3565 | # Broken: fails on valid input. |
3566 | continue | |
3567 | fi | |
3568 | rm -f conftest.err conftest.$ac_ext | |
3569 | ||
81ecdfbb | 3570 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3571 | # can be detected and how. |
81ecdfbb | 3572 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3573 | /* end confdefs.h. */ |
3574 | #include <ac_nonexistent.h> | |
3575 | _ACEOF | |
81ecdfbb | 3576 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3577 | # Broken: success on invalid input. |
3578 | continue | |
c906108c | 3579 | else |
bec39cab AC |
3580 | # Passes both tests. |
3581 | ac_preproc_ok=: | |
3582 | break | |
c906108c | 3583 | fi |
bec39cab | 3584 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3585 | |
bec39cab AC |
3586 | done |
3587 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3588 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3589 | if $ac_preproc_ok; then : |
3590 | ||
c906108c | 3591 | else |
81ecdfbb RW |
3592 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3593 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3594 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3595 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3596 | fi |
c906108c | 3597 | |
bec39cab AC |
3598 | ac_ext=c |
3599 | ac_cpp='$CPP $CPPFLAGS' | |
3600 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3601 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3602 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3603 | ||
3604 | ||
81ecdfbb RW |
3605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3606 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3607 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3608 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3609 | else |
81ecdfbb RW |
3610 | if test -z "$GREP"; then |
3611 | ac_path_GREP_found=false | |
3612 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3614 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3615 | do | |
3616 | IFS=$as_save_IFS | |
3617 | test -z "$as_dir" && as_dir=. | |
3618 | for ac_prog in grep ggrep; do | |
3619 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3620 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3621 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3622 | # Check for GNU ac_path_GREP and select it if it is found. | |
3623 | # Check for GNU $ac_path_GREP | |
3624 | case `"$ac_path_GREP" --version 2>&1` in | |
3625 | *GNU*) | |
3626 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3627 | *) | |
3628 | ac_count=0 | |
3629 | $as_echo_n 0123456789 >"conftest.in" | |
3630 | while : | |
3631 | do | |
3632 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3633 | mv "conftest.tmp" "conftest.in" | |
3634 | cp "conftest.in" "conftest.nl" | |
3635 | $as_echo 'GREP' >> "conftest.nl" | |
3636 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3637 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3638 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3639 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3640 | # Best one so far, save it but keep looking for a better one | |
3641 | ac_cv_path_GREP="$ac_path_GREP" | |
3642 | ac_path_GREP_max=$ac_count | |
bec39cab | 3643 | fi |
81ecdfbb RW |
3644 | # 10*(2^10) chars as input seems more than enough |
3645 | test $ac_count -gt 10 && break | |
3646 | done | |
3647 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3648 | esac | |
bec39cab | 3649 | |
81ecdfbb RW |
3650 | $ac_path_GREP_found && break 3 |
3651 | done | |
3652 | done | |
3653 | done | |
3654 | IFS=$as_save_IFS | |
3655 | if test -z "$ac_cv_path_GREP"; then | |
3656 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3657 | fi | |
c906108c | 3658 | else |
81ecdfbb | 3659 | ac_cv_path_GREP=$GREP |
c906108c | 3660 | fi |
c906108c | 3661 | |
81ecdfbb RW |
3662 | fi |
3663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3664 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3665 | GREP="$ac_cv_path_GREP" | |
c906108c | 3666 | |
c906108c | 3667 | |
81ecdfbb RW |
3668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3669 | $as_echo_n "checking for egrep... " >&6; } | |
3670 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3671 | $as_echo_n "(cached) " >&6 | |
783e057b | 3672 | else |
81ecdfbb RW |
3673 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3674 | then ac_cv_path_EGREP="$GREP -E" | |
3675 | else | |
3676 | if test -z "$EGREP"; then | |
3677 | ac_path_EGREP_found=false | |
3678 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3679 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3680 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3681 | do |
3682 | IFS=$as_save_IFS | |
3683 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3684 | for ac_prog in egrep; do |
3685 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3686 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3687 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3688 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3689 | # Check for GNU $ac_path_EGREP | |
3690 | case `"$ac_path_EGREP" --version 2>&1` in | |
3691 | *GNU*) | |
3692 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3693 | *) | |
3694 | ac_count=0 | |
3695 | $as_echo_n 0123456789 >"conftest.in" | |
3696 | while : | |
3697 | do | |
3698 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3699 | mv "conftest.tmp" "conftest.in" | |
3700 | cp "conftest.in" "conftest.nl" | |
3701 | $as_echo 'EGREP' >> "conftest.nl" | |
3702 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3703 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3704 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3705 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3706 | # Best one so far, save it but keep looking for a better one | |
3707 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3708 | ac_path_EGREP_max=$ac_count | |
3709 | fi | |
3710 | # 10*(2^10) chars as input seems more than enough | |
3711 | test $ac_count -gt 10 && break | |
3712 | done | |
3713 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3714 | esac | |
bec39cab | 3715 | |
81ecdfbb RW |
3716 | $ac_path_EGREP_found && break 3 |
3717 | done | |
3718 | done | |
3719 | done | |
3720 | IFS=$as_save_IFS | |
3721 | if test -z "$ac_cv_path_EGREP"; then | |
3722 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3723 | fi |
783e057b | 3724 | else |
81ecdfbb | 3725 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3726 | fi |
3727 | ||
81ecdfbb | 3728 | fi |
783e057b | 3729 | fi |
81ecdfbb RW |
3730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3731 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3732 | EGREP="$ac_cv_path_EGREP" | |
3733 | ||
783e057b | 3734 | |
81ecdfbb RW |
3735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3736 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3737 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3738 | $as_echo_n "(cached) " >&6 | |
783e057b | 3739 | else |
81ecdfbb | 3740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3741 | /* end confdefs.h. */ |
783e057b | 3742 | #include <stdlib.h> |
bec39cab | 3743 | #include <stdarg.h> |
783e057b DJ |
3744 | #include <string.h> |
3745 | #include <float.h> | |
c906108c | 3746 | |
bec39cab AC |
3747 | int |
3748 | main () | |
3749 | { | |
c906108c | 3750 | |
bec39cab AC |
3751 | ; |
3752 | return 0; | |
3753 | } | |
3754 | _ACEOF | |
81ecdfbb | 3755 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3756 | ac_cv_header_stdc=yes |
c906108c | 3757 | else |
81ecdfbb | 3758 | ac_cv_header_stdc=no |
c906108c | 3759 | fi |
81ecdfbb | 3760 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3761 | |
783e057b DJ |
3762 | if test $ac_cv_header_stdc = yes; then |
3763 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3765 | /* end confdefs.h. */ |
3766 | #include <string.h> | |
c906108c | 3767 | |
783e057b DJ |
3768 | _ACEOF |
3769 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3770 | $EGREP "memchr" >/dev/null 2>&1; then : |
3771 | ||
c906108c | 3772 | else |
783e057b | 3773 | ac_cv_header_stdc=no |
c906108c | 3774 | fi |
783e057b | 3775 | rm -f conftest* |
c906108c SS |
3776 | |
3777 | fi | |
3778 | ||
783e057b DJ |
3779 | if test $ac_cv_header_stdc = yes; then |
3780 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3781 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3782 | /* end confdefs.h. */ |
3783 | #include <stdlib.h> | |
bec39cab | 3784 | |
783e057b DJ |
3785 | _ACEOF |
3786 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3787 | $EGREP "free" >/dev/null 2>&1; then : |
3788 | ||
bec39cab | 3789 | else |
783e057b | 3790 | ac_cv_header_stdc=no |
bec39cab | 3791 | fi |
783e057b | 3792 | rm -f conftest* |
bec39cab AC |
3793 | |
3794 | fi | |
bec39cab | 3795 | |
783e057b DJ |
3796 | if test $ac_cv_header_stdc = yes; then |
3797 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3798 | if test "$cross_compiling" = yes; then : |
783e057b | 3799 | : |
bec39cab | 3800 | else |
81ecdfbb | 3801 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3802 | /* end confdefs.h. */ |
3803 | #include <ctype.h> | |
81ecdfbb | 3804 | #include <stdlib.h> |
783e057b DJ |
3805 | #if ((' ' & 0x0FF) == 0x020) |
3806 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3807 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3808 | #else | |
3809 | # define ISLOWER(c) \ | |
3810 | (('a' <= (c) && (c) <= 'i') \ | |
3811 | || ('j' <= (c) && (c) <= 'r') \ | |
3812 | || ('s' <= (c) && (c) <= 'z')) | |
3813 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3814 | #endif | |
3815 | ||
3816 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3817 | int | |
3818 | main () | |
3819 | { | |
3820 | int i; | |
3821 | for (i = 0; i < 256; i++) | |
3822 | if (XOR (islower (i), ISLOWER (i)) | |
3823 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3824 | return 2; |
3825 | return 0; | |
783e057b DJ |
3826 | } |
3827 | _ACEOF | |
81ecdfbb | 3828 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3829 | |
81ecdfbb RW |
3830 | else |
3831 | ac_cv_header_stdc=no | |
783e057b | 3832 | fi |
81ecdfbb RW |
3833 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3834 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3835 | fi |
81ecdfbb | 3836 | |
783e057b DJ |
3837 | fi |
3838 | fi | |
81ecdfbb RW |
3839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3840 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3841 | if test $ac_cv_header_stdc = yes; then |
3842 | ||
81ecdfbb | 3843 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3844 | |
3845 | fi | |
3846 | ||
3847 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3848 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3849 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3850 | do : |
3851 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3852 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3853 | " | |
3854 | eval as_val=\$$as_ac_Header | |
3855 | if test "x$as_val" = x""yes; then : | |
783e057b | 3856 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3857 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3858 | _ACEOF |
3859 | ||
3860 | fi | |
3861 | ||
3862 | done | |
3863 | ||
3864 | ||
3865 | ||
81ecdfbb RW |
3866 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3867 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3868 | MINIX=yes |
3869 | else | |
3870 | MINIX= | |
3871 | fi | |
3872 | ||
3873 | ||
3874 | if test "$MINIX" = yes; then | |
3875 | ||
81ecdfbb | 3876 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3877 | |
3878 | ||
81ecdfbb | 3879 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3880 | |
3881 | ||
81ecdfbb | 3882 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3883 | |
3884 | fi | |
3885 | ||
3886 | ||
81ecdfbb RW |
3887 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3888 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3889 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3890 | $as_echo_n "(cached) " >&6 | |
783e057b | 3891 | else |
81ecdfbb | 3892 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3893 | /* end confdefs.h. */ |
3894 | ||
c971b7fa PA |
3895 | # define __EXTENSIONS__ 1 |
3896 | $ac_includes_default | |
783e057b DJ |
3897 | int |
3898 | main () | |
3899 | { | |
3900 | ||
3901 | ; | |
3902 | return 0; | |
3903 | } | |
3904 | _ACEOF | |
81ecdfbb | 3905 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3906 | ac_cv_safe_to_define___extensions__=yes |
3907 | else | |
81ecdfbb | 3908 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3909 | fi |
81ecdfbb | 3910 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3911 | fi |
81ecdfbb RW |
3912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3913 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3914 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3915 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3916 | |
81ecdfbb | 3917 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3918 | |
81ecdfbb | 3919 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3920 | |
81ecdfbb | 3921 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3922 | |
81ecdfbb | 3923 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3924 | |
3925 | ||
c971b7fa PA |
3926 | ac_aux_dir= |
3927 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3928 | for ac_t in install-sh install.sh shtool; do | |
3929 | if test -f "$ac_dir/$ac_t"; then | |
3930 | ac_aux_dir=$ac_dir | |
3931 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3932 | break 2 | |
3933 | fi | |
3934 | done | |
3935 | done | |
3936 | if test -z "$ac_aux_dir"; then | |
3937 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3938 | fi | |
770d76d7 | 3939 | |
c971b7fa PA |
3940 | # These three variables are undocumented and unsupported, |
3941 | # and are intended to be withdrawn in a future Autoconf release. | |
3942 | # They can cause serious problems if a builder's source tree is in a directory | |
3943 | # whose full name contains unusual characters. | |
3944 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3945 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3946 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 3947 | |
770d76d7 | 3948 | |
c971b7fa PA |
3949 | # Make sure we can run config.sub. |
3950 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3951 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 3952 | |
c971b7fa PA |
3953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
3954 | $as_echo_n "checking build system type... " >&6; } | |
3955 | if test "${ac_cv_build+set}" = set; then : | |
3956 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 3957 | else |
c971b7fa PA |
3958 | ac_build_alias=$build_alias |
3959 | test "x$ac_build_alias" = x && | |
3960 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3961 | test "x$ac_build_alias" = x && | |
3962 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3963 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3964 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3965 | ||
770d76d7 | 3966 | fi |
c971b7fa PA |
3967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3968 | $as_echo "$ac_cv_build" >&6; } | |
3969 | case $ac_cv_build in | |
3970 | *-*-*) ;; | |
3971 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 3972 | esac |
c971b7fa PA |
3973 | build=$ac_cv_build |
3974 | ac_save_IFS=$IFS; IFS='-' | |
3975 | set x $ac_cv_build | |
3976 | shift | |
3977 | build_cpu=$1 | |
3978 | build_vendor=$2 | |
3979 | shift; shift | |
3980 | # Remember, the first character of IFS is used to create $*, | |
3981 | # except with old shells: | |
3982 | build_os=$* | |
3983 | IFS=$ac_save_IFS | |
3984 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
3985 | |
3986 | ||
c971b7fa PA |
3987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
3988 | $as_echo_n "checking host system type... " >&6; } | |
3989 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
3990 | $as_echo_n "(cached) " >&6 |
3991 | else | |
c971b7fa PA |
3992 | if test "x$host_alias" = x; then |
3993 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 3994 | else |
c971b7fa PA |
3995 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
3996 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 3997 | fi |
81ecdfbb RW |
3998 | |
3999 | fi | |
c971b7fa PA |
4000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4001 | $as_echo "$ac_cv_host" >&6; } | |
4002 | case $ac_cv_host in | |
4003 | *-*-*) ;; | |
4004 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4005 | esac |
c971b7fa PA |
4006 | host=$ac_cv_host |
4007 | ac_save_IFS=$IFS; IFS='-' | |
4008 | set x $ac_cv_host | |
4009 | shift | |
4010 | host_cpu=$1 | |
4011 | host_vendor=$2 | |
4012 | shift; shift | |
4013 | # Remember, the first character of IFS is used to create $*, | |
4014 | # except with old shells: | |
4015 | host_os=$* | |
4016 | IFS=$ac_save_IFS | |
4017 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4018 | |
4019 | ||
4020 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4021 | $as_echo_n "checking target system type... " >&6; } | |
4022 | if test "${ac_cv_target+set}" = set; then : | |
4023 | $as_echo_n "(cached) " >&6 | |
4024 | else | |
4025 | if test "x$target_alias" = x; then | |
4026 | ac_cv_target=$ac_cv_host | |
4027 | else | |
4028 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4029 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4030 | fi | |
4031 | ||
4032 | fi | |
4033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4034 | $as_echo "$ac_cv_target" >&6; } | |
4035 | case $ac_cv_target in | |
4036 | *-*-*) ;; | |
4037 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4038 | esac | |
4039 | target=$ac_cv_target | |
4040 | ac_save_IFS=$IFS; IFS='-' | |
4041 | set x $ac_cv_target | |
4042 | shift | |
4043 | target_cpu=$1 | |
4044 | target_vendor=$2 | |
4045 | shift; shift | |
4046 | # Remember, the first character of IFS is used to create $*, | |
4047 | # except with old shells: | |
4048 | target_os=$* | |
4049 | IFS=$ac_save_IFS | |
4050 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4051 | ||
4052 | ||
4053 | # The aliases save the names the user supplied, while $host etc. | |
4054 | # will get canonicalized. | |
4055 | test -n "$target_alias" && | |
4056 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4057 | NONENONEs,x,x, && | |
4058 | program_prefix=${target_alias}- | |
4059 | ||
4060 | # The tests for host and target for $enable_largefile require | |
4061 | # canonical names. | |
4062 | ||
4063 | ||
81ecdfbb | 4064 | |
da2f07f1 JK |
4065 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4066 | # even in directories otherwise not depending on the $plugins option. | |
4067 | ||
4068 | ||
4069 | # Check whether --enable-plugins was given. | |
4070 | if test "${enable_plugins+set}" = set; then : | |
4071 | enableval=$enable_plugins; case "${enableval}" in | |
4072 | yes | "") plugins=yes ;; | |
4073 | no) plugins=no ;; | |
4074 | *) plugins=yes ;; | |
4075 | esac | |
4076 | else | |
4077 | plugins=no | |
4078 | fi | |
4079 | ||
4080 | ||
4081 | ||
4082 | case "${host}" in | |
4083 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4084 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4085 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4086 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4087 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4088 | # large-file support through the --enable-largefile switch, disable | |
4089 | # large-file support in favor of procfs support. | |
4090 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4091 | && : ${enable_largefile="no"} | |
4092 | ;; | |
4093 | esac | |
4094 | ||
4095 | # Check whether --enable-largefile was given. | |
4096 | if test "${enable_largefile+set}" = set; then : | |
4097 | enableval=$enable_largefile; | |
4098 | fi | |
4099 | ||
4100 | if test "$enable_largefile" != no; then | |
4101 | ||
4102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4103 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4104 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4105 | $as_echo_n "(cached) " >&6 | |
4106 | else | |
4107 | ac_cv_sys_largefile_CC=no | |
4108 | if test "$GCC" != yes; then | |
4109 | ac_save_CC=$CC | |
4110 | while :; do | |
4111 | # IRIX 6.2 and later do not support large files by default, | |
4112 | # so use the C compiler's -n32 option if that helps. | |
4113 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4114 | /* end confdefs.h. */ | |
4115 | #include <sys/types.h> | |
4116 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4117 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4118 | since some C++ compilers masquerading as C compilers | |
4119 | incorrectly reject 9223372036854775807. */ | |
4120 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4121 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4122 | && LARGE_OFF_T % 2147483647 == 1) | |
4123 | ? 1 : -1]; | |
4124 | int | |
4125 | main () | |
4126 | { | |
4127 | ||
4128 | ; | |
4129 | return 0; | |
4130 | } | |
4131 | _ACEOF | |
4132 | if ac_fn_c_try_compile "$LINENO"; then : | |
4133 | break | |
4134 | fi | |
4135 | rm -f core conftest.err conftest.$ac_objext | |
4136 | CC="$CC -n32" | |
4137 | if ac_fn_c_try_compile "$LINENO"; then : | |
4138 | ac_cv_sys_largefile_CC=' -n32'; break | |
4139 | fi | |
4140 | rm -f core conftest.err conftest.$ac_objext | |
4141 | break | |
4142 | done | |
4143 | CC=$ac_save_CC | |
4144 | rm -f conftest.$ac_ext | |
4145 | fi | |
4146 | fi | |
4147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4148 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4149 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4150 | CC=$CC$ac_cv_sys_largefile_CC | |
4151 | fi | |
4152 | ||
4153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4154 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4155 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4156 | $as_echo_n "(cached) " >&6 | |
4157 | else | |
4158 | while :; do | |
4159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4160 | /* end confdefs.h. */ | |
4161 | #include <sys/types.h> | |
4162 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4163 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4164 | since some C++ compilers masquerading as C compilers | |
4165 | incorrectly reject 9223372036854775807. */ | |
4166 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4167 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4168 | && LARGE_OFF_T % 2147483647 == 1) | |
4169 | ? 1 : -1]; | |
4170 | int | |
4171 | main () | |
4172 | { | |
4173 | ||
4174 | ; | |
4175 | return 0; | |
4176 | } | |
4177 | _ACEOF | |
4178 | if ac_fn_c_try_compile "$LINENO"; then : | |
4179 | ac_cv_sys_file_offset_bits=no; break | |
4180 | fi | |
4181 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4183 | /* end confdefs.h. */ | |
4184 | #define _FILE_OFFSET_BITS 64 | |
4185 | #include <sys/types.h> | |
4186 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4187 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4188 | since some C++ compilers masquerading as C compilers | |
4189 | incorrectly reject 9223372036854775807. */ | |
4190 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4191 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4192 | && LARGE_OFF_T % 2147483647 == 1) | |
4193 | ? 1 : -1]; | |
4194 | int | |
4195 | main () | |
4196 | { | |
4197 | ||
4198 | ; | |
4199 | return 0; | |
4200 | } | |
4201 | _ACEOF | |
4202 | if ac_fn_c_try_compile "$LINENO"; then : | |
4203 | ac_cv_sys_file_offset_bits=64; break | |
4204 | fi | |
4205 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4206 | ac_cv_sys_file_offset_bits=unknown | |
4207 | break | |
4208 | done | |
4209 | fi | |
4210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4211 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4212 | case $ac_cv_sys_file_offset_bits in #( | |
4213 | no | unknown) ;; | |
4214 | *) | |
4215 | cat >>confdefs.h <<_ACEOF | |
4216 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4217 | _ACEOF | |
4218 | ;; | |
4219 | esac | |
4220 | rm -rf conftest* | |
4221 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4223 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4224 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4225 | $as_echo_n "(cached) " >&6 | |
4226 | else | |
4227 | while :; do | |
4228 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4229 | /* end confdefs.h. */ | |
4230 | #include <sys/types.h> | |
4231 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4232 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4233 | since some C++ compilers masquerading as C compilers | |
4234 | incorrectly reject 9223372036854775807. */ | |
4235 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4236 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4237 | && LARGE_OFF_T % 2147483647 == 1) | |
4238 | ? 1 : -1]; | |
4239 | int | |
4240 | main () | |
4241 | { | |
4242 | ||
4243 | ; | |
4244 | return 0; | |
4245 | } | |
4246 | _ACEOF | |
4247 | if ac_fn_c_try_compile "$LINENO"; then : | |
4248 | ac_cv_sys_large_files=no; break | |
4249 | fi | |
4250 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4252 | /* end confdefs.h. */ | |
4253 | #define _LARGE_FILES 1 | |
4254 | #include <sys/types.h> | |
4255 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4256 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4257 | since some C++ compilers masquerading as C compilers | |
4258 | incorrectly reject 9223372036854775807. */ | |
4259 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4260 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4261 | && LARGE_OFF_T % 2147483647 == 1) | |
4262 | ? 1 : -1]; | |
4263 | int | |
4264 | main () | |
4265 | { | |
4266 | ||
4267 | ; | |
4268 | return 0; | |
4269 | } | |
4270 | _ACEOF | |
4271 | if ac_fn_c_try_compile "$LINENO"; then : | |
4272 | ac_cv_sys_large_files=1; break | |
4273 | fi | |
4274 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4275 | ac_cv_sys_large_files=unknown | |
4276 | break | |
4277 | done | |
4278 | fi | |
4279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4280 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4281 | case $ac_cv_sys_large_files in #( | |
4282 | no | unknown) ;; | |
4283 | *) | |
4284 | cat >>confdefs.h <<_ACEOF | |
4285 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4286 | _ACEOF | |
4287 | ;; | |
4288 | esac | |
4289 | rm -rf conftest* | |
4290 | fi | |
4291 | fi | |
4292 | ||
4293 | ||
4294 | ||
81ecdfbb RW |
4295 | |
4296 | ||
4297 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4298 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4299 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4300 | $as_echo_n "(cached) " >&6 | |
4301 | else | |
4302 | am_cv_prog_cc_stdc=no | |
4303 | ac_save_CC="$CC" | |
4304 | # Don't try gcc -ansi; that turns off useful extensions and | |
4305 | # breaks some systems' header files. | |
4306 | # AIX -qlanglvl=ansi | |
4307 | # Ultrix and OSF/1 -std1 | |
4308 | # HP-UX 10.20 and later -Ae | |
4309 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4310 | # SVR4 -Xc -D__EXTENSIONS__ | |
4311 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4312 | do | |
783e057b | 4313 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4315 | /* end confdefs.h. */ |
4316 | #include <stdarg.h> | |
4317 | #include <stdio.h> | |
4318 | #include <sys/types.h> | |
4319 | #include <sys/stat.h> | |
4320 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4321 | struct buf { int x; }; | |
4322 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4323 | static char *e (p, i) | |
4324 | char **p; | |
4325 | int i; | |
4326 | { | |
4327 | return p[i]; | |
4328 | } | |
4329 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4330 | { | |
4331 | char *s; | |
4332 | va_list v; | |
4333 | va_start (v,p); | |
4334 | s = g (p, va_arg (v,int)); | |
4335 | va_end (v); | |
4336 | return s; | |
4337 | } | |
4338 | int test (int i, double x); | |
4339 | struct s1 {int (*f) (int a);}; | |
4340 | struct s2 {int (*f) (double a);}; | |
4341 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4342 | int argc; | |
4343 | char **argv; | |
4344 | ||
4345 | int | |
4346 | main () | |
4347 | { | |
4348 | ||
4349 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4350 | ||
4351 | ; | |
4352 | return 0; | |
4353 | } | |
4354 | _ACEOF | |
81ecdfbb | 4355 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4356 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4357 | fi |
81ecdfbb | 4358 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4359 | done |
4360 | CC="$ac_save_CC" | |
4361 | ||
4362 | fi | |
4363 | ||
4364 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4366 | $as_echo "none needed" >&6; } | |
783e057b | 4367 | else |
81ecdfbb RW |
4368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4369 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4370 | fi |
4371 | case "x$am_cv_prog_cc_stdc" in | |
4372 | x|xno) ;; | |
4373 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4374 | esac | |
4375 | ||
4376 | ||
4377 | ac_aux_dir= | |
81ecdfbb RW |
4378 | for ac_dir in .. "$srcdir"/..; do |
4379 | for ac_t in install-sh install.sh shtool; do | |
4380 | if test -f "$ac_dir/$ac_t"; then | |
4381 | ac_aux_dir=$ac_dir | |
4382 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4383 | break 2 | |
4384 | fi | |
4385 | done | |
783e057b DJ |
4386 | done |
4387 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4388 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4389 | fi |
81ecdfbb RW |
4390 | |
4391 | # These three variables are undocumented and unsupported, | |
4392 | # and are intended to be withdrawn in a future Autoconf release. | |
4393 | # They can cause serious problems if a builder's source tree is in a directory | |
4394 | # whose full name contains unusual characters. | |
4395 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4396 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4397 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4398 | ||
783e057b | 4399 | |
783e057b | 4400 | |
9009e1ae MR |
4401 | test "$program_prefix" != NONE && |
4402 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4403 | # Use a double $ so make ignores it. | |
4404 | test "$program_suffix" != NONE && | |
4405 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4406 | # Double any \ or $. | |
4407 | # By default was `s,x,x', remove it if useless. | |
4408 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4409 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4410 | ||
81ecdfbb | 4411 | |
a417dc56 RW |
4412 | # Dependency checking. |
4413 | rm -rf .tst 2>/dev/null | |
4414 | mkdir .tst 2>/dev/null | |
4415 | if test -d .tst; then | |
4416 | am__leading_dot=. | |
4417 | else | |
4418 | am__leading_dot=_ | |
4419 | fi | |
4420 | rmdir .tst 2>/dev/null | |
4421 | ||
4422 | DEPDIR="${am__leading_dot}deps" | |
4423 | ||
81ecdfbb | 4424 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4425 | |
4426 | ||
4427 | depcc="$CC" am_compiler_list= | |
4428 | ||
4429 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4431 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4432 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4433 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4434 | else |
4435 | if test -f "$am_depcomp"; then | |
4436 | # We make a subdir and do the tests there. Otherwise we can end up | |
4437 | # making bogus files that we don't know about and never remove. For | |
4438 | # instance it was reported that on HP-UX the gcc test will end up | |
4439 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4440 | # in D'. | |
4441 | mkdir conftest.dir | |
4442 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4443 | # using a relative directory. | |
4444 | cp "$am_depcomp" conftest.dir | |
4445 | cd conftest.dir | |
4446 | # We will build objects and dependencies in a subdirectory because | |
4447 | # it helps to detect inapplicable dependency modes. For instance | |
4448 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4449 | # side effect of compilation, but ICC will put the dependencies in | |
4450 | # the current directory while Tru64 will put them in the object | |
4451 | # directory. | |
4452 | mkdir sub | |
4453 | ||
4454 | am_cv_CC_dependencies_compiler_type=none | |
4455 | if test "$am_compiler_list" = ""; then | |
4456 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4457 | fi | |
4458 | for depmode in $am_compiler_list; do | |
4459 | if test $depmode = none; then break; fi | |
4460 | ||
81ecdfbb | 4461 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4462 | # Setup a source with many dependencies, because some compilers |
4463 | # like to wrap large dependency lists on column 80 (with \), and | |
4464 | # we should not choose a depcomp mode which is confused by this. | |
4465 | # | |
4466 | # We need to recreate these files for each test, as the compiler may | |
4467 | # overwrite some of them when testing with obscure command lines. | |
4468 | # This happens at least with the AIX C compiler. | |
4469 | : > sub/conftest.c | |
4470 | for i in 1 2 3 4 5 6; do | |
4471 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4472 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4473 | # Solaris 8's {/usr,}/bin/sh. | |
4474 | touch sub/conftst$i.h | |
4475 | done | |
4476 | echo "include sub/conftest.Po" > confmf | |
4477 | ||
4478 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4479 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4480 | # handle `-M -o', and we need to detect this. | |
4481 | depcmd="depmode=$depmode \ | |
4482 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4483 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4484 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4485 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4486 | if env $depcmd > conftest.err 2>&1 && | |
4487 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4488 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4489 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4490 | # icc doesn't choke on unknown options, it will just issue warnings | |
4491 | # or remarks (even with -Werror). So we grep stderr for any message | |
4492 | # that says an option was ignored or not supported. | |
4493 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4494 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4495 | # The diagnosis changed in icc 8.0: | |
4496 | # icc: Command line remark: option '-MP' not supported | |
4497 | if (grep 'ignoring option' conftest.err || | |
4498 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4499 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4500 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4501 | break |
4502 | fi | |
4503 | fi | |
81ecdfbb | 4504 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4505 | sed -e 's/^/| /' < conftest.err >&5 |
4506 | done | |
4507 | ||
4508 | cd .. | |
4509 | rm -rf conftest.dir | |
4510 | else | |
4511 | am_cv_CC_dependencies_compiler_type=none | |
4512 | fi | |
4513 | ||
4514 | fi | |
81ecdfbb RW |
4515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4516 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4517 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4518 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4519 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4520 | ||
4521 | fi | |
4522 | ||
4523 | ||
4524 | # Check for the 'make' the user wants to use. | |
4525 | for ac_prog in make | |
4526 | do | |
4527 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4528 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4529 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4530 | $as_echo_n "checking for $ac_word... " >&6; } | |
4531 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4532 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4533 | else |
4534 | if test -n "$MAKE"; then | |
4535 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4536 | else | |
4537 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4538 | for as_dir in $PATH | |
4539 | do | |
4540 | IFS=$as_save_IFS | |
4541 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4542 | for ac_exec_ext in '' $ac_executable_extensions; do |
4543 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4544 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4545 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4546 | break 2 |
4547 | fi | |
4548 | done | |
81ecdfbb RW |
4549 | done |
4550 | IFS=$as_save_IFS | |
a417dc56 RW |
4551 | |
4552 | fi | |
4553 | fi | |
4554 | MAKE=$ac_cv_prog_MAKE | |
4555 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4557 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4558 | else |
81ecdfbb RW |
4559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4560 | $as_echo "no" >&6; } | |
a417dc56 RW |
4561 | fi |
4562 | ||
81ecdfbb | 4563 | |
a417dc56 RW |
4564 | test -n "$MAKE" && break |
4565 | done | |
4566 | ||
4567 | MAKE_IS_GNU= | |
4568 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4569 | *GNU*) | |
4570 | MAKE_IS_GNU=yes | |
4571 | ;; | |
4572 | esac | |
81ecdfbb | 4573 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4574 | GMAKE_TRUE= |
4575 | GMAKE_FALSE='#' | |
4576 | else | |
4577 | GMAKE_TRUE='#' | |
4578 | GMAKE_FALSE= | |
4579 | fi | |
4580 | ||
81ecdfbb RW |
4581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4582 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4583 | set x ${MAKE-make} | |
4584 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4585 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4586 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4587 | else |
4588 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4589 | SHELL = /bin/sh |
a417dc56 | 4590 | all: |
81ecdfbb | 4591 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4592 | _ACEOF |
4593 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4594 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4595 | *@@@%%%=?*=@@@%%%*) | |
4596 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4597 | *) | |
4598 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4599 | esac | |
a417dc56 RW |
4600 | rm -f conftest.make |
4601 | fi | |
81ecdfbb RW |
4602 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4604 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4605 | SET_MAKE= |
4606 | else | |
81ecdfbb RW |
4607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4608 | $as_echo "no" >&6; } | |
a417dc56 RW |
4609 | SET_MAKE="MAKE=${MAKE-make}" |
4610 | fi | |
4611 | ||
4612 | ||
c971b7fa PA |
4613 | # Configure gnulib. We need to build gnulib under some other |
4614 | # directory not "gnulib", to avoid the problem of both GDB and | |
4615 | # GDBserver wanting to build it in the same directory, when building | |
4616 | # in the source dir. | |
783e057b | 4617 | |
c971b7fa PA |
4618 | in_src="gnulib" |
4619 | in_build="build-gnulib" | |
4620 | ||
4621 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
4622 | # so they do not pile up. | |
4623 | ac_sub_configure_args= | |
4624 | ac_prev= | |
4625 | eval "set x $ac_configure_args" | |
4626 | shift | |
4627 | for ac_arg | |
4628 | do | |
4629 | if test -n "$ac_prev"; then | |
4630 | ac_prev= | |
4631 | continue | |
4632 | fi | |
4633 | case $ac_arg in | |
4634 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
4635 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
4636 | ac_prev=cache_file ;; | |
4637 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
4638 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
4639 | | --c=*) | |
4640 | ;; | |
4641 | --config-cache | -C) | |
4642 | ;; | |
4643 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
4644 | ac_prev=srcdir ;; | |
4645 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
4646 | ;; | |
4647 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
4648 | ac_prev=prefix ;; | |
4649 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
4650 | ;; | |
4651 | --disable-option-checking) | |
4652 | ;; | |
4653 | *) | |
4654 | case $ac_arg in | |
4655 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4656 | esac | |
4657 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
4658 | esac | |
4659 | done | |
4660 | ||
4661 | # Always prepend --prefix to ensure using the same prefix | |
4662 | # in subdir configurations. | |
4663 | ac_arg="--prefix=$prefix" | |
4664 | case $ac_arg in | |
4665 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4666 | esac | |
4667 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
4668 | ||
4669 | # Pass --silent | |
4670 | if test "$silent" = yes; then | |
4671 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
4672 | fi | |
4673 | ||
4674 | # Always prepend --disable-option-checking to silence warnings, since | |
4675 | # different subdirs can have different --enable and --with options. | |
4676 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
4677 | ||
4678 | ac_popdir=`pwd` | |
4679 | ac_dir=$in_build | |
4680 | ||
4681 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
4682 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
4683 | $as_echo "$ac_msg" >&6 | |
4684 | as_dir="$ac_dir"; as_fn_mkdir_p | |
4685 | ||
38ea300a PA |
4686 | case $srcdir in |
4687 | [\\/]* | ?:[\\/]* ) | |
4688 | ac_srcdir=$srcdir/$in_src ;; | |
4689 | *) # Relative name. | |
4690 | ac_srcdir=../$srcdir/$in_src ;; | |
4691 | esac | |
c971b7fa PA |
4692 | |
4693 | cd "$ac_dir" | |
4694 | ||
4695 | ac_sub_configure=$ac_srcdir/configure | |
4696 | ||
4697 | # Make the cache file name correct relative to the subdirectory. | |
4698 | case $cache_file in | |
4699 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
4700 | *) # Relative name. | |
4701 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
4702 | esac | |
4703 | ||
4704 | { $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 | |
4705 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
4706 | # The eval makes quoting arguments work. | |
4707 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
4708 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
4709 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
4710 | ||
4711 | cd "$ac_popdir" | |
783e057b | 4712 | |
c971b7fa PA |
4713 | |
4714 | ||
4715 | CONFIG_OBS= | |
4716 | CONFIG_DEPS= | |
4717 | CONFIG_SRCS= | |
4718 | ENABLE_CFLAGS= | |
4719 | ||
4720 | CONFIG_ALL= | |
4721 | CONFIG_CLEAN= | |
4722 | CONFIG_INSTALL= | |
4723 | CONFIG_UNINSTALL= | |
4724 | ||
4725 | # If we haven't got the data from the intl directory, | |
4726 | # assume NLS is disabled. | |
4727 | USE_NLS=no | |
4728 | LIBINTL= | |
4729 | LIBINTL_DEP= | |
4730 | INCINTL= | |
4731 | XGETTEXT= | |
4732 | GMSGFMT= | |
4733 | POSUB= | |
783e057b DJ |
4734 | |
4735 | if test -f ../intl/config.intl; then | |
4736 | . ../intl/config.intl | |
4737 | fi | |
81ecdfbb RW |
4738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4739 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4740 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4742 | $as_echo "no" >&6; } | |
783e057b | 4743 | else |
81ecdfbb RW |
4744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4745 | $as_echo "yes" >&6; } | |
783e057b | 4746 | |
81ecdfbb | 4747 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4748 | |
4749 | ||
81ecdfbb RW |
4750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4751 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4752 | # Look for .po and .gmo files in the source directory. |
4753 | CATALOGS= | |
4754 | XLINGUAS= | |
4755 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4756 | # If there aren't any .gmo files the shell will give us the | |
4757 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4758 | # weeded out. | |
4759 | case "$cat" in *\**) | |
4760 | continue;; | |
4761 | esac | |
4762 | # The quadruple backslash is collapsed to a double backslash | |
4763 | # by the backticks, then collapsed again by the double quotes, | |
4764 | # leaving us with one backslash in the sed expression (right | |
4765 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
4766 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
4767 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4768 | # The user is allowed to set LINGUAS to a list of languages to | |
4769 | # install catalogs for. If it's empty that means "all of them." | |
4770 | if test "x$LINGUAS" = x; then | |
4771 | CATALOGS="$CATALOGS $cat" | |
4772 | XLINGUAS="$XLINGUAS $lang" | |
4773 | else | |
4774 | case "$LINGUAS" in *$lang*) | |
4775 | CATALOGS="$CATALOGS $cat" | |
4776 | XLINGUAS="$XLINGUAS $lang" | |
4777 | ;; | |
4778 | esac | |
e28b3332 DJ |
4779 | fi |
4780 | done | |
c971b7fa PA |
4781 | LINGUAS="$XLINGUAS" |
4782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
4783 | $as_echo "$LINGUAS" >&6; } | |
4784 | ||
4785 | ||
4786 | DATADIRNAME=share | |
4787 | ||
4788 | INSTOBJEXT=.mo | |
4789 | ||
4790 | GENCAT=gencat | |
4791 | ||
4792 | CATOBJEXT=.gmo | |
e28b3332 | 4793 | |
e28b3332 DJ |
4794 | fi |
4795 | ||
c971b7fa PA |
4796 | localedir='${datadir}/locale' |
4797 | ||
4798 | ||
4799 | if test x"$USE_NLS" = xyes; then | |
4800 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4801 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4802 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4803 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 4804 | fi |
e28b3332 | 4805 | |
c971b7fa PA |
4806 | GNULIB=build-gnulib/import |
4807 | ||
4808 | # For Makefile dependencies. | |
4809 | GNULIB_STDINT_H= | |
4810 | if test x"$STDINT_H" != x; then | |
4811 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
4812 | fi |
4813 | ||
4814 | ||
c971b7fa PA |
4815 | PACKAGE=gdb |
4816 | ||
4817 | cat >>confdefs.h <<_ACEOF | |
4818 | #define PACKAGE "$PACKAGE" | |
4819 | _ACEOF | |
4820 | ||
4821 | ||
4822 | ||
4823 | # We never need to detect it in this sub-configure. | |
4824 | # But preserve it for config.status --recheck. | |
4825 | ||
4826 | ||
4827 | ||
4828 | MAKEINFO_EXTRA_FLAGS="" | |
4829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
4830 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
4831 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
4832 | $as_echo_n "(cached) " >&6 | |
4833 | else | |
4834 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
4835 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
4836 | gdb_cv_have_makeinfo_click=yes | |
4837 | else | |
4838 | gdb_cv_have_makeinfo_click=no | |
4839 | fi | |
4840 | fi | |
4841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
4842 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
4843 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
4844 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
4845 | fi | |
e28b3332 DJ |
4846 | |
4847 | ||
bec39cab AC |
4848 | |
4849 | ||
81ecdfbb RW |
4850 | # Check whether --with-separate-debug-dir was given. |
4851 | if test "${with_separate_debug_dir+set}" = set; then : | |
4852 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
4853 | DEBUGDIR=$withval |
4854 | else | |
4855 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
4856 | fi |
4857 | ||
20e95c23 | 4858 | |
783e057b DJ |
4859 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4860 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 4861 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 4862 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 4863 | |
783e057b DJ |
4864 | cat >>confdefs.h <<_ACEOF |
4865 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 4866 | _ACEOF |
20e95c23 | 4867 | |
20e95c23 | 4868 | |
20e95c23 | 4869 | |
0c4a4063 | 4870 | |
b14b1491 TT |
4871 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4872 | if test "x$prefix" = xNONE; then | |
4873 | test_prefix=/usr/local | |
4874 | else | |
4875 | test_prefix=$prefix | |
4876 | fi | |
783e057b | 4877 | else |
b14b1491 | 4878 | test_prefix=$exec_prefix |
783e057b | 4879 | fi |
b14b1491 TT |
4880 | value=0 |
4881 | case ${ac_define_dir} in | |
4882 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4883 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4884 | value=1 | |
4885 | ;; | |
4886 | esac | |
4887 | ||
4888 | cat >>confdefs.h <<_ACEOF | |
4889 | #define DEBUGDIR_RELOCATABLE $value | |
4890 | _ACEOF | |
4891 | ||
4892 | ||
4893 | ||
0c4a4063 | 4894 | |
f83d8a90 DE |
4895 | # We can't pass paths as command line arguments. |
4896 | # Mingw32 tries to be clever and will convert the paths for us. | |
4897 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
4898 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
4899 | # This breaks GDB's relocatable path conversions since paths passed in | |
4900 | # config.h would not get so translated, the path prefixes no longer match. | |
4901 | ||
4902 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4903 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4904 | ac_define_dir=`eval echo $bindir` | |
4905 | ac_define_dir=`eval echo $ac_define_dir` | |
4906 | ||
4907 | cat >>confdefs.h <<_ACEOF | |
4908 | #define BINDIR "$ac_define_dir" | |
4909 | _ACEOF | |
4910 | ||
4911 | ||
4912 | ||
b14b1491 TT |
4913 | # GDB's datadir relocation |
4914 | ||
4915 | ||
4916 | ||
81ecdfbb RW |
4917 | # Check whether --with-gdb-datadir was given. |
4918 | if test "${with_gdb_datadir+set}" = set; then : | |
4919 | withval=$with_gdb_datadir; | |
b14b1491 | 4920 | GDB_DATADIR=$withval |
20e95c23 | 4921 | else |
b14b1491 | 4922 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
4923 | fi |
4924 | ||
20e95c23 | 4925 | |
b14b1491 TT |
4926 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4927 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4928 | ac_define_dir=`eval echo $GDB_DATADIR` | |
4929 | ac_define_dir=`eval echo $ac_define_dir` | |
4930 | ||
4931 | cat >>confdefs.h <<_ACEOF | |
4932 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
4933 | _ACEOF |
4934 | ||
b14b1491 TT |
4935 | |
4936 | ||
0c4a4063 | 4937 | |
b14b1491 TT |
4938 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4939 | if test "x$prefix" = xNONE; then | |
4940 | test_prefix=/usr/local | |
4941 | else | |
4942 | test_prefix=$prefix | |
4943 | fi | |
4944 | else | |
4945 | test_prefix=$exec_prefix | |
4946 | fi | |
4947 | value=0 | |
4948 | case ${ac_define_dir} in | |
4949 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4950 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4951 | value=1 | |
4952 | ;; | |
4953 | esac | |
4954 | ||
4955 | cat >>confdefs.h <<_ACEOF | |
4956 | #define GDB_DATADIR_RELOCATABLE $value | |
4957 | _ACEOF | |
4958 | ||
4959 | ||
783e057b | 4960 | |
20e95c23 | 4961 | |
0c4a4063 | 4962 | |
81ecdfbb RW |
4963 | # Check whether --with-relocated-sources was given. |
4964 | if test "${with_relocated_sources+set}" = set; then : | |
4965 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
4966 | |
4967 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4968 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4969 | ac_define_dir=`eval echo $reloc_srcdir` | |
4970 | ac_define_dir=`eval echo $ac_define_dir` | |
4971 | ||
4972 | cat >>confdefs.h <<_ACEOF | |
4973 | #define RELOC_SRCDIR "$ac_define_dir" | |
4974 | _ACEOF | |
4975 | ||
4976 | ||
4977 | ||
81ecdfbb RW |
4978 | fi |
4979 | ||
29b0e8a2 | 4980 | |
7349ff92 JK |
4981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
4982 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
4983 | ||
4984 | # Check whether --with-auto-load-dir was given. | |
4985 | if test "${with_auto_load_dir+set}" = set; then : | |
4986 | withval=$with_auto_load_dir; | |
4987 | else | |
1564a261 | 4988 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
4989 | fi |
4990 | ||
1564a261 | 4991 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
4992 | |
4993 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4994 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4995 | ac_define_dir=`eval echo $escape_dir` | |
4996 | ac_define_dir=`eval echo $ac_define_dir` | |
4997 | ||
4998 | cat >>confdefs.h <<_ACEOF | |
4999 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
5000 | _ACEOF | |
5001 | ||
5002 | ||
5003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
5004 | $as_echo "$with_auto_load_dir" >&6; } | |
5005 | ||
bccbefd2 JK |
5006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
5007 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
5008 | ||
5009 | # Check whether --with-auto-load-safe-path was given. | |
5010 | if test "${with_auto_load_safe_path+set}" = set; then : | |
5011 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
5012 | with_auto_load_safe_path="/" |
5013 | fi | |
bccbefd2 | 5014 | else |
7349ff92 | 5015 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5016 | fi |
5017 | ||
1564a261 | 5018 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5019 | |
5020 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5021 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5022 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5023 | ac_define_dir=`eval echo $ac_define_dir` |
5024 | ||
5025 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5026 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5027 | _ACEOF |
5028 | ||
5029 | ||
5030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5031 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5032 | ||
29b0e8a2 | 5033 | |
20e95c23 | 5034 | |
5ae98d25 | 5035 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5036 | |
5037 | ||
783e057b | 5038 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5039 | # Check whether --enable-targets was given. |
5040 | if test "${enable_targets+set}" = set; then : | |
5041 | enableval=$enable_targets; case "${enableval}" in | |
5042 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5043 | ;; |
5044 | no) enable_targets= ;; | |
5045 | *) enable_targets=$enableval ;; | |
5046 | esac | |
81ecdfbb RW |
5047 | fi |
5048 | ||
20e95c23 | 5049 | |
783e057b | 5050 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5051 | # Check whether --enable-64-bit-bfd was given. |
5052 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5053 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5054 | yes) want64=true ;; |
5055 | no) want64=false ;; | |
81ecdfbb | 5056 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5057 | esac |
5058 | else | |
5059 | want64=false | |
81ecdfbb RW |
5060 | fi |
5061 | ||
783e057b DJ |
5062 | # Provide defaults for some variables set by the per-host and per-target |
5063 | # configuration. | |
5064 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5065 | |
783e057b DJ |
5066 | if test "${target}" = "${host}"; then |
5067 | gdb_native=yes | |
5068 | else | |
5069 | gdb_native=no | |
5070 | fi | |
20e95c23 | 5071 | |
783e057b | 5072 | . $srcdir/configure.host |
20e95c23 | 5073 | |
783e057b | 5074 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5075 | |
783e057b DJ |
5076 | TARGET_OBS= |
5077 | all_targets= | |
20e95c23 | 5078 | |
783e057b | 5079 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5080 | do |
783e057b DJ |
5081 | if test "$targ_alias" = "all"; then |
5082 | all_targets=true | |
5083 | else | |
5084 | # Canonicalize the secondary target names. | |
5085 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5086 | if test -n "$result"; then | |
5087 | targ=$result | |
5088 | else | |
5089 | targ=$targ_alias | |
5090 | fi | |
20e95c23 | 5091 | |
783e057b | 5092 | . ${srcdir}/configure.tgt |
20e95c23 | 5093 | |
bf307134 JB |
5094 | if test -z "${gdb_target_obs}"; then : |
5095 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5096 | fi | |
5097 | ||
783e057b DJ |
5098 | # Target-specific object files |
5099 | for i in ${gdb_target_obs}; do | |
5100 | case " $TARGET_OBS " in | |
5101 | *" ${i} "*) ;; | |
5102 | *) | |
5103 | TARGET_OBS="$TARGET_OBS ${i}" | |
5104 | ;; | |
5105 | esac | |
5106 | done | |
20e95c23 | 5107 | |
783e057b DJ |
5108 | # Check whether this target needs 64-bit CORE_ADDR |
5109 | if test x${want64} = xfalse; then | |
5110 | . ${srcdir}/../bfd/config.bfd | |
5111 | fi | |
5112 | fi | |
20e95c23 DJ |
5113 | done |
5114 | ||
783e057b DJ |
5115 | if test x${all_targets} = xtrue; then |
5116 | ||
5117 | # We want all 64-bit targets if we either: | |
5118 | # - run on a 64-bit host or | |
5119 | # - already require 64-bit support for some other target or | |
5120 | # - the --enable-64-bit-bfd option was supplied | |
5121 | # Otherwise we only support all 32-bit targets. | |
5122 | # | |
5123 | # NOTE: This test must be in sync with the corresponding | |
5124 | # tests in BFD! | |
20e95c23 | 5125 | |
783e057b | 5126 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5127 | # The cast to long int works around a bug in the HP C Compiler |
5128 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5129 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5130 | # This bug is HP SR number 8606223364. | |
5131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5132 | $as_echo_n "checking size of long... " >&6; } | |
5133 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5134 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5135 | else |
81ecdfbb | 5136 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5137 | |
81ecdfbb RW |
5138 | else |
5139 | if test "$ac_cv_type_long" = yes; then | |
5140 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5141 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5142 | { as_fn_set_status 77 | |
5143 | as_fn_error "cannot compute sizeof (long) | |
5144 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5145 | else | |
5146 | ac_cv_sizeof_long=0 | |
5147 | fi | |
c0993dbe | 5148 | fi |
81ecdfbb | 5149 | |
c0993dbe | 5150 | fi |
81ecdfbb RW |
5151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5152 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5153 | |
c0993dbe | 5154 | |
c0993dbe | 5155 | |
c0993dbe UW |
5156 | cat >>confdefs.h <<_ACEOF |
5157 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5158 | _ACEOF | |
5159 | ||
5160 | ||
5161 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5162 | want64=true | |
5163 | fi | |
5164 | fi | |
5165 | if test x${want64} = xtrue; then | |
5166 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5167 | else | |
5168 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5169 | fi | |
5170 | fi | |
5171 | ||
5172 | ||
5173 | ||
5174 | # For other settings, only the main target counts. | |
5175 | gdb_sim= | |
5176 | gdb_osabi= | |
5177 | build_gdbserver= | |
5178 | targ=$target; . ${srcdir}/configure.tgt | |
5179 | ||
5180 | # Fetch the default architecture and default target vector from BFD. | |
5181 | targ=$target; . $srcdir/../bfd/config.bfd | |
5182 | ||
5183 | # We only want the first architecture, so strip off the others if | |
5184 | # there is more than one. | |
5185 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5186 | ||
5187 | if test "x$targ_archs" != x; then | |
5188 | ||
5189 | cat >>confdefs.h <<_ACEOF | |
5190 | #define DEFAULT_BFD_ARCH $targ_archs | |
5191 | _ACEOF | |
5192 | ||
5193 | fi | |
5194 | if test "x$targ_defvec" != x; then | |
5195 | ||
5196 | cat >>confdefs.h <<_ACEOF | |
5197 | #define DEFAULT_BFD_VEC $targ_defvec | |
5198 | _ACEOF | |
5199 | ||
5200 | fi | |
5201 | ||
c0993dbe UW |
5202 | # The CLI cannot be disabled yet, but may be in the future. |
5203 | ||
5204 | # Enable CLI. | |
81ecdfbb RW |
5205 | # Check whether --enable-gdbcli was given. |
5206 | if test "${enable_gdbcli+set}" = set; then : | |
5207 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5208 | yes) |
5209 | ;; | |
5210 | no) | |
81ecdfbb | 5211 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5212 | *) |
81ecdfbb | 5213 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5214 | esac |
5215 | else | |
5216 | enable_gdbcli=yes | |
81ecdfbb RW |
5217 | fi |
5218 | ||
c0993dbe UW |
5219 | if test x"$enable_gdbcli" = xyes; then |
5220 | if test -d $srcdir/cli; then | |
5221 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5222 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5223 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5224 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5225 | fi | |
5226 | fi | |
5227 | ||
5228 | # Enable MI. | |
81ecdfbb RW |
5229 | # Check whether --enable-gdbmi was given. |
5230 | if test "${enable_gdbmi+set}" = set; then : | |
5231 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5232 | yes | no) |
5233 | ;; | |
5234 | *) | |
81ecdfbb | 5235 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5236 | esac |
5237 | else | |
5238 | enable_gdbmi=yes | |
81ecdfbb RW |
5239 | fi |
5240 | ||
c0993dbe UW |
5241 | if test x"$enable_gdbmi" = xyes; then |
5242 | if test -d $srcdir/mi; then | |
5243 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5244 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5245 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5246 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5247 | fi | |
5248 | fi | |
5249 | ||
5250 | # Enable TUI. | |
81ecdfbb RW |
5251 | # Check whether --enable-tui was given. |
5252 | if test "${enable_tui+set}" = set; then : | |
5253 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5254 | yes | no | auto) |
c0993dbe UW |
5255 | ;; |
5256 | *) | |
81ecdfbb | 5257 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5258 | esac |
5259 | else | |
3ca64bd3 | 5260 | enable_tui=auto |
81ecdfbb RW |
5261 | fi |
5262 | ||
c0993dbe UW |
5263 | |
5264 | # Enable gdbtk. | |
81ecdfbb RW |
5265 | # Check whether --enable-gdbtk was given. |
5266 | if test "${enable_gdbtk+set}" = set; then : | |
5267 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5268 | yes | no) |
5269 | ;; | |
5270 | *) | |
81ecdfbb | 5271 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5272 | esac |
5273 | else | |
5062cc19 | 5274 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5275 | enable_gdbtk=yes |
5276 | else | |
5277 | enable_gdbtk=no | |
5278 | fi | |
81ecdfbb RW |
5279 | fi |
5280 | ||
c0993dbe UW |
5281 | # We unconditionally disable gdbtk tests on selected platforms. |
5282 | case $host_os in | |
5283 | go32* | windows*) | |
81ecdfbb RW |
5284 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5285 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5286 | enable_gdbtk=no ;; |
5287 | esac | |
5288 | ||
05e7c244 | 5289 | # Libunwind support for ia64. |
bec39cab | 5290 | |
05e7c244 JK |
5291 | |
5292 | # Check whether --with-libunwind-ia64 was given. | |
5293 | if test "${with_libunwind_ia64+set}" = set; then : | |
5294 | withval=$with_libunwind_ia64; | |
bec39cab | 5295 | else |
05e7c244 JK |
5296 | with_libunwind_ia64=auto |
5297 | fi | |
bec39cab | 5298 | |
05e7c244 JK |
5299 | |
5300 | # Backward compatibility option. | |
5301 | if test "${with_libunwind+set}" = set; then | |
5302 | if test x"$with_libunwind_ia64" != xauto; then | |
5303 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5304 | fi | |
5305 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5306 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5307 | with_libunwind_ia64="$with_libunwind" | |
5308 | fi | |
5309 | ||
5310 | case "$with_libunwind_ia64" in | |
5311 | yes | no) | |
5312 | ;; | |
5313 | auto) | |
5314 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5315 | do : |
b54a8fd7 PA |
5316 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5317 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5318 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5319 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5320 | _ACEOF |
5321 | ||
5322 | fi | |
5323 | ||
5324 | done | |
5325 | ||
05e7c244 JK |
5326 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5327 | ;; | |
5328 | *) | |
5329 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5330 | ;; | |
5331 | esac | |
bec39cab | 5332 | |
05e7c244 | 5333 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5334 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5335 | do : |
b54a8fd7 PA |
5336 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5337 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5338 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5339 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5340 | _ACEOF |
5341 | ||
5342 | fi | |
5343 | ||
5344 | done | |
5345 | ||
05e7c244 JK |
5346 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5347 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5348 | fi | |
5349 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5350 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5351 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5352 | fi |
5353 | ||
cb01cfba JB |
5354 | opt_curses=no |
5355 | ||
81ecdfbb RW |
5356 | # Check whether --with-curses was given. |
5357 | if test "${with_curses+set}" = set; then : | |
5358 | withval=$with_curses; opt_curses=$withval | |
5359 | fi | |
5360 | ||
cb01cfba | 5361 | |
76a39ba7 | 5362 | prefer_curses=no |
cb01cfba | 5363 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5364 | prefer_curses=yes |
cb01cfba JB |
5365 | fi |
5366 | ||
a9322a30 | 5367 | # Profiling support. |
81ecdfbb RW |
5368 | # Check whether --enable-profiling was given. |
5369 | if test "${enable_profiling+set}" = set; then : | |
5370 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5371 | yes | no) |
5372 | ;; | |
5373 | *) | |
81ecdfbb | 5374 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5375 | esac |
5376 | else | |
5377 | enable_profiling=no | |
81ecdfbb | 5378 | fi |
bec39cab | 5379 | |
a9322a30 TT |
5380 | |
5381 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5382 | do : |
5383 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5384 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5385 | eval as_val=\$$as_ac_var | |
5386 | if test "x$as_val" = x""yes; then : | |
5387 | cat >>confdefs.h <<_ACEOF | |
5388 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5389 | _ACEOF |
a9322a30 | 5390 | |
81ecdfbb RW |
5391 | fi |
5392 | done | |
a9322a30 | 5393 | |
81ecdfbb RW |
5394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5395 | $as_echo_n "checking for _etext... " >&6; } | |
5396 | if test "${ac_cv_var__etext+set}" = set; then : | |
5397 | $as_echo_n "(cached) " >&6 | |
5398 | else | |
5399 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5400 | /* end confdefs.h. */ | |
5401 | #include <stdlib.h> | |
5402 | extern char _etext; | |
a9322a30 TT |
5403 | |
5404 | int | |
5405 | main () | |
5406 | { | |
5407 | free (&_etext); | |
5408 | ; | |
5409 | return 0; | |
5410 | } | |
bec39cab | 5411 | _ACEOF |
81ecdfbb | 5412 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5413 | ac_cv_var__etext=yes |
bec39cab | 5414 | else |
81ecdfbb | 5415 | ac_cv_var__etext=no |
bec39cab | 5416 | fi |
81ecdfbb RW |
5417 | rm -f core conftest.err conftest.$ac_objext \ |
5418 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5419 | fi |
81ecdfbb RW |
5420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
5421 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 5422 | if test $ac_cv_var__etext = yes; then |
60ca704f | 5423 | |
81ecdfbb | 5424 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 5425 | |
bec39cab | 5426 | fi |
81ecdfbb RW |
5427 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
5428 | $as_echo_n "checking for etext... " >&6; } | |
5429 | if test "${ac_cv_var_etext+set}" = set; then : | |
5430 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5431 | else |
81ecdfbb | 5432 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5433 | /* end confdefs.h. */ |
a9322a30 TT |
5434 | #include <stdlib.h> |
5435 | extern char etext; | |
bec39cab AC |
5436 | |
5437 | int | |
5438 | main () | |
5439 | { | |
a9322a30 | 5440 | free (&etext); |
bec39cab AC |
5441 | ; |
5442 | return 0; | |
5443 | } | |
5444 | _ACEOF | |
81ecdfbb | 5445 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5446 | ac_cv_var_etext=yes |
bec39cab | 5447 | else |
81ecdfbb | 5448 | ac_cv_var_etext=no |
bec39cab | 5449 | fi |
81ecdfbb RW |
5450 | rm -f core conftest.err conftest.$ac_objext \ |
5451 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5452 | fi |
81ecdfbb RW |
5453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
5454 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
5455 | if test $ac_cv_var_etext = yes; then |
5456 | ||
81ecdfbb | 5457 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
5458 | |
5459 | fi | |
a9322a30 TT |
5460 | if test "$enable_profiling" = yes ; then |
5461 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 5462 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
5463 | fi |
5464 | PROFILE_CFLAGS=-pg | |
5465 | OLD_CFLAGS="$CFLAGS" | |
5466 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 5467 | |
81ecdfbb RW |
5468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
5469 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
5470 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
5471 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5472 | else |
81ecdfbb | 5473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5474 | /* end confdefs.h. */ |
bec39cab AC |
5475 | |
5476 | int | |
5477 | main () | |
5478 | { | |
a9322a30 | 5479 | int x; |
bec39cab AC |
5480 | ; |
5481 | return 0; | |
5482 | } | |
5483 | _ACEOF | |
81ecdfbb | 5484 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 5485 | ac_cv_cc_supports_pg=yes |
bec39cab | 5486 | else |
81ecdfbb | 5487 | ac_cv_cc_supports_pg=no |
bec39cab | 5488 | fi |
81ecdfbb | 5489 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 5490 | fi |
81ecdfbb RW |
5491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
5492 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 5493 | |
a9322a30 | 5494 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 5495 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 5496 | fi |
bec39cab | 5497 | |
a9322a30 | 5498 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
5499 | fi |
5500 | ||
c16158bc JM |
5501 | |
5502 | ||
81ecdfbb RW |
5503 | # Check whether --with-pkgversion was given. |
5504 | if test "${with_pkgversion+set}" = set; then : | |
5505 | withval=$with_pkgversion; case "$withval" in | |
5506 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5507 | no) PKGVERSION= ;; |
5508 | *) PKGVERSION="($withval) " ;; | |
5509 | esac | |
5510 | else | |
5511 | PKGVERSION="(GDB) " | |
5512 | ||
81ecdfbb | 5513 | fi |
c16158bc JM |
5514 | |
5515 | ||
5516 | ||
5517 | ||
81ecdfbb RW |
5518 | |
5519 | # Check whether --with-bugurl was given. | |
5520 | if test "${with_bugurl+set}" = set; then : | |
5521 | withval=$with_bugurl; case "$withval" in | |
5522 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5523 | no) BUGURL= |
5524 | ;; | |
5525 | *) BUGURL="$withval" | |
5526 | ;; | |
5527 | esac | |
5528 | else | |
5529 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
5530 | ||
81ecdfbb RW |
5531 | fi |
5532 | ||
c16158bc JM |
5533 | case ${BUGURL} in |
5534 | "") | |
5535 | REPORT_BUGS_TO= | |
5536 | REPORT_BUGS_TEXI= | |
5537 | ;; | |
5538 | *) | |
5539 | REPORT_BUGS_TO="<$BUGURL>" | |
5540 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
5541 | ;; | |
5542 | esac; | |
5543 | ||
5544 | ||
5545 | ||
5546 | ||
5547 | cat >>confdefs.h <<_ACEOF | |
5548 | #define PKGVERSION "$PKGVERSION" | |
5549 | _ACEOF | |
5550 | ||
5551 | ||
5552 | cat >>confdefs.h <<_ACEOF | |
5553 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
5554 | _ACEOF | |
5555 | ||
5556 | ||
bec39cab AC |
5557 | # --------------------- # |
5558 | # Checks for programs. # | |
5559 | # --------------------- # | |
5560 | ||
5561 | for ac_prog in gawk mawk nawk awk | |
5562 | do | |
5563 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5564 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5566 | $as_echo_n "checking for $ac_word... " >&6; } | |
5567 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
5568 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5569 | else |
5570 | if test -n "$AWK"; then | |
5571 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
5572 | else | |
5573 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5574 | for as_dir in $PATH | |
5575 | do | |
5576 | IFS=$as_save_IFS | |
5577 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5578 | for ac_exec_ext in '' $ac_executable_extensions; do |
5579 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5580 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 5581 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5582 | break 2 |
5583 | fi | |
5584 | done | |
81ecdfbb RW |
5585 | done |
5586 | IFS=$as_save_IFS | |
bec39cab AC |
5587 | |
5588 | fi | |
5589 | fi | |
5590 | AWK=$ac_cv_prog_AWK | |
5591 | if test -n "$AWK"; then | |
81ecdfbb RW |
5592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
5593 | $as_echo "$AWK" >&6; } | |
bec39cab | 5594 | else |
81ecdfbb RW |
5595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5596 | $as_echo "no" >&6; } | |
bec39cab AC |
5597 | fi |
5598 | ||
bec39cab | 5599 | |
81ecdfbb | 5600 | test -n "$AWK" && break |
bec39cab AC |
5601 | done |
5602 | ||
c971b7fa PA |
5603 | # Find a good install program. We prefer a C program (faster), |
5604 | # so one script is as good as another. But avoid the broken or | |
5605 | # incompatible versions: | |
5606 | # SysV /etc/install, /usr/sbin/install | |
5607 | # SunOS /usr/etc/install | |
5608 | # IRIX /sbin/install | |
5609 | # AIX /bin/install | |
5610 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5611 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5612 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5613 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5614 | # OS/2's system install, which has a completely different semantic | |
5615 | # ./install, which can be erroneously created by make from ./install.sh. | |
5616 | # Reject install programs that cannot install multiple files. | |
5617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5618 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5619 | if test -z "$INSTALL"; then | |
5620 | if test "${ac_cv_path_install+set}" = set; then : | |
5621 | $as_echo_n "(cached) " >&6 | |
5622 | else | |
5623 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5624 | for as_dir in $PATH | |
5625 | do | |
5626 | IFS=$as_save_IFS | |
5627 | test -z "$as_dir" && as_dir=. | |
5628 | # Account for people who put trailing slashes in PATH elements. | |
5629 | case $as_dir/ in #(( | |
5630 | ./ | .// | /[cC]/* | \ | |
5631 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5632 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5633 | /usr/ucb/* ) ;; | |
5634 | *) | |
5635 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5636 | # Don't use installbsd from OSF since it installs stuff as root | |
5637 | # by default. | |
5638 | for ac_prog in ginstall scoinst install; do | |
5639 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5640 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5641 | if test $ac_prog = install && | |
5642 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5643 | # AIX install. It has an incompatible calling convention. | |
5644 | : | |
5645 | elif test $ac_prog = install && | |
5646 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5647 | # program-specific install script used by HP pwplus--don't use. | |
5648 | : | |
5649 | else | |
5650 | rm -rf conftest.one conftest.two conftest.dir | |
5651 | echo one > conftest.one | |
5652 | echo two > conftest.two | |
5653 | mkdir conftest.dir | |
5654 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5655 | test -s conftest.one && test -s conftest.two && | |
5656 | test -s conftest.dir/conftest.one && | |
5657 | test -s conftest.dir/conftest.two | |
5658 | then | |
5659 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5660 | break 3 | |
5661 | fi | |
5662 | fi | |
5663 | fi | |
5664 | done | |
5665 | done | |
5666 | ;; | |
5667 | esac | |
5668 | ||
5669 | done | |
5670 | IFS=$as_save_IFS | |
5671 | ||
5672 | rm -rf conftest.one conftest.two conftest.dir | |
5673 | ||
5674 | fi | |
5675 | if test "${ac_cv_path_install+set}" = set; then | |
5676 | INSTALL=$ac_cv_path_install | |
5677 | else | |
5678 | # As a last resort, use the slow shell script. Don't cache a | |
5679 | # value for INSTALL within a source directory, because that will | |
5680 | # break other packages using the cache if that directory is | |
5681 | # removed, or if the value is a relative name. | |
5682 | INSTALL=$ac_install_sh | |
5683 | fi | |
5684 | fi | |
5685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5686 | $as_echo "$INSTALL" >&6; } | |
5687 | ||
5688 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5689 | # It thinks the first close brace ends the variable substitution. | |
5690 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5691 | ||
5692 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5693 | ||
5694 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 5695 | |
81ecdfbb RW |
5696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
5697 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
5698 | LN_S=$as_ln_s |
5699 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
5700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5701 | $as_echo "yes" >&6; } | |
bec39cab | 5702 | else |
81ecdfbb RW |
5703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
5704 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
5705 | fi |
5706 | ||
5707 | if test -n "$ac_tool_prefix"; then | |
5708 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5709 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
5710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5711 | $as_echo_n "checking for $ac_word... " >&6; } | |
5712 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
5713 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5714 | else |
5715 | if test -n "$RANLIB"; then | |
5716 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5717 | else | |
5718 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5719 | for as_dir in $PATH | |
5720 | do | |
5721 | IFS=$as_save_IFS | |
5722 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5723 | for ac_exec_ext in '' $ac_executable_extensions; do |
5724 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5725 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 5726 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5727 | break 2 |
5728 | fi | |
5729 | done | |
81ecdfbb RW |
5730 | done |
5731 | IFS=$as_save_IFS | |
bec39cab AC |
5732 | |
5733 | fi | |
5734 | fi | |
5735 | RANLIB=$ac_cv_prog_RANLIB | |
5736 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
5737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
5738 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 5739 | else |
81ecdfbb RW |
5740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5741 | $as_echo "no" >&6; } | |
bec39cab AC |
5742 | fi |
5743 | ||
81ecdfbb | 5744 | |
bec39cab AC |
5745 | fi |
5746 | if test -z "$ac_cv_prog_RANLIB"; then | |
5747 | ac_ct_RANLIB=$RANLIB | |
5748 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5749 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
5750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5751 | $as_echo_n "checking for $ac_word... " >&6; } | |
5752 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5753 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5754 | else |
5755 | if test -n "$ac_ct_RANLIB"; then | |
5756 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5757 | else | |
5758 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5759 | for as_dir in $PATH | |
5760 | do | |
5761 | IFS=$as_save_IFS | |
5762 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5763 | for ac_exec_ext in '' $ac_executable_extensions; do |
5764 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5765 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 5766 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5767 | break 2 |
5768 | fi | |
5769 | done | |
81ecdfbb RW |
5770 | done |
5771 | IFS=$as_save_IFS | |
bec39cab | 5772 | |
bec39cab AC |
5773 | fi |
5774 | fi | |
5775 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5776 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
5777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
5778 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 5779 | else |
81ecdfbb RW |
5780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5781 | $as_echo "no" >&6; } | |
bec39cab AC |
5782 | fi |
5783 | ||
81ecdfbb RW |
5784 | if test "x$ac_ct_RANLIB" = x; then |
5785 | RANLIB=":" | |
5786 | else | |
5787 | case $cross_compiling:$ac_tool_warned in | |
5788 | yes:) | |
5789 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5790 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5791 | ac_tool_warned=yes ;; | |
5792 | esac | |
5793 | RANLIB=$ac_ct_RANLIB | |
5794 | fi | |
bec39cab AC |
5795 | else |
5796 | RANLIB="$ac_cv_prog_RANLIB" | |
5797 | fi | |
5798 | ||
5799 | for ac_prog in 'bison -y' byacc | |
5800 | do | |
5801 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5802 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5804 | $as_echo_n "checking for $ac_word... " >&6; } | |
5805 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
5806 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5807 | else |
5808 | if test -n "$YACC"; then | |
5809 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
5810 | else | |
5811 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5812 | for as_dir in $PATH | |
5813 | do | |
5814 | IFS=$as_save_IFS | |
5815 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5816 | for ac_exec_ext in '' $ac_executable_extensions; do |
5817 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5818 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 5819 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5820 | break 2 |
5821 | fi | |
5822 | done | |
81ecdfbb RW |
5823 | done |
5824 | IFS=$as_save_IFS | |
bec39cab AC |
5825 | |
5826 | fi | |
5827 | fi | |
5828 | YACC=$ac_cv_prog_YACC | |
5829 | if test -n "$YACC"; then | |
81ecdfbb RW |
5830 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
5831 | $as_echo "$YACC" >&6; } | |
bec39cab | 5832 | else |
81ecdfbb RW |
5833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5834 | $as_echo "no" >&6; } | |
bec39cab AC |
5835 | fi |
5836 | ||
81ecdfbb | 5837 | |
bec39cab AC |
5838 | test -n "$YACC" && break |
5839 | done | |
5840 | test -n "$YACC" || YACC="yacc" | |
5841 | ||
5842 | ||
5843 | if test -n "$ac_tool_prefix"; then | |
5844 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
5845 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
5846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5847 | $as_echo_n "checking for $ac_word... " >&6; } | |
5848 | if test "${ac_cv_prog_AR+set}" = set; then : | |
5849 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5850 | else |
5851 | if test -n "$AR"; then | |
5852 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5853 | else | |
5854 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5855 | for as_dir in $PATH | |
5856 | do | |
5857 | IFS=$as_save_IFS | |
5858 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5859 | for ac_exec_ext in '' $ac_executable_extensions; do |
5860 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5861 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 5862 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5863 | break 2 |
5864 | fi | |
5865 | done | |
81ecdfbb RW |
5866 | done |
5867 | IFS=$as_save_IFS | |
bec39cab AC |
5868 | |
5869 | fi | |
5870 | fi | |
5871 | AR=$ac_cv_prog_AR | |
5872 | if test -n "$AR"; then | |
81ecdfbb RW |
5873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
5874 | $as_echo "$AR" >&6; } | |
bec39cab | 5875 | else |
81ecdfbb RW |
5876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5877 | $as_echo "no" >&6; } | |
bec39cab AC |
5878 | fi |
5879 | ||
81ecdfbb | 5880 | |
bec39cab AC |
5881 | fi |
5882 | if test -z "$ac_cv_prog_AR"; then | |
5883 | ac_ct_AR=$AR | |
5884 | # Extract the first word of "ar", so it can be a program name with args. | |
5885 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
5886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5887 | $as_echo_n "checking for $ac_word... " >&6; } | |
5888 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
5889 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5890 | else |
5891 | if test -n "$ac_ct_AR"; then | |
5892 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5893 | else | |
5894 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5895 | for as_dir in $PATH | |
5896 | do | |
5897 | IFS=$as_save_IFS | |
5898 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5899 | for ac_exec_ext in '' $ac_executable_extensions; do |
5900 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5901 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 5902 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5903 | break 2 |
5904 | fi | |
5905 | done | |
81ecdfbb RW |
5906 | done |
5907 | IFS=$as_save_IFS | |
bec39cab AC |
5908 | |
5909 | fi | |
5910 | fi | |
5911 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
5912 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
5913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
5914 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 5915 | else |
81ecdfbb RW |
5916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5917 | $as_echo "no" >&6; } | |
bec39cab AC |
5918 | fi |
5919 | ||
81ecdfbb RW |
5920 | if test "x$ac_ct_AR" = x; then |
5921 | AR="" | |
5922 | else | |
5923 | case $cross_compiling:$ac_tool_warned in | |
5924 | yes:) | |
5925 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5926 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5927 | ac_tool_warned=yes ;; | |
5928 | esac | |
5929 | AR=$ac_ct_AR | |
5930 | fi | |
bec39cab AC |
5931 | else |
5932 | AR="$ac_cv_prog_AR" | |
5933 | fi | |
5934 | ||
5935 | if test -n "$ac_tool_prefix"; then | |
5936 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
5937 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
5938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5939 | $as_echo_n "checking for $ac_word... " >&6; } | |
5940 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
5941 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5942 | else |
5943 | if test -n "$DLLTOOL"; then | |
5944 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
5945 | else | |
5946 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5947 | for as_dir in $PATH | |
5948 | do | |
5949 | IFS=$as_save_IFS | |
5950 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5951 | for ac_exec_ext in '' $ac_executable_extensions; do |
5952 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5953 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 5954 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5955 | break 2 |
5956 | fi | |
5957 | done | |
81ecdfbb RW |
5958 | done |
5959 | IFS=$as_save_IFS | |
bec39cab AC |
5960 | |
5961 | fi | |
5962 | fi | |
5963 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
5964 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
5965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
5966 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 5967 | else |
81ecdfbb RW |
5968 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5969 | $as_echo "no" >&6; } | |
bec39cab AC |
5970 | fi |
5971 | ||
81ecdfbb | 5972 | |
bec39cab AC |
5973 | fi |
5974 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
5975 | ac_ct_DLLTOOL=$DLLTOOL | |
5976 | # Extract the first word of "dlltool", so it can be a program name with args. | |
5977 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
5978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5979 | $as_echo_n "checking for $ac_word... " >&6; } | |
5980 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
5981 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5982 | else |
5983 | if test -n "$ac_ct_DLLTOOL"; then | |
5984 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
5985 | else | |
5986 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5987 | for as_dir in $PATH | |
5988 | do | |
5989 | IFS=$as_save_IFS | |
5990 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5991 | for ac_exec_ext in '' $ac_executable_extensions; do |
5992 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5993 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 5994 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5995 | break 2 |
5996 | fi | |
5997 | done | |
81ecdfbb RW |
5998 | done |
5999 | IFS=$as_save_IFS | |
bec39cab AC |
6000 | |
6001 | fi | |
6002 | fi | |
6003 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
6004 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
6005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
6006 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 6007 | else |
81ecdfbb RW |
6008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6009 | $as_echo "no" >&6; } | |
bec39cab AC |
6010 | fi |
6011 | ||
81ecdfbb RW |
6012 | if test "x$ac_ct_DLLTOOL" = x; then |
6013 | DLLTOOL="" | |
6014 | else | |
6015 | case $cross_compiling:$ac_tool_warned in | |
6016 | yes:) | |
6017 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6018 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6019 | ac_tool_warned=yes ;; | |
6020 | esac | |
6021 | DLLTOOL=$ac_ct_DLLTOOL | |
6022 | fi | |
bec39cab AC |
6023 | else |
6024 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6025 | fi | |
6026 | ||
6027 | if test -n "$ac_tool_prefix"; then | |
6028 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6029 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6031 | $as_echo_n "checking for $ac_word... " >&6; } | |
6032 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6033 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6034 | else |
6035 | if test -n "$WINDRES"; then | |
6036 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6037 | else | |
6038 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6039 | for as_dir in $PATH | |
6040 | do | |
6041 | IFS=$as_save_IFS | |
6042 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6043 | for ac_exec_ext in '' $ac_executable_extensions; do |
6044 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6045 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6046 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6047 | break 2 |
6048 | fi | |
6049 | done | |
81ecdfbb RW |
6050 | done |
6051 | IFS=$as_save_IFS | |
bec39cab AC |
6052 | |
6053 | fi | |
6054 | fi | |
6055 | WINDRES=$ac_cv_prog_WINDRES | |
6056 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6058 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6059 | else |
81ecdfbb RW |
6060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6061 | $as_echo "no" >&6; } | |
bec39cab AC |
6062 | fi |
6063 | ||
81ecdfbb | 6064 | |
bec39cab AC |
6065 | fi |
6066 | if test -z "$ac_cv_prog_WINDRES"; then | |
6067 | ac_ct_WINDRES=$WINDRES | |
6068 | # Extract the first word of "windres", so it can be a program name with args. | |
6069 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6071 | $as_echo_n "checking for $ac_word... " >&6; } | |
6072 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6073 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6074 | else |
6075 | if test -n "$ac_ct_WINDRES"; then | |
6076 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6077 | else | |
6078 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6079 | for as_dir in $PATH | |
6080 | do | |
6081 | IFS=$as_save_IFS | |
6082 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6083 | for ac_exec_ext in '' $ac_executable_extensions; do |
6084 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6085 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6086 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6087 | break 2 |
6088 | fi | |
6089 | done | |
81ecdfbb RW |
6090 | done |
6091 | IFS=$as_save_IFS | |
bec39cab AC |
6092 | |
6093 | fi | |
6094 | fi | |
6095 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6096 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6097 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6098 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6099 | else |
81ecdfbb RW |
6100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6101 | $as_echo "no" >&6; } | |
c906108c | 6102 | fi |
bec39cab | 6103 | |
81ecdfbb RW |
6104 | if test "x$ac_ct_WINDRES" = x; then |
6105 | WINDRES="" | |
6106 | else | |
6107 | case $cross_compiling:$ac_tool_warned in | |
6108 | yes:) | |
6109 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6110 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6111 | ac_tool_warned=yes ;; | |
6112 | esac | |
6113 | WINDRES=$ac_ct_WINDRES | |
6114 | fi | |
c906108c | 6115 | else |
bec39cab | 6116 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6117 | fi |
6118 | ||
bec39cab AC |
6119 | |
6120 | # Needed for GNU/Hurd. | |
6121 | if test -n "$ac_tool_prefix"; then | |
6122 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
6123 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6125 | $as_echo_n "checking for $ac_word... " >&6; } | |
6126 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6127 | $as_echo_n "(cached) " >&6 | |
c906108c | 6128 | else |
bec39cab AC |
6129 | if test -n "$MIG"; then |
6130 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6131 | else | |
6132 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6133 | for as_dir in $PATH | |
6134 | do | |
6135 | IFS=$as_save_IFS | |
6136 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6137 | for ac_exec_ext in '' $ac_executable_extensions; do |
6138 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6139 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6140 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6141 | break 2 |
6142 | fi | |
6143 | done | |
81ecdfbb RW |
6144 | done |
6145 | IFS=$as_save_IFS | |
bec39cab | 6146 | |
c906108c | 6147 | fi |
bec39cab AC |
6148 | fi |
6149 | MIG=$ac_cv_prog_MIG | |
6150 | if test -n "$MIG"; then | |
81ecdfbb RW |
6151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6152 | $as_echo "$MIG" >&6; } | |
c906108c | 6153 | else |
81ecdfbb RW |
6154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6155 | $as_echo "no" >&6; } | |
c906108c SS |
6156 | fi |
6157 | ||
81ecdfbb | 6158 | |
bec39cab AC |
6159 | fi |
6160 | if test -z "$ac_cv_prog_MIG"; then | |
6161 | ac_ct_MIG=$MIG | |
6162 | # Extract the first word of "mig", so it can be a program name with args. | |
6163 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6165 | $as_echo_n "checking for $ac_word... " >&6; } | |
6166 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6167 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6168 | else |
6169 | if test -n "$ac_ct_MIG"; then | |
6170 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6171 | else | |
6172 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6173 | for as_dir in $PATH | |
6174 | do | |
6175 | IFS=$as_save_IFS | |
6176 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6177 | for ac_exec_ext in '' $ac_executable_extensions; do |
6178 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6179 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6180 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6181 | break 2 |
6182 | fi | |
6183 | done | |
81ecdfbb RW |
6184 | done |
6185 | IFS=$as_save_IFS | |
c906108c | 6186 | |
bec39cab AC |
6187 | fi |
6188 | fi | |
6189 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6190 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6192 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6193 | else |
81ecdfbb RW |
6194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6195 | $as_echo "no" >&6; } | |
bec39cab | 6196 | fi |
c906108c | 6197 | |
81ecdfbb RW |
6198 | if test "x$ac_ct_MIG" = x; then |
6199 | MIG="" | |
6200 | else | |
6201 | case $cross_compiling:$ac_tool_warned in | |
6202 | yes:) | |
6203 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6204 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6205 | ac_tool_warned=yes ;; | |
6206 | esac | |
6207 | MIG=$ac_ct_MIG | |
6208 | fi | |
bec39cab AC |
6209 | else |
6210 | MIG="$ac_cv_prog_MIG" | |
6211 | fi | |
c906108c | 6212 | |
c906108c | 6213 | |
bec39cab AC |
6214 | # ---------------------- # |
6215 | # Checks for libraries. # | |
6216 | # ---------------------- # | |
c906108c | 6217 | |
bec39cab | 6218 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6219 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6220 | $as_echo_n "checking for main in -lm... " >&6; } | |
6221 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6222 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6223 | else |
6224 | ac_check_lib_save_LIBS=$LIBS | |
6225 | LIBS="-lm $LIBS" | |
81ecdfbb | 6226 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6227 | /* end confdefs.h. */ |
c906108c | 6228 | |
c906108c | 6229 | |
bec39cab AC |
6230 | int |
6231 | main () | |
6232 | { | |
81ecdfbb | 6233 | return main (); |
bec39cab AC |
6234 | ; |
6235 | return 0; | |
6236 | } | |
6237 | _ACEOF | |
81ecdfbb | 6238 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6239 | ac_cv_lib_m_main=yes |
6240 | else | |
81ecdfbb | 6241 | ac_cv_lib_m_main=no |
bec39cab | 6242 | fi |
81ecdfbb RW |
6243 | rm -f core conftest.err conftest.$ac_objext \ |
6244 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6245 | LIBS=$ac_check_lib_save_LIBS |
6246 | fi | |
81ecdfbb RW |
6247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6248 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6249 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6250 | cat >>confdefs.h <<_ACEOF |
6251 | #define HAVE_LIBM 1 | |
6252 | _ACEOF | |
6253 | ||
6254 | LIBS="-lm $LIBS" | |
c906108c | 6255 | |
c906108c | 6256 | fi |
bec39cab AC |
6257 | |
6258 | ||
6259 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6260 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6261 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6262 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6263 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6264 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6265 | |
c906108c | 6266 | else |
81ecdfbb RW |
6267 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6268 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6269 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6270 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6271 | else |
6272 | ac_check_lib_save_LIBS=$LIBS | |
6273 | LIBS="-lw $LIBS" | |
81ecdfbb | 6274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6275 | /* end confdefs.h. */ |
c906108c | 6276 | |
81ecdfbb RW |
6277 | /* Override any GCC internal prototype to avoid an error. |
6278 | Use char because int might match the return type of a GCC | |
6279 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6280 | #ifdef __cplusplus |
6281 | extern "C" | |
6282 | #endif | |
bec39cab AC |
6283 | char wctype (); |
6284 | int | |
6285 | main () | |
6286 | { | |
81ecdfbb | 6287 | return wctype (); |
bec39cab AC |
6288 | ; |
6289 | return 0; | |
6290 | } | |
6291 | _ACEOF | |
81ecdfbb | 6292 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6293 | ac_cv_lib_w_wctype=yes |
6294 | else | |
81ecdfbb | 6295 | ac_cv_lib_w_wctype=no |
bec39cab | 6296 | fi |
81ecdfbb RW |
6297 | rm -f core conftest.err conftest.$ac_objext \ |
6298 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6299 | LIBS=$ac_check_lib_save_LIBS |
6300 | fi | |
81ecdfbb RW |
6301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6302 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6303 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6304 | cat >>confdefs.h <<_ACEOF |
6305 | #define HAVE_LIBW 1 | |
6306 | _ACEOF | |
c906108c | 6307 | |
bec39cab | 6308 | LIBS="-lw $LIBS" |
c906108c | 6309 | |
bec39cab | 6310 | fi |
c906108c | 6311 | |
bec39cab | 6312 | fi |
c906108c | 6313 | |
ddc9cd0f | 6314 | |
bec39cab | 6315 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6316 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6317 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6318 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6319 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6320 | else |
6321 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6322 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6323 | /* end confdefs.h. */ |
ddc9cd0f | 6324 | |
81ecdfbb RW |
6325 | /* Override any GCC internal prototype to avoid an error. |
6326 | Use char because int might match the return type of a GCC | |
6327 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6328 | #ifdef __cplusplus |
6329 | extern "C" | |
6330 | #endif | |
bec39cab AC |
6331 | char gethostbyname (); |
6332 | int | |
6333 | main () | |
6334 | { | |
81ecdfbb | 6335 | return gethostbyname (); |
bec39cab AC |
6336 | ; |
6337 | return 0; | |
6338 | } | |
6339 | _ACEOF | |
81ecdfbb RW |
6340 | for ac_lib in '' nsl; do |
6341 | if test -z "$ac_lib"; then | |
6342 | ac_res="none required" | |
6343 | else | |
6344 | ac_res=-l$ac_lib | |
b4e70030 | 6345 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6346 | fi |
6347 | if ac_fn_c_try_link "$LINENO"; then : | |
6348 | ac_cv_search_gethostbyname=$ac_res | |
6349 | fi | |
6350 | rm -f core conftest.err conftest.$ac_objext \ | |
6351 | conftest$ac_exeext | |
6352 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6353 | break | |
6354 | fi | |
6355 | done | |
6356 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6357 | |
bec39cab | 6358 | else |
81ecdfbb | 6359 | ac_cv_search_gethostbyname=no |
bec39cab | 6360 | fi |
81ecdfbb | 6361 | rm conftest.$ac_ext |
bec39cab AC |
6362 | LIBS=$ac_func_search_save_LIBS |
6363 | fi | |
81ecdfbb RW |
6364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6365 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6366 | ac_res=$ac_cv_search_gethostbyname | |
6367 | if test "$ac_res" != no; then : | |
6368 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6369 | |
bec39cab | 6370 | fi |
96baa820 | 6371 | |
c906108c | 6372 | |
b4e70030 | 6373 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6375 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6376 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6377 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6378 | else |
6379 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6381 | /* end confdefs.h. */ |
6382 | ||
81ecdfbb RW |
6383 | /* Override any GCC internal prototype to avoid an error. |
6384 | Use char because int might match the return type of a GCC | |
6385 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6386 | #ifdef __cplusplus |
6387 | extern "C" | |
6388 | #endif | |
b4e70030 JB |
6389 | char socketpair (); |
6390 | int | |
6391 | main () | |
6392 | { | |
81ecdfbb | 6393 | return socketpair (); |
b4e70030 JB |
6394 | ; |
6395 | return 0; | |
6396 | } | |
6397 | _ACEOF | |
81ecdfbb RW |
6398 | for ac_lib in '' socket; do |
6399 | if test -z "$ac_lib"; then | |
6400 | ac_res="none required" | |
6401 | else | |
6402 | ac_res=-l$ac_lib | |
b4e70030 | 6403 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6404 | fi |
6405 | if ac_fn_c_try_link "$LINENO"; then : | |
6406 | ac_cv_search_socketpair=$ac_res | |
6407 | fi | |
6408 | rm -f core conftest.err conftest.$ac_objext \ | |
6409 | conftest$ac_exeext | |
6410 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6411 | break | |
6412 | fi | |
6413 | done | |
6414 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 6415 | |
b4e70030 | 6416 | else |
81ecdfbb | 6417 | ac_cv_search_socketpair=no |
b4e70030 | 6418 | fi |
81ecdfbb | 6419 | rm conftest.$ac_ext |
b4e70030 JB |
6420 | LIBS=$ac_func_search_save_LIBS |
6421 | fi | |
81ecdfbb RW |
6422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
6423 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
6424 | ac_res=$ac_cv_search_socketpair | |
6425 | if test "$ac_res" != no; then : | |
6426 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
6427 | |
6428 | fi | |
6429 | ||
6430 | ||
233a11ab | 6431 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
6432 | |
6433 | # See if the user specified whether he wants zlib support or not. | |
6434 | ||
6435 | # Check whether --with-zlib was given. | |
6436 | if test "${with_zlib+set}" = set; then : | |
6437 | withval=$with_zlib; | |
6438 | else | |
6439 | with_zlib=auto | |
6440 | fi | |
6441 | ||
6442 | ||
6443 | if test "$with_zlib" != "no"; then | |
6444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
6445 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
6446 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6447 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
6448 | else |
6449 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
6451 | /* end confdefs.h. */ |
6452 | ||
81ecdfbb RW |
6453 | /* Override any GCC internal prototype to avoid an error. |
6454 | Use char because int might match the return type of a GCC | |
233a11ab | 6455 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
6456 | #ifdef __cplusplus |
6457 | extern "C" | |
6458 | #endif | |
233a11ab CS |
6459 | char zlibVersion (); |
6460 | int | |
6461 | main () | |
6462 | { | |
81ecdfbb | 6463 | return zlibVersion (); |
233a11ab CS |
6464 | ; |
6465 | return 0; | |
6466 | } | |
6467 | _ACEOF | |
81ecdfbb RW |
6468 | for ac_lib in '' z; do |
6469 | if test -z "$ac_lib"; then | |
6470 | ac_res="none required" | |
233a11ab | 6471 | else |
81ecdfbb RW |
6472 | ac_res=-l$ac_lib |
6473 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 6474 | fi |
81ecdfbb RW |
6475 | if ac_fn_c_try_link "$LINENO"; then : |
6476 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 6477 | fi |
81ecdfbb RW |
6478 | rm -f core conftest.err conftest.$ac_objext \ |
6479 | conftest$ac_exeext | |
6480 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6481 | break | |
233a11ab | 6482 | fi |
81ecdfbb RW |
6483 | done |
6484 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 6485 | |
233a11ab | 6486 | else |
81ecdfbb | 6487 | ac_cv_search_zlibVersion=no |
233a11ab | 6488 | fi |
81ecdfbb RW |
6489 | rm conftest.$ac_ext |
6490 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 6491 | fi |
81ecdfbb RW |
6492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
6493 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
6494 | ac_res=$ac_cv_search_zlibVersion | |
6495 | if test "$ac_res" != no; then : | |
6496 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6497 | for ac_header in zlib.h | |
6498 | do : | |
6499 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
6500 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 6501 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6502 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
6503 | _ACEOF |
6504 | ||
6505 | fi | |
6506 | ||
6507 | done | |
6508 | ||
6509 | fi | |
6510 | ||
b040ad30 JB |
6511 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
6512 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
6513 | fi | |
6514 | fi | |
6515 | ||
233a11ab | 6516 | |
77f120bf | 6517 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
6518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
6519 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
6520 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6521 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6522 | else |
6523 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6524 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6525 | /* end confdefs.h. */ |
c906108c | 6526 | |
81ecdfbb RW |
6527 | /* Override any GCC internal prototype to avoid an error. |
6528 | Use char because int might match the return type of a GCC | |
6529 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6530 | #ifdef __cplusplus |
6531 | extern "C" | |
6532 | #endif | |
77f120bf | 6533 | char dlgetmodinfo (); |
bec39cab AC |
6534 | int |
6535 | main () | |
6536 | { | |
81ecdfbb | 6537 | return dlgetmodinfo (); |
bec39cab AC |
6538 | ; |
6539 | return 0; | |
6540 | } | |
6541 | _ACEOF | |
81ecdfbb RW |
6542 | for ac_lib in '' dl xpdl; do |
6543 | if test -z "$ac_lib"; then | |
6544 | ac_res="none required" | |
6545 | else | |
6546 | ac_res=-l$ac_lib | |
b4e70030 | 6547 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6548 | fi |
6549 | if ac_fn_c_try_link "$LINENO"; then : | |
6550 | ac_cv_search_dlgetmodinfo=$ac_res | |
6551 | fi | |
6552 | rm -f core conftest.err conftest.$ac_objext \ | |
6553 | conftest$ac_exeext | |
6554 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6555 | break | |
6556 | fi | |
6557 | done | |
6558 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 6559 | |
4e8d927d | 6560 | else |
81ecdfbb | 6561 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 6562 | fi |
81ecdfbb | 6563 | rm conftest.$ac_ext |
bec39cab AC |
6564 | LIBS=$ac_func_search_save_LIBS |
6565 | fi | |
81ecdfbb RW |
6566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
6567 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
6568 | ac_res=$ac_cv_search_dlgetmodinfo | |
6569 | if test "$ac_res" != no; then : | |
6570 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 6571 | |
8bb2c122 | 6572 | fi |
8bb2c122 | 6573 | |
8bb2c122 | 6574 | |
77f120bf | 6575 | |
77f120bf | 6576 | |
6c7a06a3 | 6577 | |
81ecdfbb RW |
6578 | # Check whether --with-libiconv-prefix was given. |
6579 | if test "${with_libiconv_prefix+set}" = set; then : | |
6580 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 6581 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
6582 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
6583 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
6584 | done |
6585 | ||
81ecdfbb RW |
6586 | fi |
6587 | ||
6c7a06a3 | 6588 | |
f18c4681 | 6589 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
6590 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
6591 | ||
81ecdfbb RW |
6592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
6593 | $as_echo_n "checking for iconv... " >&6; } | |
6594 | if test "${am_cv_func_iconv+set}" = set; then : | |
6595 | $as_echo_n "(cached) " >&6 | |
d542061a | 6596 | else |
6c7a06a3 TT |
6597 | |
6598 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
6599 | am_cv_lib_iconv=no | |
6600 | am_cv_use_build_libiconv=no | |
f0f20949 | 6601 | am_cv_build_libiconv_path= |
4edb1e84 JB |
6602 | |
6603 | # If libiconv is part of the build tree, then try using it over | |
6604 | # any system iconv. | |
6605 | if test -d ../libiconv; then | |
f18c4681 JB |
6606 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
6607 | am_save_LIBS="$LIBS" | |
6608 | am_save_CPPFLAGS="$CPPFLAGS" | |
6609 | LIBS="$LIBS $lib_dir/libiconv.a" | |
6610 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
6611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 6612 | /* end confdefs.h. */ |
6c7a06a3 TT |
6613 | #include <stdlib.h> |
6614 | #include <iconv.h> | |
d542061a UW |
6615 | int |
6616 | main () | |
6617 | { | |
6c7a06a3 | 6618 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
6619 | iconv(cd,NULL,NULL,NULL,NULL); |
6620 | iconv_close(cd); | |
d542061a UW |
6621 | ; |
6622 | return 0; | |
6623 | } | |
6624 | _ACEOF | |
81ecdfbb | 6625 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6626 | am_cv_use_build_libiconv=yes |
f0f20949 | 6627 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
6628 | am_cv_lib_iconv=yes |
6629 | am_cv_func_iconv=yes | |
d542061a | 6630 | fi |
81ecdfbb RW |
6631 | rm -f core conftest.err conftest.$ac_objext \ |
6632 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
6633 | LIBS="$am_save_LIBS" |
6634 | CPPFLAGS="$am_save_CPPFLAGS" | |
6635 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
6636 | break |
6637 | fi | |
6638 | done | |
4edb1e84 | 6639 | fi |
94ae1714 | 6640 | |
4edb1e84 | 6641 | # Next, try to find iconv in libc. |
6c7a06a3 | 6642 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 6643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 6644 | /* end confdefs.h. */ |
6c7a06a3 TT |
6645 | #include <stdlib.h> |
6646 | #include <iconv.h> | |
d542061a UW |
6647 | int |
6648 | main () | |
6649 | { | |
6c7a06a3 TT |
6650 | iconv_t cd = iconv_open("",""); |
6651 | iconv(cd,NULL,NULL,NULL,NULL); | |
6652 | iconv_close(cd); | |
d542061a UW |
6653 | ; |
6654 | return 0; | |
6655 | } | |
6656 | _ACEOF | |
81ecdfbb | 6657 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6658 | am_cv_func_iconv=yes |
d542061a | 6659 | fi |
81ecdfbb RW |
6660 | rm -f core conftest.err conftest.$ac_objext \ |
6661 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 6662 | fi |
94ae1714 | 6663 | |
4edb1e84 JB |
6664 | # If iconv was not in libc, try -liconv. In this case, arrange to |
6665 | # look in the libiconv prefix, if it was specified by the user. | |
6666 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 6667 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
6668 | am_save_LIBS="$LIBS" |
6669 | if test -n "$LIBICONV_INCLUDE"; then | |
6670 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6671 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
6672 | fi | |
6673 | LIBS="$LIBS -liconv" | |
81ecdfbb | 6674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6675 | /* end confdefs.h. */ |
6c7a06a3 TT |
6676 | #include <stdlib.h> |
6677 | #include <iconv.h> | |
bec39cab AC |
6678 | int |
6679 | main () | |
6680 | { | |
6c7a06a3 TT |
6681 | iconv_t cd = iconv_open("",""); |
6682 | iconv(cd,NULL,NULL,NULL,NULL); | |
6683 | iconv_close(cd); | |
bec39cab AC |
6684 | ; |
6685 | return 0; | |
6686 | } | |
6687 | _ACEOF | |
81ecdfbb | 6688 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6689 | am_cv_lib_iconv=yes |
6c7a06a3 | 6690 | am_cv_func_iconv=yes |
627af7ea | 6691 | fi |
81ecdfbb RW |
6692 | rm -f core conftest.err conftest.$ac_objext \ |
6693 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 6694 | LIBS="$am_save_LIBS" |
fc3b640d | 6695 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
6696 | fi |
6697 | ||
6698 | fi | |
81ecdfbb RW |
6699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
6700 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
6701 | |
6702 | # Set the various flags based on the cache variables. We can't rely | |
6703 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
6704 | LIBICONV= |
6705 | if test "$am_cv_lib_iconv" = yes; then | |
6706 | LIBICONV="-liconv" | |
94ae1714 TT |
6707 | else |
6708 | LIBICONV_LIBDIR= | |
6709 | LIBICONV_INCLUDE= | |
fc3b640d TT |
6710 | fi |
6711 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 6712 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 6713 | LIBICONV_LIBDIR="" |
fc3b640d TT |
6714 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
6715 | fi | |
6716 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6717 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 6718 | |
6c7a06a3 TT |
6719 | if test "$am_cv_func_iconv" = yes; then |
6720 | ||
81ecdfbb | 6721 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 6722 | |
81ecdfbb RW |
6723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
6724 | $as_echo_n "checking for iconv declaration... " >&6; } | |
6725 | if test "${am_cv_proto_iconv+set}" = set; then : | |
6726 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6727 | else |
6728 | ||
81ecdfbb | 6729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6730 | /* end confdefs.h. */ |
6731 | ||
6c7a06a3 TT |
6732 | #include <stdlib.h> |
6733 | #include <iconv.h> | |
6734 | extern | |
b4e70030 | 6735 | #ifdef __cplusplus |
6c7a06a3 | 6736 | "C" |
b4e70030 | 6737 | #endif |
6c7a06a3 TT |
6738 | #if defined(__STDC__) || defined(__cplusplus) |
6739 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6740 | #else | |
6741 | size_t iconv(); | |
6742 | #endif | |
6743 | ||
b4e70030 JB |
6744 | int |
6745 | main () | |
6746 | { | |
6c7a06a3 | 6747 | |
b4e70030 JB |
6748 | ; |
6749 | return 0; | |
6750 | } | |
6751 | _ACEOF | |
81ecdfbb | 6752 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 6753 | am_cv_proto_iconv_arg1="" |
4e8d927d | 6754 | else |
81ecdfbb | 6755 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 6756 | fi |
81ecdfbb | 6757 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
6758 | 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);" |
6759 | fi | |
6760 | ||
6761 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 6762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 6763 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
6764 | $as_echo "${ac_t:- |
6765 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
6766 | |
6767 | cat >>confdefs.h <<_ACEOF | |
6768 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
6769 | _ACEOF | |
6770 | ||
6771 | fi | |
6c7a06a3 TT |
6772 | |
6773 | ||
478aac75 DE |
6774 | # GDB may fork/exec the iconv program to get the list of supported character |
6775 | # sets. Allow the user to specify where to find it. | |
6776 | # There are several factors affecting the choice of option name: | |
6777 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
6778 | # the build-time location of libiconv files. | |
6779 | # - The program we need to find is iconv, which comes with glibc. The user | |
6780 | # doesn't necessarily have libiconv installed. Therefore naming this | |
6781 | # --with-libiconv-foo feels wrong. | |
6782 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
6783 | # defined to work on directories not files (though it really doesn't know | |
6784 | # the difference). | |
6785 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
6786 | # with --with-libiconv-prefix. | |
6787 | # Putting these together is why the option name is --with-iconv-bin. | |
6788 | ||
6789 | ||
6790 | # Check whether --with-iconv-bin was given. | |
6791 | if test "${with_iconv_bin+set}" = set; then : | |
6792 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
6793 | ||
6794 | cat >>confdefs.h <<_ACEOF | |
6795 | #define ICONV_BIN "${iconv_bin}" | |
6796 | _ACEOF | |
6797 | ||
6798 | ||
6799 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
6800 | if test "x$prefix" = xNONE; then | |
6801 | test_prefix=/usr/local | |
6802 | else | |
6803 | test_prefix=$prefix | |
6804 | fi | |
6805 | else | |
6806 | test_prefix=$exec_prefix | |
6807 | fi | |
6808 | value=0 | |
6809 | case ${iconv_bin} in | |
6810 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6811 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6812 | value=1 | |
6813 | ;; | |
6814 | esac | |
6815 | ||
6816 | cat >>confdefs.h <<_ACEOF | |
6817 | #define ICONV_BIN_RELOCATABLE $value | |
6818 | _ACEOF | |
6819 | ||
6820 | ||
6821 | ||
6822 | fi | |
6823 | ||
6824 | ||
6c7a06a3 TT |
6825 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
6826 | # There is a very specific comment in /usr/include/curses.h explaining that | |
6827 | # termcap routines built into libcurses must not be used. | |
6828 | # | |
6829 | # The symptoms we observed so far is GDB unexpectedly changing | |
6830 | # the terminal settings when tgetent is called - this is particularly | |
6831 | # visible as the output is missing carriage returns, and so rapidly | |
6832 | # becomes very hard to read. | |
6833 | # | |
6834 | # The readline configure script has already decided that libtermcap | |
6835 | # was enough for its purposes, and so decided to build readline using | |
6836 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
6837 | # TUI enabled results in both libraries to be used at the same time, | |
6838 | # which is not allowed. This basically means that GDB with TUI is | |
6839 | # broken on alpha-osf. | |
6840 | ||
6841 | case $host_os in | |
6bcc772d RO |
6842 | osf* ) |
6843 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6844 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 6845 | fi |
6bcc772d | 6846 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
6847 | enable_tui=no |
6848 | fi | |
6849 | ;; | |
6850 | esac | |
6851 | ||
cb01cfba | 6852 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 6853 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
6854 | prefer_curses=yes |
6855 | fi | |
6856 | ||
6857 | curses_found=no | |
6858 | if test x"$prefer_curses" = xyes; then | |
6859 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
6860 | # curses library because the latter might not provide all the | |
6861 | # functionality we need. However, this leads to problems on systems | |
6862 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
6863 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
6864 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
6865 | # a situation. | |
81ecdfbb RW |
6866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
6867 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
6868 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6869 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6870 | else |
6871 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6872 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6873 | /* end confdefs.h. */ |
6874 | ||
81ecdfbb RW |
6875 | /* Override any GCC internal prototype to avoid an error. |
6876 | Use char because int might match the return type of a GCC | |
6877 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6878 | #ifdef __cplusplus |
6879 | extern "C" | |
6880 | #endif | |
6c7a06a3 TT |
6881 | char waddstr (); |
6882 | int | |
6883 | main () | |
6884 | { | |
81ecdfbb | 6885 | return waddstr (); |
6c7a06a3 TT |
6886 | ; |
6887 | return 0; | |
6888 | } | |
6889 | _ACEOF | |
81ecdfbb RW |
6890 | for ac_lib in '' ncurses cursesX curses; do |
6891 | if test -z "$ac_lib"; then | |
6892 | ac_res="none required" | |
6893 | else | |
6894 | ac_res=-l$ac_lib | |
6895 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6896 | fi | |
6897 | if ac_fn_c_try_link "$LINENO"; then : | |
6898 | ac_cv_search_waddstr=$ac_res | |
6899 | fi | |
6900 | rm -f core conftest.err conftest.$ac_objext \ | |
6901 | conftest$ac_exeext | |
6902 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6903 | break | |
6904 | fi | |
6905 | done | |
6906 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6907 | ||
6c7a06a3 | 6908 | else |
81ecdfbb RW |
6909 | ac_cv_search_waddstr=no |
6910 | fi | |
6911 | rm conftest.$ac_ext | |
6912 | LIBS=$ac_func_search_save_LIBS | |
6913 | fi | |
6914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
6915 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
6916 | ac_res=$ac_cv_search_waddstr | |
6917 | if test "$ac_res" != no; then : | |
6918 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
6919 | |
6920 | fi | |
6921 | ||
6922 | ||
cb01cfba JB |
6923 | if test "$ac_cv_search_waddstr" != no; then |
6924 | curses_found=yes | |
6925 | fi | |
6926 | fi | |
6927 | ||
6928 | # Check whether we should enable the TUI, but only do so if we really | |
6929 | # can. | |
6930 | if test x"$enable_tui" != xno; then | |
6931 | if test -d $srcdir/tui; then | |
6932 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
6933 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
6934 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
6935 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
6936 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
6937 | else |
6938 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6939 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 6940 | else |
81ecdfbb RW |
6941 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
6942 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
6943 | fi |
6944 | fi | |
6945 | fi | |
6946 | fi | |
6947 | ||
6948 | # Since GDB uses Readline, we need termcap functionality. In many | |
6949 | # cases this will be provided by the curses library, but some systems | |
6950 | # have a seperate termcap library, or no curses library at all. | |
6951 | ||
6952 | case $host_os in | |
6953 | cygwin*) | |
6954 | if test -d $srcdir/libtermcap; then | |
6955 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
6956 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
6957 | fi ;; | |
6958 | go32* | *djgpp*) | |
6959 | ac_cv_search_tgetent="none required" | |
6960 | ;; | |
6961 | *mingw32*) | |
6962 | ac_cv_search_tgetent="none required" | |
6963 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
6964 | ;; | |
6965 | esac | |
6966 | ||
6967 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
6968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
6969 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
6970 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6971 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6972 | else |
6973 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6975 | /* end confdefs.h. */ |
6976 | ||
81ecdfbb RW |
6977 | /* Override any GCC internal prototype to avoid an error. |
6978 | Use char because int might match the return type of a GCC | |
6979 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6980 | #ifdef __cplusplus |
6981 | extern "C" | |
6982 | #endif | |
6c7a06a3 TT |
6983 | char tgetent (); |
6984 | int | |
6985 | main () | |
6986 | { | |
81ecdfbb | 6987 | return tgetent (); |
6c7a06a3 TT |
6988 | ; |
6989 | return 0; | |
6990 | } | |
6991 | _ACEOF | |
81ecdfbb RW |
6992 | for ac_lib in '' termcap tinfo curses ncurses; do |
6993 | if test -z "$ac_lib"; then | |
6994 | ac_res="none required" | |
6995 | else | |
6996 | ac_res=-l$ac_lib | |
6c7a06a3 | 6997 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6998 | fi |
6999 | if ac_fn_c_try_link "$LINENO"; then : | |
7000 | ac_cv_search_tgetent=$ac_res | |
7001 | fi | |
7002 | rm -f core conftest.err conftest.$ac_objext \ | |
7003 | conftest$ac_exeext | |
7004 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7005 | break | |
7006 | fi | |
7007 | done | |
7008 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 7009 | |
6c7a06a3 | 7010 | else |
81ecdfbb | 7011 | ac_cv_search_tgetent=no |
6c7a06a3 | 7012 | fi |
81ecdfbb | 7013 | rm conftest.$ac_ext |
6c7a06a3 TT |
7014 | LIBS=$ac_func_search_save_LIBS |
7015 | fi | |
81ecdfbb RW |
7016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7017 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7018 | ac_res=$ac_cv_search_tgetent | |
7019 | if test "$ac_res" != no; then : | |
7020 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7021 | |
06825bd1 MK |
7022 | fi |
7023 | ||
06825bd1 | 7024 | |
bec39cab | 7025 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 7026 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
7027 | fi |
7028 | ||
3841debe | 7029 | |
81ecdfbb RW |
7030 | # Check whether --with-system-readline was given. |
7031 | if test "${with_system_readline+set}" = set; then : | |
7032 | withval=$with_system_readline; | |
7033 | fi | |
6a30b0a5 | 7034 | |
6a30b0a5 AS |
7035 | |
7036 | if test "$with_system_readline" = yes; then | |
7037 | READLINE=-lreadline | |
7038 | READLINE_DEPS= | |
7039 | READLINE_CFLAGS= | |
39037522 | 7040 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7041 | else |
7042 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7043 | READLINE_DEPS='$(READLINE)' | |
7044 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7045 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7046 | fi |
7047 | ||
7048 | ||
7049 | ||
7050 | ||
7051 | ||
f997c383 SD |
7052 | # Generate jit-reader.h |
7053 | ||
7054 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7055 | TARGET_PTR= | |
7056 | ||
7057 | # The cast to long int works around a bug in the HP C Compiler | |
7058 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7059 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7060 | # This bug is HP SR number 8606223364. | |
7061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7062 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7063 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7064 | $as_echo_n "(cached) " >&6 | |
7065 | else | |
7066 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7067 | ||
7068 | else | |
7069 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7070 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7071 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7072 | { as_fn_set_status 77 | |
7073 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7074 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7075 | else | |
7076 | ac_cv_sizeof_unsigned_long_long=0 | |
7077 | fi | |
7078 | fi | |
7079 | ||
7080 | fi | |
7081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7082 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7083 | ||
7084 | ||
7085 | ||
7086 | cat >>confdefs.h <<_ACEOF | |
7087 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7088 | _ACEOF | |
7089 | ||
7090 | ||
7091 | # The cast to long int works around a bug in the HP C Compiler | |
7092 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7093 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7094 | # This bug is HP SR number 8606223364. | |
7095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7096 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7097 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7098 | $as_echo_n "(cached) " >&6 | |
7099 | else | |
7100 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7101 | ||
7102 | else | |
7103 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7104 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7105 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7106 | { as_fn_set_status 77 | |
7107 | as_fn_error "cannot compute sizeof (unsigned long) | |
7108 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7109 | else | |
7110 | ac_cv_sizeof_unsigned_long=0 | |
7111 | fi | |
7112 | fi | |
7113 | ||
7114 | fi | |
7115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7116 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7117 | ||
7118 | ||
7119 | ||
7120 | cat >>confdefs.h <<_ACEOF | |
7121 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7122 | _ACEOF | |
7123 | ||
7124 | ||
7125 | # The cast to long int works around a bug in the HP C Compiler | |
7126 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7127 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7128 | # This bug is HP SR number 8606223364. | |
7129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7130 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7131 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7132 | $as_echo_n "(cached) " >&6 | |
7133 | else | |
7134 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7135 | ||
7136 | else | |
7137 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7138 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7139 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7140 | { as_fn_set_status 77 | |
7141 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7142 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7143 | else | |
7144 | ac_cv_sizeof_unsigned___int128=0 | |
7145 | fi | |
7146 | fi | |
7147 | ||
7148 | fi | |
7149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7150 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7151 | ||
7152 | ||
7153 | ||
7154 | cat >>confdefs.h <<_ACEOF | |
7155 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7156 | _ACEOF | |
7157 | ||
7158 | ||
7159 | ||
7160 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7161 | TARGET_PTR="unsigned long" | |
7162 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7163 | TARGET_PTR="unsigned long long" | |
7164 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7165 | TARGET_PTR="unsigned __int128" | |
7166 | else | |
7167 | TARGET_PTR="unsigned long" | |
7168 | fi | |
7169 | ||
7170 | ||
7171 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7172 | ||
7173 | ||
a2d08b9e SD |
7174 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7175 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7176 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7177 | $as_echo_n "(cached) " >&6 | |
7178 | else | |
7179 | ac_func_search_save_LIBS=$LIBS | |
7180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7181 | /* end confdefs.h. */ | |
7182 | ||
7183 | /* Override any GCC internal prototype to avoid an error. | |
7184 | Use char because int might match the return type of a GCC | |
7185 | builtin and then its argument prototype would still apply. */ | |
7186 | #ifdef __cplusplus | |
7187 | extern "C" | |
7188 | #endif | |
7189 | char dlopen (); | |
7190 | int | |
7191 | main () | |
7192 | { | |
7193 | return dlopen (); | |
7194 | ; | |
7195 | return 0; | |
7196 | } | |
7197 | _ACEOF | |
7198 | for ac_lib in '' dl; do | |
7199 | if test -z "$ac_lib"; then | |
7200 | ac_res="none required" | |
7201 | else | |
7202 | ac_res=-l$ac_lib | |
7203 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7204 | fi | |
7205 | if ac_fn_c_try_link "$LINENO"; then : | |
7206 | ac_cv_search_dlopen=$ac_res | |
7207 | fi | |
7208 | rm -f core conftest.err conftest.$ac_objext \ | |
7209 | conftest$ac_exeext | |
7210 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7211 | break | |
7212 | fi | |
7213 | done | |
7214 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7215 | ||
7216 | else | |
7217 | ac_cv_search_dlopen=no | |
7218 | fi | |
7219 | rm conftest.$ac_ext | |
7220 | LIBS=$ac_func_search_save_LIBS | |
7221 | fi | |
7222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7223 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7224 | ac_res=$ac_cv_search_dlopen | |
7225 | if test "$ac_res" != no; then : | |
7226 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7227 | ||
7228 | fi | |
7229 | ||
7230 | ||
39037522 | 7231 | |
b8e0a31c SD |
7232 | |
7233 | # Check whether --with-jit-reader-dir was given. | |
7234 | if test "${with_jit_reader_dir+set}" = set; then : | |
7235 | withval=$with_jit_reader_dir; | |
7236 | JIT_READER_DIR=$withval | |
7237 | else | |
7238 | JIT_READER_DIR=${libdir}/gdb | |
7239 | fi | |
7240 | ||
7241 | ||
7242 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7243 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7244 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7245 | ac_define_dir=`eval echo $ac_define_dir` | |
7246 | ||
7247 | cat >>confdefs.h <<_ACEOF | |
7248 | #define JIT_READER_DIR "$ac_define_dir" | |
7249 | _ACEOF | |
7250 | ||
7251 | ||
7252 | ||
7253 | ||
7254 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7255 | if test "x$prefix" = xNONE; then | |
7256 | test_prefix=/usr/local | |
7257 | else | |
7258 | test_prefix=$prefix | |
7259 | fi | |
7260 | else | |
7261 | test_prefix=$exec_prefix | |
7262 | fi | |
7263 | value=0 | |
7264 | case ${ac_define_dir} in | |
7265 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7266 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7267 | value=1 | |
7268 | ;; | |
7269 | esac | |
7270 | ||
7271 | cat >>confdefs.h <<_ACEOF | |
7272 | #define JIT_READER_DIR_RELOCATABLE $value | |
7273 | _ACEOF | |
7274 | ||
7275 | ||
7276 | ||
7277 | ||
7278 | ||
81ecdfbb RW |
7279 | # Check whether --with-expat was given. |
7280 | if test "${with_expat+set}" = set; then : | |
7281 | withval=$with_expat; | |
5c39566f DJ |
7282 | else |
7283 | with_expat=auto | |
81ecdfbb RW |
7284 | fi |
7285 | ||
7286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7287 | $as_echo_n "checking whether to use expat... " >&6; } | |
7288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7289 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7290 | |
7291 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7292 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7293 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7294 | HAVE_LIBEXPAT=no |
7295 | else | |
7296 | ||
3841debe DJ |
7297 | if test "X$prefix" = "XNONE"; then |
7298 | acl_final_prefix="$ac_default_prefix" | |
7299 | else | |
7300 | acl_final_prefix="$prefix" | |
7301 | fi | |
7302 | if test "X$exec_prefix" = "XNONE"; then | |
7303 | acl_final_exec_prefix='${prefix}' | |
7304 | else | |
7305 | acl_final_exec_prefix="$exec_prefix" | |
7306 | fi | |
7307 | acl_save_prefix="$prefix" | |
7308 | prefix="$acl_final_prefix" | |
7309 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7310 | prefix="$acl_save_prefix" | |
7311 | ||
7312 | ||
81ecdfbb RW |
7313 | # Check whether --with-gnu-ld was given. |
7314 | if test "${with_gnu_ld+set}" = set; then : | |
7315 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7316 | else |
7317 | with_gnu_ld=no | |
81ecdfbb RW |
7318 | fi |
7319 | ||
3841debe DJ |
7320 | # Prepare PATH_SEPARATOR. |
7321 | # The user is always right. | |
7322 | if test "${PATH_SEPARATOR+set}" != set; then | |
7323 | echo "#! /bin/sh" >conf$$.sh | |
7324 | echo "exit 0" >>conf$$.sh | |
7325 | chmod +x conf$$.sh | |
7326 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7327 | PATH_SEPARATOR=';' | |
7328 | else | |
7329 | PATH_SEPARATOR=: | |
7330 | fi | |
7331 | rm -f conf$$.sh | |
7332 | fi | |
7333 | ac_prog=ld | |
7334 | if test "$GCC" = yes; then | |
7335 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7337 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7338 | case $host in |
7339 | *-*-mingw*) | |
7340 | # gcc leaves a trailing carriage return which upsets mingw | |
7341 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7342 | *) | |
7343 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7344 | esac | |
7345 | case $ac_prog in | |
7346 | # Accept absolute paths. | |
7347 | [\\/]* | [A-Za-z]:[\\/]*) | |
7348 | re_direlt='/[^/][^/]*/\.\./' | |
7349 | # Canonicalize the path of ld | |
7350 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7351 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7352 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7353 | done | |
7354 | test -z "$LD" && LD="$ac_prog" | |
7355 | ;; | |
7356 | "") | |
7357 | # If it fails, then pretend we aren't using GCC. | |
7358 | ac_prog=ld | |
7359 | ;; | |
7360 | *) | |
7361 | # If it is relative, then search for the first ld in PATH. | |
7362 | with_gnu_ld=unknown | |
7363 | ;; | |
7364 | esac | |
7365 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7367 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7368 | else |
81ecdfbb RW |
7369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7370 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7371 | fi |
81ecdfbb RW |
7372 | if test "${acl_cv_path_LD+set}" = set; then : |
7373 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7374 | else |
7375 | if test -z "$LD"; then | |
7376 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7377 | for ac_dir in $PATH; do | |
7378 | test -z "$ac_dir" && ac_dir=. | |
7379 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7380 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7381 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7382 | # but apparently some GNU ld's only accept -v. | |
7383 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7384 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7385 | test "$with_gnu_ld" != no && break | |
7386 | else | |
7387 | test "$with_gnu_ld" != yes && break | |
7388 | fi | |
7389 | fi | |
7390 | done | |
7391 | IFS="$ac_save_ifs" | |
7392 | else | |
7393 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7394 | fi | |
7395 | fi | |
7396 | ||
7397 | LD="$acl_cv_path_LD" | |
7398 | if test -n "$LD"; then | |
81ecdfbb RW |
7399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7400 | $as_echo "$LD" >&6; } | |
3841debe | 7401 | else |
81ecdfbb RW |
7402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7403 | $as_echo "no" >&6; } | |
3841debe | 7404 | fi |
81ecdfbb RW |
7405 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7407 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7408 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7409 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7410 | else |
7411 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7412 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7413 | acl_cv_prog_gnu_ld=yes | |
7414 | else | |
7415 | acl_cv_prog_gnu_ld=no | |
7416 | fi | |
7417 | fi | |
81ecdfbb RW |
7418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7419 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7420 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7421 | ||
7422 | ||
7423 | ||
81ecdfbb RW |
7424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7425 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7426 | if test "${acl_cv_rpath+set}" = set; then : | |
7427 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7428 | else |
7429 | ||
7430 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7431 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7432 | . ./conftest.sh | |
7433 | rm -f ./conftest.sh | |
7434 | acl_cv_rpath=done | |
7435 | ||
7436 | fi | |
81ecdfbb RW |
7437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7438 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7439 | wl="$acl_cv_wl" |
7440 | libext="$acl_cv_libext" | |
7441 | shlibext="$acl_cv_shlibext" | |
7442 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7443 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7444 | hardcode_direct="$acl_cv_hardcode_direct" | |
7445 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7446 | # Check whether --enable-rpath was given. |
7447 | if test "${enable_rpath+set}" = set; then : | |
7448 | enableval=$enable_rpath; : | |
3841debe DJ |
7449 | else |
7450 | enable_rpath=yes | |
81ecdfbb RW |
7451 | fi |
7452 | ||
3841debe DJ |
7453 | |
7454 | ||
7455 | ||
7456 | ||
7457 | ||
7458 | ||
7459 | ||
7460 | ||
7461 | ||
7462 | use_additional=yes | |
7463 | ||
7464 | acl_save_prefix="$prefix" | |
7465 | prefix="$acl_final_prefix" | |
7466 | acl_save_exec_prefix="$exec_prefix" | |
7467 | exec_prefix="$acl_final_exec_prefix" | |
7468 | ||
7469 | eval additional_includedir=\"$includedir\" | |
7470 | eval additional_libdir=\"$libdir\" | |
7471 | ||
7472 | exec_prefix="$acl_save_exec_prefix" | |
7473 | prefix="$acl_save_prefix" | |
7474 | ||
7475 | ||
81ecdfbb RW |
7476 | # Check whether --with-libexpat-prefix was given. |
7477 | if test "${with_libexpat_prefix+set}" = set; then : | |
7478 | withval=$with_libexpat_prefix; | |
3841debe DJ |
7479 | if test "X$withval" = "Xno"; then |
7480 | use_additional=no | |
7481 | else | |
7482 | if test "X$withval" = "X"; then | |
7483 | ||
7484 | acl_save_prefix="$prefix" | |
7485 | prefix="$acl_final_prefix" | |
7486 | acl_save_exec_prefix="$exec_prefix" | |
7487 | exec_prefix="$acl_final_exec_prefix" | |
7488 | ||
7489 | eval additional_includedir=\"$includedir\" | |
7490 | eval additional_libdir=\"$libdir\" | |
7491 | ||
7492 | exec_prefix="$acl_save_exec_prefix" | |
7493 | prefix="$acl_save_prefix" | |
7494 | ||
7495 | else | |
7496 | additional_includedir="$withval/include" | |
7497 | additional_libdir="$withval/lib" | |
7498 | fi | |
7499 | fi | |
7500 | ||
81ecdfbb RW |
7501 | fi |
7502 | ||
3841debe DJ |
7503 | LIBEXPAT= |
7504 | LTLIBEXPAT= | |
7505 | INCEXPAT= | |
7506 | rpathdirs= | |
7507 | ltrpathdirs= | |
7508 | names_already_handled= | |
7509 | names_next_round='expat ' | |
7510 | while test -n "$names_next_round"; do | |
7511 | names_this_round="$names_next_round" | |
7512 | names_next_round= | |
7513 | for name in $names_this_round; do | |
7514 | already_handled= | |
7515 | for n in $names_already_handled; do | |
7516 | if test "$n" = "$name"; then | |
7517 | already_handled=yes | |
7518 | break | |
7519 | fi | |
7520 | done | |
7521 | if test -z "$already_handled"; then | |
7522 | names_already_handled="$names_already_handled $name" | |
7523 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7524 | eval value=\"\$HAVE_LIB$uppername\" | |
7525 | if test -n "$value"; then | |
7526 | if test "$value" = yes; then | |
7527 | eval value=\"\$LIB$uppername\" | |
7528 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
7529 | eval value=\"\$LTLIB$uppername\" | |
7530 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
7531 | else | |
7532 | : | |
7533 | fi | |
7534 | else | |
7535 | found_dir= | |
7536 | found_la= | |
7537 | found_so= | |
7538 | found_a= | |
7539 | if test $use_additional = yes; then | |
7540 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7541 | found_dir="$additional_libdir" | |
7542 | found_so="$additional_libdir/lib$name.$shlibext" | |
7543 | if test -f "$additional_libdir/lib$name.la"; then | |
7544 | found_la="$additional_libdir/lib$name.la" | |
7545 | fi | |
7546 | else | |
7547 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7548 | found_dir="$additional_libdir" | |
7549 | found_a="$additional_libdir/lib$name.$libext" | |
7550 | if test -f "$additional_libdir/lib$name.la"; then | |
7551 | found_la="$additional_libdir/lib$name.la" | |
7552 | fi | |
7553 | fi | |
7554 | fi | |
7555 | fi | |
7556 | if test "X$found_dir" = "X"; then | |
7557 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7558 | ||
7559 | acl_save_prefix="$prefix" | |
7560 | prefix="$acl_final_prefix" | |
7561 | acl_save_exec_prefix="$exec_prefix" | |
7562 | exec_prefix="$acl_final_exec_prefix" | |
7563 | eval x=\"$x\" | |
7564 | exec_prefix="$acl_save_exec_prefix" | |
7565 | prefix="$acl_save_prefix" | |
7566 | ||
7567 | case "$x" in | |
7568 | -L*) | |
7569 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7570 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7571 | found_dir="$dir" | |
7572 | found_so="$dir/lib$name.$shlibext" | |
7573 | if test -f "$dir/lib$name.la"; then | |
7574 | found_la="$dir/lib$name.la" | |
7575 | fi | |
7576 | else | |
7577 | if test -f "$dir/lib$name.$libext"; then | |
7578 | found_dir="$dir" | |
7579 | found_a="$dir/lib$name.$libext" | |
7580 | if test -f "$dir/lib$name.la"; then | |
7581 | found_la="$dir/lib$name.la" | |
7582 | fi | |
7583 | fi | |
7584 | fi | |
7585 | ;; | |
7586 | esac | |
7587 | if test "X$found_dir" != "X"; then | |
7588 | break | |
7589 | fi | |
7590 | done | |
7591 | fi | |
7592 | if test "X$found_dir" != "X"; then | |
7593 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
7594 | if test "X$found_so" != "X"; then | |
7595 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7596 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7597 | else | |
7598 | haveit= | |
7599 | for x in $ltrpathdirs; do | |
7600 | if test "X$x" = "X$found_dir"; then | |
7601 | haveit=yes | |
7602 | break | |
7603 | fi | |
7604 | done | |
7605 | if test -z "$haveit"; then | |
7606 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7607 | fi | |
7608 | if test "$hardcode_direct" = yes; then | |
7609 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7610 | else | |
7611 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7612 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7613 | haveit= | |
7614 | for x in $rpathdirs; do | |
7615 | if test "X$x" = "X$found_dir"; then | |
7616 | haveit=yes | |
7617 | break | |
7618 | fi | |
7619 | done | |
7620 | if test -z "$haveit"; then | |
7621 | rpathdirs="$rpathdirs $found_dir" | |
7622 | fi | |
7623 | else | |
7624 | haveit= | |
7625 | for x in $LDFLAGS $LIBEXPAT; do | |
7626 | ||
7627 | acl_save_prefix="$prefix" | |
7628 | prefix="$acl_final_prefix" | |
7629 | acl_save_exec_prefix="$exec_prefix" | |
7630 | exec_prefix="$acl_final_exec_prefix" | |
7631 | eval x=\"$x\" | |
7632 | exec_prefix="$acl_save_exec_prefix" | |
7633 | prefix="$acl_save_prefix" | |
7634 | ||
7635 | if test "X$x" = "X-L$found_dir"; then | |
7636 | haveit=yes | |
7637 | break | |
7638 | fi | |
7639 | done | |
7640 | if test -z "$haveit"; then | |
7641 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
7642 | fi | |
7643 | if test "$hardcode_minus_L" != no; then | |
7644 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7645 | else | |
7646 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7647 | fi | |
7648 | fi | |
7649 | fi | |
7650 | fi | |
7651 | else | |
7652 | if test "X$found_a" != "X"; then | |
7653 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
7654 | else | |
7655 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
7656 | fi | |
7657 | fi | |
7658 | additional_includedir= | |
7659 | case "$found_dir" in | |
7660 | */lib | */lib/) | |
7661 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7662 | additional_includedir="$basedir/include" | |
7663 | ;; | |
7664 | esac | |
7665 | if test "X$additional_includedir" != "X"; then | |
7666 | if test "X$additional_includedir" != "X/usr/include"; then | |
7667 | haveit= | |
7668 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7669 | if test -n "$GCC"; then | |
7670 | case $host_os in | |
7671 | linux*) haveit=yes;; | |
7672 | esac | |
7673 | fi | |
7674 | fi | |
7675 | if test -z "$haveit"; then | |
7676 | for x in $CPPFLAGS $INCEXPAT; do | |
7677 | ||
7678 | acl_save_prefix="$prefix" | |
7679 | prefix="$acl_final_prefix" | |
7680 | acl_save_exec_prefix="$exec_prefix" | |
7681 | exec_prefix="$acl_final_exec_prefix" | |
7682 | eval x=\"$x\" | |
7683 | exec_prefix="$acl_save_exec_prefix" | |
7684 | prefix="$acl_save_prefix" | |
7685 | ||
7686 | if test "X$x" = "X-I$additional_includedir"; then | |
7687 | haveit=yes | |
7688 | break | |
7689 | fi | |
7690 | done | |
7691 | if test -z "$haveit"; then | |
7692 | if test -d "$additional_includedir"; then | |
7693 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
7694 | fi | |
7695 | fi | |
7696 | fi | |
7697 | fi | |
7698 | fi | |
7699 | if test -n "$found_la"; then | |
7700 | save_libdir="$libdir" | |
7701 | case "$found_la" in | |
7702 | */* | *\\*) . "$found_la" ;; | |
7703 | *) . "./$found_la" ;; | |
7704 | esac | |
7705 | libdir="$save_libdir" | |
7706 | for dep in $dependency_libs; do | |
7707 | case "$dep" in | |
7708 | -L*) | |
7709 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7710 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7711 | haveit= | |
7712 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7713 | if test -n "$GCC"; then | |
7714 | case $host_os in | |
7715 | linux*) haveit=yes;; | |
7716 | esac | |
7717 | fi | |
7718 | fi | |
7719 | if test -z "$haveit"; then | |
7720 | haveit= | |
7721 | for x in $LDFLAGS $LIBEXPAT; do | |
7722 | ||
7723 | acl_save_prefix="$prefix" | |
7724 | prefix="$acl_final_prefix" | |
7725 | acl_save_exec_prefix="$exec_prefix" | |
7726 | exec_prefix="$acl_final_exec_prefix" | |
7727 | eval x=\"$x\" | |
7728 | exec_prefix="$acl_save_exec_prefix" | |
7729 | prefix="$acl_save_prefix" | |
7730 | ||
7731 | if test "X$x" = "X-L$additional_libdir"; then | |
7732 | haveit=yes | |
7733 | break | |
7734 | fi | |
7735 | done | |
7736 | if test -z "$haveit"; then | |
7737 | if test -d "$additional_libdir"; then | |
7738 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
7739 | fi | |
7740 | fi | |
7741 | haveit= | |
7742 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7743 | ||
7744 | acl_save_prefix="$prefix" | |
7745 | prefix="$acl_final_prefix" | |
7746 | acl_save_exec_prefix="$exec_prefix" | |
7747 | exec_prefix="$acl_final_exec_prefix" | |
7748 | eval x=\"$x\" | |
7749 | exec_prefix="$acl_save_exec_prefix" | |
7750 | prefix="$acl_save_prefix" | |
7751 | ||
7752 | if test "X$x" = "X-L$additional_libdir"; then | |
7753 | haveit=yes | |
7754 | break | |
7755 | fi | |
7756 | done | |
7757 | if test -z "$haveit"; then | |
7758 | if test -d "$additional_libdir"; then | |
7759 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
7760 | fi | |
7761 | fi | |
7762 | fi | |
7763 | fi | |
7764 | ;; | |
7765 | -R*) | |
7766 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7767 | if test "$enable_rpath" != no; then | |
7768 | haveit= | |
7769 | for x in $rpathdirs; do | |
7770 | if test "X$x" = "X$dir"; then | |
7771 | haveit=yes | |
7772 | break | |
7773 | fi | |
7774 | done | |
7775 | if test -z "$haveit"; then | |
7776 | rpathdirs="$rpathdirs $dir" | |
7777 | fi | |
7778 | haveit= | |
7779 | for x in $ltrpathdirs; do | |
7780 | if test "X$x" = "X$dir"; then | |
7781 | haveit=yes | |
7782 | break | |
7783 | fi | |
7784 | done | |
7785 | if test -z "$haveit"; then | |
7786 | ltrpathdirs="$ltrpathdirs $dir" | |
7787 | fi | |
7788 | fi | |
7789 | ;; | |
7790 | -l*) | |
7791 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
7792 | ;; | |
7793 | *.la) | |
7794 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
7795 | ;; | |
7796 | *) | |
7797 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
7798 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
7799 | ;; | |
81ecdfbb RW |
7800 | esac |
7801 | done | |
7802 | fi | |
7803 | else | |
7804 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7805 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
7806 | fi | |
7807 | fi | |
7808 | fi | |
7809 | done | |
7810 | done | |
7811 | if test "X$rpathdirs" != "X"; then | |
7812 | if test -n "$hardcode_libdir_separator"; then | |
7813 | alldirs= | |
7814 | for found_dir in $rpathdirs; do | |
7815 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
7816 | done | |
7817 | acl_save_libdir="$libdir" | |
7818 | libdir="$alldirs" | |
7819 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7820 | libdir="$acl_save_libdir" | |
7821 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7822 | else | |
7823 | for found_dir in $rpathdirs; do | |
7824 | acl_save_libdir="$libdir" | |
7825 | libdir="$found_dir" | |
7826 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7827 | libdir="$acl_save_libdir" | |
7828 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7829 | done | |
7830 | fi | |
7831 | fi | |
7832 | if test "X$ltrpathdirs" != "X"; then | |
7833 | for found_dir in $ltrpathdirs; do | |
7834 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
7835 | done | |
7836 | fi | |
a9322a30 TT |
7837 | |
7838 | ||
81ecdfbb | 7839 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 7840 | |
81ecdfbb RW |
7841 | for element in $INCEXPAT; do |
7842 | haveit= | |
7843 | for x in $CPPFLAGS; do | |
a9322a30 | 7844 | |
81ecdfbb RW |
7845 | acl_save_prefix="$prefix" |
7846 | prefix="$acl_final_prefix" | |
7847 | acl_save_exec_prefix="$exec_prefix" | |
7848 | exec_prefix="$acl_final_exec_prefix" | |
7849 | eval x=\"$x\" | |
7850 | exec_prefix="$acl_save_exec_prefix" | |
7851 | prefix="$acl_save_prefix" | |
a8111142 | 7852 | |
81ecdfbb RW |
7853 | if test "X$x" = "X$element"; then |
7854 | haveit=yes | |
7855 | break | |
7856 | fi | |
7857 | done | |
7858 | if test -z "$haveit"; then | |
7859 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
7860 | fi | |
7861 | done | |
a9322a30 TT |
7862 | |
7863 | ||
81ecdfbb RW |
7864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
7865 | $as_echo_n "checking for libexpat... " >&6; } | |
7866 | if test "${ac_cv_libexpat+set}" = set; then : | |
7867 | $as_echo_n "(cached) " >&6 | |
bec39cab | 7868 | else |
bec39cab | 7869 | |
81ecdfbb RW |
7870 | ac_save_LIBS="$LIBS" |
7871 | LIBS="$LIBS $LIBEXPAT" | |
7872 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 7873 | /* end confdefs.h. */ |
81ecdfbb RW |
7874 | #include "expat.h" |
7875 | int | |
7876 | main () | |
7877 | { | |
7878 | XML_Parser p = XML_ParserCreate (0); | |
7879 | ; | |
7880 | return 0; | |
7881 | } | |
bec39cab | 7882 | _ACEOF |
81ecdfbb RW |
7883 | if ac_fn_c_try_link "$LINENO"; then : |
7884 | ac_cv_libexpat=yes | |
c906108c | 7885 | else |
81ecdfbb | 7886 | ac_cv_libexpat=no |
bec39cab | 7887 | fi |
81ecdfbb RW |
7888 | rm -f core conftest.err conftest.$ac_objext \ |
7889 | conftest$ac_exeext conftest.$ac_ext | |
7890 | LIBS="$ac_save_LIBS" | |
c906108c | 7891 | |
95ca63c4 | 7892 | fi |
81ecdfbb RW |
7893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
7894 | $as_echo "$ac_cv_libexpat" >&6; } | |
7895 | if test "$ac_cv_libexpat" = yes; then | |
7896 | HAVE_LIBEXPAT=yes | |
bec39cab | 7897 | |
81ecdfbb | 7898 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 7899 | |
81ecdfbb RW |
7900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
7901 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
7902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
7903 | $as_echo "$LIBEXPAT" >&6; } | |
7904 | else | |
7905 | HAVE_LIBEXPAT=no | |
7906 | CPPFLAGS="$ac_save_CPPFLAGS" | |
7907 | LIBEXPAT= | |
7908 | LTLIBEXPAT= | |
7909 | fi | |
95ca63c4 CF |
7910 | |
7911 | ||
7912 | ||
7cb9022a MK |
7913 | |
7914 | ||
bec39cab | 7915 | |
81ecdfbb RW |
7916 | if test "$HAVE_LIBEXPAT" != yes; then |
7917 | if test "$with_expat" = yes; then | |
7918 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
7919 | else | |
7920 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
7921 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
7922 | fi | |
7923 | else | |
7924 | save_LIBS=$LIBS | |
7925 | LIBS="$LIBS $LIBEXPAT" | |
7926 | for ac_func in XML_StopParser | |
7927 | do : | |
7928 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
7929 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 7930 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 7931 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 7932 | _ACEOF |
95ca63c4 | 7933 | |
bec39cab | 7934 | fi |
bec39cab | 7935 | done |
95ca63c4 | 7936 | |
81ecdfbb RW |
7937 | LIBS=$save_LIBS |
7938 | fi | |
a9322a30 TT |
7939 | fi |
7940 | ||
a9322a30 | 7941 | |
a9322a30 TT |
7942 | |
7943 | ||
ec685c5e | 7944 | |
0c4a4063 | 7945 | |
81ecdfbb RW |
7946 | # Check whether --with-python was given. |
7947 | if test "${with_python+set}" = set; then : | |
7948 | withval=$with_python; | |
bec39cab | 7949 | else |
81ecdfbb | 7950 | with_python=auto |
bec39cab | 7951 | fi |
bec39cab | 7952 | |
81ecdfbb RW |
7953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
7954 | $as_echo_n "checking whether to use python... " >&6; } | |
7955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
7956 | $as_echo "$with_python" >&6; } | |
9a156167 | 7957 | |
81ecdfbb RW |
7958 | if test "${with_python}" = no; then |
7959 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
7960 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
7961 | have_libpython=no | |
bec39cab | 7962 | else |
81ecdfbb | 7963 | case "${with_python}" in |
8c85a4e2 | 7964 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
7965 | if test -d ${with_python}; then |
7966 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 7967 | python_prog="${with_python}/bin/python" |
0c4a4063 | 7968 | python_prefix= |
9c4ea6c5 JB |
7969 | # If python does not exit ${with_python}/bin, then try in |
7970 | # ${with_python}. On Windows/MinGW, this is where the Python | |
7971 | # executable is. | |
7972 | if test ! -x "${python_prog}"; then | |
7973 | python_prog="${with_python}/python" | |
7974 | python_prefix= | |
7975 | fi | |
e7a30f46 | 7976 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
7977 | # Fall back to gdb 7.0/7.1 behaviour. |
7978 | python_prog=missing | |
0c4a4063 | 7979 | python_prefix=${with_python} |
ec685c5e | 7980 | fi |
e7a30f46 | 7981 | elif test -x "${with_python}"; then |
ec685c5e DE |
7982 | # While we can't run python compiled for $host (unless host == build), |
7983 | # the user could write a script that provides the needed information, | |
7984 | # so we support that. | |
ec685c5e | 7985 | python_prog=${with_python} |
0c4a4063 | 7986 | python_prefix= |
ec685c5e DE |
7987 | else |
7988 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
7989 | fi | |
81ecdfbb | 7990 | ;; |
ec685c5e DE |
7991 | */*) |
7992 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
7993 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
7994 | ;; | |
ec685c5e DE |
7995 | *) |
7996 | # The user has either specified auto, yes, or the name of the python | |
7997 | # program assumed to be in $PATH. | |
7998 | python_prefix= | |
7999 | case "${with_python}" in | |
8000 | yes | auto) | |
8001 | if test ${build} = ${host}; then | |
8002 | # Extract the first word of "python", so it can be a program name with args. | |
8003 | set dummy python; ac_word=$2 | |
8004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8005 | $as_echo_n "checking for $ac_word... " >&6; } | |
8006 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8007 | $as_echo_n "(cached) " >&6 | |
8008 | else | |
8009 | case $python_prog_path in | |
8010 | [\\/]* | ?:[\\/]*) | |
8011 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8012 | ;; | |
8013 | *) | |
8014 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8015 | for as_dir in $PATH | |
8016 | do | |
8017 | IFS=$as_save_IFS | |
8018 | test -z "$as_dir" && as_dir=. | |
8019 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8020 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8021 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8022 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8023 | break 2 | |
8024 | fi | |
8025 | done | |
8026 | done | |
8027 | IFS=$as_save_IFS | |
8028 | ||
8029 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8030 | ;; | |
8031 | esac | |
8032 | fi | |
8033 | python_prog_path=$ac_cv_path_python_prog_path | |
8034 | if test -n "$python_prog_path"; then | |
8035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8036 | $as_echo "$python_prog_path" >&6; } | |
8037 | else | |
8038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8039 | $as_echo "no" >&6; } | |
8040 | fi | |
8041 | ||
8042 | ||
8043 | if test "${python_prog_path}" = missing; then | |
8044 | python_prog=missing | |
8045 | else | |
8046 | python_prog=${python_prog_path} | |
8047 | fi | |
8048 | else | |
8049 | # Not much we can do except assume the cross-compiler will find the | |
8050 | # right files. | |
8051 | python_prog=missing | |
8052 | fi | |
8053 | ;; | |
8054 | *) | |
8055 | # While we can't run python compiled for $host (unless host == build), | |
8056 | # the user could write a script that provides the needed information, | |
8057 | # so we support that. | |
8058 | python_prog="${with_python}" | |
8059 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8060 | set dummy ${python_prog}; ac_word=$2 | |
8061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8062 | $as_echo_n "checking for $ac_word... " >&6; } | |
8063 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8064 | $as_echo_n "(cached) " >&6 | |
8065 | else | |
8066 | case $python_prog_path in | |
8067 | [\\/]* | ?:[\\/]*) | |
8068 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8069 | ;; | |
8070 | *) | |
8071 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8072 | for as_dir in $PATH | |
8073 | do | |
8074 | IFS=$as_save_IFS | |
8075 | test -z "$as_dir" && as_dir=. | |
8076 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8077 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8078 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8079 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8080 | break 2 | |
8081 | fi | |
8082 | done | |
8083 | done | |
8084 | IFS=$as_save_IFS | |
8085 | ||
8086 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8087 | ;; | |
8088 | esac | |
8089 | fi | |
8090 | python_prog_path=$ac_cv_path_python_prog_path | |
8091 | if test -n "$python_prog_path"; then | |
8092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8093 | $as_echo "$python_prog_path" >&6; } | |
8094 | else | |
8095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8096 | $as_echo "no" >&6; } | |
8097 | fi | |
8098 | ||
8099 | ||
8100 | if test "${python_prog_path}" = missing; then | |
8101 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8102 | fi | |
8103 | ;; | |
8104 | esac | |
81ecdfbb RW |
8105 | esac |
8106 | ||
ec685c5e | 8107 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8108 | # We have a python program to use, but it may be too old. |
8109 | # Don't flag an error for --with-python=auto (the default). | |
8110 | have_python_config=yes | |
ec685c5e DE |
8111 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8112 | if test $? != 0; then | |
e7a30f46 DE |
8113 | have_python_config=failed |
8114 | if test "${with_python}" != auto; then | |
8115 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8116 | fi | |
ec685c5e DE |
8117 | fi |
8118 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8119 | if test $? != 0; then | |
e7a30f46 DE |
8120 | have_python_config=failed |
8121 | if test "${with_python}" != auto; then | |
8122 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8123 | fi | |
ec685c5e | 8124 | fi |
0c4a4063 DE |
8125 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8126 | if test $? != 0; then | |
e7a30f46 DE |
8127 | have_python_config=failed |
8128 | if test "${with_python}" != auto; then | |
8129 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8130 | fi | |
0c4a4063 | 8131 | fi |
ec685c5e | 8132 | else |
ac534cba JB |
8133 | # We do not have a python executable we can use to determine where |
8134 | # to find the Python headers and libs. We cannot guess the include | |
8135 | # path from the python_prefix either, because that include path | |
8136 | # depends on the Python version. So, there is nothing much we can | |
8137 | # do except assume that the compiler will be able to find those files. | |
8138 | python_includes= | |
8139 | python_libs= | |
0c4a4063 | 8140 | have_python_config=no |
ec685c5e | 8141 | fi |
bec39cab | 8142 | |
ec685c5e DE |
8143 | # If we have python-config, only try the configuration it provides. |
8144 | # Otherwise fallback on the old way of trying different versions of | |
8145 | # python in turn. | |
81ecdfbb | 8146 | |
ec685c5e DE |
8147 | have_libpython=no |
8148 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8149 | # Determine the Python version by extracting "-lpython<version>" |
8150 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8151 | # being decimal numbers, but can also be XY (seen on Windows). | |
8152 | # | |
8153 | # The extraction is performed using sed with a regular expression. | |
8154 | # Initially, the regexp used was using the '?' quantifier to make | |
8155 | # the dot in the version number optional. Unfortunately, this | |
8156 | # does not work with non-GNU versions of sed because, because of | |
8157 | # what looks like a limitation (the '?' quantifier does not work | |
8158 | # with back-references). We work around this limitation by using | |
8159 | # the '*' quantifier instead. It means that, in theory, we might | |
8160 | # match unexpected version strings such as "-lpython2..7", but | |
8161 | # this seems unlikely in practice. And even if that happens, | |
8162 | # an error will be triggered later on, when checking that version | |
8163 | # number. | |
ec685c5e | 8164 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8165 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8166 | case "${python_version}" in |
8167 | python*) | |
ec685c5e DE |
8168 | |
8169 | version=${python_version} | |
8170 | ||
8171 | new_CPPFLAGS=${python_includes} | |
8172 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8174 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8175 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8176 | save_LIBS=$LIBS |
ec685c5e DE |
8177 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8178 | LIBS="$LIBS $new_LIBS" | |
8179 | found_usable_python=no | |
81ecdfbb | 8180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8181 | /* end confdefs.h. */ |
ac534cba | 8182 | #include "Python.h" |
81ecdfbb RW |
8183 | int |
8184 | main () | |
8185 | { | |
8186 | Py_Initialize (); | |
8187 | ; | |
8188 | return 0; | |
8189 | } | |
bec39cab | 8190 | _ACEOF |
81ecdfbb | 8191 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8192 | have_libpython=${version} |
8193 | found_usable_python=yes | |
ac534cba JB |
8194 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8195 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8196 | fi |
81ecdfbb RW |
8197 | rm -f core conftest.err conftest.$ac_objext \ |
8198 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8199 | CPPFLAGS=$save_CPPFLAGS |
8200 | LIBS=$save_LIBS | |
ec685c5e DE |
8201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8202 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8203 | |
0c4a4063 DE |
8204 | ;; |
8205 | *) | |
ec685c5e | 8206 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8207 | ;; |
8208 | esac | |
e7a30f46 | 8209 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8210 | if test "${have_libpython}" = no; then |
9a156167 | 8211 | |
420697bb TT |
8212 | version=python2.7 |
8213 | ||
8214 | new_CPPFLAGS=${python_includes} | |
8215 | new_LIBS="${python_libs} -lpython2.7" | |
8216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8217 | $as_echo_n "checking for ${version}... " >&6; } | |
8218 | save_CPPFLAGS=$CPPFLAGS | |
8219 | save_LIBS=$LIBS | |
8220 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8221 | LIBS="$LIBS $new_LIBS" | |
8222 | found_usable_python=no | |
8223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8224 | /* end confdefs.h. */ | |
ac534cba | 8225 | #include "Python.h" |
420697bb TT |
8226 | int |
8227 | main () | |
8228 | { | |
8229 | Py_Initialize (); | |
8230 | ; | |
8231 | return 0; | |
8232 | } | |
8233 | _ACEOF | |
8234 | if ac_fn_c_try_link "$LINENO"; then : | |
8235 | have_libpython=${version} | |
8236 | found_usable_python=yes | |
ac534cba JB |
8237 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8238 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
8239 | fi |
8240 | rm -f core conftest.err conftest.$ac_objext \ | |
8241 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8242 | CPPFLAGS=$save_CPPFLAGS |
8243 | LIBS=$save_LIBS | |
420697bb TT |
8244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8245 | $as_echo "${found_usable_python}" >&6; } | |
8246 | ||
8247 | fi | |
8248 | if test "${have_libpython}" = no; then | |
8249 | ||
ec685c5e DE |
8250 | version=python2.6 |
8251 | ||
8252 | new_CPPFLAGS=${python_includes} | |
8253 | new_LIBS="${python_libs} -lpython2.6" | |
8254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8255 | $as_echo_n "checking for ${version}... " >&6; } | |
8256 | save_CPPFLAGS=$CPPFLAGS | |
8257 | save_LIBS=$LIBS | |
8258 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8259 | LIBS="$LIBS $new_LIBS" | |
8260 | found_usable_python=no | |
8261 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8262 | /* end confdefs.h. */ | |
ac534cba | 8263 | #include "Python.h" |
ec685c5e DE |
8264 | int |
8265 | main () | |
8266 | { | |
8267 | Py_Initialize (); | |
8268 | ; | |
8269 | return 0; | |
8270 | } | |
8271 | _ACEOF | |
8272 | if ac_fn_c_try_link "$LINENO"; then : | |
8273 | have_libpython=${version} | |
8274 | found_usable_python=yes | |
ac534cba JB |
8275 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8276 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8277 | fi |
8278 | rm -f core conftest.err conftest.$ac_objext \ | |
8279 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8280 | CPPFLAGS=$save_CPPFLAGS |
8281 | LIBS=$save_LIBS | |
ec685c5e DE |
8282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8283 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8284 | |
81ecdfbb | 8285 | fi |
ec685c5e | 8286 | if test ${have_libpython} = no; then |
9a156167 | 8287 | |
81ecdfbb | 8288 | version=python2.5 |
9a156167 | 8289 | |
ec685c5e DE |
8290 | new_CPPFLAGS=${python_includes} |
8291 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
8292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8293 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8294 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8295 | save_LIBS=$LIBS |
ec685c5e DE |
8296 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8297 | LIBS="$LIBS $new_LIBS" | |
8298 | found_usable_python=no | |
81ecdfbb | 8299 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8300 | /* end confdefs.h. */ |
ac534cba | 8301 | #include "Python.h" |
81ecdfbb RW |
8302 | int |
8303 | main () | |
8304 | { | |
8305 | Py_Initialize (); | |
8306 | ; | |
8307 | return 0; | |
8308 | } | |
436868fb | 8309 | _ACEOF |
81ecdfbb | 8310 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8311 | have_libpython=${version} |
8312 | found_usable_python=yes | |
ac534cba JB |
8313 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8314 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8315 | fi |
81ecdfbb RW |
8316 | rm -f core conftest.err conftest.$ac_objext \ |
8317 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8318 | CPPFLAGS=$save_CPPFLAGS |
8319 | LIBS=$save_LIBS | |
ec685c5e DE |
8320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8321 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 8322 | |
81ecdfbb | 8323 | fi |
ec685c5e | 8324 | if test ${have_libpython} = no; then |
a9322a30 | 8325 | |
81ecdfbb | 8326 | version=python2.4 |
a9322a30 | 8327 | |
ec685c5e DE |
8328 | new_CPPFLAGS=${python_includes} |
8329 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8331 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8332 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8333 | save_LIBS=$LIBS |
ec685c5e DE |
8334 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8335 | LIBS="$LIBS $new_LIBS" | |
8336 | found_usable_python=no | |
81ecdfbb | 8337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8338 | /* end confdefs.h. */ |
ac534cba | 8339 | #include "Python.h" |
a9322a30 TT |
8340 | int |
8341 | main () | |
8342 | { | |
81ecdfbb | 8343 | Py_Initialize (); |
a9322a30 TT |
8344 | ; |
8345 | return 0; | |
8346 | } | |
436868fb | 8347 | _ACEOF |
81ecdfbb | 8348 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8349 | have_libpython=${version} |
8350 | found_usable_python=yes | |
ac534cba JB |
8351 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8352 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8353 | fi |
81ecdfbb RW |
8354 | rm -f core conftest.err conftest.$ac_objext \ |
8355 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8356 | CPPFLAGS=$save_CPPFLAGS |
8357 | LIBS=$save_LIBS | |
ec685c5e DE |
8358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8359 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8360 | |
ec685c5e DE |
8361 | fi |
8362 | fi | |
9c4ea6c5 | 8363 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8364 | |
8365 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8366 | ||
9c4ea6c5 | 8367 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8368 | |
8369 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8370 | ||
9c4ea6c5 | 8371 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8372 | |
8373 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8374 | ||
9c4ea6c5 | 8375 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8376 | |
8377 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8378 | ||
81ecdfbb | 8379 | fi |
ec685c5e DE |
8380 | |
8381 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8382 | case "${with_python}" in |
8383 | yes) | |
8384 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8385 | ;; | |
8386 | auto) | |
8387 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8388 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8389 | ;; | |
8390 | *) | |
8391 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8392 | ;; | |
8393 | esac | |
0c4a4063 DE |
8394 | else |
8395 | if test -n "${python_prefix}"; then | |
8396 | ||
8397 | cat >>confdefs.h <<_ACEOF | |
8398 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8399 | _ACEOF | |
8400 | ||
8401 | ||
8402 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8403 | if test "x$prefix" = xNONE; then | |
8404 | test_prefix=/usr/local | |
8405 | else | |
8406 | test_prefix=$prefix | |
8407 | fi | |
8408 | else | |
8409 | test_prefix=$exec_prefix | |
8410 | fi | |
8411 | value=0 | |
8412 | case ${python_prefix} in | |
8413 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8414 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8415 | value=1 | |
8416 | ;; | |
8417 | esac | |
8418 | ||
8419 | cat >>confdefs.h <<_ACEOF | |
8420 | #define PYTHON_PATH_RELOCATABLE $value | |
8421 | _ACEOF | |
8422 | ||
8423 | ||
8424 | fi | |
81ecdfbb | 8425 | fi |
436868fb | 8426 | fi |
436868fb | 8427 | |
ec685c5e | 8428 | if test "${have_libpython}" != no; then |
436868fb | 8429 | |
81ecdfbb | 8430 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8431 | |
81ecdfbb RW |
8432 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8433 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8434 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8435 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8436 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8437 | |
81ecdfbb RW |
8438 | # Flags needed to compile Python code (taken from python-config --cflags). |
8439 | # We cannot call python-config directly because it will output whatever was | |
8440 | # used when compiling the Python interpreter itself, including flags which | |
8441 | # would make the python-related objects be compiled differently from the | |
8442 | # rest of GDB (e.g., -O2 and -fPIC). | |
8443 | if test "${GCC}" = yes; then | |
8444 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8445 | fi | |
436868fb | 8446 | |
81ecdfbb RW |
8447 | if test "x${tentative_python_cflags}" != x; then |
8448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8449 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
8450 | for flag in ${tentative_python_cflags}; do | |
8451 | # Check that the compiler accepts it | |
8452 | saved_CFLAGS="$CFLAGS" | |
8453 | CFLAGS="$CFLAGS $flag" | |
8454 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8455 | /* end confdefs.h. */ |
81ecdfbb | 8456 | |
a9322a30 TT |
8457 | int |
8458 | main () | |
8459 | { | |
a9322a30 TT |
8460 | |
8461 | ; | |
8462 | return 0; | |
8463 | } | |
bec39cab | 8464 | _ACEOF |
81ecdfbb RW |
8465 | if ac_fn_c_try_compile "$LINENO"; then : |
8466 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 8467 | fi |
81ecdfbb RW |
8468 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8469 | CFLAGS="$saved_CFLAGS" | |
8470 | done | |
8471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
8472 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
8473 | fi | |
043b6510 JB |
8474 | |
8475 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
8476 | # #if _SGIAPI | |
8477 | # #define siginfo __siginfo | |
8478 | # #endif | |
8479 | # The problem is that including Python causes some XOPEN macros to be | |
8480 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
8481 | # to false. So, we work around this issue by defining siginfo ourself | |
8482 | # though the command-line. | |
c83393b9 JB |
8483 | # |
8484 | # On x64 Windows, Python's include headers, and pyconfig.h in | |
8485 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
8486 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
8487 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
8488 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
8489 | # The issue was reported to the Python community, but still isn't | |
8490 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
8491 | ||
043b6510 JB |
8492 | case "$gdb_host" in |
8493 | irix*) if test "${GCC}" = yes; then | |
8494 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
8495 | fi | |
8496 | ;; | |
c83393b9 JB |
8497 | mingw64) |
8498 | if test "${GCC}" = yes; then | |
8499 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
8500 | fi | |
8501 | ;; | |
043b6510 | 8502 | esac |
a8db4212 YPK |
8503 | |
8504 | # Note that "python -m threading" cannot be used to check for | |
8505 | # threading support due to a bug in Python 2.7.3 | |
8506 | # (http://bugs.python.org/issue15567). | |
8507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
8508 | $as_echo_n "checking whether python supports threads... " >&6; } | |
8509 | saved_CPPFLAGS="${CPPFLAGS}" | |
8510 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
8511 | # Note that the test is reversed so that python_has_threads=yes on | |
8512 | # unexpected failures. | |
8513 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8514 | /* end confdefs.h. */ | |
8515 | ||
8516 | #include <Python.h> | |
8517 | #ifdef WITH_THREAD | |
8518 | # error | |
8519 | #endif | |
8520 | ||
8521 | _ACEOF | |
8522 | if ac_fn_c_try_cpp "$LINENO"; then : | |
8523 | python_has_threads=no | |
8524 | else | |
8525 | python_has_threads=yes | |
8526 | fi | |
8527 | rm -f conftest.err conftest.$ac_ext | |
8528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
8529 | $as_echo "${python_has_threads}" >&6; } | |
8530 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb RW |
8531 | else |
8532 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
8533 | # included. |
8534 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
8535 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
8536 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 8537 | fi |
9a156167 | 8538 | |
9a156167 | 8539 | |
ac534cba JB |
8540 | |
8541 | ||
a8db4212 YPK |
8542 | # Provide a --enable-libmcheck/--disable-libmcheck set of options |
8543 | # allowing a user to enable this option even when building releases, | |
8544 | # or to disable it when building a snapshot. | |
8545 | # Check whether --enable-libmcheck was given. | |
8546 | if test "${enable_libmcheck+set}" = set; then : | |
8547 | enableval=$enable_libmcheck; case "${enableval}" in | |
8548 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
8549 | no | n) ENABLE_LIBMCHECK="no" ;; | |
8550 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
8551 | esac | |
8552 | fi | |
8553 | ||
8554 | ||
8555 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), | |
8556 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
8557 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
8558 | # and for releases. | |
8559 | if test -z "${ENABLE_LIBMCHECK}" \ | |
8560 | -a \( "${have_libpython}" = "no" \ | |
8561 | -o "${python_has_threads}" = "no" \) \ | |
8562 | && $development; then | |
8563 | ENABLE_LIBMCHECK=yes | |
8564 | fi | |
8565 | ||
8566 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
8567 | if test "${have_libpython}" != "no" -a "${python_has_threads}" = "yes" ; then | |
8568 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
8569 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
8570 | fi | |
8571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
8572 | $as_echo_n "checking for main in -lmcheck... " >&6; } | |
8573 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
8574 | $as_echo_n "(cached) " >&6 | |
8575 | else | |
8576 | ac_check_lib_save_LIBS=$LIBS | |
8577 | LIBS="-lmcheck $LIBS" | |
8578 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8579 | /* end confdefs.h. */ | |
8580 | ||
8581 | ||
8582 | int | |
8583 | main () | |
8584 | { | |
8585 | return main (); | |
8586 | ; | |
8587 | return 0; | |
8588 | } | |
8589 | _ACEOF | |
8590 | if ac_fn_c_try_link "$LINENO"; then : | |
8591 | ac_cv_lib_mcheck_main=yes | |
8592 | else | |
8593 | ac_cv_lib_mcheck_main=no | |
8594 | fi | |
8595 | rm -f core conftest.err conftest.$ac_objext \ | |
8596 | conftest$ac_exeext conftest.$ac_ext | |
8597 | LIBS=$ac_check_lib_save_LIBS | |
8598 | fi | |
8599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
8600 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
8601 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
8602 | cat >>confdefs.h <<_ACEOF | |
8603 | #define HAVE_LIBMCHECK 1 | |
8604 | _ACEOF | |
8605 | ||
8606 | LIBS="-lmcheck $LIBS" | |
8607 | ||
8608 | fi | |
8609 | ||
8610 | fi | |
8611 | ||
81ecdfbb RW |
8612 | # ------------------------- # |
8613 | # Checks for header files. # | |
8614 | # ------------------------- # | |
c890192f | 8615 | |
81ecdfbb RW |
8616 | ac_header_dirent=no |
8617 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
8618 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
8619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
8620 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
8621 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8622 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8623 | else |
81ecdfbb | 8624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8625 | /* end confdefs.h. */ |
81ecdfbb RW |
8626 | #include <sys/types.h> |
8627 | #include <$ac_hdr> | |
8628 | ||
a9322a30 TT |
8629 | int |
8630 | main () | |
8631 | { | |
81ecdfbb RW |
8632 | if ((DIR *) 0) |
8633 | return 0; | |
a9322a30 TT |
8634 | ; |
8635 | return 0; | |
8636 | } | |
bec39cab | 8637 | _ACEOF |
81ecdfbb RW |
8638 | if ac_fn_c_try_compile "$LINENO"; then : |
8639 | eval "$as_ac_Header=yes" | |
bec39cab | 8640 | else |
81ecdfbb | 8641 | eval "$as_ac_Header=no" |
bec39cab | 8642 | fi |
81ecdfbb | 8643 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 8644 | fi |
81ecdfbb RW |
8645 | eval ac_res=\$$as_ac_Header |
8646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8647 | $as_echo "$ac_res" >&6; } | |
8648 | eval as_val=\$$as_ac_Header | |
8649 | if test "x$as_val" = x""yes; then : | |
8650 | cat >>confdefs.h <<_ACEOF | |
8651 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 8652 | _ACEOF |
bec39cab | 8653 | |
81ecdfbb RW |
8654 | ac_header_dirent=$ac_hdr; break |
8655 | fi | |
bec39cab | 8656 | |
81ecdfbb RW |
8657 | done |
8658 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
8659 | if test $ac_header_dirent = dirent.h; then | |
8660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
8661 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8662 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8663 | $as_echo_n "(cached) " >&6 | |
c890192f | 8664 | else |
81ecdfbb RW |
8665 | ac_func_search_save_LIBS=$LIBS |
8666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8667 | /* end confdefs.h. */ | |
8668 | ||
8669 | /* Override any GCC internal prototype to avoid an error. | |
8670 | Use char because int might match the return type of a GCC | |
8671 | builtin and then its argument prototype would still apply. */ | |
8672 | #ifdef __cplusplus | |
8673 | extern "C" | |
8674 | #endif | |
8675 | char opendir (); | |
8676 | int | |
8677 | main () | |
8678 | { | |
8679 | return opendir (); | |
8680 | ; | |
8681 | return 0; | |
8682 | } | |
bec39cab | 8683 | _ACEOF |
81ecdfbb RW |
8684 | for ac_lib in '' dir; do |
8685 | if test -z "$ac_lib"; then | |
8686 | ac_res="none required" | |
8687 | else | |
8688 | ac_res=-l$ac_lib | |
8689 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8690 | fi | |
8691 | if ac_fn_c_try_link "$LINENO"; then : | |
8692 | ac_cv_search_opendir=$ac_res | |
8693 | fi | |
8694 | rm -f core conftest.err conftest.$ac_objext \ | |
8695 | conftest$ac_exeext | |
8696 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8697 | break | |
8698 | fi | |
8699 | done | |
8700 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 8701 | |
81ecdfbb RW |
8702 | else |
8703 | ac_cv_search_opendir=no | |
8704 | fi | |
8705 | rm conftest.$ac_ext | |
8706 | LIBS=$ac_func_search_save_LIBS | |
8707 | fi | |
8708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
8709 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8710 | ac_res=$ac_cv_search_opendir | |
8711 | if test "$ac_res" != no; then : | |
8712 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8713 | |
bec39cab | 8714 | fi |
81ecdfbb | 8715 | |
bec39cab | 8716 | else |
81ecdfbb RW |
8717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
8718 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8719 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8720 | $as_echo_n "(cached) " >&6 | |
8721 | else | |
8722 | ac_func_search_save_LIBS=$LIBS | |
8723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8724 | /* end confdefs.h. */ |
81ecdfbb RW |
8725 | |
8726 | /* Override any GCC internal prototype to avoid an error. | |
8727 | Use char because int might match the return type of a GCC | |
8728 | builtin and then its argument prototype would still apply. */ | |
8729 | #ifdef __cplusplus | |
8730 | extern "C" | |
8731 | #endif | |
8732 | char opendir (); | |
a9322a30 TT |
8733 | int |
8734 | main () | |
8735 | { | |
81ecdfbb | 8736 | return opendir (); |
a9322a30 TT |
8737 | ; |
8738 | return 0; | |
8739 | } | |
bec39cab | 8740 | _ACEOF |
81ecdfbb RW |
8741 | for ac_lib in '' x; do |
8742 | if test -z "$ac_lib"; then | |
8743 | ac_res="none required" | |
8744 | else | |
8745 | ac_res=-l$ac_lib | |
8746 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8747 | fi | |
8748 | if ac_fn_c_try_link "$LINENO"; then : | |
8749 | ac_cv_search_opendir=$ac_res | |
8750 | fi | |
8751 | rm -f core conftest.err conftest.$ac_objext \ | |
8752 | conftest$ac_exeext | |
8753 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8754 | break | |
8755 | fi | |
8756 | done | |
8757 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 8758 | |
81ecdfbb RW |
8759 | else |
8760 | ac_cv_search_opendir=no | |
bec39cab | 8761 | fi |
81ecdfbb RW |
8762 | rm conftest.$ac_ext |
8763 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 8764 | fi |
81ecdfbb RW |
8765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
8766 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8767 | ac_res=$ac_cv_search_opendir | |
8768 | if test "$ac_res" != no; then : | |
8769 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8770 | |
81ecdfbb | 8771 | fi |
bec39cab | 8772 | |
81ecdfbb | 8773 | fi |
bec39cab | 8774 | |
81ecdfbb RW |
8775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
8776 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
8777 | if test "${ac_cv_header_stdc+set}" = set; then : | |
8778 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8779 | else |
81ecdfbb | 8780 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8781 | /* end confdefs.h. */ |
81ecdfbb RW |
8782 | #include <stdlib.h> |
8783 | #include <stdarg.h> | |
8784 | #include <string.h> | |
8785 | #include <float.h> | |
8786 | ||
a9322a30 TT |
8787 | int |
8788 | main () | |
8789 | { | |
a9322a30 TT |
8790 | |
8791 | ; | |
8792 | return 0; | |
8793 | } | |
bec39cab | 8794 | _ACEOF |
81ecdfbb RW |
8795 | if ac_fn_c_try_compile "$LINENO"; then : |
8796 | ac_cv_header_stdc=yes | |
bec39cab | 8797 | else |
81ecdfbb | 8798 | ac_cv_header_stdc=no |
a9322a30 | 8799 | fi |
81ecdfbb | 8800 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8801 | |
81ecdfbb RW |
8802 | if test $ac_cv_header_stdc = yes; then |
8803 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
8804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8805 | /* end confdefs.h. */ | |
8806 | #include <string.h> | |
bec39cab | 8807 | |
81ecdfbb RW |
8808 | _ACEOF |
8809 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8810 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 8811 | |
bec39cab | 8812 | else |
81ecdfbb RW |
8813 | ac_cv_header_stdc=no |
8814 | fi | |
8815 | rm -f conftest* | |
8816 | ||
8817 | fi | |
8818 | ||
8819 | if test $ac_cv_header_stdc = yes; then | |
8820 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
8821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8822 | /* end confdefs.h. */ | |
8823 | #include <stdlib.h> | |
8824 | ||
bec39cab | 8825 | _ACEOF |
81ecdfbb RW |
8826 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8827 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 8828 | |
81ecdfbb RW |
8829 | else |
8830 | ac_cv_header_stdc=no | |
8831 | fi | |
8832 | rm -f conftest* | |
bec39cab | 8833 | |
bec39cab | 8834 | fi |
81ecdfbb RW |
8835 | |
8836 | if test $ac_cv_header_stdc = yes; then | |
8837 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
8838 | if test "$cross_compiling" = yes; then : | |
8839 | : | |
bec39cab | 8840 | else |
81ecdfbb | 8841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8842 | /* end confdefs.h. */ |
81ecdfbb RW |
8843 | #include <ctype.h> |
8844 | #include <stdlib.h> | |
8845 | #if ((' ' & 0x0FF) == 0x020) | |
8846 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8847 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8848 | #else | |
8849 | # define ISLOWER(c) \ | |
8850 | (('a' <= (c) && (c) <= 'i') \ | |
8851 | || ('j' <= (c) && (c) <= 'r') \ | |
8852 | || ('s' <= (c) && (c) <= 'z')) | |
8853 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
8854 | #endif | |
8855 | ||
8856 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
8857 | int |
8858 | main () | |
8859 | { | |
81ecdfbb RW |
8860 | int i; |
8861 | for (i = 0; i < 256; i++) | |
8862 | if (XOR (islower (i), ISLOWER (i)) | |
8863 | || toupper (i) != TOUPPER (i)) | |
8864 | return 2; | |
a9322a30 TT |
8865 | return 0; |
8866 | } | |
bec39cab | 8867 | _ACEOF |
81ecdfbb RW |
8868 | if ac_fn_c_try_run "$LINENO"; then : |
8869 | ||
bec39cab | 8870 | else |
81ecdfbb RW |
8871 | ac_cv_header_stdc=no |
8872 | fi | |
8873 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8874 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8875 | fi | |
bec39cab | 8876 | |
bec39cab | 8877 | fi |
a9322a30 | 8878 | fi |
81ecdfbb RW |
8879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
8880 | $as_echo "$ac_cv_header_stdc" >&6; } | |
8881 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 8882 | |
81ecdfbb | 8883 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 8884 | |
81ecdfbb | 8885 | fi |
bec39cab | 8886 | |
81ecdfbb | 8887 | # elf_hp.h is for HP/UX 64-bit shared library support. |
81ecdfbb | 8888 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
8775fd2d | 8889 | thread_db.h signal.h stddef.h \ |
81ecdfbb RW |
8890 | stdlib.h string.h memory.h strings.h sys/fault.h \ |
8891 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
8892 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
8893 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
8894 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
e68227b9 | 8895 | sgtty.h unistd.h elf_hp.h locale.h \ |
945bf713 | 8896 | dlfcn.h sys/socket.h sys/un.h linux/perf_event.h |
81ecdfbb RW |
8897 | do : |
8898 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8899 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8900 | eval as_val=\$$as_ac_Header | |
8901 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8902 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8903 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8904 | _ACEOF |
c906108c | 8905 | |
bec39cab | 8906 | fi |
81ecdfbb RW |
8907 | |
8908 | done | |
8909 | ||
8910 | for ac_header in link.h | |
8911 | do : | |
8912 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
8913 | # include <sys/types.h> | |
8914 | #endif | |
8915 | #if HAVE_NLIST_H | |
8916 | # include <nlist.h> | |
a9322a30 TT |
8917 | #endif |
8918 | ||
81ecdfbb RW |
8919 | " |
8920 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
8921 | cat >>confdefs.h <<_ACEOF | |
8922 | #define HAVE_LINK_H 1 | |
bec39cab | 8923 | _ACEOF |
bec39cab | 8924 | |
a9322a30 | 8925 | fi |
bec39cab | 8926 | |
81ecdfbb | 8927 | done |
c906108c | 8928 | |
81ecdfbb RW |
8929 | for ac_header in sys/proc.h |
8930 | do : | |
8931 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
8932 | # include <sys/param.h> | |
8933 | #endif | |
c906108c | 8934 | |
81ecdfbb RW |
8935 | " |
8936 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 8937 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8938 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 8939 | _ACEOF |
5ee754fc | 8940 | |
bec39cab | 8941 | fi |
81ecdfbb RW |
8942 | |
8943 | done | |
8944 | ||
8945 | for ac_header in sys/user.h | |
8946 | do : | |
8947 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
8948 | # include <sys/param.h> | |
a9322a30 TT |
8949 | #endif |
8950 | ||
81ecdfbb RW |
8951 | " |
8952 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
8953 | cat >>confdefs.h <<_ACEOF | |
8954 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 8955 | _ACEOF |
bec39cab | 8956 | |
a9322a30 | 8957 | fi |
bec39cab | 8958 | |
81ecdfbb | 8959 | done |
5ee754fc | 8960 | |
5ee754fc | 8961 | |
81ecdfbb RW |
8962 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
8963 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
8964 | # think that we don't have <curses.h> if we're using GCC. | |
8965 | case $host_os in | |
8966 | solaris2.[789]) | |
8967 | if test "$GCC" = yes; then | |
8968 | ||
8969 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
8970 | ||
8971 | fi ;; | |
8972 | esac | |
8973 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
8974 | do : | |
8975 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8976 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8977 | eval as_val=\$$as_ac_Header | |
8978 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8979 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8980 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8981 | _ACEOF |
5ee754fc MK |
8982 | |
8983 | fi | |
8984 | ||
81ecdfbb | 8985 | done |
bec39cab | 8986 | |
81ecdfbb RW |
8987 | for ac_header in term.h |
8988 | do : | |
8989 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
8990 | # include <curses.h> | |
8991 | #endif | |
bec39cab | 8992 | |
81ecdfbb RW |
8993 | " |
8994 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
8995 | cat >>confdefs.h <<_ACEOF | |
8996 | #define HAVE_TERM_H 1 | |
a8111142 | 8997 | _ACEOF |
a8111142 | 8998 | |
a8111142 | 8999 | fi |
a8111142 | 9000 | |
81ecdfbb | 9001 | done |
a8111142 TT |
9002 | |
9003 | ||
81ecdfbb RW |
9004 | # ------------------------- # |
9005 | # Checks for declarations. # | |
9006 | # ------------------------- # | |
a9322a30 | 9007 | |
81ecdfbb RW |
9008 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
9009 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
9010 | ac_have_decl=1 | |
bec39cab | 9011 | else |
81ecdfbb RW |
9012 | ac_have_decl=0 |
9013 | fi | |
9014 | ||
9015 | cat >>confdefs.h <<_ACEOF | |
9016 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 9017 | _ACEOF |
81ecdfbb RW |
9018 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
9019 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
9020 | ac_have_decl=1 | |
9021 | else | |
9022 | ac_have_decl=0 | |
9023 | fi | |
9024 | ||
9025 | cat >>confdefs.h <<_ACEOF | |
9026 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 9027 | _ACEOF |
81ecdfbb RW |
9028 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
9029 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
9030 | ac_have_decl=1 | |
bec39cab | 9031 | else |
81ecdfbb RW |
9032 | ac_have_decl=0 |
9033 | fi | |
bec39cab | 9034 | |
81ecdfbb RW |
9035 | cat >>confdefs.h <<_ACEOF |
9036 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 9037 | _ACEOF |
81ecdfbb RW |
9038 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
9039 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
9040 | ac_have_decl=1 | |
9041 | else | |
9042 | ac_have_decl=0 | |
9043 | fi | |
9044 | ||
9045 | cat >>confdefs.h <<_ACEOF | |
9046 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 9047 | _ACEOF |
81ecdfbb RW |
9048 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
9049 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
9050 | ac_have_decl=1 | |
bec39cab | 9051 | else |
81ecdfbb RW |
9052 | ac_have_decl=0 |
9053 | fi | |
5ee754fc | 9054 | |
81ecdfbb RW |
9055 | cat >>confdefs.h <<_ACEOF |
9056 | #define HAVE_DECL_STRSTR $ac_have_decl | |
9057 | _ACEOF | |
9058 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
9059 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
9060 | ac_have_decl=1 | |
9061 | else | |
9062 | ac_have_decl=0 | |
5ee754fc | 9063 | fi |
81ecdfbb RW |
9064 | |
9065 | cat >>confdefs.h <<_ACEOF | |
9066 | #define HAVE_DECL_GETOPT $ac_have_decl | |
9067 | _ACEOF | |
9068 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
9069 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
9070 | ac_have_decl=1 | |
9071 | else | |
9072 | ac_have_decl=0 | |
5ee754fc | 9073 | fi |
81ecdfbb RW |
9074 | |
9075 | cat >>confdefs.h <<_ACEOF | |
9076 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
9077 | _ACEOF | |
9078 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
9079 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
9080 | ac_have_decl=1 | |
9081 | else | |
9082 | ac_have_decl=0 | |
5ee754fc MK |
9083 | fi |
9084 | ||
a9322a30 | 9085 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9086 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 9087 | _ACEOF |
5ee754fc | 9088 | |
5ee754fc | 9089 | |
81ecdfbb RW |
9090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9091 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9092 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9093 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9094 | else |
81ecdfbb | 9095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9096 | /* end confdefs.h. */ |
81ecdfbb | 9097 | #include <locale.h> |
a9322a30 TT |
9098 | int |
9099 | main () | |
9100 | { | |
81ecdfbb | 9101 | return LC_MESSAGES |
a9322a30 TT |
9102 | ; |
9103 | return 0; | |
9104 | } | |
bec39cab | 9105 | _ACEOF |
81ecdfbb RW |
9106 | if ac_fn_c_try_link "$LINENO"; then : |
9107 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9108 | else |
81ecdfbb RW |
9109 | am_cv_val_LC_MESSAGES=no |
9110 | fi | |
9111 | rm -f core conftest.err conftest.$ac_objext \ | |
9112 | conftest$ac_exeext conftest.$ac_ext | |
9113 | fi | |
9114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9115 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9116 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9117 | |
81ecdfbb RW |
9118 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9119 | ||
9120 | fi | |
9121 | ||
9122 | ||
9123 | # ----------------------- # | |
9124 | # Checks for structures. # | |
9125 | # ----------------------- # | |
9126 | ||
9127 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9128 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9129 | ||
9130 | cat >>confdefs.h <<_ACEOF | |
9131 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9132 | _ACEOF |
7eb368b3 | 9133 | |
81ecdfbb | 9134 | |
7eb368b3 | 9135 | fi |
81ecdfbb RW |
9136 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9137 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9138 | |
a9322a30 TT |
9139 | cat >>confdefs.h <<_ACEOF |
9140 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9141 | _ACEOF |
9142 | ||
a9322a30 | 9143 | |
7eb368b3 NR |
9144 | fi |
9145 | ||
7eb368b3 | 9146 | |
a9322a30 TT |
9147 | # ------------------ # |
9148 | # Checks for types. # | |
9149 | # ------------------ # | |
7eb368b3 | 9150 | |
81ecdfbb RW |
9151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9152 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9153 | if test "${ac_cv_type_signal+set}" = set; then : | |
9154 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9155 | else |
81ecdfbb | 9156 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9157 | /* end confdefs.h. */ |
a9322a30 TT |
9158 | #include <sys/types.h> |
9159 | #include <signal.h> | |
7cb9022a | 9160 | |
a9322a30 TT |
9161 | int |
9162 | main () | |
9163 | { | |
81ecdfbb | 9164 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9165 | ; |
9166 | return 0; | |
9167 | } | |
bec39cab | 9168 | _ACEOF |
81ecdfbb RW |
9169 | if ac_fn_c_try_compile "$LINENO"; then : |
9170 | ac_cv_type_signal=int | |
bec39cab | 9171 | else |
81ecdfbb | 9172 | ac_cv_type_signal=void |
bec39cab | 9173 | fi |
81ecdfbb | 9174 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9175 | fi |
81ecdfbb RW |
9176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9177 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9178 | |
a9322a30 TT |
9179 | cat >>confdefs.h <<_ACEOF |
9180 | #define RETSIGTYPE $ac_cv_type_signal | |
9181 | _ACEOF | |
5ee754fc | 9182 | |
bec39cab | 9183 | |
81ecdfbb | 9184 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9185 | #include <sys/socket.h> |
9186 | ||
81ecdfbb RW |
9187 | " |
9188 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9189 | |
a9322a30 TT |
9190 | cat >>confdefs.h <<_ACEOF |
9191 | #define HAVE_SOCKLEN_T 1 | |
9192 | _ACEOF | |
9193 | ||
9194 | ||
9195 | fi | |
9196 | ||
9197 | ||
9198 | # ------------------------------------- # | |
9199 | # Checks for compiler characteristics. # | |
9200 | # ------------------------------------- # | |
9201 | ||
81ecdfbb RW |
9202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9203 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9204 | if test "${ac_cv_c_const+set}" = set; then : | |
9205 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9206 | else |
81ecdfbb | 9207 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9208 | /* end confdefs.h. */ |
a9322a30 TT |
9209 | |
9210 | int | |
9211 | main () | |
9212 | { | |
9213 | /* FIXME: Include the comments suggested by Paul. */ | |
9214 | #ifndef __cplusplus | |
9215 | /* Ultrix mips cc rejects this. */ | |
9216 | typedef int charset[2]; | |
81ecdfbb | 9217 | const charset cs; |
a9322a30 | 9218 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
9219 | char const *const *pcpcc; |
9220 | char **ppc; | |
a9322a30 TT |
9221 | /* NEC SVR4.0.2 mips cc rejects this. */ |
9222 | struct point {int x, y;}; | |
9223 | static struct point const zero = {0,0}; | |
9224 | /* AIX XL C 1.02.0.0 rejects this. | |
9225 | It does not let you subtract one const X* pointer from another in | |
9226 | an arm of an if-expression whose if-part is not a constant | |
9227 | expression */ | |
9228 | const char *g = "string"; | |
81ecdfbb | 9229 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 9230 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
9231 | ++pcpcc; |
9232 | ppc = (char**) pcpcc; | |
9233 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
9234 | { /* SCO 3.2v4 cc rejects this. */ |
9235 | char *t; | |
9236 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
9237 | ||
9238 | *t++ = 0; | |
81ecdfbb | 9239 | if (s) return 0; |
a9322a30 TT |
9240 | } |
9241 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
9242 | int x[] = {25, 17}; | |
9243 | const int *foo = &x[0]; | |
9244 | ++foo; | |
9245 | } | |
9246 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
9247 | typedef const int *iptr; | |
9248 | iptr p = 0; | |
9249 | ++p; | |
9250 | } | |
9251 | { /* AIX XL C 1.02.0.0 rejects this saying | |
9252 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
9253 | struct s { int j; const int *ap[3]; }; | |
9254 | struct s *b; b->j = 5; | |
9255 | } | |
9256 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
9257 | const int foo = 10; | |
81ecdfbb | 9258 | if (!foo) return 0; |
a9322a30 | 9259 | } |
81ecdfbb | 9260 | return !cs[0] && !zero.x; |
a9322a30 TT |
9261 | #endif |
9262 | ||
9263 | ; | |
9264 | return 0; | |
9265 | } | |
bec39cab | 9266 | _ACEOF |
81ecdfbb | 9267 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9268 | ac_cv_c_const=yes |
5ee754fc | 9269 | else |
81ecdfbb | 9270 | ac_cv_c_const=no |
5ee754fc | 9271 | fi |
81ecdfbb | 9272 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9273 | fi |
81ecdfbb RW |
9274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
9275 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 9276 | if test $ac_cv_c_const = no; then |
bec39cab | 9277 | |
81ecdfbb | 9278 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 9279 | |
5ee754fc | 9280 | fi |
bec39cab | 9281 | |
81ecdfbb RW |
9282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
9283 | $as_echo_n "checking for inline... " >&6; } | |
9284 | if test "${ac_cv_c_inline+set}" = set; then : | |
9285 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9286 | else |
a9322a30 TT |
9287 | ac_cv_c_inline=no |
9288 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 9289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9290 | /* end confdefs.h. */ |
a9322a30 TT |
9291 | #ifndef __cplusplus |
9292 | typedef int foo_t; | |
9293 | static $ac_kw foo_t static_foo () {return 0; } | |
9294 | $ac_kw foo_t foo () {return 0; } | |
9295 | #endif | |
9296 | ||
bec39cab | 9297 | _ACEOF |
81ecdfbb RW |
9298 | if ac_fn_c_try_compile "$LINENO"; then : |
9299 | ac_cv_c_inline=$ac_kw | |
bec39cab | 9300 | fi |
81ecdfbb RW |
9301 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9302 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 9303 | done |
bec39cab | 9304 | |
5ee754fc | 9305 | fi |
81ecdfbb RW |
9306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
9307 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 9308 | |
a9322a30 TT |
9309 | case $ac_cv_c_inline in |
9310 | inline | yes) ;; | |
9311 | *) | |
9312 | case $ac_cv_c_inline in | |
9313 | no) ac_val=;; | |
9314 | *) ac_val=$ac_cv_c_inline;; | |
9315 | esac | |
9316 | cat >>confdefs.h <<_ACEOF | |
9317 | #ifndef __cplusplus | |
9318 | #define inline $ac_val | |
9319 | #endif | |
9320 | _ACEOF | |
bec39cab AC |
9321 | ;; |
9322 | esac | |
bec39cab | 9323 | |
81ecdfbb RW |
9324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
9325 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9326 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
9327 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9328 | else |
81ecdfbb RW |
9329 | ac_cv_c_bigendian=unknown |
9330 | # See if we're dealing with a universal compiler. | |
9331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9332 | /* end confdefs.h. */ | |
9333 | #ifndef __APPLE_CC__ | |
9334 | not a universal capable compiler | |
9335 | #endif | |
9336 | typedef int dummy; | |
9337 | ||
9338 | _ACEOF | |
9339 | if ac_fn_c_try_compile "$LINENO"; then : | |
9340 | ||
9341 | # Check for potential -arch flags. It is not universal unless | |
9342 | # there are at least two -arch flags with different values. | |
9343 | ac_arch= | |
9344 | ac_prev= | |
9345 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
9346 | if test -n "$ac_prev"; then | |
9347 | case $ac_word in | |
9348 | i?86 | x86_64 | ppc | ppc64) | |
9349 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
9350 | ac_arch=$ac_word | |
9351 | else | |
9352 | ac_cv_c_bigendian=universal | |
9353 | break | |
9354 | fi | |
9355 | ;; | |
9356 | esac | |
9357 | ac_prev= | |
9358 | elif test "x$ac_word" = "x-arch"; then | |
9359 | ac_prev=arch | |
9360 | fi | |
9361 | done | |
9362 | fi | |
9363 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9364 | if test $ac_cv_c_bigendian = unknown; then | |
9365 | # See if sys/param.h defines the BYTE_ORDER macro. | |
9366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9367 | /* end confdefs.h. */ |
a9322a30 | 9368 | #include <sys/types.h> |
81ecdfbb | 9369 | #include <sys/param.h> |
a9322a30 TT |
9370 | |
9371 | int | |
9372 | main () | |
9373 | { | |
81ecdfbb RW |
9374 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
9375 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
9376 | && LITTLE_ENDIAN) | |
9377 | bogus endian macros | |
9378 | #endif | |
a9322a30 TT |
9379 | |
9380 | ; | |
9381 | return 0; | |
9382 | } | |
bec39cab | 9383 | _ACEOF |
81ecdfbb | 9384 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9385 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 9386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9387 | /* end confdefs.h. */ |
a9322a30 | 9388 | #include <sys/types.h> |
81ecdfbb | 9389 | #include <sys/param.h> |
a9322a30 TT |
9390 | |
9391 | int | |
9392 | main () | |
9393 | { | |
9394 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
9395 | not big endian |
9396 | #endif | |
a9322a30 TT |
9397 | |
9398 | ; | |
9399 | return 0; | |
9400 | } | |
bec39cab | 9401 | _ACEOF |
81ecdfbb | 9402 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9403 | ac_cv_c_bigendian=yes |
5ee754fc | 9404 | else |
81ecdfbb | 9405 | ac_cv_c_bigendian=no |
5ee754fc | 9406 | fi |
81ecdfbb RW |
9407 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9408 | fi | |
9409 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9410 | fi | |
9411 | if test $ac_cv_c_bigendian = unknown; then | |
9412 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
9413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9414 | /* end confdefs.h. */ | |
9415 | #include <limits.h> | |
bec39cab | 9416 | |
81ecdfbb RW |
9417 | int |
9418 | main () | |
9419 | { | |
9420 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
9421 | bogus endian macros | |
9422 | #endif | |
9423 | ||
9424 | ; | |
9425 | return 0; | |
9426 | } | |
7eb368b3 | 9427 | _ACEOF |
81ecdfbb RW |
9428 | if ac_fn_c_try_compile "$LINENO"; then : |
9429 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
9430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 9431 | /* end confdefs.h. */ |
81ecdfbb RW |
9432 | #include <limits.h> |
9433 | ||
7eb368b3 NR |
9434 | int |
9435 | main () | |
9436 | { | |
81ecdfbb RW |
9437 | #ifndef _BIG_ENDIAN |
9438 | not big endian | |
9439 | #endif | |
9440 | ||
7eb368b3 NR |
9441 | ; |
9442 | return 0; | |
9443 | } | |
9444 | _ACEOF | |
81ecdfbb | 9445 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9446 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
9447 | else |
9448 | ac_cv_c_bigendian=no | |
a9322a30 | 9449 | fi |
81ecdfbb | 9450 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9451 | fi |
81ecdfbb RW |
9452 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9453 | fi | |
9454 | if test $ac_cv_c_bigendian = unknown; then | |
9455 | # Compile a test program. | |
9456 | if test "$cross_compiling" = yes; then : | |
9457 | # Try to guess by grepping values from an object file. | |
9458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9459 | /* end confdefs.h. */ | |
9460 | short int ascii_mm[] = | |
9461 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
9462 | short int ascii_ii[] = | |
9463 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9464 | int use_ascii (int i) { | |
9465 | return ascii_mm[i] + ascii_ii[i]; | |
9466 | } | |
9467 | short int ebcdic_ii[] = | |
9468 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
9469 | short int ebcdic_mm[] = | |
9470 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9471 | int use_ebcdic (int i) { | |
9472 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
9473 | } | |
9474 | extern int foo; | |
7eb368b3 | 9475 | |
81ecdfbb RW |
9476 | int |
9477 | main () | |
9478 | { | |
9479 | return use_ascii (foo) == use_ebcdic (foo); | |
9480 | ; | |
9481 | return 0; | |
9482 | } | |
9483 | _ACEOF | |
9484 | if ac_fn_c_try_compile "$LINENO"; then : | |
9485 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
9486 | ac_cv_c_bigendian=yes | |
9487 | fi | |
9488 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9489 | if test "$ac_cv_c_bigendian" = unknown; then | |
9490 | ac_cv_c_bigendian=no | |
9491 | else | |
9492 | # finding both strings is unlikely to happen, but who knows? | |
9493 | ac_cv_c_bigendian=unknown | |
9494 | fi | |
9495 | fi | |
7eb368b3 | 9496 | fi |
81ecdfbb | 9497 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9498 | else |
81ecdfbb | 9499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9500 | /* end confdefs.h. */ |
81ecdfbb | 9501 | $ac_includes_default |
d3ea6809 MM |
9502 | int |
9503 | main () | |
9504 | { | |
81ecdfbb RW |
9505 | |
9506 | /* Are we little or big endian? From Harbison&Steele. */ | |
9507 | union | |
9508 | { | |
9509 | long int l; | |
9510 | char c[sizeof (long int)]; | |
9511 | } u; | |
9512 | u.l = 1; | |
9513 | return u.c[sizeof (long int) - 1] == 1; | |
9514 | ||
9515 | ; | |
9516 | return 0; | |
d3ea6809 MM |
9517 | } |
9518 | _ACEOF | |
81ecdfbb | 9519 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9520 | ac_cv_c_bigendian=no |
d3ea6809 | 9521 | else |
81ecdfbb | 9522 | ac_cv_c_bigendian=yes |
d3ea6809 | 9523 | fi |
81ecdfbb RW |
9524 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9525 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9526 | fi |
a9322a30 | 9527 | |
81ecdfbb RW |
9528 | fi |
9529 | fi | |
9530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9531 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9532 | case $ac_cv_c_bigendian in #( | |
9533 | yes) | |
9534 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9535 | ;; #( | |
9536 | no) | |
9537 | ;; #( | |
9538 | universal) | |
9539 | ||
9540 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9541 | ||
9542 | ;; #( | |
9543 | *) | |
9544 | as_fn_error "unknown endianness | |
9545 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
9546 | esac | |
d3ea6809 MM |
9547 | |
9548 | ||
a9322a30 TT |
9549 | # ------------------------------ # |
9550 | # Checks for library functions. # | |
9551 | # ------------------------------ # | |
d3ea6809 | 9552 | |
a9322a30 TT |
9553 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
9554 | # for constant arguments. Useless! | |
81ecdfbb RW |
9555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
9556 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9557 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
9558 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 9559 | else |
81ecdfbb | 9560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 9561 | /* end confdefs.h. */ |
a9322a30 | 9562 | #include <alloca.h> |
bec39cab AC |
9563 | int |
9564 | main () | |
9565 | { | |
a9322a30 | 9566 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 9567 | if (p) return 0; |
bec39cab AC |
9568 | ; |
9569 | return 0; | |
9570 | } | |
9571 | _ACEOF | |
81ecdfbb | 9572 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9573 | ac_cv_working_alloca_h=yes |
bec39cab | 9574 | else |
81ecdfbb | 9575 | ac_cv_working_alloca_h=no |
bec39cab | 9576 | fi |
81ecdfbb RW |
9577 | rm -f core conftest.err conftest.$ac_objext \ |
9578 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9579 | fi |
81ecdfbb RW |
9580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
9581 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
9582 | if test $ac_cv_working_alloca_h = yes; then |
9583 | ||
81ecdfbb | 9584 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 9585 | |
c906108c | 9586 | fi |
bec39cab | 9587 | |
81ecdfbb RW |
9588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
9589 | $as_echo_n "checking for alloca... " >&6; } | |
9590 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
9591 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9592 | else |
81ecdfbb | 9593 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9594 | /* end confdefs.h. */ |
a9322a30 TT |
9595 | #ifdef __GNUC__ |
9596 | # define alloca __builtin_alloca | |
b4e70030 | 9597 | #else |
a9322a30 TT |
9598 | # ifdef _MSC_VER |
9599 | # include <malloc.h> | |
9600 | # define alloca _alloca | |
9601 | # else | |
81ecdfbb | 9602 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
9603 | # include <alloca.h> |
9604 | # else | |
9605 | # ifdef _AIX | |
9606 | #pragma alloca | |
9607 | # else | |
9608 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
9609 | char *alloca (); | |
9610 | # endif | |
9611 | # endif | |
9612 | # endif | |
9613 | # endif | |
c906108c | 9614 | #endif |
97bf5e38 | 9615 | |
bec39cab AC |
9616 | int |
9617 | main () | |
9618 | { | |
a9322a30 | 9619 | char *p = (char *) alloca (1); |
81ecdfbb | 9620 | if (p) return 0; |
bec39cab AC |
9621 | ; |
9622 | return 0; | |
9623 | } | |
9624 | _ACEOF | |
81ecdfbb | 9625 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9626 | ac_cv_func_alloca_works=yes |
bec39cab | 9627 | else |
81ecdfbb | 9628 | ac_cv_func_alloca_works=no |
bec39cab | 9629 | fi |
81ecdfbb RW |
9630 | rm -f core conftest.err conftest.$ac_objext \ |
9631 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9632 | fi |
81ecdfbb RW |
9633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
9634 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
9635 | |
9636 | if test $ac_cv_func_alloca_works = yes; then | |
9637 | ||
81ecdfbb | 9638 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 9639 | |
a9322a30 TT |
9640 | else |
9641 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
9642 | # that cause trouble. Some versions do not even contain alloca or | |
9643 | # contain a buggy version. If you still want to use their alloca, | |
9644 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
9645 | ||
81ecdfbb | 9646 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 9647 | |
81ecdfbb | 9648 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 9649 | |
bec39cab | 9650 | |
81ecdfbb RW |
9651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
9652 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
9653 | if test "${ac_cv_os_cray+set}" = set; then : | |
9654 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9655 | else |
81ecdfbb | 9656 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 9657 | /* end confdefs.h. */ |
81ecdfbb | 9658 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
9659 | webecray |
9660 | #else | |
9661 | wenotbecray | |
9662 | #endif | |
9663 | ||
9664 | _ACEOF | |
9665 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 9666 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
9667 | ac_cv_os_cray=yes |
9668 | else | |
81ecdfbb | 9669 | ac_cv_os_cray=no |
bec39cab | 9670 | fi |
81ecdfbb RW |
9671 | rm -f conftest* |
9672 | ||
bec39cab | 9673 | fi |
81ecdfbb RW |
9674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
9675 | $as_echo "$ac_cv_os_cray" >&6; } | |
9676 | if test $ac_cv_os_cray = yes; then | |
9677 | for ac_func in _getb67 GETB67 getb67; do | |
9678 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9679 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9680 | eval as_val=\$$as_ac_var | |
9681 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
9682 | |
9683 | cat >>confdefs.h <<_ACEOF | |
9684 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 9685 | _ACEOF |
c906108c | 9686 | |
a9322a30 | 9687 | break |
c906108c SS |
9688 | fi |
9689 | ||
a9322a30 TT |
9690 | done |
9691 | fi | |
bec39cab | 9692 | |
81ecdfbb RW |
9693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
9694 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
9695 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
9696 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9697 | else |
81ecdfbb | 9698 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9699 | ac_cv_c_stack_direction=0 |
bec39cab | 9700 | else |
81ecdfbb | 9701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9702 | /* end confdefs.h. */ |
81ecdfbb | 9703 | $ac_includes_default |
a9322a30 TT |
9704 | int |
9705 | find_stack_direction () | |
b4e70030 | 9706 | { |
a9322a30 TT |
9707 | static char *addr = 0; |
9708 | auto char dummy; | |
9709 | if (addr == 0) | |
9710 | { | |
9711 | addr = &dummy; | |
9712 | return find_stack_direction (); | |
9713 | } | |
9714 | else | |
9715 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 9716 | } |
b757528f | 9717 | |
bec39cab AC |
9718 | int |
9719 | main () | |
9720 | { | |
81ecdfbb | 9721 | return find_stack_direction () < 0; |
bec39cab AC |
9722 | } |
9723 | _ACEOF | |
81ecdfbb | 9724 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9725 | ac_cv_c_stack_direction=1 |
9726 | else | |
81ecdfbb | 9727 | ac_cv_c_stack_direction=-1 |
a9322a30 | 9728 | fi |
81ecdfbb RW |
9729 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9730 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9731 | fi |
a9322a30 | 9732 | |
81ecdfbb RW |
9733 | fi |
9734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
9735 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
9736 | cat >>confdefs.h <<_ACEOF |
9737 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
9738 | _ACEOF | |
9739 | ||
9740 | ||
9741 | fi | |
9742 | ||
a9322a30 | 9743 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
9744 | do : |
9745 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9746 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9747 | eval as_val=\$$as_ac_Header | |
9748 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9749 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9750 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9751 | _ACEOF |
b757528f | 9752 | |
b757528f | 9753 | fi |
bec39cab | 9754 | |
a9322a30 | 9755 | done |
a3828db0 | 9756 | |
a9322a30 | 9757 | for ac_func in getpagesize |
81ecdfbb RW |
9758 | do : |
9759 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
9760 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 9761 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9762 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 9763 | _ACEOF |
bcb3dc3d | 9764 | |
bcb3dc3d MK |
9765 | fi |
9766 | done | |
9767 | ||
81ecdfbb RW |
9768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
9769 | $as_echo_n "checking for working mmap... " >&6; } | |
9770 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
9771 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9772 | else |
81ecdfbb | 9773 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9774 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 9775 | else |
81ecdfbb | 9776 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9777 | /* end confdefs.h. */ |
a9322a30 TT |
9778 | $ac_includes_default |
9779 | /* malloc might have been renamed as rpl_malloc. */ | |
9780 | #undef malloc | |
bec39cab | 9781 | |
a9322a30 TT |
9782 | /* Thanks to Mike Haertel and Jim Avera for this test. |
9783 | Here is a matrix of mmap possibilities: | |
9784 | mmap private not fixed | |
9785 | mmap private fixed at somewhere currently unmapped | |
9786 | mmap private fixed at somewhere already mapped | |
9787 | mmap shared not fixed | |
9788 | mmap shared fixed at somewhere currently unmapped | |
9789 | mmap shared fixed at somewhere already mapped | |
9790 | For private mappings, we should verify that changes cannot be read() | |
9791 | back from the file, nor mmap's back from the file at a different | |
9792 | address. (There have been systems where private was not correctly | |
9793 | implemented like the infamous i386 svr4.0, and systems where the | |
9794 | VM page cache was not coherent with the file system buffer cache | |
9795 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9796 | For shared mappings, we should conversely verify that changes get | |
9797 | propagated back to all the places they're supposed to be. | |
bec39cab | 9798 | |
a9322a30 TT |
9799 | Grep wants private fixed already mapped. |
9800 | The main things grep needs to know about mmap are: | |
9801 | * does it exist and is it safe to write into the mmap'd area | |
9802 | * how to use it (BSD variants) */ | |
8b9cf735 | 9803 | |
a9322a30 TT |
9804 | #include <fcntl.h> |
9805 | #include <sys/mman.h> | |
8b9cf735 | 9806 | |
81ecdfbb | 9807 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 9808 | char *malloc (); |
a3828db0 MK |
9809 | #endif |
9810 | ||
a9322a30 | 9811 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 9812 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 9813 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 9814 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
9815 | # define HAVE_SYS_PARAM_H 1 |
9816 | # endif | |
9817 | ||
9818 | # ifdef _SC_PAGESIZE | |
9819 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9820 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 9821 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
9822 | # include <sys/param.h> |
9823 | # ifdef EXEC_PAGESIZE | |
9824 | # define getpagesize() EXEC_PAGESIZE | |
9825 | # else /* no EXEC_PAGESIZE */ | |
9826 | # ifdef NBPG | |
9827 | # define getpagesize() NBPG * CLSIZE | |
9828 | # ifndef CLSIZE | |
9829 | # define CLSIZE 1 | |
9830 | # endif /* no CLSIZE */ | |
9831 | # else /* no NBPG */ | |
9832 | # ifdef NBPC | |
9833 | # define getpagesize() NBPC | |
9834 | # else /* no NBPC */ | |
9835 | # ifdef PAGESIZE | |
9836 | # define getpagesize() PAGESIZE | |
9837 | # endif /* PAGESIZE */ | |
9838 | # endif /* no NBPC */ | |
9839 | # endif /* no NBPG */ | |
9840 | # endif /* no EXEC_PAGESIZE */ | |
9841 | # else /* no HAVE_SYS_PARAM_H */ | |
9842 | # define getpagesize() 8192 /* punt totally */ | |
9843 | # endif /* no HAVE_SYS_PARAM_H */ | |
9844 | # endif /* no _SC_PAGESIZE */ | |
9845 | ||
9846 | #endif /* no HAVE_GETPAGESIZE */ | |
9847 | ||
bec39cab AC |
9848 | int |
9849 | main () | |
9850 | { | |
a9322a30 TT |
9851 | char *data, *data2, *data3; |
9852 | int i, pagesize; | |
9853 | int fd; | |
9854 | ||
9855 | pagesize = getpagesize (); | |
9856 | ||
9857 | /* First, make a file with some known garbage in it. */ | |
9858 | data = (char *) malloc (pagesize); | |
9859 | if (!data) | |
81ecdfbb | 9860 | return 1; |
a9322a30 TT |
9861 | for (i = 0; i < pagesize; ++i) |
9862 | *(data + i) = rand (); | |
9863 | umask (0); | |
9864 | fd = creat ("conftest.mmap", 0600); | |
9865 | if (fd < 0) | |
81ecdfbb | 9866 | return 1; |
a9322a30 | 9867 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 9868 | return 1; |
a9322a30 TT |
9869 | close (fd); |
9870 | ||
9871 | /* Next, try to mmap the file at a fixed address which already has | |
9872 | something else allocated at it. If we can, also make sure that | |
9873 | we see the same garbage. */ | |
9874 | fd = open ("conftest.mmap", O_RDWR); | |
9875 | if (fd < 0) | |
81ecdfbb | 9876 | return 1; |
a9322a30 TT |
9877 | data2 = (char *) malloc (2 * pagesize); |
9878 | if (!data2) | |
81ecdfbb RW |
9879 | return 1; |
9880 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
9881 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
9882 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 9883 | return 1; |
a9322a30 TT |
9884 | for (i = 0; i < pagesize; ++i) |
9885 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 9886 | return 1; |
a9322a30 TT |
9887 | |
9888 | /* Finally, make sure that changes to the mapped area do not | |
9889 | percolate back to the file as seen by read(). (This is a bug on | |
9890 | some variants of i386 svr4.0.) */ | |
9891 | for (i = 0; i < pagesize; ++i) | |
9892 | *(data2 + i) = *(data2 + i) + 1; | |
9893 | data3 = (char *) malloc (pagesize); | |
9894 | if (!data3) | |
81ecdfbb | 9895 | return 1; |
a9322a30 | 9896 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 9897 | return 1; |
a9322a30 TT |
9898 | for (i = 0; i < pagesize; ++i) |
9899 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 9900 | return 1; |
a9322a30 | 9901 | close (fd); |
81ecdfbb | 9902 | return 0; |
bec39cab AC |
9903 | } |
9904 | _ACEOF | |
81ecdfbb | 9905 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9906 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 9907 | else |
81ecdfbb | 9908 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 9909 | fi |
81ecdfbb RW |
9910 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9911 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 9912 | fi |
81ecdfbb | 9913 | |
a9322a30 | 9914 | fi |
81ecdfbb RW |
9915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
9916 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
9917 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
9918 | ||
81ecdfbb | 9919 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 9920 | |
086ec9eb | 9921 | fi |
a9322a30 | 9922 | rm -f conftest.mmap |
a3828db0 | 9923 | |
81ecdfbb RW |
9924 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
9925 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 9926 | |
a9322a30 TT |
9927 | else |
9928 | ||
9929 | cat >>confdefs.h <<_ACEOF | |
9930 | #define pid_t int | |
bec39cab | 9931 | _ACEOF |
086ec9eb MK |
9932 | |
9933 | fi | |
9934 | ||
81ecdfbb RW |
9935 | for ac_header in vfork.h |
9936 | do : | |
9937 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9938 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 9939 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9940 | #define HAVE_VFORK_H 1 |
bec39cab | 9941 | _ACEOF |
c906108c SS |
9942 | |
9943 | fi | |
a9322a30 | 9944 | |
a3828db0 | 9945 | done |
c906108c | 9946 | |
a9322a30 | 9947 | for ac_func in fork vfork |
81ecdfbb RW |
9948 | do : |
9949 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9950 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9951 | eval as_val=\$$as_ac_var | |
9952 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 9953 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9954 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 9955 | _ACEOF |
b83266a0 | 9956 | |
97bf5e38 | 9957 | fi |
a3828db0 | 9958 | done |
b83266a0 | 9959 | |
a9322a30 | 9960 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
9961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
9962 | $as_echo_n "checking for working fork... " >&6; } | |
9963 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
9964 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9965 | else |
81ecdfbb | 9966 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9967 | ac_cv_func_fork_works=cross |
9968 | else | |
81ecdfbb RW |
9969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9970 | /* end confdefs.h. */ | |
9971 | $ac_includes_default | |
9972 | int | |
9973 | main () | |
9974 | { | |
9975 | ||
9976 | /* By Ruediger Kuhlmann. */ | |
9977 | return fork () < 0; | |
9978 | ||
9979 | ; | |
9980 | return 0; | |
9981 | } | |
a9322a30 | 9982 | _ACEOF |
81ecdfbb | 9983 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9984 | ac_cv_func_fork_works=yes |
9985 | else | |
81ecdfbb | 9986 | ac_cv_func_fork_works=no |
a9322a30 | 9987 | fi |
81ecdfbb RW |
9988 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9989 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9990 | fi |
81ecdfbb | 9991 | |
a9322a30 | 9992 | fi |
81ecdfbb RW |
9993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
9994 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
9995 | |
9996 | else | |
9997 | ac_cv_func_fork_works=$ac_cv_func_fork | |
9998 | fi | |
9999 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10000 | case $host in | |
10001 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10002 | # Override, as these systems have only a dummy fork() stub | |
10003 | ac_cv_func_fork_works=no | |
10004 | ;; | |
10005 | *) | |
10006 | ac_cv_func_fork_works=yes | |
10007 | ;; | |
10008 | esac | |
81ecdfbb RW |
10009 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
10010 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10011 | fi |
10012 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
10013 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
10014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
10015 | $as_echo_n "checking for working vfork... " >&6; } | |
10016 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
10017 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10018 | else |
81ecdfbb | 10019 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10020 | ac_cv_func_vfork_works=cross |
10021 | else | |
81ecdfbb | 10022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
10023 | /* end confdefs.h. */ |
10024 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 10025 | $ac_includes_default |
a9322a30 | 10026 | #include <sys/wait.h> |
81ecdfbb | 10027 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
10028 | # include <vfork.h> |
10029 | #endif | |
10030 | /* On some sparc systems, changes by the child to local and incoming | |
10031 | argument registers are propagated back to the parent. The compiler | |
10032 | is told about this with #include <vfork.h>, but some compilers | |
10033 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10034 | static variable whose address is put into a register that is | |
10035 | clobbered by the vfork. */ | |
10036 | static void | |
10037 | #ifdef __cplusplus | |
10038 | sparc_address_test (int arg) | |
10039 | # else | |
10040 | sparc_address_test (arg) int arg; | |
10041 | #endif | |
10042 | { | |
10043 | static pid_t child; | |
10044 | if (!child) { | |
10045 | child = vfork (); | |
10046 | if (child < 0) { | |
10047 | perror ("vfork"); | |
10048 | _exit(2); | |
10049 | } | |
10050 | if (!child) { | |
10051 | arg = getpid(); | |
10052 | write(-1, "", 0); | |
10053 | _exit (arg); | |
10054 | } | |
10055 | } | |
10056 | } | |
10057 | ||
10058 | int | |
10059 | main () | |
10060 | { | |
10061 | pid_t parent = getpid (); | |
10062 | pid_t child; | |
10063 | ||
10064 | sparc_address_test (0); | |
10065 | ||
10066 | child = vfork (); | |
10067 | ||
10068 | if (child == 0) { | |
10069 | /* Here is another test for sparc vfork register problems. This | |
10070 | test uses lots of local variables, at least as many local | |
10071 | variables as main has allocated so far including compiler | |
10072 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10073 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10074 | reuse the register of parent for one of the local variables, | |
10075 | since it will think that parent can't possibly be used any more | |
10076 | in this routine. Assigning to the local variable will thus | |
10077 | munge parent in the parent process. */ | |
10078 | pid_t | |
10079 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10080 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10081 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10082 | use the same hardware register for all 8 local variables. */ | |
10083 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10084 | || p != p5 || p != p6 || p != p7) | |
10085 | _exit(1); | |
10086 | ||
10087 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10088 | from child file descriptors. If the child closes a descriptor | |
10089 | before it execs or exits, this munges the parent's descriptor | |
10090 | as well. Test for this by closing stdout in the child. */ | |
10091 | _exit(close(fileno(stdout)) != 0); | |
10092 | } else { | |
10093 | int status; | |
10094 | struct stat st; | |
10095 | ||
10096 | while (wait(&status) != child) | |
10097 | ; | |
81ecdfbb | 10098 | return ( |
a9322a30 TT |
10099 | /* Was there some problem with vforking? */ |
10100 | child < 0 | |
10101 | ||
10102 | /* Did the child fail? (This shouldn't happen.) */ | |
10103 | || status | |
10104 | ||
10105 | /* Did the vfork/compiler bug occur? */ | |
10106 | || parent != getpid() | |
10107 | ||
10108 | /* Did the file descriptor bug occur? */ | |
10109 | || fstat(fileno(stdout), &st) != 0 | |
10110 | ); | |
10111 | } | |
10112 | } | |
10113 | _ACEOF | |
81ecdfbb | 10114 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10115 | ac_cv_func_vfork_works=yes |
10116 | else | |
81ecdfbb | 10117 | ac_cv_func_vfork_works=no |
a9322a30 | 10118 | fi |
81ecdfbb RW |
10119 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10120 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10121 | fi |
81ecdfbb | 10122 | |
a9322a30 | 10123 | fi |
81ecdfbb RW |
10124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10125 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10126 | |
10127 | fi; | |
10128 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10129 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10130 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10131 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10132 | fi |
10133 | ||
10134 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10135 | ||
81ecdfbb | 10136 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10137 | |
10138 | else | |
10139 | ||
81ecdfbb | 10140 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10141 | |
10142 | fi | |
10143 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10144 | ||
81ecdfbb | 10145 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10146 | |
10147 | fi | |
10148 | ||
7313baad | 10149 | for ac_func in canonicalize_file_name realpath getrusage getuid getgid \ |
b9e7b9c3 | 10150 | pipe poll pread pread64 pwrite readlink resize_term \ |
7313baad | 10151 | sbrk setpgid setpgrp setsid \ |
a9322a30 | 10152 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 10153 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
1db33378 | 10154 | setrlimit getrlimit posix_madvise waitpid lstat |
81ecdfbb RW |
10155 | do : |
10156 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10157 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10158 | eval as_val=\$$as_ac_var | |
10159 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10160 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10161 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10162 | _ACEOF |
10163 | ||
10164 | fi | |
10165 | done | |
10166 | ||
10167 | ||
81ecdfbb RW |
10168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10169 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10170 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10171 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10172 | else |
81ecdfbb | 10173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10174 | /* end confdefs.h. */ |
10175 | #include <langinfo.h> | |
10176 | int | |
10177 | main () | |
10178 | { | |
10179 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10180 | ; |
10181 | return 0; | |
10182 | } | |
10183 | _ACEOF | |
81ecdfbb | 10184 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10185 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10186 | else |
81ecdfbb | 10187 | am_cv_langinfo_codeset=no |
a4db0f07 | 10188 | fi |
81ecdfbb RW |
10189 | rm -f core conftest.err conftest.$ac_objext \ |
10190 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10191 | |
a4db0f07 | 10192 | fi |
81ecdfbb RW |
10193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10194 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10195 | if test $am_cv_langinfo_codeset = yes; then |
10196 | ||
81ecdfbb | 10197 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10198 | |
6c7a06a3 | 10199 | fi |
c906108c | 10200 | |
06825bd1 | 10201 | |
a3828db0 MK |
10202 | # Check the return and argument types of ptrace. No canned test for |
10203 | # this, so roll our own. | |
10204 | gdb_ptrace_headers=' | |
10205 | #if HAVE_SYS_TYPES_H | |
10206 | # include <sys/types.h> | |
10207 | #endif | |
10208 | #if HAVE_SYS_PTRACE_H | |
10209 | # include <sys/ptrace.h> | |
10210 | #endif | |
10211 | #if HAVE_UNISTD_H | |
10212 | # include <unistd.h> | |
10213 | #endif | |
10214 | ' | |
10215 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
10216 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
10217 | " | |
10218 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
10219 | ac_have_decl=1 | |
06825bd1 | 10220 | else |
81ecdfbb | 10221 | ac_have_decl=0 |
06825bd1 | 10222 | fi |
06825bd1 | 10223 | |
a3828db0 | 10224 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10225 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 10226 | _ACEOF |
81ecdfbb | 10227 | if test $ac_have_decl = 1; then : |
bec39cab | 10228 | |
a3828db0 | 10229 | else |
a3828db0 MK |
10230 | |
10231 | : ${gdb_cv_func_ptrace_ret='int'} | |
10232 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10233 | ||
06825bd1 MK |
10234 | fi |
10235 | ||
064ef605 DJ |
10236 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
10237 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
10238 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
10239 | $as_echo_n "checking return type of ptrace... " >&6; } | |
10240 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
10241 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10242 | else |
81ecdfbb | 10243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10244 | /* end confdefs.h. */ |
a3828db0 | 10245 | $gdb_ptrace_headers |
bec39cab AC |
10246 | int |
10247 | main () | |
10248 | { | |
064ef605 DJ |
10249 | extern long ptrace (enum __ptrace_request, ...); |
10250 | ; | |
10251 | return 0; | |
10252 | } | |
10253 | _ACEOF | |
81ecdfbb | 10254 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10255 | gdb_cv_func_ptrace_ret='long' |
10256 | else | |
81ecdfbb | 10257 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10258 | /* end confdefs.h. */ |
10259 | $gdb_ptrace_headers | |
10260 | int | |
10261 | main () | |
10262 | { | |
a3828db0 | 10263 | extern int ptrace (); |
bec39cab AC |
10264 | ; |
10265 | return 0; | |
10266 | } | |
10267 | _ACEOF | |
81ecdfbb | 10268 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10269 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 10270 | else |
81ecdfbb | 10271 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 10272 | fi |
81ecdfbb | 10273 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 10274 | fi |
81ecdfbb | 10275 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 10276 | fi |
81ecdfbb RW |
10277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
10278 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 10279 | |
a3828db0 MK |
10280 | cat >>confdefs.h <<_ACEOF |
10281 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 10282 | _ACEOF |
70f9f479 | 10283 | |
a3828db0 | 10284 | # Check argument types. |
81ecdfbb RW |
10285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
10286 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
10287 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
10288 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10289 | else |
a3828db0 | 10290 | |
81ecdfbb | 10291 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10292 | /* end confdefs.h. */ |
10293 | $gdb_ptrace_headers | |
10294 | int | |
10295 | main () | |
10296 | { | |
10297 | extern long ptrace (enum __ptrace_request, ...); | |
10298 | ; | |
10299 | return 0; | |
10300 | } | |
10301 | _ACEOF | |
81ecdfbb | 10302 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10303 | gdb_cv_func_ptrace_args='int,int,long,long' |
10304 | else | |
064ef605 | 10305 | |
a3828db0 MK |
10306 | for gdb_arg1 in 'int' 'long'; do |
10307 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 10308 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 10309 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 10310 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10311 | /* end confdefs.h. */ |
a3828db0 | 10312 | $gdb_ptrace_headers |
bec39cab AC |
10313 | int |
10314 | main () | |
10315 | { | |
a3828db0 MK |
10316 | |
10317 | extern $gdb_cv_func_ptrace_ret | |
10318 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
10319 | ||
bec39cab AC |
10320 | ; |
10321 | return 0; | |
10322 | } | |
10323 | _ACEOF | |
81ecdfbb | 10324 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10325 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
10326 | break 4; | |
5c7f2947 | 10327 | fi |
81ecdfbb | 10328 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 10329 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 10330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10331 | /* end confdefs.h. */ |
a3828db0 | 10332 | $gdb_ptrace_headers |
bec39cab AC |
10333 | int |
10334 | main () | |
10335 | { | |
a3828db0 MK |
10336 | |
10337 | extern $gdb_cv_func_ptrace_ret | |
10338 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
10339 | ||
bec39cab AC |
10340 | ; |
10341 | return 0; | |
10342 | } | |
10343 | _ACEOF | |
81ecdfbb | 10344 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10345 | |
10346 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
10347 | break 5; | |
78434e59 | 10348 | fi |
81ecdfbb | 10349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
10350 | done |
10351 | done | |
10352 | done | |
10353 | done | |
10354 | done | |
10355 | # Provide a safe default value. | |
10356 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10357 | ||
064ef605 | 10358 | fi |
81ecdfbb | 10359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 10360 | fi |
81ecdfbb RW |
10361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
10362 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
10363 | ac_save_IFS=$IFS; IFS=',' |
10364 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
10365 | IFS=$ac_save_IFS | |
10366 | shift | |
bec39cab | 10367 | |
a3828db0 MK |
10368 | cat >>confdefs.h <<_ACEOF |
10369 | #define PTRACE_TYPE_ARG3 $3 | |
10370 | _ACEOF | |
10371 | ||
10372 | if test -n "$5"; then | |
10373 | ||
10374 | cat >>confdefs.h <<_ACEOF | |
10375 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 10376 | _ACEOF |
78434e59 MK |
10377 | |
10378 | fi | |
10379 | ||
a3828db0 | 10380 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
10381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10382 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10383 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10384 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 10385 | else |
81ecdfbb RW |
10386 | if test "$cross_compiling" = yes; then : |
10387 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 10388 | else |
81ecdfbb | 10389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10390 | /* end confdefs.h. */ |
81ecdfbb | 10391 | $ac_includes_default |
bec39cab AC |
10392 | int |
10393 | main () | |
10394 | { | |
a3828db0 MK |
10395 | /* If this system has a BSD-style setpgrp which takes arguments, |
10396 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
10397 | exit successfully. */ | |
81ecdfbb | 10398 | return setpgrp (1,1) != -1; |
bec39cab AC |
10399 | ; |
10400 | return 0; | |
10401 | } | |
10402 | _ACEOF | |
81ecdfbb | 10403 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 10404 | ac_cv_func_setpgrp_void=no |
c906108c | 10405 | else |
81ecdfbb | 10406 | ac_cv_func_setpgrp_void=yes |
c906108c | 10407 | fi |
81ecdfbb RW |
10408 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10409 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 10410 | fi |
81ecdfbb | 10411 | |
a3828db0 | 10412 | fi |
81ecdfbb RW |
10413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10414 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
10415 | if test $ac_cv_func_setpgrp_void = yes; then |
10416 | ||
81ecdfbb | 10417 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
10418 | |
10419 | fi | |
a3828db0 MK |
10420 | |
10421 | else | |
81ecdfbb RW |
10422 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10423 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10424 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10425 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 10426 | else |
81ecdfbb | 10427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10428 | /* end confdefs.h. */ |
a3828db0 MK |
10429 | |
10430 | #include <unistd.h> | |
10431 | ||
bec39cab AC |
10432 | int |
10433 | main () | |
10434 | { | |
a3828db0 MK |
10435 | |
10436 | if (setpgrp(1,1) == -1) | |
10437 | exit (0); | |
10438 | else | |
10439 | exit (1); | |
10440 | ||
bec39cab AC |
10441 | ; |
10442 | return 0; | |
10443 | } | |
10444 | _ACEOF | |
81ecdfbb | 10445 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10446 | ac_cv_func_setpgrp_void=no |
c906108c | 10447 | else |
81ecdfbb | 10448 | ac_cv_func_setpgrp_void=yes |
c906108c | 10449 | fi |
81ecdfbb | 10450 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10451 | fi |
81ecdfbb RW |
10452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10453 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 10454 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 10455 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 10456 | |
a3828db0 | 10457 | fi |
c906108c SS |
10458 | fi |
10459 | ||
a3828db0 MK |
10460 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
10461 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
10462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
10463 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
10464 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
10465 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10466 | else |
81ecdfbb | 10467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10468 | /* end confdefs.h. */ |
a3828db0 MK |
10469 | |
10470 | #include <setjmp.h> | |
10471 | ||
bec39cab AC |
10472 | int |
10473 | main () | |
10474 | { | |
a3828db0 | 10475 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
10476 | ; |
10477 | return 0; | |
10478 | } | |
10479 | _ACEOF | |
81ecdfbb | 10480 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10481 | gdb_cv_func_sigsetjmp=yes |
c906108c | 10482 | else |
81ecdfbb | 10483 | gdb_cv_func_sigsetjmp=no |
c906108c | 10484 | fi |
81ecdfbb | 10485 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10486 | fi |
81ecdfbb RW |
10487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
10488 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 10489 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 10490 | |
81ecdfbb | 10491 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 10492 | |
97bf5e38 | 10493 | fi |
c906108c | 10494 | |
a3828db0 MK |
10495 | # Assume we'll default to using the included libiberty regex. |
10496 | gdb_use_included_regex=yes | |
10497 | ||
10498 | # However, if the system regex is GNU regex, then default to *not* | |
10499 | # using the included regex. | |
81ecdfbb RW |
10500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
10501 | $as_echo_n "checking for GNU regex... " >&6; } | |
10502 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
10503 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10504 | else |
81ecdfbb | 10505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10506 | /* end confdefs.h. */ |
a3828db0 | 10507 | #include <gnu-versions.h> |
bec39cab AC |
10508 | int |
10509 | main () | |
10510 | { | |
81ecdfbb RW |
10511 | #define REGEX_INTERFACE_VERSION 1 |
10512 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
10513 | # error "Version mismatch" | |
10514 | #endif | |
5c45e068 MK |
10515 | ; |
10516 | return 0; | |
10517 | } | |
10518 | _ACEOF | |
81ecdfbb RW |
10519 | if ac_fn_c_try_compile "$LINENO"; then : |
10520 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 10521 | else |
81ecdfbb RW |
10522 | gdb_cv_have_gnu_regex=no |
10523 | fi | |
10524 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10525 | fi | |
10526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
10527 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
10528 | if test $gdb_cv_have_gnu_regex = yes; then | |
10529 | gdb_use_included_regex=no | |
5c45e068 | 10530 | fi |
81ecdfbb RW |
10531 | |
10532 | ||
10533 | # Check whether --with-included-regex was given. | |
10534 | if test "${with_included_regex+set}" = set; then : | |
10535 | withval=$with_included_regex; gdb_with_regex=$withval | |
10536 | else | |
10537 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 10538 | fi |
81ecdfbb RW |
10539 | |
10540 | if test "$gdb_with_regex" = yes; then | |
10541 | ||
10542 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
10543 | ||
c906108c | 10544 | fi |
81ecdfbb RW |
10545 | |
10546 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
10547 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
10548 | #include <sys/proc.h> | |
10549 | ||
10550 | " | |
10551 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 10552 | |
5c45e068 | 10553 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 10554 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 10555 | _ACEOF |
c906108c | 10556 | |
5c45e068 | 10557 | |
97bf5e38 | 10558 | fi |
c906108c | 10559 | |
5c45e068 | 10560 | |
a3828db0 | 10561 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
10562 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
10563 | $as_echo_n "checking for struct lwp... " >&6; } | |
10564 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
10565 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10566 | else |
81ecdfbb | 10567 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10568 | /* end confdefs.h. */ |
a3828db0 MK |
10569 | #include <sys/param.h> |
10570 | #include <sys/lwp.h> | |
bec39cab AC |
10571 | int |
10572 | main () | |
10573 | { | |
a3828db0 | 10574 | struct lwp l; |
bec39cab AC |
10575 | ; |
10576 | return 0; | |
10577 | } | |
10578 | _ACEOF | |
81ecdfbb | 10579 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10580 | gdb_cv_struct_lwp=yes |
c906108c | 10581 | else |
81ecdfbb | 10582 | gdb_cv_struct_lwp=no |
c906108c | 10583 | fi |
81ecdfbb | 10584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10585 | fi |
81ecdfbb RW |
10586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
10587 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 10588 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 10589 | |
81ecdfbb | 10590 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 10591 | |
97bf5e38 | 10592 | fi |
c906108c | 10593 | |
a3828db0 | 10594 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
10595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
10596 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
10597 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
10598 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10599 | else |
81ecdfbb | 10600 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10601 | /* end confdefs.h. */ |
a3828db0 MK |
10602 | #include <sys/types.h> |
10603 | #include <machine/reg.h> | |
bec39cab AC |
10604 | int |
10605 | main () | |
10606 | { | |
a3828db0 | 10607 | struct reg r; |
bec39cab AC |
10608 | ; |
10609 | return 0; | |
10610 | } | |
10611 | _ACEOF | |
81ecdfbb | 10612 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10613 | gdb_cv_struct_reg=yes |
27ca5dad | 10614 | else |
81ecdfbb | 10615 | gdb_cv_struct_reg=no |
27ca5dad | 10616 | fi |
81ecdfbb | 10617 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 10618 | fi |
81ecdfbb RW |
10619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
10620 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 10621 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 10622 | |
81ecdfbb | 10623 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
10624 | |
10625 | fi | |
97bf5e38 | 10626 | |
a3828db0 MK |
10627 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
10628 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
10629 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
10630 | " | |
10631 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
10632 | |
10633 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10634 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 10635 | _ACEOF |
3862412b | 10636 | |
5c45e068 | 10637 | |
97bf5e38 | 10638 | fi |
81ecdfbb RW |
10639 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
10640 | " | |
10641 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
10642 | |
10643 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10644 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 10645 | _ACEOF |
3862412b | 10646 | |
5c45e068 | 10647 | |
97bf5e38 | 10648 | fi |
3862412b | 10649 | |
5c45e068 | 10650 | |
6fea9e18 L |
10651 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
10652 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
10653 | # `struct user_regs_struct'. | |
10654 | 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> | |
10655 | " | |
10656 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
10657 | ||
10658 | cat >>confdefs.h <<_ACEOF | |
10659 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
10660 | _ACEOF | |
10661 | ||
10662 | ||
10663 | fi | |
10664 | 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> | |
10665 | " | |
10666 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
10667 | ||
10668 | cat >>confdefs.h <<_ACEOF | |
10669 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
10670 | _ACEOF | |
10671 | ||
10672 | ||
10673 | fi | |
10674 | ||
10675 | ||
a3828db0 | 10676 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
10677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10678 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
10679 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
10680 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10681 | else |
81ecdfbb | 10682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10683 | /* end confdefs.h. */ |
a3828db0 | 10684 | #include <sys/ptrace.h> |
bec39cab AC |
10685 | int |
10686 | main () | |
10687 | { | |
a3828db0 | 10688 | PTRACE_GETREGS; |
bec39cab AC |
10689 | ; |
10690 | return 0; | |
10691 | } | |
10692 | _ACEOF | |
81ecdfbb | 10693 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10694 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 10695 | else |
81ecdfbb | 10696 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 10697 | fi |
81ecdfbb | 10698 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10699 | fi |
10700 | ||
81ecdfbb RW |
10701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
10702 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 10703 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 10704 | |
81ecdfbb | 10705 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 10706 | |
97bf5e38 | 10707 | fi |
451928c5 | 10708 | |
a3828db0 | 10709 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
10710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10711 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
10712 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
10713 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10714 | else |
81ecdfbb | 10715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10716 | /* end confdefs.h. */ |
a3828db0 | 10717 | #include <sys/ptrace.h> |
bec39cab AC |
10718 | int |
10719 | main () | |
10720 | { | |
a3828db0 | 10721 | PTRACE_GETFPXREGS; |
bec39cab AC |
10722 | ; |
10723 | return 0; | |
10724 | } | |
10725 | _ACEOF | |
81ecdfbb | 10726 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10727 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 10728 | else |
81ecdfbb | 10729 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 10730 | fi |
81ecdfbb | 10731 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10732 | fi |
10733 | ||
81ecdfbb RW |
10734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
10735 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 10736 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 10737 | |
81ecdfbb | 10738 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 10739 | |
97bf5e38 | 10740 | fi |
451928c5 | 10741 | |
a3828db0 | 10742 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
10743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
10744 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
10745 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
10746 | $as_echo_n "(cached) " >&6 | |
3862412b | 10747 | else |
81ecdfbb | 10748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10749 | /* end confdefs.h. */ |
a3828db0 MK |
10750 | #include <sys/types.h> |
10751 | #include <sys/ptrace.h> | |
bec39cab AC |
10752 | int |
10753 | main () | |
10754 | { | |
a3828db0 | 10755 | PT_GETDBREGS; |
bec39cab AC |
10756 | ; |
10757 | return 0; | |
10758 | } | |
10759 | _ACEOF | |
81ecdfbb | 10760 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10761 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 10762 | else |
81ecdfbb | 10763 | gdb_cv_have_pt_getdbregs=no |
3862412b | 10764 | fi |
81ecdfbb | 10765 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10766 | fi |
10767 | ||
81ecdfbb RW |
10768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
10769 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 10770 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 10771 | |
81ecdfbb | 10772 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 10773 | |
97bf5e38 | 10774 | fi |
3862412b | 10775 | |
a3828db0 | 10776 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
10777 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
10778 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
10779 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
10780 | $as_echo_n "(cached) " >&6 | |
3862412b | 10781 | else |
81ecdfbb | 10782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10783 | /* end confdefs.h. */ |
a3828db0 MK |
10784 | #include <sys/types.h> |
10785 | #include <sys/ptrace.h> | |
bec39cab AC |
10786 | int |
10787 | main () | |
10788 | { | |
a3828db0 | 10789 | PT_GETXMMREGS; |
bec39cab AC |
10790 | ; |
10791 | return 0; | |
10792 | } | |
10793 | _ACEOF | |
81ecdfbb | 10794 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10795 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 10796 | else |
81ecdfbb | 10797 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 10798 | fi |
81ecdfbb | 10799 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10800 | fi |
10801 | ||
81ecdfbb RW |
10802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
10803 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 10804 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 10805 | |
81ecdfbb | 10806 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 10807 | |
97bf5e38 | 10808 | fi |
3862412b | 10809 | |
eb368090 | 10810 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
10811 | |
10812 | if test "${target}" = "${host}"; then | |
10813 | case "${host}" in | |
97bf5e38 | 10814 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 10815 | |
81ecdfbb | 10816 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
10817 | |
10818 | ;; | |
c162e8c9 | 10819 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 10820 | |
81ecdfbb | 10821 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
10822 | |
10823 | ;; | |
10824 | mips-sgi-irix5*) | |
10825 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 10826 | |
81ecdfbb | 10827 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
10828 | |
10829 | ;; | |
10830 | esac | |
10831 | fi | |
10832 | ||
10833 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
10834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
10835 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
10836 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
10837 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10838 | else |
81ecdfbb | 10839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10840 | /* end confdefs.h. */ |
596c9d4b KB |
10841 | |
10842 | #define _SYSCALL32 | |
d30c5336 JK |
10843 | /* Needed for new procfs interface on sparc-solaris. */ |
10844 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10845 | #include <sys/procfs.h> |
bec39cab AC |
10846 | int |
10847 | main () | |
10848 | { | |
97bf5e38 | 10849 | pstatus_t avar |
bec39cab AC |
10850 | ; |
10851 | return 0; | |
10852 | } | |
10853 | _ACEOF | |
81ecdfbb | 10854 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10855 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 10856 | else |
81ecdfbb | 10857 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 10858 | |
596c9d4b | 10859 | fi |
81ecdfbb | 10860 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10861 | fi |
10862 | ||
97bf5e38 | 10863 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 10864 | |
81ecdfbb | 10865 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
10866 | |
10867 | fi | |
81ecdfbb RW |
10868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
10869 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 10870 | |
81ecdfbb RW |
10871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
10872 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
10873 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
10874 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10875 | else |
81ecdfbb | 10876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10877 | /* end confdefs.h. */ |
596c9d4b KB |
10878 | |
10879 | #define _SYSCALL32 | |
d30c5336 JK |
10880 | /* Needed for new procfs interface on sparc-solaris. */ |
10881 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10882 | #include <sys/procfs.h> |
bec39cab AC |
10883 | int |
10884 | main () | |
10885 | { | |
97bf5e38 | 10886 | prrun_t avar |
bec39cab AC |
10887 | ; |
10888 | return 0; | |
10889 | } | |
10890 | _ACEOF | |
81ecdfbb | 10891 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10892 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 10893 | else |
81ecdfbb | 10894 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 10895 | |
596c9d4b | 10896 | fi |
81ecdfbb | 10897 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10898 | fi |
10899 | ||
97bf5e38 | 10900 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 10901 | |
81ecdfbb | 10902 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
10903 | |
10904 | fi | |
81ecdfbb RW |
10905 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
10906 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 10907 | |
81ecdfbb RW |
10908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
10909 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
10910 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
10911 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10912 | else |
81ecdfbb | 10913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10914 | /* end confdefs.h. */ |
596c9d4b KB |
10915 | |
10916 | #define _SYSCALL32 | |
d30c5336 JK |
10917 | /* Needed for new procfs interface on sparc-solaris. */ |
10918 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10919 | #include <sys/procfs.h> |
bec39cab AC |
10920 | int |
10921 | main () | |
10922 | { | |
97bf5e38 | 10923 | gregset_t avar |
bec39cab AC |
10924 | ; |
10925 | return 0; | |
10926 | } | |
10927 | _ACEOF | |
81ecdfbb | 10928 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10929 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 10930 | else |
81ecdfbb | 10931 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 10932 | |
596c9d4b | 10933 | fi |
81ecdfbb | 10934 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10935 | fi |
10936 | ||
97bf5e38 | 10937 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 10938 | |
81ecdfbb | 10939 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
10940 | |
10941 | fi | |
81ecdfbb RW |
10942 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
10943 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 10944 | |
81ecdfbb RW |
10945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
10946 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
10947 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
10948 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 10949 | else |
81ecdfbb | 10950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10951 | /* end confdefs.h. */ |
97bf5e38 MK |
10952 | |
10953 | #define _SYSCALL32 | |
d30c5336 JK |
10954 | /* Needed for new procfs interface on sparc-solaris. */ |
10955 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 10956 | #include <sys/procfs.h> |
bec39cab AC |
10957 | int |
10958 | main () | |
10959 | { | |
97bf5e38 | 10960 | fpregset_t avar |
bec39cab AC |
10961 | ; |
10962 | return 0; | |
10963 | } | |
10964 | _ACEOF | |
81ecdfbb | 10965 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10966 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 10967 | else |
81ecdfbb | 10968 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 10969 | |
d84dd0c5 | 10970 | fi |
81ecdfbb | 10971 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
10972 | fi |
10973 | ||
97bf5e38 | 10974 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 10975 | |
81ecdfbb | 10976 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 10977 | |
97bf5e38 | 10978 | fi |
81ecdfbb RW |
10979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
10980 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 10981 | |
81ecdfbb RW |
10982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
10983 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
10984 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
10985 | $as_echo_n "(cached) " >&6 | |
c906108c | 10986 | else |
81ecdfbb | 10987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10988 | /* end confdefs.h. */ |
c906108c | 10989 | |
97bf5e38 | 10990 | #define _SYSCALL32 |
d30c5336 JK |
10991 | /* Needed for new procfs interface on sparc-solaris. */ |
10992 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10993 | #include <sys/procfs.h> |
bec39cab AC |
10994 | int |
10995 | main () | |
10996 | { | |
97bf5e38 | 10997 | prgregset_t avar |
bec39cab AC |
10998 | ; |
10999 | return 0; | |
11000 | } | |
11001 | _ACEOF | |
81ecdfbb | 11002 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11003 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 11004 | else |
81ecdfbb | 11005 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 11006 | |
c906108c | 11007 | fi |
81ecdfbb | 11008 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11009 | fi |
11010 | ||
97bf5e38 | 11011 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 11012 | |
81ecdfbb | 11013 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 11014 | |
97bf5e38 | 11015 | fi |
81ecdfbb RW |
11016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
11017 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 11018 | |
81ecdfbb RW |
11019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
11020 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
11021 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
11022 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11023 | else |
81ecdfbb | 11024 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11025 | /* end confdefs.h. */ |
97bf5e38 MK |
11026 | |
11027 | #define _SYSCALL32 | |
d30c5336 JK |
11028 | /* Needed for new procfs interface on sparc-solaris. */ |
11029 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11030 | #include <sys/procfs.h> |
bec39cab AC |
11031 | int |
11032 | main () | |
11033 | { | |
97bf5e38 | 11034 | prfpregset_t avar |
bec39cab AC |
11035 | ; |
11036 | return 0; | |
11037 | } | |
11038 | _ACEOF | |
81ecdfbb | 11039 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11040 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 11041 | else |
81ecdfbb | 11042 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 11043 | |
d45fe813 | 11044 | fi |
81ecdfbb | 11045 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11046 | fi |
11047 | ||
97bf5e38 | 11048 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 11049 | |
81ecdfbb | 11050 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 11051 | |
97bf5e38 | 11052 | fi |
81ecdfbb RW |
11053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
11054 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 11055 | |
81ecdfbb RW |
11056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
11057 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
11058 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
11059 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11060 | else |
81ecdfbb | 11061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11062 | /* end confdefs.h. */ |
97bf5e38 MK |
11063 | |
11064 | #define _SYSCALL32 | |
d30c5336 JK |
11065 | /* Needed for new procfs interface on sparc-solaris. */ |
11066 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11067 | #include <sys/procfs.h> |
bec39cab AC |
11068 | int |
11069 | main () | |
11070 | { | |
97bf5e38 | 11071 | prgregset32_t avar |
bec39cab AC |
11072 | ; |
11073 | return 0; | |
11074 | } | |
11075 | _ACEOF | |
81ecdfbb | 11076 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11077 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 11078 | else |
81ecdfbb | 11079 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 11080 | |
d45fe813 | 11081 | fi |
81ecdfbb | 11082 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11083 | fi |
11084 | ||
97bf5e38 | 11085 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 11086 | |
81ecdfbb | 11087 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 11088 | |
97bf5e38 | 11089 | fi |
81ecdfbb RW |
11090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
11091 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 11092 | |
81ecdfbb RW |
11093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
11094 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
11095 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
11096 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11097 | else |
81ecdfbb | 11098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11099 | /* end confdefs.h. */ |
97bf5e38 MK |
11100 | |
11101 | #define _SYSCALL32 | |
d30c5336 JK |
11102 | /* Needed for new procfs interface on sparc-solaris. */ |
11103 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11104 | #include <sys/procfs.h> |
bec39cab AC |
11105 | int |
11106 | main () | |
11107 | { | |
97bf5e38 | 11108 | prfpregset32_t avar |
bec39cab AC |
11109 | ; |
11110 | return 0; | |
11111 | } | |
11112 | _ACEOF | |
81ecdfbb | 11113 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11114 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 11115 | else |
81ecdfbb | 11116 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 11117 | |
d45fe813 | 11118 | fi |
81ecdfbb | 11119 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11120 | fi |
11121 | ||
97bf5e38 | 11122 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 11123 | |
81ecdfbb | 11124 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 11125 | |
97bf5e38 | 11126 | fi |
81ecdfbb RW |
11127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
11128 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 11129 | |
81ecdfbb RW |
11130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11131 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11132 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11133 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11134 | else |
81ecdfbb | 11135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11136 | /* end confdefs.h. */ |
97bf5e38 | 11137 | |
d45fe813 | 11138 | #define _SYSCALL32 |
d30c5336 JK |
11139 | /* Needed for new procfs interface on sparc-solaris. */ |
11140 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11141 | #include <sys/procfs.h> |
bec39cab AC |
11142 | int |
11143 | main () | |
11144 | { | |
97bf5e38 | 11145 | lwpid_t avar |
bec39cab AC |
11146 | ; |
11147 | return 0; | |
11148 | } | |
11149 | _ACEOF | |
81ecdfbb | 11150 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11151 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11152 | else |
81ecdfbb | 11153 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11154 | |
d45fe813 | 11155 | fi |
81ecdfbb | 11156 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11157 | fi |
11158 | ||
97bf5e38 | 11159 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11160 | |
81ecdfbb | 11161 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11162 | |
97bf5e38 | 11163 | fi |
81ecdfbb RW |
11164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11165 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11166 | |
81ecdfbb RW |
11167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11168 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11169 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11170 | $as_echo_n "(cached) " >&6 | |
c906108c | 11171 | else |
81ecdfbb | 11172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11173 | /* end confdefs.h. */ |
c906108c | 11174 | |
97bf5e38 | 11175 | #define _SYSCALL32 |
d30c5336 JK |
11176 | /* Needed for new procfs interface on sparc-solaris. */ |
11177 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11178 | #include <sys/procfs.h> |
bec39cab AC |
11179 | int |
11180 | main () | |
11181 | { | |
97bf5e38 | 11182 | psaddr_t avar |
bec39cab AC |
11183 | ; |
11184 | return 0; | |
11185 | } | |
11186 | _ACEOF | |
81ecdfbb | 11187 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11188 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11189 | else |
81ecdfbb | 11190 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11191 | |
c906108c | 11192 | fi |
81ecdfbb | 11193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11194 | fi |
11195 | ||
97bf5e38 | 11196 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11197 | |
81ecdfbb | 11198 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11199 | |
97bf5e38 | 11200 | fi |
81ecdfbb RW |
11201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11202 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11203 | |
81ecdfbb RW |
11204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11205 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11206 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11207 | $as_echo_n "(cached) " >&6 | |
c906108c | 11208 | else |
81ecdfbb | 11209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11210 | /* end confdefs.h. */ |
c906108c | 11211 | |
97bf5e38 | 11212 | #define _SYSCALL32 |
d30c5336 JK |
11213 | /* Needed for new procfs interface on sparc-solaris. */ |
11214 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11215 | #include <sys/procfs.h> |
bec39cab AC |
11216 | int |
11217 | main () | |
11218 | { | |
97bf5e38 | 11219 | prsysent_t avar |
bec39cab AC |
11220 | ; |
11221 | return 0; | |
11222 | } | |
11223 | _ACEOF | |
81ecdfbb | 11224 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11225 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11226 | else |
81ecdfbb | 11227 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11228 | |
c906108c | 11229 | fi |
81ecdfbb | 11230 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11231 | fi |
11232 | ||
97bf5e38 | 11233 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11234 | |
81ecdfbb | 11235 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11236 | |
97bf5e38 | 11237 | fi |
81ecdfbb RW |
11238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11239 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11240 | |
81ecdfbb RW |
11241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11242 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11243 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11244 | $as_echo_n "(cached) " >&6 | |
c906108c | 11245 | else |
81ecdfbb | 11246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11247 | /* end confdefs.h. */ |
c906108c | 11248 | |
97bf5e38 | 11249 | #define _SYSCALL32 |
d30c5336 JK |
11250 | /* Needed for new procfs interface on sparc-solaris. */ |
11251 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11252 | #include <sys/procfs.h> |
bec39cab AC |
11253 | int |
11254 | main () | |
11255 | { | |
97bf5e38 | 11256 | pr_sigset_t avar |
bec39cab AC |
11257 | ; |
11258 | return 0; | |
11259 | } | |
11260 | _ACEOF | |
81ecdfbb | 11261 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11262 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 11263 | else |
81ecdfbb | 11264 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 11265 | |
c906108c | 11266 | fi |
81ecdfbb | 11267 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11268 | fi |
11269 | ||
97bf5e38 | 11270 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 11271 | |
81ecdfbb | 11272 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 11273 | |
97bf5e38 | 11274 | fi |
81ecdfbb RW |
11275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
11276 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 11277 | |
81ecdfbb RW |
11278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
11279 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
11280 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
11281 | $as_echo_n "(cached) " >&6 | |
c906108c | 11282 | else |
81ecdfbb | 11283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11284 | /* end confdefs.h. */ |
c906108c | 11285 | |
97bf5e38 | 11286 | #define _SYSCALL32 |
d30c5336 JK |
11287 | /* Needed for new procfs interface on sparc-solaris. */ |
11288 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11289 | #include <sys/procfs.h> |
bec39cab AC |
11290 | int |
11291 | main () | |
11292 | { | |
97bf5e38 | 11293 | pr_sigaction64_t avar |
bec39cab AC |
11294 | ; |
11295 | return 0; | |
11296 | } | |
11297 | _ACEOF | |
81ecdfbb | 11298 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11299 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 11300 | else |
81ecdfbb | 11301 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 11302 | |
c906108c | 11303 | fi |
81ecdfbb | 11304 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11305 | fi |
11306 | ||
97bf5e38 | 11307 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 11308 | |
81ecdfbb | 11309 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 11310 | |
97bf5e38 | 11311 | fi |
81ecdfbb RW |
11312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
11313 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 11314 | |
81ecdfbb RW |
11315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
11316 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
11317 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
11318 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11319 | else |
81ecdfbb | 11320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11321 | /* end confdefs.h. */ |
97bf5e38 MK |
11322 | |
11323 | #define _SYSCALL32 | |
d30c5336 JK |
11324 | /* Needed for new procfs interface on sparc-solaris. */ |
11325 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11326 | #include <sys/procfs.h> |
bec39cab AC |
11327 | int |
11328 | main () | |
11329 | { | |
97bf5e38 | 11330 | pr_siginfo64_t avar |
bec39cab AC |
11331 | ; |
11332 | return 0; | |
11333 | } | |
11334 | _ACEOF | |
81ecdfbb | 11335 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11336 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
11337 | else | |
81ecdfbb | 11338 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 11339 | |
97bf5e38 | 11340 | fi |
81ecdfbb | 11341 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11342 | fi |
c906108c | 11343 | |
97bf5e38 | 11344 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 11345 | |
81ecdfbb | 11346 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 11347 | |
97bf5e38 | 11348 | fi |
81ecdfbb RW |
11349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
11350 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
11351 | |
11352 | ||
97bf5e38 MK |
11353 | |
11354 | ||
11355 | ||
97bf5e38 | 11356 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
11357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
11358 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
11359 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
11360 | $as_echo_n "(cached) " >&6 | |
c906108c | 11361 | else |
81ecdfbb | 11362 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 11363 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 11364 | else |
81ecdfbb | 11365 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11366 | /* end confdefs.h. */ |
97bf5e38 MK |
11367 | #include <sys/procfs.h> |
11368 | int main () | |
11369 | { | |
11370 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
11371 | return 1; | |
11372 | return 0; | |
11373 | } | |
bec39cab | 11374 | _ACEOF |
81ecdfbb | 11375 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11376 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
11377 | else |
11378 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 11379 | fi |
81ecdfbb RW |
11380 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11381 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11382 | fi |
81ecdfbb | 11383 | |
c906108c SS |
11384 | fi |
11385 | ||
81ecdfbb RW |
11386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
11387 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 11388 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 11389 | |
81ecdfbb | 11390 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 11391 | |
97bf5e38 MK |
11392 | fi |
11393 | fi | |
c906108c | 11394 | |
bec39cab | 11395 | |
81ecdfbb RW |
11396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
11397 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
11398 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
11399 | $as_echo_n "(cached) " >&6 | |
c906108c | 11400 | else |
81ecdfbb | 11401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11402 | /* end confdefs.h. */ |
97bf5e38 MK |
11403 | #include <unistd.h> |
11404 | #include <sys/types.h> | |
11405 | #include <sys/procfs.h> | |
11406 | ||
bec39cab AC |
11407 | int |
11408 | main () | |
11409 | { | |
97bf5e38 MK |
11410 | |
11411 | int dummy;; | |
11412 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
11413 | |
11414 | ; | |
11415 | return 0; | |
11416 | } | |
11417 | _ACEOF | |
81ecdfbb | 11418 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11419 | gdb_cv_have_procfs_piocset=yes |
c906108c | 11420 | else |
81ecdfbb | 11421 | gdb_cv_have_procfs_piocset=no |
c906108c | 11422 | fi |
81ecdfbb | 11423 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11424 | fi |
97bf5e38 | 11425 | |
81ecdfbb RW |
11426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
11427 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 11428 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 11429 | |
81ecdfbb | 11430 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
11431 | |
11432 | fi | |
c906108c | 11433 | fi |
c906108c | 11434 | |
97bf5e38 | 11435 | if test ${host} = ${target} ; then |
bec39cab | 11436 | |
81ecdfbb RW |
11437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
11438 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
11439 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
11440 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11441 | else |
81ecdfbb | 11442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11443 | /* end confdefs.h. */ |
97bf5e38 | 11444 | #include <link.h> |
bec39cab AC |
11445 | int |
11446 | main () | |
11447 | { | |
97bf5e38 | 11448 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
11449 | ; |
11450 | return 0; | |
11451 | } | |
11452 | _ACEOF | |
81ecdfbb | 11453 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11454 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 11455 | else |
81ecdfbb | 11456 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 11457 | fi |
81ecdfbb | 11458 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11459 | fi |
11460 | ||
81ecdfbb RW |
11461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
11462 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 11463 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 11464 | |
81ecdfbb | 11465 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11466 | |
11467 | fi | |
11468 | ||
bec39cab | 11469 | |
81ecdfbb RW |
11470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
11471 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
11472 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
11473 | $as_echo_n "(cached) " >&6 | |
c906108c | 11474 | else |
81ecdfbb | 11475 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11476 | /* end confdefs.h. */ |
97bf5e38 MK |
11477 | #include <sys/types.h> |
11478 | #include <link.h> | |
bec39cab AC |
11479 | int |
11480 | main () | |
11481 | { | |
97bf5e38 | 11482 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
11483 | ; |
11484 | return 0; | |
11485 | } | |
11486 | _ACEOF | |
81ecdfbb | 11487 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11488 | gdb_cv_have_struct_link_map_with_lm_members=yes |
11489 | else | |
81ecdfbb | 11490 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 11491 | fi |
81ecdfbb | 11492 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11493 | fi |
c906108c | 11494 | |
81ecdfbb RW |
11495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
11496 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 11497 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 11498 | |
81ecdfbb | 11499 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11500 | |
11501 | fi | |
11502 | ||
bec39cab | 11503 | |
81ecdfbb RW |
11504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
11505 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
11506 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
11507 | $as_echo_n "(cached) " >&6 | |
c906108c | 11508 | else |
81ecdfbb | 11509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11510 | /* end confdefs.h. */ |
97bf5e38 MK |
11511 | #include <sys/types.h> |
11512 | #ifdef HAVE_NLIST_H | |
11513 | #include <nlist.h> | |
11514 | #endif | |
11515 | #include <link.h> | |
bec39cab AC |
11516 | int |
11517 | main () | |
11518 | { | |
97bf5e38 | 11519 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
11520 | ; |
11521 | return 0; | |
11522 | } | |
11523 | _ACEOF | |
81ecdfbb | 11524 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11525 | gdb_cv_have_struct_so_map_with_som_members=yes |
11526 | else | |
81ecdfbb | 11527 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 11528 | fi |
81ecdfbb | 11529 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11530 | fi |
c906108c | 11531 | |
81ecdfbb RW |
11532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
11533 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 11534 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 11535 | |
81ecdfbb | 11536 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 11537 | |
97bf5e38 | 11538 | fi |
c906108c | 11539 | |
bec39cab | 11540 | |
81ecdfbb RW |
11541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
11542 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
11543 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
11544 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11545 | else |
81ecdfbb | 11546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11547 | /* end confdefs.h. */ |
97bf5e38 MK |
11548 | #define _SYSCALL32 |
11549 | #include <sys/link.h> | |
bec39cab AC |
11550 | int |
11551 | main () | |
11552 | { | |
97bf5e38 | 11553 | struct link_map32 l; |
bec39cab AC |
11554 | ; |
11555 | return 0; | |
11556 | } | |
11557 | _ACEOF | |
81ecdfbb | 11558 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11559 | gdb_cv_have_struct_link_map32=yes |
11560 | else | |
81ecdfbb | 11561 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 11562 | fi |
81ecdfbb | 11563 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11564 | fi |
c906108c | 11565 | |
81ecdfbb RW |
11566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
11567 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 11568 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 11569 | |
81ecdfbb | 11570 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 11571 | |
60ca704f | 11572 | |
81ecdfbb | 11573 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 11574 | |
97bf5e38 MK |
11575 | fi |
11576 | fi | |
c906108c | 11577 | |
bc8bcb4b | 11578 | # Check if the compiler supports the `long long' type. |
c906108c | 11579 | |
81ecdfbb RW |
11580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
11581 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
11582 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
11583 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11584 | else |
81ecdfbb | 11585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11586 | /* end confdefs.h. */ |
bc8bcb4b | 11587 | extern long long foo; |
bec39cab AC |
11588 | int |
11589 | main () | |
11590 | { | |
bc8bcb4b | 11591 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
11592 | ; |
11593 | return 0; | |
11594 | } | |
11595 | _ACEOF | |
81ecdfbb | 11596 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11597 | gdb_cv_c_long_long=yes |
11598 | else | |
81ecdfbb | 11599 | gdb_cv_c_long_long=no |
97bf5e38 | 11600 | fi |
81ecdfbb | 11601 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11602 | fi |
81ecdfbb RW |
11603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
11604 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
11605 | if test $gdb_cv_c_long_long != yes; then |
11606 | # libdecnumber requires long long. | |
11607 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
11608 | fi |
11609 | ||
bc8bcb4b | 11610 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 11611 | |
81ecdfbb RW |
11612 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
11613 | $as_echo_n "checking for long long support in printf... " >&6; } | |
11614 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
11615 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11616 | else |
81ecdfbb | 11617 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11618 | gdb_cv_printf_has_long_long=no |
11619 | else | |
81ecdfbb | 11620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11621 | /* end confdefs.h. */ |
bc8bcb4b MK |
11622 | $ac_includes_default |
11623 | int | |
11624 | main () | |
11625 | { | |
11626 | char buf[32]; | |
97bf5e38 MK |
11627 | long long l = 0; |
11628 | l = (l << 16) + 0x0123; | |
11629 | l = (l << 16) + 0x4567; | |
11630 | l = (l << 16) + 0x89ab; | |
11631 | l = (l << 16) + 0xcdef; | |
11632 | sprintf (buf, "0x%016llx", l); | |
11633 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
11634 | ; |
11635 | return 0; | |
c906108c | 11636 | } |
bec39cab | 11637 | _ACEOF |
81ecdfbb | 11638 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11639 | gdb_cv_printf_has_long_long=yes |
11640 | else | |
81ecdfbb | 11641 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 11642 | fi |
81ecdfbb RW |
11643 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11644 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11645 | fi |
81ecdfbb | 11646 | |
97bf5e38 | 11647 | fi |
81ecdfbb RW |
11648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
11649 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 11650 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 11651 | |
81ecdfbb | 11652 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11653 | |
11654 | fi | |
97bf5e38 | 11655 | |
1a619819 LM |
11656 | # Check if the compiler and runtime support printing decfloats. |
11657 | ||
81ecdfbb RW |
11658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
11659 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
11660 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
11661 | $as_echo_n "(cached) " >&6 | |
1a619819 | 11662 | else |
81ecdfbb | 11663 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
11664 | gdb_cv_printf_has_decfloat=no |
11665 | else | |
81ecdfbb | 11666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
11667 | /* end confdefs.h. */ |
11668 | $ac_includes_default | |
11669 | int | |
11670 | main () | |
11671 | { | |
11672 | char buf[64]; | |
11673 | _Decimal32 d32 = 1.2345df; | |
11674 | _Decimal64 d64 = 1.2345dd; | |
11675 | _Decimal128 d128 = 1.2345dl; | |
11676 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
11677 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
11678 | ; | |
11679 | return 0; | |
11680 | } | |
11681 | _ACEOF | |
81ecdfbb | 11682 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
11683 | gdb_cv_printf_has_decfloat=yes |
11684 | else | |
81ecdfbb | 11685 | gdb_cv_printf_has_decfloat=no |
1a619819 | 11686 | fi |
81ecdfbb RW |
11687 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11688 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 11689 | fi |
81ecdfbb | 11690 | |
1a619819 | 11691 | fi |
81ecdfbb RW |
11692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
11693 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
11694 | if test $gdb_cv_printf_has_decfloat = yes; then |
11695 | ||
81ecdfbb | 11696 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
11697 | |
11698 | fi | |
11699 | ||
bc8bcb4b MK |
11700 | # Check if the compiler supports the `long double' type. We can't use |
11701 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
11702 | # constants defined in <float.h> that fail on some systems, | |
11703 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 11704 | |
81ecdfbb RW |
11705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
11706 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
11707 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
11708 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11709 | else |
81ecdfbb | 11710 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11711 | /* end confdefs.h. */ |
97bf5e38 | 11712 | long double foo; |
bec39cab | 11713 | _ACEOF |
81ecdfbb | 11714 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 11715 | gdb_cv_c_long_double=yes |
97bf5e38 | 11716 | else |
81ecdfbb | 11717 | gdb_cv_c_long_double=no |
97bf5e38 | 11718 | fi |
81ecdfbb | 11719 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11720 | fi |
81ecdfbb RW |
11721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
11722 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 11723 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 11724 | |
81ecdfbb | 11725 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11726 | |
11727 | fi | |
11728 | ||
bc8bcb4b | 11729 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 11730 | |
81ecdfbb RW |
11731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
11732 | $as_echo_n "checking for long double support in printf... " >&6; } | |
11733 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
11734 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11735 | else |
81ecdfbb | 11736 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11737 | gdb_cv_printf_has_long_double=no |
11738 | else | |
81ecdfbb | 11739 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11740 | /* end confdefs.h. */ |
bc8bcb4b MK |
11741 | $ac_includes_default |
11742 | int | |
11743 | main () | |
11744 | { | |
11745 | char buf[16]; | |
97bf5e38 MK |
11746 | long double f = 3.141592653; |
11747 | sprintf (buf, "%Lg", f); | |
11748 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
11749 | ; |
11750 | return 0; | |
97bf5e38 | 11751 | } |
bec39cab | 11752 | _ACEOF |
81ecdfbb | 11753 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11754 | gdb_cv_printf_has_long_double=yes |
c906108c | 11755 | else |
81ecdfbb | 11756 | gdb_cv_printf_has_long_double=no |
c906108c | 11757 | fi |
81ecdfbb RW |
11758 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11759 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11760 | fi |
81ecdfbb | 11761 | |
c906108c | 11762 | fi |
81ecdfbb RW |
11763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
11764 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 11765 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 11766 | |
81ecdfbb | 11767 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11768 | |
11769 | fi | |
97bf5e38 | 11770 | |
bc8bcb4b | 11771 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 11772 | |
81ecdfbb RW |
11773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
11774 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
11775 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
11776 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11777 | else |
81ecdfbb | 11778 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11779 | gdb_cv_scanf_has_long_double=no |
11780 | else | |
81ecdfbb | 11781 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11782 | /* end confdefs.h. */ |
bc8bcb4b MK |
11783 | #include <stdio.h> |
11784 | int | |
11785 | main () | |
11786 | { | |
11787 | char *buf = "3.141592653"; | |
97bf5e38 MK |
11788 | long double f = 0; |
11789 | sscanf (buf, "%Lg", &f); | |
11790 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
11791 | ; |
11792 | return 0; | |
97bf5e38 | 11793 | } |
bec39cab | 11794 | _ACEOF |
81ecdfbb | 11795 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11796 | gdb_cv_scanf_has_long_double=yes |
11797 | else | |
81ecdfbb | 11798 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 11799 | fi |
81ecdfbb RW |
11800 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11801 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11802 | fi |
81ecdfbb | 11803 | |
c906108c | 11804 | fi |
81ecdfbb RW |
11805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
11806 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 11807 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 11808 | |
81ecdfbb | 11809 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11810 | |
11811 | fi | |
c906108c | 11812 | |
438013df AO |
11813 | case ${host_os} in |
11814 | aix*) | |
81ecdfbb RW |
11815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
11816 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
11817 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
11818 | $as_echo_n "(cached) " >&6 | |
438013df | 11819 | else |
bec39cab | 11820 | |
438013df AO |
11821 | SAVE_LDFLAGS=$LDFLAGS |
11822 | ||
11823 | case $GCC in | |
11824 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
11825 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
11826 | esac | |
11827 | ||
11828 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 11829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11830 | /* end confdefs.h. */ |
438013df | 11831 | |
bec39cab AC |
11832 | int |
11833 | main () | |
11834 | { | |
438013df | 11835 | int i; |
bec39cab AC |
11836 | ; |
11837 | return 0; | |
11838 | } | |
11839 | _ACEOF | |
81ecdfbb | 11840 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 11841 | |
81ecdfbb RW |
11842 | else |
11843 | gdb_cv_bigtoc= | |
438013df | 11844 | fi |
81ecdfbb RW |
11845 | rm -f core conftest.err conftest.$ac_objext \ |
11846 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 11847 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 11848 | |
bec39cab | 11849 | fi |
81ecdfbb RW |
11850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
11851 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
11852 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
11853 | ;; | |
11854 | esac | |
11855 | ||
38f6b338 | 11856 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 11857 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
11858 | dynamic_list=false |
11859 | if test "${gdb_native}" = yes; then | |
11860 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
11861 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
11862 | # may not be supported there. | |
11863 | old_LDFLAGS="$LDFLAGS" | |
11864 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
11865 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
11866 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
11867 | if test "${have_libpython}" = no; then | |
11868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
11869 | /* end confdefs.h. */ |
11870 | ||
11871 | int | |
11872 | main () | |
11873 | { | |
11874 | ||
11875 | ; | |
11876 | return 0; | |
11877 | } | |
11878 | _ACEOF | |
11879 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
11880 | dynamic_list=true |
11881 | fi | |
11882 | rm -f core conftest.err conftest.$ac_objext \ | |
11883 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
11884 | else |
11885 | # Workaround http://bugs.python.org/issue4434 where static | |
11886 | # libpythonX.Y.a would get its symbols required for | |
11887 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
11888 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
11889 | old_CFLAGS="$CFLAGS" | |
11890 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
11891 | if test "$cross_compiling" = yes; then : | |
3bebe2f2 | 11892 | true |
f6528abd | 11893 | else |
3bebe2f2 JK |
11894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11895 | /* end confdefs.h. */ | |
11896 | #include "${have_libpython}/Python.h" | |
11897 | int | |
11898 | main () | |
11899 | { | |
11900 | int err; | |
38f6b338 JK |
11901 | Py_Initialize (); |
11902 | err = PyRun_SimpleString ("import itertools\n"); | |
11903 | Py_Finalize (); | |
11904 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
11905 | ; |
11906 | return 0; | |
11907 | } | |
11908 | _ACEOF | |
11909 | if ac_fn_c_try_run "$LINENO"; then : | |
11910 | dynamic_list=true | |
11911 | fi | |
11912 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11913 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11914 | fi | |
11915 | ||
38f6b338 JK |
11916 | CFLAGS="$old_CFLAGS" |
11917 | fi | |
11918 | LDFLAGS="$old_LDFLAGS" | |
11919 | fi | |
11920 | if $dynamic_list; then | |
11921 | found="-Wl,--dynamic-list" | |
11922 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 11923 | else |
38f6b338 JK |
11924 | found="-rdynamic" |
11925 | RDYNAMIC="-rdynamic" | |
f6528abd | 11926 | fi |
f6528abd | 11927 | |
38f6b338 | 11928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 11929 | $as_echo "$found" >&6; } |
0407b3f1 | 11930 | |
f6528abd | 11931 | |
0407b3f1 | 11932 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 11933 | case ${host_os} in |
c906108c | 11934 | solaris*) |
d92419e5 JB |
11935 | # See if thread_db library is around for Solaris thread debugging. |
11936 | # Note that we must explicitly test for version 1 of the library | |
11937 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
11938 | # the same API. | |
81ecdfbb RW |
11939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
11940 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 11941 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
11942 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11943 | $as_echo "yes" >&6; } | |
60ca704f | 11944 | |
81ecdfbb | 11945 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 11946 | |
3483b318 | 11947 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 11948 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
43c75337 JB |
11949 | # On SPARC CPUs, we also need to build sparc-sol-thread. |
11950 | case ${host_cpu} in | |
11951 | sparc*) | |
11952 | CONFIG_OBS="${CONFIG_OBS} sparc-sol-thread.o" | |
11953 | CONFIG_SRCS="${CONFIG_SRCS} sparc-sol-thread.c" | |
11954 | ;; | |
11955 | esac | |
81ecdfbb RW |
11956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
11957 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
11958 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
11959 | $as_echo_n "(cached) " >&6 | |
c906108c | 11960 | else |
bec39cab | 11961 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 11962 | LIBS="-ldl $LIBS" |
81ecdfbb | 11963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
11964 | /* end confdefs.h. */ |
11965 | ||
81ecdfbb RW |
11966 | /* Override any GCC internal prototype to avoid an error. |
11967 | Use char because int might match the return type of a GCC | |
11968 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
11969 | #ifdef __cplusplus |
11970 | extern "C" | |
11971 | #endif | |
bec39cab AC |
11972 | char dlopen (); |
11973 | int | |
11974 | main () | |
11975 | { | |
81ecdfbb | 11976 | return dlopen (); |
bec39cab AC |
11977 | ; |
11978 | return 0; | |
11979 | } | |
11980 | _ACEOF | |
81ecdfbb | 11981 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
11982 | ac_cv_lib_dl_dlopen=yes |
11983 | else | |
81ecdfbb | 11984 | ac_cv_lib_dl_dlopen=no |
bec39cab | 11985 | fi |
81ecdfbb RW |
11986 | rm -f core conftest.err conftest.$ac_objext \ |
11987 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
11988 | LIBS=$ac_check_lib_save_LIBS |
11989 | fi | |
81ecdfbb RW |
11990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
11991 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
11992 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
11993 | cat >>confdefs.h <<_ACEOF |
11994 | #define HAVE_LIBDL 1 | |
11995 | _ACEOF | |
c906108c SS |
11996 | |
11997 | LIBS="-ldl $LIBS" | |
11998 | ||
c906108c SS |
11999 | fi |
12000 | ||
f6528abd | 12001 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
12002 | # Sun randomly tweaked the prototypes in <proc_service.h> |
12003 | # at one point. | |
81ecdfbb RW |
12004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
12005 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
12006 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
12007 | $as_echo_n "(cached) " >&6 | |
c906108c | 12008 | else |
bec39cab | 12009 | |
81ecdfbb | 12010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12011 | /* end confdefs.h. */ |
c906108c SS |
12012 | |
12013 | #include <proc_service.h> | |
12014 | ps_err_e ps_pdwrite | |
12015 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 12016 | |
bec39cab AC |
12017 | int |
12018 | main () | |
12019 | { | |
12020 | ||
12021 | ; | |
12022 | return 0; | |
12023 | } | |
12024 | _ACEOF | |
81ecdfbb | 12025 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
12026 | gdb_cv_proc_service_is_old=no |
12027 | else | |
81ecdfbb | 12028 | gdb_cv_proc_service_is_old=yes |
c906108c | 12029 | fi |
81ecdfbb | 12030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12031 | |
c906108c SS |
12032 | fi |
12033 | ||
81ecdfbb RW |
12034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
12035 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 12036 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 12037 | |
81ecdfbb | 12038 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
12039 | |
12040 | fi | |
12041 | else | |
81ecdfbb RW |
12042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12043 | $as_echo "no" >&6; } | |
c906108c SS |
12044 | fi |
12045 | ;; | |
d92419e5 | 12046 | aix*) |
81ecdfbb RW |
12047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
12048 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
12049 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
12050 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12051 | else |
81ecdfbb | 12052 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12053 | /* end confdefs.h. */ |
d92419e5 | 12054 | #include <sys/pthdebug.h> |
bec39cab AC |
12055 | int |
12056 | main () | |
12057 | { | |
d92419e5 JB |
12058 | #ifndef PTHDB_VERSION_3 |
12059 | #error | |
12060 | #endif | |
bec39cab AC |
12061 | ; |
12062 | return 0; | |
12063 | } | |
12064 | _ACEOF | |
81ecdfbb | 12065 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
12066 | gdb_cv_have_aix_thread_debug=yes |
12067 | else | |
81ecdfbb | 12068 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 12069 | fi |
81ecdfbb | 12070 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
12071 | fi |
12072 | ||
81ecdfbb RW |
12073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
12074 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
12075 | if test $gdb_cv_have_aix_thread_debug = yes; then |
12076 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 12077 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 12078 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
12079 | |
12080 | # Older versions of AIX do not provide the declaration for | |
12081 | # the getthrds function (it appears that it was introduced | |
12082 | # with AIX 6.x). | |
12083 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
12084 | " | |
12085 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
12086 | ac_have_decl=1 | |
12087 | else | |
12088 | ac_have_decl=0 | |
12089 | fi | |
12090 | ||
12091 | cat >>confdefs.h <<_ACEOF | |
12092 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
12093 | _ACEOF | |
12094 | ||
d92419e5 JB |
12095 | fi |
12096 | ;; | |
c906108c | 12097 | esac |
bec39cab | 12098 | |
c906108c SS |
12099 | fi |
12100 | ||
3f47be5c | 12101 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
12102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
12103 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
12104 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
12105 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12106 | else |
81ecdfbb | 12107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12108 | /* end confdefs.h. */ |
3f47be5c | 12109 | #include <thread_db.h> |
bec39cab AC |
12110 | int |
12111 | main () | |
12112 | { | |
3f47be5c | 12113 | int i = TD_NOTALLOC; |
bec39cab AC |
12114 | ; |
12115 | return 0; | |
12116 | } | |
12117 | _ACEOF | |
81ecdfbb | 12118 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12119 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12120 | else | |
81ecdfbb | 12121 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12122 | |
3f47be5c | 12123 | fi |
81ecdfbb | 12124 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12125 | |
bec39cab | 12126 | fi |
81ecdfbb RW |
12127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12128 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12130 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12131 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12132 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12133 | else |
81ecdfbb | 12134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12135 | /* end confdefs.h. */ |
12136 | #include <thread_db.h> | |
12137 | int | |
12138 | main () | |
12139 | { | |
12140 | int i = TD_VERSION; | |
12141 | ; | |
12142 | return 0; | |
12143 | } | |
12144 | _ACEOF | |
81ecdfbb | 12145 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12146 | gdb_cv_thread_db_h_has_td_version=yes |
12147 | else | |
81ecdfbb | 12148 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12149 | |
12150 | fi | |
81ecdfbb | 12151 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12152 | |
12153 | fi | |
81ecdfbb RW |
12154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12155 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12157 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12158 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12159 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12160 | else |
81ecdfbb | 12161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12162 | /* end confdefs.h. */ |
12163 | #include <thread_db.h> | |
12164 | int | |
12165 | main () | |
12166 | { | |
12167 | int i = TD_NOTLS; | |
12168 | ; | |
12169 | return 0; | |
12170 | } | |
12171 | _ACEOF | |
81ecdfbb | 12172 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12173 | gdb_cv_thread_db_h_has_td_notls=yes |
12174 | else | |
81ecdfbb | 12175 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12176 | |
12177 | fi | |
81ecdfbb | 12178 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12179 | |
12180 | fi | |
81ecdfbb RW |
12181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12182 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12183 | fi |
12184 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12185 | |
81ecdfbb | 12186 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12187 | |
59f80f10 DJ |
12188 | fi |
12189 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12190 | ||
81ecdfbb | 12191 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12192 | |
12193 | fi | |
12194 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12195 | ||
81ecdfbb | 12196 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12197 | |
3f47be5c EZ |
12198 | fi |
12199 | ||
b757528f | 12200 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12202 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12203 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
12204 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12205 | else |
81ecdfbb | 12206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12207 | /* end confdefs.h. */ |
b757528f | 12208 | #include <sys/syscall.h> |
bec39cab AC |
12209 | int |
12210 | main () | |
12211 | { | |
b757528f | 12212 | int i = __NR_tkill; |
bec39cab AC |
12213 | ; |
12214 | return 0; | |
12215 | } | |
12216 | _ACEOF | |
81ecdfbb | 12217 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12218 | gdb_cv_sys_syscall_h_has_tkill=yes |
12219 | else | |
81ecdfbb | 12220 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12221 | |
b757528f | 12222 | fi |
81ecdfbb | 12223 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12224 | |
bec39cab | 12225 | fi |
81ecdfbb RW |
12226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12227 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
12228 | fi |
12229 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 12230 | |
81ecdfbb | 12231 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
12232 | |
12233 | fi | |
12234 | ||
81ecdfbb RW |
12235 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12236 | " | |
12237 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12238 | ac_have_decl=1 | |
10568435 | 12239 | else |
81ecdfbb | 12240 | ac_have_decl=0 |
10568435 | 12241 | fi |
10568435 JK |
12242 | |
12243 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12244 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12245 | _ACEOF |
12246 | ||
12247 | ||
81ecdfbb RW |
12248 | if test "$cross_compiling" = yes; then : |
12249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12250 | /* end confdefs.h. */ |
12251 | #include <sys/personality.h> | |
12252 | int | |
12253 | main () | |
12254 | { | |
12255 | ||
12256 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12257 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12258 | # endif | |
12259 | /* Test the flag could be set and stays set. */ | |
12260 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12261 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12262 | return 1 | |
12263 | ; | |
12264 | return 0; | |
12265 | } | |
12266 | _ACEOF | |
81ecdfbb | 12267 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12268 | have_personality=true |
12269 | else | |
81ecdfbb | 12270 | have_personality=false |
10568435 | 12271 | fi |
81ecdfbb RW |
12272 | rm -f core conftest.err conftest.$ac_objext \ |
12273 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12274 | else |
81ecdfbb | 12275 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12276 | /* end confdefs.h. */ |
12277 | #include <sys/personality.h> | |
12278 | int | |
12279 | main () | |
12280 | { | |
12281 | ||
12282 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12283 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12284 | # endif | |
12285 | /* Test the flag could be set and stays set. */ | |
12286 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12287 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12288 | return 1 | |
12289 | ; | |
12290 | return 0; | |
12291 | } | |
12292 | _ACEOF | |
81ecdfbb | 12293 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12294 | have_personality=true |
12295 | else | |
81ecdfbb | 12296 | have_personality=false |
10568435 | 12297 | fi |
81ecdfbb RW |
12298 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12299 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12300 | fi |
81ecdfbb | 12301 | |
10568435 JK |
12302 | if $have_personality |
12303 | then | |
12304 | ||
81ecdfbb | 12305 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
12306 | |
12307 | fi | |
12308 | ||
fb40c209 | 12309 | |
f83d8a90 DE |
12310 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
12311 | # except that the argument to --with-sysroot is optional. | |
12312 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
12313 | if test "x$with_sysroot" = xyes; then | |
12314 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
12315 | fi | |
bec39cab | 12316 | |
81ecdfbb RW |
12317 | # Check whether --with-sysroot was given. |
12318 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
12319 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
12320 | else | |
12321 | TARGET_SYSTEM_ROOT= | |
12322 | fi | |
030292b7 | 12323 | |
030292b7 | 12324 | |
f83d8a90 DE |
12325 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
12326 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12327 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
12328 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 12329 | |
f83d8a90 DE |
12330 | cat >>confdefs.h <<_ACEOF |
12331 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
12332 | _ACEOF | |
bec39cab | 12333 | |
030292b7 | 12334 | |
b14b1491 | 12335 | |
f83d8a90 DE |
12336 | |
12337 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12338 | if test "x$prefix" = xNONE; then | |
12339 | test_prefix=/usr/local | |
12340 | else | |
12341 | test_prefix=$prefix | |
12342 | fi | |
12343 | else | |
12344 | test_prefix=$exec_prefix | |
12345 | fi | |
12346 | value=0 | |
12347 | case ${ac_define_dir} in | |
12348 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12349 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12350 | value=1 | |
12351 | ;; | |
12352 | esac | |
12353 | ||
12354 | cat >>confdefs.h <<_ACEOF | |
12355 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
12356 | _ACEOF | |
030292b7 DJ |
12357 | |
12358 | ||
12359 | ||
16e7150e | 12360 | |
16e7150e | 12361 | |
81ecdfbb RW |
12362 | # Check whether --with-system-gdbinit was given. |
12363 | if test "${with_system_gdbinit+set}" = set; then : | |
12364 | withval=$with_system_gdbinit; | |
b14b1491 TT |
12365 | SYSTEM_GDBINIT=$withval |
12366 | else | |
12367 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
12368 | fi |
12369 | ||
16e7150e JG |
12370 | |
12371 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
12372 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 12373 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
12374 | ac_define_dir=`eval echo $ac_define_dir` |
12375 | ||
12376 | cat >>confdefs.h <<_ACEOF | |
12377 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
12378 | _ACEOF | |
12379 | ||
12380 | ||
12381 | ||
0c4a4063 | 12382 | |
b14b1491 TT |
12383 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
12384 | if test "x$prefix" = xNONE; then | |
12385 | test_prefix=/usr/local | |
12386 | else | |
12387 | test_prefix=$prefix | |
12388 | fi | |
12389 | else | |
12390 | test_prefix=$exec_prefix | |
12391 | fi | |
12392 | value=0 | |
12393 | case ${ac_define_dir} in | |
12394 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12395 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12396 | value=1 | |
12397 | ;; | |
12398 | esac | |
16e7150e | 12399 | |
b14b1491 TT |
12400 | cat >>confdefs.h <<_ACEOF |
12401 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
12402 | _ACEOF |
12403 | ||
b14b1491 | 12404 | |
16e7150e | 12405 | |
0c4a4063 | 12406 | |
81ecdfbb RW |
12407 | # Check whether --enable-werror was given. |
12408 | if test "${enable_werror+set}" = set; then : | |
12409 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
12410 | yes | y) ERROR_ON_WARNING="yes" ;; |
12411 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 12412 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 12413 | esac |
81ecdfbb RW |
12414 | fi |
12415 | ||
094a342e | 12416 | |
a68ffae9 JK |
12417 | # Enable -Werror by default when using gcc. Turn it off for releases. |
12418 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
12419 | ERROR_ON_WARNING=yes |
12420 | fi | |
12421 | ||
12422 | WERROR_CFLAGS="" | |
12423 | if test "${ERROR_ON_WARNING}" = yes ; then | |
12424 | WERROR_CFLAGS="-Werror" | |
12425 | fi | |
12426 | ||
aa79a185 DJ |
12427 | # The entries after -Wno-pointer-sign are disabled warnings which may |
12428 | # be enabled in the future, which can not currently be used to build | |
12429 | # GDB. | |
12430 | # NOTE: If you change this list, remember to update | |
3b851bce | 12431 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
12432 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
12433 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 | 12434 | -Wno-unused -Wunused-value -Wunused-function \ |
352b3eda | 12435 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ |
d4fb63e1 | 12436 | -Wdeclaration-after-statement -Wempty-body" |
a3b362c4 | 12437 | |
3526781e DJ |
12438 | # Enable -Wno-format by default when using gcc on mingw since many |
12439 | # GCC versions complain about %I64. | |
12440 | case "${host}" in | |
12441 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
12442 | esac | |
12443 | ||
81ecdfbb RW |
12444 | # Check whether --enable-build-warnings was given. |
12445 | if test "${enable_build_warnings+set}" = set; then : | |
12446 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
12447 | yes) ;; |
12448 | no) build_warnings="-w";; | |
12449 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12450 | build_warnings="${build_warnings} ${t}";; | |
12451 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12452 | build_warnings="${t} ${build_warnings}";; | |
12453 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12454 | esac | |
d4f3574e | 12455 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 12456 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 12457 | fi |
81ecdfbb RW |
12458 | fi |
12459 | # Check whether --enable-gdb-build-warnings was given. | |
12460 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
12461 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
12462 | yes) ;; |
12463 | no) build_warnings="-w";; | |
12464 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12465 | build_warnings="${build_warnings} ${t}";; | |
12466 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12467 | build_warnings="${t} ${build_warnings}";; | |
12468 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12469 | esac | |
12470 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
12471 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
12472 | fi | |
81ecdfbb RW |
12473 | fi |
12474 | WARN_CFLAGS="" | |
c906108c SS |
12475 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
12476 | then | |
81ecdfbb RW |
12477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
12478 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
12479 | # Separate out the -Werror flag as some files just cannot be |
12480 | # compiled with it enabled. | |
12481 | for w in ${build_warnings}; do | |
12482 | case $w in | |
12483 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
12484 | *) # Check that GCC accepts it | |
4536bbc6 AC |
12485 | saved_CFLAGS="$CFLAGS" |
12486 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 12487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12488 | /* end confdefs.h. */ |
4536bbc6 | 12489 | |
bec39cab AC |
12490 | int |
12491 | main () | |
12492 | { | |
4536bbc6 | 12493 | |
bec39cab AC |
12494 | ; |
12495 | return 0; | |
12496 | } | |
12497 | _ACEOF | |
81ecdfbb | 12498 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 12499 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 12500 | fi |
81ecdfbb | 12501 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 12502 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
12503 | esac |
12504 | done | |
81ecdfbb RW |
12505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
12506 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
12507 | fi |
12508 | ||
12509 | ||
104c1213 | 12510 | |
7a292a7a | 12511 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
12512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
12513 | $as_echo_n "checking for cygwin... " >&6; } | |
12514 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
12515 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12516 | else |
81ecdfbb | 12517 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12518 | /* end confdefs.h. */ |
7a292a7a SS |
12519 | |
12520 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
12521 | lose | |
12522 | #endif | |
bec39cab | 12523 | _ACEOF |
7a292a7a | 12524 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 12525 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
12526 | gdb_cv_os_cygwin=yes |
12527 | else | |
7a292a7a SS |
12528 | gdb_cv_os_cygwin=no |
12529 | fi | |
12530 | rm -f conftest* | |
12531 | ||
12532 | fi | |
81ecdfbb RW |
12533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
12534 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 12535 | |
aff38e61 | 12536 | |
3eb25fda | 12537 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 12538 | case ${host} in |
95cbc983 AC |
12539 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
12540 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 12541 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
12542 | esac |
12543 | ||
12544 | ||
cd0fc7c3 SS |
12545 | # libreadline needs libuser32.a in a cygwin environment |
12546 | WIN32LIBS= | |
12547 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
12548 | WIN32LIBS="-luser32" |
12549 | case "${target}" in | |
12550 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
12551 | ;; | |
12552 | esac | |
cd0fc7c3 | 12553 | fi |
c906108c | 12554 | |
b4505029 MM |
12555 | # The ser-tcp.c module requires sockets. |
12556 | case ${host} in | |
12557 | *mingw32*) | |
12558 | ||
81ecdfbb | 12559 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
12560 | |
12561 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
12562 | ;; | |
12563 | esac | |
12564 | ||
7a292a7a | 12565 | |
31d99776 DJ |
12566 | # Add ELF support to GDB, but only if BFD includes ELF support. |
12567 | OLD_CFLAGS=$CFLAGS | |
12568 | OLD_LDFLAGS=$LDFLAGS | |
12569 | OLD_LIBS=$LIBS | |
12cd34f3 PA |
12570 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS |
12571 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
12572 | # always want our bfd. | |
12573 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5579a92e | 12574 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" |
7b3200f9 | 12575 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
075ff26d JK |
12576 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12577 | if test "$plugins" = "yes"; then | |
12578 | LIBS="-ldl $LIBS" | |
12579 | fi | |
0f72fb1c | 12580 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
12581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
12582 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
12583 | if test "${gdb_cv_var_elf+set}" = set; then : | |
12584 | $as_echo_n "(cached) " >&6 | |
31d99776 | 12585 | else |
81ecdfbb | 12586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
12587 | /* end confdefs.h. */ |
12588 | #include <stdlib.h> | |
12589 | #include "bfd.h" | |
12590 | #include "elf-bfd.h" | |
12591 | ||
12592 | int | |
12593 | main () | |
12594 | { | |
12595 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
12596 | ; | |
12597 | return 0; | |
12598 | } | |
12599 | _ACEOF | |
81ecdfbb | 12600 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
12601 | gdb_cv_var_elf=yes |
12602 | else | |
81ecdfbb | 12603 | gdb_cv_var_elf=no |
31d99776 | 12604 | fi |
81ecdfbb RW |
12605 | rm -f core conftest.err conftest.$ac_objext \ |
12606 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 12607 | fi |
81ecdfbb RW |
12608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
12609 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 | 12610 | if test $gdb_cv_var_elf = yes; then |
55aa24fb | 12611 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
31d99776 | 12612 | |
81ecdfbb | 12613 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 12614 | |
075ff26d JK |
12615 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12616 | if test "$plugins" = "yes"; then | |
12617 | OLD_LIBS="-ldl $OLD_LIBS" | |
12618 | fi | |
31d99776 DJ |
12619 | fi |
12620 | CFLAGS=$OLD_CFLAGS | |
12621 | LDFLAGS=$OLD_LDFLAGS | |
12622 | LIBS=$OLD_LIBS | |
12623 | ||
121ce6e5 DJ |
12624 | # Add any host-specific objects to GDB. |
12625 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
12626 | ||
608e2dbb TT |
12627 | # If building on ELF, look for lzma support for embedded compressed debug info. |
12628 | if test $gdb_cv_var_elf = yes; then | |
12629 | ||
12630 | # Check whether --with-lzma was given. | |
12631 | if test "${with_lzma+set}" = set; then : | |
12632 | withval=$with_lzma; | |
12633 | else | |
12634 | with_lzma=auto | |
12635 | fi | |
12636 | ||
12637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
12638 | $as_echo_n "checking whether to use lzma... " >&6; } | |
12639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
12640 | $as_echo "$with_lzma" >&6; } | |
12641 | ||
12642 | if test "${with_lzma}" != no; then | |
12643 | ||
12644 | ||
12645 | ||
12646 | ||
12647 | ||
12648 | ||
12649 | ||
12650 | ||
12651 | use_additional=yes | |
12652 | ||
12653 | acl_save_prefix="$prefix" | |
12654 | prefix="$acl_final_prefix" | |
12655 | acl_save_exec_prefix="$exec_prefix" | |
12656 | exec_prefix="$acl_final_exec_prefix" | |
12657 | ||
12658 | eval additional_includedir=\"$includedir\" | |
12659 | eval additional_libdir=\"$libdir\" | |
12660 | ||
12661 | exec_prefix="$acl_save_exec_prefix" | |
12662 | prefix="$acl_save_prefix" | |
12663 | ||
12664 | ||
12665 | # Check whether --with-liblzma-prefix was given. | |
12666 | if test "${with_liblzma_prefix+set}" = set; then : | |
12667 | withval=$with_liblzma_prefix; | |
12668 | if test "X$withval" = "Xno"; then | |
12669 | use_additional=no | |
12670 | else | |
12671 | if test "X$withval" = "X"; then | |
12672 | ||
12673 | acl_save_prefix="$prefix" | |
12674 | prefix="$acl_final_prefix" | |
12675 | acl_save_exec_prefix="$exec_prefix" | |
12676 | exec_prefix="$acl_final_exec_prefix" | |
12677 | ||
12678 | eval additional_includedir=\"$includedir\" | |
12679 | eval additional_libdir=\"$libdir\" | |
12680 | ||
12681 | exec_prefix="$acl_save_exec_prefix" | |
12682 | prefix="$acl_save_prefix" | |
12683 | ||
12684 | else | |
12685 | additional_includedir="$withval/include" | |
12686 | additional_libdir="$withval/lib" | |
12687 | fi | |
12688 | fi | |
12689 | ||
12690 | fi | |
12691 | ||
12692 | LIBLZMA= | |
12693 | LTLIBLZMA= | |
12694 | INCLZMA= | |
12695 | rpathdirs= | |
12696 | ltrpathdirs= | |
12697 | names_already_handled= | |
12698 | names_next_round='lzma ' | |
12699 | while test -n "$names_next_round"; do | |
12700 | names_this_round="$names_next_round" | |
12701 | names_next_round= | |
12702 | for name in $names_this_round; do | |
12703 | already_handled= | |
12704 | for n in $names_already_handled; do | |
12705 | if test "$n" = "$name"; then | |
12706 | already_handled=yes | |
12707 | break | |
12708 | fi | |
12709 | done | |
12710 | if test -z "$already_handled"; then | |
12711 | names_already_handled="$names_already_handled $name" | |
12712 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
12713 | eval value=\"\$HAVE_LIB$uppername\" | |
12714 | if test -n "$value"; then | |
12715 | if test "$value" = yes; then | |
12716 | eval value=\"\$LIB$uppername\" | |
12717 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
12718 | eval value=\"\$LTLIB$uppername\" | |
12719 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
12720 | else | |
12721 | : | |
12722 | fi | |
12723 | else | |
12724 | found_dir= | |
12725 | found_la= | |
12726 | found_so= | |
12727 | found_a= | |
12728 | if test $use_additional = yes; then | |
12729 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
12730 | found_dir="$additional_libdir" | |
12731 | found_so="$additional_libdir/lib$name.$shlibext" | |
12732 | if test -f "$additional_libdir/lib$name.la"; then | |
12733 | found_la="$additional_libdir/lib$name.la" | |
12734 | fi | |
12735 | else | |
12736 | if test -f "$additional_libdir/lib$name.$libext"; then | |
12737 | found_dir="$additional_libdir" | |
12738 | found_a="$additional_libdir/lib$name.$libext" | |
12739 | if test -f "$additional_libdir/lib$name.la"; then | |
12740 | found_la="$additional_libdir/lib$name.la" | |
12741 | fi | |
12742 | fi | |
12743 | fi | |
12744 | fi | |
12745 | if test "X$found_dir" = "X"; then | |
12746 | for x in $LDFLAGS $LTLIBLZMA; do | |
12747 | ||
12748 | acl_save_prefix="$prefix" | |
12749 | prefix="$acl_final_prefix" | |
12750 | acl_save_exec_prefix="$exec_prefix" | |
12751 | exec_prefix="$acl_final_exec_prefix" | |
12752 | eval x=\"$x\" | |
12753 | exec_prefix="$acl_save_exec_prefix" | |
12754 | prefix="$acl_save_prefix" | |
12755 | ||
12756 | case "$x" in | |
12757 | -L*) | |
12758 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
12759 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
12760 | found_dir="$dir" | |
12761 | found_so="$dir/lib$name.$shlibext" | |
12762 | if test -f "$dir/lib$name.la"; then | |
12763 | found_la="$dir/lib$name.la" | |
12764 | fi | |
12765 | else | |
12766 | if test -f "$dir/lib$name.$libext"; then | |
12767 | found_dir="$dir" | |
12768 | found_a="$dir/lib$name.$libext" | |
12769 | if test -f "$dir/lib$name.la"; then | |
12770 | found_la="$dir/lib$name.la" | |
12771 | fi | |
12772 | fi | |
12773 | fi | |
12774 | ;; | |
12775 | esac | |
12776 | if test "X$found_dir" != "X"; then | |
12777 | break | |
12778 | fi | |
12779 | done | |
12780 | fi | |
12781 | if test "X$found_dir" != "X"; then | |
12782 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
12783 | if test "X$found_so" != "X"; then | |
12784 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
12785 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
12786 | else | |
12787 | haveit= | |
12788 | for x in $ltrpathdirs; do | |
12789 | if test "X$x" = "X$found_dir"; then | |
12790 | haveit=yes | |
12791 | break | |
12792 | fi | |
12793 | done | |
12794 | if test -z "$haveit"; then | |
12795 | ltrpathdirs="$ltrpathdirs $found_dir" | |
12796 | fi | |
12797 | if test "$hardcode_direct" = yes; then | |
12798 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
12799 | else | |
12800 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
12801 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
12802 | haveit= | |
12803 | for x in $rpathdirs; do | |
12804 | if test "X$x" = "X$found_dir"; then | |
12805 | haveit=yes | |
12806 | break | |
12807 | fi | |
12808 | done | |
12809 | if test -z "$haveit"; then | |
12810 | rpathdirs="$rpathdirs $found_dir" | |
12811 | fi | |
12812 | else | |
12813 | haveit= | |
12814 | for x in $LDFLAGS $LIBLZMA; do | |
12815 | ||
12816 | acl_save_prefix="$prefix" | |
12817 | prefix="$acl_final_prefix" | |
12818 | acl_save_exec_prefix="$exec_prefix" | |
12819 | exec_prefix="$acl_final_exec_prefix" | |
12820 | eval x=\"$x\" | |
12821 | exec_prefix="$acl_save_exec_prefix" | |
12822 | prefix="$acl_save_prefix" | |
12823 | ||
12824 | if test "X$x" = "X-L$found_dir"; then | |
12825 | haveit=yes | |
12826 | break | |
12827 | fi | |
12828 | done | |
12829 | if test -z "$haveit"; then | |
12830 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
12831 | fi | |
12832 | if test "$hardcode_minus_L" != no; then | |
12833 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
12834 | else | |
12835 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
12836 | fi | |
12837 | fi | |
12838 | fi | |
12839 | fi | |
12840 | else | |
12841 | if test "X$found_a" != "X"; then | |
12842 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
12843 | else | |
12844 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
12845 | fi | |
12846 | fi | |
12847 | additional_includedir= | |
12848 | case "$found_dir" in | |
12849 | */lib | */lib/) | |
12850 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
12851 | additional_includedir="$basedir/include" | |
12852 | ;; | |
12853 | esac | |
12854 | if test "X$additional_includedir" != "X"; then | |
12855 | if test "X$additional_includedir" != "X/usr/include"; then | |
12856 | haveit= | |
12857 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
12858 | if test -n "$GCC"; then | |
12859 | case $host_os in | |
12860 | linux*) haveit=yes;; | |
12861 | esac | |
12862 | fi | |
12863 | fi | |
12864 | if test -z "$haveit"; then | |
12865 | for x in $CPPFLAGS $INCLZMA; do | |
12866 | ||
12867 | acl_save_prefix="$prefix" | |
12868 | prefix="$acl_final_prefix" | |
12869 | acl_save_exec_prefix="$exec_prefix" | |
12870 | exec_prefix="$acl_final_exec_prefix" | |
12871 | eval x=\"$x\" | |
12872 | exec_prefix="$acl_save_exec_prefix" | |
12873 | prefix="$acl_save_prefix" | |
12874 | ||
12875 | if test "X$x" = "X-I$additional_includedir"; then | |
12876 | haveit=yes | |
12877 | break | |
12878 | fi | |
12879 | done | |
12880 | if test -z "$haveit"; then | |
12881 | if test -d "$additional_includedir"; then | |
12882 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
12883 | fi | |
12884 | fi | |
12885 | fi | |
12886 | fi | |
12887 | fi | |
12888 | if test -n "$found_la"; then | |
12889 | save_libdir="$libdir" | |
12890 | case "$found_la" in | |
12891 | */* | *\\*) . "$found_la" ;; | |
12892 | *) . "./$found_la" ;; | |
12893 | esac | |
12894 | libdir="$save_libdir" | |
12895 | for dep in $dependency_libs; do | |
12896 | case "$dep" in | |
12897 | -L*) | |
12898 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
12899 | if test "X$additional_libdir" != "X/usr/lib"; then | |
12900 | haveit= | |
12901 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
12902 | if test -n "$GCC"; then | |
12903 | case $host_os in | |
12904 | linux*) haveit=yes;; | |
12905 | esac | |
12906 | fi | |
12907 | fi | |
12908 | if test -z "$haveit"; then | |
12909 | haveit= | |
12910 | for x in $LDFLAGS $LIBLZMA; do | |
12911 | ||
12912 | acl_save_prefix="$prefix" | |
12913 | prefix="$acl_final_prefix" | |
12914 | acl_save_exec_prefix="$exec_prefix" | |
12915 | exec_prefix="$acl_final_exec_prefix" | |
12916 | eval x=\"$x\" | |
12917 | exec_prefix="$acl_save_exec_prefix" | |
12918 | prefix="$acl_save_prefix" | |
12919 | ||
12920 | if test "X$x" = "X-L$additional_libdir"; then | |
12921 | haveit=yes | |
12922 | break | |
12923 | fi | |
12924 | done | |
12925 | if test -z "$haveit"; then | |
12926 | if test -d "$additional_libdir"; then | |
12927 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
12928 | fi | |
12929 | fi | |
12930 | haveit= | |
12931 | for x in $LDFLAGS $LTLIBLZMA; do | |
12932 | ||
12933 | acl_save_prefix="$prefix" | |
12934 | prefix="$acl_final_prefix" | |
12935 | acl_save_exec_prefix="$exec_prefix" | |
12936 | exec_prefix="$acl_final_exec_prefix" | |
12937 | eval x=\"$x\" | |
12938 | exec_prefix="$acl_save_exec_prefix" | |
12939 | prefix="$acl_save_prefix" | |
12940 | ||
12941 | if test "X$x" = "X-L$additional_libdir"; then | |
12942 | haveit=yes | |
12943 | break | |
12944 | fi | |
12945 | done | |
12946 | if test -z "$haveit"; then | |
12947 | if test -d "$additional_libdir"; then | |
12948 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
12949 | fi | |
12950 | fi | |
12951 | fi | |
12952 | fi | |
12953 | ;; | |
12954 | -R*) | |
12955 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
12956 | if test "$enable_rpath" != no; then | |
12957 | haveit= | |
12958 | for x in $rpathdirs; do | |
12959 | if test "X$x" = "X$dir"; then | |
12960 | haveit=yes | |
12961 | break | |
12962 | fi | |
12963 | done | |
12964 | if test -z "$haveit"; then | |
12965 | rpathdirs="$rpathdirs $dir" | |
12966 | fi | |
12967 | haveit= | |
12968 | for x in $ltrpathdirs; do | |
12969 | if test "X$x" = "X$dir"; then | |
12970 | haveit=yes | |
12971 | break | |
12972 | fi | |
12973 | done | |
12974 | if test -z "$haveit"; then | |
12975 | ltrpathdirs="$ltrpathdirs $dir" | |
12976 | fi | |
12977 | fi | |
12978 | ;; | |
12979 | -l*) | |
12980 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
12981 | ;; | |
12982 | *.la) | |
12983 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
12984 | ;; | |
12985 | *) | |
12986 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
12987 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
12988 | ;; | |
12989 | esac | |
12990 | done | |
12991 | fi | |
12992 | else | |
12993 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
12994 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
12995 | fi | |
12996 | fi | |
12997 | fi | |
12998 | done | |
12999 | done | |
13000 | if test "X$rpathdirs" != "X"; then | |
13001 | if test -n "$hardcode_libdir_separator"; then | |
13002 | alldirs= | |
13003 | for found_dir in $rpathdirs; do | |
13004 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
13005 | done | |
13006 | acl_save_libdir="$libdir" | |
13007 | libdir="$alldirs" | |
13008 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13009 | libdir="$acl_save_libdir" | |
13010 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13011 | else | |
13012 | for found_dir in $rpathdirs; do | |
13013 | acl_save_libdir="$libdir" | |
13014 | libdir="$found_dir" | |
13015 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13016 | libdir="$acl_save_libdir" | |
13017 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13018 | done | |
13019 | fi | |
13020 | fi | |
13021 | if test "X$ltrpathdirs" != "X"; then | |
13022 | for found_dir in $ltrpathdirs; do | |
13023 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
13024 | done | |
13025 | fi | |
13026 | ||
13027 | ||
13028 | ac_save_CPPFLAGS="$CPPFLAGS" | |
13029 | ||
13030 | for element in $INCLZMA; do | |
13031 | haveit= | |
13032 | for x in $CPPFLAGS; do | |
13033 | ||
13034 | acl_save_prefix="$prefix" | |
13035 | prefix="$acl_final_prefix" | |
13036 | acl_save_exec_prefix="$exec_prefix" | |
13037 | exec_prefix="$acl_final_exec_prefix" | |
13038 | eval x=\"$x\" | |
13039 | exec_prefix="$acl_save_exec_prefix" | |
13040 | prefix="$acl_save_prefix" | |
13041 | ||
13042 | if test "X$x" = "X$element"; then | |
13043 | haveit=yes | |
13044 | break | |
13045 | fi | |
13046 | done | |
13047 | if test -z "$haveit"; then | |
13048 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
13049 | fi | |
13050 | done | |
13051 | ||
13052 | ||
13053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
13054 | $as_echo_n "checking for liblzma... " >&6; } | |
13055 | if test "${ac_cv_liblzma+set}" = set; then : | |
13056 | $as_echo_n "(cached) " >&6 | |
13057 | else | |
13058 | ||
13059 | ac_save_LIBS="$LIBS" | |
13060 | LIBS="$LIBS $LIBLZMA" | |
13061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13062 | /* end confdefs.h. */ | |
13063 | #include "lzma.h" | |
13064 | int | |
13065 | main () | |
13066 | { | |
13067 | lzma_index_iter iter; | |
13068 | lzma_index_iter_init (&iter, 0); | |
13069 | lzma_mf_is_supported (LZMA_MF_HC3); | |
13070 | ; | |
13071 | return 0; | |
13072 | } | |
13073 | _ACEOF | |
13074 | if ac_fn_c_try_link "$LINENO"; then : | |
13075 | ac_cv_liblzma=yes | |
13076 | else | |
13077 | ac_cv_liblzma=no | |
13078 | fi | |
13079 | rm -f core conftest.err conftest.$ac_objext \ | |
13080 | conftest$ac_exeext conftest.$ac_ext | |
13081 | LIBS="$ac_save_LIBS" | |
13082 | ||
13083 | fi | |
13084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
13085 | $as_echo "$ac_cv_liblzma" >&6; } | |
13086 | if test "$ac_cv_liblzma" = yes; then | |
13087 | HAVE_LIBLZMA=yes | |
13088 | ||
13089 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
13090 | ||
13091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
13092 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
13093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
13094 | $as_echo "$LIBLZMA" >&6; } | |
13095 | else | |
13096 | HAVE_LIBLZMA=no | |
13097 | CPPFLAGS="$ac_save_CPPFLAGS" | |
13098 | LIBLZMA= | |
13099 | LTLIBLZMA= | |
13100 | fi | |
13101 | ||
13102 | ||
13103 | ||
13104 | ||
13105 | ||
13106 | ||
13107 | if test "$HAVE_LIBLZMA" != yes; then | |
13108 | if test "$with_lzma" = yes; then | |
13109 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
13110 | fi | |
13111 | fi | |
13112 | fi | |
13113 | fi | |
13114 | ||
3fc11d3e JM |
13115 | LIBGUI="../libgui/src/libgui.a" |
13116 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
13117 | ||
13118 | ||
7a292a7a | 13119 | |
3fc11d3e JM |
13120 | WIN32LDAPP= |
13121 | ||
13122 | ||
13123 | ||
d91670b9 | 13124 | case "${host}" in |
686a5eed | 13125 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
13126 | configdir="win" |
13127 | ;; | |
13128 | *) | |
13129 | configdir="unix" | |
13130 | ;; | |
13131 | esac | |
3fc11d3e JM |
13132 | |
13133 | GDBTKLIBS= | |
13134 | if test "${enable_gdbtk}" = "yes"; then | |
13135 | ||
d1c3b63a KS |
13136 | # Gdbtk must have an absolute path to srcdir in order to run |
13137 | # properly when not installed. | |
13138 | here=`pwd` | |
13139 | cd ${srcdir} | |
13140 | GDBTK_SRC_DIR=`pwd` | |
13141 | cd $here | |
13142 | ||
bec39cab | 13143 | |
5062cc19 KS |
13144 | # |
13145 | # Ok, lets find the tcl configuration | |
13146 | # First, look for one uninstalled. | |
13147 | # the alternative search directory is invoked by --with-tcl | |
13148 | # | |
3fc11d3e | 13149 | |
5062cc19 KS |
13150 | if test x"${no_tcl}" = x ; then |
13151 | # we reset no_tcl in case something fails here | |
13152 | no_tcl=true | |
bec39cab | 13153 | |
81ecdfbb RW |
13154 | # Check whether --with-tcl was given. |
13155 | if test "${with_tcl+set}" = set; then : | |
13156 | withval=$with_tcl; with_tclconfig=${withval} | |
13157 | fi | |
13158 | ||
13159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
13160 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
13161 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
13162 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 13163 | else |
bec39cab | 13164 | |
3fc11d3e | 13165 | |
5062cc19 KS |
13166 | # First check to see if --with-tcl was specified. |
13167 | case "${host}" in | |
13168 | *-*-cygwin*) platDir="win" ;; | |
13169 | *) platDir="unix" ;; | |
13170 | esac | |
13171 | if test x"${with_tclconfig}" != x ; then | |
13172 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
13173 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
13174 | else | |
81ecdfbb | 13175 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13176 | fi |
13177 | fi | |
13178 | ||
13179 | # then check for a private Tcl installation | |
13180 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13181 | for i in \ | |
13182 | ../tcl \ | |
13183 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13184 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
13185 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13186 | ../../tcl \ | |
13187 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13188 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13189 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13190 | ../../../tcl \ | |
13191 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13192 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13193 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13194 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13195 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13196 | break | |
13197 | fi | |
13198 | done | |
13199 | fi | |
13200 | ||
13201 | # on Darwin, check in Framework installation locations | |
13202 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
13203 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13204 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13205 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13206 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13207 | ; do | |
13208 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
13209 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
13210 | break | |
13211 | fi | |
13212 | done | |
13213 | fi | |
13214 | ||
13215 | # check in a few common install locations | |
13216 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13217 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13218 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13219 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13220 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13221 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13222 | `ls -d /usr/lib 2>/dev/null` \ | |
13223 | ; do | |
13224 | if test -f "$i/tclConfig.sh" ; then | |
13225 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
13226 | break | |
13227 | fi | |
13228 | done | |
13229 | fi | |
3fc11d3e | 13230 | |
5062cc19 KS |
13231 | # check in a few other private locations |
13232 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13233 | for i in \ | |
13234 | ${srcdir}/../tcl \ | |
13235 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13236 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
13237 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13238 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13239 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13240 | break | |
13241 | fi | |
13242 | done | |
13243 | fi | |
bec39cab | 13244 | |
3fc11d3e JM |
13245 | fi |
13246 | ||
5062cc19 KS |
13247 | |
13248 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13249 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
13250 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
13251 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
13252 | else |
13253 | no_tcl= | |
13254 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
13255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13256 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
13257 | fi |
13258 | fi | |
3fc11d3e | 13259 | |
bec39cab | 13260 | |
85541719 DE |
13261 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
13262 | # point to doing Tcl. | |
bec39cab | 13263 | |
5062cc19 KS |
13264 | # |
13265 | # Ok, lets find the tk configuration | |
13266 | # First, look for one uninstalled. | |
13267 | # the alternative search directory is invoked by --with-tk | |
13268 | # | |
3fc11d3e | 13269 | |
5062cc19 KS |
13270 | if test x"${no_tk}" = x ; then |
13271 | # we reset no_tk in case something fails here | |
13272 | no_tk=true | |
bec39cab | 13273 | |
81ecdfbb RW |
13274 | # Check whether --with-tk was given. |
13275 | if test "${with_tk+set}" = set; then : | |
13276 | withval=$with_tk; with_tkconfig=${withval} | |
13277 | fi | |
13278 | ||
13279 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
13280 | $as_echo_n "checking for Tk configuration... " >&6; } | |
13281 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
13282 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13283 | else |
3fc11d3e JM |
13284 | |
13285 | ||
5062cc19 KS |
13286 | # First check to see if --with-tkconfig was specified. |
13287 | if test x"${with_tkconfig}" != x ; then | |
13288 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
13289 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
13290 | else | |
81ecdfbb | 13291 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13292 | fi |
13293 | fi | |
3fc11d3e | 13294 | |
5062cc19 KS |
13295 | # then check for a private Tk library |
13296 | case "${host}" in | |
13297 | *-*-cygwin*) platDir="win" ;; | |
13298 | *) platDir="unix" ;; | |
13299 | esac | |
13300 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13301 | for i in \ | |
13302 | ../tk \ | |
13303 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13304 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
13305 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
13306 | ../../tk \ | |
13307 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13308 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
13309 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
13310 | ../../../tk \ | |
13311 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13312 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
13313 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13314 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13315 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13316 | break | |
13317 | fi | |
13318 | done | |
13319 | fi | |
13320 | ||
13321 | # on Darwin, check in Framework installation locations | |
13322 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
13323 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13324 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13325 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13326 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13327 | ; do | |
13328 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
13329 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
13330 | break | |
13331 | fi | |
13332 | done | |
13333 | fi | |
13334 | ||
13335 | # check in a few common install locations | |
13336 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13337 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13338 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13339 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13340 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13341 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13342 | `ls -d /usr/lib 2>/dev/null` \ | |
13343 | ; do | |
13344 | if test -f "$i/tkConfig.sh" ; then | |
13345 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
13346 | break | |
13347 | fi | |
13348 | done | |
13349 | fi | |
13350 | # check in a few other private locations | |
13351 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13352 | for i in \ | |
13353 | ${srcdir}/../tk \ | |
13354 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13355 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
13356 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13357 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13358 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13359 | break | |
13360 | fi | |
13361 | done | |
13362 | fi | |
3fc11d3e | 13363 | |
3fc11d3e JM |
13364 | fi |
13365 | ||
13366 | ||
5062cc19 KS |
13367 | if test x"${ac_cv_c_tkconfig}" = x ; then |
13368 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
13369 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
13370 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
13371 | else |
13372 | no_tk= | |
13373 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
13374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13375 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 13376 | fi |
3fc11d3e | 13377 | fi |
dd2504ab | 13378 | |
dd2504ab | 13379 | |
85541719 DE |
13380 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
13381 | ||
81ecdfbb RW |
13382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13383 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
13384 | |
13385 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
13386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
13387 | $as_echo "loading" >&6; } | |
85541719 DE |
13388 | . ${TCL_BIN_DIR}/tclConfig.sh |
13389 | else | |
81ecdfbb RW |
13390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13391 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
13392 | fi |
13393 | ||
13394 | # eval is required to do the TCL_DBGX substitution | |
13395 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
13396 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
13397 | ||
13398 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
13399 | # then set the common variable name to the value of the build variables. | |
13400 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
13401 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
13402 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
13403 | # installed and uninstalled version of Tcl. | |
13404 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
13405 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
13406 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
13407 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
13408 | elif test "`uname -s`" = "Darwin"; then | |
13409 | # If Tcl was built as a framework, attempt to use the libraries | |
13410 | # from the framework at the given location so that linking works | |
a68ffae9 | 13411 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
13412 | case ${TCL_DEFS} in |
13413 | *TCL_FRAMEWORK*) | |
13414 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
13415 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
13416 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
13417 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
13418 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
13419 | break | |
13420 | fi | |
13421 | done | |
13422 | fi | |
13423 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
13424 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
13425 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
13426 | fi | |
13427 | ;; | |
13428 | esac | |
13429 | fi | |
13430 | ||
13431 | # eval is required to do the TCL_DBGX substitution | |
13432 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
13433 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
13434 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
13435 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
13436 | ||
13437 | ||
13438 | ||
13439 | ||
13440 | ||
13441 | ||
13442 | ||
13443 | ||
13444 | ||
13445 | ||
13446 | ||
13447 | ||
13448 | ||
13449 | ||
13450 | ||
13451 | # Check for in-tree tcl | |
13452 | here=`pwd` | |
13453 | cd ${srcdir}/.. | |
13454 | topdir=`pwd` | |
13455 | cd ${here} | |
13456 | ||
13457 | intree="no" | |
13458 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
13459 | intree="yes" | |
13460 | fi | |
13461 | ||
13462 | # Find Tcl private headers | |
13463 | if test x"${intree}" = xno; then | |
13464 | ||
81ecdfbb RW |
13465 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
13466 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
13467 | private_dir="" |
13468 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
13469 | if test -f ${dir}/tclInt.h ; then | |
13470 | private_dir=${dir} | |
13471 | fi | |
13472 | ||
13473 | if test x"${private_dir}" = x; then | |
81ecdfbb | 13474 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
13475 | else |
13476 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
13477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
13478 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
13479 | fi |
13480 | ||
13481 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
13482 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
13483 | TCL_DEPS="" | |
13484 | else | |
13485 | # If building tcl in the same src tree, private headers | |
13486 | # are not needed, but we need to be sure to use the right | |
13487 | # headers library | |
13488 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
13489 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
13490 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
13491 | fi | |
13492 | ||
13493 | ||
13494 | ||
13495 | ||
13496 | ||
81ecdfbb RW |
13497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13498 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 13499 | |
5062cc19 | 13500 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
13501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
13502 | $as_echo "loading" >&6; } | |
5062cc19 | 13503 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 13504 | else |
81ecdfbb RW |
13505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13506 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 13507 | fi |
bec39cab | 13508 | |
5062cc19 KS |
13509 | # eval is required to do the TK_DBGX substitution |
13510 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
13511 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
13512 | ||
13513 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
13514 | # then set the common variable name to the value of the build variables. | |
13515 | # For example, the variable TK_LIB_SPEC will be set to the value | |
13516 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
13517 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
13518 | # installed and uninstalled version of Tcl. | |
85541719 | 13519 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
13520 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
13521 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
13522 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
13523 | elif test "`uname -s`" = "Darwin"; then | |
13524 | # If Tk was built as a framework, attempt to use the libraries | |
13525 | # from the framework at the given location so that linking works | |
a68ffae9 | 13526 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
13527 | case ${TK_DEFS} in |
13528 | *TK_FRAMEWORK*) | |
85541719 | 13529 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
13530 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
13531 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
13532 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
13533 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
13534 | break | |
13535 | fi | |
13536 | done | |
13537 | fi | |
85541719 | 13538 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
13539 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
13540 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
13541 | fi | |
13542 | ;; | |
13543 | esac | |
3fc11d3e JM |
13544 | fi |
13545 | ||
5062cc19 KS |
13546 | # eval is required to do the TK_DBGX substitution |
13547 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
13548 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
13549 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
13550 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 13551 | |
3fc11d3e JM |
13552 | |
13553 | ||
bec39cab AC |
13554 | |
13555 | ||
13556 | ||
13557 | ||
13558 | ||
13559 | ||
13560 | ||
3fc11d3e | 13561 | |
3fc11d3e | 13562 | |
bec39cab | 13563 | |
bec39cab | 13564 | |
85541719 DE |
13565 | # Check for in-tree Tk |
13566 | intree="no" | |
13567 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
13568 | intree="yes" | |
13569 | fi | |
3fc11d3e | 13570 | |
85541719 DE |
13571 | # Find Tk private headers |
13572 | if test x"${intree}" = xno; then | |
3fc11d3e | 13573 | |
81ecdfbb RW |
13574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
13575 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
13576 | private_dir="" |
13577 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
13578 | if test -f ${dir}/tkInt.h; then | |
13579 | private_dir=${dir} | |
3fc11d3e | 13580 | fi |
bec39cab | 13581 | |
5062cc19 | 13582 | if test x"${private_dir}" = x; then |
81ecdfbb | 13583 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 13584 | else |
5062cc19 | 13585 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
13586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
13587 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 13588 | fi |
3fc11d3e | 13589 | |
85541719 DE |
13590 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
13591 | TK_LIBRARY=${TK_LIB_SPEC} | |
13592 | TK_DEPS="" | |
13593 | else | |
13594 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
13595 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
13596 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
13597 | fi | |
3fc11d3e JM |
13598 | |
13599 | ||
3fc11d3e JM |
13600 | |
13601 | ||
3fc11d3e | 13602 | |
85541719 | 13603 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 13604 | |
85541719 DE |
13605 | # Include some libraries that Tcl and Tk want. |
13606 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
13607 | # Yes, the ordering seems wrong here. But it isn't. | |
13608 | # TK_LIBS is the list of libraries that need to be linked | |
13609 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
13610 | # were in LIBS then any link tests after this point would | |
13611 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
13612 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 13613 | |
85541719 DE |
13614 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
13615 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
13616 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
13617 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
13618 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
13619 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
13620 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 13621 | |
85541719 DE |
13622 | if test x$gdb_cv_os_cygwin = xyes; then |
13623 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
13624 | WIN32LDAPP="-Wl,--subsystem,console" | |
13625 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 13626 | fi |
ffc6a242 | 13627 | |
81ecdfbb | 13628 | subdirs="$subdirs gdbtk" |
3ace7edb | 13629 | |
85541719 | 13630 | fi |
3fc11d3e JM |
13631 | fi |
13632 | ||
13633 | ||
13634 | ||
13635 | ||
13636 | ||
13637 | ||
13638 | ||
13639 | ||
81ecdfbb RW |
13640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
13641 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 13642 | |
c906108c | 13643 | |
81ecdfbb RW |
13644 | # Check whether --with-x was given. |
13645 | if test "${with_x+set}" = set; then : | |
13646 | withval=$with_x; | |
13647 | fi | |
c906108c SS |
13648 | |
13649 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
13650 | if test "x$with_x" = xno; then | |
13651 | # The user explicitly disabled X. | |
13652 | have_x=disabled | |
13653 | else | |
81ecdfbb RW |
13654 | case $x_includes,$x_libraries in #( |
13655 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
13656 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
13657 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
13658 | else |
13659 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 13660 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 13661 | rm -f -r conftest.dir |
bec39cab AC |
13662 | if mkdir conftest.dir; then |
13663 | cd conftest.dir | |
bec39cab | 13664 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
13665 | incroot: |
13666 | @echo incroot='${INCROOT}' | |
13667 | usrlibdir: | |
13668 | @echo usrlibdir='${USRLIBDIR}' | |
13669 | libdir: | |
13670 | @echo libdir='${LIBDIR}' | |
13671 | _ACEOF | |
13672 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 13673 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
13674 | for ac_var in incroot usrlibdir libdir; do |
13675 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
13676 | done | |
c906108c | 13677 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
13678 | for ac_extension in a so sl dylib la dll; do |
13679 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
13680 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 13681 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
13682 | fi |
13683 | done | |
13684 | # Screen out bogus values from the imake configuration. They are | |
13685 | # bogus both because they are the default anyway, and because | |
13686 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 13687 | case $ac_im_incroot in |
81ecdfbb | 13688 | /usr/include) ac_x_includes= ;; |
bec39cab | 13689 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 13690 | esac |
bec39cab | 13691 | case $ac_im_usrlibdir in |
81ecdfbb | 13692 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 13693 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
13694 | esac |
13695 | fi | |
13696 | cd .. | |
81ecdfbb | 13697 | rm -f -r conftest.dir |
c906108c SS |
13698 | fi |
13699 | ||
bec39cab AC |
13700 | # Standard set of common directories for X headers. |
13701 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
13702 | ac_x_header_dirs=' | |
13703 | /usr/X11/include | |
81ecdfbb | 13704 | /usr/X11R7/include |
bec39cab AC |
13705 | /usr/X11R6/include |
13706 | /usr/X11R5/include | |
13707 | /usr/X11R4/include | |
13708 | ||
13709 | /usr/include/X11 | |
81ecdfbb | 13710 | /usr/include/X11R7 |
bec39cab AC |
13711 | /usr/include/X11R6 |
13712 | /usr/include/X11R5 | |
13713 | /usr/include/X11R4 | |
13714 | ||
13715 | /usr/local/X11/include | |
81ecdfbb | 13716 | /usr/local/X11R7/include |
bec39cab AC |
13717 | /usr/local/X11R6/include |
13718 | /usr/local/X11R5/include | |
13719 | /usr/local/X11R4/include | |
13720 | ||
13721 | /usr/local/include/X11 | |
81ecdfbb | 13722 | /usr/local/include/X11R7 |
bec39cab AC |
13723 | /usr/local/include/X11R6 |
13724 | /usr/local/include/X11R5 | |
13725 | /usr/local/include/X11R4 | |
13726 | ||
13727 | /usr/X386/include | |
13728 | /usr/x386/include | |
13729 | /usr/XFree86/include/X11 | |
13730 | ||
13731 | /usr/include | |
13732 | /usr/local/include | |
13733 | /usr/unsupported/include | |
13734 | /usr/athena/include | |
13735 | /usr/local/x11r5/include | |
13736 | /usr/lpp/Xamples/include | |
13737 | ||
13738 | /usr/openwin/include | |
13739 | /usr/openwin/share/include' | |
13740 | ||
13741 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 13742 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 13743 | # First, try using that file with no special directory specified. |
81ecdfbb | 13744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13745 | /* end confdefs.h. */ |
81ecdfbb | 13746 | #include <X11/Xlib.h> |
bec39cab | 13747 | _ACEOF |
81ecdfbb | 13748 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
13749 | # We can compile using X headers with no special include directory. |
13750 | ac_x_includes= | |
13751 | else | |
bec39cab | 13752 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 13753 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
13754 | ac_x_includes=$ac_dir |
13755 | break | |
13756 | fi | |
13757 | done | |
c906108c | 13758 | fi |
bec39cab AC |
13759 | rm -f conftest.err conftest.$ac_ext |
13760 | fi # $ac_x_includes = no | |
c906108c | 13761 | |
bec39cab | 13762 | if test "$ac_x_libraries" = no; then |
c906108c | 13763 | # Check for the libraries. |
c906108c SS |
13764 | # See if we find them without any special options. |
13765 | # Don't add to $LIBS permanently. | |
bec39cab | 13766 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
13767 | LIBS="-lX11 $LIBS" |
13768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 13769 | /* end confdefs.h. */ |
81ecdfbb | 13770 | #include <X11/Xlib.h> |
bec39cab AC |
13771 | int |
13772 | main () | |
13773 | { | |
81ecdfbb | 13774 | XrmInitialize () |
bec39cab AC |
13775 | ; |
13776 | return 0; | |
13777 | } | |
13778 | _ACEOF | |
81ecdfbb | 13779 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 13780 | LIBS=$ac_save_LIBS |
c906108c SS |
13781 | # We can link X programs with no special library path. |
13782 | ac_x_libraries= | |
13783 | else | |
81ecdfbb RW |
13784 | LIBS=$ac_save_LIBS |
13785 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 13786 | do |
bec39cab | 13787 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
13788 | for ac_extension in a so sl dylib la dll; do |
13789 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
13790 | ac_x_libraries=$ac_dir |
13791 | break 2 | |
13792 | fi | |
13793 | done | |
13794 | done | |
13795 | fi | |
81ecdfbb RW |
13796 | rm -f core conftest.err conftest.$ac_objext \ |
13797 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 13798 | fi # $ac_x_libraries = no |
c906108c | 13799 | |
81ecdfbb RW |
13800 | case $ac_x_includes,$ac_x_libraries in #( |
13801 | no,* | *,no | *\'*) | |
13802 | # Didn't find X, or a directory has "'" in its name. | |
13803 | ac_cv_have_x="have_x=no";; #( | |
13804 | *) | |
13805 | # Record where we found X for the cache. | |
13806 | ac_cv_have_x="have_x=yes\ | |
13807 | ac_x_includes='$ac_x_includes'\ | |
13808 | ac_x_libraries='$ac_x_libraries'" | |
13809 | esac | |
c906108c | 13810 | fi |
81ecdfbb RW |
13811 | ;; #( |
13812 | *) have_x=yes;; | |
13813 | esac | |
c906108c SS |
13814 | eval "$ac_cv_have_x" |
13815 | fi # $with_x != no | |
13816 | ||
13817 | if test "$have_x" != yes; then | |
81ecdfbb RW |
13818 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
13819 | $as_echo "$have_x" >&6; } | |
c906108c SS |
13820 | no_x=yes |
13821 | else | |
13822 | # If each of the values was on the command line, it overrides each guess. | |
13823 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
13824 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
13825 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
13826 | ac_cv_have_x="have_x=yes\ |
13827 | ac_x_includes='$x_includes'\ | |
13828 | ac_x_libraries='$x_libraries'" | |
13829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
13830 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
13831 | fi |
13832 | ||
13833 | ||
bec39cab | 13834 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 13835 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
13836 | # This code just checks for a few cases where we'd like to ignore those |
13837 | # definitions, even when they're present in the '.mt' file. These cases | |
13838 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 13839 | # not part of the source tree. |
7a292a7a | 13840 | # |
81ecdfbb RW |
13841 | # Check whether --enable-sim was given. |
13842 | if test "${enable_sim+set}" = set; then : | |
13843 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
13844 | echo "enableval = ${enableval}"; |
13845 | case "${enableval}" in | |
13846 | yes) ignore_sim=false ;; | |
13847 | no) ignore_sim=true ;; | |
13848 | *) ignore_sim=false ;; | |
13849 | esac | |
13850 | else | |
13851 | ignore_sim=false | |
81ecdfbb RW |
13852 | fi |
13853 | ||
7a292a7a SS |
13854 | |
13855 | if test ! -d "${srcdir}/../sim"; then | |
13856 | ignore_sim=true | |
13857 | fi | |
13858 | ||
9b624dbe UW |
13859 | SIM= |
13860 | SIM_OBS= | |
13861 | if test "${ignore_sim}" = "false"; then | |
13862 | if test x"${gdb_sim}" != x ; then | |
13863 | SIM="${gdb_sim}" | |
13864 | SIM_OBS="remote-sim.o" | |
60ca704f | 13865 | |
81ecdfbb | 13866 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 13867 | |
9b624dbe | 13868 | fi |
7a292a7a SS |
13869 | fi |
13870 | ||
13871 | ||
13872 | ||
c906108c SS |
13873 | |
13874 | ||
13875 | ||
13876 | ||
13877 | ||
13878 | ||
dfcd3bfb | 13879 | |
e56ac5c3 AC |
13880 | |
13881 | ||
b3a90332 AC |
13882 | |
13883 | ||
c35f4ffc | 13884 | # List of host floatformats. |
bec39cab AC |
13885 | |
13886 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13887 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 13888 | _ACEOF |
c35f4ffc | 13889 | |
bec39cab AC |
13890 | |
13891 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13892 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
13893 | _ACEOF |
13894 | ||
c35f4ffc | 13895 | |
bec39cab | 13896 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 13897 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 13898 | _ACEOF |
c35f4ffc AC |
13899 | |
13900 | ||
c906108c SS |
13901 | # target_subdir is used by the testsuite to find the target libraries. |
13902 | target_subdir= | |
13903 | if test "${host}" != "${target}"; then | |
13904 | target_subdir="${target_alias}/" | |
13905 | fi | |
13906 | ||
13907 | ||
13908 | frags= | |
771b4502 | 13909 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
13910 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
13911 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 13912 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
13913 | fi |
13914 | frags="$frags $host_makefile_frag" | |
13915 | else | |
13916 | host_makefile_frag=/dev/null | |
c906108c | 13917 | fi |
c906108c | 13918 | |
c906108c SS |
13919 | |
13920 | ||
13921 | ||
771b4502 | 13922 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
13923 | # We pick this up from the host configuration file (.mh) because we |
13924 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
13925 | nativefile=`sed -n ' |
13926 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
13927 | ' ${host_makefile_frag}` | |
c906108c SS |
13928 | fi |
13929 | ||
13930 | ||
b00a8037 | 13931 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
13932 | |
13933 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 13934 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 13935 | _ACEOF |
b00a8037 DJ |
13936 | |
13937 | fi | |
13938 | ||
8dcde887 | 13939 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
13940 | # Check whether --enable-multi-ice was given. |
13941 | if test "${enable_multi_ice+set}" = set; then : | |
13942 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
13943 | yes | no) |
13944 | ;; | |
81ecdfbb | 13945 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 13946 | esac |
81ecdfbb | 13947 | fi |
b4e70030 | 13948 | |
81ecdfbb RW |
13949 | if test "x$enable_multi_ice" = xyes; then |
13950 | subdirs="$subdirs multi-ice" | |
3ace7edb | 13951 | |
a85f51e7 DJ |
13952 | fi |
13953 | ||
496c0e1b JB |
13954 | # Check whether --enable-gdbserver was given. |
13955 | if test "${enable_gdbserver+set}" = set; then : | |
13956 | enableval=$enable_gdbserver; case "${enableval}" in | |
13957 | yes| no|auto) ;; | |
13958 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
13959 | esac | |
13960 | else | |
13961 | enable_gdbserver=auto | |
13962 | fi | |
13963 | ||
13964 | ||
13965 | # We only build gdbserver automatically in a native configuration, and | |
13966 | # only if the user did not explicitly disable its build. | |
13967 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
13968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
13969 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 13970 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
13971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13972 | $as_echo "yes" >&6; } | |
13973 | subdirs="$subdirs gdbserver" | |
3ace7edb | 13974 | |
496c0e1b | 13975 | gdbserver_build_enabled=yes |
8dcde887 | 13976 | else |
81ecdfbb RW |
13977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13978 | $as_echo "no" >&6; } | |
8dcde887 MK |
13979 | fi |
13980 | fi | |
13981 | ||
496c0e1b JB |
13982 | # If the user explicitly request the gdbserver to be built, verify that |
13983 | # we were in fact able to enable it. | |
13984 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
13985 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
13986 | fi | |
13987 | ||
db985757 | 13988 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 13989 | # to an empty version. |
c906108c SS |
13990 | |
13991 | files= | |
13992 | links= | |
5a2402b8 | 13993 | |
c906108c SS |
13994 | rm -f nm.h |
13995 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
13996 | case "${nativefile}" in |
13997 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
13998 | * ) GDB_NM_FILE="${nativefile}" | |
13999 | esac | |
5a2402b8 AC |
14000 | files="${files} ${GDB_NM_FILE}" |
14001 | links="${links} nm.h" | |
60ca704f SE |
14002 | |
14003 | cat >>confdefs.h <<_ACEOF | |
b78960be | 14004 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 14005 | _ACEOF |
5a2402b8 | 14006 | |
c906108c | 14007 | fi |
5a2402b8 AC |
14008 | |
14009 | ||
bec39cab AC |
14010 | ac_sources="$files" |
14011 | ac_dests="$links" | |
14012 | while test -n "$ac_sources"; do | |
14013 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
14014 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
14015 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
14016 | done | |
81ecdfbb | 14017 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
14018 | |
14019 | ||
c906108c SS |
14020 | |
14021 | ||
c906108c | 14022 | |
81ecdfbb | 14023 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 14024 | |
bec39cab | 14025 | |
c971b7fa | 14026 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
14027 | |
14028 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 14029 | |
bec39cab AC |
14030 | cat >confcache <<\_ACEOF |
14031 | # This file is a shell script that caches the results of configure | |
14032 | # tests run on this system so they can be shared between configure | |
14033 | # scripts and configure runs, see configure's option --config-cache. | |
14034 | # It is not useful on other systems. If it contains results you don't | |
14035 | # want to keep, you may remove or edit it. | |
14036 | # | |
14037 | # config.status only pays attention to the cache file if you give it | |
14038 | # the --recheck option to rerun configure. | |
14039 | # | |
14040 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
14041 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
14042 | # following values. | |
14043 | ||
14044 | _ACEOF | |
14045 | ||
14046 | # The following way of writing the cache mishandles newlines in values, | |
14047 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 14048 | # So, we kill variables containing newlines. |
bec39cab AC |
14049 | # Ultrix sh set writes to stderr and can't be redirected directly, |
14050 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
14051 | ( |
14052 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
14053 | eval ac_val=\$$ac_var | |
14054 | case $ac_val in #( | |
14055 | *${as_nl}*) | |
14056 | case $ac_var in #( | |
14057 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
14058 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
14059 | esac | |
14060 | case $ac_var in #( | |
14061 | _ | IFS | as_nl) ;; #( | |
14062 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
14063 | *) { eval $ac_var=; unset $ac_var;} ;; | |
14064 | esac ;; | |
14065 | esac | |
14066 | done | |
14067 | ||
bec39cab | 14068 | (set) 2>&1 | |
81ecdfbb RW |
14069 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
14070 | *${as_nl}ac_space=\ *) | |
14071 | # `set' does not quote correctly, so add quotes: double-quote | |
14072 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
14073 | sed -n \ |
14074 | "s/'/'\\\\''/g; | |
14075 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 14076 | ;; #( |
bec39cab AC |
14077 | *) |
14078 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 14079 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 14080 | ;; |
81ecdfbb RW |
14081 | esac | |
14082 | sort | |
14083 | ) | | |
bec39cab | 14084 | sed ' |
81ecdfbb | 14085 | /^ac_cv_env_/b end |
bec39cab | 14086 | t clear |
81ecdfbb | 14087 | :clear |
bec39cab AC |
14088 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
14089 | t end | |
81ecdfbb RW |
14090 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
14091 | :end' >>confcache | |
14092 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
14093 | if test -w "$cache_file"; then | |
14094 | test "x$cache_file" != "x/dev/null" && | |
14095 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
14096 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
14097 | cat confcache >$cache_file |
14098 | else | |
81ecdfbb RW |
14099 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
14100 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
14101 | fi |
14102 | fi | |
14103 | rm -f confcache | |
14104 | ||
14105 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
14106 | # Let make expand exec_prefix. | |
14107 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
14108 | ||
bec39cab AC |
14109 | DEFS=-DHAVE_CONFIG_H |
14110 | ||
14111 | ac_libobjs= | |
14112 | ac_ltlibobjs= | |
14113 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
14114 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
14115 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
14116 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
14117 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
14118 | # will be set to the directory where LIBOBJS objects are built. | |
14119 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
14120 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
14121 | done |
14122 | LIBOBJS=$ac_libobjs | |
14123 | ||
14124 | LTLIBOBJS=$ac_ltlibobjs | |
14125 | ||
14126 | ||
85981d60 | 14127 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
14128 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
14129 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 14130 | fi |
a417dc56 | 14131 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
14132 | as_fn_error "conditional \"GMAKE\" was never defined. |
14133 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 14134 | fi |
81ecdfbb RW |
14135 | |
14136 | ||
bec39cab | 14137 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 14138 | ac_write_fail=0 |
bec39cab AC |
14139 | ac_clean_files_save=$ac_clean_files |
14140 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
14141 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
14142 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
14143 | as_write_fail=0 | |
14144 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
14145 | #! $SHELL |
14146 | # Generated by $as_me. | |
14147 | # Run this file to recreate the current configuration. | |
14148 | # Compiler output produced by configure, useful for debugging | |
14149 | # configure, is in config.log if it exists. | |
14150 | ||
14151 | debug=false | |
14152 | ac_cs_recheck=false | |
14153 | ac_cs_silent=false | |
bec39cab | 14154 | |
81ecdfbb RW |
14155 | SHELL=\${CONFIG_SHELL-$SHELL} |
14156 | export SHELL | |
14157 | _ASEOF | |
14158 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
14159 | ## -------------------- ## | |
14160 | ## M4sh Initialization. ## | |
14161 | ## -------------------- ## | |
14162 | ||
14163 | # Be more Bourne compatible | |
14164 | DUALCASE=1; export DUALCASE # for MKS sh | |
14165 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
14166 | emulate sh |
14167 | NULLCMD=: | |
81ecdfbb | 14168 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
14169 | # is contrary to our usage. Disable this feature. |
14170 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
14171 | setopt NO_GLOB_SUBST |
14172 | else | |
14173 | case `(set -o) 2>/dev/null` in #( | |
14174 | *posix*) : | |
14175 | set -o posix ;; #( | |
14176 | *) : | |
14177 | ;; | |
14178 | esac | |
bec39cab | 14179 | fi |
bec39cab | 14180 | |
81ecdfbb RW |
14181 | |
14182 | as_nl=' | |
14183 | ' | |
14184 | export as_nl | |
14185 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
14186 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
14187 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
14188 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
14189 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
14190 | # but without wasting forks for bash or zsh. | |
14191 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
14192 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
14193 | as_echo='print -r --' | |
14194 | as_echo_n='print -rn --' | |
14195 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
14196 | as_echo='printf %s\n' | |
14197 | as_echo_n='printf %s' | |
14198 | else | |
14199 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
14200 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
14201 | as_echo_n='/usr/ucb/echo -n' | |
14202 | else | |
14203 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
14204 | as_echo_n_body='eval | |
14205 | arg=$1; | |
14206 | case $arg in #( | |
14207 | *"$as_nl"*) | |
14208 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
14209 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
14210 | esac; | |
14211 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
14212 | ' | |
14213 | export as_echo_n_body | |
14214 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
14215 | fi | |
14216 | export as_echo_body | |
14217 | as_echo='sh -c $as_echo_body as_echo' | |
14218 | fi | |
14219 | ||
14220 | # The user is always right. | |
14221 | if test "${PATH_SEPARATOR+set}" != set; then | |
14222 | PATH_SEPARATOR=: | |
14223 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
14224 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
14225 | PATH_SEPARATOR=';' | |
14226 | } | |
bec39cab AC |
14227 | fi |
14228 | ||
14229 | ||
81ecdfbb RW |
14230 | # IFS |
14231 | # We need space, tab and new line, in precisely that order. Quoting is | |
14232 | # there to prevent editors from complaining about space-tab. | |
14233 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
14234 | # splitting by setting IFS to empty value.) | |
14235 | IFS=" "" $as_nl" | |
14236 | ||
14237 | # Find who we are. Look in the path if we contain no directory separator. | |
14238 | case $0 in #(( | |
14239 | *[\\/]* ) as_myself=$0 ;; | |
14240 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14241 | for as_dir in $PATH | |
14242 | do | |
14243 | IFS=$as_save_IFS | |
14244 | test -z "$as_dir" && as_dir=. | |
14245 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
14246 | done | |
14247 | IFS=$as_save_IFS | |
14248 | ||
14249 | ;; | |
14250 | esac | |
14251 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
14252 | # in which case we are not to be found in the path. | |
14253 | if test "x$as_myself" = x; then | |
14254 | as_myself=$0 | |
14255 | fi | |
14256 | if test ! -f "$as_myself"; then | |
14257 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
14258 | exit 1 | |
14259 | fi | |
14260 | ||
14261 | # Unset variables that we do not need and which cause bugs (e.g. in | |
14262 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
14263 | # suppresses any "Segmentation fault" message there. '((' could | |
14264 | # trigger a bug in pdksh 5.2.14. | |
14265 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
14266 | do eval test x\${$as_var+set} = xset \ | |
14267 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
14268 | done | |
bec39cab AC |
14269 | PS1='$ ' |
14270 | PS2='> ' | |
14271 | PS4='+ ' | |
14272 | ||
14273 | # NLS nuisances. | |
81ecdfbb RW |
14274 | LC_ALL=C |
14275 | export LC_ALL | |
14276 | LANGUAGE=C | |
14277 | export LANGUAGE | |
14278 | ||
14279 | # CDPATH. | |
14280 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
14281 | ||
14282 | ||
14283 | # as_fn_error ERROR [LINENO LOG_FD] | |
14284 | # --------------------------------- | |
14285 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
14286 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
14287 | # script with status $?, using 1 if that was 0. | |
14288 | as_fn_error () | |
14289 | { | |
14290 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
14291 | if test "$3"; then | |
14292 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
14293 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
14294 | fi | |
14295 | $as_echo "$as_me: error: $1" >&2 | |
14296 | as_fn_exit $as_status | |
14297 | } # as_fn_error | |
14298 | ||
14299 | ||
14300 | # as_fn_set_status STATUS | |
14301 | # ----------------------- | |
14302 | # Set $? to STATUS, without forking. | |
14303 | as_fn_set_status () | |
14304 | { | |
14305 | return $1 | |
14306 | } # as_fn_set_status | |
14307 | ||
14308 | # as_fn_exit STATUS | |
14309 | # ----------------- | |
14310 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
14311 | as_fn_exit () | |
14312 | { | |
14313 | set +e | |
14314 | as_fn_set_status $1 | |
14315 | exit $1 | |
14316 | } # as_fn_exit | |
14317 | ||
14318 | # as_fn_unset VAR | |
14319 | # --------------- | |
14320 | # Portably unset VAR. | |
14321 | as_fn_unset () | |
14322 | { | |
14323 | { eval $1=; unset $1;} | |
14324 | } | |
14325 | as_unset=as_fn_unset | |
14326 | # as_fn_append VAR VALUE | |
14327 | # ---------------------- | |
14328 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
14329 | # advantage of any shell optimizations that allow amortized linear growth over | |
14330 | # repeated appends, instead of the typical quadratic growth present in naive | |
14331 | # implementations. | |
14332 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
14333 | eval 'as_fn_append () | |
14334 | { | |
14335 | eval $1+=\$2 | |
14336 | }' | |
14337 | else | |
14338 | as_fn_append () | |
14339 | { | |
14340 | eval $1=\$$1\$2 | |
14341 | } | |
14342 | fi # as_fn_append | |
14343 | ||
14344 | # as_fn_arith ARG... | |
14345 | # ------------------ | |
14346 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
14347 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
14348 | # must be portable across $(()) and expr. | |
14349 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
14350 | eval 'as_fn_arith () | |
14351 | { | |
14352 | as_val=$(( $* )) | |
14353 | }' | |
14354 | else | |
14355 | as_fn_arith () | |
14356 | { | |
14357 | as_val=`expr "$@" || test $? -eq 1` | |
14358 | } | |
14359 | fi # as_fn_arith | |
bec39cab | 14360 | |
81ecdfbb RW |
14361 | |
14362 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
14363 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
14364 | as_expr=expr |
14365 | else | |
14366 | as_expr=false | |
14367 | fi | |
14368 | ||
81ecdfbb | 14369 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
14370 | as_basename=basename |
14371 | else | |
14372 | as_basename=false | |
14373 | fi | |
14374 | ||
81ecdfbb RW |
14375 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
14376 | as_dirname=dirname | |
14377 | else | |
14378 | as_dirname=false | |
14379 | fi | |
bec39cab | 14380 | |
81ecdfbb | 14381 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
14382 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
14383 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
14384 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
14385 | $as_echo X/"$0" | | |
14386 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
14387 | s//\1/ | |
14388 | q | |
14389 | } | |
14390 | /^X\/\(\/\/\)$/{ | |
14391 | s//\1/ | |
14392 | q | |
14393 | } | |
14394 | /^X\/\(\/\).*/{ | |
14395 | s//\1/ | |
14396 | q | |
14397 | } | |
14398 | s/.*/./; q'` | |
b4e70030 | 14399 | |
b4e70030 JB |
14400 | # Avoid depending upon Character Ranges. |
14401 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
14402 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
14403 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
14404 | as_cr_digits='0123456789' | |
14405 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
14406 | ||
81ecdfbb RW |
14407 | ECHO_C= ECHO_N= ECHO_T= |
14408 | case `echo -n x` in #((((( | |
14409 | -n*) | |
14410 | case `echo 'xy\c'` in | |
14411 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
14412 | xy) ECHO_C='\c';; | |
14413 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
14414 | ECHO_T=' ';; | |
14415 | esac;; | |
14416 | *) | |
14417 | ECHO_N='-n';; | |
bec39cab AC |
14418 | esac |
14419 | ||
81ecdfbb RW |
14420 | rm -f conf$$ conf$$.exe conf$$.file |
14421 | if test -d conf$$.dir; then | |
14422 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 14423 | else |
81ecdfbb RW |
14424 | rm -f conf$$.dir |
14425 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 14426 | fi |
81ecdfbb RW |
14427 | if (echo >conf$$.file) 2>/dev/null; then |
14428 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 14429 | as_ln_s='ln -s' |
81ecdfbb RW |
14430 | # ... but there are two gotchas: |
14431 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
14432 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
14433 | # In both cases, we have to default to `cp -p'. | |
14434 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
14435 | as_ln_s='cp -p' | |
14436 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
14437 | as_ln_s=ln | |
14438 | else | |
14439 | as_ln_s='cp -p' | |
b4e70030 | 14440 | fi |
bec39cab AC |
14441 | else |
14442 | as_ln_s='cp -p' | |
14443 | fi | |
81ecdfbb RW |
14444 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
14445 | rmdir conf$$.dir 2>/dev/null | |
14446 | ||
14447 | ||
14448 | # as_fn_mkdir_p | |
14449 | # ------------- | |
14450 | # Create "$as_dir" as a directory, including parents if necessary. | |
14451 | as_fn_mkdir_p () | |
14452 | { | |
14453 | ||
14454 | case $as_dir in #( | |
14455 | -*) as_dir=./$as_dir;; | |
14456 | esac | |
14457 | test -d "$as_dir" || eval $as_mkdir_p || { | |
14458 | as_dirs= | |
14459 | while :; do | |
14460 | case $as_dir in #( | |
14461 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
14462 | *) as_qdir=$as_dir;; | |
14463 | esac | |
14464 | as_dirs="'$as_qdir' $as_dirs" | |
14465 | as_dir=`$as_dirname -- "$as_dir" || | |
14466 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
14467 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
14468 | X"$as_dir" : 'X\(//\)$' \| \ | |
14469 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
14470 | $as_echo X"$as_dir" | | |
14471 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
14472 | s//\1/ | |
14473 | q | |
14474 | } | |
14475 | /^X\(\/\/\)[^/].*/{ | |
14476 | s//\1/ | |
14477 | q | |
14478 | } | |
14479 | /^X\(\/\/\)$/{ | |
14480 | s//\1/ | |
14481 | q | |
14482 | } | |
14483 | /^X\(\/\).*/{ | |
14484 | s//\1/ | |
14485 | q | |
14486 | } | |
14487 | s/.*/./; q'` | |
14488 | test -d "$as_dir" && break | |
14489 | done | |
14490 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
14491 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
14492 | ||
bec39cab | 14493 | |
81ecdfbb | 14494 | } # as_fn_mkdir_p |
bec39cab | 14495 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 14496 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
14497 | else |
14498 | test -d ./-p && rmdir ./-p | |
14499 | as_mkdir_p=false | |
14500 | fi | |
14501 | ||
81ecdfbb RW |
14502 | if test -x / >/dev/null 2>&1; then |
14503 | as_test_x='test -x' | |
14504 | else | |
14505 | if ls -dL / >/dev/null 2>&1; then | |
14506 | as_ls_L_option=L | |
14507 | else | |
14508 | as_ls_L_option= | |
14509 | fi | |
14510 | as_test_x=' | |
14511 | eval sh -c '\'' | |
14512 | if test -d "$1"; then | |
14513 | test -d "$1/."; | |
14514 | else | |
14515 | case $1 in #( | |
14516 | -*)set "./$1";; | |
14517 | esac; | |
14518 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
14519 | ???[sx]*):;;*)false;;esac;fi | |
14520 | '\'' sh | |
14521 | ' | |
14522 | fi | |
14523 | as_executable_p=$as_test_x | |
bec39cab AC |
14524 | |
14525 | # Sed expression to map a string onto a valid CPP name. | |
14526 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
14527 | ||
14528 | # Sed expression to map a string onto a valid variable name. | |
14529 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
14530 | ||
14531 | ||
bec39cab | 14532 | exec 6>&1 |
81ecdfbb RW |
14533 | ## ----------------------------------- ## |
14534 | ## Main body of $CONFIG_STATUS script. ## | |
14535 | ## ----------------------------------- ## | |
14536 | _ASEOF | |
14537 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
14538 | ||
14539 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14540 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 14541 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
14542 | # values after options handling. |
14543 | ac_log=" | |
bec39cab | 14544 | This file was extended by $as_me, which was |
81ecdfbb | 14545 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
14546 | |
14547 | CONFIG_FILES = $CONFIG_FILES | |
14548 | CONFIG_HEADERS = $CONFIG_HEADERS | |
14549 | CONFIG_LINKS = $CONFIG_LINKS | |
14550 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
14551 | $ $0 $@ | |
14552 | ||
81ecdfbb RW |
14553 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
14554 | " | |
14555 | ||
bec39cab AC |
14556 | _ACEOF |
14557 | ||
81ecdfbb RW |
14558 | case $ac_config_files in *" |
14559 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
14560 | esac | |
234b45d4 | 14561 | |
81ecdfbb RW |
14562 | case $ac_config_headers in *" |
14563 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
14564 | esac | |
b4e70030 | 14565 | |
b4e70030 | 14566 | |
81ecdfbb RW |
14567 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
14568 | # Files that config.status was made for. | |
14569 | config_files="$ac_config_files" | |
14570 | config_headers="$ac_config_headers" | |
14571 | config_links="$ac_config_links" | |
14572 | config_commands="$ac_config_commands" | |
234b45d4 | 14573 | |
81ecdfbb | 14574 | _ACEOF |
b4e70030 | 14575 | |
81ecdfbb | 14576 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 14577 | ac_cs_usage="\ |
81ecdfbb RW |
14578 | \`$as_me' instantiates files and other configuration actions |
14579 | from templates according to the current configuration. Unless the files | |
14580 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 14581 | |
81ecdfbb | 14582 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 14583 | |
bec39cab | 14584 | -h, --help print this help, then exit |
81ecdfbb RW |
14585 | -V, --version print version number and configuration settings, then exit |
14586 | -q, --quiet, --silent | |
14587 | do not print progress messages | |
bec39cab AC |
14588 | -d, --debug don't remove temporary files |
14589 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
14590 | --file=FILE[:TEMPLATE] |
14591 | instantiate the configuration file FILE | |
14592 | --header=FILE[:TEMPLATE] | |
14593 | instantiate the configuration header FILE | |
234b45d4 | 14594 | |
bec39cab AC |
14595 | Configuration files: |
14596 | $config_files | |
234b45d4 | 14597 | |
bec39cab AC |
14598 | Configuration headers: |
14599 | $config_headers | |
234b45d4 | 14600 | |
bec39cab AC |
14601 | Configuration links: |
14602 | $config_links | |
234b45d4 | 14603 | |
bec39cab AC |
14604 | Configuration commands: |
14605 | $config_commands | |
14606 | ||
81ecdfbb | 14607 | Report bugs to the package provider." |
b4e70030 | 14608 | |
81ecdfbb RW |
14609 | _ACEOF |
14610 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
14611 | ac_cs_version="\\ |
14612 | config.status | |
81ecdfbb RW |
14613 | configured by $0, generated by GNU Autoconf 2.64, |
14614 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 14615 | |
81ecdfbb | 14616 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
14617 | This config.status script is free software; the Free Software Foundation |
14618 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
14619 | |
14620 | ac_pwd='$ac_pwd' | |
14621 | srcdir='$srcdir' | |
14622 | INSTALL='$INSTALL' | |
81ecdfbb RW |
14623 | AWK='$AWK' |
14624 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
14625 | _ACEOF |
14626 | ||
81ecdfbb RW |
14627 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14628 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
14629 | ac_need_defaults=: |
14630 | while test $# != 0 | |
14631 | do | |
14632 | case $1 in | |
14633 | --*=*) | |
81ecdfbb RW |
14634 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
14635 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 14636 | ac_shift=: |
c906108c | 14637 | ;; |
81ecdfbb | 14638 | *) |
bec39cab AC |
14639 | ac_option=$1 |
14640 | ac_optarg=$2 | |
14641 | ac_shift=shift | |
c906108c | 14642 | ;; |
bec39cab | 14643 | esac |
c906108c | 14644 | |
bec39cab AC |
14645 | case $ac_option in |
14646 | # Handling of the options. | |
bec39cab AC |
14647 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
14648 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
14649 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
14650 | $as_echo "$ac_cs_version"; exit ;; | |
14651 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
14652 | debug=: ;; |
14653 | --file | --fil | --fi | --f ) | |
14654 | $ac_shift | |
81ecdfbb RW |
14655 | case $ac_optarg in |
14656 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14657 | esac | |
14658 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
14659 | ac_need_defaults=false;; |
14660 | --header | --heade | --head | --hea ) | |
14661 | $ac_shift | |
81ecdfbb RW |
14662 | case $ac_optarg in |
14663 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14664 | esac | |
14665 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 14666 | ac_need_defaults=false;; |
81ecdfbb RW |
14667 | --he | --h) |
14668 | # Conflict between --help and --header | |
14669 | as_fn_error "ambiguous option: \`$1' | |
14670 | Try \`$0 --help' for more information.";; | |
14671 | --help | --hel | -h ) | |
14672 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
14673 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
14674 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
14675 | ac_cs_silent=: ;; | |
c906108c | 14676 | |
bec39cab | 14677 | # This is an error. |
81ecdfbb RW |
14678 | -*) as_fn_error "unrecognized option: \`$1' |
14679 | Try \`$0 --help' for more information." ;; | |
c906108c | 14680 | |
81ecdfbb RW |
14681 | *) as_fn_append ac_config_targets " $1" |
14682 | ac_need_defaults=false ;; | |
c906108c | 14683 | |
bec39cab AC |
14684 | esac |
14685 | shift | |
14686 | done | |
c906108c | 14687 | |
bec39cab | 14688 | ac_configure_extra_args= |
c906108c | 14689 | |
bec39cab AC |
14690 | if $ac_cs_silent; then |
14691 | exec 6>/dev/null | |
14692 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
14693 | fi | |
c906108c | 14694 | |
bec39cab | 14695 | _ACEOF |
81ecdfbb | 14696 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 14697 | if \$ac_cs_recheck; then |
81ecdfbb RW |
14698 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
14699 | shift | |
14700 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
14701 | CONFIG_SHELL='$SHELL' | |
14702 | export CONFIG_SHELL | |
14703 | exec "\$@" | |
bec39cab AC |
14704 | fi |
14705 | ||
14706 | _ACEOF | |
81ecdfbb RW |
14707 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14708 | exec 5>>config.log | |
14709 | { | |
14710 | echo | |
14711 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
14712 | ## Running $as_me. ## | |
14713 | _ASBOX | |
14714 | $as_echo "$ac_log" | |
14715 | } >&5 | |
bec39cab | 14716 | |
81ecdfbb RW |
14717 | _ACEOF |
14718 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 14719 | # |
81ecdfbb | 14720 | # INIT-COMMANDS |
c906108c | 14721 | # |
a417dc56 | 14722 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 14723 | |
bec39cab AC |
14724 | _ACEOF |
14725 | ||
81ecdfbb | 14726 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 14727 | |
81ecdfbb | 14728 | # Handling of arguments. |
bec39cab | 14729 | for ac_config_target in $ac_config_targets |
c906108c | 14730 | do |
81ecdfbb RW |
14731 | case $ac_config_target in |
14732 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
14733 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 14734 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb RW |
14735 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
14736 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
e2207b9a | 14737 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 14738 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 14739 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
14740 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
14741 | ||
14742 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
14743 | esac |
14744 | done | |
14745 | ||
81ecdfbb | 14746 | |
bec39cab AC |
14747 | # If the user did not use the arguments to specify the items to instantiate, |
14748 | # then the envvar interface is used. Set only those that are not. | |
14749 | # We use the long form for the default assignment because of an extremely | |
14750 | # bizarre bug on SunOS 4.1.3. | |
14751 | if $ac_need_defaults; then | |
14752 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
14753 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
14754 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
14755 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
14756 | fi | |
14757 | ||
b4e70030 | 14758 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 14759 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 14760 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
14761 | # Hook for its removal unless debugging. |
14762 | # Note that there is a small window in which the directory will not be cleaned: | |
14763 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
14764 | $debug || |
14765 | { | |
81ecdfbb RW |
14766 | tmp= |
14767 | trap 'exit_status=$? | |
14768 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
14769 | ' 0 | |
14770 | trap 'as_fn_exit 1' 1 2 13 15 | |
14771 | } | |
14772 | # Create a (secure) tmp directory for tmp files. | |
14773 | ||
14774 | { | |
14775 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
14776 | test -n "$tmp" && test -d "$tmp" | |
14777 | } || | |
14778 | { | |
14779 | tmp=./conf$$-$RANDOM | |
14780 | (umask 077 && mkdir "$tmp") | |
14781 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
14782 | ||
14783 | # Set up the scripts for CONFIG_FILES section. | |
14784 | # No need to generate them if there are no CONFIG_FILES. | |
14785 | # This happens for instance with `./config.status config.h'. | |
14786 | if test -n "$CONFIG_FILES"; then | |
14787 | ||
14788 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
14789 | ac_cs_awk_getline=: | |
14790 | ac_cs_awk_pipe_init= | |
14791 | ac_cs_awk_read_file=' | |
14792 | while ((getline aline < (F[key])) > 0) | |
14793 | print(aline) | |
14794 | close(F[key])' | |
14795 | ac_cs_awk_pipe_fini= | |
14796 | else | |
14797 | ac_cs_awk_getline=false | |
14798 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
14799 | ac_cs_awk_read_file=' | |
14800 | print "|#_!!_#|" | |
14801 | print "cat " F[key] " &&" | |
14802 | '$ac_cs_awk_pipe_init | |
14803 | # The final `:' finishes the AND list. | |
14804 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
14805 | fi | |
14806 | ac_cr=`echo X | tr X '\015'` | |
14807 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
14808 | # But we know of no other shell where ac_cr would be empty at this | |
14809 | # point, so we can use a bashism as a fallback. | |
14810 | if test "x$ac_cr" = x; then | |
14811 | eval ac_cr=\$\'\\r\' | |
14812 | fi | |
14813 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
14814 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
14815 | ac_cs_awk_cr='\r' | |
14816 | else | |
14817 | ac_cs_awk_cr=$ac_cr | |
14818 | fi | |
14819 | ||
14820 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
14821 | _ACEOF | |
14822 | ||
14823 | # Create commands to substitute file output variables. | |
14824 | { | |
14825 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
14826 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
14827 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
14828 | echo "_ACAWK" && | |
14829 | echo "_ACEOF" | |
14830 | } >conf$$files.sh && | |
14831 | . ./conf$$files.sh || | |
14832 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14833 | rm -f conf$$files.sh | |
14834 | ||
14835 | { | |
14836 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
14837 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
14838 | echo "_ACEOF" | |
14839 | } >conf$$subs.sh || | |
14840 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14841 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
14842 | ac_delim='%!_!# ' | |
14843 | for ac_last_try in false false false false false :; do | |
14844 | . ./conf$$subs.sh || | |
14845 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14846 | ||
14847 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
14848 | if test $ac_delim_n = $ac_delim_num; then | |
14849 | break | |
14850 | elif $ac_last_try; then | |
14851 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14852 | else | |
14853 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14854 | fi | |
14855 | done | |
14856 | rm -f conf$$subs.sh | |
14857 | ||
14858 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14859 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
14860 | _ACEOF | |
14861 | sed -n ' | |
14862 | h | |
14863 | s/^/S["/; s/!.*/"]=/ | |
14864 | p | |
14865 | g | |
14866 | s/^[^!]*!// | |
14867 | :repl | |
14868 | t repl | |
14869 | s/'"$ac_delim"'$// | |
14870 | t delim | |
14871 | :nl | |
14872 | h | |
14873 | s/\(.\{148\}\).*/\1/ | |
14874 | t more1 | |
14875 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
14876 | p | |
14877 | n | |
14878 | b repl | |
14879 | :more1 | |
14880 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14881 | p | |
14882 | g | |
14883 | s/.\{148\}// | |
14884 | t nl | |
14885 | :delim | |
14886 | h | |
14887 | s/\(.\{148\}\).*/\1/ | |
14888 | t more2 | |
14889 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
14890 | p | |
14891 | b | |
14892 | :more2 | |
14893 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14894 | p | |
14895 | g | |
14896 | s/.\{148\}// | |
14897 | t delim | |
14898 | ' <conf$$subs.awk | sed ' | |
14899 | /^[^""]/{ | |
14900 | N | |
14901 | s/\n// | |
14902 | } | |
14903 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
14904 | rm -f conf$$subs.awk | |
14905 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14906 | _ACAWK | |
14907 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
14908 | for (key in S) S_is_set[key] = 1 | |
14909 | FS = "\a" | |
14910 | \$ac_cs_awk_pipe_init | |
14911 | } | |
14912 | { | |
14913 | line = $ 0 | |
14914 | nfields = split(line, field, "@") | |
14915 | substed = 0 | |
14916 | len = length(field[1]) | |
14917 | for (i = 2; i < nfields; i++) { | |
14918 | key = field[i] | |
14919 | keylen = length(key) | |
14920 | if (S_is_set[key]) { | |
14921 | value = S[key] | |
14922 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
14923 | len += length(value) + length(field[++i]) | |
14924 | substed = 1 | |
14925 | } else | |
14926 | len += 1 + keylen | |
14927 | } | |
14928 | if (nfields == 3 && !substed) { | |
14929 | key = field[2] | |
14930 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
14931 | \$ac_cs_awk_read_file | |
14932 | next | |
14933 | } | |
14934 | } | |
14935 | print line | |
b4e70030 | 14936 | } |
81ecdfbb RW |
14937 | \$ac_cs_awk_pipe_fini |
14938 | _ACAWK | |
14939 | _ACEOF | |
14940 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14941 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
14942 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
14943 | else | |
14944 | cat | |
14945 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
14946 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
14947 | _ACEOF | |
14948 | ||
14949 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
14950 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
14951 | # trailing colons and then remove the whole line if VPATH becomes empty | |
14952 | # (actually we leave an empty line to preserve line numbers). | |
14953 | if test "x$srcdir" = x.; then | |
14954 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
14955 | s/:*\$(srcdir):*/:/ | |
14956 | s/:*\${srcdir}:*/:/ | |
14957 | s/:*@srcdir@:*/:/ | |
14958 | s/^\([^=]*=[ ]*\):*/\1/ | |
14959 | s/:*$// | |
14960 | s/^[^=]*=[ ]*$// | |
14961 | }' | |
14962 | fi | |
14963 | ||
14964 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14965 | fi # test -n "$CONFIG_FILES" | |
14966 | ||
14967 | # Set up the scripts for CONFIG_HEADERS section. | |
14968 | # No need to generate them if there are no CONFIG_HEADERS. | |
14969 | # This happens for instance with `./config.status Makefile'. | |
14970 | if test -n "$CONFIG_HEADERS"; then | |
14971 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
14972 | BEGIN { | |
14973 | _ACEOF | |
14974 | ||
14975 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
14976 | # here-document in config.status, that substitutes the proper values into | |
14977 | # config.h.in to produce config.h. | |
4e8d927d | 14978 | |
81ecdfbb RW |
14979 | # Create a delimiter string that does not exist in confdefs.h, to ease |
14980 | # handling of long lines. | |
14981 | ac_delim='%!_!# ' | |
14982 | for ac_last_try in false false :; do | |
14983 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
14984 | if test -z "$ac_t"; then | |
14985 | break | |
14986 | elif $ac_last_try; then | |
14987 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
14988 | else | |
14989 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14990 | fi | |
14991 | done | |
4e8d927d | 14992 | |
81ecdfbb RW |
14993 | # For the awk script, D is an array of macro values keyed by name, |
14994 | # likewise P contains macro parameters if any. Preserve backslash | |
14995 | # newline sequences. | |
14996 | ||
14997 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
14998 | sed -n ' | |
14999 | s/.\{148\}/&'"$ac_delim"'/g | |
15000 | t rset | |
15001 | :rset | |
15002 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
15003 | t def | |
15004 | d | |
15005 | :def | |
15006 | s/\\$// | |
15007 | t bsnl | |
15008 | s/["\\]/\\&/g | |
15009 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15010 | D["\1"]=" \3"/p | |
15011 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
15012 | d | |
15013 | :bsnl | |
15014 | s/["\\]/\\&/g | |
15015 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15016 | D["\1"]=" \3\\\\\\n"\\/p | |
15017 | t cont | |
15018 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
15019 | t cont | |
15020 | d | |
15021 | :cont | |
15022 | n | |
15023 | s/.\{148\}/&'"$ac_delim"'/g | |
15024 | t clear | |
15025 | :clear | |
15026 | s/\\$// | |
15027 | t bsnlc | |
15028 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
15029 | d | |
15030 | :bsnlc | |
15031 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
15032 | b cont | |
15033 | ' <confdefs.h | sed ' | |
15034 | s/'"$ac_delim"'/"\\\ | |
15035 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
15036 | ||
15037 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15038 | for (key in D) D_is_set[key] = 1 | |
15039 | FS = "\a" | |
15040 | } | |
15041 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
15042 | line = \$ 0 | |
15043 | split(line, arg, " ") | |
15044 | if (arg[1] == "#") { | |
15045 | defundef = arg[2] | |
15046 | mac1 = arg[3] | |
15047 | } else { | |
15048 | defundef = substr(arg[1], 2) | |
15049 | mac1 = arg[2] | |
15050 | } | |
15051 | split(mac1, mac2, "(") #) | |
15052 | macro = mac2[1] | |
15053 | prefix = substr(line, 1, index(line, defundef) - 1) | |
15054 | if (D_is_set[macro]) { | |
15055 | # Preserve the white space surrounding the "#". | |
15056 | print prefix "define", macro P[macro] D[macro] | |
15057 | next | |
15058 | } else { | |
15059 | # Replace #undef with comments. This is necessary, for example, | |
15060 | # in the case of _POSIX_SOURCE, which is predefined and required | |
15061 | # on some systems where configure will not decide to define it. | |
15062 | if (defundef == "undef") { | |
15063 | print "/*", prefix defundef, macro, "*/" | |
15064 | next | |
15065 | } | |
15066 | } | |
b4e70030 | 15067 | } |
81ecdfbb RW |
15068 | { print } |
15069 | _ACAWK | |
b4e70030 | 15070 | _ACEOF |
81ecdfbb RW |
15071 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15072 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
15073 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 15074 | |
4e8d927d | 15075 | |
81ecdfbb RW |
15076 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
15077 | shift | |
15078 | for ac_tag | |
15079 | do | |
15080 | case $ac_tag in | |
15081 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
15082 | esac | |
15083 | case $ac_mode$ac_tag in | |
15084 | :[FHL]*:*);; | |
15085 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
15086 | :[FH]-) ac_tag=-:-;; | |
15087 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
15088 | esac | |
15089 | ac_save_IFS=$IFS | |
15090 | IFS=: | |
15091 | set x $ac_tag | |
15092 | IFS=$ac_save_IFS | |
15093 | shift | |
15094 | ac_file=$1 | |
15095 | shift | |
4e8d927d | 15096 | |
81ecdfbb RW |
15097 | case $ac_mode in |
15098 | :L) ac_source=$1;; | |
15099 | :[FH]) | |
15100 | ac_file_inputs= | |
15101 | for ac_f | |
15102 | do | |
15103 | case $ac_f in | |
15104 | -) ac_f="$tmp/stdin";; | |
15105 | *) # Look for the file first in the build tree, then in the source tree | |
15106 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
15107 | # because $ac_f cannot contain `:'. | |
15108 | test -f "$ac_f" || | |
15109 | case $ac_f in | |
15110 | [\\/$]*) false;; | |
15111 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
15112 | esac || | |
15113 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
15114 | esac | |
15115 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
15116 | as_fn_append ac_file_inputs " '$ac_f'" | |
15117 | done | |
15118 | ||
15119 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
15120 | # use $as_me), people would be surprised to read: | |
15121 | # /* config.h. Generated by config.status. */ | |
15122 | configure_input='Generated from '` | |
15123 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
15124 | `' by configure.' | |
15125 | if test x"$ac_file" != x-; then | |
15126 | configure_input="$ac_file. $configure_input" | |
15127 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
15128 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 15129 | fi |
81ecdfbb RW |
15130 | # Neutralize special characters interpreted by sed in replacement strings. |
15131 | case $configure_input in #( | |
15132 | *\&* | *\|* | *\\* ) | |
15133 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
15134 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
15135 | *) ac_sed_conf_input=$configure_input;; | |
15136 | esac | |
4e8d927d | 15137 | |
81ecdfbb RW |
15138 | case $ac_tag in |
15139 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
15140 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
15141 | esac | |
15142 | ;; | |
c906108c SS |
15143 | esac |
15144 | ||
81ecdfbb | 15145 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
15146 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
15147 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
15148 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
15149 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
15150 | $as_echo X"$ac_file" | | |
15151 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15152 | s//\1/ | |
15153 | q | |
15154 | } | |
15155 | /^X\(\/\/\)[^/].*/{ | |
15156 | s//\1/ | |
15157 | q | |
15158 | } | |
15159 | /^X\(\/\/\)$/{ | |
15160 | s//\1/ | |
15161 | q | |
15162 | } | |
15163 | /^X\(\/\).*/{ | |
15164 | s//\1/ | |
15165 | q | |
15166 | } | |
15167 | s/.*/./; q'` | |
15168 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
15169 | ac_builddir=. |
15170 | ||
81ecdfbb RW |
15171 | case "$ac_dir" in |
15172 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15173 | *) | |
15174 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
15175 | # A ".." for each directory in $ac_dir_suffix. | |
15176 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
15177 | case $ac_top_builddir_sub in | |
15178 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15179 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
15180 | esac ;; | |
15181 | esac | |
15182 | ac_abs_top_builddir=$ac_pwd | |
15183 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
15184 | # for backward compatibility: | |
15185 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
15186 | |
15187 | case $srcdir in | |
81ecdfbb | 15188 | .) # We are building in place. |
bec39cab | 15189 | ac_srcdir=. |
81ecdfbb RW |
15190 | ac_top_srcdir=$ac_top_builddir_sub |
15191 | ac_abs_top_srcdir=$ac_pwd ;; | |
15192 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 15193 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
15194 | ac_top_srcdir=$srcdir |
15195 | ac_abs_top_srcdir=$srcdir ;; | |
15196 | *) # Relative name. | |
15197 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
15198 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
15199 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 15200 | esac |
81ecdfbb | 15201 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 15202 | |
c906108c | 15203 | |
81ecdfbb RW |
15204 | case $ac_mode in |
15205 | :F) | |
15206 | # | |
15207 | # CONFIG_FILE | |
15208 | # | |
c906108c | 15209 | |
bec39cab AC |
15210 | case $INSTALL in |
15211 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 15212 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 15213 | esac |
81ecdfbb | 15214 | _ACEOF |
121ce6e5 | 15215 | |
81ecdfbb RW |
15216 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15217 | # If the template does not know about datarootdir, expand it. | |
15218 | # FIXME: This hack should be removed a few years after 2.60. | |
15219 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
15220 | ac_sed_dataroot=' | |
15221 | /datarootdir/ { | |
15222 | p | |
15223 | q | |
15224 | } | |
15225 | /@datadir@/p | |
15226 | /@docdir@/p | |
15227 | /@infodir@/p | |
15228 | /@localedir@/p | |
15229 | /@mandir@/p' | |
15230 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
15231 | *datarootdir*) ac_datarootdir_seen=yes;; | |
15232 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
15233 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
15234 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
15235 | _ACEOF | |
15236 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15237 | ac_datarootdir_hack=' | |
15238 | s&@datadir@&$datadir&g | |
15239 | s&@docdir@&$docdir&g | |
15240 | s&@infodir@&$infodir&g | |
15241 | s&@localedir@&$localedir&g | |
15242 | s&@mandir@&$mandir&g | |
15243 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
15244 | esac | |
4e8d927d | 15245 | _ACEOF |
81ecdfbb RW |
15246 | |
15247 | # Neutralize VPATH when `$srcdir' = `.'. | |
15248 | # Shell code in configure.ac might set extrasub. | |
15249 | # FIXME: do we really want to maintain this feature? | |
15250 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15251 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
15252 | $extrasub |
15253 | _ACEOF | |
81ecdfbb | 15254 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
15255 | :t |
15256 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
15257 | s|@configure_input@|$ac_sed_conf_input|;t t |
15258 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
15259 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
15260 | s&@srcdir@&$ac_srcdir&;t t | |
15261 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
15262 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
15263 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
15264 | s&@builddir@&$ac_builddir&;t t | |
15265 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
15266 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
15267 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
15268 | $ac_datarootdir_hack |
15269 | " | |
15270 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
15271 | if $ac_cs_awk_getline; then | |
15272 | $AWK -f "$tmp/subs.awk" | |
15273 | else | |
15274 | $AWK -f "$tmp/subs.awk" | $SHELL | |
15275 | fi >$tmp/out \ | |
15276 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
15277 | ||
15278 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
15279 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
15280 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
15281 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
15282 | which seems to be undefined. Please make sure it is defined." >&5 | |
15283 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
15284 | which seems to be undefined. Please make sure it is defined." >&2;} | |
15285 | ||
15286 | rm -f "$tmp/stdin" | |
bec39cab | 15287 | case $ac_file in |
81ecdfbb RW |
15288 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
15289 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
15290 | esac \ | |
15291 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
15292 | ;; | |
15293 | :H) | |
15294 | # | |
15295 | # CONFIG_HEADER | |
15296 | # | |
bec39cab | 15297 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
15298 | { |
15299 | $as_echo "/* $configure_input */" \ | |
15300 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
15301 | } >"$tmp/config.h" \ | |
15302 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
15303 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
15304 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
15305 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 15306 | else |
81ecdfbb RW |
15307 | rm -f "$ac_file" |
15308 | mv "$tmp/config.h" "$ac_file" \ | |
15309 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
15310 | fi |
15311 | else | |
81ecdfbb RW |
15312 | $as_echo "/* $configure_input */" \ |
15313 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
15314 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 15315 | fi |
81ecdfbb RW |
15316 | ;; |
15317 | :L) | |
15318 | # | |
15319 | # CONFIG_LINK | |
15320 | # | |
c906108c | 15321 | |
81ecdfbb RW |
15322 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
15323 | : | |
b4e70030 | 15324 | else |
81ecdfbb RW |
15325 | # Prefer the file from the source tree if names are identical. |
15326 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
15327 | ac_source=$srcdir/$ac_source | |
15328 | fi | |
b4e70030 | 15329 | |
81ecdfbb RW |
15330 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
15331 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 15332 | |
81ecdfbb RW |
15333 | if test ! -r "$ac_source"; then |
15334 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
15335 | fi | |
15336 | rm -f "$ac_file" | |
bec39cab | 15337 | |
81ecdfbb RW |
15338 | # Try a relative symlink, then a hard link, then a copy. |
15339 | case $srcdir in | |
15340 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
15341 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
15342 | esac | |
15343 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
15344 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
15345 | cp -p "$ac_source" "$ac_file" || | |
15346 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
15347 | fi | |
15348 | ;; | |
15349 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
15350 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
15351 | ;; | |
c906108c | 15352 | esac |
b4e70030 | 15353 | |
bec39cab | 15354 | |
81ecdfbb RW |
15355 | case $ac_file$ac_mode in |
15356 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
81ecdfbb | 15357 | "default":C) |
c906108c SS |
15358 | case x$CONFIG_HEADERS in |
15359 | xconfig.h:config.in) | |
15360 | echo > stamp-h ;; | |
15361 | esac | |
bec39cab | 15362 | ;; |
81ecdfbb | 15363 | |
bec39cab | 15364 | esac |
81ecdfbb | 15365 | done # for ac_tag |
c906108c | 15366 | |
bec39cab | 15367 | |
81ecdfbb | 15368 | as_fn_exit 0 |
bec39cab | 15369 | _ACEOF |
bec39cab AC |
15370 | ac_clean_files=$ac_clean_files_save |
15371 | ||
81ecdfbb RW |
15372 | test $ac_write_fail = 0 || |
15373 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
15374 | ||
bec39cab AC |
15375 | |
15376 | # configure is writing to config.log, and then calls config.status. | |
15377 | # config.status does its own redirection, appending to config.log. | |
15378 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
15379 | # by configure, so config.status won't be able to write to it; its | |
15380 | # output is simply discarded. So we exec the FD to /dev/null, | |
15381 | # effectively closing config.log, so it can be properly (re)opened and | |
15382 | # appended to by config.status. When coming back to configure, we | |
15383 | # need to make the FD available again. | |
15384 | if test "$no_create" != yes; then | |
15385 | ac_cs_success=: | |
15386 | ac_config_status_args= | |
15387 | test "$silent" = yes && | |
15388 | ac_config_status_args="$ac_config_status_args --quiet" | |
15389 | exec 5>/dev/null | |
15390 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
15391 | exec 5>>config.log | |
15392 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
15393 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 15394 | $ac_cs_success || as_fn_exit $? |
bec39cab | 15395 | fi |
c906108c | 15396 | |
bec39cab | 15397 | # |
81ecdfbb | 15398 | # CONFIG_SUBDIRS section. |
bec39cab | 15399 | # |
c906108c SS |
15400 | if test "$no_recursion" != yes; then |
15401 | ||
81ecdfbb RW |
15402 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
15403 | # so they do not pile up. | |
c906108c SS |
15404 | ac_sub_configure_args= |
15405 | ac_prev= | |
fdc59709 PB |
15406 | eval "set x $ac_configure_args" |
15407 | shift | |
15408 | for ac_arg | |
15409 | do | |
c906108c SS |
15410 | if test -n "$ac_prev"; then |
15411 | ac_prev= | |
15412 | continue | |
15413 | fi | |
bec39cab | 15414 | case $ac_arg in |
c906108c SS |
15415 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
15416 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
15417 | ac_prev=cache_file ;; | |
15418 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
15419 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
15420 | | --c=*) | |
15421 | ;; | |
15422 | --config-cache | -C) | |
c906108c SS |
15423 | ;; |
15424 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
15425 | ac_prev=srcdir ;; | |
15426 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
15427 | ;; | |
bec39cab AC |
15428 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
15429 | ac_prev=prefix ;; | |
15430 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
15431 | ;; | |
81ecdfbb RW |
15432 | --disable-option-checking) |
15433 | ;; | |
fdc59709 PB |
15434 | *) |
15435 | case $ac_arg in | |
81ecdfbb | 15436 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 15437 | esac |
81ecdfbb | 15438 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
15439 | esac |
15440 | done | |
15441 | ||
bec39cab AC |
15442 | # Always prepend --prefix to ensure using the same prefix |
15443 | # in subdir configurations. | |
fdc59709 PB |
15444 | ac_arg="--prefix=$prefix" |
15445 | case $ac_arg in | |
81ecdfbb | 15446 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 15447 | esac |
81ecdfbb RW |
15448 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
15449 | ||
15450 | # Pass --silent | |
15451 | if test "$silent" = yes; then | |
15452 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
15453 | fi | |
15454 | ||
15455 | # Always prepend --disable-option-checking to silence warnings, since | |
15456 | # different subdirs can have different --enable and --with options. | |
15457 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 15458 | |
b4e70030 | 15459 | ac_popdir=`pwd` |
bec39cab | 15460 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
15461 | |
15462 | # Do not complain, so a configure script can configure whichever | |
15463 | # parts of a large source tree are present. | |
fdc59709 | 15464 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 15465 | |
81ecdfbb RW |
15466 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
15467 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
15468 | $as_echo "$ac_msg" >&6 | |
15469 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
15470 | ac_builddir=. |
15471 | ||
81ecdfbb RW |
15472 | case "$ac_dir" in |
15473 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15474 | *) | |
15475 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
15476 | # A ".." for each directory in $ac_dir_suffix. | |
15477 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
15478 | case $ac_top_builddir_sub in | |
15479 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15480 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
15481 | esac ;; | |
15482 | esac | |
15483 | ac_abs_top_builddir=$ac_pwd | |
15484 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
15485 | # for backward compatibility: | |
15486 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
15487 | |
15488 | case $srcdir in | |
81ecdfbb | 15489 | .) # We are building in place. |
bec39cab | 15490 | ac_srcdir=. |
81ecdfbb RW |
15491 | ac_top_srcdir=$ac_top_builddir_sub |
15492 | ac_abs_top_srcdir=$ac_pwd ;; | |
15493 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 15494 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
15495 | ac_top_srcdir=$srcdir |
15496 | ac_abs_top_srcdir=$srcdir ;; | |
15497 | *) # Relative name. | |
15498 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
15499 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
15500 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 15501 | esac |
81ecdfbb | 15502 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 15503 | |
c906108c | 15504 | |
fdc59709 | 15505 | cd "$ac_dir" |
c906108c SS |
15506 | |
15507 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
15508 | if test -f "$ac_srcdir/configure.gnu"; then |
15509 | ac_sub_configure=$ac_srcdir/configure.gnu | |
15510 | elif test -f "$ac_srcdir/configure"; then | |
15511 | ac_sub_configure=$ac_srcdir/configure | |
15512 | elif test -f "$ac_srcdir/configure.in"; then | |
15513 | # This should be Cygnus configure. | |
15514 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 15515 | else |
81ecdfbb RW |
15516 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
15517 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
15518 | ac_sub_configure= |
15519 | fi | |
15520 | ||
15521 | # The recursion is here. | |
15522 | if test -n "$ac_sub_configure"; then | |
c906108c | 15523 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
15524 | case $cache_file in |
15525 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
15526 | *) # Relative name. |
15527 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 15528 | esac |
c906108c | 15529 | |
81ecdfbb RW |
15530 | { $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 |
15531 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 15532 | # The eval makes quoting arguments work. |
fdc59709 PB |
15533 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
15534 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 15535 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
15536 | fi |
15537 | ||
fdc59709 | 15538 | cd "$ac_popdir" |
c906108c SS |
15539 | done |
15540 | fi | |
81ecdfbb RW |
15541 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
15542 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
15543 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
15544 | fi | |
c906108c SS |
15545 | |
15546 | ||
15547 | exit 0 |