]>
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 [email protected] about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
81ecdfbb | 591 | enable_option_checking=no |
c971b7fa | 592 | ac_subst_vars='LTLIBOBJS |
81ecdfbb | 593 | LIBOBJS |
b292c783 JK |
594 | GCORE_TRANSFORM_NAME |
595 | GDB_TRANSFORM_NAME | |
81ecdfbb | 596 | GDB_NM_FILE |
393fd4c3 YQ |
597 | LTLIBBABELTRACE |
598 | LIBBABELTRACE | |
599 | HAVE_LIBBABELTRACE | |
81ecdfbb RW |
600 | frags |
601 | target_subdir | |
602 | CONFIG_UNINSTALL | |
603 | CONFIG_INSTALL | |
604 | CONFIG_CLEAN | |
605 | CONFIG_ALL | |
606 | CONFIG_SRCS | |
607 | CONFIG_DEPS | |
608 | CONFIG_OBS | |
609 | PROFILE_CFLAGS | |
610 | ENABLE_CFLAGS | |
611 | SIM_OBS | |
612 | SIM | |
613 | XMKMF | |
614 | GDBTK_SRC_DIR | |
615 | GDBTK_CFLAGS | |
616 | GDBTKLIBS | |
617 | X_LIBS | |
618 | X_LDFLAGS | |
619 | X_CFLAGS | |
620 | TK_XINCLUDES | |
621 | TK_DEPS | |
622 | TK_LIBRARY | |
623 | TK_INCLUDE | |
624 | TK_STUB_LIB_SPEC | |
625 | TK_STUB_LIB_FLAG | |
626 | TK_STUB_LIB_FILE | |
627 | TK_LIB_SPEC | |
628 | TK_LIB_FLAG | |
629 | TK_LIB_FILE | |
630 | TK_SRC_DIR | |
631 | TK_BIN_DIR | |
632 | TK_VERSION | |
633 | TCL_DEPS | |
634 | TCL_LIBRARY | |
635 | TCL_INCLUDE | |
636 | TCL_STUB_LIB_SPEC | |
637 | TCL_STUB_LIB_FLAG | |
638 | TCL_STUB_LIB_FILE | |
639 | TCL_LIB_SPEC | |
640 | TCL_LIB_FLAG | |
641 | TCL_LIB_FILE | |
642 | TCL_SRC_DIR | |
643 | TCL_BIN_DIR | |
644 | TCL_PATCH_LEVEL | |
645 | TCL_VERSION | |
646 | WIN32LDAPP | |
647 | GUI_CFLAGS_X | |
648 | LIBGUI | |
608e2dbb TT |
649 | LTLIBLZMA |
650 | LIBLZMA | |
651 | HAVE_LIBLZMA | |
81ecdfbb RW |
652 | WIN32LIBS |
653 | SER_HARDWIRE | |
654 | WERROR_CFLAGS | |
655 | WARN_CFLAGS | |
656 | SYSTEM_GDBINIT | |
81ecdfbb RW |
657 | TARGET_SYSTEM_ROOT |
658 | CONFIG_LDFLAGS | |
f6528abd | 659 | RDYNAMIC |
81ecdfbb | 660 | ALLOCA |
58bfce93 MM |
661 | LTLIBIPT |
662 | LIBIPT | |
663 | HAVE_LIBIPT | |
4df42755 DE |
664 | HAVE_GUILE_FALSE |
665 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
666 | GUILE_LIBS |
667 | GUILE_CPPFLAGS | |
e76c5d17 DE |
668 | GUILD_TARGET_FLAG |
669 | GUILD | |
ed3ef339 | 670 | pkg_config_prog_path |
4df42755 DE |
671 | HAVE_PYTHON_FALSE |
672 | HAVE_PYTHON_TRUE | |
ac534cba JB |
673 | PYTHON_LIBS |
674 | PYTHON_CPPFLAGS | |
81ecdfbb | 675 | PYTHON_CFLAGS |
ec685c5e | 676 | python_prog_path |
81ecdfbb RW |
677 | LTLIBEXPAT |
678 | LIBEXPAT | |
679 | HAVE_LIBEXPAT | |
b8e0a31c | 680 | JIT_READER_DIR |
f997c383 | 681 | TARGET_PTR |
39037522 | 682 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
683 | READLINE_CFLAGS |
684 | READLINE_DEPS | |
685 | READLINE | |
711a72d3 L |
686 | zlibinc |
687 | zlibdir | |
81ecdfbb RW |
688 | MIG |
689 | WINDRES | |
690 | DLLTOOL | |
c971b7fa | 691 | AR |
81ecdfbb RW |
692 | YFLAGS |
693 | YACC | |
c971b7fa | 694 | RANLIB |
81ecdfbb | 695 | LN_S |
c971b7fa PA |
696 | INSTALL_DATA |
697 | INSTALL_SCRIPT | |
698 | INSTALL_PROGRAM | |
699 | AWK | |
81ecdfbb RW |
700 | REPORT_BUGS_TEXI |
701 | REPORT_BUGS_TO | |
702 | PKGVERSION | |
b292c783 | 703 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
704 | TARGET_OBS |
705 | subdirs | |
706 | GDB_DATADIR | |
707 | DEBUGDIR | |
5048e516 JK |
708 | MAKEINFO_EXTRA_FLAGS |
709 | MAKEINFOFLAGS | |
710 | MAKEINFO | |
81ecdfbb RW |
711 | PACKAGE |
712 | GNULIB_STDINT_H | |
81ecdfbb RW |
713 | CATOBJEXT |
714 | GENCAT | |
715 | INSTOBJEXT | |
716 | DATADIRNAME | |
717 | CATALOGS | |
718 | POSUB | |
719 | GMSGFMT | |
720 | XGETTEXT | |
721 | INCINTL | |
722 | LIBINTL_DEP | |
723 | LIBINTL | |
724 | USE_NLS | |
725 | SET_MAKE | |
726 | GMAKE_FALSE | |
727 | GMAKE_TRUE | |
728 | MAKE | |
729 | CCDEPMODE | |
730 | DEPDIR | |
731 | am__leading_dot | |
3bc3d82a | 732 | COMPILER |
4869db5e RM |
733 | INSTALL_STRIP_PROGRAM |
734 | STRIP | |
735 | install_sh | |
81ecdfbb RW |
736 | target_os |
737 | target_vendor | |
738 | target_cpu | |
739 | target | |
740 | host_os | |
741 | host_vendor | |
742 | host_cpu | |
743 | host | |
744 | build_os | |
745 | build_vendor | |
746 | build_cpu | |
747 | build | |
c971b7fa PA |
748 | EGREP |
749 | GREP | |
750 | CPP | |
3bc3d82a PA |
751 | ac_ct_CXX |
752 | CXXFLAGS | |
753 | CXX | |
81ecdfbb RW |
754 | OBJEXT |
755 | EXEEXT | |
756 | ac_ct_CC | |
757 | CPPFLAGS | |
758 | LDFLAGS | |
759 | CFLAGS | |
760 | CC | |
761 | MAINT | |
762 | MAINTAINER_MODE_FALSE | |
763 | MAINTAINER_MODE_TRUE | |
764 | target_alias | |
765 | host_alias | |
766 | build_alias | |
767 | LIBS | |
768 | ECHO_T | |
769 | ECHO_N | |
770 | ECHO_C | |
771 | DEFS | |
772 | mandir | |
773 | localedir | |
774 | libdir | |
775 | psdir | |
776 | pdfdir | |
777 | dvidir | |
778 | htmldir | |
779 | infodir | |
780 | docdir | |
781 | oldincludedir | |
782 | includedir | |
783 | localstatedir | |
784 | sharedstatedir | |
785 | sysconfdir | |
786 | datadir | |
787 | datarootdir | |
788 | libexecdir | |
789 | sbindir | |
790 | bindir | |
791 | program_transform_name | |
792 | prefix | |
793 | exec_prefix | |
794 | PACKAGE_URL | |
795 | PACKAGE_BUGREPORT | |
796 | PACKAGE_STRING | |
797 | PACKAGE_VERSION | |
798 | PACKAGE_TARNAME | |
799 | PACKAGE_NAME | |
800 | PATH_SEPARATOR | |
801 | SHELL' | |
a4ce5b0d | 802 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
803 | ac_user_opts=' |
804 | enable_option_checking | |
805 | enable_maintainer_mode | |
da2f07f1 JK |
806 | enable_plugins |
807 | enable_largefile | |
3bc3d82a | 808 | enable_build_with_cxx |
81ecdfbb RW |
809 | with_separate_debug_dir |
810 | with_gdb_datadir | |
811 | with_relocated_sources | |
7349ff92 | 812 | with_auto_load_dir |
bccbefd2 | 813 | with_auto_load_safe_path |
81ecdfbb RW |
814 | enable_targets |
815 | enable_64_bit_bfd | |
816 | enable_gdbcli | |
817 | enable_gdbmi | |
818 | enable_tui | |
819 | enable_gdbtk | |
05e7c244 | 820 | with_libunwind_ia64 |
81ecdfbb RW |
821 | with_curses |
822 | enable_profiling | |
823 | with_pkgversion | |
824 | with_bugurl | |
711a72d3 | 825 | with_system_zlib |
81ecdfbb | 826 | with_libiconv_prefix |
478aac75 | 827 | with_iconv_bin |
81ecdfbb | 828 | with_system_readline |
b8e0a31c | 829 | with_jit_reader_dir |
81ecdfbb RW |
830 | with_expat |
831 | with_gnu_ld | |
832 | enable_rpath | |
833 | with_libexpat_prefix | |
834 | with_python | |
ed3ef339 | 835 | with_guile |
a8db4212 | 836 | enable_libmcheck |
58bfce93 MM |
837 | with_intel_pt |
838 | with_libipt_prefix | |
81ecdfbb RW |
839 | with_included_regex |
840 | with_sysroot | |
841 | with_system_gdbinit | |
842 | enable_werror | |
843 | enable_build_warnings | |
844 | enable_gdb_build_warnings | |
608e2dbb TT |
845 | with_lzma |
846 | with_liblzma_prefix | |
81ecdfbb RW |
847 | with_tcl |
848 | with_tk | |
849 | with_x | |
850 | enable_sim | |
851 | enable_multi_ice | |
496c0e1b | 852 | enable_gdbserver |
393fd4c3 YQ |
853 | with_babeltrace |
854 | with_libbabeltrace_prefix | |
81ecdfbb RW |
855 | ' |
856 | ac_precious_vars='build_alias | |
857 | host_alias | |
858 | target_alias | |
859 | CC | |
860 | CFLAGS | |
861 | LDFLAGS | |
862 | LIBS | |
863 | CPPFLAGS | |
3bc3d82a PA |
864 | CXX |
865 | CXXFLAGS | |
866 | CCC | |
81ecdfbb | 867 | CPP |
f06e05e0 JK |
868 | MAKEINFO |
869 | MAKEINFOFLAGS | |
81ecdfbb RW |
870 | YACC |
871 | YFLAGS | |
872 | XMKMF' | |
5ae98d25 | 873 | ac_subdirs_all='testsuite |
81ecdfbb RW |
874 | gdbtk |
875 | multi-ice | |
876 | gdbserver' | |
c906108c SS |
877 | |
878 | # Initialize some variables set by options. | |
bec39cab AC |
879 | ac_init_help= |
880 | ac_init_version=false | |
81ecdfbb RW |
881 | ac_unrecognized_opts= |
882 | ac_unrecognized_sep= | |
c906108c SS |
883 | # The variables have the same names as the options, with |
884 | # dashes changed to underlines. | |
bec39cab | 885 | cache_file=/dev/null |
c906108c | 886 | exec_prefix=NONE |
c906108c | 887 | no_create= |
c906108c SS |
888 | no_recursion= |
889 | prefix=NONE | |
890 | program_prefix=NONE | |
891 | program_suffix=NONE | |
892 | program_transform_name=s,x,x, | |
893 | silent= | |
894 | site= | |
895 | srcdir= | |
c906108c SS |
896 | verbose= |
897 | x_includes=NONE | |
898 | x_libraries=NONE | |
bec39cab AC |
899 | |
900 | # Installation directory options. | |
901 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
902 | # and all the variables that are supposed to be based on exec_prefix | |
903 | # by default will actually change. | |
904 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 905 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
906 | bindir='${exec_prefix}/bin' |
907 | sbindir='${exec_prefix}/sbin' | |
908 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
909 | datarootdir='${prefix}/share' |
910 | datadir='${datarootdir}' | |
c906108c SS |
911 | sysconfdir='${prefix}/etc' |
912 | sharedstatedir='${prefix}/com' | |
913 | localstatedir='${prefix}/var' | |
c906108c SS |
914 | includedir='${prefix}/include' |
915 | oldincludedir='/usr/include' | |
81ecdfbb RW |
916 | docdir='${datarootdir}/doc/${PACKAGE}' |
917 | infodir='${datarootdir}/info' | |
918 | htmldir='${docdir}' | |
919 | dvidir='${docdir}' | |
920 | pdfdir='${docdir}' | |
921 | psdir='${docdir}' | |
922 | libdir='${exec_prefix}/lib' | |
923 | localedir='${datarootdir}/locale' | |
924 | mandir='${datarootdir}/man' | |
c906108c | 925 | |
c906108c | 926 | ac_prev= |
81ecdfbb | 927 | ac_dashdash= |
c906108c SS |
928 | for ac_option |
929 | do | |
c906108c SS |
930 | # If the previous option needs an argument, assign it. |
931 | if test -n "$ac_prev"; then | |
81ecdfbb | 932 | eval $ac_prev=\$ac_option |
c906108c SS |
933 | ac_prev= |
934 | continue | |
935 | fi | |
936 | ||
81ecdfbb RW |
937 | case $ac_option in |
938 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
939 | *) ac_optarg=yes ;; | |
940 | esac | |
c906108c SS |
941 | |
942 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
943 | ||
81ecdfbb RW |
944 | case $ac_dashdash$ac_option in |
945 | --) | |
946 | ac_dashdash=yes ;; | |
c906108c SS |
947 | |
948 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
949 | ac_prev=bindir ;; | |
950 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 951 | bindir=$ac_optarg ;; |
c906108c SS |
952 | |
953 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 954 | ac_prev=build_alias ;; |
c906108c | 955 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 956 | build_alias=$ac_optarg ;; |
c906108c SS |
957 | |
958 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
959 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
960 | ac_prev=cache_file ;; | |
961 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
962 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
963 | cache_file=$ac_optarg ;; |
964 | ||
965 | --config-cache | -C) | |
966 | cache_file=config.cache ;; | |
c906108c | 967 | |
81ecdfbb | 968 | -datadir | --datadir | --datadi | --datad) |
c906108c | 969 | ac_prev=datadir ;; |
81ecdfbb | 970 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 971 | datadir=$ac_optarg ;; |
c906108c | 972 | |
81ecdfbb RW |
973 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
974 | | --dataroo | --dataro | --datar) | |
975 | ac_prev=datarootdir ;; | |
976 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
977 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
978 | datarootdir=$ac_optarg ;; | |
979 | ||
c906108c | 980 | -disable-* | --disable-*) |
81ecdfbb | 981 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 982 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
983 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
984 | as_fn_error "invalid feature name: $ac_useropt" | |
985 | ac_useropt_orig=$ac_useropt | |
986 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
987 | case $ac_user_opts in | |
988 | *" | |
989 | "enable_$ac_useropt" | |
990 | "*) ;; | |
991 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
992 | ac_unrecognized_sep=', ';; | |
993 | esac | |
994 | eval enable_$ac_useropt=no ;; | |
995 | ||
996 | -docdir | --docdir | --docdi | --doc | --do) | |
997 | ac_prev=docdir ;; | |
998 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
999 | docdir=$ac_optarg ;; | |
1000 | ||
1001 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1002 | ac_prev=dvidir ;; | |
1003 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1004 | dvidir=$ac_optarg ;; | |
c906108c SS |
1005 | |
1006 | -enable-* | --enable-*) | |
81ecdfbb | 1007 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1008 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1009 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1010 | as_fn_error "invalid feature name: $ac_useropt" | |
1011 | ac_useropt_orig=$ac_useropt | |
1012 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1013 | case $ac_user_opts in | |
1014 | *" | |
1015 | "enable_$ac_useropt" | |
1016 | "*) ;; | |
1017 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1018 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1019 | esac |
81ecdfbb | 1020 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1021 | |
1022 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1023 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1024 | | --exec | --exe | --ex) | |
1025 | ac_prev=exec_prefix ;; | |
1026 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1027 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1028 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1029 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1030 | |
1031 | -gas | --gas | --ga | --g) | |
1032 | # Obsolete; use --with-gas. | |
1033 | with_gas=yes ;; | |
1034 | ||
bec39cab AC |
1035 | -help | --help | --hel | --he | -h) |
1036 | ac_init_help=long ;; | |
1037 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1038 | ac_init_help=recursive ;; | |
1039 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1040 | ac_init_help=short ;; | |
c906108c SS |
1041 | |
1042 | -host | --host | --hos | --ho) | |
bec39cab | 1043 | ac_prev=host_alias ;; |
c906108c | 1044 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1045 | host_alias=$ac_optarg ;; |
c906108c | 1046 | |
81ecdfbb RW |
1047 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1048 | ac_prev=htmldir ;; | |
1049 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1050 | | --ht=*) | |
1051 | htmldir=$ac_optarg ;; | |
1052 | ||
c906108c SS |
1053 | -includedir | --includedir | --includedi | --included | --include \ |
1054 | | --includ | --inclu | --incl | --inc) | |
1055 | ac_prev=includedir ;; | |
1056 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1057 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1058 | includedir=$ac_optarg ;; |
c906108c SS |
1059 | |
1060 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1061 | ac_prev=infodir ;; | |
1062 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1063 | infodir=$ac_optarg ;; |
c906108c SS |
1064 | |
1065 | -libdir | --libdir | --libdi | --libd) | |
1066 | ac_prev=libdir ;; | |
1067 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1068 | libdir=$ac_optarg ;; |
c906108c SS |
1069 | |
1070 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1071 | | --libexe | --libex | --libe) | |
1072 | ac_prev=libexecdir ;; | |
1073 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1074 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1075 | libexecdir=$ac_optarg ;; |
c906108c | 1076 | |
81ecdfbb RW |
1077 | -localedir | --localedir | --localedi | --localed | --locale) |
1078 | ac_prev=localedir ;; | |
1079 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1080 | localedir=$ac_optarg ;; | |
1081 | ||
c906108c | 1082 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1083 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1084 | ac_prev=localstatedir ;; |
1085 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1086 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1087 | localstatedir=$ac_optarg ;; |
c906108c SS |
1088 | |
1089 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1090 | ac_prev=mandir ;; | |
1091 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1092 | mandir=$ac_optarg ;; |
c906108c SS |
1093 | |
1094 | -nfp | --nfp | --nf) | |
1095 | # Obsolete; use --without-fp. | |
1096 | with_fp=no ;; | |
1097 | ||
1098 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1099 | | --no-cr | --no-c | -n) |
c906108c SS |
1100 | no_create=yes ;; |
1101 | ||
1102 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1103 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1104 | no_recursion=yes ;; | |
1105 | ||
1106 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1107 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1108 | | --oldin | --oldi | --old | --ol | --o) | |
1109 | ac_prev=oldincludedir ;; | |
1110 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1111 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1112 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1113 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1114 | |
1115 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1116 | ac_prev=prefix ;; | |
1117 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1118 | prefix=$ac_optarg ;; |
c906108c SS |
1119 | |
1120 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1121 | | --program-pre | --program-pr | --program-p) | |
1122 | ac_prev=program_prefix ;; | |
1123 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1124 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1125 | program_prefix=$ac_optarg ;; |
c906108c SS |
1126 | |
1127 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1128 | | --program-suf | --program-su | --program-s) | |
1129 | ac_prev=program_suffix ;; | |
1130 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1131 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1132 | program_suffix=$ac_optarg ;; |
c906108c SS |
1133 | |
1134 | -program-transform-name | --program-transform-name \ | |
1135 | | --program-transform-nam | --program-transform-na \ | |
1136 | | --program-transform-n | --program-transform- \ | |
1137 | | --program-transform | --program-transfor \ | |
1138 | | --program-transfo | --program-transf \ | |
1139 | | --program-trans | --program-tran \ | |
1140 | | --progr-tra | --program-tr | --program-t) | |
1141 | ac_prev=program_transform_name ;; | |
1142 | -program-transform-name=* | --program-transform-name=* \ | |
1143 | | --program-transform-nam=* | --program-transform-na=* \ | |
1144 | | --program-transform-n=* | --program-transform-=* \ | |
1145 | | --program-transform=* | --program-transfor=* \ | |
1146 | | --program-transfo=* | --program-transf=* \ | |
1147 | | --program-trans=* | --program-tran=* \ | |
1148 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1149 | program_transform_name=$ac_optarg ;; |
c906108c | 1150 | |
81ecdfbb RW |
1151 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1152 | ac_prev=pdfdir ;; | |
1153 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1154 | pdfdir=$ac_optarg ;; | |
1155 | ||
1156 | -psdir | --psdir | --psdi | --psd | --ps) | |
1157 | ac_prev=psdir ;; | |
1158 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1159 | psdir=$ac_optarg ;; | |
1160 | ||
c906108c SS |
1161 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1162 | | -silent | --silent | --silen | --sile | --sil) | |
1163 | silent=yes ;; | |
1164 | ||
1165 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1166 | ac_prev=sbindir ;; | |
1167 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1168 | | --sbi=* | --sb=*) | |
bec39cab | 1169 | sbindir=$ac_optarg ;; |
c906108c SS |
1170 | |
1171 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1172 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1173 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1174 | | --sha | --sh) | |
1175 | ac_prev=sharedstatedir ;; | |
1176 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1177 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1178 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1179 | | --sha=* | --sh=*) | |
bec39cab | 1180 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1181 | |
1182 | -site | --site | --sit) | |
1183 | ac_prev=site ;; | |
1184 | -site=* | --site=* | --sit=*) | |
bec39cab | 1185 | site=$ac_optarg ;; |
3ace7edb | 1186 | |
c906108c SS |
1187 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1188 | ac_prev=srcdir ;; | |
1189 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1190 | srcdir=$ac_optarg ;; |
c906108c SS |
1191 | |
1192 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1193 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1194 | ac_prev=sysconfdir ;; | |
1195 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1196 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1197 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1198 | |
1199 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1200 | ac_prev=target_alias ;; |
c906108c | 1201 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1202 | target_alias=$ac_optarg ;; |
c906108c SS |
1203 | |
1204 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1205 | verbose=yes ;; | |
1206 | ||
bec39cab AC |
1207 | -version | --version | --versio | --versi | --vers | -V) |
1208 | ac_init_version=: ;; | |
c906108c SS |
1209 | |
1210 | -with-* | --with-*) | |
81ecdfbb | 1211 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1212 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1213 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1214 | as_fn_error "invalid package name: $ac_useropt" | |
1215 | ac_useropt_orig=$ac_useropt | |
1216 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1217 | case $ac_user_opts in | |
1218 | *" | |
1219 | "with_$ac_useropt" | |
1220 | "*) ;; | |
1221 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1222 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1223 | esac |
81ecdfbb | 1224 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1225 | |
1226 | -without-* | --without-*) | |
81ecdfbb | 1227 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1228 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1229 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1230 | as_fn_error "invalid package name: $ac_useropt" | |
1231 | ac_useropt_orig=$ac_useropt | |
1232 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1233 | case $ac_user_opts in | |
1234 | *" | |
1235 | "with_$ac_useropt" | |
1236 | "*) ;; | |
1237 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1238 | ac_unrecognized_sep=', ';; | |
1239 | esac | |
1240 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1241 | |
1242 | --x) | |
1243 | # Obsolete; use --with-x. | |
1244 | with_x=yes ;; | |
1245 | ||
1246 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1247 | | --x-incl | --x-inc | --x-in | --x-i) | |
1248 | ac_prev=x_includes ;; | |
1249 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1250 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1251 | x_includes=$ac_optarg ;; |
c906108c SS |
1252 | |
1253 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1254 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1255 | ac_prev=x_libraries ;; | |
1256 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1257 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1258 | x_libraries=$ac_optarg ;; |
c906108c | 1259 | |
81ecdfbb RW |
1260 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1261 | Try \`$0 --help' for more information." | |
c906108c SS |
1262 | ;; |
1263 | ||
bec39cab AC |
1264 | *=*) |
1265 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1266 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1267 | case $ac_envvar in #( |
1268 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1269 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1270 | esac | |
1271 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1272 | export $ac_envvar ;; |
1273 | ||
c906108c | 1274 | *) |
bec39cab | 1275 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1276 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1277 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1278 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1279 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1280 | ;; |
1281 | ||
1282 | esac | |
1283 | done | |
1284 | ||
1285 | if test -n "$ac_prev"; then | |
bec39cab | 1286 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1287 | as_fn_error "missing argument to $ac_option" |
c906108c | 1288 | fi |
c906108c | 1289 | |
81ecdfbb RW |
1290 | if test -n "$ac_unrecognized_opts"; then |
1291 | case $enable_option_checking in | |
1292 | no) ;; | |
1293 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1294 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1295 | esac |
81ecdfbb | 1296 | fi |
b4e70030 | 1297 | |
81ecdfbb RW |
1298 | # Check all directory arguments for consistency. |
1299 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1300 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1301 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1302 | libdir localedir mandir | |
b4e70030 | 1303 | do |
81ecdfbb RW |
1304 | eval ac_val=\$$ac_var |
1305 | # Remove trailing slashes. | |
1306 | case $ac_val in | |
1307 | */ ) | |
1308 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1309 | eval $ac_var=\$ac_val;; | |
1310 | esac | |
1311 | # Be sure to have absolute directory names. | |
b4e70030 | 1312 | case $ac_val in |
81ecdfbb RW |
1313 | [\\/$]* | ?:[\\/]* ) continue;; |
1314 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1315 | esac |
81ecdfbb | 1316 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1317 | done |
1318 | ||
bec39cab AC |
1319 | # There might be people who depend on the old broken behavior: `$host' |
1320 | # used to hold the argument of --host etc. | |
1321 | # FIXME: To remove some day. | |
1322 | build=$build_alias | |
1323 | host=$host_alias | |
1324 | target=$target_alias | |
1325 | ||
1326 | # FIXME: To remove some day. | |
1327 | if test "x$host_alias" != x; then | |
1328 | if test "x$build_alias" = x; then | |
1329 | cross_compiling=maybe | |
81ecdfbb | 1330 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1331 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1332 | elif test "x$build_alias" != "x$host_alias"; then | |
1333 | cross_compiling=yes | |
1334 | fi | |
1335 | fi | |
c906108c | 1336 | |
bec39cab AC |
1337 | ac_tool_prefix= |
1338 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1339 | ||
1340 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1341 | |
c906108c | 1342 | |
81ecdfbb RW |
1343 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1344 | ac_ls_di=`ls -di .` && | |
1345 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1346 | as_fn_error "working directory cannot be determined" | |
1347 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1348 | as_fn_error "pwd does not report name of working directory" | |
1349 | ||
1350 | ||
c906108c SS |
1351 | # Find the source files, if location was not specified. |
1352 | if test -z "$srcdir"; then | |
1353 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1354 | # Try the directory containing this script, then the parent directory. |
1355 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1356 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1357 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1358 | X"$as_myself" : 'X\(//\)$' \| \ | |
1359 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1360 | $as_echo X"$as_myself" | | |
1361 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1362 | s//\1/ | |
1363 | q | |
1364 | } | |
1365 | /^X\(\/\/\)[^/].*/{ | |
1366 | s//\1/ | |
1367 | q | |
1368 | } | |
1369 | /^X\(\/\/\)$/{ | |
1370 | s//\1/ | |
1371 | q | |
1372 | } | |
1373 | /^X\(\/\).*/{ | |
1374 | s//\1/ | |
1375 | q | |
1376 | } | |
1377 | s/.*/./; q'` | |
c906108c | 1378 | srcdir=$ac_confdir |
81ecdfbb | 1379 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1380 | srcdir=.. |
1381 | fi | |
1382 | else | |
1383 | ac_srcdir_defaulted=no | |
1384 | fi | |
81ecdfbb RW |
1385 | if test ! -r "$srcdir/$ac_unique_file"; then |
1386 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1387 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1388 | fi | |
1389 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1390 | ac_abs_confdir=`( | |
1391 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1392 | pwd)` | |
1393 | # When building in place, set srcdir=. | |
1394 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1395 | srcdir=. | |
1396 | fi | |
1397 | # Remove unnecessary trailing slashes from srcdir. | |
1398 | # Double slashes in file names in object file debugging info | |
1399 | # mess up M-x gdb in Emacs. | |
1400 | case $srcdir in | |
1401 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1402 | esac | |
1403 | for ac_var in $ac_precious_vars; do | |
1404 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1405 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1406 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1407 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1408 | done | |
c906108c | 1409 | |
bec39cab AC |
1410 | # |
1411 | # Report the --help message. | |
1412 | # | |
1413 | if test "$ac_init_help" = "long"; then | |
1414 | # Omit some internal or obsolete options to make the list less imposing. | |
1415 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1416 | cat <<_ACEOF | |
1417 | \`configure' configures this package to adapt to many kinds of systems. | |
1418 | ||
1419 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1420 | ||
1421 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1422 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1423 | ||
1424 | Defaults for the options are specified in brackets. | |
1425 | ||
1426 | Configuration: | |
1427 | -h, --help display this help and exit | |
1428 | --help=short display options specific to this package | |
1429 | --help=recursive display the short help of all the included packages | |
1430 | -V, --version display version information and exit | |
1431 | -q, --quiet, --silent do not print \`checking...' messages | |
1432 | --cache-file=FILE cache test results in FILE [disabled] | |
1433 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1434 | -n, --no-create do not create output files | |
1435 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1436 | ||
bec39cab AC |
1437 | Installation directories: |
1438 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1439 | [$ac_default_prefix] |
bec39cab | 1440 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1441 | [PREFIX] |
bec39cab AC |
1442 | |
1443 | By default, \`make install' will install all the files in | |
1444 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1445 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1446 | for instance \`--prefix=\$HOME'. | |
1447 | ||
1448 | For better control, use the options below. | |
1449 | ||
1450 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1451 | --bindir=DIR user executables [EPREFIX/bin] |
1452 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1453 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1454 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1455 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1456 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1457 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1458 | --includedir=DIR C header files [PREFIX/include] | |
1459 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1460 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1461 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1462 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1463 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1464 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1465 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1466 | --htmldir=DIR html documentation [DOCDIR] | |
1467 | --dvidir=DIR dvi documentation [DOCDIR] | |
1468 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1469 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1470 | _ACEOF |
1471 | ||
1472 | cat <<\_ACEOF | |
1473 | ||
9009e1ae MR |
1474 | Program names: |
1475 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1476 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1477 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1478 | ||
bec39cab AC |
1479 | X features: |
1480 | --x-includes=DIR X include files are in DIR | |
1481 | --x-libraries=DIR X library files are in DIR | |
1482 | ||
1483 | System types: | |
1484 | --build=BUILD configure for building on BUILD [guessed] | |
1485 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1486 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1487 | _ACEOF | |
1488 | fi | |
1489 | ||
1490 | if test -n "$ac_init_help"; then | |
1491 | ||
1492 | cat <<\_ACEOF | |
1493 | ||
1494 | Optional Features: | |
81ecdfbb | 1495 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1496 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1497 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1498 | --enable-maintainer-mode enable make rules and dependencies not useful |
1499 | (and sometimes confusing) to the casual installer | |
2974be62 | 1500 | --enable-plugins Enable support for plugins |
da2f07f1 | 1501 | --disable-largefile omit support for large files |
3bc3d82a | 1502 | --enable-build-with-cxx build with C++ compiler instead of C compiler |
a1220294 TT |
1503 | --enable-targets=TARGETS |
1504 | alternative target configurations | |
c0993dbe | 1505 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1506 | --disable-gdbcli disable command-line interface (CLI) |
1507 | --disable-gdbmi disable machine-interface (MI) | |
1508 | --enable-tui enable full-screen terminal user interface (TUI) | |
1509 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1510 | --enable-profiling enable profiling of GDB | |
3841debe | 1511 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1512 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1513 | --enable-werror treat compile warnings as errors |
32c1c914 | 1514 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1515 | --enable-gdb-build-warnings |
32c1c914 | 1516 | enable GDB specific build-time compiler warnings if |
a1220294 | 1517 | gcc is used |
32c1c914 | 1518 | --enable-sim link gdb with simulator |
bec39cab | 1519 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1520 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1521 | is auto) | |
bec39cab AC |
1522 | |
1523 | Optional Packages: | |
1524 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1525 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1526 | --with-separate-debug-dir=PATH |
32c1c914 | 1527 | look for global separate debug info in this path |
62e4f60c | 1528 | [LIBDIR/debug] |
b14b1491 TT |
1529 | --with-gdb-datadir=PATH look for global separate data files in this path |
1530 | [DATADIR/gdb] | |
29b0e8a2 | 1531 | --with-relocated-sources=PATH |
32c1c914 | 1532 | automatically relocate this path for source files |
7349ff92 | 1533 | --with-auto-load-dir=PATH |
aff139ff | 1534 | directories from which to load auto-loaded scripts |
1564a261 | 1535 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1536 | --with-auto-load-safe-path=PATH |
aff139ff | 1537 | directories safe to hold auto-loaded files |
7349ff92 | 1538 | [--with-auto-load-dir] |
bccbefd2 JK |
1539 | --without-auto-load-safe-path |
1540 | do not restrict auto-loaded files locations | |
05e7c244 | 1541 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1542 | --with-curses use the curses library instead of the termcap |
1543 | library | |
c16158bc JM |
1544 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1545 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1546 | --with-system-zlib use installed libz |
a1220294 TT |
1547 | --with-libiconv-prefix=DIR |
1548 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1549 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1550 | --with-system-readline use installed readline library |
b8e0a31c SD |
1551 | --with-jit-reader-dir=PATH |
1552 | directory to load the JIT readers from | |
5c39566f | 1553 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1554 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1555 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1556 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1557 | --with-python[=PYTHON] include python support |
1558 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1559 | --with-guile[=GUILE] include guile support |
1560 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
58bfce93 MM |
1561 | --with-intel-pt include Intel(R) Processor Trace support (auto/yes/no) |
1562 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib | |
1563 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
a1220294 TT |
1564 | --without-included-regex |
1565 | don't use included regex; this is the default on | |
1566 | systems with version 2 of the GNU C library (use | |
1567 | with caution on other system) | |
81ecdfbb | 1568 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1569 | --with-system-gdbinit=PATH |
32c1c914 | 1570 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1571 | --with-lzma support lzma compression (auto/yes/no) |
1572 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1573 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1574 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1575 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1576 | --with-x use the X Window System |
393fd4c3 YQ |
1577 | --with-babeltrace include babeltrace support (auto/yes/no) |
1578 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1579 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1580 | |
1581 | Some influential environment variables: | |
1582 | CC C compiler command | |
1583 | CFLAGS C compiler flags | |
1584 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1585 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1586 | LIBS libraries to pass to the linker, e.g. -l<library> |
1587 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1588 | you have headers in a nonstandard directory <include dir> | |
3bc3d82a PA |
1589 | CXX C++ compiler command |
1590 | CXXFLAGS C++ compiler flags | |
bec39cab | 1591 | CPP C preprocessor |
f06e05e0 JK |
1592 | MAKEINFO Parent configure detects if it is of sufficient version. |
1593 | MAKEINFOFLAGS | |
1594 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1595 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1596 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1597 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1598 | This script will default YFLAGS to the empty string to avoid a | |
1599 | default value of `-d' given by some make applications. | |
1600 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1601 | |
1602 | Use these variables to override the choices made by `configure' or to help | |
1603 | it to find libraries and programs with nonstandard names/locations. | |
1604 | ||
81ecdfbb | 1605 | Report bugs to the package provider. |
bec39cab | 1606 | _ACEOF |
81ecdfbb | 1607 | ac_status=$? |
bec39cab AC |
1608 | fi |
1609 | ||
1610 | if test "$ac_init_help" = "recursive"; then | |
1611 | # If there are subdirs, report their specific --help. | |
bec39cab | 1612 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1613 | test -d "$ac_dir" || |
1614 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1615 | continue | |
bec39cab AC |
1616 | ac_builddir=. |
1617 | ||
81ecdfbb RW |
1618 | case "$ac_dir" in |
1619 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1620 | *) | |
1621 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1622 | # A ".." for each directory in $ac_dir_suffix. | |
1623 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1624 | case $ac_top_builddir_sub in | |
1625 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1626 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1627 | esac ;; | |
1628 | esac | |
1629 | ac_abs_top_builddir=$ac_pwd | |
1630 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1631 | # for backward compatibility: | |
1632 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1633 | |
1634 | case $srcdir in | |
81ecdfbb | 1635 | .) # We are building in place. |
bec39cab | 1636 | ac_srcdir=. |
81ecdfbb RW |
1637 | ac_top_srcdir=$ac_top_builddir_sub |
1638 | ac_abs_top_srcdir=$ac_pwd ;; | |
1639 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1640 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1641 | ac_top_srcdir=$srcdir |
1642 | ac_abs_top_srcdir=$srcdir ;; | |
1643 | *) # Relative name. | |
1644 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1645 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1646 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1647 | esac |
81ecdfbb | 1648 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1649 | |
81ecdfbb RW |
1650 | cd "$ac_dir" || { ac_status=$?; continue; } |
1651 | # Check for guested configure. | |
1652 | if test -f "$ac_srcdir/configure.gnu"; then | |
1653 | echo && | |
1654 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1655 | elif test -f "$ac_srcdir/configure"; then | |
1656 | echo && | |
1657 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1658 | else |
81ecdfbb RW |
1659 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1660 | fi || ac_status=$? | |
1661 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1662 | done |
1663 | fi | |
1664 | ||
81ecdfbb | 1665 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1666 | if $ac_init_version; then |
1667 | cat <<\_ACEOF | |
81ecdfbb RW |
1668 | configure |
1669 | generated by GNU Autoconf 2.64 | |
bec39cab | 1670 | |
81ecdfbb | 1671 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1672 | This configure script is free software; the Free Software Foundation |
1673 | gives unlimited permission to copy, distribute and modify it. | |
1674 | _ACEOF | |
81ecdfbb | 1675 | exit |
bec39cab | 1676 | fi |
bec39cab | 1677 | |
81ecdfbb RW |
1678 | ## ------------------------ ## |
1679 | ## Autoconf initialization. ## | |
1680 | ## ------------------------ ## | |
bec39cab | 1681 | |
81ecdfbb RW |
1682 | # ac_fn_c_try_compile LINENO |
1683 | # -------------------------- | |
1684 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1685 | ac_fn_c_try_compile () | |
1686 | { | |
1687 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1688 | rm -f conftest.$ac_objext | |
1689 | if { { ac_try="$ac_compile" | |
1690 | case "(($ac_try" in | |
1691 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1692 | *) ac_try_echo=$ac_try;; | |
1693 | esac | |
1694 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1695 | $as_echo "$ac_try_echo"; } >&5 | |
1696 | (eval "$ac_compile") 2>conftest.err | |
1697 | ac_status=$? | |
1698 | if test -s conftest.err; then | |
1699 | grep -v '^ *+' conftest.err >conftest.er1 | |
1700 | cat conftest.er1 >&5 | |
1701 | mv -f conftest.er1 conftest.err | |
1702 | fi | |
1703 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1704 | test $ac_status = 0; } && { | |
1705 | test -z "$ac_c_werror_flag" || | |
1706 | test ! -s conftest.err | |
1707 | } && test -s conftest.$ac_objext; then : | |
1708 | ac_retval=0 | |
1709 | else | |
1710 | $as_echo "$as_me: failed program was:" >&5 | |
1711 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1712 | |
81ecdfbb RW |
1713 | ac_retval=1 |
1714 | fi | |
1715 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1716 | return $ac_retval | |
1717 | ||
1718 | } # ac_fn_c_try_compile | |
1719 | ||
3bc3d82a PA |
1720 | # ac_fn_cxx_try_compile LINENO |
1721 | # ---------------------------- | |
1722 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1723 | ac_fn_cxx_try_compile () | |
1724 | { | |
1725 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1726 | rm -f conftest.$ac_objext | |
1727 | if { { ac_try="$ac_compile" | |
1728 | case "(($ac_try" in | |
1729 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1730 | *) ac_try_echo=$ac_try;; | |
1731 | esac | |
1732 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1733 | $as_echo "$ac_try_echo"; } >&5 | |
1734 | (eval "$ac_compile") 2>conftest.err | |
1735 | ac_status=$? | |
1736 | if test -s conftest.err; then | |
1737 | grep -v '^ *+' conftest.err >conftest.er1 | |
1738 | cat conftest.er1 >&5 | |
1739 | mv -f conftest.er1 conftest.err | |
1740 | fi | |
1741 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1742 | test $ac_status = 0; } && { | |
1743 | test -z "$ac_cxx_werror_flag" || | |
1744 | test ! -s conftest.err | |
1745 | } && test -s conftest.$ac_objext; then : | |
1746 | ac_retval=0 | |
1747 | else | |
1748 | $as_echo "$as_me: failed program was:" >&5 | |
1749 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1750 | ||
1751 | ac_retval=1 | |
1752 | fi | |
1753 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1754 | return $ac_retval | |
1755 | ||
1756 | } # ac_fn_cxx_try_compile | |
1757 | ||
81ecdfbb RW |
1758 | # ac_fn_c_try_cpp LINENO |
1759 | # ---------------------- | |
1760 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1761 | ac_fn_c_try_cpp () | |
bec39cab | 1762 | { |
81ecdfbb RW |
1763 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1764 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1765 | case "(($ac_try" in | |
1766 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1767 | *) ac_try_echo=$ac_try;; | |
1768 | esac | |
1769 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1770 | $as_echo "$ac_try_echo"; } >&5 | |
1771 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1772 | ac_status=$? | |
1773 | if test -s conftest.err; then | |
1774 | grep -v '^ *+' conftest.err >conftest.er1 | |
1775 | cat conftest.er1 >&5 | |
1776 | mv -f conftest.er1 conftest.err | |
1777 | fi | |
1778 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1779 | test $ac_status = 0; } >/dev/null && { | |
1780 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1781 | test ! -s conftest.err | |
1782 | }; then : | |
1783 | ac_retval=0 | |
1784 | else | |
1785 | $as_echo "$as_me: failed program was:" >&5 | |
1786 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1787 | |
81ecdfbb RW |
1788 | ac_retval=1 |
1789 | fi | |
1790 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1791 | return $ac_retval | |
bec39cab | 1792 | |
81ecdfbb | 1793 | } # ac_fn_c_try_cpp |
bec39cab | 1794 | |
81ecdfbb RW |
1795 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1796 | # ------------------------------------------------------- | |
1797 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1798 | # the include files in INCLUDES and setting the cache variable VAR | |
1799 | # accordingly. | |
1800 | ac_fn_c_check_header_mongrel () | |
1801 | { | |
1802 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1803 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1805 | $as_echo_n "checking for $2... " >&6; } | |
1806 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1807 | $as_echo_n "(cached) " >&6 | |
1808 | fi | |
1809 | eval ac_res=\$$3 | |
1810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1811 | $as_echo "$ac_res" >&6; } | |
1812 | else | |
1813 | # Is the header compilable? | |
1814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1815 | $as_echo_n "checking $2 usability... " >&6; } | |
1816 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1817 | /* end confdefs.h. */ | |
1818 | $4 | |
1819 | #include <$2> | |
1820 | _ACEOF | |
1821 | if ac_fn_c_try_compile "$LINENO"; then : | |
1822 | ac_header_compiler=yes | |
1823 | else | |
1824 | ac_header_compiler=no | |
1825 | fi | |
1826 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1828 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1829 | |
81ecdfbb RW |
1830 | # Is the header present? |
1831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1832 | $as_echo_n "checking $2 presence... " >&6; } | |
1833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1834 | /* end confdefs.h. */ | |
1835 | #include <$2> | |
1836 | _ACEOF | |
1837 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1838 | ac_header_preproc=yes | |
1839 | else | |
1840 | ac_header_preproc=no | |
1841 | fi | |
1842 | rm -f conftest.err conftest.$ac_ext | |
1843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1844 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1845 | |
81ecdfbb RW |
1846 | # So? What about this header? |
1847 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1848 | yes:no: ) | |
1849 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1850 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1851 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1852 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1853 | ;; | |
1854 | no:yes:* ) | |
1855 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1856 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1857 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1858 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1859 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1860 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1861 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1862 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1863 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1864 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1865 | ;; | |
1866 | esac | |
1867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1868 | $as_echo_n "checking for $2... " >&6; } | |
1869 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1870 | $as_echo_n "(cached) " >&6 | |
1871 | else | |
1872 | eval "$3=\$ac_header_compiler" | |
1873 | fi | |
1874 | eval ac_res=\$$3 | |
1875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1876 | $as_echo "$ac_res" >&6; } | |
1877 | fi | |
1878 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1879 | |
81ecdfbb | 1880 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1881 | |
81ecdfbb RW |
1882 | # ac_fn_c_try_run LINENO |
1883 | # ---------------------- | |
1884 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1885 | # that executables *can* be run. | |
1886 | ac_fn_c_try_run () | |
1887 | { | |
1888 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1889 | if { { ac_try="$ac_link" | |
1890 | case "(($ac_try" in | |
1891 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1892 | *) ac_try_echo=$ac_try;; | |
1893 | esac | |
1894 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1895 | $as_echo "$ac_try_echo"; } >&5 | |
1896 | (eval "$ac_link") 2>&5 | |
1897 | ac_status=$? | |
1898 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1899 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1900 | { { case "(($ac_try" in | |
1901 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1902 | *) ac_try_echo=$ac_try;; | |
1903 | esac | |
1904 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1905 | $as_echo "$ac_try_echo"; } >&5 | |
1906 | (eval "$ac_try") 2>&5 | |
1907 | ac_status=$? | |
1908 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1909 | test $ac_status = 0; }; }; then : | |
1910 | ac_retval=0 | |
1911 | else | |
1912 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1913 | $as_echo "$as_me: failed program was:" >&5 | |
1914 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1915 | |
81ecdfbb RW |
1916 | ac_retval=$ac_status |
1917 | fi | |
1918 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1919 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1920 | return $ac_retval | |
bec39cab | 1921 | |
81ecdfbb | 1922 | } # ac_fn_c_try_run |
bec39cab | 1923 | |
81ecdfbb RW |
1924 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1925 | # ------------------------------------------------------- | |
1926 | # Tests whether HEADER exists and can be compiled using the include files in | |
1927 | # INCLUDES, setting the cache variable VAR accordingly. | |
1928 | ac_fn_c_check_header_compile () | |
1929 | { | |
1930 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1932 | $as_echo_n "checking for $2... " >&6; } | |
1933 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1934 | $as_echo_n "(cached) " >&6 | |
1935 | else | |
1936 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1937 | /* end confdefs.h. */ | |
1938 | $4 | |
1939 | #include <$2> | |
bec39cab | 1940 | _ACEOF |
81ecdfbb RW |
1941 | if ac_fn_c_try_compile "$LINENO"; then : |
1942 | eval "$3=yes" | |
1943 | else | |
1944 | eval "$3=no" | |
1945 | fi | |
1946 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1947 | fi | |
1948 | eval ac_res=\$$3 | |
1949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1950 | $as_echo "$ac_res" >&6; } | |
1951 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1952 | |
81ecdfbb | 1953 | } # ac_fn_c_check_header_compile |
bec39cab | 1954 | |
2974be62 AM |
1955 | # ac_fn_c_try_link LINENO |
1956 | # ----------------------- | |
1957 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1958 | ac_fn_c_try_link () | |
1959 | { | |
1960 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1961 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1962 | if { { ac_try="$ac_link" | |
1963 | case "(($ac_try" in | |
1964 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1965 | *) ac_try_echo=$ac_try;; | |
1966 | esac | |
1967 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1968 | $as_echo "$ac_try_echo"; } >&5 | |
1969 | (eval "$ac_link") 2>conftest.err | |
1970 | ac_status=$? | |
1971 | if test -s conftest.err; then | |
1972 | grep -v '^ *+' conftest.err >conftest.er1 | |
1973 | cat conftest.er1 >&5 | |
1974 | mv -f conftest.er1 conftest.err | |
1975 | fi | |
1976 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1977 | test $ac_status = 0; } && { | |
1978 | test -z "$ac_c_werror_flag" || | |
1979 | test ! -s conftest.err | |
1980 | } && test -s conftest$ac_exeext && { | |
1981 | test "$cross_compiling" = yes || | |
1982 | $as_test_x conftest$ac_exeext | |
1983 | }; then : | |
1984 | ac_retval=0 | |
1985 | else | |
1986 | $as_echo "$as_me: failed program was:" >&5 | |
1987 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1988 | ||
1989 | ac_retval=1 | |
1990 | fi | |
1991 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1992 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1993 | # interfere with the next link command; also delete a directory that is | |
1994 | # left behind by Apple's compiler. We do this before executing the actions. | |
1995 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1996 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1997 | return $ac_retval | |
1998 | ||
1999 | } # ac_fn_c_try_link | |
2000 | ||
81ecdfbb RW |
2001 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2002 | # -------------------------------------------- | |
2003 | # Tries to find the compile-time value of EXPR in a program that includes | |
2004 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2005 | # computed | |
2006 | ac_fn_c_compute_int () | |
2007 | { | |
2008 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2009 | if test "$cross_compiling" = yes; then | |
2010 | # Depending upon the size, compute the lo and hi bounds. | |
2011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2012 | /* end confdefs.h. */ | |
2013 | $4 | |
2014 | int | |
2015 | main () | |
2016 | { | |
2017 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2018 | test_array [0] = 0 | |
bec39cab | 2019 | |
81ecdfbb RW |
2020 | ; |
2021 | return 0; | |
2022 | } | |
2023 | _ACEOF | |
2024 | if ac_fn_c_try_compile "$LINENO"; then : | |
2025 | ac_lo=0 ac_mid=0 | |
2026 | while :; do | |
2027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2028 | /* end confdefs.h. */ | |
2029 | $4 | |
2030 | int | |
2031 | main () | |
2032 | { | |
2033 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2034 | test_array [0] = 0 | |
bec39cab | 2035 | |
81ecdfbb RW |
2036 | ; |
2037 | return 0; | |
2038 | } | |
2039 | _ACEOF | |
2040 | if ac_fn_c_try_compile "$LINENO"; then : | |
2041 | ac_hi=$ac_mid; break | |
2042 | else | |
2043 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2044 | if test $ac_lo -le $ac_mid; then | |
2045 | ac_lo= ac_hi= | |
2046 | break | |
2047 | fi | |
2048 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2049 | fi |
81ecdfbb RW |
2050 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2051 | done | |
c906108c | 2052 | else |
81ecdfbb RW |
2053 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2054 | /* end confdefs.h. */ | |
2055 | $4 | |
2056 | int | |
2057 | main () | |
2058 | { | |
2059 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2060 | test_array [0] = 0 | |
bec39cab | 2061 | |
81ecdfbb RW |
2062 | ; |
2063 | return 0; | |
2064 | } | |
2065 | _ACEOF | |
2066 | if ac_fn_c_try_compile "$LINENO"; then : | |
2067 | ac_hi=-1 ac_mid=-1 | |
2068 | while :; do | |
2069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2070 | /* end confdefs.h. */ | |
2071 | $4 | |
2072 | int | |
2073 | main () | |
2074 | { | |
2075 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2076 | test_array [0] = 0 | |
bec39cab | 2077 | |
81ecdfbb RW |
2078 | ; |
2079 | return 0; | |
2080 | } | |
2081 | _ACEOF | |
2082 | if ac_fn_c_try_compile "$LINENO"; then : | |
2083 | ac_lo=$ac_mid; break | |
2084 | else | |
2085 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2086 | if test $ac_mid -le $ac_hi; then | |
2087 | ac_lo= ac_hi= | |
2088 | break | |
2089 | fi | |
2090 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2091 | fi | |
2092 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2093 | done | |
2094 | else | |
2095 | ac_lo= ac_hi= | |
2096 | fi | |
2097 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2098 | fi | |
2099 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2100 | # Binary search between lo and hi bounds. | |
2101 | while test "x$ac_lo" != "x$ac_hi"; do | |
2102 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2104 | /* end confdefs.h. */ | |
2105 | $4 | |
2106 | int | |
2107 | main () | |
2108 | { | |
2109 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2110 | test_array [0] = 0 | |
bec39cab | 2111 | |
81ecdfbb RW |
2112 | ; |
2113 | return 0; | |
2114 | } | |
2115 | _ACEOF | |
2116 | if ac_fn_c_try_compile "$LINENO"; then : | |
2117 | ac_hi=$ac_mid | |
2118 | else | |
2119 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2120 | fi | |
2121 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2122 | done | |
2123 | case $ac_lo in #(( | |
2124 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2125 | '') ac_retval=1 ;; | |
2126 | esac | |
2127 | else | |
2128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2129 | /* end confdefs.h. */ | |
2130 | $4 | |
2131 | static long int longval () { return $2; } | |
2132 | static unsigned long int ulongval () { return $2; } | |
2133 | #include <stdio.h> | |
2134 | #include <stdlib.h> | |
2135 | int | |
2136 | main () | |
2137 | { | |
bec39cab | 2138 | |
81ecdfbb RW |
2139 | FILE *f = fopen ("conftest.val", "w"); |
2140 | if (! f) | |
2141 | return 1; | |
2142 | if (($2) < 0) | |
2143 | { | |
2144 | long int i = longval (); | |
2145 | if (i != ($2)) | |
2146 | return 1; | |
2147 | fprintf (f, "%ld", i); | |
2148 | } | |
2149 | else | |
2150 | { | |
2151 | unsigned long int i = ulongval (); | |
2152 | if (i != ($2)) | |
2153 | return 1; | |
2154 | fprintf (f, "%lu", i); | |
2155 | } | |
2156 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2157 | on some platforms. */ | |
2158 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2159 | |
81ecdfbb RW |
2160 | ; |
2161 | return 0; | |
2162 | } | |
2163 | _ACEOF | |
2164 | if ac_fn_c_try_run "$LINENO"; then : | |
2165 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2166 | else | |
2167 | ac_retval=1 | |
2168 | fi | |
2169 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2170 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2171 | rm -f conftest.val | |
bec39cab | 2172 | |
81ecdfbb RW |
2173 | fi |
2174 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2175 | return $ac_retval | |
bec39cab | 2176 | |
81ecdfbb | 2177 | } # ac_fn_c_compute_int |
bec39cab | 2178 | |
55a8c076 YQ |
2179 | # ac_fn_c_check_func LINENO FUNC VAR |
2180 | # ---------------------------------- | |
2181 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2182 | ac_fn_c_check_func () | |
81ecdfbb RW |
2183 | { |
2184 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2186 | $as_echo_n "checking for $2... " >&6; } | |
2187 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2188 | $as_echo_n "(cached) " >&6 | |
2189 | else | |
81ecdfbb RW |
2190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2191 | /* end confdefs.h. */ | |
55a8c076 YQ |
2192 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2193 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2194 | #define $2 innocuous_$2 | |
2195 | ||
2196 | /* System header to define __stub macros and hopefully few prototypes, | |
2197 | which can conflict with char $2 (); below. | |
2198 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2199 | <limits.h> exists even on freestanding compilers. */ | |
2200 | ||
2201 | #ifdef __STDC__ | |
2202 | # include <limits.h> | |
2203 | #else | |
2204 | # include <assert.h> | |
2205 | #endif | |
2206 | ||
2207 | #undef $2 | |
2208 | ||
2209 | /* Override any GCC internal prototype to avoid an error. | |
2210 | Use char because int might match the return type of a GCC | |
2211 | builtin and then its argument prototype would still apply. */ | |
2212 | #ifdef __cplusplus | |
2213 | extern "C" | |
2214 | #endif | |
2215 | char $2 (); | |
2216 | /* The GNU C library defines this for functions which it implements | |
2217 | to always fail with ENOSYS. Some functions are actually named | |
2218 | something starting with __ and the normal name is an alias. */ | |
2219 | #if defined __stub_$2 || defined __stub___$2 | |
2220 | choke me | |
2221 | #endif | |
2222 | ||
2223 | int | |
2224 | main () | |
2225 | { | |
2226 | return $2 (); | |
2227 | ; | |
2228 | return 0; | |
2229 | } | |
2230 | _ACEOF | |
2231 | if ac_fn_c_try_link "$LINENO"; then : | |
2232 | eval "$3=yes" | |
2233 | else | |
2234 | eval "$3=no" | |
2235 | fi | |
2236 | rm -f core conftest.err conftest.$ac_objext \ | |
2237 | conftest$ac_exeext conftest.$ac_ext | |
2238 | fi | |
2239 | eval ac_res=\$$3 | |
2240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2241 | $as_echo "$ac_res" >&6; } | |
2242 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2243 | ||
2244 | } # ac_fn_c_check_func | |
2245 | ||
07697489 PA |
2246 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2247 | # ------------------------------------------- | |
2248 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2249 | # variable VAR accordingly. | |
2250 | ac_fn_c_check_type () | |
2251 | { | |
2252 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2254 | $as_echo_n "checking for $2... " >&6; } | |
2255 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2256 | $as_echo_n "(cached) " >&6 | |
2257 | else | |
2258 | eval "$3=no" | |
2259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2260 | /* end confdefs.h. */ | |
2261 | $4 | |
2262 | int | |
2263 | main () | |
2264 | { | |
2265 | if (sizeof ($2)) | |
2266 | return 0; | |
2267 | ; | |
2268 | return 0; | |
2269 | } | |
2270 | _ACEOF | |
2271 | if ac_fn_c_try_compile "$LINENO"; then : | |
2272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2273 | /* end confdefs.h. */ | |
2274 | $4 | |
2275 | int | |
2276 | main () | |
2277 | { | |
2278 | if (sizeof (($2))) | |
2279 | return 0; | |
2280 | ; | |
2281 | return 0; | |
2282 | } | |
2283 | _ACEOF | |
2284 | if ac_fn_c_try_compile "$LINENO"; then : | |
2285 | ||
2286 | else | |
2287 | eval "$3=yes" | |
2288 | fi | |
2289 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2290 | fi | |
2291 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2292 | fi | |
2293 | eval ac_res=\$$3 | |
2294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2295 | $as_echo "$ac_res" >&6; } | |
2296 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2297 | ||
2298 | } # ac_fn_c_check_type | |
2299 | ||
770d76d7 PA |
2300 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2301 | # ------------------------------------ | |
2302 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2303 | ac_fn_c_check_decl () | |
2304 | { | |
2305 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2306 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2307 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2309 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2310 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2311 | $as_echo_n "(cached) " >&6 | |
2312 | else | |
2313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2314 | /* end confdefs.h. */ | |
2315 | $4 | |
2316 | int | |
2317 | main () | |
2318 | { | |
2319 | #ifndef $as_decl_name | |
2320 | #ifdef __cplusplus | |
2321 | (void) $as_decl_use; | |
2322 | #else | |
2323 | (void) $as_decl_name; | |
2324 | #endif | |
2325 | #endif | |
2326 | ||
2327 | ; | |
2328 | return 0; | |
2329 | } | |
2330 | _ACEOF | |
2331 | if ac_fn_c_try_compile "$LINENO"; then : | |
2332 | eval "$3=yes" | |
2333 | else | |
2334 | eval "$3=no" | |
2335 | fi | |
2336 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2337 | fi | |
2338 | eval ac_res=\$$3 | |
2339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2340 | $as_echo "$ac_res" >&6; } | |
2341 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2342 | ||
2343 | } # ac_fn_c_check_decl | |
2344 | ||
55a8c076 YQ |
2345 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2346 | # ---------------------------------------------------- | |
2347 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2348 | # INCLUDES, setting cache variable VAR accordingly. | |
2349 | ac_fn_c_check_member () | |
2350 | { | |
2351 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2353 | $as_echo_n "checking for $2.$3... " >&6; } | |
2354 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2355 | $as_echo_n "(cached) " >&6 | |
2356 | else | |
2357 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2358 | /* end confdefs.h. */ | |
2359 | $5 | |
2360 | int | |
2361 | main () | |
2362 | { | |
2363 | static $2 ac_aggr; | |
2364 | if (ac_aggr.$3) | |
2365 | return 0; | |
2366 | ; | |
2367 | return 0; | |
2368 | } | |
2369 | _ACEOF | |
2370 | if ac_fn_c_try_compile "$LINENO"; then : | |
2371 | eval "$4=yes" | |
2372 | else | |
2373 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2374 | /* end confdefs.h. */ | |
2375 | $5 | |
2376 | int | |
2377 | main () | |
2378 | { | |
2379 | static $2 ac_aggr; | |
2380 | if (sizeof ac_aggr.$3) | |
2381 | return 0; | |
2382 | ; | |
2383 | return 0; | |
2384 | } | |
2385 | _ACEOF | |
2386 | if ac_fn_c_try_compile "$LINENO"; then : | |
2387 | eval "$4=yes" | |
2388 | else | |
2389 | eval "$4=no" | |
2390 | fi | |
2391 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2392 | fi | |
2393 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2394 | fi | |
2395 | eval ac_res=\$$4 | |
2396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2397 | $as_echo "$ac_res" >&6; } | |
2398 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2399 | ||
2400 | } # ac_fn_c_check_member | |
54019719 PA |
2401 | |
2402 | # ac_fn_cxx_check_decl LINENO SYMBOL VAR | |
2403 | # -------------------------------------- | |
2404 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2405 | ac_fn_cxx_check_decl () | |
2406 | { | |
2407 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2408 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2409 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2411 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2412 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2413 | $as_echo_n "(cached) " >&6 | |
2414 | else | |
2415 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2416 | /* end confdefs.h. */ | |
2417 | $4 | |
2418 | int | |
2419 | main () | |
2420 | { | |
2421 | #ifndef $as_decl_name | |
2422 | #ifdef __cplusplus | |
2423 | (void) $as_decl_use; | |
2424 | #else | |
2425 | (void) $as_decl_name; | |
2426 | #endif | |
2427 | #endif | |
2428 | ||
2429 | ; | |
2430 | return 0; | |
2431 | } | |
2432 | _ACEOF | |
2433 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
2434 | eval "$3=yes" | |
2435 | else | |
2436 | eval "$3=no" | |
2437 | fi | |
2438 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2439 | fi | |
2440 | eval ac_res=\$$3 | |
2441 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2442 | $as_echo "$ac_res" >&6; } | |
2443 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2444 | ||
2445 | } # ac_fn_cxx_check_decl | |
81ecdfbb RW |
2446 | cat >config.log <<_ACEOF |
2447 | This file contains any messages produced by compilers while | |
2448 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2449 | |
81ecdfbb RW |
2450 | It was created by $as_me, which was |
2451 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2452 | |
81ecdfbb | 2453 | $ $0 $@ |
413ccac7 | 2454 | |
81ecdfbb RW |
2455 | _ACEOF |
2456 | exec 5>>config.log | |
2457 | { | |
2458 | cat <<_ASUNAME | |
2459 | ## --------- ## | |
2460 | ## Platform. ## | |
2461 | ## --------- ## | |
413ccac7 | 2462 | |
81ecdfbb RW |
2463 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2464 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2465 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2466 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2467 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2468 | |
81ecdfbb RW |
2469 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2470 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2471 | |
81ecdfbb RW |
2472 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2473 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2474 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2475 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2476 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2477 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2478 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2479 | |
81ecdfbb | 2480 | _ASUNAME |
bec39cab | 2481 | |
bec39cab AC |
2482 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2483 | for as_dir in $PATH | |
2484 | do | |
2485 | IFS=$as_save_IFS | |
2486 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2487 | $as_echo "PATH: $as_dir" |
2488 | done | |
2489 | IFS=$as_save_IFS | |
bec39cab | 2490 | |
81ecdfbb | 2491 | } >&5 |
bec39cab | 2492 | |
81ecdfbb | 2493 | cat >&5 <<_ACEOF |
bec39cab | 2494 | |
bec39cab | 2495 | |
81ecdfbb RW |
2496 | ## ----------- ## |
2497 | ## Core tests. ## | |
2498 | ## ----------- ## | |
2499 | ||
2500 | _ACEOF | |
2501 | ||
2502 | ||
2503 | # Keep a trace of the command line. | |
2504 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2505 | # Strip out --silent because we don't want to record it for future runs. | |
2506 | # Also quote any args containing shell meta-characters. | |
2507 | # Make two passes to allow for proper duplicate-argument suppression. | |
2508 | ac_configure_args= | |
2509 | ac_configure_args0= | |
2510 | ac_configure_args1= | |
2511 | ac_must_keep_next=false | |
2512 | for ac_pass in 1 2 | |
2513 | do | |
2514 | for ac_arg | |
2515 | do | |
2516 | case $ac_arg in | |
2517 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2518 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2519 | | -silent | --silent | --silen | --sile | --sil) | |
2520 | continue ;; | |
2521 | *\'*) | |
2522 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2523 | esac | |
2524 | case $ac_pass in | |
2525 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2526 | 2) | |
2527 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2528 | if test $ac_must_keep_next = true; then | |
2529 | ac_must_keep_next=false # Got value, back to normal. | |
2530 | else | |
2531 | case $ac_arg in | |
2532 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2533 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2534 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2535 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2536 | case "$ac_configure_args0 " in | |
2537 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2538 | esac | |
2539 | ;; | |
2540 | -* ) ac_must_keep_next=true ;; | |
2541 | esac | |
2542 | fi | |
2543 | as_fn_append ac_configure_args " '$ac_arg'" | |
2544 | ;; | |
2545 | esac | |
2546 | done | |
2547 | done | |
2548 | { ac_configure_args0=; unset ac_configure_args0;} | |
2549 | { ac_configure_args1=; unset ac_configure_args1;} | |
2550 | ||
2551 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2552 | # config.log. We remove comments because anyway the quotes in there | |
2553 | # would cause problems or look ugly. | |
2554 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2555 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2556 | trap 'exit_status=$? | |
2557 | # Save into config.log some information that might help in debugging. | |
2558 | { | |
2559 | echo | |
2560 | ||
2561 | cat <<\_ASBOX | |
2562 | ## ---------------- ## | |
2563 | ## Cache variables. ## | |
2564 | ## ---------------- ## | |
2565 | _ASBOX | |
2566 | echo | |
2567 | # The following way of writing the cache mishandles newlines in values, | |
2568 | ( | |
2569 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2570 | eval ac_val=\$$ac_var | |
2571 | case $ac_val in #( | |
2572 | *${as_nl}*) | |
2573 | case $ac_var in #( | |
2574 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2575 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2576 | esac | |
2577 | case $ac_var in #( | |
2578 | _ | IFS | as_nl) ;; #( | |
2579 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2580 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2581 | esac ;; | |
2582 | esac | |
2583 | done | |
2584 | (set) 2>&1 | | |
2585 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2586 | *${as_nl}ac_space=\ *) | |
2587 | sed -n \ | |
2588 | "s/'\''/'\''\\\\'\'''\''/g; | |
2589 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2590 | ;; #( | |
2591 | *) | |
2592 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2593 | ;; | |
2594 | esac | | |
2595 | sort | |
2596 | ) | |
2597 | echo | |
2598 | ||
2599 | cat <<\_ASBOX | |
2600 | ## ----------------- ## | |
2601 | ## Output variables. ## | |
2602 | ## ----------------- ## | |
2603 | _ASBOX | |
2604 | echo | |
2605 | for ac_var in $ac_subst_vars | |
2606 | do | |
2607 | eval ac_val=\$$ac_var | |
2608 | case $ac_val in | |
2609 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2610 | esac | |
2611 | $as_echo "$ac_var='\''$ac_val'\''" | |
2612 | done | sort | |
2613 | echo | |
2614 | ||
2615 | if test -n "$ac_subst_files"; then | |
2616 | cat <<\_ASBOX | |
2617 | ## ------------------- ## | |
2618 | ## File substitutions. ## | |
2619 | ## ------------------- ## | |
2620 | _ASBOX | |
2621 | echo | |
2622 | for ac_var in $ac_subst_files | |
2623 | do | |
2624 | eval ac_val=\$$ac_var | |
2625 | case $ac_val in | |
2626 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2627 | esac | |
2628 | $as_echo "$ac_var='\''$ac_val'\''" | |
2629 | done | sort | |
2630 | echo | |
2631 | fi | |
2632 | ||
2633 | if test -s confdefs.h; then | |
2634 | cat <<\_ASBOX | |
2635 | ## ----------- ## | |
2636 | ## confdefs.h. ## | |
2637 | ## ----------- ## | |
2638 | _ASBOX | |
2639 | echo | |
2640 | cat confdefs.h | |
2641 | echo | |
2642 | fi | |
2643 | test "$ac_signal" != 0 && | |
2644 | $as_echo "$as_me: caught signal $ac_signal" | |
2645 | $as_echo "$as_me: exit $exit_status" | |
2646 | } >&5 | |
2647 | rm -f core *.core core.conftest.* && | |
2648 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2649 | exit $exit_status | |
2650 | ' 0 | |
2651 | for ac_signal in 1 2 13 15; do | |
2652 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2653 | done | |
2654 | ac_signal=0 | |
2655 | ||
2656 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2657 | rm -f -r conftest* confdefs.h | |
2658 | ||
2659 | $as_echo "/* confdefs.h */" > confdefs.h | |
2660 | ||
2661 | # Predefined preprocessor variables. | |
2662 | ||
2663 | cat >>confdefs.h <<_ACEOF | |
2664 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2665 | _ACEOF | |
2666 | ||
2667 | cat >>confdefs.h <<_ACEOF | |
2668 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2669 | _ACEOF | |
2670 | ||
2671 | cat >>confdefs.h <<_ACEOF | |
2672 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2673 | _ACEOF | |
2674 | ||
2675 | cat >>confdefs.h <<_ACEOF | |
2676 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2677 | _ACEOF | |
2678 | ||
2679 | cat >>confdefs.h <<_ACEOF | |
2680 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2681 | _ACEOF | |
2682 | ||
2683 | cat >>confdefs.h <<_ACEOF | |
2684 | #define PACKAGE_URL "$PACKAGE_URL" | |
2685 | _ACEOF | |
2686 | ||
2687 | ||
2688 | # Let the site file select an alternate cache file if it wants to. | |
2689 | # Prefer an explicitly selected file to automatically selected ones. | |
2690 | ac_site_file1=NONE | |
2691 | ac_site_file2=NONE | |
2692 | if test -n "$CONFIG_SITE"; then | |
2693 | ac_site_file1=$CONFIG_SITE | |
2694 | elif test "x$prefix" != xNONE; then | |
2695 | ac_site_file1=$prefix/share/config.site | |
2696 | ac_site_file2=$prefix/etc/config.site | |
2697 | else | |
2698 | ac_site_file1=$ac_default_prefix/share/config.site | |
2699 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2700 | fi | |
2701 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2702 | do | |
2703 | test "x$ac_site_file" = xNONE && continue | |
2704 | if test -r "$ac_site_file"; then | |
2705 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2706 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2707 | sed 's/^/| /' "$ac_site_file" >&5 | |
2708 | . "$ac_site_file" | |
2709 | fi | |
2710 | done | |
2711 | ||
2712 | if test -r "$cache_file"; then | |
2713 | # Some versions of bash will fail to source /dev/null (special | |
2714 | # files actually), so we avoid doing that. | |
2715 | if test -f "$cache_file"; then | |
2716 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2717 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2718 | case $cache_file in | |
2719 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2720 | *) . "./$cache_file";; | |
2721 | esac | |
2722 | fi | |
2723 | else | |
2724 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2725 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2726 | >$cache_file | |
bec39cab AC |
2727 | fi |
2728 | ||
81ecdfbb RW |
2729 | # Check that the precious variables saved in the cache have kept the same |
2730 | # value. | |
2731 | ac_cache_corrupted=false | |
2732 | for ac_var in $ac_precious_vars; do | |
2733 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2734 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2735 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2736 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2737 | case $ac_old_set,$ac_new_set in | |
2738 | set,) | |
2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2740 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2741 | ac_cache_corrupted=: ;; | |
2742 | ,set) | |
2743 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2744 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2745 | ac_cache_corrupted=: ;; | |
2746 | ,);; | |
2747 | *) | |
2748 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2749 | # differences in whitespace do not lead to failure. | |
2750 | ac_old_val_w=`echo x $ac_old_val` | |
2751 | ac_new_val_w=`echo x $ac_new_val` | |
2752 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2753 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2754 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2755 | ac_cache_corrupted=: | |
2756 | else | |
2757 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2758 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2759 | eval $ac_var=\$ac_old_val | |
2760 | fi | |
2761 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2762 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2763 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2764 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2765 | fi;; | |
2766 | esac | |
2767 | # Pass precious variables to config.status. | |
2768 | if test "$ac_new_set" = set; then | |
2769 | case $ac_new_val in | |
2770 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2771 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2772 | esac | |
2773 | case " $ac_configure_args " in | |
2774 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2775 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2776 | esac | |
2777 | fi | |
2778 | done | |
2779 | if $ac_cache_corrupted; then | |
2780 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2781 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2782 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2783 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2784 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2785 | fi | |
2786 | ## -------------------- ## | |
2787 | ## Main body of script. ## | |
2788 | ## -------------------- ## | |
2789 | ||
2790 | ac_ext=c | |
2791 | ac_cpp='$CPP $CPPFLAGS' | |
2792 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2793 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2794 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2795 | ||
2796 | ||
2797 | ||
2798 | ||
2799 | ||
2800 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2801 | ||
2802 | ||
2803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2804 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2805 | # Check whether --enable-maintainer-mode was given. | |
2806 | if test "${enable_maintainer_mode+set}" = set; then : | |
2807 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2808 | else | |
2809 | USE_MAINTAINER_MODE=no | |
2810 | fi | |
2811 | ||
2812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2813 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2814 | if test $USE_MAINTAINER_MODE = yes; then | |
2815 | MAINTAINER_MODE_TRUE= | |
2816 | MAINTAINER_MODE_FALSE='#' | |
2817 | else | |
2818 | MAINTAINER_MODE_TRUE='#' | |
2819 | MAINTAINER_MODE_FALSE= | |
2820 | fi | |
2821 | ||
2822 | MAINT=$MAINTAINER_MODE_TRUE | |
2823 | ||
2824 | ||
2825 | ||
17ef446e | 2826 | # Set the 'development' global. |
270c9937 | 2827 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2828 | |
81ecdfbb RW |
2829 | ac_ext=c |
2830 | ac_cpp='$CPP $CPPFLAGS' | |
2831 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2832 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2833 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2834 | if test -n "$ac_tool_prefix"; then | |
2835 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2836 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2838 | $as_echo_n "checking for $ac_word... " >&6; } | |
2839 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2840 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2841 | else |
2842 | if test -n "$CC"; then | |
2843 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2844 | else | |
bec39cab AC |
2845 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2846 | for as_dir in $PATH | |
2847 | do | |
2848 | IFS=$as_save_IFS | |
2849 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2850 | for ac_exec_ext in '' $ac_executable_extensions; do |
2851 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2852 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2853 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2854 | break 2 |
2855 | fi | |
2856 | done | |
81ecdfbb RW |
2857 | done |
2858 | IFS=$as_save_IFS | |
bec39cab | 2859 | |
c906108c SS |
2860 | fi |
2861 | fi | |
bec39cab | 2862 | CC=$ac_cv_prog_CC |
c906108c | 2863 | if test -n "$CC"; then |
81ecdfbb RW |
2864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2865 | $as_echo "$CC" >&6; } | |
c906108c | 2866 | else |
81ecdfbb RW |
2867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2868 | $as_echo "no" >&6; } | |
c906108c SS |
2869 | fi |
2870 | ||
81ecdfbb | 2871 | |
b4e70030 JB |
2872 | fi |
2873 | if test -z "$ac_cv_prog_CC"; then | |
2874 | ac_ct_CC=$CC | |
81ecdfbb RW |
2875 | # Extract the first word of "gcc", so it can be a program name with args. |
2876 | set dummy gcc; ac_word=$2 | |
2877 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2878 | $as_echo_n "checking for $ac_word... " >&6; } | |
2879 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2880 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2881 | else |
2882 | if test -n "$ac_ct_CC"; then | |
2883 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2884 | else | |
2885 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2886 | for as_dir in $PATH | |
2887 | do | |
2888 | IFS=$as_save_IFS | |
2889 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2890 | for ac_exec_ext in '' $ac_executable_extensions; do |
2891 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2892 | ac_cv_prog_ac_ct_CC="gcc" | |
2893 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2894 | break 2 |
4e8d927d | 2895 | fi |
b4e70030 | 2896 | done |
81ecdfbb RW |
2897 | done |
2898 | IFS=$as_save_IFS | |
b4e70030 JB |
2899 | |
2900 | fi | |
2901 | fi | |
2902 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2903 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2905 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2906 | else |
81ecdfbb RW |
2907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2908 | $as_echo "no" >&6; } | |
b4e70030 JB |
2909 | fi |
2910 | ||
81ecdfbb RW |
2911 | if test "x$ac_ct_CC" = x; then |
2912 | CC="" | |
2913 | else | |
2914 | case $cross_compiling:$ac_tool_warned in | |
2915 | yes:) | |
2916 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2917 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2918 | ac_tool_warned=yes ;; | |
2919 | esac | |
2920 | CC=$ac_ct_CC | |
2921 | fi | |
b4e70030 JB |
2922 | else |
2923 | CC="$ac_cv_prog_CC" | |
2924 | fi | |
2925 | ||
c906108c | 2926 | if test -z "$CC"; then |
81ecdfbb RW |
2927 | if test -n "$ac_tool_prefix"; then |
2928 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2929 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2931 | $as_echo_n "checking for $ac_word... " >&6; } | |
2932 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2933 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2934 | else |
2935 | if test -n "$CC"; then | |
2936 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2937 | else | |
bec39cab AC |
2938 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2939 | for as_dir in $PATH | |
2940 | do | |
2941 | IFS=$as_save_IFS | |
2942 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2943 | for ac_exec_ext in '' $ac_executable_extensions; do |
2944 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2945 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2946 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2947 | break 2 |
2948 | fi | |
2949 | done | |
81ecdfbb RW |
2950 | done |
2951 | IFS=$as_save_IFS | |
2952 | ||
2953 | fi | |
2954 | fi | |
2955 | CC=$ac_cv_prog_CC | |
2956 | if test -n "$CC"; then | |
2957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2958 | $as_echo "$CC" >&6; } | |
2959 | else | |
2960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2961 | $as_echo "no" >&6; } | |
2962 | fi | |
2963 | ||
2964 | ||
2965 | fi | |
2966 | fi | |
2967 | if test -z "$CC"; then | |
2968 | # Extract the first word of "cc", so it can be a program name with args. | |
2969 | set dummy cc; ac_word=$2 | |
2970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2971 | $as_echo_n "checking for $ac_word... " >&6; } | |
2972 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2973 | $as_echo_n "(cached) " >&6 | |
2974 | else | |
2975 | if test -n "$CC"; then | |
2976 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2977 | else | |
2978 | ac_prog_rejected=no | |
2979 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2980 | for as_dir in $PATH | |
2981 | do | |
2982 | IFS=$as_save_IFS | |
2983 | test -z "$as_dir" && as_dir=. | |
2984 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2985 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2986 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2987 | ac_prog_rejected=yes | |
2988 | continue | |
2989 | fi | |
2990 | ac_cv_prog_CC="cc" | |
2991 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2992 | break 2 | |
2993 | fi | |
2994 | done | |
2995 | done | |
2996 | IFS=$as_save_IFS | |
bec39cab | 2997 | |
c906108c SS |
2998 | if test $ac_prog_rejected = yes; then |
2999 | # We found a bogon in the path, so make sure we never use it. | |
3000 | set dummy $ac_cv_prog_CC | |
3001 | shift | |
bec39cab | 3002 | if test $# != 0; then |
c906108c SS |
3003 | # We chose a different compiler from the bogus one. |
3004 | # However, it has the same basename, so the bogon will be chosen | |
3005 | # first if we set CC to just the basename; use the full file name. | |
3006 | shift | |
bec39cab | 3007 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3008 | fi |
3009 | fi | |
3010 | fi | |
3011 | fi | |
bec39cab | 3012 | CC=$ac_cv_prog_CC |
c906108c | 3013 | if test -n "$CC"; then |
81ecdfbb RW |
3014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3015 | $as_echo "$CC" >&6; } | |
c906108c | 3016 | else |
81ecdfbb RW |
3017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3018 | $as_echo "no" >&6; } | |
c906108c SS |
3019 | fi |
3020 | ||
81ecdfbb | 3021 | |
bec39cab AC |
3022 | fi |
3023 | if test -z "$CC"; then | |
3024 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3025 | for ac_prog in cl.exe |
bec39cab AC |
3026 | do |
3027 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3028 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3030 | $as_echo_n "checking for $ac_word... " >&6; } | |
3031 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3032 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
3033 | else |
3034 | if test -n "$CC"; then | |
3035 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3036 | else | |
bec39cab AC |
3037 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3038 | for as_dir in $PATH | |
3039 | do | |
3040 | IFS=$as_save_IFS | |
3041 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3042 | for ac_exec_ext in '' $ac_executable_extensions; do |
3043 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3044 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3045 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3046 | break 2 |
3047 | fi | |
3048 | done | |
81ecdfbb RW |
3049 | done |
3050 | IFS=$as_save_IFS | |
bec39cab | 3051 | |
c906108c SS |
3052 | fi |
3053 | fi | |
bec39cab | 3054 | CC=$ac_cv_prog_CC |
c906108c | 3055 | if test -n "$CC"; then |
81ecdfbb RW |
3056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3057 | $as_echo "$CC" >&6; } | |
c906108c | 3058 | else |
81ecdfbb RW |
3059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3060 | $as_echo "no" >&6; } | |
c906108c | 3061 | fi |
bec39cab | 3062 | |
81ecdfbb | 3063 | |
bec39cab AC |
3064 | test -n "$CC" && break |
3065 | done | |
3066 | fi | |
3067 | if test -z "$CC"; then | |
3068 | ac_ct_CC=$CC | |
81ecdfbb | 3069 | for ac_prog in cl.exe |
bec39cab AC |
3070 | do |
3071 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3072 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3074 | $as_echo_n "checking for $ac_word... " >&6; } | |
3075 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3076 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3077 | else |
3078 | if test -n "$ac_ct_CC"; then | |
3079 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3080 | else | |
3081 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3082 | for as_dir in $PATH | |
3083 | do | |
3084 | IFS=$as_save_IFS | |
3085 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3086 | for ac_exec_ext in '' $ac_executable_extensions; do |
3087 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3088 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3089 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3090 | break 2 |
c906108c | 3091 | fi |
bec39cab | 3092 | done |
81ecdfbb RW |
3093 | done |
3094 | IFS=$as_save_IFS | |
bec39cab AC |
3095 | |
3096 | fi | |
3097 | fi | |
3098 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3099 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3101 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3102 | else |
81ecdfbb RW |
3103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3104 | $as_echo "no" >&6; } | |
c906108c SS |
3105 | fi |
3106 | ||
81ecdfbb | 3107 | |
bec39cab AC |
3108 | test -n "$ac_ct_CC" && break |
3109 | done | |
c906108c | 3110 | |
81ecdfbb RW |
3111 | if test "x$ac_ct_CC" = x; then |
3112 | CC="" | |
3113 | else | |
3114 | case $cross_compiling:$ac_tool_warned in | |
3115 | yes:) | |
3116 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3117 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3118 | ac_tool_warned=yes ;; | |
3119 | esac | |
3120 | CC=$ac_ct_CC | |
3121 | fi | |
bec39cab AC |
3122 | fi |
3123 | ||
3124 | fi | |
3125 | ||
3126 | ||
81ecdfbb RW |
3127 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3128 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3129 | as_fn_error "no acceptable C compiler found in \$PATH | |
3130 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3131 | |
3132 | # Provide some information about the compiler. | |
81ecdfbb RW |
3133 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3134 | set X $ac_compile | |
3135 | ac_compiler=$2 | |
3136 | for ac_option in --version -v -V -qversion; do | |
3137 | { { ac_try="$ac_compiler $ac_option >&5" | |
3138 | case "(($ac_try" in | |
3139 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3140 | *) ac_try_echo=$ac_try;; | |
3141 | esac | |
3142 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3143 | $as_echo "$ac_try_echo"; } >&5 | |
3144 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3145 | ac_status=$? |
81ecdfbb RW |
3146 | if test -s conftest.err; then |
3147 | sed '10a\ | |
3148 | ... rest of stderr output deleted ... | |
3149 | 10q' conftest.err >conftest.er1 | |
3150 | cat conftest.er1 >&5 | |
3151 | rm -f conftest.er1 conftest.err | |
3152 | fi | |
3153 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3154 | test $ac_status = 0; } | |
3155 | done | |
bec39cab | 3156 | |
81ecdfbb | 3157 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3158 | /* end confdefs.h. */ |
3159 | ||
3160 | int | |
3161 | main () | |
3162 | { | |
3163 | ||
3164 | ; | |
3165 | return 0; | |
3166 | } | |
3167 | _ACEOF | |
3168 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3169 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3170 | # Try to create an executable without -o first, disregard a.out. |
3171 | # It will help us diagnose broken compilers, and finding out an intuition | |
3172 | # of exeext. | |
81ecdfbb RW |
3173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3174 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3175 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3176 | ||
3177 | # The possible output files: | |
3178 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3179 | ||
3180 | ac_rmfiles= | |
3181 | for ac_file in $ac_files | |
3182 | do | |
3183 | case $ac_file in | |
3184 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3185 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3186 | esac | |
3187 | done | |
3188 | rm -f $ac_rmfiles | |
3189 | ||
3190 | if { { ac_try="$ac_link_default" | |
3191 | case "(($ac_try" in | |
3192 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3193 | *) ac_try_echo=$ac_try;; | |
3194 | esac | |
3195 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3196 | $as_echo "$ac_try_echo"; } >&5 | |
3197 | (eval "$ac_link_default") 2>&5 | |
3198 | ac_status=$? | |
3199 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3200 | test $ac_status = 0; }; then : | |
3201 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3202 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3203 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3204 | # so that the user can short-circuit this test for compilers unknown to | |
3205 | # Autoconf. | |
3206 | for ac_file in $ac_files '' | |
bec39cab AC |
3207 | do |
3208 | test -f "$ac_file" || continue | |
3209 | case $ac_file in | |
81ecdfbb | 3210 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3211 | ;; |
3212 | [ab].out ) | |
3213 | # We found the default executable, but exeext='' is most | |
3214 | # certainly right. | |
3215 | break;; | |
3216 | *.* ) | |
81ecdfbb RW |
3217 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3218 | then :; else | |
3219 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3220 | fi | |
3221 | # We set ac_cv_exeext here because the later test for it is not | |
3222 | # safe: cross compilers may not add the suffix if given an `-o' | |
3223 | # argument, so we may need to know it at that point already. | |
3224 | # Even if this section looks crufty: it has the advantage of | |
3225 | # actually working. | |
b4e70030 JB |
3226 | break;; |
3227 | * ) | |
3228 | break;; | |
bec39cab AC |
3229 | esac |
3230 | done | |
81ecdfbb RW |
3231 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3232 | ||
bec39cab | 3233 | else |
81ecdfbb RW |
3234 | ac_file='' |
3235 | fi | |
3236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3237 | $as_echo "$ac_file" >&6; } | |
3238 | if test -z "$ac_file"; then : | |
3239 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3240 | sed 's/^/| /' conftest.$ac_ext >&5 |
3241 | ||
81ecdfbb RW |
3242 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3243 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3244 | { as_fn_set_status 77 | |
3245 | as_fn_error "C compiler cannot create executables | |
3246 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3247 | fi |
b4e70030 | 3248 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3249 | |
81ecdfbb | 3250 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3251 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3253 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3254 | # If not cross compiling, check that we can run a simple program. |
3255 | if test "$cross_compiling" != yes; then | |
3256 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3257 | { { case "(($ac_try" in |
3258 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3259 | *) ac_try_echo=$ac_try;; | |
3260 | esac | |
3261 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3262 | $as_echo "$ac_try_echo"; } >&5 | |
3263 | (eval "$ac_try") 2>&5 | |
bec39cab | 3264 | ac_status=$? |
81ecdfbb RW |
3265 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3266 | test $ac_status = 0; }; }; then | |
bec39cab | 3267 | cross_compiling=no |
c906108c | 3268 | else |
bec39cab AC |
3269 | if test "$cross_compiling" = maybe; then |
3270 | cross_compiling=yes | |
3271 | else | |
81ecdfbb RW |
3272 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3273 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3274 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3275 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3276 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3277 | fi |
c906108c | 3278 | fi |
bec39cab | 3279 | fi |
81ecdfbb RW |
3280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3281 | $as_echo "yes" >&6; } | |
bec39cab | 3282 | |
81ecdfbb | 3283 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3284 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3285 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3286 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3288 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3290 | $as_echo "$cross_compiling" >&6; } | |
3291 | ||
3292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3293 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3294 | if { { ac_try="$ac_link" | |
3295 | case "(($ac_try" in | |
3296 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3297 | *) ac_try_echo=$ac_try;; | |
3298 | esac | |
3299 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3300 | $as_echo "$ac_try_echo"; } >&5 | |
3301 | (eval "$ac_link") 2>&5 | |
bec39cab | 3302 | ac_status=$? |
81ecdfbb RW |
3303 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3304 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3305 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3306 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3307 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3308 | # `rm'. | |
3309 | for ac_file in conftest.exe conftest conftest.*; do | |
3310 | test -f "$ac_file" || continue | |
3311 | case $ac_file in | |
81ecdfbb | 3312 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3313 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3314 | break;; |
3315 | * ) break;; | |
3316 | esac | |
3317 | done | |
c906108c | 3318 | else |
81ecdfbb RW |
3319 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3320 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3321 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3322 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3323 | fi |
b4e70030 | 3324 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3326 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3327 | |
b4e70030 | 3328 | rm -f conftest.$ac_ext |
bec39cab AC |
3329 | EXEEXT=$ac_cv_exeext |
3330 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3332 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3333 | if test "${ac_cv_objext+set}" = set; then : | |
3334 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3335 | else |
81ecdfbb | 3336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3337 | /* end confdefs.h. */ |
3338 | ||
3339 | int | |
3340 | main () | |
3341 | { | |
3342 | ||
3343 | ; | |
3344 | return 0; | |
3345 | } | |
3346 | _ACEOF | |
3347 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3348 | if { { ac_try="$ac_compile" |
3349 | case "(($ac_try" in | |
3350 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3351 | *) ac_try_echo=$ac_try;; | |
3352 | esac | |
3353 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3354 | $as_echo "$ac_try_echo"; } >&5 | |
3355 | (eval "$ac_compile") 2>&5 | |
3356 | ac_status=$? | |
3357 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3358 | test $ac_status = 0; }; then : | |
3359 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3360 | test -f "$ac_file" || continue; | |
bec39cab | 3361 | case $ac_file in |
81ecdfbb | 3362 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3363 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3364 | break;; | |
3365 | esac | |
3366 | done | |
c906108c | 3367 | else |
81ecdfbb | 3368 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3369 | sed 's/^/| /' conftest.$ac_ext >&5 |
3370 | ||
81ecdfbb RW |
3371 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3372 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3373 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3374 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3375 | fi |
b4e70030 | 3376 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3377 | fi |
81ecdfbb RW |
3378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3379 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3380 | OBJEXT=$ac_cv_objext |
3381 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3383 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3384 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3385 | $as_echo_n "(cached) " >&6 | |
c906108c | 3386 | else |
81ecdfbb | 3387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3388 | /* end confdefs.h. */ |
3389 | ||
3390 | int | |
3391 | main () | |
3392 | { | |
3393 | #ifndef __GNUC__ | |
3394 | choke me | |
3395 | #endif | |
3396 | ||
3397 | ; | |
3398 | return 0; | |
3399 | } | |
3400 | _ACEOF | |
81ecdfbb | 3401 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3402 | ac_compiler_gnu=yes |
3403 | else | |
81ecdfbb | 3404 | ac_compiler_gnu=no |
bec39cab | 3405 | fi |
81ecdfbb | 3406 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3407 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3408 | ||
3409 | fi | |
81ecdfbb RW |
3410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3411 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3412 | if test $ac_compiler_gnu = yes; then | |
3413 | GCC=yes | |
3414 | else | |
3415 | GCC= | |
3416 | fi | |
bec39cab AC |
3417 | ac_test_CFLAGS=${CFLAGS+set} |
3418 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3419 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3420 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3421 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3422 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3423 | else |
81ecdfbb RW |
3424 | ac_save_c_werror_flag=$ac_c_werror_flag |
3425 | ac_c_werror_flag=yes | |
3426 | ac_cv_prog_cc_g=no | |
3427 | CFLAGS="-g" | |
3428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3429 | /* end confdefs.h. */ |
3430 | ||
3431 | int | |
3432 | main () | |
3433 | { | |
3434 | ||
3435 | ; | |
3436 | return 0; | |
3437 | } | |
3438 | _ACEOF | |
81ecdfbb | 3439 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3440 | ac_cv_prog_cc_g=yes |
3441 | else | |
81ecdfbb RW |
3442 | CFLAGS="" |
3443 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3444 | /* end confdefs.h. */ | |
3445 | ||
3446 | int | |
3447 | main () | |
3448 | { | |
3449 | ||
3450 | ; | |
3451 | return 0; | |
3452 | } | |
3453 | _ACEOF | |
3454 | if ac_fn_c_try_compile "$LINENO"; then : | |
3455 | ||
3456 | else | |
3457 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3458 | CFLAGS="-g" | |
3459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3460 | /* end confdefs.h. */ | |
3461 | ||
3462 | int | |
3463 | main () | |
3464 | { | |
c906108c | 3465 | |
81ecdfbb RW |
3466 | ; |
3467 | return 0; | |
3468 | } | |
3469 | _ACEOF | |
3470 | if ac_fn_c_try_compile "$LINENO"; then : | |
3471 | ac_cv_prog_cc_g=yes | |
3472 | fi | |
3473 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3474 | fi | |
3475 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3476 | fi |
81ecdfbb RW |
3477 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3478 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3479 | fi |
81ecdfbb RW |
3480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3481 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3482 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3483 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3484 | elif test $ac_cv_prog_cc_g = yes; then |
3485 | if test "$GCC" = yes; then | |
3486 | CFLAGS="-g -O2" | |
3487 | else | |
3488 | CFLAGS="-g" | |
3489 | fi | |
3490 | else | |
3491 | if test "$GCC" = yes; then | |
3492 | CFLAGS="-O2" | |
3493 | else | |
3494 | CFLAGS= | |
3495 | fi | |
3496 | fi | |
81ecdfbb RW |
3497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3498 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3499 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3500 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3501 | else |
81ecdfbb | 3502 | ac_cv_prog_cc_c89=no |
bec39cab | 3503 | ac_save_CC=$CC |
81ecdfbb | 3504 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3505 | /* end confdefs.h. */ |
c906108c SS |
3506 | #include <stdarg.h> |
3507 | #include <stdio.h> | |
3508 | #include <sys/types.h> | |
3509 | #include <sys/stat.h> | |
3510 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3511 | struct buf { int x; }; | |
3512 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3513 | static char *e (p, i) | |
3514 | char **p; | |
3515 | int i; | |
3516 | { | |
3517 | return p[i]; | |
3518 | } | |
3519 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3520 | { | |
3521 | char *s; | |
3522 | va_list v; | |
3523 | va_start (v,p); | |
3524 | s = g (p, va_arg (v,int)); | |
3525 | va_end (v); | |
3526 | return s; | |
3527 | } | |
bec39cab AC |
3528 | |
3529 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3530 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3531 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3532 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3533 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3534 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3535 | that's true only with -std. */ |
bec39cab AC |
3536 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3537 | ||
81ecdfbb RW |
3538 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3539 | inside strings and character constants. */ | |
3540 | #define FOO(x) 'x' | |
3541 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3542 | ||
c906108c SS |
3543 | int test (int i, double x); |
3544 | struct s1 {int (*f) (int a);}; | |
3545 | struct s2 {int (*f) (double a);}; | |
3546 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3547 | int argc; | |
3548 | char **argv; | |
bec39cab AC |
3549 | int |
3550 | main () | |
3551 | { | |
c906108c | 3552 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3553 | ; |
3554 | return 0; | |
3555 | } | |
3556 | _ACEOF | |
81ecdfbb RW |
3557 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3558 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3559 | do |
3560 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3561 | if ac_fn_c_try_compile "$LINENO"; then : |
3562 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3563 | fi |
81ecdfbb RW |
3564 | rm -f core conftest.err conftest.$ac_objext |
3565 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3566 | done |
81ecdfbb | 3567 | rm -f conftest.$ac_ext |
bec39cab | 3568 | CC=$ac_save_CC |
c906108c SS |
3569 | |
3570 | fi | |
81ecdfbb RW |
3571 | # AC_CACHE_VAL |
3572 | case "x$ac_cv_prog_cc_c89" in | |
3573 | x) | |
3574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3575 | $as_echo "none needed" >&6; } ;; | |
3576 | xno) | |
3577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3578 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3579 | *) |
81ecdfbb RW |
3580 | CC="$CC $ac_cv_prog_cc_c89" |
3581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3582 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3583 | esac |
81ecdfbb | 3584 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3585 | |
b4e70030 JB |
3586 | fi |
3587 | ||
bec39cab AC |
3588 | ac_ext=c |
3589 | ac_cpp='$CPP $CPPFLAGS' | |
3590 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3591 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3592 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3593 | |
3bc3d82a PA |
3594 | ac_ext=cpp |
3595 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3596 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3597 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3598 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3599 | if test -z "$CXX"; then | |
3600 | if test -n "$CCC"; then | |
3601 | CXX=$CCC | |
3602 | else | |
3603 | if test -n "$ac_tool_prefix"; then | |
3604 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3605 | do | |
3606 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3607 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3609 | $as_echo_n "checking for $ac_word... " >&6; } | |
3610 | if test "${ac_cv_prog_CXX+set}" = set; then : | |
3611 | $as_echo_n "(cached) " >&6 | |
3612 | else | |
3613 | if test -n "$CXX"; then | |
3614 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3615 | else | |
3616 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3617 | for as_dir in $PATH | |
3618 | do | |
3619 | IFS=$as_save_IFS | |
3620 | test -z "$as_dir" && as_dir=. | |
3621 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3622 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3623 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
3624 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3625 | break 2 | |
3626 | fi | |
3627 | done | |
3628 | done | |
3629 | IFS=$as_save_IFS | |
3630 | ||
3631 | fi | |
3632 | fi | |
3633 | CXX=$ac_cv_prog_CXX | |
3634 | if test -n "$CXX"; then | |
3635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3636 | $as_echo "$CXX" >&6; } | |
3637 | else | |
3638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3639 | $as_echo "no" >&6; } | |
3640 | fi | |
3641 | ||
3642 | ||
3643 | test -n "$CXX" && break | |
3644 | done | |
3645 | fi | |
3646 | if test -z "$CXX"; then | |
3647 | ac_ct_CXX=$CXX | |
3648 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3649 | do | |
3650 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3651 | set dummy $ac_prog; ac_word=$2 | |
3652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3653 | $as_echo_n "checking for $ac_word... " >&6; } | |
3654 | if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : | |
3655 | $as_echo_n "(cached) " >&6 | |
3656 | else | |
3657 | if test -n "$ac_ct_CXX"; then | |
3658 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3659 | else | |
3660 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3661 | for as_dir in $PATH | |
3662 | do | |
3663 | IFS=$as_save_IFS | |
3664 | test -z "$as_dir" && as_dir=. | |
3665 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3666 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3667 | ac_cv_prog_ac_ct_CXX="$ac_prog" | |
3668 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3669 | break 2 | |
3670 | fi | |
3671 | done | |
3672 | done | |
3673 | IFS=$as_save_IFS | |
3674 | ||
3675 | fi | |
3676 | fi | |
3677 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3678 | if test -n "$ac_ct_CXX"; then | |
3679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3680 | $as_echo "$ac_ct_CXX" >&6; } | |
3681 | else | |
3682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3683 | $as_echo "no" >&6; } | |
3684 | fi | |
3685 | ||
3686 | ||
3687 | test -n "$ac_ct_CXX" && break | |
3688 | done | |
3689 | ||
3690 | if test "x$ac_ct_CXX" = x; then | |
3691 | CXX="g++" | |
3692 | else | |
3693 | case $cross_compiling:$ac_tool_warned in | |
3694 | yes:) | |
3695 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3696 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3697 | ac_tool_warned=yes ;; | |
3698 | esac | |
3699 | CXX=$ac_ct_CXX | |
3700 | fi | |
3701 | fi | |
3702 | ||
3703 | fi | |
3704 | fi | |
3705 | # Provide some information about the compiler. | |
3706 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3707 | set X $ac_compile | |
3708 | ac_compiler=$2 | |
3709 | for ac_option in --version -v -V -qversion; do | |
3710 | { { ac_try="$ac_compiler $ac_option >&5" | |
3711 | case "(($ac_try" in | |
3712 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3713 | *) ac_try_echo=$ac_try;; | |
3714 | esac | |
3715 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3716 | $as_echo "$ac_try_echo"; } >&5 | |
3717 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3718 | ac_status=$? | |
3719 | if test -s conftest.err; then | |
3720 | sed '10a\ | |
3721 | ... rest of stderr output deleted ... | |
3722 | 10q' conftest.err >conftest.er1 | |
3723 | cat conftest.er1 >&5 | |
3724 | rm -f conftest.er1 conftest.err | |
3725 | fi | |
3726 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3727 | test $ac_status = 0; } | |
3728 | done | |
3729 | ||
3730 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3731 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
3732 | if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : | |
3733 | $as_echo_n "(cached) " >&6 | |
3734 | else | |
3735 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3736 | /* end confdefs.h. */ | |
3737 | ||
3738 | int | |
3739 | main () | |
3740 | { | |
3741 | #ifndef __GNUC__ | |
3742 | choke me | |
3743 | #endif | |
3744 | ||
3745 | ; | |
3746 | return 0; | |
3747 | } | |
3748 | _ACEOF | |
3749 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3750 | ac_compiler_gnu=yes | |
3751 | else | |
3752 | ac_compiler_gnu=no | |
3753 | fi | |
3754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3755 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3756 | ||
3757 | fi | |
3758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3759 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3760 | if test $ac_compiler_gnu = yes; then | |
3761 | GXX=yes | |
3762 | else | |
3763 | GXX= | |
3764 | fi | |
3765 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3766 | ac_save_CXXFLAGS=$CXXFLAGS | |
3767 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3768 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
3769 | if test "${ac_cv_prog_cxx_g+set}" = set; then : | |
3770 | $as_echo_n "(cached) " >&6 | |
3771 | else | |
3772 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3773 | ac_cxx_werror_flag=yes | |
3774 | ac_cv_prog_cxx_g=no | |
3775 | CXXFLAGS="-g" | |
3776 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3777 | /* end confdefs.h. */ | |
3778 | ||
3779 | int | |
3780 | main () | |
3781 | { | |
3782 | ||
3783 | ; | |
3784 | return 0; | |
3785 | } | |
3786 | _ACEOF | |
3787 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3788 | ac_cv_prog_cxx_g=yes | |
3789 | else | |
3790 | CXXFLAGS="" | |
3791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3792 | /* end confdefs.h. */ | |
3793 | ||
3794 | int | |
3795 | main () | |
3796 | { | |
3797 | ||
3798 | ; | |
3799 | return 0; | |
3800 | } | |
3801 | _ACEOF | |
3802 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3803 | ||
3804 | else | |
3805 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3806 | CXXFLAGS="-g" | |
3807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3808 | /* end confdefs.h. */ | |
3809 | ||
3810 | int | |
3811 | main () | |
3812 | { | |
3813 | ||
3814 | ; | |
3815 | return 0; | |
3816 | } | |
3817 | _ACEOF | |
3818 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3819 | ac_cv_prog_cxx_g=yes | |
3820 | fi | |
3821 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3822 | fi | |
3823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3824 | fi | |
3825 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3826 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3827 | fi | |
3828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3829 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3830 | if test "$ac_test_CXXFLAGS" = set; then | |
3831 | CXXFLAGS=$ac_save_CXXFLAGS | |
3832 | elif test $ac_cv_prog_cxx_g = yes; then | |
3833 | if test "$GXX" = yes; then | |
3834 | CXXFLAGS="-g -O2" | |
3835 | else | |
3836 | CXXFLAGS="-g" | |
3837 | fi | |
3838 | else | |
3839 | if test "$GXX" = yes; then | |
3840 | CXXFLAGS="-O2" | |
3841 | else | |
3842 | CXXFLAGS= | |
3843 | fi | |
3844 | fi | |
3845 | ac_ext=c | |
3846 | ac_cpp='$CPP $CPPFLAGS' | |
3847 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3848 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3849 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3850 | ||
3851 | ||
60ca704f | 3852 | |
bec39cab AC |
3853 | ac_ext=c |
3854 | ac_cpp='$CPP $CPPFLAGS' | |
3855 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3856 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3857 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3859 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3860 | # On Suns, sometimes $CPP names a directory. |
3861 | if test -n "$CPP" && test -d "$CPP"; then | |
3862 | CPP= | |
8bb2c122 | 3863 | fi |
bec39cab | 3864 | if test -z "$CPP"; then |
81ecdfbb RW |
3865 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3866 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3867 | else |
3868 | # Double quotes because CPP needs to be expanded | |
3869 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3870 | do | |
3871 | ac_preproc_ok=false | |
3872 | for ac_c_preproc_warn_flag in '' yes | |
3873 | do | |
3874 | # Use a header file that comes with gcc, so configuring glibc | |
3875 | # with a fresh cross-compiler works. | |
3876 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3877 | # <limits.h> exists even on freestanding compilers. | |
3878 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3879 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3881 | /* end confdefs.h. */ |
3882 | #ifdef __STDC__ | |
3883 | # include <limits.h> | |
3884 | #else | |
3885 | # include <assert.h> | |
3886 | #endif | |
3887 | Syntax error | |
3888 | _ACEOF | |
81ecdfbb | 3889 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3890 | |
81ecdfbb | 3891 | else |
bec39cab AC |
3892 | # Broken: fails on valid input. |
3893 | continue | |
3894 | fi | |
3895 | rm -f conftest.err conftest.$ac_ext | |
3896 | ||
81ecdfbb | 3897 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3898 | # can be detected and how. |
81ecdfbb | 3899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3900 | /* end confdefs.h. */ |
3901 | #include <ac_nonexistent.h> | |
3902 | _ACEOF | |
81ecdfbb | 3903 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3904 | # Broken: success on invalid input. |
3905 | continue | |
8bb2c122 | 3906 | else |
bec39cab AC |
3907 | # Passes both tests. |
3908 | ac_preproc_ok=: | |
3909 | break | |
8bb2c122 | 3910 | fi |
bec39cab | 3911 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3912 | |
bec39cab AC |
3913 | done |
3914 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3915 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3916 | if $ac_preproc_ok; then : |
bec39cab AC |
3917 | break |
3918 | fi | |
8bb2c122 | 3919 | |
bec39cab AC |
3920 | done |
3921 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3922 | |
c906108c | 3923 | fi |
bec39cab AC |
3924 | CPP=$ac_cv_prog_CPP |
3925 | else | |
3926 | ac_cv_prog_CPP=$CPP | |
c906108c | 3927 | fi |
81ecdfbb RW |
3928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3929 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3930 | ac_preproc_ok=false |
3931 | for ac_c_preproc_warn_flag in '' yes | |
3932 | do | |
3933 | # Use a header file that comes with gcc, so configuring glibc | |
3934 | # with a fresh cross-compiler works. | |
3935 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3936 | # <limits.h> exists even on freestanding compilers. | |
3937 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3938 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3940 | /* end confdefs.h. */ |
3941 | #ifdef __STDC__ | |
3942 | # include <limits.h> | |
3943 | #else | |
3944 | # include <assert.h> | |
3945 | #endif | |
3946 | Syntax error | |
3947 | _ACEOF | |
81ecdfbb | 3948 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3949 | |
81ecdfbb | 3950 | else |
bec39cab AC |
3951 | # Broken: fails on valid input. |
3952 | continue | |
3953 | fi | |
3954 | rm -f conftest.err conftest.$ac_ext | |
3955 | ||
81ecdfbb | 3956 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3957 | # can be detected and how. |
81ecdfbb | 3958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3959 | /* end confdefs.h. */ |
3960 | #include <ac_nonexistent.h> | |
3961 | _ACEOF | |
81ecdfbb | 3962 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3963 | # Broken: success on invalid input. |
3964 | continue | |
c906108c | 3965 | else |
bec39cab AC |
3966 | # Passes both tests. |
3967 | ac_preproc_ok=: | |
3968 | break | |
c906108c | 3969 | fi |
bec39cab | 3970 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3971 | |
bec39cab AC |
3972 | done |
3973 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3974 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3975 | if $ac_preproc_ok; then : |
3976 | ||
c906108c | 3977 | else |
81ecdfbb RW |
3978 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3979 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3980 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3981 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3982 | fi |
c906108c | 3983 | |
bec39cab AC |
3984 | ac_ext=c |
3985 | ac_cpp='$CPP $CPPFLAGS' | |
3986 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3987 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3988 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3989 | ||
3990 | ||
81ecdfbb RW |
3991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3992 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3993 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3994 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3995 | else |
81ecdfbb RW |
3996 | if test -z "$GREP"; then |
3997 | ac_path_GREP_found=false | |
3998 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3999 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4000 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4001 | do | |
4002 | IFS=$as_save_IFS | |
4003 | test -z "$as_dir" && as_dir=. | |
4004 | for ac_prog in grep ggrep; do | |
4005 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4006 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4007 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
4008 | # Check for GNU ac_path_GREP and select it if it is found. | |
4009 | # Check for GNU $ac_path_GREP | |
4010 | case `"$ac_path_GREP" --version 2>&1` in | |
4011 | *GNU*) | |
4012 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4013 | *) | |
4014 | ac_count=0 | |
4015 | $as_echo_n 0123456789 >"conftest.in" | |
4016 | while : | |
4017 | do | |
4018 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4019 | mv "conftest.tmp" "conftest.in" | |
4020 | cp "conftest.in" "conftest.nl" | |
4021 | $as_echo 'GREP' >> "conftest.nl" | |
4022 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4023 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4024 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4025 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4026 | # Best one so far, save it but keep looking for a better one | |
4027 | ac_cv_path_GREP="$ac_path_GREP" | |
4028 | ac_path_GREP_max=$ac_count | |
bec39cab | 4029 | fi |
81ecdfbb RW |
4030 | # 10*(2^10) chars as input seems more than enough |
4031 | test $ac_count -gt 10 && break | |
4032 | done | |
4033 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4034 | esac | |
bec39cab | 4035 | |
81ecdfbb RW |
4036 | $ac_path_GREP_found && break 3 |
4037 | done | |
4038 | done | |
4039 | done | |
4040 | IFS=$as_save_IFS | |
4041 | if test -z "$ac_cv_path_GREP"; then | |
4042 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4043 | fi | |
c906108c | 4044 | else |
81ecdfbb | 4045 | ac_cv_path_GREP=$GREP |
c906108c | 4046 | fi |
c906108c | 4047 | |
81ecdfbb RW |
4048 | fi |
4049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4050 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4051 | GREP="$ac_cv_path_GREP" | |
c906108c | 4052 | |
c906108c | 4053 | |
81ecdfbb RW |
4054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4055 | $as_echo_n "checking for egrep... " >&6; } | |
4056 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
4057 | $as_echo_n "(cached) " >&6 | |
783e057b | 4058 | else |
81ecdfbb RW |
4059 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4060 | then ac_cv_path_EGREP="$GREP -E" | |
4061 | else | |
4062 | if test -z "$EGREP"; then | |
4063 | ac_path_EGREP_found=false | |
4064 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4065 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4066 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4067 | do |
4068 | IFS=$as_save_IFS | |
4069 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4070 | for ac_prog in egrep; do |
4071 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4072 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4073 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
4074 | # Check for GNU ac_path_EGREP and select it if it is found. | |
4075 | # Check for GNU $ac_path_EGREP | |
4076 | case `"$ac_path_EGREP" --version 2>&1` in | |
4077 | *GNU*) | |
4078 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4079 | *) | |
4080 | ac_count=0 | |
4081 | $as_echo_n 0123456789 >"conftest.in" | |
4082 | while : | |
4083 | do | |
4084 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4085 | mv "conftest.tmp" "conftest.in" | |
4086 | cp "conftest.in" "conftest.nl" | |
4087 | $as_echo 'EGREP' >> "conftest.nl" | |
4088 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4089 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4090 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4091 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4092 | # Best one so far, save it but keep looking for a better one | |
4093 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4094 | ac_path_EGREP_max=$ac_count | |
4095 | fi | |
4096 | # 10*(2^10) chars as input seems more than enough | |
4097 | test $ac_count -gt 10 && break | |
4098 | done | |
4099 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4100 | esac | |
bec39cab | 4101 | |
81ecdfbb RW |
4102 | $ac_path_EGREP_found && break 3 |
4103 | done | |
4104 | done | |
4105 | done | |
4106 | IFS=$as_save_IFS | |
4107 | if test -z "$ac_cv_path_EGREP"; then | |
4108 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 4109 | fi |
783e057b | 4110 | else |
81ecdfbb | 4111 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4112 | fi |
4113 | ||
81ecdfbb | 4114 | fi |
783e057b | 4115 | fi |
81ecdfbb RW |
4116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4117 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4118 | EGREP="$ac_cv_path_EGREP" | |
4119 | ||
783e057b | 4120 | |
81ecdfbb RW |
4121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4122 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
4123 | if test "${ac_cv_header_stdc+set}" = set; then : | |
4124 | $as_echo_n "(cached) " >&6 | |
783e057b | 4125 | else |
81ecdfbb | 4126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4127 | /* end confdefs.h. */ |
783e057b | 4128 | #include <stdlib.h> |
bec39cab | 4129 | #include <stdarg.h> |
783e057b DJ |
4130 | #include <string.h> |
4131 | #include <float.h> | |
c906108c | 4132 | |
bec39cab AC |
4133 | int |
4134 | main () | |
4135 | { | |
c906108c | 4136 | |
bec39cab AC |
4137 | ; |
4138 | return 0; | |
4139 | } | |
4140 | _ACEOF | |
81ecdfbb | 4141 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4142 | ac_cv_header_stdc=yes |
c906108c | 4143 | else |
81ecdfbb | 4144 | ac_cv_header_stdc=no |
c906108c | 4145 | fi |
81ecdfbb | 4146 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4147 | |
783e057b DJ |
4148 | if test $ac_cv_header_stdc = yes; then |
4149 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4150 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4151 | /* end confdefs.h. */ |
4152 | #include <string.h> | |
c906108c | 4153 | |
783e057b DJ |
4154 | _ACEOF |
4155 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4156 | $EGREP "memchr" >/dev/null 2>&1; then : |
4157 | ||
c906108c | 4158 | else |
783e057b | 4159 | ac_cv_header_stdc=no |
c906108c | 4160 | fi |
783e057b | 4161 | rm -f conftest* |
c906108c SS |
4162 | |
4163 | fi | |
4164 | ||
783e057b DJ |
4165 | if test $ac_cv_header_stdc = yes; then |
4166 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4168 | /* end confdefs.h. */ |
4169 | #include <stdlib.h> | |
bec39cab | 4170 | |
783e057b DJ |
4171 | _ACEOF |
4172 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4173 | $EGREP "free" >/dev/null 2>&1; then : |
4174 | ||
bec39cab | 4175 | else |
783e057b | 4176 | ac_cv_header_stdc=no |
bec39cab | 4177 | fi |
783e057b | 4178 | rm -f conftest* |
bec39cab AC |
4179 | |
4180 | fi | |
bec39cab | 4181 | |
783e057b DJ |
4182 | if test $ac_cv_header_stdc = yes; then |
4183 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4184 | if test "$cross_compiling" = yes; then : |
783e057b | 4185 | : |
bec39cab | 4186 | else |
81ecdfbb | 4187 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4188 | /* end confdefs.h. */ |
4189 | #include <ctype.h> | |
81ecdfbb | 4190 | #include <stdlib.h> |
783e057b DJ |
4191 | #if ((' ' & 0x0FF) == 0x020) |
4192 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4193 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4194 | #else | |
4195 | # define ISLOWER(c) \ | |
4196 | (('a' <= (c) && (c) <= 'i') \ | |
4197 | || ('j' <= (c) && (c) <= 'r') \ | |
4198 | || ('s' <= (c) && (c) <= 'z')) | |
4199 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4200 | #endif | |
4201 | ||
4202 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4203 | int | |
4204 | main () | |
4205 | { | |
4206 | int i; | |
4207 | for (i = 0; i < 256; i++) | |
4208 | if (XOR (islower (i), ISLOWER (i)) | |
4209 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4210 | return 2; |
4211 | return 0; | |
783e057b DJ |
4212 | } |
4213 | _ACEOF | |
81ecdfbb | 4214 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4215 | |
81ecdfbb RW |
4216 | else |
4217 | ac_cv_header_stdc=no | |
783e057b | 4218 | fi |
81ecdfbb RW |
4219 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4220 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4221 | fi |
81ecdfbb | 4222 | |
783e057b DJ |
4223 | fi |
4224 | fi | |
81ecdfbb RW |
4225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4226 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4227 | if test $ac_cv_header_stdc = yes; then |
4228 | ||
81ecdfbb | 4229 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4230 | |
4231 | fi | |
4232 | ||
4233 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4234 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4235 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4236 | do : |
4237 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4238 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4239 | " | |
4240 | eval as_val=\$$as_ac_Header | |
4241 | if test "x$as_val" = x""yes; then : | |
783e057b | 4242 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4243 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4244 | _ACEOF |
4245 | ||
4246 | fi | |
4247 | ||
4248 | done | |
4249 | ||
4250 | ||
4251 | ||
81ecdfbb RW |
4252 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4253 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4254 | MINIX=yes |
4255 | else | |
4256 | MINIX= | |
4257 | fi | |
4258 | ||
4259 | ||
4260 | if test "$MINIX" = yes; then | |
4261 | ||
81ecdfbb | 4262 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4263 | |
4264 | ||
81ecdfbb | 4265 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4266 | |
4267 | ||
81ecdfbb | 4268 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4269 | |
4270 | fi | |
4271 | ||
4272 | ||
81ecdfbb RW |
4273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4274 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4275 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4276 | $as_echo_n "(cached) " >&6 | |
783e057b | 4277 | else |
81ecdfbb | 4278 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4279 | /* end confdefs.h. */ |
4280 | ||
c971b7fa PA |
4281 | # define __EXTENSIONS__ 1 |
4282 | $ac_includes_default | |
783e057b DJ |
4283 | int |
4284 | main () | |
4285 | { | |
4286 | ||
4287 | ; | |
4288 | return 0; | |
4289 | } | |
4290 | _ACEOF | |
81ecdfbb | 4291 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4292 | ac_cv_safe_to_define___extensions__=yes |
4293 | else | |
81ecdfbb | 4294 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4295 | fi |
81ecdfbb | 4296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4297 | fi |
81ecdfbb RW |
4298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4299 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4300 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4301 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4302 | |
81ecdfbb | 4303 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4304 | |
81ecdfbb | 4305 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4306 | |
81ecdfbb | 4307 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4308 | |
81ecdfbb | 4309 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4310 | |
4311 | ||
c971b7fa PA |
4312 | ac_aux_dir= |
4313 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
4314 | for ac_t in install-sh install.sh shtool; do | |
4315 | if test -f "$ac_dir/$ac_t"; then | |
4316 | ac_aux_dir=$ac_dir | |
4317 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4318 | break 2 | |
4319 | fi | |
4320 | done | |
4321 | done | |
4322 | if test -z "$ac_aux_dir"; then | |
4323 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
4324 | fi | |
770d76d7 | 4325 | |
c971b7fa PA |
4326 | # These three variables are undocumented and unsupported, |
4327 | # and are intended to be withdrawn in a future Autoconf release. | |
4328 | # They can cause serious problems if a builder's source tree is in a directory | |
4329 | # whose full name contains unusual characters. | |
4330 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4331 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4332 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4333 | |
770d76d7 | 4334 | |
c971b7fa PA |
4335 | # Make sure we can run config.sub. |
4336 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
4337 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 4338 | |
c971b7fa PA |
4339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4340 | $as_echo_n "checking build system type... " >&6; } | |
4341 | if test "${ac_cv_build+set}" = set; then : | |
4342 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 4343 | else |
c971b7fa PA |
4344 | ac_build_alias=$build_alias |
4345 | test "x$ac_build_alias" = x && | |
4346 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4347 | test "x$ac_build_alias" = x && | |
4348 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
4349 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
4350 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
4351 | ||
770d76d7 | 4352 | fi |
c971b7fa PA |
4353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4354 | $as_echo "$ac_cv_build" >&6; } | |
4355 | case $ac_cv_build in | |
4356 | *-*-*) ;; | |
4357 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 4358 | esac |
c971b7fa PA |
4359 | build=$ac_cv_build |
4360 | ac_save_IFS=$IFS; IFS='-' | |
4361 | set x $ac_cv_build | |
4362 | shift | |
4363 | build_cpu=$1 | |
4364 | build_vendor=$2 | |
4365 | shift; shift | |
4366 | # Remember, the first character of IFS is used to create $*, | |
4367 | # except with old shells: | |
4368 | build_os=$* | |
4369 | IFS=$ac_save_IFS | |
4370 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4371 | |
4372 | ||
c971b7fa PA |
4373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4374 | $as_echo_n "checking host system type... " >&6; } | |
4375 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
4376 | $as_echo_n "(cached) " >&6 |
4377 | else | |
c971b7fa PA |
4378 | if test "x$host_alias" = x; then |
4379 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4380 | else |
c971b7fa PA |
4381 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4382 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 4383 | fi |
81ecdfbb RW |
4384 | |
4385 | fi | |
c971b7fa PA |
4386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4387 | $as_echo "$ac_cv_host" >&6; } | |
4388 | case $ac_cv_host in | |
4389 | *-*-*) ;; | |
4390 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4391 | esac |
c971b7fa PA |
4392 | host=$ac_cv_host |
4393 | ac_save_IFS=$IFS; IFS='-' | |
4394 | set x $ac_cv_host | |
4395 | shift | |
4396 | host_cpu=$1 | |
4397 | host_vendor=$2 | |
4398 | shift; shift | |
4399 | # Remember, the first character of IFS is used to create $*, | |
4400 | # except with old shells: | |
4401 | host_os=$* | |
4402 | IFS=$ac_save_IFS | |
4403 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4404 | |
4405 | ||
4406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4407 | $as_echo_n "checking target system type... " >&6; } | |
4408 | if test "${ac_cv_target+set}" = set; then : | |
4409 | $as_echo_n "(cached) " >&6 | |
4410 | else | |
4411 | if test "x$target_alias" = x; then | |
4412 | ac_cv_target=$ac_cv_host | |
4413 | else | |
4414 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4415 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4416 | fi | |
4417 | ||
4418 | fi | |
4419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4420 | $as_echo "$ac_cv_target" >&6; } | |
4421 | case $ac_cv_target in | |
4422 | *-*-*) ;; | |
4423 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4424 | esac | |
4425 | target=$ac_cv_target | |
4426 | ac_save_IFS=$IFS; IFS='-' | |
4427 | set x $ac_cv_target | |
4428 | shift | |
4429 | target_cpu=$1 | |
4430 | target_vendor=$2 | |
4431 | shift; shift | |
4432 | # Remember, the first character of IFS is used to create $*, | |
4433 | # except with old shells: | |
4434 | target_os=$* | |
4435 | IFS=$ac_save_IFS | |
4436 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4437 | ||
4438 | ||
4439 | # The aliases save the names the user supplied, while $host etc. | |
4440 | # will get canonicalized. | |
4441 | test -n "$target_alias" && | |
4442 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4443 | NONENONEs,x,x, && | |
4444 | program_prefix=${target_alias}- | |
4445 | ||
4446 | # The tests for host and target for $enable_largefile require | |
4447 | # canonical names. | |
4448 | ||
4449 | ||
81ecdfbb | 4450 | |
da2f07f1 JK |
4451 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4452 | # even in directories otherwise not depending on the $plugins option. | |
4453 | ||
4454 | ||
2974be62 AM |
4455 | maybe_plugins=no |
4456 | for ac_header in dlfcn.h | |
4457 | do : | |
4458 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4459 | " | |
4460 | if test "x$ac_cv_header_dlfcn_h" = x""yes; then : | |
4461 | cat >>confdefs.h <<_ACEOF | |
4462 | #define HAVE_DLFCN_H 1 | |
4463 | _ACEOF | |
4464 | maybe_plugins=yes | |
4465 | fi | |
4466 | ||
4467 | done | |
4468 | ||
4469 | for ac_header in windows.h | |
4470 | do : | |
4471 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4472 | " | |
4473 | if test "x$ac_cv_header_windows_h" = x""yes; then : | |
4474 | cat >>confdefs.h <<_ACEOF | |
4475 | #define HAVE_WINDOWS_H 1 | |
4476 | _ACEOF | |
4477 | maybe_plugins=yes | |
4478 | fi | |
4479 | ||
4480 | done | |
4481 | ||
4482 | ||
4483 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4484 | if test "${enable_plugins+set}" = set; then : |
4485 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4486 | no) plugins=no ;; |
4487 | *) plugins=yes | |
4488 | if test "$maybe_plugins" != "yes" ; then | |
4489 | as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
4490 | fi ;; | |
4491 | esac | |
da2f07f1 | 4492 | else |
2974be62 AM |
4493 | plugins=$maybe_plugins |
4494 | ||
da2f07f1 JK |
4495 | fi |
4496 | ||
2974be62 AM |
4497 | if test "$plugins" = "yes"; then |
4498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 | |
4499 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
4500 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4501 | $as_echo_n "(cached) " >&6 | |
4502 | else | |
4503 | ac_func_search_save_LIBS=$LIBS | |
4504 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4505 | /* end confdefs.h. */ | |
4506 | ||
4507 | /* Override any GCC internal prototype to avoid an error. | |
4508 | Use char because int might match the return type of a GCC | |
4509 | builtin and then its argument prototype would still apply. */ | |
4510 | #ifdef __cplusplus | |
4511 | extern "C" | |
4512 | #endif | |
4513 | char dlopen (); | |
4514 | int | |
4515 | main () | |
4516 | { | |
4517 | return dlopen (); | |
4518 | ; | |
4519 | return 0; | |
4520 | } | |
4521 | _ACEOF | |
4522 | for ac_lib in '' dl; do | |
4523 | if test -z "$ac_lib"; then | |
4524 | ac_res="none required" | |
4525 | else | |
4526 | ac_res=-l$ac_lib | |
4527 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4528 | fi | |
4529 | if ac_fn_c_try_link "$LINENO"; then : | |
4530 | ac_cv_search_dlopen=$ac_res | |
4531 | fi | |
4532 | rm -f core conftest.err conftest.$ac_objext \ | |
4533 | conftest$ac_exeext | |
4534 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4535 | break | |
4536 | fi | |
4537 | done | |
4538 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4539 | ||
4540 | else | |
4541 | ac_cv_search_dlopen=no | |
4542 | fi | |
4543 | rm conftest.$ac_ext | |
4544 | LIBS=$ac_func_search_save_LIBS | |
4545 | fi | |
4546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
4547 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
4548 | ac_res=$ac_cv_search_dlopen | |
4549 | if test "$ac_res" != no; then : | |
4550 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4551 | ||
4552 | fi | |
4553 | ||
4554 | fi | |
da2f07f1 JK |
4555 | |
4556 | ||
4557 | case "${host}" in | |
4558 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4559 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4560 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4561 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4562 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4563 | # large-file support through the --enable-largefile switch, disable | |
4564 | # large-file support in favor of procfs support. | |
4565 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4566 | && : ${enable_largefile="no"} | |
4567 | ;; | |
4568 | esac | |
4569 | ||
4570 | # Check whether --enable-largefile was given. | |
4571 | if test "${enable_largefile+set}" = set; then : | |
4572 | enableval=$enable_largefile; | |
4573 | fi | |
4574 | ||
4575 | if test "$enable_largefile" != no; then | |
4576 | ||
4577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4578 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4579 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4580 | $as_echo_n "(cached) " >&6 | |
4581 | else | |
4582 | ac_cv_sys_largefile_CC=no | |
4583 | if test "$GCC" != yes; then | |
4584 | ac_save_CC=$CC | |
4585 | while :; do | |
4586 | # IRIX 6.2 and later do not support large files by default, | |
4587 | # so use the C compiler's -n32 option if that helps. | |
4588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4589 | /* end confdefs.h. */ | |
4590 | #include <sys/types.h> | |
4591 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4592 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4593 | since some C++ compilers masquerading as C compilers | |
4594 | incorrectly reject 9223372036854775807. */ | |
4595 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4596 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4597 | && LARGE_OFF_T % 2147483647 == 1) | |
4598 | ? 1 : -1]; | |
4599 | int | |
4600 | main () | |
4601 | { | |
4602 | ||
4603 | ; | |
4604 | return 0; | |
4605 | } | |
4606 | _ACEOF | |
4607 | if ac_fn_c_try_compile "$LINENO"; then : | |
4608 | break | |
4609 | fi | |
4610 | rm -f core conftest.err conftest.$ac_objext | |
4611 | CC="$CC -n32" | |
4612 | if ac_fn_c_try_compile "$LINENO"; then : | |
4613 | ac_cv_sys_largefile_CC=' -n32'; break | |
4614 | fi | |
4615 | rm -f core conftest.err conftest.$ac_objext | |
4616 | break | |
4617 | done | |
4618 | CC=$ac_save_CC | |
4619 | rm -f conftest.$ac_ext | |
4620 | fi | |
4621 | fi | |
4622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4623 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4624 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4625 | CC=$CC$ac_cv_sys_largefile_CC | |
4626 | fi | |
4627 | ||
4628 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4629 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4630 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4631 | $as_echo_n "(cached) " >&6 | |
4632 | else | |
4633 | while :; do | |
4634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4635 | /* end confdefs.h. */ | |
4636 | #include <sys/types.h> | |
4637 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4638 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4639 | since some C++ compilers masquerading as C compilers | |
4640 | incorrectly reject 9223372036854775807. */ | |
4641 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4642 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4643 | && LARGE_OFF_T % 2147483647 == 1) | |
4644 | ? 1 : -1]; | |
4645 | int | |
4646 | main () | |
4647 | { | |
4648 | ||
4649 | ; | |
4650 | return 0; | |
4651 | } | |
4652 | _ACEOF | |
4653 | if ac_fn_c_try_compile "$LINENO"; then : | |
4654 | ac_cv_sys_file_offset_bits=no; break | |
4655 | fi | |
4656 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4657 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4658 | /* end confdefs.h. */ | |
4659 | #define _FILE_OFFSET_BITS 64 | |
4660 | #include <sys/types.h> | |
4661 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4662 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4663 | since some C++ compilers masquerading as C compilers | |
4664 | incorrectly reject 9223372036854775807. */ | |
4665 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4666 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4667 | && LARGE_OFF_T % 2147483647 == 1) | |
4668 | ? 1 : -1]; | |
4669 | int | |
4670 | main () | |
4671 | { | |
4672 | ||
4673 | ; | |
4674 | return 0; | |
4675 | } | |
4676 | _ACEOF | |
4677 | if ac_fn_c_try_compile "$LINENO"; then : | |
4678 | ac_cv_sys_file_offset_bits=64; break | |
4679 | fi | |
4680 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4681 | ac_cv_sys_file_offset_bits=unknown | |
4682 | break | |
4683 | done | |
4684 | fi | |
4685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4686 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4687 | case $ac_cv_sys_file_offset_bits in #( | |
4688 | no | unknown) ;; | |
4689 | *) | |
4690 | cat >>confdefs.h <<_ACEOF | |
4691 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4692 | _ACEOF | |
4693 | ;; | |
4694 | esac | |
4695 | rm -rf conftest* | |
4696 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4698 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4699 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4700 | $as_echo_n "(cached) " >&6 | |
4701 | else | |
4702 | while :; do | |
4703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4704 | /* end confdefs.h. */ | |
4705 | #include <sys/types.h> | |
4706 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4707 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4708 | since some C++ compilers masquerading as C compilers | |
4709 | incorrectly reject 9223372036854775807. */ | |
4710 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4711 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4712 | && LARGE_OFF_T % 2147483647 == 1) | |
4713 | ? 1 : -1]; | |
4714 | int | |
4715 | main () | |
4716 | { | |
4717 | ||
4718 | ; | |
4719 | return 0; | |
4720 | } | |
4721 | _ACEOF | |
4722 | if ac_fn_c_try_compile "$LINENO"; then : | |
4723 | ac_cv_sys_large_files=no; break | |
4724 | fi | |
4725 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4727 | /* end confdefs.h. */ | |
4728 | #define _LARGE_FILES 1 | |
4729 | #include <sys/types.h> | |
4730 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4731 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4732 | since some C++ compilers masquerading as C compilers | |
4733 | incorrectly reject 9223372036854775807. */ | |
4734 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4735 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4736 | && LARGE_OFF_T % 2147483647 == 1) | |
4737 | ? 1 : -1]; | |
4738 | int | |
4739 | main () | |
4740 | { | |
4741 | ||
4742 | ; | |
4743 | return 0; | |
4744 | } | |
4745 | _ACEOF | |
4746 | if ac_fn_c_try_compile "$LINENO"; then : | |
4747 | ac_cv_sys_large_files=1; break | |
4748 | fi | |
4749 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4750 | ac_cv_sys_large_files=unknown | |
4751 | break | |
4752 | done | |
4753 | fi | |
4754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4755 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4756 | case $ac_cv_sys_large_files in #( | |
4757 | no | unknown) ;; | |
4758 | *) | |
4759 | cat >>confdefs.h <<_ACEOF | |
4760 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4761 | _ACEOF | |
4762 | ;; | |
4763 | esac | |
4764 | rm -rf conftest* | |
4765 | fi | |
4766 | fi | |
4767 | ||
4768 | ||
4769 | ||
81ecdfbb RW |
4770 | |
4771 | ||
4772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4773 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4774 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4775 | $as_echo_n "(cached) " >&6 | |
4776 | else | |
4777 | am_cv_prog_cc_stdc=no | |
4778 | ac_save_CC="$CC" | |
4779 | # Don't try gcc -ansi; that turns off useful extensions and | |
4780 | # breaks some systems' header files. | |
4781 | # AIX -qlanglvl=ansi | |
4782 | # Ultrix and OSF/1 -std1 | |
4783 | # HP-UX 10.20 and later -Ae | |
4784 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4785 | # SVR4 -Xc -D__EXTENSIONS__ | |
4786 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4787 | do | |
783e057b | 4788 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4790 | /* end confdefs.h. */ |
4791 | #include <stdarg.h> | |
4792 | #include <stdio.h> | |
4793 | #include <sys/types.h> | |
4794 | #include <sys/stat.h> | |
4795 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4796 | struct buf { int x; }; | |
4797 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4798 | static char *e (p, i) | |
4799 | char **p; | |
4800 | int i; | |
4801 | { | |
4802 | return p[i]; | |
4803 | } | |
4804 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4805 | { | |
4806 | char *s; | |
4807 | va_list v; | |
4808 | va_start (v,p); | |
4809 | s = g (p, va_arg (v,int)); | |
4810 | va_end (v); | |
4811 | return s; | |
4812 | } | |
4813 | int test (int i, double x); | |
4814 | struct s1 {int (*f) (int a);}; | |
4815 | struct s2 {int (*f) (double a);}; | |
4816 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4817 | int argc; | |
4818 | char **argv; | |
4819 | ||
4820 | int | |
4821 | main () | |
4822 | { | |
4823 | ||
4824 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4825 | ||
4826 | ; | |
4827 | return 0; | |
4828 | } | |
4829 | _ACEOF | |
81ecdfbb | 4830 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4831 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4832 | fi |
81ecdfbb | 4833 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4834 | done |
4835 | CC="$ac_save_CC" | |
4836 | ||
4837 | fi | |
4838 | ||
4839 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4841 | $as_echo "none needed" >&6; } | |
783e057b | 4842 | else |
81ecdfbb RW |
4843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4844 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4845 | fi |
4846 | case "x$am_cv_prog_cc_stdc" in | |
4847 | x|xno) ;; | |
4848 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4849 | esac | |
4850 | ||
4869db5e RM |
4851 | # expand $ac_aux_dir to an absolute path |
4852 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4853 | ||
4854 | if test x"${install_sh}" != xset; then | |
4855 | case $am_aux_dir in | |
4856 | *\ * | *\ *) | |
4857 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4858 | *) | |
4859 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4860 | esac | |
4861 | fi | |
4862 | ||
4863 | # Installed binaries are usually stripped using `strip' when the user | |
4864 | # run `make install-strip'. However `strip' might not be the right | |
4865 | # tool to use in cross-compilation environments, therefore Automake | |
4866 | # will honor the `STRIP' environment variable to overrule this program. | |
4867 | if test "$cross_compiling" != no; then | |
4868 | if test -n "$ac_tool_prefix"; then | |
4869 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4870 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4872 | $as_echo_n "checking for $ac_word... " >&6; } | |
4873 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
4874 | $as_echo_n "(cached) " >&6 | |
4875 | else | |
4876 | if test -n "$STRIP"; then | |
4877 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4878 | else | |
4879 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4880 | for as_dir in $PATH | |
4881 | do | |
4882 | IFS=$as_save_IFS | |
4883 | test -z "$as_dir" && as_dir=. | |
4884 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4885 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4886 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4887 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4888 | break 2 | |
4889 | fi | |
4890 | done | |
4891 | done | |
4892 | IFS=$as_save_IFS | |
4893 | ||
4894 | fi | |
4895 | fi | |
4896 | STRIP=$ac_cv_prog_STRIP | |
4897 | if test -n "$STRIP"; then | |
4898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4899 | $as_echo "$STRIP" >&6; } | |
4900 | else | |
4901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4902 | $as_echo "no" >&6; } | |
4903 | fi | |
4904 | ||
4905 | ||
4906 | fi | |
4907 | if test -z "$ac_cv_prog_STRIP"; then | |
4908 | ac_ct_STRIP=$STRIP | |
4909 | # Extract the first word of "strip", so it can be a program name with args. | |
4910 | set dummy strip; ac_word=$2 | |
4911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4912 | $as_echo_n "checking for $ac_word... " >&6; } | |
4913 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
4914 | $as_echo_n "(cached) " >&6 | |
4915 | else | |
4916 | if test -n "$ac_ct_STRIP"; then | |
4917 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4918 | else | |
4919 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4920 | for as_dir in $PATH | |
4921 | do | |
4922 | IFS=$as_save_IFS | |
4923 | test -z "$as_dir" && as_dir=. | |
4924 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4925 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4926 | ac_cv_prog_ac_ct_STRIP="strip" | |
4927 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4928 | break 2 | |
4929 | fi | |
4930 | done | |
4931 | done | |
4932 | IFS=$as_save_IFS | |
4933 | ||
4934 | fi | |
4935 | fi | |
4936 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4937 | if test -n "$ac_ct_STRIP"; then | |
4938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4939 | $as_echo "$ac_ct_STRIP" >&6; } | |
4940 | else | |
4941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4942 | $as_echo "no" >&6; } | |
4943 | fi | |
4944 | ||
4945 | if test "x$ac_ct_STRIP" = x; then | |
4946 | STRIP=":" | |
4947 | else | |
4948 | case $cross_compiling:$ac_tool_warned in | |
4949 | yes:) | |
4950 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4951 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4952 | ac_tool_warned=yes ;; | |
4953 | esac | |
4954 | STRIP=$ac_ct_STRIP | |
4955 | fi | |
4956 | else | |
4957 | STRIP="$ac_cv_prog_STRIP" | |
4958 | fi | |
4959 | ||
4960 | fi | |
4961 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4962 | ||
783e057b DJ |
4963 | |
4964 | ac_aux_dir= | |
81ecdfbb RW |
4965 | for ac_dir in .. "$srcdir"/..; do |
4966 | for ac_t in install-sh install.sh shtool; do | |
4967 | if test -f "$ac_dir/$ac_t"; then | |
4968 | ac_aux_dir=$ac_dir | |
4969 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4970 | break 2 | |
4971 | fi | |
4972 | done | |
783e057b DJ |
4973 | done |
4974 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4975 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4976 | fi |
81ecdfbb RW |
4977 | |
4978 | # These three variables are undocumented and unsupported, | |
4979 | # and are intended to be withdrawn in a future Autoconf release. | |
4980 | # They can cause serious problems if a builder's source tree is in a directory | |
4981 | # whose full name contains unusual characters. | |
4982 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4983 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4984 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4985 | ||
783e057b | 4986 | |
783e057b | 4987 | |
9009e1ae MR |
4988 | test "$program_prefix" != NONE && |
4989 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4990 | # Use a double $ so make ignores it. | |
4991 | test "$program_suffix" != NONE && | |
4992 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4993 | # Double any \ or $. | |
4994 | # By default was `s,x,x', remove it if useless. | |
4995 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4996 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4997 | ||
81ecdfbb | 4998 | |
3bc3d82a PA |
4999 | # See if we are building with C++, and substitute COMPILER. |
5000 | ||
5001 | # Check whether --enable-build-with-cxx was given. | |
5002 | if test "${enable_build_with_cxx+set}" = set; then : | |
5003 | enableval=$enable_build_with_cxx; case $enableval in | |
5004 | yes | no) | |
5005 | ;; | |
5006 | *) | |
5007 | as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;; | |
5008 | esac | |
5009 | else | |
5010 | enable_build_with_cxx=no | |
5011 | fi | |
5012 | ||
5013 | ||
5014 | if test "$enable_build_with_cxx" = "yes"; then | |
5015 | # We're using -fpermissive as shortcut for now. | |
5016 | COMPILER='$(CXX) -fpermissive' | |
5017 | else | |
5018 | COMPILER='$(CC)' | |
5019 | fi | |
5020 | ||
5021 | ||
5022 | ||
a417dc56 RW |
5023 | # Dependency checking. |
5024 | rm -rf .tst 2>/dev/null | |
5025 | mkdir .tst 2>/dev/null | |
5026 | if test -d .tst; then | |
5027 | am__leading_dot=. | |
5028 | else | |
5029 | am__leading_dot=_ | |
5030 | fi | |
5031 | rmdir .tst 2>/dev/null | |
5032 | ||
5033 | DEPDIR="${am__leading_dot}deps" | |
5034 | ||
81ecdfbb | 5035 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
5036 | |
5037 | ||
5038 | depcc="$CC" am_compiler_list= | |
5039 | ||
5040 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
5041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
5042 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
5043 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
5044 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5045 | else |
5046 | if test -f "$am_depcomp"; then | |
5047 | # We make a subdir and do the tests there. Otherwise we can end up | |
5048 | # making bogus files that we don't know about and never remove. For | |
5049 | # instance it was reported that on HP-UX the gcc test will end up | |
5050 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5051 | # in D'. | |
5052 | mkdir conftest.dir | |
5053 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5054 | # using a relative directory. | |
5055 | cp "$am_depcomp" conftest.dir | |
5056 | cd conftest.dir | |
5057 | # We will build objects and dependencies in a subdirectory because | |
5058 | # it helps to detect inapplicable dependency modes. For instance | |
5059 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5060 | # side effect of compilation, but ICC will put the dependencies in | |
5061 | # the current directory while Tru64 will put them in the object | |
5062 | # directory. | |
5063 | mkdir sub | |
5064 | ||
5065 | am_cv_CC_dependencies_compiler_type=none | |
5066 | if test "$am_compiler_list" = ""; then | |
5067 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5068 | fi | |
5069 | for depmode in $am_compiler_list; do | |
5070 | if test $depmode = none; then break; fi | |
5071 | ||
81ecdfbb | 5072 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
5073 | # Setup a source with many dependencies, because some compilers |
5074 | # like to wrap large dependency lists on column 80 (with \), and | |
5075 | # we should not choose a depcomp mode which is confused by this. | |
5076 | # | |
5077 | # We need to recreate these files for each test, as the compiler may | |
5078 | # overwrite some of them when testing with obscure command lines. | |
5079 | # This happens at least with the AIX C compiler. | |
5080 | : > sub/conftest.c | |
5081 | for i in 1 2 3 4 5 6; do | |
5082 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5083 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5084 | # Solaris 8's {/usr,}/bin/sh. | |
5085 | touch sub/conftst$i.h | |
5086 | done | |
5087 | echo "include sub/conftest.Po" > confmf | |
5088 | ||
5089 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5090 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5091 | # handle `-M -o', and we need to detect this. | |
5092 | depcmd="depmode=$depmode \ | |
5093 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
5094 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5095 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
5096 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
5097 | if env $depcmd > conftest.err 2>&1 && | |
5098 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
5099 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
5100 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
5101 | # icc doesn't choke on unknown options, it will just issue warnings | |
5102 | # or remarks (even with -Werror). So we grep stderr for any message | |
5103 | # that says an option was ignored or not supported. | |
5104 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5105 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5106 | # The diagnosis changed in icc 8.0: | |
5107 | # icc: Command line remark: option '-MP' not supported | |
5108 | if (grep 'ignoring option' conftest.err || | |
5109 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5110 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 5111 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
5112 | break |
5113 | fi | |
5114 | fi | |
81ecdfbb | 5115 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
5116 | sed -e 's/^/| /' < conftest.err >&5 |
5117 | done | |
5118 | ||
5119 | cd .. | |
5120 | rm -rf conftest.dir | |
5121 | else | |
5122 | am_cv_CC_dependencies_compiler_type=none | |
5123 | fi | |
5124 | ||
5125 | fi | |
81ecdfbb RW |
5126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
5127 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 5128 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 5129 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
5130 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
5131 | ||
5132 | fi | |
5133 | ||
5134 | ||
5135 | # Check for the 'make' the user wants to use. | |
5136 | for ac_prog in make | |
5137 | do | |
5138 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5139 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5141 | $as_echo_n "checking for $ac_word... " >&6; } | |
5142 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
5143 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5144 | else |
5145 | if test -n "$MAKE"; then | |
5146 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
5147 | else | |
5148 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5149 | for as_dir in $PATH | |
5150 | do | |
5151 | IFS=$as_save_IFS | |
5152 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5153 | for ac_exec_ext in '' $ac_executable_extensions; do |
5154 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 5155 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 5156 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
5157 | break 2 |
5158 | fi | |
5159 | done | |
81ecdfbb RW |
5160 | done |
5161 | IFS=$as_save_IFS | |
a417dc56 RW |
5162 | |
5163 | fi | |
5164 | fi | |
5165 | MAKE=$ac_cv_prog_MAKE | |
5166 | if test -n "$MAKE"; then | |
81ecdfbb RW |
5167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
5168 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 5169 | else |
81ecdfbb RW |
5170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5171 | $as_echo "no" >&6; } | |
a417dc56 RW |
5172 | fi |
5173 | ||
81ecdfbb | 5174 | |
a417dc56 RW |
5175 | test -n "$MAKE" && break |
5176 | done | |
5177 | ||
5178 | MAKE_IS_GNU= | |
5179 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
5180 | *GNU*) | |
5181 | MAKE_IS_GNU=yes | |
5182 | ;; | |
5183 | esac | |
81ecdfbb | 5184 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
5185 | GMAKE_TRUE= |
5186 | GMAKE_FALSE='#' | |
5187 | else | |
5188 | GMAKE_TRUE='#' | |
5189 | GMAKE_FALSE= | |
5190 | fi | |
5191 | ||
81ecdfbb RW |
5192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
5193 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
5194 | set x ${MAKE-make} | |
5195 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
5196 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5197 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5198 | else |
5199 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 5200 | SHELL = /bin/sh |
a417dc56 | 5201 | all: |
81ecdfbb | 5202 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
5203 | _ACEOF |
5204 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
5205 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
5206 | *@@@%%%=?*=@@@%%%*) | |
5207 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
5208 | *) | |
5209 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
5210 | esac | |
a417dc56 RW |
5211 | rm -f conftest.make |
5212 | fi | |
81ecdfbb RW |
5213 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
5214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5215 | $as_echo "yes" >&6; } | |
a417dc56 RW |
5216 | SET_MAKE= |
5217 | else | |
81ecdfbb RW |
5218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5219 | $as_echo "no" >&6; } | |
a417dc56 RW |
5220 | SET_MAKE="MAKE=${MAKE-make}" |
5221 | fi | |
5222 | ||
5223 | ||
648d586d JB |
5224 | gnulib_extra_configure_args= |
5225 | # If large-file support is disabled, make sure gnulib does the same. | |
5226 | if test "$enable_largefile" = no; then | |
5227 | gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" | |
5228 | fi | |
5229 | ||
c971b7fa PA |
5230 | # Configure gnulib. We need to build gnulib under some other |
5231 | # directory not "gnulib", to avoid the problem of both GDB and | |
5232 | # GDBserver wanting to build it in the same directory, when building | |
5233 | # in the source dir. | |
783e057b | 5234 | |
c971b7fa PA |
5235 | in_src="gnulib" |
5236 | in_build="build-gnulib" | |
648d586d | 5237 | in_extra_args="$gnulib_extra_configure_args" |
c971b7fa PA |
5238 | |
5239 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
5240 | # so they do not pile up. | |
5241 | ac_sub_configure_args= | |
5242 | ac_prev= | |
5243 | eval "set x $ac_configure_args" | |
5244 | shift | |
5245 | for ac_arg | |
5246 | do | |
5247 | if test -n "$ac_prev"; then | |
5248 | ac_prev= | |
5249 | continue | |
5250 | fi | |
5251 | case $ac_arg in | |
5252 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
5253 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
5254 | ac_prev=cache_file ;; | |
5255 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
5256 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
5257 | | --c=*) | |
5258 | ;; | |
5259 | --config-cache | -C) | |
5260 | ;; | |
5261 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
5262 | ac_prev=srcdir ;; | |
5263 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
5264 | ;; | |
5265 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
5266 | ac_prev=prefix ;; | |
5267 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
5268 | ;; | |
5269 | --disable-option-checking) | |
5270 | ;; | |
5271 | *) | |
5272 | case $ac_arg in | |
5273 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
5274 | esac | |
5275 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
5276 | esac | |
5277 | done | |
5278 | ||
5279 | # Always prepend --prefix to ensure using the same prefix | |
5280 | # in subdir configurations. | |
5281 | ac_arg="--prefix=$prefix" | |
5282 | case $ac_arg in | |
5283 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
5284 | esac | |
5285 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
5286 | ||
5287 | # Pass --silent | |
5288 | if test "$silent" = yes; then | |
5289 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
5290 | fi | |
5291 | ||
5292 | # Always prepend --disable-option-checking to silence warnings, since | |
5293 | # different subdirs can have different --enable and --with options. | |
5294 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
5295 | ||
5296 | ac_popdir=`pwd` | |
5297 | ac_dir=$in_build | |
5298 | ||
5299 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
5300 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
5301 | $as_echo "$ac_msg" >&6 | |
5302 | as_dir="$ac_dir"; as_fn_mkdir_p | |
5303 | ||
38ea300a PA |
5304 | case $srcdir in |
5305 | [\\/]* | ?:[\\/]* ) | |
5306 | ac_srcdir=$srcdir/$in_src ;; | |
5307 | *) # Relative name. | |
5308 | ac_srcdir=../$srcdir/$in_src ;; | |
5309 | esac | |
c971b7fa PA |
5310 | |
5311 | cd "$ac_dir" | |
5312 | ||
5313 | ac_sub_configure=$ac_srcdir/configure | |
5314 | ||
5315 | # Make the cache file name correct relative to the subdirectory. | |
5316 | case $cache_file in | |
5317 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
5318 | *) # Relative name. | |
5319 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
5320 | esac | |
5321 | ||
648d586d JB |
5322 | if test -n "$in_extra_args"; then |
5323 | # Add the extra args at the end. | |
5324 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
5325 | fi | |
5326 | ||
c971b7fa PA |
5327 | { $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 |
5328 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
5329 | # The eval makes quoting arguments work. | |
5330 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
5331 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
5332 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
5333 | ||
5334 | cd "$ac_popdir" | |
783e057b | 5335 | |
c971b7fa PA |
5336 | |
5337 | ||
5338 | CONFIG_OBS= | |
5339 | CONFIG_DEPS= | |
5340 | CONFIG_SRCS= | |
5341 | ENABLE_CFLAGS= | |
5342 | ||
5343 | CONFIG_ALL= | |
5344 | CONFIG_CLEAN= | |
5345 | CONFIG_INSTALL= | |
5346 | CONFIG_UNINSTALL= | |
5347 | ||
5348 | # If we haven't got the data from the intl directory, | |
5349 | # assume NLS is disabled. | |
5350 | USE_NLS=no | |
5351 | LIBINTL= | |
5352 | LIBINTL_DEP= | |
5353 | INCINTL= | |
5354 | XGETTEXT= | |
5355 | GMSGFMT= | |
5356 | POSUB= | |
783e057b DJ |
5357 | |
5358 | if test -f ../intl/config.intl; then | |
5359 | . ../intl/config.intl | |
5360 | fi | |
81ecdfbb RW |
5361 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
5362 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 5363 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
5364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5365 | $as_echo "no" >&6; } | |
783e057b | 5366 | else |
81ecdfbb RW |
5367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5368 | $as_echo "yes" >&6; } | |
783e057b | 5369 | |
81ecdfbb | 5370 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
5371 | |
5372 | ||
81ecdfbb RW |
5373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
5374 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
5375 | # Look for .po and .gmo files in the source directory. |
5376 | CATALOGS= | |
5377 | XLINGUAS= | |
5378 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
5379 | # If there aren't any .gmo files the shell will give us the | |
5380 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
5381 | # weeded out. | |
5382 | case "$cat" in *\**) | |
5383 | continue;; | |
5384 | esac | |
5385 | # The quadruple backslash is collapsed to a double backslash | |
5386 | # by the backticks, then collapsed again by the double quotes, | |
5387 | # leaving us with one backslash in the sed expression (right | |
5388 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
5389 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
5390 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
5391 | # The user is allowed to set LINGUAS to a list of languages to | |
5392 | # install catalogs for. If it's empty that means "all of them." | |
5393 | if test "x$LINGUAS" = x; then | |
5394 | CATALOGS="$CATALOGS $cat" | |
5395 | XLINGUAS="$XLINGUAS $lang" | |
5396 | else | |
5397 | case "$LINGUAS" in *$lang*) | |
5398 | CATALOGS="$CATALOGS $cat" | |
5399 | XLINGUAS="$XLINGUAS $lang" | |
5400 | ;; | |
5401 | esac | |
e28b3332 DJ |
5402 | fi |
5403 | done | |
c971b7fa PA |
5404 | LINGUAS="$XLINGUAS" |
5405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
5406 | $as_echo "$LINGUAS" >&6; } | |
5407 | ||
5408 | ||
5409 | DATADIRNAME=share | |
5410 | ||
5411 | INSTOBJEXT=.mo | |
5412 | ||
5413 | GENCAT=gencat | |
5414 | ||
5415 | CATOBJEXT=.gmo | |
e28b3332 | 5416 | |
e28b3332 DJ |
5417 | fi |
5418 | ||
c971b7fa PA |
5419 | localedir='${datadir}/locale' |
5420 | ||
5421 | ||
5422 | if test x"$USE_NLS" = xyes; then | |
5423 | CONFIG_ALL="$CONFIG_ALL all-po" | |
5424 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
5425 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
5426 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 5427 | fi |
e28b3332 | 5428 | |
c971b7fa PA |
5429 | GNULIB=build-gnulib/import |
5430 | ||
5431 | # For Makefile dependencies. | |
5432 | GNULIB_STDINT_H= | |
5433 | if test x"$STDINT_H" != x; then | |
5434 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
5435 | fi |
5436 | ||
5437 | ||
c971b7fa PA |
5438 | PACKAGE=gdb |
5439 | ||
5440 | cat >>confdefs.h <<_ACEOF | |
5441 | #define PACKAGE "$PACKAGE" | |
5442 | _ACEOF | |
5443 | ||
5444 | ||
5445 | ||
5446 | # We never need to detect it in this sub-configure. | |
5447 | # But preserve it for config.status --recheck. | |
5448 | ||
5449 | ||
5450 | ||
5451 | MAKEINFO_EXTRA_FLAGS="" | |
5452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
5453 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
5454 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
5455 | $as_echo_n "(cached) " >&6 | |
5456 | else | |
5457 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
5458 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
5459 | gdb_cv_have_makeinfo_click=yes | |
5460 | else | |
5461 | gdb_cv_have_makeinfo_click=no | |
5462 | fi | |
5463 | fi | |
5464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
5465 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
5466 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
5467 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
5468 | fi | |
e28b3332 DJ |
5469 | |
5470 | ||
bec39cab AC |
5471 | |
5472 | ||
81ecdfbb RW |
5473 | # Check whether --with-separate-debug-dir was given. |
5474 | if test "${with_separate_debug_dir+set}" = set; then : | |
5475 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
5476 | DEBUGDIR=$withval |
5477 | else | |
5478 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
5479 | fi |
5480 | ||
20e95c23 | 5481 | |
783e057b DJ |
5482 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
5483 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 5484 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 5485 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 5486 | |
783e057b DJ |
5487 | cat >>confdefs.h <<_ACEOF |
5488 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 5489 | _ACEOF |
20e95c23 | 5490 | |
20e95c23 | 5491 | |
20e95c23 | 5492 | |
0c4a4063 | 5493 | |
b14b1491 TT |
5494 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5495 | if test "x$prefix" = xNONE; then | |
5496 | test_prefix=/usr/local | |
5497 | else | |
5498 | test_prefix=$prefix | |
5499 | fi | |
783e057b | 5500 | else |
b14b1491 | 5501 | test_prefix=$exec_prefix |
783e057b | 5502 | fi |
b14b1491 TT |
5503 | value=0 |
5504 | case ${ac_define_dir} in | |
5505 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5506 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5507 | value=1 | |
5508 | ;; | |
5509 | esac | |
5510 | ||
5511 | cat >>confdefs.h <<_ACEOF | |
5512 | #define DEBUGDIR_RELOCATABLE $value | |
5513 | _ACEOF | |
5514 | ||
5515 | ||
5516 | ||
0c4a4063 | 5517 | |
f83d8a90 DE |
5518 | # We can't pass paths as command line arguments. |
5519 | # Mingw32 tries to be clever and will convert the paths for us. | |
5520 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
5521 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
5522 | # This breaks GDB's relocatable path conversions since paths passed in | |
5523 | # config.h would not get so translated, the path prefixes no longer match. | |
5524 | ||
5525 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5526 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5527 | ac_define_dir=`eval echo $bindir` | |
5528 | ac_define_dir=`eval echo $ac_define_dir` | |
5529 | ||
5530 | cat >>confdefs.h <<_ACEOF | |
5531 | #define BINDIR "$ac_define_dir" | |
5532 | _ACEOF | |
5533 | ||
5534 | ||
5535 | ||
b14b1491 TT |
5536 | # GDB's datadir relocation |
5537 | ||
5538 | ||
5539 | ||
81ecdfbb RW |
5540 | # Check whether --with-gdb-datadir was given. |
5541 | if test "${with_gdb_datadir+set}" = set; then : | |
5542 | withval=$with_gdb_datadir; | |
b14b1491 | 5543 | GDB_DATADIR=$withval |
20e95c23 | 5544 | else |
b14b1491 | 5545 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
5546 | fi |
5547 | ||
20e95c23 | 5548 | |
b14b1491 TT |
5549 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
5550 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5551 | ac_define_dir=`eval echo $GDB_DATADIR` | |
5552 | ac_define_dir=`eval echo $ac_define_dir` | |
5553 | ||
5554 | cat >>confdefs.h <<_ACEOF | |
5555 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
5556 | _ACEOF |
5557 | ||
b14b1491 TT |
5558 | |
5559 | ||
0c4a4063 | 5560 | |
b14b1491 TT |
5561 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
5562 | if test "x$prefix" = xNONE; then | |
5563 | test_prefix=/usr/local | |
5564 | else | |
5565 | test_prefix=$prefix | |
5566 | fi | |
5567 | else | |
5568 | test_prefix=$exec_prefix | |
5569 | fi | |
5570 | value=0 | |
5571 | case ${ac_define_dir} in | |
5572 | "${test_prefix}"|"${test_prefix}/"*|\ | |
5573 | '${exec_prefix}'|'${exec_prefix}/'*) | |
5574 | value=1 | |
5575 | ;; | |
5576 | esac | |
5577 | ||
5578 | cat >>confdefs.h <<_ACEOF | |
5579 | #define GDB_DATADIR_RELOCATABLE $value | |
5580 | _ACEOF | |
5581 | ||
5582 | ||
783e057b | 5583 | |
20e95c23 | 5584 | |
0c4a4063 | 5585 | |
81ecdfbb RW |
5586 | # Check whether --with-relocated-sources was given. |
5587 | if test "${with_relocated_sources+set}" = set; then : | |
5588 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
5589 | |
5590 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5591 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5592 | ac_define_dir=`eval echo $reloc_srcdir` | |
5593 | ac_define_dir=`eval echo $ac_define_dir` | |
5594 | ||
5595 | cat >>confdefs.h <<_ACEOF | |
5596 | #define RELOC_SRCDIR "$ac_define_dir" | |
5597 | _ACEOF | |
5598 | ||
5599 | ||
5600 | ||
81ecdfbb RW |
5601 | fi |
5602 | ||
29b0e8a2 | 5603 | |
7349ff92 JK |
5604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
5605 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
5606 | ||
5607 | # Check whether --with-auto-load-dir was given. | |
5608 | if test "${with_auto_load_dir+set}" = set; then : | |
5609 | withval=$with_auto_load_dir; | |
5610 | else | |
1564a261 | 5611 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
5612 | fi |
5613 | ||
1564a261 | 5614 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
5615 | |
5616 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5617 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5618 | ac_define_dir=`eval echo $escape_dir` | |
5619 | ac_define_dir=`eval echo $ac_define_dir` | |
5620 | ||
5621 | cat >>confdefs.h <<_ACEOF | |
5622 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
5623 | _ACEOF | |
5624 | ||
5625 | ||
5626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
5627 | $as_echo "$with_auto_load_dir" >&6; } | |
5628 | ||
bccbefd2 JK |
5629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
5630 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
5631 | ||
5632 | # Check whether --with-auto-load-safe-path was given. | |
5633 | if test "${with_auto_load_safe_path+set}" = set; then : | |
5634 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
5635 | with_auto_load_safe_path="/" |
5636 | fi | |
bccbefd2 | 5637 | else |
7349ff92 | 5638 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5639 | fi |
5640 | ||
1564a261 | 5641 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5642 | |
5643 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5644 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5645 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5646 | ac_define_dir=`eval echo $ac_define_dir` |
5647 | ||
5648 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5649 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5650 | _ACEOF |
5651 | ||
5652 | ||
5653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5654 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5655 | ||
29b0e8a2 | 5656 | |
20e95c23 | 5657 | |
5ae98d25 | 5658 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5659 | |
5660 | ||
783e057b | 5661 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5662 | # Check whether --enable-targets was given. |
5663 | if test "${enable_targets+set}" = set; then : | |
5664 | enableval=$enable_targets; case "${enableval}" in | |
5665 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5666 | ;; |
5667 | no) enable_targets= ;; | |
5668 | *) enable_targets=$enableval ;; | |
5669 | esac | |
81ecdfbb RW |
5670 | fi |
5671 | ||
20e95c23 | 5672 | |
783e057b | 5673 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5674 | # Check whether --enable-64-bit-bfd was given. |
5675 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5676 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5677 | yes) want64=true ;; |
5678 | no) want64=false ;; | |
81ecdfbb | 5679 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5680 | esac |
5681 | else | |
5682 | want64=false | |
81ecdfbb RW |
5683 | fi |
5684 | ||
783e057b DJ |
5685 | # Provide defaults for some variables set by the per-host and per-target |
5686 | # configuration. | |
5687 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5688 | |
783e057b DJ |
5689 | if test "${target}" = "${host}"; then |
5690 | gdb_native=yes | |
5691 | else | |
5692 | gdb_native=no | |
5693 | fi | |
20e95c23 | 5694 | |
783e057b | 5695 | . $srcdir/configure.host |
20e95c23 | 5696 | |
fb23d554 SDJ |
5697 | # Add in the common host objects. |
5698 | . $srcdir/common/common.host | |
5699 | gdb_host_obs="$gdb_host_obs $common_host_obs" | |
5700 | ||
783e057b | 5701 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5702 | |
783e057b DJ |
5703 | TARGET_OBS= |
5704 | all_targets= | |
b292c783 | 5705 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 5706 | |
783e057b | 5707 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5708 | do |
783e057b DJ |
5709 | if test "$targ_alias" = "all"; then |
5710 | all_targets=true | |
5711 | else | |
5712 | # Canonicalize the secondary target names. | |
5713 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5714 | if test -n "$result"; then | |
5715 | targ=$result | |
5716 | else | |
5717 | targ=$targ_alias | |
5718 | fi | |
20e95c23 | 5719 | |
783e057b | 5720 | . ${srcdir}/configure.tgt |
20e95c23 | 5721 | |
bf307134 JB |
5722 | if test -z "${gdb_target_obs}"; then : |
5723 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5724 | fi | |
5725 | ||
783e057b DJ |
5726 | # Target-specific object files |
5727 | for i in ${gdb_target_obs}; do | |
5728 | case " $TARGET_OBS " in | |
5729 | *" ${i} "*) ;; | |
5730 | *) | |
5731 | TARGET_OBS="$TARGET_OBS ${i}" | |
5732 | ;; | |
5733 | esac | |
5734 | done | |
20e95c23 | 5735 | |
783e057b DJ |
5736 | # Check whether this target needs 64-bit CORE_ADDR |
5737 | if test x${want64} = xfalse; then | |
5738 | . ${srcdir}/../bfd/config.bfd | |
5739 | fi | |
b292c783 JK |
5740 | |
5741 | # Check whether this target is native and supports gcore. | |
5742 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
5743 | && $gdb_have_gcore; then | |
5744 | HAVE_NATIVE_GCORE_TARGET=1 | |
5745 | fi | |
783e057b | 5746 | fi |
20e95c23 DJ |
5747 | done |
5748 | ||
783e057b DJ |
5749 | if test x${all_targets} = xtrue; then |
5750 | ||
5751 | # We want all 64-bit targets if we either: | |
5752 | # - run on a 64-bit host or | |
5753 | # - already require 64-bit support for some other target or | |
5754 | # - the --enable-64-bit-bfd option was supplied | |
5755 | # Otherwise we only support all 32-bit targets. | |
5756 | # | |
5757 | # NOTE: This test must be in sync with the corresponding | |
5758 | # tests in BFD! | |
20e95c23 | 5759 | |
783e057b | 5760 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5761 | # The cast to long int works around a bug in the HP C Compiler |
5762 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5763 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5764 | # This bug is HP SR number 8606223364. | |
5765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5766 | $as_echo_n "checking size of long... " >&6; } | |
5767 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5768 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5769 | else |
81ecdfbb | 5770 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5771 | |
81ecdfbb RW |
5772 | else |
5773 | if test "$ac_cv_type_long" = yes; then | |
5774 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5775 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5776 | { as_fn_set_status 77 | |
5777 | as_fn_error "cannot compute sizeof (long) | |
5778 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5779 | else | |
5780 | ac_cv_sizeof_long=0 | |
5781 | fi | |
c0993dbe | 5782 | fi |
81ecdfbb | 5783 | |
c0993dbe | 5784 | fi |
81ecdfbb RW |
5785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5786 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5787 | |
c0993dbe | 5788 | |
c0993dbe | 5789 | |
c0993dbe UW |
5790 | cat >>confdefs.h <<_ACEOF |
5791 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5792 | _ACEOF | |
5793 | ||
5794 | ||
5795 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5796 | want64=true | |
5797 | fi | |
5798 | fi | |
5799 | if test x${want64} = xtrue; then | |
5800 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5801 | else | |
5802 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5803 | fi | |
5804 | fi | |
5805 | ||
5806 | ||
5807 | ||
b292c783 | 5808 | |
c0993dbe UW |
5809 | # For other settings, only the main target counts. |
5810 | gdb_sim= | |
5811 | gdb_osabi= | |
5812 | build_gdbserver= | |
5813 | targ=$target; . ${srcdir}/configure.tgt | |
5814 | ||
5815 | # Fetch the default architecture and default target vector from BFD. | |
5816 | targ=$target; . $srcdir/../bfd/config.bfd | |
5817 | ||
5818 | # We only want the first architecture, so strip off the others if | |
5819 | # there is more than one. | |
5820 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5821 | ||
5822 | if test "x$targ_archs" != x; then | |
5823 | ||
5824 | cat >>confdefs.h <<_ACEOF | |
5825 | #define DEFAULT_BFD_ARCH $targ_archs | |
5826 | _ACEOF | |
5827 | ||
5828 | fi | |
5829 | if test "x$targ_defvec" != x; then | |
5830 | ||
5831 | cat >>confdefs.h <<_ACEOF | |
5832 | #define DEFAULT_BFD_VEC $targ_defvec | |
5833 | _ACEOF | |
5834 | ||
5835 | fi | |
5836 | ||
c0993dbe UW |
5837 | # The CLI cannot be disabled yet, but may be in the future. |
5838 | ||
5839 | # Enable CLI. | |
81ecdfbb RW |
5840 | # Check whether --enable-gdbcli was given. |
5841 | if test "${enable_gdbcli+set}" = set; then : | |
5842 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5843 | yes) |
5844 | ;; | |
5845 | no) | |
81ecdfbb | 5846 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5847 | *) |
81ecdfbb | 5848 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5849 | esac |
5850 | else | |
5851 | enable_gdbcli=yes | |
81ecdfbb RW |
5852 | fi |
5853 | ||
c0993dbe UW |
5854 | if test x"$enable_gdbcli" = xyes; then |
5855 | if test -d $srcdir/cli; then | |
5856 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5857 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5858 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5859 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5860 | fi | |
5861 | fi | |
5862 | ||
5863 | # Enable MI. | |
81ecdfbb RW |
5864 | # Check whether --enable-gdbmi was given. |
5865 | if test "${enable_gdbmi+set}" = set; then : | |
5866 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5867 | yes | no) |
5868 | ;; | |
5869 | *) | |
81ecdfbb | 5870 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5871 | esac |
5872 | else | |
5873 | enable_gdbmi=yes | |
81ecdfbb RW |
5874 | fi |
5875 | ||
c0993dbe UW |
5876 | if test x"$enable_gdbmi" = xyes; then |
5877 | if test -d $srcdir/mi; then | |
5878 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5879 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5880 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5881 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5882 | fi | |
5883 | fi | |
5884 | ||
5885 | # Enable TUI. | |
81ecdfbb RW |
5886 | # Check whether --enable-tui was given. |
5887 | if test "${enable_tui+set}" = set; then : | |
5888 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5889 | yes | no | auto) |
c0993dbe UW |
5890 | ;; |
5891 | *) | |
81ecdfbb | 5892 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5893 | esac |
5894 | else | |
3ca64bd3 | 5895 | enable_tui=auto |
81ecdfbb RW |
5896 | fi |
5897 | ||
c0993dbe UW |
5898 | |
5899 | # Enable gdbtk. | |
81ecdfbb RW |
5900 | # Check whether --enable-gdbtk was given. |
5901 | if test "${enable_gdbtk+set}" = set; then : | |
5902 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5903 | yes | no) |
5904 | ;; | |
5905 | *) | |
81ecdfbb | 5906 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5907 | esac |
5908 | else | |
5062cc19 | 5909 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5910 | enable_gdbtk=yes |
5911 | else | |
5912 | enable_gdbtk=no | |
5913 | fi | |
81ecdfbb RW |
5914 | fi |
5915 | ||
c0993dbe UW |
5916 | # We unconditionally disable gdbtk tests on selected platforms. |
5917 | case $host_os in | |
5918 | go32* | windows*) | |
81ecdfbb RW |
5919 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5920 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5921 | enable_gdbtk=no ;; |
5922 | esac | |
5923 | ||
05e7c244 | 5924 | # Libunwind support for ia64. |
bec39cab | 5925 | |
05e7c244 JK |
5926 | |
5927 | # Check whether --with-libunwind-ia64 was given. | |
5928 | if test "${with_libunwind_ia64+set}" = set; then : | |
5929 | withval=$with_libunwind_ia64; | |
bec39cab | 5930 | else |
05e7c244 JK |
5931 | with_libunwind_ia64=auto |
5932 | fi | |
bec39cab | 5933 | |
05e7c244 JK |
5934 | |
5935 | # Backward compatibility option. | |
5936 | if test "${with_libunwind+set}" = set; then | |
5937 | if test x"$with_libunwind_ia64" != xauto; then | |
5938 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5939 | fi | |
5940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5941 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5942 | with_libunwind_ia64="$with_libunwind" | |
5943 | fi | |
5944 | ||
5945 | case "$with_libunwind_ia64" in | |
5946 | yes | no) | |
5947 | ;; | |
5948 | auto) | |
5949 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5950 | do : |
b54a8fd7 PA |
5951 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5952 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5953 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5954 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5955 | _ACEOF |
5956 | ||
5957 | fi | |
5958 | ||
5959 | done | |
5960 | ||
05e7c244 JK |
5961 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5962 | ;; | |
5963 | *) | |
5964 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5965 | ;; | |
5966 | esac | |
bec39cab | 5967 | |
05e7c244 | 5968 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5969 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5970 | do : |
b54a8fd7 PA |
5971 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5972 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5973 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5974 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5975 | _ACEOF |
5976 | ||
5977 | fi | |
5978 | ||
5979 | done | |
5980 | ||
05e7c244 JK |
5981 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5982 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5983 | fi | |
5984 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5985 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5986 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5987 | fi |
5988 | ||
cb01cfba JB |
5989 | opt_curses=no |
5990 | ||
81ecdfbb RW |
5991 | # Check whether --with-curses was given. |
5992 | if test "${with_curses+set}" = set; then : | |
5993 | withval=$with_curses; opt_curses=$withval | |
5994 | fi | |
5995 | ||
cb01cfba | 5996 | |
76a39ba7 | 5997 | prefer_curses=no |
cb01cfba | 5998 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5999 | prefer_curses=yes |
cb01cfba JB |
6000 | fi |
6001 | ||
a9322a30 | 6002 | # Profiling support. |
81ecdfbb RW |
6003 | # Check whether --enable-profiling was given. |
6004 | if test "${enable_profiling+set}" = set; then : | |
6005 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
6006 | yes | no) |
6007 | ;; | |
6008 | *) | |
81ecdfbb | 6009 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
6010 | esac |
6011 | else | |
6012 | enable_profiling=no | |
81ecdfbb | 6013 | fi |
bec39cab | 6014 | |
a9322a30 TT |
6015 | |
6016 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
6017 | do : |
6018 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6019 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6020 | eval as_val=\$$as_ac_var | |
6021 | if test "x$as_val" = x""yes; then : | |
6022 | cat >>confdefs.h <<_ACEOF | |
6023 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 6024 | _ACEOF |
a9322a30 | 6025 | |
81ecdfbb RW |
6026 | fi |
6027 | done | |
a9322a30 | 6028 | |
81ecdfbb RW |
6029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
6030 | $as_echo_n "checking for _etext... " >&6; } | |
6031 | if test "${ac_cv_var__etext+set}" = set; then : | |
6032 | $as_echo_n "(cached) " >&6 | |
6033 | else | |
6034 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6035 | /* end confdefs.h. */ | |
6036 | #include <stdlib.h> | |
6037 | extern char _etext; | |
a9322a30 TT |
6038 | |
6039 | int | |
6040 | main () | |
6041 | { | |
6042 | free (&_etext); | |
6043 | ; | |
6044 | return 0; | |
6045 | } | |
bec39cab | 6046 | _ACEOF |
81ecdfbb | 6047 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6048 | ac_cv_var__etext=yes |
bec39cab | 6049 | else |
81ecdfbb | 6050 | ac_cv_var__etext=no |
bec39cab | 6051 | fi |
81ecdfbb RW |
6052 | rm -f core conftest.err conftest.$ac_objext \ |
6053 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6054 | fi |
81ecdfbb RW |
6055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6056 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 6057 | if test $ac_cv_var__etext = yes; then |
60ca704f | 6058 | |
81ecdfbb | 6059 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6060 | |
bec39cab | 6061 | fi |
81ecdfbb RW |
6062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6063 | $as_echo_n "checking for etext... " >&6; } | |
6064 | if test "${ac_cv_var_etext+set}" = set; then : | |
6065 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6066 | else |
81ecdfbb | 6067 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6068 | /* end confdefs.h. */ |
a9322a30 TT |
6069 | #include <stdlib.h> |
6070 | extern char etext; | |
bec39cab AC |
6071 | |
6072 | int | |
6073 | main () | |
6074 | { | |
a9322a30 | 6075 | free (&etext); |
bec39cab AC |
6076 | ; |
6077 | return 0; | |
6078 | } | |
6079 | _ACEOF | |
81ecdfbb | 6080 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6081 | ac_cv_var_etext=yes |
bec39cab | 6082 | else |
81ecdfbb | 6083 | ac_cv_var_etext=no |
bec39cab | 6084 | fi |
81ecdfbb RW |
6085 | rm -f core conftest.err conftest.$ac_objext \ |
6086 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6087 | fi |
81ecdfbb RW |
6088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
6089 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
6090 | if test $ac_cv_var_etext = yes; then |
6091 | ||
81ecdfbb | 6092 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
6093 | |
6094 | fi | |
a9322a30 TT |
6095 | if test "$enable_profiling" = yes ; then |
6096 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 6097 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
6098 | fi |
6099 | PROFILE_CFLAGS=-pg | |
6100 | OLD_CFLAGS="$CFLAGS" | |
6101 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 6102 | |
81ecdfbb RW |
6103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
6104 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
6105 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
6106 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6107 | else |
81ecdfbb | 6108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6109 | /* end confdefs.h. */ |
bec39cab AC |
6110 | |
6111 | int | |
6112 | main () | |
6113 | { | |
a9322a30 | 6114 | int x; |
bec39cab AC |
6115 | ; |
6116 | return 0; | |
6117 | } | |
6118 | _ACEOF | |
81ecdfbb | 6119 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 6120 | ac_cv_cc_supports_pg=yes |
bec39cab | 6121 | else |
81ecdfbb | 6122 | ac_cv_cc_supports_pg=no |
bec39cab | 6123 | fi |
81ecdfbb | 6124 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 6125 | fi |
81ecdfbb RW |
6126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
6127 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 6128 | |
a9322a30 | 6129 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 6130 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 6131 | fi |
bec39cab | 6132 | |
a9322a30 | 6133 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
6134 | fi |
6135 | ||
c16158bc JM |
6136 | |
6137 | ||
81ecdfbb RW |
6138 | # Check whether --with-pkgversion was given. |
6139 | if test "${with_pkgversion+set}" = set; then : | |
6140 | withval=$with_pkgversion; case "$withval" in | |
6141 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6142 | no) PKGVERSION= ;; |
6143 | *) PKGVERSION="($withval) " ;; | |
6144 | esac | |
6145 | else | |
6146 | PKGVERSION="(GDB) " | |
6147 | ||
81ecdfbb | 6148 | fi |
c16158bc JM |
6149 | |
6150 | ||
6151 | ||
6152 | ||
81ecdfbb RW |
6153 | |
6154 | # Check whether --with-bugurl was given. | |
6155 | if test "${with_bugurl+set}" = set; then : | |
6156 | withval=$with_bugurl; case "$withval" in | |
6157 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6158 | no) BUGURL= |
6159 | ;; | |
6160 | *) BUGURL="$withval" | |
6161 | ;; | |
6162 | esac | |
6163 | else | |
6164 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
6165 | ||
81ecdfbb RW |
6166 | fi |
6167 | ||
c16158bc JM |
6168 | case ${BUGURL} in |
6169 | "") | |
6170 | REPORT_BUGS_TO= | |
6171 | REPORT_BUGS_TEXI= | |
6172 | ;; | |
6173 | *) | |
6174 | REPORT_BUGS_TO="<$BUGURL>" | |
6175 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
6176 | ;; | |
6177 | esac; | |
6178 | ||
6179 | ||
6180 | ||
6181 | ||
6182 | cat >>confdefs.h <<_ACEOF | |
6183 | #define PKGVERSION "$PKGVERSION" | |
6184 | _ACEOF | |
6185 | ||
6186 | ||
6187 | cat >>confdefs.h <<_ACEOF | |
6188 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
6189 | _ACEOF | |
6190 | ||
6191 | ||
bec39cab AC |
6192 | # --------------------- # |
6193 | # Checks for programs. # | |
6194 | # --------------------- # | |
6195 | ||
6196 | for ac_prog in gawk mawk nawk awk | |
6197 | do | |
6198 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6199 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
6200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6201 | $as_echo_n "checking for $ac_word... " >&6; } | |
6202 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
6203 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6204 | else |
6205 | if test -n "$AWK"; then | |
6206 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
6207 | else | |
6208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6209 | for as_dir in $PATH | |
6210 | do | |
6211 | IFS=$as_save_IFS | |
6212 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6213 | for ac_exec_ext in '' $ac_executable_extensions; do |
6214 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6215 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 6216 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6217 | break 2 |
6218 | fi | |
6219 | done | |
81ecdfbb RW |
6220 | done |
6221 | IFS=$as_save_IFS | |
bec39cab AC |
6222 | |
6223 | fi | |
6224 | fi | |
6225 | AWK=$ac_cv_prog_AWK | |
6226 | if test -n "$AWK"; then | |
81ecdfbb RW |
6227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
6228 | $as_echo "$AWK" >&6; } | |
bec39cab | 6229 | else |
81ecdfbb RW |
6230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6231 | $as_echo "no" >&6; } | |
bec39cab AC |
6232 | fi |
6233 | ||
bec39cab | 6234 | |
81ecdfbb | 6235 | test -n "$AWK" && break |
bec39cab AC |
6236 | done |
6237 | ||
c971b7fa PA |
6238 | # Find a good install program. We prefer a C program (faster), |
6239 | # so one script is as good as another. But avoid the broken or | |
6240 | # incompatible versions: | |
6241 | # SysV /etc/install, /usr/sbin/install | |
6242 | # SunOS /usr/etc/install | |
6243 | # IRIX /sbin/install | |
6244 | # AIX /bin/install | |
6245 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
6246 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
6247 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
6248 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
6249 | # OS/2's system install, which has a completely different semantic | |
6250 | # ./install, which can be erroneously created by make from ./install.sh. | |
6251 | # Reject install programs that cannot install multiple files. | |
6252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
6253 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
6254 | if test -z "$INSTALL"; then | |
6255 | if test "${ac_cv_path_install+set}" = set; then : | |
6256 | $as_echo_n "(cached) " >&6 | |
6257 | else | |
6258 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6259 | for as_dir in $PATH | |
6260 | do | |
6261 | IFS=$as_save_IFS | |
6262 | test -z "$as_dir" && as_dir=. | |
6263 | # Account for people who put trailing slashes in PATH elements. | |
6264 | case $as_dir/ in #(( | |
6265 | ./ | .// | /[cC]/* | \ | |
6266 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
6267 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
6268 | /usr/ucb/* ) ;; | |
6269 | *) | |
6270 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
6271 | # Don't use installbsd from OSF since it installs stuff as root | |
6272 | # by default. | |
6273 | for ac_prog in ginstall scoinst install; do | |
6274 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6275 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
6276 | if test $ac_prog = install && | |
6277 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
6278 | # AIX install. It has an incompatible calling convention. | |
6279 | : | |
6280 | elif test $ac_prog = install && | |
6281 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
6282 | # program-specific install script used by HP pwplus--don't use. | |
6283 | : | |
6284 | else | |
6285 | rm -rf conftest.one conftest.two conftest.dir | |
6286 | echo one > conftest.one | |
6287 | echo two > conftest.two | |
6288 | mkdir conftest.dir | |
6289 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
6290 | test -s conftest.one && test -s conftest.two && | |
6291 | test -s conftest.dir/conftest.one && | |
6292 | test -s conftest.dir/conftest.two | |
6293 | then | |
6294 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
6295 | break 3 | |
6296 | fi | |
6297 | fi | |
6298 | fi | |
6299 | done | |
6300 | done | |
6301 | ;; | |
6302 | esac | |
6303 | ||
6304 | done | |
6305 | IFS=$as_save_IFS | |
6306 | ||
6307 | rm -rf conftest.one conftest.two conftest.dir | |
6308 | ||
6309 | fi | |
6310 | if test "${ac_cv_path_install+set}" = set; then | |
6311 | INSTALL=$ac_cv_path_install | |
6312 | else | |
6313 | # As a last resort, use the slow shell script. Don't cache a | |
6314 | # value for INSTALL within a source directory, because that will | |
6315 | # break other packages using the cache if that directory is | |
6316 | # removed, or if the value is a relative name. | |
6317 | INSTALL=$ac_install_sh | |
6318 | fi | |
6319 | fi | |
6320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
6321 | $as_echo "$INSTALL" >&6; } | |
6322 | ||
6323 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
6324 | # It thinks the first close brace ends the variable substitution. | |
6325 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
6326 | ||
6327 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
6328 | ||
6329 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 6330 | |
81ecdfbb RW |
6331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
6332 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
6333 | LN_S=$as_ln_s |
6334 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
6335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6336 | $as_echo "yes" >&6; } | |
bec39cab | 6337 | else |
81ecdfbb RW |
6338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
6339 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
6340 | fi |
6341 | ||
6342 | if test -n "$ac_tool_prefix"; then | |
6343 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6344 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
6345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6346 | $as_echo_n "checking for $ac_word... " >&6; } | |
6347 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
6348 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6349 | else |
6350 | if test -n "$RANLIB"; then | |
6351 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6352 | else | |
6353 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6354 | for as_dir in $PATH | |
6355 | do | |
6356 | IFS=$as_save_IFS | |
6357 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6358 | for ac_exec_ext in '' $ac_executable_extensions; do |
6359 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6360 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 6361 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6362 | break 2 |
6363 | fi | |
6364 | done | |
81ecdfbb RW |
6365 | done |
6366 | IFS=$as_save_IFS | |
bec39cab AC |
6367 | |
6368 | fi | |
6369 | fi | |
6370 | RANLIB=$ac_cv_prog_RANLIB | |
6371 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
6372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
6373 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 6374 | else |
81ecdfbb RW |
6375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6376 | $as_echo "no" >&6; } | |
bec39cab AC |
6377 | fi |
6378 | ||
81ecdfbb | 6379 | |
bec39cab AC |
6380 | fi |
6381 | if test -z "$ac_cv_prog_RANLIB"; then | |
6382 | ac_ct_RANLIB=$RANLIB | |
6383 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6384 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
6385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6386 | $as_echo_n "checking for $ac_word... " >&6; } | |
6387 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
6388 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6389 | else |
6390 | if test -n "$ac_ct_RANLIB"; then | |
6391 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6392 | else | |
6393 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6394 | for as_dir in $PATH | |
6395 | do | |
6396 | IFS=$as_save_IFS | |
6397 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6398 | for ac_exec_ext in '' $ac_executable_extensions; do |
6399 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6400 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 6401 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6402 | break 2 |
6403 | fi | |
6404 | done | |
81ecdfbb RW |
6405 | done |
6406 | IFS=$as_save_IFS | |
bec39cab | 6407 | |
bec39cab AC |
6408 | fi |
6409 | fi | |
6410 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6411 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
6412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
6413 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 6414 | else |
81ecdfbb RW |
6415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6416 | $as_echo "no" >&6; } | |
bec39cab AC |
6417 | fi |
6418 | ||
81ecdfbb RW |
6419 | if test "x$ac_ct_RANLIB" = x; then |
6420 | RANLIB=":" | |
6421 | else | |
6422 | case $cross_compiling:$ac_tool_warned in | |
6423 | yes:) | |
6424 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6425 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6426 | ac_tool_warned=yes ;; | |
6427 | esac | |
6428 | RANLIB=$ac_ct_RANLIB | |
6429 | fi | |
bec39cab AC |
6430 | else |
6431 | RANLIB="$ac_cv_prog_RANLIB" | |
6432 | fi | |
6433 | ||
6434 | for ac_prog in 'bison -y' byacc | |
6435 | do | |
6436 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6437 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
6438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6439 | $as_echo_n "checking for $ac_word... " >&6; } | |
6440 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
6441 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6442 | else |
6443 | if test -n "$YACC"; then | |
6444 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
6445 | else | |
6446 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6447 | for as_dir in $PATH | |
6448 | do | |
6449 | IFS=$as_save_IFS | |
6450 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6451 | for ac_exec_ext in '' $ac_executable_extensions; do |
6452 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6453 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 6454 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6455 | break 2 |
6456 | fi | |
6457 | done | |
81ecdfbb RW |
6458 | done |
6459 | IFS=$as_save_IFS | |
bec39cab AC |
6460 | |
6461 | fi | |
6462 | fi | |
6463 | YACC=$ac_cv_prog_YACC | |
6464 | if test -n "$YACC"; then | |
81ecdfbb RW |
6465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
6466 | $as_echo "$YACC" >&6; } | |
bec39cab | 6467 | else |
81ecdfbb RW |
6468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6469 | $as_echo "no" >&6; } | |
bec39cab AC |
6470 | fi |
6471 | ||
81ecdfbb | 6472 | |
bec39cab AC |
6473 | test -n "$YACC" && break |
6474 | done | |
6475 | test -n "$YACC" || YACC="yacc" | |
6476 | ||
6477 | ||
6478 | if test -n "$ac_tool_prefix"; then | |
6479 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6480 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
6481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6482 | $as_echo_n "checking for $ac_word... " >&6; } | |
6483 | if test "${ac_cv_prog_AR+set}" = set; then : | |
6484 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6485 | else |
6486 | if test -n "$AR"; then | |
6487 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6488 | else | |
6489 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6490 | for as_dir in $PATH | |
6491 | do | |
6492 | IFS=$as_save_IFS | |
6493 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6494 | for ac_exec_ext in '' $ac_executable_extensions; do |
6495 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6496 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 6497 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6498 | break 2 |
6499 | fi | |
6500 | done | |
81ecdfbb RW |
6501 | done |
6502 | IFS=$as_save_IFS | |
bec39cab AC |
6503 | |
6504 | fi | |
6505 | fi | |
6506 | AR=$ac_cv_prog_AR | |
6507 | if test -n "$AR"; then | |
81ecdfbb RW |
6508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
6509 | $as_echo "$AR" >&6; } | |
bec39cab | 6510 | else |
81ecdfbb RW |
6511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6512 | $as_echo "no" >&6; } | |
bec39cab AC |
6513 | fi |
6514 | ||
81ecdfbb | 6515 | |
bec39cab AC |
6516 | fi |
6517 | if test -z "$ac_cv_prog_AR"; then | |
6518 | ac_ct_AR=$AR | |
6519 | # Extract the first word of "ar", so it can be a program name with args. | |
6520 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
6521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6522 | $as_echo_n "checking for $ac_word... " >&6; } | |
6523 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
6524 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6525 | else |
6526 | if test -n "$ac_ct_AR"; then | |
6527 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
6528 | else | |
6529 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6530 | for as_dir in $PATH | |
6531 | do | |
6532 | IFS=$as_save_IFS | |
6533 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6534 | for ac_exec_ext in '' $ac_executable_extensions; do |
6535 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6536 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 6537 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6538 | break 2 |
6539 | fi | |
6540 | done | |
81ecdfbb RW |
6541 | done |
6542 | IFS=$as_save_IFS | |
bec39cab AC |
6543 | |
6544 | fi | |
6545 | fi | |
6546 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6547 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
6548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
6549 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 6550 | else |
81ecdfbb RW |
6551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6552 | $as_echo "no" >&6; } | |
bec39cab AC |
6553 | fi |
6554 | ||
81ecdfbb RW |
6555 | if test "x$ac_ct_AR" = x; then |
6556 | AR="" | |
6557 | else | |
6558 | case $cross_compiling:$ac_tool_warned in | |
6559 | yes:) | |
6560 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6561 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6562 | ac_tool_warned=yes ;; | |
6563 | esac | |
6564 | AR=$ac_ct_AR | |
6565 | fi | |
bec39cab AC |
6566 | else |
6567 | AR="$ac_cv_prog_AR" | |
6568 | fi | |
6569 | ||
6570 | if test -n "$ac_tool_prefix"; then | |
6571 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
6572 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
6573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6574 | $as_echo_n "checking for $ac_word... " >&6; } | |
6575 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
6576 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6577 | else |
6578 | if test -n "$DLLTOOL"; then | |
6579 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
6580 | else | |
6581 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6582 | for as_dir in $PATH | |
6583 | do | |
6584 | IFS=$as_save_IFS | |
6585 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6586 | for ac_exec_ext in '' $ac_executable_extensions; do |
6587 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6588 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 6589 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6590 | break 2 |
6591 | fi | |
6592 | done | |
81ecdfbb RW |
6593 | done |
6594 | IFS=$as_save_IFS | |
bec39cab AC |
6595 | |
6596 | fi | |
6597 | fi | |
6598 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
6599 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
6600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
6601 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 6602 | else |
81ecdfbb RW |
6603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6604 | $as_echo "no" >&6; } | |
bec39cab AC |
6605 | fi |
6606 | ||
81ecdfbb | 6607 | |
bec39cab AC |
6608 | fi |
6609 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
6610 | ac_ct_DLLTOOL=$DLLTOOL | |
6611 | # Extract the first word of "dlltool", so it can be a program name with args. | |
6612 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
6613 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6614 | $as_echo_n "checking for $ac_word... " >&6; } | |
6615 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
6616 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6617 | else |
6618 | if test -n "$ac_ct_DLLTOOL"; then | |
6619 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
6620 | else | |
6621 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6622 | for as_dir in $PATH | |
6623 | do | |
6624 | IFS=$as_save_IFS | |
6625 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6626 | for ac_exec_ext in '' $ac_executable_extensions; do |
6627 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6628 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 6629 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6630 | break 2 |
6631 | fi | |
6632 | done | |
81ecdfbb RW |
6633 | done |
6634 | IFS=$as_save_IFS | |
bec39cab AC |
6635 | |
6636 | fi | |
6637 | fi | |
6638 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
6639 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
6640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
6641 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 6642 | else |
81ecdfbb RW |
6643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6644 | $as_echo "no" >&6; } | |
bec39cab AC |
6645 | fi |
6646 | ||
81ecdfbb RW |
6647 | if test "x$ac_ct_DLLTOOL" = x; then |
6648 | DLLTOOL="" | |
6649 | else | |
6650 | case $cross_compiling:$ac_tool_warned in | |
6651 | yes:) | |
6652 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6653 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6654 | ac_tool_warned=yes ;; | |
6655 | esac | |
6656 | DLLTOOL=$ac_ct_DLLTOOL | |
6657 | fi | |
bec39cab AC |
6658 | else |
6659 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6660 | fi | |
6661 | ||
6662 | if test -n "$ac_tool_prefix"; then | |
6663 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6664 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6666 | $as_echo_n "checking for $ac_word... " >&6; } | |
6667 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6668 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6669 | else |
6670 | if test -n "$WINDRES"; then | |
6671 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6672 | else | |
6673 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6674 | for as_dir in $PATH | |
6675 | do | |
6676 | IFS=$as_save_IFS | |
6677 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6678 | for ac_exec_ext in '' $ac_executable_extensions; do |
6679 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6680 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6681 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6682 | break 2 |
6683 | fi | |
6684 | done | |
81ecdfbb RW |
6685 | done |
6686 | IFS=$as_save_IFS | |
bec39cab AC |
6687 | |
6688 | fi | |
6689 | fi | |
6690 | WINDRES=$ac_cv_prog_WINDRES | |
6691 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6693 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6694 | else |
81ecdfbb RW |
6695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6696 | $as_echo "no" >&6; } | |
bec39cab AC |
6697 | fi |
6698 | ||
81ecdfbb | 6699 | |
bec39cab AC |
6700 | fi |
6701 | if test -z "$ac_cv_prog_WINDRES"; then | |
6702 | ac_ct_WINDRES=$WINDRES | |
6703 | # Extract the first word of "windres", so it can be a program name with args. | |
6704 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6706 | $as_echo_n "checking for $ac_word... " >&6; } | |
6707 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6708 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6709 | else |
6710 | if test -n "$ac_ct_WINDRES"; then | |
6711 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6712 | else | |
6713 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6714 | for as_dir in $PATH | |
6715 | do | |
6716 | IFS=$as_save_IFS | |
6717 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6718 | for ac_exec_ext in '' $ac_executable_extensions; do |
6719 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6720 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6721 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6722 | break 2 |
6723 | fi | |
6724 | done | |
81ecdfbb RW |
6725 | done |
6726 | IFS=$as_save_IFS | |
bec39cab AC |
6727 | |
6728 | fi | |
6729 | fi | |
6730 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6731 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6733 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6734 | else |
81ecdfbb RW |
6735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6736 | $as_echo "no" >&6; } | |
c906108c | 6737 | fi |
bec39cab | 6738 | |
81ecdfbb RW |
6739 | if test "x$ac_ct_WINDRES" = x; then |
6740 | WINDRES="" | |
6741 | else | |
6742 | case $cross_compiling:$ac_tool_warned in | |
6743 | yes:) | |
6744 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6745 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6746 | ac_tool_warned=yes ;; | |
6747 | esac | |
6748 | WINDRES=$ac_ct_WINDRES | |
6749 | fi | |
c906108c | 6750 | else |
bec39cab | 6751 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6752 | fi |
6753 | ||
bec39cab | 6754 | |
036c3acb TS |
6755 | case $host_os in |
6756 | gnu*) | |
6757 | # Needed for GNU Hurd hosts. | |
6758 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
6759 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
6760 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6762 | $as_echo_n "checking for $ac_word... " >&6; } | |
6763 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6764 | $as_echo_n "(cached) " >&6 | |
c906108c | 6765 | else |
bec39cab AC |
6766 | if test -n "$MIG"; then |
6767 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6768 | else | |
6769 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6770 | for as_dir in $PATH | |
6771 | do | |
6772 | IFS=$as_save_IFS | |
6773 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6774 | for ac_exec_ext in '' $ac_executable_extensions; do |
6775 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6776 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6777 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6778 | break 2 |
6779 | fi | |
6780 | done | |
81ecdfbb RW |
6781 | done |
6782 | IFS=$as_save_IFS | |
bec39cab | 6783 | |
c906108c | 6784 | fi |
bec39cab AC |
6785 | fi |
6786 | MIG=$ac_cv_prog_MIG | |
6787 | if test -n "$MIG"; then | |
81ecdfbb RW |
6788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6789 | $as_echo "$MIG" >&6; } | |
c906108c | 6790 | else |
81ecdfbb RW |
6791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6792 | $as_echo "no" >&6; } | |
c906108c SS |
6793 | fi |
6794 | ||
81ecdfbb | 6795 | |
bec39cab AC |
6796 | fi |
6797 | if test -z "$ac_cv_prog_MIG"; then | |
6798 | ac_ct_MIG=$MIG | |
6799 | # Extract the first word of "mig", so it can be a program name with args. | |
6800 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6802 | $as_echo_n "checking for $ac_word... " >&6; } | |
6803 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6804 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6805 | else |
6806 | if test -n "$ac_ct_MIG"; then | |
6807 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6808 | else | |
6809 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6810 | for as_dir in $PATH | |
6811 | do | |
6812 | IFS=$as_save_IFS | |
6813 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6814 | for ac_exec_ext in '' $ac_executable_extensions; do |
6815 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6816 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6817 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6818 | break 2 |
6819 | fi | |
6820 | done | |
81ecdfbb RW |
6821 | done |
6822 | IFS=$as_save_IFS | |
c906108c | 6823 | |
bec39cab AC |
6824 | fi |
6825 | fi | |
6826 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6827 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6829 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6830 | else |
81ecdfbb RW |
6831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6832 | $as_echo "no" >&6; } | |
bec39cab | 6833 | fi |
c906108c | 6834 | |
81ecdfbb RW |
6835 | if test "x$ac_ct_MIG" = x; then |
6836 | MIG="" | |
6837 | else | |
6838 | case $cross_compiling:$ac_tool_warned in | |
6839 | yes:) | |
6840 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6841 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6842 | ac_tool_warned=yes ;; | |
6843 | esac | |
6844 | MIG=$ac_ct_MIG | |
6845 | fi | |
bec39cab AC |
6846 | else |
6847 | MIG="$ac_cv_prog_MIG" | |
6848 | fi | |
c906108c | 6849 | |
036c3acb TS |
6850 | if test x"$MIG" = x; then |
6851 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
6852 | fi | |
6853 | ;; | |
6854 | esac | |
c906108c | 6855 | |
bec39cab AC |
6856 | # ---------------------- # |
6857 | # Checks for libraries. # | |
6858 | # ---------------------- # | |
c906108c | 6859 | |
bec39cab | 6860 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6862 | $as_echo_n "checking for main in -lm... " >&6; } | |
6863 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6864 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6865 | else |
6866 | ac_check_lib_save_LIBS=$LIBS | |
6867 | LIBS="-lm $LIBS" | |
81ecdfbb | 6868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6869 | /* end confdefs.h. */ |
c906108c | 6870 | |
c906108c | 6871 | |
bec39cab AC |
6872 | int |
6873 | main () | |
6874 | { | |
81ecdfbb | 6875 | return main (); |
bec39cab AC |
6876 | ; |
6877 | return 0; | |
6878 | } | |
6879 | _ACEOF | |
81ecdfbb | 6880 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6881 | ac_cv_lib_m_main=yes |
6882 | else | |
81ecdfbb | 6883 | ac_cv_lib_m_main=no |
bec39cab | 6884 | fi |
81ecdfbb RW |
6885 | rm -f core conftest.err conftest.$ac_objext \ |
6886 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6887 | LIBS=$ac_check_lib_save_LIBS |
6888 | fi | |
81ecdfbb RW |
6889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6890 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6891 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6892 | cat >>confdefs.h <<_ACEOF |
6893 | #define HAVE_LIBM 1 | |
6894 | _ACEOF | |
6895 | ||
6896 | LIBS="-lm $LIBS" | |
c906108c | 6897 | |
c906108c | 6898 | fi |
bec39cab AC |
6899 | |
6900 | ||
6901 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6902 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6903 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6904 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6905 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6906 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6907 | |
c906108c | 6908 | else |
81ecdfbb RW |
6909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6910 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6911 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6912 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6913 | else |
6914 | ac_check_lib_save_LIBS=$LIBS | |
6915 | LIBS="-lw $LIBS" | |
81ecdfbb | 6916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6917 | /* end confdefs.h. */ |
c906108c | 6918 | |
81ecdfbb RW |
6919 | /* Override any GCC internal prototype to avoid an error. |
6920 | Use char because int might match the return type of a GCC | |
6921 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6922 | #ifdef __cplusplus |
6923 | extern "C" | |
6924 | #endif | |
bec39cab AC |
6925 | char wctype (); |
6926 | int | |
6927 | main () | |
6928 | { | |
81ecdfbb | 6929 | return wctype (); |
bec39cab AC |
6930 | ; |
6931 | return 0; | |
6932 | } | |
6933 | _ACEOF | |
81ecdfbb | 6934 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6935 | ac_cv_lib_w_wctype=yes |
6936 | else | |
81ecdfbb | 6937 | ac_cv_lib_w_wctype=no |
bec39cab | 6938 | fi |
81ecdfbb RW |
6939 | rm -f core conftest.err conftest.$ac_objext \ |
6940 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6941 | LIBS=$ac_check_lib_save_LIBS |
6942 | fi | |
81ecdfbb RW |
6943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6944 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6945 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6946 | cat >>confdefs.h <<_ACEOF |
6947 | #define HAVE_LIBW 1 | |
6948 | _ACEOF | |
c906108c | 6949 | |
bec39cab | 6950 | LIBS="-lw $LIBS" |
c906108c | 6951 | |
bec39cab | 6952 | fi |
c906108c | 6953 | |
bec39cab | 6954 | fi |
c906108c | 6955 | |
ddc9cd0f | 6956 | |
bec39cab | 6957 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6959 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6960 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6961 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6962 | else |
6963 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6965 | /* end confdefs.h. */ |
ddc9cd0f | 6966 | |
81ecdfbb RW |
6967 | /* Override any GCC internal prototype to avoid an error. |
6968 | Use char because int might match the return type of a GCC | |
6969 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6970 | #ifdef __cplusplus |
6971 | extern "C" | |
6972 | #endif | |
bec39cab AC |
6973 | char gethostbyname (); |
6974 | int | |
6975 | main () | |
6976 | { | |
81ecdfbb | 6977 | return gethostbyname (); |
bec39cab AC |
6978 | ; |
6979 | return 0; | |
6980 | } | |
6981 | _ACEOF | |
81ecdfbb RW |
6982 | for ac_lib in '' nsl; do |
6983 | if test -z "$ac_lib"; then | |
6984 | ac_res="none required" | |
6985 | else | |
6986 | ac_res=-l$ac_lib | |
b4e70030 | 6987 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6988 | fi |
6989 | if ac_fn_c_try_link "$LINENO"; then : | |
6990 | ac_cv_search_gethostbyname=$ac_res | |
6991 | fi | |
6992 | rm -f core conftest.err conftest.$ac_objext \ | |
6993 | conftest$ac_exeext | |
6994 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6995 | break | |
6996 | fi | |
6997 | done | |
6998 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6999 | |
bec39cab | 7000 | else |
81ecdfbb | 7001 | ac_cv_search_gethostbyname=no |
bec39cab | 7002 | fi |
81ecdfbb | 7003 | rm conftest.$ac_ext |
bec39cab AC |
7004 | LIBS=$ac_func_search_save_LIBS |
7005 | fi | |
81ecdfbb RW |
7006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
7007 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
7008 | ac_res=$ac_cv_search_gethostbyname | |
7009 | if test "$ac_res" != no; then : | |
7010 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 7011 | |
bec39cab | 7012 | fi |
96baa820 | 7013 | |
c906108c | 7014 | |
b4e70030 | 7015 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
7016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
7017 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
7018 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7019 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
7020 | else |
7021 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7023 | /* end confdefs.h. */ |
7024 | ||
81ecdfbb RW |
7025 | /* Override any GCC internal prototype to avoid an error. |
7026 | Use char because int might match the return type of a GCC | |
7027 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
7028 | #ifdef __cplusplus |
7029 | extern "C" | |
7030 | #endif | |
b4e70030 JB |
7031 | char socketpair (); |
7032 | int | |
7033 | main () | |
7034 | { | |
81ecdfbb | 7035 | return socketpair (); |
b4e70030 JB |
7036 | ; |
7037 | return 0; | |
7038 | } | |
7039 | _ACEOF | |
81ecdfbb RW |
7040 | for ac_lib in '' socket; do |
7041 | if test -z "$ac_lib"; then | |
7042 | ac_res="none required" | |
7043 | else | |
7044 | ac_res=-l$ac_lib | |
b4e70030 | 7045 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7046 | fi |
7047 | if ac_fn_c_try_link "$LINENO"; then : | |
7048 | ac_cv_search_socketpair=$ac_res | |
7049 | fi | |
7050 | rm -f core conftest.err conftest.$ac_objext \ | |
7051 | conftest$ac_exeext | |
7052 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7053 | break | |
7054 | fi | |
7055 | done | |
7056 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 7057 | |
b4e70030 | 7058 | else |
81ecdfbb | 7059 | ac_cv_search_socketpair=no |
b4e70030 | 7060 | fi |
81ecdfbb | 7061 | rm conftest.$ac_ext |
b4e70030 JB |
7062 | LIBS=$ac_func_search_save_LIBS |
7063 | fi | |
81ecdfbb RW |
7064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7065 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7066 | ac_res=$ac_cv_search_socketpair | |
7067 | if test "$ac_res" != no; then : | |
7068 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7069 | |
7070 | fi | |
7071 | ||
7072 | ||
233a11ab | 7073 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 7074 | |
711a72d3 | 7075 | # Use the system's zlib library. |
39f3de7c L |
7076 | zlibdir="-L\$(top_builddir)/../zlib" |
7077 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 7078 | |
711a72d3 L |
7079 | # Check whether --with-system-zlib was given. |
7080 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
7081 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
7082 | zlibdir= | |
7083 | zlibinc= | |
7084 | fi | |
b040ad30 | 7085 | |
233a11ab | 7086 | fi |
233a11ab | 7087 | |
233a11ab | 7088 | |
233a11ab | 7089 | |
b040ad30 | 7090 | |
233a11ab | 7091 | |
25268153 JB |
7092 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
7093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 | |
7094 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
7095 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7096 | $as_echo_n "(cached) " >&6 | |
7097 | else | |
7098 | ac_func_search_save_LIBS=$LIBS | |
7099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7100 | /* end confdefs.h. */ | |
7101 | ||
7102 | /* Override any GCC internal prototype to avoid an error. | |
7103 | Use char because int might match the return type of a GCC | |
7104 | builtin and then its argument prototype would still apply. */ | |
7105 | #ifdef __cplusplus | |
7106 | extern "C" | |
7107 | #endif | |
7108 | char kinfo_getvmmap (); | |
7109 | int | |
7110 | main () | |
7111 | { | |
7112 | return kinfo_getvmmap (); | |
7113 | ; | |
7114 | return 0; | |
7115 | } | |
7116 | _ACEOF | |
7117 | for ac_lib in '' util; do | |
7118 | if test -z "$ac_lib"; then | |
7119 | ac_res="none required" | |
7120 | else | |
7121 | ac_res=-l$ac_lib | |
7122 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7123 | fi | |
7124 | if ac_fn_c_try_link "$LINENO"; then : | |
7125 | ac_cv_search_kinfo_getvmmap=$ac_res | |
7126 | fi | |
7127 | rm -f core conftest.err conftest.$ac_objext \ | |
7128 | conftest$ac_exeext | |
7129 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7130 | break | |
7131 | fi | |
7132 | done | |
7133 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7134 | ||
7135 | else | |
7136 | ac_cv_search_kinfo_getvmmap=no | |
7137 | fi | |
7138 | rm conftest.$ac_ext | |
7139 | LIBS=$ac_func_search_save_LIBS | |
7140 | fi | |
7141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
7142 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
7143 | ac_res=$ac_cv_search_kinfo_getvmmap | |
7144 | if test "$ac_res" != no; then : | |
7145 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7146 | ||
7147 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
7148 | ||
7149 | fi | |
7150 | ||
7151 | ||
77f120bf | 7152 | |
77f120bf | 7153 | |
6c7a06a3 | 7154 | |
81ecdfbb RW |
7155 | # Check whether --with-libiconv-prefix was given. |
7156 | if test "${with_libiconv_prefix+set}" = set; then : | |
7157 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 7158 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
7159 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
7160 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
7161 | done |
7162 | ||
81ecdfbb RW |
7163 | fi |
7164 | ||
6c7a06a3 | 7165 | |
f18c4681 | 7166 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
7167 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
7168 | ||
81ecdfbb RW |
7169 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
7170 | $as_echo_n "checking for iconv... " >&6; } | |
7171 | if test "${am_cv_func_iconv+set}" = set; then : | |
7172 | $as_echo_n "(cached) " >&6 | |
d542061a | 7173 | else |
6c7a06a3 TT |
7174 | |
7175 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
7176 | am_cv_lib_iconv=no | |
7177 | am_cv_use_build_libiconv=no | |
f0f20949 | 7178 | am_cv_build_libiconv_path= |
4edb1e84 JB |
7179 | |
7180 | # If libiconv is part of the build tree, then try using it over | |
7181 | # any system iconv. | |
7182 | if test -d ../libiconv; then | |
f18c4681 JB |
7183 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
7184 | am_save_LIBS="$LIBS" | |
7185 | am_save_CPPFLAGS="$CPPFLAGS" | |
7186 | LIBS="$LIBS $lib_dir/libiconv.a" | |
7187 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
7188 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 7189 | /* end confdefs.h. */ |
6c7a06a3 TT |
7190 | #include <stdlib.h> |
7191 | #include <iconv.h> | |
d542061a UW |
7192 | int |
7193 | main () | |
7194 | { | |
6c7a06a3 | 7195 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
7196 | iconv(cd,NULL,NULL,NULL,NULL); |
7197 | iconv_close(cd); | |
d542061a UW |
7198 | ; |
7199 | return 0; | |
7200 | } | |
7201 | _ACEOF | |
81ecdfbb | 7202 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 7203 | am_cv_use_build_libiconv=yes |
f0f20949 | 7204 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
7205 | am_cv_lib_iconv=yes |
7206 | am_cv_func_iconv=yes | |
d542061a | 7207 | fi |
81ecdfbb RW |
7208 | rm -f core conftest.err conftest.$ac_objext \ |
7209 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
7210 | LIBS="$am_save_LIBS" |
7211 | CPPFLAGS="$am_save_CPPFLAGS" | |
7212 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
7213 | break |
7214 | fi | |
7215 | done | |
4edb1e84 | 7216 | fi |
94ae1714 | 7217 | |
4edb1e84 | 7218 | # Next, try to find iconv in libc. |
6c7a06a3 | 7219 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 7220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 7221 | /* end confdefs.h. */ |
6c7a06a3 TT |
7222 | #include <stdlib.h> |
7223 | #include <iconv.h> | |
d542061a UW |
7224 | int |
7225 | main () | |
7226 | { | |
6c7a06a3 TT |
7227 | iconv_t cd = iconv_open("",""); |
7228 | iconv(cd,NULL,NULL,NULL,NULL); | |
7229 | iconv_close(cd); | |
d542061a UW |
7230 | ; |
7231 | return 0; | |
7232 | } | |
7233 | _ACEOF | |
81ecdfbb | 7234 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 7235 | am_cv_func_iconv=yes |
d542061a | 7236 | fi |
81ecdfbb RW |
7237 | rm -f core conftest.err conftest.$ac_objext \ |
7238 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 7239 | fi |
94ae1714 | 7240 | |
4edb1e84 JB |
7241 | # If iconv was not in libc, try -liconv. In this case, arrange to |
7242 | # look in the libiconv prefix, if it was specified by the user. | |
7243 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 7244 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
7245 | am_save_LIBS="$LIBS" |
7246 | if test -n "$LIBICONV_INCLUDE"; then | |
7247 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
7248 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
7249 | fi | |
7250 | LIBS="$LIBS -liconv" | |
81ecdfbb | 7251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7252 | /* end confdefs.h. */ |
6c7a06a3 TT |
7253 | #include <stdlib.h> |
7254 | #include <iconv.h> | |
bec39cab AC |
7255 | int |
7256 | main () | |
7257 | { | |
6c7a06a3 TT |
7258 | iconv_t cd = iconv_open("",""); |
7259 | iconv(cd,NULL,NULL,NULL,NULL); | |
7260 | iconv_close(cd); | |
bec39cab AC |
7261 | ; |
7262 | return 0; | |
7263 | } | |
7264 | _ACEOF | |
81ecdfbb | 7265 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 7266 | am_cv_lib_iconv=yes |
6c7a06a3 | 7267 | am_cv_func_iconv=yes |
627af7ea | 7268 | fi |
81ecdfbb RW |
7269 | rm -f core conftest.err conftest.$ac_objext \ |
7270 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 7271 | LIBS="$am_save_LIBS" |
fc3b640d | 7272 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
7273 | fi |
7274 | ||
7275 | fi | |
81ecdfbb RW |
7276 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
7277 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
7278 | |
7279 | # Set the various flags based on the cache variables. We can't rely | |
7280 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
7281 | LIBICONV= |
7282 | if test "$am_cv_lib_iconv" = yes; then | |
7283 | LIBICONV="-liconv" | |
94ae1714 TT |
7284 | else |
7285 | LIBICONV_LIBDIR= | |
7286 | LIBICONV_INCLUDE= | |
fc3b640d TT |
7287 | fi |
7288 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 7289 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 7290 | LIBICONV_LIBDIR="" |
fc3b640d TT |
7291 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
7292 | fi | |
7293 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
7294 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 7295 | |
6c7a06a3 TT |
7296 | if test "$am_cv_func_iconv" = yes; then |
7297 | ||
81ecdfbb | 7298 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 7299 | |
81ecdfbb RW |
7300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
7301 | $as_echo_n "checking for iconv declaration... " >&6; } | |
7302 | if test "${am_cv_proto_iconv+set}" = set; then : | |
7303 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7304 | else |
7305 | ||
81ecdfbb | 7306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7307 | /* end confdefs.h. */ |
7308 | ||
6c7a06a3 TT |
7309 | #include <stdlib.h> |
7310 | #include <iconv.h> | |
7311 | extern | |
b4e70030 | 7312 | #ifdef __cplusplus |
6c7a06a3 | 7313 | "C" |
b4e70030 | 7314 | #endif |
6c7a06a3 TT |
7315 | #if defined(__STDC__) || defined(__cplusplus) |
7316 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
7317 | #else | |
7318 | size_t iconv(); | |
7319 | #endif | |
7320 | ||
b4e70030 JB |
7321 | int |
7322 | main () | |
7323 | { | |
6c7a06a3 | 7324 | |
b4e70030 JB |
7325 | ; |
7326 | return 0; | |
7327 | } | |
7328 | _ACEOF | |
81ecdfbb | 7329 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 7330 | am_cv_proto_iconv_arg1="" |
4e8d927d | 7331 | else |
81ecdfbb | 7332 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 7333 | fi |
81ecdfbb | 7334 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
7335 | 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);" |
7336 | fi | |
7337 | ||
7338 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 7339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 7340 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
7341 | $as_echo "${ac_t:- |
7342 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
7343 | |
7344 | cat >>confdefs.h <<_ACEOF | |
7345 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
7346 | _ACEOF | |
7347 | ||
7348 | fi | |
6c7a06a3 TT |
7349 | |
7350 | ||
478aac75 DE |
7351 | # GDB may fork/exec the iconv program to get the list of supported character |
7352 | # sets. Allow the user to specify where to find it. | |
7353 | # There are several factors affecting the choice of option name: | |
7354 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
7355 | # the build-time location of libiconv files. | |
7356 | # - The program we need to find is iconv, which comes with glibc. The user | |
7357 | # doesn't necessarily have libiconv installed. Therefore naming this | |
7358 | # --with-libiconv-foo feels wrong. | |
7359 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
7360 | # defined to work on directories not files (though it really doesn't know | |
7361 | # the difference). | |
7362 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
7363 | # with --with-libiconv-prefix. | |
7364 | # Putting these together is why the option name is --with-iconv-bin. | |
7365 | ||
7366 | ||
7367 | # Check whether --with-iconv-bin was given. | |
7368 | if test "${with_iconv_bin+set}" = set; then : | |
7369 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
7370 | ||
7371 | cat >>confdefs.h <<_ACEOF | |
7372 | #define ICONV_BIN "${iconv_bin}" | |
7373 | _ACEOF | |
7374 | ||
7375 | ||
7376 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7377 | if test "x$prefix" = xNONE; then | |
7378 | test_prefix=/usr/local | |
7379 | else | |
7380 | test_prefix=$prefix | |
7381 | fi | |
7382 | else | |
7383 | test_prefix=$exec_prefix | |
7384 | fi | |
7385 | value=0 | |
7386 | case ${iconv_bin} in | |
7387 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7388 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7389 | value=1 | |
7390 | ;; | |
7391 | esac | |
7392 | ||
7393 | cat >>confdefs.h <<_ACEOF | |
7394 | #define ICONV_BIN_RELOCATABLE $value | |
7395 | _ACEOF | |
7396 | ||
7397 | ||
7398 | ||
7399 | fi | |
7400 | ||
7401 | ||
cb01cfba | 7402 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 7403 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
7404 | prefer_curses=yes |
7405 | fi | |
7406 | ||
7407 | curses_found=no | |
7408 | if test x"$prefer_curses" = xyes; then | |
7409 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
7410 | # curses library because the latter might not provide all the | |
7411 | # functionality we need. However, this leads to problems on systems | |
7412 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
7413 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
7414 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
7415 | # a situation. | |
81ecdfbb RW |
7416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
7417 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
7418 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7419 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7420 | else |
7421 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
7423 | /* end confdefs.h. */ |
7424 | ||
81ecdfbb RW |
7425 | /* Override any GCC internal prototype to avoid an error. |
7426 | Use char because int might match the return type of a GCC | |
7427 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7428 | #ifdef __cplusplus |
7429 | extern "C" | |
7430 | #endif | |
6c7a06a3 TT |
7431 | char waddstr (); |
7432 | int | |
7433 | main () | |
7434 | { | |
81ecdfbb | 7435 | return waddstr (); |
6c7a06a3 TT |
7436 | ; |
7437 | return 0; | |
7438 | } | |
7439 | _ACEOF | |
81ecdfbb RW |
7440 | for ac_lib in '' ncurses cursesX curses; do |
7441 | if test -z "$ac_lib"; then | |
7442 | ac_res="none required" | |
7443 | else | |
7444 | ac_res=-l$ac_lib | |
7445 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7446 | fi | |
7447 | if ac_fn_c_try_link "$LINENO"; then : | |
7448 | ac_cv_search_waddstr=$ac_res | |
7449 | fi | |
7450 | rm -f core conftest.err conftest.$ac_objext \ | |
7451 | conftest$ac_exeext | |
7452 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7453 | break | |
7454 | fi | |
7455 | done | |
7456 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
7457 | ||
6c7a06a3 | 7458 | else |
81ecdfbb RW |
7459 | ac_cv_search_waddstr=no |
7460 | fi | |
7461 | rm conftest.$ac_ext | |
7462 | LIBS=$ac_func_search_save_LIBS | |
7463 | fi | |
7464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
7465 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
7466 | ac_res=$ac_cv_search_waddstr | |
7467 | if test "$ac_res" != no; then : | |
7468 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
7469 | |
7470 | fi | |
7471 | ||
7472 | ||
cb01cfba JB |
7473 | if test "$ac_cv_search_waddstr" != no; then |
7474 | curses_found=yes | |
7475 | fi | |
7476 | fi | |
7477 | ||
7478 | # Check whether we should enable the TUI, but only do so if we really | |
7479 | # can. | |
7480 | if test x"$enable_tui" != xno; then | |
7481 | if test -d $srcdir/tui; then | |
7482 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
7483 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
7484 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
7485 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
7486 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
7487 | else |
7488 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 7489 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 7490 | else |
81ecdfbb RW |
7491 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
7492 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
7493 | fi |
7494 | fi | |
7495 | fi | |
7496 | fi | |
7497 | ||
7498 | # Since GDB uses Readline, we need termcap functionality. In many | |
7499 | # cases this will be provided by the curses library, but some systems | |
7500 | # have a seperate termcap library, or no curses library at all. | |
7501 | ||
7502 | case $host_os in | |
7503 | cygwin*) | |
7504 | if test -d $srcdir/libtermcap; then | |
7505 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
7506 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
7507 | fi ;; | |
7508 | go32* | *djgpp*) | |
7509 | ac_cv_search_tgetent="none required" | |
7510 | ;; | |
6c7a06a3 TT |
7511 | esac |
7512 | ||
7513 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
7514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
7515 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
7516 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7517 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
7518 | else |
7519 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
7521 | /* end confdefs.h. */ |
7522 | ||
81ecdfbb RW |
7523 | /* Override any GCC internal prototype to avoid an error. |
7524 | Use char because int might match the return type of a GCC | |
7525 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7526 | #ifdef __cplusplus |
7527 | extern "C" | |
7528 | #endif | |
6c7a06a3 TT |
7529 | char tgetent (); |
7530 | int | |
7531 | main () | |
7532 | { | |
81ecdfbb | 7533 | return tgetent (); |
6c7a06a3 TT |
7534 | ; |
7535 | return 0; | |
7536 | } | |
7537 | _ACEOF | |
81ecdfbb RW |
7538 | for ac_lib in '' termcap tinfo curses ncurses; do |
7539 | if test -z "$ac_lib"; then | |
7540 | ac_res="none required" | |
7541 | else | |
7542 | ac_res=-l$ac_lib | |
6c7a06a3 | 7543 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7544 | fi |
7545 | if ac_fn_c_try_link "$LINENO"; then : | |
7546 | ac_cv_search_tgetent=$ac_res | |
7547 | fi | |
7548 | rm -f core conftest.err conftest.$ac_objext \ | |
7549 | conftest$ac_exeext | |
7550 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7551 | break | |
7552 | fi | |
7553 | done | |
7554 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 7555 | |
6c7a06a3 | 7556 | else |
81ecdfbb | 7557 | ac_cv_search_tgetent=no |
6c7a06a3 | 7558 | fi |
81ecdfbb | 7559 | rm conftest.$ac_ext |
6c7a06a3 TT |
7560 | LIBS=$ac_func_search_save_LIBS |
7561 | fi | |
81ecdfbb RW |
7562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7563 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7564 | ac_res=$ac_cv_search_tgetent | |
7565 | if test "$ac_res" != no; then : | |
7566 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7567 | |
06825bd1 MK |
7568 | fi |
7569 | ||
06825bd1 | 7570 | |
bec39cab | 7571 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 7572 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
7573 | fi |
7574 | ||
3841debe | 7575 | |
81ecdfbb RW |
7576 | # Check whether --with-system-readline was given. |
7577 | if test "${with_system_readline+set}" = set; then : | |
7578 | withval=$with_system_readline; | |
7579 | fi | |
6a30b0a5 | 7580 | |
6a30b0a5 AS |
7581 | |
7582 | if test "$with_system_readline" = yes; then | |
7583 | READLINE=-lreadline | |
7584 | READLINE_DEPS= | |
7585 | READLINE_CFLAGS= | |
39037522 | 7586 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7587 | else |
7588 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7589 | READLINE_DEPS='$(READLINE)' | |
7590 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7591 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7592 | fi |
7593 | ||
7594 | ||
7595 | ||
7596 | ||
7597 | ||
f997c383 SD |
7598 | # Generate jit-reader.h |
7599 | ||
7600 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7601 | TARGET_PTR= | |
7602 | ||
7603 | # The cast to long int works around a bug in the HP C Compiler | |
7604 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7605 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7606 | # This bug is HP SR number 8606223364. | |
7607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7608 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7609 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7610 | $as_echo_n "(cached) " >&6 | |
7611 | else | |
7612 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7613 | ||
7614 | else | |
7615 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7616 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7617 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7618 | { as_fn_set_status 77 | |
7619 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7620 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7621 | else | |
7622 | ac_cv_sizeof_unsigned_long_long=0 | |
7623 | fi | |
7624 | fi | |
7625 | ||
7626 | fi | |
7627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7628 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7629 | ||
7630 | ||
7631 | ||
7632 | cat >>confdefs.h <<_ACEOF | |
7633 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7634 | _ACEOF | |
7635 | ||
7636 | ||
7637 | # The cast to long int works around a bug in the HP C Compiler | |
7638 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7639 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7640 | # This bug is HP SR number 8606223364. | |
7641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7642 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7643 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7644 | $as_echo_n "(cached) " >&6 | |
7645 | else | |
7646 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7647 | ||
7648 | else | |
7649 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7650 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7651 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7652 | { as_fn_set_status 77 | |
7653 | as_fn_error "cannot compute sizeof (unsigned long) | |
7654 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7655 | else | |
7656 | ac_cv_sizeof_unsigned_long=0 | |
7657 | fi | |
7658 | fi | |
7659 | ||
7660 | fi | |
7661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7662 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7663 | ||
7664 | ||
7665 | ||
7666 | cat >>confdefs.h <<_ACEOF | |
7667 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7668 | _ACEOF | |
7669 | ||
7670 | ||
7671 | # The cast to long int works around a bug in the HP C Compiler | |
7672 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7673 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7674 | # This bug is HP SR number 8606223364. | |
7675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7676 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7677 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7678 | $as_echo_n "(cached) " >&6 | |
7679 | else | |
7680 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7681 | ||
7682 | else | |
7683 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7684 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7685 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7686 | { as_fn_set_status 77 | |
7687 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7688 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7689 | else | |
7690 | ac_cv_sizeof_unsigned___int128=0 | |
7691 | fi | |
7692 | fi | |
7693 | ||
7694 | fi | |
7695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7696 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7697 | ||
7698 | ||
7699 | ||
7700 | cat >>confdefs.h <<_ACEOF | |
7701 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7702 | _ACEOF | |
7703 | ||
7704 | ||
7705 | ||
7706 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7707 | TARGET_PTR="unsigned long" | |
7708 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7709 | TARGET_PTR="unsigned long long" | |
7710 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7711 | TARGET_PTR="unsigned __int128" | |
7712 | else | |
7713 | TARGET_PTR="unsigned long" | |
7714 | fi | |
7715 | ||
7716 | ||
7717 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7718 | ||
7719 | ||
a2d08b9e SD |
7720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7721 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7722 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7723 | $as_echo_n "(cached) " >&6 | |
7724 | else | |
7725 | ac_func_search_save_LIBS=$LIBS | |
7726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7727 | /* end confdefs.h. */ | |
7728 | ||
7729 | /* Override any GCC internal prototype to avoid an error. | |
7730 | Use char because int might match the return type of a GCC | |
7731 | builtin and then its argument prototype would still apply. */ | |
7732 | #ifdef __cplusplus | |
7733 | extern "C" | |
7734 | #endif | |
7735 | char dlopen (); | |
7736 | int | |
7737 | main () | |
7738 | { | |
7739 | return dlopen (); | |
7740 | ; | |
7741 | return 0; | |
7742 | } | |
7743 | _ACEOF | |
7744 | for ac_lib in '' dl; do | |
7745 | if test -z "$ac_lib"; then | |
7746 | ac_res="none required" | |
7747 | else | |
7748 | ac_res=-l$ac_lib | |
7749 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7750 | fi | |
7751 | if ac_fn_c_try_link "$LINENO"; then : | |
7752 | ac_cv_search_dlopen=$ac_res | |
7753 | fi | |
7754 | rm -f core conftest.err conftest.$ac_objext \ | |
7755 | conftest$ac_exeext | |
7756 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7757 | break | |
7758 | fi | |
7759 | done | |
7760 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7761 | ||
7762 | else | |
7763 | ac_cv_search_dlopen=no | |
7764 | fi | |
7765 | rm conftest.$ac_ext | |
7766 | LIBS=$ac_func_search_save_LIBS | |
7767 | fi | |
7768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7769 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7770 | ac_res=$ac_cv_search_dlopen | |
7771 | if test "$ac_res" != no; then : | |
7772 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7773 | ||
7774 | fi | |
7775 | ||
7776 | ||
39037522 | 7777 | |
b8e0a31c SD |
7778 | |
7779 | # Check whether --with-jit-reader-dir was given. | |
7780 | if test "${with_jit_reader_dir+set}" = set; then : | |
7781 | withval=$with_jit_reader_dir; | |
7782 | JIT_READER_DIR=$withval | |
7783 | else | |
7784 | JIT_READER_DIR=${libdir}/gdb | |
7785 | fi | |
7786 | ||
7787 | ||
7788 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7789 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7790 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7791 | ac_define_dir=`eval echo $ac_define_dir` | |
7792 | ||
7793 | cat >>confdefs.h <<_ACEOF | |
7794 | #define JIT_READER_DIR "$ac_define_dir" | |
7795 | _ACEOF | |
7796 | ||
7797 | ||
7798 | ||
7799 | ||
7800 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7801 | if test "x$prefix" = xNONE; then | |
7802 | test_prefix=/usr/local | |
7803 | else | |
7804 | test_prefix=$prefix | |
7805 | fi | |
7806 | else | |
7807 | test_prefix=$exec_prefix | |
7808 | fi | |
7809 | value=0 | |
7810 | case ${ac_define_dir} in | |
7811 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7812 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7813 | value=1 | |
7814 | ;; | |
7815 | esac | |
7816 | ||
7817 | cat >>confdefs.h <<_ACEOF | |
7818 | #define JIT_READER_DIR_RELOCATABLE $value | |
7819 | _ACEOF | |
7820 | ||
7821 | ||
7822 | ||
7823 | ||
7824 | ||
81ecdfbb RW |
7825 | # Check whether --with-expat was given. |
7826 | if test "${with_expat+set}" = set; then : | |
7827 | withval=$with_expat; | |
5c39566f DJ |
7828 | else |
7829 | with_expat=auto | |
81ecdfbb RW |
7830 | fi |
7831 | ||
7832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7833 | $as_echo_n "checking whether to use expat... " >&6; } | |
7834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7835 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7836 | |
7837 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7838 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7839 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7840 | HAVE_LIBEXPAT=no |
7841 | else | |
7842 | ||
3841debe DJ |
7843 | if test "X$prefix" = "XNONE"; then |
7844 | acl_final_prefix="$ac_default_prefix" | |
7845 | else | |
7846 | acl_final_prefix="$prefix" | |
7847 | fi | |
7848 | if test "X$exec_prefix" = "XNONE"; then | |
7849 | acl_final_exec_prefix='${prefix}' | |
7850 | else | |
7851 | acl_final_exec_prefix="$exec_prefix" | |
7852 | fi | |
7853 | acl_save_prefix="$prefix" | |
7854 | prefix="$acl_final_prefix" | |
7855 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7856 | prefix="$acl_save_prefix" | |
7857 | ||
7858 | ||
81ecdfbb RW |
7859 | # Check whether --with-gnu-ld was given. |
7860 | if test "${with_gnu_ld+set}" = set; then : | |
7861 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7862 | else |
7863 | with_gnu_ld=no | |
81ecdfbb RW |
7864 | fi |
7865 | ||
3841debe DJ |
7866 | # Prepare PATH_SEPARATOR. |
7867 | # The user is always right. | |
7868 | if test "${PATH_SEPARATOR+set}" != set; then | |
7869 | echo "#! /bin/sh" >conf$$.sh | |
7870 | echo "exit 0" >>conf$$.sh | |
7871 | chmod +x conf$$.sh | |
7872 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7873 | PATH_SEPARATOR=';' | |
7874 | else | |
7875 | PATH_SEPARATOR=: | |
7876 | fi | |
7877 | rm -f conf$$.sh | |
7878 | fi | |
7879 | ac_prog=ld | |
7880 | if test "$GCC" = yes; then | |
7881 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7883 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7884 | case $host in |
7885 | *-*-mingw*) | |
7886 | # gcc leaves a trailing carriage return which upsets mingw | |
7887 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7888 | *) | |
7889 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7890 | esac | |
7891 | case $ac_prog in | |
7892 | # Accept absolute paths. | |
7893 | [\\/]* | [A-Za-z]:[\\/]*) | |
7894 | re_direlt='/[^/][^/]*/\.\./' | |
7895 | # Canonicalize the path of ld | |
7896 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7897 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7898 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7899 | done | |
7900 | test -z "$LD" && LD="$ac_prog" | |
7901 | ;; | |
7902 | "") | |
7903 | # If it fails, then pretend we aren't using GCC. | |
7904 | ac_prog=ld | |
7905 | ;; | |
7906 | *) | |
7907 | # If it is relative, then search for the first ld in PATH. | |
7908 | with_gnu_ld=unknown | |
7909 | ;; | |
7910 | esac | |
7911 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7913 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7914 | else |
81ecdfbb RW |
7915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7916 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7917 | fi |
81ecdfbb RW |
7918 | if test "${acl_cv_path_LD+set}" = set; then : |
7919 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7920 | else |
7921 | if test -z "$LD"; then | |
7922 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7923 | for ac_dir in $PATH; do | |
7924 | test -z "$ac_dir" && ac_dir=. | |
7925 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7926 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7927 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7928 | # but apparently some GNU ld's only accept -v. | |
7929 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7930 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7931 | test "$with_gnu_ld" != no && break | |
7932 | else | |
7933 | test "$with_gnu_ld" != yes && break | |
7934 | fi | |
7935 | fi | |
7936 | done | |
7937 | IFS="$ac_save_ifs" | |
7938 | else | |
7939 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7940 | fi | |
7941 | fi | |
7942 | ||
7943 | LD="$acl_cv_path_LD" | |
7944 | if test -n "$LD"; then | |
81ecdfbb RW |
7945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7946 | $as_echo "$LD" >&6; } | |
3841debe | 7947 | else |
81ecdfbb RW |
7948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7949 | $as_echo "no" >&6; } | |
3841debe | 7950 | fi |
81ecdfbb RW |
7951 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7953 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7954 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7955 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7956 | else |
7957 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7958 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7959 | acl_cv_prog_gnu_ld=yes | |
7960 | else | |
7961 | acl_cv_prog_gnu_ld=no | |
7962 | fi | |
7963 | fi | |
81ecdfbb RW |
7964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7965 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7966 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7967 | ||
7968 | ||
7969 | ||
81ecdfbb RW |
7970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7971 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7972 | if test "${acl_cv_rpath+set}" = set; then : | |
7973 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7974 | else |
7975 | ||
7976 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7977 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7978 | . ./conftest.sh | |
7979 | rm -f ./conftest.sh | |
7980 | acl_cv_rpath=done | |
7981 | ||
7982 | fi | |
81ecdfbb RW |
7983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7984 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7985 | wl="$acl_cv_wl" |
7986 | libext="$acl_cv_libext" | |
7987 | shlibext="$acl_cv_shlibext" | |
7988 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7989 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7990 | hardcode_direct="$acl_cv_hardcode_direct" | |
7991 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7992 | # Check whether --enable-rpath was given. |
7993 | if test "${enable_rpath+set}" = set; then : | |
7994 | enableval=$enable_rpath; : | |
3841debe DJ |
7995 | else |
7996 | enable_rpath=yes | |
81ecdfbb RW |
7997 | fi |
7998 | ||
3841debe DJ |
7999 | |
8000 | ||
8001 | ||
8002 | ||
8003 | ||
8004 | ||
8005 | ||
8006 | ||
8007 | ||
8008 | use_additional=yes | |
8009 | ||
8010 | acl_save_prefix="$prefix" | |
8011 | prefix="$acl_final_prefix" | |
8012 | acl_save_exec_prefix="$exec_prefix" | |
8013 | exec_prefix="$acl_final_exec_prefix" | |
8014 | ||
8015 | eval additional_includedir=\"$includedir\" | |
8016 | eval additional_libdir=\"$libdir\" | |
8017 | ||
8018 | exec_prefix="$acl_save_exec_prefix" | |
8019 | prefix="$acl_save_prefix" | |
8020 | ||
8021 | ||
81ecdfbb RW |
8022 | # Check whether --with-libexpat-prefix was given. |
8023 | if test "${with_libexpat_prefix+set}" = set; then : | |
8024 | withval=$with_libexpat_prefix; | |
3841debe DJ |
8025 | if test "X$withval" = "Xno"; then |
8026 | use_additional=no | |
8027 | else | |
8028 | if test "X$withval" = "X"; then | |
8029 | ||
8030 | acl_save_prefix="$prefix" | |
8031 | prefix="$acl_final_prefix" | |
8032 | acl_save_exec_prefix="$exec_prefix" | |
8033 | exec_prefix="$acl_final_exec_prefix" | |
8034 | ||
8035 | eval additional_includedir=\"$includedir\" | |
8036 | eval additional_libdir=\"$libdir\" | |
8037 | ||
8038 | exec_prefix="$acl_save_exec_prefix" | |
8039 | prefix="$acl_save_prefix" | |
8040 | ||
8041 | else | |
8042 | additional_includedir="$withval/include" | |
8043 | additional_libdir="$withval/lib" | |
8044 | fi | |
8045 | fi | |
8046 | ||
81ecdfbb RW |
8047 | fi |
8048 | ||
3841debe DJ |
8049 | LIBEXPAT= |
8050 | LTLIBEXPAT= | |
8051 | INCEXPAT= | |
8052 | rpathdirs= | |
8053 | ltrpathdirs= | |
8054 | names_already_handled= | |
8055 | names_next_round='expat ' | |
8056 | while test -n "$names_next_round"; do | |
8057 | names_this_round="$names_next_round" | |
8058 | names_next_round= | |
8059 | for name in $names_this_round; do | |
8060 | already_handled= | |
8061 | for n in $names_already_handled; do | |
8062 | if test "$n" = "$name"; then | |
8063 | already_handled=yes | |
8064 | break | |
8065 | fi | |
8066 | done | |
8067 | if test -z "$already_handled"; then | |
8068 | names_already_handled="$names_already_handled $name" | |
8069 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8070 | eval value=\"\$HAVE_LIB$uppername\" | |
8071 | if test -n "$value"; then | |
8072 | if test "$value" = yes; then | |
8073 | eval value=\"\$LIB$uppername\" | |
8074 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
8075 | eval value=\"\$LTLIB$uppername\" | |
8076 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
8077 | else | |
8078 | : | |
8079 | fi | |
8080 | else | |
8081 | found_dir= | |
8082 | found_la= | |
8083 | found_so= | |
8084 | found_a= | |
8085 | if test $use_additional = yes; then | |
8086 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8087 | found_dir="$additional_libdir" | |
8088 | found_so="$additional_libdir/lib$name.$shlibext" | |
8089 | if test -f "$additional_libdir/lib$name.la"; then | |
8090 | found_la="$additional_libdir/lib$name.la" | |
8091 | fi | |
8092 | else | |
8093 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8094 | found_dir="$additional_libdir" | |
8095 | found_a="$additional_libdir/lib$name.$libext" | |
8096 | if test -f "$additional_libdir/lib$name.la"; then | |
8097 | found_la="$additional_libdir/lib$name.la" | |
8098 | fi | |
8099 | fi | |
8100 | fi | |
8101 | fi | |
8102 | if test "X$found_dir" = "X"; then | |
8103 | for x in $LDFLAGS $LTLIBEXPAT; do | |
8104 | ||
8105 | acl_save_prefix="$prefix" | |
8106 | prefix="$acl_final_prefix" | |
8107 | acl_save_exec_prefix="$exec_prefix" | |
8108 | exec_prefix="$acl_final_exec_prefix" | |
8109 | eval x=\"$x\" | |
8110 | exec_prefix="$acl_save_exec_prefix" | |
8111 | prefix="$acl_save_prefix" | |
8112 | ||
8113 | case "$x" in | |
8114 | -L*) | |
8115 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8116 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8117 | found_dir="$dir" | |
8118 | found_so="$dir/lib$name.$shlibext" | |
8119 | if test -f "$dir/lib$name.la"; then | |
8120 | found_la="$dir/lib$name.la" | |
8121 | fi | |
8122 | else | |
8123 | if test -f "$dir/lib$name.$libext"; then | |
8124 | found_dir="$dir" | |
8125 | found_a="$dir/lib$name.$libext" | |
8126 | if test -f "$dir/lib$name.la"; then | |
8127 | found_la="$dir/lib$name.la" | |
8128 | fi | |
8129 | fi | |
8130 | fi | |
8131 | ;; | |
8132 | esac | |
8133 | if test "X$found_dir" != "X"; then | |
8134 | break | |
8135 | fi | |
8136 | done | |
8137 | fi | |
8138 | if test "X$found_dir" != "X"; then | |
8139 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
8140 | if test "X$found_so" != "X"; then | |
8141 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8142 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8143 | else | |
8144 | haveit= | |
8145 | for x in $ltrpathdirs; do | |
8146 | if test "X$x" = "X$found_dir"; then | |
8147 | haveit=yes | |
8148 | break | |
8149 | fi | |
8150 | done | |
8151 | if test -z "$haveit"; then | |
8152 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8153 | fi | |
8154 | if test "$hardcode_direct" = yes; then | |
8155 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8156 | else | |
8157 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8158 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8159 | haveit= | |
8160 | for x in $rpathdirs; do | |
8161 | if test "X$x" = "X$found_dir"; then | |
8162 | haveit=yes | |
8163 | break | |
8164 | fi | |
8165 | done | |
8166 | if test -z "$haveit"; then | |
8167 | rpathdirs="$rpathdirs $found_dir" | |
8168 | fi | |
8169 | else | |
8170 | haveit= | |
8171 | for x in $LDFLAGS $LIBEXPAT; do | |
8172 | ||
8173 | acl_save_prefix="$prefix" | |
8174 | prefix="$acl_final_prefix" | |
8175 | acl_save_exec_prefix="$exec_prefix" | |
8176 | exec_prefix="$acl_final_exec_prefix" | |
8177 | eval x=\"$x\" | |
8178 | exec_prefix="$acl_save_exec_prefix" | |
8179 | prefix="$acl_save_prefix" | |
8180 | ||
8181 | if test "X$x" = "X-L$found_dir"; then | |
8182 | haveit=yes | |
8183 | break | |
8184 | fi | |
8185 | done | |
8186 | if test -z "$haveit"; then | |
8187 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
8188 | fi | |
8189 | if test "$hardcode_minus_L" != no; then | |
8190 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8191 | else | |
8192 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
8193 | fi | |
8194 | fi | |
8195 | fi | |
8196 | fi | |
8197 | else | |
8198 | if test "X$found_a" != "X"; then | |
8199 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
8200 | else | |
8201 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
8202 | fi | |
8203 | fi | |
8204 | additional_includedir= | |
8205 | case "$found_dir" in | |
8206 | */lib | */lib/) | |
8207 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8208 | additional_includedir="$basedir/include" | |
8209 | ;; | |
8210 | esac | |
8211 | if test "X$additional_includedir" != "X"; then | |
8212 | if test "X$additional_includedir" != "X/usr/include"; then | |
8213 | haveit= | |
8214 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8215 | if test -n "$GCC"; then | |
8216 | case $host_os in | |
8217 | linux*) haveit=yes;; | |
8218 | esac | |
8219 | fi | |
8220 | fi | |
8221 | if test -z "$haveit"; then | |
8222 | for x in $CPPFLAGS $INCEXPAT; do | |
8223 | ||
8224 | acl_save_prefix="$prefix" | |
8225 | prefix="$acl_final_prefix" | |
8226 | acl_save_exec_prefix="$exec_prefix" | |
8227 | exec_prefix="$acl_final_exec_prefix" | |
8228 | eval x=\"$x\" | |
8229 | exec_prefix="$acl_save_exec_prefix" | |
8230 | prefix="$acl_save_prefix" | |
8231 | ||
8232 | if test "X$x" = "X-I$additional_includedir"; then | |
8233 | haveit=yes | |
8234 | break | |
8235 | fi | |
8236 | done | |
8237 | if test -z "$haveit"; then | |
8238 | if test -d "$additional_includedir"; then | |
8239 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
8240 | fi | |
8241 | fi | |
8242 | fi | |
8243 | fi | |
8244 | fi | |
8245 | if test -n "$found_la"; then | |
8246 | save_libdir="$libdir" | |
8247 | case "$found_la" in | |
8248 | */* | *\\*) . "$found_la" ;; | |
8249 | *) . "./$found_la" ;; | |
8250 | esac | |
8251 | libdir="$save_libdir" | |
8252 | for dep in $dependency_libs; do | |
8253 | case "$dep" in | |
8254 | -L*) | |
8255 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8256 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8257 | haveit= | |
8258 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8259 | if test -n "$GCC"; then | |
8260 | case $host_os in | |
8261 | linux*) haveit=yes;; | |
8262 | esac | |
8263 | fi | |
8264 | fi | |
8265 | if test -z "$haveit"; then | |
8266 | haveit= | |
8267 | for x in $LDFLAGS $LIBEXPAT; do | |
8268 | ||
8269 | acl_save_prefix="$prefix" | |
8270 | prefix="$acl_final_prefix" | |
8271 | acl_save_exec_prefix="$exec_prefix" | |
8272 | exec_prefix="$acl_final_exec_prefix" | |
8273 | eval x=\"$x\" | |
8274 | exec_prefix="$acl_save_exec_prefix" | |
8275 | prefix="$acl_save_prefix" | |
8276 | ||
8277 | if test "X$x" = "X-L$additional_libdir"; then | |
8278 | haveit=yes | |
8279 | break | |
8280 | fi | |
8281 | done | |
8282 | if test -z "$haveit"; then | |
8283 | if test -d "$additional_libdir"; then | |
8284 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
8285 | fi | |
8286 | fi | |
8287 | haveit= | |
8288 | for x in $LDFLAGS $LTLIBEXPAT; do | |
8289 | ||
8290 | acl_save_prefix="$prefix" | |
8291 | prefix="$acl_final_prefix" | |
8292 | acl_save_exec_prefix="$exec_prefix" | |
8293 | exec_prefix="$acl_final_exec_prefix" | |
8294 | eval x=\"$x\" | |
8295 | exec_prefix="$acl_save_exec_prefix" | |
8296 | prefix="$acl_save_prefix" | |
8297 | ||
8298 | if test "X$x" = "X-L$additional_libdir"; then | |
8299 | haveit=yes | |
8300 | break | |
8301 | fi | |
8302 | done | |
8303 | if test -z "$haveit"; then | |
8304 | if test -d "$additional_libdir"; then | |
8305 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
8306 | fi | |
8307 | fi | |
8308 | fi | |
8309 | fi | |
8310 | ;; | |
8311 | -R*) | |
8312 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8313 | if test "$enable_rpath" != no; then | |
8314 | haveit= | |
8315 | for x in $rpathdirs; do | |
8316 | if test "X$x" = "X$dir"; then | |
8317 | haveit=yes | |
8318 | break | |
8319 | fi | |
8320 | done | |
8321 | if test -z "$haveit"; then | |
8322 | rpathdirs="$rpathdirs $dir" | |
8323 | fi | |
8324 | haveit= | |
8325 | for x in $ltrpathdirs; do | |
8326 | if test "X$x" = "X$dir"; then | |
8327 | haveit=yes | |
8328 | break | |
8329 | fi | |
8330 | done | |
8331 | if test -z "$haveit"; then | |
8332 | ltrpathdirs="$ltrpathdirs $dir" | |
8333 | fi | |
8334 | fi | |
8335 | ;; | |
8336 | -l*) | |
8337 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8338 | ;; | |
8339 | *.la) | |
8340 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8341 | ;; | |
8342 | *) | |
8343 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
8344 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
8345 | ;; | |
81ecdfbb RW |
8346 | esac |
8347 | done | |
8348 | fi | |
8349 | else | |
8350 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
8351 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
8352 | fi | |
8353 | fi | |
8354 | fi | |
8355 | done | |
8356 | done | |
8357 | if test "X$rpathdirs" != "X"; then | |
8358 | if test -n "$hardcode_libdir_separator"; then | |
8359 | alldirs= | |
8360 | for found_dir in $rpathdirs; do | |
8361 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8362 | done | |
8363 | acl_save_libdir="$libdir" | |
8364 | libdir="$alldirs" | |
8365 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8366 | libdir="$acl_save_libdir" | |
8367 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
8368 | else | |
8369 | for found_dir in $rpathdirs; do | |
8370 | acl_save_libdir="$libdir" | |
8371 | libdir="$found_dir" | |
8372 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8373 | libdir="$acl_save_libdir" | |
8374 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
8375 | done | |
8376 | fi | |
8377 | fi | |
8378 | if test "X$ltrpathdirs" != "X"; then | |
8379 | for found_dir in $ltrpathdirs; do | |
8380 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
8381 | done | |
8382 | fi | |
a9322a30 TT |
8383 | |
8384 | ||
81ecdfbb | 8385 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 8386 | |
81ecdfbb RW |
8387 | for element in $INCEXPAT; do |
8388 | haveit= | |
8389 | for x in $CPPFLAGS; do | |
a9322a30 | 8390 | |
81ecdfbb RW |
8391 | acl_save_prefix="$prefix" |
8392 | prefix="$acl_final_prefix" | |
8393 | acl_save_exec_prefix="$exec_prefix" | |
8394 | exec_prefix="$acl_final_exec_prefix" | |
8395 | eval x=\"$x\" | |
8396 | exec_prefix="$acl_save_exec_prefix" | |
8397 | prefix="$acl_save_prefix" | |
a8111142 | 8398 | |
81ecdfbb RW |
8399 | if test "X$x" = "X$element"; then |
8400 | haveit=yes | |
8401 | break | |
8402 | fi | |
8403 | done | |
8404 | if test -z "$haveit"; then | |
8405 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8406 | fi | |
8407 | done | |
a9322a30 TT |
8408 | |
8409 | ||
81ecdfbb RW |
8410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
8411 | $as_echo_n "checking for libexpat... " >&6; } | |
8412 | if test "${ac_cv_libexpat+set}" = set; then : | |
8413 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8414 | else |
bec39cab | 8415 | |
81ecdfbb RW |
8416 | ac_save_LIBS="$LIBS" |
8417 | LIBS="$LIBS $LIBEXPAT" | |
8418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8419 | /* end confdefs.h. */ |
81ecdfbb RW |
8420 | #include "expat.h" |
8421 | int | |
8422 | main () | |
8423 | { | |
8424 | XML_Parser p = XML_ParserCreate (0); | |
8425 | ; | |
8426 | return 0; | |
8427 | } | |
bec39cab | 8428 | _ACEOF |
81ecdfbb RW |
8429 | if ac_fn_c_try_link "$LINENO"; then : |
8430 | ac_cv_libexpat=yes | |
c906108c | 8431 | else |
81ecdfbb | 8432 | ac_cv_libexpat=no |
bec39cab | 8433 | fi |
81ecdfbb RW |
8434 | rm -f core conftest.err conftest.$ac_objext \ |
8435 | conftest$ac_exeext conftest.$ac_ext | |
8436 | LIBS="$ac_save_LIBS" | |
c906108c | 8437 | |
95ca63c4 | 8438 | fi |
81ecdfbb RW |
8439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
8440 | $as_echo "$ac_cv_libexpat" >&6; } | |
8441 | if test "$ac_cv_libexpat" = yes; then | |
8442 | HAVE_LIBEXPAT=yes | |
bec39cab | 8443 | |
81ecdfbb | 8444 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 8445 | |
81ecdfbb RW |
8446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
8447 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
8448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
8449 | $as_echo "$LIBEXPAT" >&6; } | |
8450 | else | |
8451 | HAVE_LIBEXPAT=no | |
8452 | CPPFLAGS="$ac_save_CPPFLAGS" | |
8453 | LIBEXPAT= | |
8454 | LTLIBEXPAT= | |
8455 | fi | |
95ca63c4 CF |
8456 | |
8457 | ||
8458 | ||
7cb9022a MK |
8459 | |
8460 | ||
bec39cab | 8461 | |
81ecdfbb RW |
8462 | if test "$HAVE_LIBEXPAT" != yes; then |
8463 | if test "$with_expat" = yes; then | |
8464 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
8465 | else | |
8466 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
8467 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
8468 | fi | |
8469 | else | |
8470 | save_LIBS=$LIBS | |
8471 | LIBS="$LIBS $LIBEXPAT" | |
8472 | for ac_func in XML_StopParser | |
8473 | do : | |
8474 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
8475 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 8476 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8477 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 8478 | _ACEOF |
95ca63c4 | 8479 | |
bec39cab | 8480 | fi |
bec39cab | 8481 | done |
95ca63c4 | 8482 | |
81ecdfbb RW |
8483 | LIBS=$save_LIBS |
8484 | fi | |
a9322a30 TT |
8485 | fi |
8486 | ||
d344e670 DE |
8487 | # --------------------- # |
8488 | # Check for libpython. # | |
8489 | # --------------------- # | |
8490 | ||
a9322a30 | 8491 | |
a9322a30 TT |
8492 | |
8493 | ||
ec685c5e | 8494 | |
0c4a4063 | 8495 | |
81ecdfbb RW |
8496 | # Check whether --with-python was given. |
8497 | if test "${with_python+set}" = set; then : | |
8498 | withval=$with_python; | |
bec39cab | 8499 | else |
81ecdfbb | 8500 | with_python=auto |
bec39cab | 8501 | fi |
bec39cab | 8502 | |
81ecdfbb RW |
8503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
8504 | $as_echo_n "checking whether to use python... " >&6; } | |
8505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
8506 | $as_echo "$with_python" >&6; } | |
9a156167 | 8507 | |
81ecdfbb RW |
8508 | if test "${with_python}" = no; then |
8509 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
8510 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
8511 | have_libpython=no | |
bec39cab | 8512 | else |
81ecdfbb | 8513 | case "${with_python}" in |
8c85a4e2 | 8514 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
8515 | if test -d ${with_python}; then |
8516 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 8517 | python_prog="${with_python}/bin/python" |
0c4a4063 | 8518 | python_prefix= |
9c4ea6c5 JB |
8519 | # If python does not exit ${with_python}/bin, then try in |
8520 | # ${with_python}. On Windows/MinGW, this is where the Python | |
8521 | # executable is. | |
8522 | if test ! -x "${python_prog}"; then | |
8523 | python_prog="${with_python}/python" | |
8524 | python_prefix= | |
8525 | fi | |
e7a30f46 | 8526 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
8527 | # Fall back to gdb 7.0/7.1 behaviour. |
8528 | python_prog=missing | |
0c4a4063 | 8529 | python_prefix=${with_python} |
ec685c5e | 8530 | fi |
e7a30f46 | 8531 | elif test -x "${with_python}"; then |
ec685c5e DE |
8532 | # While we can't run python compiled for $host (unless host == build), |
8533 | # the user could write a script that provides the needed information, | |
8534 | # so we support that. | |
ec685c5e | 8535 | python_prog=${with_python} |
0c4a4063 | 8536 | python_prefix= |
ec685c5e DE |
8537 | else |
8538 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
8539 | fi | |
81ecdfbb | 8540 | ;; |
ec685c5e DE |
8541 | */*) |
8542 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
8543 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
8544 | ;; | |
ec685c5e DE |
8545 | *) |
8546 | # The user has either specified auto, yes, or the name of the python | |
8547 | # program assumed to be in $PATH. | |
8548 | python_prefix= | |
8549 | case "${with_python}" in | |
8550 | yes | auto) | |
8551 | if test ${build} = ${host}; then | |
8552 | # Extract the first word of "python", so it can be a program name with args. | |
8553 | set dummy python; ac_word=$2 | |
8554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8555 | $as_echo_n "checking for $ac_word... " >&6; } | |
8556 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8557 | $as_echo_n "(cached) " >&6 | |
8558 | else | |
8559 | case $python_prog_path in | |
8560 | [\\/]* | ?:[\\/]*) | |
8561 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8562 | ;; | |
8563 | *) | |
8564 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8565 | for as_dir in $PATH | |
8566 | do | |
8567 | IFS=$as_save_IFS | |
8568 | test -z "$as_dir" && as_dir=. | |
8569 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8570 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8571 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8572 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8573 | break 2 | |
8574 | fi | |
8575 | done | |
8576 | done | |
8577 | IFS=$as_save_IFS | |
8578 | ||
8579 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8580 | ;; | |
8581 | esac | |
8582 | fi | |
8583 | python_prog_path=$ac_cv_path_python_prog_path | |
8584 | if test -n "$python_prog_path"; then | |
8585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8586 | $as_echo "$python_prog_path" >&6; } | |
8587 | else | |
8588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8589 | $as_echo "no" >&6; } | |
8590 | fi | |
8591 | ||
8592 | ||
8593 | if test "${python_prog_path}" = missing; then | |
8594 | python_prog=missing | |
8595 | else | |
8596 | python_prog=${python_prog_path} | |
8597 | fi | |
8598 | else | |
8599 | # Not much we can do except assume the cross-compiler will find the | |
8600 | # right files. | |
8601 | python_prog=missing | |
8602 | fi | |
8603 | ;; | |
8604 | *) | |
8605 | # While we can't run python compiled for $host (unless host == build), | |
8606 | # the user could write a script that provides the needed information, | |
8607 | # so we support that. | |
8608 | python_prog="${with_python}" | |
8609 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8610 | set dummy ${python_prog}; ac_word=$2 | |
8611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8612 | $as_echo_n "checking for $ac_word... " >&6; } | |
8613 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8614 | $as_echo_n "(cached) " >&6 | |
8615 | else | |
8616 | case $python_prog_path in | |
8617 | [\\/]* | ?:[\\/]*) | |
8618 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8619 | ;; | |
8620 | *) | |
8621 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8622 | for as_dir in $PATH | |
8623 | do | |
8624 | IFS=$as_save_IFS | |
8625 | test -z "$as_dir" && as_dir=. | |
8626 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8627 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8628 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8629 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8630 | break 2 | |
8631 | fi | |
8632 | done | |
8633 | done | |
8634 | IFS=$as_save_IFS | |
8635 | ||
8636 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8637 | ;; | |
8638 | esac | |
8639 | fi | |
8640 | python_prog_path=$ac_cv_path_python_prog_path | |
8641 | if test -n "$python_prog_path"; then | |
8642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8643 | $as_echo "$python_prog_path" >&6; } | |
8644 | else | |
8645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8646 | $as_echo "no" >&6; } | |
8647 | fi | |
8648 | ||
8649 | ||
8650 | if test "${python_prog_path}" = missing; then | |
8651 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8652 | fi | |
8653 | ;; | |
8654 | esac | |
81ecdfbb RW |
8655 | esac |
8656 | ||
ec685c5e | 8657 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8658 | # We have a python program to use, but it may be too old. |
8659 | # Don't flag an error for --with-python=auto (the default). | |
8660 | have_python_config=yes | |
ec685c5e DE |
8661 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8662 | if test $? != 0; then | |
e7a30f46 DE |
8663 | have_python_config=failed |
8664 | if test "${with_python}" != auto; then | |
8665 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8666 | fi | |
ec685c5e DE |
8667 | fi |
8668 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8669 | if test $? != 0; then | |
e7a30f46 DE |
8670 | have_python_config=failed |
8671 | if test "${with_python}" != auto; then | |
8672 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8673 | fi | |
ec685c5e | 8674 | fi |
0c4a4063 DE |
8675 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8676 | if test $? != 0; then | |
e7a30f46 DE |
8677 | have_python_config=failed |
8678 | if test "${with_python}" != auto; then | |
8679 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8680 | fi | |
0c4a4063 | 8681 | fi |
ec685c5e | 8682 | else |
ac534cba JB |
8683 | # We do not have a python executable we can use to determine where |
8684 | # to find the Python headers and libs. We cannot guess the include | |
8685 | # path from the python_prefix either, because that include path | |
8686 | # depends on the Python version. So, there is nothing much we can | |
8687 | # do except assume that the compiler will be able to find those files. | |
8688 | python_includes= | |
8689 | python_libs= | |
0c4a4063 | 8690 | have_python_config=no |
ec685c5e | 8691 | fi |
bec39cab | 8692 | |
ec685c5e DE |
8693 | # If we have python-config, only try the configuration it provides. |
8694 | # Otherwise fallback on the old way of trying different versions of | |
8695 | # python in turn. | |
81ecdfbb | 8696 | |
ec685c5e DE |
8697 | have_libpython=no |
8698 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8699 | # Determine the Python version by extracting "-lpython<version>" |
8700 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8701 | # being decimal numbers, but can also be XY (seen on Windows). | |
8702 | # | |
8703 | # The extraction is performed using sed with a regular expression. | |
8704 | # Initially, the regexp used was using the '?' quantifier to make | |
8705 | # the dot in the version number optional. Unfortunately, this | |
8706 | # does not work with non-GNU versions of sed because, because of | |
8707 | # what looks like a limitation (the '?' quantifier does not work | |
8708 | # with back-references). We work around this limitation by using | |
8709 | # the '*' quantifier instead. It means that, in theory, we might | |
8710 | # match unexpected version strings such as "-lpython2..7", but | |
8711 | # this seems unlikely in practice. And even if that happens, | |
8712 | # an error will be triggered later on, when checking that version | |
8713 | # number. | |
ec685c5e | 8714 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8715 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8716 | case "${python_version}" in |
8717 | python*) | |
ec685c5e DE |
8718 | |
8719 | version=${python_version} | |
8720 | ||
8721 | new_CPPFLAGS=${python_includes} | |
8722 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8724 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8725 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8726 | save_LIBS=$LIBS |
ec685c5e DE |
8727 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8728 | LIBS="$LIBS $new_LIBS" | |
8729 | found_usable_python=no | |
81ecdfbb | 8730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8731 | /* end confdefs.h. */ |
ac534cba | 8732 | #include "Python.h" |
81ecdfbb RW |
8733 | int |
8734 | main () | |
8735 | { | |
8736 | Py_Initialize (); | |
8737 | ; | |
8738 | return 0; | |
8739 | } | |
bec39cab | 8740 | _ACEOF |
81ecdfbb | 8741 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8742 | have_libpython=${version} |
8743 | found_usable_python=yes | |
ac534cba JB |
8744 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8745 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8746 | fi |
81ecdfbb RW |
8747 | rm -f core conftest.err conftest.$ac_objext \ |
8748 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8749 | CPPFLAGS=$save_CPPFLAGS |
8750 | LIBS=$save_LIBS | |
ec685c5e DE |
8751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8752 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8753 | |
0c4a4063 DE |
8754 | ;; |
8755 | *) | |
ec685c5e | 8756 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8757 | ;; |
8758 | esac | |
e7a30f46 | 8759 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8760 | if test "${have_libpython}" = no; then |
9a156167 | 8761 | |
420697bb TT |
8762 | version=python2.7 |
8763 | ||
8764 | new_CPPFLAGS=${python_includes} | |
8765 | new_LIBS="${python_libs} -lpython2.7" | |
8766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8767 | $as_echo_n "checking for ${version}... " >&6; } | |
8768 | save_CPPFLAGS=$CPPFLAGS | |
8769 | save_LIBS=$LIBS | |
8770 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8771 | LIBS="$LIBS $new_LIBS" | |
8772 | found_usable_python=no | |
8773 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8774 | /* end confdefs.h. */ | |
ac534cba | 8775 | #include "Python.h" |
420697bb TT |
8776 | int |
8777 | main () | |
8778 | { | |
8779 | Py_Initialize (); | |
8780 | ; | |
8781 | return 0; | |
8782 | } | |
8783 | _ACEOF | |
8784 | if ac_fn_c_try_link "$LINENO"; then : | |
8785 | have_libpython=${version} | |
8786 | found_usable_python=yes | |
ac534cba JB |
8787 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8788 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
8789 | fi |
8790 | rm -f core conftest.err conftest.$ac_objext \ | |
8791 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8792 | CPPFLAGS=$save_CPPFLAGS |
8793 | LIBS=$save_LIBS | |
420697bb TT |
8794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8795 | $as_echo "${found_usable_python}" >&6; } | |
8796 | ||
8797 | fi | |
8798 | if test "${have_libpython}" = no; then | |
8799 | ||
ec685c5e DE |
8800 | version=python2.6 |
8801 | ||
8802 | new_CPPFLAGS=${python_includes} | |
8803 | new_LIBS="${python_libs} -lpython2.6" | |
8804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8805 | $as_echo_n "checking for ${version}... " >&6; } | |
8806 | save_CPPFLAGS=$CPPFLAGS | |
8807 | save_LIBS=$LIBS | |
8808 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8809 | LIBS="$LIBS $new_LIBS" | |
8810 | found_usable_python=no | |
8811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8812 | /* end confdefs.h. */ | |
ac534cba | 8813 | #include "Python.h" |
ec685c5e DE |
8814 | int |
8815 | main () | |
8816 | { | |
8817 | Py_Initialize (); | |
8818 | ; | |
8819 | return 0; | |
8820 | } | |
8821 | _ACEOF | |
8822 | if ac_fn_c_try_link "$LINENO"; then : | |
8823 | have_libpython=${version} | |
8824 | found_usable_python=yes | |
ac534cba JB |
8825 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8826 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8827 | fi |
8828 | rm -f core conftest.err conftest.$ac_objext \ | |
8829 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8830 | CPPFLAGS=$save_CPPFLAGS |
8831 | LIBS=$save_LIBS | |
ec685c5e DE |
8832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8833 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8834 | |
81ecdfbb | 8835 | fi |
ec685c5e | 8836 | if test ${have_libpython} = no; then |
9a156167 | 8837 | |
81ecdfbb | 8838 | version=python2.5 |
9a156167 | 8839 | |
ec685c5e DE |
8840 | new_CPPFLAGS=${python_includes} |
8841 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
8842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8843 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8844 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8845 | save_LIBS=$LIBS |
ec685c5e DE |
8846 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8847 | LIBS="$LIBS $new_LIBS" | |
8848 | found_usable_python=no | |
81ecdfbb | 8849 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8850 | /* end confdefs.h. */ |
ac534cba | 8851 | #include "Python.h" |
81ecdfbb RW |
8852 | int |
8853 | main () | |
8854 | { | |
8855 | Py_Initialize (); | |
8856 | ; | |
8857 | return 0; | |
8858 | } | |
436868fb | 8859 | _ACEOF |
81ecdfbb | 8860 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8861 | have_libpython=${version} |
8862 | found_usable_python=yes | |
ac534cba JB |
8863 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8864 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8865 | fi |
81ecdfbb RW |
8866 | rm -f core conftest.err conftest.$ac_objext \ |
8867 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8868 | CPPFLAGS=$save_CPPFLAGS |
8869 | LIBS=$save_LIBS | |
ec685c5e DE |
8870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8871 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 8872 | |
81ecdfbb | 8873 | fi |
ec685c5e | 8874 | if test ${have_libpython} = no; then |
a9322a30 | 8875 | |
81ecdfbb | 8876 | version=python2.4 |
a9322a30 | 8877 | |
ec685c5e DE |
8878 | new_CPPFLAGS=${python_includes} |
8879 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8881 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8882 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8883 | save_LIBS=$LIBS |
ec685c5e DE |
8884 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8885 | LIBS="$LIBS $new_LIBS" | |
8886 | found_usable_python=no | |
81ecdfbb | 8887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8888 | /* end confdefs.h. */ |
ac534cba | 8889 | #include "Python.h" |
a9322a30 TT |
8890 | int |
8891 | main () | |
8892 | { | |
81ecdfbb | 8893 | Py_Initialize (); |
a9322a30 TT |
8894 | ; |
8895 | return 0; | |
8896 | } | |
436868fb | 8897 | _ACEOF |
81ecdfbb | 8898 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8899 | have_libpython=${version} |
8900 | found_usable_python=yes | |
ac534cba JB |
8901 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8902 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8903 | fi |
81ecdfbb RW |
8904 | rm -f core conftest.err conftest.$ac_objext \ |
8905 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8906 | CPPFLAGS=$save_CPPFLAGS |
8907 | LIBS=$save_LIBS | |
ec685c5e DE |
8908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8909 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8910 | |
ec685c5e DE |
8911 | fi |
8912 | fi | |
9c4ea6c5 | 8913 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8914 | |
8915 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8916 | ||
9c4ea6c5 | 8917 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8918 | |
8919 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8920 | ||
9c4ea6c5 | 8921 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8922 | |
8923 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8924 | ||
9c4ea6c5 | 8925 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8926 | |
8927 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8928 | ||
81ecdfbb | 8929 | fi |
ec685c5e DE |
8930 | |
8931 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8932 | case "${with_python}" in |
8933 | yes) | |
8934 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8935 | ;; | |
8936 | auto) | |
8937 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8938 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8939 | ;; | |
8940 | *) | |
8941 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8942 | ;; | |
8943 | esac | |
0c4a4063 DE |
8944 | else |
8945 | if test -n "${python_prefix}"; then | |
8946 | ||
8947 | cat >>confdefs.h <<_ACEOF | |
8948 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8949 | _ACEOF | |
8950 | ||
8951 | ||
8952 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8953 | if test "x$prefix" = xNONE; then | |
8954 | test_prefix=/usr/local | |
8955 | else | |
8956 | test_prefix=$prefix | |
8957 | fi | |
8958 | else | |
8959 | test_prefix=$exec_prefix | |
8960 | fi | |
8961 | value=0 | |
8962 | case ${python_prefix} in | |
8963 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8964 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8965 | value=1 | |
8966 | ;; | |
8967 | esac | |
8968 | ||
8969 | cat >>confdefs.h <<_ACEOF | |
8970 | #define PYTHON_PATH_RELOCATABLE $value | |
8971 | _ACEOF | |
8972 | ||
8973 | ||
8974 | fi | |
81ecdfbb | 8975 | fi |
436868fb | 8976 | fi |
436868fb | 8977 | |
ec685c5e | 8978 | if test "${have_libpython}" != no; then |
436868fb | 8979 | |
81ecdfbb | 8980 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8981 | |
81ecdfbb RW |
8982 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8983 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8984 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8985 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8986 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8987 | |
81ecdfbb RW |
8988 | # Flags needed to compile Python code (taken from python-config --cflags). |
8989 | # We cannot call python-config directly because it will output whatever was | |
8990 | # used when compiling the Python interpreter itself, including flags which | |
8991 | # would make the python-related objects be compiled differently from the | |
8992 | # rest of GDB (e.g., -O2 and -fPIC). | |
8993 | if test "${GCC}" = yes; then | |
8994 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8995 | fi | |
436868fb | 8996 | |
81ecdfbb RW |
8997 | if test "x${tentative_python_cflags}" != x; then |
8998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8999 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
9000 | for flag in ${tentative_python_cflags}; do | |
9001 | # Check that the compiler accepts it | |
9002 | saved_CFLAGS="$CFLAGS" | |
9003 | CFLAGS="$CFLAGS $flag" | |
9004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9005 | /* end confdefs.h. */ |
81ecdfbb | 9006 | |
a9322a30 TT |
9007 | int |
9008 | main () | |
9009 | { | |
a9322a30 TT |
9010 | |
9011 | ; | |
9012 | return 0; | |
9013 | } | |
bec39cab | 9014 | _ACEOF |
81ecdfbb RW |
9015 | if ac_fn_c_try_compile "$LINENO"; then : |
9016 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 9017 | fi |
81ecdfbb RW |
9018 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9019 | CFLAGS="$saved_CFLAGS" | |
9020 | done | |
9021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
9022 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
9023 | fi | |
043b6510 | 9024 | |
c83393b9 JB |
9025 | # On x64 Windows, Python's include headers, and pyconfig.h in |
9026 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
9027 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
9028 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
9029 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
9030 | # The issue was reported to the Python community, but still isn't | |
9031 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
9032 | ||
043b6510 | 9033 | case "$gdb_host" in |
c83393b9 JB |
9034 | mingw64) |
9035 | if test "${GCC}" = yes; then | |
9036 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
9037 | fi | |
9038 | ;; | |
043b6510 | 9039 | esac |
a8db4212 YPK |
9040 | |
9041 | # Note that "python -m threading" cannot be used to check for | |
9042 | # threading support due to a bug in Python 2.7.3 | |
9043 | # (http://bugs.python.org/issue15567). | |
9044 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
9045 | $as_echo_n "checking whether python supports threads... " >&6; } | |
9046 | saved_CPPFLAGS="${CPPFLAGS}" | |
9047 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
9048 | # Note that the test is reversed so that python_has_threads=yes on | |
9049 | # unexpected failures. | |
9050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9051 | /* end confdefs.h. */ | |
9052 | ||
9053 | #include <Python.h> | |
9054 | #ifdef WITH_THREAD | |
9055 | # error | |
9056 | #endif | |
9057 | ||
9058 | _ACEOF | |
9059 | if ac_fn_c_try_cpp "$LINENO"; then : | |
9060 | python_has_threads=no | |
9061 | else | |
9062 | python_has_threads=yes | |
9063 | fi | |
9064 | rm -f conftest.err conftest.$ac_ext | |
9065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
9066 | $as_echo "${python_has_threads}" >&6; } | |
9067 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 9068 | else |
6dddc817 DE |
9069 | # Even if Python support is not compiled in, we need to have this file |
9070 | # included so that the "python" command, et.al., still exists. | |
9071 | CONFIG_OBS="$CONFIG_OBS python.o" | |
9072 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" | |
a9322a30 | 9073 | fi |
9a156167 | 9074 | |
ed3ef339 DE |
9075 | |
9076 | ||
4df42755 DE |
9077 | if test "${have_libpython}" != no; then |
9078 | HAVE_PYTHON_TRUE= | |
9079 | HAVE_PYTHON_FALSE='#' | |
9080 | else | |
9081 | HAVE_PYTHON_TRUE='#' | |
9082 | HAVE_PYTHON_FALSE= | |
9083 | fi | |
9084 | ||
ed3ef339 DE |
9085 | |
9086 | # -------------------- # | |
9087 | # Check for libguile. # | |
9088 | # -------------------- # | |
9089 | ||
9090 | ||
e1402065 DE |
9091 | |
9092 | ||
9093 | ||
9094 | ||
9095 | # Check whether --with-guile was given. | |
9096 | if test "${with_guile+set}" = set; then : | |
9097 | withval=$with_guile; | |
9098 | else | |
9099 | with_guile=auto | |
9100 | fi | |
9101 | ||
9102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
9103 | $as_echo_n "checking whether to use guile... " >&6; } | |
9104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
9105 | $as_echo "$with_guile" >&6; } | |
9106 | ||
ed3ef339 DE |
9107 | # Extract the first word of "pkg-config", so it can be a program name with args. |
9108 | set dummy pkg-config; ac_word=$2 | |
9109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9110 | $as_echo_n "checking for $ac_word... " >&6; } | |
9111 | if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : | |
9112 | $as_echo_n "(cached) " >&6 | |
9113 | else | |
9114 | case $pkg_config_prog_path in | |
9115 | [\\/]* | ?:[\\/]*) | |
9116 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
9117 | ;; | |
9118 | *) | |
9119 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9120 | for as_dir in $PATH | |
9121 | do | |
9122 | IFS=$as_save_IFS | |
9123 | test -z "$as_dir" && as_dir=. | |
9124 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9125 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9126 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
9127 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9128 | break 2 | |
9129 | fi | |
9130 | done | |
9131 | done | |
9132 | IFS=$as_save_IFS | |
9133 | ||
9134 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
9135 | ;; | |
9136 | esac | |
9137 | fi | |
9138 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
9139 | if test -n "$pkg_config_prog_path"; then | |
9140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
9141 | $as_echo "$pkg_config_prog_path" >&6; } | |
9142 | else | |
9143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9144 | $as_echo "no" >&6; } | |
9145 | fi | |
9146 | ||
9147 | ||
9148 | ||
214ab2da | 9149 | try_guile_versions="guile-2.2 guile-2.0" |
ed3ef339 DE |
9150 | have_libguile=no |
9151 | case "${with_guile}" in | |
9152 | no) | |
9153 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
9154 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
9155 | ;; | |
9156 | auto) | |
e1402065 DE |
9157 | if test "${pkg_config_prog_path}" = "missing"; then |
9158 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
9159 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
9160 | else | |
ed3ef339 DE |
9161 | |
9162 | pkg_config=${pkg_config_prog_path} | |
9163 | guile_version_list=${try_guile_versions} | |
9164 | flag_errors=no | |
9165 | ||
ed3ef339 DE |
9166 | found_usable_guile=checking |
9167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9168 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9169 | for guile_version in ${guile_version_list}; do | |
9170 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9171 | if test $? != 0; then | |
9172 | continue | |
9173 | fi | |
9174 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9175 | if test $? != 0; then | |
9176 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9177 | fi | |
9178 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9179 | if test $? != 0; then | |
9180 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9181 | fi | |
9182 | found_usable_guile=${guile_version} | |
9183 | break | |
9184 | done | |
9185 | if test "${found_usable_guile}" = "checking"; then | |
9186 | if test "${flag_errors}" = "yes"; then | |
9187 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9188 | else | |
9189 | found_usable_guile=no | |
9190 | fi | |
9191 | fi | |
9192 | if test "${found_usable_guile}" != no; then | |
9193 | save_CPPFLAGS=$CPPFLAGS | |
9194 | save_LIBS=$LIBS | |
9195 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9196 | LIBS="$LIBS $new_LIBS" | |
9197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9198 | /* end confdefs.h. */ | |
9199 | #include "libguile.h" | |
9200 | int | |
9201 | main () | |
9202 | { | |
9203 | scm_init_guile (); | |
9204 | ; | |
9205 | return 0; | |
9206 | } | |
9207 | _ACEOF | |
9208 | if ac_fn_c_try_link "$LINENO"; then : | |
9209 | have_libguile=yes | |
9210 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9211 | GUILE_LIBS=$new_LIBS | |
9212 | else | |
9213 | found_usable_guile=no | |
9214 | fi | |
9215 | rm -f core conftest.err conftest.$ac_objext \ | |
9216 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9217 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9218 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9219 | ||
9220 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9221 | ||
9222 | ||
9223 | fi | |
9224 | ||
ed3ef339 DE |
9225 | CPPFLAGS=$save_CPPFLAGS |
9226 | LIBS=$save_LIBS | |
9227 | if test "${found_usable_guile}" = no; then | |
9228 | if test "${flag_errors}" = yes; then | |
9229 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9230 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9231 | as_fn_error "linking guile version ${guile_version} test program failed | |
9232 | See \`config.log' for more details." "$LINENO" 5; } | |
9233 | fi | |
9234 | fi | |
9235 | fi | |
9236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9237 | $as_echo "${found_usable_guile}" >&6; } | |
9238 | ||
e1402065 | 9239 | fi |
ed3ef339 DE |
9240 | ;; |
9241 | yes) | |
e1402065 DE |
9242 | if test "${pkg_config_prog_path}" = "missing"; then |
9243 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
9244 | fi | |
ed3ef339 DE |
9245 | |
9246 | pkg_config=${pkg_config_prog_path} | |
9247 | guile_version_list=${try_guile_versions} | |
9248 | flag_errors=yes | |
9249 | ||
ed3ef339 DE |
9250 | found_usable_guile=checking |
9251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9252 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9253 | for guile_version in ${guile_version_list}; do | |
9254 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9255 | if test $? != 0; then | |
9256 | continue | |
9257 | fi | |
9258 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9259 | if test $? != 0; then | |
9260 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9261 | fi | |
9262 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9263 | if test $? != 0; then | |
9264 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9265 | fi | |
9266 | found_usable_guile=${guile_version} | |
9267 | break | |
9268 | done | |
9269 | if test "${found_usable_guile}" = "checking"; then | |
9270 | if test "${flag_errors}" = "yes"; then | |
9271 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9272 | else | |
9273 | found_usable_guile=no | |
9274 | fi | |
9275 | fi | |
9276 | if test "${found_usable_guile}" != no; then | |
9277 | save_CPPFLAGS=$CPPFLAGS | |
9278 | save_LIBS=$LIBS | |
9279 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9280 | LIBS="$LIBS $new_LIBS" | |
9281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9282 | /* end confdefs.h. */ | |
9283 | #include "libguile.h" | |
9284 | int | |
9285 | main () | |
9286 | { | |
9287 | scm_init_guile (); | |
9288 | ; | |
9289 | return 0; | |
9290 | } | |
9291 | _ACEOF | |
9292 | if ac_fn_c_try_link "$LINENO"; then : | |
9293 | have_libguile=yes | |
9294 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9295 | GUILE_LIBS=$new_LIBS | |
9296 | else | |
9297 | found_usable_guile=no | |
9298 | fi | |
9299 | rm -f core conftest.err conftest.$ac_objext \ | |
9300 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9301 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9302 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9303 | ||
9304 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9305 | ||
9306 | ||
9307 | fi | |
9308 | ||
ed3ef339 DE |
9309 | CPPFLAGS=$save_CPPFLAGS |
9310 | LIBS=$save_LIBS | |
9311 | if test "${found_usable_guile}" = no; then | |
9312 | if test "${flag_errors}" = yes; then | |
9313 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9314 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9315 | as_fn_error "linking guile version ${guile_version} test program failed | |
9316 | See \`config.log' for more details." "$LINENO" 5; } | |
9317 | fi | |
9318 | fi | |
9319 | fi | |
9320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9321 | $as_echo "${found_usable_guile}" >&6; } | |
9322 | ||
9323 | ;; | |
9324 | [\\/]* | ?:[\\/]*) | |
e1402065 | 9325 | if test -x "${with_guile}"; then |
ed3ef339 DE |
9326 | |
9327 | pkg_config=${with_guile} | |
9328 | guile_version_list=${try_guile_versions} | |
9329 | flag_errors=yes | |
9330 | ||
ed3ef339 DE |
9331 | found_usable_guile=checking |
9332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9333 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9334 | for guile_version in ${guile_version_list}; do | |
9335 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9336 | if test $? != 0; then | |
9337 | continue | |
9338 | fi | |
9339 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9340 | if test $? != 0; then | |
9341 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9342 | fi | |
9343 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9344 | if test $? != 0; then | |
9345 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9346 | fi | |
9347 | found_usable_guile=${guile_version} | |
9348 | break | |
9349 | done | |
9350 | if test "${found_usable_guile}" = "checking"; then | |
9351 | if test "${flag_errors}" = "yes"; then | |
9352 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9353 | else | |
9354 | found_usable_guile=no | |
9355 | fi | |
9356 | fi | |
9357 | if test "${found_usable_guile}" != no; then | |
9358 | save_CPPFLAGS=$CPPFLAGS | |
9359 | save_LIBS=$LIBS | |
9360 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9361 | LIBS="$LIBS $new_LIBS" | |
9362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9363 | /* end confdefs.h. */ | |
9364 | #include "libguile.h" | |
9365 | int | |
9366 | main () | |
9367 | { | |
9368 | scm_init_guile (); | |
9369 | ; | |
9370 | return 0; | |
9371 | } | |
9372 | _ACEOF | |
9373 | if ac_fn_c_try_link "$LINENO"; then : | |
9374 | have_libguile=yes | |
9375 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9376 | GUILE_LIBS=$new_LIBS | |
9377 | else | |
9378 | found_usable_guile=no | |
9379 | fi | |
9380 | rm -f core conftest.err conftest.$ac_objext \ | |
9381 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9382 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9383 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9384 | ||
9385 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9386 | ||
9387 | ||
9388 | fi | |
9389 | ||
ed3ef339 DE |
9390 | CPPFLAGS=$save_CPPFLAGS |
9391 | LIBS=$save_LIBS | |
9392 | if test "${found_usable_guile}" = no; then | |
9393 | if test "${flag_errors}" = yes; then | |
9394 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9395 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9396 | as_fn_error "linking guile version ${guile_version} test program failed | |
9397 | See \`config.log' for more details." "$LINENO" 5; } | |
9398 | fi | |
9399 | fi | |
9400 | fi | |
9401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9402 | $as_echo "${found_usable_guile}" >&6; } | |
9403 | ||
e1402065 DE |
9404 | else |
9405 | as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 | |
9406 | fi | |
ed3ef339 DE |
9407 | ;; |
9408 | "" | */*) | |
9409 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
9410 | as_fn_error "invalid value for --with-guile" "$LINENO" 5 | |
9411 | ;; | |
9412 | *) | |
9413 | # A space separate list of guile versions to try, in order. | |
e1402065 DE |
9414 | if test "${pkg_config_prog_path}" = "missing"; then |
9415 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
9416 | fi | |
ed3ef339 DE |
9417 | |
9418 | pkg_config=${pkg_config_prog_path} | |
9419 | guile_version_list=${with_guile} | |
9420 | flag_errors=yes | |
9421 | ||
ed3ef339 DE |
9422 | found_usable_guile=checking |
9423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
9424 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
9425 | for guile_version in ${guile_version_list}; do | |
9426 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
9427 | if test $? != 0; then | |
9428 | continue | |
9429 | fi | |
9430 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
9431 | if test $? != 0; then | |
9432 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
9433 | fi | |
9434 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
9435 | if test $? != 0; then | |
9436 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
9437 | fi | |
9438 | found_usable_guile=${guile_version} | |
9439 | break | |
9440 | done | |
9441 | if test "${found_usable_guile}" = "checking"; then | |
9442 | if test "${flag_errors}" = "yes"; then | |
9443 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
9444 | else | |
9445 | found_usable_guile=no | |
9446 | fi | |
9447 | fi | |
9448 | if test "${found_usable_guile}" != no; then | |
9449 | save_CPPFLAGS=$CPPFLAGS | |
9450 | save_LIBS=$LIBS | |
9451 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
9452 | LIBS="$LIBS $new_LIBS" | |
9453 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9454 | /* end confdefs.h. */ | |
9455 | #include "libguile.h" | |
9456 | int | |
9457 | main () | |
9458 | { | |
9459 | scm_init_guile (); | |
9460 | ; | |
9461 | return 0; | |
9462 | } | |
9463 | _ACEOF | |
9464 | if ac_fn_c_try_link "$LINENO"; then : | |
9465 | have_libguile=yes | |
9466 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
9467 | GUILE_LIBS=$new_LIBS | |
9468 | else | |
9469 | found_usable_guile=no | |
9470 | fi | |
9471 | rm -f core conftest.err conftest.$ac_objext \ | |
9472 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
9473 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
9474 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
9475 | ||
9476 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
9477 | ||
9478 | ||
9479 | fi | |
9480 | ||
ed3ef339 DE |
9481 | CPPFLAGS=$save_CPPFLAGS |
9482 | LIBS=$save_LIBS | |
9483 | if test "${found_usable_guile}" = no; then | |
9484 | if test "${flag_errors}" = yes; then | |
9485 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9486 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9487 | as_fn_error "linking guile version ${guile_version} test program failed | |
9488 | See \`config.log' for more details." "$LINENO" 5; } | |
9489 | fi | |
9490 | fi | |
9491 | fi | |
9492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
9493 | $as_echo "${found_usable_guile}" >&6; } | |
9494 | ||
9495 | ;; | |
9496 | esac | |
9497 | ||
e76c5d17 | 9498 | if test "${have_libguile}" != no; then |
d342a0da DE |
9499 | case "${with_guile}" in |
9500 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
9501 | |
9502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
9503 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
9504 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
9505 | $as_echo_n "(cached) " >&6 | |
9506 | else | |
d342a0da | 9507 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
9508 | |
9509 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
9510 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
9511 | # what the program name is, at the risk of getting it wrong if | |
9512 | # Guile was configured with '--program-suffix' or similar. | |
9513 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 9514 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
9515 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
9516 | fi | |
9517 | ||
9518 | fi | |
9519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
9520 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
9521 | ||
9522 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
9523 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
9524 | fi | |
9525 | ||
9526 | GUILD="$ac_cv_guild_program_name" | |
9527 | ||
9528 | ||
d342a0da DE |
9529 | ;; |
9530 | *) | |
9531 | ||
9532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
9533 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
9534 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
9535 | $as_echo_n "(cached) " >&6 | |
9536 | else | |
9537 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
9538 | ||
9539 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
9540 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
9541 | # what the program name is, at the risk of getting it wrong if | |
9542 | # Guile was configured with '--program-suffix' or similar. | |
9543 | if test "x$ac_cv_guild_program_name" = "x"; then | |
9544 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
9545 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
9546 | fi | |
9547 | ||
9548 | fi | |
9549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
9550 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
9551 | ||
9552 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
9553 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
9554 | fi | |
9555 | ||
9556 | GUILD="$ac_cv_guild_program_name" | |
9557 | ||
9558 | ||
9559 | ;; | |
9560 | esac | |
e76c5d17 DE |
9561 | |
9562 | ||
9563 | if test "$cross_compiling" = no; then | |
9564 | GUILD_TARGET_FLAG= | |
9565 | else | |
9566 | GUILD_TARGET_FLAG="--target=$host" | |
9567 | fi | |
9568 | ||
9569 | ||
9570 | ||
9571 | ||
9572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
9573 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
9574 | if test "${ac_cv_guild_ok+set}" = set; then : | |
9575 | $as_echo_n "(cached) " >&6 | |
9576 | else | |
9577 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
9578 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
9579 | ac_cv_guild_ok=yes | |
9580 | else | |
9581 | ac_cv_guild_ok=no | |
9582 | fi | |
9583 | fi | |
9584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
9585 | $as_echo "$ac_cv_guild_ok" >&6; } | |
9586 | ||
9587 | if test "$ac_cv_guild_ok" = no; then | |
9588 | have_libguile=no | |
9589 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
9590 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
9591 | fi | |
9592 | fi | |
9593 | ||
ed3ef339 DE |
9594 | if test "${have_libguile}" != no; then |
9595 | ||
9596 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
9597 | ||
9598 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
9599 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
9600 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
9601 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
9602 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
9603 | |
9604 | save_LIBS="$LIBS" | |
9605 | save_CPPFLAGS="$CPPFLAGS" | |
9606 | LIBS="$GUILE_LIBS" | |
9607 | CPPFLAGS="$GUILE_CPPFLAGS" | |
9608 | for ac_func in scm_new_smob | |
9609 | do : | |
9610 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
9611 | if test "x$ac_cv_func_scm_new_smob" = x""yes; then : | |
9612 | cat >>confdefs.h <<_ACEOF | |
9613 | #define HAVE_SCM_NEW_SMOB 1 | |
9614 | _ACEOF | |
9615 | ||
9616 | fi | |
9617 | done | |
9618 | ||
9619 | LIBS="$save_LIBS" | |
9620 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
9621 | else |
9622 | # Even if Guile support is not compiled in, we need to have these files | |
9623 | # included. | |
9624 | CONFIG_OBS="$CONFIG_OBS guile.o" | |
9625 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" | |
9626 | fi | |
9a156167 | 9627 | |
ac534cba | 9628 | |
4df42755 DE |
9629 | if test "${have_libguile}" != no; then |
9630 | HAVE_GUILE_TRUE= | |
9631 | HAVE_GUILE_FALSE='#' | |
9632 | else | |
9633 | HAVE_GUILE_TRUE='#' | |
9634 | HAVE_GUILE_FALSE= | |
9635 | fi | |
9636 | ||
ac534cba | 9637 | |
d344e670 DE |
9638 | # --------------------- # |
9639 | # Check for libmcheck. # | |
9640 | # --------------------- # | |
9641 | ||
a8db4212 YPK |
9642 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
9643 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
9644 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
9645 | # and for releases. | |
17ef446e PA |
9646 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
9647 | && $development; then | |
9648 | libmcheck_default=yes | |
9649 | else | |
9650 | libmcheck_default=no | |
a8db4212 YPK |
9651 | fi |
9652 | ||
17ef446e PA |
9653 | # Check whether --enable-libmcheck was given. |
9654 | if test "${enable_libmcheck+set}" = set; then : | |
9655 | enableval=$enable_libmcheck; case "${enableval}" in | |
9656 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
9657 | no | n) ENABLE_LIBMCHECK="no" ;; | |
9658 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
9659 | esac | |
9660 | fi | |
9661 | ||
9662 | ||
9663 | if test -z "${ENABLE_LIBMCHECK}"; then | |
9664 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 9665 | fi |
17ef446e PA |
9666 | |
9667 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
9668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
9669 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
9670 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
9671 | $as_echo_n "(cached) " >&6 | |
9672 | else | |
9673 | ac_check_lib_save_LIBS=$LIBS | |
9674 | LIBS="-lmcheck $LIBS" | |
9675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9676 | /* end confdefs.h. */ | |
9677 | ||
9678 | ||
9679 | int | |
9680 | main () | |
9681 | { | |
9682 | return main (); | |
9683 | ; | |
9684 | return 0; | |
9685 | } | |
9686 | _ACEOF | |
9687 | if ac_fn_c_try_link "$LINENO"; then : | |
9688 | ac_cv_lib_mcheck_main=yes | |
9689 | else | |
9690 | ac_cv_lib_mcheck_main=no | |
9691 | fi | |
9692 | rm -f core conftest.err conftest.$ac_objext \ | |
9693 | conftest$ac_exeext conftest.$ac_ext | |
9694 | LIBS=$ac_check_lib_save_LIBS | |
9695 | fi | |
9696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
9697 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
9698 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
9699 | cat >>confdefs.h <<_ACEOF | |
9700 | #define HAVE_LIBMCHECK 1 | |
9701 | _ACEOF | |
9702 | ||
9703 | LIBS="-lmcheck $LIBS" | |
9704 | ||
9705 | fi | |
9706 | ||
17ef446e PA |
9707 | fi |
9708 | ||
9709 | ||
9710 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
9711 | -a "${have_libpython}" != "no" \ | |
9712 | -a "${python_has_threads}" = "yes" ; then | |
9713 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
9714 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
9715 | fi |
9716 | ||
58bfce93 MM |
9717 | |
9718 | # Check whether --with-intel_pt was given. | |
9719 | if test "${with_intel_pt+set}" = set; then : | |
9720 | withval=$with_intel_pt; | |
9721 | else | |
9722 | with_intel_pt=auto | |
9723 | fi | |
9724 | ||
9725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
9726 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
9727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
9728 | $as_echo "$with_intel_pt" >&6; } | |
9729 | ||
9730 | if test "${with_intel_pt}" = no; then | |
9731 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&5 | |
9732 | $as_echo "$as_me: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&2;} | |
9733 | HAVE_LIBIPT=no | |
9734 | else | |
9735 | ||
9736 | ||
9737 | ||
9738 | ||
9739 | ||
9740 | ||
9741 | ||
9742 | ||
9743 | use_additional=yes | |
9744 | ||
9745 | acl_save_prefix="$prefix" | |
9746 | prefix="$acl_final_prefix" | |
9747 | acl_save_exec_prefix="$exec_prefix" | |
9748 | exec_prefix="$acl_final_exec_prefix" | |
9749 | ||
9750 | eval additional_includedir=\"$includedir\" | |
9751 | eval additional_libdir=\"$libdir\" | |
9752 | ||
9753 | exec_prefix="$acl_save_exec_prefix" | |
9754 | prefix="$acl_save_prefix" | |
9755 | ||
9756 | ||
9757 | # Check whether --with-libipt-prefix was given. | |
9758 | if test "${with_libipt_prefix+set}" = set; then : | |
9759 | withval=$with_libipt_prefix; | |
9760 | if test "X$withval" = "Xno"; then | |
9761 | use_additional=no | |
9762 | else | |
9763 | if test "X$withval" = "X"; then | |
9764 | ||
9765 | acl_save_prefix="$prefix" | |
9766 | prefix="$acl_final_prefix" | |
9767 | acl_save_exec_prefix="$exec_prefix" | |
9768 | exec_prefix="$acl_final_exec_prefix" | |
9769 | ||
9770 | eval additional_includedir=\"$includedir\" | |
9771 | eval additional_libdir=\"$libdir\" | |
9772 | ||
9773 | exec_prefix="$acl_save_exec_prefix" | |
9774 | prefix="$acl_save_prefix" | |
9775 | ||
9776 | else | |
9777 | additional_includedir="$withval/include" | |
9778 | additional_libdir="$withval/lib" | |
9779 | fi | |
9780 | fi | |
9781 | ||
9782 | fi | |
9783 | ||
9784 | LIBIPT= | |
9785 | LTLIBIPT= | |
9786 | INCIPT= | |
9787 | rpathdirs= | |
9788 | ltrpathdirs= | |
9789 | names_already_handled= | |
9790 | names_next_round='ipt ' | |
9791 | while test -n "$names_next_round"; do | |
9792 | names_this_round="$names_next_round" | |
9793 | names_next_round= | |
9794 | for name in $names_this_round; do | |
9795 | already_handled= | |
9796 | for n in $names_already_handled; do | |
9797 | if test "$n" = "$name"; then | |
9798 | already_handled=yes | |
9799 | break | |
9800 | fi | |
9801 | done | |
9802 | if test -z "$already_handled"; then | |
9803 | names_already_handled="$names_already_handled $name" | |
9804 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9805 | eval value=\"\$HAVE_LIB$uppername\" | |
9806 | if test -n "$value"; then | |
9807 | if test "$value" = yes; then | |
9808 | eval value=\"\$LIB$uppername\" | |
9809 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
9810 | eval value=\"\$LTLIB$uppername\" | |
9811 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
9812 | else | |
9813 | : | |
9814 | fi | |
9815 | else | |
9816 | found_dir= | |
9817 | found_la= | |
9818 | found_so= | |
9819 | found_a= | |
9820 | if test $use_additional = yes; then | |
9821 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9822 | found_dir="$additional_libdir" | |
9823 | found_so="$additional_libdir/lib$name.$shlibext" | |
9824 | if test -f "$additional_libdir/lib$name.la"; then | |
9825 | found_la="$additional_libdir/lib$name.la" | |
9826 | fi | |
9827 | else | |
9828 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9829 | found_dir="$additional_libdir" | |
9830 | found_a="$additional_libdir/lib$name.$libext" | |
9831 | if test -f "$additional_libdir/lib$name.la"; then | |
9832 | found_la="$additional_libdir/lib$name.la" | |
9833 | fi | |
9834 | fi | |
9835 | fi | |
9836 | fi | |
9837 | if test "X$found_dir" = "X"; then | |
9838 | for x in $LDFLAGS $LTLIBIPT; do | |
9839 | ||
9840 | acl_save_prefix="$prefix" | |
9841 | prefix="$acl_final_prefix" | |
9842 | acl_save_exec_prefix="$exec_prefix" | |
9843 | exec_prefix="$acl_final_exec_prefix" | |
9844 | eval x=\"$x\" | |
9845 | exec_prefix="$acl_save_exec_prefix" | |
9846 | prefix="$acl_save_prefix" | |
9847 | ||
9848 | case "$x" in | |
9849 | -L*) | |
9850 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9851 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9852 | found_dir="$dir" | |
9853 | found_so="$dir/lib$name.$shlibext" | |
9854 | if test -f "$dir/lib$name.la"; then | |
9855 | found_la="$dir/lib$name.la" | |
9856 | fi | |
9857 | else | |
9858 | if test -f "$dir/lib$name.$libext"; then | |
9859 | found_dir="$dir" | |
9860 | found_a="$dir/lib$name.$libext" | |
9861 | if test -f "$dir/lib$name.la"; then | |
9862 | found_la="$dir/lib$name.la" | |
9863 | fi | |
9864 | fi | |
9865 | fi | |
9866 | ;; | |
9867 | esac | |
9868 | if test "X$found_dir" != "X"; then | |
9869 | break | |
9870 | fi | |
9871 | done | |
9872 | fi | |
9873 | if test "X$found_dir" != "X"; then | |
9874 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
9875 | if test "X$found_so" != "X"; then | |
9876 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9877 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9878 | else | |
9879 | haveit= | |
9880 | for x in $ltrpathdirs; do | |
9881 | if test "X$x" = "X$found_dir"; then | |
9882 | haveit=yes | |
9883 | break | |
9884 | fi | |
9885 | done | |
9886 | if test -z "$haveit"; then | |
9887 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9888 | fi | |
9889 | if test "$hardcode_direct" = yes; then | |
9890 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9891 | else | |
9892 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9893 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9894 | haveit= | |
9895 | for x in $rpathdirs; do | |
9896 | if test "X$x" = "X$found_dir"; then | |
9897 | haveit=yes | |
9898 | break | |
9899 | fi | |
9900 | done | |
9901 | if test -z "$haveit"; then | |
9902 | rpathdirs="$rpathdirs $found_dir" | |
9903 | fi | |
9904 | else | |
9905 | haveit= | |
9906 | for x in $LDFLAGS $LIBIPT; do | |
9907 | ||
9908 | acl_save_prefix="$prefix" | |
9909 | prefix="$acl_final_prefix" | |
9910 | acl_save_exec_prefix="$exec_prefix" | |
9911 | exec_prefix="$acl_final_exec_prefix" | |
9912 | eval x=\"$x\" | |
9913 | exec_prefix="$acl_save_exec_prefix" | |
9914 | prefix="$acl_save_prefix" | |
9915 | ||
9916 | if test "X$x" = "X-L$found_dir"; then | |
9917 | haveit=yes | |
9918 | break | |
9919 | fi | |
9920 | done | |
9921 | if test -z "$haveit"; then | |
9922 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
9923 | fi | |
9924 | if test "$hardcode_minus_L" != no; then | |
9925 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
9926 | else | |
9927 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
9928 | fi | |
9929 | fi | |
9930 | fi | |
9931 | fi | |
9932 | else | |
9933 | if test "X$found_a" != "X"; then | |
9934 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
9935 | else | |
9936 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
9937 | fi | |
9938 | fi | |
9939 | additional_includedir= | |
9940 | case "$found_dir" in | |
9941 | */lib | */lib/) | |
9942 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9943 | additional_includedir="$basedir/include" | |
9944 | ;; | |
9945 | esac | |
9946 | if test "X$additional_includedir" != "X"; then | |
9947 | if test "X$additional_includedir" != "X/usr/include"; then | |
9948 | haveit= | |
9949 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9950 | if test -n "$GCC"; then | |
9951 | case $host_os in | |
9952 | linux*) haveit=yes;; | |
9953 | esac | |
9954 | fi | |
9955 | fi | |
9956 | if test -z "$haveit"; then | |
9957 | for x in $CPPFLAGS $INCIPT; do | |
9958 | ||
9959 | acl_save_prefix="$prefix" | |
9960 | prefix="$acl_final_prefix" | |
9961 | acl_save_exec_prefix="$exec_prefix" | |
9962 | exec_prefix="$acl_final_exec_prefix" | |
9963 | eval x=\"$x\" | |
9964 | exec_prefix="$acl_save_exec_prefix" | |
9965 | prefix="$acl_save_prefix" | |
9966 | ||
9967 | if test "X$x" = "X-I$additional_includedir"; then | |
9968 | haveit=yes | |
9969 | break | |
9970 | fi | |
9971 | done | |
9972 | if test -z "$haveit"; then | |
9973 | if test -d "$additional_includedir"; then | |
9974 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
9975 | fi | |
9976 | fi | |
9977 | fi | |
9978 | fi | |
9979 | fi | |
9980 | if test -n "$found_la"; then | |
9981 | save_libdir="$libdir" | |
9982 | case "$found_la" in | |
9983 | */* | *\\*) . "$found_la" ;; | |
9984 | *) . "./$found_la" ;; | |
9985 | esac | |
9986 | libdir="$save_libdir" | |
9987 | for dep in $dependency_libs; do | |
9988 | case "$dep" in | |
9989 | -L*) | |
9990 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9991 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9992 | haveit= | |
9993 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9994 | if test -n "$GCC"; then | |
9995 | case $host_os in | |
9996 | linux*) haveit=yes;; | |
9997 | esac | |
9998 | fi | |
9999 | fi | |
10000 | if test -z "$haveit"; then | |
10001 | haveit= | |
10002 | for x in $LDFLAGS $LIBIPT; do | |
10003 | ||
10004 | acl_save_prefix="$prefix" | |
10005 | prefix="$acl_final_prefix" | |
10006 | acl_save_exec_prefix="$exec_prefix" | |
10007 | exec_prefix="$acl_final_exec_prefix" | |
10008 | eval x=\"$x\" | |
10009 | exec_prefix="$acl_save_exec_prefix" | |
10010 | prefix="$acl_save_prefix" | |
10011 | ||
10012 | if test "X$x" = "X-L$additional_libdir"; then | |
10013 | haveit=yes | |
10014 | break | |
10015 | fi | |
10016 | done | |
10017 | if test -z "$haveit"; then | |
10018 | if test -d "$additional_libdir"; then | |
10019 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
10020 | fi | |
10021 | fi | |
10022 | haveit= | |
10023 | for x in $LDFLAGS $LTLIBIPT; do | |
10024 | ||
10025 | acl_save_prefix="$prefix" | |
10026 | prefix="$acl_final_prefix" | |
10027 | acl_save_exec_prefix="$exec_prefix" | |
10028 | exec_prefix="$acl_final_exec_prefix" | |
10029 | eval x=\"$x\" | |
10030 | exec_prefix="$acl_save_exec_prefix" | |
10031 | prefix="$acl_save_prefix" | |
10032 | ||
10033 | if test "X$x" = "X-L$additional_libdir"; then | |
10034 | haveit=yes | |
10035 | break | |
10036 | fi | |
10037 | done | |
10038 | if test -z "$haveit"; then | |
10039 | if test -d "$additional_libdir"; then | |
10040 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
10041 | fi | |
10042 | fi | |
10043 | fi | |
10044 | fi | |
10045 | ;; | |
10046 | -R*) | |
10047 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10048 | if test "$enable_rpath" != no; then | |
10049 | haveit= | |
10050 | for x in $rpathdirs; do | |
10051 | if test "X$x" = "X$dir"; then | |
10052 | haveit=yes | |
10053 | break | |
10054 | fi | |
10055 | done | |
10056 | if test -z "$haveit"; then | |
10057 | rpathdirs="$rpathdirs $dir" | |
10058 | fi | |
10059 | haveit= | |
10060 | for x in $ltrpathdirs; do | |
10061 | if test "X$x" = "X$dir"; then | |
10062 | haveit=yes | |
10063 | break | |
10064 | fi | |
10065 | done | |
10066 | if test -z "$haveit"; then | |
10067 | ltrpathdirs="$ltrpathdirs $dir" | |
10068 | fi | |
10069 | fi | |
10070 | ;; | |
10071 | -l*) | |
10072 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10073 | ;; | |
10074 | *.la) | |
10075 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10076 | ;; | |
10077 | *) | |
10078 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
10079 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
10080 | ;; | |
10081 | esac | |
10082 | done | |
10083 | fi | |
10084 | else | |
10085 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
10086 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
10087 | fi | |
10088 | fi | |
10089 | fi | |
10090 | done | |
10091 | done | |
10092 | if test "X$rpathdirs" != "X"; then | |
10093 | if test -n "$hardcode_libdir_separator"; then | |
10094 | alldirs= | |
10095 | for found_dir in $rpathdirs; do | |
10096 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10097 | done | |
10098 | acl_save_libdir="$libdir" | |
10099 | libdir="$alldirs" | |
10100 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10101 | libdir="$acl_save_libdir" | |
10102 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
10103 | else | |
10104 | for found_dir in $rpathdirs; do | |
10105 | acl_save_libdir="$libdir" | |
10106 | libdir="$found_dir" | |
10107 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10108 | libdir="$acl_save_libdir" | |
10109 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
10110 | done | |
10111 | fi | |
10112 | fi | |
10113 | if test "X$ltrpathdirs" != "X"; then | |
10114 | for found_dir in $ltrpathdirs; do | |
10115 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
10116 | done | |
10117 | fi | |
10118 | ||
10119 | ||
10120 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10121 | ||
10122 | for element in $INCIPT; do | |
10123 | haveit= | |
10124 | for x in $CPPFLAGS; do | |
10125 | ||
10126 | acl_save_prefix="$prefix" | |
10127 | prefix="$acl_final_prefix" | |
10128 | acl_save_exec_prefix="$exec_prefix" | |
10129 | exec_prefix="$acl_final_exec_prefix" | |
10130 | eval x=\"$x\" | |
10131 | exec_prefix="$acl_save_exec_prefix" | |
10132 | prefix="$acl_save_prefix" | |
10133 | ||
10134 | if test "X$x" = "X$element"; then | |
10135 | haveit=yes | |
10136 | break | |
10137 | fi | |
10138 | done | |
10139 | if test -z "$haveit"; then | |
10140 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10141 | fi | |
10142 | done | |
10143 | ||
10144 | ||
10145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
10146 | $as_echo_n "checking for libipt... " >&6; } | |
10147 | if test "${ac_cv_libipt+set}" = set; then : | |
10148 | $as_echo_n "(cached) " >&6 | |
10149 | else | |
10150 | ||
10151 | ac_save_LIBS="$LIBS" | |
10152 | LIBS="$LIBS $LIBIPT" | |
10153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10154 | /* end confdefs.h. */ | |
10155 | #include "intel-pt.h" | |
10156 | int | |
10157 | main () | |
10158 | { | |
10159 | pt_insn_alloc_decoder (0); | |
10160 | ; | |
10161 | return 0; | |
10162 | } | |
10163 | _ACEOF | |
10164 | if ac_fn_c_try_link "$LINENO"; then : | |
10165 | ac_cv_libipt=yes | |
10166 | else | |
10167 | ac_cv_libipt=no | |
10168 | fi | |
10169 | rm -f core conftest.err conftest.$ac_objext \ | |
10170 | conftest$ac_exeext conftest.$ac_ext | |
10171 | LIBS="$ac_save_LIBS" | |
10172 | ||
10173 | fi | |
10174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 | |
10175 | $as_echo "$ac_cv_libipt" >&6; } | |
10176 | if test "$ac_cv_libipt" = yes; then | |
10177 | HAVE_LIBIPT=yes | |
10178 | ||
10179 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h | |
10180 | ||
10181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
10182 | $as_echo_n "checking how to link with libipt... " >&6; } | |
10183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
10184 | $as_echo "$LIBIPT" >&6; } | |
10185 | else | |
10186 | HAVE_LIBIPT=no | |
10187 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10188 | LIBIPT= | |
10189 | LTLIBIPT= | |
10190 | fi | |
10191 | ||
10192 | ||
10193 | ||
10194 | ||
10195 | ||
10196 | ||
10197 | if test "$HAVE_LIBIPT" != yes; then | |
10198 | if test "$with_intel_pt" = yes; then | |
10199 | as_fn_error "libipt is missing or unusable" "$LINENO" 5 | |
10200 | else | |
10201 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
10202 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
10203 | fi | |
10204 | fi | |
10205 | fi | |
10206 | ||
81ecdfbb RW |
10207 | # ------------------------- # |
10208 | # Checks for header files. # | |
10209 | # ------------------------- # | |
c890192f | 10210 | |
81ecdfbb RW |
10211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
10212 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
10213 | if test "${ac_cv_header_stdc+set}" = set; then : | |
10214 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10215 | else |
81ecdfbb | 10216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10217 | /* end confdefs.h. */ |
81ecdfbb RW |
10218 | #include <stdlib.h> |
10219 | #include <stdarg.h> | |
10220 | #include <string.h> | |
10221 | #include <float.h> | |
10222 | ||
a9322a30 TT |
10223 | int |
10224 | main () | |
10225 | { | |
a9322a30 TT |
10226 | |
10227 | ; | |
10228 | return 0; | |
10229 | } | |
bec39cab | 10230 | _ACEOF |
81ecdfbb RW |
10231 | if ac_fn_c_try_compile "$LINENO"; then : |
10232 | ac_cv_header_stdc=yes | |
bec39cab | 10233 | else |
81ecdfbb | 10234 | ac_cv_header_stdc=no |
a9322a30 | 10235 | fi |
81ecdfbb | 10236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 10237 | |
81ecdfbb RW |
10238 | if test $ac_cv_header_stdc = yes; then |
10239 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
10240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10241 | /* end confdefs.h. */ | |
10242 | #include <string.h> | |
bec39cab | 10243 | |
81ecdfbb RW |
10244 | _ACEOF |
10245 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10246 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 10247 | |
bec39cab | 10248 | else |
81ecdfbb RW |
10249 | ac_cv_header_stdc=no |
10250 | fi | |
10251 | rm -f conftest* | |
10252 | ||
10253 | fi | |
10254 | ||
10255 | if test $ac_cv_header_stdc = yes; then | |
10256 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
10257 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10258 | /* end confdefs.h. */ | |
10259 | #include <stdlib.h> | |
10260 | ||
bec39cab | 10261 | _ACEOF |
81ecdfbb RW |
10262 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
10263 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 10264 | |
81ecdfbb RW |
10265 | else |
10266 | ac_cv_header_stdc=no | |
10267 | fi | |
10268 | rm -f conftest* | |
bec39cab | 10269 | |
bec39cab | 10270 | fi |
81ecdfbb RW |
10271 | |
10272 | if test $ac_cv_header_stdc = yes; then | |
10273 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
10274 | if test "$cross_compiling" = yes; then : | |
10275 | : | |
bec39cab | 10276 | else |
81ecdfbb | 10277 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10278 | /* end confdefs.h. */ |
81ecdfbb RW |
10279 | #include <ctype.h> |
10280 | #include <stdlib.h> | |
10281 | #if ((' ' & 0x0FF) == 0x020) | |
10282 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
10283 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
10284 | #else | |
10285 | # define ISLOWER(c) \ | |
10286 | (('a' <= (c) && (c) <= 'i') \ | |
10287 | || ('j' <= (c) && (c) <= 'r') \ | |
10288 | || ('s' <= (c) && (c) <= 'z')) | |
10289 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
10290 | #endif | |
10291 | ||
10292 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
10293 | int |
10294 | main () | |
10295 | { | |
81ecdfbb RW |
10296 | int i; |
10297 | for (i = 0; i < 256; i++) | |
10298 | if (XOR (islower (i), ISLOWER (i)) | |
10299 | || toupper (i) != TOUPPER (i)) | |
10300 | return 2; | |
a9322a30 TT |
10301 | return 0; |
10302 | } | |
bec39cab | 10303 | _ACEOF |
81ecdfbb RW |
10304 | if ac_fn_c_try_run "$LINENO"; then : |
10305 | ||
bec39cab | 10306 | else |
81ecdfbb RW |
10307 | ac_cv_header_stdc=no |
10308 | fi | |
10309 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10310 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10311 | fi | |
bec39cab | 10312 | |
bec39cab | 10313 | fi |
a9322a30 | 10314 | fi |
81ecdfbb RW |
10315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
10316 | $as_echo "$ac_cv_header_stdc" >&6; } | |
10317 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 10318 | |
81ecdfbb | 10319 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 10320 | |
81ecdfbb | 10321 | fi |
bec39cab | 10322 | |
81ecdfbb | 10323 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 10324 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 10325 | thread_db.h \ |
0080a2f6 | 10326 | sys/fault.h \ |
81ecdfbb RW |
10327 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
10328 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
10329 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
9467110b | 10330 | termios.h termio.h \ |
3447c057 | 10331 | sgtty.h elf_hp.h \ |
9467110b | 10332 | dlfcn.h |
81ecdfbb RW |
10333 | do : |
10334 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10335 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10336 | eval as_val=\$$as_ac_Header | |
10337 | if test "x$as_val" = x""yes; then : | |
bec39cab | 10338 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10339 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 10340 | _ACEOF |
c906108c | 10341 | |
bec39cab | 10342 | fi |
81ecdfbb RW |
10343 | |
10344 | done | |
10345 | ||
81ecdfbb RW |
10346 | for ac_header in sys/proc.h |
10347 | do : | |
10348 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
10349 | # include <sys/param.h> | |
10350 | #endif | |
c906108c | 10351 | |
81ecdfbb RW |
10352 | " |
10353 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 10354 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10355 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 10356 | _ACEOF |
5ee754fc | 10357 | |
bec39cab | 10358 | fi |
81ecdfbb RW |
10359 | |
10360 | done | |
10361 | ||
10362 | for ac_header in sys/user.h | |
10363 | do : | |
10364 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
10365 | # include <sys/param.h> | |
a9322a30 TT |
10366 | #endif |
10367 | ||
81ecdfbb RW |
10368 | " |
10369 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
10370 | cat >>confdefs.h <<_ACEOF | |
10371 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 10372 | _ACEOF |
bec39cab | 10373 | |
a9322a30 | 10374 | fi |
bec39cab | 10375 | |
81ecdfbb | 10376 | done |
5ee754fc | 10377 | |
5ee754fc | 10378 | |
81ecdfbb RW |
10379 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
10380 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
10381 | # think that we don't have <curses.h> if we're using GCC. | |
10382 | case $host_os in | |
10383 | solaris2.[789]) | |
10384 | if test "$GCC" = yes; then | |
10385 | ||
10386 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
10387 | ||
10388 | fi ;; | |
10389 | esac | |
10390 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
10391 | do : | |
10392 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10393 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10394 | eval as_val=\$$as_ac_Header | |
10395 | if test "x$as_val" = x""yes; then : | |
bec39cab | 10396 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10397 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 10398 | _ACEOF |
5ee754fc MK |
10399 | |
10400 | fi | |
10401 | ||
81ecdfbb | 10402 | done |
bec39cab | 10403 | |
81ecdfbb RW |
10404 | for ac_header in term.h |
10405 | do : | |
10406 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
10407 | # include <curses.h> | |
10408 | #endif | |
bec39cab | 10409 | |
81ecdfbb RW |
10410 | " |
10411 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
10412 | cat >>confdefs.h <<_ACEOF | |
10413 | #define HAVE_TERM_H 1 | |
a8111142 | 10414 | _ACEOF |
a8111142 | 10415 | |
a8111142 | 10416 | fi |
a8111142 | 10417 | |
81ecdfbb | 10418 | done |
a8111142 TT |
10419 | |
10420 | ||
81ecdfbb RW |
10421 | # ------------------------- # |
10422 | # Checks for declarations. # | |
10423 | # ------------------------- # | |
a9322a30 | 10424 | |
07697489 PA |
10425 | |
10426 | # Check for presence and size of long long. | |
10427 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
10428 | if test "x$ac_cv_type_long_long" = x""yes; then : | |
10429 | ||
10430 | cat >>confdefs.h <<_ACEOF | |
10431 | #define HAVE_LONG_LONG 1 | |
10432 | _ACEOF | |
10433 | ||
10434 | # The cast to long int works around a bug in the HP C Compiler | |
10435 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
10436 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
10437 | # This bug is HP SR number 8606223364. | |
10438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
10439 | $as_echo_n "checking size of long long... " >&6; } | |
10440 | if test "${ac_cv_sizeof_long_long+set}" = set; then : | |
10441 | $as_echo_n "(cached) " >&6 | |
10442 | else | |
10443 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
10444 | ||
10445 | else | |
10446 | if test "$ac_cv_type_long_long" = yes; then | |
10447 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10448 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10449 | { as_fn_set_status 77 | |
10450 | as_fn_error "cannot compute sizeof (long long) | |
10451 | See \`config.log' for more details." "$LINENO" 5; }; } | |
10452 | else | |
10453 | ac_cv_sizeof_long_long=0 | |
10454 | fi | |
10455 | fi | |
10456 | ||
10457 | fi | |
10458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
10459 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
10460 | ||
10461 | ||
10462 | ||
10463 | cat >>confdefs.h <<_ACEOF | |
10464 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
10465 | _ACEOF | |
10466 | ||
10467 | ||
10468 | fi | |
10469 | ||
10470 | ||
10471 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" | |
10472 | if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : | |
10473 | ac_have_decl=1 | |
10474 | else | |
10475 | ac_have_decl=0 | |
10476 | fi | |
10477 | ||
10478 | cat >>confdefs.h <<_ACEOF | |
10479 | #define HAVE_DECL_BASENAME $ac_have_decl | |
10480 | _ACEOF | |
10481 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
10482 | if test "x$ac_cv_have_decl_ffs" = x""yes; then : | |
10483 | ac_have_decl=1 | |
10484 | else | |
10485 | ac_have_decl=0 | |
10486 | fi | |
10487 | ||
10488 | cat >>confdefs.h <<_ACEOF | |
10489 | #define HAVE_DECL_FFS $ac_have_decl | |
10490 | _ACEOF | |
10491 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
10492 | if test "x$ac_cv_have_decl_asprintf" = x""yes; then : | |
10493 | ac_have_decl=1 | |
10494 | else | |
10495 | ac_have_decl=0 | |
10496 | fi | |
10497 | ||
10498 | cat >>confdefs.h <<_ACEOF | |
10499 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
10500 | _ACEOF | |
10501 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
10502 | if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : | |
10503 | ac_have_decl=1 | |
10504 | else | |
10505 | ac_have_decl=0 | |
10506 | fi | |
10507 | ||
10508 | cat >>confdefs.h <<_ACEOF | |
10509 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
10510 | _ACEOF | |
10511 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
10512 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
10513 | ac_have_decl=1 | |
10514 | else | |
10515 | ac_have_decl=0 | |
10516 | fi | |
10517 | ||
10518 | cat >>confdefs.h <<_ACEOF | |
10519 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
10520 | _ACEOF | |
10521 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
10522 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
10523 | ac_have_decl=1 | |
10524 | else | |
10525 | ac_have_decl=0 | |
10526 | fi | |
10527 | ||
10528 | cat >>confdefs.h <<_ACEOF | |
10529 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
10530 | _ACEOF | |
10531 | ||
10532 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
10533 | if test "x$ac_cv_have_decl_strtol" = x""yes; then : | |
10534 | ac_have_decl=1 | |
10535 | else | |
10536 | ac_have_decl=0 | |
10537 | fi | |
10538 | ||
10539 | cat >>confdefs.h <<_ACEOF | |
10540 | #define HAVE_DECL_STRTOL $ac_have_decl | |
10541 | _ACEOF | |
10542 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
10543 | if test "x$ac_cv_have_decl_strtoul" = x""yes; then : | |
10544 | ac_have_decl=1 | |
10545 | else | |
10546 | ac_have_decl=0 | |
10547 | fi | |
10548 | ||
10549 | cat >>confdefs.h <<_ACEOF | |
10550 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
10551 | _ACEOF | |
10552 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
10553 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
10554 | ac_have_decl=1 | |
10555 | else | |
10556 | ac_have_decl=0 | |
10557 | fi | |
10558 | ||
10559 | cat >>confdefs.h <<_ACEOF | |
10560 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
10561 | _ACEOF | |
10562 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
10563 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
10564 | ac_have_decl=1 | |
10565 | else | |
10566 | ac_have_decl=0 | |
10567 | fi | |
10568 | ||
10569 | cat >>confdefs.h <<_ACEOF | |
10570 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
10571 | _ACEOF | |
10572 | ||
10573 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
10574 | if test "x$ac_cv_have_decl_strverscmp" = x""yes; then : | |
10575 | ac_have_decl=1 | |
10576 | else | |
10577 | ac_have_decl=0 | |
10578 | fi | |
10579 | ||
10580 | cat >>confdefs.h <<_ACEOF | |
10581 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
10582 | _ACEOF | |
10583 | ||
10584 | ||
10585 | ||
81ecdfbb RW |
10586 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
10587 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
10588 | ac_have_decl=1 | |
bec39cab | 10589 | else |
81ecdfbb RW |
10590 | ac_have_decl=0 |
10591 | fi | |
10592 | ||
10593 | cat >>confdefs.h <<_ACEOF | |
10594 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 10595 | _ACEOF |
81ecdfbb RW |
10596 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
10597 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
10598 | ac_have_decl=1 | |
10599 | else | |
10600 | ac_have_decl=0 | |
10601 | fi | |
10602 | ||
10603 | cat >>confdefs.h <<_ACEOF | |
10604 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 10605 | _ACEOF |
81ecdfbb RW |
10606 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
10607 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
10608 | ac_have_decl=1 | |
bec39cab | 10609 | else |
81ecdfbb RW |
10610 | ac_have_decl=0 |
10611 | fi | |
bec39cab | 10612 | |
81ecdfbb RW |
10613 | cat >>confdefs.h <<_ACEOF |
10614 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 10615 | _ACEOF |
81ecdfbb RW |
10616 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
10617 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
10618 | ac_have_decl=1 | |
10619 | else | |
10620 | ac_have_decl=0 | |
5ee754fc | 10621 | fi |
81ecdfbb RW |
10622 | |
10623 | cat >>confdefs.h <<_ACEOF | |
10624 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 10625 | _ACEOF |
5ee754fc | 10626 | |
5ee754fc | 10627 | |
81ecdfbb RW |
10628 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
10629 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
10630 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
10631 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10632 | else |
81ecdfbb | 10633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10634 | /* end confdefs.h. */ |
81ecdfbb | 10635 | #include <locale.h> |
a9322a30 TT |
10636 | int |
10637 | main () | |
10638 | { | |
81ecdfbb | 10639 | return LC_MESSAGES |
a9322a30 TT |
10640 | ; |
10641 | return 0; | |
10642 | } | |
bec39cab | 10643 | _ACEOF |
81ecdfbb RW |
10644 | if ac_fn_c_try_link "$LINENO"; then : |
10645 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 10646 | else |
81ecdfbb RW |
10647 | am_cv_val_LC_MESSAGES=no |
10648 | fi | |
10649 | rm -f core conftest.err conftest.$ac_objext \ | |
10650 | conftest$ac_exeext conftest.$ac_ext | |
10651 | fi | |
10652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
10653 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
10654 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 10655 | |
81ecdfbb RW |
10656 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
10657 | ||
10658 | fi | |
10659 | ||
10660 | ||
10661 | # ----------------------- # | |
10662 | # Checks for structures. # | |
10663 | # ----------------------- # | |
10664 | ||
10665 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
10666 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
10667 | ||
10668 | cat >>confdefs.h <<_ACEOF | |
10669 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 10670 | _ACEOF |
7eb368b3 | 10671 | |
81ecdfbb | 10672 | |
7eb368b3 | 10673 | fi |
81ecdfbb RW |
10674 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
10675 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 10676 | |
a9322a30 TT |
10677 | cat >>confdefs.h <<_ACEOF |
10678 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
10679 | _ACEOF |
10680 | ||
a9322a30 | 10681 | |
7eb368b3 NR |
10682 | fi |
10683 | ||
7eb368b3 | 10684 | |
a9322a30 TT |
10685 | # ------------------ # |
10686 | # Checks for types. # | |
10687 | # ------------------ # | |
7eb368b3 | 10688 | |
81ecdfbb RW |
10689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
10690 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
10691 | if test "${ac_cv_type_signal+set}" = set; then : | |
10692 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10693 | else |
81ecdfbb | 10694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10695 | /* end confdefs.h. */ |
a9322a30 TT |
10696 | #include <sys/types.h> |
10697 | #include <signal.h> | |
7cb9022a | 10698 | |
a9322a30 TT |
10699 | int |
10700 | main () | |
10701 | { | |
81ecdfbb | 10702 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
10703 | ; |
10704 | return 0; | |
10705 | } | |
bec39cab | 10706 | _ACEOF |
81ecdfbb RW |
10707 | if ac_fn_c_try_compile "$LINENO"; then : |
10708 | ac_cv_type_signal=int | |
bec39cab | 10709 | else |
81ecdfbb | 10710 | ac_cv_type_signal=void |
bec39cab | 10711 | fi |
81ecdfbb | 10712 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 10713 | fi |
81ecdfbb RW |
10714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
10715 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 10716 | |
a9322a30 TT |
10717 | cat >>confdefs.h <<_ACEOF |
10718 | #define RETSIGTYPE $ac_cv_type_signal | |
10719 | _ACEOF | |
5ee754fc | 10720 | |
bec39cab | 10721 | |
81ecdfbb | 10722 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
10723 | #include <sys/socket.h> |
10724 | ||
81ecdfbb RW |
10725 | " |
10726 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 10727 | |
a9322a30 TT |
10728 | cat >>confdefs.h <<_ACEOF |
10729 | #define HAVE_SOCKLEN_T 1 | |
10730 | _ACEOF | |
10731 | ||
10732 | ||
10733 | fi | |
10734 | ||
10735 | ||
10736 | # ------------------------------------- # | |
10737 | # Checks for compiler characteristics. # | |
10738 | # ------------------------------------- # | |
10739 | ||
81ecdfbb RW |
10740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
10741 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
10742 | if test "${ac_cv_c_const+set}" = set; then : | |
10743 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10744 | else |
81ecdfbb | 10745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10746 | /* end confdefs.h. */ |
a9322a30 TT |
10747 | |
10748 | int | |
10749 | main () | |
10750 | { | |
10751 | /* FIXME: Include the comments suggested by Paul. */ | |
10752 | #ifndef __cplusplus | |
10753 | /* Ultrix mips cc rejects this. */ | |
10754 | typedef int charset[2]; | |
81ecdfbb | 10755 | const charset cs; |
a9322a30 | 10756 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
10757 | char const *const *pcpcc; |
10758 | char **ppc; | |
a9322a30 TT |
10759 | /* NEC SVR4.0.2 mips cc rejects this. */ |
10760 | struct point {int x, y;}; | |
10761 | static struct point const zero = {0,0}; | |
10762 | /* AIX XL C 1.02.0.0 rejects this. | |
10763 | It does not let you subtract one const X* pointer from another in | |
10764 | an arm of an if-expression whose if-part is not a constant | |
10765 | expression */ | |
10766 | const char *g = "string"; | |
81ecdfbb | 10767 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 10768 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
10769 | ++pcpcc; |
10770 | ppc = (char**) pcpcc; | |
10771 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
10772 | { /* SCO 3.2v4 cc rejects this. */ |
10773 | char *t; | |
10774 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
10775 | ||
10776 | *t++ = 0; | |
81ecdfbb | 10777 | if (s) return 0; |
a9322a30 TT |
10778 | } |
10779 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
10780 | int x[] = {25, 17}; | |
10781 | const int *foo = &x[0]; | |
10782 | ++foo; | |
10783 | } | |
10784 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
10785 | typedef const int *iptr; | |
10786 | iptr p = 0; | |
10787 | ++p; | |
10788 | } | |
10789 | { /* AIX XL C 1.02.0.0 rejects this saying | |
10790 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
10791 | struct s { int j; const int *ap[3]; }; | |
10792 | struct s *b; b->j = 5; | |
10793 | } | |
10794 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
10795 | const int foo = 10; | |
81ecdfbb | 10796 | if (!foo) return 0; |
a9322a30 | 10797 | } |
81ecdfbb | 10798 | return !cs[0] && !zero.x; |
a9322a30 TT |
10799 | #endif |
10800 | ||
10801 | ; | |
10802 | return 0; | |
10803 | } | |
bec39cab | 10804 | _ACEOF |
81ecdfbb | 10805 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10806 | ac_cv_c_const=yes |
5ee754fc | 10807 | else |
81ecdfbb | 10808 | ac_cv_c_const=no |
5ee754fc | 10809 | fi |
81ecdfbb | 10810 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 10811 | fi |
81ecdfbb RW |
10812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
10813 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 10814 | if test $ac_cv_c_const = no; then |
bec39cab | 10815 | |
81ecdfbb | 10816 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 10817 | |
5ee754fc | 10818 | fi |
bec39cab | 10819 | |
81ecdfbb RW |
10820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
10821 | $as_echo_n "checking for inline... " >&6; } | |
10822 | if test "${ac_cv_c_inline+set}" = set; then : | |
10823 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10824 | else |
a9322a30 TT |
10825 | ac_cv_c_inline=no |
10826 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 10827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10828 | /* end confdefs.h. */ |
a9322a30 TT |
10829 | #ifndef __cplusplus |
10830 | typedef int foo_t; | |
10831 | static $ac_kw foo_t static_foo () {return 0; } | |
10832 | $ac_kw foo_t foo () {return 0; } | |
10833 | #endif | |
10834 | ||
bec39cab | 10835 | _ACEOF |
81ecdfbb RW |
10836 | if ac_fn_c_try_compile "$LINENO"; then : |
10837 | ac_cv_c_inline=$ac_kw | |
bec39cab | 10838 | fi |
81ecdfbb RW |
10839 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10840 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 10841 | done |
bec39cab | 10842 | |
5ee754fc | 10843 | fi |
81ecdfbb RW |
10844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
10845 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 10846 | |
a9322a30 TT |
10847 | case $ac_cv_c_inline in |
10848 | inline | yes) ;; | |
10849 | *) | |
10850 | case $ac_cv_c_inline in | |
10851 | no) ac_val=;; | |
10852 | *) ac_val=$ac_cv_c_inline;; | |
10853 | esac | |
10854 | cat >>confdefs.h <<_ACEOF | |
10855 | #ifndef __cplusplus | |
10856 | #define inline $ac_val | |
10857 | #endif | |
10858 | _ACEOF | |
bec39cab AC |
10859 | ;; |
10860 | esac | |
bec39cab | 10861 | |
81ecdfbb RW |
10862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
10863 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
10864 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
10865 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10866 | else |
81ecdfbb RW |
10867 | ac_cv_c_bigendian=unknown |
10868 | # See if we're dealing with a universal compiler. | |
10869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10870 | /* end confdefs.h. */ | |
10871 | #ifndef __APPLE_CC__ | |
10872 | not a universal capable compiler | |
10873 | #endif | |
10874 | typedef int dummy; | |
10875 | ||
10876 | _ACEOF | |
10877 | if ac_fn_c_try_compile "$LINENO"; then : | |
10878 | ||
10879 | # Check for potential -arch flags. It is not universal unless | |
10880 | # there are at least two -arch flags with different values. | |
10881 | ac_arch= | |
10882 | ac_prev= | |
10883 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
10884 | if test -n "$ac_prev"; then | |
10885 | case $ac_word in | |
10886 | i?86 | x86_64 | ppc | ppc64) | |
10887 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
10888 | ac_arch=$ac_word | |
10889 | else | |
10890 | ac_cv_c_bigendian=universal | |
10891 | break | |
10892 | fi | |
10893 | ;; | |
10894 | esac | |
10895 | ac_prev= | |
10896 | elif test "x$ac_word" = "x-arch"; then | |
10897 | ac_prev=arch | |
10898 | fi | |
10899 | done | |
10900 | fi | |
10901 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10902 | if test $ac_cv_c_bigendian = unknown; then | |
10903 | # See if sys/param.h defines the BYTE_ORDER macro. | |
10904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10905 | /* end confdefs.h. */ |
a9322a30 | 10906 | #include <sys/types.h> |
81ecdfbb | 10907 | #include <sys/param.h> |
a9322a30 TT |
10908 | |
10909 | int | |
10910 | main () | |
10911 | { | |
81ecdfbb RW |
10912 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
10913 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
10914 | && LITTLE_ENDIAN) | |
10915 | bogus endian macros | |
10916 | #endif | |
a9322a30 TT |
10917 | |
10918 | ; | |
10919 | return 0; | |
10920 | } | |
bec39cab | 10921 | _ACEOF |
81ecdfbb | 10922 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10923 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 10924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10925 | /* end confdefs.h. */ |
a9322a30 | 10926 | #include <sys/types.h> |
81ecdfbb | 10927 | #include <sys/param.h> |
a9322a30 TT |
10928 | |
10929 | int | |
10930 | main () | |
10931 | { | |
10932 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
10933 | not big endian |
10934 | #endif | |
a9322a30 TT |
10935 | |
10936 | ; | |
10937 | return 0; | |
10938 | } | |
bec39cab | 10939 | _ACEOF |
81ecdfbb | 10940 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10941 | ac_cv_c_bigendian=yes |
5ee754fc | 10942 | else |
81ecdfbb | 10943 | ac_cv_c_bigendian=no |
5ee754fc | 10944 | fi |
81ecdfbb RW |
10945 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10946 | fi | |
10947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10948 | fi | |
10949 | if test $ac_cv_c_bigendian = unknown; then | |
10950 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
10951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10952 | /* end confdefs.h. */ | |
10953 | #include <limits.h> | |
bec39cab | 10954 | |
81ecdfbb RW |
10955 | int |
10956 | main () | |
10957 | { | |
10958 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
10959 | bogus endian macros | |
10960 | #endif | |
10961 | ||
10962 | ; | |
10963 | return 0; | |
10964 | } | |
7eb368b3 | 10965 | _ACEOF |
81ecdfbb RW |
10966 | if ac_fn_c_try_compile "$LINENO"; then : |
10967 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
10968 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 10969 | /* end confdefs.h. */ |
81ecdfbb RW |
10970 | #include <limits.h> |
10971 | ||
7eb368b3 NR |
10972 | int |
10973 | main () | |
10974 | { | |
81ecdfbb RW |
10975 | #ifndef _BIG_ENDIAN |
10976 | not big endian | |
10977 | #endif | |
10978 | ||
7eb368b3 NR |
10979 | ; |
10980 | return 0; | |
10981 | } | |
10982 | _ACEOF | |
81ecdfbb | 10983 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10984 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
10985 | else |
10986 | ac_cv_c_bigendian=no | |
a9322a30 | 10987 | fi |
81ecdfbb | 10988 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 10989 | fi |
81ecdfbb RW |
10990 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10991 | fi | |
10992 | if test $ac_cv_c_bigendian = unknown; then | |
10993 | # Compile a test program. | |
10994 | if test "$cross_compiling" = yes; then : | |
10995 | # Try to guess by grepping values from an object file. | |
10996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10997 | /* end confdefs.h. */ | |
10998 | short int ascii_mm[] = | |
10999 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
11000 | short int ascii_ii[] = | |
11001 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
11002 | int use_ascii (int i) { | |
11003 | return ascii_mm[i] + ascii_ii[i]; | |
11004 | } | |
11005 | short int ebcdic_ii[] = | |
11006 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
11007 | short int ebcdic_mm[] = | |
11008 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
11009 | int use_ebcdic (int i) { | |
11010 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
11011 | } | |
11012 | extern int foo; | |
7eb368b3 | 11013 | |
81ecdfbb RW |
11014 | int |
11015 | main () | |
11016 | { | |
11017 | return use_ascii (foo) == use_ebcdic (foo); | |
11018 | ; | |
11019 | return 0; | |
11020 | } | |
11021 | _ACEOF | |
11022 | if ac_fn_c_try_compile "$LINENO"; then : | |
11023 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
11024 | ac_cv_c_bigendian=yes | |
11025 | fi | |
11026 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
11027 | if test "$ac_cv_c_bigendian" = unknown; then | |
11028 | ac_cv_c_bigendian=no | |
11029 | else | |
11030 | # finding both strings is unlikely to happen, but who knows? | |
11031 | ac_cv_c_bigendian=unknown | |
11032 | fi | |
11033 | fi | |
7eb368b3 | 11034 | fi |
81ecdfbb | 11035 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11036 | else |
81ecdfbb | 11037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11038 | /* end confdefs.h. */ |
81ecdfbb | 11039 | $ac_includes_default |
d3ea6809 MM |
11040 | int |
11041 | main () | |
11042 | { | |
81ecdfbb RW |
11043 | |
11044 | /* Are we little or big endian? From Harbison&Steele. */ | |
11045 | union | |
11046 | { | |
11047 | long int l; | |
11048 | char c[sizeof (long int)]; | |
11049 | } u; | |
11050 | u.l = 1; | |
11051 | return u.c[sizeof (long int) - 1] == 1; | |
11052 | ||
11053 | ; | |
11054 | return 0; | |
d3ea6809 MM |
11055 | } |
11056 | _ACEOF | |
81ecdfbb | 11057 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 11058 | ac_cv_c_bigendian=no |
d3ea6809 | 11059 | else |
81ecdfbb | 11060 | ac_cv_c_bigendian=yes |
d3ea6809 | 11061 | fi |
81ecdfbb RW |
11062 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11063 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11064 | fi |
a9322a30 | 11065 | |
81ecdfbb RW |
11066 | fi |
11067 | fi | |
11068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
11069 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
11070 | case $ac_cv_c_bigendian in #( | |
11071 | yes) | |
11072 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
11073 | ;; #( | |
11074 | no) | |
11075 | ;; #( | |
11076 | universal) | |
11077 | ||
11078 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
11079 | ||
11080 | ;; #( | |
11081 | *) | |
11082 | as_fn_error "unknown endianness | |
11083 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
11084 | esac | |
d3ea6809 MM |
11085 | |
11086 | ||
a9322a30 TT |
11087 | # ------------------------------ # |
11088 | # Checks for library functions. # | |
11089 | # ------------------------------ # | |
d3ea6809 | 11090 | |
a9322a30 | 11091 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
11092 | do : |
11093 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11094 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11095 | eval as_val=\$$as_ac_Header | |
11096 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11097 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11098 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11099 | _ACEOF |
b757528f | 11100 | |
b757528f | 11101 | fi |
bec39cab | 11102 | |
a9322a30 | 11103 | done |
a3828db0 | 11104 | |
a9322a30 | 11105 | for ac_func in getpagesize |
81ecdfbb RW |
11106 | do : |
11107 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
11108 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 11109 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11110 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 11111 | _ACEOF |
bcb3dc3d | 11112 | |
bcb3dc3d MK |
11113 | fi |
11114 | done | |
11115 | ||
81ecdfbb RW |
11116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
11117 | $as_echo_n "checking for working mmap... " >&6; } | |
11118 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
11119 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11120 | else |
81ecdfbb | 11121 | if test "$cross_compiling" = yes; then : |
a9322a30 | 11122 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 11123 | else |
81ecdfbb | 11124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11125 | /* end confdefs.h. */ |
a9322a30 TT |
11126 | $ac_includes_default |
11127 | /* malloc might have been renamed as rpl_malloc. */ | |
11128 | #undef malloc | |
bec39cab | 11129 | |
a9322a30 TT |
11130 | /* Thanks to Mike Haertel and Jim Avera for this test. |
11131 | Here is a matrix of mmap possibilities: | |
11132 | mmap private not fixed | |
11133 | mmap private fixed at somewhere currently unmapped | |
11134 | mmap private fixed at somewhere already mapped | |
11135 | mmap shared not fixed | |
11136 | mmap shared fixed at somewhere currently unmapped | |
11137 | mmap shared fixed at somewhere already mapped | |
11138 | For private mappings, we should verify that changes cannot be read() | |
11139 | back from the file, nor mmap's back from the file at a different | |
11140 | address. (There have been systems where private was not correctly | |
11141 | implemented like the infamous i386 svr4.0, and systems where the | |
11142 | VM page cache was not coherent with the file system buffer cache | |
11143 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
11144 | For shared mappings, we should conversely verify that changes get | |
11145 | propagated back to all the places they're supposed to be. | |
bec39cab | 11146 | |
a9322a30 TT |
11147 | Grep wants private fixed already mapped. |
11148 | The main things grep needs to know about mmap are: | |
11149 | * does it exist and is it safe to write into the mmap'd area | |
11150 | * how to use it (BSD variants) */ | |
8b9cf735 | 11151 | |
a9322a30 TT |
11152 | #include <fcntl.h> |
11153 | #include <sys/mman.h> | |
8b9cf735 | 11154 | |
81ecdfbb | 11155 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 11156 | char *malloc (); |
a3828db0 MK |
11157 | #endif |
11158 | ||
a9322a30 | 11159 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 11160 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 11161 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 11162 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
11163 | # define HAVE_SYS_PARAM_H 1 |
11164 | # endif | |
11165 | ||
11166 | # ifdef _SC_PAGESIZE | |
11167 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
11168 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 11169 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
11170 | # include <sys/param.h> |
11171 | # ifdef EXEC_PAGESIZE | |
11172 | # define getpagesize() EXEC_PAGESIZE | |
11173 | # else /* no EXEC_PAGESIZE */ | |
11174 | # ifdef NBPG | |
11175 | # define getpagesize() NBPG * CLSIZE | |
11176 | # ifndef CLSIZE | |
11177 | # define CLSIZE 1 | |
11178 | # endif /* no CLSIZE */ | |
11179 | # else /* no NBPG */ | |
11180 | # ifdef NBPC | |
11181 | # define getpagesize() NBPC | |
11182 | # else /* no NBPC */ | |
11183 | # ifdef PAGESIZE | |
11184 | # define getpagesize() PAGESIZE | |
11185 | # endif /* PAGESIZE */ | |
11186 | # endif /* no NBPC */ | |
11187 | # endif /* no NBPG */ | |
11188 | # endif /* no EXEC_PAGESIZE */ | |
11189 | # else /* no HAVE_SYS_PARAM_H */ | |
11190 | # define getpagesize() 8192 /* punt totally */ | |
11191 | # endif /* no HAVE_SYS_PARAM_H */ | |
11192 | # endif /* no _SC_PAGESIZE */ | |
11193 | ||
11194 | #endif /* no HAVE_GETPAGESIZE */ | |
11195 | ||
bec39cab AC |
11196 | int |
11197 | main () | |
11198 | { | |
a9322a30 TT |
11199 | char *data, *data2, *data3; |
11200 | int i, pagesize; | |
11201 | int fd; | |
11202 | ||
11203 | pagesize = getpagesize (); | |
11204 | ||
11205 | /* First, make a file with some known garbage in it. */ | |
11206 | data = (char *) malloc (pagesize); | |
11207 | if (!data) | |
81ecdfbb | 11208 | return 1; |
a9322a30 TT |
11209 | for (i = 0; i < pagesize; ++i) |
11210 | *(data + i) = rand (); | |
11211 | umask (0); | |
11212 | fd = creat ("conftest.mmap", 0600); | |
11213 | if (fd < 0) | |
81ecdfbb | 11214 | return 1; |
a9322a30 | 11215 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 11216 | return 1; |
a9322a30 TT |
11217 | close (fd); |
11218 | ||
11219 | /* Next, try to mmap the file at a fixed address which already has | |
11220 | something else allocated at it. If we can, also make sure that | |
11221 | we see the same garbage. */ | |
11222 | fd = open ("conftest.mmap", O_RDWR); | |
11223 | if (fd < 0) | |
81ecdfbb | 11224 | return 1; |
a9322a30 TT |
11225 | data2 = (char *) malloc (2 * pagesize); |
11226 | if (!data2) | |
81ecdfbb RW |
11227 | return 1; |
11228 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
11229 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
11230 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 11231 | return 1; |
a9322a30 TT |
11232 | for (i = 0; i < pagesize; ++i) |
11233 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 11234 | return 1; |
a9322a30 TT |
11235 | |
11236 | /* Finally, make sure that changes to the mapped area do not | |
11237 | percolate back to the file as seen by read(). (This is a bug on | |
11238 | some variants of i386 svr4.0.) */ | |
11239 | for (i = 0; i < pagesize; ++i) | |
11240 | *(data2 + i) = *(data2 + i) + 1; | |
11241 | data3 = (char *) malloc (pagesize); | |
11242 | if (!data3) | |
81ecdfbb | 11243 | return 1; |
a9322a30 | 11244 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 11245 | return 1; |
a9322a30 TT |
11246 | for (i = 0; i < pagesize; ++i) |
11247 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 11248 | return 1; |
a9322a30 | 11249 | close (fd); |
81ecdfbb | 11250 | return 0; |
bec39cab AC |
11251 | } |
11252 | _ACEOF | |
81ecdfbb | 11253 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 11254 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 11255 | else |
81ecdfbb | 11256 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 11257 | fi |
81ecdfbb RW |
11258 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11259 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 11260 | fi |
81ecdfbb | 11261 | |
a9322a30 | 11262 | fi |
81ecdfbb RW |
11263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
11264 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
11265 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
11266 | ||
81ecdfbb | 11267 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 11268 | |
086ec9eb | 11269 | fi |
a9322a30 | 11270 | rm -f conftest.mmap |
a3828db0 | 11271 | |
81ecdfbb RW |
11272 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
11273 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 11274 | |
a9322a30 TT |
11275 | else |
11276 | ||
11277 | cat >>confdefs.h <<_ACEOF | |
11278 | #define pid_t int | |
bec39cab | 11279 | _ACEOF |
086ec9eb MK |
11280 | |
11281 | fi | |
11282 | ||
81ecdfbb RW |
11283 | for ac_header in vfork.h |
11284 | do : | |
11285 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
11286 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 11287 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11288 | #define HAVE_VFORK_H 1 |
bec39cab | 11289 | _ACEOF |
c906108c SS |
11290 | |
11291 | fi | |
a9322a30 | 11292 | |
a3828db0 | 11293 | done |
c906108c | 11294 | |
a9322a30 | 11295 | for ac_func in fork vfork |
81ecdfbb RW |
11296 | do : |
11297 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11298 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11299 | eval as_val=\$$as_ac_var | |
11300 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 11301 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11302 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 11303 | _ACEOF |
b83266a0 | 11304 | |
97bf5e38 | 11305 | fi |
a3828db0 | 11306 | done |
b83266a0 | 11307 | |
a9322a30 | 11308 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
11309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
11310 | $as_echo_n "checking for working fork... " >&6; } | |
11311 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
11312 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11313 | else |
81ecdfbb | 11314 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
11315 | ac_cv_func_fork_works=cross |
11316 | else | |
81ecdfbb RW |
11317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11318 | /* end confdefs.h. */ | |
11319 | $ac_includes_default | |
11320 | int | |
11321 | main () | |
11322 | { | |
11323 | ||
11324 | /* By Ruediger Kuhlmann. */ | |
11325 | return fork () < 0; | |
11326 | ||
11327 | ; | |
11328 | return 0; | |
11329 | } | |
a9322a30 | 11330 | _ACEOF |
81ecdfbb | 11331 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
11332 | ac_cv_func_fork_works=yes |
11333 | else | |
81ecdfbb | 11334 | ac_cv_func_fork_works=no |
a9322a30 | 11335 | fi |
81ecdfbb RW |
11336 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11337 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11338 | fi |
81ecdfbb | 11339 | |
a9322a30 | 11340 | fi |
81ecdfbb RW |
11341 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
11342 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
11343 | |
11344 | else | |
11345 | ac_cv_func_fork_works=$ac_cv_func_fork | |
11346 | fi | |
11347 | if test "x$ac_cv_func_fork_works" = xcross; then | |
11348 | case $host in | |
11349 | *-*-amigaos* | *-*-msdosdjgpp*) | |
11350 | # Override, as these systems have only a dummy fork() stub | |
11351 | ac_cv_func_fork_works=no | |
11352 | ;; | |
11353 | *) | |
11354 | ac_cv_func_fork_works=yes | |
11355 | ;; | |
11356 | esac | |
81ecdfbb RW |
11357 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
11358 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
11359 | fi |
11360 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
11361 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
11362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
11363 | $as_echo_n "checking for working vfork... " >&6; } | |
11364 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
11365 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11366 | else |
81ecdfbb | 11367 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
11368 | ac_cv_func_vfork_works=cross |
11369 | else | |
81ecdfbb | 11370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
11371 | /* end confdefs.h. */ |
11372 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 11373 | $ac_includes_default |
a9322a30 | 11374 | #include <sys/wait.h> |
81ecdfbb | 11375 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
11376 | # include <vfork.h> |
11377 | #endif | |
11378 | /* On some sparc systems, changes by the child to local and incoming | |
11379 | argument registers are propagated back to the parent. The compiler | |
11380 | is told about this with #include <vfork.h>, but some compilers | |
11381 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
11382 | static variable whose address is put into a register that is | |
11383 | clobbered by the vfork. */ | |
11384 | static void | |
11385 | #ifdef __cplusplus | |
11386 | sparc_address_test (int arg) | |
11387 | # else | |
11388 | sparc_address_test (arg) int arg; | |
11389 | #endif | |
11390 | { | |
11391 | static pid_t child; | |
11392 | if (!child) { | |
11393 | child = vfork (); | |
11394 | if (child < 0) { | |
11395 | perror ("vfork"); | |
11396 | _exit(2); | |
11397 | } | |
11398 | if (!child) { | |
11399 | arg = getpid(); | |
11400 | write(-1, "", 0); | |
11401 | _exit (arg); | |
11402 | } | |
11403 | } | |
11404 | } | |
11405 | ||
11406 | int | |
11407 | main () | |
11408 | { | |
11409 | pid_t parent = getpid (); | |
11410 | pid_t child; | |
11411 | ||
11412 | sparc_address_test (0); | |
11413 | ||
11414 | child = vfork (); | |
11415 | ||
11416 | if (child == 0) { | |
11417 | /* Here is another test for sparc vfork register problems. This | |
11418 | test uses lots of local variables, at least as many local | |
11419 | variables as main has allocated so far including compiler | |
11420 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
11421 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
11422 | reuse the register of parent for one of the local variables, | |
11423 | since it will think that parent can't possibly be used any more | |
11424 | in this routine. Assigning to the local variable will thus | |
11425 | munge parent in the parent process. */ | |
11426 | pid_t | |
11427 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
11428 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
11429 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
11430 | use the same hardware register for all 8 local variables. */ | |
11431 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
11432 | || p != p5 || p != p6 || p != p7) | |
11433 | _exit(1); | |
11434 | ||
11435 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
11436 | from child file descriptors. If the child closes a descriptor | |
11437 | before it execs or exits, this munges the parent's descriptor | |
11438 | as well. Test for this by closing stdout in the child. */ | |
11439 | _exit(close(fileno(stdout)) != 0); | |
11440 | } else { | |
11441 | int status; | |
11442 | struct stat st; | |
11443 | ||
11444 | while (wait(&status) != child) | |
11445 | ; | |
81ecdfbb | 11446 | return ( |
a9322a30 TT |
11447 | /* Was there some problem with vforking? */ |
11448 | child < 0 | |
11449 | ||
11450 | /* Did the child fail? (This shouldn't happen.) */ | |
11451 | || status | |
11452 | ||
11453 | /* Did the vfork/compiler bug occur? */ | |
11454 | || parent != getpid() | |
11455 | ||
11456 | /* Did the file descriptor bug occur? */ | |
11457 | || fstat(fileno(stdout), &st) != 0 | |
11458 | ); | |
11459 | } | |
11460 | } | |
11461 | _ACEOF | |
81ecdfbb | 11462 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
11463 | ac_cv_func_vfork_works=yes |
11464 | else | |
81ecdfbb | 11465 | ac_cv_func_vfork_works=no |
a9322a30 | 11466 | fi |
81ecdfbb RW |
11467 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11468 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11469 | fi |
81ecdfbb | 11470 | |
a9322a30 | 11471 | fi |
81ecdfbb RW |
11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
11473 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
11474 | |
11475 | fi; | |
11476 | if test "x$ac_cv_func_fork_works" = xcross; then | |
11477 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
11478 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
11479 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
11480 | fi |
11481 | ||
11482 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
11483 | ||
81ecdfbb | 11484 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
11485 | |
11486 | else | |
11487 | ||
81ecdfbb | 11488 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
11489 | |
11490 | fi | |
11491 | if test "x$ac_cv_func_fork_works" = xyes; then | |
11492 | ||
81ecdfbb | 11493 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
11494 | |
11495 | fi | |
11496 | ||
cdf43629 | 11497 | for ac_func in getauxval getrusage getuid getgid \ |
bdca27a2 | 11498 | pipe poll pread pread64 pwrite resize_term \ |
7313baad | 11499 | sbrk setpgid setpgrp setsid \ |
9467110b | 11500 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 11501 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
3332aaf2 | 11502 | setrlimit getrlimit posix_madvise waitpid \ |
4b8b5e72 | 11503 | ptrace64 sigaltstack mkdtemp setns |
81ecdfbb RW |
11504 | do : |
11505 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11506 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11507 | eval as_val=\$$as_ac_var | |
11508 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 11509 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11510 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
11511 | _ACEOF |
11512 | ||
11513 | fi | |
11514 | done | |
11515 | ||
11516 | ||
81ecdfbb RW |
11517 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
11518 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
11519 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
11520 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 11521 | else |
81ecdfbb | 11522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
11523 | /* end confdefs.h. */ |
11524 | #include <langinfo.h> | |
11525 | int | |
11526 | main () | |
11527 | { | |
11528 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
11529 | ; |
11530 | return 0; | |
11531 | } | |
11532 | _ACEOF | |
81ecdfbb | 11533 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 11534 | am_cv_langinfo_codeset=yes |
a4db0f07 | 11535 | else |
81ecdfbb | 11536 | am_cv_langinfo_codeset=no |
a4db0f07 | 11537 | fi |
81ecdfbb RW |
11538 | rm -f core conftest.err conftest.$ac_objext \ |
11539 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 11540 | |
a4db0f07 | 11541 | fi |
81ecdfbb RW |
11542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
11543 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
11544 | if test $am_cv_langinfo_codeset = yes; then |
11545 | ||
81ecdfbb | 11546 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 11547 | |
6c7a06a3 | 11548 | fi |
c906108c | 11549 | |
06825bd1 | 11550 | |
3266f10b TT |
11551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
11552 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11553 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11554 | $as_echo_n "(cached) " >&6 | |
11555 | else | |
11556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11557 | /* end confdefs.h. */ | |
11558 | #include <stdlib.h> | |
11559 | #include <stdarg.h> | |
11560 | #include <string.h> | |
11561 | #include <float.h> | |
11562 | ||
11563 | int | |
11564 | main () | |
11565 | { | |
11566 | ||
11567 | ; | |
11568 | return 0; | |
11569 | } | |
11570 | _ACEOF | |
11571 | if ac_fn_c_try_compile "$LINENO"; then : | |
11572 | ac_cv_header_stdc=yes | |
11573 | else | |
11574 | ac_cv_header_stdc=no | |
11575 | fi | |
11576 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11577 | ||
11578 | if test $ac_cv_header_stdc = yes; then | |
11579 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11580 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11581 | /* end confdefs.h. */ | |
11582 | #include <string.h> | |
11583 | ||
11584 | _ACEOF | |
11585 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11586 | $EGREP "memchr" >/dev/null 2>&1; then : | |
11587 | ||
11588 | else | |
11589 | ac_cv_header_stdc=no | |
11590 | fi | |
11591 | rm -f conftest* | |
11592 | ||
11593 | fi | |
11594 | ||
11595 | if test $ac_cv_header_stdc = yes; then | |
11596 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11598 | /* end confdefs.h. */ | |
11599 | #include <stdlib.h> | |
11600 | ||
11601 | _ACEOF | |
11602 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11603 | $EGREP "free" >/dev/null 2>&1; then : | |
11604 | ||
11605 | else | |
11606 | ac_cv_header_stdc=no | |
11607 | fi | |
11608 | rm -f conftest* | |
11609 | ||
11610 | fi | |
11611 | ||
11612 | if test $ac_cv_header_stdc = yes; then | |
11613 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11614 | if test "$cross_compiling" = yes; then : | |
11615 | : | |
11616 | else | |
11617 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11618 | /* end confdefs.h. */ | |
11619 | #include <ctype.h> | |
11620 | #include <stdlib.h> | |
11621 | #if ((' ' & 0x0FF) == 0x020) | |
11622 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11623 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11624 | #else | |
11625 | # define ISLOWER(c) \ | |
11626 | (('a' <= (c) && (c) <= 'i') \ | |
11627 | || ('j' <= (c) && (c) <= 'r') \ | |
11628 | || ('s' <= (c) && (c) <= 'z')) | |
11629 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11630 | #endif | |
11631 | ||
11632 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
11633 | int | |
11634 | main () | |
11635 | { | |
11636 | int i; | |
11637 | for (i = 0; i < 256; i++) | |
11638 | if (XOR (islower (i), ISLOWER (i)) | |
11639 | || toupper (i) != TOUPPER (i)) | |
11640 | return 2; | |
11641 | return 0; | |
11642 | } | |
11643 | _ACEOF | |
11644 | if ac_fn_c_try_run "$LINENO"; then : | |
11645 | ||
11646 | else | |
11647 | ac_cv_header_stdc=no | |
11648 | fi | |
11649 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11650 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11651 | fi | |
11652 | ||
11653 | fi | |
11654 | fi | |
11655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
11656 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11657 | if test $ac_cv_header_stdc = yes; then | |
11658 | ||
11659 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
11660 | ||
3266f10b TT |
11661 | fi |
11662 | ||
11663 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
11664 | # for constant arguments. Useless! | |
11665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
11666 | $as_echo_n "checking for working alloca.h... " >&6; } | |
11667 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
11668 | $as_echo_n "(cached) " >&6 | |
11669 | else | |
11670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11671 | /* end confdefs.h. */ | |
11672 | #include <alloca.h> | |
11673 | int | |
11674 | main () | |
11675 | { | |
11676 | char *p = (char *) alloca (2 * sizeof (int)); | |
11677 | if (p) return 0; | |
11678 | ; | |
11679 | return 0; | |
11680 | } | |
11681 | _ACEOF | |
11682 | if ac_fn_c_try_link "$LINENO"; then : | |
11683 | ac_cv_working_alloca_h=yes | |
11684 | else | |
11685 | ac_cv_working_alloca_h=no | |
11686 | fi | |
11687 | rm -f core conftest.err conftest.$ac_objext \ | |
11688 | conftest$ac_exeext conftest.$ac_ext | |
11689 | fi | |
11690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
11691 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
11692 | if test $ac_cv_working_alloca_h = yes; then | |
11693 | ||
11694 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
11695 | ||
11696 | fi | |
11697 | ||
11698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
11699 | $as_echo_n "checking for alloca... " >&6; } | |
11700 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
11701 | $as_echo_n "(cached) " >&6 | |
11702 | else | |
11703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11704 | /* end confdefs.h. */ | |
11705 | #ifdef __GNUC__ | |
11706 | # define alloca __builtin_alloca | |
11707 | #else | |
11708 | # ifdef _MSC_VER | |
11709 | # include <malloc.h> | |
11710 | # define alloca _alloca | |
11711 | # else | |
11712 | # ifdef HAVE_ALLOCA_H | |
11713 | # include <alloca.h> | |
11714 | # else | |
11715 | # ifdef _AIX | |
11716 | #pragma alloca | |
11717 | # else | |
11718 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
11719 | char *alloca (); | |
11720 | # endif | |
11721 | # endif | |
11722 | # endif | |
11723 | # endif | |
11724 | #endif | |
11725 | ||
11726 | int | |
11727 | main () | |
11728 | { | |
11729 | char *p = (char *) alloca (1); | |
11730 | if (p) return 0; | |
11731 | ; | |
11732 | return 0; | |
11733 | } | |
11734 | _ACEOF | |
11735 | if ac_fn_c_try_link "$LINENO"; then : | |
11736 | ac_cv_func_alloca_works=yes | |
11737 | else | |
11738 | ac_cv_func_alloca_works=no | |
11739 | fi | |
11740 | rm -f core conftest.err conftest.$ac_objext \ | |
11741 | conftest$ac_exeext conftest.$ac_ext | |
11742 | fi | |
11743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
11744 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
11745 | ||
11746 | if test $ac_cv_func_alloca_works = yes; then | |
11747 | ||
11748 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
11749 | ||
11750 | else | |
11751 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
11752 | # that cause trouble. Some versions do not even contain alloca or | |
11753 | # contain a buggy version. If you still want to use their alloca, | |
11754 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
11755 | ||
11756 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
11757 | ||
11758 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
11759 | ||
11760 | ||
11761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
11762 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
11763 | if test "${ac_cv_os_cray+set}" = set; then : | |
11764 | $as_echo_n "(cached) " >&6 | |
11765 | else | |
11766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11767 | /* end confdefs.h. */ | |
11768 | #if defined CRAY && ! defined CRAY2 | |
11769 | webecray | |
11770 | #else | |
11771 | wenotbecray | |
11772 | #endif | |
11773 | ||
11774 | _ACEOF | |
11775 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11776 | $EGREP "webecray" >/dev/null 2>&1; then : | |
11777 | ac_cv_os_cray=yes | |
11778 | else | |
11779 | ac_cv_os_cray=no | |
11780 | fi | |
11781 | rm -f conftest* | |
11782 | ||
11783 | fi | |
11784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
11785 | $as_echo "$ac_cv_os_cray" >&6; } | |
11786 | if test $ac_cv_os_cray = yes; then | |
11787 | for ac_func in _getb67 GETB67 getb67; do | |
11788 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11789 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11790 | eval as_val=\$$as_ac_var | |
11791 | if test "x$as_val" = x""yes; then : | |
11792 | ||
11793 | cat >>confdefs.h <<_ACEOF | |
11794 | #define CRAY_STACKSEG_END $ac_func | |
11795 | _ACEOF | |
11796 | ||
11797 | break | |
11798 | fi | |
11799 | ||
11800 | done | |
11801 | fi | |
11802 | ||
11803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
11804 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
11805 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
11806 | $as_echo_n "(cached) " >&6 | |
11807 | else | |
11808 | if test "$cross_compiling" = yes; then : | |
11809 | ac_cv_c_stack_direction=0 | |
11810 | else | |
11811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11812 | /* end confdefs.h. */ | |
11813 | $ac_includes_default | |
11814 | int | |
11815 | find_stack_direction () | |
11816 | { | |
11817 | static char *addr = 0; | |
11818 | auto char dummy; | |
11819 | if (addr == 0) | |
11820 | { | |
11821 | addr = &dummy; | |
11822 | return find_stack_direction (); | |
11823 | } | |
11824 | else | |
11825 | return (&dummy > addr) ? 1 : -1; | |
11826 | } | |
11827 | ||
11828 | int | |
11829 | main () | |
11830 | { | |
11831 | return find_stack_direction () < 0; | |
11832 | } | |
11833 | _ACEOF | |
11834 | if ac_fn_c_try_run "$LINENO"; then : | |
11835 | ac_cv_c_stack_direction=1 | |
11836 | else | |
11837 | ac_cv_c_stack_direction=-1 | |
11838 | fi | |
11839 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11840 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11841 | fi | |
11842 | ||
11843 | fi | |
11844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
11845 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
11846 | cat >>confdefs.h <<_ACEOF | |
11847 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
11848 | _ACEOF | |
11849 | ||
11850 | ||
11851 | fi | |
11852 | ||
11853 | ||
11854 | ||
11855 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
11856 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
11857 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
11858 | $as_echo_n "(cached) " >&6 | |
11859 | else | |
11860 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11861 | /* end confdefs.h. */ | |
11862 | #include <langinfo.h> | |
11863 | int | |
11864 | main () | |
11865 | { | |
11866 | char* cs = nl_langinfo(CODESET); | |
11867 | ; | |
11868 | return 0; | |
11869 | } | |
11870 | _ACEOF | |
11871 | if ac_fn_c_try_link "$LINENO"; then : | |
11872 | am_cv_langinfo_codeset=yes | |
11873 | else | |
11874 | am_cv_langinfo_codeset=no | |
11875 | fi | |
11876 | rm -f core conftest.err conftest.$ac_objext \ | |
11877 | conftest$ac_exeext conftest.$ac_ext | |
11878 | ||
11879 | fi | |
11880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
11881 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
11882 | if test $am_cv_langinfo_codeset = yes; then | |
11883 | ||
11884 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
11885 | ||
11886 | fi | |
11887 | ||
11888 | ||
a3d08894 | 11889 | for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h |
3266f10b TT |
11890 | do : |
11891 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11892 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11893 | eval as_val=\$$as_ac_Header | |
11894 | if test "x$as_val" = x""yes; then : | |
11895 | cat >>confdefs.h <<_ACEOF | |
11896 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11897 | _ACEOF | |
11898 | ||
11899 | fi | |
11900 | ||
11901 | done | |
11902 | ||
11903 | ||
11904 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair | |
11905 | do : | |
11906 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11907 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11908 | eval as_val=\$$as_ac_var | |
11909 | if test "x$as_val" = x""yes; then : | |
11910 | cat >>confdefs.h <<_ACEOF | |
11911 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11912 | _ACEOF | |
11913 | ||
11914 | fi | |
11915 | done | |
11916 | ||
11917 | ||
11918 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
11919 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
11920 | ac_have_decl=1 | |
11921 | else | |
11922 | ac_have_decl=0 | |
11923 | fi | |
11924 | ||
11925 | cat >>confdefs.h <<_ACEOF | |
11926 | #define HAVE_DECL_STRERROR $ac_have_decl | |
11927 | _ACEOF | |
11928 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
11929 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
11930 | ac_have_decl=1 | |
11931 | else | |
11932 | ac_have_decl=0 | |
11933 | fi | |
11934 | ||
11935 | cat >>confdefs.h <<_ACEOF | |
11936 | #define HAVE_DECL_STRSTR $ac_have_decl | |
11937 | _ACEOF | |
11938 | ||
11939 | ||
e9bcb658 GB |
11940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
11941 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
11942 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
11943 | $as_echo_n "(cached) " >&6 | |
11944 | else | |
11945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11946 | /* end confdefs.h. */ | |
11947 | ||
11948 | #include <setjmp.h> | |
11949 | ||
11950 | int | |
11951 | main () | |
11952 | { | |
11953 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
11954 | ; | |
11955 | return 0; | |
11956 | } | |
11957 | _ACEOF | |
11958 | if ac_fn_c_try_compile "$LINENO"; then : | |
11959 | gdb_cv_func_sigsetjmp=yes | |
11960 | else | |
11961 | gdb_cv_func_sigsetjmp=no | |
11962 | fi | |
11963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11964 | fi | |
11965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
11966 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
11967 | if test $gdb_cv_func_sigsetjmp = yes; then | |
11968 | ||
11969 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
11970 | ||
11971 | fi | |
11972 | ||
3266f10b | 11973 | |
54019719 PA |
11974 | # Check the return and argument types of ptrace. |
11975 | ||
11976 | ||
11977 | ||
11978 | for ac_header in sys/ptrace.h ptrace.h | |
11979 | do : | |
11980 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11981 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11982 | eval as_val=\$$as_ac_Header | |
11983 | if test "x$as_val" = x""yes; then : | |
11984 | cat >>confdefs.h <<_ACEOF | |
11985 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11986 | _ACEOF | |
11987 | ||
11988 | fi | |
11989 | ||
11990 | done | |
11991 | ||
11992 | ||
11993 | # Needs to be tested in C++ mode, to detect whether we need to cast | |
11994 | # the first argument to enum __ptrace_request. | |
11995 | if test "$enable_build_with_cxx" = "yes"; then | |
11996 | ac_ext=cpp | |
11997 | ac_cpp='$CXXCPP $CPPFLAGS' | |
11998 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
11999 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12000 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
12001 | ||
12002 | fi | |
12003 | ||
a3828db0 | 12004 | gdb_ptrace_headers=' |
4ff70b84 | 12005 | #include <sys/types.h> |
a3828db0 MK |
12006 | #if HAVE_SYS_PTRACE_H |
12007 | # include <sys/ptrace.h> | |
12008 | #endif | |
12009 | #if HAVE_UNISTD_H | |
12010 | # include <unistd.h> | |
12011 | #endif | |
12012 | ' | |
12013 | # There is no point in checking if we don't have a prototype. | |
54019719 | 12014 | ac_fn_cxx_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
81ecdfbb RW |
12015 | " |
12016 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
12017 | ac_have_decl=1 | |
06825bd1 | 12018 | else |
81ecdfbb | 12019 | ac_have_decl=0 |
06825bd1 | 12020 | fi |
06825bd1 | 12021 | |
a3828db0 | 12022 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12023 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 12024 | _ACEOF |
81ecdfbb | 12025 | if test $ac_have_decl = 1; then : |
bec39cab | 12026 | |
a3828db0 | 12027 | else |
a3828db0 MK |
12028 | |
12029 | : ${gdb_cv_func_ptrace_ret='int'} | |
12030 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12031 | ||
06825bd1 MK |
12032 | fi |
12033 | ||
064ef605 DJ |
12034 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
12035 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
12036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
12037 | $as_echo_n "checking return type of ptrace... " >&6; } | |
12038 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
12039 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12040 | else |
81ecdfbb | 12041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12042 | /* end confdefs.h. */ |
a3828db0 | 12043 | $gdb_ptrace_headers |
bec39cab AC |
12044 | int |
12045 | main () | |
12046 | { | |
064ef605 DJ |
12047 | extern long ptrace (enum __ptrace_request, ...); |
12048 | ; | |
12049 | return 0; | |
12050 | } | |
12051 | _ACEOF | |
54019719 | 12052 | if ac_fn_cxx_try_compile "$LINENO"; then : |
064ef605 DJ |
12053 | gdb_cv_func_ptrace_ret='long' |
12054 | else | |
81ecdfbb | 12055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12056 | /* end confdefs.h. */ |
12057 | $gdb_ptrace_headers | |
12058 | int | |
12059 | main () | |
12060 | { | |
a3828db0 | 12061 | extern int ptrace (); |
bec39cab AC |
12062 | ; |
12063 | return 0; | |
12064 | } | |
12065 | _ACEOF | |
54019719 | 12066 | if ac_fn_cxx_try_compile "$LINENO"; then : |
a3828db0 | 12067 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 12068 | else |
81ecdfbb | 12069 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 12070 | fi |
81ecdfbb | 12071 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 12072 | fi |
81ecdfbb | 12073 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 12074 | fi |
81ecdfbb RW |
12075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
12076 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 12077 | |
a3828db0 MK |
12078 | cat >>confdefs.h <<_ACEOF |
12079 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 12080 | _ACEOF |
70f9f479 | 12081 | |
a3828db0 | 12082 | # Check argument types. |
81ecdfbb RW |
12083 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
12084 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
12085 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
12086 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12087 | else |
a3828db0 | 12088 | |
81ecdfbb | 12089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12090 | /* end confdefs.h. */ |
12091 | $gdb_ptrace_headers | |
12092 | int | |
12093 | main () | |
12094 | { | |
12095 | extern long ptrace (enum __ptrace_request, ...); | |
12096 | ; | |
12097 | return 0; | |
12098 | } | |
12099 | _ACEOF | |
54019719 PA |
12100 | if ac_fn_cxx_try_compile "$LINENO"; then : |
12101 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
064ef605 | 12102 | else |
064ef605 | 12103 | |
a3828db0 MK |
12104 | for gdb_arg1 in 'int' 'long'; do |
12105 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 12106 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 12107 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 12108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12109 | /* end confdefs.h. */ |
a3828db0 | 12110 | $gdb_ptrace_headers |
bec39cab AC |
12111 | int |
12112 | main () | |
12113 | { | |
a3828db0 MK |
12114 | |
12115 | extern $gdb_cv_func_ptrace_ret | |
12116 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
12117 | ||
bec39cab AC |
12118 | ; |
12119 | return 0; | |
12120 | } | |
12121 | _ACEOF | |
54019719 | 12122 | if ac_fn_cxx_try_compile "$LINENO"; then : |
a3828db0 MK |
12123 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
12124 | break 4; | |
5c7f2947 | 12125 | fi |
81ecdfbb | 12126 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 12127 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 12128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12129 | /* end confdefs.h. */ |
a3828db0 | 12130 | $gdb_ptrace_headers |
bec39cab AC |
12131 | int |
12132 | main () | |
12133 | { | |
a3828db0 MK |
12134 | |
12135 | extern $gdb_cv_func_ptrace_ret | |
12136 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
12137 | ||
bec39cab AC |
12138 | ; |
12139 | return 0; | |
12140 | } | |
12141 | _ACEOF | |
54019719 | 12142 | if ac_fn_cxx_try_compile "$LINENO"; then : |
a3828db0 MK |
12143 | |
12144 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
12145 | break 5; | |
78434e59 | 12146 | fi |
81ecdfbb | 12147 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
12148 | done |
12149 | done | |
12150 | done | |
12151 | done | |
12152 | done | |
12153 | # Provide a safe default value. | |
12154 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12155 | ||
064ef605 | 12156 | fi |
81ecdfbb | 12157 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 12158 | fi |
81ecdfbb RW |
12159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
12160 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
12161 | ac_save_IFS=$IFS; IFS=',' |
12162 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
12163 | IFS=$ac_save_IFS | |
12164 | shift | |
bec39cab | 12165 | |
54019719 PA |
12166 | cat >>confdefs.h <<_ACEOF |
12167 | #define PTRACE_TYPE_ARG1 $1 | |
12168 | _ACEOF | |
12169 | ||
12170 | ||
a3828db0 MK |
12171 | cat >>confdefs.h <<_ACEOF |
12172 | #define PTRACE_TYPE_ARG3 $3 | |
12173 | _ACEOF | |
12174 | ||
96d7229d LM |
12175 | |
12176 | cat >>confdefs.h <<_ACEOF | |
12177 | #define PTRACE_TYPE_ARG4 $4 | |
12178 | _ACEOF | |
12179 | ||
a3828db0 MK |
12180 | if test -n "$5"; then |
12181 | ||
12182 | cat >>confdefs.h <<_ACEOF | |
12183 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 12184 | _ACEOF |
78434e59 MK |
12185 | |
12186 | fi | |
12187 | ||
54019719 PA |
12188 | if test "$enable_build_with_cxx" = "yes"; then |
12189 | ac_ext=c | |
12190 | ac_cpp='$CPP $CPPFLAGS' | |
12191 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
12192 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12193 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
12194 | ||
12195 | fi | |
12196 | ||
12197 | ||
a3828db0 | 12198 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
12199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12200 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12201 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12202 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 12203 | else |
81ecdfbb RW |
12204 | if test "$cross_compiling" = yes; then : |
12205 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 12206 | else |
81ecdfbb | 12207 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12208 | /* end confdefs.h. */ |
81ecdfbb | 12209 | $ac_includes_default |
bec39cab AC |
12210 | int |
12211 | main () | |
12212 | { | |
a3828db0 MK |
12213 | /* If this system has a BSD-style setpgrp which takes arguments, |
12214 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
12215 | exit successfully. */ | |
81ecdfbb | 12216 | return setpgrp (1,1) != -1; |
bec39cab AC |
12217 | ; |
12218 | return 0; | |
12219 | } | |
12220 | _ACEOF | |
81ecdfbb | 12221 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 12222 | ac_cv_func_setpgrp_void=no |
c906108c | 12223 | else |
81ecdfbb | 12224 | ac_cv_func_setpgrp_void=yes |
c906108c | 12225 | fi |
81ecdfbb RW |
12226 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12227 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12228 | fi |
81ecdfbb | 12229 | |
a3828db0 | 12230 | fi |
81ecdfbb RW |
12231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12232 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
12233 | if test $ac_cv_func_setpgrp_void = yes; then |
12234 | ||
81ecdfbb | 12235 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
12236 | |
12237 | fi | |
a3828db0 MK |
12238 | |
12239 | else | |
81ecdfbb RW |
12240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12241 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12242 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12243 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12244 | else |
81ecdfbb | 12245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12246 | /* end confdefs.h. */ |
a3828db0 MK |
12247 | |
12248 | #include <unistd.h> | |
12249 | ||
bec39cab AC |
12250 | int |
12251 | main () | |
12252 | { | |
a3828db0 MK |
12253 | |
12254 | if (setpgrp(1,1) == -1) | |
12255 | exit (0); | |
12256 | else | |
12257 | exit (1); | |
12258 | ||
bec39cab AC |
12259 | ; |
12260 | return 0; | |
12261 | } | |
12262 | _ACEOF | |
81ecdfbb | 12263 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12264 | ac_cv_func_setpgrp_void=no |
c906108c | 12265 | else |
81ecdfbb | 12266 | ac_cv_func_setpgrp_void=yes |
c906108c | 12267 | fi |
81ecdfbb | 12268 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12269 | fi |
81ecdfbb RW |
12270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12271 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 12272 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 12273 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 12274 | |
a3828db0 | 12275 | fi |
c906108c SS |
12276 | fi |
12277 | ||
db1ff28b JK |
12278 | # Assume we'll default to using the included libiberty regex. |
12279 | gdb_use_included_regex=yes | |
12280 | ||
12281 | # However, if the system regex is GNU regex, then default to *not* | |
12282 | # using the included regex. | |
12283 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
12284 | $as_echo_n "checking for GNU regex... " >&6; } | |
12285 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
12286 | $as_echo_n "(cached) " >&6 | |
12287 | else | |
12288 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12289 | /* end confdefs.h. */ | |
12290 | #include <gnu-versions.h> | |
12291 | int | |
12292 | main () | |
12293 | { | |
12294 | #define REGEX_INTERFACE_VERSION 1 | |
12295 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
12296 | # error "Version mismatch" | |
12297 | #endif | |
12298 | ; | |
12299 | return 0; | |
12300 | } | |
12301 | _ACEOF | |
12302 | if ac_fn_c_try_compile "$LINENO"; then : | |
12303 | gdb_cv_have_gnu_regex=yes | |
12304 | else | |
12305 | gdb_cv_have_gnu_regex=no | |
12306 | fi | |
12307 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12308 | fi | |
12309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
12310 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
12311 | if test $gdb_cv_have_gnu_regex = yes; then | |
12312 | gdb_use_included_regex=no | |
12313 | fi | |
12314 | ||
12315 | ||
12316 | # Check whether --with-included-regex was given. | |
12317 | if test "${with_included_regex+set}" = set; then : | |
12318 | withval=$with_included_regex; gdb_with_regex=$withval | |
12319 | else | |
12320 | gdb_with_regex=$gdb_use_included_regex | |
12321 | fi | |
12322 | ||
12323 | if test "$gdb_with_regex" = yes; then | |
12324 | ||
12325 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
12326 | ||
12327 | fi | |
12328 | ||
81ecdfbb RW |
12329 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
12330 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
12331 | #include <sys/proc.h> | |
12332 | ||
12333 | " | |
12334 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 12335 | |
5c45e068 | 12336 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 12337 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 12338 | _ACEOF |
c906108c | 12339 | |
5c45e068 | 12340 | |
97bf5e38 | 12341 | fi |
c906108c | 12342 | |
5c45e068 | 12343 | |
a3828db0 | 12344 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
12345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
12346 | $as_echo_n "checking for struct lwp... " >&6; } | |
12347 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
12348 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12349 | else |
81ecdfbb | 12350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12351 | /* end confdefs.h. */ |
a3828db0 MK |
12352 | #include <sys/param.h> |
12353 | #include <sys/lwp.h> | |
bec39cab AC |
12354 | int |
12355 | main () | |
12356 | { | |
a3828db0 | 12357 | struct lwp l; |
bec39cab AC |
12358 | ; |
12359 | return 0; | |
12360 | } | |
12361 | _ACEOF | |
81ecdfbb | 12362 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12363 | gdb_cv_struct_lwp=yes |
c906108c | 12364 | else |
81ecdfbb | 12365 | gdb_cv_struct_lwp=no |
c906108c | 12366 | fi |
81ecdfbb | 12367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12368 | fi |
81ecdfbb RW |
12369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
12370 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 12371 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 12372 | |
81ecdfbb | 12373 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 12374 | |
97bf5e38 | 12375 | fi |
c906108c | 12376 | |
a3828db0 | 12377 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
12378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
12379 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
12380 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
12381 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12382 | else |
81ecdfbb | 12383 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12384 | /* end confdefs.h. */ |
a3828db0 MK |
12385 | #include <sys/types.h> |
12386 | #include <machine/reg.h> | |
bec39cab AC |
12387 | int |
12388 | main () | |
12389 | { | |
a3828db0 | 12390 | struct reg r; |
bec39cab AC |
12391 | ; |
12392 | return 0; | |
12393 | } | |
12394 | _ACEOF | |
81ecdfbb | 12395 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12396 | gdb_cv_struct_reg=yes |
27ca5dad | 12397 | else |
81ecdfbb | 12398 | gdb_cv_struct_reg=no |
27ca5dad | 12399 | fi |
81ecdfbb | 12400 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 12401 | fi |
81ecdfbb RW |
12402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
12403 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 12404 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 12405 | |
81ecdfbb | 12406 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
12407 | |
12408 | fi | |
97bf5e38 | 12409 | |
a3828db0 MK |
12410 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
12411 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
12412 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
12413 | " | |
12414 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
12415 | |
12416 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12417 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 12418 | _ACEOF |
3862412b | 12419 | |
5c45e068 | 12420 | |
97bf5e38 | 12421 | fi |
81ecdfbb RW |
12422 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
12423 | " | |
12424 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
12425 | |
12426 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12427 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 12428 | _ACEOF |
3862412b | 12429 | |
5c45e068 | 12430 | |
97bf5e38 | 12431 | fi |
3862412b | 12432 | |
5c45e068 | 12433 | |
6fea9e18 L |
12434 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
12435 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
12436 | # `struct user_regs_struct'. | |
12437 | 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> | |
12438 | " | |
12439 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
12440 | ||
12441 | cat >>confdefs.h <<_ACEOF | |
12442 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
12443 | _ACEOF | |
12444 | ||
12445 | ||
12446 | fi | |
12447 | 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> | |
12448 | " | |
12449 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
12450 | ||
12451 | cat >>confdefs.h <<_ACEOF | |
12452 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
12453 | _ACEOF | |
12454 | ||
12455 | ||
12456 | fi | |
12457 | ||
12458 | ||
a3828db0 | 12459 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
12460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
12461 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
12462 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
12463 | $as_echo_n "(cached) " >&6 | |
451928c5 | 12464 | else |
81ecdfbb | 12465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12466 | /* end confdefs.h. */ |
a3828db0 | 12467 | #include <sys/ptrace.h> |
bec39cab AC |
12468 | int |
12469 | main () | |
12470 | { | |
a3828db0 | 12471 | PTRACE_GETREGS; |
bec39cab AC |
12472 | ; |
12473 | return 0; | |
12474 | } | |
12475 | _ACEOF | |
81ecdfbb | 12476 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12477 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 12478 | else |
81ecdfbb | 12479 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 12480 | fi |
81ecdfbb | 12481 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
12482 | fi |
12483 | ||
81ecdfbb RW |
12484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
12485 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 12486 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 12487 | |
81ecdfbb | 12488 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 12489 | |
97bf5e38 | 12490 | fi |
451928c5 | 12491 | |
a3828db0 | 12492 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
12493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
12494 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
12495 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
12496 | $as_echo_n "(cached) " >&6 | |
451928c5 | 12497 | else |
81ecdfbb | 12498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12499 | /* end confdefs.h. */ |
a3828db0 | 12500 | #include <sys/ptrace.h> |
bec39cab AC |
12501 | int |
12502 | main () | |
12503 | { | |
a3828db0 | 12504 | PTRACE_GETFPXREGS; |
bec39cab AC |
12505 | ; |
12506 | return 0; | |
12507 | } | |
12508 | _ACEOF | |
81ecdfbb | 12509 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12510 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 12511 | else |
81ecdfbb | 12512 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 12513 | fi |
81ecdfbb | 12514 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
12515 | fi |
12516 | ||
81ecdfbb RW |
12517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
12518 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 12519 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 12520 | |
81ecdfbb | 12521 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 12522 | |
97bf5e38 | 12523 | fi |
451928c5 | 12524 | |
a3828db0 | 12525 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
12526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
12527 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
12528 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
12529 | $as_echo_n "(cached) " >&6 | |
3862412b | 12530 | else |
81ecdfbb | 12531 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12532 | /* end confdefs.h. */ |
a3828db0 MK |
12533 | #include <sys/types.h> |
12534 | #include <sys/ptrace.h> | |
bec39cab AC |
12535 | int |
12536 | main () | |
12537 | { | |
a3828db0 | 12538 | PT_GETDBREGS; |
bec39cab AC |
12539 | ; |
12540 | return 0; | |
12541 | } | |
12542 | _ACEOF | |
81ecdfbb | 12543 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12544 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 12545 | else |
81ecdfbb | 12546 | gdb_cv_have_pt_getdbregs=no |
3862412b | 12547 | fi |
81ecdfbb | 12548 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
12549 | fi |
12550 | ||
81ecdfbb RW |
12551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
12552 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 12553 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 12554 | |
81ecdfbb | 12555 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 12556 | |
97bf5e38 | 12557 | fi |
3862412b | 12558 | |
a3828db0 | 12559 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
12560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
12561 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
12562 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
12563 | $as_echo_n "(cached) " >&6 | |
3862412b | 12564 | else |
81ecdfbb | 12565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12566 | /* end confdefs.h. */ |
a3828db0 MK |
12567 | #include <sys/types.h> |
12568 | #include <sys/ptrace.h> | |
bec39cab AC |
12569 | int |
12570 | main () | |
12571 | { | |
a3828db0 | 12572 | PT_GETXMMREGS; |
bec39cab AC |
12573 | ; |
12574 | return 0; | |
12575 | } | |
12576 | _ACEOF | |
81ecdfbb | 12577 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12578 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 12579 | else |
81ecdfbb | 12580 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 12581 | fi |
81ecdfbb | 12582 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
12583 | fi |
12584 | ||
81ecdfbb RW |
12585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
12586 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 12587 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 12588 | |
81ecdfbb | 12589 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 12590 | |
97bf5e38 | 12591 | fi |
3862412b | 12592 | |
05b4bd79 | 12593 | # Detect which type of /proc is in use, such as for Solaris. |
97bf5e38 MK |
12594 | |
12595 | if test "${target}" = "${host}"; then | |
12596 | case "${host}" in | |
7b00db47 | 12597 | *-*-sysv4.2* | *-*-sysv5* ) |
60ca704f | 12598 | |
81ecdfbb | 12599 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
12600 | |
12601 | ;; | |
c162e8c9 | 12602 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 12603 | |
81ecdfbb | 12604 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
12605 | |
12606 | ;; | |
12607 | mips-sgi-irix5*) | |
12608 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 12609 | |
81ecdfbb | 12610 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
12611 | |
12612 | ;; | |
12613 | esac | |
12614 | fi | |
12615 | ||
12616 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
12617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
12618 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
12619 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
12620 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 12621 | else |
81ecdfbb | 12622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12623 | /* end confdefs.h. */ |
596c9d4b KB |
12624 | |
12625 | #define _SYSCALL32 | |
d30c5336 JK |
12626 | /* Needed for new procfs interface on sparc-solaris. */ |
12627 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 12628 | #include <sys/procfs.h> |
bec39cab AC |
12629 | int |
12630 | main () | |
12631 | { | |
97bf5e38 | 12632 | gregset_t avar |
bec39cab AC |
12633 | ; |
12634 | return 0; | |
12635 | } | |
12636 | _ACEOF | |
81ecdfbb | 12637 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12638 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 12639 | else |
81ecdfbb | 12640 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 12641 | |
596c9d4b | 12642 | fi |
81ecdfbb | 12643 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
12644 | fi |
12645 | ||
97bf5e38 | 12646 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 12647 | |
81ecdfbb | 12648 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
12649 | |
12650 | fi | |
81ecdfbb RW |
12651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
12652 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 12653 | |
81ecdfbb RW |
12654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
12655 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
12656 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
12657 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 12658 | else |
81ecdfbb | 12659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12660 | /* end confdefs.h. */ |
97bf5e38 MK |
12661 | |
12662 | #define _SYSCALL32 | |
d30c5336 JK |
12663 | /* Needed for new procfs interface on sparc-solaris. */ |
12664 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 12665 | #include <sys/procfs.h> |
bec39cab AC |
12666 | int |
12667 | main () | |
12668 | { | |
97bf5e38 | 12669 | fpregset_t avar |
bec39cab AC |
12670 | ; |
12671 | return 0; | |
12672 | } | |
12673 | _ACEOF | |
81ecdfbb | 12674 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12675 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 12676 | else |
81ecdfbb | 12677 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 12678 | |
d84dd0c5 | 12679 | fi |
81ecdfbb | 12680 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
12681 | fi |
12682 | ||
97bf5e38 | 12683 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 12684 | |
81ecdfbb | 12685 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 12686 | |
97bf5e38 | 12687 | fi |
81ecdfbb RW |
12688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
12689 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 12690 | |
81ecdfbb RW |
12691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
12692 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
12693 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
12694 | $as_echo_n "(cached) " >&6 | |
c906108c | 12695 | else |
81ecdfbb | 12696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12697 | /* end confdefs.h. */ |
c906108c | 12698 | |
97bf5e38 | 12699 | #define _SYSCALL32 |
d30c5336 JK |
12700 | /* Needed for new procfs interface on sparc-solaris. */ |
12701 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12702 | #include <sys/procfs.h> |
bec39cab AC |
12703 | int |
12704 | main () | |
12705 | { | |
97bf5e38 | 12706 | prgregset_t avar |
bec39cab AC |
12707 | ; |
12708 | return 0; | |
12709 | } | |
12710 | _ACEOF | |
81ecdfbb | 12711 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12712 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 12713 | else |
81ecdfbb | 12714 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 12715 | |
c906108c | 12716 | fi |
81ecdfbb | 12717 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12718 | fi |
12719 | ||
97bf5e38 | 12720 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 12721 | |
81ecdfbb | 12722 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 12723 | |
97bf5e38 | 12724 | fi |
81ecdfbb RW |
12725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
12726 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 12727 | |
81ecdfbb RW |
12728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
12729 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
12730 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
12731 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 12732 | else |
81ecdfbb | 12733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12734 | /* end confdefs.h. */ |
97bf5e38 MK |
12735 | |
12736 | #define _SYSCALL32 | |
d30c5336 JK |
12737 | /* Needed for new procfs interface on sparc-solaris. */ |
12738 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12739 | #include <sys/procfs.h> |
bec39cab AC |
12740 | int |
12741 | main () | |
12742 | { | |
97bf5e38 | 12743 | prfpregset_t avar |
bec39cab AC |
12744 | ; |
12745 | return 0; | |
12746 | } | |
12747 | _ACEOF | |
81ecdfbb | 12748 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12749 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 12750 | else |
81ecdfbb | 12751 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 12752 | |
d45fe813 | 12753 | fi |
81ecdfbb | 12754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
12755 | fi |
12756 | ||
97bf5e38 | 12757 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 12758 | |
81ecdfbb | 12759 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 12760 | |
97bf5e38 | 12761 | fi |
81ecdfbb RW |
12762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
12763 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 12764 | |
81ecdfbb RW |
12765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
12766 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
12767 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
12768 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 12769 | else |
81ecdfbb | 12770 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12771 | /* end confdefs.h. */ |
97bf5e38 MK |
12772 | |
12773 | #define _SYSCALL32 | |
d30c5336 JK |
12774 | /* Needed for new procfs interface on sparc-solaris. */ |
12775 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12776 | #include <sys/procfs.h> |
bec39cab AC |
12777 | int |
12778 | main () | |
12779 | { | |
97bf5e38 | 12780 | prgregset32_t avar |
bec39cab AC |
12781 | ; |
12782 | return 0; | |
12783 | } | |
12784 | _ACEOF | |
81ecdfbb | 12785 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12786 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 12787 | else |
81ecdfbb | 12788 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 12789 | |
d45fe813 | 12790 | fi |
81ecdfbb | 12791 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
12792 | fi |
12793 | ||
97bf5e38 | 12794 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 12795 | |
81ecdfbb | 12796 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 12797 | |
97bf5e38 | 12798 | fi |
81ecdfbb RW |
12799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
12800 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 12801 | |
81ecdfbb RW |
12802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
12803 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
12804 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
12805 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 12806 | else |
81ecdfbb | 12807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12808 | /* end confdefs.h. */ |
97bf5e38 | 12809 | |
d45fe813 | 12810 | #define _SYSCALL32 |
d30c5336 JK |
12811 | /* Needed for new procfs interface on sparc-solaris. */ |
12812 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12813 | #include <sys/procfs.h> |
bec39cab AC |
12814 | int |
12815 | main () | |
12816 | { | |
97bf5e38 | 12817 | lwpid_t avar |
bec39cab AC |
12818 | ; |
12819 | return 0; | |
12820 | } | |
12821 | _ACEOF | |
81ecdfbb | 12822 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12823 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 12824 | else |
81ecdfbb | 12825 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 12826 | |
d45fe813 | 12827 | fi |
81ecdfbb | 12828 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
12829 | fi |
12830 | ||
97bf5e38 | 12831 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 12832 | |
81ecdfbb | 12833 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 12834 | |
97bf5e38 | 12835 | fi |
81ecdfbb RW |
12836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
12837 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 12838 | |
81ecdfbb RW |
12839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
12840 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
12841 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
12842 | $as_echo_n "(cached) " >&6 | |
c906108c | 12843 | else |
81ecdfbb | 12844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12845 | /* end confdefs.h. */ |
c906108c | 12846 | |
97bf5e38 | 12847 | #define _SYSCALL32 |
d30c5336 JK |
12848 | /* Needed for new procfs interface on sparc-solaris. */ |
12849 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12850 | #include <sys/procfs.h> |
bec39cab AC |
12851 | int |
12852 | main () | |
12853 | { | |
97bf5e38 | 12854 | psaddr_t avar |
bec39cab AC |
12855 | ; |
12856 | return 0; | |
12857 | } | |
12858 | _ACEOF | |
81ecdfbb | 12859 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12860 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 12861 | else |
81ecdfbb | 12862 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 12863 | |
c906108c | 12864 | fi |
81ecdfbb | 12865 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12866 | fi |
12867 | ||
97bf5e38 | 12868 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 12869 | |
81ecdfbb | 12870 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 12871 | |
97bf5e38 | 12872 | fi |
81ecdfbb RW |
12873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
12874 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 12875 | |
81ecdfbb RW |
12876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
12877 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
12878 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
12879 | $as_echo_n "(cached) " >&6 | |
c906108c | 12880 | else |
81ecdfbb | 12881 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12882 | /* end confdefs.h. */ |
c906108c | 12883 | |
97bf5e38 | 12884 | #define _SYSCALL32 |
d30c5336 JK |
12885 | /* Needed for new procfs interface on sparc-solaris. */ |
12886 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12887 | #include <sys/procfs.h> |
bec39cab AC |
12888 | int |
12889 | main () | |
12890 | { | |
97bf5e38 | 12891 | prsysent_t avar |
bec39cab AC |
12892 | ; |
12893 | return 0; | |
12894 | } | |
12895 | _ACEOF | |
81ecdfbb | 12896 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12897 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 12898 | else |
81ecdfbb | 12899 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 12900 | |
c906108c | 12901 | fi |
81ecdfbb | 12902 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12903 | fi |
12904 | ||
97bf5e38 | 12905 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 12906 | |
81ecdfbb | 12907 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 12908 | |
97bf5e38 | 12909 | fi |
81ecdfbb RW |
12910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
12911 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 12912 | |
81ecdfbb RW |
12913 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
12914 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
12915 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
12916 | $as_echo_n "(cached) " >&6 | |
c906108c | 12917 | else |
81ecdfbb | 12918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12919 | /* end confdefs.h. */ |
c906108c | 12920 | |
97bf5e38 | 12921 | #define _SYSCALL32 |
d30c5336 JK |
12922 | /* Needed for new procfs interface on sparc-solaris. */ |
12923 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12924 | #include <sys/procfs.h> |
bec39cab AC |
12925 | int |
12926 | main () | |
12927 | { | |
97bf5e38 | 12928 | pr_sigset_t avar |
bec39cab AC |
12929 | ; |
12930 | return 0; | |
12931 | } | |
12932 | _ACEOF | |
81ecdfbb | 12933 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12934 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 12935 | else |
81ecdfbb | 12936 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 12937 | |
c906108c | 12938 | fi |
81ecdfbb | 12939 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12940 | fi |
12941 | ||
97bf5e38 | 12942 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 12943 | |
81ecdfbb | 12944 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 12945 | |
97bf5e38 | 12946 | fi |
81ecdfbb RW |
12947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
12948 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 12949 | |
81ecdfbb RW |
12950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
12951 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
12952 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
12953 | $as_echo_n "(cached) " >&6 | |
c906108c | 12954 | else |
81ecdfbb | 12955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12956 | /* end confdefs.h. */ |
c906108c | 12957 | |
97bf5e38 | 12958 | #define _SYSCALL32 |
d30c5336 JK |
12959 | /* Needed for new procfs interface on sparc-solaris. */ |
12960 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12961 | #include <sys/procfs.h> |
bec39cab AC |
12962 | int |
12963 | main () | |
12964 | { | |
97bf5e38 | 12965 | pr_sigaction64_t avar |
bec39cab AC |
12966 | ; |
12967 | return 0; | |
12968 | } | |
12969 | _ACEOF | |
81ecdfbb | 12970 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12971 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 12972 | else |
81ecdfbb | 12973 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 12974 | |
c906108c | 12975 | fi |
81ecdfbb | 12976 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12977 | fi |
12978 | ||
97bf5e38 | 12979 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 12980 | |
81ecdfbb | 12981 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 12982 | |
97bf5e38 | 12983 | fi |
81ecdfbb RW |
12984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
12985 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 12986 | |
81ecdfbb RW |
12987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
12988 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
12989 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
12990 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12991 | else |
81ecdfbb | 12992 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12993 | /* end confdefs.h. */ |
97bf5e38 MK |
12994 | |
12995 | #define _SYSCALL32 | |
d30c5336 JK |
12996 | /* Needed for new procfs interface on sparc-solaris. */ |
12997 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 12998 | #include <sys/procfs.h> |
bec39cab AC |
12999 | int |
13000 | main () | |
13001 | { | |
97bf5e38 | 13002 | pr_siginfo64_t avar |
bec39cab AC |
13003 | ; |
13004 | return 0; | |
13005 | } | |
13006 | _ACEOF | |
81ecdfbb | 13007 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13008 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
13009 | else | |
81ecdfbb | 13010 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 13011 | |
97bf5e38 | 13012 | fi |
81ecdfbb | 13013 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13014 | fi |
c906108c | 13015 | |
97bf5e38 | 13016 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 13017 | |
81ecdfbb | 13018 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 13019 | |
97bf5e38 | 13020 | fi |
81ecdfbb RW |
13021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
13022 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
13023 | |
13024 | ||
97bf5e38 MK |
13025 | |
13026 | ||
13027 | ||
97bf5e38 | 13028 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
13029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
13030 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
13031 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
13032 | $as_echo_n "(cached) " >&6 | |
c906108c | 13033 | else |
81ecdfbb | 13034 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 13035 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 13036 | else |
81ecdfbb | 13037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13038 | /* end confdefs.h. */ |
97bf5e38 MK |
13039 | #include <sys/procfs.h> |
13040 | int main () | |
13041 | { | |
13042 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
13043 | return 1; | |
13044 | return 0; | |
13045 | } | |
bec39cab | 13046 | _ACEOF |
81ecdfbb | 13047 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 13048 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
13049 | else |
13050 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 13051 | fi |
81ecdfbb RW |
13052 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13053 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 13054 | fi |
81ecdfbb | 13055 | |
c906108c SS |
13056 | fi |
13057 | ||
81ecdfbb RW |
13058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
13059 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 13060 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 13061 | |
81ecdfbb | 13062 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 13063 | |
97bf5e38 MK |
13064 | fi |
13065 | fi | |
c906108c | 13066 | fi |
c906108c | 13067 | |
bc8bcb4b | 13068 | # Check if the compiler supports the `long long' type. |
c906108c | 13069 | |
81ecdfbb RW |
13070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
13071 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
13072 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
13073 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13074 | else |
81ecdfbb | 13075 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13076 | /* end confdefs.h. */ |
bc8bcb4b | 13077 | extern long long foo; |
bec39cab AC |
13078 | int |
13079 | main () | |
13080 | { | |
bc8bcb4b | 13081 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
13082 | ; |
13083 | return 0; | |
13084 | } | |
13085 | _ACEOF | |
81ecdfbb | 13086 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13087 | gdb_cv_c_long_long=yes |
13088 | else | |
81ecdfbb | 13089 | gdb_cv_c_long_long=no |
97bf5e38 | 13090 | fi |
81ecdfbb | 13091 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13092 | fi |
81ecdfbb RW |
13093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
13094 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
13095 | if test $gdb_cv_c_long_long != yes; then |
13096 | # libdecnumber requires long long. | |
13097 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
13098 | fi |
13099 | ||
bc8bcb4b | 13100 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 13101 | |
81ecdfbb RW |
13102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
13103 | $as_echo_n "checking for long long support in printf... " >&6; } | |
13104 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
13105 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13106 | else |
81ecdfbb | 13107 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13108 | gdb_cv_printf_has_long_long=no |
13109 | else | |
81ecdfbb | 13110 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13111 | /* end confdefs.h. */ |
bc8bcb4b MK |
13112 | $ac_includes_default |
13113 | int | |
13114 | main () | |
13115 | { | |
13116 | char buf[32]; | |
97bf5e38 MK |
13117 | long long l = 0; |
13118 | l = (l << 16) + 0x0123; | |
13119 | l = (l << 16) + 0x4567; | |
13120 | l = (l << 16) + 0x89ab; | |
13121 | l = (l << 16) + 0xcdef; | |
13122 | sprintf (buf, "0x%016llx", l); | |
13123 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
13124 | ; |
13125 | return 0; | |
c906108c | 13126 | } |
bec39cab | 13127 | _ACEOF |
81ecdfbb | 13128 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
13129 | gdb_cv_printf_has_long_long=yes |
13130 | else | |
81ecdfbb | 13131 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 13132 | fi |
81ecdfbb RW |
13133 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13134 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13135 | fi |
81ecdfbb | 13136 | |
97bf5e38 | 13137 | fi |
81ecdfbb RW |
13138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
13139 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 13140 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 13141 | |
81ecdfbb | 13142 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
13143 | |
13144 | fi | |
97bf5e38 | 13145 | |
1a619819 LM |
13146 | # Check if the compiler and runtime support printing decfloats. |
13147 | ||
81ecdfbb RW |
13148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
13149 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
13150 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
13151 | $as_echo_n "(cached) " >&6 | |
1a619819 | 13152 | else |
81ecdfbb | 13153 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
13154 | gdb_cv_printf_has_decfloat=no |
13155 | else | |
81ecdfbb | 13156 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
13157 | /* end confdefs.h. */ |
13158 | $ac_includes_default | |
13159 | int | |
13160 | main () | |
13161 | { | |
13162 | char buf[64]; | |
13163 | _Decimal32 d32 = 1.2345df; | |
13164 | _Decimal64 d64 = 1.2345dd; | |
13165 | _Decimal128 d128 = 1.2345dl; | |
13166 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
13167 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
13168 | ; | |
13169 | return 0; | |
13170 | } | |
13171 | _ACEOF | |
81ecdfbb | 13172 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
13173 | gdb_cv_printf_has_decfloat=yes |
13174 | else | |
81ecdfbb | 13175 | gdb_cv_printf_has_decfloat=no |
1a619819 | 13176 | fi |
81ecdfbb RW |
13177 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13178 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 13179 | fi |
81ecdfbb | 13180 | |
1a619819 | 13181 | fi |
81ecdfbb RW |
13182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
13183 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
13184 | if test $gdb_cv_printf_has_decfloat = yes; then |
13185 | ||
81ecdfbb | 13186 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
13187 | |
13188 | fi | |
13189 | ||
bc8bcb4b MK |
13190 | # Check if the compiler supports the `long double' type. We can't use |
13191 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
13192 | # constants defined in <float.h> that fail on some systems, | |
13193 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 13194 | |
81ecdfbb RW |
13195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
13196 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
13197 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
13198 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13199 | else |
81ecdfbb | 13200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13201 | /* end confdefs.h. */ |
97bf5e38 | 13202 | long double foo; |
bec39cab | 13203 | _ACEOF |
81ecdfbb | 13204 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 13205 | gdb_cv_c_long_double=yes |
97bf5e38 | 13206 | else |
81ecdfbb | 13207 | gdb_cv_c_long_double=no |
97bf5e38 | 13208 | fi |
81ecdfbb | 13209 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13210 | fi |
81ecdfbb RW |
13211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
13212 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 13213 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 13214 | |
81ecdfbb | 13215 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
13216 | |
13217 | fi | |
13218 | ||
bc8bcb4b | 13219 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 13220 | |
81ecdfbb RW |
13221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
13222 | $as_echo_n "checking for long double support in printf... " >&6; } | |
13223 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
13224 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13225 | else |
81ecdfbb | 13226 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13227 | gdb_cv_printf_has_long_double=no |
13228 | else | |
81ecdfbb | 13229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13230 | /* end confdefs.h. */ |
bc8bcb4b MK |
13231 | $ac_includes_default |
13232 | int | |
13233 | main () | |
13234 | { | |
13235 | char buf[16]; | |
97bf5e38 MK |
13236 | long double f = 3.141592653; |
13237 | sprintf (buf, "%Lg", f); | |
13238 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
13239 | ; |
13240 | return 0; | |
97bf5e38 | 13241 | } |
bec39cab | 13242 | _ACEOF |
81ecdfbb | 13243 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 13244 | gdb_cv_printf_has_long_double=yes |
c906108c | 13245 | else |
81ecdfbb | 13246 | gdb_cv_printf_has_long_double=no |
c906108c | 13247 | fi |
81ecdfbb RW |
13248 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13249 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 13250 | fi |
81ecdfbb | 13251 | |
c906108c | 13252 | fi |
81ecdfbb RW |
13253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
13254 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 13255 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 13256 | |
81ecdfbb | 13257 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
13258 | |
13259 | fi | |
97bf5e38 | 13260 | |
bc8bcb4b | 13261 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 13262 | |
81ecdfbb RW |
13263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
13264 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
13265 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
13266 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13267 | else |
81ecdfbb | 13268 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13269 | gdb_cv_scanf_has_long_double=no |
13270 | else | |
81ecdfbb | 13271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13272 | /* end confdefs.h. */ |
bc8bcb4b MK |
13273 | #include <stdio.h> |
13274 | int | |
13275 | main () | |
13276 | { | |
13277 | char *buf = "3.141592653"; | |
97bf5e38 MK |
13278 | long double f = 0; |
13279 | sscanf (buf, "%Lg", &f); | |
13280 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
13281 | ; |
13282 | return 0; | |
97bf5e38 | 13283 | } |
bec39cab | 13284 | _ACEOF |
81ecdfbb | 13285 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
13286 | gdb_cv_scanf_has_long_double=yes |
13287 | else | |
81ecdfbb | 13288 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 13289 | fi |
81ecdfbb RW |
13290 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13291 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13292 | fi |
81ecdfbb | 13293 | |
c906108c | 13294 | fi |
81ecdfbb RW |
13295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
13296 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 13297 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 13298 | |
81ecdfbb | 13299 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
13300 | |
13301 | fi | |
c906108c | 13302 | |
438013df AO |
13303 | case ${host_os} in |
13304 | aix*) | |
81ecdfbb RW |
13305 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
13306 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
13307 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
13308 | $as_echo_n "(cached) " >&6 | |
438013df | 13309 | else |
bec39cab | 13310 | |
438013df AO |
13311 | SAVE_LDFLAGS=$LDFLAGS |
13312 | ||
13313 | case $GCC in | |
13314 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
13315 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
13316 | esac | |
13317 | ||
13318 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 13319 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13320 | /* end confdefs.h. */ |
438013df | 13321 | |
bec39cab AC |
13322 | int |
13323 | main () | |
13324 | { | |
438013df | 13325 | int i; |
bec39cab AC |
13326 | ; |
13327 | return 0; | |
13328 | } | |
13329 | _ACEOF | |
81ecdfbb | 13330 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 13331 | |
81ecdfbb RW |
13332 | else |
13333 | gdb_cv_bigtoc= | |
438013df | 13334 | fi |
81ecdfbb RW |
13335 | rm -f core conftest.err conftest.$ac_objext \ |
13336 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 13337 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 13338 | |
bec39cab | 13339 | fi |
81ecdfbb RW |
13340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
13341 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
13342 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
13343 | ;; | |
13344 | esac | |
13345 | ||
38f6b338 | 13346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 13347 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
13348 | dynamic_list=false |
13349 | if test "${gdb_native}" = yes; then | |
13350 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
13351 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
13352 | # may not be supported there. | |
13353 | old_LDFLAGS="$LDFLAGS" | |
13354 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
13355 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
13356 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
13357 | if test "${have_libpython}" = no; then | |
13358 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
13359 | /* end confdefs.h. */ |
13360 | ||
13361 | int | |
13362 | main () | |
13363 | { | |
13364 | ||
13365 | ; | |
13366 | return 0; | |
13367 | } | |
13368 | _ACEOF | |
13369 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
13370 | dynamic_list=true |
13371 | fi | |
13372 | rm -f core conftest.err conftest.$ac_objext \ | |
13373 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
13374 | else |
13375 | # Workaround http://bugs.python.org/issue4434 where static | |
13376 | # libpythonX.Y.a would get its symbols required for | |
13377 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
13378 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
13379 | old_CFLAGS="$CFLAGS" | |
13380 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
13381 | old_LIBS="$LIBS" |
13382 | LIBS="$LIBS $PYTHON_LIBS" | |
38f6b338 | 13383 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 13384 | true |
f6528abd | 13385 | else |
3bebe2f2 JK |
13386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13387 | /* end confdefs.h. */ | |
13388 | #include "${have_libpython}/Python.h" | |
13389 | int | |
13390 | main () | |
13391 | { | |
13392 | int err; | |
38f6b338 JK |
13393 | Py_Initialize (); |
13394 | err = PyRun_SimpleString ("import itertools\n"); | |
13395 | Py_Finalize (); | |
13396 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
13397 | ; |
13398 | return 0; | |
13399 | } | |
13400 | _ACEOF | |
13401 | if ac_fn_c_try_run "$LINENO"; then : | |
13402 | dynamic_list=true | |
13403 | fi | |
13404 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13405 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13406 | fi | |
13407 | ||
8c1fb155 | 13408 | LIBS="$old_LIBS" |
38f6b338 JK |
13409 | CFLAGS="$old_CFLAGS" |
13410 | fi | |
13411 | LDFLAGS="$old_LDFLAGS" | |
13412 | fi | |
13413 | if $dynamic_list; then | |
13414 | found="-Wl,--dynamic-list" | |
13415 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 13416 | else |
38f6b338 JK |
13417 | found="-rdynamic" |
13418 | RDYNAMIC="-rdynamic" | |
f6528abd | 13419 | fi |
f6528abd | 13420 | |
38f6b338 | 13421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 13422 | $as_echo "$found" >&6; } |
0407b3f1 | 13423 | |
f6528abd | 13424 | |
0407b3f1 | 13425 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 13426 | case ${host_os} in |
c906108c | 13427 | solaris*) |
d92419e5 JB |
13428 | # See if thread_db library is around for Solaris thread debugging. |
13429 | # Note that we must explicitly test for version 1 of the library | |
13430 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
13431 | # the same API. | |
81ecdfbb RW |
13432 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
13433 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 13434 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
13435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13436 | $as_echo "yes" >&6; } | |
60ca704f | 13437 | |
81ecdfbb | 13438 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 13439 | |
3483b318 | 13440 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 13441 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
13442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
13443 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
13444 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
13445 | $as_echo_n "(cached) " >&6 | |
c906108c | 13446 | else |
bec39cab | 13447 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 13448 | LIBS="-ldl $LIBS" |
81ecdfbb | 13449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
13450 | /* end confdefs.h. */ |
13451 | ||
81ecdfbb RW |
13452 | /* Override any GCC internal prototype to avoid an error. |
13453 | Use char because int might match the return type of a GCC | |
13454 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
13455 | #ifdef __cplusplus |
13456 | extern "C" | |
13457 | #endif | |
bec39cab AC |
13458 | char dlopen (); |
13459 | int | |
13460 | main () | |
13461 | { | |
81ecdfbb | 13462 | return dlopen (); |
bec39cab AC |
13463 | ; |
13464 | return 0; | |
13465 | } | |
13466 | _ACEOF | |
81ecdfbb | 13467 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
13468 | ac_cv_lib_dl_dlopen=yes |
13469 | else | |
81ecdfbb | 13470 | ac_cv_lib_dl_dlopen=no |
bec39cab | 13471 | fi |
81ecdfbb RW |
13472 | rm -f core conftest.err conftest.$ac_objext \ |
13473 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
13474 | LIBS=$ac_check_lib_save_LIBS |
13475 | fi | |
81ecdfbb RW |
13476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
13477 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
13478 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
13479 | cat >>confdefs.h <<_ACEOF |
13480 | #define HAVE_LIBDL 1 | |
13481 | _ACEOF | |
c906108c SS |
13482 | |
13483 | LIBS="-ldl $LIBS" | |
13484 | ||
c906108c SS |
13485 | fi |
13486 | ||
f6528abd | 13487 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
13488 | # Sun randomly tweaked the prototypes in <proc_service.h> |
13489 | # at one point. | |
81ecdfbb RW |
13490 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
13491 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
13492 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
13493 | $as_echo_n "(cached) " >&6 | |
c906108c | 13494 | else |
bec39cab | 13495 | |
81ecdfbb | 13496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13497 | /* end confdefs.h. */ |
c906108c SS |
13498 | |
13499 | #include <proc_service.h> | |
13500 | ps_err_e ps_pdwrite | |
13501 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 13502 | |
bec39cab AC |
13503 | int |
13504 | main () | |
13505 | { | |
13506 | ||
13507 | ; | |
13508 | return 0; | |
13509 | } | |
13510 | _ACEOF | |
81ecdfbb | 13511 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
13512 | gdb_cv_proc_service_is_old=no |
13513 | else | |
81ecdfbb | 13514 | gdb_cv_proc_service_is_old=yes |
c906108c | 13515 | fi |
81ecdfbb | 13516 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 13517 | |
c906108c SS |
13518 | fi |
13519 | ||
81ecdfbb RW |
13520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
13521 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 13522 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 13523 | |
81ecdfbb | 13524 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
13525 | |
13526 | fi | |
13527 | else | |
81ecdfbb RW |
13528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13529 | $as_echo "no" >&6; } | |
c906108c SS |
13530 | fi |
13531 | ;; | |
d92419e5 | 13532 | aix*) |
81ecdfbb RW |
13533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
13534 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
13535 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
13536 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13537 | else |
81ecdfbb | 13538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13539 | /* end confdefs.h. */ |
d92419e5 | 13540 | #include <sys/pthdebug.h> |
bec39cab AC |
13541 | int |
13542 | main () | |
13543 | { | |
d92419e5 JB |
13544 | #ifndef PTHDB_VERSION_3 |
13545 | #error | |
13546 | #endif | |
bec39cab AC |
13547 | ; |
13548 | return 0; | |
13549 | } | |
13550 | _ACEOF | |
81ecdfbb | 13551 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
13552 | gdb_cv_have_aix_thread_debug=yes |
13553 | else | |
81ecdfbb | 13554 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 13555 | fi |
81ecdfbb | 13556 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
13557 | fi |
13558 | ||
81ecdfbb RW |
13559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
13560 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
13561 | if test $gdb_cv_have_aix_thread_debug = yes; then |
13562 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 13563 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 13564 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
13565 | |
13566 | # Older versions of AIX do not provide the declaration for | |
13567 | # the getthrds function (it appears that it was introduced | |
13568 | # with AIX 6.x). | |
13569 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
13570 | " | |
13571 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
13572 | ac_have_decl=1 | |
13573 | else | |
13574 | ac_have_decl=0 | |
13575 | fi | |
13576 | ||
13577 | cat >>confdefs.h <<_ACEOF | |
13578 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
13579 | _ACEOF | |
13580 | ||
d92419e5 JB |
13581 | fi |
13582 | ;; | |
c906108c | 13583 | esac |
bec39cab | 13584 | |
c906108c SS |
13585 | fi |
13586 | ||
3f47be5c | 13587 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
13588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
13589 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
13590 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
13591 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13592 | else |
81ecdfbb | 13593 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13594 | /* end confdefs.h. */ |
3f47be5c | 13595 | #include <thread_db.h> |
bec39cab AC |
13596 | int |
13597 | main () | |
13598 | { | |
3f47be5c | 13599 | int i = TD_NOTALLOC; |
bec39cab AC |
13600 | ; |
13601 | return 0; | |
13602 | } | |
13603 | _ACEOF | |
81ecdfbb | 13604 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
13605 | gdb_cv_thread_db_h_has_td_notalloc=yes |
13606 | else | |
81ecdfbb | 13607 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 13608 | |
3f47be5c | 13609 | fi |
81ecdfbb | 13610 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 13611 | |
bec39cab | 13612 | fi |
81ecdfbb RW |
13613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
13614 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
13615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
13616 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
13617 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
13618 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 13619 | else |
81ecdfbb | 13620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
13621 | /* end confdefs.h. */ |
13622 | #include <thread_db.h> | |
13623 | int | |
13624 | main () | |
13625 | { | |
13626 | int i = TD_VERSION; | |
13627 | ; | |
13628 | return 0; | |
13629 | } | |
13630 | _ACEOF | |
81ecdfbb | 13631 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
13632 | gdb_cv_thread_db_h_has_td_version=yes |
13633 | else | |
81ecdfbb | 13634 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
13635 | |
13636 | fi | |
81ecdfbb | 13637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
13638 | |
13639 | fi | |
81ecdfbb RW |
13640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
13641 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
13642 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
13643 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
13644 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
13645 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 13646 | else |
81ecdfbb | 13647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
13648 | /* end confdefs.h. */ |
13649 | #include <thread_db.h> | |
13650 | int | |
13651 | main () | |
13652 | { | |
13653 | int i = TD_NOTLS; | |
13654 | ; | |
13655 | return 0; | |
13656 | } | |
13657 | _ACEOF | |
81ecdfbb | 13658 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
13659 | gdb_cv_thread_db_h_has_td_notls=yes |
13660 | else | |
81ecdfbb | 13661 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
13662 | |
13663 | fi | |
81ecdfbb | 13664 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
13665 | |
13666 | fi | |
81ecdfbb RW |
13667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
13668 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
13669 | fi |
13670 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 13671 | |
81ecdfbb | 13672 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 13673 | |
59f80f10 DJ |
13674 | fi |
13675 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
13676 | ||
81ecdfbb | 13677 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
13678 | |
13679 | fi | |
13680 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
13681 | ||
81ecdfbb | 13682 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 13683 | |
3f47be5c EZ |
13684 | fi |
13685 | ||
b757528f | 13686 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
13687 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
13688 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
13689 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
13690 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13691 | else |
81ecdfbb | 13692 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13693 | /* end confdefs.h. */ |
b757528f | 13694 | #include <sys/syscall.h> |
bec39cab AC |
13695 | int |
13696 | main () | |
13697 | { | |
b757528f | 13698 | int i = __NR_tkill; |
bec39cab AC |
13699 | ; |
13700 | return 0; | |
13701 | } | |
13702 | _ACEOF | |
81ecdfbb | 13703 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
13704 | gdb_cv_sys_syscall_h_has_tkill=yes |
13705 | else | |
81ecdfbb | 13706 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 13707 | |
b757528f | 13708 | fi |
81ecdfbb | 13709 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 13710 | |
bec39cab | 13711 | fi |
81ecdfbb RW |
13712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
13713 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f | 13714 | fi |
99c1d451 TT |
13715 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then |
13716 | ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall" | |
13717 | if test "x$ac_cv_func_syscall" = x""yes; then : | |
bec39cab | 13718 | |
81ecdfbb | 13719 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f | 13720 | |
99c1d451 TT |
13721 | |
13722 | fi | |
13723 | ||
b757528f JJ |
13724 | fi |
13725 | ||
81ecdfbb RW |
13726 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
13727 | " | |
13728 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
13729 | ac_have_decl=1 | |
10568435 | 13730 | else |
81ecdfbb | 13731 | ac_have_decl=0 |
10568435 | 13732 | fi |
10568435 JK |
13733 | |
13734 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 13735 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
13736 | _ACEOF |
13737 | ||
13738 | ||
81ecdfbb RW |
13739 | if test "$cross_compiling" = yes; then : |
13740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
13741 | /* end confdefs.h. */ |
13742 | #include <sys/personality.h> | |
13743 | int | |
13744 | main () | |
13745 | { | |
13746 | ||
13747 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
13748 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
13749 | # endif | |
13750 | /* Test the flag could be set and stays set. */ | |
13751 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
13752 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
13753 | return 1 | |
13754 | ; | |
13755 | return 0; | |
13756 | } | |
13757 | _ACEOF | |
81ecdfbb | 13758 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
13759 | have_personality=true |
13760 | else | |
81ecdfbb | 13761 | have_personality=false |
10568435 | 13762 | fi |
81ecdfbb RW |
13763 | rm -f core conftest.err conftest.$ac_objext \ |
13764 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 13765 | else |
81ecdfbb | 13766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
13767 | /* end confdefs.h. */ |
13768 | #include <sys/personality.h> | |
13769 | int | |
13770 | main () | |
13771 | { | |
13772 | ||
13773 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
13774 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
13775 | # endif | |
13776 | /* Test the flag could be set and stays set. */ | |
13777 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
13778 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
13779 | return 1 | |
13780 | ; | |
13781 | return 0; | |
13782 | } | |
13783 | _ACEOF | |
81ecdfbb | 13784 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
13785 | have_personality=true |
13786 | else | |
81ecdfbb | 13787 | have_personality=false |
10568435 | 13788 | fi |
81ecdfbb RW |
13789 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13790 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 13791 | fi |
81ecdfbb | 13792 | |
10568435 JK |
13793 | if $have_personality |
13794 | then | |
13795 | ||
81ecdfbb | 13796 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
13797 | |
13798 | fi | |
13799 | ||
e655c1a2 PA |
13800 | case $host_os in |
13801 | go32* | *djgpp*) | |
13802 | gdbinit=gdb.ini | |
13803 | ;; | |
13804 | *) | |
13805 | gdbinit=.gdbinit | |
13806 | ;; | |
13807 | esac | |
13808 | ||
13809 | cat >>confdefs.h <<_ACEOF | |
13810 | #define GDBINIT "$gdbinit" | |
13811 | _ACEOF | |
13812 | ||
13813 | ||
fb40c209 | 13814 | |
f83d8a90 DE |
13815 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
13816 | # except that the argument to --with-sysroot is optional. | |
13817 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
13818 | if test "x$with_sysroot" = xyes; then | |
13819 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
13820 | fi | |
bec39cab | 13821 | |
81ecdfbb RW |
13822 | # Check whether --with-sysroot was given. |
13823 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
13824 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
13825 | else | |
13826 | TARGET_SYSTEM_ROOT= | |
13827 | fi | |
030292b7 | 13828 | |
030292b7 | 13829 | |
f83d8a90 DE |
13830 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
13831 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
13832 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
13833 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 13834 | |
f83d8a90 DE |
13835 | cat >>confdefs.h <<_ACEOF |
13836 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
13837 | _ACEOF | |
bec39cab | 13838 | |
030292b7 | 13839 | |
b14b1491 | 13840 | |
f83d8a90 DE |
13841 | |
13842 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
13843 | if test "x$prefix" = xNONE; then | |
13844 | test_prefix=/usr/local | |
13845 | else | |
13846 | test_prefix=$prefix | |
13847 | fi | |
13848 | else | |
13849 | test_prefix=$exec_prefix | |
13850 | fi | |
13851 | value=0 | |
13852 | case ${ac_define_dir} in | |
13853 | "${test_prefix}"|"${test_prefix}/"*|\ | |
13854 | '${exec_prefix}'|'${exec_prefix}/'*) | |
13855 | value=1 | |
13856 | ;; | |
13857 | esac | |
13858 | ||
13859 | cat >>confdefs.h <<_ACEOF | |
13860 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
13861 | _ACEOF | |
030292b7 DJ |
13862 | |
13863 | ||
13864 | ||
16e7150e | 13865 | |
16e7150e | 13866 | |
81ecdfbb RW |
13867 | # Check whether --with-system-gdbinit was given. |
13868 | if test "${with_system_gdbinit+set}" = set; then : | |
13869 | withval=$with_system_gdbinit; | |
b14b1491 TT |
13870 | SYSTEM_GDBINIT=$withval |
13871 | else | |
13872 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
13873 | fi |
13874 | ||
16e7150e JG |
13875 | |
13876 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
13877 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 13878 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
13879 | ac_define_dir=`eval echo $ac_define_dir` |
13880 | ||
13881 | cat >>confdefs.h <<_ACEOF | |
13882 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
13883 | _ACEOF | |
13884 | ||
13885 | ||
13886 | ||
0c4a4063 | 13887 | |
b14b1491 TT |
13888 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
13889 | if test "x$prefix" = xNONE; then | |
13890 | test_prefix=/usr/local | |
13891 | else | |
13892 | test_prefix=$prefix | |
13893 | fi | |
13894 | else | |
13895 | test_prefix=$exec_prefix | |
13896 | fi | |
13897 | value=0 | |
13898 | case ${ac_define_dir} in | |
13899 | "${test_prefix}"|"${test_prefix}/"*|\ | |
13900 | '${exec_prefix}'|'${exec_prefix}/'*) | |
13901 | value=1 | |
13902 | ;; | |
13903 | esac | |
16e7150e | 13904 | |
b14b1491 TT |
13905 | cat >>confdefs.h <<_ACEOF |
13906 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
13907 | _ACEOF |
13908 | ||
b14b1491 | 13909 | |
16e7150e | 13910 | |
0c4a4063 | 13911 | |
81ecdfbb RW |
13912 | # Check whether --enable-werror was given. |
13913 | if test "${enable_werror+set}" = set; then : | |
13914 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
13915 | yes | y) ERROR_ON_WARNING="yes" ;; |
13916 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 13917 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 13918 | esac |
81ecdfbb RW |
13919 | fi |
13920 | ||
094a342e | 13921 | |
3bc3d82a PA |
13922 | # Enable -Werror by default when using gcc in C mode. Leave it off |
13923 | # for C++ until we're warning clean. Turn it off for releases. | |
13924 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \ | |
13925 | && test x"$enable_build_with_cxx" != x"yes" \ | |
13926 | && $development; then | |
094a342e MK |
13927 | ERROR_ON_WARNING=yes |
13928 | fi | |
13929 | ||
13930 | WERROR_CFLAGS="" | |
13931 | if test "${ERROR_ON_WARNING}" = yes ; then | |
13932 | WERROR_CFLAGS="-Werror" | |
13933 | fi | |
13934 | ||
3bc3d82a | 13935 | # These options work in either C or C++ modes. |
aac331e4 | 13936 | build_warnings="-Wall -Wpointer-arith \ |
1cb5e2a4 | 13937 | -Wno-unused -Wunused-value -Wunused-function \ |
aac331e4 PA |
13938 | -Wno-switch -Wno-char-subscripts \ |
13939 | -Wempty-body" | |
a3b362c4 | 13940 | |
3bc3d82a PA |
13941 | # Now add in C and C++ specific options, depending on mode. |
13942 | if test "$enable_build_with_cxx" = "yes"; then | |
13943 | build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \ | |
13944 | -Wno-narrowing" | |
13945 | else | |
aac331e4 PA |
13946 | build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \ |
13947 | -Wdeclaration-after-statement -Wmissing-parameter-type \ | |
13948 | -Wold-style-declaration -Wold-style-definition" | |
3bc3d82a PA |
13949 | fi |
13950 | ||
3526781e DJ |
13951 | # Enable -Wno-format by default when using gcc on mingw since many |
13952 | # GCC versions complain about %I64. | |
13953 | case "${host}" in | |
13954 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
d3685d60 | 13955 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
13956 | esac |
13957 | ||
81ecdfbb RW |
13958 | # Check whether --enable-build-warnings was given. |
13959 | if test "${enable_build_warnings+set}" = set; then : | |
13960 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
13961 | yes) ;; |
13962 | no) build_warnings="-w";; | |
13963 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13964 | build_warnings="${build_warnings} ${t}";; | |
13965 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13966 | build_warnings="${t} ${build_warnings}";; | |
13967 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
13968 | esac | |
d4f3574e | 13969 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 13970 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 13971 | fi |
81ecdfbb RW |
13972 | fi |
13973 | # Check whether --enable-gdb-build-warnings was given. | |
13974 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
13975 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
13976 | yes) ;; |
13977 | no) build_warnings="-w";; | |
13978 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13979 | build_warnings="${build_warnings} ${t}";; | |
13980 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13981 | build_warnings="${t} ${build_warnings}";; | |
13982 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
13983 | esac | |
13984 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
13985 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
13986 | fi | |
81ecdfbb | 13987 | fi |
3bc3d82a PA |
13988 | |
13989 | # The set of warnings supported by a C++ compiler is not the same as | |
13990 | # of the C compiler. | |
13991 | if test "$enable_build_with_cxx" = "yes"; then | |
13992 | ac_ext=cpp | |
13993 | ac_cpp='$CXXCPP $CPPFLAGS' | |
13994 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13995 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13996 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
13997 | ||
13998 | fi | |
13999 | ||
81ecdfbb | 14000 | WARN_CFLAGS="" |
c906108c SS |
14001 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
14002 | then | |
81ecdfbb RW |
14003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
14004 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
14005 | # Separate out the -Werror flag as some files just cannot be |
14006 | # compiled with it enabled. | |
14007 | for w in ${build_warnings}; do | |
14008 | case $w in | |
14009 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
14010 | *) |
14011 | # Check whether GCC accepts it. | |
4536bbc6 AC |
14012 | saved_CFLAGS="$CFLAGS" |
14013 | CFLAGS="$CFLAGS $w" | |
3bc3d82a PA |
14014 | saved_CXXFLAGS="$CXXFLAGS" |
14015 | CXXFLAGS="$CXXFLAGS $w" | |
54019719 | 14016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14017 | /* end confdefs.h. */ |
4536bbc6 | 14018 | |
bec39cab AC |
14019 | int |
14020 | main () | |
14021 | { | |
4536bbc6 | 14022 | |
bec39cab AC |
14023 | ; |
14024 | return 0; | |
14025 | } | |
14026 | _ACEOF | |
3bc3d82a | 14027 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 14028 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 14029 | fi |
81ecdfbb | 14030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 14031 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 14032 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
14033 | esac |
14034 | done | |
81ecdfbb RW |
14035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
14036 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
14037 | fi |
14038 | ||
14039 | ||
104c1213 | 14040 | |
3bc3d82a PA |
14041 | if test "$enable_build_with_cxx" = "yes"; then |
14042 | ac_ext=c | |
14043 | ac_cpp='$CPP $CPPFLAGS' | |
14044 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14045 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14046 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
14047 | ||
14048 | fi | |
14049 | ||
7a292a7a | 14050 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
14051 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
14052 | $as_echo_n "checking for cygwin... " >&6; } | |
14053 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
14054 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14055 | else |
81ecdfbb | 14056 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14057 | /* end confdefs.h. */ |
7a292a7a SS |
14058 | |
14059 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
14060 | lose | |
14061 | #endif | |
bec39cab | 14062 | _ACEOF |
7a292a7a | 14063 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 14064 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
14065 | gdb_cv_os_cygwin=yes |
14066 | else | |
7a292a7a SS |
14067 | gdb_cv_os_cygwin=no |
14068 | fi | |
14069 | rm -f conftest* | |
14070 | ||
14071 | fi | |
81ecdfbb RW |
14072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
14073 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 14074 | |
aff38e61 | 14075 | |
3eb25fda | 14076 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 14077 | case ${host} in |
95cbc983 AC |
14078 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
14079 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 14080 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
14081 | esac |
14082 | ||
14083 | ||
cd0fc7c3 SS |
14084 | # libreadline needs libuser32.a in a cygwin environment |
14085 | WIN32LIBS= | |
14086 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
14087 | WIN32LIBS="-luser32" |
14088 | case "${target}" in | |
14089 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
14090 | ;; | |
14091 | esac | |
cd0fc7c3 | 14092 | fi |
c906108c | 14093 | |
b4505029 MM |
14094 | # The ser-tcp.c module requires sockets. |
14095 | case ${host} in | |
14096 | *mingw32*) | |
14097 | ||
81ecdfbb | 14098 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
14099 | |
14100 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
14101 | ;; | |
14102 | esac | |
14103 | ||
7a292a7a | 14104 | |
31d99776 | 14105 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
14106 | |
14107 | OLD_CFLAGS=$CFLAGS | |
14108 | OLD_LDFLAGS=$LDFLAGS | |
14109 | OLD_LIBS=$LIBS | |
14110 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
14111 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
14112 | # always want our bfd. | |
14113 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
14114 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
14115 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 14116 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 14117 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 14118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb RW |
14119 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
14120 | if test "${gdb_cv_var_elf+set}" = set; then : | |
14121 | $as_echo_n "(cached) " >&6 | |
31d99776 | 14122 | else |
81ecdfbb | 14123 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
14124 | /* end confdefs.h. */ |
14125 | #include <stdlib.h> | |
def63ff0 TT |
14126 | #include "bfd.h" |
14127 | #include "elf-bfd.h" | |
31d99776 DJ |
14128 | |
14129 | int | |
14130 | main () | |
14131 | { | |
def63ff0 | 14132 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
14133 | ; |
14134 | return 0; | |
14135 | } | |
14136 | _ACEOF | |
81ecdfbb | 14137 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
14138 | gdb_cv_var_elf=yes |
14139 | else | |
81ecdfbb | 14140 | gdb_cv_var_elf=no |
31d99776 | 14141 | fi |
81ecdfbb RW |
14142 | rm -f core conftest.err conftest.$ac_objext \ |
14143 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 14144 | fi |
81ecdfbb RW |
14145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
14146 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
14147 | CFLAGS=$OLD_CFLAGS |
14148 | LDFLAGS=$OLD_LDFLAGS | |
14149 | LIBS=$OLD_LIBS | |
31d99776 | 14150 | if test $gdb_cv_var_elf = yes; then |
d4777acb | 14151 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 14152 | |
81ecdfbb | 14153 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 14154 | |
075ff26d JK |
14155 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
14156 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
14157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
14158 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
14159 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
14160 | $as_echo_n "(cached) " >&6 | |
14161 | else | |
14162 | ac_func_search_save_LIBS=$LIBS | |
14163 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14164 | /* end confdefs.h. */ | |
14165 | ||
14166 | /* Override any GCC internal prototype to avoid an error. | |
14167 | Use char because int might match the return type of a GCC | |
14168 | builtin and then its argument prototype would still apply. */ | |
14169 | #ifdef __cplusplus | |
14170 | extern "C" | |
14171 | #endif | |
14172 | char dlopen (); | |
14173 | int | |
14174 | main () | |
14175 | { | |
14176 | return dlopen (); | |
14177 | ; | |
14178 | return 0; | |
14179 | } | |
14180 | _ACEOF | |
14181 | for ac_lib in '' dl; do | |
14182 | if test -z "$ac_lib"; then | |
14183 | ac_res="none required" | |
14184 | else | |
14185 | ac_res=-l$ac_lib | |
14186 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
14187 | fi | |
14188 | if ac_fn_c_try_link "$LINENO"; then : | |
14189 | ac_cv_search_dlopen=$ac_res | |
14190 | fi | |
14191 | rm -f core conftest.err conftest.$ac_objext \ | |
14192 | conftest$ac_exeext | |
14193 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
14194 | break | |
14195 | fi | |
14196 | done | |
14197 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
14198 | ||
14199 | else | |
14200 | ac_cv_search_dlopen=no | |
14201 | fi | |
14202 | rm conftest.$ac_ext | |
14203 | LIBS=$ac_func_search_save_LIBS | |
14204 | fi | |
14205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
14206 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
14207 | ac_res=$ac_cv_search_dlopen | |
14208 | if test "$ac_res" != no; then : | |
14209 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
14210 | ||
14211 | fi | |
14212 | ||
075ff26d | 14213 | fi |
31d99776 | 14214 | fi |
31d99776 | 14215 | |
4f05add4 TT |
14216 | # Add macho support to GDB, but only if BFD includes it. |
14217 | ||
14218 | OLD_CFLAGS=$CFLAGS | |
14219 | OLD_LDFLAGS=$LDFLAGS | |
14220 | OLD_LIBS=$LIBS | |
14221 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
14222 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
14223 | # always want our bfd. | |
14224 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
14225 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
14226 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 14227 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 14228 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
14229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
14230 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
14231 | if test "${gdb_cv_var_macho+set}" = set; then : | |
14232 | $as_echo_n "(cached) " >&6 | |
14233 | else | |
14234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14235 | /* end confdefs.h. */ | |
14236 | #include <stdlib.h> | |
14237 | #include "bfd.h" | |
14238 | #include "mach-o.h" | |
14239 | ||
14240 | int | |
14241 | main () | |
14242 | { | |
14243 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
14244 | ; | |
14245 | return 0; | |
14246 | } | |
14247 | _ACEOF | |
14248 | if ac_fn_c_try_link "$LINENO"; then : | |
14249 | gdb_cv_var_macho=yes | |
14250 | else | |
14251 | gdb_cv_var_macho=no | |
14252 | fi | |
14253 | rm -f core conftest.err conftest.$ac_objext \ | |
14254 | conftest$ac_exeext conftest.$ac_ext | |
14255 | fi | |
14256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
14257 | $as_echo "$gdb_cv_var_macho" >&6; } | |
14258 | CFLAGS=$OLD_CFLAGS | |
14259 | LDFLAGS=$OLD_LDFLAGS | |
14260 | LIBS=$OLD_LIBS | |
14261 | if test $gdb_cv_var_macho = yes; then | |
14262 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
14263 | fi | |
14264 | ||
121ce6e5 DJ |
14265 | # Add any host-specific objects to GDB. |
14266 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
14267 | ||
608e2dbb TT |
14268 | # If building on ELF, look for lzma support for embedded compressed debug info. |
14269 | if test $gdb_cv_var_elf = yes; then | |
14270 | ||
14271 | # Check whether --with-lzma was given. | |
14272 | if test "${with_lzma+set}" = set; then : | |
14273 | withval=$with_lzma; | |
14274 | else | |
14275 | with_lzma=auto | |
14276 | fi | |
14277 | ||
14278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
14279 | $as_echo_n "checking whether to use lzma... " >&6; } | |
14280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
14281 | $as_echo "$with_lzma" >&6; } | |
14282 | ||
14283 | if test "${with_lzma}" != no; then | |
14284 | ||
14285 | ||
14286 | ||
14287 | ||
14288 | ||
14289 | ||
14290 | ||
14291 | ||
14292 | use_additional=yes | |
14293 | ||
14294 | acl_save_prefix="$prefix" | |
14295 | prefix="$acl_final_prefix" | |
14296 | acl_save_exec_prefix="$exec_prefix" | |
14297 | exec_prefix="$acl_final_exec_prefix" | |
14298 | ||
14299 | eval additional_includedir=\"$includedir\" | |
14300 | eval additional_libdir=\"$libdir\" | |
14301 | ||
14302 | exec_prefix="$acl_save_exec_prefix" | |
14303 | prefix="$acl_save_prefix" | |
14304 | ||
14305 | ||
14306 | # Check whether --with-liblzma-prefix was given. | |
14307 | if test "${with_liblzma_prefix+set}" = set; then : | |
14308 | withval=$with_liblzma_prefix; | |
14309 | if test "X$withval" = "Xno"; then | |
14310 | use_additional=no | |
14311 | else | |
14312 | if test "X$withval" = "X"; then | |
14313 | ||
14314 | acl_save_prefix="$prefix" | |
14315 | prefix="$acl_final_prefix" | |
14316 | acl_save_exec_prefix="$exec_prefix" | |
14317 | exec_prefix="$acl_final_exec_prefix" | |
14318 | ||
14319 | eval additional_includedir=\"$includedir\" | |
14320 | eval additional_libdir=\"$libdir\" | |
14321 | ||
14322 | exec_prefix="$acl_save_exec_prefix" | |
14323 | prefix="$acl_save_prefix" | |
14324 | ||
14325 | else | |
14326 | additional_includedir="$withval/include" | |
14327 | additional_libdir="$withval/lib" | |
14328 | fi | |
14329 | fi | |
14330 | ||
14331 | fi | |
14332 | ||
14333 | LIBLZMA= | |
14334 | LTLIBLZMA= | |
14335 | INCLZMA= | |
14336 | rpathdirs= | |
14337 | ltrpathdirs= | |
14338 | names_already_handled= | |
14339 | names_next_round='lzma ' | |
14340 | while test -n "$names_next_round"; do | |
14341 | names_this_round="$names_next_round" | |
14342 | names_next_round= | |
14343 | for name in $names_this_round; do | |
14344 | already_handled= | |
14345 | for n in $names_already_handled; do | |
14346 | if test "$n" = "$name"; then | |
14347 | already_handled=yes | |
14348 | break | |
14349 | fi | |
14350 | done | |
14351 | if test -z "$already_handled"; then | |
14352 | names_already_handled="$names_already_handled $name" | |
14353 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14354 | eval value=\"\$HAVE_LIB$uppername\" | |
14355 | if test -n "$value"; then | |
14356 | if test "$value" = yes; then | |
14357 | eval value=\"\$LIB$uppername\" | |
14358 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
14359 | eval value=\"\$LTLIB$uppername\" | |
14360 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
14361 | else | |
14362 | : | |
14363 | fi | |
14364 | else | |
14365 | found_dir= | |
14366 | found_la= | |
14367 | found_so= | |
14368 | found_a= | |
14369 | if test $use_additional = yes; then | |
14370 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
14371 | found_dir="$additional_libdir" | |
14372 | found_so="$additional_libdir/lib$name.$shlibext" | |
14373 | if test -f "$additional_libdir/lib$name.la"; then | |
14374 | found_la="$additional_libdir/lib$name.la" | |
14375 | fi | |
14376 | else | |
14377 | if test -f "$additional_libdir/lib$name.$libext"; then | |
14378 | found_dir="$additional_libdir" | |
14379 | found_a="$additional_libdir/lib$name.$libext" | |
14380 | if test -f "$additional_libdir/lib$name.la"; then | |
14381 | found_la="$additional_libdir/lib$name.la" | |
14382 | fi | |
14383 | fi | |
14384 | fi | |
14385 | fi | |
14386 | if test "X$found_dir" = "X"; then | |
14387 | for x in $LDFLAGS $LTLIBLZMA; do | |
14388 | ||
14389 | acl_save_prefix="$prefix" | |
14390 | prefix="$acl_final_prefix" | |
14391 | acl_save_exec_prefix="$exec_prefix" | |
14392 | exec_prefix="$acl_final_exec_prefix" | |
14393 | eval x=\"$x\" | |
14394 | exec_prefix="$acl_save_exec_prefix" | |
14395 | prefix="$acl_save_prefix" | |
14396 | ||
14397 | case "$x" in | |
14398 | -L*) | |
14399 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
14400 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
14401 | found_dir="$dir" | |
14402 | found_so="$dir/lib$name.$shlibext" | |
14403 | if test -f "$dir/lib$name.la"; then | |
14404 | found_la="$dir/lib$name.la" | |
14405 | fi | |
14406 | else | |
14407 | if test -f "$dir/lib$name.$libext"; then | |
14408 | found_dir="$dir" | |
14409 | found_a="$dir/lib$name.$libext" | |
14410 | if test -f "$dir/lib$name.la"; then | |
14411 | found_la="$dir/lib$name.la" | |
14412 | fi | |
14413 | fi | |
14414 | fi | |
14415 | ;; | |
14416 | esac | |
14417 | if test "X$found_dir" != "X"; then | |
14418 | break | |
14419 | fi | |
14420 | done | |
14421 | fi | |
14422 | if test "X$found_dir" != "X"; then | |
14423 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
14424 | if test "X$found_so" != "X"; then | |
14425 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14426 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14427 | else | |
14428 | haveit= | |
14429 | for x in $ltrpathdirs; do | |
14430 | if test "X$x" = "X$found_dir"; then | |
14431 | haveit=yes | |
14432 | break | |
14433 | fi | |
14434 | done | |
14435 | if test -z "$haveit"; then | |
14436 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14437 | fi | |
14438 | if test "$hardcode_direct" = yes; then | |
14439 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14440 | else | |
14441 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14442 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14443 | haveit= | |
14444 | for x in $rpathdirs; do | |
14445 | if test "X$x" = "X$found_dir"; then | |
14446 | haveit=yes | |
14447 | break | |
14448 | fi | |
14449 | done | |
14450 | if test -z "$haveit"; then | |
14451 | rpathdirs="$rpathdirs $found_dir" | |
14452 | fi | |
14453 | else | |
14454 | haveit= | |
14455 | for x in $LDFLAGS $LIBLZMA; do | |
14456 | ||
14457 | acl_save_prefix="$prefix" | |
14458 | prefix="$acl_final_prefix" | |
14459 | acl_save_exec_prefix="$exec_prefix" | |
14460 | exec_prefix="$acl_final_exec_prefix" | |
14461 | eval x=\"$x\" | |
14462 | exec_prefix="$acl_save_exec_prefix" | |
14463 | prefix="$acl_save_prefix" | |
14464 | ||
14465 | if test "X$x" = "X-L$found_dir"; then | |
14466 | haveit=yes | |
14467 | break | |
14468 | fi | |
14469 | done | |
14470 | if test -z "$haveit"; then | |
14471 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
14472 | fi | |
14473 | if test "$hardcode_minus_L" != no; then | |
14474 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
14475 | else | |
14476 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
14477 | fi | |
14478 | fi | |
14479 | fi | |
14480 | fi | |
14481 | else | |
14482 | if test "X$found_a" != "X"; then | |
14483 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
14484 | else | |
14485 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
14486 | fi | |
14487 | fi | |
14488 | additional_includedir= | |
14489 | case "$found_dir" in | |
14490 | */lib | */lib/) | |
14491 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14492 | additional_includedir="$basedir/include" | |
14493 | ;; | |
14494 | esac | |
14495 | if test "X$additional_includedir" != "X"; then | |
14496 | if test "X$additional_includedir" != "X/usr/include"; then | |
14497 | haveit= | |
14498 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14499 | if test -n "$GCC"; then | |
14500 | case $host_os in | |
14501 | linux*) haveit=yes;; | |
14502 | esac | |
14503 | fi | |
14504 | fi | |
14505 | if test -z "$haveit"; then | |
14506 | for x in $CPPFLAGS $INCLZMA; do | |
14507 | ||
14508 | acl_save_prefix="$prefix" | |
14509 | prefix="$acl_final_prefix" | |
14510 | acl_save_exec_prefix="$exec_prefix" | |
14511 | exec_prefix="$acl_final_exec_prefix" | |
14512 | eval x=\"$x\" | |
14513 | exec_prefix="$acl_save_exec_prefix" | |
14514 | prefix="$acl_save_prefix" | |
14515 | ||
14516 | if test "X$x" = "X-I$additional_includedir"; then | |
14517 | haveit=yes | |
14518 | break | |
14519 | fi | |
14520 | done | |
14521 | if test -z "$haveit"; then | |
14522 | if test -d "$additional_includedir"; then | |
14523 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
14524 | fi | |
14525 | fi | |
14526 | fi | |
14527 | fi | |
14528 | fi | |
14529 | if test -n "$found_la"; then | |
14530 | save_libdir="$libdir" | |
14531 | case "$found_la" in | |
14532 | */* | *\\*) . "$found_la" ;; | |
14533 | *) . "./$found_la" ;; | |
14534 | esac | |
14535 | libdir="$save_libdir" | |
14536 | for dep in $dependency_libs; do | |
14537 | case "$dep" in | |
14538 | -L*) | |
14539 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
14540 | if test "X$additional_libdir" != "X/usr/lib"; then | |
14541 | haveit= | |
14542 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
14543 | if test -n "$GCC"; then | |
14544 | case $host_os in | |
14545 | linux*) haveit=yes;; | |
14546 | esac | |
14547 | fi | |
14548 | fi | |
14549 | if test -z "$haveit"; then | |
14550 | haveit= | |
14551 | for x in $LDFLAGS $LIBLZMA; do | |
14552 | ||
14553 | acl_save_prefix="$prefix" | |
14554 | prefix="$acl_final_prefix" | |
14555 | acl_save_exec_prefix="$exec_prefix" | |
14556 | exec_prefix="$acl_final_exec_prefix" | |
14557 | eval x=\"$x\" | |
14558 | exec_prefix="$acl_save_exec_prefix" | |
14559 | prefix="$acl_save_prefix" | |
14560 | ||
14561 | if test "X$x" = "X-L$additional_libdir"; then | |
14562 | haveit=yes | |
14563 | break | |
14564 | fi | |
14565 | done | |
14566 | if test -z "$haveit"; then | |
14567 | if test -d "$additional_libdir"; then | |
14568 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
14569 | fi | |
14570 | fi | |
14571 | haveit= | |
14572 | for x in $LDFLAGS $LTLIBLZMA; do | |
14573 | ||
14574 | acl_save_prefix="$prefix" | |
14575 | prefix="$acl_final_prefix" | |
14576 | acl_save_exec_prefix="$exec_prefix" | |
14577 | exec_prefix="$acl_final_exec_prefix" | |
14578 | eval x=\"$x\" | |
14579 | exec_prefix="$acl_save_exec_prefix" | |
14580 | prefix="$acl_save_prefix" | |
14581 | ||
14582 | if test "X$x" = "X-L$additional_libdir"; then | |
14583 | haveit=yes | |
14584 | break | |
14585 | fi | |
14586 | done | |
14587 | if test -z "$haveit"; then | |
14588 | if test -d "$additional_libdir"; then | |
14589 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
14590 | fi | |
14591 | fi | |
14592 | fi | |
14593 | fi | |
14594 | ;; | |
14595 | -R*) | |
14596 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
14597 | if test "$enable_rpath" != no; then | |
14598 | haveit= | |
14599 | for x in $rpathdirs; do | |
14600 | if test "X$x" = "X$dir"; then | |
14601 | haveit=yes | |
14602 | break | |
14603 | fi | |
14604 | done | |
14605 | if test -z "$haveit"; then | |
14606 | rpathdirs="$rpathdirs $dir" | |
14607 | fi | |
14608 | haveit= | |
14609 | for x in $ltrpathdirs; do | |
14610 | if test "X$x" = "X$dir"; then | |
14611 | haveit=yes | |
14612 | break | |
14613 | fi | |
14614 | done | |
14615 | if test -z "$haveit"; then | |
14616 | ltrpathdirs="$ltrpathdirs $dir" | |
14617 | fi | |
14618 | fi | |
14619 | ;; | |
14620 | -l*) | |
14621 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
14622 | ;; | |
14623 | *.la) | |
14624 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
14625 | ;; | |
14626 | *) | |
14627 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
14628 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
14629 | ;; | |
14630 | esac | |
14631 | done | |
14632 | fi | |
14633 | else | |
14634 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
14635 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
14636 | fi | |
14637 | fi | |
14638 | fi | |
14639 | done | |
14640 | done | |
14641 | if test "X$rpathdirs" != "X"; then | |
14642 | if test -n "$hardcode_libdir_separator"; then | |
14643 | alldirs= | |
14644 | for found_dir in $rpathdirs; do | |
14645 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
14646 | done | |
14647 | acl_save_libdir="$libdir" | |
14648 | libdir="$alldirs" | |
14649 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14650 | libdir="$acl_save_libdir" | |
14651 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
14652 | else | |
14653 | for found_dir in $rpathdirs; do | |
14654 | acl_save_libdir="$libdir" | |
14655 | libdir="$found_dir" | |
14656 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14657 | libdir="$acl_save_libdir" | |
14658 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
14659 | done | |
14660 | fi | |
14661 | fi | |
14662 | if test "X$ltrpathdirs" != "X"; then | |
14663 | for found_dir in $ltrpathdirs; do | |
14664 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
14665 | done | |
14666 | fi | |
14667 | ||
14668 | ||
14669 | ac_save_CPPFLAGS="$CPPFLAGS" | |
14670 | ||
14671 | for element in $INCLZMA; do | |
14672 | haveit= | |
14673 | for x in $CPPFLAGS; do | |
14674 | ||
14675 | acl_save_prefix="$prefix" | |
14676 | prefix="$acl_final_prefix" | |
14677 | acl_save_exec_prefix="$exec_prefix" | |
14678 | exec_prefix="$acl_final_exec_prefix" | |
14679 | eval x=\"$x\" | |
14680 | exec_prefix="$acl_save_exec_prefix" | |
14681 | prefix="$acl_save_prefix" | |
14682 | ||
14683 | if test "X$x" = "X$element"; then | |
14684 | haveit=yes | |
14685 | break | |
14686 | fi | |
14687 | done | |
14688 | if test -z "$haveit"; then | |
14689 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
14690 | fi | |
14691 | done | |
14692 | ||
14693 | ||
14694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
14695 | $as_echo_n "checking for liblzma... " >&6; } | |
14696 | if test "${ac_cv_liblzma+set}" = set; then : | |
14697 | $as_echo_n "(cached) " >&6 | |
14698 | else | |
14699 | ||
14700 | ac_save_LIBS="$LIBS" | |
14701 | LIBS="$LIBS $LIBLZMA" | |
14702 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14703 | /* end confdefs.h. */ | |
14704 | #include "lzma.h" | |
14705 | int | |
14706 | main () | |
14707 | { | |
14708 | lzma_index_iter iter; | |
14709 | lzma_index_iter_init (&iter, 0); | |
14710 | lzma_mf_is_supported (LZMA_MF_HC3); | |
14711 | ; | |
14712 | return 0; | |
14713 | } | |
14714 | _ACEOF | |
14715 | if ac_fn_c_try_link "$LINENO"; then : | |
14716 | ac_cv_liblzma=yes | |
14717 | else | |
14718 | ac_cv_liblzma=no | |
14719 | fi | |
14720 | rm -f core conftest.err conftest.$ac_objext \ | |
14721 | conftest$ac_exeext conftest.$ac_ext | |
14722 | LIBS="$ac_save_LIBS" | |
14723 | ||
14724 | fi | |
14725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
14726 | $as_echo "$ac_cv_liblzma" >&6; } | |
14727 | if test "$ac_cv_liblzma" = yes; then | |
14728 | HAVE_LIBLZMA=yes | |
14729 | ||
14730 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
14731 | ||
14732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
14733 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
14734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
14735 | $as_echo "$LIBLZMA" >&6; } | |
14736 | else | |
14737 | HAVE_LIBLZMA=no | |
14738 | CPPFLAGS="$ac_save_CPPFLAGS" | |
14739 | LIBLZMA= | |
14740 | LTLIBLZMA= | |
14741 | fi | |
14742 | ||
14743 | ||
14744 | ||
14745 | ||
14746 | ||
14747 | ||
14748 | if test "$HAVE_LIBLZMA" != yes; then | |
14749 | if test "$with_lzma" = yes; then | |
14750 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
14751 | fi | |
14752 | fi | |
14753 | fi | |
14754 | fi | |
14755 | ||
3fc11d3e JM |
14756 | LIBGUI="../libgui/src/libgui.a" |
14757 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
14758 | ||
14759 | ||
7a292a7a | 14760 | |
3fc11d3e JM |
14761 | WIN32LDAPP= |
14762 | ||
14763 | ||
14764 | ||
d91670b9 | 14765 | case "${host}" in |
686a5eed | 14766 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
14767 | configdir="win" |
14768 | ;; | |
14769 | *) | |
14770 | configdir="unix" | |
14771 | ;; | |
14772 | esac | |
3fc11d3e JM |
14773 | |
14774 | GDBTKLIBS= | |
14775 | if test "${enable_gdbtk}" = "yes"; then | |
14776 | ||
d1c3b63a KS |
14777 | # Gdbtk must have an absolute path to srcdir in order to run |
14778 | # properly when not installed. | |
14779 | here=`pwd` | |
14780 | cd ${srcdir} | |
14781 | GDBTK_SRC_DIR=`pwd` | |
14782 | cd $here | |
14783 | ||
bec39cab | 14784 | |
5062cc19 KS |
14785 | # |
14786 | # Ok, lets find the tcl configuration | |
14787 | # First, look for one uninstalled. | |
14788 | # the alternative search directory is invoked by --with-tcl | |
14789 | # | |
3fc11d3e | 14790 | |
5062cc19 KS |
14791 | if test x"${no_tcl}" = x ; then |
14792 | # we reset no_tcl in case something fails here | |
14793 | no_tcl=true | |
bec39cab | 14794 | |
81ecdfbb RW |
14795 | # Check whether --with-tcl was given. |
14796 | if test "${with_tcl+set}" = set; then : | |
14797 | withval=$with_tcl; with_tclconfig=${withval} | |
14798 | fi | |
14799 | ||
14800 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
14801 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
14802 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
14803 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 14804 | else |
bec39cab | 14805 | |
3fc11d3e | 14806 | |
5062cc19 KS |
14807 | # First check to see if --with-tcl was specified. |
14808 | case "${host}" in | |
14809 | *-*-cygwin*) platDir="win" ;; | |
14810 | *) platDir="unix" ;; | |
14811 | esac | |
14812 | if test x"${with_tclconfig}" != x ; then | |
14813 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
14814 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
14815 | else | |
81ecdfbb | 14816 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
14817 | fi |
14818 | fi | |
14819 | ||
14820 | # then check for a private Tcl installation | |
14821 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14822 | for i in \ | |
14823 | ../tcl \ | |
14824 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14825 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
14826 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14827 | ../../tcl \ | |
14828 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14829 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14830 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14831 | ../../../tcl \ | |
14832 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14833 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14834 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
14835 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
14836 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
14837 | break | |
14838 | fi | |
14839 | done | |
14840 | fi | |
14841 | ||
14842 | # on Darwin, check in Framework installation locations | |
14843 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
14844 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
14845 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
14846 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
14847 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
14848 | ; do | |
14849 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
14850 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
14851 | break | |
14852 | fi | |
14853 | done | |
14854 | fi | |
14855 | ||
14856 | # check in a few common install locations | |
14857 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14858 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
14859 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
14860 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
14861 | `ls -d /usr/local/lib 2>/dev/null` \ | |
14862 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
14863 | `ls -d /usr/lib 2>/dev/null` \ | |
14864 | ; do | |
14865 | if test -f "$i/tclConfig.sh" ; then | |
14866 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
14867 | break | |
14868 | fi | |
14869 | done | |
14870 | fi | |
3fc11d3e | 14871 | |
5062cc19 KS |
14872 | # check in a few other private locations |
14873 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14874 | for i in \ | |
14875 | ${srcdir}/../tcl \ | |
14876 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14877 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
14878 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
14879 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
14880 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
14881 | break | |
14882 | fi | |
14883 | done | |
14884 | fi | |
bec39cab | 14885 | |
3fc11d3e JM |
14886 | fi |
14887 | ||
5062cc19 KS |
14888 | |
14889 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14890 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
14891 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
14892 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
14893 | else |
14894 | no_tcl= | |
14895 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
14896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
14897 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
14898 | fi |
14899 | fi | |
3fc11d3e | 14900 | |
bec39cab | 14901 | |
85541719 DE |
14902 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
14903 | # point to doing Tcl. | |
bec39cab | 14904 | |
5062cc19 KS |
14905 | # |
14906 | # Ok, lets find the tk configuration | |
14907 | # First, look for one uninstalled. | |
14908 | # the alternative search directory is invoked by --with-tk | |
14909 | # | |
3fc11d3e | 14910 | |
5062cc19 KS |
14911 | if test x"${no_tk}" = x ; then |
14912 | # we reset no_tk in case something fails here | |
14913 | no_tk=true | |
bec39cab | 14914 | |
81ecdfbb RW |
14915 | # Check whether --with-tk was given. |
14916 | if test "${with_tk+set}" = set; then : | |
14917 | withval=$with_tk; with_tkconfig=${withval} | |
14918 | fi | |
14919 | ||
14920 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
14921 | $as_echo_n "checking for Tk configuration... " >&6; } | |
14922 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
14923 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14924 | else |
3fc11d3e JM |
14925 | |
14926 | ||
5062cc19 KS |
14927 | # First check to see if --with-tkconfig was specified. |
14928 | if test x"${with_tkconfig}" != x ; then | |
14929 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
14930 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
14931 | else | |
81ecdfbb | 14932 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
14933 | fi |
14934 | fi | |
3fc11d3e | 14935 | |
5062cc19 KS |
14936 | # then check for a private Tk library |
14937 | case "${host}" in | |
14938 | *-*-cygwin*) platDir="win" ;; | |
14939 | *) platDir="unix" ;; | |
14940 | esac | |
14941 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
14942 | for i in \ | |
14943 | ../tk \ | |
14944 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14945 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
14946 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
14947 | ../../tk \ | |
14948 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14949 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
14950 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
14951 | ../../../tk \ | |
14952 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14953 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
14954 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
14955 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
14956 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
14957 | break | |
14958 | fi | |
14959 | done | |
14960 | fi | |
14961 | ||
14962 | # on Darwin, check in Framework installation locations | |
14963 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
14964 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
14965 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
14966 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
14967 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
14968 | ; do | |
14969 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
14970 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
14971 | break | |
14972 | fi | |
14973 | done | |
14974 | fi | |
14975 | ||
14976 | # check in a few common install locations | |
14977 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
14978 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
14979 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
14980 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
14981 | `ls -d /usr/local/lib 2>/dev/null` \ | |
14982 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
14983 | `ls -d /usr/lib 2>/dev/null` \ | |
14984 | ; do | |
14985 | if test -f "$i/tkConfig.sh" ; then | |
14986 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
14987 | break | |
14988 | fi | |
14989 | done | |
14990 | fi | |
14991 | # check in a few other private locations | |
14992 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
14993 | for i in \ | |
14994 | ${srcdir}/../tk \ | |
14995 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14996 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
14997 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
14998 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
14999 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15000 | break | |
15001 | fi | |
15002 | done | |
15003 | fi | |
3fc11d3e | 15004 | |
3fc11d3e JM |
15005 | fi |
15006 | ||
15007 | ||
5062cc19 KS |
15008 | if test x"${ac_cv_c_tkconfig}" = x ; then |
15009 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
15010 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
15011 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
15012 | else |
15013 | no_tk= | |
15014 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
15015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15016 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 15017 | fi |
3fc11d3e | 15018 | fi |
dd2504ab | 15019 | |
dd2504ab | 15020 | |
85541719 DE |
15021 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
15022 | ||
81ecdfbb RW |
15023 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15024 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
15025 | |
15026 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
15027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15028 | $as_echo "loading" >&6; } | |
85541719 DE |
15029 | . ${TCL_BIN_DIR}/tclConfig.sh |
15030 | else | |
81ecdfbb RW |
15031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15032 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
15033 | fi |
15034 | ||
15035 | # eval is required to do the TCL_DBGX substitution | |
15036 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
15037 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
15038 | ||
15039 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
15040 | # then set the common variable name to the value of the build variables. | |
15041 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
15042 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
15043 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
15044 | # installed and uninstalled version of Tcl. | |
15045 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
15046 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
15047 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
15048 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
15049 | elif test "`uname -s`" = "Darwin"; then | |
15050 | # If Tcl was built as a framework, attempt to use the libraries | |
15051 | # from the framework at the given location so that linking works | |
a68ffae9 | 15052 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
15053 | case ${TCL_DEFS} in |
15054 | *TCL_FRAMEWORK*) | |
15055 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
15056 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
15057 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
15058 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
15059 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
15060 | break | |
15061 | fi | |
15062 | done | |
15063 | fi | |
15064 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
15065 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
15066 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
15067 | fi | |
15068 | ;; | |
15069 | esac | |
15070 | fi | |
15071 | ||
15072 | # eval is required to do the TCL_DBGX substitution | |
15073 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
15074 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
15075 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
15076 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
15077 | ||
15078 | ||
15079 | ||
15080 | ||
15081 | ||
15082 | ||
15083 | ||
15084 | ||
15085 | ||
15086 | ||
15087 | ||
15088 | ||
15089 | ||
15090 | ||
15091 | ||
15092 | # Check for in-tree tcl | |
15093 | here=`pwd` | |
15094 | cd ${srcdir}/.. | |
15095 | topdir=`pwd` | |
15096 | cd ${here} | |
15097 | ||
15098 | intree="no" | |
15099 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
15100 | intree="yes" | |
15101 | fi | |
15102 | ||
15103 | # Find Tcl private headers | |
15104 | if test x"${intree}" = xno; then | |
15105 | ||
81ecdfbb RW |
15106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
15107 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
15108 | private_dir="" |
15109 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
15110 | if test -f ${dir}/tclInt.h ; then | |
15111 | private_dir=${dir} | |
15112 | fi | |
15113 | ||
15114 | if test x"${private_dir}" = x; then | |
81ecdfbb | 15115 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
15116 | else |
15117 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
15118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15119 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
15120 | fi |
15121 | ||
15122 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
15123 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
15124 | TCL_DEPS="" | |
15125 | else | |
15126 | # If building tcl in the same src tree, private headers | |
15127 | # are not needed, but we need to be sure to use the right | |
15128 | # headers library | |
15129 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
15130 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
15131 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
15132 | fi | |
15133 | ||
15134 | ||
15135 | ||
15136 | ||
15137 | ||
81ecdfbb RW |
15138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15139 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 15140 | |
5062cc19 | 15141 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
15142 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15143 | $as_echo "loading" >&6; } | |
5062cc19 | 15144 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 15145 | else |
81ecdfbb RW |
15146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15147 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 15148 | fi |
bec39cab | 15149 | |
5062cc19 KS |
15150 | # eval is required to do the TK_DBGX substitution |
15151 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
15152 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
15153 | ||
15154 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
15155 | # then set the common variable name to the value of the build variables. | |
15156 | # For example, the variable TK_LIB_SPEC will be set to the value | |
15157 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
15158 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
15159 | # installed and uninstalled version of Tcl. | |
85541719 | 15160 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
15161 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
15162 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
15163 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
15164 | elif test "`uname -s`" = "Darwin"; then | |
15165 | # If Tk was built as a framework, attempt to use the libraries | |
15166 | # from the framework at the given location so that linking works | |
a68ffae9 | 15167 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
15168 | case ${TK_DEFS} in |
15169 | *TK_FRAMEWORK*) | |
85541719 | 15170 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
15171 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
15172 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
15173 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
15174 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
15175 | break | |
15176 | fi | |
15177 | done | |
15178 | fi | |
85541719 | 15179 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
15180 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
15181 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
15182 | fi | |
15183 | ;; | |
15184 | esac | |
3fc11d3e JM |
15185 | fi |
15186 | ||
5062cc19 KS |
15187 | # eval is required to do the TK_DBGX substitution |
15188 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
15189 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
15190 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
15191 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 15192 | |
3fc11d3e JM |
15193 | |
15194 | ||
bec39cab AC |
15195 | |
15196 | ||
15197 | ||
15198 | ||
15199 | ||
15200 | ||
15201 | ||
3fc11d3e | 15202 | |
3fc11d3e | 15203 | |
bec39cab | 15204 | |
bec39cab | 15205 | |
85541719 DE |
15206 | # Check for in-tree Tk |
15207 | intree="no" | |
15208 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
15209 | intree="yes" | |
15210 | fi | |
3fc11d3e | 15211 | |
85541719 DE |
15212 | # Find Tk private headers |
15213 | if test x"${intree}" = xno; then | |
3fc11d3e | 15214 | |
81ecdfbb RW |
15215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
15216 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
15217 | private_dir="" |
15218 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
15219 | if test -f ${dir}/tkInt.h; then | |
15220 | private_dir=${dir} | |
3fc11d3e | 15221 | fi |
bec39cab | 15222 | |
5062cc19 | 15223 | if test x"${private_dir}" = x; then |
81ecdfbb | 15224 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 15225 | else |
5062cc19 | 15226 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
15227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15228 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 15229 | fi |
3fc11d3e | 15230 | |
85541719 DE |
15231 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
15232 | TK_LIBRARY=${TK_LIB_SPEC} | |
15233 | TK_DEPS="" | |
15234 | else | |
15235 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
15236 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
15237 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
15238 | fi | |
3fc11d3e JM |
15239 | |
15240 | ||
3fc11d3e JM |
15241 | |
15242 | ||
3fc11d3e | 15243 | |
85541719 | 15244 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 15245 | |
85541719 DE |
15246 | # Include some libraries that Tcl and Tk want. |
15247 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
15248 | # Yes, the ordering seems wrong here. But it isn't. | |
15249 | # TK_LIBS is the list of libraries that need to be linked | |
15250 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
15251 | # were in LIBS then any link tests after this point would | |
15252 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
15253 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 15254 | |
85541719 DE |
15255 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
15256 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
15257 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
15258 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
15259 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
15260 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
15261 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 15262 | |
85541719 DE |
15263 | if test x$gdb_cv_os_cygwin = xyes; then |
15264 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
15265 | WIN32LDAPP="-Wl,--subsystem,console" | |
15266 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 15267 | fi |
ffc6a242 | 15268 | |
81ecdfbb | 15269 | subdirs="$subdirs gdbtk" |
3ace7edb | 15270 | |
85541719 | 15271 | fi |
3fc11d3e JM |
15272 | fi |
15273 | ||
15274 | ||
15275 | ||
15276 | ||
15277 | ||
15278 | ||
15279 | ||
15280 | ||
81ecdfbb RW |
15281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
15282 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 15283 | |
c906108c | 15284 | |
81ecdfbb RW |
15285 | # Check whether --with-x was given. |
15286 | if test "${with_x+set}" = set; then : | |
15287 | withval=$with_x; | |
15288 | fi | |
c906108c SS |
15289 | |
15290 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
15291 | if test "x$with_x" = xno; then | |
15292 | # The user explicitly disabled X. | |
15293 | have_x=disabled | |
15294 | else | |
81ecdfbb RW |
15295 | case $x_includes,$x_libraries in #( |
15296 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
15297 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
15298 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
15299 | else |
15300 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 15301 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 15302 | rm -f -r conftest.dir |
bec39cab AC |
15303 | if mkdir conftest.dir; then |
15304 | cd conftest.dir | |
bec39cab | 15305 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
15306 | incroot: |
15307 | @echo incroot='${INCROOT}' | |
15308 | usrlibdir: | |
15309 | @echo usrlibdir='${USRLIBDIR}' | |
15310 | libdir: | |
15311 | @echo libdir='${LIBDIR}' | |
15312 | _ACEOF | |
15313 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 15314 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
15315 | for ac_var in incroot usrlibdir libdir; do |
15316 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
15317 | done | |
c906108c | 15318 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
15319 | for ac_extension in a so sl dylib la dll; do |
15320 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
15321 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 15322 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
15323 | fi |
15324 | done | |
15325 | # Screen out bogus values from the imake configuration. They are | |
15326 | # bogus both because they are the default anyway, and because | |
15327 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 15328 | case $ac_im_incroot in |
81ecdfbb | 15329 | /usr/include) ac_x_includes= ;; |
bec39cab | 15330 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 15331 | esac |
bec39cab | 15332 | case $ac_im_usrlibdir in |
81ecdfbb | 15333 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 15334 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
15335 | esac |
15336 | fi | |
15337 | cd .. | |
81ecdfbb | 15338 | rm -f -r conftest.dir |
c906108c SS |
15339 | fi |
15340 | ||
bec39cab AC |
15341 | # Standard set of common directories for X headers. |
15342 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
15343 | ac_x_header_dirs=' | |
15344 | /usr/X11/include | |
81ecdfbb | 15345 | /usr/X11R7/include |
bec39cab AC |
15346 | /usr/X11R6/include |
15347 | /usr/X11R5/include | |
15348 | /usr/X11R4/include | |
15349 | ||
15350 | /usr/include/X11 | |
81ecdfbb | 15351 | /usr/include/X11R7 |
bec39cab AC |
15352 | /usr/include/X11R6 |
15353 | /usr/include/X11R5 | |
15354 | /usr/include/X11R4 | |
15355 | ||
15356 | /usr/local/X11/include | |
81ecdfbb | 15357 | /usr/local/X11R7/include |
bec39cab AC |
15358 | /usr/local/X11R6/include |
15359 | /usr/local/X11R5/include | |
15360 | /usr/local/X11R4/include | |
15361 | ||
15362 | /usr/local/include/X11 | |
81ecdfbb | 15363 | /usr/local/include/X11R7 |
bec39cab AC |
15364 | /usr/local/include/X11R6 |
15365 | /usr/local/include/X11R5 | |
15366 | /usr/local/include/X11R4 | |
15367 | ||
15368 | /usr/X386/include | |
15369 | /usr/x386/include | |
15370 | /usr/XFree86/include/X11 | |
15371 | ||
15372 | /usr/include | |
15373 | /usr/local/include | |
15374 | /usr/unsupported/include | |
15375 | /usr/athena/include | |
15376 | /usr/local/x11r5/include | |
15377 | /usr/lpp/Xamples/include | |
15378 | ||
15379 | /usr/openwin/include | |
15380 | /usr/openwin/share/include' | |
15381 | ||
15382 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 15383 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 15384 | # First, try using that file with no special directory specified. |
81ecdfbb | 15385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15386 | /* end confdefs.h. */ |
81ecdfbb | 15387 | #include <X11/Xlib.h> |
bec39cab | 15388 | _ACEOF |
81ecdfbb | 15389 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
15390 | # We can compile using X headers with no special include directory. |
15391 | ac_x_includes= | |
15392 | else | |
bec39cab | 15393 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 15394 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
15395 | ac_x_includes=$ac_dir |
15396 | break | |
15397 | fi | |
15398 | done | |
c906108c | 15399 | fi |
bec39cab AC |
15400 | rm -f conftest.err conftest.$ac_ext |
15401 | fi # $ac_x_includes = no | |
c906108c | 15402 | |
bec39cab | 15403 | if test "$ac_x_libraries" = no; then |
c906108c | 15404 | # Check for the libraries. |
c906108c SS |
15405 | # See if we find them without any special options. |
15406 | # Don't add to $LIBS permanently. | |
bec39cab | 15407 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
15408 | LIBS="-lX11 $LIBS" |
15409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15410 | /* end confdefs.h. */ |
81ecdfbb | 15411 | #include <X11/Xlib.h> |
bec39cab AC |
15412 | int |
15413 | main () | |
15414 | { | |
81ecdfbb | 15415 | XrmInitialize () |
bec39cab AC |
15416 | ; |
15417 | return 0; | |
15418 | } | |
15419 | _ACEOF | |
81ecdfbb | 15420 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15421 | LIBS=$ac_save_LIBS |
c906108c SS |
15422 | # We can link X programs with no special library path. |
15423 | ac_x_libraries= | |
15424 | else | |
81ecdfbb RW |
15425 | LIBS=$ac_save_LIBS |
15426 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 15427 | do |
bec39cab | 15428 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
15429 | for ac_extension in a so sl dylib la dll; do |
15430 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
15431 | ac_x_libraries=$ac_dir |
15432 | break 2 | |
15433 | fi | |
15434 | done | |
15435 | done | |
15436 | fi | |
81ecdfbb RW |
15437 | rm -f core conftest.err conftest.$ac_objext \ |
15438 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 15439 | fi # $ac_x_libraries = no |
c906108c | 15440 | |
81ecdfbb RW |
15441 | case $ac_x_includes,$ac_x_libraries in #( |
15442 | no,* | *,no | *\'*) | |
15443 | # Didn't find X, or a directory has "'" in its name. | |
15444 | ac_cv_have_x="have_x=no";; #( | |
15445 | *) | |
15446 | # Record where we found X for the cache. | |
15447 | ac_cv_have_x="have_x=yes\ | |
15448 | ac_x_includes='$ac_x_includes'\ | |
15449 | ac_x_libraries='$ac_x_libraries'" | |
15450 | esac | |
c906108c | 15451 | fi |
81ecdfbb RW |
15452 | ;; #( |
15453 | *) have_x=yes;; | |
15454 | esac | |
c906108c SS |
15455 | eval "$ac_cv_have_x" |
15456 | fi # $with_x != no | |
15457 | ||
15458 | if test "$have_x" != yes; then | |
81ecdfbb RW |
15459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
15460 | $as_echo "$have_x" >&6; } | |
c906108c SS |
15461 | no_x=yes |
15462 | else | |
15463 | # If each of the values was on the command line, it overrides each guess. | |
15464 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
15465 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
15466 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
15467 | ac_cv_have_x="have_x=yes\ |
15468 | ac_x_includes='$x_includes'\ | |
15469 | ac_x_libraries='$x_libraries'" | |
15470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
15471 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
15472 | fi |
15473 | ||
15474 | ||
bec39cab | 15475 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 15476 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
15477 | # This code just checks for a few cases where we'd like to ignore those |
15478 | # definitions, even when they're present in the '.mt' file. These cases | |
15479 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 15480 | # not part of the source tree. |
7a292a7a | 15481 | # |
81ecdfbb RW |
15482 | # Check whether --enable-sim was given. |
15483 | if test "${enable_sim+set}" = set; then : | |
15484 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
15485 | echo "enableval = ${enableval}"; |
15486 | case "${enableval}" in | |
15487 | yes) ignore_sim=false ;; | |
15488 | no) ignore_sim=true ;; | |
15489 | *) ignore_sim=false ;; | |
15490 | esac | |
15491 | else | |
15492 | ignore_sim=false | |
81ecdfbb RW |
15493 | fi |
15494 | ||
7a292a7a SS |
15495 | |
15496 | if test ! -d "${srcdir}/../sim"; then | |
15497 | ignore_sim=true | |
15498 | fi | |
15499 | ||
9b624dbe UW |
15500 | SIM= |
15501 | SIM_OBS= | |
15502 | if test "${ignore_sim}" = "false"; then | |
15503 | if test x"${gdb_sim}" != x ; then | |
15504 | SIM="${gdb_sim}" | |
15505 | SIM_OBS="remote-sim.o" | |
60ca704f | 15506 | |
81ecdfbb | 15507 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 15508 | |
9b624dbe | 15509 | fi |
7a292a7a SS |
15510 | fi |
15511 | ||
15512 | ||
15513 | ||
c906108c SS |
15514 | |
15515 | ||
15516 | ||
15517 | ||
15518 | ||
15519 | ||
dfcd3bfb | 15520 | |
e56ac5c3 AC |
15521 | |
15522 | ||
b3a90332 AC |
15523 | |
15524 | ||
c35f4ffc | 15525 | # List of host floatformats. |
bec39cab AC |
15526 | |
15527 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15528 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 15529 | _ACEOF |
c35f4ffc | 15530 | |
bec39cab AC |
15531 | |
15532 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15533 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
15534 | _ACEOF |
15535 | ||
c35f4ffc | 15536 | |
bec39cab | 15537 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 15538 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 15539 | _ACEOF |
c35f4ffc AC |
15540 | |
15541 | ||
c906108c SS |
15542 | # target_subdir is used by the testsuite to find the target libraries. |
15543 | target_subdir= | |
15544 | if test "${host}" != "${target}"; then | |
15545 | target_subdir="${target_alias}/" | |
15546 | fi | |
15547 | ||
15548 | ||
15549 | frags= | |
771b4502 | 15550 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
15551 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
15552 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 15553 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
15554 | fi |
15555 | frags="$frags $host_makefile_frag" | |
15556 | else | |
15557 | host_makefile_frag=/dev/null | |
c906108c | 15558 | fi |
c906108c | 15559 | |
c906108c SS |
15560 | |
15561 | ||
15562 | ||
771b4502 | 15563 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
15564 | # We pick this up from the host configuration file (.mh) because we |
15565 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
15566 | nativefile=`sed -n ' |
15567 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
15568 | ' ${host_makefile_frag}` | |
c906108c SS |
15569 | fi |
15570 | ||
15571 | ||
b00a8037 | 15572 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
15573 | |
15574 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 15575 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 15576 | _ACEOF |
b00a8037 DJ |
15577 | |
15578 | fi | |
15579 | ||
8dcde887 | 15580 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
15581 | # Check whether --enable-multi-ice was given. |
15582 | if test "${enable_multi_ice+set}" = set; then : | |
15583 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
15584 | yes | no) |
15585 | ;; | |
81ecdfbb | 15586 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 15587 | esac |
81ecdfbb | 15588 | fi |
b4e70030 | 15589 | |
81ecdfbb RW |
15590 | if test "x$enable_multi_ice" = xyes; then |
15591 | subdirs="$subdirs multi-ice" | |
3ace7edb | 15592 | |
a85f51e7 DJ |
15593 | fi |
15594 | ||
496c0e1b JB |
15595 | # Check whether --enable-gdbserver was given. |
15596 | if test "${enable_gdbserver+set}" = set; then : | |
15597 | enableval=$enable_gdbserver; case "${enableval}" in | |
15598 | yes| no|auto) ;; | |
15599 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
15600 | esac | |
15601 | else | |
15602 | enable_gdbserver=auto | |
15603 | fi | |
15604 | ||
15605 | ||
15606 | # We only build gdbserver automatically in a native configuration, and | |
15607 | # only if the user did not explicitly disable its build. | |
15608 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
15609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
15610 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 15611 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
15612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
15613 | $as_echo "yes" >&6; } | |
15614 | subdirs="$subdirs gdbserver" | |
3ace7edb | 15615 | |
496c0e1b | 15616 | gdbserver_build_enabled=yes |
8dcde887 | 15617 | else |
81ecdfbb RW |
15618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
15619 | $as_echo "no" >&6; } | |
8dcde887 MK |
15620 | fi |
15621 | fi | |
15622 | ||
496c0e1b JB |
15623 | # If the user explicitly request the gdbserver to be built, verify that |
15624 | # we were in fact able to enable it. | |
15625 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
15626 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
15627 | fi | |
15628 | ||
393fd4c3 YQ |
15629 | # Check for babeltrace and babeltrace-ctf |
15630 | ||
15631 | # Check whether --with-babeltrace was given. | |
15632 | if test "${with_babeltrace+set}" = set; then : | |
15633 | withval=$with_babeltrace; | |
15634 | else | |
15635 | with_babeltrace=auto | |
15636 | fi | |
15637 | ||
15638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
15639 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
15640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
15641 | $as_echo "$with_babeltrace" >&6; } | |
15642 | ||
15643 | if test "x$with_babeltrace" = "xno"; then | |
15644 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
15645 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
15646 | else | |
15647 | # Append -Werror to CFLAGS so that configure can catch the warning | |
15648 | # "assignment from incompatible pointer type", which is related to | |
15649 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
15650 | # in GDB, while babeltrace 1.0.3 is broken. | |
15651 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
15652 | # safe to save and restore CFLAGS here. | |
15653 | saved_CFLAGS=$CFLAGS | |
15654 | CFLAGS="$CFLAGS -Werror" | |
15655 | ||
15656 | ||
15657 | ||
15658 | ||
15659 | ||
15660 | ||
15661 | ||
15662 | ||
15663 | use_additional=yes | |
15664 | ||
15665 | acl_save_prefix="$prefix" | |
15666 | prefix="$acl_final_prefix" | |
15667 | acl_save_exec_prefix="$exec_prefix" | |
15668 | exec_prefix="$acl_final_exec_prefix" | |
15669 | ||
15670 | eval additional_includedir=\"$includedir\" | |
15671 | eval additional_libdir=\"$libdir\" | |
15672 | ||
15673 | exec_prefix="$acl_save_exec_prefix" | |
15674 | prefix="$acl_save_prefix" | |
15675 | ||
15676 | ||
15677 | # Check whether --with-libbabeltrace-prefix was given. | |
15678 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
15679 | withval=$with_libbabeltrace_prefix; | |
15680 | if test "X$withval" = "Xno"; then | |
15681 | use_additional=no | |
15682 | else | |
15683 | if test "X$withval" = "X"; then | |
15684 | ||
15685 | acl_save_prefix="$prefix" | |
15686 | prefix="$acl_final_prefix" | |
15687 | acl_save_exec_prefix="$exec_prefix" | |
15688 | exec_prefix="$acl_final_exec_prefix" | |
15689 | ||
15690 | eval additional_includedir=\"$includedir\" | |
15691 | eval additional_libdir=\"$libdir\" | |
15692 | ||
15693 | exec_prefix="$acl_save_exec_prefix" | |
15694 | prefix="$acl_save_prefix" | |
15695 | ||
15696 | else | |
15697 | additional_includedir="$withval/include" | |
15698 | additional_libdir="$withval/lib" | |
15699 | fi | |
15700 | fi | |
15701 | ||
15702 | fi | |
15703 | ||
15704 | LIBBABELTRACE= | |
15705 | LTLIBBABELTRACE= | |
15706 | INCBABELTRACE= | |
15707 | rpathdirs= | |
15708 | ltrpathdirs= | |
15709 | names_already_handled= | |
15710 | names_next_round='babeltrace babeltrace-ctf' | |
15711 | while test -n "$names_next_round"; do | |
15712 | names_this_round="$names_next_round" | |
15713 | names_next_round= | |
15714 | for name in $names_this_round; do | |
15715 | already_handled= | |
15716 | for n in $names_already_handled; do | |
15717 | if test "$n" = "$name"; then | |
15718 | already_handled=yes | |
15719 | break | |
15720 | fi | |
15721 | done | |
15722 | if test -z "$already_handled"; then | |
15723 | names_already_handled="$names_already_handled $name" | |
15724 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
15725 | eval value=\"\$HAVE_LIB$uppername\" | |
15726 | if test -n "$value"; then | |
15727 | if test "$value" = yes; then | |
15728 | eval value=\"\$LIB$uppername\" | |
15729 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
15730 | eval value=\"\$LTLIB$uppername\" | |
15731 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
15732 | else | |
15733 | : | |
15734 | fi | |
15735 | else | |
15736 | found_dir= | |
15737 | found_la= | |
15738 | found_so= | |
15739 | found_a= | |
15740 | if test $use_additional = yes; then | |
15741 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
15742 | found_dir="$additional_libdir" | |
15743 | found_so="$additional_libdir/lib$name.$shlibext" | |
15744 | if test -f "$additional_libdir/lib$name.la"; then | |
15745 | found_la="$additional_libdir/lib$name.la" | |
15746 | fi | |
15747 | else | |
15748 | if test -f "$additional_libdir/lib$name.$libext"; then | |
15749 | found_dir="$additional_libdir" | |
15750 | found_a="$additional_libdir/lib$name.$libext" | |
15751 | if test -f "$additional_libdir/lib$name.la"; then | |
15752 | found_la="$additional_libdir/lib$name.la" | |
15753 | fi | |
15754 | fi | |
15755 | fi | |
15756 | fi | |
15757 | if test "X$found_dir" = "X"; then | |
15758 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
15759 | ||
15760 | acl_save_prefix="$prefix" | |
15761 | prefix="$acl_final_prefix" | |
15762 | acl_save_exec_prefix="$exec_prefix" | |
15763 | exec_prefix="$acl_final_exec_prefix" | |
15764 | eval x=\"$x\" | |
15765 | exec_prefix="$acl_save_exec_prefix" | |
15766 | prefix="$acl_save_prefix" | |
15767 | ||
15768 | case "$x" in | |
15769 | -L*) | |
15770 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
15771 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
15772 | found_dir="$dir" | |
15773 | found_so="$dir/lib$name.$shlibext" | |
15774 | if test -f "$dir/lib$name.la"; then | |
15775 | found_la="$dir/lib$name.la" | |
15776 | fi | |
15777 | else | |
15778 | if test -f "$dir/lib$name.$libext"; then | |
15779 | found_dir="$dir" | |
15780 | found_a="$dir/lib$name.$libext" | |
15781 | if test -f "$dir/lib$name.la"; then | |
15782 | found_la="$dir/lib$name.la" | |
15783 | fi | |
15784 | fi | |
15785 | fi | |
15786 | ;; | |
15787 | esac | |
15788 | if test "X$found_dir" != "X"; then | |
15789 | break | |
15790 | fi | |
15791 | done | |
15792 | fi | |
15793 | if test "X$found_dir" != "X"; then | |
15794 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
15795 | if test "X$found_so" != "X"; then | |
15796 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
15797 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
15798 | else | |
15799 | haveit= | |
15800 | for x in $ltrpathdirs; do | |
15801 | if test "X$x" = "X$found_dir"; then | |
15802 | haveit=yes | |
15803 | break | |
15804 | fi | |
15805 | done | |
15806 | if test -z "$haveit"; then | |
15807 | ltrpathdirs="$ltrpathdirs $found_dir" | |
15808 | fi | |
15809 | if test "$hardcode_direct" = yes; then | |
15810 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
15811 | else | |
15812 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
15813 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
15814 | haveit= | |
15815 | for x in $rpathdirs; do | |
15816 | if test "X$x" = "X$found_dir"; then | |
15817 | haveit=yes | |
15818 | break | |
15819 | fi | |
15820 | done | |
15821 | if test -z "$haveit"; then | |
15822 | rpathdirs="$rpathdirs $found_dir" | |
15823 | fi | |
15824 | else | |
15825 | haveit= | |
15826 | for x in $LDFLAGS $LIBBABELTRACE; do | |
15827 | ||
15828 | acl_save_prefix="$prefix" | |
15829 | prefix="$acl_final_prefix" | |
15830 | acl_save_exec_prefix="$exec_prefix" | |
15831 | exec_prefix="$acl_final_exec_prefix" | |
15832 | eval x=\"$x\" | |
15833 | exec_prefix="$acl_save_exec_prefix" | |
15834 | prefix="$acl_save_prefix" | |
15835 | ||
15836 | if test "X$x" = "X-L$found_dir"; then | |
15837 | haveit=yes | |
15838 | break | |
15839 | fi | |
15840 | done | |
15841 | if test -z "$haveit"; then | |
15842 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
15843 | fi | |
15844 | if test "$hardcode_minus_L" != no; then | |
15845 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
15846 | else | |
15847 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
15848 | fi | |
15849 | fi | |
15850 | fi | |
15851 | fi | |
15852 | else | |
15853 | if test "X$found_a" != "X"; then | |
15854 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
15855 | else | |
15856 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
15857 | fi | |
15858 | fi | |
15859 | additional_includedir= | |
15860 | case "$found_dir" in | |
15861 | */lib | */lib/) | |
15862 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
15863 | additional_includedir="$basedir/include" | |
15864 | ;; | |
15865 | esac | |
15866 | if test "X$additional_includedir" != "X"; then | |
15867 | if test "X$additional_includedir" != "X/usr/include"; then | |
15868 | haveit= | |
15869 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
15870 | if test -n "$GCC"; then | |
15871 | case $host_os in | |
15872 | linux*) haveit=yes;; | |
15873 | esac | |
15874 | fi | |
15875 | fi | |
15876 | if test -z "$haveit"; then | |
15877 | for x in $CPPFLAGS $INCBABELTRACE; do | |
15878 | ||
15879 | acl_save_prefix="$prefix" | |
15880 | prefix="$acl_final_prefix" | |
15881 | acl_save_exec_prefix="$exec_prefix" | |
15882 | exec_prefix="$acl_final_exec_prefix" | |
15883 | eval x=\"$x\" | |
15884 | exec_prefix="$acl_save_exec_prefix" | |
15885 | prefix="$acl_save_prefix" | |
15886 | ||
15887 | if test "X$x" = "X-I$additional_includedir"; then | |
15888 | haveit=yes | |
15889 | break | |
15890 | fi | |
15891 | done | |
15892 | if test -z "$haveit"; then | |
15893 | if test -d "$additional_includedir"; then | |
15894 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
15895 | fi | |
15896 | fi | |
15897 | fi | |
15898 | fi | |
15899 | fi | |
15900 | if test -n "$found_la"; then | |
15901 | save_libdir="$libdir" | |
15902 | case "$found_la" in | |
15903 | */* | *\\*) . "$found_la" ;; | |
15904 | *) . "./$found_la" ;; | |
15905 | esac | |
15906 | libdir="$save_libdir" | |
15907 | for dep in $dependency_libs; do | |
15908 | case "$dep" in | |
15909 | -L*) | |
15910 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15911 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15912 | haveit= | |
15913 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15914 | if test -n "$GCC"; then | |
15915 | case $host_os in | |
15916 | linux*) haveit=yes;; | |
15917 | esac | |
15918 | fi | |
15919 | fi | |
15920 | if test -z "$haveit"; then | |
15921 | haveit= | |
15922 | for x in $LDFLAGS $LIBBABELTRACE; do | |
15923 | ||
15924 | acl_save_prefix="$prefix" | |
15925 | prefix="$acl_final_prefix" | |
15926 | acl_save_exec_prefix="$exec_prefix" | |
15927 | exec_prefix="$acl_final_exec_prefix" | |
15928 | eval x=\"$x\" | |
15929 | exec_prefix="$acl_save_exec_prefix" | |
15930 | prefix="$acl_save_prefix" | |
15931 | ||
15932 | if test "X$x" = "X-L$additional_libdir"; then | |
15933 | haveit=yes | |
15934 | break | |
15935 | fi | |
15936 | done | |
15937 | if test -z "$haveit"; then | |
15938 | if test -d "$additional_libdir"; then | |
15939 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
15940 | fi | |
15941 | fi | |
15942 | haveit= | |
15943 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
15944 | ||
15945 | acl_save_prefix="$prefix" | |
15946 | prefix="$acl_final_prefix" | |
15947 | acl_save_exec_prefix="$exec_prefix" | |
15948 | exec_prefix="$acl_final_exec_prefix" | |
15949 | eval x=\"$x\" | |
15950 | exec_prefix="$acl_save_exec_prefix" | |
15951 | prefix="$acl_save_prefix" | |
15952 | ||
15953 | if test "X$x" = "X-L$additional_libdir"; then | |
15954 | haveit=yes | |
15955 | break | |
15956 | fi | |
15957 | done | |
15958 | if test -z "$haveit"; then | |
15959 | if test -d "$additional_libdir"; then | |
15960 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
15961 | fi | |
15962 | fi | |
15963 | fi | |
15964 | fi | |
15965 | ;; | |
15966 | -R*) | |
15967 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
15968 | if test "$enable_rpath" != no; then | |
15969 | haveit= | |
15970 | for x in $rpathdirs; do | |
15971 | if test "X$x" = "X$dir"; then | |
15972 | haveit=yes | |
15973 | break | |
15974 | fi | |
15975 | done | |
15976 | if test -z "$haveit"; then | |
15977 | rpathdirs="$rpathdirs $dir" | |
15978 | fi | |
15979 | haveit= | |
15980 | for x in $ltrpathdirs; do | |
15981 | if test "X$x" = "X$dir"; then | |
15982 | haveit=yes | |
15983 | break | |
15984 | fi | |
15985 | done | |
15986 | if test -z "$haveit"; then | |
15987 | ltrpathdirs="$ltrpathdirs $dir" | |
15988 | fi | |
15989 | fi | |
15990 | ;; | |
15991 | -l*) | |
15992 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
15993 | ;; | |
15994 | *.la) | |
15995 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
15996 | ;; | |
15997 | *) | |
15998 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
15999 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
16000 | ;; | |
16001 | esac | |
16002 | done | |
16003 | fi | |
16004 | else | |
16005 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
16006 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
16007 | fi | |
16008 | fi | |
16009 | fi | |
16010 | done | |
16011 | done | |
16012 | if test "X$rpathdirs" != "X"; then | |
16013 | if test -n "$hardcode_libdir_separator"; then | |
16014 | alldirs= | |
16015 | for found_dir in $rpathdirs; do | |
16016 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
16017 | done | |
16018 | acl_save_libdir="$libdir" | |
16019 | libdir="$alldirs" | |
16020 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16021 | libdir="$acl_save_libdir" | |
16022 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
16023 | else | |
16024 | for found_dir in $rpathdirs; do | |
16025 | acl_save_libdir="$libdir" | |
16026 | libdir="$found_dir" | |
16027 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16028 | libdir="$acl_save_libdir" | |
16029 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
16030 | done | |
16031 | fi | |
16032 | fi | |
16033 | if test "X$ltrpathdirs" != "X"; then | |
16034 | for found_dir in $ltrpathdirs; do | |
16035 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
16036 | done | |
16037 | fi | |
16038 | ||
16039 | ||
16040 | ac_save_CPPFLAGS="$CPPFLAGS" | |
16041 | ||
16042 | for element in $INCBABELTRACE; do | |
16043 | haveit= | |
16044 | for x in $CPPFLAGS; do | |
16045 | ||
16046 | acl_save_prefix="$prefix" | |
16047 | prefix="$acl_final_prefix" | |
16048 | acl_save_exec_prefix="$exec_prefix" | |
16049 | exec_prefix="$acl_final_exec_prefix" | |
16050 | eval x=\"$x\" | |
16051 | exec_prefix="$acl_save_exec_prefix" | |
16052 | prefix="$acl_save_prefix" | |
16053 | ||
16054 | if test "X$x" = "X$element"; then | |
16055 | haveit=yes | |
16056 | break | |
16057 | fi | |
16058 | done | |
16059 | if test -z "$haveit"; then | |
16060 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
16061 | fi | |
16062 | done | |
16063 | ||
16064 | ||
16065 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
16066 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
16067 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
16068 | $as_echo_n "(cached) " >&6 | |
16069 | else | |
16070 | ||
16071 | ac_save_LIBS="$LIBS" | |
16072 | LIBS="$LIBS $LIBBABELTRACE" | |
16073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16074 | /* end confdefs.h. */ | |
16075 | #include <babeltrace/babeltrace.h> | |
16076 | #include <babeltrace/ctf/events.h> | |
16077 | #include <babeltrace/ctf/iterator.h> | |
16078 | int | |
16079 | main () | |
16080 | { | |
16081 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
16082 | struct bt_ctf_event *event = NULL; | |
16083 | const struct bt_definition *scope; | |
16084 | ||
65c749e7 | 16085 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
16086 | scope = bt_ctf_get_top_level_scope (event, |
16087 | BT_STREAM_EVENT_HEADER); | |
16088 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
16089 | ||
16090 | ; | |
16091 | return 0; | |
16092 | } | |
16093 | _ACEOF | |
16094 | if ac_fn_c_try_link "$LINENO"; then : | |
16095 | ac_cv_libbabeltrace=yes | |
16096 | else | |
16097 | ac_cv_libbabeltrace=no | |
16098 | fi | |
16099 | rm -f core conftest.err conftest.$ac_objext \ | |
16100 | conftest$ac_exeext conftest.$ac_ext | |
16101 | LIBS="$ac_save_LIBS" | |
16102 | ||
16103 | fi | |
16104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
16105 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
16106 | if test "$ac_cv_libbabeltrace" = yes; then | |
16107 | HAVE_LIBBABELTRACE=yes | |
16108 | ||
16109 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
16110 | ||
16111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
16112 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
16113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
16114 | $as_echo "$LIBBABELTRACE" >&6; } | |
16115 | else | |
16116 | HAVE_LIBBABELTRACE=no | |
16117 | CPPFLAGS="$ac_save_CPPFLAGS" | |
16118 | LIBBABELTRACE= | |
16119 | LTLIBBABELTRACE= | |
16120 | fi | |
16121 | ||
16122 | ||
16123 | ||
16124 | ||
16125 | ||
16126 | ||
16127 | CFLAGS=$saved_CFLAGS | |
16128 | ||
16129 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
16130 | if test "$with_babeltrace" = yes; then | |
16131 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
16132 | else | |
16133 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
16134 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
16135 | fi | |
16136 | fi | |
16137 | fi | |
16138 | ||
db985757 | 16139 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 16140 | # to an empty version. |
c906108c SS |
16141 | |
16142 | files= | |
16143 | links= | |
5a2402b8 | 16144 | |
c906108c SS |
16145 | rm -f nm.h |
16146 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
16147 | case "${nativefile}" in |
16148 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
16149 | * ) GDB_NM_FILE="${nativefile}" | |
16150 | esac | |
5a2402b8 AC |
16151 | files="${files} ${GDB_NM_FILE}" |
16152 | links="${links} nm.h" | |
60ca704f SE |
16153 | |
16154 | cat >>confdefs.h <<_ACEOF | |
b78960be | 16155 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 16156 | _ACEOF |
5a2402b8 | 16157 | |
c906108c | 16158 | fi |
5a2402b8 AC |
16159 | |
16160 | ||
bec39cab AC |
16161 | ac_sources="$files" |
16162 | ac_dests="$links" | |
16163 | while test -n "$ac_sources"; do | |
16164 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
16165 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
16166 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
16167 | done | |
81ecdfbb | 16168 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
16169 | |
16170 | ||
c906108c SS |
16171 | |
16172 | ||
c906108c | 16173 | |
81ecdfbb | 16174 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 16175 | |
bec39cab | 16176 | |
b292c783 | 16177 | |
f6a88844 JM |
16178 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
16179 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
16180 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
16181 | GDB_TRANSFORM_NAME=gdb | |
16182 | fi | |
16183 | ||
16184 | ||
16185 | ||
16186 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
16187 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
16188 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
16189 | GCORE_TRANSFORM_NAME=gcore | |
16190 | fi | |
16191 | ||
b292c783 JK |
16192 | |
16193 | ac_config_files="$ac_config_files gcore" | |
16194 | ||
16195 | ||
c971b7fa | 16196 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
16197 | |
16198 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 16199 | |
bec39cab AC |
16200 | cat >confcache <<\_ACEOF |
16201 | # This file is a shell script that caches the results of configure | |
16202 | # tests run on this system so they can be shared between configure | |
16203 | # scripts and configure runs, see configure's option --config-cache. | |
16204 | # It is not useful on other systems. If it contains results you don't | |
16205 | # want to keep, you may remove or edit it. | |
16206 | # | |
16207 | # config.status only pays attention to the cache file if you give it | |
16208 | # the --recheck option to rerun configure. | |
16209 | # | |
16210 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
16211 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16212 | # following values. | |
16213 | ||
16214 | _ACEOF | |
16215 | ||
16216 | # The following way of writing the cache mishandles newlines in values, | |
16217 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 16218 | # So, we kill variables containing newlines. |
bec39cab AC |
16219 | # Ultrix sh set writes to stderr and can't be redirected directly, |
16220 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
16221 | ( |
16222 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
16223 | eval ac_val=\$$ac_var | |
16224 | case $ac_val in #( | |
16225 | *${as_nl}*) | |
16226 | case $ac_var in #( | |
16227 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
16228 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
16229 | esac | |
16230 | case $ac_var in #( | |
16231 | _ | IFS | as_nl) ;; #( | |
16232 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
16233 | *) { eval $ac_var=; unset $ac_var;} ;; | |
16234 | esac ;; | |
16235 | esac | |
16236 | done | |
16237 | ||
bec39cab | 16238 | (set) 2>&1 | |
81ecdfbb RW |
16239 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
16240 | *${as_nl}ac_space=\ *) | |
16241 | # `set' does not quote correctly, so add quotes: double-quote | |
16242 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
16243 | sed -n \ |
16244 | "s/'/'\\\\''/g; | |
16245 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 16246 | ;; #( |
bec39cab AC |
16247 | *) |
16248 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 16249 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 16250 | ;; |
81ecdfbb RW |
16251 | esac | |
16252 | sort | |
16253 | ) | | |
bec39cab | 16254 | sed ' |
81ecdfbb | 16255 | /^ac_cv_env_/b end |
bec39cab | 16256 | t clear |
81ecdfbb | 16257 | :clear |
bec39cab AC |
16258 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
16259 | t end | |
81ecdfbb RW |
16260 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
16261 | :end' >>confcache | |
16262 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
16263 | if test -w "$cache_file"; then | |
16264 | test "x$cache_file" != "x/dev/null" && | |
16265 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
16266 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
16267 | cat confcache >$cache_file |
16268 | else | |
81ecdfbb RW |
16269 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
16270 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
16271 | fi |
16272 | fi | |
16273 | rm -f confcache | |
16274 | ||
16275 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16276 | # Let make expand exec_prefix. | |
16277 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16278 | ||
bec39cab AC |
16279 | DEFS=-DHAVE_CONFIG_H |
16280 | ||
16281 | ac_libobjs= | |
16282 | ac_ltlibobjs= | |
16283 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16284 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
16285 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
16286 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
16287 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
16288 | # will be set to the directory where LIBOBJS objects are built. | |
16289 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
16290 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
16291 | done |
16292 | LIBOBJS=$ac_libobjs | |
16293 | ||
16294 | LTLIBOBJS=$ac_ltlibobjs | |
16295 | ||
16296 | ||
85981d60 | 16297 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
16298 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
16299 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 16300 | fi |
a417dc56 | 16301 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
16302 | as_fn_error "conditional \"GMAKE\" was never defined. |
16303 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 16304 | fi |
4df42755 DE |
16305 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
16306 | as_fn_error "conditional \"HAVE_PYTHON\" was never defined. | |
16307 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
16308 | fi | |
16309 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
16310 | as_fn_error "conditional \"HAVE_GUILE\" was never defined. | |
16311 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
16312 | fi | |
81ecdfbb RW |
16313 | |
16314 | ||
bec39cab | 16315 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 16316 | ac_write_fail=0 |
bec39cab AC |
16317 | ac_clean_files_save=$ac_clean_files |
16318 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
16319 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
16320 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16321 | as_write_fail=0 | |
16322 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
16323 | #! $SHELL |
16324 | # Generated by $as_me. | |
16325 | # Run this file to recreate the current configuration. | |
16326 | # Compiler output produced by configure, useful for debugging | |
16327 | # configure, is in config.log if it exists. | |
16328 | ||
16329 | debug=false | |
16330 | ac_cs_recheck=false | |
16331 | ac_cs_silent=false | |
bec39cab | 16332 | |
81ecdfbb RW |
16333 | SHELL=\${CONFIG_SHELL-$SHELL} |
16334 | export SHELL | |
16335 | _ASEOF | |
16336 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
16337 | ## -------------------- ## | |
16338 | ## M4sh Initialization. ## | |
16339 | ## -------------------- ## | |
16340 | ||
16341 | # Be more Bourne compatible | |
16342 | DUALCASE=1; export DUALCASE # for MKS sh | |
16343 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
16344 | emulate sh |
16345 | NULLCMD=: | |
81ecdfbb | 16346 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
16347 | # is contrary to our usage. Disable this feature. |
16348 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
16349 | setopt NO_GLOB_SUBST |
16350 | else | |
16351 | case `(set -o) 2>/dev/null` in #( | |
16352 | *posix*) : | |
16353 | set -o posix ;; #( | |
16354 | *) : | |
16355 | ;; | |
16356 | esac | |
bec39cab | 16357 | fi |
bec39cab | 16358 | |
81ecdfbb RW |
16359 | |
16360 | as_nl=' | |
16361 | ' | |
16362 | export as_nl | |
16363 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
16364 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
16365 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
16366 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
16367 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
16368 | # but without wasting forks for bash or zsh. | |
16369 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
16370 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16371 | as_echo='print -r --' | |
16372 | as_echo_n='print -rn --' | |
16373 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16374 | as_echo='printf %s\n' | |
16375 | as_echo_n='printf %s' | |
16376 | else | |
16377 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
16378 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
16379 | as_echo_n='/usr/ucb/echo -n' | |
16380 | else | |
16381 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
16382 | as_echo_n_body='eval | |
16383 | arg=$1; | |
16384 | case $arg in #( | |
16385 | *"$as_nl"*) | |
16386 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
16387 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
16388 | esac; | |
16389 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
16390 | ' | |
16391 | export as_echo_n_body | |
16392 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
16393 | fi | |
16394 | export as_echo_body | |
16395 | as_echo='sh -c $as_echo_body as_echo' | |
16396 | fi | |
16397 | ||
16398 | # The user is always right. | |
16399 | if test "${PATH_SEPARATOR+set}" != set; then | |
16400 | PATH_SEPARATOR=: | |
16401 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
16402 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
16403 | PATH_SEPARATOR=';' | |
16404 | } | |
bec39cab AC |
16405 | fi |
16406 | ||
16407 | ||
81ecdfbb RW |
16408 | # IFS |
16409 | # We need space, tab and new line, in precisely that order. Quoting is | |
16410 | # there to prevent editors from complaining about space-tab. | |
16411 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
16412 | # splitting by setting IFS to empty value.) | |
16413 | IFS=" "" $as_nl" | |
16414 | ||
16415 | # Find who we are. Look in the path if we contain no directory separator. | |
16416 | case $0 in #(( | |
16417 | *[\\/]* ) as_myself=$0 ;; | |
16418 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16419 | for as_dir in $PATH | |
16420 | do | |
16421 | IFS=$as_save_IFS | |
16422 | test -z "$as_dir" && as_dir=. | |
16423 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16424 | done | |
16425 | IFS=$as_save_IFS | |
16426 | ||
16427 | ;; | |
16428 | esac | |
16429 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16430 | # in which case we are not to be found in the path. | |
16431 | if test "x$as_myself" = x; then | |
16432 | as_myself=$0 | |
16433 | fi | |
16434 | if test ! -f "$as_myself"; then | |
16435 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
16436 | exit 1 | |
16437 | fi | |
16438 | ||
16439 | # Unset variables that we do not need and which cause bugs (e.g. in | |
16440 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
16441 | # suppresses any "Segmentation fault" message there. '((' could | |
16442 | # trigger a bug in pdksh 5.2.14. | |
16443 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
16444 | do eval test x\${$as_var+set} = xset \ | |
16445 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
16446 | done | |
bec39cab AC |
16447 | PS1='$ ' |
16448 | PS2='> ' | |
16449 | PS4='+ ' | |
16450 | ||
16451 | # NLS nuisances. | |
81ecdfbb RW |
16452 | LC_ALL=C |
16453 | export LC_ALL | |
16454 | LANGUAGE=C | |
16455 | export LANGUAGE | |
16456 | ||
16457 | # CDPATH. | |
16458 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
16459 | ||
16460 | ||
16461 | # as_fn_error ERROR [LINENO LOG_FD] | |
16462 | # --------------------------------- | |
16463 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
16464 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
16465 | # script with status $?, using 1 if that was 0. | |
16466 | as_fn_error () | |
16467 | { | |
16468 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
16469 | if test "$3"; then | |
16470 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
16471 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
16472 | fi | |
16473 | $as_echo "$as_me: error: $1" >&2 | |
16474 | as_fn_exit $as_status | |
16475 | } # as_fn_error | |
16476 | ||
16477 | ||
16478 | # as_fn_set_status STATUS | |
16479 | # ----------------------- | |
16480 | # Set $? to STATUS, without forking. | |
16481 | as_fn_set_status () | |
16482 | { | |
16483 | return $1 | |
16484 | } # as_fn_set_status | |
16485 | ||
16486 | # as_fn_exit STATUS | |
16487 | # ----------------- | |
16488 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
16489 | as_fn_exit () | |
16490 | { | |
16491 | set +e | |
16492 | as_fn_set_status $1 | |
16493 | exit $1 | |
16494 | } # as_fn_exit | |
16495 | ||
16496 | # as_fn_unset VAR | |
16497 | # --------------- | |
16498 | # Portably unset VAR. | |
16499 | as_fn_unset () | |
16500 | { | |
16501 | { eval $1=; unset $1;} | |
16502 | } | |
16503 | as_unset=as_fn_unset | |
16504 | # as_fn_append VAR VALUE | |
16505 | # ---------------------- | |
16506 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
16507 | # advantage of any shell optimizations that allow amortized linear growth over | |
16508 | # repeated appends, instead of the typical quadratic growth present in naive | |
16509 | # implementations. | |
16510 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
16511 | eval 'as_fn_append () | |
16512 | { | |
16513 | eval $1+=\$2 | |
16514 | }' | |
16515 | else | |
16516 | as_fn_append () | |
16517 | { | |
16518 | eval $1=\$$1\$2 | |
16519 | } | |
16520 | fi # as_fn_append | |
16521 | ||
16522 | # as_fn_arith ARG... | |
16523 | # ------------------ | |
16524 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
16525 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
16526 | # must be portable across $(()) and expr. | |
16527 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
16528 | eval 'as_fn_arith () | |
16529 | { | |
16530 | as_val=$(( $* )) | |
16531 | }' | |
16532 | else | |
16533 | as_fn_arith () | |
16534 | { | |
16535 | as_val=`expr "$@" || test $? -eq 1` | |
16536 | } | |
16537 | fi # as_fn_arith | |
bec39cab | 16538 | |
81ecdfbb RW |
16539 | |
16540 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
16541 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
16542 | as_expr=expr |
16543 | else | |
16544 | as_expr=false | |
16545 | fi | |
16546 | ||
81ecdfbb | 16547 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
16548 | as_basename=basename |
16549 | else | |
16550 | as_basename=false | |
16551 | fi | |
16552 | ||
81ecdfbb RW |
16553 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
16554 | as_dirname=dirname | |
16555 | else | |
16556 | as_dirname=false | |
16557 | fi | |
bec39cab | 16558 | |
81ecdfbb | 16559 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
16560 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
16561 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16562 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
16563 | $as_echo X/"$0" | | |
16564 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
16565 | s//\1/ | |
16566 | q | |
16567 | } | |
16568 | /^X\/\(\/\/\)$/{ | |
16569 | s//\1/ | |
16570 | q | |
16571 | } | |
16572 | /^X\/\(\/\).*/{ | |
16573 | s//\1/ | |
16574 | q | |
16575 | } | |
16576 | s/.*/./; q'` | |
b4e70030 | 16577 | |
b4e70030 JB |
16578 | # Avoid depending upon Character Ranges. |
16579 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16580 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16581 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16582 | as_cr_digits='0123456789' | |
16583 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16584 | ||
81ecdfbb RW |
16585 | ECHO_C= ECHO_N= ECHO_T= |
16586 | case `echo -n x` in #((((( | |
16587 | -n*) | |
16588 | case `echo 'xy\c'` in | |
16589 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
16590 | xy) ECHO_C='\c';; | |
16591 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
16592 | ECHO_T=' ';; | |
16593 | esac;; | |
16594 | *) | |
16595 | ECHO_N='-n';; | |
bec39cab AC |
16596 | esac |
16597 | ||
81ecdfbb RW |
16598 | rm -f conf$$ conf$$.exe conf$$.file |
16599 | if test -d conf$$.dir; then | |
16600 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 16601 | else |
81ecdfbb RW |
16602 | rm -f conf$$.dir |
16603 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 16604 | fi |
81ecdfbb RW |
16605 | if (echo >conf$$.file) 2>/dev/null; then |
16606 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 16607 | as_ln_s='ln -s' |
81ecdfbb RW |
16608 | # ... but there are two gotchas: |
16609 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
16610 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
16611 | # In both cases, we have to default to `cp -p'. | |
16612 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
16613 | as_ln_s='cp -p' | |
16614 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
16615 | as_ln_s=ln | |
16616 | else | |
16617 | as_ln_s='cp -p' | |
b4e70030 | 16618 | fi |
bec39cab AC |
16619 | else |
16620 | as_ln_s='cp -p' | |
16621 | fi | |
81ecdfbb RW |
16622 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
16623 | rmdir conf$$.dir 2>/dev/null | |
16624 | ||
16625 | ||
16626 | # as_fn_mkdir_p | |
16627 | # ------------- | |
16628 | # Create "$as_dir" as a directory, including parents if necessary. | |
16629 | as_fn_mkdir_p () | |
16630 | { | |
16631 | ||
16632 | case $as_dir in #( | |
16633 | -*) as_dir=./$as_dir;; | |
16634 | esac | |
16635 | test -d "$as_dir" || eval $as_mkdir_p || { | |
16636 | as_dirs= | |
16637 | while :; do | |
16638 | case $as_dir in #( | |
16639 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
16640 | *) as_qdir=$as_dir;; | |
16641 | esac | |
16642 | as_dirs="'$as_qdir' $as_dirs" | |
16643 | as_dir=`$as_dirname -- "$as_dir" || | |
16644 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16645 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
16646 | X"$as_dir" : 'X\(//\)$' \| \ | |
16647 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
16648 | $as_echo X"$as_dir" | | |
16649 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16650 | s//\1/ | |
16651 | q | |
16652 | } | |
16653 | /^X\(\/\/\)[^/].*/{ | |
16654 | s//\1/ | |
16655 | q | |
16656 | } | |
16657 | /^X\(\/\/\)$/{ | |
16658 | s//\1/ | |
16659 | q | |
16660 | } | |
16661 | /^X\(\/\).*/{ | |
16662 | s//\1/ | |
16663 | q | |
16664 | } | |
16665 | s/.*/./; q'` | |
16666 | test -d "$as_dir" && break | |
16667 | done | |
16668 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
16669 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
16670 | ||
bec39cab | 16671 | |
81ecdfbb | 16672 | } # as_fn_mkdir_p |
bec39cab | 16673 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 16674 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
16675 | else |
16676 | test -d ./-p && rmdir ./-p | |
16677 | as_mkdir_p=false | |
16678 | fi | |
16679 | ||
81ecdfbb RW |
16680 | if test -x / >/dev/null 2>&1; then |
16681 | as_test_x='test -x' | |
16682 | else | |
16683 | if ls -dL / >/dev/null 2>&1; then | |
16684 | as_ls_L_option=L | |
16685 | else | |
16686 | as_ls_L_option= | |
16687 | fi | |
16688 | as_test_x=' | |
16689 | eval sh -c '\'' | |
16690 | if test -d "$1"; then | |
16691 | test -d "$1/."; | |
16692 | else | |
16693 | case $1 in #( | |
16694 | -*)set "./$1";; | |
16695 | esac; | |
16696 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
16697 | ???[sx]*):;;*)false;;esac;fi | |
16698 | '\'' sh | |
16699 | ' | |
16700 | fi | |
16701 | as_executable_p=$as_test_x | |
bec39cab AC |
16702 | |
16703 | # Sed expression to map a string onto a valid CPP name. | |
16704 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
16705 | ||
16706 | # Sed expression to map a string onto a valid variable name. | |
16707 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
16708 | ||
16709 | ||
bec39cab | 16710 | exec 6>&1 |
81ecdfbb RW |
16711 | ## ----------------------------------- ## |
16712 | ## Main body of $CONFIG_STATUS script. ## | |
16713 | ## ----------------------------------- ## | |
16714 | _ASEOF | |
16715 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
16716 | ||
16717 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16718 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 16719 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
16720 | # values after options handling. |
16721 | ac_log=" | |
bec39cab | 16722 | This file was extended by $as_me, which was |
81ecdfbb | 16723 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
16724 | |
16725 | CONFIG_FILES = $CONFIG_FILES | |
16726 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16727 | CONFIG_LINKS = $CONFIG_LINKS | |
16728 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16729 | $ $0 $@ | |
16730 | ||
81ecdfbb RW |
16731 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
16732 | " | |
16733 | ||
bec39cab AC |
16734 | _ACEOF |
16735 | ||
81ecdfbb RW |
16736 | case $ac_config_files in *" |
16737 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
16738 | esac | |
234b45d4 | 16739 | |
81ecdfbb RW |
16740 | case $ac_config_headers in *" |
16741 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
16742 | esac | |
b4e70030 | 16743 | |
b4e70030 | 16744 | |
81ecdfbb RW |
16745 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
16746 | # Files that config.status was made for. | |
16747 | config_files="$ac_config_files" | |
16748 | config_headers="$ac_config_headers" | |
16749 | config_links="$ac_config_links" | |
16750 | config_commands="$ac_config_commands" | |
234b45d4 | 16751 | |
81ecdfbb | 16752 | _ACEOF |
b4e70030 | 16753 | |
81ecdfbb | 16754 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 16755 | ac_cs_usage="\ |
81ecdfbb RW |
16756 | \`$as_me' instantiates files and other configuration actions |
16757 | from templates according to the current configuration. Unless the files | |
16758 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 16759 | |
81ecdfbb | 16760 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 16761 | |
bec39cab | 16762 | -h, --help print this help, then exit |
81ecdfbb RW |
16763 | -V, --version print version number and configuration settings, then exit |
16764 | -q, --quiet, --silent | |
16765 | do not print progress messages | |
bec39cab AC |
16766 | -d, --debug don't remove temporary files |
16767 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
16768 | --file=FILE[:TEMPLATE] |
16769 | instantiate the configuration file FILE | |
16770 | --header=FILE[:TEMPLATE] | |
16771 | instantiate the configuration header FILE | |
234b45d4 | 16772 | |
bec39cab AC |
16773 | Configuration files: |
16774 | $config_files | |
234b45d4 | 16775 | |
bec39cab AC |
16776 | Configuration headers: |
16777 | $config_headers | |
234b45d4 | 16778 | |
bec39cab AC |
16779 | Configuration links: |
16780 | $config_links | |
234b45d4 | 16781 | |
bec39cab AC |
16782 | Configuration commands: |
16783 | $config_commands | |
16784 | ||
81ecdfbb | 16785 | Report bugs to the package provider." |
b4e70030 | 16786 | |
81ecdfbb RW |
16787 | _ACEOF |
16788 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
16789 | ac_cs_version="\\ |
16790 | config.status | |
81ecdfbb RW |
16791 | configured by $0, generated by GNU Autoconf 2.64, |
16792 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 16793 | |
81ecdfbb | 16794 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
16795 | This config.status script is free software; the Free Software Foundation |
16796 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
16797 | |
16798 | ac_pwd='$ac_pwd' | |
16799 | srcdir='$srcdir' | |
16800 | INSTALL='$INSTALL' | |
81ecdfbb RW |
16801 | AWK='$AWK' |
16802 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
16803 | _ACEOF |
16804 | ||
81ecdfbb RW |
16805 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16806 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
16807 | ac_need_defaults=: |
16808 | while test $# != 0 | |
16809 | do | |
16810 | case $1 in | |
16811 | --*=*) | |
81ecdfbb RW |
16812 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
16813 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 16814 | ac_shift=: |
c906108c | 16815 | ;; |
81ecdfbb | 16816 | *) |
bec39cab AC |
16817 | ac_option=$1 |
16818 | ac_optarg=$2 | |
16819 | ac_shift=shift | |
c906108c | 16820 | ;; |
bec39cab | 16821 | esac |
c906108c | 16822 | |
bec39cab AC |
16823 | case $ac_option in |
16824 | # Handling of the options. | |
bec39cab AC |
16825 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
16826 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
16827 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
16828 | $as_echo "$ac_cs_version"; exit ;; | |
16829 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
16830 | debug=: ;; |
16831 | --file | --fil | --fi | --f ) | |
16832 | $ac_shift | |
81ecdfbb RW |
16833 | case $ac_optarg in |
16834 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16835 | esac | |
16836 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
16837 | ac_need_defaults=false;; |
16838 | --header | --heade | --head | --hea ) | |
16839 | $ac_shift | |
81ecdfbb RW |
16840 | case $ac_optarg in |
16841 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16842 | esac | |
16843 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 16844 | ac_need_defaults=false;; |
81ecdfbb RW |
16845 | --he | --h) |
16846 | # Conflict between --help and --header | |
16847 | as_fn_error "ambiguous option: \`$1' | |
16848 | Try \`$0 --help' for more information.";; | |
16849 | --help | --hel | -h ) | |
16850 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
16851 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
16852 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16853 | ac_cs_silent=: ;; | |
c906108c | 16854 | |
bec39cab | 16855 | # This is an error. |
81ecdfbb RW |
16856 | -*) as_fn_error "unrecognized option: \`$1' |
16857 | Try \`$0 --help' for more information." ;; | |
c906108c | 16858 | |
81ecdfbb RW |
16859 | *) as_fn_append ac_config_targets " $1" |
16860 | ac_need_defaults=false ;; | |
c906108c | 16861 | |
bec39cab AC |
16862 | esac |
16863 | shift | |
16864 | done | |
c906108c | 16865 | |
bec39cab | 16866 | ac_configure_extra_args= |
c906108c | 16867 | |
bec39cab AC |
16868 | if $ac_cs_silent; then |
16869 | exec 6>/dev/null | |
16870 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
16871 | fi | |
c906108c | 16872 | |
bec39cab | 16873 | _ACEOF |
81ecdfbb | 16874 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 16875 | if \$ac_cs_recheck; then |
81ecdfbb RW |
16876 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
16877 | shift | |
16878 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
16879 | CONFIG_SHELL='$SHELL' | |
16880 | export CONFIG_SHELL | |
16881 | exec "\$@" | |
bec39cab AC |
16882 | fi |
16883 | ||
16884 | _ACEOF | |
81ecdfbb RW |
16885 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16886 | exec 5>>config.log | |
16887 | { | |
16888 | echo | |
16889 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16890 | ## Running $as_me. ## | |
16891 | _ASBOX | |
16892 | $as_echo "$ac_log" | |
16893 | } >&5 | |
bec39cab | 16894 | |
81ecdfbb RW |
16895 | _ACEOF |
16896 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 16897 | # |
81ecdfbb | 16898 | # INIT-COMMANDS |
c906108c | 16899 | # |
a417dc56 | 16900 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 16901 | |
bec39cab AC |
16902 | _ACEOF |
16903 | ||
81ecdfbb | 16904 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 16905 | |
81ecdfbb | 16906 | # Handling of arguments. |
bec39cab | 16907 | for ac_config_target in $ac_config_targets |
c906108c | 16908 | do |
81ecdfbb RW |
16909 | case $ac_config_target in |
16910 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
16911 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 16912 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 16913 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 16914 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 16915 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 16916 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 16917 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 16918 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
16919 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
16920 | ||
16921 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
16922 | esac |
16923 | done | |
16924 | ||
81ecdfbb | 16925 | |
bec39cab AC |
16926 | # If the user did not use the arguments to specify the items to instantiate, |
16927 | # then the envvar interface is used. Set only those that are not. | |
16928 | # We use the long form for the default assignment because of an extremely | |
16929 | # bizarre bug on SunOS 4.1.3. | |
16930 | if $ac_need_defaults; then | |
16931 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16932 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16933 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
16934 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16935 | fi | |
16936 | ||
b4e70030 | 16937 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 16938 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 16939 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
16940 | # Hook for its removal unless debugging. |
16941 | # Note that there is a small window in which the directory will not be cleaned: | |
16942 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
16943 | $debug || |
16944 | { | |
81ecdfbb RW |
16945 | tmp= |
16946 | trap 'exit_status=$? | |
16947 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
16948 | ' 0 | |
16949 | trap 'as_fn_exit 1' 1 2 13 15 | |
16950 | } | |
16951 | # Create a (secure) tmp directory for tmp files. | |
16952 | ||
16953 | { | |
16954 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
16955 | test -n "$tmp" && test -d "$tmp" | |
16956 | } || | |
16957 | { | |
16958 | tmp=./conf$$-$RANDOM | |
16959 | (umask 077 && mkdir "$tmp") | |
16960 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
16961 | ||
16962 | # Set up the scripts for CONFIG_FILES section. | |
16963 | # No need to generate them if there are no CONFIG_FILES. | |
16964 | # This happens for instance with `./config.status config.h'. | |
16965 | if test -n "$CONFIG_FILES"; then | |
16966 | ||
16967 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
16968 | ac_cs_awk_getline=: | |
16969 | ac_cs_awk_pipe_init= | |
16970 | ac_cs_awk_read_file=' | |
16971 | while ((getline aline < (F[key])) > 0) | |
16972 | print(aline) | |
16973 | close(F[key])' | |
16974 | ac_cs_awk_pipe_fini= | |
16975 | else | |
16976 | ac_cs_awk_getline=false | |
16977 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
16978 | ac_cs_awk_read_file=' | |
16979 | print "|#_!!_#|" | |
16980 | print "cat " F[key] " &&" | |
16981 | '$ac_cs_awk_pipe_init | |
16982 | # The final `:' finishes the AND list. | |
16983 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
16984 | fi | |
16985 | ac_cr=`echo X | tr X '\015'` | |
16986 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
16987 | # But we know of no other shell where ac_cr would be empty at this | |
16988 | # point, so we can use a bashism as a fallback. | |
16989 | if test "x$ac_cr" = x; then | |
16990 | eval ac_cr=\$\'\\r\' | |
16991 | fi | |
16992 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
16993 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
16994 | ac_cs_awk_cr='\r' | |
16995 | else | |
16996 | ac_cs_awk_cr=$ac_cr | |
16997 | fi | |
16998 | ||
16999 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
17000 | _ACEOF | |
17001 | ||
17002 | # Create commands to substitute file output variables. | |
17003 | { | |
17004 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
17005 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
17006 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
17007 | echo "_ACAWK" && | |
17008 | echo "_ACEOF" | |
17009 | } >conf$$files.sh && | |
17010 | . ./conf$$files.sh || | |
17011 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17012 | rm -f conf$$files.sh | |
17013 | ||
17014 | { | |
17015 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
17016 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
17017 | echo "_ACEOF" | |
17018 | } >conf$$subs.sh || | |
17019 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17020 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
17021 | ac_delim='%!_!# ' | |
17022 | for ac_last_try in false false false false false :; do | |
17023 | . ./conf$$subs.sh || | |
17024 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17025 | ||
17026 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
17027 | if test $ac_delim_n = $ac_delim_num; then | |
17028 | break | |
17029 | elif $ac_last_try; then | |
17030 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17031 | else | |
17032 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
17033 | fi | |
17034 | done | |
17035 | rm -f conf$$subs.sh | |
17036 | ||
17037 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17038 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
17039 | _ACEOF | |
17040 | sed -n ' | |
17041 | h | |
17042 | s/^/S["/; s/!.*/"]=/ | |
17043 | p | |
17044 | g | |
17045 | s/^[^!]*!// | |
17046 | :repl | |
17047 | t repl | |
17048 | s/'"$ac_delim"'$// | |
17049 | t delim | |
17050 | :nl | |
17051 | h | |
17052 | s/\(.\{148\}\).*/\1/ | |
17053 | t more1 | |
17054 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
17055 | p | |
17056 | n | |
17057 | b repl | |
17058 | :more1 | |
17059 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
17060 | p | |
17061 | g | |
17062 | s/.\{148\}// | |
17063 | t nl | |
17064 | :delim | |
17065 | h | |
17066 | s/\(.\{148\}\).*/\1/ | |
17067 | t more2 | |
17068 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
17069 | p | |
17070 | b | |
17071 | :more2 | |
17072 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
17073 | p | |
17074 | g | |
17075 | s/.\{148\}// | |
17076 | t delim | |
17077 | ' <conf$$subs.awk | sed ' | |
17078 | /^[^""]/{ | |
17079 | N | |
17080 | s/\n// | |
17081 | } | |
17082 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
17083 | rm -f conf$$subs.awk | |
17084 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17085 | _ACAWK | |
17086 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
17087 | for (key in S) S_is_set[key] = 1 | |
17088 | FS = "\a" | |
17089 | \$ac_cs_awk_pipe_init | |
17090 | } | |
17091 | { | |
17092 | line = $ 0 | |
17093 | nfields = split(line, field, "@") | |
17094 | substed = 0 | |
17095 | len = length(field[1]) | |
17096 | for (i = 2; i < nfields; i++) { | |
17097 | key = field[i] | |
17098 | keylen = length(key) | |
17099 | if (S_is_set[key]) { | |
17100 | value = S[key] | |
17101 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
17102 | len += length(value) + length(field[++i]) | |
17103 | substed = 1 | |
17104 | } else | |
17105 | len += 1 + keylen | |
17106 | } | |
17107 | if (nfields == 3 && !substed) { | |
17108 | key = field[2] | |
17109 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
17110 | \$ac_cs_awk_read_file | |
17111 | next | |
17112 | } | |
17113 | } | |
17114 | print line | |
b4e70030 | 17115 | } |
81ecdfbb RW |
17116 | \$ac_cs_awk_pipe_fini |
17117 | _ACAWK | |
17118 | _ACEOF | |
17119 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17120 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
17121 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
17122 | else | |
17123 | cat | |
17124 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
17125 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
17126 | _ACEOF | |
17127 | ||
17128 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
17129 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
17130 | # trailing colons and then remove the whole line if VPATH becomes empty | |
17131 | # (actually we leave an empty line to preserve line numbers). | |
17132 | if test "x$srcdir" = x.; then | |
17133 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
17134 | s/:*\$(srcdir):*/:/ | |
17135 | s/:*\${srcdir}:*/:/ | |
17136 | s/:*@srcdir@:*/:/ | |
17137 | s/^\([^=]*=[ ]*\):*/\1/ | |
17138 | s/:*$// | |
17139 | s/^[^=]*=[ ]*$// | |
17140 | }' | |
17141 | fi | |
17142 | ||
17143 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17144 | fi # test -n "$CONFIG_FILES" | |
17145 | ||
17146 | # Set up the scripts for CONFIG_HEADERS section. | |
17147 | # No need to generate them if there are no CONFIG_HEADERS. | |
17148 | # This happens for instance with `./config.status Makefile'. | |
17149 | if test -n "$CONFIG_HEADERS"; then | |
17150 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
17151 | BEGIN { | |
17152 | _ACEOF | |
17153 | ||
17154 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
17155 | # here-document in config.status, that substitutes the proper values into | |
17156 | # config.h.in to produce config.h. | |
4e8d927d | 17157 | |
81ecdfbb RW |
17158 | # Create a delimiter string that does not exist in confdefs.h, to ease |
17159 | # handling of long lines. | |
17160 | ac_delim='%!_!# ' | |
17161 | for ac_last_try in false false :; do | |
17162 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
17163 | if test -z "$ac_t"; then | |
17164 | break | |
17165 | elif $ac_last_try; then | |
17166 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
17167 | else | |
17168 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
17169 | fi | |
17170 | done | |
4e8d927d | 17171 | |
81ecdfbb RW |
17172 | # For the awk script, D is an array of macro values keyed by name, |
17173 | # likewise P contains macro parameters if any. Preserve backslash | |
17174 | # newline sequences. | |
17175 | ||
17176 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
17177 | sed -n ' | |
17178 | s/.\{148\}/&'"$ac_delim"'/g | |
17179 | t rset | |
17180 | :rset | |
17181 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
17182 | t def | |
17183 | d | |
17184 | :def | |
17185 | s/\\$// | |
17186 | t bsnl | |
17187 | s/["\\]/\\&/g | |
17188 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
17189 | D["\1"]=" \3"/p | |
17190 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
17191 | d | |
17192 | :bsnl | |
17193 | s/["\\]/\\&/g | |
17194 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
17195 | D["\1"]=" \3\\\\\\n"\\/p | |
17196 | t cont | |
17197 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
17198 | t cont | |
17199 | d | |
17200 | :cont | |
17201 | n | |
17202 | s/.\{148\}/&'"$ac_delim"'/g | |
17203 | t clear | |
17204 | :clear | |
17205 | s/\\$// | |
17206 | t bsnlc | |
17207 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
17208 | d | |
17209 | :bsnlc | |
17210 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
17211 | b cont | |
17212 | ' <confdefs.h | sed ' | |
17213 | s/'"$ac_delim"'/"\\\ | |
17214 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
17215 | ||
17216 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17217 | for (key in D) D_is_set[key] = 1 | |
17218 | FS = "\a" | |
17219 | } | |
17220 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
17221 | line = \$ 0 | |
17222 | split(line, arg, " ") | |
17223 | if (arg[1] == "#") { | |
17224 | defundef = arg[2] | |
17225 | mac1 = arg[3] | |
17226 | } else { | |
17227 | defundef = substr(arg[1], 2) | |
17228 | mac1 = arg[2] | |
17229 | } | |
17230 | split(mac1, mac2, "(") #) | |
17231 | macro = mac2[1] | |
17232 | prefix = substr(line, 1, index(line, defundef) - 1) | |
17233 | if (D_is_set[macro]) { | |
17234 | # Preserve the white space surrounding the "#". | |
17235 | print prefix "define", macro P[macro] D[macro] | |
17236 | next | |
17237 | } else { | |
17238 | # Replace #undef with comments. This is necessary, for example, | |
17239 | # in the case of _POSIX_SOURCE, which is predefined and required | |
17240 | # on some systems where configure will not decide to define it. | |
17241 | if (defundef == "undef") { | |
17242 | print "/*", prefix defundef, macro, "*/" | |
17243 | next | |
17244 | } | |
17245 | } | |
b4e70030 | 17246 | } |
81ecdfbb RW |
17247 | { print } |
17248 | _ACAWK | |
b4e70030 | 17249 | _ACEOF |
81ecdfbb RW |
17250 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17251 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
17252 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 17253 | |
4e8d927d | 17254 | |
81ecdfbb RW |
17255 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
17256 | shift | |
17257 | for ac_tag | |
17258 | do | |
17259 | case $ac_tag in | |
17260 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
17261 | esac | |
17262 | case $ac_mode$ac_tag in | |
17263 | :[FHL]*:*);; | |
17264 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
17265 | :[FH]-) ac_tag=-:-;; | |
17266 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
17267 | esac | |
17268 | ac_save_IFS=$IFS | |
17269 | IFS=: | |
17270 | set x $ac_tag | |
17271 | IFS=$ac_save_IFS | |
17272 | shift | |
17273 | ac_file=$1 | |
17274 | shift | |
4e8d927d | 17275 | |
81ecdfbb RW |
17276 | case $ac_mode in |
17277 | :L) ac_source=$1;; | |
17278 | :[FH]) | |
17279 | ac_file_inputs= | |
17280 | for ac_f | |
17281 | do | |
17282 | case $ac_f in | |
17283 | -) ac_f="$tmp/stdin";; | |
17284 | *) # Look for the file first in the build tree, then in the source tree | |
17285 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
17286 | # because $ac_f cannot contain `:'. | |
17287 | test -f "$ac_f" || | |
17288 | case $ac_f in | |
17289 | [\\/$]*) false;; | |
17290 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
17291 | esac || | |
17292 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
17293 | esac | |
17294 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
17295 | as_fn_append ac_file_inputs " '$ac_f'" | |
17296 | done | |
17297 | ||
17298 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17299 | # use $as_me), people would be surprised to read: | |
17300 | # /* config.h. Generated by config.status. */ | |
17301 | configure_input='Generated from '` | |
17302 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
17303 | `' by configure.' | |
17304 | if test x"$ac_file" != x-; then | |
17305 | configure_input="$ac_file. $configure_input" | |
17306 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
17307 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 17308 | fi |
81ecdfbb RW |
17309 | # Neutralize special characters interpreted by sed in replacement strings. |
17310 | case $configure_input in #( | |
17311 | *\&* | *\|* | *\\* ) | |
17312 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
17313 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
17314 | *) ac_sed_conf_input=$configure_input;; | |
17315 | esac | |
4e8d927d | 17316 | |
81ecdfbb RW |
17317 | case $ac_tag in |
17318 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
17319 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
17320 | esac | |
17321 | ;; | |
c906108c SS |
17322 | esac |
17323 | ||
81ecdfbb | 17324 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
17325 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17326 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
17327 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17328 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
17329 | $as_echo X"$ac_file" | | |
17330 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17331 | s//\1/ | |
17332 | q | |
17333 | } | |
17334 | /^X\(\/\/\)[^/].*/{ | |
17335 | s//\1/ | |
17336 | q | |
17337 | } | |
17338 | /^X\(\/\/\)$/{ | |
17339 | s//\1/ | |
17340 | q | |
17341 | } | |
17342 | /^X\(\/\).*/{ | |
17343 | s//\1/ | |
17344 | q | |
17345 | } | |
17346 | s/.*/./; q'` | |
17347 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17348 | ac_builddir=. |
17349 | ||
81ecdfbb RW |
17350 | case "$ac_dir" in |
17351 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17352 | *) | |
17353 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17354 | # A ".." for each directory in $ac_dir_suffix. | |
17355 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17356 | case $ac_top_builddir_sub in | |
17357 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17358 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17359 | esac ;; | |
17360 | esac | |
17361 | ac_abs_top_builddir=$ac_pwd | |
17362 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17363 | # for backward compatibility: | |
17364 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17365 | |
17366 | case $srcdir in | |
81ecdfbb | 17367 | .) # We are building in place. |
bec39cab | 17368 | ac_srcdir=. |
81ecdfbb RW |
17369 | ac_top_srcdir=$ac_top_builddir_sub |
17370 | ac_abs_top_srcdir=$ac_pwd ;; | |
17371 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17372 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17373 | ac_top_srcdir=$srcdir |
17374 | ac_abs_top_srcdir=$srcdir ;; | |
17375 | *) # Relative name. | |
17376 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17377 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17378 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17379 | esac |
81ecdfbb | 17380 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 17381 | |
c906108c | 17382 | |
81ecdfbb RW |
17383 | case $ac_mode in |
17384 | :F) | |
17385 | # | |
17386 | # CONFIG_FILE | |
17387 | # | |
c906108c | 17388 | |
bec39cab AC |
17389 | case $INSTALL in |
17390 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 17391 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 17392 | esac |
81ecdfbb | 17393 | _ACEOF |
121ce6e5 | 17394 | |
81ecdfbb RW |
17395 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17396 | # If the template does not know about datarootdir, expand it. | |
17397 | # FIXME: This hack should be removed a few years after 2.60. | |
17398 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
17399 | ac_sed_dataroot=' | |
17400 | /datarootdir/ { | |
17401 | p | |
17402 | q | |
17403 | } | |
17404 | /@datadir@/p | |
17405 | /@docdir@/p | |
17406 | /@infodir@/p | |
17407 | /@localedir@/p | |
17408 | /@mandir@/p' | |
17409 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
17410 | *datarootdir*) ac_datarootdir_seen=yes;; | |
17411 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
17412 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
17413 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
17414 | _ACEOF | |
17415 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17416 | ac_datarootdir_hack=' | |
17417 | s&@datadir@&$datadir&g | |
17418 | s&@docdir@&$docdir&g | |
17419 | s&@infodir@&$infodir&g | |
17420 | s&@localedir@&$localedir&g | |
17421 | s&@mandir@&$mandir&g | |
17422 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
17423 | esac | |
4e8d927d | 17424 | _ACEOF |
81ecdfbb RW |
17425 | |
17426 | # Neutralize VPATH when `$srcdir' = `.'. | |
17427 | # Shell code in configure.ac might set extrasub. | |
17428 | # FIXME: do we really want to maintain this feature? | |
17429 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17430 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
17431 | $extrasub |
17432 | _ACEOF | |
81ecdfbb | 17433 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
17434 | :t |
17435 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
17436 | s|@configure_input@|$ac_sed_conf_input|;t t |
17437 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
17438 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
17439 | s&@srcdir@&$ac_srcdir&;t t | |
17440 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
17441 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
17442 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
17443 | s&@builddir@&$ac_builddir&;t t | |
17444 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
17445 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
17446 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
17447 | $ac_datarootdir_hack |
17448 | " | |
17449 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
17450 | if $ac_cs_awk_getline; then | |
17451 | $AWK -f "$tmp/subs.awk" | |
17452 | else | |
17453 | $AWK -f "$tmp/subs.awk" | $SHELL | |
17454 | fi >$tmp/out \ | |
17455 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17456 | ||
17457 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
17458 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
17459 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
17460 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17461 | which seems to be undefined. Please make sure it is defined." >&5 | |
17462 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17463 | which seems to be undefined. Please make sure it is defined." >&2;} | |
17464 | ||
17465 | rm -f "$tmp/stdin" | |
bec39cab | 17466 | case $ac_file in |
81ecdfbb RW |
17467 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
17468 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
17469 | esac \ | |
17470 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17471 | ;; | |
17472 | :H) | |
17473 | # | |
17474 | # CONFIG_HEADER | |
17475 | # | |
bec39cab | 17476 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
17477 | { |
17478 | $as_echo "/* $configure_input */" \ | |
17479 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
17480 | } >"$tmp/config.h" \ | |
17481 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17482 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
17483 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
17484 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 17485 | else |
81ecdfbb RW |
17486 | rm -f "$ac_file" |
17487 | mv "$tmp/config.h" "$ac_file" \ | |
17488 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
17489 | fi |
17490 | else | |
81ecdfbb RW |
17491 | $as_echo "/* $configure_input */" \ |
17492 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
17493 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 17494 | fi |
81ecdfbb RW |
17495 | ;; |
17496 | :L) | |
17497 | # | |
17498 | # CONFIG_LINK | |
17499 | # | |
c906108c | 17500 | |
81ecdfbb RW |
17501 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
17502 | : | |
b4e70030 | 17503 | else |
81ecdfbb RW |
17504 | # Prefer the file from the source tree if names are identical. |
17505 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
17506 | ac_source=$srcdir/$ac_source | |
17507 | fi | |
b4e70030 | 17508 | |
81ecdfbb RW |
17509 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
17510 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 17511 | |
81ecdfbb RW |
17512 | if test ! -r "$ac_source"; then |
17513 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
17514 | fi | |
17515 | rm -f "$ac_file" | |
bec39cab | 17516 | |
81ecdfbb RW |
17517 | # Try a relative symlink, then a hard link, then a copy. |
17518 | case $srcdir in | |
17519 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
17520 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
17521 | esac | |
17522 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
17523 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
17524 | cp -p "$ac_source" "$ac_file" || | |
17525 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
17526 | fi | |
17527 | ;; | |
17528 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
17529 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
17530 | ;; | |
c906108c | 17531 | esac |
b4e70030 | 17532 | |
bec39cab | 17533 | |
81ecdfbb RW |
17534 | case $ac_file$ac_mode in |
17535 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 17536 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 17537 | "default":C) |
c906108c SS |
17538 | case x$CONFIG_HEADERS in |
17539 | xconfig.h:config.in) | |
17540 | echo > stamp-h ;; | |
17541 | esac | |
bec39cab | 17542 | ;; |
81ecdfbb | 17543 | |
bec39cab | 17544 | esac |
81ecdfbb | 17545 | done # for ac_tag |
c906108c | 17546 | |
bec39cab | 17547 | |
81ecdfbb | 17548 | as_fn_exit 0 |
bec39cab | 17549 | _ACEOF |
bec39cab AC |
17550 | ac_clean_files=$ac_clean_files_save |
17551 | ||
81ecdfbb RW |
17552 | test $ac_write_fail = 0 || |
17553 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
17554 | ||
bec39cab AC |
17555 | |
17556 | # configure is writing to config.log, and then calls config.status. | |
17557 | # config.status does its own redirection, appending to config.log. | |
17558 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17559 | # by configure, so config.status won't be able to write to it; its | |
17560 | # output is simply discarded. So we exec the FD to /dev/null, | |
17561 | # effectively closing config.log, so it can be properly (re)opened and | |
17562 | # appended to by config.status. When coming back to configure, we | |
17563 | # need to make the FD available again. | |
17564 | if test "$no_create" != yes; then | |
17565 | ac_cs_success=: | |
17566 | ac_config_status_args= | |
17567 | test "$silent" = yes && | |
17568 | ac_config_status_args="$ac_config_status_args --quiet" | |
17569 | exec 5>/dev/null | |
17570 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17571 | exec 5>>config.log | |
17572 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17573 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 17574 | $ac_cs_success || as_fn_exit $? |
bec39cab | 17575 | fi |
c906108c | 17576 | |
bec39cab | 17577 | # |
81ecdfbb | 17578 | # CONFIG_SUBDIRS section. |
bec39cab | 17579 | # |
c906108c SS |
17580 | if test "$no_recursion" != yes; then |
17581 | ||
81ecdfbb RW |
17582 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
17583 | # so they do not pile up. | |
c906108c SS |
17584 | ac_sub_configure_args= |
17585 | ac_prev= | |
fdc59709 PB |
17586 | eval "set x $ac_configure_args" |
17587 | shift | |
17588 | for ac_arg | |
17589 | do | |
c906108c SS |
17590 | if test -n "$ac_prev"; then |
17591 | ac_prev= | |
17592 | continue | |
17593 | fi | |
bec39cab | 17594 | case $ac_arg in |
c906108c SS |
17595 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
17596 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
17597 | ac_prev=cache_file ;; | |
17598 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
17599 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
17600 | | --c=*) | |
17601 | ;; | |
17602 | --config-cache | -C) | |
c906108c SS |
17603 | ;; |
17604 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
17605 | ac_prev=srcdir ;; | |
17606 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
17607 | ;; | |
bec39cab AC |
17608 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
17609 | ac_prev=prefix ;; | |
17610 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
17611 | ;; | |
81ecdfbb RW |
17612 | --disable-option-checking) |
17613 | ;; | |
fdc59709 PB |
17614 | *) |
17615 | case $ac_arg in | |
81ecdfbb | 17616 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17617 | esac |
81ecdfbb | 17618 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
17619 | esac |
17620 | done | |
17621 | ||
bec39cab AC |
17622 | # Always prepend --prefix to ensure using the same prefix |
17623 | # in subdir configurations. | |
fdc59709 PB |
17624 | ac_arg="--prefix=$prefix" |
17625 | case $ac_arg in | |
81ecdfbb | 17626 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17627 | esac |
81ecdfbb RW |
17628 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
17629 | ||
17630 | # Pass --silent | |
17631 | if test "$silent" = yes; then | |
17632 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
17633 | fi | |
17634 | ||
17635 | # Always prepend --disable-option-checking to silence warnings, since | |
17636 | # different subdirs can have different --enable and --with options. | |
17637 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 17638 | |
b4e70030 | 17639 | ac_popdir=`pwd` |
bec39cab | 17640 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
17641 | |
17642 | # Do not complain, so a configure script can configure whichever | |
17643 | # parts of a large source tree are present. | |
fdc59709 | 17644 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 17645 | |
81ecdfbb RW |
17646 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
17647 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
17648 | $as_echo "$ac_msg" >&6 | |
17649 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17650 | ac_builddir=. |
17651 | ||
81ecdfbb RW |
17652 | case "$ac_dir" in |
17653 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17654 | *) | |
17655 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17656 | # A ".." for each directory in $ac_dir_suffix. | |
17657 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17658 | case $ac_top_builddir_sub in | |
17659 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17660 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17661 | esac ;; | |
17662 | esac | |
17663 | ac_abs_top_builddir=$ac_pwd | |
17664 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17665 | # for backward compatibility: | |
17666 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17667 | |
17668 | case $srcdir in | |
81ecdfbb | 17669 | .) # We are building in place. |
bec39cab | 17670 | ac_srcdir=. |
81ecdfbb RW |
17671 | ac_top_srcdir=$ac_top_builddir_sub |
17672 | ac_abs_top_srcdir=$ac_pwd ;; | |
17673 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17674 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17675 | ac_top_srcdir=$srcdir |
17676 | ac_abs_top_srcdir=$srcdir ;; | |
17677 | *) # Relative name. | |
17678 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17679 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17680 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17681 | esac |
81ecdfbb | 17682 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 17683 | |
c906108c | 17684 | |
fdc59709 | 17685 | cd "$ac_dir" |
c906108c SS |
17686 | |
17687 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
17688 | if test -f "$ac_srcdir/configure.gnu"; then |
17689 | ac_sub_configure=$ac_srcdir/configure.gnu | |
17690 | elif test -f "$ac_srcdir/configure"; then | |
17691 | ac_sub_configure=$ac_srcdir/configure | |
17692 | elif test -f "$ac_srcdir/configure.in"; then | |
17693 | # This should be Cygnus configure. | |
17694 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 17695 | else |
81ecdfbb RW |
17696 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
17697 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
17698 | ac_sub_configure= |
17699 | fi | |
17700 | ||
17701 | # The recursion is here. | |
17702 | if test -n "$ac_sub_configure"; then | |
c906108c | 17703 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
17704 | case $cache_file in |
17705 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
17706 | *) # Relative name. |
17707 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 17708 | esac |
c906108c | 17709 | |
81ecdfbb RW |
17710 | { $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 |
17711 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 17712 | # The eval makes quoting arguments work. |
fdc59709 PB |
17713 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
17714 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 17715 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
17716 | fi |
17717 | ||
fdc59709 | 17718 | cd "$ac_popdir" |
c906108c SS |
17719 | done |
17720 | fi | |
81ecdfbb RW |
17721 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
17722 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
17723 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
17724 | fi | |
c906108c SS |
17725 | |
17726 | ||
17727 | exit 0 |