Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
81ecdfbb | 591 | enable_option_checking=no |
c971b7fa | 592 | ac_subst_vars='LTLIBOBJS |
81ecdfbb | 593 | LIBOBJS |
b292c783 JK |
594 | GCORE_TRANSFORM_NAME |
595 | GDB_TRANSFORM_NAME | |
e3487908 | 596 | XSLTPROC |
81ecdfbb | 597 | GDB_NM_FILE |
393fd4c3 YQ |
598 | LTLIBBABELTRACE |
599 | LIBBABELTRACE | |
600 | HAVE_LIBBABELTRACE | |
21ea5acd SDJ |
601 | HAVE_NATIVE_GCORE_HOST |
602 | NAT_GENERATED_FILES | |
603 | XM_CLIBS | |
604 | MH_CFLAGS | |
605 | LOADLIBES | |
606 | NAT_CDEPS | |
607 | NATDEPFILES | |
608 | NAT_FILE | |
81ecdfbb RW |
609 | target_subdir |
610 | CONFIG_UNINSTALL | |
611 | CONFIG_INSTALL | |
612 | CONFIG_CLEAN | |
613 | CONFIG_ALL | |
614 | CONFIG_SRCS | |
615 | CONFIG_DEPS | |
616 | CONFIG_OBS | |
617 | PROFILE_CFLAGS | |
618 | ENABLE_CFLAGS | |
619 | SIM_OBS | |
620 | SIM | |
621 | XMKMF | |
622 | GDBTK_SRC_DIR | |
623 | GDBTK_CFLAGS | |
624 | GDBTKLIBS | |
625 | X_LIBS | |
626 | X_LDFLAGS | |
627 | X_CFLAGS | |
628 | TK_XINCLUDES | |
629 | TK_DEPS | |
630 | TK_LIBRARY | |
631 | TK_INCLUDE | |
632 | TK_STUB_LIB_SPEC | |
633 | TK_STUB_LIB_FLAG | |
634 | TK_STUB_LIB_FILE | |
635 | TK_LIB_SPEC | |
636 | TK_LIB_FLAG | |
637 | TK_LIB_FILE | |
638 | TK_SRC_DIR | |
639 | TK_BIN_DIR | |
640 | TK_VERSION | |
641 | TCL_DEPS | |
642 | TCL_LIBRARY | |
643 | TCL_INCLUDE | |
644 | TCL_STUB_LIB_SPEC | |
645 | TCL_STUB_LIB_FLAG | |
646 | TCL_STUB_LIB_FILE | |
647 | TCL_LIB_SPEC | |
648 | TCL_LIB_FLAG | |
649 | TCL_LIB_FILE | |
650 | TCL_SRC_DIR | |
651 | TCL_BIN_DIR | |
652 | TCL_PATCH_LEVEL | |
653 | TCL_VERSION | |
654 | WIN32LDAPP | |
655 | GUI_CFLAGS_X | |
656 | LIBGUI | |
608e2dbb TT |
657 | LTLIBLZMA |
658 | LIBLZMA | |
659 | HAVE_LIBLZMA | |
81ecdfbb RW |
660 | WIN32LIBS |
661 | SER_HARDWIRE | |
662 | WERROR_CFLAGS | |
663 | WARN_CFLAGS | |
664 | SYSTEM_GDBINIT | |
81ecdfbb RW |
665 | TARGET_SYSTEM_ROOT |
666 | CONFIG_LDFLAGS | |
f6528abd | 667 | RDYNAMIC |
81ecdfbb | 668 | ALLOCA |
58bfce93 MM |
669 | LTLIBIPT |
670 | LIBIPT | |
671 | HAVE_LIBIPT | |
4df42755 DE |
672 | HAVE_GUILE_FALSE |
673 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
674 | GUILE_LIBS |
675 | GUILE_CPPFLAGS | |
e76c5d17 DE |
676 | GUILD_TARGET_FLAG |
677 | GUILD | |
ed3ef339 | 678 | pkg_config_prog_path |
4df42755 DE |
679 | HAVE_PYTHON_FALSE |
680 | HAVE_PYTHON_TRUE | |
ac534cba JB |
681 | PYTHON_LIBS |
682 | PYTHON_CPPFLAGS | |
81ecdfbb | 683 | PYTHON_CFLAGS |
ec685c5e | 684 | python_prog_path |
2400729e UW |
685 | LTLIBMPFR |
686 | LIBMPFR | |
687 | HAVE_LIBMPFR | |
81ecdfbb RW |
688 | LTLIBEXPAT |
689 | LIBEXPAT | |
690 | HAVE_LIBEXPAT | |
b8e0a31c | 691 | JIT_READER_DIR |
f997c383 | 692 | TARGET_PTR |
39037522 | 693 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
694 | READLINE_CFLAGS |
695 | READLINE_DEPS | |
696 | READLINE | |
016a3251 DD |
697 | LTLIBICONV |
698 | LIBICONV | |
711a72d3 L |
699 | zlibinc |
700 | zlibdir | |
81ecdfbb RW |
701 | MIG |
702 | WINDRES | |
703 | DLLTOOL | |
c971b7fa | 704 | AR |
81ecdfbb RW |
705 | YFLAGS |
706 | YACC | |
c971b7fa | 707 | RANLIB |
81ecdfbb | 708 | LN_S |
c971b7fa PA |
709 | INSTALL_DATA |
710 | INSTALL_SCRIPT | |
711 | INSTALL_PROGRAM | |
712 | AWK | |
81ecdfbb RW |
713 | REPORT_BUGS_TEXI |
714 | REPORT_BUGS_TO | |
715 | PKGVERSION | |
b292c783 | 716 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
717 | TARGET_OBS |
718 | subdirs | |
719 | GDB_DATADIR | |
720 | DEBUGDIR | |
5048e516 JK |
721 | MAKEINFO_EXTRA_FLAGS |
722 | MAKEINFOFLAGS | |
723 | MAKEINFO | |
81ecdfbb RW |
724 | PACKAGE |
725 | GNULIB_STDINT_H | |
81ecdfbb RW |
726 | CATOBJEXT |
727 | GENCAT | |
728 | INSTOBJEXT | |
729 | DATADIRNAME | |
730 | CATALOGS | |
731 | POSUB | |
732 | GMSGFMT | |
733 | XGETTEXT | |
734 | INCINTL | |
735 | LIBINTL_DEP | |
736 | LIBINTL | |
737 | USE_NLS | |
81ecdfbb RW |
738 | CCDEPMODE |
739 | DEPDIR | |
740 | am__leading_dot | |
0bcda685 PA |
741 | CXX_DIALECT |
742 | HAVE_CXX11 | |
4869db5e RM |
743 | INSTALL_STRIP_PROGRAM |
744 | STRIP | |
745 | install_sh | |
81ecdfbb RW |
746 | target_os |
747 | target_vendor | |
748 | target_cpu | |
749 | target | |
750 | host_os | |
751 | host_vendor | |
752 | host_cpu | |
753 | host | |
754 | build_os | |
755 | build_vendor | |
756 | build_cpu | |
757 | build | |
c971b7fa PA |
758 | EGREP |
759 | GREP | |
760 | CPP | |
3bc3d82a PA |
761 | ac_ct_CXX |
762 | CXXFLAGS | |
763 | CXX | |
81ecdfbb RW |
764 | OBJEXT |
765 | EXEEXT | |
766 | ac_ct_CC | |
767 | CPPFLAGS | |
768 | LDFLAGS | |
769 | CFLAGS | |
770 | CC | |
771 | MAINT | |
772 | MAINTAINER_MODE_FALSE | |
773 | MAINTAINER_MODE_TRUE | |
774 | target_alias | |
775 | host_alias | |
776 | build_alias | |
777 | LIBS | |
778 | ECHO_T | |
779 | ECHO_N | |
780 | ECHO_C | |
781 | DEFS | |
782 | mandir | |
783 | localedir | |
784 | libdir | |
785 | psdir | |
786 | pdfdir | |
787 | dvidir | |
788 | htmldir | |
789 | infodir | |
790 | docdir | |
791 | oldincludedir | |
792 | includedir | |
793 | localstatedir | |
794 | sharedstatedir | |
795 | sysconfdir | |
796 | datadir | |
797 | datarootdir | |
798 | libexecdir | |
799 | sbindir | |
800 | bindir | |
801 | program_transform_name | |
802 | prefix | |
803 | exec_prefix | |
804 | PACKAGE_URL | |
805 | PACKAGE_BUGREPORT | |
806 | PACKAGE_STRING | |
807 | PACKAGE_VERSION | |
808 | PACKAGE_TARNAME | |
809 | PACKAGE_NAME | |
810 | PATH_SEPARATOR | |
811 | SHELL' | |
2b351b19 | 812 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
813 | ac_user_opts=' |
814 | enable_option_checking | |
815 | enable_maintainer_mode | |
da2f07f1 JK |
816 | enable_plugins |
817 | enable_largefile | |
81ecdfbb RW |
818 | with_separate_debug_dir |
819 | with_gdb_datadir | |
820 | with_relocated_sources | |
7349ff92 | 821 | with_auto_load_dir |
bccbefd2 | 822 | with_auto_load_safe_path |
81ecdfbb RW |
823 | enable_targets |
824 | enable_64_bit_bfd | |
825 | enable_gdbcli | |
826 | enable_gdbmi | |
827 | enable_tui | |
828 | enable_gdbtk | |
05e7c244 | 829 | with_libunwind_ia64 |
81ecdfbb RW |
830 | with_curses |
831 | enable_profiling | |
832 | with_pkgversion | |
833 | with_bugurl | |
711a72d3 | 834 | with_system_zlib |
016a3251 DD |
835 | with_gnu_ld |
836 | enable_rpath | |
81ecdfbb | 837 | with_libiconv_prefix |
478aac75 | 838 | with_iconv_bin |
81ecdfbb | 839 | with_system_readline |
b8e0a31c | 840 | with_jit_reader_dir |
81ecdfbb | 841 | with_expat |
81ecdfbb | 842 | with_libexpat_prefix |
2400729e UW |
843 | with_mpfr |
844 | with_libmpfr_prefix | |
81ecdfbb | 845 | with_python |
ed3ef339 | 846 | with_guile |
a8db4212 | 847 | enable_libmcheck |
58bfce93 MM |
848 | with_intel_pt |
849 | with_libipt_prefix | |
81ecdfbb RW |
850 | with_included_regex |
851 | with_sysroot | |
852 | with_system_gdbinit | |
853 | enable_werror | |
854 | enable_build_warnings | |
855 | enable_gdb_build_warnings | |
608e2dbb TT |
856 | with_lzma |
857 | with_liblzma_prefix | |
81ecdfbb RW |
858 | with_tcl |
859 | with_tk | |
860 | with_x | |
861 | enable_sim | |
862 | enable_multi_ice | |
496c0e1b | 863 | enable_gdbserver |
393fd4c3 YQ |
864 | with_babeltrace |
865 | with_libbabeltrace_prefix | |
81ecdfbb RW |
866 | ' |
867 | ac_precious_vars='build_alias | |
868 | host_alias | |
869 | target_alias | |
870 | CC | |
871 | CFLAGS | |
872 | LDFLAGS | |
873 | LIBS | |
874 | CPPFLAGS | |
3bc3d82a PA |
875 | CXX |
876 | CXXFLAGS | |
877 | CCC | |
81ecdfbb | 878 | CPP |
f06e05e0 JK |
879 | MAKEINFO |
880 | MAKEINFOFLAGS | |
81ecdfbb RW |
881 | YACC |
882 | YFLAGS | |
883 | XMKMF' | |
5ae98d25 | 884 | ac_subdirs_all='testsuite |
81ecdfbb RW |
885 | gdbtk |
886 | multi-ice | |
887 | gdbserver' | |
c906108c SS |
888 | |
889 | # Initialize some variables set by options. | |
bec39cab AC |
890 | ac_init_help= |
891 | ac_init_version=false | |
81ecdfbb RW |
892 | ac_unrecognized_opts= |
893 | ac_unrecognized_sep= | |
c906108c SS |
894 | # The variables have the same names as the options, with |
895 | # dashes changed to underlines. | |
bec39cab | 896 | cache_file=/dev/null |
c906108c | 897 | exec_prefix=NONE |
c906108c | 898 | no_create= |
c906108c SS |
899 | no_recursion= |
900 | prefix=NONE | |
901 | program_prefix=NONE | |
902 | program_suffix=NONE | |
903 | program_transform_name=s,x,x, | |
904 | silent= | |
905 | site= | |
906 | srcdir= | |
c906108c SS |
907 | verbose= |
908 | x_includes=NONE | |
909 | x_libraries=NONE | |
bec39cab AC |
910 | |
911 | # Installation directory options. | |
912 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
913 | # and all the variables that are supposed to be based on exec_prefix | |
914 | # by default will actually change. | |
915 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 916 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
917 | bindir='${exec_prefix}/bin' |
918 | sbindir='${exec_prefix}/sbin' | |
919 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
920 | datarootdir='${prefix}/share' |
921 | datadir='${datarootdir}' | |
c906108c SS |
922 | sysconfdir='${prefix}/etc' |
923 | sharedstatedir='${prefix}/com' | |
924 | localstatedir='${prefix}/var' | |
c906108c SS |
925 | includedir='${prefix}/include' |
926 | oldincludedir='/usr/include' | |
81ecdfbb RW |
927 | docdir='${datarootdir}/doc/${PACKAGE}' |
928 | infodir='${datarootdir}/info' | |
929 | htmldir='${docdir}' | |
930 | dvidir='${docdir}' | |
931 | pdfdir='${docdir}' | |
932 | psdir='${docdir}' | |
933 | libdir='${exec_prefix}/lib' | |
934 | localedir='${datarootdir}/locale' | |
935 | mandir='${datarootdir}/man' | |
c906108c | 936 | |
c906108c | 937 | ac_prev= |
81ecdfbb | 938 | ac_dashdash= |
c906108c SS |
939 | for ac_option |
940 | do | |
c906108c SS |
941 | # If the previous option needs an argument, assign it. |
942 | if test -n "$ac_prev"; then | |
81ecdfbb | 943 | eval $ac_prev=\$ac_option |
c906108c SS |
944 | ac_prev= |
945 | continue | |
946 | fi | |
947 | ||
81ecdfbb RW |
948 | case $ac_option in |
949 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
950 | *) ac_optarg=yes ;; | |
951 | esac | |
c906108c SS |
952 | |
953 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
954 | ||
81ecdfbb RW |
955 | case $ac_dashdash$ac_option in |
956 | --) | |
957 | ac_dashdash=yes ;; | |
c906108c SS |
958 | |
959 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
960 | ac_prev=bindir ;; | |
961 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 962 | bindir=$ac_optarg ;; |
c906108c SS |
963 | |
964 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 965 | ac_prev=build_alias ;; |
c906108c | 966 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 967 | build_alias=$ac_optarg ;; |
c906108c SS |
968 | |
969 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
970 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
971 | ac_prev=cache_file ;; | |
972 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
973 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
974 | cache_file=$ac_optarg ;; |
975 | ||
976 | --config-cache | -C) | |
977 | cache_file=config.cache ;; | |
c906108c | 978 | |
81ecdfbb | 979 | -datadir | --datadir | --datadi | --datad) |
c906108c | 980 | ac_prev=datadir ;; |
81ecdfbb | 981 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 982 | datadir=$ac_optarg ;; |
c906108c | 983 | |
81ecdfbb RW |
984 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
985 | | --dataroo | --dataro | --datar) | |
986 | ac_prev=datarootdir ;; | |
987 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
988 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
989 | datarootdir=$ac_optarg ;; | |
990 | ||
c906108c | 991 | -disable-* | --disable-*) |
81ecdfbb | 992 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 993 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
994 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
995 | as_fn_error "invalid feature name: $ac_useropt" | |
996 | ac_useropt_orig=$ac_useropt | |
997 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
998 | case $ac_user_opts in | |
999 | *" | |
1000 | "enable_$ac_useropt" | |
1001 | "*) ;; | |
1002 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1003 | ac_unrecognized_sep=', ';; | |
1004 | esac | |
1005 | eval enable_$ac_useropt=no ;; | |
1006 | ||
1007 | -docdir | --docdir | --docdi | --doc | --do) | |
1008 | ac_prev=docdir ;; | |
1009 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1010 | docdir=$ac_optarg ;; | |
1011 | ||
1012 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1013 | ac_prev=dvidir ;; | |
1014 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1015 | dvidir=$ac_optarg ;; | |
c906108c SS |
1016 | |
1017 | -enable-* | --enable-*) | |
81ecdfbb | 1018 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1019 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1020 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1021 | as_fn_error "invalid feature name: $ac_useropt" | |
1022 | ac_useropt_orig=$ac_useropt | |
1023 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1024 | case $ac_user_opts in | |
1025 | *" | |
1026 | "enable_$ac_useropt" | |
1027 | "*) ;; | |
1028 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1029 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1030 | esac |
81ecdfbb | 1031 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1032 | |
1033 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1034 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1035 | | --exec | --exe | --ex) | |
1036 | ac_prev=exec_prefix ;; | |
1037 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1038 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1039 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1040 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1041 | |
1042 | -gas | --gas | --ga | --g) | |
1043 | # Obsolete; use --with-gas. | |
1044 | with_gas=yes ;; | |
1045 | ||
bec39cab AC |
1046 | -help | --help | --hel | --he | -h) |
1047 | ac_init_help=long ;; | |
1048 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1049 | ac_init_help=recursive ;; | |
1050 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1051 | ac_init_help=short ;; | |
c906108c SS |
1052 | |
1053 | -host | --host | --hos | --ho) | |
bec39cab | 1054 | ac_prev=host_alias ;; |
c906108c | 1055 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1056 | host_alias=$ac_optarg ;; |
c906108c | 1057 | |
81ecdfbb RW |
1058 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1059 | ac_prev=htmldir ;; | |
1060 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1061 | | --ht=*) | |
1062 | htmldir=$ac_optarg ;; | |
1063 | ||
c906108c SS |
1064 | -includedir | --includedir | --includedi | --included | --include \ |
1065 | | --includ | --inclu | --incl | --inc) | |
1066 | ac_prev=includedir ;; | |
1067 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1068 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1069 | includedir=$ac_optarg ;; |
c906108c SS |
1070 | |
1071 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1072 | ac_prev=infodir ;; | |
1073 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1074 | infodir=$ac_optarg ;; |
c906108c SS |
1075 | |
1076 | -libdir | --libdir | --libdi | --libd) | |
1077 | ac_prev=libdir ;; | |
1078 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1079 | libdir=$ac_optarg ;; |
c906108c SS |
1080 | |
1081 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1082 | | --libexe | --libex | --libe) | |
1083 | ac_prev=libexecdir ;; | |
1084 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1085 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1086 | libexecdir=$ac_optarg ;; |
c906108c | 1087 | |
81ecdfbb RW |
1088 | -localedir | --localedir | --localedi | --localed | --locale) |
1089 | ac_prev=localedir ;; | |
1090 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1091 | localedir=$ac_optarg ;; | |
1092 | ||
c906108c | 1093 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1094 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1095 | ac_prev=localstatedir ;; |
1096 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1097 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1098 | localstatedir=$ac_optarg ;; |
c906108c SS |
1099 | |
1100 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1101 | ac_prev=mandir ;; | |
1102 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1103 | mandir=$ac_optarg ;; |
c906108c SS |
1104 | |
1105 | -nfp | --nfp | --nf) | |
1106 | # Obsolete; use --without-fp. | |
1107 | with_fp=no ;; | |
1108 | ||
1109 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1110 | | --no-cr | --no-c | -n) |
c906108c SS |
1111 | no_create=yes ;; |
1112 | ||
1113 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1114 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1115 | no_recursion=yes ;; | |
1116 | ||
1117 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1118 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1119 | | --oldin | --oldi | --old | --ol | --o) | |
1120 | ac_prev=oldincludedir ;; | |
1121 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1122 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1123 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1124 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1125 | |
1126 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1127 | ac_prev=prefix ;; | |
1128 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1129 | prefix=$ac_optarg ;; |
c906108c SS |
1130 | |
1131 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1132 | | --program-pre | --program-pr | --program-p) | |
1133 | ac_prev=program_prefix ;; | |
1134 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1135 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1136 | program_prefix=$ac_optarg ;; |
c906108c SS |
1137 | |
1138 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1139 | | --program-suf | --program-su | --program-s) | |
1140 | ac_prev=program_suffix ;; | |
1141 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1142 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1143 | program_suffix=$ac_optarg ;; |
c906108c SS |
1144 | |
1145 | -program-transform-name | --program-transform-name \ | |
1146 | | --program-transform-nam | --program-transform-na \ | |
1147 | | --program-transform-n | --program-transform- \ | |
1148 | | --program-transform | --program-transfor \ | |
1149 | | --program-transfo | --program-transf \ | |
1150 | | --program-trans | --program-tran \ | |
1151 | | --progr-tra | --program-tr | --program-t) | |
1152 | ac_prev=program_transform_name ;; | |
1153 | -program-transform-name=* | --program-transform-name=* \ | |
1154 | | --program-transform-nam=* | --program-transform-na=* \ | |
1155 | | --program-transform-n=* | --program-transform-=* \ | |
1156 | | --program-transform=* | --program-transfor=* \ | |
1157 | | --program-transfo=* | --program-transf=* \ | |
1158 | | --program-trans=* | --program-tran=* \ | |
1159 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1160 | program_transform_name=$ac_optarg ;; |
c906108c | 1161 | |
81ecdfbb RW |
1162 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1163 | ac_prev=pdfdir ;; | |
1164 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1165 | pdfdir=$ac_optarg ;; | |
1166 | ||
1167 | -psdir | --psdir | --psdi | --psd | --ps) | |
1168 | ac_prev=psdir ;; | |
1169 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1170 | psdir=$ac_optarg ;; | |
1171 | ||
c906108c SS |
1172 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1173 | | -silent | --silent | --silen | --sile | --sil) | |
1174 | silent=yes ;; | |
1175 | ||
1176 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1177 | ac_prev=sbindir ;; | |
1178 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1179 | | --sbi=* | --sb=*) | |
bec39cab | 1180 | sbindir=$ac_optarg ;; |
c906108c SS |
1181 | |
1182 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1183 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1184 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1185 | | --sha | --sh) | |
1186 | ac_prev=sharedstatedir ;; | |
1187 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1188 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1189 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1190 | | --sha=* | --sh=*) | |
bec39cab | 1191 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1192 | |
1193 | -site | --site | --sit) | |
1194 | ac_prev=site ;; | |
1195 | -site=* | --site=* | --sit=*) | |
bec39cab | 1196 | site=$ac_optarg ;; |
3ace7edb | 1197 | |
c906108c SS |
1198 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1199 | ac_prev=srcdir ;; | |
1200 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1201 | srcdir=$ac_optarg ;; |
c906108c SS |
1202 | |
1203 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1204 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1205 | ac_prev=sysconfdir ;; | |
1206 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1207 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1208 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1209 | |
1210 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1211 | ac_prev=target_alias ;; |
c906108c | 1212 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1213 | target_alias=$ac_optarg ;; |
c906108c SS |
1214 | |
1215 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1216 | verbose=yes ;; | |
1217 | ||
bec39cab AC |
1218 | -version | --version | --versio | --versi | --vers | -V) |
1219 | ac_init_version=: ;; | |
c906108c SS |
1220 | |
1221 | -with-* | --with-*) | |
81ecdfbb | 1222 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1223 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1224 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1225 | as_fn_error "invalid package name: $ac_useropt" | |
1226 | ac_useropt_orig=$ac_useropt | |
1227 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1228 | case $ac_user_opts in | |
1229 | *" | |
1230 | "with_$ac_useropt" | |
1231 | "*) ;; | |
1232 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1233 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1234 | esac |
81ecdfbb | 1235 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1236 | |
1237 | -without-* | --without-*) | |
81ecdfbb | 1238 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1239 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1240 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1241 | as_fn_error "invalid package name: $ac_useropt" | |
1242 | ac_useropt_orig=$ac_useropt | |
1243 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1244 | case $ac_user_opts in | |
1245 | *" | |
1246 | "with_$ac_useropt" | |
1247 | "*) ;; | |
1248 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1249 | ac_unrecognized_sep=', ';; | |
1250 | esac | |
1251 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1252 | |
1253 | --x) | |
1254 | # Obsolete; use --with-x. | |
1255 | with_x=yes ;; | |
1256 | ||
1257 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1258 | | --x-incl | --x-inc | --x-in | --x-i) | |
1259 | ac_prev=x_includes ;; | |
1260 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1261 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1262 | x_includes=$ac_optarg ;; |
c906108c SS |
1263 | |
1264 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1265 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1266 | ac_prev=x_libraries ;; | |
1267 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1268 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1269 | x_libraries=$ac_optarg ;; |
c906108c | 1270 | |
81ecdfbb RW |
1271 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1272 | Try \`$0 --help' for more information." | |
c906108c SS |
1273 | ;; |
1274 | ||
bec39cab AC |
1275 | *=*) |
1276 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1277 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1278 | case $ac_envvar in #( |
1279 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1280 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1281 | esac | |
1282 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1283 | export $ac_envvar ;; |
1284 | ||
c906108c | 1285 | *) |
bec39cab | 1286 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1287 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1288 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1289 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1290 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1291 | ;; |
1292 | ||
1293 | esac | |
1294 | done | |
1295 | ||
1296 | if test -n "$ac_prev"; then | |
bec39cab | 1297 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1298 | as_fn_error "missing argument to $ac_option" |
c906108c | 1299 | fi |
c906108c | 1300 | |
81ecdfbb RW |
1301 | if test -n "$ac_unrecognized_opts"; then |
1302 | case $enable_option_checking in | |
1303 | no) ;; | |
1304 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1305 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1306 | esac |
81ecdfbb | 1307 | fi |
b4e70030 | 1308 | |
81ecdfbb RW |
1309 | # Check all directory arguments for consistency. |
1310 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1311 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1312 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1313 | libdir localedir mandir | |
b4e70030 | 1314 | do |
81ecdfbb RW |
1315 | eval ac_val=\$$ac_var |
1316 | # Remove trailing slashes. | |
1317 | case $ac_val in | |
1318 | */ ) | |
1319 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1320 | eval $ac_var=\$ac_val;; | |
1321 | esac | |
1322 | # Be sure to have absolute directory names. | |
b4e70030 | 1323 | case $ac_val in |
81ecdfbb RW |
1324 | [\\/$]* | ?:[\\/]* ) continue;; |
1325 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1326 | esac |
81ecdfbb | 1327 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1328 | done |
1329 | ||
bec39cab AC |
1330 | # There might be people who depend on the old broken behavior: `$host' |
1331 | # used to hold the argument of --host etc. | |
1332 | # FIXME: To remove some day. | |
1333 | build=$build_alias | |
1334 | host=$host_alias | |
1335 | target=$target_alias | |
1336 | ||
1337 | # FIXME: To remove some day. | |
1338 | if test "x$host_alias" != x; then | |
1339 | if test "x$build_alias" = x; then | |
1340 | cross_compiling=maybe | |
81ecdfbb | 1341 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1342 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1343 | elif test "x$build_alias" != "x$host_alias"; then | |
1344 | cross_compiling=yes | |
1345 | fi | |
1346 | fi | |
c906108c | 1347 | |
bec39cab AC |
1348 | ac_tool_prefix= |
1349 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1350 | ||
1351 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1352 | |
c906108c | 1353 | |
81ecdfbb RW |
1354 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1355 | ac_ls_di=`ls -di .` && | |
1356 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1357 | as_fn_error "working directory cannot be determined" | |
1358 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1359 | as_fn_error "pwd does not report name of working directory" | |
1360 | ||
1361 | ||
c906108c SS |
1362 | # Find the source files, if location was not specified. |
1363 | if test -z "$srcdir"; then | |
1364 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1365 | # Try the directory containing this script, then the parent directory. |
1366 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1367 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1368 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1369 | X"$as_myself" : 'X\(//\)$' \| \ | |
1370 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1371 | $as_echo X"$as_myself" | | |
1372 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1373 | s//\1/ | |
1374 | q | |
1375 | } | |
1376 | /^X\(\/\/\)[^/].*/{ | |
1377 | s//\1/ | |
1378 | q | |
1379 | } | |
1380 | /^X\(\/\/\)$/{ | |
1381 | s//\1/ | |
1382 | q | |
1383 | } | |
1384 | /^X\(\/\).*/{ | |
1385 | s//\1/ | |
1386 | q | |
1387 | } | |
1388 | s/.*/./; q'` | |
c906108c | 1389 | srcdir=$ac_confdir |
81ecdfbb | 1390 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1391 | srcdir=.. |
1392 | fi | |
1393 | else | |
1394 | ac_srcdir_defaulted=no | |
1395 | fi | |
81ecdfbb RW |
1396 | if test ! -r "$srcdir/$ac_unique_file"; then |
1397 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1398 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1399 | fi | |
1400 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1401 | ac_abs_confdir=`( | |
1402 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1403 | pwd)` | |
1404 | # When building in place, set srcdir=. | |
1405 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1406 | srcdir=. | |
1407 | fi | |
1408 | # Remove unnecessary trailing slashes from srcdir. | |
1409 | # Double slashes in file names in object file debugging info | |
1410 | # mess up M-x gdb in Emacs. | |
1411 | case $srcdir in | |
1412 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1413 | esac | |
1414 | for ac_var in $ac_precious_vars; do | |
1415 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1416 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1417 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1418 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1419 | done | |
c906108c | 1420 | |
bec39cab AC |
1421 | # |
1422 | # Report the --help message. | |
1423 | # | |
1424 | if test "$ac_init_help" = "long"; then | |
1425 | # Omit some internal or obsolete options to make the list less imposing. | |
1426 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1427 | cat <<_ACEOF | |
1428 | \`configure' configures this package to adapt to many kinds of systems. | |
1429 | ||
1430 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1431 | ||
1432 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1433 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1434 | ||
1435 | Defaults for the options are specified in brackets. | |
1436 | ||
1437 | Configuration: | |
1438 | -h, --help display this help and exit | |
1439 | --help=short display options specific to this package | |
1440 | --help=recursive display the short help of all the included packages | |
1441 | -V, --version display version information and exit | |
1442 | -q, --quiet, --silent do not print \`checking...' messages | |
1443 | --cache-file=FILE cache test results in FILE [disabled] | |
1444 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1445 | -n, --no-create do not create output files | |
1446 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1447 | ||
bec39cab AC |
1448 | Installation directories: |
1449 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1450 | [$ac_default_prefix] |
bec39cab | 1451 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1452 | [PREFIX] |
bec39cab AC |
1453 | |
1454 | By default, \`make install' will install all the files in | |
1455 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1456 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1457 | for instance \`--prefix=\$HOME'. | |
1458 | ||
1459 | For better control, use the options below. | |
1460 | ||
1461 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1462 | --bindir=DIR user executables [EPREFIX/bin] |
1463 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1464 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1465 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1466 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1467 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1468 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1469 | --includedir=DIR C header files [PREFIX/include] | |
1470 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1471 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1472 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1473 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1474 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1475 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1476 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1477 | --htmldir=DIR html documentation [DOCDIR] | |
1478 | --dvidir=DIR dvi documentation [DOCDIR] | |
1479 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1480 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1481 | _ACEOF |
1482 | ||
1483 | cat <<\_ACEOF | |
1484 | ||
9009e1ae MR |
1485 | Program names: |
1486 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1487 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1488 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1489 | ||
bec39cab AC |
1490 | X features: |
1491 | --x-includes=DIR X include files are in DIR | |
1492 | --x-libraries=DIR X library files are in DIR | |
1493 | ||
1494 | System types: | |
1495 | --build=BUILD configure for building on BUILD [guessed] | |
1496 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1497 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1498 | _ACEOF | |
1499 | fi | |
1500 | ||
1501 | if test -n "$ac_init_help"; then | |
1502 | ||
1503 | cat <<\_ACEOF | |
1504 | ||
1505 | Optional Features: | |
81ecdfbb | 1506 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1507 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1508 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1509 | --enable-maintainer-mode enable make rules and dependencies not useful |
1510 | (and sometimes confusing) to the casual installer | |
2974be62 | 1511 | --enable-plugins Enable support for plugins |
da2f07f1 | 1512 | --disable-largefile omit support for large files |
a1220294 TT |
1513 | --enable-targets=TARGETS |
1514 | alternative target configurations | |
c0993dbe | 1515 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1516 | --disable-gdbcli disable command-line interface (CLI) |
1517 | --disable-gdbmi disable machine-interface (MI) | |
1518 | --enable-tui enable full-screen terminal user interface (TUI) | |
1519 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1520 | --enable-profiling enable profiling of GDB | |
3841debe | 1521 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1522 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1523 | --enable-werror treat compile warnings as errors |
32c1c914 | 1524 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1525 | --enable-gdb-build-warnings |
32c1c914 | 1526 | enable GDB specific build-time compiler warnings if |
a1220294 | 1527 | gcc is used |
32c1c914 | 1528 | --enable-sim link gdb with simulator |
bec39cab | 1529 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1530 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1531 | is auto) | |
bec39cab AC |
1532 | |
1533 | Optional Packages: | |
1534 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1535 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1536 | --with-separate-debug-dir=PATH |
32c1c914 | 1537 | look for global separate debug info in this path |
62e4f60c | 1538 | [LIBDIR/debug] |
b14b1491 TT |
1539 | --with-gdb-datadir=PATH look for global separate data files in this path |
1540 | [DATADIR/gdb] | |
29b0e8a2 | 1541 | --with-relocated-sources=PATH |
32c1c914 | 1542 | automatically relocate this path for source files |
7349ff92 | 1543 | --with-auto-load-dir=PATH |
aff139ff | 1544 | directories from which to load auto-loaded scripts |
1564a261 | 1545 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1546 | --with-auto-load-safe-path=PATH |
aff139ff | 1547 | directories safe to hold auto-loaded files |
7349ff92 | 1548 | [--with-auto-load-dir] |
bccbefd2 JK |
1549 | --without-auto-load-safe-path |
1550 | do not restrict auto-loaded files locations | |
05e7c244 | 1551 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1552 | --with-curses use the curses library instead of the termcap |
1553 | library | |
c16158bc JM |
1554 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1555 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1556 | --with-system-zlib use installed libz |
016a3251 DD |
1557 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1558 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1559 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
478aac75 | 1560 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1561 | --with-system-readline use installed readline library |
b8e0a31c SD |
1562 | --with-jit-reader-dir=PATH |
1563 | directory to load the JIT readers from | |
5c39566f | 1564 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1565 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1566 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
2400729e UW |
1567 | --with-mpfr include MPFR support (auto/yes/no) |
1568 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1569 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
0c4a4063 DE |
1570 | --with-python[=PYTHON] include python support |
1571 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1572 | --with-guile[=GUILE] include guile support |
1573 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1574 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1575 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1576 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
a1220294 TT |
1577 | --without-included-regex |
1578 | don't use included regex; this is the default on | |
1579 | systems with version 2 of the GNU C library (use | |
1580 | with caution on other system) | |
81ecdfbb | 1581 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1582 | --with-system-gdbinit=PATH |
32c1c914 | 1583 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1584 | --with-lzma support lzma compression (auto/yes/no) |
1585 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1586 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1587 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1588 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1589 | --with-x use the X Window System |
393fd4c3 YQ |
1590 | --with-babeltrace include babeltrace support (auto/yes/no) |
1591 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1592 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1593 | |
1594 | Some influential environment variables: | |
1595 | CC C compiler command | |
1596 | CFLAGS C compiler flags | |
1597 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1598 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1599 | LIBS libraries to pass to the linker, e.g. -l<library> |
1600 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1601 | you have headers in a nonstandard directory <include dir> | |
3bc3d82a PA |
1602 | CXX C++ compiler command |
1603 | CXXFLAGS C++ compiler flags | |
bec39cab | 1604 | CPP C preprocessor |
f06e05e0 JK |
1605 | MAKEINFO Parent configure detects if it is of sufficient version. |
1606 | MAKEINFOFLAGS | |
1607 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1608 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1609 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1610 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1611 | This script will default YFLAGS to the empty string to avoid a | |
1612 | default value of `-d' given by some make applications. | |
1613 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1614 | |
1615 | Use these variables to override the choices made by `configure' or to help | |
1616 | it to find libraries and programs with nonstandard names/locations. | |
1617 | ||
81ecdfbb | 1618 | Report bugs to the package provider. |
bec39cab | 1619 | _ACEOF |
81ecdfbb | 1620 | ac_status=$? |
bec39cab AC |
1621 | fi |
1622 | ||
1623 | if test "$ac_init_help" = "recursive"; then | |
1624 | # If there are subdirs, report their specific --help. | |
bec39cab | 1625 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1626 | test -d "$ac_dir" || |
1627 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1628 | continue | |
bec39cab AC |
1629 | ac_builddir=. |
1630 | ||
81ecdfbb RW |
1631 | case "$ac_dir" in |
1632 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1633 | *) | |
1634 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1635 | # A ".." for each directory in $ac_dir_suffix. | |
1636 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1637 | case $ac_top_builddir_sub in | |
1638 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1639 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1640 | esac ;; | |
1641 | esac | |
1642 | ac_abs_top_builddir=$ac_pwd | |
1643 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1644 | # for backward compatibility: | |
1645 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1646 | |
1647 | case $srcdir in | |
81ecdfbb | 1648 | .) # We are building in place. |
bec39cab | 1649 | ac_srcdir=. |
81ecdfbb RW |
1650 | ac_top_srcdir=$ac_top_builddir_sub |
1651 | ac_abs_top_srcdir=$ac_pwd ;; | |
1652 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1653 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1654 | ac_top_srcdir=$srcdir |
1655 | ac_abs_top_srcdir=$srcdir ;; | |
1656 | *) # Relative name. | |
1657 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1658 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1659 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1660 | esac |
81ecdfbb | 1661 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1662 | |
81ecdfbb RW |
1663 | cd "$ac_dir" || { ac_status=$?; continue; } |
1664 | # Check for guested configure. | |
1665 | if test -f "$ac_srcdir/configure.gnu"; then | |
1666 | echo && | |
1667 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1668 | elif test -f "$ac_srcdir/configure"; then | |
1669 | echo && | |
1670 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1671 | else |
81ecdfbb RW |
1672 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1673 | fi || ac_status=$? | |
1674 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1675 | done |
1676 | fi | |
1677 | ||
81ecdfbb | 1678 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1679 | if $ac_init_version; then |
1680 | cat <<\_ACEOF | |
81ecdfbb RW |
1681 | configure |
1682 | generated by GNU Autoconf 2.64 | |
bec39cab | 1683 | |
81ecdfbb | 1684 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1685 | This configure script is free software; the Free Software Foundation |
1686 | gives unlimited permission to copy, distribute and modify it. | |
1687 | _ACEOF | |
81ecdfbb | 1688 | exit |
bec39cab | 1689 | fi |
bec39cab | 1690 | |
81ecdfbb RW |
1691 | ## ------------------------ ## |
1692 | ## Autoconf initialization. ## | |
1693 | ## ------------------------ ## | |
bec39cab | 1694 | |
81ecdfbb RW |
1695 | # ac_fn_c_try_compile LINENO |
1696 | # -------------------------- | |
1697 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1698 | ac_fn_c_try_compile () | |
1699 | { | |
1700 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1701 | rm -f conftest.$ac_objext | |
1702 | if { { ac_try="$ac_compile" | |
1703 | case "(($ac_try" in | |
1704 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1705 | *) ac_try_echo=$ac_try;; | |
1706 | esac | |
1707 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1708 | $as_echo "$ac_try_echo"; } >&5 | |
1709 | (eval "$ac_compile") 2>conftest.err | |
1710 | ac_status=$? | |
1711 | if test -s conftest.err; then | |
1712 | grep -v '^ *+' conftest.err >conftest.er1 | |
1713 | cat conftest.er1 >&5 | |
1714 | mv -f conftest.er1 conftest.err | |
1715 | fi | |
1716 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1717 | test $ac_status = 0; } && { | |
1718 | test -z "$ac_c_werror_flag" || | |
1719 | test ! -s conftest.err | |
1720 | } && test -s conftest.$ac_objext; then : | |
1721 | ac_retval=0 | |
1722 | else | |
1723 | $as_echo "$as_me: failed program was:" >&5 | |
1724 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1725 | |
81ecdfbb RW |
1726 | ac_retval=1 |
1727 | fi | |
1728 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1729 | return $ac_retval | |
1730 | ||
1731 | } # ac_fn_c_try_compile | |
1732 | ||
3bc3d82a PA |
1733 | # ac_fn_cxx_try_compile LINENO |
1734 | # ---------------------------- | |
1735 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1736 | ac_fn_cxx_try_compile () | |
1737 | { | |
1738 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1739 | rm -f conftest.$ac_objext | |
1740 | if { { ac_try="$ac_compile" | |
1741 | case "(($ac_try" in | |
1742 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1743 | *) ac_try_echo=$ac_try;; | |
1744 | esac | |
1745 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1746 | $as_echo "$ac_try_echo"; } >&5 | |
1747 | (eval "$ac_compile") 2>conftest.err | |
1748 | ac_status=$? | |
1749 | if test -s conftest.err; then | |
1750 | grep -v '^ *+' conftest.err >conftest.er1 | |
1751 | cat conftest.er1 >&5 | |
1752 | mv -f conftest.er1 conftest.err | |
1753 | fi | |
1754 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1755 | test $ac_status = 0; } && { | |
1756 | test -z "$ac_cxx_werror_flag" || | |
1757 | test ! -s conftest.err | |
1758 | } && test -s conftest.$ac_objext; then : | |
1759 | ac_retval=0 | |
1760 | else | |
1761 | $as_echo "$as_me: failed program was:" >&5 | |
1762 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1763 | ||
1764 | ac_retval=1 | |
1765 | fi | |
1766 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1767 | return $ac_retval | |
1768 | ||
1769 | } # ac_fn_cxx_try_compile | |
1770 | ||
81ecdfbb RW |
1771 | # ac_fn_c_try_cpp LINENO |
1772 | # ---------------------- | |
1773 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1774 | ac_fn_c_try_cpp () | |
bec39cab | 1775 | { |
81ecdfbb RW |
1776 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1777 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1778 | case "(($ac_try" in | |
1779 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1780 | *) ac_try_echo=$ac_try;; | |
1781 | esac | |
1782 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1783 | $as_echo "$ac_try_echo"; } >&5 | |
1784 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1785 | ac_status=$? | |
1786 | if test -s conftest.err; then | |
1787 | grep -v '^ *+' conftest.err >conftest.er1 | |
1788 | cat conftest.er1 >&5 | |
1789 | mv -f conftest.er1 conftest.err | |
1790 | fi | |
1791 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1792 | test $ac_status = 0; } >/dev/null && { | |
1793 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1794 | test ! -s conftest.err | |
1795 | }; then : | |
1796 | ac_retval=0 | |
1797 | else | |
1798 | $as_echo "$as_me: failed program was:" >&5 | |
1799 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1800 | |
81ecdfbb RW |
1801 | ac_retval=1 |
1802 | fi | |
1803 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1804 | return $ac_retval | |
bec39cab | 1805 | |
81ecdfbb | 1806 | } # ac_fn_c_try_cpp |
bec39cab | 1807 | |
81ecdfbb RW |
1808 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1809 | # ------------------------------------------------------- | |
1810 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1811 | # the include files in INCLUDES and setting the cache variable VAR | |
1812 | # accordingly. | |
1813 | ac_fn_c_check_header_mongrel () | |
1814 | { | |
1815 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1816 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1818 | $as_echo_n "checking for $2... " >&6; } | |
1819 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1820 | $as_echo_n "(cached) " >&6 | |
1821 | fi | |
1822 | eval ac_res=\$$3 | |
1823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1824 | $as_echo "$ac_res" >&6; } | |
1825 | else | |
1826 | # Is the header compilable? | |
1827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1828 | $as_echo_n "checking $2 usability... " >&6; } | |
1829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1830 | /* end confdefs.h. */ | |
1831 | $4 | |
1832 | #include <$2> | |
1833 | _ACEOF | |
1834 | if ac_fn_c_try_compile "$LINENO"; then : | |
1835 | ac_header_compiler=yes | |
1836 | else | |
1837 | ac_header_compiler=no | |
1838 | fi | |
1839 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1841 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1842 | |
81ecdfbb RW |
1843 | # Is the header present? |
1844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1845 | $as_echo_n "checking $2 presence... " >&6; } | |
1846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1847 | /* end confdefs.h. */ | |
1848 | #include <$2> | |
1849 | _ACEOF | |
1850 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1851 | ac_header_preproc=yes | |
1852 | else | |
1853 | ac_header_preproc=no | |
1854 | fi | |
1855 | rm -f conftest.err conftest.$ac_ext | |
1856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1857 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1858 | |
81ecdfbb RW |
1859 | # So? What about this header? |
1860 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1861 | yes:no: ) | |
1862 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1863 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1864 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1865 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1866 | ;; | |
1867 | no:yes:* ) | |
1868 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1869 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1870 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1871 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1872 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1873 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1874 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1875 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1876 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1877 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1878 | ;; | |
1879 | esac | |
1880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1881 | $as_echo_n "checking for $2... " >&6; } | |
1882 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1883 | $as_echo_n "(cached) " >&6 | |
1884 | else | |
1885 | eval "$3=\$ac_header_compiler" | |
1886 | fi | |
1887 | eval ac_res=\$$3 | |
1888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1889 | $as_echo "$ac_res" >&6; } | |
1890 | fi | |
1891 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1892 | |
81ecdfbb | 1893 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1894 | |
81ecdfbb RW |
1895 | # ac_fn_c_try_run LINENO |
1896 | # ---------------------- | |
1897 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1898 | # that executables *can* be run. | |
1899 | ac_fn_c_try_run () | |
1900 | { | |
1901 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1902 | if { { ac_try="$ac_link" | |
1903 | case "(($ac_try" in | |
1904 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1905 | *) ac_try_echo=$ac_try;; | |
1906 | esac | |
1907 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1908 | $as_echo "$ac_try_echo"; } >&5 | |
1909 | (eval "$ac_link") 2>&5 | |
1910 | ac_status=$? | |
1911 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1912 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1913 | { { case "(($ac_try" in | |
1914 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1915 | *) ac_try_echo=$ac_try;; | |
1916 | esac | |
1917 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1918 | $as_echo "$ac_try_echo"; } >&5 | |
1919 | (eval "$ac_try") 2>&5 | |
1920 | ac_status=$? | |
1921 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1922 | test $ac_status = 0; }; }; then : | |
1923 | ac_retval=0 | |
1924 | else | |
1925 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1926 | $as_echo "$as_me: failed program was:" >&5 | |
1927 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1928 | |
81ecdfbb RW |
1929 | ac_retval=$ac_status |
1930 | fi | |
1931 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1932 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1933 | return $ac_retval | |
bec39cab | 1934 | |
81ecdfbb | 1935 | } # ac_fn_c_try_run |
bec39cab | 1936 | |
81ecdfbb RW |
1937 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1938 | # ------------------------------------------------------- | |
1939 | # Tests whether HEADER exists and can be compiled using the include files in | |
1940 | # INCLUDES, setting the cache variable VAR accordingly. | |
1941 | ac_fn_c_check_header_compile () | |
1942 | { | |
1943 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1945 | $as_echo_n "checking for $2... " >&6; } | |
1946 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1947 | $as_echo_n "(cached) " >&6 | |
1948 | else | |
1949 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1950 | /* end confdefs.h. */ | |
1951 | $4 | |
1952 | #include <$2> | |
bec39cab | 1953 | _ACEOF |
81ecdfbb RW |
1954 | if ac_fn_c_try_compile "$LINENO"; then : |
1955 | eval "$3=yes" | |
1956 | else | |
1957 | eval "$3=no" | |
1958 | fi | |
1959 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1960 | fi | |
1961 | eval ac_res=\$$3 | |
1962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1963 | $as_echo "$ac_res" >&6; } | |
1964 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1965 | |
81ecdfbb | 1966 | } # ac_fn_c_check_header_compile |
bec39cab | 1967 | |
2974be62 AM |
1968 | # ac_fn_c_try_link LINENO |
1969 | # ----------------------- | |
1970 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1971 | ac_fn_c_try_link () | |
1972 | { | |
1973 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1974 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1975 | if { { ac_try="$ac_link" | |
1976 | case "(($ac_try" in | |
1977 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1978 | *) ac_try_echo=$ac_try;; | |
1979 | esac | |
1980 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1981 | $as_echo "$ac_try_echo"; } >&5 | |
1982 | (eval "$ac_link") 2>conftest.err | |
1983 | ac_status=$? | |
1984 | if test -s conftest.err; then | |
1985 | grep -v '^ *+' conftest.err >conftest.er1 | |
1986 | cat conftest.er1 >&5 | |
1987 | mv -f conftest.er1 conftest.err | |
1988 | fi | |
1989 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1990 | test $ac_status = 0; } && { | |
1991 | test -z "$ac_c_werror_flag" || | |
1992 | test ! -s conftest.err | |
1993 | } && test -s conftest$ac_exeext && { | |
1994 | test "$cross_compiling" = yes || | |
1995 | $as_test_x conftest$ac_exeext | |
1996 | }; then : | |
1997 | ac_retval=0 | |
1998 | else | |
1999 | $as_echo "$as_me: failed program was:" >&5 | |
2000 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2001 | ||
2002 | ac_retval=1 | |
2003 | fi | |
2004 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2005 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2006 | # interfere with the next link command; also delete a directory that is | |
2007 | # left behind by Apple's compiler. We do this before executing the actions. | |
2008 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2009 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2010 | return $ac_retval | |
2011 | ||
2012 | } # ac_fn_c_try_link | |
2013 | ||
81ecdfbb RW |
2014 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2015 | # -------------------------------------------- | |
2016 | # Tries to find the compile-time value of EXPR in a program that includes | |
2017 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2018 | # computed | |
2019 | ac_fn_c_compute_int () | |
2020 | { | |
2021 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2022 | if test "$cross_compiling" = yes; then | |
2023 | # Depending upon the size, compute the lo and hi bounds. | |
2024 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2025 | /* end confdefs.h. */ | |
2026 | $4 | |
2027 | int | |
2028 | main () | |
2029 | { | |
2030 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2031 | test_array [0] = 0 | |
bec39cab | 2032 | |
81ecdfbb RW |
2033 | ; |
2034 | return 0; | |
2035 | } | |
2036 | _ACEOF | |
2037 | if ac_fn_c_try_compile "$LINENO"; then : | |
2038 | ac_lo=0 ac_mid=0 | |
2039 | while :; do | |
2040 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2041 | /* end confdefs.h. */ | |
2042 | $4 | |
2043 | int | |
2044 | main () | |
2045 | { | |
2046 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2047 | test_array [0] = 0 | |
bec39cab | 2048 | |
81ecdfbb RW |
2049 | ; |
2050 | return 0; | |
2051 | } | |
2052 | _ACEOF | |
2053 | if ac_fn_c_try_compile "$LINENO"; then : | |
2054 | ac_hi=$ac_mid; break | |
2055 | else | |
2056 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2057 | if test $ac_lo -le $ac_mid; then | |
2058 | ac_lo= ac_hi= | |
2059 | break | |
2060 | fi | |
2061 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2062 | fi |
81ecdfbb RW |
2063 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2064 | done | |
c906108c | 2065 | else |
81ecdfbb RW |
2066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2067 | /* end confdefs.h. */ | |
2068 | $4 | |
2069 | int | |
2070 | main () | |
2071 | { | |
2072 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2073 | test_array [0] = 0 | |
bec39cab | 2074 | |
81ecdfbb RW |
2075 | ; |
2076 | return 0; | |
2077 | } | |
2078 | _ACEOF | |
2079 | if ac_fn_c_try_compile "$LINENO"; then : | |
2080 | ac_hi=-1 ac_mid=-1 | |
2081 | while :; do | |
2082 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2083 | /* end confdefs.h. */ | |
2084 | $4 | |
2085 | int | |
2086 | main () | |
2087 | { | |
2088 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2089 | test_array [0] = 0 | |
bec39cab | 2090 | |
81ecdfbb RW |
2091 | ; |
2092 | return 0; | |
2093 | } | |
2094 | _ACEOF | |
2095 | if ac_fn_c_try_compile "$LINENO"; then : | |
2096 | ac_lo=$ac_mid; break | |
2097 | else | |
2098 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2099 | if test $ac_mid -le $ac_hi; then | |
2100 | ac_lo= ac_hi= | |
2101 | break | |
2102 | fi | |
2103 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2104 | fi | |
2105 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2106 | done | |
2107 | else | |
2108 | ac_lo= ac_hi= | |
2109 | fi | |
2110 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2111 | fi | |
2112 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2113 | # Binary search between lo and hi bounds. | |
2114 | while test "x$ac_lo" != "x$ac_hi"; do | |
2115 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2117 | /* end confdefs.h. */ | |
2118 | $4 | |
2119 | int | |
2120 | main () | |
2121 | { | |
2122 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2123 | test_array [0] = 0 | |
bec39cab | 2124 | |
81ecdfbb RW |
2125 | ; |
2126 | return 0; | |
2127 | } | |
2128 | _ACEOF | |
2129 | if ac_fn_c_try_compile "$LINENO"; then : | |
2130 | ac_hi=$ac_mid | |
2131 | else | |
2132 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2133 | fi | |
2134 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2135 | done | |
2136 | case $ac_lo in #(( | |
2137 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2138 | '') ac_retval=1 ;; | |
2139 | esac | |
2140 | else | |
2141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2142 | /* end confdefs.h. */ | |
2143 | $4 | |
2144 | static long int longval () { return $2; } | |
2145 | static unsigned long int ulongval () { return $2; } | |
2146 | #include <stdio.h> | |
2147 | #include <stdlib.h> | |
2148 | int | |
2149 | main () | |
2150 | { | |
bec39cab | 2151 | |
81ecdfbb RW |
2152 | FILE *f = fopen ("conftest.val", "w"); |
2153 | if (! f) | |
2154 | return 1; | |
2155 | if (($2) < 0) | |
2156 | { | |
2157 | long int i = longval (); | |
2158 | if (i != ($2)) | |
2159 | return 1; | |
2160 | fprintf (f, "%ld", i); | |
2161 | } | |
2162 | else | |
2163 | { | |
2164 | unsigned long int i = ulongval (); | |
2165 | if (i != ($2)) | |
2166 | return 1; | |
2167 | fprintf (f, "%lu", i); | |
2168 | } | |
2169 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2170 | on some platforms. */ | |
2171 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2172 | |
81ecdfbb RW |
2173 | ; |
2174 | return 0; | |
2175 | } | |
2176 | _ACEOF | |
2177 | if ac_fn_c_try_run "$LINENO"; then : | |
2178 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2179 | else | |
2180 | ac_retval=1 | |
2181 | fi | |
2182 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2183 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2184 | rm -f conftest.val | |
bec39cab | 2185 | |
81ecdfbb RW |
2186 | fi |
2187 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2188 | return $ac_retval | |
bec39cab | 2189 | |
81ecdfbb | 2190 | } # ac_fn_c_compute_int |
bec39cab | 2191 | |
55a8c076 YQ |
2192 | # ac_fn_c_check_func LINENO FUNC VAR |
2193 | # ---------------------------------- | |
2194 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2195 | ac_fn_c_check_func () | |
81ecdfbb RW |
2196 | { |
2197 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2199 | $as_echo_n "checking for $2... " >&6; } | |
2200 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2201 | $as_echo_n "(cached) " >&6 | |
2202 | else | |
81ecdfbb RW |
2203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2204 | /* end confdefs.h. */ | |
55a8c076 YQ |
2205 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2206 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2207 | #define $2 innocuous_$2 | |
2208 | ||
2209 | /* System header to define __stub macros and hopefully few prototypes, | |
2210 | which can conflict with char $2 (); below. | |
2211 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2212 | <limits.h> exists even on freestanding compilers. */ | |
2213 | ||
2214 | #ifdef __STDC__ | |
2215 | # include <limits.h> | |
2216 | #else | |
2217 | # include <assert.h> | |
2218 | #endif | |
2219 | ||
2220 | #undef $2 | |
2221 | ||
2222 | /* Override any GCC internal prototype to avoid an error. | |
2223 | Use char because int might match the return type of a GCC | |
2224 | builtin and then its argument prototype would still apply. */ | |
2225 | #ifdef __cplusplus | |
2226 | extern "C" | |
2227 | #endif | |
2228 | char $2 (); | |
2229 | /* The GNU C library defines this for functions which it implements | |
2230 | to always fail with ENOSYS. Some functions are actually named | |
2231 | something starting with __ and the normal name is an alias. */ | |
2232 | #if defined __stub_$2 || defined __stub___$2 | |
2233 | choke me | |
2234 | #endif | |
2235 | ||
2236 | int | |
2237 | main () | |
2238 | { | |
2239 | return $2 (); | |
2240 | ; | |
2241 | return 0; | |
2242 | } | |
2243 | _ACEOF | |
2244 | if ac_fn_c_try_link "$LINENO"; then : | |
2245 | eval "$3=yes" | |
2246 | else | |
2247 | eval "$3=no" | |
2248 | fi | |
2249 | rm -f core conftest.err conftest.$ac_objext \ | |
2250 | conftest$ac_exeext conftest.$ac_ext | |
2251 | fi | |
2252 | eval ac_res=\$$3 | |
2253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2254 | $as_echo "$ac_res" >&6; } | |
2255 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2256 | ||
2257 | } # ac_fn_c_check_func | |
2258 | ||
c56ccc05 MM |
2259 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2260 | # ---------------------------------------------------- | |
2261 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2262 | # INCLUDES, setting cache variable VAR accordingly. | |
2263 | ac_fn_c_check_member () | |
2264 | { | |
2265 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2267 | $as_echo_n "checking for $2.$3... " >&6; } | |
2268 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2269 | $as_echo_n "(cached) " >&6 | |
2270 | else | |
2271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2272 | /* end confdefs.h. */ | |
2273 | $5 | |
2274 | int | |
2275 | main () | |
2276 | { | |
2277 | static $2 ac_aggr; | |
2278 | if (ac_aggr.$3) | |
2279 | return 0; | |
2280 | ; | |
2281 | return 0; | |
2282 | } | |
2283 | _ACEOF | |
2284 | if ac_fn_c_try_compile "$LINENO"; then : | |
2285 | eval "$4=yes" | |
2286 | else | |
2287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2288 | /* end confdefs.h. */ | |
2289 | $5 | |
2290 | int | |
2291 | main () | |
2292 | { | |
2293 | static $2 ac_aggr; | |
2294 | if (sizeof ac_aggr.$3) | |
2295 | return 0; | |
2296 | ; | |
2297 | return 0; | |
2298 | } | |
2299 | _ACEOF | |
2300 | if ac_fn_c_try_compile "$LINENO"; then : | |
2301 | eval "$4=yes" | |
2302 | else | |
2303 | eval "$4=no" | |
2304 | fi | |
2305 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2306 | fi | |
2307 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2308 | fi | |
2309 | eval ac_res=\$$4 | |
2310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2311 | $as_echo "$ac_res" >&6; } | |
2312 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2313 | ||
2314 | } # ac_fn_c_check_member | |
2315 | ||
07697489 PA |
2316 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2317 | # ------------------------------------------- | |
2318 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2319 | # variable VAR accordingly. | |
2320 | ac_fn_c_check_type () | |
2321 | { | |
2322 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2324 | $as_echo_n "checking for $2... " >&6; } | |
2325 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2326 | $as_echo_n "(cached) " >&6 | |
2327 | else | |
2328 | eval "$3=no" | |
2329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2330 | /* end confdefs.h. */ | |
2331 | $4 | |
2332 | int | |
2333 | main () | |
2334 | { | |
2335 | if (sizeof ($2)) | |
2336 | return 0; | |
2337 | ; | |
2338 | return 0; | |
2339 | } | |
2340 | _ACEOF | |
2341 | if ac_fn_c_try_compile "$LINENO"; then : | |
2342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2343 | /* end confdefs.h. */ | |
2344 | $4 | |
2345 | int | |
2346 | main () | |
2347 | { | |
2348 | if (sizeof (($2))) | |
2349 | return 0; | |
2350 | ; | |
2351 | return 0; | |
2352 | } | |
2353 | _ACEOF | |
2354 | if ac_fn_c_try_compile "$LINENO"; then : | |
2355 | ||
2356 | else | |
2357 | eval "$3=yes" | |
2358 | fi | |
2359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2360 | fi | |
2361 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2362 | fi | |
2363 | eval ac_res=\$$3 | |
2364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2365 | $as_echo "$ac_res" >&6; } | |
2366 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2367 | ||
2368 | } # ac_fn_c_check_type | |
2369 | ||
770d76d7 PA |
2370 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2371 | # ------------------------------------ | |
2372 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2373 | ac_fn_c_check_decl () | |
2374 | { | |
2375 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2376 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2377 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2379 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2380 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2381 | $as_echo_n "(cached) " >&6 | |
2382 | else | |
2383 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2384 | /* end confdefs.h. */ | |
2385 | $4 | |
2386 | int | |
2387 | main () | |
2388 | { | |
2389 | #ifndef $as_decl_name | |
2390 | #ifdef __cplusplus | |
2391 | (void) $as_decl_use; | |
2392 | #else | |
2393 | (void) $as_decl_name; | |
2394 | #endif | |
2395 | #endif | |
2396 | ||
2397 | ; | |
2398 | return 0; | |
2399 | } | |
2400 | _ACEOF | |
2401 | if ac_fn_c_try_compile "$LINENO"; then : | |
2402 | eval "$3=yes" | |
2403 | else | |
2404 | eval "$3=no" | |
2405 | fi | |
2406 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2407 | fi | |
2408 | eval ac_res=\$$3 | |
2409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2410 | $as_echo "$ac_res" >&6; } | |
2411 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2412 | ||
2413 | } # ac_fn_c_check_decl | |
81ecdfbb RW |
2414 | cat >config.log <<_ACEOF |
2415 | This file contains any messages produced by compilers while | |
2416 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2417 | |
81ecdfbb RW |
2418 | It was created by $as_me, which was |
2419 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2420 | |
81ecdfbb | 2421 | $ $0 $@ |
413ccac7 | 2422 | |
81ecdfbb RW |
2423 | _ACEOF |
2424 | exec 5>>config.log | |
2425 | { | |
2426 | cat <<_ASUNAME | |
2427 | ## --------- ## | |
2428 | ## Platform. ## | |
2429 | ## --------- ## | |
413ccac7 | 2430 | |
81ecdfbb RW |
2431 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2432 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2433 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2434 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2435 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2436 | |
81ecdfbb RW |
2437 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2438 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2439 | |
81ecdfbb RW |
2440 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2441 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2442 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2443 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2444 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2445 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2446 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2447 | |
81ecdfbb | 2448 | _ASUNAME |
bec39cab | 2449 | |
bec39cab AC |
2450 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2451 | for as_dir in $PATH | |
2452 | do | |
2453 | IFS=$as_save_IFS | |
2454 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2455 | $as_echo "PATH: $as_dir" |
2456 | done | |
2457 | IFS=$as_save_IFS | |
bec39cab | 2458 | |
81ecdfbb | 2459 | } >&5 |
bec39cab | 2460 | |
81ecdfbb | 2461 | cat >&5 <<_ACEOF |
bec39cab | 2462 | |
bec39cab | 2463 | |
81ecdfbb RW |
2464 | ## ----------- ## |
2465 | ## Core tests. ## | |
2466 | ## ----------- ## | |
2467 | ||
2468 | _ACEOF | |
2469 | ||
2470 | ||
2471 | # Keep a trace of the command line. | |
2472 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2473 | # Strip out --silent because we don't want to record it for future runs. | |
2474 | # Also quote any args containing shell meta-characters. | |
2475 | # Make two passes to allow for proper duplicate-argument suppression. | |
2476 | ac_configure_args= | |
2477 | ac_configure_args0= | |
2478 | ac_configure_args1= | |
2479 | ac_must_keep_next=false | |
2480 | for ac_pass in 1 2 | |
2481 | do | |
2482 | for ac_arg | |
2483 | do | |
2484 | case $ac_arg in | |
2485 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2486 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2487 | | -silent | --silent | --silen | --sile | --sil) | |
2488 | continue ;; | |
2489 | *\'*) | |
2490 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2491 | esac | |
2492 | case $ac_pass in | |
2493 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2494 | 2) | |
2495 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2496 | if test $ac_must_keep_next = true; then | |
2497 | ac_must_keep_next=false # Got value, back to normal. | |
2498 | else | |
2499 | case $ac_arg in | |
2500 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2501 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2502 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2503 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2504 | case "$ac_configure_args0 " in | |
2505 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2506 | esac | |
2507 | ;; | |
2508 | -* ) ac_must_keep_next=true ;; | |
2509 | esac | |
2510 | fi | |
2511 | as_fn_append ac_configure_args " '$ac_arg'" | |
2512 | ;; | |
2513 | esac | |
2514 | done | |
2515 | done | |
2516 | { ac_configure_args0=; unset ac_configure_args0;} | |
2517 | { ac_configure_args1=; unset ac_configure_args1;} | |
2518 | ||
2519 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2520 | # config.log. We remove comments because anyway the quotes in there | |
2521 | # would cause problems or look ugly. | |
2522 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2523 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2524 | trap 'exit_status=$? | |
2525 | # Save into config.log some information that might help in debugging. | |
2526 | { | |
2527 | echo | |
2528 | ||
2529 | cat <<\_ASBOX | |
2530 | ## ---------------- ## | |
2531 | ## Cache variables. ## | |
2532 | ## ---------------- ## | |
2533 | _ASBOX | |
2534 | echo | |
2535 | # The following way of writing the cache mishandles newlines in values, | |
2536 | ( | |
2537 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2538 | eval ac_val=\$$ac_var | |
2539 | case $ac_val in #( | |
2540 | *${as_nl}*) | |
2541 | case $ac_var in #( | |
2542 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2543 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2544 | esac | |
2545 | case $ac_var in #( | |
2546 | _ | IFS | as_nl) ;; #( | |
2547 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2548 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2549 | esac ;; | |
2550 | esac | |
2551 | done | |
2552 | (set) 2>&1 | | |
2553 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2554 | *${as_nl}ac_space=\ *) | |
2555 | sed -n \ | |
2556 | "s/'\''/'\''\\\\'\'''\''/g; | |
2557 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2558 | ;; #( | |
2559 | *) | |
2560 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2561 | ;; | |
2562 | esac | | |
2563 | sort | |
2564 | ) | |
2565 | echo | |
2566 | ||
2567 | cat <<\_ASBOX | |
2568 | ## ----------------- ## | |
2569 | ## Output variables. ## | |
2570 | ## ----------------- ## | |
2571 | _ASBOX | |
2572 | echo | |
2573 | for ac_var in $ac_subst_vars | |
2574 | do | |
2575 | eval ac_val=\$$ac_var | |
2576 | case $ac_val in | |
2577 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2578 | esac | |
2579 | $as_echo "$ac_var='\''$ac_val'\''" | |
2580 | done | sort | |
2581 | echo | |
2582 | ||
2583 | if test -n "$ac_subst_files"; then | |
2584 | cat <<\_ASBOX | |
2585 | ## ------------------- ## | |
2586 | ## File substitutions. ## | |
2587 | ## ------------------- ## | |
2588 | _ASBOX | |
2589 | echo | |
2590 | for ac_var in $ac_subst_files | |
2591 | do | |
2592 | eval ac_val=\$$ac_var | |
2593 | case $ac_val in | |
2594 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2595 | esac | |
2596 | $as_echo "$ac_var='\''$ac_val'\''" | |
2597 | done | sort | |
2598 | echo | |
2599 | fi | |
2600 | ||
2601 | if test -s confdefs.h; then | |
2602 | cat <<\_ASBOX | |
2603 | ## ----------- ## | |
2604 | ## confdefs.h. ## | |
2605 | ## ----------- ## | |
2606 | _ASBOX | |
2607 | echo | |
2608 | cat confdefs.h | |
2609 | echo | |
2610 | fi | |
2611 | test "$ac_signal" != 0 && | |
2612 | $as_echo "$as_me: caught signal $ac_signal" | |
2613 | $as_echo "$as_me: exit $exit_status" | |
2614 | } >&5 | |
2615 | rm -f core *.core core.conftest.* && | |
2616 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2617 | exit $exit_status | |
2618 | ' 0 | |
2619 | for ac_signal in 1 2 13 15; do | |
2620 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2621 | done | |
2622 | ac_signal=0 | |
2623 | ||
2624 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2625 | rm -f -r conftest* confdefs.h | |
2626 | ||
2627 | $as_echo "/* confdefs.h */" > confdefs.h | |
2628 | ||
2629 | # Predefined preprocessor variables. | |
2630 | ||
2631 | cat >>confdefs.h <<_ACEOF | |
2632 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2633 | _ACEOF | |
2634 | ||
2635 | cat >>confdefs.h <<_ACEOF | |
2636 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2637 | _ACEOF | |
2638 | ||
2639 | cat >>confdefs.h <<_ACEOF | |
2640 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2641 | _ACEOF | |
2642 | ||
2643 | cat >>confdefs.h <<_ACEOF | |
2644 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2645 | _ACEOF | |
2646 | ||
2647 | cat >>confdefs.h <<_ACEOF | |
2648 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2649 | _ACEOF | |
2650 | ||
2651 | cat >>confdefs.h <<_ACEOF | |
2652 | #define PACKAGE_URL "$PACKAGE_URL" | |
2653 | _ACEOF | |
2654 | ||
2655 | ||
2656 | # Let the site file select an alternate cache file if it wants to. | |
2657 | # Prefer an explicitly selected file to automatically selected ones. | |
2658 | ac_site_file1=NONE | |
2659 | ac_site_file2=NONE | |
2660 | if test -n "$CONFIG_SITE"; then | |
2661 | ac_site_file1=$CONFIG_SITE | |
2662 | elif test "x$prefix" != xNONE; then | |
2663 | ac_site_file1=$prefix/share/config.site | |
2664 | ac_site_file2=$prefix/etc/config.site | |
2665 | else | |
2666 | ac_site_file1=$ac_default_prefix/share/config.site | |
2667 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2668 | fi | |
2669 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2670 | do | |
2671 | test "x$ac_site_file" = xNONE && continue | |
2672 | if test -r "$ac_site_file"; then | |
2673 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2674 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2675 | sed 's/^/| /' "$ac_site_file" >&5 | |
2676 | . "$ac_site_file" | |
2677 | fi | |
2678 | done | |
2679 | ||
2680 | if test -r "$cache_file"; then | |
2681 | # Some versions of bash will fail to source /dev/null (special | |
2682 | # files actually), so we avoid doing that. | |
2683 | if test -f "$cache_file"; then | |
2684 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2685 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2686 | case $cache_file in | |
2687 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2688 | *) . "./$cache_file";; | |
2689 | esac | |
2690 | fi | |
2691 | else | |
2692 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2693 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2694 | >$cache_file | |
bec39cab AC |
2695 | fi |
2696 | ||
81ecdfbb RW |
2697 | # Check that the precious variables saved in the cache have kept the same |
2698 | # value. | |
2699 | ac_cache_corrupted=false | |
2700 | for ac_var in $ac_precious_vars; do | |
2701 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2702 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2703 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2704 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2705 | case $ac_old_set,$ac_new_set in | |
2706 | set,) | |
2707 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2708 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2709 | ac_cache_corrupted=: ;; | |
2710 | ,set) | |
2711 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2712 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2713 | ac_cache_corrupted=: ;; | |
2714 | ,);; | |
2715 | *) | |
2716 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2717 | # differences in whitespace do not lead to failure. | |
2718 | ac_old_val_w=`echo x $ac_old_val` | |
2719 | ac_new_val_w=`echo x $ac_new_val` | |
2720 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2721 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2722 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2723 | ac_cache_corrupted=: | |
2724 | else | |
2725 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2726 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2727 | eval $ac_var=\$ac_old_val | |
2728 | fi | |
2729 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2730 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2731 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2732 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2733 | fi;; | |
2734 | esac | |
2735 | # Pass precious variables to config.status. | |
2736 | if test "$ac_new_set" = set; then | |
2737 | case $ac_new_val in | |
2738 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2739 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2740 | esac | |
2741 | case " $ac_configure_args " in | |
2742 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2743 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2744 | esac | |
2745 | fi | |
2746 | done | |
2747 | if $ac_cache_corrupted; then | |
2748 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2749 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2750 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2751 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2752 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2753 | fi | |
2754 | ## -------------------- ## | |
2755 | ## Main body of script. ## | |
2756 | ## -------------------- ## | |
2757 | ||
2758 | ac_ext=c | |
2759 | ac_cpp='$CPP $CPPFLAGS' | |
2760 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2761 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2762 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2763 | ||
2764 | ||
2765 | ||
2766 | ||
2767 | ||
2768 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2769 | ||
2770 | ||
2771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2772 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2773 | # Check whether --enable-maintainer-mode was given. | |
2774 | if test "${enable_maintainer_mode+set}" = set; then : | |
2775 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2776 | else | |
2777 | USE_MAINTAINER_MODE=no | |
2778 | fi | |
2779 | ||
2780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2781 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2782 | if test $USE_MAINTAINER_MODE = yes; then | |
2783 | MAINTAINER_MODE_TRUE= | |
2784 | MAINTAINER_MODE_FALSE='#' | |
2785 | else | |
2786 | MAINTAINER_MODE_TRUE='#' | |
2787 | MAINTAINER_MODE_FALSE= | |
2788 | fi | |
2789 | ||
2790 | MAINT=$MAINTAINER_MODE_TRUE | |
2791 | ||
2792 | ||
2793 | ||
17ef446e | 2794 | # Set the 'development' global. |
270c9937 | 2795 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2796 | |
81ecdfbb RW |
2797 | ac_ext=c |
2798 | ac_cpp='$CPP $CPPFLAGS' | |
2799 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2800 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2801 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2802 | if test -n "$ac_tool_prefix"; then | |
2803 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2804 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2806 | $as_echo_n "checking for $ac_word... " >&6; } | |
2807 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2808 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2809 | else |
2810 | if test -n "$CC"; then | |
2811 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2812 | else | |
bec39cab AC |
2813 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2814 | for as_dir in $PATH | |
2815 | do | |
2816 | IFS=$as_save_IFS | |
2817 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2818 | for ac_exec_ext in '' $ac_executable_extensions; do |
2819 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2820 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2821 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2822 | break 2 |
2823 | fi | |
2824 | done | |
81ecdfbb RW |
2825 | done |
2826 | IFS=$as_save_IFS | |
bec39cab | 2827 | |
c906108c SS |
2828 | fi |
2829 | fi | |
bec39cab | 2830 | CC=$ac_cv_prog_CC |
c906108c | 2831 | if test -n "$CC"; then |
81ecdfbb RW |
2832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2833 | $as_echo "$CC" >&6; } | |
c906108c | 2834 | else |
81ecdfbb RW |
2835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2836 | $as_echo "no" >&6; } | |
c906108c SS |
2837 | fi |
2838 | ||
81ecdfbb | 2839 | |
b4e70030 JB |
2840 | fi |
2841 | if test -z "$ac_cv_prog_CC"; then | |
2842 | ac_ct_CC=$CC | |
81ecdfbb RW |
2843 | # Extract the first word of "gcc", so it can be a program name with args. |
2844 | set dummy gcc; ac_word=$2 | |
2845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2846 | $as_echo_n "checking for $ac_word... " >&6; } | |
2847 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2848 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2849 | else |
2850 | if test -n "$ac_ct_CC"; then | |
2851 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2852 | else | |
2853 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2854 | for as_dir in $PATH | |
2855 | do | |
2856 | IFS=$as_save_IFS | |
2857 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2858 | for ac_exec_ext in '' $ac_executable_extensions; do |
2859 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2860 | ac_cv_prog_ac_ct_CC="gcc" | |
2861 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2862 | break 2 |
4e8d927d | 2863 | fi |
b4e70030 | 2864 | done |
81ecdfbb RW |
2865 | done |
2866 | IFS=$as_save_IFS | |
b4e70030 JB |
2867 | |
2868 | fi | |
2869 | fi | |
2870 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2871 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2873 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2874 | else |
81ecdfbb RW |
2875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2876 | $as_echo "no" >&6; } | |
b4e70030 JB |
2877 | fi |
2878 | ||
81ecdfbb RW |
2879 | if test "x$ac_ct_CC" = x; then |
2880 | CC="" | |
2881 | else | |
2882 | case $cross_compiling:$ac_tool_warned in | |
2883 | yes:) | |
2884 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2885 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2886 | ac_tool_warned=yes ;; | |
2887 | esac | |
2888 | CC=$ac_ct_CC | |
2889 | fi | |
b4e70030 JB |
2890 | else |
2891 | CC="$ac_cv_prog_CC" | |
2892 | fi | |
2893 | ||
c906108c | 2894 | if test -z "$CC"; then |
81ecdfbb RW |
2895 | if test -n "$ac_tool_prefix"; then |
2896 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2897 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2899 | $as_echo_n "checking for $ac_word... " >&6; } | |
2900 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2901 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2902 | else |
2903 | if test -n "$CC"; then | |
2904 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2905 | else | |
bec39cab AC |
2906 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2907 | for as_dir in $PATH | |
2908 | do | |
2909 | IFS=$as_save_IFS | |
2910 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2911 | for ac_exec_ext in '' $ac_executable_extensions; do |
2912 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2913 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2914 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2915 | break 2 |
2916 | fi | |
2917 | done | |
81ecdfbb RW |
2918 | done |
2919 | IFS=$as_save_IFS | |
2920 | ||
2921 | fi | |
2922 | fi | |
2923 | CC=$ac_cv_prog_CC | |
2924 | if test -n "$CC"; then | |
2925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2926 | $as_echo "$CC" >&6; } | |
2927 | else | |
2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2929 | $as_echo "no" >&6; } | |
2930 | fi | |
2931 | ||
2932 | ||
2933 | fi | |
2934 | fi | |
2935 | if test -z "$CC"; then | |
2936 | # Extract the first word of "cc", so it can be a program name with args. | |
2937 | set dummy cc; ac_word=$2 | |
2938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2939 | $as_echo_n "checking for $ac_word... " >&6; } | |
2940 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2941 | $as_echo_n "(cached) " >&6 | |
2942 | else | |
2943 | if test -n "$CC"; then | |
2944 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2945 | else | |
2946 | ac_prog_rejected=no | |
2947 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2948 | for as_dir in $PATH | |
2949 | do | |
2950 | IFS=$as_save_IFS | |
2951 | test -z "$as_dir" && as_dir=. | |
2952 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2953 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2954 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2955 | ac_prog_rejected=yes | |
2956 | continue | |
2957 | fi | |
2958 | ac_cv_prog_CC="cc" | |
2959 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2960 | break 2 | |
2961 | fi | |
2962 | done | |
2963 | done | |
2964 | IFS=$as_save_IFS | |
bec39cab | 2965 | |
c906108c SS |
2966 | if test $ac_prog_rejected = yes; then |
2967 | # We found a bogon in the path, so make sure we never use it. | |
2968 | set dummy $ac_cv_prog_CC | |
2969 | shift | |
bec39cab | 2970 | if test $# != 0; then |
c906108c SS |
2971 | # We chose a different compiler from the bogus one. |
2972 | # However, it has the same basename, so the bogon will be chosen | |
2973 | # first if we set CC to just the basename; use the full file name. | |
2974 | shift | |
bec39cab | 2975 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2976 | fi |
2977 | fi | |
2978 | fi | |
2979 | fi | |
bec39cab | 2980 | CC=$ac_cv_prog_CC |
c906108c | 2981 | if test -n "$CC"; then |
81ecdfbb RW |
2982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2983 | $as_echo "$CC" >&6; } | |
c906108c | 2984 | else |
81ecdfbb RW |
2985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2986 | $as_echo "no" >&6; } | |
c906108c SS |
2987 | fi |
2988 | ||
81ecdfbb | 2989 | |
bec39cab AC |
2990 | fi |
2991 | if test -z "$CC"; then | |
2992 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2993 | for ac_prog in cl.exe |
bec39cab AC |
2994 | do |
2995 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2996 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2998 | $as_echo_n "checking for $ac_word... " >&6; } | |
2999 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3000 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
3001 | else |
3002 | if test -n "$CC"; then | |
3003 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3004 | else | |
bec39cab AC |
3005 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3006 | for as_dir in $PATH | |
3007 | do | |
3008 | IFS=$as_save_IFS | |
3009 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3010 | for ac_exec_ext in '' $ac_executable_extensions; do |
3011 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3012 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3013 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3014 | break 2 |
3015 | fi | |
3016 | done | |
81ecdfbb RW |
3017 | done |
3018 | IFS=$as_save_IFS | |
bec39cab | 3019 | |
c906108c SS |
3020 | fi |
3021 | fi | |
bec39cab | 3022 | CC=$ac_cv_prog_CC |
c906108c | 3023 | if test -n "$CC"; then |
81ecdfbb RW |
3024 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3025 | $as_echo "$CC" >&6; } | |
c906108c | 3026 | else |
81ecdfbb RW |
3027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3028 | $as_echo "no" >&6; } | |
c906108c | 3029 | fi |
bec39cab | 3030 | |
81ecdfbb | 3031 | |
bec39cab AC |
3032 | test -n "$CC" && break |
3033 | done | |
3034 | fi | |
3035 | if test -z "$CC"; then | |
3036 | ac_ct_CC=$CC | |
81ecdfbb | 3037 | for ac_prog in cl.exe |
bec39cab AC |
3038 | do |
3039 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3040 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3042 | $as_echo_n "checking for $ac_word... " >&6; } | |
3043 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3044 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3045 | else |
3046 | if test -n "$ac_ct_CC"; then | |
3047 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3048 | else | |
3049 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3050 | for as_dir in $PATH | |
3051 | do | |
3052 | IFS=$as_save_IFS | |
3053 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3054 | for ac_exec_ext in '' $ac_executable_extensions; do |
3055 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3056 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3057 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3058 | break 2 |
c906108c | 3059 | fi |
bec39cab | 3060 | done |
81ecdfbb RW |
3061 | done |
3062 | IFS=$as_save_IFS | |
bec39cab AC |
3063 | |
3064 | fi | |
3065 | fi | |
3066 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3067 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3069 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3070 | else |
81ecdfbb RW |
3071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3072 | $as_echo "no" >&6; } | |
c906108c SS |
3073 | fi |
3074 | ||
81ecdfbb | 3075 | |
bec39cab AC |
3076 | test -n "$ac_ct_CC" && break |
3077 | done | |
c906108c | 3078 | |
81ecdfbb RW |
3079 | if test "x$ac_ct_CC" = x; then |
3080 | CC="" | |
3081 | else | |
3082 | case $cross_compiling:$ac_tool_warned in | |
3083 | yes:) | |
3084 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3085 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3086 | ac_tool_warned=yes ;; | |
3087 | esac | |
3088 | CC=$ac_ct_CC | |
3089 | fi | |
bec39cab AC |
3090 | fi |
3091 | ||
3092 | fi | |
3093 | ||
3094 | ||
81ecdfbb RW |
3095 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3096 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3097 | as_fn_error "no acceptable C compiler found in \$PATH | |
3098 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3099 | |
3100 | # Provide some information about the compiler. | |
81ecdfbb RW |
3101 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3102 | set X $ac_compile | |
3103 | ac_compiler=$2 | |
3104 | for ac_option in --version -v -V -qversion; do | |
3105 | { { ac_try="$ac_compiler $ac_option >&5" | |
3106 | case "(($ac_try" in | |
3107 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3108 | *) ac_try_echo=$ac_try;; | |
3109 | esac | |
3110 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3111 | $as_echo "$ac_try_echo"; } >&5 | |
3112 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3113 | ac_status=$? |
81ecdfbb RW |
3114 | if test -s conftest.err; then |
3115 | sed '10a\ | |
3116 | ... rest of stderr output deleted ... | |
3117 | 10q' conftest.err >conftest.er1 | |
3118 | cat conftest.er1 >&5 | |
3119 | rm -f conftest.er1 conftest.err | |
3120 | fi | |
3121 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3122 | test $ac_status = 0; } | |
3123 | done | |
bec39cab | 3124 | |
81ecdfbb | 3125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3126 | /* end confdefs.h. */ |
3127 | ||
3128 | int | |
3129 | main () | |
3130 | { | |
3131 | ||
3132 | ; | |
3133 | return 0; | |
3134 | } | |
3135 | _ACEOF | |
3136 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3137 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3138 | # Try to create an executable without -o first, disregard a.out. |
3139 | # It will help us diagnose broken compilers, and finding out an intuition | |
3140 | # of exeext. | |
81ecdfbb RW |
3141 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3142 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3143 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3144 | ||
3145 | # The possible output files: | |
3146 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3147 | ||
3148 | ac_rmfiles= | |
3149 | for ac_file in $ac_files | |
3150 | do | |
3151 | case $ac_file in | |
3152 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3153 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3154 | esac | |
3155 | done | |
3156 | rm -f $ac_rmfiles | |
3157 | ||
3158 | if { { ac_try="$ac_link_default" | |
3159 | case "(($ac_try" in | |
3160 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3161 | *) ac_try_echo=$ac_try;; | |
3162 | esac | |
3163 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3164 | $as_echo "$ac_try_echo"; } >&5 | |
3165 | (eval "$ac_link_default") 2>&5 | |
3166 | ac_status=$? | |
3167 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3168 | test $ac_status = 0; }; then : | |
3169 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3170 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3171 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3172 | # so that the user can short-circuit this test for compilers unknown to | |
3173 | # Autoconf. | |
3174 | for ac_file in $ac_files '' | |
bec39cab AC |
3175 | do |
3176 | test -f "$ac_file" || continue | |
3177 | case $ac_file in | |
81ecdfbb | 3178 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3179 | ;; |
3180 | [ab].out ) | |
3181 | # We found the default executable, but exeext='' is most | |
3182 | # certainly right. | |
3183 | break;; | |
3184 | *.* ) | |
81ecdfbb RW |
3185 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3186 | then :; else | |
3187 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3188 | fi | |
3189 | # We set ac_cv_exeext here because the later test for it is not | |
3190 | # safe: cross compilers may not add the suffix if given an `-o' | |
3191 | # argument, so we may need to know it at that point already. | |
3192 | # Even if this section looks crufty: it has the advantage of | |
3193 | # actually working. | |
b4e70030 JB |
3194 | break;; |
3195 | * ) | |
3196 | break;; | |
bec39cab AC |
3197 | esac |
3198 | done | |
81ecdfbb RW |
3199 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3200 | ||
bec39cab | 3201 | else |
81ecdfbb RW |
3202 | ac_file='' |
3203 | fi | |
3204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3205 | $as_echo "$ac_file" >&6; } | |
3206 | if test -z "$ac_file"; then : | |
3207 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3208 | sed 's/^/| /' conftest.$ac_ext >&5 |
3209 | ||
81ecdfbb RW |
3210 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3211 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3212 | { as_fn_set_status 77 | |
3213 | as_fn_error "C compiler cannot create executables | |
3214 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3215 | fi |
b4e70030 | 3216 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3217 | |
81ecdfbb | 3218 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3219 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3221 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3222 | # If not cross compiling, check that we can run a simple program. |
3223 | if test "$cross_compiling" != yes; then | |
3224 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3225 | { { case "(($ac_try" in |
3226 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3227 | *) ac_try_echo=$ac_try;; | |
3228 | esac | |
3229 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3230 | $as_echo "$ac_try_echo"; } >&5 | |
3231 | (eval "$ac_try") 2>&5 | |
bec39cab | 3232 | ac_status=$? |
81ecdfbb RW |
3233 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3234 | test $ac_status = 0; }; }; then | |
bec39cab | 3235 | cross_compiling=no |
c906108c | 3236 | else |
bec39cab AC |
3237 | if test "$cross_compiling" = maybe; then |
3238 | cross_compiling=yes | |
3239 | else | |
81ecdfbb RW |
3240 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3241 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3242 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3243 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3244 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3245 | fi |
c906108c | 3246 | fi |
bec39cab | 3247 | fi |
81ecdfbb RW |
3248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3249 | $as_echo "yes" >&6; } | |
bec39cab | 3250 | |
81ecdfbb | 3251 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3252 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3253 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3254 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3256 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3258 | $as_echo "$cross_compiling" >&6; } | |
3259 | ||
3260 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3261 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3262 | if { { ac_try="$ac_link" | |
3263 | case "(($ac_try" in | |
3264 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3265 | *) ac_try_echo=$ac_try;; | |
3266 | esac | |
3267 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3268 | $as_echo "$ac_try_echo"; } >&5 | |
3269 | (eval "$ac_link") 2>&5 | |
bec39cab | 3270 | ac_status=$? |
81ecdfbb RW |
3271 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3272 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3273 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3274 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3275 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3276 | # `rm'. | |
3277 | for ac_file in conftest.exe conftest conftest.*; do | |
3278 | test -f "$ac_file" || continue | |
3279 | case $ac_file in | |
81ecdfbb | 3280 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3281 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3282 | break;; |
3283 | * ) break;; | |
3284 | esac | |
3285 | done | |
c906108c | 3286 | else |
81ecdfbb RW |
3287 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3288 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3289 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3290 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3291 | fi |
b4e70030 | 3292 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3294 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3295 | |
b4e70030 | 3296 | rm -f conftest.$ac_ext |
bec39cab AC |
3297 | EXEEXT=$ac_cv_exeext |
3298 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3300 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3301 | if test "${ac_cv_objext+set}" = set; then : | |
3302 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3303 | else |
81ecdfbb | 3304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3305 | /* end confdefs.h. */ |
3306 | ||
3307 | int | |
3308 | main () | |
3309 | { | |
3310 | ||
3311 | ; | |
3312 | return 0; | |
3313 | } | |
3314 | _ACEOF | |
3315 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3316 | if { { ac_try="$ac_compile" |
3317 | case "(($ac_try" in | |
3318 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3319 | *) ac_try_echo=$ac_try;; | |
3320 | esac | |
3321 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3322 | $as_echo "$ac_try_echo"; } >&5 | |
3323 | (eval "$ac_compile") 2>&5 | |
3324 | ac_status=$? | |
3325 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3326 | test $ac_status = 0; }; then : | |
3327 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3328 | test -f "$ac_file" || continue; | |
bec39cab | 3329 | case $ac_file in |
81ecdfbb | 3330 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3331 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3332 | break;; | |
3333 | esac | |
3334 | done | |
c906108c | 3335 | else |
81ecdfbb | 3336 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3337 | sed 's/^/| /' conftest.$ac_ext >&5 |
3338 | ||
81ecdfbb RW |
3339 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3340 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3341 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3342 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3343 | fi |
b4e70030 | 3344 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3345 | fi |
81ecdfbb RW |
3346 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3347 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3348 | OBJEXT=$ac_cv_objext |
3349 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3350 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3351 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3352 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3353 | $as_echo_n "(cached) " >&6 | |
c906108c | 3354 | else |
81ecdfbb | 3355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3356 | /* end confdefs.h. */ |
3357 | ||
3358 | int | |
3359 | main () | |
3360 | { | |
3361 | #ifndef __GNUC__ | |
3362 | choke me | |
3363 | #endif | |
3364 | ||
3365 | ; | |
3366 | return 0; | |
3367 | } | |
3368 | _ACEOF | |
81ecdfbb | 3369 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3370 | ac_compiler_gnu=yes |
3371 | else | |
81ecdfbb | 3372 | ac_compiler_gnu=no |
bec39cab | 3373 | fi |
81ecdfbb | 3374 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3375 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3376 | ||
3377 | fi | |
81ecdfbb RW |
3378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3379 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3380 | if test $ac_compiler_gnu = yes; then | |
3381 | GCC=yes | |
3382 | else | |
3383 | GCC= | |
3384 | fi | |
bec39cab AC |
3385 | ac_test_CFLAGS=${CFLAGS+set} |
3386 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3388 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3389 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3390 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3391 | else |
81ecdfbb RW |
3392 | ac_save_c_werror_flag=$ac_c_werror_flag |
3393 | ac_c_werror_flag=yes | |
3394 | ac_cv_prog_cc_g=no | |
3395 | CFLAGS="-g" | |
3396 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3397 | /* end confdefs.h. */ |
3398 | ||
3399 | int | |
3400 | main () | |
3401 | { | |
3402 | ||
3403 | ; | |
3404 | return 0; | |
3405 | } | |
3406 | _ACEOF | |
81ecdfbb | 3407 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3408 | ac_cv_prog_cc_g=yes |
3409 | else | |
81ecdfbb RW |
3410 | CFLAGS="" |
3411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3412 | /* end confdefs.h. */ | |
3413 | ||
3414 | int | |
3415 | main () | |
3416 | { | |
3417 | ||
3418 | ; | |
3419 | return 0; | |
3420 | } | |
3421 | _ACEOF | |
3422 | if ac_fn_c_try_compile "$LINENO"; then : | |
3423 | ||
3424 | else | |
3425 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3426 | CFLAGS="-g" | |
3427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3428 | /* end confdefs.h. */ | |
3429 | ||
3430 | int | |
3431 | main () | |
3432 | { | |
c906108c | 3433 | |
81ecdfbb RW |
3434 | ; |
3435 | return 0; | |
3436 | } | |
3437 | _ACEOF | |
3438 | if ac_fn_c_try_compile "$LINENO"; then : | |
3439 | ac_cv_prog_cc_g=yes | |
3440 | fi | |
3441 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3442 | fi | |
3443 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3444 | fi |
81ecdfbb RW |
3445 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3446 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3447 | fi |
81ecdfbb RW |
3448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3449 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3450 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3451 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3452 | elif test $ac_cv_prog_cc_g = yes; then |
3453 | if test "$GCC" = yes; then | |
3454 | CFLAGS="-g -O2" | |
3455 | else | |
3456 | CFLAGS="-g" | |
3457 | fi | |
3458 | else | |
3459 | if test "$GCC" = yes; then | |
3460 | CFLAGS="-O2" | |
3461 | else | |
3462 | CFLAGS= | |
3463 | fi | |
3464 | fi | |
81ecdfbb RW |
3465 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3466 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3467 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3468 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3469 | else |
81ecdfbb | 3470 | ac_cv_prog_cc_c89=no |
bec39cab | 3471 | ac_save_CC=$CC |
81ecdfbb | 3472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3473 | /* end confdefs.h. */ |
c906108c SS |
3474 | #include <stdarg.h> |
3475 | #include <stdio.h> | |
3476 | #include <sys/types.h> | |
3477 | #include <sys/stat.h> | |
3478 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3479 | struct buf { int x; }; | |
3480 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3481 | static char *e (p, i) | |
3482 | char **p; | |
3483 | int i; | |
3484 | { | |
3485 | return p[i]; | |
3486 | } | |
3487 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3488 | { | |
3489 | char *s; | |
3490 | va_list v; | |
3491 | va_start (v,p); | |
3492 | s = g (p, va_arg (v,int)); | |
3493 | va_end (v); | |
3494 | return s; | |
3495 | } | |
bec39cab AC |
3496 | |
3497 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3498 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3499 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3500 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3501 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3502 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3503 | that's true only with -std. */ |
bec39cab AC |
3504 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3505 | ||
81ecdfbb RW |
3506 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3507 | inside strings and character constants. */ | |
3508 | #define FOO(x) 'x' | |
3509 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3510 | ||
c906108c SS |
3511 | int test (int i, double x); |
3512 | struct s1 {int (*f) (int a);}; | |
3513 | struct s2 {int (*f) (double a);}; | |
3514 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3515 | int argc; | |
3516 | char **argv; | |
bec39cab AC |
3517 | int |
3518 | main () | |
3519 | { | |
c906108c | 3520 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3521 | ; |
3522 | return 0; | |
3523 | } | |
3524 | _ACEOF | |
81ecdfbb RW |
3525 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3526 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3527 | do |
3528 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3529 | if ac_fn_c_try_compile "$LINENO"; then : |
3530 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3531 | fi |
81ecdfbb RW |
3532 | rm -f core conftest.err conftest.$ac_objext |
3533 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3534 | done |
81ecdfbb | 3535 | rm -f conftest.$ac_ext |
bec39cab | 3536 | CC=$ac_save_CC |
c906108c SS |
3537 | |
3538 | fi | |
81ecdfbb RW |
3539 | # AC_CACHE_VAL |
3540 | case "x$ac_cv_prog_cc_c89" in | |
3541 | x) | |
3542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3543 | $as_echo "none needed" >&6; } ;; | |
3544 | xno) | |
3545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3546 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3547 | *) |
81ecdfbb RW |
3548 | CC="$CC $ac_cv_prog_cc_c89" |
3549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3550 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3551 | esac |
81ecdfbb | 3552 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3553 | |
b4e70030 JB |
3554 | fi |
3555 | ||
bec39cab AC |
3556 | ac_ext=c |
3557 | ac_cpp='$CPP $CPPFLAGS' | |
3558 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3559 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3560 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3561 | |
3bc3d82a PA |
3562 | ac_ext=cpp |
3563 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3564 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3565 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3566 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3567 | if test -z "$CXX"; then | |
3568 | if test -n "$CCC"; then | |
3569 | CXX=$CCC | |
3570 | else | |
3571 | if test -n "$ac_tool_prefix"; then | |
3572 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3573 | do | |
3574 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3575 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3577 | $as_echo_n "checking for $ac_word... " >&6; } | |
3578 | if test "${ac_cv_prog_CXX+set}" = set; then : | |
3579 | $as_echo_n "(cached) " >&6 | |
3580 | else | |
3581 | if test -n "$CXX"; then | |
3582 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3583 | else | |
3584 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3585 | for as_dir in $PATH | |
3586 | do | |
3587 | IFS=$as_save_IFS | |
3588 | test -z "$as_dir" && as_dir=. | |
3589 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3590 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3591 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
3592 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3593 | break 2 | |
3594 | fi | |
3595 | done | |
3596 | done | |
3597 | IFS=$as_save_IFS | |
3598 | ||
3599 | fi | |
3600 | fi | |
3601 | CXX=$ac_cv_prog_CXX | |
3602 | if test -n "$CXX"; then | |
3603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3604 | $as_echo "$CXX" >&6; } | |
3605 | else | |
3606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3607 | $as_echo "no" >&6; } | |
3608 | fi | |
3609 | ||
3610 | ||
3611 | test -n "$CXX" && break | |
3612 | done | |
3613 | fi | |
3614 | if test -z "$CXX"; then | |
3615 | ac_ct_CXX=$CXX | |
3616 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3617 | do | |
3618 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3619 | set dummy $ac_prog; ac_word=$2 | |
3620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3621 | $as_echo_n "checking for $ac_word... " >&6; } | |
3622 | if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : | |
3623 | $as_echo_n "(cached) " >&6 | |
3624 | else | |
3625 | if test -n "$ac_ct_CXX"; then | |
3626 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3627 | else | |
3628 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3629 | for as_dir in $PATH | |
3630 | do | |
3631 | IFS=$as_save_IFS | |
3632 | test -z "$as_dir" && as_dir=. | |
3633 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3634 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3635 | ac_cv_prog_ac_ct_CXX="$ac_prog" | |
3636 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3637 | break 2 | |
3638 | fi | |
3639 | done | |
3640 | done | |
3641 | IFS=$as_save_IFS | |
3642 | ||
3643 | fi | |
3644 | fi | |
3645 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3646 | if test -n "$ac_ct_CXX"; then | |
3647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3648 | $as_echo "$ac_ct_CXX" >&6; } | |
3649 | else | |
3650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3651 | $as_echo "no" >&6; } | |
3652 | fi | |
3653 | ||
3654 | ||
3655 | test -n "$ac_ct_CXX" && break | |
3656 | done | |
3657 | ||
3658 | if test "x$ac_ct_CXX" = x; then | |
3659 | CXX="g++" | |
3660 | else | |
3661 | case $cross_compiling:$ac_tool_warned in | |
3662 | yes:) | |
3663 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3664 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3665 | ac_tool_warned=yes ;; | |
3666 | esac | |
3667 | CXX=$ac_ct_CXX | |
3668 | fi | |
3669 | fi | |
3670 | ||
3671 | fi | |
3672 | fi | |
3673 | # Provide some information about the compiler. | |
3674 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3675 | set X $ac_compile | |
3676 | ac_compiler=$2 | |
3677 | for ac_option in --version -v -V -qversion; do | |
3678 | { { ac_try="$ac_compiler $ac_option >&5" | |
3679 | case "(($ac_try" in | |
3680 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3681 | *) ac_try_echo=$ac_try;; | |
3682 | esac | |
3683 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3684 | $as_echo "$ac_try_echo"; } >&5 | |
3685 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3686 | ac_status=$? | |
3687 | if test -s conftest.err; then | |
3688 | sed '10a\ | |
3689 | ... rest of stderr output deleted ... | |
3690 | 10q' conftest.err >conftest.er1 | |
3691 | cat conftest.er1 >&5 | |
3692 | rm -f conftest.er1 conftest.err | |
3693 | fi | |
3694 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3695 | test $ac_status = 0; } | |
3696 | done | |
3697 | ||
3698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3699 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
3700 | if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : | |
3701 | $as_echo_n "(cached) " >&6 | |
3702 | else | |
3703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3704 | /* end confdefs.h. */ | |
3705 | ||
3706 | int | |
3707 | main () | |
3708 | { | |
3709 | #ifndef __GNUC__ | |
3710 | choke me | |
3711 | #endif | |
3712 | ||
3713 | ; | |
3714 | return 0; | |
3715 | } | |
3716 | _ACEOF | |
3717 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3718 | ac_compiler_gnu=yes | |
3719 | else | |
3720 | ac_compiler_gnu=no | |
3721 | fi | |
3722 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3723 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3724 | ||
3725 | fi | |
3726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3727 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3728 | if test $ac_compiler_gnu = yes; then | |
3729 | GXX=yes | |
3730 | else | |
3731 | GXX= | |
3732 | fi | |
3733 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3734 | ac_save_CXXFLAGS=$CXXFLAGS | |
3735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3736 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
3737 | if test "${ac_cv_prog_cxx_g+set}" = set; then : | |
3738 | $as_echo_n "(cached) " >&6 | |
3739 | else | |
3740 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3741 | ac_cxx_werror_flag=yes | |
3742 | ac_cv_prog_cxx_g=no | |
3743 | CXXFLAGS="-g" | |
3744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3745 | /* end confdefs.h. */ | |
3746 | ||
3747 | int | |
3748 | main () | |
3749 | { | |
3750 | ||
3751 | ; | |
3752 | return 0; | |
3753 | } | |
3754 | _ACEOF | |
3755 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3756 | ac_cv_prog_cxx_g=yes | |
3757 | else | |
3758 | CXXFLAGS="" | |
3759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3760 | /* end confdefs.h. */ | |
3761 | ||
3762 | int | |
3763 | main () | |
3764 | { | |
3765 | ||
3766 | ; | |
3767 | return 0; | |
3768 | } | |
3769 | _ACEOF | |
3770 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3771 | ||
3772 | else | |
3773 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3774 | CXXFLAGS="-g" | |
3775 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3776 | /* end confdefs.h. */ | |
3777 | ||
3778 | int | |
3779 | main () | |
3780 | { | |
3781 | ||
3782 | ; | |
3783 | return 0; | |
3784 | } | |
3785 | _ACEOF | |
3786 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3787 | ac_cv_prog_cxx_g=yes | |
3788 | fi | |
3789 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3790 | fi | |
3791 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3792 | fi | |
3793 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3794 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3795 | fi | |
3796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3797 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3798 | if test "$ac_test_CXXFLAGS" = set; then | |
3799 | CXXFLAGS=$ac_save_CXXFLAGS | |
3800 | elif test $ac_cv_prog_cxx_g = yes; then | |
3801 | if test "$GXX" = yes; then | |
3802 | CXXFLAGS="-g -O2" | |
3803 | else | |
3804 | CXXFLAGS="-g" | |
3805 | fi | |
3806 | else | |
3807 | if test "$GXX" = yes; then | |
3808 | CXXFLAGS="-O2" | |
3809 | else | |
3810 | CXXFLAGS= | |
3811 | fi | |
3812 | fi | |
3813 | ac_ext=c | |
3814 | ac_cpp='$CPP $CPPFLAGS' | |
3815 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3816 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3817 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3818 | ||
3819 | ||
60ca704f | 3820 | |
bec39cab AC |
3821 | ac_ext=c |
3822 | ac_cpp='$CPP $CPPFLAGS' | |
3823 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3824 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3825 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3827 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3828 | # On Suns, sometimes $CPP names a directory. |
3829 | if test -n "$CPP" && test -d "$CPP"; then | |
3830 | CPP= | |
8bb2c122 | 3831 | fi |
bec39cab | 3832 | if test -z "$CPP"; then |
81ecdfbb RW |
3833 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3834 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3835 | else |
3836 | # Double quotes because CPP needs to be expanded | |
3837 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3838 | do | |
3839 | ac_preproc_ok=false | |
3840 | for ac_c_preproc_warn_flag in '' yes | |
3841 | do | |
3842 | # Use a header file that comes with gcc, so configuring glibc | |
3843 | # with a fresh cross-compiler works. | |
3844 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3845 | # <limits.h> exists even on freestanding compilers. | |
3846 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3847 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3849 | /* end confdefs.h. */ |
3850 | #ifdef __STDC__ | |
3851 | # include <limits.h> | |
3852 | #else | |
3853 | # include <assert.h> | |
3854 | #endif | |
3855 | Syntax error | |
3856 | _ACEOF | |
81ecdfbb | 3857 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3858 | |
81ecdfbb | 3859 | else |
bec39cab AC |
3860 | # Broken: fails on valid input. |
3861 | continue | |
3862 | fi | |
3863 | rm -f conftest.err conftest.$ac_ext | |
3864 | ||
81ecdfbb | 3865 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3866 | # can be detected and how. |
81ecdfbb | 3867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3868 | /* end confdefs.h. */ |
3869 | #include <ac_nonexistent.h> | |
3870 | _ACEOF | |
81ecdfbb | 3871 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3872 | # Broken: success on invalid input. |
3873 | continue | |
8bb2c122 | 3874 | else |
bec39cab AC |
3875 | # Passes both tests. |
3876 | ac_preproc_ok=: | |
3877 | break | |
8bb2c122 | 3878 | fi |
bec39cab | 3879 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3880 | |
bec39cab AC |
3881 | done |
3882 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3883 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3884 | if $ac_preproc_ok; then : |
bec39cab AC |
3885 | break |
3886 | fi | |
8bb2c122 | 3887 | |
bec39cab AC |
3888 | done |
3889 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3890 | |
c906108c | 3891 | fi |
bec39cab AC |
3892 | CPP=$ac_cv_prog_CPP |
3893 | else | |
3894 | ac_cv_prog_CPP=$CPP | |
c906108c | 3895 | fi |
81ecdfbb RW |
3896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3897 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3898 | ac_preproc_ok=false |
3899 | for ac_c_preproc_warn_flag in '' yes | |
3900 | do | |
3901 | # Use a header file that comes with gcc, so configuring glibc | |
3902 | # with a fresh cross-compiler works. | |
3903 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3904 | # <limits.h> exists even on freestanding compilers. | |
3905 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3906 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3908 | /* end confdefs.h. */ |
3909 | #ifdef __STDC__ | |
3910 | # include <limits.h> | |
3911 | #else | |
3912 | # include <assert.h> | |
3913 | #endif | |
3914 | Syntax error | |
3915 | _ACEOF | |
81ecdfbb | 3916 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3917 | |
81ecdfbb | 3918 | else |
bec39cab AC |
3919 | # Broken: fails on valid input. |
3920 | continue | |
3921 | fi | |
3922 | rm -f conftest.err conftest.$ac_ext | |
3923 | ||
81ecdfbb | 3924 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3925 | # can be detected and how. |
81ecdfbb | 3926 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3927 | /* end confdefs.h. */ |
3928 | #include <ac_nonexistent.h> | |
3929 | _ACEOF | |
81ecdfbb | 3930 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3931 | # Broken: success on invalid input. |
3932 | continue | |
c906108c | 3933 | else |
bec39cab AC |
3934 | # Passes both tests. |
3935 | ac_preproc_ok=: | |
3936 | break | |
c906108c | 3937 | fi |
bec39cab | 3938 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3939 | |
bec39cab AC |
3940 | done |
3941 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3942 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3943 | if $ac_preproc_ok; then : |
3944 | ||
c906108c | 3945 | else |
81ecdfbb RW |
3946 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3947 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3948 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3949 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3950 | fi |
c906108c | 3951 | |
bec39cab AC |
3952 | ac_ext=c |
3953 | ac_cpp='$CPP $CPPFLAGS' | |
3954 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3955 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3956 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3957 | ||
3958 | ||
81ecdfbb RW |
3959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3960 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3961 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3962 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3963 | else |
81ecdfbb RW |
3964 | if test -z "$GREP"; then |
3965 | ac_path_GREP_found=false | |
3966 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3967 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3968 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3969 | do | |
3970 | IFS=$as_save_IFS | |
3971 | test -z "$as_dir" && as_dir=. | |
3972 | for ac_prog in grep ggrep; do | |
3973 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3974 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3975 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3976 | # Check for GNU ac_path_GREP and select it if it is found. | |
3977 | # Check for GNU $ac_path_GREP | |
3978 | case `"$ac_path_GREP" --version 2>&1` in | |
3979 | *GNU*) | |
3980 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3981 | *) | |
3982 | ac_count=0 | |
3983 | $as_echo_n 0123456789 >"conftest.in" | |
3984 | while : | |
3985 | do | |
3986 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3987 | mv "conftest.tmp" "conftest.in" | |
3988 | cp "conftest.in" "conftest.nl" | |
3989 | $as_echo 'GREP' >> "conftest.nl" | |
3990 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3991 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3992 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3993 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3994 | # Best one so far, save it but keep looking for a better one | |
3995 | ac_cv_path_GREP="$ac_path_GREP" | |
3996 | ac_path_GREP_max=$ac_count | |
bec39cab | 3997 | fi |
81ecdfbb RW |
3998 | # 10*(2^10) chars as input seems more than enough |
3999 | test $ac_count -gt 10 && break | |
4000 | done | |
4001 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4002 | esac | |
bec39cab | 4003 | |
81ecdfbb RW |
4004 | $ac_path_GREP_found && break 3 |
4005 | done | |
4006 | done | |
4007 | done | |
4008 | IFS=$as_save_IFS | |
4009 | if test -z "$ac_cv_path_GREP"; then | |
4010 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4011 | fi | |
c906108c | 4012 | else |
81ecdfbb | 4013 | ac_cv_path_GREP=$GREP |
c906108c | 4014 | fi |
c906108c | 4015 | |
81ecdfbb RW |
4016 | fi |
4017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4018 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4019 | GREP="$ac_cv_path_GREP" | |
c906108c | 4020 | |
c906108c | 4021 | |
81ecdfbb RW |
4022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4023 | $as_echo_n "checking for egrep... " >&6; } | |
4024 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
4025 | $as_echo_n "(cached) " >&6 | |
783e057b | 4026 | else |
81ecdfbb RW |
4027 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4028 | then ac_cv_path_EGREP="$GREP -E" | |
4029 | else | |
4030 | if test -z "$EGREP"; then | |
4031 | ac_path_EGREP_found=false | |
4032 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4033 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4034 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4035 | do |
4036 | IFS=$as_save_IFS | |
4037 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4038 | for ac_prog in egrep; do |
4039 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4040 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4041 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
4042 | # Check for GNU ac_path_EGREP and select it if it is found. | |
4043 | # Check for GNU $ac_path_EGREP | |
4044 | case `"$ac_path_EGREP" --version 2>&1` in | |
4045 | *GNU*) | |
4046 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4047 | *) | |
4048 | ac_count=0 | |
4049 | $as_echo_n 0123456789 >"conftest.in" | |
4050 | while : | |
4051 | do | |
4052 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4053 | mv "conftest.tmp" "conftest.in" | |
4054 | cp "conftest.in" "conftest.nl" | |
4055 | $as_echo 'EGREP' >> "conftest.nl" | |
4056 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4057 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4058 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4059 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4060 | # Best one so far, save it but keep looking for a better one | |
4061 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4062 | ac_path_EGREP_max=$ac_count | |
4063 | fi | |
4064 | # 10*(2^10) chars as input seems more than enough | |
4065 | test $ac_count -gt 10 && break | |
4066 | done | |
4067 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4068 | esac | |
bec39cab | 4069 | |
81ecdfbb RW |
4070 | $ac_path_EGREP_found && break 3 |
4071 | done | |
4072 | done | |
4073 | done | |
4074 | IFS=$as_save_IFS | |
4075 | if test -z "$ac_cv_path_EGREP"; then | |
4076 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 4077 | fi |
783e057b | 4078 | else |
81ecdfbb | 4079 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4080 | fi |
4081 | ||
81ecdfbb | 4082 | fi |
783e057b | 4083 | fi |
81ecdfbb RW |
4084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4085 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4086 | EGREP="$ac_cv_path_EGREP" | |
4087 | ||
783e057b | 4088 | |
81ecdfbb RW |
4089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4090 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
4091 | if test "${ac_cv_header_stdc+set}" = set; then : | |
4092 | $as_echo_n "(cached) " >&6 | |
783e057b | 4093 | else |
81ecdfbb | 4094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4095 | /* end confdefs.h. */ |
783e057b | 4096 | #include <stdlib.h> |
bec39cab | 4097 | #include <stdarg.h> |
783e057b DJ |
4098 | #include <string.h> |
4099 | #include <float.h> | |
c906108c | 4100 | |
bec39cab AC |
4101 | int |
4102 | main () | |
4103 | { | |
c906108c | 4104 | |
bec39cab AC |
4105 | ; |
4106 | return 0; | |
4107 | } | |
4108 | _ACEOF | |
81ecdfbb | 4109 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4110 | ac_cv_header_stdc=yes |
c906108c | 4111 | else |
81ecdfbb | 4112 | ac_cv_header_stdc=no |
c906108c | 4113 | fi |
81ecdfbb | 4114 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4115 | |
783e057b DJ |
4116 | if test $ac_cv_header_stdc = yes; then |
4117 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4118 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4119 | /* end confdefs.h. */ |
4120 | #include <string.h> | |
c906108c | 4121 | |
783e057b DJ |
4122 | _ACEOF |
4123 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4124 | $EGREP "memchr" >/dev/null 2>&1; then : |
4125 | ||
c906108c | 4126 | else |
783e057b | 4127 | ac_cv_header_stdc=no |
c906108c | 4128 | fi |
783e057b | 4129 | rm -f conftest* |
c906108c SS |
4130 | |
4131 | fi | |
4132 | ||
783e057b DJ |
4133 | if test $ac_cv_header_stdc = yes; then |
4134 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4136 | /* end confdefs.h. */ |
4137 | #include <stdlib.h> | |
bec39cab | 4138 | |
783e057b DJ |
4139 | _ACEOF |
4140 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4141 | $EGREP "free" >/dev/null 2>&1; then : |
4142 | ||
bec39cab | 4143 | else |
783e057b | 4144 | ac_cv_header_stdc=no |
bec39cab | 4145 | fi |
783e057b | 4146 | rm -f conftest* |
bec39cab AC |
4147 | |
4148 | fi | |
bec39cab | 4149 | |
783e057b DJ |
4150 | if test $ac_cv_header_stdc = yes; then |
4151 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4152 | if test "$cross_compiling" = yes; then : |
783e057b | 4153 | : |
bec39cab | 4154 | else |
81ecdfbb | 4155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4156 | /* end confdefs.h. */ |
4157 | #include <ctype.h> | |
81ecdfbb | 4158 | #include <stdlib.h> |
783e057b DJ |
4159 | #if ((' ' & 0x0FF) == 0x020) |
4160 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4161 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4162 | #else | |
4163 | # define ISLOWER(c) \ | |
4164 | (('a' <= (c) && (c) <= 'i') \ | |
4165 | || ('j' <= (c) && (c) <= 'r') \ | |
4166 | || ('s' <= (c) && (c) <= 'z')) | |
4167 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4168 | #endif | |
4169 | ||
4170 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4171 | int | |
4172 | main () | |
4173 | { | |
4174 | int i; | |
4175 | for (i = 0; i < 256; i++) | |
4176 | if (XOR (islower (i), ISLOWER (i)) | |
4177 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4178 | return 2; |
4179 | return 0; | |
783e057b DJ |
4180 | } |
4181 | _ACEOF | |
81ecdfbb | 4182 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4183 | |
81ecdfbb RW |
4184 | else |
4185 | ac_cv_header_stdc=no | |
783e057b | 4186 | fi |
81ecdfbb RW |
4187 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4188 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4189 | fi |
81ecdfbb | 4190 | |
783e057b DJ |
4191 | fi |
4192 | fi | |
81ecdfbb RW |
4193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4194 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4195 | if test $ac_cv_header_stdc = yes; then |
4196 | ||
81ecdfbb | 4197 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4198 | |
4199 | fi | |
4200 | ||
4201 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4202 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4203 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4204 | do : |
4205 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4206 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4207 | " | |
4208 | eval as_val=\$$as_ac_Header | |
4209 | if test "x$as_val" = x""yes; then : | |
783e057b | 4210 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4211 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4212 | _ACEOF |
4213 | ||
4214 | fi | |
4215 | ||
4216 | done | |
4217 | ||
4218 | ||
4219 | ||
81ecdfbb RW |
4220 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4221 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4222 | MINIX=yes |
4223 | else | |
4224 | MINIX= | |
4225 | fi | |
4226 | ||
4227 | ||
4228 | if test "$MINIX" = yes; then | |
4229 | ||
81ecdfbb | 4230 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4231 | |
4232 | ||
81ecdfbb | 4233 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4234 | |
4235 | ||
81ecdfbb | 4236 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4237 | |
4238 | fi | |
4239 | ||
4240 | ||
81ecdfbb RW |
4241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4242 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4243 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4244 | $as_echo_n "(cached) " >&6 | |
783e057b | 4245 | else |
81ecdfbb | 4246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4247 | /* end confdefs.h. */ |
4248 | ||
c971b7fa PA |
4249 | # define __EXTENSIONS__ 1 |
4250 | $ac_includes_default | |
783e057b DJ |
4251 | int |
4252 | main () | |
4253 | { | |
4254 | ||
4255 | ; | |
4256 | return 0; | |
4257 | } | |
4258 | _ACEOF | |
81ecdfbb | 4259 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4260 | ac_cv_safe_to_define___extensions__=yes |
4261 | else | |
81ecdfbb | 4262 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4263 | fi |
81ecdfbb | 4264 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4265 | fi |
81ecdfbb RW |
4266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4267 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4268 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4269 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4270 | |
81ecdfbb | 4271 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4272 | |
81ecdfbb | 4273 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4274 | |
81ecdfbb | 4275 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4276 | |
81ecdfbb | 4277 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4278 | |
4279 | ||
c971b7fa PA |
4280 | ac_aux_dir= |
4281 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
4282 | for ac_t in install-sh install.sh shtool; do | |
4283 | if test -f "$ac_dir/$ac_t"; then | |
4284 | ac_aux_dir=$ac_dir | |
4285 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4286 | break 2 | |
4287 | fi | |
4288 | done | |
4289 | done | |
4290 | if test -z "$ac_aux_dir"; then | |
4291 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
4292 | fi | |
770d76d7 | 4293 | |
c971b7fa PA |
4294 | # These three variables are undocumented and unsupported, |
4295 | # and are intended to be withdrawn in a future Autoconf release. | |
4296 | # They can cause serious problems if a builder's source tree is in a directory | |
4297 | # whose full name contains unusual characters. | |
4298 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4299 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4300 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4301 | |
770d76d7 | 4302 | |
c971b7fa PA |
4303 | # Make sure we can run config.sub. |
4304 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
4305 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 4306 | |
c971b7fa PA |
4307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4308 | $as_echo_n "checking build system type... " >&6; } | |
4309 | if test "${ac_cv_build+set}" = set; then : | |
4310 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 4311 | else |
c971b7fa PA |
4312 | ac_build_alias=$build_alias |
4313 | test "x$ac_build_alias" = x && | |
4314 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4315 | test "x$ac_build_alias" = x && | |
4316 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
4317 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
4318 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
4319 | ||
770d76d7 | 4320 | fi |
c971b7fa PA |
4321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4322 | $as_echo "$ac_cv_build" >&6; } | |
4323 | case $ac_cv_build in | |
4324 | *-*-*) ;; | |
4325 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 4326 | esac |
c971b7fa PA |
4327 | build=$ac_cv_build |
4328 | ac_save_IFS=$IFS; IFS='-' | |
4329 | set x $ac_cv_build | |
4330 | shift | |
4331 | build_cpu=$1 | |
4332 | build_vendor=$2 | |
4333 | shift; shift | |
4334 | # Remember, the first character of IFS is used to create $*, | |
4335 | # except with old shells: | |
4336 | build_os=$* | |
4337 | IFS=$ac_save_IFS | |
4338 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4339 | |
4340 | ||
c971b7fa PA |
4341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4342 | $as_echo_n "checking host system type... " >&6; } | |
4343 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
4344 | $as_echo_n "(cached) " >&6 |
4345 | else | |
c971b7fa PA |
4346 | if test "x$host_alias" = x; then |
4347 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4348 | else |
c971b7fa PA |
4349 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4350 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 4351 | fi |
81ecdfbb RW |
4352 | |
4353 | fi | |
c971b7fa PA |
4354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4355 | $as_echo "$ac_cv_host" >&6; } | |
4356 | case $ac_cv_host in | |
4357 | *-*-*) ;; | |
4358 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4359 | esac |
c971b7fa PA |
4360 | host=$ac_cv_host |
4361 | ac_save_IFS=$IFS; IFS='-' | |
4362 | set x $ac_cv_host | |
4363 | shift | |
4364 | host_cpu=$1 | |
4365 | host_vendor=$2 | |
4366 | shift; shift | |
4367 | # Remember, the first character of IFS is used to create $*, | |
4368 | # except with old shells: | |
4369 | host_os=$* | |
4370 | IFS=$ac_save_IFS | |
4371 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4372 | |
4373 | ||
4374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4375 | $as_echo_n "checking target system type... " >&6; } | |
4376 | if test "${ac_cv_target+set}" = set; then : | |
4377 | $as_echo_n "(cached) " >&6 | |
4378 | else | |
4379 | if test "x$target_alias" = x; then | |
4380 | ac_cv_target=$ac_cv_host | |
4381 | else | |
4382 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4383 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4384 | fi | |
4385 | ||
4386 | fi | |
4387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4388 | $as_echo "$ac_cv_target" >&6; } | |
4389 | case $ac_cv_target in | |
4390 | *-*-*) ;; | |
4391 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4392 | esac | |
4393 | target=$ac_cv_target | |
4394 | ac_save_IFS=$IFS; IFS='-' | |
4395 | set x $ac_cv_target | |
4396 | shift | |
4397 | target_cpu=$1 | |
4398 | target_vendor=$2 | |
4399 | shift; shift | |
4400 | # Remember, the first character of IFS is used to create $*, | |
4401 | # except with old shells: | |
4402 | target_os=$* | |
4403 | IFS=$ac_save_IFS | |
4404 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4405 | ||
4406 | ||
4407 | # The aliases save the names the user supplied, while $host etc. | |
4408 | # will get canonicalized. | |
4409 | test -n "$target_alias" && | |
4410 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4411 | NONENONEs,x,x, && | |
4412 | program_prefix=${target_alias}- | |
4413 | ||
4414 | # The tests for host and target for $enable_largefile require | |
4415 | # canonical names. | |
4416 | ||
4417 | ||
81ecdfbb | 4418 | |
da2f07f1 JK |
4419 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4420 | # even in directories otherwise not depending on the $plugins option. | |
4421 | ||
4422 | ||
2974be62 AM |
4423 | maybe_plugins=no |
4424 | for ac_header in dlfcn.h | |
4425 | do : | |
4426 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4427 | " | |
4428 | if test "x$ac_cv_header_dlfcn_h" = x""yes; then : | |
4429 | cat >>confdefs.h <<_ACEOF | |
4430 | #define HAVE_DLFCN_H 1 | |
4431 | _ACEOF | |
4432 | maybe_plugins=yes | |
4433 | fi | |
4434 | ||
4435 | done | |
4436 | ||
4437 | for ac_header in windows.h | |
4438 | do : | |
4439 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4440 | " | |
4441 | if test "x$ac_cv_header_windows_h" = x""yes; then : | |
4442 | cat >>confdefs.h <<_ACEOF | |
4443 | #define HAVE_WINDOWS_H 1 | |
4444 | _ACEOF | |
4445 | maybe_plugins=yes | |
4446 | fi | |
4447 | ||
4448 | done | |
4449 | ||
4450 | ||
4451 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4452 | if test "${enable_plugins+set}" = set; then : |
4453 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4454 | no) plugins=no ;; |
4455 | *) plugins=yes | |
4456 | if test "$maybe_plugins" != "yes" ; then | |
4457 | as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
4458 | fi ;; | |
4459 | esac | |
da2f07f1 | 4460 | else |
2974be62 AM |
4461 | plugins=$maybe_plugins |
4462 | ||
da2f07f1 JK |
4463 | fi |
4464 | ||
2974be62 AM |
4465 | if test "$plugins" = "yes"; then |
4466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 | |
4467 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
4468 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4469 | $as_echo_n "(cached) " >&6 | |
4470 | else | |
4471 | ac_func_search_save_LIBS=$LIBS | |
4472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4473 | /* end confdefs.h. */ | |
4474 | ||
4475 | /* Override any GCC internal prototype to avoid an error. | |
4476 | Use char because int might match the return type of a GCC | |
4477 | builtin and then its argument prototype would still apply. */ | |
4478 | #ifdef __cplusplus | |
4479 | extern "C" | |
4480 | #endif | |
4481 | char dlopen (); | |
4482 | int | |
4483 | main () | |
4484 | { | |
4485 | return dlopen (); | |
4486 | ; | |
4487 | return 0; | |
4488 | } | |
4489 | _ACEOF | |
4490 | for ac_lib in '' dl; do | |
4491 | if test -z "$ac_lib"; then | |
4492 | ac_res="none required" | |
4493 | else | |
4494 | ac_res=-l$ac_lib | |
4495 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4496 | fi | |
4497 | if ac_fn_c_try_link "$LINENO"; then : | |
4498 | ac_cv_search_dlopen=$ac_res | |
4499 | fi | |
4500 | rm -f core conftest.err conftest.$ac_objext \ | |
4501 | conftest$ac_exeext | |
4502 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4503 | break | |
4504 | fi | |
4505 | done | |
4506 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4507 | ||
4508 | else | |
4509 | ac_cv_search_dlopen=no | |
4510 | fi | |
4511 | rm conftest.$ac_ext | |
4512 | LIBS=$ac_func_search_save_LIBS | |
4513 | fi | |
4514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
4515 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
4516 | ac_res=$ac_cv_search_dlopen | |
4517 | if test "$ac_res" != no; then : | |
4518 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4519 | ||
4520 | fi | |
4521 | ||
4522 | fi | |
da2f07f1 JK |
4523 | |
4524 | ||
4525 | case "${host}" in | |
4526 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4527 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4528 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4529 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4530 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4531 | # large-file support through the --enable-largefile switch, disable | |
4532 | # large-file support in favor of procfs support. | |
4533 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4534 | && : ${enable_largefile="no"} | |
4535 | ;; | |
4536 | esac | |
4537 | ||
4538 | # Check whether --enable-largefile was given. | |
4539 | if test "${enable_largefile+set}" = set; then : | |
4540 | enableval=$enable_largefile; | |
4541 | fi | |
4542 | ||
4543 | if test "$enable_largefile" != no; then | |
4544 | ||
4545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4546 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4547 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4548 | $as_echo_n "(cached) " >&6 | |
4549 | else | |
4550 | ac_cv_sys_largefile_CC=no | |
4551 | if test "$GCC" != yes; then | |
4552 | ac_save_CC=$CC | |
4553 | while :; do | |
4554 | # IRIX 6.2 and later do not support large files by default, | |
4555 | # so use the C compiler's -n32 option if that helps. | |
4556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4557 | /* end confdefs.h. */ | |
4558 | #include <sys/types.h> | |
4559 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4560 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4561 | since some C++ compilers masquerading as C compilers | |
4562 | incorrectly reject 9223372036854775807. */ | |
4563 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4564 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4565 | && LARGE_OFF_T % 2147483647 == 1) | |
4566 | ? 1 : -1]; | |
4567 | int | |
4568 | main () | |
4569 | { | |
4570 | ||
4571 | ; | |
4572 | return 0; | |
4573 | } | |
4574 | _ACEOF | |
4575 | if ac_fn_c_try_compile "$LINENO"; then : | |
4576 | break | |
4577 | fi | |
4578 | rm -f core conftest.err conftest.$ac_objext | |
4579 | CC="$CC -n32" | |
4580 | if ac_fn_c_try_compile "$LINENO"; then : | |
4581 | ac_cv_sys_largefile_CC=' -n32'; break | |
4582 | fi | |
4583 | rm -f core conftest.err conftest.$ac_objext | |
4584 | break | |
4585 | done | |
4586 | CC=$ac_save_CC | |
4587 | rm -f conftest.$ac_ext | |
4588 | fi | |
4589 | fi | |
4590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4591 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4592 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4593 | CC=$CC$ac_cv_sys_largefile_CC | |
4594 | fi | |
4595 | ||
4596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4597 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4598 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4599 | $as_echo_n "(cached) " >&6 | |
4600 | else | |
4601 | while :; do | |
4602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4603 | /* end confdefs.h. */ | |
4604 | #include <sys/types.h> | |
4605 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4606 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4607 | since some C++ compilers masquerading as C compilers | |
4608 | incorrectly reject 9223372036854775807. */ | |
4609 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4610 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4611 | && LARGE_OFF_T % 2147483647 == 1) | |
4612 | ? 1 : -1]; | |
4613 | int | |
4614 | main () | |
4615 | { | |
4616 | ||
4617 | ; | |
4618 | return 0; | |
4619 | } | |
4620 | _ACEOF | |
4621 | if ac_fn_c_try_compile "$LINENO"; then : | |
4622 | ac_cv_sys_file_offset_bits=no; break | |
4623 | fi | |
4624 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4625 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4626 | /* end confdefs.h. */ | |
4627 | #define _FILE_OFFSET_BITS 64 | |
4628 | #include <sys/types.h> | |
4629 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4630 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4631 | since some C++ compilers masquerading as C compilers | |
4632 | incorrectly reject 9223372036854775807. */ | |
4633 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4634 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4635 | && LARGE_OFF_T % 2147483647 == 1) | |
4636 | ? 1 : -1]; | |
4637 | int | |
4638 | main () | |
4639 | { | |
4640 | ||
4641 | ; | |
4642 | return 0; | |
4643 | } | |
4644 | _ACEOF | |
4645 | if ac_fn_c_try_compile "$LINENO"; then : | |
4646 | ac_cv_sys_file_offset_bits=64; break | |
4647 | fi | |
4648 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4649 | ac_cv_sys_file_offset_bits=unknown | |
4650 | break | |
4651 | done | |
4652 | fi | |
4653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4654 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4655 | case $ac_cv_sys_file_offset_bits in #( | |
4656 | no | unknown) ;; | |
4657 | *) | |
4658 | cat >>confdefs.h <<_ACEOF | |
4659 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4660 | _ACEOF | |
4661 | ;; | |
4662 | esac | |
4663 | rm -rf conftest* | |
4664 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4666 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4667 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4668 | $as_echo_n "(cached) " >&6 | |
4669 | else | |
4670 | while :; do | |
4671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4672 | /* end confdefs.h. */ | |
4673 | #include <sys/types.h> | |
4674 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4675 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4676 | since some C++ compilers masquerading as C compilers | |
4677 | incorrectly reject 9223372036854775807. */ | |
4678 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4679 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4680 | && LARGE_OFF_T % 2147483647 == 1) | |
4681 | ? 1 : -1]; | |
4682 | int | |
4683 | main () | |
4684 | { | |
4685 | ||
4686 | ; | |
4687 | return 0; | |
4688 | } | |
4689 | _ACEOF | |
4690 | if ac_fn_c_try_compile "$LINENO"; then : | |
4691 | ac_cv_sys_large_files=no; break | |
4692 | fi | |
4693 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4695 | /* end confdefs.h. */ | |
4696 | #define _LARGE_FILES 1 | |
4697 | #include <sys/types.h> | |
4698 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4699 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4700 | since some C++ compilers masquerading as C compilers | |
4701 | incorrectly reject 9223372036854775807. */ | |
4702 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4703 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4704 | && LARGE_OFF_T % 2147483647 == 1) | |
4705 | ? 1 : -1]; | |
4706 | int | |
4707 | main () | |
4708 | { | |
4709 | ||
4710 | ; | |
4711 | return 0; | |
4712 | } | |
4713 | _ACEOF | |
4714 | if ac_fn_c_try_compile "$LINENO"; then : | |
4715 | ac_cv_sys_large_files=1; break | |
4716 | fi | |
4717 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4718 | ac_cv_sys_large_files=unknown | |
4719 | break | |
4720 | done | |
4721 | fi | |
4722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4723 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4724 | case $ac_cv_sys_large_files in #( | |
4725 | no | unknown) ;; | |
4726 | *) | |
4727 | cat >>confdefs.h <<_ACEOF | |
4728 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4729 | _ACEOF | |
4730 | ;; | |
4731 | esac | |
4732 | rm -rf conftest* | |
4733 | fi | |
4734 | fi | |
4735 | ||
4736 | ||
4737 | ||
81ecdfbb RW |
4738 | |
4739 | ||
4740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4741 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4742 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4743 | $as_echo_n "(cached) " >&6 | |
4744 | else | |
4745 | am_cv_prog_cc_stdc=no | |
4746 | ac_save_CC="$CC" | |
4747 | # Don't try gcc -ansi; that turns off useful extensions and | |
4748 | # breaks some systems' header files. | |
4749 | # AIX -qlanglvl=ansi | |
4750 | # Ultrix and OSF/1 -std1 | |
4751 | # HP-UX 10.20 and later -Ae | |
4752 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4753 | # SVR4 -Xc -D__EXTENSIONS__ | |
4754 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4755 | do | |
783e057b | 4756 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4758 | /* end confdefs.h. */ |
4759 | #include <stdarg.h> | |
4760 | #include <stdio.h> | |
4761 | #include <sys/types.h> | |
4762 | #include <sys/stat.h> | |
4763 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4764 | struct buf { int x; }; | |
4765 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4766 | static char *e (p, i) | |
4767 | char **p; | |
4768 | int i; | |
4769 | { | |
4770 | return p[i]; | |
4771 | } | |
4772 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4773 | { | |
4774 | char *s; | |
4775 | va_list v; | |
4776 | va_start (v,p); | |
4777 | s = g (p, va_arg (v,int)); | |
4778 | va_end (v); | |
4779 | return s; | |
4780 | } | |
4781 | int test (int i, double x); | |
4782 | struct s1 {int (*f) (int a);}; | |
4783 | struct s2 {int (*f) (double a);}; | |
4784 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4785 | int argc; | |
4786 | char **argv; | |
4787 | ||
4788 | int | |
4789 | main () | |
4790 | { | |
4791 | ||
4792 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4793 | ||
4794 | ; | |
4795 | return 0; | |
4796 | } | |
4797 | _ACEOF | |
81ecdfbb | 4798 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4799 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4800 | fi |
81ecdfbb | 4801 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4802 | done |
4803 | CC="$ac_save_CC" | |
4804 | ||
4805 | fi | |
4806 | ||
4807 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4808 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4809 | $as_echo "none needed" >&6; } | |
783e057b | 4810 | else |
81ecdfbb RW |
4811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4812 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4813 | fi |
4814 | case "x$am_cv_prog_cc_stdc" in | |
4815 | x|xno) ;; | |
4816 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4817 | esac | |
4818 | ||
4869db5e RM |
4819 | # expand $ac_aux_dir to an absolute path |
4820 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4821 | ||
4822 | if test x"${install_sh}" != xset; then | |
4823 | case $am_aux_dir in | |
4824 | *\ * | *\ *) | |
4825 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4826 | *) | |
4827 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4828 | esac | |
4829 | fi | |
4830 | ||
4831 | # Installed binaries are usually stripped using `strip' when the user | |
4832 | # run `make install-strip'. However `strip' might not be the right | |
4833 | # tool to use in cross-compilation environments, therefore Automake | |
4834 | # will honor the `STRIP' environment variable to overrule this program. | |
4835 | if test "$cross_compiling" != no; then | |
4836 | if test -n "$ac_tool_prefix"; then | |
4837 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4838 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4840 | $as_echo_n "checking for $ac_word... " >&6; } | |
4841 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
4842 | $as_echo_n "(cached) " >&6 | |
4843 | else | |
4844 | if test -n "$STRIP"; then | |
4845 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4846 | else | |
4847 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4848 | for as_dir in $PATH | |
4849 | do | |
4850 | IFS=$as_save_IFS | |
4851 | test -z "$as_dir" && as_dir=. | |
4852 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4853 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4854 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4855 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4856 | break 2 | |
4857 | fi | |
4858 | done | |
4859 | done | |
4860 | IFS=$as_save_IFS | |
4861 | ||
4862 | fi | |
4863 | fi | |
4864 | STRIP=$ac_cv_prog_STRIP | |
4865 | if test -n "$STRIP"; then | |
4866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4867 | $as_echo "$STRIP" >&6; } | |
4868 | else | |
4869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4870 | $as_echo "no" >&6; } | |
4871 | fi | |
4872 | ||
4873 | ||
4874 | fi | |
4875 | if test -z "$ac_cv_prog_STRIP"; then | |
4876 | ac_ct_STRIP=$STRIP | |
4877 | # Extract the first word of "strip", so it can be a program name with args. | |
4878 | set dummy strip; ac_word=$2 | |
4879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4880 | $as_echo_n "checking for $ac_word... " >&6; } | |
4881 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
4882 | $as_echo_n "(cached) " >&6 | |
4883 | else | |
4884 | if test -n "$ac_ct_STRIP"; then | |
4885 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4886 | else | |
4887 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4888 | for as_dir in $PATH | |
4889 | do | |
4890 | IFS=$as_save_IFS | |
4891 | test -z "$as_dir" && as_dir=. | |
4892 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4893 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4894 | ac_cv_prog_ac_ct_STRIP="strip" | |
4895 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4896 | break 2 | |
4897 | fi | |
4898 | done | |
4899 | done | |
4900 | IFS=$as_save_IFS | |
4901 | ||
4902 | fi | |
4903 | fi | |
4904 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4905 | if test -n "$ac_ct_STRIP"; then | |
4906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4907 | $as_echo "$ac_ct_STRIP" >&6; } | |
4908 | else | |
4909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4910 | $as_echo "no" >&6; } | |
4911 | fi | |
4912 | ||
4913 | if test "x$ac_ct_STRIP" = x; then | |
4914 | STRIP=":" | |
4915 | else | |
4916 | case $cross_compiling:$ac_tool_warned in | |
4917 | yes:) | |
4918 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4919 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4920 | ac_tool_warned=yes ;; | |
4921 | esac | |
4922 | STRIP=$ac_ct_STRIP | |
4923 | fi | |
4924 | else | |
4925 | STRIP="$ac_cv_prog_STRIP" | |
4926 | fi | |
4927 | ||
4928 | fi | |
4929 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4930 | ||
783e057b DJ |
4931 | |
4932 | ac_aux_dir= | |
81ecdfbb RW |
4933 | for ac_dir in .. "$srcdir"/..; do |
4934 | for ac_t in install-sh install.sh shtool; do | |
4935 | if test -f "$ac_dir/$ac_t"; then | |
4936 | ac_aux_dir=$ac_dir | |
4937 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4938 | break 2 | |
4939 | fi | |
4940 | done | |
783e057b DJ |
4941 | done |
4942 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4943 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4944 | fi |
81ecdfbb RW |
4945 | |
4946 | # These three variables are undocumented and unsupported, | |
4947 | # and are intended to be withdrawn in a future Autoconf release. | |
4948 | # They can cause serious problems if a builder's source tree is in a directory | |
4949 | # whose full name contains unusual characters. | |
4950 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4951 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4952 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4953 | ||
783e057b | 4954 | |
783e057b | 4955 | |
9009e1ae MR |
4956 | test "$program_prefix" != NONE && |
4957 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4958 | # Use a double $ so make ignores it. | |
4959 | test "$program_suffix" != NONE && | |
4960 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4961 | # Double any \ or $. | |
4962 | # By default was `s,x,x', remove it if useless. | |
4963 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4964 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4965 | ||
81ecdfbb | 4966 | |
0bcda685 PA |
4967 | # We require a C++11 compiler. Check if one is available, and if |
4968 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
4969 | ||
4970 | ax_cxx_compile_cxx11_required=true | |
4971 | ac_ext=cpp | |
4972 | ac_cpp='$CXXCPP $CPPFLAGS' | |
4973 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4974 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4975 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
4976 | CXX_DIALECT="" | |
4977 | ac_success=no | |
4978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
4979 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
4980 | if test "${ax_cv_cxx_compile_cxx11+set}" = set; then : | |
4981 | $as_echo_n "(cached) " >&6 | |
4982 | else | |
4983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4984 | /* end confdefs.h. */ | |
4985 | ||
4986 | ||
4987 | // If the compiler admits that it is not ready for C++11, why torture it? | |
4988 | // Hopefully, this will speed up the test. | |
4989 | ||
4990 | #ifndef __cplusplus | |
4991 | ||
4992 | #error "This is not a C++ compiler" | |
4993 | ||
4994 | #elif __cplusplus < 201103L | |
4995 | ||
4996 | #error "This is not a C++11 compiler" | |
4997 | ||
4998 | #else | |
4999 | ||
5000 | namespace cxx11 | |
5001 | { | |
5002 | ||
5003 | namespace test_static_assert | |
5004 | { | |
5005 | ||
5006 | template <typename T> | |
5007 | struct check | |
5008 | { | |
5009 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5010 | }; | |
5011 | ||
5012 | } | |
5013 | ||
5014 | namespace test_final_override | |
5015 | { | |
5016 | ||
5017 | struct Base | |
5018 | { | |
5019 | virtual void f() {} | |
5020 | }; | |
5021 | ||
5022 | struct Derived : public Base | |
5023 | { | |
5024 | virtual void f() override {} | |
5025 | }; | |
5026 | ||
5027 | } | |
5028 | ||
5029 | namespace test_double_right_angle_brackets | |
5030 | { | |
5031 | ||
5032 | template < typename T > | |
5033 | struct check {}; | |
5034 | ||
5035 | typedef check<void> single_type; | |
5036 | typedef check<check<void>> double_type; | |
5037 | typedef check<check<check<void>>> triple_type; | |
5038 | typedef check<check<check<check<void>>>> quadruple_type; | |
5039 | ||
5040 | } | |
5041 | ||
5042 | namespace test_decltype | |
5043 | { | |
5044 | ||
5045 | int | |
5046 | f() | |
5047 | { | |
5048 | int a = 1; | |
5049 | decltype(a) b = 2; | |
5050 | return a + b; | |
5051 | } | |
5052 | ||
5053 | } | |
5054 | ||
5055 | namespace test_type_deduction | |
5056 | { | |
5057 | ||
5058 | template < typename T1, typename T2 > | |
5059 | struct is_same | |
5060 | { | |
5061 | static const bool value = false; | |
5062 | }; | |
5063 | ||
5064 | template < typename T > | |
5065 | struct is_same<T, T> | |
5066 | { | |
5067 | static const bool value = true; | |
5068 | }; | |
5069 | ||
5070 | template < typename T1, typename T2 > | |
5071 | auto | |
5072 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5073 | { | |
5074 | return a1 + a2; | |
5075 | } | |
5076 | ||
5077 | int | |
5078 | test(const int c, volatile int v) | |
5079 | { | |
5080 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5081 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5082 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5083 | auto ac = c; | |
5084 | auto av = v; | |
5085 | auto sumi = ac + av + 'x'; | |
5086 | auto sumf = ac + av + 1.0; | |
5087 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5088 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5089 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5090 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5091 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5092 | return (sumf > 0.0) ? sumi : add(c, v); | |
5093 | } | |
5094 | ||
5095 | } | |
5096 | ||
5097 | namespace test_noexcept | |
5098 | { | |
5099 | ||
5100 | int f() { return 0; } | |
5101 | int g() noexcept { return 0; } | |
5102 | ||
5103 | static_assert(noexcept(f()) == false, ""); | |
5104 | static_assert(noexcept(g()) == true, ""); | |
5105 | ||
5106 | } | |
5107 | ||
5108 | namespace test_constexpr | |
5109 | { | |
5110 | ||
5111 | template < typename CharT > | |
5112 | unsigned long constexpr | |
5113 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5114 | { | |
5115 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5116 | } | |
5117 | ||
5118 | template < typename CharT > | |
5119 | unsigned long constexpr | |
5120 | strlen_c(const CharT *const s) noexcept | |
5121 | { | |
5122 | return strlen_c_r(s, 0UL); | |
5123 | } | |
5124 | ||
5125 | static_assert(strlen_c("") == 0UL, ""); | |
5126 | static_assert(strlen_c("1") == 1UL, ""); | |
5127 | static_assert(strlen_c("example") == 7UL, ""); | |
5128 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5129 | ||
5130 | } | |
5131 | ||
5132 | namespace test_rvalue_references | |
5133 | { | |
5134 | ||
5135 | template < int N > | |
5136 | struct answer | |
5137 | { | |
5138 | static constexpr int value = N; | |
5139 | }; | |
5140 | ||
5141 | answer<1> f(int&) { return answer<1>(); } | |
5142 | answer<2> f(const int&) { return answer<2>(); } | |
5143 | answer<3> f(int&&) { return answer<3>(); } | |
5144 | ||
5145 | void | |
5146 | test() | |
5147 | { | |
5148 | int i = 0; | |
5149 | const int c = 0; | |
5150 | static_assert(decltype(f(i))::value == 1, ""); | |
5151 | static_assert(decltype(f(c))::value == 2, ""); | |
5152 | static_assert(decltype(f(0))::value == 3, ""); | |
5153 | } | |
5154 | ||
5155 | } | |
5156 | ||
5157 | namespace test_uniform_initialization | |
5158 | { | |
5159 | ||
5160 | struct test | |
5161 | { | |
5162 | static const int zero {}; | |
5163 | static const int one {1}; | |
5164 | }; | |
5165 | ||
5166 | static_assert(test::zero == 0, ""); | |
5167 | static_assert(test::one == 1, ""); | |
5168 | ||
5169 | } | |
5170 | ||
5171 | namespace test_lambdas | |
5172 | { | |
5173 | ||
5174 | void | |
5175 | test1() | |
5176 | { | |
5177 | auto lambda1 = [](){}; | |
5178 | auto lambda2 = lambda1; | |
5179 | lambda1(); | |
5180 | lambda2(); | |
5181 | } | |
5182 | ||
5183 | int | |
5184 | test2() | |
5185 | { | |
5186 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5187 | auto b = []() -> int { return '0'; }(); | |
5188 | auto c = [=](){ return a + b; }(); | |
5189 | auto d = [&](){ return c; }(); | |
5190 | auto e = [a, &b](int x) mutable { | |
5191 | const auto identity = [](int y){ return y; }; | |
5192 | for (auto i = 0; i < a; ++i) | |
5193 | a += b--; | |
5194 | return x + identity(a + b); | |
5195 | }(0); | |
5196 | return a + b + c + d + e; | |
5197 | } | |
5198 | ||
5199 | int | |
5200 | test3() | |
5201 | { | |
5202 | const auto nullary = [](){ return 0; }; | |
5203 | const auto unary = [](int x){ return x; }; | |
5204 | using nullary_t = decltype(nullary); | |
5205 | using unary_t = decltype(unary); | |
5206 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5207 | const auto higher2nd = [unary](nullary_t f1){ | |
5208 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5209 | }; | |
5210 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5211 | } | |
5212 | ||
5213 | } | |
5214 | ||
5215 | namespace test_variadic_templates | |
5216 | { | |
5217 | ||
5218 | template <int...> | |
5219 | struct sum; | |
5220 | ||
5221 | template <int N0, int... N1toN> | |
5222 | struct sum<N0, N1toN...> | |
5223 | { | |
5224 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5225 | }; | |
5226 | ||
5227 | template <> | |
5228 | struct sum<> | |
5229 | { | |
5230 | static constexpr auto value = 0; | |
5231 | }; | |
5232 | ||
5233 | static_assert(sum<>::value == 0, ""); | |
5234 | static_assert(sum<1>::value == 1, ""); | |
5235 | static_assert(sum<23>::value == 23, ""); | |
5236 | static_assert(sum<1, 2>::value == 3, ""); | |
5237 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5238 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5239 | ||
5240 | } | |
5241 | ||
5242 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5243 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5244 | // because of this. | |
5245 | namespace test_template_alias_sfinae | |
5246 | { | |
5247 | ||
5248 | struct foo {}; | |
5249 | ||
5250 | template<typename T> | |
5251 | using member = typename T::member_type; | |
5252 | ||
5253 | template<typename T> | |
5254 | void func(...) {} | |
5255 | ||
5256 | template<typename T> | |
5257 | void func(member<T>*) {} | |
5258 | ||
5259 | void test(); | |
5260 | ||
5261 | void test() { func<foo>(0); } | |
5262 | ||
5263 | } | |
5264 | ||
5265 | } // namespace cxx11 | |
5266 | ||
5267 | #endif // __cplusplus >= 201103L | |
5268 | ||
5269 | ||
5270 | ||
5271 | _ACEOF | |
5272 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5273 | ax_cv_cxx_compile_cxx11=yes | |
5274 | else | |
5275 | ax_cv_cxx_compile_cxx11=no | |
5276 | fi | |
5277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5278 | fi | |
5279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5280 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5281 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5282 | ac_success=yes | |
5283 | fi | |
5284 | ||
5285 | if test x$ac_success = xno; then | |
5286 | for switch in -std=gnu++11 -std=gnu++0x; do | |
5287 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5289 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
5290 | if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5291 | $as_echo_n "(cached) " >&6 | |
5292 | else | |
5293 | ac_save_CXX="$CXX" | |
5294 | CXX="$CXX $switch" | |
5295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5296 | /* end confdefs.h. */ | |
5297 | ||
5298 | ||
5299 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5300 | // Hopefully, this will speed up the test. | |
5301 | ||
5302 | #ifndef __cplusplus | |
5303 | ||
5304 | #error "This is not a C++ compiler" | |
5305 | ||
5306 | #elif __cplusplus < 201103L | |
5307 | ||
5308 | #error "This is not a C++11 compiler" | |
5309 | ||
5310 | #else | |
5311 | ||
5312 | namespace cxx11 | |
5313 | { | |
5314 | ||
5315 | namespace test_static_assert | |
5316 | { | |
5317 | ||
5318 | template <typename T> | |
5319 | struct check | |
5320 | { | |
5321 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5322 | }; | |
5323 | ||
5324 | } | |
5325 | ||
5326 | namespace test_final_override | |
5327 | { | |
5328 | ||
5329 | struct Base | |
5330 | { | |
5331 | virtual void f() {} | |
5332 | }; | |
5333 | ||
5334 | struct Derived : public Base | |
5335 | { | |
5336 | virtual void f() override {} | |
5337 | }; | |
5338 | ||
5339 | } | |
5340 | ||
5341 | namespace test_double_right_angle_brackets | |
5342 | { | |
5343 | ||
5344 | template < typename T > | |
5345 | struct check {}; | |
5346 | ||
5347 | typedef check<void> single_type; | |
5348 | typedef check<check<void>> double_type; | |
5349 | typedef check<check<check<void>>> triple_type; | |
5350 | typedef check<check<check<check<void>>>> quadruple_type; | |
5351 | ||
5352 | } | |
5353 | ||
5354 | namespace test_decltype | |
5355 | { | |
5356 | ||
5357 | int | |
5358 | f() | |
5359 | { | |
5360 | int a = 1; | |
5361 | decltype(a) b = 2; | |
5362 | return a + b; | |
5363 | } | |
5364 | ||
5365 | } | |
5366 | ||
5367 | namespace test_type_deduction | |
5368 | { | |
5369 | ||
5370 | template < typename T1, typename T2 > | |
5371 | struct is_same | |
5372 | { | |
5373 | static const bool value = false; | |
5374 | }; | |
5375 | ||
5376 | template < typename T > | |
5377 | struct is_same<T, T> | |
5378 | { | |
5379 | static const bool value = true; | |
5380 | }; | |
5381 | ||
5382 | template < typename T1, typename T2 > | |
5383 | auto | |
5384 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5385 | { | |
5386 | return a1 + a2; | |
5387 | } | |
5388 | ||
5389 | int | |
5390 | test(const int c, volatile int v) | |
5391 | { | |
5392 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5393 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5394 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5395 | auto ac = c; | |
5396 | auto av = v; | |
5397 | auto sumi = ac + av + 'x'; | |
5398 | auto sumf = ac + av + 1.0; | |
5399 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5400 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5401 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5402 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5403 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5404 | return (sumf > 0.0) ? sumi : add(c, v); | |
5405 | } | |
5406 | ||
5407 | } | |
5408 | ||
5409 | namespace test_noexcept | |
5410 | { | |
5411 | ||
5412 | int f() { return 0; } | |
5413 | int g() noexcept { return 0; } | |
5414 | ||
5415 | static_assert(noexcept(f()) == false, ""); | |
5416 | static_assert(noexcept(g()) == true, ""); | |
5417 | ||
5418 | } | |
5419 | ||
5420 | namespace test_constexpr | |
5421 | { | |
5422 | ||
5423 | template < typename CharT > | |
5424 | unsigned long constexpr | |
5425 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5426 | { | |
5427 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5428 | } | |
5429 | ||
5430 | template < typename CharT > | |
5431 | unsigned long constexpr | |
5432 | strlen_c(const CharT *const s) noexcept | |
5433 | { | |
5434 | return strlen_c_r(s, 0UL); | |
5435 | } | |
5436 | ||
5437 | static_assert(strlen_c("") == 0UL, ""); | |
5438 | static_assert(strlen_c("1") == 1UL, ""); | |
5439 | static_assert(strlen_c("example") == 7UL, ""); | |
5440 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5441 | ||
5442 | } | |
5443 | ||
5444 | namespace test_rvalue_references | |
5445 | { | |
5446 | ||
5447 | template < int N > | |
5448 | struct answer | |
5449 | { | |
5450 | static constexpr int value = N; | |
5451 | }; | |
5452 | ||
5453 | answer<1> f(int&) { return answer<1>(); } | |
5454 | answer<2> f(const int&) { return answer<2>(); } | |
5455 | answer<3> f(int&&) { return answer<3>(); } | |
5456 | ||
5457 | void | |
5458 | test() | |
5459 | { | |
5460 | int i = 0; | |
5461 | const int c = 0; | |
5462 | static_assert(decltype(f(i))::value == 1, ""); | |
5463 | static_assert(decltype(f(c))::value == 2, ""); | |
5464 | static_assert(decltype(f(0))::value == 3, ""); | |
5465 | } | |
5466 | ||
5467 | } | |
5468 | ||
5469 | namespace test_uniform_initialization | |
5470 | { | |
5471 | ||
5472 | struct test | |
5473 | { | |
5474 | static const int zero {}; | |
5475 | static const int one {1}; | |
5476 | }; | |
5477 | ||
5478 | static_assert(test::zero == 0, ""); | |
5479 | static_assert(test::one == 1, ""); | |
5480 | ||
5481 | } | |
5482 | ||
5483 | namespace test_lambdas | |
5484 | { | |
5485 | ||
5486 | void | |
5487 | test1() | |
5488 | { | |
5489 | auto lambda1 = [](){}; | |
5490 | auto lambda2 = lambda1; | |
5491 | lambda1(); | |
5492 | lambda2(); | |
5493 | } | |
5494 | ||
5495 | int | |
5496 | test2() | |
5497 | { | |
5498 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5499 | auto b = []() -> int { return '0'; }(); | |
5500 | auto c = [=](){ return a + b; }(); | |
5501 | auto d = [&](){ return c; }(); | |
5502 | auto e = [a, &b](int x) mutable { | |
5503 | const auto identity = [](int y){ return y; }; | |
5504 | for (auto i = 0; i < a; ++i) | |
5505 | a += b--; | |
5506 | return x + identity(a + b); | |
5507 | }(0); | |
5508 | return a + b + c + d + e; | |
5509 | } | |
5510 | ||
5511 | int | |
5512 | test3() | |
5513 | { | |
5514 | const auto nullary = [](){ return 0; }; | |
5515 | const auto unary = [](int x){ return x; }; | |
5516 | using nullary_t = decltype(nullary); | |
5517 | using unary_t = decltype(unary); | |
5518 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5519 | const auto higher2nd = [unary](nullary_t f1){ | |
5520 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5521 | }; | |
5522 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5523 | } | |
5524 | ||
5525 | } | |
5526 | ||
5527 | namespace test_variadic_templates | |
5528 | { | |
5529 | ||
5530 | template <int...> | |
5531 | struct sum; | |
5532 | ||
5533 | template <int N0, int... N1toN> | |
5534 | struct sum<N0, N1toN...> | |
5535 | { | |
5536 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5537 | }; | |
5538 | ||
5539 | template <> | |
5540 | struct sum<> | |
5541 | { | |
5542 | static constexpr auto value = 0; | |
5543 | }; | |
5544 | ||
5545 | static_assert(sum<>::value == 0, ""); | |
5546 | static_assert(sum<1>::value == 1, ""); | |
5547 | static_assert(sum<23>::value == 23, ""); | |
5548 | static_assert(sum<1, 2>::value == 3, ""); | |
5549 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5550 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5551 | ||
5552 | } | |
5553 | ||
5554 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5555 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5556 | // because of this. | |
5557 | namespace test_template_alias_sfinae | |
5558 | { | |
5559 | ||
5560 | struct foo {}; | |
5561 | ||
5562 | template<typename T> | |
5563 | using member = typename T::member_type; | |
5564 | ||
5565 | template<typename T> | |
5566 | void func(...) {} | |
5567 | ||
5568 | template<typename T> | |
5569 | void func(member<T>*) {} | |
5570 | ||
5571 | void test(); | |
5572 | ||
5573 | void test() { func<foo>(0); } | |
5574 | ||
5575 | } | |
5576 | ||
5577 | } // namespace cxx11 | |
5578 | ||
5579 | #endif // __cplusplus >= 201103L | |
5580 | ||
5581 | ||
5582 | ||
5583 | _ACEOF | |
5584 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5585 | eval $cachevar=yes | |
5586 | else | |
5587 | eval $cachevar=no | |
5588 | fi | |
5589 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5590 | CXX="$ac_save_CXX" | |
5591 | fi | |
5592 | eval ac_res=\$$cachevar | |
5593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5594 | $as_echo "$ac_res" >&6; } | |
5595 | if eval test x\$$cachevar = xyes; then | |
5596 | CXX_DIALECT="$switch" | |
5597 | ac_success=yes | |
5598 | break | |
5599 | fi | |
5600 | done | |
5601 | fi | |
5602 | ||
5603 | if test x$ac_success = xno; then | |
5604 | for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do | |
5605 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5607 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
5608 | if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5609 | $as_echo_n "(cached) " >&6 | |
5610 | else | |
5611 | ac_save_CXX="$CXX" | |
5612 | CXX="$CXX $switch" | |
5613 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5614 | /* end confdefs.h. */ | |
5615 | ||
5616 | ||
5617 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5618 | // Hopefully, this will speed up the test. | |
5619 | ||
5620 | #ifndef __cplusplus | |
5621 | ||
5622 | #error "This is not a C++ compiler" | |
5623 | ||
5624 | #elif __cplusplus < 201103L | |
5625 | ||
5626 | #error "This is not a C++11 compiler" | |
5627 | ||
5628 | #else | |
5629 | ||
5630 | namespace cxx11 | |
5631 | { | |
5632 | ||
5633 | namespace test_static_assert | |
5634 | { | |
5635 | ||
5636 | template <typename T> | |
5637 | struct check | |
5638 | { | |
5639 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5640 | }; | |
5641 | ||
5642 | } | |
5643 | ||
5644 | namespace test_final_override | |
5645 | { | |
5646 | ||
5647 | struct Base | |
5648 | { | |
5649 | virtual void f() {} | |
5650 | }; | |
5651 | ||
5652 | struct Derived : public Base | |
5653 | { | |
5654 | virtual void f() override {} | |
5655 | }; | |
5656 | ||
5657 | } | |
5658 | ||
5659 | namespace test_double_right_angle_brackets | |
5660 | { | |
5661 | ||
5662 | template < typename T > | |
5663 | struct check {}; | |
5664 | ||
5665 | typedef check<void> single_type; | |
5666 | typedef check<check<void>> double_type; | |
5667 | typedef check<check<check<void>>> triple_type; | |
5668 | typedef check<check<check<check<void>>>> quadruple_type; | |
5669 | ||
5670 | } | |
5671 | ||
5672 | namespace test_decltype | |
5673 | { | |
5674 | ||
5675 | int | |
5676 | f() | |
5677 | { | |
5678 | int a = 1; | |
5679 | decltype(a) b = 2; | |
5680 | return a + b; | |
5681 | } | |
5682 | ||
5683 | } | |
5684 | ||
5685 | namespace test_type_deduction | |
5686 | { | |
5687 | ||
5688 | template < typename T1, typename T2 > | |
5689 | struct is_same | |
5690 | { | |
5691 | static const bool value = false; | |
5692 | }; | |
5693 | ||
5694 | template < typename T > | |
5695 | struct is_same<T, T> | |
5696 | { | |
5697 | static const bool value = true; | |
5698 | }; | |
5699 | ||
5700 | template < typename T1, typename T2 > | |
5701 | auto | |
5702 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5703 | { | |
5704 | return a1 + a2; | |
5705 | } | |
5706 | ||
5707 | int | |
5708 | test(const int c, volatile int v) | |
5709 | { | |
5710 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5711 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5712 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5713 | auto ac = c; | |
5714 | auto av = v; | |
5715 | auto sumi = ac + av + 'x'; | |
5716 | auto sumf = ac + av + 1.0; | |
5717 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5718 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5719 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5720 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5721 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5722 | return (sumf > 0.0) ? sumi : add(c, v); | |
5723 | } | |
5724 | ||
5725 | } | |
5726 | ||
5727 | namespace test_noexcept | |
5728 | { | |
5729 | ||
5730 | int f() { return 0; } | |
5731 | int g() noexcept { return 0; } | |
5732 | ||
5733 | static_assert(noexcept(f()) == false, ""); | |
5734 | static_assert(noexcept(g()) == true, ""); | |
5735 | ||
5736 | } | |
5737 | ||
5738 | namespace test_constexpr | |
5739 | { | |
5740 | ||
5741 | template < typename CharT > | |
5742 | unsigned long constexpr | |
5743 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5744 | { | |
5745 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5746 | } | |
5747 | ||
5748 | template < typename CharT > | |
5749 | unsigned long constexpr | |
5750 | strlen_c(const CharT *const s) noexcept | |
5751 | { | |
5752 | return strlen_c_r(s, 0UL); | |
5753 | } | |
5754 | ||
5755 | static_assert(strlen_c("") == 0UL, ""); | |
5756 | static_assert(strlen_c("1") == 1UL, ""); | |
5757 | static_assert(strlen_c("example") == 7UL, ""); | |
5758 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5759 | ||
5760 | } | |
5761 | ||
5762 | namespace test_rvalue_references | |
5763 | { | |
5764 | ||
5765 | template < int N > | |
5766 | struct answer | |
5767 | { | |
5768 | static constexpr int value = N; | |
5769 | }; | |
5770 | ||
5771 | answer<1> f(int&) { return answer<1>(); } | |
5772 | answer<2> f(const int&) { return answer<2>(); } | |
5773 | answer<3> f(int&&) { return answer<3>(); } | |
5774 | ||
5775 | void | |
5776 | test() | |
5777 | { | |
5778 | int i = 0; | |
5779 | const int c = 0; | |
5780 | static_assert(decltype(f(i))::value == 1, ""); | |
5781 | static_assert(decltype(f(c))::value == 2, ""); | |
5782 | static_assert(decltype(f(0))::value == 3, ""); | |
5783 | } | |
5784 | ||
5785 | } | |
5786 | ||
5787 | namespace test_uniform_initialization | |
5788 | { | |
5789 | ||
5790 | struct test | |
5791 | { | |
5792 | static const int zero {}; | |
5793 | static const int one {1}; | |
5794 | }; | |
5795 | ||
5796 | static_assert(test::zero == 0, ""); | |
5797 | static_assert(test::one == 1, ""); | |
5798 | ||
5799 | } | |
5800 | ||
5801 | namespace test_lambdas | |
5802 | { | |
5803 | ||
5804 | void | |
5805 | test1() | |
5806 | { | |
5807 | auto lambda1 = [](){}; | |
5808 | auto lambda2 = lambda1; | |
5809 | lambda1(); | |
5810 | lambda2(); | |
5811 | } | |
5812 | ||
5813 | int | |
5814 | test2() | |
5815 | { | |
5816 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5817 | auto b = []() -> int { return '0'; }(); | |
5818 | auto c = [=](){ return a + b; }(); | |
5819 | auto d = [&](){ return c; }(); | |
5820 | auto e = [a, &b](int x) mutable { | |
5821 | const auto identity = [](int y){ return y; }; | |
5822 | for (auto i = 0; i < a; ++i) | |
5823 | a += b--; | |
5824 | return x + identity(a + b); | |
5825 | }(0); | |
5826 | return a + b + c + d + e; | |
5827 | } | |
5828 | ||
5829 | int | |
5830 | test3() | |
5831 | { | |
5832 | const auto nullary = [](){ return 0; }; | |
5833 | const auto unary = [](int x){ return x; }; | |
5834 | using nullary_t = decltype(nullary); | |
5835 | using unary_t = decltype(unary); | |
5836 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5837 | const auto higher2nd = [unary](nullary_t f1){ | |
5838 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5839 | }; | |
5840 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5841 | } | |
5842 | ||
5843 | } | |
5844 | ||
5845 | namespace test_variadic_templates | |
5846 | { | |
5847 | ||
5848 | template <int...> | |
5849 | struct sum; | |
5850 | ||
5851 | template <int N0, int... N1toN> | |
5852 | struct sum<N0, N1toN...> | |
5853 | { | |
5854 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5855 | }; | |
5856 | ||
5857 | template <> | |
5858 | struct sum<> | |
5859 | { | |
5860 | static constexpr auto value = 0; | |
5861 | }; | |
5862 | ||
5863 | static_assert(sum<>::value == 0, ""); | |
5864 | static_assert(sum<1>::value == 1, ""); | |
5865 | static_assert(sum<23>::value == 23, ""); | |
5866 | static_assert(sum<1, 2>::value == 3, ""); | |
5867 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5868 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5869 | ||
5870 | } | |
5871 | ||
5872 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5873 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5874 | // because of this. | |
5875 | namespace test_template_alias_sfinae | |
5876 | { | |
5877 | ||
5878 | struct foo {}; | |
5879 | ||
5880 | template<typename T> | |
5881 | using member = typename T::member_type; | |
5882 | ||
5883 | template<typename T> | |
5884 | void func(...) {} | |
5885 | ||
5886 | template<typename T> | |
5887 | void func(member<T>*) {} | |
5888 | ||
5889 | void test(); | |
5890 | ||
5891 | void test() { func<foo>(0); } | |
5892 | ||
5893 | } | |
5894 | ||
5895 | } // namespace cxx11 | |
5896 | ||
5897 | #endif // __cplusplus >= 201103L | |
5898 | ||
5899 | ||
5900 | ||
5901 | _ACEOF | |
5902 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5903 | eval $cachevar=yes | |
5904 | else | |
5905 | eval $cachevar=no | |
5906 | fi | |
5907 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5908 | CXX="$ac_save_CXX" | |
5909 | fi | |
5910 | eval ac_res=\$$cachevar | |
5911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5912 | $as_echo "$ac_res" >&6; } | |
5913 | if eval test x\$$cachevar = xyes; then | |
5914 | CXX_DIALECT="$switch" | |
5915 | ac_success=yes | |
5916 | break | |
5917 | fi | |
5918 | done | |
5919 | fi | |
5920 | ac_ext=c | |
5921 | ac_cpp='$CPP $CPPFLAGS' | |
5922 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5923 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5924 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5925 | ||
5926 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
5927 | if test x$ac_success = xno; then | |
5928 | as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5 | |
5929 | fi | |
5930 | fi | |
5931 | if test x$ac_success = xno; then | |
5932 | HAVE_CXX11=0 | |
5933 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
5934 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
5935 | else | |
5936 | HAVE_CXX11=1 | |
5937 | ||
5938 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
5939 | ||
5940 | fi | |
5941 | ||
5942 | ||
5943 | ||
5944 | ||
a417dc56 RW |
5945 | # Dependency checking. |
5946 | rm -rf .tst 2>/dev/null | |
5947 | mkdir .tst 2>/dev/null | |
5948 | if test -d .tst; then | |
5949 | am__leading_dot=. | |
5950 | else | |
5951 | am__leading_dot=_ | |
5952 | fi | |
5953 | rmdir .tst 2>/dev/null | |
5954 | ||
5955 | DEPDIR="${am__leading_dot}deps" | |
5956 | ||
81ecdfbb | 5957 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
5958 | |
5959 | ||
5960 | depcc="$CC" am_compiler_list= | |
5961 | ||
5962 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
5963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
5964 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
5965 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
5966 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5967 | else |
5968 | if test -f "$am_depcomp"; then | |
5969 | # We make a subdir and do the tests there. Otherwise we can end up | |
5970 | # making bogus files that we don't know about and never remove. For | |
5971 | # instance it was reported that on HP-UX the gcc test will end up | |
5972 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5973 | # in D'. | |
5974 | mkdir conftest.dir | |
5975 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5976 | # using a relative directory. | |
5977 | cp "$am_depcomp" conftest.dir | |
5978 | cd conftest.dir | |
5979 | # We will build objects and dependencies in a subdirectory because | |
5980 | # it helps to detect inapplicable dependency modes. For instance | |
5981 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5982 | # side effect of compilation, but ICC will put the dependencies in | |
5983 | # the current directory while Tru64 will put them in the object | |
5984 | # directory. | |
5985 | mkdir sub | |
5986 | ||
5987 | am_cv_CC_dependencies_compiler_type=none | |
5988 | if test "$am_compiler_list" = ""; then | |
5989 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5990 | fi | |
5991 | for depmode in $am_compiler_list; do | |
5992 | if test $depmode = none; then break; fi | |
5993 | ||
81ecdfbb | 5994 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
5995 | # Setup a source with many dependencies, because some compilers |
5996 | # like to wrap large dependency lists on column 80 (with \), and | |
5997 | # we should not choose a depcomp mode which is confused by this. | |
5998 | # | |
5999 | # We need to recreate these files for each test, as the compiler may | |
6000 | # overwrite some of them when testing with obscure command lines. | |
6001 | # This happens at least with the AIX C compiler. | |
6002 | : > sub/conftest.c | |
6003 | for i in 1 2 3 4 5 6; do | |
6004 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6005 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6006 | # Solaris 8's {/usr,}/bin/sh. | |
6007 | touch sub/conftst$i.h | |
6008 | done | |
6009 | echo "include sub/conftest.Po" > confmf | |
6010 | ||
6011 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6012 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6013 | # handle `-M -o', and we need to detect this. | |
6014 | depcmd="depmode=$depmode \ | |
6015 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6016 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6017 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6018 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6019 | if env $depcmd > conftest.err 2>&1 && | |
6020 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6021 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6022 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6023 | # icc doesn't choke on unknown options, it will just issue warnings | |
6024 | # or remarks (even with -Werror). So we grep stderr for any message | |
6025 | # that says an option was ignored or not supported. | |
6026 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6027 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6028 | # The diagnosis changed in icc 8.0: | |
6029 | # icc: Command line remark: option '-MP' not supported | |
6030 | if (grep 'ignoring option' conftest.err || | |
6031 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6032 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6033 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6034 | break |
6035 | fi | |
6036 | fi | |
81ecdfbb | 6037 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6038 | sed -e 's/^/| /' < conftest.err >&5 |
6039 | done | |
6040 | ||
6041 | cd .. | |
6042 | rm -rf conftest.dir | |
6043 | else | |
6044 | am_cv_CC_dependencies_compiler_type=none | |
6045 | fi | |
6046 | ||
6047 | fi | |
81ecdfbb RW |
6048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6049 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6050 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 6051 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6052 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6053 | ||
6054 | fi | |
6055 | ||
6056 | ||
648d586d JB |
6057 | gnulib_extra_configure_args= |
6058 | # If large-file support is disabled, make sure gnulib does the same. | |
6059 | if test "$enable_largefile" = no; then | |
6060 | gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" | |
6061 | fi | |
6062 | ||
c971b7fa PA |
6063 | # Configure gnulib. We need to build gnulib under some other |
6064 | # directory not "gnulib", to avoid the problem of both GDB and | |
6065 | # GDBserver wanting to build it in the same directory, when building | |
6066 | # in the source dir. | |
783e057b | 6067 | |
c971b7fa PA |
6068 | in_src="gnulib" |
6069 | in_build="build-gnulib" | |
648d586d | 6070 | in_extra_args="$gnulib_extra_configure_args" |
c971b7fa PA |
6071 | |
6072 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
6073 | # so they do not pile up. | |
6074 | ac_sub_configure_args= | |
6075 | ac_prev= | |
6076 | eval "set x $ac_configure_args" | |
6077 | shift | |
6078 | for ac_arg | |
6079 | do | |
6080 | if test -n "$ac_prev"; then | |
6081 | ac_prev= | |
6082 | continue | |
6083 | fi | |
6084 | case $ac_arg in | |
6085 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6086 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6087 | ac_prev=cache_file ;; | |
6088 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6089 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
6090 | | --c=*) | |
6091 | ;; | |
6092 | --config-cache | -C) | |
6093 | ;; | |
6094 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6095 | ac_prev=srcdir ;; | |
6096 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6097 | ;; | |
6098 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
6099 | ac_prev=prefix ;; | |
6100 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
6101 | ;; | |
6102 | --disable-option-checking) | |
6103 | ;; | |
6104 | *) | |
6105 | case $ac_arg in | |
6106 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6107 | esac | |
6108 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
6109 | esac | |
6110 | done | |
6111 | ||
6112 | # Always prepend --prefix to ensure using the same prefix | |
6113 | # in subdir configurations. | |
6114 | ac_arg="--prefix=$prefix" | |
6115 | case $ac_arg in | |
6116 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6117 | esac | |
6118 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
6119 | ||
6120 | # Pass --silent | |
6121 | if test "$silent" = yes; then | |
6122 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
6123 | fi | |
6124 | ||
6125 | # Always prepend --disable-option-checking to silence warnings, since | |
6126 | # different subdirs can have different --enable and --with options. | |
6127 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
6128 | ||
6129 | ac_popdir=`pwd` | |
6130 | ac_dir=$in_build | |
6131 | ||
6132 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
6133 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
6134 | $as_echo "$ac_msg" >&6 | |
6135 | as_dir="$ac_dir"; as_fn_mkdir_p | |
6136 | ||
38ea300a PA |
6137 | case $srcdir in |
6138 | [\\/]* | ?:[\\/]* ) | |
6139 | ac_srcdir=$srcdir/$in_src ;; | |
6140 | *) # Relative name. | |
6141 | ac_srcdir=../$srcdir/$in_src ;; | |
6142 | esac | |
c971b7fa PA |
6143 | |
6144 | cd "$ac_dir" | |
6145 | ||
6146 | ac_sub_configure=$ac_srcdir/configure | |
6147 | ||
6148 | # Make the cache file name correct relative to the subdirectory. | |
6149 | case $cache_file in | |
6150 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
6151 | *) # Relative name. | |
6152 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
6153 | esac | |
6154 | ||
648d586d JB |
6155 | if test -n "$in_extra_args"; then |
6156 | # Add the extra args at the end. | |
6157 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
6158 | fi | |
6159 | ||
c971b7fa PA |
6160 | { $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 |
6161 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
6162 | # The eval makes quoting arguments work. | |
6163 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
6164 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
6165 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
6166 | ||
6167 | cd "$ac_popdir" | |
783e057b | 6168 | |
c971b7fa PA |
6169 | |
6170 | ||
6171 | CONFIG_OBS= | |
6172 | CONFIG_DEPS= | |
6173 | CONFIG_SRCS= | |
6174 | ENABLE_CFLAGS= | |
6175 | ||
6176 | CONFIG_ALL= | |
6177 | CONFIG_CLEAN= | |
6178 | CONFIG_INSTALL= | |
6179 | CONFIG_UNINSTALL= | |
6180 | ||
6181 | # If we haven't got the data from the intl directory, | |
6182 | # assume NLS is disabled. | |
6183 | USE_NLS=no | |
6184 | LIBINTL= | |
6185 | LIBINTL_DEP= | |
6186 | INCINTL= | |
6187 | XGETTEXT= | |
6188 | GMSGFMT= | |
6189 | POSUB= | |
783e057b DJ |
6190 | |
6191 | if test -f ../intl/config.intl; then | |
6192 | . ../intl/config.intl | |
6193 | fi | |
81ecdfbb RW |
6194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6195 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6196 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6198 | $as_echo "no" >&6; } | |
783e057b | 6199 | else |
81ecdfbb RW |
6200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6201 | $as_echo "yes" >&6; } | |
783e057b | 6202 | |
81ecdfbb | 6203 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6204 | |
6205 | ||
81ecdfbb RW |
6206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6207 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6208 | # Look for .po and .gmo files in the source directory. |
6209 | CATALOGS= | |
6210 | XLINGUAS= | |
6211 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6212 | # If there aren't any .gmo files the shell will give us the | |
6213 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6214 | # weeded out. | |
6215 | case "$cat" in *\**) | |
6216 | continue;; | |
6217 | esac | |
6218 | # The quadruple backslash is collapsed to a double backslash | |
6219 | # by the backticks, then collapsed again by the double quotes, | |
6220 | # leaving us with one backslash in the sed expression (right | |
6221 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6222 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6223 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6224 | # The user is allowed to set LINGUAS to a list of languages to | |
6225 | # install catalogs for. If it's empty that means "all of them." | |
6226 | if test "x$LINGUAS" = x; then | |
6227 | CATALOGS="$CATALOGS $cat" | |
6228 | XLINGUAS="$XLINGUAS $lang" | |
6229 | else | |
6230 | case "$LINGUAS" in *$lang*) | |
6231 | CATALOGS="$CATALOGS $cat" | |
6232 | XLINGUAS="$XLINGUAS $lang" | |
6233 | ;; | |
6234 | esac | |
e28b3332 DJ |
6235 | fi |
6236 | done | |
c971b7fa PA |
6237 | LINGUAS="$XLINGUAS" |
6238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6239 | $as_echo "$LINGUAS" >&6; } | |
6240 | ||
6241 | ||
6242 | DATADIRNAME=share | |
6243 | ||
6244 | INSTOBJEXT=.mo | |
6245 | ||
6246 | GENCAT=gencat | |
6247 | ||
6248 | CATOBJEXT=.gmo | |
e28b3332 | 6249 | |
e28b3332 DJ |
6250 | fi |
6251 | ||
c971b7fa PA |
6252 | localedir='${datadir}/locale' |
6253 | ||
6254 | ||
6255 | if test x"$USE_NLS" = xyes; then | |
6256 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6257 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6258 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6259 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6260 | fi |
e28b3332 | 6261 | |
c971b7fa PA |
6262 | GNULIB=build-gnulib/import |
6263 | ||
6264 | # For Makefile dependencies. | |
6265 | GNULIB_STDINT_H= | |
6266 | if test x"$STDINT_H" != x; then | |
6267 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
6268 | fi |
6269 | ||
6270 | ||
c971b7fa PA |
6271 | PACKAGE=gdb |
6272 | ||
6273 | cat >>confdefs.h <<_ACEOF | |
6274 | #define PACKAGE "$PACKAGE" | |
6275 | _ACEOF | |
6276 | ||
6277 | ||
6278 | ||
6279 | # We never need to detect it in this sub-configure. | |
6280 | # But preserve it for config.status --recheck. | |
6281 | ||
6282 | ||
6283 | ||
6284 | MAKEINFO_EXTRA_FLAGS="" | |
6285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6286 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
6287 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
6288 | $as_echo_n "(cached) " >&6 | |
6289 | else | |
6290 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6291 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6292 | gdb_cv_have_makeinfo_click=yes | |
6293 | else | |
6294 | gdb_cv_have_makeinfo_click=no | |
6295 | fi | |
6296 | fi | |
6297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6298 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6299 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6300 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6301 | fi | |
e28b3332 DJ |
6302 | |
6303 | ||
bec39cab AC |
6304 | |
6305 | ||
81ecdfbb RW |
6306 | # Check whether --with-separate-debug-dir was given. |
6307 | if test "${with_separate_debug_dir+set}" = set; then : | |
6308 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6309 | DEBUGDIR=$withval |
6310 | else | |
6311 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6312 | fi |
6313 | ||
20e95c23 | 6314 | |
783e057b DJ |
6315 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6316 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6317 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6318 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6319 | |
783e057b DJ |
6320 | cat >>confdefs.h <<_ACEOF |
6321 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6322 | _ACEOF |
20e95c23 | 6323 | |
20e95c23 | 6324 | |
20e95c23 | 6325 | |
0c4a4063 | 6326 | |
b14b1491 TT |
6327 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6328 | if test "x$prefix" = xNONE; then | |
6329 | test_prefix=/usr/local | |
6330 | else | |
6331 | test_prefix=$prefix | |
6332 | fi | |
783e057b | 6333 | else |
b14b1491 | 6334 | test_prefix=$exec_prefix |
783e057b | 6335 | fi |
b14b1491 TT |
6336 | value=0 |
6337 | case ${ac_define_dir} in | |
6338 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6339 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6340 | value=1 | |
6341 | ;; | |
6342 | esac | |
6343 | ||
6344 | cat >>confdefs.h <<_ACEOF | |
6345 | #define DEBUGDIR_RELOCATABLE $value | |
6346 | _ACEOF | |
6347 | ||
6348 | ||
6349 | ||
0c4a4063 | 6350 | |
f83d8a90 DE |
6351 | # We can't pass paths as command line arguments. |
6352 | # Mingw32 tries to be clever and will convert the paths for us. | |
6353 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6354 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6355 | # This breaks GDB's relocatable path conversions since paths passed in | |
6356 | # config.h would not get so translated, the path prefixes no longer match. | |
6357 | ||
6358 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6359 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6360 | ac_define_dir=`eval echo $bindir` | |
6361 | ac_define_dir=`eval echo $ac_define_dir` | |
6362 | ||
6363 | cat >>confdefs.h <<_ACEOF | |
6364 | #define BINDIR "$ac_define_dir" | |
6365 | _ACEOF | |
6366 | ||
6367 | ||
6368 | ||
b14b1491 TT |
6369 | # GDB's datadir relocation |
6370 | ||
6371 | ||
6372 | ||
81ecdfbb RW |
6373 | # Check whether --with-gdb-datadir was given. |
6374 | if test "${with_gdb_datadir+set}" = set; then : | |
6375 | withval=$with_gdb_datadir; | |
b14b1491 | 6376 | GDB_DATADIR=$withval |
20e95c23 | 6377 | else |
b14b1491 | 6378 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6379 | fi |
6380 | ||
20e95c23 | 6381 | |
b14b1491 TT |
6382 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6383 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6384 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6385 | ac_define_dir=`eval echo $ac_define_dir` | |
6386 | ||
6387 | cat >>confdefs.h <<_ACEOF | |
6388 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6389 | _ACEOF |
6390 | ||
b14b1491 TT |
6391 | |
6392 | ||
0c4a4063 | 6393 | |
b14b1491 TT |
6394 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6395 | if test "x$prefix" = xNONE; then | |
6396 | test_prefix=/usr/local | |
6397 | else | |
6398 | test_prefix=$prefix | |
6399 | fi | |
6400 | else | |
6401 | test_prefix=$exec_prefix | |
6402 | fi | |
6403 | value=0 | |
6404 | case ${ac_define_dir} in | |
6405 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6406 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6407 | value=1 | |
6408 | ;; | |
6409 | esac | |
6410 | ||
6411 | cat >>confdefs.h <<_ACEOF | |
6412 | #define GDB_DATADIR_RELOCATABLE $value | |
6413 | _ACEOF | |
6414 | ||
6415 | ||
783e057b | 6416 | |
20e95c23 | 6417 | |
0c4a4063 | 6418 | |
81ecdfbb RW |
6419 | # Check whether --with-relocated-sources was given. |
6420 | if test "${with_relocated_sources+set}" = set; then : | |
6421 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6422 | |
6423 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6424 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6425 | ac_define_dir=`eval echo $reloc_srcdir` | |
6426 | ac_define_dir=`eval echo $ac_define_dir` | |
6427 | ||
6428 | cat >>confdefs.h <<_ACEOF | |
6429 | #define RELOC_SRCDIR "$ac_define_dir" | |
6430 | _ACEOF | |
6431 | ||
6432 | ||
6433 | ||
81ecdfbb RW |
6434 | fi |
6435 | ||
29b0e8a2 | 6436 | |
7349ff92 JK |
6437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6438 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6439 | ||
6440 | # Check whether --with-auto-load-dir was given. | |
6441 | if test "${with_auto_load_dir+set}" = set; then : | |
6442 | withval=$with_auto_load_dir; | |
6443 | else | |
1564a261 | 6444 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6445 | fi |
6446 | ||
1564a261 | 6447 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6448 | |
6449 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6450 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6451 | ac_define_dir=`eval echo $escape_dir` | |
6452 | ac_define_dir=`eval echo $ac_define_dir` | |
6453 | ||
6454 | cat >>confdefs.h <<_ACEOF | |
6455 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6456 | _ACEOF | |
6457 | ||
6458 | ||
6459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6460 | $as_echo "$with_auto_load_dir" >&6; } | |
6461 | ||
bccbefd2 JK |
6462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6463 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6464 | ||
6465 | # Check whether --with-auto-load-safe-path was given. | |
6466 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6467 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6468 | with_auto_load_safe_path="/" |
6469 | fi | |
bccbefd2 | 6470 | else |
7349ff92 | 6471 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6472 | fi |
6473 | ||
1564a261 | 6474 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6475 | |
6476 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6477 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6478 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6479 | ac_define_dir=`eval echo $ac_define_dir` |
6480 | ||
6481 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6482 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6483 | _ACEOF |
6484 | ||
6485 | ||
6486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6487 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6488 | ||
29b0e8a2 | 6489 | |
20e95c23 | 6490 | |
5ae98d25 | 6491 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6492 | |
6493 | ||
783e057b | 6494 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6495 | # Check whether --enable-targets was given. |
6496 | if test "${enable_targets+set}" = set; then : | |
6497 | enableval=$enable_targets; case "${enableval}" in | |
6498 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
6499 | ;; |
6500 | no) enable_targets= ;; | |
6501 | *) enable_targets=$enableval ;; | |
6502 | esac | |
81ecdfbb RW |
6503 | fi |
6504 | ||
20e95c23 | 6505 | |
783e057b | 6506 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6507 | # Check whether --enable-64-bit-bfd was given. |
6508 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6509 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6510 | yes) want64=true ;; |
6511 | no) want64=false ;; | |
81ecdfbb | 6512 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6513 | esac |
6514 | else | |
6515 | want64=false | |
81ecdfbb RW |
6516 | fi |
6517 | ||
783e057b DJ |
6518 | # Provide defaults for some variables set by the per-host and per-target |
6519 | # configuration. | |
6520 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6521 | |
783e057b DJ |
6522 | if test "${target}" = "${host}"; then |
6523 | gdb_native=yes | |
6524 | else | |
6525 | gdb_native=no | |
6526 | fi | |
20e95c23 | 6527 | |
783e057b | 6528 | . $srcdir/configure.host |
20e95c23 | 6529 | |
fb23d554 SDJ |
6530 | # Add in the common host objects. |
6531 | . $srcdir/common/common.host | |
6532 | gdb_host_obs="$gdb_host_obs $common_host_obs" | |
6533 | ||
783e057b | 6534 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6535 | |
783e057b DJ |
6536 | TARGET_OBS= |
6537 | all_targets= | |
b292c783 | 6538 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6539 | |
783e057b | 6540 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6541 | do |
783e057b DJ |
6542 | if test "$targ_alias" = "all"; then |
6543 | all_targets=true | |
6544 | else | |
6545 | # Canonicalize the secondary target names. | |
6546 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6547 | if test -n "$result"; then | |
6548 | targ=$result | |
6549 | else | |
6550 | targ=$targ_alias | |
6551 | fi | |
20e95c23 | 6552 | |
783e057b | 6553 | . ${srcdir}/configure.tgt |
20e95c23 | 6554 | |
bf307134 JB |
6555 | if test -z "${gdb_target_obs}"; then : |
6556 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
6557 | fi | |
6558 | ||
783e057b DJ |
6559 | # Target-specific object files |
6560 | for i in ${gdb_target_obs}; do | |
6561 | case " $TARGET_OBS " in | |
6562 | *" ${i} "*) ;; | |
6563 | *) | |
6564 | TARGET_OBS="$TARGET_OBS ${i}" | |
6565 | ;; | |
6566 | esac | |
6567 | done | |
20e95c23 | 6568 | |
783e057b DJ |
6569 | # Check whether this target needs 64-bit CORE_ADDR |
6570 | if test x${want64} = xfalse; then | |
6571 | . ${srcdir}/../bfd/config.bfd | |
6572 | fi | |
b292c783 JK |
6573 | |
6574 | # Check whether this target is native and supports gcore. | |
6575 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6576 | && $gdb_have_gcore; then | |
6577 | HAVE_NATIVE_GCORE_TARGET=1 | |
6578 | fi | |
783e057b | 6579 | fi |
20e95c23 DJ |
6580 | done |
6581 | ||
783e057b DJ |
6582 | if test x${all_targets} = xtrue; then |
6583 | ||
6584 | # We want all 64-bit targets if we either: | |
6585 | # - run on a 64-bit host or | |
6586 | # - already require 64-bit support for some other target or | |
6587 | # - the --enable-64-bit-bfd option was supplied | |
6588 | # Otherwise we only support all 32-bit targets. | |
6589 | # | |
6590 | # NOTE: This test must be in sync with the corresponding | |
6591 | # tests in BFD! | |
20e95c23 | 6592 | |
783e057b | 6593 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6594 | # The cast to long int works around a bug in the HP C Compiler |
6595 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6596 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6597 | # This bug is HP SR number 8606223364. | |
6598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6599 | $as_echo_n "checking size of long... " >&6; } | |
6600 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
6601 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 6602 | else |
81ecdfbb | 6603 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6604 | |
81ecdfbb RW |
6605 | else |
6606 | if test "$ac_cv_type_long" = yes; then | |
6607 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6608 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6609 | { as_fn_set_status 77 | |
6610 | as_fn_error "cannot compute sizeof (long) | |
6611 | See \`config.log' for more details." "$LINENO" 5; }; } | |
6612 | else | |
6613 | ac_cv_sizeof_long=0 | |
6614 | fi | |
c0993dbe | 6615 | fi |
81ecdfbb | 6616 | |
c0993dbe | 6617 | fi |
81ecdfbb RW |
6618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6619 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6620 | |
c0993dbe | 6621 | |
c0993dbe | 6622 | |
c0993dbe UW |
6623 | cat >>confdefs.h <<_ACEOF |
6624 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6625 | _ACEOF | |
6626 | ||
6627 | ||
6628 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6629 | want64=true | |
6630 | fi | |
6631 | fi | |
6632 | if test x${want64} = xtrue; then | |
6633 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6634 | else | |
6635 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6636 | fi | |
6637 | fi | |
6638 | ||
6639 | ||
6640 | ||
b292c783 | 6641 | |
c0993dbe UW |
6642 | # For other settings, only the main target counts. |
6643 | gdb_sim= | |
6644 | gdb_osabi= | |
6645 | build_gdbserver= | |
6646 | targ=$target; . ${srcdir}/configure.tgt | |
6647 | ||
6648 | # Fetch the default architecture and default target vector from BFD. | |
6649 | targ=$target; . $srcdir/../bfd/config.bfd | |
6650 | ||
6651 | # We only want the first architecture, so strip off the others if | |
6652 | # there is more than one. | |
6653 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6654 | ||
6655 | if test "x$targ_archs" != x; then | |
6656 | ||
6657 | cat >>confdefs.h <<_ACEOF | |
6658 | #define DEFAULT_BFD_ARCH $targ_archs | |
6659 | _ACEOF | |
6660 | ||
6661 | fi | |
6662 | if test "x$targ_defvec" != x; then | |
6663 | ||
6664 | cat >>confdefs.h <<_ACEOF | |
6665 | #define DEFAULT_BFD_VEC $targ_defvec | |
6666 | _ACEOF | |
6667 | ||
6668 | fi | |
6669 | ||
c0993dbe UW |
6670 | # The CLI cannot be disabled yet, but may be in the future. |
6671 | ||
6672 | # Enable CLI. | |
81ecdfbb RW |
6673 | # Check whether --enable-gdbcli was given. |
6674 | if test "${enable_gdbcli+set}" = set; then : | |
6675 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
6676 | yes) |
6677 | ;; | |
6678 | no) | |
81ecdfbb | 6679 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 6680 | *) |
81ecdfbb | 6681 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
6682 | esac |
6683 | else | |
6684 | enable_gdbcli=yes | |
81ecdfbb RW |
6685 | fi |
6686 | ||
c0993dbe UW |
6687 | if test x"$enable_gdbcli" = xyes; then |
6688 | if test -d $srcdir/cli; then | |
6689 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
6690 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
6691 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
6692 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
6693 | fi | |
6694 | fi | |
6695 | ||
6696 | # Enable MI. | |
81ecdfbb RW |
6697 | # Check whether --enable-gdbmi was given. |
6698 | if test "${enable_gdbmi+set}" = set; then : | |
6699 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6700 | yes | no) |
6701 | ;; | |
6702 | *) | |
81ecdfbb | 6703 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6704 | esac |
6705 | else | |
6706 | enable_gdbmi=yes | |
81ecdfbb RW |
6707 | fi |
6708 | ||
c0993dbe UW |
6709 | if test x"$enable_gdbmi" = xyes; then |
6710 | if test -d $srcdir/mi; then | |
6711 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
6712 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6713 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6714 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6715 | fi | |
6716 | fi | |
6717 | ||
6718 | # Enable TUI. | |
81ecdfbb RW |
6719 | # Check whether --enable-tui was given. |
6720 | if test "${enable_tui+set}" = set; then : | |
6721 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6722 | yes | no | auto) |
c0993dbe UW |
6723 | ;; |
6724 | *) | |
81ecdfbb | 6725 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6726 | esac |
6727 | else | |
3ca64bd3 | 6728 | enable_tui=auto |
81ecdfbb RW |
6729 | fi |
6730 | ||
c0993dbe UW |
6731 | |
6732 | # Enable gdbtk. | |
81ecdfbb RW |
6733 | # Check whether --enable-gdbtk was given. |
6734 | if test "${enable_gdbtk+set}" = set; then : | |
6735 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6736 | yes | no) |
6737 | ;; | |
6738 | *) | |
81ecdfbb | 6739 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6740 | esac |
6741 | else | |
5062cc19 | 6742 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
6743 | enable_gdbtk=yes |
6744 | else | |
6745 | enable_gdbtk=no | |
6746 | fi | |
81ecdfbb RW |
6747 | fi |
6748 | ||
c0993dbe UW |
6749 | # We unconditionally disable gdbtk tests on selected platforms. |
6750 | case $host_os in | |
6751 | go32* | windows*) | |
81ecdfbb RW |
6752 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6753 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6754 | enable_gdbtk=no ;; |
6755 | esac | |
6756 | ||
05e7c244 | 6757 | # Libunwind support for ia64. |
bec39cab | 6758 | |
05e7c244 JK |
6759 | |
6760 | # Check whether --with-libunwind-ia64 was given. | |
6761 | if test "${with_libunwind_ia64+set}" = set; then : | |
6762 | withval=$with_libunwind_ia64; | |
bec39cab | 6763 | else |
05e7c244 JK |
6764 | with_libunwind_ia64=auto |
6765 | fi | |
bec39cab | 6766 | |
05e7c244 JK |
6767 | |
6768 | # Backward compatibility option. | |
6769 | if test "${with_libunwind+set}" = set; then | |
6770 | if test x"$with_libunwind_ia64" != xauto; then | |
6771 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
6772 | fi | |
6773 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
6774 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
6775 | with_libunwind_ia64="$with_libunwind" | |
6776 | fi | |
6777 | ||
6778 | case "$with_libunwind_ia64" in | |
6779 | yes | no) | |
6780 | ;; | |
6781 | auto) | |
6782 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 6783 | do : |
b54a8fd7 PA |
6784 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
6785 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 6786 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6787 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6788 | _ACEOF |
6789 | ||
6790 | fi | |
6791 | ||
6792 | done | |
6793 | ||
05e7c244 JK |
6794 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
6795 | ;; | |
6796 | *) | |
6797 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
6798 | ;; | |
6799 | esac | |
bec39cab | 6800 | |
05e7c244 | 6801 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 6802 | for ac_header in libunwind-ia64.h |
81ecdfbb | 6803 | do : |
b54a8fd7 PA |
6804 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
6805 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 6806 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6807 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6808 | _ACEOF |
6809 | ||
6810 | fi | |
6811 | ||
6812 | done | |
6813 | ||
05e7c244 JK |
6814 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
6815 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
6816 | fi | |
6817 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
6818 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
6819 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
6820 | fi |
6821 | ||
cb01cfba JB |
6822 | opt_curses=no |
6823 | ||
81ecdfbb RW |
6824 | # Check whether --with-curses was given. |
6825 | if test "${with_curses+set}" = set; then : | |
6826 | withval=$with_curses; opt_curses=$withval | |
6827 | fi | |
6828 | ||
cb01cfba | 6829 | |
76a39ba7 | 6830 | prefer_curses=no |
cb01cfba | 6831 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 6832 | prefer_curses=yes |
cb01cfba JB |
6833 | fi |
6834 | ||
a9322a30 | 6835 | # Profiling support. |
81ecdfbb RW |
6836 | # Check whether --enable-profiling was given. |
6837 | if test "${enable_profiling+set}" = set; then : | |
6838 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
6839 | yes | no) |
6840 | ;; | |
6841 | *) | |
81ecdfbb | 6842 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
6843 | esac |
6844 | else | |
6845 | enable_profiling=no | |
81ecdfbb | 6846 | fi |
bec39cab | 6847 | |
a9322a30 TT |
6848 | |
6849 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
6850 | do : |
6851 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6852 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6853 | eval as_val=\$$as_ac_var | |
6854 | if test "x$as_val" = x""yes; then : | |
6855 | cat >>confdefs.h <<_ACEOF | |
6856 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 6857 | _ACEOF |
a9322a30 | 6858 | |
81ecdfbb RW |
6859 | fi |
6860 | done | |
a9322a30 | 6861 | |
81ecdfbb RW |
6862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
6863 | $as_echo_n "checking for _etext... " >&6; } | |
6864 | if test "${ac_cv_var__etext+set}" = set; then : | |
6865 | $as_echo_n "(cached) " >&6 | |
6866 | else | |
6867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6868 | /* end confdefs.h. */ | |
6869 | #include <stdlib.h> | |
6870 | extern char _etext; | |
a9322a30 TT |
6871 | |
6872 | int | |
6873 | main () | |
6874 | { | |
6875 | free (&_etext); | |
6876 | ; | |
6877 | return 0; | |
6878 | } | |
bec39cab | 6879 | _ACEOF |
81ecdfbb | 6880 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6881 | ac_cv_var__etext=yes |
bec39cab | 6882 | else |
81ecdfbb | 6883 | ac_cv_var__etext=no |
bec39cab | 6884 | fi |
81ecdfbb RW |
6885 | rm -f core conftest.err conftest.$ac_objext \ |
6886 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6887 | fi |
81ecdfbb RW |
6888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6889 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 6890 | if test $ac_cv_var__etext = yes; then |
60ca704f | 6891 | |
81ecdfbb | 6892 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6893 | |
bec39cab | 6894 | fi |
81ecdfbb RW |
6895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6896 | $as_echo_n "checking for etext... " >&6; } | |
6897 | if test "${ac_cv_var_etext+set}" = set; then : | |
6898 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6899 | else |
81ecdfbb | 6900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6901 | /* end confdefs.h. */ |
a9322a30 TT |
6902 | #include <stdlib.h> |
6903 | extern char etext; | |
bec39cab AC |
6904 | |
6905 | int | |
6906 | main () | |
6907 | { | |
a9322a30 | 6908 | free (&etext); |
bec39cab AC |
6909 | ; |
6910 | return 0; | |
6911 | } | |
6912 | _ACEOF | |
81ecdfbb | 6913 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6914 | ac_cv_var_etext=yes |
bec39cab | 6915 | else |
81ecdfbb | 6916 | ac_cv_var_etext=no |
bec39cab | 6917 | fi |
81ecdfbb RW |
6918 | rm -f core conftest.err conftest.$ac_objext \ |
6919 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6920 | fi |
81ecdfbb RW |
6921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
6922 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
6923 | if test $ac_cv_var_etext = yes; then |
6924 | ||
81ecdfbb | 6925 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
6926 | |
6927 | fi | |
a9322a30 TT |
6928 | if test "$enable_profiling" = yes ; then |
6929 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 6930 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
6931 | fi |
6932 | PROFILE_CFLAGS=-pg | |
6933 | OLD_CFLAGS="$CFLAGS" | |
6934 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 6935 | |
81ecdfbb RW |
6936 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
6937 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
6938 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
6939 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6940 | else |
81ecdfbb | 6941 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6942 | /* end confdefs.h. */ |
bec39cab AC |
6943 | |
6944 | int | |
6945 | main () | |
6946 | { | |
a9322a30 | 6947 | int x; |
bec39cab AC |
6948 | ; |
6949 | return 0; | |
6950 | } | |
6951 | _ACEOF | |
81ecdfbb | 6952 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 6953 | ac_cv_cc_supports_pg=yes |
bec39cab | 6954 | else |
81ecdfbb | 6955 | ac_cv_cc_supports_pg=no |
bec39cab | 6956 | fi |
81ecdfbb | 6957 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 6958 | fi |
81ecdfbb RW |
6959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
6960 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 6961 | |
a9322a30 | 6962 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 6963 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 6964 | fi |
bec39cab | 6965 | |
a9322a30 | 6966 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
6967 | fi |
6968 | ||
c16158bc JM |
6969 | |
6970 | ||
81ecdfbb RW |
6971 | # Check whether --with-pkgversion was given. |
6972 | if test "${with_pkgversion+set}" = set; then : | |
6973 | withval=$with_pkgversion; case "$withval" in | |
6974 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6975 | no) PKGVERSION= ;; |
6976 | *) PKGVERSION="($withval) " ;; | |
6977 | esac | |
6978 | else | |
6979 | PKGVERSION="(GDB) " | |
6980 | ||
81ecdfbb | 6981 | fi |
c16158bc JM |
6982 | |
6983 | ||
6984 | ||
6985 | ||
81ecdfbb RW |
6986 | |
6987 | # Check whether --with-bugurl was given. | |
6988 | if test "${with_bugurl+set}" = set; then : | |
6989 | withval=$with_bugurl; case "$withval" in | |
6990 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6991 | no) BUGURL= |
6992 | ;; | |
6993 | *) BUGURL="$withval" | |
6994 | ;; | |
6995 | esac | |
6996 | else | |
6997 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
6998 | ||
81ecdfbb RW |
6999 | fi |
7000 | ||
c16158bc JM |
7001 | case ${BUGURL} in |
7002 | "") | |
7003 | REPORT_BUGS_TO= | |
7004 | REPORT_BUGS_TEXI= | |
7005 | ;; | |
7006 | *) | |
7007 | REPORT_BUGS_TO="<$BUGURL>" | |
7008 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7009 | ;; | |
7010 | esac; | |
7011 | ||
7012 | ||
7013 | ||
7014 | ||
7015 | cat >>confdefs.h <<_ACEOF | |
7016 | #define PKGVERSION "$PKGVERSION" | |
7017 | _ACEOF | |
7018 | ||
7019 | ||
7020 | cat >>confdefs.h <<_ACEOF | |
7021 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7022 | _ACEOF | |
7023 | ||
7024 | ||
bec39cab AC |
7025 | # --------------------- # |
7026 | # Checks for programs. # | |
7027 | # --------------------- # | |
7028 | ||
7029 | for ac_prog in gawk mawk nawk awk | |
7030 | do | |
7031 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7032 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7034 | $as_echo_n "checking for $ac_word... " >&6; } | |
7035 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7036 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7037 | else |
7038 | if test -n "$AWK"; then | |
7039 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7040 | else | |
7041 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7042 | for as_dir in $PATH | |
7043 | do | |
7044 | IFS=$as_save_IFS | |
7045 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7046 | for ac_exec_ext in '' $ac_executable_extensions; do |
7047 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7048 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7049 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7050 | break 2 |
7051 | fi | |
7052 | done | |
81ecdfbb RW |
7053 | done |
7054 | IFS=$as_save_IFS | |
bec39cab AC |
7055 | |
7056 | fi | |
7057 | fi | |
7058 | AWK=$ac_cv_prog_AWK | |
7059 | if test -n "$AWK"; then | |
81ecdfbb RW |
7060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7061 | $as_echo "$AWK" >&6; } | |
bec39cab | 7062 | else |
81ecdfbb RW |
7063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7064 | $as_echo "no" >&6; } | |
bec39cab AC |
7065 | fi |
7066 | ||
bec39cab | 7067 | |
81ecdfbb | 7068 | test -n "$AWK" && break |
bec39cab AC |
7069 | done |
7070 | ||
c971b7fa PA |
7071 | # Find a good install program. We prefer a C program (faster), |
7072 | # so one script is as good as another. But avoid the broken or | |
7073 | # incompatible versions: | |
7074 | # SysV /etc/install, /usr/sbin/install | |
7075 | # SunOS /usr/etc/install | |
7076 | # IRIX /sbin/install | |
7077 | # AIX /bin/install | |
7078 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7079 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7080 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7081 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7082 | # OS/2's system install, which has a completely different semantic | |
7083 | # ./install, which can be erroneously created by make from ./install.sh. | |
7084 | # Reject install programs that cannot install multiple files. | |
7085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7086 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7087 | if test -z "$INSTALL"; then | |
7088 | if test "${ac_cv_path_install+set}" = set; then : | |
7089 | $as_echo_n "(cached) " >&6 | |
7090 | else | |
7091 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7092 | for as_dir in $PATH | |
7093 | do | |
7094 | IFS=$as_save_IFS | |
7095 | test -z "$as_dir" && as_dir=. | |
7096 | # Account for people who put trailing slashes in PATH elements. | |
7097 | case $as_dir/ in #(( | |
7098 | ./ | .// | /[cC]/* | \ | |
7099 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7100 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7101 | /usr/ucb/* ) ;; | |
7102 | *) | |
7103 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7104 | # Don't use installbsd from OSF since it installs stuff as root | |
7105 | # by default. | |
7106 | for ac_prog in ginstall scoinst install; do | |
7107 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7108 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
7109 | if test $ac_prog = install && | |
7110 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7111 | # AIX install. It has an incompatible calling convention. | |
7112 | : | |
7113 | elif test $ac_prog = install && | |
7114 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7115 | # program-specific install script used by HP pwplus--don't use. | |
7116 | : | |
7117 | else | |
7118 | rm -rf conftest.one conftest.two conftest.dir | |
7119 | echo one > conftest.one | |
7120 | echo two > conftest.two | |
7121 | mkdir conftest.dir | |
7122 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7123 | test -s conftest.one && test -s conftest.two && | |
7124 | test -s conftest.dir/conftest.one && | |
7125 | test -s conftest.dir/conftest.two | |
7126 | then | |
7127 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7128 | break 3 | |
7129 | fi | |
7130 | fi | |
7131 | fi | |
7132 | done | |
7133 | done | |
7134 | ;; | |
7135 | esac | |
7136 | ||
7137 | done | |
7138 | IFS=$as_save_IFS | |
7139 | ||
7140 | rm -rf conftest.one conftest.two conftest.dir | |
7141 | ||
7142 | fi | |
7143 | if test "${ac_cv_path_install+set}" = set; then | |
7144 | INSTALL=$ac_cv_path_install | |
7145 | else | |
7146 | # As a last resort, use the slow shell script. Don't cache a | |
7147 | # value for INSTALL within a source directory, because that will | |
7148 | # break other packages using the cache if that directory is | |
7149 | # removed, or if the value is a relative name. | |
7150 | INSTALL=$ac_install_sh | |
7151 | fi | |
7152 | fi | |
7153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7154 | $as_echo "$INSTALL" >&6; } | |
7155 | ||
7156 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7157 | # It thinks the first close brace ends the variable substitution. | |
7158 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7159 | ||
7160 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7161 | ||
7162 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7163 | |
81ecdfbb RW |
7164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7165 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7166 | LN_S=$as_ln_s |
7167 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7169 | $as_echo "yes" >&6; } | |
bec39cab | 7170 | else |
81ecdfbb RW |
7171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7172 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7173 | fi |
7174 | ||
7175 | if test -n "$ac_tool_prefix"; then | |
7176 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7177 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7179 | $as_echo_n "checking for $ac_word... " >&6; } | |
7180 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
7181 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7182 | else |
7183 | if test -n "$RANLIB"; then | |
7184 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7185 | else | |
7186 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7187 | for as_dir in $PATH | |
7188 | do | |
7189 | IFS=$as_save_IFS | |
7190 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7191 | for ac_exec_ext in '' $ac_executable_extensions; do |
7192 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7193 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7194 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7195 | break 2 |
7196 | fi | |
7197 | done | |
81ecdfbb RW |
7198 | done |
7199 | IFS=$as_save_IFS | |
bec39cab AC |
7200 | |
7201 | fi | |
7202 | fi | |
7203 | RANLIB=$ac_cv_prog_RANLIB | |
7204 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7206 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7207 | else |
81ecdfbb RW |
7208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7209 | $as_echo "no" >&6; } | |
bec39cab AC |
7210 | fi |
7211 | ||
81ecdfbb | 7212 | |
bec39cab AC |
7213 | fi |
7214 | if test -z "$ac_cv_prog_RANLIB"; then | |
7215 | ac_ct_RANLIB=$RANLIB | |
7216 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7217 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7219 | $as_echo_n "checking for $ac_word... " >&6; } | |
7220 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
7221 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7222 | else |
7223 | if test -n "$ac_ct_RANLIB"; then | |
7224 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7225 | else | |
7226 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7227 | for as_dir in $PATH | |
7228 | do | |
7229 | IFS=$as_save_IFS | |
7230 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7231 | for ac_exec_ext in '' $ac_executable_extensions; do |
7232 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7233 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7234 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7235 | break 2 |
7236 | fi | |
7237 | done | |
81ecdfbb RW |
7238 | done |
7239 | IFS=$as_save_IFS | |
bec39cab | 7240 | |
bec39cab AC |
7241 | fi |
7242 | fi | |
7243 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7244 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7246 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7247 | else |
81ecdfbb RW |
7248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7249 | $as_echo "no" >&6; } | |
bec39cab AC |
7250 | fi |
7251 | ||
81ecdfbb RW |
7252 | if test "x$ac_ct_RANLIB" = x; then |
7253 | RANLIB=":" | |
7254 | else | |
7255 | case $cross_compiling:$ac_tool_warned in | |
7256 | yes:) | |
7257 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7258 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7259 | ac_tool_warned=yes ;; | |
7260 | esac | |
7261 | RANLIB=$ac_ct_RANLIB | |
7262 | fi | |
bec39cab AC |
7263 | else |
7264 | RANLIB="$ac_cv_prog_RANLIB" | |
7265 | fi | |
7266 | ||
7267 | for ac_prog in 'bison -y' byacc | |
7268 | do | |
7269 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7270 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7271 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7272 | $as_echo_n "checking for $ac_word... " >&6; } | |
7273 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
7274 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7275 | else |
7276 | if test -n "$YACC"; then | |
7277 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7278 | else | |
7279 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7280 | for as_dir in $PATH | |
7281 | do | |
7282 | IFS=$as_save_IFS | |
7283 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7284 | for ac_exec_ext in '' $ac_executable_extensions; do |
7285 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7286 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7287 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7288 | break 2 |
7289 | fi | |
7290 | done | |
81ecdfbb RW |
7291 | done |
7292 | IFS=$as_save_IFS | |
bec39cab AC |
7293 | |
7294 | fi | |
7295 | fi | |
7296 | YACC=$ac_cv_prog_YACC | |
7297 | if test -n "$YACC"; then | |
81ecdfbb RW |
7298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7299 | $as_echo "$YACC" >&6; } | |
bec39cab | 7300 | else |
81ecdfbb RW |
7301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7302 | $as_echo "no" >&6; } | |
bec39cab AC |
7303 | fi |
7304 | ||
81ecdfbb | 7305 | |
bec39cab AC |
7306 | test -n "$YACC" && break |
7307 | done | |
7308 | test -n "$YACC" || YACC="yacc" | |
7309 | ||
7310 | ||
7311 | if test -n "$ac_tool_prefix"; then | |
7312 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7313 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7315 | $as_echo_n "checking for $ac_word... " >&6; } | |
7316 | if test "${ac_cv_prog_AR+set}" = set; then : | |
7317 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7318 | else |
7319 | if test -n "$AR"; then | |
7320 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7321 | else | |
7322 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7323 | for as_dir in $PATH | |
7324 | do | |
7325 | IFS=$as_save_IFS | |
7326 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7327 | for ac_exec_ext in '' $ac_executable_extensions; do |
7328 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7329 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7330 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7331 | break 2 |
7332 | fi | |
7333 | done | |
81ecdfbb RW |
7334 | done |
7335 | IFS=$as_save_IFS | |
bec39cab AC |
7336 | |
7337 | fi | |
7338 | fi | |
7339 | AR=$ac_cv_prog_AR | |
7340 | if test -n "$AR"; then | |
81ecdfbb RW |
7341 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7342 | $as_echo "$AR" >&6; } | |
bec39cab | 7343 | else |
81ecdfbb RW |
7344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7345 | $as_echo "no" >&6; } | |
bec39cab AC |
7346 | fi |
7347 | ||
81ecdfbb | 7348 | |
bec39cab AC |
7349 | fi |
7350 | if test -z "$ac_cv_prog_AR"; then | |
7351 | ac_ct_AR=$AR | |
7352 | # Extract the first word of "ar", so it can be a program name with args. | |
7353 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7355 | $as_echo_n "checking for $ac_word... " >&6; } | |
7356 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
7357 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7358 | else |
7359 | if test -n "$ac_ct_AR"; then | |
7360 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7361 | else | |
7362 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7363 | for as_dir in $PATH | |
7364 | do | |
7365 | IFS=$as_save_IFS | |
7366 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7367 | for ac_exec_ext in '' $ac_executable_extensions; do |
7368 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7369 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7370 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7371 | break 2 |
7372 | fi | |
7373 | done | |
81ecdfbb RW |
7374 | done |
7375 | IFS=$as_save_IFS | |
bec39cab AC |
7376 | |
7377 | fi | |
7378 | fi | |
7379 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7380 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7382 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7383 | else |
81ecdfbb RW |
7384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7385 | $as_echo "no" >&6; } | |
bec39cab AC |
7386 | fi |
7387 | ||
81ecdfbb RW |
7388 | if test "x$ac_ct_AR" = x; then |
7389 | AR="" | |
7390 | else | |
7391 | case $cross_compiling:$ac_tool_warned in | |
7392 | yes:) | |
7393 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7394 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7395 | ac_tool_warned=yes ;; | |
7396 | esac | |
7397 | AR=$ac_ct_AR | |
7398 | fi | |
bec39cab AC |
7399 | else |
7400 | AR="$ac_cv_prog_AR" | |
7401 | fi | |
7402 | ||
7403 | if test -n "$ac_tool_prefix"; then | |
7404 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7405 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7407 | $as_echo_n "checking for $ac_word... " >&6; } | |
7408 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
7409 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7410 | else |
7411 | if test -n "$DLLTOOL"; then | |
7412 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7413 | else | |
7414 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7415 | for as_dir in $PATH | |
7416 | do | |
7417 | IFS=$as_save_IFS | |
7418 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7419 | for ac_exec_ext in '' $ac_executable_extensions; do |
7420 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7421 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7422 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7423 | break 2 |
7424 | fi | |
7425 | done | |
81ecdfbb RW |
7426 | done |
7427 | IFS=$as_save_IFS | |
bec39cab AC |
7428 | |
7429 | fi | |
7430 | fi | |
7431 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7432 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7434 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7435 | else |
81ecdfbb RW |
7436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7437 | $as_echo "no" >&6; } | |
bec39cab AC |
7438 | fi |
7439 | ||
81ecdfbb | 7440 | |
bec39cab AC |
7441 | fi |
7442 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7443 | ac_ct_DLLTOOL=$DLLTOOL | |
7444 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7445 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7447 | $as_echo_n "checking for $ac_word... " >&6; } | |
7448 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
7449 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7450 | else |
7451 | if test -n "$ac_ct_DLLTOOL"; then | |
7452 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7453 | else | |
7454 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7455 | for as_dir in $PATH | |
7456 | do | |
7457 | IFS=$as_save_IFS | |
7458 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7459 | for ac_exec_ext in '' $ac_executable_extensions; do |
7460 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7461 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7462 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7463 | break 2 |
7464 | fi | |
7465 | done | |
81ecdfbb RW |
7466 | done |
7467 | IFS=$as_save_IFS | |
bec39cab AC |
7468 | |
7469 | fi | |
7470 | fi | |
7471 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7472 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7474 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7475 | else |
81ecdfbb RW |
7476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7477 | $as_echo "no" >&6; } | |
bec39cab AC |
7478 | fi |
7479 | ||
81ecdfbb RW |
7480 | if test "x$ac_ct_DLLTOOL" = x; then |
7481 | DLLTOOL="" | |
7482 | else | |
7483 | case $cross_compiling:$ac_tool_warned in | |
7484 | yes:) | |
7485 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7486 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7487 | ac_tool_warned=yes ;; | |
7488 | esac | |
7489 | DLLTOOL=$ac_ct_DLLTOOL | |
7490 | fi | |
bec39cab AC |
7491 | else |
7492 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7493 | fi | |
7494 | ||
7495 | if test -n "$ac_tool_prefix"; then | |
7496 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7497 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7499 | $as_echo_n "checking for $ac_word... " >&6; } | |
7500 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
7501 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7502 | else |
7503 | if test -n "$WINDRES"; then | |
7504 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7505 | else | |
7506 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7507 | for as_dir in $PATH | |
7508 | do | |
7509 | IFS=$as_save_IFS | |
7510 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7511 | for ac_exec_ext in '' $ac_executable_extensions; do |
7512 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7513 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7514 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7515 | break 2 |
7516 | fi | |
7517 | done | |
81ecdfbb RW |
7518 | done |
7519 | IFS=$as_save_IFS | |
bec39cab AC |
7520 | |
7521 | fi | |
7522 | fi | |
7523 | WINDRES=$ac_cv_prog_WINDRES | |
7524 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7526 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7527 | else |
81ecdfbb RW |
7528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7529 | $as_echo "no" >&6; } | |
bec39cab AC |
7530 | fi |
7531 | ||
81ecdfbb | 7532 | |
bec39cab AC |
7533 | fi |
7534 | if test -z "$ac_cv_prog_WINDRES"; then | |
7535 | ac_ct_WINDRES=$WINDRES | |
7536 | # Extract the first word of "windres", so it can be a program name with args. | |
7537 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7539 | $as_echo_n "checking for $ac_word... " >&6; } | |
7540 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
7541 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7542 | else |
7543 | if test -n "$ac_ct_WINDRES"; then | |
7544 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7545 | else | |
7546 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7547 | for as_dir in $PATH | |
7548 | do | |
7549 | IFS=$as_save_IFS | |
7550 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7551 | for ac_exec_ext in '' $ac_executable_extensions; do |
7552 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7553 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7554 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7555 | break 2 |
7556 | fi | |
7557 | done | |
81ecdfbb RW |
7558 | done |
7559 | IFS=$as_save_IFS | |
bec39cab AC |
7560 | |
7561 | fi | |
7562 | fi | |
7563 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7564 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7566 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7567 | else |
81ecdfbb RW |
7568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7569 | $as_echo "no" >&6; } | |
c906108c | 7570 | fi |
bec39cab | 7571 | |
81ecdfbb RW |
7572 | if test "x$ac_ct_WINDRES" = x; then |
7573 | WINDRES="" | |
7574 | else | |
7575 | case $cross_compiling:$ac_tool_warned in | |
7576 | yes:) | |
7577 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7578 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7579 | ac_tool_warned=yes ;; | |
7580 | esac | |
7581 | WINDRES=$ac_ct_WINDRES | |
7582 | fi | |
c906108c | 7583 | else |
bec39cab | 7584 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7585 | fi |
7586 | ||
bec39cab | 7587 | |
036c3acb TS |
7588 | case $host_os in |
7589 | gnu*) | |
7590 | # Needed for GNU Hurd hosts. | |
7591 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7592 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7593 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7594 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7595 | $as_echo_n "checking for $ac_word... " >&6; } | |
7596 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
7597 | $as_echo_n "(cached) " >&6 | |
c906108c | 7598 | else |
bec39cab AC |
7599 | if test -n "$MIG"; then |
7600 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7601 | else | |
7602 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7603 | for as_dir in $PATH | |
7604 | do | |
7605 | IFS=$as_save_IFS | |
7606 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7607 | for ac_exec_ext in '' $ac_executable_extensions; do |
7608 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7609 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7610 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7611 | break 2 |
7612 | fi | |
7613 | done | |
81ecdfbb RW |
7614 | done |
7615 | IFS=$as_save_IFS | |
bec39cab | 7616 | |
c906108c | 7617 | fi |
bec39cab AC |
7618 | fi |
7619 | MIG=$ac_cv_prog_MIG | |
7620 | if test -n "$MIG"; then | |
81ecdfbb RW |
7621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7622 | $as_echo "$MIG" >&6; } | |
c906108c | 7623 | else |
81ecdfbb RW |
7624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7625 | $as_echo "no" >&6; } | |
c906108c SS |
7626 | fi |
7627 | ||
81ecdfbb | 7628 | |
bec39cab AC |
7629 | fi |
7630 | if test -z "$ac_cv_prog_MIG"; then | |
7631 | ac_ct_MIG=$MIG | |
7632 | # Extract the first word of "mig", so it can be a program name with args. | |
7633 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
7634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7635 | $as_echo_n "checking for $ac_word... " >&6; } | |
7636 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
7637 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7638 | else |
7639 | if test -n "$ac_ct_MIG"; then | |
7640 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
7641 | else | |
7642 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7643 | for as_dir in $PATH | |
7644 | do | |
7645 | IFS=$as_save_IFS | |
7646 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7647 | for ac_exec_ext in '' $ac_executable_extensions; do |
7648 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7649 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 7650 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7651 | break 2 |
7652 | fi | |
7653 | done | |
81ecdfbb RW |
7654 | done |
7655 | IFS=$as_save_IFS | |
c906108c | 7656 | |
bec39cab AC |
7657 | fi |
7658 | fi | |
7659 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
7660 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
7661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
7662 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 7663 | else |
81ecdfbb RW |
7664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7665 | $as_echo "no" >&6; } | |
bec39cab | 7666 | fi |
c906108c | 7667 | |
81ecdfbb RW |
7668 | if test "x$ac_ct_MIG" = x; then |
7669 | MIG="" | |
7670 | else | |
7671 | case $cross_compiling:$ac_tool_warned in | |
7672 | yes:) | |
7673 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7674 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7675 | ac_tool_warned=yes ;; | |
7676 | esac | |
7677 | MIG=$ac_ct_MIG | |
7678 | fi | |
bec39cab AC |
7679 | else |
7680 | MIG="$ac_cv_prog_MIG" | |
7681 | fi | |
c906108c | 7682 | |
036c3acb TS |
7683 | if test x"$MIG" = x; then |
7684 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
7685 | fi | |
7686 | ;; | |
7687 | esac | |
c906108c | 7688 | |
bec39cab AC |
7689 | # ---------------------- # |
7690 | # Checks for libraries. # | |
7691 | # ---------------------- # | |
c906108c | 7692 | |
bec39cab | 7693 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
7694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
7695 | $as_echo_n "checking for main in -lm... " >&6; } | |
7696 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
7697 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7698 | else |
7699 | ac_check_lib_save_LIBS=$LIBS | |
7700 | LIBS="-lm $LIBS" | |
81ecdfbb | 7701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7702 | /* end confdefs.h. */ |
c906108c | 7703 | |
c906108c | 7704 | |
bec39cab AC |
7705 | int |
7706 | main () | |
7707 | { | |
81ecdfbb | 7708 | return main (); |
bec39cab AC |
7709 | ; |
7710 | return 0; | |
7711 | } | |
7712 | _ACEOF | |
81ecdfbb | 7713 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7714 | ac_cv_lib_m_main=yes |
7715 | else | |
81ecdfbb | 7716 | ac_cv_lib_m_main=no |
bec39cab | 7717 | fi |
81ecdfbb RW |
7718 | rm -f core conftest.err conftest.$ac_objext \ |
7719 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7720 | LIBS=$ac_check_lib_save_LIBS |
7721 | fi | |
81ecdfbb RW |
7722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
7723 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
7724 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
7725 | cat >>confdefs.h <<_ACEOF |
7726 | #define HAVE_LIBM 1 | |
7727 | _ACEOF | |
7728 | ||
7729 | LIBS="-lm $LIBS" | |
c906108c | 7730 | |
c906108c | 7731 | fi |
bec39cab AC |
7732 | |
7733 | ||
bec39cab | 7734 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
7735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
7736 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
7737 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7738 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7739 | else |
7740 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7741 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7742 | /* end confdefs.h. */ |
ddc9cd0f | 7743 | |
81ecdfbb RW |
7744 | /* Override any GCC internal prototype to avoid an error. |
7745 | Use char because int might match the return type of a GCC | |
7746 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7747 | #ifdef __cplusplus |
7748 | extern "C" | |
7749 | #endif | |
bec39cab AC |
7750 | char gethostbyname (); |
7751 | int | |
7752 | main () | |
7753 | { | |
81ecdfbb | 7754 | return gethostbyname (); |
bec39cab AC |
7755 | ; |
7756 | return 0; | |
7757 | } | |
7758 | _ACEOF | |
81ecdfbb RW |
7759 | for ac_lib in '' nsl; do |
7760 | if test -z "$ac_lib"; then | |
7761 | ac_res="none required" | |
7762 | else | |
7763 | ac_res=-l$ac_lib | |
b4e70030 | 7764 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7765 | fi |
7766 | if ac_fn_c_try_link "$LINENO"; then : | |
7767 | ac_cv_search_gethostbyname=$ac_res | |
7768 | fi | |
7769 | rm -f core conftest.err conftest.$ac_objext \ | |
7770 | conftest$ac_exeext | |
7771 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7772 | break | |
7773 | fi | |
7774 | done | |
7775 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 7776 | |
bec39cab | 7777 | else |
81ecdfbb | 7778 | ac_cv_search_gethostbyname=no |
bec39cab | 7779 | fi |
81ecdfbb | 7780 | rm conftest.$ac_ext |
bec39cab AC |
7781 | LIBS=$ac_func_search_save_LIBS |
7782 | fi | |
81ecdfbb RW |
7783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
7784 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
7785 | ac_res=$ac_cv_search_gethostbyname | |
7786 | if test "$ac_res" != no; then : | |
7787 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 7788 | |
bec39cab | 7789 | fi |
96baa820 | 7790 | |
c906108c | 7791 | |
b4e70030 | 7792 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
7793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
7794 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
7795 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7796 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
7797 | else |
7798 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7800 | /* end confdefs.h. */ |
7801 | ||
81ecdfbb RW |
7802 | /* Override any GCC internal prototype to avoid an error. |
7803 | Use char because int might match the return type of a GCC | |
7804 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
7805 | #ifdef __cplusplus |
7806 | extern "C" | |
7807 | #endif | |
b4e70030 JB |
7808 | char socketpair (); |
7809 | int | |
7810 | main () | |
7811 | { | |
81ecdfbb | 7812 | return socketpair (); |
b4e70030 JB |
7813 | ; |
7814 | return 0; | |
7815 | } | |
7816 | _ACEOF | |
81ecdfbb RW |
7817 | for ac_lib in '' socket; do |
7818 | if test -z "$ac_lib"; then | |
7819 | ac_res="none required" | |
7820 | else | |
7821 | ac_res=-l$ac_lib | |
b4e70030 | 7822 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7823 | fi |
7824 | if ac_fn_c_try_link "$LINENO"; then : | |
7825 | ac_cv_search_socketpair=$ac_res | |
7826 | fi | |
7827 | rm -f core conftest.err conftest.$ac_objext \ | |
7828 | conftest$ac_exeext | |
7829 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7830 | break | |
7831 | fi | |
7832 | done | |
7833 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 7834 | |
b4e70030 | 7835 | else |
81ecdfbb | 7836 | ac_cv_search_socketpair=no |
b4e70030 | 7837 | fi |
81ecdfbb | 7838 | rm conftest.$ac_ext |
b4e70030 JB |
7839 | LIBS=$ac_func_search_save_LIBS |
7840 | fi | |
81ecdfbb RW |
7841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7842 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7843 | ac_res=$ac_cv_search_socketpair | |
7844 | if test "$ac_res" != no; then : | |
7845 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7846 | |
7847 | fi | |
7848 | ||
7849 | ||
233a11ab | 7850 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 7851 | |
711a72d3 | 7852 | # Use the system's zlib library. |
39f3de7c L |
7853 | zlibdir="-L\$(top_builddir)/../zlib" |
7854 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 7855 | |
711a72d3 L |
7856 | # Check whether --with-system-zlib was given. |
7857 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
7858 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
7859 | zlibdir= | |
7860 | zlibinc= | |
7861 | fi | |
b040ad30 | 7862 | |
233a11ab | 7863 | fi |
233a11ab | 7864 | |
233a11ab | 7865 | |
233a11ab | 7866 | |
b040ad30 | 7867 | |
233a11ab | 7868 | |
25268153 | 7869 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
37773e78 | 7870 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
25268153 JB |
7871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
7872 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
7873 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7874 | $as_echo_n "(cached) " >&6 | |
7875 | else | |
7876 | ac_func_search_save_LIBS=$LIBS | |
7877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7878 | /* end confdefs.h. */ | |
7879 | ||
7880 | /* Override any GCC internal prototype to avoid an error. | |
7881 | Use char because int might match the return type of a GCC | |
7882 | builtin and then its argument prototype would still apply. */ | |
7883 | #ifdef __cplusplus | |
7884 | extern "C" | |
7885 | #endif | |
7886 | char kinfo_getvmmap (); | |
7887 | int | |
7888 | main () | |
7889 | { | |
7890 | return kinfo_getvmmap (); | |
7891 | ; | |
7892 | return 0; | |
7893 | } | |
7894 | _ACEOF | |
37773e78 | 7895 | for ac_lib in '' util util-freebsd; do |
25268153 JB |
7896 | if test -z "$ac_lib"; then |
7897 | ac_res="none required" | |
7898 | else | |
7899 | ac_res=-l$ac_lib | |
7900 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7901 | fi | |
7902 | if ac_fn_c_try_link "$LINENO"; then : | |
7903 | ac_cv_search_kinfo_getvmmap=$ac_res | |
7904 | fi | |
7905 | rm -f core conftest.err conftest.$ac_objext \ | |
7906 | conftest$ac_exeext | |
7907 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7908 | break | |
7909 | fi | |
7910 | done | |
7911 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7912 | ||
7913 | else | |
7914 | ac_cv_search_kinfo_getvmmap=no | |
7915 | fi | |
7916 | rm conftest.$ac_ext | |
7917 | LIBS=$ac_func_search_save_LIBS | |
7918 | fi | |
7919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
7920 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
7921 | ac_res=$ac_cv_search_kinfo_getvmmap | |
7922 | if test "$ac_res" != no; then : | |
7923 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7924 | ||
7925 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
7926 | ||
7927 | fi | |
7928 | ||
7929 | ||
77f120bf | 7930 | |
016a3251 DD |
7931 | if test "X$prefix" = "XNONE"; then |
7932 | acl_final_prefix="$ac_default_prefix" | |
7933 | else | |
7934 | acl_final_prefix="$prefix" | |
7935 | fi | |
7936 | if test "X$exec_prefix" = "XNONE"; then | |
7937 | acl_final_exec_prefix='${prefix}' | |
7938 | else | |
7939 | acl_final_exec_prefix="$exec_prefix" | |
7940 | fi | |
7941 | acl_save_prefix="$prefix" | |
7942 | prefix="$acl_final_prefix" | |
7943 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7944 | prefix="$acl_save_prefix" | |
7945 | ||
7946 | ||
7947 | # Check whether --with-gnu-ld was given. | |
7948 | if test "${with_gnu_ld+set}" = set; then : | |
7949 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
7950 | else | |
7951 | with_gnu_ld=no | |
7952 | fi | |
7953 | ||
7954 | # Prepare PATH_SEPARATOR. | |
7955 | # The user is always right. | |
7956 | if test "${PATH_SEPARATOR+set}" != set; then | |
7957 | echo "#! /bin/sh" >conf$$.sh | |
7958 | echo "exit 0" >>conf$$.sh | |
7959 | chmod +x conf$$.sh | |
7960 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7961 | PATH_SEPARATOR=';' | |
7962 | else | |
7963 | PATH_SEPARATOR=: | |
7964 | fi | |
7965 | rm -f conf$$.sh | |
7966 | fi | |
7967 | ac_prog=ld | |
7968 | if test "$GCC" = yes; then | |
7969 | # Check if gcc -print-prog-name=ld gives a path. | |
7970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
7971 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
7972 | case $host in | |
7973 | *-*-mingw*) | |
7974 | # gcc leaves a trailing carriage return which upsets mingw | |
7975 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7976 | *) | |
7977 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7978 | esac | |
7979 | case $ac_prog in | |
7980 | # Accept absolute paths. | |
7981 | [\\/]* | [A-Za-z]:[\\/]*) | |
7982 | re_direlt='/[^/][^/]*/\.\./' | |
7983 | # Canonicalize the path of ld | |
7984 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7985 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7986 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7987 | done | |
7988 | test -z "$LD" && LD="$ac_prog" | |
7989 | ;; | |
7990 | "") | |
7991 | # If it fails, then pretend we aren't using GCC. | |
7992 | ac_prog=ld | |
7993 | ;; | |
7994 | *) | |
7995 | # If it is relative, then search for the first ld in PATH. | |
7996 | with_gnu_ld=unknown | |
7997 | ;; | |
7998 | esac | |
7999 | elif test "$with_gnu_ld" = yes; then | |
8000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8001 | $as_echo_n "checking for GNU ld... " >&6; } | |
8002 | else | |
8003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8004 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8005 | fi | |
8006 | if test "${acl_cv_path_LD+set}" = set; then : | |
8007 | $as_echo_n "(cached) " >&6 | |
8008 | else | |
8009 | if test -z "$LD"; then | |
8010 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8011 | for ac_dir in $PATH; do | |
8012 | test -z "$ac_dir" && ac_dir=. | |
8013 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8014 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8015 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8016 | # but apparently some GNU ld's only accept -v. | |
8017 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8018 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8019 | test "$with_gnu_ld" != no && break | |
8020 | else | |
8021 | test "$with_gnu_ld" != yes && break | |
8022 | fi | |
8023 | fi | |
8024 | done | |
8025 | IFS="$ac_save_ifs" | |
8026 | else | |
8027 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8028 | fi | |
8029 | fi | |
8030 | ||
8031 | LD="$acl_cv_path_LD" | |
8032 | if test -n "$LD"; then | |
8033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8034 | $as_echo "$LD" >&6; } | |
8035 | else | |
8036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8037 | $as_echo "no" >&6; } | |
8038 | fi | |
8039 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 | |
8040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
8041 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
8042 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
8043 | $as_echo_n "(cached) " >&6 | |
8044 | else | |
8045 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8046 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8047 | acl_cv_prog_gnu_ld=yes | |
8048 | else | |
8049 | acl_cv_prog_gnu_ld=no | |
8050 | fi | |
8051 | fi | |
8052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8053 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8054 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8055 | ||
8056 | ||
8057 | ||
8058 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8059 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
8060 | if test "${acl_cv_rpath+set}" = set; then : | |
8061 | $as_echo_n "(cached) " >&6 | |
8062 | else | |
8063 | ||
8064 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8065 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8066 | . ./conftest.sh | |
8067 | rm -f ./conftest.sh | |
8068 | acl_cv_rpath=done | |
8069 | ||
8070 | fi | |
8071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8072 | $as_echo "$acl_cv_rpath" >&6; } | |
8073 | wl="$acl_cv_wl" | |
8074 | libext="$acl_cv_libext" | |
8075 | shlibext="$acl_cv_shlibext" | |
8076 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8077 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8078 | hardcode_direct="$acl_cv_hardcode_direct" | |
8079 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8080 | # Check whether --enable-rpath was given. | |
8081 | if test "${enable_rpath+set}" = set; then : | |
8082 | enableval=$enable_rpath; : | |
8083 | else | |
8084 | enable_rpath=yes | |
8085 | fi | |
8086 | ||
8087 | ||
8088 | ||
8089 | ||
8090 | ||
8091 | ||
8092 | ||
8093 | ||
8094 | use_additional=yes | |
8095 | ||
8096 | acl_save_prefix="$prefix" | |
8097 | prefix="$acl_final_prefix" | |
8098 | acl_save_exec_prefix="$exec_prefix" | |
8099 | exec_prefix="$acl_final_exec_prefix" | |
8100 | ||
8101 | eval additional_includedir=\"$includedir\" | |
8102 | eval additional_libdir=\"$libdir\" | |
8103 | ||
8104 | exec_prefix="$acl_save_exec_prefix" | |
8105 | prefix="$acl_save_prefix" | |
77f120bf | 8106 | |
6c7a06a3 | 8107 | |
81ecdfbb RW |
8108 | # Check whether --with-libiconv-prefix was given. |
8109 | if test "${with_libiconv_prefix+set}" = set; then : | |
8110 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8111 | if test "X$withval" = "Xno"; then |
8112 | use_additional=no | |
8113 | else | |
8114 | if test "X$withval" = "X"; then | |
8115 | ||
8116 | acl_save_prefix="$prefix" | |
8117 | prefix="$acl_final_prefix" | |
8118 | acl_save_exec_prefix="$exec_prefix" | |
8119 | exec_prefix="$acl_final_exec_prefix" | |
8120 | ||
8121 | eval additional_includedir=\"$includedir\" | |
8122 | eval additional_libdir=\"$libdir\" | |
8123 | ||
8124 | exec_prefix="$acl_save_exec_prefix" | |
8125 | prefix="$acl_save_prefix" | |
8126 | ||
8127 | else | |
8128 | additional_includedir="$withval/include" | |
8129 | additional_libdir="$withval/lib" | |
8130 | fi | |
8131 | fi | |
6c7a06a3 | 8132 | |
81ecdfbb RW |
8133 | fi |
8134 | ||
016a3251 DD |
8135 | LIBICONV= |
8136 | LTLIBICONV= | |
8137 | INCICONV= | |
8138 | rpathdirs= | |
8139 | ltrpathdirs= | |
8140 | names_already_handled= | |
8141 | names_next_round='iconv ' | |
8142 | while test -n "$names_next_round"; do | |
8143 | names_this_round="$names_next_round" | |
8144 | names_next_round= | |
8145 | for name in $names_this_round; do | |
8146 | already_handled= | |
8147 | for n in $names_already_handled; do | |
8148 | if test "$n" = "$name"; then | |
8149 | already_handled=yes | |
8150 | break | |
8151 | fi | |
8152 | done | |
8153 | if test -z "$already_handled"; then | |
8154 | names_already_handled="$names_already_handled $name" | |
8155 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8156 | eval value=\"\$HAVE_LIB$uppername\" | |
8157 | if test -n "$value"; then | |
8158 | if test "$value" = yes; then | |
8159 | eval value=\"\$LIB$uppername\" | |
8160 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8161 | eval value=\"\$LTLIB$uppername\" | |
8162 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8163 | else | |
8164 | : | |
8165 | fi | |
8166 | else | |
8167 | found_dir= | |
8168 | found_la= | |
8169 | found_so= | |
8170 | found_a= | |
8171 | if test $use_additional = yes; then | |
8172 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8173 | found_dir="$additional_libdir" | |
8174 | found_so="$additional_libdir/lib$name.$shlibext" | |
8175 | if test -f "$additional_libdir/lib$name.la"; then | |
8176 | found_la="$additional_libdir/lib$name.la" | |
8177 | fi | |
8178 | else | |
8179 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8180 | found_dir="$additional_libdir" | |
8181 | found_a="$additional_libdir/lib$name.$libext" | |
8182 | if test -f "$additional_libdir/lib$name.la"; then | |
8183 | found_la="$additional_libdir/lib$name.la" | |
8184 | fi | |
8185 | fi | |
8186 | fi | |
8187 | fi | |
8188 | if test "X$found_dir" = "X"; then | |
8189 | for x in $LDFLAGS $LTLIBICONV; do | |
8190 | ||
8191 | acl_save_prefix="$prefix" | |
8192 | prefix="$acl_final_prefix" | |
8193 | acl_save_exec_prefix="$exec_prefix" | |
8194 | exec_prefix="$acl_final_exec_prefix" | |
8195 | eval x=\"$x\" | |
8196 | exec_prefix="$acl_save_exec_prefix" | |
8197 | prefix="$acl_save_prefix" | |
8198 | ||
8199 | case "$x" in | |
8200 | -L*) | |
8201 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8202 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8203 | found_dir="$dir" | |
8204 | found_so="$dir/lib$name.$shlibext" | |
8205 | if test -f "$dir/lib$name.la"; then | |
8206 | found_la="$dir/lib$name.la" | |
8207 | fi | |
8208 | else | |
8209 | if test -f "$dir/lib$name.$libext"; then | |
8210 | found_dir="$dir" | |
8211 | found_a="$dir/lib$name.$libext" | |
8212 | if test -f "$dir/lib$name.la"; then | |
8213 | found_la="$dir/lib$name.la" | |
8214 | fi | |
8215 | fi | |
8216 | fi | |
8217 | ;; | |
8218 | esac | |
8219 | if test "X$found_dir" != "X"; then | |
8220 | break | |
8221 | fi | |
8222 | done | |
8223 | fi | |
8224 | if test "X$found_dir" != "X"; then | |
8225 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8226 | if test "X$found_so" != "X"; then | |
8227 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8228 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8229 | else | |
8230 | haveit= | |
8231 | for x in $ltrpathdirs; do | |
8232 | if test "X$x" = "X$found_dir"; then | |
8233 | haveit=yes | |
8234 | break | |
8235 | fi | |
8236 | done | |
8237 | if test -z "$haveit"; then | |
8238 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8239 | fi | |
8240 | if test "$hardcode_direct" = yes; then | |
8241 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8242 | else | |
8243 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8244 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8245 | haveit= | |
8246 | for x in $rpathdirs; do | |
8247 | if test "X$x" = "X$found_dir"; then | |
8248 | haveit=yes | |
8249 | break | |
8250 | fi | |
8251 | done | |
8252 | if test -z "$haveit"; then | |
8253 | rpathdirs="$rpathdirs $found_dir" | |
8254 | fi | |
8255 | else | |
8256 | haveit= | |
8257 | for x in $LDFLAGS $LIBICONV; do | |
8258 | ||
8259 | acl_save_prefix="$prefix" | |
8260 | prefix="$acl_final_prefix" | |
8261 | acl_save_exec_prefix="$exec_prefix" | |
8262 | exec_prefix="$acl_final_exec_prefix" | |
8263 | eval x=\"$x\" | |
8264 | exec_prefix="$acl_save_exec_prefix" | |
8265 | prefix="$acl_save_prefix" | |
8266 | ||
8267 | if test "X$x" = "X-L$found_dir"; then | |
8268 | haveit=yes | |
8269 | break | |
8270 | fi | |
8271 | done | |
8272 | if test -z "$haveit"; then | |
8273 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8274 | fi | |
8275 | if test "$hardcode_minus_L" != no; then | |
8276 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8277 | else | |
8278 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8279 | fi | |
8280 | fi | |
8281 | fi | |
8282 | fi | |
8283 | else | |
8284 | if test "X$found_a" != "X"; then | |
8285 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8286 | else | |
8287 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8288 | fi | |
8289 | fi | |
8290 | additional_includedir= | |
8291 | case "$found_dir" in | |
8292 | */lib | */lib/) | |
8293 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8294 | additional_includedir="$basedir/include" | |
8295 | ;; | |
8296 | esac | |
8297 | if test "X$additional_includedir" != "X"; then | |
8298 | if test "X$additional_includedir" != "X/usr/include"; then | |
8299 | haveit= | |
8300 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8301 | if test -n "$GCC"; then | |
8302 | case $host_os in | |
8303 | linux*) haveit=yes;; | |
8304 | esac | |
8305 | fi | |
8306 | fi | |
8307 | if test -z "$haveit"; then | |
8308 | for x in $CPPFLAGS $INCICONV; do | |
8309 | ||
8310 | acl_save_prefix="$prefix" | |
8311 | prefix="$acl_final_prefix" | |
8312 | acl_save_exec_prefix="$exec_prefix" | |
8313 | exec_prefix="$acl_final_exec_prefix" | |
8314 | eval x=\"$x\" | |
8315 | exec_prefix="$acl_save_exec_prefix" | |
8316 | prefix="$acl_save_prefix" | |
8317 | ||
8318 | if test "X$x" = "X-I$additional_includedir"; then | |
8319 | haveit=yes | |
8320 | break | |
8321 | fi | |
8322 | done | |
8323 | if test -z "$haveit"; then | |
8324 | if test -d "$additional_includedir"; then | |
8325 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8326 | fi | |
8327 | fi | |
8328 | fi | |
8329 | fi | |
8330 | fi | |
8331 | if test -n "$found_la"; then | |
8332 | save_libdir="$libdir" | |
8333 | case "$found_la" in | |
8334 | */* | *\\*) . "$found_la" ;; | |
8335 | *) . "./$found_la" ;; | |
8336 | esac | |
8337 | libdir="$save_libdir" | |
8338 | for dep in $dependency_libs; do | |
8339 | case "$dep" in | |
8340 | -L*) | |
8341 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8342 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8343 | haveit= | |
8344 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8345 | if test -n "$GCC"; then | |
8346 | case $host_os in | |
8347 | linux*) haveit=yes;; | |
8348 | esac | |
8349 | fi | |
8350 | fi | |
8351 | if test -z "$haveit"; then | |
8352 | haveit= | |
8353 | for x in $LDFLAGS $LIBICONV; do | |
8354 | ||
8355 | acl_save_prefix="$prefix" | |
8356 | prefix="$acl_final_prefix" | |
8357 | acl_save_exec_prefix="$exec_prefix" | |
8358 | exec_prefix="$acl_final_exec_prefix" | |
8359 | eval x=\"$x\" | |
8360 | exec_prefix="$acl_save_exec_prefix" | |
8361 | prefix="$acl_save_prefix" | |
8362 | ||
8363 | if test "X$x" = "X-L$additional_libdir"; then | |
8364 | haveit=yes | |
8365 | break | |
8366 | fi | |
8367 | done | |
8368 | if test -z "$haveit"; then | |
8369 | if test -d "$additional_libdir"; then | |
8370 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8371 | fi | |
8372 | fi | |
8373 | haveit= | |
8374 | for x in $LDFLAGS $LTLIBICONV; do | |
8375 | ||
8376 | acl_save_prefix="$prefix" | |
8377 | prefix="$acl_final_prefix" | |
8378 | acl_save_exec_prefix="$exec_prefix" | |
8379 | exec_prefix="$acl_final_exec_prefix" | |
8380 | eval x=\"$x\" | |
8381 | exec_prefix="$acl_save_exec_prefix" | |
8382 | prefix="$acl_save_prefix" | |
8383 | ||
8384 | if test "X$x" = "X-L$additional_libdir"; then | |
8385 | haveit=yes | |
8386 | break | |
8387 | fi | |
8388 | done | |
8389 | if test -z "$haveit"; then | |
8390 | if test -d "$additional_libdir"; then | |
8391 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8392 | fi | |
8393 | fi | |
8394 | fi | |
8395 | fi | |
8396 | ;; | |
8397 | -R*) | |
8398 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8399 | if test "$enable_rpath" != no; then | |
8400 | haveit= | |
8401 | for x in $rpathdirs; do | |
8402 | if test "X$x" = "X$dir"; then | |
8403 | haveit=yes | |
8404 | break | |
8405 | fi | |
8406 | done | |
8407 | if test -z "$haveit"; then | |
8408 | rpathdirs="$rpathdirs $dir" | |
8409 | fi | |
8410 | haveit= | |
8411 | for x in $ltrpathdirs; do | |
8412 | if test "X$x" = "X$dir"; then | |
8413 | haveit=yes | |
8414 | break | |
8415 | fi | |
8416 | done | |
8417 | if test -z "$haveit"; then | |
8418 | ltrpathdirs="$ltrpathdirs $dir" | |
8419 | fi | |
8420 | fi | |
8421 | ;; | |
8422 | -l*) | |
8423 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8424 | ;; | |
8425 | *.la) | |
8426 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8427 | ;; | |
8428 | *) | |
8429 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8430 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8431 | ;; | |
8432 | esac | |
8433 | done | |
8434 | fi | |
8435 | else | |
8436 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8437 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8438 | fi | |
8439 | fi | |
8440 | fi | |
8441 | done | |
8442 | done | |
8443 | if test "X$rpathdirs" != "X"; then | |
8444 | if test -n "$hardcode_libdir_separator"; then | |
8445 | alldirs= | |
8446 | for found_dir in $rpathdirs; do | |
8447 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8448 | done | |
8449 | acl_save_libdir="$libdir" | |
8450 | libdir="$alldirs" | |
8451 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8452 | libdir="$acl_save_libdir" | |
8453 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8454 | else | |
8455 | for found_dir in $rpathdirs; do | |
8456 | acl_save_libdir="$libdir" | |
8457 | libdir="$found_dir" | |
8458 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8459 | libdir="$acl_save_libdir" | |
8460 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8461 | done | |
8462 | fi | |
8463 | fi | |
8464 | if test "X$ltrpathdirs" != "X"; then | |
8465 | for found_dir in $ltrpathdirs; do | |
8466 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8467 | done | |
8468 | fi | |
8469 | ||
8470 | ||
8471 | ||
8472 | ||
8473 | ||
6c7a06a3 | 8474 | |
6c7a06a3 | 8475 | |
81ecdfbb RW |
8476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8477 | $as_echo_n "checking for iconv... " >&6; } | |
8478 | if test "${am_cv_func_iconv+set}" = set; then : | |
8479 | $as_echo_n "(cached) " >&6 | |
d542061a | 8480 | else |
6c7a06a3 TT |
8481 | |
8482 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8483 | am_cv_lib_iconv=no | |
016a3251 DD |
8484 | am_save_CPPFLAGS="$CPPFLAGS" |
8485 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8487 | /* end confdefs.h. */ |
6c7a06a3 TT |
8488 | #include <stdlib.h> |
8489 | #include <iconv.h> | |
d542061a UW |
8490 | int |
8491 | main () | |
8492 | { | |
6c7a06a3 | 8493 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8494 | iconv(cd,NULL,NULL,NULL,NULL); |
8495 | iconv_close(cd); | |
d542061a UW |
8496 | ; |
8497 | return 0; | |
8498 | } | |
8499 | _ACEOF | |
81ecdfbb | 8500 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8501 | am_cv_func_iconv=yes |
d542061a | 8502 | fi |
81ecdfbb RW |
8503 | rm -f core conftest.err conftest.$ac_objext \ |
8504 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8505 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8506 | |
016a3251 DD |
8507 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8508 | for _libs in .libs _libs; do | |
8509 | am_save_CPPFLAGS="$CPPFLAGS" | |
8510 | am_save_LIBS="$LIBS" | |
8511 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8512 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8513 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8514 | /* end confdefs.h. */ |
6c7a06a3 TT |
8515 | #include <stdlib.h> |
8516 | #include <iconv.h> | |
d542061a UW |
8517 | int |
8518 | main () | |
8519 | { | |
6c7a06a3 | 8520 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8521 | iconv(cd,NULL,NULL,NULL,NULL); |
8522 | iconv_close(cd); | |
d542061a UW |
8523 | ; |
8524 | return 0; | |
8525 | } | |
8526 | _ACEOF | |
81ecdfbb | 8527 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8528 | INCICONV="-I../libiconv/include" |
8529 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8530 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8531 | am_cv_lib_iconv=yes | |
8532 | am_cv_func_iconv=yes | |
d542061a | 8533 | fi |
81ecdfbb RW |
8534 | rm -f core conftest.err conftest.$ac_objext \ |
8535 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8536 | CPPFLAGS="$am_save_CPPFLAGS" |
8537 | LIBS="$am_save_LIBS" | |
8538 | if test "$am_cv_func_iconv" = "yes"; then | |
8539 | break | |
8540 | fi | |
8541 | done | |
77f120bf | 8542 | fi |
94ae1714 | 8543 | |
4edb1e84 | 8544 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8545 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8546 | am_save_LIBS="$LIBS" |
016a3251 DD |
8547 | CPPFLAGS="$LIBS $INCICONV" |
8548 | LIBS="$LIBS $LIBICONV" | |
81ecdfbb | 8549 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8550 | /* end confdefs.h. */ |
6c7a06a3 TT |
8551 | #include <stdlib.h> |
8552 | #include <iconv.h> | |
bec39cab AC |
8553 | int |
8554 | main () | |
8555 | { | |
6c7a06a3 TT |
8556 | iconv_t cd = iconv_open("",""); |
8557 | iconv(cd,NULL,NULL,NULL,NULL); | |
8558 | iconv_close(cd); | |
bec39cab AC |
8559 | ; |
8560 | return 0; | |
8561 | } | |
8562 | _ACEOF | |
81ecdfbb | 8563 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8564 | am_cv_lib_iconv=yes |
6c7a06a3 | 8565 | am_cv_func_iconv=yes |
627af7ea | 8566 | fi |
81ecdfbb RW |
8567 | rm -f core conftest.err conftest.$ac_objext \ |
8568 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8569 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8570 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8571 | fi |
8572 | ||
8573 | fi | |
81ecdfbb RW |
8574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8575 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8576 | if test "$am_cv_func_iconv" = yes; then |
8577 | ||
8578 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8579 | |
016a3251 | 8580 | fi |
fc3b640d | 8581 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8582 | |
8583 | for element in $INCICONV; do | |
8584 | haveit= | |
8585 | for x in $CPPFLAGS; do | |
8586 | ||
8587 | acl_save_prefix="$prefix" | |
8588 | prefix="$acl_final_prefix" | |
8589 | acl_save_exec_prefix="$exec_prefix" | |
8590 | exec_prefix="$acl_final_exec_prefix" | |
8591 | eval x=\"$x\" | |
8592 | exec_prefix="$acl_save_exec_prefix" | |
8593 | prefix="$acl_save_prefix" | |
8594 | ||
8595 | if test "X$x" = "X$element"; then | |
8596 | haveit=yes | |
8597 | break | |
8598 | fi | |
8599 | done | |
8600 | if test -z "$haveit"; then | |
8601 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8602 | fi | |
8603 | done | |
8604 | ||
8605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8606 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8608 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8609 | else |
016a3251 DD |
8610 | LIBICONV= |
8611 | LTLIBICONV= | |
fc3b640d | 8612 | fi |
94ae1714 | 8613 | |
6c7a06a3 | 8614 | |
6c7a06a3 | 8615 | |
016a3251 | 8616 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8618 | $as_echo_n "checking for iconv declaration... " >&6; } | |
8619 | if test "${am_cv_proto_iconv+set}" = set; then : | |
8620 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8621 | else |
8622 | ||
81ecdfbb | 8623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8624 | /* end confdefs.h. */ |
8625 | ||
6c7a06a3 TT |
8626 | #include <stdlib.h> |
8627 | #include <iconv.h> | |
8628 | extern | |
b4e70030 | 8629 | #ifdef __cplusplus |
6c7a06a3 | 8630 | "C" |
b4e70030 | 8631 | #endif |
6c7a06a3 TT |
8632 | #if defined(__STDC__) || defined(__cplusplus) |
8633 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8634 | #else | |
8635 | size_t iconv(); | |
8636 | #endif | |
8637 | ||
b4e70030 JB |
8638 | int |
8639 | main () | |
8640 | { | |
6c7a06a3 | 8641 | |
b4e70030 JB |
8642 | ; |
8643 | return 0; | |
8644 | } | |
8645 | _ACEOF | |
81ecdfbb | 8646 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8647 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8648 | else |
81ecdfbb | 8649 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8650 | fi |
81ecdfbb | 8651 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8652 | 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);" |
8653 | fi | |
8654 | ||
8655 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8657 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8658 | $as_echo "${ac_t:- |
8659 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8660 | |
8661 | cat >>confdefs.h <<_ACEOF | |
8662 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8663 | _ACEOF | |
8664 | ||
8665 | fi | |
6c7a06a3 TT |
8666 | |
8667 | ||
478aac75 DE |
8668 | # GDB may fork/exec the iconv program to get the list of supported character |
8669 | # sets. Allow the user to specify where to find it. | |
8670 | # There are several factors affecting the choice of option name: | |
8671 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
8672 | # the build-time location of libiconv files. | |
8673 | # - The program we need to find is iconv, which comes with glibc. The user | |
8674 | # doesn't necessarily have libiconv installed. Therefore naming this | |
8675 | # --with-libiconv-foo feels wrong. | |
8676 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
8677 | # defined to work on directories not files (though it really doesn't know | |
8678 | # the difference). | |
8679 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
8680 | # with --with-libiconv-prefix. | |
8681 | # Putting these together is why the option name is --with-iconv-bin. | |
8682 | ||
8683 | ||
8684 | # Check whether --with-iconv-bin was given. | |
8685 | if test "${with_iconv_bin+set}" = set; then : | |
8686 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
8687 | ||
8688 | cat >>confdefs.h <<_ACEOF | |
8689 | #define ICONV_BIN "${iconv_bin}" | |
8690 | _ACEOF | |
8691 | ||
8692 | ||
8693 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8694 | if test "x$prefix" = xNONE; then | |
8695 | test_prefix=/usr/local | |
8696 | else | |
8697 | test_prefix=$prefix | |
8698 | fi | |
8699 | else | |
8700 | test_prefix=$exec_prefix | |
8701 | fi | |
8702 | value=0 | |
8703 | case ${iconv_bin} in | |
8704 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8705 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8706 | value=1 | |
8707 | ;; | |
8708 | esac | |
8709 | ||
8710 | cat >>confdefs.h <<_ACEOF | |
8711 | #define ICONV_BIN_RELOCATABLE $value | |
8712 | _ACEOF | |
8713 | ||
8714 | ||
8715 | ||
8716 | fi | |
8717 | ||
8718 | ||
cb01cfba | 8719 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 8720 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
8721 | prefer_curses=yes |
8722 | fi | |
8723 | ||
8724 | curses_found=no | |
8725 | if test x"$prefer_curses" = xyes; then | |
8726 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
8727 | # curses library because the latter might not provide all the | |
8728 | # functionality we need. However, this leads to problems on systems | |
8729 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
8730 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
8731 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
8732 | # a situation. | |
81ecdfbb RW |
8733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
8734 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
8735 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8736 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8737 | else |
8738 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8739 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8740 | /* end confdefs.h. */ |
8741 | ||
81ecdfbb RW |
8742 | /* Override any GCC internal prototype to avoid an error. |
8743 | Use char because int might match the return type of a GCC | |
8744 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8745 | #ifdef __cplusplus |
8746 | extern "C" | |
8747 | #endif | |
6c7a06a3 TT |
8748 | char waddstr (); |
8749 | int | |
8750 | main () | |
8751 | { | |
81ecdfbb | 8752 | return waddstr (); |
6c7a06a3 TT |
8753 | ; |
8754 | return 0; | |
8755 | } | |
8756 | _ACEOF | |
5007d765 | 8757 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
8758 | if test -z "$ac_lib"; then |
8759 | ac_res="none required" | |
8760 | else | |
8761 | ac_res=-l$ac_lib | |
8762 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8763 | fi | |
8764 | if ac_fn_c_try_link "$LINENO"; then : | |
8765 | ac_cv_search_waddstr=$ac_res | |
8766 | fi | |
8767 | rm -f core conftest.err conftest.$ac_objext \ | |
8768 | conftest$ac_exeext | |
8769 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8770 | break | |
8771 | fi | |
8772 | done | |
8773 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8774 | ||
6c7a06a3 | 8775 | else |
81ecdfbb RW |
8776 | ac_cv_search_waddstr=no |
8777 | fi | |
8778 | rm conftest.$ac_ext | |
8779 | LIBS=$ac_func_search_save_LIBS | |
8780 | fi | |
8781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
8782 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
8783 | ac_res=$ac_cv_search_waddstr | |
8784 | if test "$ac_res" != no; then : | |
8785 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
8786 | |
8787 | fi | |
8788 | ||
8789 | ||
cb01cfba JB |
8790 | if test "$ac_cv_search_waddstr" != no; then |
8791 | curses_found=yes | |
8792 | fi | |
8793 | fi | |
8794 | ||
8795 | # Check whether we should enable the TUI, but only do so if we really | |
8796 | # can. | |
8797 | if test x"$enable_tui" != xno; then | |
8798 | if test -d $srcdir/tui; then | |
8799 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
8800 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
8801 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
8802 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
8803 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
8804 | else |
8805 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 8806 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 8807 | else |
81ecdfbb RW |
8808 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
8809 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
8810 | fi |
8811 | fi | |
8812 | fi | |
8813 | fi | |
8814 | ||
8815 | # Since GDB uses Readline, we need termcap functionality. In many | |
8816 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 8817 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
8818 | |
8819 | case $host_os in | |
8820 | cygwin*) | |
8821 | if test -d $srcdir/libtermcap; then | |
8822 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
8823 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
8824 | fi ;; | |
8825 | go32* | *djgpp*) | |
8826 | ac_cv_search_tgetent="none required" | |
8827 | ;; | |
6c7a06a3 TT |
8828 | esac |
8829 | ||
8830 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
8831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
8832 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
8833 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8834 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8835 | else |
8836 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8837 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8838 | /* end confdefs.h. */ |
8839 | ||
81ecdfbb RW |
8840 | /* Override any GCC internal prototype to avoid an error. |
8841 | Use char because int might match the return type of a GCC | |
8842 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8843 | #ifdef __cplusplus |
8844 | extern "C" | |
8845 | #endif | |
6c7a06a3 TT |
8846 | char tgetent (); |
8847 | int | |
8848 | main () | |
8849 | { | |
81ecdfbb | 8850 | return tgetent (); |
6c7a06a3 TT |
8851 | ; |
8852 | return 0; | |
8853 | } | |
8854 | _ACEOF | |
5007d765 | 8855 | for ac_lib in '' termcap tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
8856 | if test -z "$ac_lib"; then |
8857 | ac_res="none required" | |
8858 | else | |
8859 | ac_res=-l$ac_lib | |
6c7a06a3 | 8860 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8861 | fi |
8862 | if ac_fn_c_try_link "$LINENO"; then : | |
8863 | ac_cv_search_tgetent=$ac_res | |
8864 | fi | |
8865 | rm -f core conftest.err conftest.$ac_objext \ | |
8866 | conftest$ac_exeext | |
8867 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8868 | break | |
8869 | fi | |
8870 | done | |
8871 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 8872 | |
6c7a06a3 | 8873 | else |
81ecdfbb | 8874 | ac_cv_search_tgetent=no |
6c7a06a3 | 8875 | fi |
81ecdfbb | 8876 | rm conftest.$ac_ext |
6c7a06a3 TT |
8877 | LIBS=$ac_func_search_save_LIBS |
8878 | fi | |
81ecdfbb RW |
8879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
8880 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
8881 | ac_res=$ac_cv_search_tgetent | |
8882 | if test "$ac_res" != no; then : | |
8883 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 8884 | |
06825bd1 MK |
8885 | fi |
8886 | ||
06825bd1 | 8887 | |
bec39cab | 8888 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 8889 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
8890 | fi |
8891 | ||
3841debe | 8892 | |
81ecdfbb RW |
8893 | # Check whether --with-system-readline was given. |
8894 | if test "${with_system_readline+set}" = set; then : | |
8895 | withval=$with_system_readline; | |
8896 | fi | |
6a30b0a5 | 8897 | |
6a30b0a5 AS |
8898 | |
8899 | if test "$with_system_readline" = yes; then | |
8900 | READLINE=-lreadline | |
8901 | READLINE_DEPS= | |
8902 | READLINE_CFLAGS= | |
39037522 | 8903 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
8904 | else |
8905 | READLINE='$(READLINE_DIR)/libreadline.a' | |
8906 | READLINE_DEPS='$(READLINE)' | |
8907 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 8908 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
8909 | fi |
8910 | ||
8911 | ||
8912 | ||
8913 | ||
8914 | ||
f997c383 SD |
8915 | # Generate jit-reader.h |
8916 | ||
8917 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
8918 | TARGET_PTR= | |
8919 | ||
8920 | # The cast to long int works around a bug in the HP C Compiler | |
8921 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8922 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8923 | # This bug is HP SR number 8606223364. | |
8924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
8925 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
8926 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
8927 | $as_echo_n "(cached) " >&6 | |
8928 | else | |
8929 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
8930 | ||
8931 | else | |
8932 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
8933 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8934 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8935 | { as_fn_set_status 77 | |
8936 | as_fn_error "cannot compute sizeof (unsigned long long) | |
8937 | See \`config.log' for more details." "$LINENO" 5; }; } | |
8938 | else | |
8939 | ac_cv_sizeof_unsigned_long_long=0 | |
8940 | fi | |
8941 | fi | |
8942 | ||
8943 | fi | |
8944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
8945 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
8946 | ||
8947 | ||
8948 | ||
8949 | cat >>confdefs.h <<_ACEOF | |
8950 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
8951 | _ACEOF | |
8952 | ||
8953 | ||
8954 | # The cast to long int works around a bug in the HP C Compiler | |
8955 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8956 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8957 | # This bug is HP SR number 8606223364. | |
8958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
8959 | $as_echo_n "checking size of unsigned long... " >&6; } | |
8960 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
8961 | $as_echo_n "(cached) " >&6 | |
8962 | else | |
8963 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
8964 | ||
8965 | else | |
8966 | if test "$ac_cv_type_unsigned_long" = yes; then | |
8967 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8968 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8969 | { as_fn_set_status 77 | |
8970 | as_fn_error "cannot compute sizeof (unsigned long) | |
8971 | See \`config.log' for more details." "$LINENO" 5; }; } | |
8972 | else | |
8973 | ac_cv_sizeof_unsigned_long=0 | |
8974 | fi | |
8975 | fi | |
8976 | ||
8977 | fi | |
8978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
8979 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
8980 | ||
8981 | ||
8982 | ||
8983 | cat >>confdefs.h <<_ACEOF | |
8984 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
8985 | _ACEOF | |
8986 | ||
8987 | ||
8988 | # The cast to long int works around a bug in the HP C Compiler | |
8989 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8990 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8991 | # This bug is HP SR number 8606223364. | |
8992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
8993 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
8994 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
8995 | $as_echo_n "(cached) " >&6 | |
8996 | else | |
8997 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
8998 | ||
8999 | else | |
9000 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9001 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9002 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9003 | { as_fn_set_status 77 | |
9004 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
9005 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9006 | else | |
9007 | ac_cv_sizeof_unsigned___int128=0 | |
9008 | fi | |
9009 | fi | |
9010 | ||
9011 | fi | |
9012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9013 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9014 | ||
9015 | ||
9016 | ||
9017 | cat >>confdefs.h <<_ACEOF | |
9018 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9019 | _ACEOF | |
9020 | ||
9021 | ||
9022 | ||
9023 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9024 | TARGET_PTR="unsigned long" | |
9025 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9026 | TARGET_PTR="unsigned long long" | |
9027 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9028 | TARGET_PTR="unsigned __int128" | |
9029 | else | |
9030 | TARGET_PTR="unsigned long" | |
9031 | fi | |
9032 | ||
9033 | ||
9034 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9035 | ||
9036 | ||
a2d08b9e SD |
9037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9038 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
9039 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9040 | $as_echo_n "(cached) " >&6 | |
9041 | else | |
9042 | ac_func_search_save_LIBS=$LIBS | |
9043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9044 | /* end confdefs.h. */ | |
9045 | ||
9046 | /* Override any GCC internal prototype to avoid an error. | |
9047 | Use char because int might match the return type of a GCC | |
9048 | builtin and then its argument prototype would still apply. */ | |
9049 | #ifdef __cplusplus | |
9050 | extern "C" | |
9051 | #endif | |
9052 | char dlopen (); | |
9053 | int | |
9054 | main () | |
9055 | { | |
9056 | return dlopen (); | |
9057 | ; | |
9058 | return 0; | |
9059 | } | |
9060 | _ACEOF | |
9061 | for ac_lib in '' dl; do | |
9062 | if test -z "$ac_lib"; then | |
9063 | ac_res="none required" | |
9064 | else | |
9065 | ac_res=-l$ac_lib | |
9066 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9067 | fi | |
9068 | if ac_fn_c_try_link "$LINENO"; then : | |
9069 | ac_cv_search_dlopen=$ac_res | |
9070 | fi | |
9071 | rm -f core conftest.err conftest.$ac_objext \ | |
9072 | conftest$ac_exeext | |
9073 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9074 | break | |
9075 | fi | |
9076 | done | |
9077 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9078 | ||
9079 | else | |
9080 | ac_cv_search_dlopen=no | |
9081 | fi | |
9082 | rm conftest.$ac_ext | |
9083 | LIBS=$ac_func_search_save_LIBS | |
9084 | fi | |
9085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9086 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9087 | ac_res=$ac_cv_search_dlopen | |
9088 | if test "$ac_res" != no; then : | |
9089 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9090 | ||
9091 | fi | |
9092 | ||
9093 | ||
39037522 | 9094 | |
b8e0a31c SD |
9095 | |
9096 | # Check whether --with-jit-reader-dir was given. | |
9097 | if test "${with_jit_reader_dir+set}" = set; then : | |
9098 | withval=$with_jit_reader_dir; | |
9099 | JIT_READER_DIR=$withval | |
9100 | else | |
9101 | JIT_READER_DIR=${libdir}/gdb | |
9102 | fi | |
9103 | ||
9104 | ||
9105 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9106 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9107 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9108 | ac_define_dir=`eval echo $ac_define_dir` | |
9109 | ||
9110 | cat >>confdefs.h <<_ACEOF | |
9111 | #define JIT_READER_DIR "$ac_define_dir" | |
9112 | _ACEOF | |
9113 | ||
9114 | ||
9115 | ||
9116 | ||
9117 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9118 | if test "x$prefix" = xNONE; then | |
9119 | test_prefix=/usr/local | |
9120 | else | |
9121 | test_prefix=$prefix | |
9122 | fi | |
9123 | else | |
9124 | test_prefix=$exec_prefix | |
9125 | fi | |
9126 | value=0 | |
9127 | case ${ac_define_dir} in | |
9128 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9129 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9130 | value=1 | |
9131 | ;; | |
9132 | esac | |
9133 | ||
9134 | cat >>confdefs.h <<_ACEOF | |
9135 | #define JIT_READER_DIR_RELOCATABLE $value | |
9136 | _ACEOF | |
9137 | ||
9138 | ||
9139 | ||
9140 | ||
9141 | ||
81ecdfbb RW |
9142 | # Check whether --with-expat was given. |
9143 | if test "${with_expat+set}" = set; then : | |
9144 | withval=$with_expat; | |
5c39566f DJ |
9145 | else |
9146 | with_expat=auto | |
81ecdfbb RW |
9147 | fi |
9148 | ||
9149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9150 | $as_echo_n "checking whether to use expat... " >&6; } | |
9151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9152 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9153 | |
9154 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9155 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9156 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9157 | HAVE_LIBEXPAT=no |
9158 | else | |
9159 | ||
3841debe DJ |
9160 | |
9161 | ||
9162 | ||
9163 | ||
9164 | ||
9165 | ||
9166 | ||
9167 | use_additional=yes | |
9168 | ||
9169 | acl_save_prefix="$prefix" | |
9170 | prefix="$acl_final_prefix" | |
9171 | acl_save_exec_prefix="$exec_prefix" | |
9172 | exec_prefix="$acl_final_exec_prefix" | |
9173 | ||
9174 | eval additional_includedir=\"$includedir\" | |
9175 | eval additional_libdir=\"$libdir\" | |
9176 | ||
9177 | exec_prefix="$acl_save_exec_prefix" | |
9178 | prefix="$acl_save_prefix" | |
9179 | ||
9180 | ||
81ecdfbb RW |
9181 | # Check whether --with-libexpat-prefix was given. |
9182 | if test "${with_libexpat_prefix+set}" = set; then : | |
9183 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9184 | if test "X$withval" = "Xno"; then |
9185 | use_additional=no | |
9186 | else | |
9187 | if test "X$withval" = "X"; then | |
9188 | ||
9189 | acl_save_prefix="$prefix" | |
9190 | prefix="$acl_final_prefix" | |
9191 | acl_save_exec_prefix="$exec_prefix" | |
9192 | exec_prefix="$acl_final_exec_prefix" | |
9193 | ||
9194 | eval additional_includedir=\"$includedir\" | |
9195 | eval additional_libdir=\"$libdir\" | |
9196 | ||
9197 | exec_prefix="$acl_save_exec_prefix" | |
9198 | prefix="$acl_save_prefix" | |
9199 | ||
9200 | else | |
9201 | additional_includedir="$withval/include" | |
9202 | additional_libdir="$withval/lib" | |
9203 | fi | |
9204 | fi | |
9205 | ||
81ecdfbb RW |
9206 | fi |
9207 | ||
3841debe DJ |
9208 | LIBEXPAT= |
9209 | LTLIBEXPAT= | |
9210 | INCEXPAT= | |
9211 | rpathdirs= | |
9212 | ltrpathdirs= | |
9213 | names_already_handled= | |
9214 | names_next_round='expat ' | |
9215 | while test -n "$names_next_round"; do | |
9216 | names_this_round="$names_next_round" | |
9217 | names_next_round= | |
9218 | for name in $names_this_round; do | |
9219 | already_handled= | |
9220 | for n in $names_already_handled; do | |
9221 | if test "$n" = "$name"; then | |
9222 | already_handled=yes | |
9223 | break | |
9224 | fi | |
9225 | done | |
9226 | if test -z "$already_handled"; then | |
9227 | names_already_handled="$names_already_handled $name" | |
9228 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9229 | eval value=\"\$HAVE_LIB$uppername\" | |
9230 | if test -n "$value"; then | |
9231 | if test "$value" = yes; then | |
9232 | eval value=\"\$LIB$uppername\" | |
9233 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9234 | eval value=\"\$LTLIB$uppername\" | |
9235 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9236 | else | |
9237 | : | |
9238 | fi | |
9239 | else | |
9240 | found_dir= | |
9241 | found_la= | |
9242 | found_so= | |
9243 | found_a= | |
9244 | if test $use_additional = yes; then | |
9245 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9246 | found_dir="$additional_libdir" | |
9247 | found_so="$additional_libdir/lib$name.$shlibext" | |
9248 | if test -f "$additional_libdir/lib$name.la"; then | |
9249 | found_la="$additional_libdir/lib$name.la" | |
9250 | fi | |
9251 | else | |
9252 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9253 | found_dir="$additional_libdir" | |
9254 | found_a="$additional_libdir/lib$name.$libext" | |
9255 | if test -f "$additional_libdir/lib$name.la"; then | |
9256 | found_la="$additional_libdir/lib$name.la" | |
9257 | fi | |
9258 | fi | |
9259 | fi | |
9260 | fi | |
9261 | if test "X$found_dir" = "X"; then | |
9262 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9263 | ||
9264 | acl_save_prefix="$prefix" | |
9265 | prefix="$acl_final_prefix" | |
9266 | acl_save_exec_prefix="$exec_prefix" | |
9267 | exec_prefix="$acl_final_exec_prefix" | |
9268 | eval x=\"$x\" | |
9269 | exec_prefix="$acl_save_exec_prefix" | |
9270 | prefix="$acl_save_prefix" | |
9271 | ||
9272 | case "$x" in | |
9273 | -L*) | |
9274 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9275 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9276 | found_dir="$dir" | |
9277 | found_so="$dir/lib$name.$shlibext" | |
9278 | if test -f "$dir/lib$name.la"; then | |
9279 | found_la="$dir/lib$name.la" | |
9280 | fi | |
9281 | else | |
9282 | if test -f "$dir/lib$name.$libext"; then | |
9283 | found_dir="$dir" | |
9284 | found_a="$dir/lib$name.$libext" | |
9285 | if test -f "$dir/lib$name.la"; then | |
9286 | found_la="$dir/lib$name.la" | |
9287 | fi | |
9288 | fi | |
9289 | fi | |
9290 | ;; | |
9291 | esac | |
9292 | if test "X$found_dir" != "X"; then | |
9293 | break | |
9294 | fi | |
9295 | done | |
9296 | fi | |
9297 | if test "X$found_dir" != "X"; then | |
9298 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9299 | if test "X$found_so" != "X"; then | |
9300 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9301 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9302 | else | |
9303 | haveit= | |
9304 | for x in $ltrpathdirs; do | |
9305 | if test "X$x" = "X$found_dir"; then | |
9306 | haveit=yes | |
9307 | break | |
9308 | fi | |
9309 | done | |
9310 | if test -z "$haveit"; then | |
9311 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9312 | fi | |
9313 | if test "$hardcode_direct" = yes; then | |
9314 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9315 | else | |
9316 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9317 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9318 | haveit= | |
9319 | for x in $rpathdirs; do | |
9320 | if test "X$x" = "X$found_dir"; then | |
9321 | haveit=yes | |
9322 | break | |
9323 | fi | |
9324 | done | |
9325 | if test -z "$haveit"; then | |
9326 | rpathdirs="$rpathdirs $found_dir" | |
9327 | fi | |
9328 | else | |
9329 | haveit= | |
9330 | for x in $LDFLAGS $LIBEXPAT; do | |
9331 | ||
9332 | acl_save_prefix="$prefix" | |
9333 | prefix="$acl_final_prefix" | |
9334 | acl_save_exec_prefix="$exec_prefix" | |
9335 | exec_prefix="$acl_final_exec_prefix" | |
9336 | eval x=\"$x\" | |
9337 | exec_prefix="$acl_save_exec_prefix" | |
9338 | prefix="$acl_save_prefix" | |
9339 | ||
9340 | if test "X$x" = "X-L$found_dir"; then | |
9341 | haveit=yes | |
9342 | break | |
9343 | fi | |
9344 | done | |
9345 | if test -z "$haveit"; then | |
9346 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9347 | fi | |
9348 | if test "$hardcode_minus_L" != no; then | |
9349 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9350 | else | |
9351 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9352 | fi | |
9353 | fi | |
9354 | fi | |
9355 | fi | |
9356 | else | |
9357 | if test "X$found_a" != "X"; then | |
9358 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9359 | else | |
9360 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9361 | fi | |
9362 | fi | |
9363 | additional_includedir= | |
9364 | case "$found_dir" in | |
9365 | */lib | */lib/) | |
9366 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9367 | additional_includedir="$basedir/include" | |
9368 | ;; | |
9369 | esac | |
9370 | if test "X$additional_includedir" != "X"; then | |
9371 | if test "X$additional_includedir" != "X/usr/include"; then | |
9372 | haveit= | |
9373 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9374 | if test -n "$GCC"; then | |
9375 | case $host_os in | |
9376 | linux*) haveit=yes;; | |
9377 | esac | |
9378 | fi | |
9379 | fi | |
9380 | if test -z "$haveit"; then | |
9381 | for x in $CPPFLAGS $INCEXPAT; do | |
9382 | ||
9383 | acl_save_prefix="$prefix" | |
9384 | prefix="$acl_final_prefix" | |
9385 | acl_save_exec_prefix="$exec_prefix" | |
9386 | exec_prefix="$acl_final_exec_prefix" | |
9387 | eval x=\"$x\" | |
9388 | exec_prefix="$acl_save_exec_prefix" | |
9389 | prefix="$acl_save_prefix" | |
9390 | ||
9391 | if test "X$x" = "X-I$additional_includedir"; then | |
9392 | haveit=yes | |
9393 | break | |
9394 | fi | |
9395 | done | |
9396 | if test -z "$haveit"; then | |
9397 | if test -d "$additional_includedir"; then | |
9398 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9399 | fi | |
9400 | fi | |
9401 | fi | |
9402 | fi | |
9403 | fi | |
9404 | if test -n "$found_la"; then | |
9405 | save_libdir="$libdir" | |
9406 | case "$found_la" in | |
9407 | */* | *\\*) . "$found_la" ;; | |
9408 | *) . "./$found_la" ;; | |
9409 | esac | |
9410 | libdir="$save_libdir" | |
9411 | for dep in $dependency_libs; do | |
9412 | case "$dep" in | |
9413 | -L*) | |
9414 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9415 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9416 | haveit= | |
9417 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9418 | if test -n "$GCC"; then | |
9419 | case $host_os in | |
9420 | linux*) haveit=yes;; | |
9421 | esac | |
9422 | fi | |
9423 | fi | |
9424 | if test -z "$haveit"; then | |
9425 | haveit= | |
9426 | for x in $LDFLAGS $LIBEXPAT; do | |
9427 | ||
9428 | acl_save_prefix="$prefix" | |
9429 | prefix="$acl_final_prefix" | |
9430 | acl_save_exec_prefix="$exec_prefix" | |
9431 | exec_prefix="$acl_final_exec_prefix" | |
9432 | eval x=\"$x\" | |
9433 | exec_prefix="$acl_save_exec_prefix" | |
9434 | prefix="$acl_save_prefix" | |
9435 | ||
9436 | if test "X$x" = "X-L$additional_libdir"; then | |
9437 | haveit=yes | |
9438 | break | |
9439 | fi | |
9440 | done | |
9441 | if test -z "$haveit"; then | |
9442 | if test -d "$additional_libdir"; then | |
9443 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9444 | fi | |
9445 | fi | |
9446 | haveit= | |
9447 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9448 | ||
9449 | acl_save_prefix="$prefix" | |
9450 | prefix="$acl_final_prefix" | |
9451 | acl_save_exec_prefix="$exec_prefix" | |
9452 | exec_prefix="$acl_final_exec_prefix" | |
9453 | eval x=\"$x\" | |
9454 | exec_prefix="$acl_save_exec_prefix" | |
9455 | prefix="$acl_save_prefix" | |
9456 | ||
9457 | if test "X$x" = "X-L$additional_libdir"; then | |
9458 | haveit=yes | |
9459 | break | |
9460 | fi | |
9461 | done | |
9462 | if test -z "$haveit"; then | |
9463 | if test -d "$additional_libdir"; then | |
9464 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9465 | fi | |
9466 | fi | |
9467 | fi | |
9468 | fi | |
9469 | ;; | |
9470 | -R*) | |
9471 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9472 | if test "$enable_rpath" != no; then | |
9473 | haveit= | |
9474 | for x in $rpathdirs; do | |
9475 | if test "X$x" = "X$dir"; then | |
9476 | haveit=yes | |
9477 | break | |
9478 | fi | |
9479 | done | |
9480 | if test -z "$haveit"; then | |
9481 | rpathdirs="$rpathdirs $dir" | |
9482 | fi | |
9483 | haveit= | |
9484 | for x in $ltrpathdirs; do | |
9485 | if test "X$x" = "X$dir"; then | |
9486 | haveit=yes | |
9487 | break | |
9488 | fi | |
9489 | done | |
9490 | if test -z "$haveit"; then | |
9491 | ltrpathdirs="$ltrpathdirs $dir" | |
9492 | fi | |
9493 | fi | |
9494 | ;; | |
9495 | -l*) | |
9496 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9497 | ;; | |
9498 | *.la) | |
9499 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9500 | ;; | |
9501 | *) | |
9502 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9503 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9504 | ;; | |
81ecdfbb RW |
9505 | esac |
9506 | done | |
9507 | fi | |
9508 | else | |
9509 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9510 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9511 | fi | |
9512 | fi | |
9513 | fi | |
9514 | done | |
9515 | done | |
9516 | if test "X$rpathdirs" != "X"; then | |
9517 | if test -n "$hardcode_libdir_separator"; then | |
9518 | alldirs= | |
9519 | for found_dir in $rpathdirs; do | |
9520 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9521 | done | |
9522 | acl_save_libdir="$libdir" | |
9523 | libdir="$alldirs" | |
9524 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9525 | libdir="$acl_save_libdir" | |
9526 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9527 | else | |
9528 | for found_dir in $rpathdirs; do | |
9529 | acl_save_libdir="$libdir" | |
9530 | libdir="$found_dir" | |
9531 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9532 | libdir="$acl_save_libdir" | |
9533 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9534 | done | |
9535 | fi | |
9536 | fi | |
9537 | if test "X$ltrpathdirs" != "X"; then | |
9538 | for found_dir in $ltrpathdirs; do | |
9539 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9540 | done | |
9541 | fi | |
a9322a30 TT |
9542 | |
9543 | ||
81ecdfbb | 9544 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9545 | |
81ecdfbb RW |
9546 | for element in $INCEXPAT; do |
9547 | haveit= | |
9548 | for x in $CPPFLAGS; do | |
a9322a30 | 9549 | |
81ecdfbb RW |
9550 | acl_save_prefix="$prefix" |
9551 | prefix="$acl_final_prefix" | |
9552 | acl_save_exec_prefix="$exec_prefix" | |
9553 | exec_prefix="$acl_final_exec_prefix" | |
9554 | eval x=\"$x\" | |
9555 | exec_prefix="$acl_save_exec_prefix" | |
9556 | prefix="$acl_save_prefix" | |
a8111142 | 9557 | |
81ecdfbb RW |
9558 | if test "X$x" = "X$element"; then |
9559 | haveit=yes | |
9560 | break | |
9561 | fi | |
9562 | done | |
9563 | if test -z "$haveit"; then | |
9564 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9565 | fi | |
9566 | done | |
a9322a30 TT |
9567 | |
9568 | ||
81ecdfbb RW |
9569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9570 | $as_echo_n "checking for libexpat... " >&6; } | |
9571 | if test "${ac_cv_libexpat+set}" = set; then : | |
9572 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9573 | else |
bec39cab | 9574 | |
81ecdfbb RW |
9575 | ac_save_LIBS="$LIBS" |
9576 | LIBS="$LIBS $LIBEXPAT" | |
9577 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9578 | /* end confdefs.h. */ |
81ecdfbb RW |
9579 | #include "expat.h" |
9580 | int | |
9581 | main () | |
9582 | { | |
9583 | XML_Parser p = XML_ParserCreate (0); | |
9584 | ; | |
9585 | return 0; | |
9586 | } | |
bec39cab | 9587 | _ACEOF |
81ecdfbb RW |
9588 | if ac_fn_c_try_link "$LINENO"; then : |
9589 | ac_cv_libexpat=yes | |
c906108c | 9590 | else |
81ecdfbb | 9591 | ac_cv_libexpat=no |
bec39cab | 9592 | fi |
81ecdfbb RW |
9593 | rm -f core conftest.err conftest.$ac_objext \ |
9594 | conftest$ac_exeext conftest.$ac_ext | |
9595 | LIBS="$ac_save_LIBS" | |
c906108c | 9596 | |
95ca63c4 | 9597 | fi |
81ecdfbb RW |
9598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9599 | $as_echo "$ac_cv_libexpat" >&6; } | |
9600 | if test "$ac_cv_libexpat" = yes; then | |
9601 | HAVE_LIBEXPAT=yes | |
bec39cab | 9602 | |
81ecdfbb | 9603 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9604 | |
81ecdfbb RW |
9605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9606 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9608 | $as_echo "$LIBEXPAT" >&6; } | |
9609 | else | |
9610 | HAVE_LIBEXPAT=no | |
9611 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9612 | LIBEXPAT= | |
9613 | LTLIBEXPAT= | |
9614 | fi | |
95ca63c4 CF |
9615 | |
9616 | ||
9617 | ||
7cb9022a MK |
9618 | |
9619 | ||
bec39cab | 9620 | |
81ecdfbb RW |
9621 | if test "$HAVE_LIBEXPAT" != yes; then |
9622 | if test "$with_expat" = yes; then | |
9623 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
9624 | else | |
9625 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9626 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
9627 | fi | |
9628 | else | |
9629 | save_LIBS=$LIBS | |
9630 | LIBS="$LIBS $LIBEXPAT" | |
9631 | for ac_func in XML_StopParser | |
9632 | do : | |
9633 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
9634 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 9635 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9636 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 9637 | _ACEOF |
95ca63c4 | 9638 | |
bec39cab | 9639 | fi |
bec39cab | 9640 | done |
95ca63c4 | 9641 | |
81ecdfbb RW |
9642 | LIBS=$save_LIBS |
9643 | fi | |
a9322a30 TT |
9644 | fi |
9645 | ||
2400729e UW |
9646 | |
9647 | # Check whether --with-mpfr was given. | |
9648 | if test "${with_mpfr+set}" = set; then : | |
9649 | withval=$with_mpfr; | |
9650 | else | |
9651 | with_mpfr=auto | |
9652 | fi | |
9653 | ||
9654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
9655 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
9656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
9657 | $as_echo "$with_mpfr" >&6; } | |
9658 | ||
9659 | if test "${with_mpfr}" = no; then | |
9660 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
9661 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
9662 | HAVE_LIBMPFR=no | |
9663 | else | |
9664 | ||
9665 | ||
9666 | ||
9667 | ||
9668 | ||
9669 | ||
9670 | ||
9671 | ||
9672 | use_additional=yes | |
9673 | ||
9674 | acl_save_prefix="$prefix" | |
9675 | prefix="$acl_final_prefix" | |
9676 | acl_save_exec_prefix="$exec_prefix" | |
9677 | exec_prefix="$acl_final_exec_prefix" | |
9678 | ||
9679 | eval additional_includedir=\"$includedir\" | |
9680 | eval additional_libdir=\"$libdir\" | |
9681 | ||
9682 | exec_prefix="$acl_save_exec_prefix" | |
9683 | prefix="$acl_save_prefix" | |
9684 | ||
9685 | ||
9686 | # Check whether --with-libmpfr-prefix was given. | |
9687 | if test "${with_libmpfr_prefix+set}" = set; then : | |
9688 | withval=$with_libmpfr_prefix; | |
9689 | if test "X$withval" = "Xno"; then | |
9690 | use_additional=no | |
9691 | else | |
9692 | if test "X$withval" = "X"; then | |
9693 | ||
9694 | acl_save_prefix="$prefix" | |
9695 | prefix="$acl_final_prefix" | |
9696 | acl_save_exec_prefix="$exec_prefix" | |
9697 | exec_prefix="$acl_final_exec_prefix" | |
9698 | ||
9699 | eval additional_includedir=\"$includedir\" | |
9700 | eval additional_libdir=\"$libdir\" | |
9701 | ||
9702 | exec_prefix="$acl_save_exec_prefix" | |
9703 | prefix="$acl_save_prefix" | |
9704 | ||
9705 | else | |
9706 | additional_includedir="$withval/include" | |
9707 | additional_libdir="$withval/lib" | |
9708 | fi | |
9709 | fi | |
9710 | ||
9711 | fi | |
9712 | ||
9713 | LIBMPFR= | |
9714 | LTLIBMPFR= | |
9715 | INCMPFR= | |
9716 | rpathdirs= | |
9717 | ltrpathdirs= | |
9718 | names_already_handled= | |
9719 | names_next_round='mpfr ' | |
9720 | while test -n "$names_next_round"; do | |
9721 | names_this_round="$names_next_round" | |
9722 | names_next_round= | |
9723 | for name in $names_this_round; do | |
9724 | already_handled= | |
9725 | for n in $names_already_handled; do | |
9726 | if test "$n" = "$name"; then | |
9727 | already_handled=yes | |
9728 | break | |
9729 | fi | |
9730 | done | |
9731 | if test -z "$already_handled"; then | |
9732 | names_already_handled="$names_already_handled $name" | |
9733 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9734 | eval value=\"\$HAVE_LIB$uppername\" | |
9735 | if test -n "$value"; then | |
9736 | if test "$value" = yes; then | |
9737 | eval value=\"\$LIB$uppername\" | |
9738 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
9739 | eval value=\"\$LTLIB$uppername\" | |
9740 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
9741 | else | |
9742 | : | |
9743 | fi | |
9744 | else | |
9745 | found_dir= | |
9746 | found_la= | |
9747 | found_so= | |
9748 | found_a= | |
9749 | if test $use_additional = yes; then | |
9750 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9751 | found_dir="$additional_libdir" | |
9752 | found_so="$additional_libdir/lib$name.$shlibext" | |
9753 | if test -f "$additional_libdir/lib$name.la"; then | |
9754 | found_la="$additional_libdir/lib$name.la" | |
9755 | fi | |
9756 | else | |
9757 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9758 | found_dir="$additional_libdir" | |
9759 | found_a="$additional_libdir/lib$name.$libext" | |
9760 | if test -f "$additional_libdir/lib$name.la"; then | |
9761 | found_la="$additional_libdir/lib$name.la" | |
9762 | fi | |
9763 | fi | |
9764 | fi | |
9765 | fi | |
9766 | if test "X$found_dir" = "X"; then | |
9767 | for x in $LDFLAGS $LTLIBMPFR; do | |
9768 | ||
9769 | acl_save_prefix="$prefix" | |
9770 | prefix="$acl_final_prefix" | |
9771 | acl_save_exec_prefix="$exec_prefix" | |
9772 | exec_prefix="$acl_final_exec_prefix" | |
9773 | eval x=\"$x\" | |
9774 | exec_prefix="$acl_save_exec_prefix" | |
9775 | prefix="$acl_save_prefix" | |
9776 | ||
9777 | case "$x" in | |
9778 | -L*) | |
9779 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9780 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9781 | found_dir="$dir" | |
9782 | found_so="$dir/lib$name.$shlibext" | |
9783 | if test -f "$dir/lib$name.la"; then | |
9784 | found_la="$dir/lib$name.la" | |
9785 | fi | |
9786 | else | |
9787 | if test -f "$dir/lib$name.$libext"; then | |
9788 | found_dir="$dir" | |
9789 | found_a="$dir/lib$name.$libext" | |
9790 | if test -f "$dir/lib$name.la"; then | |
9791 | found_la="$dir/lib$name.la" | |
9792 | fi | |
9793 | fi | |
9794 | fi | |
9795 | ;; | |
9796 | esac | |
9797 | if test "X$found_dir" != "X"; then | |
9798 | break | |
9799 | fi | |
9800 | done | |
9801 | fi | |
9802 | if test "X$found_dir" != "X"; then | |
9803 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
9804 | if test "X$found_so" != "X"; then | |
9805 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9806 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9807 | else | |
9808 | haveit= | |
9809 | for x in $ltrpathdirs; do | |
9810 | if test "X$x" = "X$found_dir"; then | |
9811 | haveit=yes | |
9812 | break | |
9813 | fi | |
9814 | done | |
9815 | if test -z "$haveit"; then | |
9816 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9817 | fi | |
9818 | if test "$hardcode_direct" = yes; then | |
9819 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9820 | else | |
9821 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9822 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9823 | haveit= | |
9824 | for x in $rpathdirs; do | |
9825 | if test "X$x" = "X$found_dir"; then | |
9826 | haveit=yes | |
9827 | break | |
9828 | fi | |
9829 | done | |
9830 | if test -z "$haveit"; then | |
9831 | rpathdirs="$rpathdirs $found_dir" | |
9832 | fi | |
9833 | else | |
9834 | haveit= | |
9835 | for x in $LDFLAGS $LIBMPFR; do | |
9836 | ||
9837 | acl_save_prefix="$prefix" | |
9838 | prefix="$acl_final_prefix" | |
9839 | acl_save_exec_prefix="$exec_prefix" | |
9840 | exec_prefix="$acl_final_exec_prefix" | |
9841 | eval x=\"$x\" | |
9842 | exec_prefix="$acl_save_exec_prefix" | |
9843 | prefix="$acl_save_prefix" | |
9844 | ||
9845 | if test "X$x" = "X-L$found_dir"; then | |
9846 | haveit=yes | |
9847 | break | |
9848 | fi | |
9849 | done | |
9850 | if test -z "$haveit"; then | |
9851 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
9852 | fi | |
9853 | if test "$hardcode_minus_L" != no; then | |
9854 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9855 | else | |
9856 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
9857 | fi | |
9858 | fi | |
9859 | fi | |
9860 | fi | |
9861 | else | |
9862 | if test "X$found_a" != "X"; then | |
9863 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
9864 | else | |
9865 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
9866 | fi | |
9867 | fi | |
9868 | additional_includedir= | |
9869 | case "$found_dir" in | |
9870 | */lib | */lib/) | |
9871 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9872 | additional_includedir="$basedir/include" | |
9873 | ;; | |
9874 | esac | |
9875 | if test "X$additional_includedir" != "X"; then | |
9876 | if test "X$additional_includedir" != "X/usr/include"; then | |
9877 | haveit= | |
9878 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9879 | if test -n "$GCC"; then | |
9880 | case $host_os in | |
9881 | linux*) haveit=yes;; | |
9882 | esac | |
9883 | fi | |
9884 | fi | |
9885 | if test -z "$haveit"; then | |
9886 | for x in $CPPFLAGS $INCMPFR; do | |
9887 | ||
9888 | acl_save_prefix="$prefix" | |
9889 | prefix="$acl_final_prefix" | |
9890 | acl_save_exec_prefix="$exec_prefix" | |
9891 | exec_prefix="$acl_final_exec_prefix" | |
9892 | eval x=\"$x\" | |
9893 | exec_prefix="$acl_save_exec_prefix" | |
9894 | prefix="$acl_save_prefix" | |
9895 | ||
9896 | if test "X$x" = "X-I$additional_includedir"; then | |
9897 | haveit=yes | |
9898 | break | |
9899 | fi | |
9900 | done | |
9901 | if test -z "$haveit"; then | |
9902 | if test -d "$additional_includedir"; then | |
9903 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
9904 | fi | |
9905 | fi | |
9906 | fi | |
9907 | fi | |
9908 | fi | |
9909 | if test -n "$found_la"; then | |
9910 | save_libdir="$libdir" | |
9911 | case "$found_la" in | |
9912 | */* | *\\*) . "$found_la" ;; | |
9913 | *) . "./$found_la" ;; | |
9914 | esac | |
9915 | libdir="$save_libdir" | |
9916 | for dep in $dependency_libs; do | |
9917 | case "$dep" in | |
9918 | -L*) | |
9919 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9920 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9921 | haveit= | |
9922 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9923 | if test -n "$GCC"; then | |
9924 | case $host_os in | |
9925 | linux*) haveit=yes;; | |
9926 | esac | |
9927 | fi | |
9928 | fi | |
9929 | if test -z "$haveit"; then | |
9930 | haveit= | |
9931 | for x in $LDFLAGS $LIBMPFR; do | |
9932 | ||
9933 | acl_save_prefix="$prefix" | |
9934 | prefix="$acl_final_prefix" | |
9935 | acl_save_exec_prefix="$exec_prefix" | |
9936 | exec_prefix="$acl_final_exec_prefix" | |
9937 | eval x=\"$x\" | |
9938 | exec_prefix="$acl_save_exec_prefix" | |
9939 | prefix="$acl_save_prefix" | |
9940 | ||
9941 | if test "X$x" = "X-L$additional_libdir"; then | |
9942 | haveit=yes | |
9943 | break | |
9944 | fi | |
9945 | done | |
9946 | if test -z "$haveit"; then | |
9947 | if test -d "$additional_libdir"; then | |
9948 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
9949 | fi | |
9950 | fi | |
9951 | haveit= | |
9952 | for x in $LDFLAGS $LTLIBMPFR; do | |
9953 | ||
9954 | acl_save_prefix="$prefix" | |
9955 | prefix="$acl_final_prefix" | |
9956 | acl_save_exec_prefix="$exec_prefix" | |
9957 | exec_prefix="$acl_final_exec_prefix" | |
9958 | eval x=\"$x\" | |
9959 | exec_prefix="$acl_save_exec_prefix" | |
9960 | prefix="$acl_save_prefix" | |
9961 | ||
9962 | if test "X$x" = "X-L$additional_libdir"; then | |
9963 | haveit=yes | |
9964 | break | |
9965 | fi | |
9966 | done | |
9967 | if test -z "$haveit"; then | |
9968 | if test -d "$additional_libdir"; then | |
9969 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
9970 | fi | |
9971 | fi | |
9972 | fi | |
9973 | fi | |
9974 | ;; | |
9975 | -R*) | |
9976 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9977 | if test "$enable_rpath" != no; then | |
9978 | haveit= | |
9979 | for x in $rpathdirs; do | |
9980 | if test "X$x" = "X$dir"; then | |
9981 | haveit=yes | |
9982 | break | |
9983 | fi | |
9984 | done | |
9985 | if test -z "$haveit"; then | |
9986 | rpathdirs="$rpathdirs $dir" | |
9987 | fi | |
9988 | haveit= | |
9989 | for x in $ltrpathdirs; do | |
9990 | if test "X$x" = "X$dir"; then | |
9991 | haveit=yes | |
9992 | break | |
9993 | fi | |
9994 | done | |
9995 | if test -z "$haveit"; then | |
9996 | ltrpathdirs="$ltrpathdirs $dir" | |
9997 | fi | |
9998 | fi | |
9999 | ;; | |
10000 | -l*) | |
10001 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10002 | ;; | |
10003 | *.la) | |
10004 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10005 | ;; | |
10006 | *) | |
10007 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10008 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10009 | ;; | |
10010 | esac | |
10011 | done | |
10012 | fi | |
10013 | else | |
10014 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10015 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10016 | fi | |
10017 | fi | |
10018 | fi | |
10019 | done | |
10020 | done | |
10021 | if test "X$rpathdirs" != "X"; then | |
10022 | if test -n "$hardcode_libdir_separator"; then | |
10023 | alldirs= | |
10024 | for found_dir in $rpathdirs; do | |
10025 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10026 | done | |
10027 | acl_save_libdir="$libdir" | |
10028 | libdir="$alldirs" | |
10029 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10030 | libdir="$acl_save_libdir" | |
10031 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10032 | else | |
10033 | for found_dir in $rpathdirs; do | |
10034 | acl_save_libdir="$libdir" | |
10035 | libdir="$found_dir" | |
10036 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10037 | libdir="$acl_save_libdir" | |
10038 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10039 | done | |
10040 | fi | |
10041 | fi | |
10042 | if test "X$ltrpathdirs" != "X"; then | |
10043 | for found_dir in $ltrpathdirs; do | |
10044 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10045 | done | |
10046 | fi | |
10047 | ||
10048 | ||
10049 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10050 | ||
10051 | for element in $INCMPFR; do | |
10052 | haveit= | |
10053 | for x in $CPPFLAGS; do | |
10054 | ||
10055 | acl_save_prefix="$prefix" | |
10056 | prefix="$acl_final_prefix" | |
10057 | acl_save_exec_prefix="$exec_prefix" | |
10058 | exec_prefix="$acl_final_exec_prefix" | |
10059 | eval x=\"$x\" | |
10060 | exec_prefix="$acl_save_exec_prefix" | |
10061 | prefix="$acl_save_prefix" | |
10062 | ||
10063 | if test "X$x" = "X$element"; then | |
10064 | haveit=yes | |
10065 | break | |
10066 | fi | |
10067 | done | |
10068 | if test -z "$haveit"; then | |
10069 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10070 | fi | |
10071 | done | |
10072 | ||
10073 | ||
10074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10075 | $as_echo_n "checking for libmpfr... " >&6; } | |
10076 | if test "${ac_cv_libmpfr+set}" = set; then : | |
10077 | $as_echo_n "(cached) " >&6 | |
10078 | else | |
10079 | ||
10080 | ac_save_LIBS="$LIBS" | |
10081 | LIBS="$LIBS $LIBMPFR" | |
10082 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10083 | /* end confdefs.h. */ | |
10084 | #include <mpfr.h> | |
10085 | int | |
10086 | main () | |
10087 | { | |
10088 | mpfr_exp_t exp; mpfr_t x; | |
10089 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10090 | ; | |
10091 | return 0; | |
10092 | } | |
10093 | _ACEOF | |
10094 | if ac_fn_c_try_link "$LINENO"; then : | |
10095 | ac_cv_libmpfr=yes | |
10096 | else | |
10097 | ac_cv_libmpfr=no | |
10098 | fi | |
10099 | rm -f core conftest.err conftest.$ac_objext \ | |
10100 | conftest$ac_exeext conftest.$ac_ext | |
10101 | LIBS="$ac_save_LIBS" | |
10102 | ||
10103 | fi | |
10104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10105 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10106 | if test "$ac_cv_libmpfr" = yes; then | |
10107 | HAVE_LIBMPFR=yes | |
10108 | ||
10109 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
10110 | ||
10111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
10112 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
10113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
10114 | $as_echo "$LIBMPFR" >&6; } | |
10115 | else | |
10116 | HAVE_LIBMPFR=no | |
10117 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10118 | LIBMPFR= | |
10119 | LTLIBMPFR= | |
10120 | fi | |
10121 | ||
10122 | ||
10123 | ||
10124 | ||
10125 | ||
10126 | ||
10127 | if test "$HAVE_LIBMPFR" != yes; then | |
10128 | if test "$with_mpfr" = yes; then | |
10129 | as_fn_error "MPFR is missing or unusable" "$LINENO" 5 | |
10130 | else | |
10131 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
10132 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
10133 | fi | |
10134 | fi | |
10135 | fi | |
10136 | ||
d344e670 DE |
10137 | # --------------------- # |
10138 | # Check for libpython. # | |
10139 | # --------------------- # | |
10140 | ||
a9322a30 | 10141 | |
a9322a30 TT |
10142 | |
10143 | ||
ec685c5e | 10144 | |
0c4a4063 | 10145 | |
81ecdfbb RW |
10146 | # Check whether --with-python was given. |
10147 | if test "${with_python+set}" = set; then : | |
10148 | withval=$with_python; | |
bec39cab | 10149 | else |
81ecdfbb | 10150 | with_python=auto |
bec39cab | 10151 | fi |
bec39cab | 10152 | |
81ecdfbb RW |
10153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10154 | $as_echo_n "checking whether to use python... " >&6; } | |
10155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10156 | $as_echo "$with_python" >&6; } | |
9a156167 | 10157 | |
81ecdfbb RW |
10158 | if test "${with_python}" = no; then |
10159 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10160 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10161 | have_libpython=no | |
bec39cab | 10162 | else |
81ecdfbb | 10163 | case "${with_python}" in |
8c85a4e2 | 10164 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
10165 | if test -d ${with_python}; then |
10166 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 10167 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10168 | python_prefix= |
9c4ea6c5 JB |
10169 | # If python does not exit ${with_python}/bin, then try in |
10170 | # ${with_python}. On Windows/MinGW, this is where the Python | |
10171 | # executable is. | |
10172 | if test ! -x "${python_prog}"; then | |
10173 | python_prog="${with_python}/python" | |
10174 | python_prefix= | |
10175 | fi | |
e7a30f46 | 10176 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
10177 | # Fall back to gdb 7.0/7.1 behaviour. |
10178 | python_prog=missing | |
0c4a4063 | 10179 | python_prefix=${with_python} |
ec685c5e | 10180 | fi |
e7a30f46 | 10181 | elif test -x "${with_python}"; then |
ec685c5e DE |
10182 | # While we can't run python compiled for $host (unless host == build), |
10183 | # the user could write a script that provides the needed information, | |
10184 | # so we support that. | |
ec685c5e | 10185 | python_prog=${with_python} |
0c4a4063 | 10186 | python_prefix= |
ec685c5e DE |
10187 | else |
10188 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
10189 | fi | |
81ecdfbb | 10190 | ;; |
ec685c5e DE |
10191 | */*) |
10192 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
10193 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
10194 | ;; | |
ec685c5e DE |
10195 | *) |
10196 | # The user has either specified auto, yes, or the name of the python | |
10197 | # program assumed to be in $PATH. | |
10198 | python_prefix= | |
10199 | case "${with_python}" in | |
10200 | yes | auto) | |
10201 | if test ${build} = ${host}; then | |
10202 | # Extract the first word of "python", so it can be a program name with args. | |
10203 | set dummy python; ac_word=$2 | |
10204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10205 | $as_echo_n "checking for $ac_word... " >&6; } | |
10206 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10207 | $as_echo_n "(cached) " >&6 | |
10208 | else | |
10209 | case $python_prog_path in | |
10210 | [\\/]* | ?:[\\/]*) | |
10211 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10212 | ;; | |
10213 | *) | |
10214 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10215 | for as_dir in $PATH | |
10216 | do | |
10217 | IFS=$as_save_IFS | |
10218 | test -z "$as_dir" && as_dir=. | |
10219 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10220 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10221 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10222 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10223 | break 2 | |
10224 | fi | |
10225 | done | |
10226 | done | |
10227 | IFS=$as_save_IFS | |
10228 | ||
10229 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10230 | ;; | |
10231 | esac | |
10232 | fi | |
10233 | python_prog_path=$ac_cv_path_python_prog_path | |
10234 | if test -n "$python_prog_path"; then | |
10235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10236 | $as_echo "$python_prog_path" >&6; } | |
10237 | else | |
10238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10239 | $as_echo "no" >&6; } | |
10240 | fi | |
10241 | ||
10242 | ||
10243 | if test "${python_prog_path}" = missing; then | |
10244 | python_prog=missing | |
10245 | else | |
10246 | python_prog=${python_prog_path} | |
10247 | fi | |
10248 | else | |
10249 | # Not much we can do except assume the cross-compiler will find the | |
10250 | # right files. | |
10251 | python_prog=missing | |
10252 | fi | |
10253 | ;; | |
10254 | *) | |
10255 | # While we can't run python compiled for $host (unless host == build), | |
10256 | # the user could write a script that provides the needed information, | |
10257 | # so we support that. | |
10258 | python_prog="${with_python}" | |
10259 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10260 | set dummy ${python_prog}; ac_word=$2 | |
10261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10262 | $as_echo_n "checking for $ac_word... " >&6; } | |
10263 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10264 | $as_echo_n "(cached) " >&6 | |
10265 | else | |
10266 | case $python_prog_path in | |
10267 | [\\/]* | ?:[\\/]*) | |
10268 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10269 | ;; | |
10270 | *) | |
10271 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10272 | for as_dir in $PATH | |
10273 | do | |
10274 | IFS=$as_save_IFS | |
10275 | test -z "$as_dir" && as_dir=. | |
10276 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10277 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10278 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10279 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10280 | break 2 | |
10281 | fi | |
10282 | done | |
10283 | done | |
10284 | IFS=$as_save_IFS | |
10285 | ||
10286 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10287 | ;; | |
10288 | esac | |
10289 | fi | |
10290 | python_prog_path=$ac_cv_path_python_prog_path | |
10291 | if test -n "$python_prog_path"; then | |
10292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10293 | $as_echo "$python_prog_path" >&6; } | |
10294 | else | |
10295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10296 | $as_echo "no" >&6; } | |
10297 | fi | |
10298 | ||
10299 | ||
10300 | if test "${python_prog_path}" = missing; then | |
10301 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
10302 | fi | |
10303 | ;; | |
10304 | esac | |
81ecdfbb RW |
10305 | esac |
10306 | ||
ec685c5e | 10307 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
10308 | # We have a python program to use, but it may be too old. |
10309 | # Don't flag an error for --with-python=auto (the default). | |
10310 | have_python_config=yes | |
ec685c5e DE |
10311 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
10312 | if test $? != 0; then | |
e7a30f46 DE |
10313 | have_python_config=failed |
10314 | if test "${with_python}" != auto; then | |
10315 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
10316 | fi | |
ec685c5e DE |
10317 | fi |
10318 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10319 | if test $? != 0; then | |
e7a30f46 DE |
10320 | have_python_config=failed |
10321 | if test "${with_python}" != auto; then | |
10322 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
10323 | fi | |
ec685c5e | 10324 | fi |
0c4a4063 DE |
10325 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10326 | if test $? != 0; then | |
e7a30f46 DE |
10327 | have_python_config=failed |
10328 | if test "${with_python}" != auto; then | |
10329 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
10330 | fi | |
0c4a4063 | 10331 | fi |
ec685c5e | 10332 | else |
ac534cba JB |
10333 | # We do not have a python executable we can use to determine where |
10334 | # to find the Python headers and libs. We cannot guess the include | |
10335 | # path from the python_prefix either, because that include path | |
10336 | # depends on the Python version. So, there is nothing much we can | |
10337 | # do except assume that the compiler will be able to find those files. | |
10338 | python_includes= | |
10339 | python_libs= | |
0c4a4063 | 10340 | have_python_config=no |
ec685c5e | 10341 | fi |
bec39cab | 10342 | |
ec685c5e DE |
10343 | # If we have python-config, only try the configuration it provides. |
10344 | # Otherwise fallback on the old way of trying different versions of | |
10345 | # python in turn. | |
81ecdfbb | 10346 | |
ec685c5e DE |
10347 | have_libpython=no |
10348 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
10349 | # Determine the Python version by extracting "-lpython<version>" |
10350 | # part of the python_libs. <version> is usually X.Y with X and Y | |
10351 | # being decimal numbers, but can also be XY (seen on Windows). | |
10352 | # | |
10353 | # The extraction is performed using sed with a regular expression. | |
10354 | # Initially, the regexp used was using the '?' quantifier to make | |
10355 | # the dot in the version number optional. Unfortunately, this | |
10356 | # does not work with non-GNU versions of sed because, because of | |
10357 | # what looks like a limitation (the '?' quantifier does not work | |
10358 | # with back-references). We work around this limitation by using | |
10359 | # the '*' quantifier instead. It means that, in theory, we might | |
10360 | # match unexpected version strings such as "-lpython2..7", but | |
10361 | # this seems unlikely in practice. And even if that happens, | |
10362 | # an error will be triggered later on, when checking that version | |
10363 | # number. | |
ec685c5e | 10364 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 10365 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
10366 | case "${python_version}" in |
10367 | python*) | |
ec685c5e DE |
10368 | |
10369 | version=${python_version} | |
10370 | ||
10371 | new_CPPFLAGS=${python_includes} | |
10372 | new_LIBS=${python_libs} | |
81ecdfbb RW |
10373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10374 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10375 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10376 | save_LIBS=$LIBS |
ec685c5e DE |
10377 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10378 | LIBS="$LIBS $new_LIBS" | |
10379 | found_usable_python=no | |
81ecdfbb | 10380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10381 | /* end confdefs.h. */ |
ac534cba | 10382 | #include "Python.h" |
81ecdfbb RW |
10383 | int |
10384 | main () | |
10385 | { | |
10386 | Py_Initialize (); | |
10387 | ; | |
10388 | return 0; | |
10389 | } | |
bec39cab | 10390 | _ACEOF |
81ecdfbb | 10391 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10392 | have_libpython=${version} |
10393 | found_usable_python=yes | |
ac534cba JB |
10394 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10395 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 10396 | fi |
81ecdfbb RW |
10397 | rm -f core conftest.err conftest.$ac_objext \ |
10398 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10399 | CPPFLAGS=$save_CPPFLAGS |
10400 | LIBS=$save_LIBS | |
ec685c5e DE |
10401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10402 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10403 | |
0c4a4063 DE |
10404 | ;; |
10405 | *) | |
ec685c5e | 10406 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
10407 | ;; |
10408 | esac | |
e7a30f46 | 10409 | elif test "${have_python_config}" != failed; then |
ec685c5e | 10410 | if test "${have_libpython}" = no; then |
9a156167 | 10411 | |
420697bb TT |
10412 | version=python2.7 |
10413 | ||
10414 | new_CPPFLAGS=${python_includes} | |
10415 | new_LIBS="${python_libs} -lpython2.7" | |
10416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10417 | $as_echo_n "checking for ${version}... " >&6; } | |
10418 | save_CPPFLAGS=$CPPFLAGS | |
10419 | save_LIBS=$LIBS | |
10420 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10421 | LIBS="$LIBS $new_LIBS" | |
10422 | found_usable_python=no | |
10423 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10424 | /* end confdefs.h. */ | |
ac534cba | 10425 | #include "Python.h" |
420697bb TT |
10426 | int |
10427 | main () | |
10428 | { | |
10429 | Py_Initialize (); | |
10430 | ; | |
10431 | return 0; | |
10432 | } | |
10433 | _ACEOF | |
10434 | if ac_fn_c_try_link "$LINENO"; then : | |
10435 | have_libpython=${version} | |
10436 | found_usable_python=yes | |
ac534cba JB |
10437 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10438 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
10439 | fi |
10440 | rm -f core conftest.err conftest.$ac_objext \ | |
10441 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10442 | CPPFLAGS=$save_CPPFLAGS |
10443 | LIBS=$save_LIBS | |
420697bb TT |
10444 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10445 | $as_echo "${found_usable_python}" >&6; } | |
10446 | ||
10447 | fi | |
10448 | if test "${have_libpython}" = no; then | |
10449 | ||
ec685c5e DE |
10450 | version=python2.6 |
10451 | ||
10452 | new_CPPFLAGS=${python_includes} | |
10453 | new_LIBS="${python_libs} -lpython2.6" | |
10454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10455 | $as_echo_n "checking for ${version}... " >&6; } | |
10456 | save_CPPFLAGS=$CPPFLAGS | |
10457 | save_LIBS=$LIBS | |
10458 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10459 | LIBS="$LIBS $new_LIBS" | |
10460 | found_usable_python=no | |
10461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10462 | /* end confdefs.h. */ | |
ac534cba | 10463 | #include "Python.h" |
ec685c5e DE |
10464 | int |
10465 | main () | |
10466 | { | |
10467 | Py_Initialize (); | |
10468 | ; | |
10469 | return 0; | |
10470 | } | |
10471 | _ACEOF | |
10472 | if ac_fn_c_try_link "$LINENO"; then : | |
10473 | have_libpython=${version} | |
10474 | found_usable_python=yes | |
ac534cba JB |
10475 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10476 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
10477 | fi |
10478 | rm -f core conftest.err conftest.$ac_objext \ | |
10479 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10480 | CPPFLAGS=$save_CPPFLAGS |
10481 | LIBS=$save_LIBS | |
ec685c5e DE |
10482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10483 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10484 | |
81ecdfbb | 10485 | fi |
ec685c5e | 10486 | if test ${have_libpython} = no; then |
9a156167 | 10487 | |
81ecdfbb | 10488 | version=python2.5 |
9a156167 | 10489 | |
ec685c5e DE |
10490 | new_CPPFLAGS=${python_includes} |
10491 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
10492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10493 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10494 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10495 | save_LIBS=$LIBS |
ec685c5e DE |
10496 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10497 | LIBS="$LIBS $new_LIBS" | |
10498 | found_usable_python=no | |
81ecdfbb | 10499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10500 | /* end confdefs.h. */ |
ac534cba | 10501 | #include "Python.h" |
81ecdfbb RW |
10502 | int |
10503 | main () | |
10504 | { | |
10505 | Py_Initialize (); | |
10506 | ; | |
10507 | return 0; | |
10508 | } | |
436868fb | 10509 | _ACEOF |
81ecdfbb | 10510 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10511 | have_libpython=${version} |
10512 | found_usable_python=yes | |
ac534cba JB |
10513 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10514 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10515 | fi |
81ecdfbb RW |
10516 | rm -f core conftest.err conftest.$ac_objext \ |
10517 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10518 | CPPFLAGS=$save_CPPFLAGS |
10519 | LIBS=$save_LIBS | |
ec685c5e DE |
10520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10521 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 10522 | |
81ecdfbb | 10523 | fi |
ec685c5e | 10524 | if test ${have_libpython} = no; then |
a9322a30 | 10525 | |
81ecdfbb | 10526 | version=python2.4 |
a9322a30 | 10527 | |
ec685c5e DE |
10528 | new_CPPFLAGS=${python_includes} |
10529 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
10530 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10531 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10532 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10533 | save_LIBS=$LIBS |
ec685c5e DE |
10534 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10535 | LIBS="$LIBS $new_LIBS" | |
10536 | found_usable_python=no | |
81ecdfbb | 10537 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10538 | /* end confdefs.h. */ |
ac534cba | 10539 | #include "Python.h" |
a9322a30 TT |
10540 | int |
10541 | main () | |
10542 | { | |
81ecdfbb | 10543 | Py_Initialize (); |
a9322a30 TT |
10544 | ; |
10545 | return 0; | |
10546 | } | |
436868fb | 10547 | _ACEOF |
81ecdfbb | 10548 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10549 | have_libpython=${version} |
10550 | found_usable_python=yes | |
ac534cba JB |
10551 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10552 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10553 | fi |
81ecdfbb RW |
10554 | rm -f core conftest.err conftest.$ac_objext \ |
10555 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10556 | CPPFLAGS=$save_CPPFLAGS |
10557 | LIBS=$save_LIBS | |
ec685c5e DE |
10558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10559 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10560 | |
ec685c5e DE |
10561 | fi |
10562 | fi | |
9c4ea6c5 | 10563 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
10564 | |
10565 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
10566 | ||
9c4ea6c5 | 10567 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
10568 | |
10569 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
10570 | ||
9c4ea6c5 | 10571 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
10572 | |
10573 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
10574 | ||
9c4ea6c5 | 10575 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
10576 | |
10577 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
10578 | ||
81ecdfbb | 10579 | fi |
ec685c5e DE |
10580 | |
10581 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10582 | case "${with_python}" in |
10583 | yes) | |
10584 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
10585 | ;; | |
10586 | auto) | |
10587 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10588 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10589 | ;; | |
10590 | *) | |
10591 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
10592 | ;; | |
10593 | esac | |
0c4a4063 DE |
10594 | else |
10595 | if test -n "${python_prefix}"; then | |
10596 | ||
10597 | cat >>confdefs.h <<_ACEOF | |
10598 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10599 | _ACEOF | |
10600 | ||
10601 | ||
10602 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10603 | if test "x$prefix" = xNONE; then | |
10604 | test_prefix=/usr/local | |
10605 | else | |
10606 | test_prefix=$prefix | |
10607 | fi | |
10608 | else | |
10609 | test_prefix=$exec_prefix | |
10610 | fi | |
10611 | value=0 | |
10612 | case ${python_prefix} in | |
10613 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10614 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10615 | value=1 | |
10616 | ;; | |
10617 | esac | |
10618 | ||
10619 | cat >>confdefs.h <<_ACEOF | |
10620 | #define PYTHON_PATH_RELOCATABLE $value | |
10621 | _ACEOF | |
10622 | ||
10623 | ||
10624 | fi | |
81ecdfbb | 10625 | fi |
436868fb | 10626 | fi |
436868fb | 10627 | |
ec685c5e | 10628 | if test "${have_libpython}" != no; then |
436868fb | 10629 | |
81ecdfbb | 10630 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10631 | |
81ecdfbb RW |
10632 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10633 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10634 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 10635 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 10636 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 10637 | |
81ecdfbb RW |
10638 | # Flags needed to compile Python code (taken from python-config --cflags). |
10639 | # We cannot call python-config directly because it will output whatever was | |
10640 | # used when compiling the Python interpreter itself, including flags which | |
10641 | # would make the python-related objects be compiled differently from the | |
10642 | # rest of GDB (e.g., -O2 and -fPIC). | |
10643 | if test "${GCC}" = yes; then | |
10644 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
10645 | fi | |
436868fb | 10646 | |
81ecdfbb RW |
10647 | if test "x${tentative_python_cflags}" != x; then |
10648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10649 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10650 | for flag in ${tentative_python_cflags}; do | |
10651 | # Check that the compiler accepts it | |
10652 | saved_CFLAGS="$CFLAGS" | |
10653 | CFLAGS="$CFLAGS $flag" | |
10654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10655 | /* end confdefs.h. */ |
81ecdfbb | 10656 | |
a9322a30 TT |
10657 | int |
10658 | main () | |
10659 | { | |
a9322a30 TT |
10660 | |
10661 | ; | |
10662 | return 0; | |
10663 | } | |
bec39cab | 10664 | _ACEOF |
81ecdfbb RW |
10665 | if ac_fn_c_try_compile "$LINENO"; then : |
10666 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10667 | fi |
81ecdfbb RW |
10668 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10669 | CFLAGS="$saved_CFLAGS" | |
10670 | done | |
10671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10672 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10673 | fi | |
043b6510 | 10674 | |
c83393b9 JB |
10675 | # On x64 Windows, Python's include headers, and pyconfig.h in |
10676 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
10677 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
10678 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
10679 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
10680 | # The issue was reported to the Python community, but still isn't | |
10681 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
10682 | ||
043b6510 | 10683 | case "$gdb_host" in |
c83393b9 JB |
10684 | mingw64) |
10685 | if test "${GCC}" = yes; then | |
10686 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
10687 | fi | |
10688 | ;; | |
043b6510 | 10689 | esac |
a8db4212 YPK |
10690 | |
10691 | # Note that "python -m threading" cannot be used to check for | |
10692 | # threading support due to a bug in Python 2.7.3 | |
10693 | # (http://bugs.python.org/issue15567). | |
10694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
10695 | $as_echo_n "checking whether python supports threads... " >&6; } | |
10696 | saved_CPPFLAGS="${CPPFLAGS}" | |
10697 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
10698 | # Note that the test is reversed so that python_has_threads=yes on | |
10699 | # unexpected failures. | |
10700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10701 | /* end confdefs.h. */ | |
10702 | ||
10703 | #include <Python.h> | |
10704 | #ifdef WITH_THREAD | |
10705 | # error | |
10706 | #endif | |
10707 | ||
10708 | _ACEOF | |
10709 | if ac_fn_c_try_cpp "$LINENO"; then : | |
10710 | python_has_threads=no | |
10711 | else | |
10712 | python_has_threads=yes | |
10713 | fi | |
10714 | rm -f conftest.err conftest.$ac_ext | |
10715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
10716 | $as_echo "${python_has_threads}" >&6; } | |
10717 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 10718 | else |
6dddc817 DE |
10719 | # Even if Python support is not compiled in, we need to have this file |
10720 | # included so that the "python" command, et.al., still exists. | |
10721 | CONFIG_OBS="$CONFIG_OBS python.o" | |
10722 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" | |
a9322a30 | 10723 | fi |
9a156167 | 10724 | |
a4a1c157 PA |
10725 | # Work around Python http://bugs.python.org/issue10112. See also |
10726 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
10727 | # no effect. Note that the only test after this that uses Python is | |
10728 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
10729 | # run without -export-dynamic too. | |
10730 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
10731 | ||
10732 | ||
ed3ef339 DE |
10733 | |
10734 | ||
4df42755 DE |
10735 | if test "${have_libpython}" != no; then |
10736 | HAVE_PYTHON_TRUE= | |
10737 | HAVE_PYTHON_FALSE='#' | |
10738 | else | |
10739 | HAVE_PYTHON_TRUE='#' | |
10740 | HAVE_PYTHON_FALSE= | |
10741 | fi | |
10742 | ||
ed3ef339 DE |
10743 | |
10744 | # -------------------- # | |
10745 | # Check for libguile. # | |
10746 | # -------------------- # | |
10747 | ||
10748 | ||
e1402065 DE |
10749 | |
10750 | ||
10751 | ||
10752 | ||
10753 | # Check whether --with-guile was given. | |
10754 | if test "${with_guile+set}" = set; then : | |
10755 | withval=$with_guile; | |
10756 | else | |
10757 | with_guile=auto | |
10758 | fi | |
10759 | ||
10760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
10761 | $as_echo_n "checking whether to use guile... " >&6; } | |
10762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
10763 | $as_echo "$with_guile" >&6; } | |
10764 | ||
ed3ef339 DE |
10765 | # Extract the first word of "pkg-config", so it can be a program name with args. |
10766 | set dummy pkg-config; ac_word=$2 | |
10767 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10768 | $as_echo_n "checking for $ac_word... " >&6; } | |
10769 | if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : | |
10770 | $as_echo_n "(cached) " >&6 | |
10771 | else | |
10772 | case $pkg_config_prog_path in | |
10773 | [\\/]* | ?:[\\/]*) | |
10774 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
10775 | ;; | |
10776 | *) | |
10777 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10778 | for as_dir in $PATH | |
10779 | do | |
10780 | IFS=$as_save_IFS | |
10781 | test -z "$as_dir" && as_dir=. | |
10782 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10783 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10784 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10785 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10786 | break 2 | |
10787 | fi | |
10788 | done | |
10789 | done | |
10790 | IFS=$as_save_IFS | |
10791 | ||
10792 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
10793 | ;; | |
10794 | esac | |
10795 | fi | |
10796 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
10797 | if test -n "$pkg_config_prog_path"; then | |
10798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
10799 | $as_echo "$pkg_config_prog_path" >&6; } | |
10800 | else | |
10801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10802 | $as_echo "no" >&6; } | |
10803 | fi | |
10804 | ||
10805 | ||
10806 | ||
6e66f753 | 10807 | try_guile_versions="guile-2.0" |
ed3ef339 DE |
10808 | have_libguile=no |
10809 | case "${with_guile}" in | |
10810 | no) | |
10811 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
10812 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
10813 | ;; | |
10814 | auto) | |
e1402065 DE |
10815 | if test "${pkg_config_prog_path}" = "missing"; then |
10816 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
10817 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
10818 | else | |
ed3ef339 DE |
10819 | |
10820 | pkg_config=${pkg_config_prog_path} | |
10821 | guile_version_list=${try_guile_versions} | |
10822 | flag_errors=no | |
10823 | ||
ed3ef339 DE |
10824 | found_usable_guile=checking |
10825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10826 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10827 | for guile_version in ${guile_version_list}; do | |
10828 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10829 | if test $? != 0; then | |
10830 | continue | |
10831 | fi | |
10832 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10833 | if test $? != 0; then | |
10834 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10835 | fi | |
10836 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10837 | if test $? != 0; then | |
10838 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10839 | fi | |
10840 | found_usable_guile=${guile_version} | |
10841 | break | |
10842 | done | |
10843 | if test "${found_usable_guile}" = "checking"; then | |
10844 | if test "${flag_errors}" = "yes"; then | |
10845 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10846 | else | |
10847 | found_usable_guile=no | |
10848 | fi | |
10849 | fi | |
10850 | if test "${found_usable_guile}" != no; then | |
10851 | save_CPPFLAGS=$CPPFLAGS | |
10852 | save_LIBS=$LIBS | |
10853 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10854 | LIBS="$LIBS $new_LIBS" | |
10855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10856 | /* end confdefs.h. */ | |
10857 | #include "libguile.h" | |
10858 | int | |
10859 | main () | |
10860 | { | |
10861 | scm_init_guile (); | |
10862 | ; | |
10863 | return 0; | |
10864 | } | |
10865 | _ACEOF | |
10866 | if ac_fn_c_try_link "$LINENO"; then : | |
10867 | have_libguile=yes | |
10868 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10869 | GUILE_LIBS=$new_LIBS | |
10870 | else | |
10871 | found_usable_guile=no | |
10872 | fi | |
10873 | rm -f core conftest.err conftest.$ac_objext \ | |
10874 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
10875 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
10876 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
10877 | ||
10878 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10879 | ||
10880 | ||
10881 | fi | |
10882 | ||
ed3ef339 DE |
10883 | CPPFLAGS=$save_CPPFLAGS |
10884 | LIBS=$save_LIBS | |
10885 | if test "${found_usable_guile}" = no; then | |
10886 | if test "${flag_errors}" = yes; then | |
10887 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10888 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10889 | as_fn_error "linking guile version ${guile_version} test program failed | |
10890 | See \`config.log' for more details." "$LINENO" 5; } | |
10891 | fi | |
10892 | fi | |
10893 | fi | |
10894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10895 | $as_echo "${found_usable_guile}" >&6; } | |
10896 | ||
e1402065 | 10897 | fi |
ed3ef339 DE |
10898 | ;; |
10899 | yes) | |
e1402065 DE |
10900 | if test "${pkg_config_prog_path}" = "missing"; then |
10901 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
10902 | fi | |
ed3ef339 DE |
10903 | |
10904 | pkg_config=${pkg_config_prog_path} | |
10905 | guile_version_list=${try_guile_versions} | |
10906 | flag_errors=yes | |
10907 | ||
ed3ef339 DE |
10908 | found_usable_guile=checking |
10909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10910 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10911 | for guile_version in ${guile_version_list}; do | |
10912 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10913 | if test $? != 0; then | |
10914 | continue | |
10915 | fi | |
10916 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10917 | if test $? != 0; then | |
10918 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10919 | fi | |
10920 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10921 | if test $? != 0; then | |
10922 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10923 | fi | |
10924 | found_usable_guile=${guile_version} | |
10925 | break | |
10926 | done | |
10927 | if test "${found_usable_guile}" = "checking"; then | |
10928 | if test "${flag_errors}" = "yes"; then | |
10929 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10930 | else | |
10931 | found_usable_guile=no | |
10932 | fi | |
10933 | fi | |
10934 | if test "${found_usable_guile}" != no; then | |
10935 | save_CPPFLAGS=$CPPFLAGS | |
10936 | save_LIBS=$LIBS | |
10937 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10938 | LIBS="$LIBS $new_LIBS" | |
10939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10940 | /* end confdefs.h. */ | |
10941 | #include "libguile.h" | |
10942 | int | |
10943 | main () | |
10944 | { | |
10945 | scm_init_guile (); | |
10946 | ; | |
10947 | return 0; | |
10948 | } | |
10949 | _ACEOF | |
10950 | if ac_fn_c_try_link "$LINENO"; then : | |
10951 | have_libguile=yes | |
10952 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10953 | GUILE_LIBS=$new_LIBS | |
10954 | else | |
10955 | found_usable_guile=no | |
10956 | fi | |
10957 | rm -f core conftest.err conftest.$ac_objext \ | |
10958 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
10959 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
10960 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
10961 | ||
10962 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10963 | ||
10964 | ||
10965 | fi | |
10966 | ||
ed3ef339 DE |
10967 | CPPFLAGS=$save_CPPFLAGS |
10968 | LIBS=$save_LIBS | |
10969 | if test "${found_usable_guile}" = no; then | |
10970 | if test "${flag_errors}" = yes; then | |
10971 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10972 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10973 | as_fn_error "linking guile version ${guile_version} test program failed | |
10974 | See \`config.log' for more details." "$LINENO" 5; } | |
10975 | fi | |
10976 | fi | |
10977 | fi | |
10978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10979 | $as_echo "${found_usable_guile}" >&6; } | |
10980 | ||
10981 | ;; | |
10982 | [\\/]* | ?:[\\/]*) | |
e1402065 | 10983 | if test -x "${with_guile}"; then |
ed3ef339 DE |
10984 | |
10985 | pkg_config=${with_guile} | |
10986 | guile_version_list=${try_guile_versions} | |
10987 | flag_errors=yes | |
10988 | ||
ed3ef339 DE |
10989 | found_usable_guile=checking |
10990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10991 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10992 | for guile_version in ${guile_version_list}; do | |
10993 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10994 | if test $? != 0; then | |
10995 | continue | |
10996 | fi | |
10997 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10998 | if test $? != 0; then | |
10999 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
11000 | fi | |
11001 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11002 | if test $? != 0; then | |
11003 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
11004 | fi | |
11005 | found_usable_guile=${guile_version} | |
11006 | break | |
11007 | done | |
11008 | if test "${found_usable_guile}" = "checking"; then | |
11009 | if test "${flag_errors}" = "yes"; then | |
11010 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
11011 | else | |
11012 | found_usable_guile=no | |
11013 | fi | |
11014 | fi | |
11015 | if test "${found_usable_guile}" != no; then | |
11016 | save_CPPFLAGS=$CPPFLAGS | |
11017 | save_LIBS=$LIBS | |
11018 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11019 | LIBS="$LIBS $new_LIBS" | |
11020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11021 | /* end confdefs.h. */ | |
11022 | #include "libguile.h" | |
11023 | int | |
11024 | main () | |
11025 | { | |
11026 | scm_init_guile (); | |
11027 | ; | |
11028 | return 0; | |
11029 | } | |
11030 | _ACEOF | |
11031 | if ac_fn_c_try_link "$LINENO"; then : | |
11032 | have_libguile=yes | |
11033 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11034 | GUILE_LIBS=$new_LIBS | |
11035 | else | |
11036 | found_usable_guile=no | |
11037 | fi | |
11038 | rm -f core conftest.err conftest.$ac_objext \ | |
11039 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
11040 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
11041 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
11042 | ||
11043 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11044 | ||
11045 | ||
11046 | fi | |
11047 | ||
ed3ef339 DE |
11048 | CPPFLAGS=$save_CPPFLAGS |
11049 | LIBS=$save_LIBS | |
11050 | if test "${found_usable_guile}" = no; then | |
11051 | if test "${flag_errors}" = yes; then | |
11052 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11053 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11054 | as_fn_error "linking guile version ${guile_version} test program failed | |
11055 | See \`config.log' for more details." "$LINENO" 5; } | |
11056 | fi | |
11057 | fi | |
11058 | fi | |
11059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11060 | $as_echo "${found_usable_guile}" >&6; } | |
11061 | ||
e1402065 DE |
11062 | else |
11063 | as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 | |
11064 | fi | |
ed3ef339 DE |
11065 | ;; |
11066 | "" | */*) | |
11067 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
11068 | as_fn_error "invalid value for --with-guile" "$LINENO" 5 | |
11069 | ;; | |
11070 | *) | |
11071 | # A space separate list of guile versions to try, in order. | |
e1402065 DE |
11072 | if test "${pkg_config_prog_path}" = "missing"; then |
11073 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
11074 | fi | |
ed3ef339 DE |
11075 | |
11076 | pkg_config=${pkg_config_prog_path} | |
11077 | guile_version_list=${with_guile} | |
11078 | flag_errors=yes | |
11079 | ||
ed3ef339 DE |
11080 | found_usable_guile=checking |
11081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11082 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11083 | for guile_version in ${guile_version_list}; do | |
11084 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11085 | if test $? != 0; then | |
11086 | continue | |
11087 | fi | |
11088 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11089 | if test $? != 0; then | |
11090 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
11091 | fi | |
11092 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11093 | if test $? != 0; then | |
11094 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
11095 | fi | |
11096 | found_usable_guile=${guile_version} | |
11097 | break | |
11098 | done | |
11099 | if test "${found_usable_guile}" = "checking"; then | |
11100 | if test "${flag_errors}" = "yes"; then | |
11101 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
11102 | else | |
11103 | found_usable_guile=no | |
11104 | fi | |
11105 | fi | |
11106 | if test "${found_usable_guile}" != no; then | |
11107 | save_CPPFLAGS=$CPPFLAGS | |
11108 | save_LIBS=$LIBS | |
11109 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11110 | LIBS="$LIBS $new_LIBS" | |
11111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11112 | /* end confdefs.h. */ | |
11113 | #include "libguile.h" | |
11114 | int | |
11115 | main () | |
11116 | { | |
11117 | scm_init_guile (); | |
11118 | ; | |
11119 | return 0; | |
11120 | } | |
11121 | _ACEOF | |
11122 | if ac_fn_c_try_link "$LINENO"; then : | |
11123 | have_libguile=yes | |
11124 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11125 | GUILE_LIBS=$new_LIBS | |
11126 | else | |
11127 | found_usable_guile=no | |
11128 | fi | |
11129 | rm -f core conftest.err conftest.$ac_objext \ | |
11130 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
11131 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
11132 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
11133 | ||
11134 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11135 | ||
11136 | ||
11137 | fi | |
11138 | ||
ed3ef339 DE |
11139 | CPPFLAGS=$save_CPPFLAGS |
11140 | LIBS=$save_LIBS | |
11141 | if test "${found_usable_guile}" = no; then | |
11142 | if test "${flag_errors}" = yes; then | |
11143 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11144 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11145 | as_fn_error "linking guile version ${guile_version} test program failed | |
11146 | See \`config.log' for more details." "$LINENO" 5; } | |
11147 | fi | |
11148 | fi | |
11149 | fi | |
11150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11151 | $as_echo "${found_usable_guile}" >&6; } | |
11152 | ||
11153 | ;; | |
11154 | esac | |
11155 | ||
e76c5d17 | 11156 | if test "${have_libguile}" != no; then |
d342a0da DE |
11157 | case "${with_guile}" in |
11158 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11159 | |
11160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11161 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
11162 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
11163 | $as_echo_n "(cached) " >&6 | |
11164 | else | |
d342a0da | 11165 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11166 | |
11167 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11168 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11169 | # what the program name is, at the risk of getting it wrong if | |
11170 | # Guile was configured with '--program-suffix' or similar. | |
11171 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11172 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11173 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11174 | fi | |
11175 | ||
11176 | fi | |
11177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11178 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11179 | ||
11180 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
11181 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
11182 | fi | |
11183 | ||
11184 | GUILD="$ac_cv_guild_program_name" | |
11185 | ||
11186 | ||
d342a0da DE |
11187 | ;; |
11188 | *) | |
11189 | ||
11190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11191 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
11192 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
11193 | $as_echo_n "(cached) " >&6 | |
11194 | else | |
11195 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11196 | ||
11197 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11198 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11199 | # what the program name is, at the risk of getting it wrong if | |
11200 | # Guile was configured with '--program-suffix' or similar. | |
11201 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11202 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11203 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11204 | fi | |
11205 | ||
11206 | fi | |
11207 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11208 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11209 | ||
11210 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
11211 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
11212 | fi | |
11213 | ||
11214 | GUILD="$ac_cv_guild_program_name" | |
11215 | ||
11216 | ||
11217 | ;; | |
11218 | esac | |
e76c5d17 DE |
11219 | |
11220 | ||
11221 | if test "$cross_compiling" = no; then | |
11222 | GUILD_TARGET_FLAG= | |
11223 | else | |
11224 | GUILD_TARGET_FLAG="--target=$host" | |
11225 | fi | |
11226 | ||
11227 | ||
11228 | ||
11229 | ||
11230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
11231 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
11232 | if test "${ac_cv_guild_ok+set}" = set; then : | |
11233 | $as_echo_n "(cached) " >&6 | |
11234 | else | |
11235 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
11236 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
11237 | ac_cv_guild_ok=yes | |
11238 | else | |
11239 | ac_cv_guild_ok=no | |
11240 | fi | |
11241 | fi | |
11242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
11243 | $as_echo "$ac_cv_guild_ok" >&6; } | |
11244 | ||
11245 | if test "$ac_cv_guild_ok" = no; then | |
11246 | have_libguile=no | |
11247 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
11248 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
11249 | fi | |
11250 | fi | |
11251 | ||
ed3ef339 DE |
11252 | if test "${have_libguile}" != no; then |
11253 | ||
11254 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
11255 | ||
11256 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
11257 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
11258 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
11259 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
11260 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
11261 | |
11262 | save_LIBS="$LIBS" | |
11263 | save_CPPFLAGS="$CPPFLAGS" | |
11264 | LIBS="$GUILE_LIBS" | |
11265 | CPPFLAGS="$GUILE_CPPFLAGS" | |
11266 | for ac_func in scm_new_smob | |
11267 | do : | |
11268 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
11269 | if test "x$ac_cv_func_scm_new_smob" = x""yes; then : | |
11270 | cat >>confdefs.h <<_ACEOF | |
11271 | #define HAVE_SCM_NEW_SMOB 1 | |
11272 | _ACEOF | |
11273 | ||
11274 | fi | |
11275 | done | |
11276 | ||
11277 | LIBS="$save_LIBS" | |
11278 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
11279 | else |
11280 | # Even if Guile support is not compiled in, we need to have these files | |
11281 | # included. | |
11282 | CONFIG_OBS="$CONFIG_OBS guile.o" | |
11283 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" | |
11284 | fi | |
9a156167 | 11285 | |
ac534cba | 11286 | |
4df42755 DE |
11287 | if test "${have_libguile}" != no; then |
11288 | HAVE_GUILE_TRUE= | |
11289 | HAVE_GUILE_FALSE='#' | |
11290 | else | |
11291 | HAVE_GUILE_TRUE='#' | |
11292 | HAVE_GUILE_FALSE= | |
11293 | fi | |
11294 | ||
ac534cba | 11295 | |
d344e670 DE |
11296 | # --------------------- # |
11297 | # Check for libmcheck. # | |
11298 | # --------------------- # | |
11299 | ||
a8db4212 YPK |
11300 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
11301 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
11302 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
11303 | # and for releases. | |
17ef446e PA |
11304 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
11305 | && $development; then | |
11306 | libmcheck_default=yes | |
11307 | else | |
11308 | libmcheck_default=no | |
a8db4212 YPK |
11309 | fi |
11310 | ||
17ef446e PA |
11311 | # Check whether --enable-libmcheck was given. |
11312 | if test "${enable_libmcheck+set}" = set; then : | |
11313 | enableval=$enable_libmcheck; case "${enableval}" in | |
11314 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
11315 | no | n) ENABLE_LIBMCHECK="no" ;; | |
11316 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
11317 | esac | |
11318 | fi | |
11319 | ||
11320 | ||
11321 | if test -z "${ENABLE_LIBMCHECK}"; then | |
11322 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 11323 | fi |
17ef446e PA |
11324 | |
11325 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
11326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
11327 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
11328 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
11329 | $as_echo_n "(cached) " >&6 | |
11330 | else | |
11331 | ac_check_lib_save_LIBS=$LIBS | |
11332 | LIBS="-lmcheck $LIBS" | |
11333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11334 | /* end confdefs.h. */ | |
11335 | ||
11336 | ||
11337 | int | |
11338 | main () | |
11339 | { | |
11340 | return main (); | |
11341 | ; | |
11342 | return 0; | |
11343 | } | |
11344 | _ACEOF | |
11345 | if ac_fn_c_try_link "$LINENO"; then : | |
11346 | ac_cv_lib_mcheck_main=yes | |
11347 | else | |
11348 | ac_cv_lib_mcheck_main=no | |
11349 | fi | |
11350 | rm -f core conftest.err conftest.$ac_objext \ | |
11351 | conftest$ac_exeext conftest.$ac_ext | |
11352 | LIBS=$ac_check_lib_save_LIBS | |
11353 | fi | |
11354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
11355 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
11356 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
11357 | cat >>confdefs.h <<_ACEOF | |
11358 | #define HAVE_LIBMCHECK 1 | |
11359 | _ACEOF | |
11360 | ||
11361 | LIBS="-lmcheck $LIBS" | |
11362 | ||
11363 | fi | |
11364 | ||
17ef446e PA |
11365 | fi |
11366 | ||
11367 | ||
11368 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
11369 | -a "${have_libpython}" != "no" \ | |
11370 | -a "${python_has_threads}" = "yes" ; then | |
11371 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
11372 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
11373 | fi |
11374 | ||
58bfce93 MM |
11375 | |
11376 | # Check whether --with-intel_pt was given. | |
11377 | if test "${with_intel_pt+set}" = set; then : | |
11378 | withval=$with_intel_pt; | |
11379 | else | |
11380 | with_intel_pt=auto | |
11381 | fi | |
11382 | ||
11383 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
11384 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
11385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
11386 | $as_echo "$with_intel_pt" >&6; } | |
11387 | ||
11388 | if test "${with_intel_pt}" = no; then | |
bc504a31 PA |
11389 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 |
11390 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
58bfce93 MM |
11391 | HAVE_LIBIPT=no |
11392 | else | |
5599c404 MM |
11393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11394 | /* end confdefs.h. */ | |
11395 | ||
11396 | #include <linux/perf_event.h> | |
11397 | #ifndef PERF_ATTR_SIZE_VER5 | |
11398 | # error | |
11399 | #endif | |
11400 | ||
11401 | _ACEOF | |
11402 | if ac_fn_c_try_cpp "$LINENO"; then : | |
11403 | perf_event=yes | |
11404 | else | |
11405 | perf_event=no | |
11406 | fi | |
11407 | rm -f conftest.err conftest.$ac_ext | |
11408 | if test "$perf_event" != yes; then | |
11409 | if test "$with_intel_pt" = yes; then | |
11410 | as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5 | |
11411 | else | |
11412 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
11413 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
11414 | fi | |
11415 | fi | |
11416 | ||
58bfce93 MM |
11417 | |
11418 | ||
11419 | ||
11420 | ||
11421 | ||
11422 | ||
11423 | ||
11424 | ||
11425 | use_additional=yes | |
11426 | ||
11427 | acl_save_prefix="$prefix" | |
11428 | prefix="$acl_final_prefix" | |
11429 | acl_save_exec_prefix="$exec_prefix" | |
11430 | exec_prefix="$acl_final_exec_prefix" | |
11431 | ||
11432 | eval additional_includedir=\"$includedir\" | |
11433 | eval additional_libdir=\"$libdir\" | |
11434 | ||
11435 | exec_prefix="$acl_save_exec_prefix" | |
11436 | prefix="$acl_save_prefix" | |
11437 | ||
11438 | ||
11439 | # Check whether --with-libipt-prefix was given. | |
11440 | if test "${with_libipt_prefix+set}" = set; then : | |
11441 | withval=$with_libipt_prefix; | |
11442 | if test "X$withval" = "Xno"; then | |
11443 | use_additional=no | |
11444 | else | |
11445 | if test "X$withval" = "X"; then | |
11446 | ||
11447 | acl_save_prefix="$prefix" | |
11448 | prefix="$acl_final_prefix" | |
11449 | acl_save_exec_prefix="$exec_prefix" | |
11450 | exec_prefix="$acl_final_exec_prefix" | |
11451 | ||
11452 | eval additional_includedir=\"$includedir\" | |
11453 | eval additional_libdir=\"$libdir\" | |
11454 | ||
11455 | exec_prefix="$acl_save_exec_prefix" | |
11456 | prefix="$acl_save_prefix" | |
11457 | ||
11458 | else | |
11459 | additional_includedir="$withval/include" | |
11460 | additional_libdir="$withval/lib" | |
11461 | fi | |
11462 | fi | |
11463 | ||
11464 | fi | |
11465 | ||
11466 | LIBIPT= | |
11467 | LTLIBIPT= | |
11468 | INCIPT= | |
11469 | rpathdirs= | |
11470 | ltrpathdirs= | |
11471 | names_already_handled= | |
11472 | names_next_round='ipt ' | |
11473 | while test -n "$names_next_round"; do | |
11474 | names_this_round="$names_next_round" | |
11475 | names_next_round= | |
11476 | for name in $names_this_round; do | |
11477 | already_handled= | |
11478 | for n in $names_already_handled; do | |
11479 | if test "$n" = "$name"; then | |
11480 | already_handled=yes | |
11481 | break | |
11482 | fi | |
11483 | done | |
11484 | if test -z "$already_handled"; then | |
11485 | names_already_handled="$names_already_handled $name" | |
11486 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
11487 | eval value=\"\$HAVE_LIB$uppername\" | |
11488 | if test -n "$value"; then | |
11489 | if test "$value" = yes; then | |
11490 | eval value=\"\$LIB$uppername\" | |
11491 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
11492 | eval value=\"\$LTLIB$uppername\" | |
11493 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
11494 | else | |
11495 | : | |
11496 | fi | |
11497 | else | |
11498 | found_dir= | |
11499 | found_la= | |
11500 | found_so= | |
11501 | found_a= | |
11502 | if test $use_additional = yes; then | |
11503 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
11504 | found_dir="$additional_libdir" | |
11505 | found_so="$additional_libdir/lib$name.$shlibext" | |
11506 | if test -f "$additional_libdir/lib$name.la"; then | |
11507 | found_la="$additional_libdir/lib$name.la" | |
11508 | fi | |
11509 | else | |
11510 | if test -f "$additional_libdir/lib$name.$libext"; then | |
11511 | found_dir="$additional_libdir" | |
11512 | found_a="$additional_libdir/lib$name.$libext" | |
11513 | if test -f "$additional_libdir/lib$name.la"; then | |
11514 | found_la="$additional_libdir/lib$name.la" | |
11515 | fi | |
11516 | fi | |
11517 | fi | |
11518 | fi | |
11519 | if test "X$found_dir" = "X"; then | |
11520 | for x in $LDFLAGS $LTLIBIPT; do | |
11521 | ||
11522 | acl_save_prefix="$prefix" | |
11523 | prefix="$acl_final_prefix" | |
11524 | acl_save_exec_prefix="$exec_prefix" | |
11525 | exec_prefix="$acl_final_exec_prefix" | |
11526 | eval x=\"$x\" | |
11527 | exec_prefix="$acl_save_exec_prefix" | |
11528 | prefix="$acl_save_prefix" | |
11529 | ||
11530 | case "$x" in | |
11531 | -L*) | |
11532 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
11533 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
11534 | found_dir="$dir" | |
11535 | found_so="$dir/lib$name.$shlibext" | |
11536 | if test -f "$dir/lib$name.la"; then | |
11537 | found_la="$dir/lib$name.la" | |
11538 | fi | |
11539 | else | |
11540 | if test -f "$dir/lib$name.$libext"; then | |
11541 | found_dir="$dir" | |
11542 | found_a="$dir/lib$name.$libext" | |
11543 | if test -f "$dir/lib$name.la"; then | |
11544 | found_la="$dir/lib$name.la" | |
11545 | fi | |
11546 | fi | |
11547 | fi | |
11548 | ;; | |
11549 | esac | |
11550 | if test "X$found_dir" != "X"; then | |
11551 | break | |
11552 | fi | |
11553 | done | |
11554 | fi | |
11555 | if test "X$found_dir" != "X"; then | |
11556 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
11557 | if test "X$found_so" != "X"; then | |
11558 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
11559 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11560 | else | |
11561 | haveit= | |
11562 | for x in $ltrpathdirs; do | |
11563 | if test "X$x" = "X$found_dir"; then | |
11564 | haveit=yes | |
11565 | break | |
11566 | fi | |
11567 | done | |
11568 | if test -z "$haveit"; then | |
11569 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11570 | fi | |
11571 | if test "$hardcode_direct" = yes; then | |
11572 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11573 | else | |
11574 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11575 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11576 | haveit= | |
11577 | for x in $rpathdirs; do | |
11578 | if test "X$x" = "X$found_dir"; then | |
11579 | haveit=yes | |
11580 | break | |
11581 | fi | |
11582 | done | |
11583 | if test -z "$haveit"; then | |
11584 | rpathdirs="$rpathdirs $found_dir" | |
11585 | fi | |
11586 | else | |
11587 | haveit= | |
11588 | for x in $LDFLAGS $LIBIPT; do | |
11589 | ||
11590 | acl_save_prefix="$prefix" | |
11591 | prefix="$acl_final_prefix" | |
11592 | acl_save_exec_prefix="$exec_prefix" | |
11593 | exec_prefix="$acl_final_exec_prefix" | |
11594 | eval x=\"$x\" | |
11595 | exec_prefix="$acl_save_exec_prefix" | |
11596 | prefix="$acl_save_prefix" | |
11597 | ||
11598 | if test "X$x" = "X-L$found_dir"; then | |
11599 | haveit=yes | |
11600 | break | |
11601 | fi | |
11602 | done | |
11603 | if test -z "$haveit"; then | |
11604 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
11605 | fi | |
11606 | if test "$hardcode_minus_L" != no; then | |
11607 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11608 | else | |
11609 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11610 | fi | |
11611 | fi | |
11612 | fi | |
11613 | fi | |
11614 | else | |
11615 | if test "X$found_a" != "X"; then | |
11616 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
11617 | else | |
11618 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
11619 | fi | |
11620 | fi | |
11621 | additional_includedir= | |
11622 | case "$found_dir" in | |
11623 | */lib | */lib/) | |
11624 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11625 | additional_includedir="$basedir/include" | |
11626 | ;; | |
11627 | esac | |
11628 | if test "X$additional_includedir" != "X"; then | |
11629 | if test "X$additional_includedir" != "X/usr/include"; then | |
11630 | haveit= | |
11631 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11632 | if test -n "$GCC"; then | |
11633 | case $host_os in | |
11634 | linux*) haveit=yes;; | |
11635 | esac | |
11636 | fi | |
11637 | fi | |
11638 | if test -z "$haveit"; then | |
11639 | for x in $CPPFLAGS $INCIPT; do | |
11640 | ||
11641 | acl_save_prefix="$prefix" | |
11642 | prefix="$acl_final_prefix" | |
11643 | acl_save_exec_prefix="$exec_prefix" | |
11644 | exec_prefix="$acl_final_exec_prefix" | |
11645 | eval x=\"$x\" | |
11646 | exec_prefix="$acl_save_exec_prefix" | |
11647 | prefix="$acl_save_prefix" | |
11648 | ||
11649 | if test "X$x" = "X-I$additional_includedir"; then | |
11650 | haveit=yes | |
11651 | break | |
11652 | fi | |
11653 | done | |
11654 | if test -z "$haveit"; then | |
11655 | if test -d "$additional_includedir"; then | |
11656 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
11657 | fi | |
11658 | fi | |
11659 | fi | |
11660 | fi | |
11661 | fi | |
11662 | if test -n "$found_la"; then | |
11663 | save_libdir="$libdir" | |
11664 | case "$found_la" in | |
11665 | */* | *\\*) . "$found_la" ;; | |
11666 | *) . "./$found_la" ;; | |
11667 | esac | |
11668 | libdir="$save_libdir" | |
11669 | for dep in $dependency_libs; do | |
11670 | case "$dep" in | |
11671 | -L*) | |
11672 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11673 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11674 | haveit= | |
11675 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11676 | if test -n "$GCC"; then | |
11677 | case $host_os in | |
11678 | linux*) haveit=yes;; | |
11679 | esac | |
11680 | fi | |
11681 | fi | |
11682 | if test -z "$haveit"; then | |
11683 | haveit= | |
11684 | for x in $LDFLAGS $LIBIPT; do | |
11685 | ||
11686 | acl_save_prefix="$prefix" | |
11687 | prefix="$acl_final_prefix" | |
11688 | acl_save_exec_prefix="$exec_prefix" | |
11689 | exec_prefix="$acl_final_exec_prefix" | |
11690 | eval x=\"$x\" | |
11691 | exec_prefix="$acl_save_exec_prefix" | |
11692 | prefix="$acl_save_prefix" | |
11693 | ||
11694 | if test "X$x" = "X-L$additional_libdir"; then | |
11695 | haveit=yes | |
11696 | break | |
11697 | fi | |
11698 | done | |
11699 | if test -z "$haveit"; then | |
11700 | if test -d "$additional_libdir"; then | |
11701 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
11702 | fi | |
11703 | fi | |
11704 | haveit= | |
11705 | for x in $LDFLAGS $LTLIBIPT; do | |
11706 | ||
11707 | acl_save_prefix="$prefix" | |
11708 | prefix="$acl_final_prefix" | |
11709 | acl_save_exec_prefix="$exec_prefix" | |
11710 | exec_prefix="$acl_final_exec_prefix" | |
11711 | eval x=\"$x\" | |
11712 | exec_prefix="$acl_save_exec_prefix" | |
11713 | prefix="$acl_save_prefix" | |
11714 | ||
11715 | if test "X$x" = "X-L$additional_libdir"; then | |
11716 | haveit=yes | |
11717 | break | |
11718 | fi | |
11719 | done | |
11720 | if test -z "$haveit"; then | |
11721 | if test -d "$additional_libdir"; then | |
11722 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
11723 | fi | |
11724 | fi | |
11725 | fi | |
11726 | fi | |
11727 | ;; | |
11728 | -R*) | |
11729 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
11730 | if test "$enable_rpath" != no; then | |
11731 | haveit= | |
11732 | for x in $rpathdirs; do | |
11733 | if test "X$x" = "X$dir"; then | |
11734 | haveit=yes | |
11735 | break | |
11736 | fi | |
11737 | done | |
11738 | if test -z "$haveit"; then | |
11739 | rpathdirs="$rpathdirs $dir" | |
11740 | fi | |
11741 | haveit= | |
11742 | for x in $ltrpathdirs; do | |
11743 | if test "X$x" = "X$dir"; then | |
11744 | haveit=yes | |
11745 | break | |
11746 | fi | |
11747 | done | |
11748 | if test -z "$haveit"; then | |
11749 | ltrpathdirs="$ltrpathdirs $dir" | |
11750 | fi | |
11751 | fi | |
11752 | ;; | |
11753 | -l*) | |
11754 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
11755 | ;; | |
11756 | *.la) | |
11757 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
11758 | ;; | |
11759 | *) | |
11760 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
11761 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
11762 | ;; | |
11763 | esac | |
11764 | done | |
11765 | fi | |
11766 | else | |
11767 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11768 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
11769 | fi | |
11770 | fi | |
11771 | fi | |
11772 | done | |
11773 | done | |
11774 | if test "X$rpathdirs" != "X"; then | |
11775 | if test -n "$hardcode_libdir_separator"; then | |
11776 | alldirs= | |
11777 | for found_dir in $rpathdirs; do | |
11778 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11779 | done | |
11780 | acl_save_libdir="$libdir" | |
11781 | libdir="$alldirs" | |
11782 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11783 | libdir="$acl_save_libdir" | |
11784 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11785 | else | |
11786 | for found_dir in $rpathdirs; do | |
11787 | acl_save_libdir="$libdir" | |
11788 | libdir="$found_dir" | |
11789 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11790 | libdir="$acl_save_libdir" | |
11791 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11792 | done | |
11793 | fi | |
11794 | fi | |
11795 | if test "X$ltrpathdirs" != "X"; then | |
11796 | for found_dir in $ltrpathdirs; do | |
11797 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
11798 | done | |
11799 | fi | |
11800 | ||
11801 | ||
11802 | ac_save_CPPFLAGS="$CPPFLAGS" | |
11803 | ||
11804 | for element in $INCIPT; do | |
11805 | haveit= | |
11806 | for x in $CPPFLAGS; do | |
11807 | ||
11808 | acl_save_prefix="$prefix" | |
11809 | prefix="$acl_final_prefix" | |
11810 | acl_save_exec_prefix="$exec_prefix" | |
11811 | exec_prefix="$acl_final_exec_prefix" | |
11812 | eval x=\"$x\" | |
11813 | exec_prefix="$acl_save_exec_prefix" | |
11814 | prefix="$acl_save_prefix" | |
11815 | ||
11816 | if test "X$x" = "X$element"; then | |
11817 | haveit=yes | |
11818 | break | |
11819 | fi | |
11820 | done | |
11821 | if test -z "$haveit"; then | |
11822 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11823 | fi | |
11824 | done | |
11825 | ||
11826 | ||
11827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
11828 | $as_echo_n "checking for libipt... " >&6; } | |
11829 | if test "${ac_cv_libipt+set}" = set; then : | |
11830 | $as_echo_n "(cached) " >&6 | |
11831 | else | |
11832 | ||
11833 | ac_save_LIBS="$LIBS" | |
11834 | LIBS="$LIBS $LIBIPT" | |
11835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11836 | /* end confdefs.h. */ | |
11837 | #include "intel-pt.h" | |
11838 | int | |
11839 | main () | |
11840 | { | |
11841 | pt_insn_alloc_decoder (0); | |
11842 | ; | |
11843 | return 0; | |
11844 | } | |
11845 | _ACEOF | |
11846 | if ac_fn_c_try_link "$LINENO"; then : | |
11847 | ac_cv_libipt=yes | |
11848 | else | |
11849 | ac_cv_libipt=no | |
11850 | fi | |
11851 | rm -f core conftest.err conftest.$ac_objext \ | |
11852 | conftest$ac_exeext conftest.$ac_ext | |
11853 | LIBS="$ac_save_LIBS" | |
11854 | ||
11855 | fi | |
11856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 | |
11857 | $as_echo "$ac_cv_libipt" >&6; } | |
11858 | if test "$ac_cv_libipt" = yes; then | |
11859 | HAVE_LIBIPT=yes | |
11860 | ||
11861 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h | |
11862 | ||
11863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
11864 | $as_echo_n "checking how to link with libipt... " >&6; } | |
11865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
11866 | $as_echo "$LIBIPT" >&6; } | |
11867 | else | |
11868 | HAVE_LIBIPT=no | |
11869 | CPPFLAGS="$ac_save_CPPFLAGS" | |
11870 | LIBIPT= | |
11871 | LTLIBIPT= | |
11872 | fi | |
11873 | ||
11874 | ||
11875 | ||
11876 | ||
11877 | ||
11878 | ||
11879 | if test "$HAVE_LIBIPT" != yes; then | |
11880 | if test "$with_intel_pt" = yes; then | |
11881 | as_fn_error "libipt is missing or unusable" "$LINENO" 5 | |
11882 | else | |
11883 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
11884 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
11885 | fi | |
c56ccc05 MM |
11886 | else |
11887 | save_LIBS=$LIBS | |
11888 | LIBS="$LIBS $LIBIPT" | |
11889 | for ac_func in pt_insn_event | |
11890 | do : | |
11891 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
11892 | if test "x$ac_cv_func_pt_insn_event" = x""yes; then : | |
11893 | cat >>confdefs.h <<_ACEOF | |
11894 | #define HAVE_PT_INSN_EVENT 1 | |
11895 | _ACEOF | |
11896 | ||
11897 | fi | |
11898 | done | |
11899 | ||
11900 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> | |
11901 | " | |
11902 | if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then : | |
11903 | ||
11904 | cat >>confdefs.h <<_ACEOF | |
11905 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
11906 | _ACEOF | |
11907 | ||
11908 | ||
11909 | fi | |
11910 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
11911 | " | |
11912 | if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then : | |
11913 | ||
11914 | cat >>confdefs.h <<_ACEOF | |
11915 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
11916 | _ACEOF | |
11917 | ||
11918 | ||
11919 | fi | |
11920 | ||
11921 | LIBS=$save_LIBS | |
58bfce93 MM |
11922 | fi |
11923 | fi | |
11924 | ||
81ecdfbb RW |
11925 | # ------------------------- # |
11926 | # Checks for header files. # | |
11927 | # ------------------------- # | |
c890192f | 11928 | |
81ecdfbb RW |
11929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
11930 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11931 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11932 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11933 | else |
81ecdfbb | 11934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11935 | /* end confdefs.h. */ |
81ecdfbb RW |
11936 | #include <stdlib.h> |
11937 | #include <stdarg.h> | |
11938 | #include <string.h> | |
11939 | #include <float.h> | |
11940 | ||
a9322a30 TT |
11941 | int |
11942 | main () | |
11943 | { | |
a9322a30 TT |
11944 | |
11945 | ; | |
11946 | return 0; | |
11947 | } | |
bec39cab | 11948 | _ACEOF |
81ecdfbb RW |
11949 | if ac_fn_c_try_compile "$LINENO"; then : |
11950 | ac_cv_header_stdc=yes | |
bec39cab | 11951 | else |
81ecdfbb | 11952 | ac_cv_header_stdc=no |
a9322a30 | 11953 | fi |
81ecdfbb | 11954 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11955 | |
81ecdfbb RW |
11956 | if test $ac_cv_header_stdc = yes; then |
11957 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11959 | /* end confdefs.h. */ | |
11960 | #include <string.h> | |
bec39cab | 11961 | |
81ecdfbb RW |
11962 | _ACEOF |
11963 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11964 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 11965 | |
bec39cab | 11966 | else |
81ecdfbb RW |
11967 | ac_cv_header_stdc=no |
11968 | fi | |
11969 | rm -f conftest* | |
11970 | ||
11971 | fi | |
11972 | ||
11973 | if test $ac_cv_header_stdc = yes; then | |
11974 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11976 | /* end confdefs.h. */ | |
11977 | #include <stdlib.h> | |
11978 | ||
bec39cab | 11979 | _ACEOF |
81ecdfbb RW |
11980 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11981 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 11982 | |
81ecdfbb RW |
11983 | else |
11984 | ac_cv_header_stdc=no | |
11985 | fi | |
11986 | rm -f conftest* | |
bec39cab | 11987 | |
bec39cab | 11988 | fi |
81ecdfbb RW |
11989 | |
11990 | if test $ac_cv_header_stdc = yes; then | |
11991 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11992 | if test "$cross_compiling" = yes; then : | |
11993 | : | |
bec39cab | 11994 | else |
81ecdfbb | 11995 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11996 | /* end confdefs.h. */ |
81ecdfbb RW |
11997 | #include <ctype.h> |
11998 | #include <stdlib.h> | |
11999 | #if ((' ' & 0x0FF) == 0x020) | |
12000 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12001 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12002 | #else | |
12003 | # define ISLOWER(c) \ | |
12004 | (('a' <= (c) && (c) <= 'i') \ | |
12005 | || ('j' <= (c) && (c) <= 'r') \ | |
12006 | || ('s' <= (c) && (c) <= 'z')) | |
12007 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12008 | #endif | |
12009 | ||
12010 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
12011 | int |
12012 | main () | |
12013 | { | |
81ecdfbb RW |
12014 | int i; |
12015 | for (i = 0; i < 256; i++) | |
12016 | if (XOR (islower (i), ISLOWER (i)) | |
12017 | || toupper (i) != TOUPPER (i)) | |
12018 | return 2; | |
a9322a30 TT |
12019 | return 0; |
12020 | } | |
bec39cab | 12021 | _ACEOF |
81ecdfbb RW |
12022 | if ac_fn_c_try_run "$LINENO"; then : |
12023 | ||
bec39cab | 12024 | else |
81ecdfbb RW |
12025 | ac_cv_header_stdc=no |
12026 | fi | |
12027 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12028 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12029 | fi | |
bec39cab | 12030 | |
bec39cab | 12031 | fi |
a9322a30 | 12032 | fi |
81ecdfbb RW |
12033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
12034 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12035 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 12036 | |
81ecdfbb | 12037 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 12038 | |
81ecdfbb | 12039 | fi |
bec39cab | 12040 | |
81ecdfbb | 12041 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 12042 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 12043 | thread_db.h \ |
0080a2f6 | 12044 | sys/fault.h \ |
81ecdfbb RW |
12045 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
12046 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
12047 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
726e1356 | 12048 | termios.h elf_hp.h \ |
9467110b | 12049 | dlfcn.h |
81ecdfbb RW |
12050 | do : |
12051 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12052 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12053 | eval as_val=\$$as_ac_Header | |
12054 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12055 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12056 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12057 | _ACEOF |
c906108c | 12058 | |
bec39cab | 12059 | fi |
81ecdfbb RW |
12060 | |
12061 | done | |
12062 | ||
81ecdfbb RW |
12063 | for ac_header in sys/proc.h |
12064 | do : | |
12065 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
12066 | # include <sys/param.h> | |
12067 | #endif | |
c906108c | 12068 | |
81ecdfbb RW |
12069 | " |
12070 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 12071 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12072 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 12073 | _ACEOF |
5ee754fc | 12074 | |
bec39cab | 12075 | fi |
81ecdfbb RW |
12076 | |
12077 | done | |
12078 | ||
12079 | for ac_header in sys/user.h | |
12080 | do : | |
12081 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
12082 | # include <sys/param.h> | |
a9322a30 TT |
12083 | #endif |
12084 | ||
81ecdfbb RW |
12085 | " |
12086 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
12087 | cat >>confdefs.h <<_ACEOF | |
12088 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 12089 | _ACEOF |
bec39cab | 12090 | |
a9322a30 | 12091 | fi |
bec39cab | 12092 | |
81ecdfbb | 12093 | done |
5ee754fc | 12094 | |
5ee754fc | 12095 | |
5007d765 | 12096 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
81ecdfbb RW |
12097 | do : |
12098 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12099 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12100 | eval as_val=\$$as_ac_Header | |
12101 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12102 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12103 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12104 | _ACEOF |
5ee754fc MK |
12105 | |
12106 | fi | |
12107 | ||
81ecdfbb | 12108 | done |
bec39cab | 12109 | |
81ecdfbb RW |
12110 | for ac_header in term.h |
12111 | do : | |
12112 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
12113 | # include <curses.h> | |
12114 | #endif | |
bec39cab | 12115 | |
81ecdfbb RW |
12116 | " |
12117 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
12118 | cat >>confdefs.h <<_ACEOF | |
12119 | #define HAVE_TERM_H 1 | |
a8111142 | 12120 | _ACEOF |
a8111142 | 12121 | |
a8111142 | 12122 | fi |
a8111142 | 12123 | |
81ecdfbb | 12124 | done |
a8111142 TT |
12125 | |
12126 | ||
81ecdfbb RW |
12127 | # ------------------------- # |
12128 | # Checks for declarations. # | |
12129 | # ------------------------- # | |
a9322a30 | 12130 | |
07697489 PA |
12131 | |
12132 | # Check for presence and size of long long. | |
12133 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
12134 | if test "x$ac_cv_type_long_long" = x""yes; then : | |
12135 | ||
12136 | cat >>confdefs.h <<_ACEOF | |
12137 | #define HAVE_LONG_LONG 1 | |
12138 | _ACEOF | |
12139 | ||
12140 | # The cast to long int works around a bug in the HP C Compiler | |
12141 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12142 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12143 | # This bug is HP SR number 8606223364. | |
12144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12145 | $as_echo_n "checking size of long long... " >&6; } | |
12146 | if test "${ac_cv_sizeof_long_long+set}" = set; then : | |
12147 | $as_echo_n "(cached) " >&6 | |
12148 | else | |
12149 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
12150 | ||
12151 | else | |
12152 | if test "$ac_cv_type_long_long" = yes; then | |
12153 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12154 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12155 | { as_fn_set_status 77 | |
12156 | as_fn_error "cannot compute sizeof (long long) | |
12157 | See \`config.log' for more details." "$LINENO" 5; }; } | |
12158 | else | |
12159 | ac_cv_sizeof_long_long=0 | |
12160 | fi | |
12161 | fi | |
12162 | ||
12163 | fi | |
12164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
12165 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
12166 | ||
12167 | ||
12168 | ||
12169 | cat >>confdefs.h <<_ACEOF | |
12170 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12171 | _ACEOF | |
12172 | ||
12173 | ||
12174 | fi | |
12175 | ||
12176 | ||
12177 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" | |
12178 | if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : | |
12179 | ac_have_decl=1 | |
12180 | else | |
12181 | ac_have_decl=0 | |
12182 | fi | |
12183 | ||
12184 | cat >>confdefs.h <<_ACEOF | |
12185 | #define HAVE_DECL_BASENAME $ac_have_decl | |
12186 | _ACEOF | |
12187 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
12188 | if test "x$ac_cv_have_decl_ffs" = x""yes; then : | |
12189 | ac_have_decl=1 | |
12190 | else | |
12191 | ac_have_decl=0 | |
12192 | fi | |
12193 | ||
12194 | cat >>confdefs.h <<_ACEOF | |
12195 | #define HAVE_DECL_FFS $ac_have_decl | |
12196 | _ACEOF | |
12197 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
12198 | if test "x$ac_cv_have_decl_asprintf" = x""yes; then : | |
12199 | ac_have_decl=1 | |
12200 | else | |
12201 | ac_have_decl=0 | |
12202 | fi | |
12203 | ||
12204 | cat >>confdefs.h <<_ACEOF | |
12205 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
12206 | _ACEOF | |
12207 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
12208 | if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : | |
12209 | ac_have_decl=1 | |
12210 | else | |
12211 | ac_have_decl=0 | |
12212 | fi | |
12213 | ||
12214 | cat >>confdefs.h <<_ACEOF | |
12215 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
12216 | _ACEOF | |
12217 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
12218 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
12219 | ac_have_decl=1 | |
12220 | else | |
12221 | ac_have_decl=0 | |
12222 | fi | |
12223 | ||
12224 | cat >>confdefs.h <<_ACEOF | |
12225 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12226 | _ACEOF | |
12227 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
12228 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
12229 | ac_have_decl=1 | |
12230 | else | |
12231 | ac_have_decl=0 | |
12232 | fi | |
12233 | ||
12234 | cat >>confdefs.h <<_ACEOF | |
12235 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12236 | _ACEOF | |
12237 | ||
12238 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
12239 | if test "x$ac_cv_have_decl_strtol" = x""yes; then : | |
12240 | ac_have_decl=1 | |
12241 | else | |
12242 | ac_have_decl=0 | |
12243 | fi | |
12244 | ||
12245 | cat >>confdefs.h <<_ACEOF | |
12246 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12247 | _ACEOF | |
12248 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
12249 | if test "x$ac_cv_have_decl_strtoul" = x""yes; then : | |
12250 | ac_have_decl=1 | |
12251 | else | |
12252 | ac_have_decl=0 | |
12253 | fi | |
12254 | ||
12255 | cat >>confdefs.h <<_ACEOF | |
12256 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
12257 | _ACEOF | |
12258 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
12259 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
12260 | ac_have_decl=1 | |
12261 | else | |
12262 | ac_have_decl=0 | |
12263 | fi | |
12264 | ||
12265 | cat >>confdefs.h <<_ACEOF | |
12266 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12267 | _ACEOF | |
12268 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
12269 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
12270 | ac_have_decl=1 | |
12271 | else | |
12272 | ac_have_decl=0 | |
12273 | fi | |
12274 | ||
12275 | cat >>confdefs.h <<_ACEOF | |
12276 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
12277 | _ACEOF | |
12278 | ||
12279 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
12280 | if test "x$ac_cv_have_decl_strverscmp" = x""yes; then : | |
12281 | ac_have_decl=1 | |
12282 | else | |
12283 | ac_have_decl=0 | |
12284 | fi | |
12285 | ||
12286 | cat >>confdefs.h <<_ACEOF | |
12287 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12288 | _ACEOF | |
12289 | ||
12290 | ||
12291 | ||
81ecdfbb RW |
12292 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
12293 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
12294 | ac_have_decl=1 | |
bec39cab | 12295 | else |
81ecdfbb RW |
12296 | ac_have_decl=0 |
12297 | fi | |
12298 | ||
12299 | cat >>confdefs.h <<_ACEOF | |
12300 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 12301 | _ACEOF |
81ecdfbb RW |
12302 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
12303 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
12304 | ac_have_decl=1 | |
12305 | else | |
12306 | ac_have_decl=0 | |
12307 | fi | |
12308 | ||
12309 | cat >>confdefs.h <<_ACEOF | |
12310 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 12311 | _ACEOF |
81ecdfbb RW |
12312 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
12313 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
12314 | ac_have_decl=1 | |
bec39cab | 12315 | else |
81ecdfbb RW |
12316 | ac_have_decl=0 |
12317 | fi | |
bec39cab | 12318 | |
81ecdfbb RW |
12319 | cat >>confdefs.h <<_ACEOF |
12320 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 12321 | _ACEOF |
81ecdfbb RW |
12322 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
12323 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
12324 | ac_have_decl=1 | |
12325 | else | |
12326 | ac_have_decl=0 | |
5ee754fc | 12327 | fi |
81ecdfbb RW |
12328 | |
12329 | cat >>confdefs.h <<_ACEOF | |
12330 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 12331 | _ACEOF |
5ee754fc | 12332 | |
5ee754fc | 12333 | |
81ecdfbb RW |
12334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
12335 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
12336 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
12337 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12338 | else |
81ecdfbb | 12339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12340 | /* end confdefs.h. */ |
81ecdfbb | 12341 | #include <locale.h> |
a9322a30 TT |
12342 | int |
12343 | main () | |
12344 | { | |
81ecdfbb | 12345 | return LC_MESSAGES |
a9322a30 TT |
12346 | ; |
12347 | return 0; | |
12348 | } | |
bec39cab | 12349 | _ACEOF |
81ecdfbb RW |
12350 | if ac_fn_c_try_link "$LINENO"; then : |
12351 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12352 | else |
81ecdfbb RW |
12353 | am_cv_val_LC_MESSAGES=no |
12354 | fi | |
12355 | rm -f core conftest.err conftest.$ac_objext \ | |
12356 | conftest$ac_exeext conftest.$ac_ext | |
12357 | fi | |
12358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
12359 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12360 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12361 | |
81ecdfbb RW |
12362 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
12363 | ||
12364 | fi | |
12365 | ||
12366 | ||
12367 | # ----------------------- # | |
12368 | # Checks for structures. # | |
12369 | # ----------------------- # | |
12370 | ||
12371 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
12372 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
12373 | ||
12374 | cat >>confdefs.h <<_ACEOF | |
12375 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 12376 | _ACEOF |
7eb368b3 | 12377 | |
81ecdfbb | 12378 | |
7eb368b3 | 12379 | fi |
81ecdfbb RW |
12380 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
12381 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 12382 | |
a9322a30 TT |
12383 | cat >>confdefs.h <<_ACEOF |
12384 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
12385 | _ACEOF |
12386 | ||
a9322a30 | 12387 | |
7eb368b3 NR |
12388 | fi |
12389 | ||
7eb368b3 | 12390 | |
a9322a30 TT |
12391 | # ------------------ # |
12392 | # Checks for types. # | |
12393 | # ------------------ # | |
7eb368b3 | 12394 | |
81ecdfbb | 12395 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
12396 | #include <sys/socket.h> |
12397 | ||
81ecdfbb RW |
12398 | " |
12399 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 12400 | |
a9322a30 TT |
12401 | cat >>confdefs.h <<_ACEOF |
12402 | #define HAVE_SOCKLEN_T 1 | |
12403 | _ACEOF | |
12404 | ||
12405 | ||
12406 | fi | |
12407 | ||
12408 | ||
12409 | # ------------------------------------- # | |
12410 | # Checks for compiler characteristics. # | |
12411 | # ------------------------------------- # | |
12412 | ||
81ecdfbb RW |
12413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12414 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12415 | if test "${ac_cv_c_const+set}" = set; then : | |
12416 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12417 | else |
81ecdfbb | 12418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12419 | /* end confdefs.h. */ |
a9322a30 TT |
12420 | |
12421 | int | |
12422 | main () | |
12423 | { | |
12424 | /* FIXME: Include the comments suggested by Paul. */ | |
12425 | #ifndef __cplusplus | |
12426 | /* Ultrix mips cc rejects this. */ | |
12427 | typedef int charset[2]; | |
81ecdfbb | 12428 | const charset cs; |
a9322a30 | 12429 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
12430 | char const *const *pcpcc; |
12431 | char **ppc; | |
a9322a30 TT |
12432 | /* NEC SVR4.0.2 mips cc rejects this. */ |
12433 | struct point {int x, y;}; | |
12434 | static struct point const zero = {0,0}; | |
12435 | /* AIX XL C 1.02.0.0 rejects this. | |
12436 | It does not let you subtract one const X* pointer from another in | |
12437 | an arm of an if-expression whose if-part is not a constant | |
12438 | expression */ | |
12439 | const char *g = "string"; | |
81ecdfbb | 12440 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 12441 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
12442 | ++pcpcc; |
12443 | ppc = (char**) pcpcc; | |
12444 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
12445 | { /* SCO 3.2v4 cc rejects this. */ |
12446 | char *t; | |
12447 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
12448 | ||
12449 | *t++ = 0; | |
81ecdfbb | 12450 | if (s) return 0; |
a9322a30 TT |
12451 | } |
12452 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12453 | int x[] = {25, 17}; | |
12454 | const int *foo = &x[0]; | |
12455 | ++foo; | |
12456 | } | |
12457 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12458 | typedef const int *iptr; | |
12459 | iptr p = 0; | |
12460 | ++p; | |
12461 | } | |
12462 | { /* AIX XL C 1.02.0.0 rejects this saying | |
12463 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12464 | struct s { int j; const int *ap[3]; }; | |
12465 | struct s *b; b->j = 5; | |
12466 | } | |
12467 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12468 | const int foo = 10; | |
81ecdfbb | 12469 | if (!foo) return 0; |
a9322a30 | 12470 | } |
81ecdfbb | 12471 | return !cs[0] && !zero.x; |
a9322a30 TT |
12472 | #endif |
12473 | ||
12474 | ; | |
12475 | return 0; | |
12476 | } | |
bec39cab | 12477 | _ACEOF |
81ecdfbb | 12478 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12479 | ac_cv_c_const=yes |
5ee754fc | 12480 | else |
81ecdfbb | 12481 | ac_cv_c_const=no |
5ee754fc | 12482 | fi |
81ecdfbb | 12483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 12484 | fi |
81ecdfbb RW |
12485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12486 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 12487 | if test $ac_cv_c_const = no; then |
bec39cab | 12488 | |
81ecdfbb | 12489 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12490 | |
5ee754fc | 12491 | fi |
bec39cab | 12492 | |
81ecdfbb RW |
12493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
12494 | $as_echo_n "checking for inline... " >&6; } | |
12495 | if test "${ac_cv_c_inline+set}" = set; then : | |
12496 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12497 | else |
a9322a30 TT |
12498 | ac_cv_c_inline=no |
12499 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 12500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12501 | /* end confdefs.h. */ |
a9322a30 TT |
12502 | #ifndef __cplusplus |
12503 | typedef int foo_t; | |
12504 | static $ac_kw foo_t static_foo () {return 0; } | |
12505 | $ac_kw foo_t foo () {return 0; } | |
12506 | #endif | |
12507 | ||
bec39cab | 12508 | _ACEOF |
81ecdfbb RW |
12509 | if ac_fn_c_try_compile "$LINENO"; then : |
12510 | ac_cv_c_inline=$ac_kw | |
bec39cab | 12511 | fi |
81ecdfbb RW |
12512 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12513 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 12514 | done |
bec39cab | 12515 | |
5ee754fc | 12516 | fi |
81ecdfbb RW |
12517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
12518 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 12519 | |
a9322a30 TT |
12520 | case $ac_cv_c_inline in |
12521 | inline | yes) ;; | |
12522 | *) | |
12523 | case $ac_cv_c_inline in | |
12524 | no) ac_val=;; | |
12525 | *) ac_val=$ac_cv_c_inline;; | |
12526 | esac | |
12527 | cat >>confdefs.h <<_ACEOF | |
12528 | #ifndef __cplusplus | |
12529 | #define inline $ac_val | |
12530 | #endif | |
12531 | _ACEOF | |
bec39cab AC |
12532 | ;; |
12533 | esac | |
bec39cab | 12534 | |
81ecdfbb RW |
12535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12536 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12537 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
12538 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12539 | else |
81ecdfbb RW |
12540 | ac_cv_c_bigendian=unknown |
12541 | # See if we're dealing with a universal compiler. | |
12542 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12543 | /* end confdefs.h. */ | |
12544 | #ifndef __APPLE_CC__ | |
12545 | not a universal capable compiler | |
12546 | #endif | |
12547 | typedef int dummy; | |
12548 | ||
12549 | _ACEOF | |
12550 | if ac_fn_c_try_compile "$LINENO"; then : | |
12551 | ||
12552 | # Check for potential -arch flags. It is not universal unless | |
12553 | # there are at least two -arch flags with different values. | |
12554 | ac_arch= | |
12555 | ac_prev= | |
12556 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12557 | if test -n "$ac_prev"; then | |
12558 | case $ac_word in | |
12559 | i?86 | x86_64 | ppc | ppc64) | |
12560 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12561 | ac_arch=$ac_word | |
12562 | else | |
12563 | ac_cv_c_bigendian=universal | |
12564 | break | |
12565 | fi | |
12566 | ;; | |
12567 | esac | |
12568 | ac_prev= | |
12569 | elif test "x$ac_word" = "x-arch"; then | |
12570 | ac_prev=arch | |
12571 | fi | |
12572 | done | |
12573 | fi | |
12574 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12575 | if test $ac_cv_c_bigendian = unknown; then | |
12576 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12577 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12578 | /* end confdefs.h. */ |
a9322a30 | 12579 | #include <sys/types.h> |
81ecdfbb | 12580 | #include <sys/param.h> |
a9322a30 TT |
12581 | |
12582 | int | |
12583 | main () | |
12584 | { | |
81ecdfbb RW |
12585 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
12586 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12587 | && LITTLE_ENDIAN) | |
12588 | bogus endian macros | |
12589 | #endif | |
a9322a30 TT |
12590 | |
12591 | ; | |
12592 | return 0; | |
12593 | } | |
bec39cab | 12594 | _ACEOF |
81ecdfbb | 12595 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12596 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 12597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12598 | /* end confdefs.h. */ |
a9322a30 | 12599 | #include <sys/types.h> |
81ecdfbb | 12600 | #include <sys/param.h> |
a9322a30 TT |
12601 | |
12602 | int | |
12603 | main () | |
12604 | { | |
12605 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
12606 | not big endian |
12607 | #endif | |
a9322a30 TT |
12608 | |
12609 | ; | |
12610 | return 0; | |
12611 | } | |
bec39cab | 12612 | _ACEOF |
81ecdfbb | 12613 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12614 | ac_cv_c_bigendian=yes |
5ee754fc | 12615 | else |
81ecdfbb | 12616 | ac_cv_c_bigendian=no |
5ee754fc | 12617 | fi |
81ecdfbb RW |
12618 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12619 | fi | |
12620 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12621 | fi | |
12622 | if test $ac_cv_c_bigendian = unknown; then | |
12623 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12625 | /* end confdefs.h. */ | |
12626 | #include <limits.h> | |
bec39cab | 12627 | |
81ecdfbb RW |
12628 | int |
12629 | main () | |
12630 | { | |
12631 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12632 | bogus endian macros | |
12633 | #endif | |
12634 | ||
12635 | ; | |
12636 | return 0; | |
12637 | } | |
7eb368b3 | 12638 | _ACEOF |
81ecdfbb RW |
12639 | if ac_fn_c_try_compile "$LINENO"; then : |
12640 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 12642 | /* end confdefs.h. */ |
81ecdfbb RW |
12643 | #include <limits.h> |
12644 | ||
7eb368b3 NR |
12645 | int |
12646 | main () | |
12647 | { | |
81ecdfbb RW |
12648 | #ifndef _BIG_ENDIAN |
12649 | not big endian | |
12650 | #endif | |
12651 | ||
7eb368b3 NR |
12652 | ; |
12653 | return 0; | |
12654 | } | |
12655 | _ACEOF | |
81ecdfbb | 12656 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12657 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
12658 | else |
12659 | ac_cv_c_bigendian=no | |
a9322a30 | 12660 | fi |
81ecdfbb | 12661 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 12662 | fi |
81ecdfbb RW |
12663 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12664 | fi | |
12665 | if test $ac_cv_c_bigendian = unknown; then | |
12666 | # Compile a test program. | |
12667 | if test "$cross_compiling" = yes; then : | |
12668 | # Try to guess by grepping values from an object file. | |
12669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12670 | /* end confdefs.h. */ | |
12671 | short int ascii_mm[] = | |
12672 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12673 | short int ascii_ii[] = | |
12674 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12675 | int use_ascii (int i) { | |
12676 | return ascii_mm[i] + ascii_ii[i]; | |
12677 | } | |
12678 | short int ebcdic_ii[] = | |
12679 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12680 | short int ebcdic_mm[] = | |
12681 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12682 | int use_ebcdic (int i) { | |
12683 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12684 | } | |
12685 | extern int foo; | |
7eb368b3 | 12686 | |
81ecdfbb RW |
12687 | int |
12688 | main () | |
12689 | { | |
12690 | return use_ascii (foo) == use_ebcdic (foo); | |
12691 | ; | |
12692 | return 0; | |
12693 | } | |
12694 | _ACEOF | |
12695 | if ac_fn_c_try_compile "$LINENO"; then : | |
12696 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12697 | ac_cv_c_bigendian=yes | |
12698 | fi | |
12699 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12700 | if test "$ac_cv_c_bigendian" = unknown; then | |
12701 | ac_cv_c_bigendian=no | |
12702 | else | |
12703 | # finding both strings is unlikely to happen, but who knows? | |
12704 | ac_cv_c_bigendian=unknown | |
12705 | fi | |
12706 | fi | |
7eb368b3 | 12707 | fi |
81ecdfbb | 12708 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12709 | else |
81ecdfbb | 12710 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12711 | /* end confdefs.h. */ |
81ecdfbb | 12712 | $ac_includes_default |
d3ea6809 MM |
12713 | int |
12714 | main () | |
12715 | { | |
81ecdfbb RW |
12716 | |
12717 | /* Are we little or big endian? From Harbison&Steele. */ | |
12718 | union | |
12719 | { | |
12720 | long int l; | |
12721 | char c[sizeof (long int)]; | |
12722 | } u; | |
12723 | u.l = 1; | |
12724 | return u.c[sizeof (long int) - 1] == 1; | |
12725 | ||
12726 | ; | |
12727 | return 0; | |
d3ea6809 MM |
12728 | } |
12729 | _ACEOF | |
81ecdfbb | 12730 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12731 | ac_cv_c_bigendian=no |
d3ea6809 | 12732 | else |
81ecdfbb | 12733 | ac_cv_c_bigendian=yes |
d3ea6809 | 12734 | fi |
81ecdfbb RW |
12735 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12736 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12737 | fi |
a9322a30 | 12738 | |
81ecdfbb RW |
12739 | fi |
12740 | fi | |
12741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
12742 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12743 | case $ac_cv_c_bigendian in #( | |
12744 | yes) | |
12745 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12746 | ;; #( | |
12747 | no) | |
12748 | ;; #( | |
12749 | universal) | |
12750 | ||
12751 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
12752 | ||
12753 | ;; #( | |
12754 | *) | |
12755 | as_fn_error "unknown endianness | |
12756 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12757 | esac | |
d3ea6809 MM |
12758 | |
12759 | ||
a9322a30 TT |
12760 | # ------------------------------ # |
12761 | # Checks for library functions. # | |
12762 | # ------------------------------ # | |
d3ea6809 | 12763 | |
a9322a30 | 12764 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
12765 | do : |
12766 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12767 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12768 | eval as_val=\$$as_ac_Header | |
12769 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12770 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12771 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12772 | _ACEOF |
b757528f | 12773 | |
b757528f | 12774 | fi |
bec39cab | 12775 | |
a9322a30 | 12776 | done |
a3828db0 | 12777 | |
a9322a30 | 12778 | for ac_func in getpagesize |
81ecdfbb RW |
12779 | do : |
12780 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
12781 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 12782 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12783 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12784 | _ACEOF |
bcb3dc3d | 12785 | |
bcb3dc3d MK |
12786 | fi |
12787 | done | |
12788 | ||
81ecdfbb RW |
12789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12790 | $as_echo_n "checking for working mmap... " >&6; } | |
12791 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
12792 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12793 | else |
81ecdfbb | 12794 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12795 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12796 | else |
81ecdfbb | 12797 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12798 | /* end confdefs.h. */ |
a9322a30 TT |
12799 | $ac_includes_default |
12800 | /* malloc might have been renamed as rpl_malloc. */ | |
12801 | #undef malloc | |
bec39cab | 12802 | |
a9322a30 TT |
12803 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12804 | Here is a matrix of mmap possibilities: | |
12805 | mmap private not fixed | |
12806 | mmap private fixed at somewhere currently unmapped | |
12807 | mmap private fixed at somewhere already mapped | |
12808 | mmap shared not fixed | |
12809 | mmap shared fixed at somewhere currently unmapped | |
12810 | mmap shared fixed at somewhere already mapped | |
12811 | For private mappings, we should verify that changes cannot be read() | |
12812 | back from the file, nor mmap's back from the file at a different | |
12813 | address. (There have been systems where private was not correctly | |
12814 | implemented like the infamous i386 svr4.0, and systems where the | |
12815 | VM page cache was not coherent with the file system buffer cache | |
12816 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12817 | For shared mappings, we should conversely verify that changes get | |
12818 | propagated back to all the places they're supposed to be. | |
bec39cab | 12819 | |
a9322a30 TT |
12820 | Grep wants private fixed already mapped. |
12821 | The main things grep needs to know about mmap are: | |
12822 | * does it exist and is it safe to write into the mmap'd area | |
12823 | * how to use it (BSD variants) */ | |
8b9cf735 | 12824 | |
a9322a30 TT |
12825 | #include <fcntl.h> |
12826 | #include <sys/mman.h> | |
8b9cf735 | 12827 | |
81ecdfbb | 12828 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12829 | char *malloc (); |
a3828db0 MK |
12830 | #endif |
12831 | ||
a9322a30 | 12832 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12833 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 12834 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 12835 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
12836 | # define HAVE_SYS_PARAM_H 1 |
12837 | # endif | |
12838 | ||
12839 | # ifdef _SC_PAGESIZE | |
12840 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12841 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12842 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12843 | # include <sys/param.h> |
12844 | # ifdef EXEC_PAGESIZE | |
12845 | # define getpagesize() EXEC_PAGESIZE | |
12846 | # else /* no EXEC_PAGESIZE */ | |
12847 | # ifdef NBPG | |
12848 | # define getpagesize() NBPG * CLSIZE | |
12849 | # ifndef CLSIZE | |
12850 | # define CLSIZE 1 | |
12851 | # endif /* no CLSIZE */ | |
12852 | # else /* no NBPG */ | |
12853 | # ifdef NBPC | |
12854 | # define getpagesize() NBPC | |
12855 | # else /* no NBPC */ | |
12856 | # ifdef PAGESIZE | |
12857 | # define getpagesize() PAGESIZE | |
12858 | # endif /* PAGESIZE */ | |
12859 | # endif /* no NBPC */ | |
12860 | # endif /* no NBPG */ | |
12861 | # endif /* no EXEC_PAGESIZE */ | |
12862 | # else /* no HAVE_SYS_PARAM_H */ | |
12863 | # define getpagesize() 8192 /* punt totally */ | |
12864 | # endif /* no HAVE_SYS_PARAM_H */ | |
12865 | # endif /* no _SC_PAGESIZE */ | |
12866 | ||
12867 | #endif /* no HAVE_GETPAGESIZE */ | |
12868 | ||
bec39cab AC |
12869 | int |
12870 | main () | |
12871 | { | |
a9322a30 TT |
12872 | char *data, *data2, *data3; |
12873 | int i, pagesize; | |
12874 | int fd; | |
12875 | ||
12876 | pagesize = getpagesize (); | |
12877 | ||
12878 | /* First, make a file with some known garbage in it. */ | |
12879 | data = (char *) malloc (pagesize); | |
12880 | if (!data) | |
81ecdfbb | 12881 | return 1; |
a9322a30 TT |
12882 | for (i = 0; i < pagesize; ++i) |
12883 | *(data + i) = rand (); | |
12884 | umask (0); | |
12885 | fd = creat ("conftest.mmap", 0600); | |
12886 | if (fd < 0) | |
81ecdfbb | 12887 | return 1; |
a9322a30 | 12888 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 12889 | return 1; |
a9322a30 TT |
12890 | close (fd); |
12891 | ||
12892 | /* Next, try to mmap the file at a fixed address which already has | |
12893 | something else allocated at it. If we can, also make sure that | |
12894 | we see the same garbage. */ | |
12895 | fd = open ("conftest.mmap", O_RDWR); | |
12896 | if (fd < 0) | |
81ecdfbb | 12897 | return 1; |
a9322a30 TT |
12898 | data2 = (char *) malloc (2 * pagesize); |
12899 | if (!data2) | |
81ecdfbb RW |
12900 | return 1; |
12901 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
12902 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12903 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 12904 | return 1; |
a9322a30 TT |
12905 | for (i = 0; i < pagesize; ++i) |
12906 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 12907 | return 1; |
a9322a30 TT |
12908 | |
12909 | /* Finally, make sure that changes to the mapped area do not | |
12910 | percolate back to the file as seen by read(). (This is a bug on | |
12911 | some variants of i386 svr4.0.) */ | |
12912 | for (i = 0; i < pagesize; ++i) | |
12913 | *(data2 + i) = *(data2 + i) + 1; | |
12914 | data3 = (char *) malloc (pagesize); | |
12915 | if (!data3) | |
81ecdfbb | 12916 | return 1; |
a9322a30 | 12917 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 12918 | return 1; |
a9322a30 TT |
12919 | for (i = 0; i < pagesize; ++i) |
12920 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 12921 | return 1; |
a9322a30 | 12922 | close (fd); |
81ecdfbb | 12923 | return 0; |
bec39cab AC |
12924 | } |
12925 | _ACEOF | |
81ecdfbb | 12926 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12927 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12928 | else |
81ecdfbb | 12929 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12930 | fi |
81ecdfbb RW |
12931 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12932 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12933 | fi |
81ecdfbb | 12934 | |
a9322a30 | 12935 | fi |
81ecdfbb RW |
12936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12937 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12938 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12939 | ||
81ecdfbb | 12940 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12941 | |
086ec9eb | 12942 | fi |
a9322a30 | 12943 | rm -f conftest.mmap |
a3828db0 | 12944 | |
81ecdfbb RW |
12945 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
12946 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 12947 | |
a9322a30 TT |
12948 | else |
12949 | ||
12950 | cat >>confdefs.h <<_ACEOF | |
12951 | #define pid_t int | |
bec39cab | 12952 | _ACEOF |
086ec9eb MK |
12953 | |
12954 | fi | |
12955 | ||
81ecdfbb RW |
12956 | for ac_header in vfork.h |
12957 | do : | |
12958 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
12959 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 12960 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12961 | #define HAVE_VFORK_H 1 |
bec39cab | 12962 | _ACEOF |
c906108c SS |
12963 | |
12964 | fi | |
a9322a30 | 12965 | |
a3828db0 | 12966 | done |
c906108c | 12967 | |
a9322a30 | 12968 | for ac_func in fork vfork |
81ecdfbb RW |
12969 | do : |
12970 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12971 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12972 | eval as_val=\$$as_ac_var | |
12973 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 12974 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12975 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 12976 | _ACEOF |
b83266a0 | 12977 | |
97bf5e38 | 12978 | fi |
a3828db0 | 12979 | done |
b83266a0 | 12980 | |
a9322a30 | 12981 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
12982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
12983 | $as_echo_n "checking for working fork... " >&6; } | |
12984 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
12985 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12986 | else |
81ecdfbb | 12987 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12988 | ac_cv_func_fork_works=cross |
12989 | else | |
81ecdfbb RW |
12990 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12991 | /* end confdefs.h. */ | |
12992 | $ac_includes_default | |
12993 | int | |
12994 | main () | |
12995 | { | |
12996 | ||
12997 | /* By Ruediger Kuhlmann. */ | |
12998 | return fork () < 0; | |
12999 | ||
13000 | ; | |
13001 | return 0; | |
13002 | } | |
a9322a30 | 13003 | _ACEOF |
81ecdfbb | 13004 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13005 | ac_cv_func_fork_works=yes |
13006 | else | |
81ecdfbb | 13007 | ac_cv_func_fork_works=no |
a9322a30 | 13008 | fi |
81ecdfbb RW |
13009 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13010 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13011 | fi |
81ecdfbb | 13012 | |
a9322a30 | 13013 | fi |
81ecdfbb RW |
13014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13015 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13016 | |
13017 | else | |
13018 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13019 | fi | |
13020 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13021 | case $host in | |
13022 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13023 | # Override, as these systems have only a dummy fork() stub | |
13024 | ac_cv_func_fork_works=no | |
13025 | ;; | |
13026 | *) | |
13027 | ac_cv_func_fork_works=yes | |
13028 | ;; | |
13029 | esac | |
81ecdfbb RW |
13030 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13031 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13032 | fi |
13033 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13034 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13036 | $as_echo_n "checking for working vfork... " >&6; } | |
13037 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
13038 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 13039 | else |
81ecdfbb | 13040 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13041 | ac_cv_func_vfork_works=cross |
13042 | else | |
81ecdfbb | 13043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13044 | /* end confdefs.h. */ |
13045 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13046 | $ac_includes_default |
a9322a30 | 13047 | #include <sys/wait.h> |
81ecdfbb | 13048 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13049 | # include <vfork.h> |
13050 | #endif | |
13051 | /* On some sparc systems, changes by the child to local and incoming | |
13052 | argument registers are propagated back to the parent. The compiler | |
13053 | is told about this with #include <vfork.h>, but some compilers | |
13054 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13055 | static variable whose address is put into a register that is | |
13056 | clobbered by the vfork. */ | |
13057 | static void | |
13058 | #ifdef __cplusplus | |
13059 | sparc_address_test (int arg) | |
13060 | # else | |
13061 | sparc_address_test (arg) int arg; | |
13062 | #endif | |
13063 | { | |
13064 | static pid_t child; | |
13065 | if (!child) { | |
13066 | child = vfork (); | |
13067 | if (child < 0) { | |
13068 | perror ("vfork"); | |
13069 | _exit(2); | |
13070 | } | |
13071 | if (!child) { | |
13072 | arg = getpid(); | |
13073 | write(-1, "", 0); | |
13074 | _exit (arg); | |
13075 | } | |
13076 | } | |
13077 | } | |
13078 | ||
13079 | int | |
13080 | main () | |
13081 | { | |
13082 | pid_t parent = getpid (); | |
13083 | pid_t child; | |
13084 | ||
13085 | sparc_address_test (0); | |
13086 | ||
13087 | child = vfork (); | |
13088 | ||
13089 | if (child == 0) { | |
13090 | /* Here is another test for sparc vfork register problems. This | |
13091 | test uses lots of local variables, at least as many local | |
13092 | variables as main has allocated so far including compiler | |
13093 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13094 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13095 | reuse the register of parent for one of the local variables, | |
13096 | since it will think that parent can't possibly be used any more | |
13097 | in this routine. Assigning to the local variable will thus | |
13098 | munge parent in the parent process. */ | |
13099 | pid_t | |
13100 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13101 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13102 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13103 | use the same hardware register for all 8 local variables. */ | |
13104 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13105 | || p != p5 || p != p6 || p != p7) | |
13106 | _exit(1); | |
13107 | ||
13108 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13109 | from child file descriptors. If the child closes a descriptor | |
13110 | before it execs or exits, this munges the parent's descriptor | |
13111 | as well. Test for this by closing stdout in the child. */ | |
13112 | _exit(close(fileno(stdout)) != 0); | |
13113 | } else { | |
13114 | int status; | |
13115 | struct stat st; | |
13116 | ||
13117 | while (wait(&status) != child) | |
13118 | ; | |
81ecdfbb | 13119 | return ( |
a9322a30 TT |
13120 | /* Was there some problem with vforking? */ |
13121 | child < 0 | |
13122 | ||
13123 | /* Did the child fail? (This shouldn't happen.) */ | |
13124 | || status | |
13125 | ||
13126 | /* Did the vfork/compiler bug occur? */ | |
13127 | || parent != getpid() | |
13128 | ||
13129 | /* Did the file descriptor bug occur? */ | |
13130 | || fstat(fileno(stdout), &st) != 0 | |
13131 | ); | |
13132 | } | |
13133 | } | |
13134 | _ACEOF | |
81ecdfbb | 13135 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13136 | ac_cv_func_vfork_works=yes |
13137 | else | |
81ecdfbb | 13138 | ac_cv_func_vfork_works=no |
a9322a30 | 13139 | fi |
81ecdfbb RW |
13140 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13141 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13142 | fi |
81ecdfbb | 13143 | |
a9322a30 | 13144 | fi |
81ecdfbb RW |
13145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13146 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13147 | |
13148 | fi; | |
13149 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13150 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13151 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13152 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13153 | fi |
13154 | ||
13155 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13156 | ||
81ecdfbb | 13157 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13158 | |
13159 | else | |
13160 | ||
81ecdfbb | 13161 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13162 | |
13163 | fi | |
13164 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13165 | ||
81ecdfbb | 13166 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13167 | |
13168 | fi | |
13169 | ||
cdf43629 | 13170 | for ac_func in getauxval getrusage getuid getgid \ |
bdca27a2 | 13171 | pipe poll pread pread64 pwrite resize_term \ |
7313baad | 13172 | sbrk setpgid setpgrp setsid \ |
9467110b | 13173 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 13174 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
3332aaf2 | 13175 | setrlimit getrlimit posix_madvise waitpid \ |
4b8b5e72 | 13176 | ptrace64 sigaltstack mkdtemp setns |
81ecdfbb RW |
13177 | do : |
13178 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13179 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13180 | eval as_val=\$$as_ac_var | |
13181 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 13182 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13183 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13184 | _ACEOF |
13185 | ||
13186 | fi | |
13187 | done | |
13188 | ||
13189 | ||
81ecdfbb RW |
13190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
13191 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13192 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
13193 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 13194 | else |
81ecdfbb | 13195 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
13196 | /* end confdefs.h. */ |
13197 | #include <langinfo.h> | |
13198 | int | |
13199 | main () | |
13200 | { | |
13201 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
13202 | ; |
13203 | return 0; | |
13204 | } | |
13205 | _ACEOF | |
81ecdfbb | 13206 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 13207 | am_cv_langinfo_codeset=yes |
a4db0f07 | 13208 | else |
81ecdfbb | 13209 | am_cv_langinfo_codeset=no |
a4db0f07 | 13210 | fi |
81ecdfbb RW |
13211 | rm -f core conftest.err conftest.$ac_objext \ |
13212 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 13213 | |
a4db0f07 | 13214 | fi |
81ecdfbb RW |
13215 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
13216 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
13217 | if test $am_cv_langinfo_codeset = yes; then |
13218 | ||
81ecdfbb | 13219 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 13220 | |
6c7a06a3 | 13221 | fi |
c906108c | 13222 | |
06825bd1 | 13223 | |
3266f10b TT |
13224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
13225 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
13226 | if test "${ac_cv_header_stdc+set}" = set; then : | |
13227 | $as_echo_n "(cached) " >&6 | |
13228 | else | |
13229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13230 | /* end confdefs.h. */ | |
13231 | #include <stdlib.h> | |
13232 | #include <stdarg.h> | |
13233 | #include <string.h> | |
13234 | #include <float.h> | |
13235 | ||
13236 | int | |
13237 | main () | |
13238 | { | |
13239 | ||
13240 | ; | |
13241 | return 0; | |
13242 | } | |
13243 | _ACEOF | |
13244 | if ac_fn_c_try_compile "$LINENO"; then : | |
13245 | ac_cv_header_stdc=yes | |
13246 | else | |
13247 | ac_cv_header_stdc=no | |
13248 | fi | |
13249 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13250 | ||
13251 | if test $ac_cv_header_stdc = yes; then | |
13252 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
13253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13254 | /* end confdefs.h. */ | |
13255 | #include <string.h> | |
13256 | ||
13257 | _ACEOF | |
13258 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13259 | $EGREP "memchr" >/dev/null 2>&1; then : | |
13260 | ||
13261 | else | |
13262 | ac_cv_header_stdc=no | |
13263 | fi | |
13264 | rm -f conftest* | |
13265 | ||
13266 | fi | |
13267 | ||
13268 | if test $ac_cv_header_stdc = yes; then | |
13269 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
13270 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13271 | /* end confdefs.h. */ | |
13272 | #include <stdlib.h> | |
13273 | ||
13274 | _ACEOF | |
13275 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13276 | $EGREP "free" >/dev/null 2>&1; then : | |
13277 | ||
13278 | else | |
13279 | ac_cv_header_stdc=no | |
13280 | fi | |
13281 | rm -f conftest* | |
13282 | ||
13283 | fi | |
13284 | ||
13285 | if test $ac_cv_header_stdc = yes; then | |
13286 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13287 | if test "$cross_compiling" = yes; then : | |
13288 | : | |
13289 | else | |
13290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13291 | /* end confdefs.h. */ | |
13292 | #include <ctype.h> | |
13293 | #include <stdlib.h> | |
13294 | #if ((' ' & 0x0FF) == 0x020) | |
13295 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13296 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13297 | #else | |
13298 | # define ISLOWER(c) \ | |
13299 | (('a' <= (c) && (c) <= 'i') \ | |
13300 | || ('j' <= (c) && (c) <= 'r') \ | |
13301 | || ('s' <= (c) && (c) <= 'z')) | |
13302 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13303 | #endif | |
13304 | ||
13305 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
13306 | int | |
13307 | main () | |
13308 | { | |
13309 | int i; | |
13310 | for (i = 0; i < 256; i++) | |
13311 | if (XOR (islower (i), ISLOWER (i)) | |
13312 | || toupper (i) != TOUPPER (i)) | |
13313 | return 2; | |
13314 | return 0; | |
13315 | } | |
13316 | _ACEOF | |
13317 | if ac_fn_c_try_run "$LINENO"; then : | |
13318 | ||
13319 | else | |
13320 | ac_cv_header_stdc=no | |
13321 | fi | |
13322 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13323 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13324 | fi | |
13325 | ||
13326 | fi | |
13327 | fi | |
13328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
13329 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13330 | if test $ac_cv_header_stdc = yes; then | |
13331 | ||
13332 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
13333 | ||
3266f10b TT |
13334 | fi |
13335 | ||
13336 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
13337 | # for constant arguments. Useless! | |
13338 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
13339 | $as_echo_n "checking for working alloca.h... " >&6; } | |
13340 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
13341 | $as_echo_n "(cached) " >&6 | |
13342 | else | |
13343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13344 | /* end confdefs.h. */ | |
13345 | #include <alloca.h> | |
13346 | int | |
13347 | main () | |
13348 | { | |
13349 | char *p = (char *) alloca (2 * sizeof (int)); | |
13350 | if (p) return 0; | |
13351 | ; | |
13352 | return 0; | |
13353 | } | |
13354 | _ACEOF | |
13355 | if ac_fn_c_try_link "$LINENO"; then : | |
13356 | ac_cv_working_alloca_h=yes | |
13357 | else | |
13358 | ac_cv_working_alloca_h=no | |
13359 | fi | |
13360 | rm -f core conftest.err conftest.$ac_objext \ | |
13361 | conftest$ac_exeext conftest.$ac_ext | |
13362 | fi | |
13363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
13364 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
13365 | if test $ac_cv_working_alloca_h = yes; then | |
13366 | ||
13367 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
13368 | ||
13369 | fi | |
13370 | ||
13371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
13372 | $as_echo_n "checking for alloca... " >&6; } | |
13373 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
13374 | $as_echo_n "(cached) " >&6 | |
13375 | else | |
13376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13377 | /* end confdefs.h. */ | |
13378 | #ifdef __GNUC__ | |
13379 | # define alloca __builtin_alloca | |
13380 | #else | |
13381 | # ifdef _MSC_VER | |
13382 | # include <malloc.h> | |
13383 | # define alloca _alloca | |
13384 | # else | |
13385 | # ifdef HAVE_ALLOCA_H | |
13386 | # include <alloca.h> | |
13387 | # else | |
13388 | # ifdef _AIX | |
13389 | #pragma alloca | |
13390 | # else | |
13391 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13392 | char *alloca (); | |
13393 | # endif | |
13394 | # endif | |
13395 | # endif | |
13396 | # endif | |
13397 | #endif | |
13398 | ||
13399 | int | |
13400 | main () | |
13401 | { | |
13402 | char *p = (char *) alloca (1); | |
13403 | if (p) return 0; | |
13404 | ; | |
13405 | return 0; | |
13406 | } | |
13407 | _ACEOF | |
13408 | if ac_fn_c_try_link "$LINENO"; then : | |
13409 | ac_cv_func_alloca_works=yes | |
13410 | else | |
13411 | ac_cv_func_alloca_works=no | |
13412 | fi | |
13413 | rm -f core conftest.err conftest.$ac_objext \ | |
13414 | conftest$ac_exeext conftest.$ac_ext | |
13415 | fi | |
13416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
13417 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
13418 | ||
13419 | if test $ac_cv_func_alloca_works = yes; then | |
13420 | ||
13421 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
13422 | ||
13423 | else | |
13424 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13425 | # that cause trouble. Some versions do not even contain alloca or | |
13426 | # contain a buggy version. If you still want to use their alloca, | |
13427 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
13428 | ||
13429 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
13430 | ||
13431 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
13432 | ||
13433 | ||
13434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
13435 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13436 | if test "${ac_cv_os_cray+set}" = set; then : | |
13437 | $as_echo_n "(cached) " >&6 | |
13438 | else | |
13439 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13440 | /* end confdefs.h. */ | |
13441 | #if defined CRAY && ! defined CRAY2 | |
13442 | webecray | |
13443 | #else | |
13444 | wenotbecray | |
13445 | #endif | |
13446 | ||
13447 | _ACEOF | |
13448 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13449 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13450 | ac_cv_os_cray=yes | |
13451 | else | |
13452 | ac_cv_os_cray=no | |
13453 | fi | |
13454 | rm -f conftest* | |
13455 | ||
13456 | fi | |
13457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13458 | $as_echo "$ac_cv_os_cray" >&6; } | |
13459 | if test $ac_cv_os_cray = yes; then | |
13460 | for ac_func in _getb67 GETB67 getb67; do | |
13461 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13462 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13463 | eval as_val=\$$as_ac_var | |
13464 | if test "x$as_val" = x""yes; then : | |
13465 | ||
13466 | cat >>confdefs.h <<_ACEOF | |
13467 | #define CRAY_STACKSEG_END $ac_func | |
13468 | _ACEOF | |
13469 | ||
13470 | break | |
13471 | fi | |
13472 | ||
13473 | done | |
13474 | fi | |
13475 | ||
13476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13477 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13478 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
13479 | $as_echo_n "(cached) " >&6 | |
13480 | else | |
13481 | if test "$cross_compiling" = yes; then : | |
13482 | ac_cv_c_stack_direction=0 | |
13483 | else | |
13484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13485 | /* end confdefs.h. */ | |
13486 | $ac_includes_default | |
13487 | int | |
13488 | find_stack_direction () | |
13489 | { | |
13490 | static char *addr = 0; | |
13491 | auto char dummy; | |
13492 | if (addr == 0) | |
13493 | { | |
13494 | addr = &dummy; | |
13495 | return find_stack_direction (); | |
13496 | } | |
13497 | else | |
13498 | return (&dummy > addr) ? 1 : -1; | |
13499 | } | |
13500 | ||
13501 | int | |
13502 | main () | |
13503 | { | |
13504 | return find_stack_direction () < 0; | |
13505 | } | |
13506 | _ACEOF | |
13507 | if ac_fn_c_try_run "$LINENO"; then : | |
13508 | ac_cv_c_stack_direction=1 | |
13509 | else | |
13510 | ac_cv_c_stack_direction=-1 | |
13511 | fi | |
13512 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13513 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13514 | fi | |
13515 | ||
13516 | fi | |
13517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13518 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13519 | cat >>confdefs.h <<_ACEOF | |
13520 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13521 | _ACEOF | |
13522 | ||
13523 | ||
13524 | fi | |
13525 | ||
13526 | ||
13527 | ||
13528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13529 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13530 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
13531 | $as_echo_n "(cached) " >&6 | |
13532 | else | |
13533 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13534 | /* end confdefs.h. */ | |
13535 | #include <langinfo.h> | |
13536 | int | |
13537 | main () | |
13538 | { | |
13539 | char* cs = nl_langinfo(CODESET); | |
13540 | ; | |
13541 | return 0; | |
13542 | } | |
13543 | _ACEOF | |
13544 | if ac_fn_c_try_link "$LINENO"; then : | |
13545 | am_cv_langinfo_codeset=yes | |
13546 | else | |
13547 | am_cv_langinfo_codeset=no | |
13548 | fi | |
13549 | rm -f core conftest.err conftest.$ac_objext \ | |
13550 | conftest$ac_exeext conftest.$ac_ext | |
13551 | ||
13552 | fi | |
13553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13554 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13555 | if test $am_cv_langinfo_codeset = yes; then | |
13556 | ||
13557 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13558 | ||
13559 | fi | |
13560 | ||
13561 | ||
d1928160 | 13562 | 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 termios.h |
3266f10b TT |
13563 | do : |
13564 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13565 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13566 | eval as_val=\$$as_ac_Header | |
13567 | if test "x$as_val" = x""yes; then : | |
13568 | cat >>confdefs.h <<_ACEOF | |
13569 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13570 | _ACEOF | |
13571 | ||
13572 | fi | |
13573 | ||
13574 | done | |
13575 | ||
13576 | ||
f348d89a | 13577 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction |
3266f10b TT |
13578 | do : |
13579 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13580 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13581 | eval as_val=\$$as_ac_var | |
13582 | if test "x$as_val" = x""yes; then : | |
13583 | cat >>confdefs.h <<_ACEOF | |
13584 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13585 | _ACEOF | |
13586 | ||
13587 | fi | |
13588 | done | |
13589 | ||
13590 | ||
13591 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
13592 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
13593 | ac_have_decl=1 | |
13594 | else | |
13595 | ac_have_decl=0 | |
13596 | fi | |
13597 | ||
13598 | cat >>confdefs.h <<_ACEOF | |
13599 | #define HAVE_DECL_STRERROR $ac_have_decl | |
13600 | _ACEOF | |
13601 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
13602 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
13603 | ac_have_decl=1 | |
13604 | else | |
13605 | ac_have_decl=0 | |
13606 | fi | |
13607 | ||
13608 | cat >>confdefs.h <<_ACEOF | |
13609 | #define HAVE_DECL_STRSTR $ac_have_decl | |
13610 | _ACEOF | |
13611 | ||
13612 | ||
e9bcb658 GB |
13613 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
13614 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
13615 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
13616 | $as_echo_n "(cached) " >&6 | |
13617 | else | |
13618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13619 | /* end confdefs.h. */ | |
13620 | ||
13621 | #include <setjmp.h> | |
13622 | ||
13623 | int | |
13624 | main () | |
13625 | { | |
13626 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
13627 | ; | |
13628 | return 0; | |
13629 | } | |
13630 | _ACEOF | |
13631 | if ac_fn_c_try_compile "$LINENO"; then : | |
13632 | gdb_cv_func_sigsetjmp=yes | |
13633 | else | |
13634 | gdb_cv_func_sigsetjmp=no | |
13635 | fi | |
13636 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13637 | fi | |
13638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
13639 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
13640 | if test $gdb_cv_func_sigsetjmp = yes; then | |
13641 | ||
13642 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
13643 | ||
13644 | fi | |
13645 | ||
3266f10b | 13646 | |
54019719 PA |
13647 | # Check the return and argument types of ptrace. |
13648 | ||
13649 | ||
54019719 PA |
13650 | for ac_header in sys/ptrace.h ptrace.h |
13651 | do : | |
13652 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13653 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13654 | eval as_val=\$$as_ac_Header | |
13655 | if test "x$as_val" = x""yes; then : | |
13656 | cat >>confdefs.h <<_ACEOF | |
13657 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13658 | _ACEOF | |
13659 | ||
13660 | fi | |
13661 | ||
13662 | done | |
13663 | ||
13664 | ||
a3828db0 | 13665 | gdb_ptrace_headers=' |
4ff70b84 | 13666 | #include <sys/types.h> |
a3828db0 MK |
13667 | #if HAVE_SYS_PTRACE_H |
13668 | # include <sys/ptrace.h> | |
13669 | #endif | |
13670 | #if HAVE_UNISTD_H | |
13671 | # include <unistd.h> | |
13672 | #endif | |
13673 | ' | |
13674 | # There is no point in checking if we don't have a prototype. | |
9b30624b | 13675 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
81ecdfbb RW |
13676 | " |
13677 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
13678 | ac_have_decl=1 | |
06825bd1 | 13679 | else |
81ecdfbb | 13680 | ac_have_decl=0 |
06825bd1 | 13681 | fi |
06825bd1 | 13682 | |
a3828db0 | 13683 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13684 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 13685 | _ACEOF |
81ecdfbb | 13686 | if test $ac_have_decl = 1; then : |
bec39cab | 13687 | |
a3828db0 | 13688 | else |
a3828db0 MK |
13689 | |
13690 | : ${gdb_cv_func_ptrace_ret='int'} | |
13691 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13692 | ||
06825bd1 MK |
13693 | fi |
13694 | ||
064ef605 DJ |
13695 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
13696 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
13697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
13698 | $as_echo_n "checking return type of ptrace... " >&6; } | |
13699 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
13700 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13701 | else |
81ecdfbb | 13702 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13703 | /* end confdefs.h. */ |
a3828db0 | 13704 | $gdb_ptrace_headers |
bec39cab AC |
13705 | int |
13706 | main () | |
13707 | { | |
064ef605 DJ |
13708 | extern long ptrace (enum __ptrace_request, ...); |
13709 | ; | |
13710 | return 0; | |
13711 | } | |
13712 | _ACEOF | |
9b30624b | 13713 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
13714 | gdb_cv_func_ptrace_ret='long' |
13715 | else | |
81ecdfbb | 13716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13717 | /* end confdefs.h. */ |
13718 | $gdb_ptrace_headers | |
13719 | int | |
13720 | main () | |
13721 | { | |
a3828db0 | 13722 | extern int ptrace (); |
bec39cab AC |
13723 | ; |
13724 | return 0; | |
13725 | } | |
13726 | _ACEOF | |
9b30624b | 13727 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13728 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 13729 | else |
81ecdfbb | 13730 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 13731 | fi |
81ecdfbb | 13732 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 13733 | fi |
81ecdfbb | 13734 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 13735 | fi |
81ecdfbb RW |
13736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
13737 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 13738 | |
a3828db0 MK |
13739 | cat >>confdefs.h <<_ACEOF |
13740 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 13741 | _ACEOF |
70f9f479 | 13742 | |
a3828db0 | 13743 | # Check argument types. |
81ecdfbb RW |
13744 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
13745 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
13746 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
13747 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13748 | else |
a3828db0 | 13749 | |
81ecdfbb | 13750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13751 | /* end confdefs.h. */ |
13752 | $gdb_ptrace_headers | |
13753 | int | |
13754 | main () | |
13755 | { | |
13756 | extern long ptrace (enum __ptrace_request, ...); | |
13757 | ; | |
13758 | return 0; | |
13759 | } | |
13760 | _ACEOF | |
9b30624b | 13761 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 13762 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
064ef605 | 13763 | else |
064ef605 | 13764 | |
a3828db0 MK |
13765 | for gdb_arg1 in 'int' 'long'; do |
13766 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 13767 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 13768 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 13769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13770 | /* end confdefs.h. */ |
a3828db0 | 13771 | $gdb_ptrace_headers |
bec39cab AC |
13772 | int |
13773 | main () | |
13774 | { | |
a3828db0 MK |
13775 | |
13776 | extern $gdb_cv_func_ptrace_ret | |
13777 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
13778 | ||
bec39cab AC |
13779 | ; |
13780 | return 0; | |
13781 | } | |
13782 | _ACEOF | |
9b30624b | 13783 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13784 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
13785 | break 4; | |
5c7f2947 | 13786 | fi |
81ecdfbb | 13787 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 13788 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 13789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13790 | /* end confdefs.h. */ |
a3828db0 | 13791 | $gdb_ptrace_headers |
bec39cab AC |
13792 | int |
13793 | main () | |
13794 | { | |
a3828db0 MK |
13795 | |
13796 | extern $gdb_cv_func_ptrace_ret | |
13797 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
13798 | ||
bec39cab AC |
13799 | ; |
13800 | return 0; | |
13801 | } | |
13802 | _ACEOF | |
9b30624b | 13803 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13804 | |
13805 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
13806 | break 5; | |
78434e59 | 13807 | fi |
81ecdfbb | 13808 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
13809 | done |
13810 | done | |
13811 | done | |
13812 | done | |
13813 | done | |
13814 | # Provide a safe default value. | |
13815 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13816 | ||
064ef605 | 13817 | fi |
81ecdfbb | 13818 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 13819 | fi |
81ecdfbb RW |
13820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
13821 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
13822 | ac_save_IFS=$IFS; IFS=',' |
13823 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
13824 | IFS=$ac_save_IFS | |
13825 | shift | |
bec39cab | 13826 | |
54019719 PA |
13827 | cat >>confdefs.h <<_ACEOF |
13828 | #define PTRACE_TYPE_ARG1 $1 | |
13829 | _ACEOF | |
13830 | ||
13831 | ||
a3828db0 MK |
13832 | cat >>confdefs.h <<_ACEOF |
13833 | #define PTRACE_TYPE_ARG3 $3 | |
13834 | _ACEOF | |
13835 | ||
96d7229d LM |
13836 | |
13837 | cat >>confdefs.h <<_ACEOF | |
13838 | #define PTRACE_TYPE_ARG4 $4 | |
13839 | _ACEOF | |
13840 | ||
a3828db0 MK |
13841 | if test -n "$5"; then |
13842 | ||
13843 | cat >>confdefs.h <<_ACEOF | |
13844 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 13845 | _ACEOF |
78434e59 MK |
13846 | |
13847 | fi | |
13848 | ||
54019719 | 13849 | |
a3828db0 | 13850 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
13851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13852 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13853 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13854 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 13855 | else |
81ecdfbb RW |
13856 | if test "$cross_compiling" = yes; then : |
13857 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 13858 | else |
81ecdfbb | 13859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13860 | /* end confdefs.h. */ |
81ecdfbb | 13861 | $ac_includes_default |
bec39cab AC |
13862 | int |
13863 | main () | |
13864 | { | |
a3828db0 MK |
13865 | /* If this system has a BSD-style setpgrp which takes arguments, |
13866 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
13867 | exit successfully. */ | |
81ecdfbb | 13868 | return setpgrp (1,1) != -1; |
bec39cab AC |
13869 | ; |
13870 | return 0; | |
13871 | } | |
13872 | _ACEOF | |
81ecdfbb | 13873 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 13874 | ac_cv_func_setpgrp_void=no |
c906108c | 13875 | else |
81ecdfbb | 13876 | ac_cv_func_setpgrp_void=yes |
c906108c | 13877 | fi |
81ecdfbb RW |
13878 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13879 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13880 | fi |
81ecdfbb | 13881 | |
a3828db0 | 13882 | fi |
81ecdfbb RW |
13883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13884 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
13885 | if test $ac_cv_func_setpgrp_void = yes; then |
13886 | ||
81ecdfbb | 13887 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
13888 | |
13889 | fi | |
a3828db0 MK |
13890 | |
13891 | else | |
81ecdfbb RW |
13892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13893 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13894 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13895 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13896 | else |
81ecdfbb | 13897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13898 | /* end confdefs.h. */ |
a3828db0 MK |
13899 | |
13900 | #include <unistd.h> | |
13901 | ||
bec39cab AC |
13902 | int |
13903 | main () | |
13904 | { | |
a3828db0 MK |
13905 | |
13906 | if (setpgrp(1,1) == -1) | |
13907 | exit (0); | |
13908 | else | |
13909 | exit (1); | |
13910 | ||
bec39cab AC |
13911 | ; |
13912 | return 0; | |
13913 | } | |
13914 | _ACEOF | |
81ecdfbb | 13915 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13916 | ac_cv_func_setpgrp_void=no |
c906108c | 13917 | else |
81ecdfbb | 13918 | ac_cv_func_setpgrp_void=yes |
c906108c | 13919 | fi |
81ecdfbb | 13920 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13921 | fi |
81ecdfbb RW |
13922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13923 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 13924 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 13925 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 13926 | |
a3828db0 | 13927 | fi |
c906108c SS |
13928 | fi |
13929 | ||
db1ff28b JK |
13930 | # Assume we'll default to using the included libiberty regex. |
13931 | gdb_use_included_regex=yes | |
13932 | ||
13933 | # However, if the system regex is GNU regex, then default to *not* | |
13934 | # using the included regex. | |
13935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
13936 | $as_echo_n "checking for GNU regex... " >&6; } | |
13937 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
13938 | $as_echo_n "(cached) " >&6 | |
13939 | else | |
13940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13941 | /* end confdefs.h. */ | |
13942 | #include <gnu-versions.h> | |
13943 | int | |
13944 | main () | |
13945 | { | |
13946 | #define REGEX_INTERFACE_VERSION 1 | |
13947 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
13948 | # error "Version mismatch" | |
13949 | #endif | |
13950 | ; | |
13951 | return 0; | |
13952 | } | |
13953 | _ACEOF | |
13954 | if ac_fn_c_try_compile "$LINENO"; then : | |
13955 | gdb_cv_have_gnu_regex=yes | |
13956 | else | |
13957 | gdb_cv_have_gnu_regex=no | |
13958 | fi | |
13959 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13960 | fi | |
13961 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
13962 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
13963 | if test $gdb_cv_have_gnu_regex = yes; then | |
13964 | gdb_use_included_regex=no | |
13965 | fi | |
13966 | ||
13967 | ||
13968 | # Check whether --with-included-regex was given. | |
13969 | if test "${with_included_regex+set}" = set; then : | |
13970 | withval=$with_included_regex; gdb_with_regex=$withval | |
13971 | else | |
13972 | gdb_with_regex=$gdb_use_included_regex | |
13973 | fi | |
13974 | ||
13975 | if test "$gdb_with_regex" = yes; then | |
13976 | ||
13977 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
13978 | ||
13979 | fi | |
13980 | ||
81ecdfbb RW |
13981 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
13982 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
13983 | #include <sys/proc.h> | |
13984 | ||
13985 | " | |
13986 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 13987 | |
5c45e068 | 13988 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 13989 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 13990 | _ACEOF |
c906108c | 13991 | |
5c45e068 | 13992 | |
97bf5e38 | 13993 | fi |
c906108c | 13994 | |
5c45e068 | 13995 | |
a3828db0 | 13996 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
13997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
13998 | $as_echo_n "checking for struct lwp... " >&6; } | |
13999 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
14000 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14001 | else |
81ecdfbb | 14002 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14003 | /* end confdefs.h. */ |
a3828db0 | 14004 | #include <sys/param.h> |
c49fbc6c | 14005 | #define _KMEMUSER |
a3828db0 | 14006 | #include <sys/lwp.h> |
bec39cab AC |
14007 | int |
14008 | main () | |
14009 | { | |
a3828db0 | 14010 | struct lwp l; |
bec39cab AC |
14011 | ; |
14012 | return 0; | |
14013 | } | |
14014 | _ACEOF | |
81ecdfbb | 14015 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14016 | gdb_cv_struct_lwp=yes |
c906108c | 14017 | else |
81ecdfbb | 14018 | gdb_cv_struct_lwp=no |
c906108c | 14019 | fi |
81ecdfbb | 14020 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14021 | fi |
81ecdfbb RW |
14022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
14023 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 14024 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 14025 | |
81ecdfbb | 14026 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 14027 | |
97bf5e38 | 14028 | fi |
c906108c | 14029 | |
a3828db0 | 14030 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
14031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
14032 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
14033 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
14034 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14035 | else |
81ecdfbb | 14036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14037 | /* end confdefs.h. */ |
a3828db0 MK |
14038 | #include <sys/types.h> |
14039 | #include <machine/reg.h> | |
bec39cab AC |
14040 | int |
14041 | main () | |
14042 | { | |
a3828db0 | 14043 | struct reg r; |
bec39cab AC |
14044 | ; |
14045 | return 0; | |
14046 | } | |
14047 | _ACEOF | |
81ecdfbb | 14048 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14049 | gdb_cv_struct_reg=yes |
27ca5dad | 14050 | else |
81ecdfbb | 14051 | gdb_cv_struct_reg=no |
27ca5dad | 14052 | fi |
81ecdfbb | 14053 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 14054 | fi |
81ecdfbb RW |
14055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
14056 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 14057 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 14058 | |
81ecdfbb | 14059 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
14060 | |
14061 | fi | |
97bf5e38 | 14062 | |
a3828db0 MK |
14063 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
14064 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
a6e69c1f JB |
14065 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> |
14066 | #include <machine/reg.h> | |
81ecdfbb RW |
14067 | " |
14068 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
14069 | |
14070 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14071 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 14072 | _ACEOF |
3862412b | 14073 | |
5c45e068 | 14074 | |
97bf5e38 | 14075 | fi |
a6e69c1f JB |
14076 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> |
14077 | #include <machine/reg.h> | |
81ecdfbb RW |
14078 | " |
14079 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
14080 | |
14081 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14082 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 14083 | _ACEOF |
3862412b | 14084 | |
5c45e068 | 14085 | |
97bf5e38 | 14086 | fi |
3862412b | 14087 | |
5c45e068 | 14088 | |
6fea9e18 L |
14089 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
14090 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
14091 | # `struct user_regs_struct'. | |
14092 | 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> | |
14093 | " | |
14094 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
14095 | ||
14096 | cat >>confdefs.h <<_ACEOF | |
14097 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
14098 | _ACEOF | |
14099 | ||
14100 | ||
14101 | fi | |
14102 | 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> | |
14103 | " | |
14104 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
14105 | ||
14106 | cat >>confdefs.h <<_ACEOF | |
14107 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
14108 | _ACEOF | |
14109 | ||
14110 | ||
14111 | fi | |
14112 | ||
14113 | ||
a3828db0 | 14114 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
14115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
14116 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
14117 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
14118 | $as_echo_n "(cached) " >&6 | |
451928c5 | 14119 | else |
81ecdfbb | 14120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14121 | /* end confdefs.h. */ |
a3828db0 | 14122 | #include <sys/ptrace.h> |
bec39cab AC |
14123 | int |
14124 | main () | |
14125 | { | |
a3828db0 | 14126 | PTRACE_GETREGS; |
bec39cab AC |
14127 | ; |
14128 | return 0; | |
14129 | } | |
14130 | _ACEOF | |
81ecdfbb | 14131 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14132 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 14133 | else |
81ecdfbb | 14134 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 14135 | fi |
81ecdfbb | 14136 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14137 | fi |
14138 | ||
81ecdfbb RW |
14139 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
14140 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 14141 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 14142 | |
81ecdfbb | 14143 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 14144 | |
97bf5e38 | 14145 | fi |
451928c5 | 14146 | |
a3828db0 | 14147 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
14148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
14149 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
14150 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
14151 | $as_echo_n "(cached) " >&6 | |
451928c5 | 14152 | else |
81ecdfbb | 14153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14154 | /* end confdefs.h. */ |
a3828db0 | 14155 | #include <sys/ptrace.h> |
bec39cab AC |
14156 | int |
14157 | main () | |
14158 | { | |
a3828db0 | 14159 | PTRACE_GETFPXREGS; |
bec39cab AC |
14160 | ; |
14161 | return 0; | |
14162 | } | |
14163 | _ACEOF | |
81ecdfbb | 14164 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14165 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 14166 | else |
81ecdfbb | 14167 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 14168 | fi |
81ecdfbb | 14169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14170 | fi |
14171 | ||
81ecdfbb RW |
14172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
14173 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 14174 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 14175 | |
81ecdfbb | 14176 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 14177 | |
97bf5e38 | 14178 | fi |
451928c5 | 14179 | |
a3828db0 | 14180 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
14181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
14182 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
14183 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
14184 | $as_echo_n "(cached) " >&6 | |
3862412b | 14185 | else |
81ecdfbb | 14186 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14187 | /* end confdefs.h. */ |
a3828db0 MK |
14188 | #include <sys/types.h> |
14189 | #include <sys/ptrace.h> | |
bec39cab AC |
14190 | int |
14191 | main () | |
14192 | { | |
a3828db0 | 14193 | PT_GETDBREGS; |
bec39cab AC |
14194 | ; |
14195 | return 0; | |
14196 | } | |
14197 | _ACEOF | |
81ecdfbb | 14198 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14199 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 14200 | else |
81ecdfbb | 14201 | gdb_cv_have_pt_getdbregs=no |
3862412b | 14202 | fi |
81ecdfbb | 14203 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14204 | fi |
14205 | ||
81ecdfbb RW |
14206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
14207 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 14208 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 14209 | |
81ecdfbb | 14210 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 14211 | |
97bf5e38 | 14212 | fi |
3862412b | 14213 | |
a3828db0 | 14214 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
14215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
14216 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
14217 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
14218 | $as_echo_n "(cached) " >&6 | |
3862412b | 14219 | else |
81ecdfbb | 14220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14221 | /* end confdefs.h. */ |
a3828db0 MK |
14222 | #include <sys/types.h> |
14223 | #include <sys/ptrace.h> | |
bec39cab AC |
14224 | int |
14225 | main () | |
14226 | { | |
a3828db0 | 14227 | PT_GETXMMREGS; |
bec39cab AC |
14228 | ; |
14229 | return 0; | |
14230 | } | |
14231 | _ACEOF | |
81ecdfbb | 14232 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14233 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 14234 | else |
81ecdfbb | 14235 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 14236 | fi |
81ecdfbb | 14237 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14238 | fi |
14239 | ||
81ecdfbb RW |
14240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
14241 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 14242 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 14243 | |
81ecdfbb | 14244 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 14245 | |
97bf5e38 | 14246 | fi |
3862412b | 14247 | |
6e9567fe JB |
14248 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
14249 | # Older FreeBSD versions don't have the pl_tdname member of | |
14250 | # `struct ptrace_lwpinfo'. | |
14251 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
14252 | " | |
14253 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then : | |
14254 | ||
14255 | cat >>confdefs.h <<_ACEOF | |
14256 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
14257 | _ACEOF | |
14258 | ||
14259 | ||
14260 | fi | |
14261 | ||
14262 | ||
e6cdd38e JB |
14263 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
14264 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
14265 | # FreeBSD 10.3. | |
14266 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h> | |
14267 | " | |
14268 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then : | |
14269 | ||
14270 | cat >>confdefs.h <<_ACEOF | |
14271 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
14272 | _ACEOF | |
14273 | ||
14274 | ||
14275 | fi | |
14276 | ||
6e9567fe | 14277 | |
05b4bd79 | 14278 | # Detect which type of /proc is in use, such as for Solaris. |
97bf5e38 MK |
14279 | |
14280 | if test "${target}" = "${host}"; then | |
14281 | case "${host}" in | |
7b00db47 | 14282 | *-*-sysv4.2* | *-*-sysv5* ) |
60ca704f | 14283 | |
81ecdfbb | 14284 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
14285 | |
14286 | ;; | |
c162e8c9 | 14287 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 14288 | |
81ecdfbb | 14289 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f | 14290 | |
97bf5e38 MK |
14291 | ;; |
14292 | esac | |
14293 | fi | |
14294 | ||
14295 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
14296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
14297 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
14298 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
14299 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 14300 | else |
81ecdfbb | 14301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14302 | /* end confdefs.h. */ |
596c9d4b KB |
14303 | |
14304 | #define _SYSCALL32 | |
d30c5336 JK |
14305 | /* Needed for new procfs interface on sparc-solaris. */ |
14306 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 14307 | #include <sys/procfs.h> |
bec39cab AC |
14308 | int |
14309 | main () | |
14310 | { | |
97bf5e38 | 14311 | gregset_t avar |
bec39cab AC |
14312 | ; |
14313 | return 0; | |
14314 | } | |
14315 | _ACEOF | |
81ecdfbb | 14316 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14317 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 14318 | else |
81ecdfbb | 14319 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 14320 | |
596c9d4b | 14321 | fi |
81ecdfbb | 14322 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
14323 | fi |
14324 | ||
97bf5e38 | 14325 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 14326 | |
81ecdfbb | 14327 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
14328 | |
14329 | fi | |
81ecdfbb RW |
14330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
14331 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 14332 | |
81ecdfbb RW |
14333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
14334 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
14335 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
14336 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 14337 | else |
81ecdfbb | 14338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14339 | /* end confdefs.h. */ |
97bf5e38 MK |
14340 | |
14341 | #define _SYSCALL32 | |
d30c5336 JK |
14342 | /* Needed for new procfs interface on sparc-solaris. */ |
14343 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 14344 | #include <sys/procfs.h> |
bec39cab AC |
14345 | int |
14346 | main () | |
14347 | { | |
97bf5e38 | 14348 | fpregset_t avar |
bec39cab AC |
14349 | ; |
14350 | return 0; | |
14351 | } | |
14352 | _ACEOF | |
81ecdfbb | 14353 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14354 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 14355 | else |
81ecdfbb | 14356 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 14357 | |
d84dd0c5 | 14358 | fi |
81ecdfbb | 14359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
14360 | fi |
14361 | ||
97bf5e38 | 14362 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 14363 | |
81ecdfbb | 14364 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 14365 | |
97bf5e38 | 14366 | fi |
81ecdfbb RW |
14367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
14368 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 14369 | |
81ecdfbb RW |
14370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
14371 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
14372 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
14373 | $as_echo_n "(cached) " >&6 | |
c906108c | 14374 | else |
81ecdfbb | 14375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14376 | /* end confdefs.h. */ |
c906108c | 14377 | |
97bf5e38 | 14378 | #define _SYSCALL32 |
d30c5336 JK |
14379 | /* Needed for new procfs interface on sparc-solaris. */ |
14380 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14381 | #include <sys/procfs.h> |
bec39cab AC |
14382 | int |
14383 | main () | |
14384 | { | |
97bf5e38 | 14385 | prgregset_t avar |
bec39cab AC |
14386 | ; |
14387 | return 0; | |
14388 | } | |
14389 | _ACEOF | |
81ecdfbb | 14390 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14391 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 14392 | else |
81ecdfbb | 14393 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 14394 | |
c906108c | 14395 | fi |
81ecdfbb | 14396 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14397 | fi |
14398 | ||
97bf5e38 | 14399 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 14400 | |
81ecdfbb | 14401 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 14402 | |
97bf5e38 | 14403 | fi |
81ecdfbb RW |
14404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
14405 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 14406 | |
81ecdfbb RW |
14407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
14408 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
14409 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
14410 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14411 | else |
81ecdfbb | 14412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14413 | /* end confdefs.h. */ |
97bf5e38 MK |
14414 | |
14415 | #define _SYSCALL32 | |
d30c5336 JK |
14416 | /* Needed for new procfs interface on sparc-solaris. */ |
14417 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14418 | #include <sys/procfs.h> |
bec39cab AC |
14419 | int |
14420 | main () | |
14421 | { | |
97bf5e38 | 14422 | prfpregset_t avar |
bec39cab AC |
14423 | ; |
14424 | return 0; | |
14425 | } | |
14426 | _ACEOF | |
81ecdfbb | 14427 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14428 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 14429 | else |
81ecdfbb | 14430 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 14431 | |
d45fe813 | 14432 | fi |
81ecdfbb | 14433 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14434 | fi |
14435 | ||
97bf5e38 | 14436 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 14437 | |
81ecdfbb | 14438 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 14439 | |
97bf5e38 | 14440 | fi |
81ecdfbb RW |
14441 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
14442 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 14443 | |
81ecdfbb RW |
14444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
14445 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
14446 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
14447 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14448 | else |
81ecdfbb | 14449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14450 | /* end confdefs.h. */ |
97bf5e38 MK |
14451 | |
14452 | #define _SYSCALL32 | |
d30c5336 JK |
14453 | /* Needed for new procfs interface on sparc-solaris. */ |
14454 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14455 | #include <sys/procfs.h> |
bec39cab AC |
14456 | int |
14457 | main () | |
14458 | { | |
97bf5e38 | 14459 | prgregset32_t avar |
bec39cab AC |
14460 | ; |
14461 | return 0; | |
14462 | } | |
14463 | _ACEOF | |
81ecdfbb | 14464 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14465 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 14466 | else |
81ecdfbb | 14467 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 14468 | |
d45fe813 | 14469 | fi |
81ecdfbb | 14470 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14471 | fi |
14472 | ||
97bf5e38 | 14473 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 14474 | |
81ecdfbb | 14475 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 14476 | |
97bf5e38 | 14477 | fi |
81ecdfbb RW |
14478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
14479 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 14480 | |
81ecdfbb RW |
14481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
14482 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
14483 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
14484 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14485 | else |
81ecdfbb | 14486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14487 | /* end confdefs.h. */ |
97bf5e38 | 14488 | |
d45fe813 | 14489 | #define _SYSCALL32 |
d30c5336 JK |
14490 | /* Needed for new procfs interface on sparc-solaris. */ |
14491 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14492 | #include <sys/procfs.h> |
bec39cab AC |
14493 | int |
14494 | main () | |
14495 | { | |
97bf5e38 | 14496 | lwpid_t avar |
bec39cab AC |
14497 | ; |
14498 | return 0; | |
14499 | } | |
14500 | _ACEOF | |
81ecdfbb | 14501 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14502 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 14503 | else |
81ecdfbb | 14504 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 14505 | |
d45fe813 | 14506 | fi |
81ecdfbb | 14507 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14508 | fi |
14509 | ||
97bf5e38 | 14510 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 14511 | |
81ecdfbb | 14512 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 14513 | |
97bf5e38 | 14514 | fi |
81ecdfbb RW |
14515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
14516 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 14517 | |
81ecdfbb RW |
14518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
14519 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
14520 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
14521 | $as_echo_n "(cached) " >&6 | |
c906108c | 14522 | else |
81ecdfbb | 14523 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14524 | /* end confdefs.h. */ |
c906108c | 14525 | |
97bf5e38 | 14526 | #define _SYSCALL32 |
d30c5336 JK |
14527 | /* Needed for new procfs interface on sparc-solaris. */ |
14528 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14529 | #include <sys/procfs.h> |
bec39cab AC |
14530 | int |
14531 | main () | |
14532 | { | |
97bf5e38 | 14533 | psaddr_t avar |
bec39cab AC |
14534 | ; |
14535 | return 0; | |
14536 | } | |
14537 | _ACEOF | |
81ecdfbb | 14538 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14539 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 14540 | else |
81ecdfbb | 14541 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 14542 | |
c906108c | 14543 | fi |
81ecdfbb | 14544 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14545 | fi |
14546 | ||
97bf5e38 | 14547 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 14548 | |
81ecdfbb | 14549 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 14550 | |
97bf5e38 | 14551 | fi |
81ecdfbb RW |
14552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
14553 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 14554 | |
81ecdfbb RW |
14555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
14556 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
14557 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
14558 | $as_echo_n "(cached) " >&6 | |
c906108c | 14559 | else |
81ecdfbb | 14560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14561 | /* end confdefs.h. */ |
c906108c | 14562 | |
97bf5e38 | 14563 | #define _SYSCALL32 |
d30c5336 JK |
14564 | /* Needed for new procfs interface on sparc-solaris. */ |
14565 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14566 | #include <sys/procfs.h> |
bec39cab AC |
14567 | int |
14568 | main () | |
14569 | { | |
97bf5e38 | 14570 | prsysent_t avar |
bec39cab AC |
14571 | ; |
14572 | return 0; | |
14573 | } | |
14574 | _ACEOF | |
81ecdfbb | 14575 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14576 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 14577 | else |
81ecdfbb | 14578 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 14579 | |
c906108c | 14580 | fi |
81ecdfbb | 14581 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14582 | fi |
14583 | ||
97bf5e38 | 14584 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 14585 | |
81ecdfbb | 14586 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 14587 | |
97bf5e38 | 14588 | fi |
81ecdfbb RW |
14589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
14590 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 14591 | |
81ecdfbb RW |
14592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
14593 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
14594 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
14595 | $as_echo_n "(cached) " >&6 | |
c906108c | 14596 | else |
81ecdfbb | 14597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14598 | /* end confdefs.h. */ |
c906108c | 14599 | |
97bf5e38 | 14600 | #define _SYSCALL32 |
d30c5336 JK |
14601 | /* Needed for new procfs interface on sparc-solaris. */ |
14602 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14603 | #include <sys/procfs.h> |
bec39cab AC |
14604 | int |
14605 | main () | |
14606 | { | |
97bf5e38 | 14607 | pr_sigset_t avar |
bec39cab AC |
14608 | ; |
14609 | return 0; | |
14610 | } | |
14611 | _ACEOF | |
81ecdfbb | 14612 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14613 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 14614 | else |
81ecdfbb | 14615 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 14616 | |
c906108c | 14617 | fi |
81ecdfbb | 14618 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14619 | fi |
14620 | ||
97bf5e38 | 14621 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 14622 | |
81ecdfbb | 14623 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 14624 | |
97bf5e38 | 14625 | fi |
81ecdfbb RW |
14626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
14627 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 14628 | |
81ecdfbb RW |
14629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
14630 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
14631 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
14632 | $as_echo_n "(cached) " >&6 | |
c906108c | 14633 | else |
81ecdfbb | 14634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14635 | /* end confdefs.h. */ |
c906108c | 14636 | |
97bf5e38 | 14637 | #define _SYSCALL32 |
d30c5336 JK |
14638 | /* Needed for new procfs interface on sparc-solaris. */ |
14639 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14640 | #include <sys/procfs.h> |
bec39cab AC |
14641 | int |
14642 | main () | |
14643 | { | |
97bf5e38 | 14644 | pr_sigaction64_t avar |
bec39cab AC |
14645 | ; |
14646 | return 0; | |
14647 | } | |
14648 | _ACEOF | |
81ecdfbb | 14649 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14650 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 14651 | else |
81ecdfbb | 14652 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 14653 | |
c906108c | 14654 | fi |
81ecdfbb | 14655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14656 | fi |
14657 | ||
97bf5e38 | 14658 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 14659 | |
81ecdfbb | 14660 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 14661 | |
97bf5e38 | 14662 | fi |
81ecdfbb RW |
14663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
14664 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 14665 | |
81ecdfbb RW |
14666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
14667 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
14668 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
14669 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14670 | else |
81ecdfbb | 14671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14672 | /* end confdefs.h. */ |
97bf5e38 MK |
14673 | |
14674 | #define _SYSCALL32 | |
d30c5336 JK |
14675 | /* Needed for new procfs interface on sparc-solaris. */ |
14676 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14677 | #include <sys/procfs.h> |
bec39cab AC |
14678 | int |
14679 | main () | |
14680 | { | |
97bf5e38 | 14681 | pr_siginfo64_t avar |
bec39cab AC |
14682 | ; |
14683 | return 0; | |
14684 | } | |
14685 | _ACEOF | |
81ecdfbb | 14686 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14687 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
14688 | else | |
81ecdfbb | 14689 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 14690 | |
97bf5e38 | 14691 | fi |
81ecdfbb | 14692 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14693 | fi |
c906108c | 14694 | |
97bf5e38 | 14695 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 14696 | |
81ecdfbb | 14697 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 14698 | |
97bf5e38 | 14699 | fi |
81ecdfbb RW |
14700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
14701 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
14702 | |
14703 | ||
97bf5e38 MK |
14704 | |
14705 | ||
14706 | ||
97bf5e38 | 14707 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
14708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
14709 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
14710 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
14711 | $as_echo_n "(cached) " >&6 | |
c906108c | 14712 | else |
81ecdfbb | 14713 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 14714 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 14715 | else |
81ecdfbb | 14716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14717 | /* end confdefs.h. */ |
97bf5e38 MK |
14718 | #include <sys/procfs.h> |
14719 | int main () | |
14720 | { | |
14721 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
14722 | return 1; | |
14723 | return 0; | |
14724 | } | |
bec39cab | 14725 | _ACEOF |
81ecdfbb | 14726 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14727 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
14728 | else |
14729 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 14730 | fi |
81ecdfbb RW |
14731 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14732 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14733 | fi |
81ecdfbb | 14734 | |
c906108c SS |
14735 | fi |
14736 | ||
81ecdfbb RW |
14737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
14738 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 14739 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 14740 | |
81ecdfbb | 14741 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 14742 | |
97bf5e38 MK |
14743 | fi |
14744 | fi | |
c906108c | 14745 | fi |
c906108c | 14746 | |
bc8bcb4b | 14747 | # Check if the compiler supports the `long long' type. |
c906108c | 14748 | |
81ecdfbb RW |
14749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
14750 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
14751 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
14752 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14753 | else |
81ecdfbb | 14754 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14755 | /* end confdefs.h. */ |
bc8bcb4b | 14756 | extern long long foo; |
bec39cab AC |
14757 | int |
14758 | main () | |
14759 | { | |
bc8bcb4b | 14760 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
14761 | ; |
14762 | return 0; | |
14763 | } | |
14764 | _ACEOF | |
81ecdfbb | 14765 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14766 | gdb_cv_c_long_long=yes |
14767 | else | |
81ecdfbb | 14768 | gdb_cv_c_long_long=no |
97bf5e38 | 14769 | fi |
81ecdfbb | 14770 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14771 | fi |
81ecdfbb RW |
14772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
14773 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
14774 | if test $gdb_cv_c_long_long != yes; then |
14775 | # libdecnumber requires long long. | |
14776 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
14777 | fi |
14778 | ||
bc8bcb4b | 14779 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 14780 | |
81ecdfbb RW |
14781 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
14782 | $as_echo_n "checking for long long support in printf... " >&6; } | |
14783 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
14784 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14785 | else |
81ecdfbb | 14786 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14787 | gdb_cv_printf_has_long_long=no |
14788 | else | |
81ecdfbb | 14789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14790 | /* end confdefs.h. */ |
bc8bcb4b MK |
14791 | $ac_includes_default |
14792 | int | |
14793 | main () | |
14794 | { | |
14795 | char buf[32]; | |
97bf5e38 MK |
14796 | long long l = 0; |
14797 | l = (l << 16) + 0x0123; | |
14798 | l = (l << 16) + 0x4567; | |
14799 | l = (l << 16) + 0x89ab; | |
14800 | l = (l << 16) + 0xcdef; | |
14801 | sprintf (buf, "0x%016llx", l); | |
14802 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
14803 | ; |
14804 | return 0; | |
c906108c | 14805 | } |
bec39cab | 14806 | _ACEOF |
81ecdfbb | 14807 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14808 | gdb_cv_printf_has_long_long=yes |
14809 | else | |
81ecdfbb | 14810 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 14811 | fi |
81ecdfbb RW |
14812 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14813 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14814 | fi |
81ecdfbb | 14815 | |
97bf5e38 | 14816 | fi |
81ecdfbb RW |
14817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
14818 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 14819 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 14820 | |
81ecdfbb | 14821 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14822 | |
14823 | fi | |
97bf5e38 | 14824 | |
1a619819 LM |
14825 | # Check if the compiler and runtime support printing decfloats. |
14826 | ||
81ecdfbb RW |
14827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
14828 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
14829 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
14830 | $as_echo_n "(cached) " >&6 | |
1a619819 | 14831 | else |
81ecdfbb | 14832 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
14833 | gdb_cv_printf_has_decfloat=no |
14834 | else | |
81ecdfbb | 14835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
14836 | /* end confdefs.h. */ |
14837 | $ac_includes_default | |
14838 | int | |
14839 | main () | |
14840 | { | |
14841 | char buf[64]; | |
14842 | _Decimal32 d32 = 1.2345df; | |
14843 | _Decimal64 d64 = 1.2345dd; | |
14844 | _Decimal128 d128 = 1.2345dl; | |
14845 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
14846 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
14847 | ; | |
14848 | return 0; | |
14849 | } | |
14850 | _ACEOF | |
81ecdfbb | 14851 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
14852 | gdb_cv_printf_has_decfloat=yes |
14853 | else | |
81ecdfbb | 14854 | gdb_cv_printf_has_decfloat=no |
1a619819 | 14855 | fi |
81ecdfbb RW |
14856 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14857 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 14858 | fi |
81ecdfbb | 14859 | |
1a619819 | 14860 | fi |
81ecdfbb RW |
14861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
14862 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
14863 | if test $gdb_cv_printf_has_decfloat = yes; then |
14864 | ||
81ecdfbb | 14865 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
14866 | |
14867 | fi | |
14868 | ||
bc8bcb4b MK |
14869 | # Check if the compiler supports the `long double' type. We can't use |
14870 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
14871 | # constants defined in <float.h> that fail on some systems, | |
14872 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 14873 | |
81ecdfbb RW |
14874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
14875 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
14876 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
14877 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14878 | else |
81ecdfbb | 14879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14880 | /* end confdefs.h. */ |
97bf5e38 | 14881 | long double foo; |
bec39cab | 14882 | _ACEOF |
81ecdfbb | 14883 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 14884 | gdb_cv_c_long_double=yes |
97bf5e38 | 14885 | else |
81ecdfbb | 14886 | gdb_cv_c_long_double=no |
97bf5e38 | 14887 | fi |
81ecdfbb | 14888 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14889 | fi |
81ecdfbb RW |
14890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
14891 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 14892 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 14893 | |
81ecdfbb | 14894 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14895 | |
14896 | fi | |
14897 | ||
bc8bcb4b | 14898 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14899 | |
81ecdfbb RW |
14900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14901 | $as_echo_n "checking for long double support in printf... " >&6; } | |
14902 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
14903 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14904 | else |
81ecdfbb | 14905 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14906 | gdb_cv_printf_has_long_double=no |
14907 | else | |
81ecdfbb | 14908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14909 | /* end confdefs.h. */ |
bc8bcb4b MK |
14910 | $ac_includes_default |
14911 | int | |
14912 | main () | |
14913 | { | |
14914 | char buf[16]; | |
97bf5e38 MK |
14915 | long double f = 3.141592653; |
14916 | sprintf (buf, "%Lg", f); | |
14917 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14918 | ; |
14919 | return 0; | |
97bf5e38 | 14920 | } |
bec39cab | 14921 | _ACEOF |
81ecdfbb | 14922 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14923 | gdb_cv_printf_has_long_double=yes |
c906108c | 14924 | else |
81ecdfbb | 14925 | gdb_cv_printf_has_long_double=no |
c906108c | 14926 | fi |
81ecdfbb RW |
14927 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14928 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14929 | fi |
81ecdfbb | 14930 | |
c906108c | 14931 | fi |
81ecdfbb RW |
14932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14933 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14934 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14935 | |
81ecdfbb | 14936 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14937 | |
14938 | fi | |
97bf5e38 | 14939 | |
bc8bcb4b | 14940 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14941 | |
81ecdfbb RW |
14942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14943 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
14944 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
14945 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14946 | else |
81ecdfbb | 14947 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14948 | gdb_cv_scanf_has_long_double=no |
14949 | else | |
81ecdfbb | 14950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14951 | /* end confdefs.h. */ |
bc8bcb4b MK |
14952 | #include <stdio.h> |
14953 | int | |
14954 | main () | |
14955 | { | |
14956 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14957 | long double f = 0; |
14958 | sscanf (buf, "%Lg", &f); | |
14959 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14960 | ; |
14961 | return 0; | |
97bf5e38 | 14962 | } |
bec39cab | 14963 | _ACEOF |
81ecdfbb | 14964 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14965 | gdb_cv_scanf_has_long_double=yes |
14966 | else | |
81ecdfbb | 14967 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14968 | fi |
81ecdfbb RW |
14969 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14970 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14971 | fi |
81ecdfbb | 14972 | |
c906108c | 14973 | fi |
81ecdfbb RW |
14974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14975 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14976 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14977 | |
81ecdfbb | 14978 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14979 | |
14980 | fi | |
c906108c | 14981 | |
438013df AO |
14982 | case ${host_os} in |
14983 | aix*) | |
81ecdfbb RW |
14984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14985 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
14986 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
14987 | $as_echo_n "(cached) " >&6 | |
438013df | 14988 | else |
bec39cab | 14989 | |
438013df AO |
14990 | SAVE_LDFLAGS=$LDFLAGS |
14991 | ||
14992 | case $GCC in | |
14993 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14994 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14995 | esac | |
14996 | ||
14997 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14999 | /* end confdefs.h. */ |
438013df | 15000 | |
bec39cab AC |
15001 | int |
15002 | main () | |
15003 | { | |
438013df | 15004 | int i; |
bec39cab AC |
15005 | ; |
15006 | return 0; | |
15007 | } | |
15008 | _ACEOF | |
81ecdfbb | 15009 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15010 | |
81ecdfbb RW |
15011 | else |
15012 | gdb_cv_bigtoc= | |
438013df | 15013 | fi |
81ecdfbb RW |
15014 | rm -f core conftest.err conftest.$ac_objext \ |
15015 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 15016 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 15017 | |
bec39cab | 15018 | fi |
81ecdfbb RW |
15019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
15020 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
15021 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
15022 | ;; | |
15023 | esac | |
15024 | ||
38f6b338 | 15025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 15026 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
15027 | dynamic_list=false |
15028 | if test "${gdb_native}" = yes; then | |
15029 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
15030 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
15031 | # may not be supported there. | |
15032 | old_LDFLAGS="$LDFLAGS" | |
15033 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
15034 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
15035 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
15036 | if test "${have_libpython}" = no; then | |
15037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
15038 | /* end confdefs.h. */ |
15039 | ||
15040 | int | |
15041 | main () | |
15042 | { | |
15043 | ||
15044 | ; | |
15045 | return 0; | |
15046 | } | |
15047 | _ACEOF | |
15048 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
15049 | dynamic_list=true |
15050 | fi | |
15051 | rm -f core conftest.err conftest.$ac_objext \ | |
15052 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
15053 | else |
15054 | # Workaround http://bugs.python.org/issue4434 where static | |
15055 | # libpythonX.Y.a would get its symbols required for | |
15056 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
15057 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
15058 | |
15059 | # Note the workaround for Python | |
15060 | # http://bugs.python.org/issue10112 earlier has removed | |
15061 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
15062 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
15063 | # always pass. | |
38f6b338 JK |
15064 | old_CFLAGS="$CFLAGS" |
15065 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
15066 | old_LIBS="$LIBS" |
15067 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
15068 | old_CPPFLAGS="$CPPFLAGS" |
15069 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 15070 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 15071 | true |
f6528abd | 15072 | else |
3bebe2f2 JK |
15073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15074 | /* end confdefs.h. */ | |
1b4f615e | 15075 | #include "Python.h" |
3bebe2f2 JK |
15076 | int |
15077 | main () | |
15078 | { | |
15079 | int err; | |
38f6b338 JK |
15080 | Py_Initialize (); |
15081 | err = PyRun_SimpleString ("import itertools\n"); | |
15082 | Py_Finalize (); | |
15083 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
15084 | ; |
15085 | return 0; | |
15086 | } | |
15087 | _ACEOF | |
15088 | if ac_fn_c_try_run "$LINENO"; then : | |
15089 | dynamic_list=true | |
15090 | fi | |
15091 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15092 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15093 | fi | |
15094 | ||
8c1fb155 | 15095 | LIBS="$old_LIBS" |
38f6b338 | 15096 | CFLAGS="$old_CFLAGS" |
1b4f615e | 15097 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
15098 | fi |
15099 | LDFLAGS="$old_LDFLAGS" | |
15100 | fi | |
15101 | if $dynamic_list; then | |
15102 | found="-Wl,--dynamic-list" | |
15103 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 15104 | else |
38f6b338 JK |
15105 | found="-rdynamic" |
15106 | RDYNAMIC="-rdynamic" | |
f6528abd | 15107 | fi |
f6528abd | 15108 | |
38f6b338 | 15109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 15110 | $as_echo "$found" >&6; } |
0407b3f1 | 15111 | |
f6528abd | 15112 | |
0407b3f1 | 15113 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 15114 | case ${host_os} in |
d92419e5 | 15115 | aix*) |
81ecdfbb RW |
15116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
15117 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
15118 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
15119 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15120 | else |
81ecdfbb | 15121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15122 | /* end confdefs.h. */ |
d92419e5 | 15123 | #include <sys/pthdebug.h> |
bec39cab AC |
15124 | int |
15125 | main () | |
15126 | { | |
d92419e5 JB |
15127 | #ifndef PTHDB_VERSION_3 |
15128 | #error | |
15129 | #endif | |
bec39cab AC |
15130 | ; |
15131 | return 0; | |
15132 | } | |
15133 | _ACEOF | |
81ecdfbb | 15134 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
15135 | gdb_cv_have_aix_thread_debug=yes |
15136 | else | |
81ecdfbb | 15137 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 15138 | fi |
81ecdfbb | 15139 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
15140 | fi |
15141 | ||
81ecdfbb RW |
15142 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
15143 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
15144 | if test $gdb_cv_have_aix_thread_debug = yes; then |
15145 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 15146 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 15147 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
15148 | |
15149 | # Older versions of AIX do not provide the declaration for | |
15150 | # the getthrds function (it appears that it was introduced | |
15151 | # with AIX 6.x). | |
15152 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
15153 | " | |
15154 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
15155 | ac_have_decl=1 | |
15156 | else | |
15157 | ac_have_decl=0 | |
15158 | fi | |
15159 | ||
15160 | cat >>confdefs.h <<_ACEOF | |
15161 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
15162 | _ACEOF | |
15163 | ||
d92419e5 JB |
15164 | fi |
15165 | ;; | |
c906108c | 15166 | esac |
bec39cab | 15167 | |
c906108c SS |
15168 | fi |
15169 | ||
3f47be5c | 15170 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
15171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
15172 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
15173 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
15174 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15175 | else |
81ecdfbb | 15176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15177 | /* end confdefs.h. */ |
3f47be5c | 15178 | #include <thread_db.h> |
bec39cab AC |
15179 | int |
15180 | main () | |
15181 | { | |
3f47be5c | 15182 | int i = TD_NOTALLOC; |
bec39cab AC |
15183 | ; |
15184 | return 0; | |
15185 | } | |
15186 | _ACEOF | |
81ecdfbb | 15187 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
15188 | gdb_cv_thread_db_h_has_td_notalloc=yes |
15189 | else | |
81ecdfbb | 15190 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 15191 | |
3f47be5c | 15192 | fi |
81ecdfbb | 15193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 15194 | |
bec39cab | 15195 | fi |
81ecdfbb RW |
15196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
15197 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
15198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
15199 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
15200 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
15201 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 15202 | else |
81ecdfbb | 15203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15204 | /* end confdefs.h. */ |
15205 | #include <thread_db.h> | |
15206 | int | |
15207 | main () | |
15208 | { | |
15209 | int i = TD_VERSION; | |
15210 | ; | |
15211 | return 0; | |
15212 | } | |
15213 | _ACEOF | |
81ecdfbb | 15214 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15215 | gdb_cv_thread_db_h_has_td_version=yes |
15216 | else | |
81ecdfbb | 15217 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
15218 | |
15219 | fi | |
81ecdfbb | 15220 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15221 | |
15222 | fi | |
81ecdfbb RW |
15223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
15224 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
15225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
15226 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
15227 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
15228 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 15229 | else |
81ecdfbb | 15230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15231 | /* end confdefs.h. */ |
15232 | #include <thread_db.h> | |
15233 | int | |
15234 | main () | |
15235 | { | |
15236 | int i = TD_NOTLS; | |
15237 | ; | |
15238 | return 0; | |
15239 | } | |
15240 | _ACEOF | |
81ecdfbb | 15241 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15242 | gdb_cv_thread_db_h_has_td_notls=yes |
15243 | else | |
81ecdfbb | 15244 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
15245 | |
15246 | fi | |
81ecdfbb | 15247 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15248 | |
15249 | fi | |
81ecdfbb RW |
15250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
15251 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
15252 | fi |
15253 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 15254 | |
81ecdfbb | 15255 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 15256 | |
59f80f10 DJ |
15257 | fi |
15258 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
15259 | ||
81ecdfbb | 15260 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
15261 | |
15262 | fi | |
15263 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
15264 | ||
81ecdfbb | 15265 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 15266 | |
3f47be5c EZ |
15267 | fi |
15268 | ||
81ecdfbb RW |
15269 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
15270 | " | |
15271 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
15272 | ac_have_decl=1 | |
10568435 | 15273 | else |
81ecdfbb | 15274 | ac_have_decl=0 |
10568435 | 15275 | fi |
10568435 JK |
15276 | |
15277 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 15278 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
15279 | _ACEOF |
15280 | ||
15281 | ||
81ecdfbb RW |
15282 | if test "$cross_compiling" = yes; then : |
15283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
15284 | /* end confdefs.h. */ |
15285 | #include <sys/personality.h> | |
15286 | int | |
15287 | main () | |
15288 | { | |
15289 | ||
15290 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15291 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15292 | # endif | |
15293 | /* Test the flag could be set and stays set. */ | |
15294 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15295 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15296 | return 1 | |
15297 | ; | |
15298 | return 0; | |
15299 | } | |
15300 | _ACEOF | |
81ecdfbb | 15301 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
15302 | have_personality=true |
15303 | else | |
81ecdfbb | 15304 | have_personality=false |
10568435 | 15305 | fi |
81ecdfbb RW |
15306 | rm -f core conftest.err conftest.$ac_objext \ |
15307 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 15308 | else |
81ecdfbb | 15309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
15310 | /* end confdefs.h. */ |
15311 | #include <sys/personality.h> | |
15312 | int | |
15313 | main () | |
15314 | { | |
15315 | ||
15316 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15317 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15318 | # endif | |
15319 | /* Test the flag could be set and stays set. */ | |
15320 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15321 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15322 | return 1 | |
15323 | ; | |
15324 | return 0; | |
15325 | } | |
15326 | _ACEOF | |
81ecdfbb | 15327 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
15328 | have_personality=true |
15329 | else | |
81ecdfbb | 15330 | have_personality=false |
10568435 | 15331 | fi |
81ecdfbb RW |
15332 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15333 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 15334 | fi |
81ecdfbb | 15335 | |
10568435 JK |
15336 | if $have_personality |
15337 | then | |
15338 | ||
81ecdfbb | 15339 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
15340 | |
15341 | fi | |
15342 | ||
e655c1a2 PA |
15343 | case $host_os in |
15344 | go32* | *djgpp*) | |
15345 | gdbinit=gdb.ini | |
15346 | ;; | |
15347 | *) | |
15348 | gdbinit=.gdbinit | |
15349 | ;; | |
15350 | esac | |
15351 | ||
15352 | cat >>confdefs.h <<_ACEOF | |
15353 | #define GDBINIT "$gdbinit" | |
15354 | _ACEOF | |
15355 | ||
15356 | ||
fb40c209 | 15357 | |
f83d8a90 DE |
15358 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
15359 | # except that the argument to --with-sysroot is optional. | |
15360 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
15361 | if test "x$with_sysroot" = xyes; then | |
15362 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
15363 | fi | |
bec39cab | 15364 | |
81ecdfbb RW |
15365 | # Check whether --with-sysroot was given. |
15366 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
15367 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
15368 | else | |
15369 | TARGET_SYSTEM_ROOT= | |
15370 | fi | |
030292b7 | 15371 | |
030292b7 | 15372 | |
f83d8a90 DE |
15373 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
15374 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15375 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
15376 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 15377 | |
f83d8a90 DE |
15378 | cat >>confdefs.h <<_ACEOF |
15379 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
15380 | _ACEOF | |
bec39cab | 15381 | |
030292b7 | 15382 | |
b14b1491 | 15383 | |
f83d8a90 DE |
15384 | |
15385 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
15386 | if test "x$prefix" = xNONE; then | |
15387 | test_prefix=/usr/local | |
15388 | else | |
15389 | test_prefix=$prefix | |
15390 | fi | |
15391 | else | |
15392 | test_prefix=$exec_prefix | |
15393 | fi | |
15394 | value=0 | |
15395 | case ${ac_define_dir} in | |
15396 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15397 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15398 | value=1 | |
15399 | ;; | |
15400 | esac | |
15401 | ||
15402 | cat >>confdefs.h <<_ACEOF | |
15403 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
15404 | _ACEOF | |
030292b7 DJ |
15405 | |
15406 | ||
15407 | ||
16e7150e | 15408 | |
16e7150e | 15409 | |
81ecdfbb RW |
15410 | # Check whether --with-system-gdbinit was given. |
15411 | if test "${with_system_gdbinit+set}" = set; then : | |
15412 | withval=$with_system_gdbinit; | |
b14b1491 TT |
15413 | SYSTEM_GDBINIT=$withval |
15414 | else | |
15415 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
15416 | fi |
15417 | ||
16e7150e JG |
15418 | |
15419 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
15420 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 15421 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
15422 | ac_define_dir=`eval echo $ac_define_dir` |
15423 | ||
15424 | cat >>confdefs.h <<_ACEOF | |
15425 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
15426 | _ACEOF | |
15427 | ||
15428 | ||
15429 | ||
0c4a4063 | 15430 | |
b14b1491 TT |
15431 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
15432 | if test "x$prefix" = xNONE; then | |
15433 | test_prefix=/usr/local | |
15434 | else | |
15435 | test_prefix=$prefix | |
15436 | fi | |
15437 | else | |
15438 | test_prefix=$exec_prefix | |
15439 | fi | |
15440 | value=0 | |
15441 | case ${ac_define_dir} in | |
15442 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15443 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15444 | value=1 | |
15445 | ;; | |
15446 | esac | |
16e7150e | 15447 | |
b14b1491 TT |
15448 | cat >>confdefs.h <<_ACEOF |
15449 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
15450 | _ACEOF |
15451 | ||
b14b1491 | 15452 | |
16e7150e | 15453 | |
0c4a4063 | 15454 | |
b835bb52 | 15455 | |
81ecdfbb RW |
15456 | # Check whether --enable-werror was given. |
15457 | if test "${enable_werror+set}" = set; then : | |
15458 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
15459 | yes | y) ERROR_ON_WARNING="yes" ;; |
15460 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 15461 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 15462 | esac |
81ecdfbb RW |
15463 | fi |
15464 | ||
094a342e | 15465 | |
9a084706 PA |
15466 | # Enable -Werror by default when using gcc. Turn it off for releases. |
15467 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
15468 | ERROR_ON_WARNING=yes |
15469 | fi | |
15470 | ||
15471 | WERROR_CFLAGS="" | |
15472 | if test "${ERROR_ON_WARNING}" = yes ; then | |
15473 | WERROR_CFLAGS="-Werror" | |
15474 | fi | |
15475 | ||
cf6de44d | 15476 | # The options we'll try to enable. |
aac331e4 | 15477 | build_warnings="-Wall -Wpointer-arith \ |
1cb5e2a4 | 15478 | -Wno-unused -Wunused-value -Wunused-function \ |
aac331e4 | 15479 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 15480 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
8465943a SM |
15481 | -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \ |
15482 | -Wno-mismatched-tags" | |
3bc3d82a | 15483 | |
3526781e | 15484 | case "${host}" in |
4fa7574e RO |
15485 | *-*-mingw32*) |
15486 | # Enable -Wno-format by default when using gcc on mingw since many | |
15487 | # GCC versions complain about %I64. | |
15488 | build_warnings="$build_warnings -Wno-format" ;; | |
15489 | *-*-solaris*) | |
15490 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
15491 | # doesn't understand. | |
15492 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
15493 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
15494 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
d3685d60 | 15495 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
15496 | esac |
15497 | ||
81ecdfbb RW |
15498 | # Check whether --enable-build-warnings was given. |
15499 | if test "${enable_build_warnings+set}" = set; then : | |
15500 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
15501 | yes) ;; |
15502 | no) build_warnings="-w";; | |
15503 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15504 | build_warnings="${build_warnings} ${t}";; | |
15505 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15506 | build_warnings="${t} ${build_warnings}";; | |
15507 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15508 | esac | |
d4f3574e | 15509 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 15510 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 15511 | fi |
81ecdfbb RW |
15512 | fi |
15513 | # Check whether --enable-gdb-build-warnings was given. | |
15514 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
15515 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
15516 | yes) ;; |
15517 | no) build_warnings="-w";; | |
15518 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15519 | build_warnings="${build_warnings} ${t}";; | |
15520 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15521 | build_warnings="${t} ${build_warnings}";; | |
15522 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15523 | esac | |
15524 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
15525 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
15526 | fi | |
81ecdfbb | 15527 | fi |
3bc3d82a PA |
15528 | |
15529 | # The set of warnings supported by a C++ compiler is not the same as | |
15530 | # of the C compiler. | |
cf6de44d | 15531 | ac_ext=cpp |
3bc3d82a PA |
15532 | ac_cpp='$CXXCPP $CPPFLAGS' |
15533 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15534 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15535 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
15536 | ||
3bc3d82a | 15537 | |
81ecdfbb | 15538 | WARN_CFLAGS="" |
c906108c SS |
15539 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
15540 | then | |
81ecdfbb RW |
15541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
15542 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
15543 | # Separate out the -Werror flag as some files just cannot be |
15544 | # compiled with it enabled. | |
15545 | for w in ${build_warnings}; do | |
7544db95 PA |
15546 | # GCC does not complain about -Wno-unknown-warning. Invert |
15547 | # and test -Wunknown-warning instead. | |
15548 | case $w in | |
15549 | -Wno-*) | |
15550 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
15551 | *) | |
15552 | wtest=$w ;; | |
15553 | esac | |
15554 | ||
746a987d AC |
15555 | case $w in |
15556 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
15557 | *) |
15558 | # Check whether GCC accepts it. | |
4536bbc6 | 15559 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 15560 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 15561 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 15562 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
54019719 | 15563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15564 | /* end confdefs.h. */ |
4536bbc6 | 15565 | |
bec39cab AC |
15566 | int |
15567 | main () | |
15568 | { | |
4536bbc6 | 15569 | |
bec39cab AC |
15570 | ; |
15571 | return 0; | |
15572 | } | |
15573 | _ACEOF | |
3bc3d82a | 15574 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 15575 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 15576 | fi |
81ecdfbb | 15577 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 15578 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 15579 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
15580 | esac |
15581 | done | |
81ecdfbb RW |
15582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
15583 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
15584 | fi |
15585 | ||
15586 | ||
104c1213 | 15587 | |
cf6de44d | 15588 | ac_ext=c |
3bc3d82a PA |
15589 | ac_cpp='$CPP $CPPFLAGS' |
15590 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15591 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15592 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
15593 | ||
3bc3d82a | 15594 | |
b835bb52 | 15595 | |
7a292a7a | 15596 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
15597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
15598 | $as_echo_n "checking for cygwin... " >&6; } | |
15599 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
15600 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15601 | else |
81ecdfbb | 15602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15603 | /* end confdefs.h. */ |
7a292a7a SS |
15604 | |
15605 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
15606 | lose | |
15607 | #endif | |
bec39cab | 15608 | _ACEOF |
7a292a7a | 15609 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 15610 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
15611 | gdb_cv_os_cygwin=yes |
15612 | else | |
7a292a7a SS |
15613 | gdb_cv_os_cygwin=no |
15614 | fi | |
15615 | rm -f conftest* | |
15616 | ||
15617 | fi | |
81ecdfbb RW |
15618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
15619 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 15620 | |
aff38e61 | 15621 | |
3eb25fda | 15622 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 15623 | case ${host} in |
95cbc983 AC |
15624 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
15625 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 15626 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
15627 | esac |
15628 | ||
15629 | ||
cd0fc7c3 SS |
15630 | # libreadline needs libuser32.a in a cygwin environment |
15631 | WIN32LIBS= | |
15632 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
15633 | WIN32LIBS="-luser32" |
15634 | case "${target}" in | |
15635 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
15636 | ;; | |
15637 | esac | |
cd0fc7c3 | 15638 | fi |
c906108c | 15639 | |
b4505029 MM |
15640 | # The ser-tcp.c module requires sockets. |
15641 | case ${host} in | |
15642 | *mingw32*) | |
15643 | ||
81ecdfbb | 15644 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
15645 | |
15646 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
15647 | ;; | |
15648 | esac | |
15649 | ||
7a292a7a | 15650 | |
31d99776 | 15651 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
15652 | |
15653 | OLD_CFLAGS=$CFLAGS | |
15654 | OLD_LDFLAGS=$LDFLAGS | |
15655 | OLD_LIBS=$LIBS | |
15656 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15657 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15658 | # always want our bfd. | |
15659 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15660 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15661 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 15662 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15663 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 15664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb RW |
15665 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
15666 | if test "${gdb_cv_var_elf+set}" = set; then : | |
15667 | $as_echo_n "(cached) " >&6 | |
31d99776 | 15668 | else |
81ecdfbb | 15669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
15670 | /* end confdefs.h. */ |
15671 | #include <stdlib.h> | |
def63ff0 TT |
15672 | #include "bfd.h" |
15673 | #include "elf-bfd.h" | |
31d99776 DJ |
15674 | |
15675 | int | |
15676 | main () | |
15677 | { | |
def63ff0 | 15678 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
15679 | ; |
15680 | return 0; | |
15681 | } | |
15682 | _ACEOF | |
81ecdfbb | 15683 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
15684 | gdb_cv_var_elf=yes |
15685 | else | |
81ecdfbb | 15686 | gdb_cv_var_elf=no |
31d99776 | 15687 | fi |
81ecdfbb RW |
15688 | rm -f core conftest.err conftest.$ac_objext \ |
15689 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 15690 | fi |
81ecdfbb RW |
15691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
15692 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
15693 | CFLAGS=$OLD_CFLAGS |
15694 | LDFLAGS=$OLD_LDFLAGS | |
15695 | LIBS=$OLD_LIBS | |
31d99776 | 15696 | if test $gdb_cv_var_elf = yes; then |
d4777acb | 15697 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 15698 | |
81ecdfbb | 15699 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 15700 | |
075ff26d JK |
15701 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
15702 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
15703 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
15704 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
15705 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15706 | $as_echo_n "(cached) " >&6 | |
15707 | else | |
15708 | ac_func_search_save_LIBS=$LIBS | |
15709 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15710 | /* end confdefs.h. */ | |
15711 | ||
15712 | /* Override any GCC internal prototype to avoid an error. | |
15713 | Use char because int might match the return type of a GCC | |
15714 | builtin and then its argument prototype would still apply. */ | |
15715 | #ifdef __cplusplus | |
15716 | extern "C" | |
15717 | #endif | |
15718 | char dlopen (); | |
15719 | int | |
15720 | main () | |
15721 | { | |
15722 | return dlopen (); | |
15723 | ; | |
15724 | return 0; | |
15725 | } | |
15726 | _ACEOF | |
15727 | for ac_lib in '' dl; do | |
15728 | if test -z "$ac_lib"; then | |
15729 | ac_res="none required" | |
15730 | else | |
15731 | ac_res=-l$ac_lib | |
15732 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
15733 | fi | |
15734 | if ac_fn_c_try_link "$LINENO"; then : | |
15735 | ac_cv_search_dlopen=$ac_res | |
15736 | fi | |
15737 | rm -f core conftest.err conftest.$ac_objext \ | |
15738 | conftest$ac_exeext | |
15739 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15740 | break | |
15741 | fi | |
15742 | done | |
15743 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15744 | ||
15745 | else | |
15746 | ac_cv_search_dlopen=no | |
15747 | fi | |
15748 | rm conftest.$ac_ext | |
15749 | LIBS=$ac_func_search_save_LIBS | |
15750 | fi | |
15751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
15752 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
15753 | ac_res=$ac_cv_search_dlopen | |
15754 | if test "$ac_res" != no; then : | |
15755 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
15756 | ||
15757 | fi | |
15758 | ||
075ff26d | 15759 | fi |
31d99776 | 15760 | fi |
31d99776 | 15761 | |
4f05add4 TT |
15762 | # Add macho support to GDB, but only if BFD includes it. |
15763 | ||
15764 | OLD_CFLAGS=$CFLAGS | |
15765 | OLD_LDFLAGS=$LDFLAGS | |
15766 | OLD_LIBS=$LIBS | |
15767 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15768 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15769 | # always want our bfd. | |
15770 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15771 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15772 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 15773 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15774 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
15775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
15776 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
15777 | if test "${gdb_cv_var_macho+set}" = set; then : | |
15778 | $as_echo_n "(cached) " >&6 | |
15779 | else | |
15780 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15781 | /* end confdefs.h. */ | |
15782 | #include <stdlib.h> | |
15783 | #include "bfd.h" | |
15784 | #include "mach-o.h" | |
15785 | ||
15786 | int | |
15787 | main () | |
15788 | { | |
15789 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
15790 | ; | |
15791 | return 0; | |
15792 | } | |
15793 | _ACEOF | |
15794 | if ac_fn_c_try_link "$LINENO"; then : | |
15795 | gdb_cv_var_macho=yes | |
15796 | else | |
15797 | gdb_cv_var_macho=no | |
15798 | fi | |
15799 | rm -f core conftest.err conftest.$ac_objext \ | |
15800 | conftest$ac_exeext conftest.$ac_ext | |
15801 | fi | |
15802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
15803 | $as_echo "$gdb_cv_var_macho" >&6; } | |
15804 | CFLAGS=$OLD_CFLAGS | |
15805 | LDFLAGS=$OLD_LDFLAGS | |
15806 | LIBS=$OLD_LIBS | |
15807 | if test $gdb_cv_var_macho = yes; then | |
15808 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
15809 | fi | |
15810 | ||
121ce6e5 DJ |
15811 | # Add any host-specific objects to GDB. |
15812 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
15813 | ||
608e2dbb TT |
15814 | # If building on ELF, look for lzma support for embedded compressed debug info. |
15815 | if test $gdb_cv_var_elf = yes; then | |
15816 | ||
15817 | # Check whether --with-lzma was given. | |
15818 | if test "${with_lzma+set}" = set; then : | |
15819 | withval=$with_lzma; | |
15820 | else | |
15821 | with_lzma=auto | |
15822 | fi | |
15823 | ||
15824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
15825 | $as_echo_n "checking whether to use lzma... " >&6; } | |
15826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
15827 | $as_echo "$with_lzma" >&6; } | |
15828 | ||
15829 | if test "${with_lzma}" != no; then | |
15830 | ||
15831 | ||
15832 | ||
15833 | ||
15834 | ||
15835 | ||
15836 | ||
15837 | ||
15838 | use_additional=yes | |
15839 | ||
15840 | acl_save_prefix="$prefix" | |
15841 | prefix="$acl_final_prefix" | |
15842 | acl_save_exec_prefix="$exec_prefix" | |
15843 | exec_prefix="$acl_final_exec_prefix" | |
15844 | ||
15845 | eval additional_includedir=\"$includedir\" | |
15846 | eval additional_libdir=\"$libdir\" | |
15847 | ||
15848 | exec_prefix="$acl_save_exec_prefix" | |
15849 | prefix="$acl_save_prefix" | |
15850 | ||
15851 | ||
15852 | # Check whether --with-liblzma-prefix was given. | |
15853 | if test "${with_liblzma_prefix+set}" = set; then : | |
15854 | withval=$with_liblzma_prefix; | |
15855 | if test "X$withval" = "Xno"; then | |
15856 | use_additional=no | |
15857 | else | |
15858 | if test "X$withval" = "X"; then | |
15859 | ||
15860 | acl_save_prefix="$prefix" | |
15861 | prefix="$acl_final_prefix" | |
15862 | acl_save_exec_prefix="$exec_prefix" | |
15863 | exec_prefix="$acl_final_exec_prefix" | |
15864 | ||
15865 | eval additional_includedir=\"$includedir\" | |
15866 | eval additional_libdir=\"$libdir\" | |
15867 | ||
15868 | exec_prefix="$acl_save_exec_prefix" | |
15869 | prefix="$acl_save_prefix" | |
15870 | ||
15871 | else | |
15872 | additional_includedir="$withval/include" | |
15873 | additional_libdir="$withval/lib" | |
15874 | fi | |
15875 | fi | |
15876 | ||
15877 | fi | |
15878 | ||
15879 | LIBLZMA= | |
15880 | LTLIBLZMA= | |
15881 | INCLZMA= | |
15882 | rpathdirs= | |
15883 | ltrpathdirs= | |
15884 | names_already_handled= | |
15885 | names_next_round='lzma ' | |
15886 | while test -n "$names_next_round"; do | |
15887 | names_this_round="$names_next_round" | |
15888 | names_next_round= | |
15889 | for name in $names_this_round; do | |
15890 | already_handled= | |
15891 | for n in $names_already_handled; do | |
15892 | if test "$n" = "$name"; then | |
15893 | already_handled=yes | |
15894 | break | |
15895 | fi | |
15896 | done | |
15897 | if test -z "$already_handled"; then | |
15898 | names_already_handled="$names_already_handled $name" | |
15899 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
15900 | eval value=\"\$HAVE_LIB$uppername\" | |
15901 | if test -n "$value"; then | |
15902 | if test "$value" = yes; then | |
15903 | eval value=\"\$LIB$uppername\" | |
15904 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
15905 | eval value=\"\$LTLIB$uppername\" | |
15906 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
15907 | else | |
15908 | : | |
15909 | fi | |
15910 | else | |
15911 | found_dir= | |
15912 | found_la= | |
15913 | found_so= | |
15914 | found_a= | |
15915 | if test $use_additional = yes; then | |
15916 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
15917 | found_dir="$additional_libdir" | |
15918 | found_so="$additional_libdir/lib$name.$shlibext" | |
15919 | if test -f "$additional_libdir/lib$name.la"; then | |
15920 | found_la="$additional_libdir/lib$name.la" | |
15921 | fi | |
15922 | else | |
15923 | if test -f "$additional_libdir/lib$name.$libext"; then | |
15924 | found_dir="$additional_libdir" | |
15925 | found_a="$additional_libdir/lib$name.$libext" | |
15926 | if test -f "$additional_libdir/lib$name.la"; then | |
15927 | found_la="$additional_libdir/lib$name.la" | |
15928 | fi | |
15929 | fi | |
15930 | fi | |
15931 | fi | |
15932 | if test "X$found_dir" = "X"; then | |
15933 | for x in $LDFLAGS $LTLIBLZMA; do | |
15934 | ||
15935 | acl_save_prefix="$prefix" | |
15936 | prefix="$acl_final_prefix" | |
15937 | acl_save_exec_prefix="$exec_prefix" | |
15938 | exec_prefix="$acl_final_exec_prefix" | |
15939 | eval x=\"$x\" | |
15940 | exec_prefix="$acl_save_exec_prefix" | |
15941 | prefix="$acl_save_prefix" | |
15942 | ||
15943 | case "$x" in | |
15944 | -L*) | |
15945 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
15946 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
15947 | found_dir="$dir" | |
15948 | found_so="$dir/lib$name.$shlibext" | |
15949 | if test -f "$dir/lib$name.la"; then | |
15950 | found_la="$dir/lib$name.la" | |
15951 | fi | |
15952 | else | |
15953 | if test -f "$dir/lib$name.$libext"; then | |
15954 | found_dir="$dir" | |
15955 | found_a="$dir/lib$name.$libext" | |
15956 | if test -f "$dir/lib$name.la"; then | |
15957 | found_la="$dir/lib$name.la" | |
15958 | fi | |
15959 | fi | |
15960 | fi | |
15961 | ;; | |
15962 | esac | |
15963 | if test "X$found_dir" != "X"; then | |
15964 | break | |
15965 | fi | |
15966 | done | |
15967 | fi | |
15968 | if test "X$found_dir" != "X"; then | |
15969 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
15970 | if test "X$found_so" != "X"; then | |
15971 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
15972 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15973 | else | |
15974 | haveit= | |
15975 | for x in $ltrpathdirs; do | |
15976 | if test "X$x" = "X$found_dir"; then | |
15977 | haveit=yes | |
15978 | break | |
15979 | fi | |
15980 | done | |
15981 | if test -z "$haveit"; then | |
15982 | ltrpathdirs="$ltrpathdirs $found_dir" | |
15983 | fi | |
15984 | if test "$hardcode_direct" = yes; then | |
15985 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15986 | else | |
15987 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
15988 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15989 | haveit= | |
15990 | for x in $rpathdirs; do | |
15991 | if test "X$x" = "X$found_dir"; then | |
15992 | haveit=yes | |
15993 | break | |
15994 | fi | |
15995 | done | |
15996 | if test -z "$haveit"; then | |
15997 | rpathdirs="$rpathdirs $found_dir" | |
15998 | fi | |
15999 | else | |
16000 | haveit= | |
16001 | for x in $LDFLAGS $LIBLZMA; do | |
16002 | ||
16003 | acl_save_prefix="$prefix" | |
16004 | prefix="$acl_final_prefix" | |
16005 | acl_save_exec_prefix="$exec_prefix" | |
16006 | exec_prefix="$acl_final_exec_prefix" | |
16007 | eval x=\"$x\" | |
16008 | exec_prefix="$acl_save_exec_prefix" | |
16009 | prefix="$acl_save_prefix" | |
16010 | ||
16011 | if test "X$x" = "X-L$found_dir"; then | |
16012 | haveit=yes | |
16013 | break | |
16014 | fi | |
16015 | done | |
16016 | if test -z "$haveit"; then | |
16017 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
16018 | fi | |
16019 | if test "$hardcode_minus_L" != no; then | |
16020 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
16021 | else | |
16022 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
16023 | fi | |
16024 | fi | |
16025 | fi | |
16026 | fi | |
16027 | else | |
16028 | if test "X$found_a" != "X"; then | |
16029 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
16030 | else | |
16031 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
16032 | fi | |
16033 | fi | |
16034 | additional_includedir= | |
16035 | case "$found_dir" in | |
16036 | */lib | */lib/) | |
16037 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
16038 | additional_includedir="$basedir/include" | |
16039 | ;; | |
16040 | esac | |
16041 | if test "X$additional_includedir" != "X"; then | |
16042 | if test "X$additional_includedir" != "X/usr/include"; then | |
16043 | haveit= | |
16044 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
16045 | if test -n "$GCC"; then | |
16046 | case $host_os in | |
16047 | linux*) haveit=yes;; | |
16048 | esac | |
16049 | fi | |
16050 | fi | |
16051 | if test -z "$haveit"; then | |
16052 | for x in $CPPFLAGS $INCLZMA; do | |
16053 | ||
16054 | acl_save_prefix="$prefix" | |
16055 | prefix="$acl_final_prefix" | |
16056 | acl_save_exec_prefix="$exec_prefix" | |
16057 | exec_prefix="$acl_final_exec_prefix" | |
16058 | eval x=\"$x\" | |
16059 | exec_prefix="$acl_save_exec_prefix" | |
16060 | prefix="$acl_save_prefix" | |
16061 | ||
16062 | if test "X$x" = "X-I$additional_includedir"; then | |
16063 | haveit=yes | |
16064 | break | |
16065 | fi | |
16066 | done | |
16067 | if test -z "$haveit"; then | |
16068 | if test -d "$additional_includedir"; then | |
16069 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
16070 | fi | |
16071 | fi | |
16072 | fi | |
16073 | fi | |
16074 | fi | |
16075 | if test -n "$found_la"; then | |
16076 | save_libdir="$libdir" | |
16077 | case "$found_la" in | |
16078 | */* | *\\*) . "$found_la" ;; | |
16079 | *) . "./$found_la" ;; | |
16080 | esac | |
16081 | libdir="$save_libdir" | |
16082 | for dep in $dependency_libs; do | |
16083 | case "$dep" in | |
16084 | -L*) | |
16085 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
16086 | if test "X$additional_libdir" != "X/usr/lib"; then | |
16087 | haveit= | |
16088 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
16089 | if test -n "$GCC"; then | |
16090 | case $host_os in | |
16091 | linux*) haveit=yes;; | |
16092 | esac | |
16093 | fi | |
16094 | fi | |
16095 | if test -z "$haveit"; then | |
16096 | haveit= | |
16097 | for x in $LDFLAGS $LIBLZMA; do | |
16098 | ||
16099 | acl_save_prefix="$prefix" | |
16100 | prefix="$acl_final_prefix" | |
16101 | acl_save_exec_prefix="$exec_prefix" | |
16102 | exec_prefix="$acl_final_exec_prefix" | |
16103 | eval x=\"$x\" | |
16104 | exec_prefix="$acl_save_exec_prefix" | |
16105 | prefix="$acl_save_prefix" | |
16106 | ||
16107 | if test "X$x" = "X-L$additional_libdir"; then | |
16108 | haveit=yes | |
16109 | break | |
16110 | fi | |
16111 | done | |
16112 | if test -z "$haveit"; then | |
16113 | if test -d "$additional_libdir"; then | |
16114 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
16115 | fi | |
16116 | fi | |
16117 | haveit= | |
16118 | for x in $LDFLAGS $LTLIBLZMA; do | |
16119 | ||
16120 | acl_save_prefix="$prefix" | |
16121 | prefix="$acl_final_prefix" | |
16122 | acl_save_exec_prefix="$exec_prefix" | |
16123 | exec_prefix="$acl_final_exec_prefix" | |
16124 | eval x=\"$x\" | |
16125 | exec_prefix="$acl_save_exec_prefix" | |
16126 | prefix="$acl_save_prefix" | |
16127 | ||
16128 | if test "X$x" = "X-L$additional_libdir"; then | |
16129 | haveit=yes | |
16130 | break | |
16131 | fi | |
16132 | done | |
16133 | if test -z "$haveit"; then | |
16134 | if test -d "$additional_libdir"; then | |
16135 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
16136 | fi | |
16137 | fi | |
16138 | fi | |
16139 | fi | |
16140 | ;; | |
16141 | -R*) | |
16142 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
16143 | if test "$enable_rpath" != no; then | |
16144 | haveit= | |
16145 | for x in $rpathdirs; do | |
16146 | if test "X$x" = "X$dir"; then | |
16147 | haveit=yes | |
16148 | break | |
16149 | fi | |
16150 | done | |
16151 | if test -z "$haveit"; then | |
16152 | rpathdirs="$rpathdirs $dir" | |
16153 | fi | |
16154 | haveit= | |
16155 | for x in $ltrpathdirs; do | |
16156 | if test "X$x" = "X$dir"; then | |
16157 | haveit=yes | |
16158 | break | |
16159 | fi | |
16160 | done | |
16161 | if test -z "$haveit"; then | |
16162 | ltrpathdirs="$ltrpathdirs $dir" | |
16163 | fi | |
16164 | fi | |
16165 | ;; | |
16166 | -l*) | |
16167 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
16168 | ;; | |
16169 | *.la) | |
16170 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
16171 | ;; | |
16172 | *) | |
16173 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
16174 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
16175 | ;; | |
16176 | esac | |
16177 | done | |
16178 | fi | |
16179 | else | |
16180 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
16181 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
16182 | fi | |
16183 | fi | |
16184 | fi | |
16185 | done | |
16186 | done | |
16187 | if test "X$rpathdirs" != "X"; then | |
16188 | if test -n "$hardcode_libdir_separator"; then | |
16189 | alldirs= | |
16190 | for found_dir in $rpathdirs; do | |
16191 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
16192 | done | |
16193 | acl_save_libdir="$libdir" | |
16194 | libdir="$alldirs" | |
16195 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16196 | libdir="$acl_save_libdir" | |
16197 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16198 | else | |
16199 | for found_dir in $rpathdirs; do | |
16200 | acl_save_libdir="$libdir" | |
16201 | libdir="$found_dir" | |
16202 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16203 | libdir="$acl_save_libdir" | |
16204 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16205 | done | |
16206 | fi | |
16207 | fi | |
16208 | if test "X$ltrpathdirs" != "X"; then | |
16209 | for found_dir in $ltrpathdirs; do | |
16210 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
16211 | done | |
16212 | fi | |
16213 | ||
16214 | ||
16215 | ac_save_CPPFLAGS="$CPPFLAGS" | |
16216 | ||
16217 | for element in $INCLZMA; do | |
16218 | haveit= | |
16219 | for x in $CPPFLAGS; do | |
16220 | ||
16221 | acl_save_prefix="$prefix" | |
16222 | prefix="$acl_final_prefix" | |
16223 | acl_save_exec_prefix="$exec_prefix" | |
16224 | exec_prefix="$acl_final_exec_prefix" | |
16225 | eval x=\"$x\" | |
16226 | exec_prefix="$acl_save_exec_prefix" | |
16227 | prefix="$acl_save_prefix" | |
16228 | ||
16229 | if test "X$x" = "X$element"; then | |
16230 | haveit=yes | |
16231 | break | |
16232 | fi | |
16233 | done | |
16234 | if test -z "$haveit"; then | |
16235 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
16236 | fi | |
16237 | done | |
16238 | ||
16239 | ||
16240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
16241 | $as_echo_n "checking for liblzma... " >&6; } | |
16242 | if test "${ac_cv_liblzma+set}" = set; then : | |
16243 | $as_echo_n "(cached) " >&6 | |
16244 | else | |
16245 | ||
16246 | ac_save_LIBS="$LIBS" | |
16247 | LIBS="$LIBS $LIBLZMA" | |
16248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16249 | /* end confdefs.h. */ | |
16250 | #include "lzma.h" | |
16251 | int | |
16252 | main () | |
16253 | { | |
16254 | lzma_index_iter iter; | |
16255 | lzma_index_iter_init (&iter, 0); | |
16256 | lzma_mf_is_supported (LZMA_MF_HC3); | |
16257 | ; | |
16258 | return 0; | |
16259 | } | |
16260 | _ACEOF | |
16261 | if ac_fn_c_try_link "$LINENO"; then : | |
16262 | ac_cv_liblzma=yes | |
16263 | else | |
16264 | ac_cv_liblzma=no | |
16265 | fi | |
16266 | rm -f core conftest.err conftest.$ac_objext \ | |
16267 | conftest$ac_exeext conftest.$ac_ext | |
16268 | LIBS="$ac_save_LIBS" | |
16269 | ||
16270 | fi | |
16271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
16272 | $as_echo "$ac_cv_liblzma" >&6; } | |
16273 | if test "$ac_cv_liblzma" = yes; then | |
16274 | HAVE_LIBLZMA=yes | |
16275 | ||
16276 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
16277 | ||
16278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
16279 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
16280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
16281 | $as_echo "$LIBLZMA" >&6; } | |
16282 | else | |
16283 | HAVE_LIBLZMA=no | |
16284 | CPPFLAGS="$ac_save_CPPFLAGS" | |
16285 | LIBLZMA= | |
16286 | LTLIBLZMA= | |
16287 | fi | |
16288 | ||
16289 | ||
16290 | ||
16291 | ||
16292 | ||
16293 | ||
16294 | if test "$HAVE_LIBLZMA" != yes; then | |
16295 | if test "$with_lzma" = yes; then | |
16296 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
16297 | fi | |
16298 | fi | |
16299 | fi | |
16300 | fi | |
16301 | ||
3fc11d3e JM |
16302 | LIBGUI="../libgui/src/libgui.a" |
16303 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
16304 | ||
16305 | ||
7a292a7a | 16306 | |
3fc11d3e JM |
16307 | WIN32LDAPP= |
16308 | ||
16309 | ||
16310 | ||
d91670b9 | 16311 | case "${host}" in |
686a5eed | 16312 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
16313 | configdir="win" |
16314 | ;; | |
16315 | *) | |
16316 | configdir="unix" | |
16317 | ;; | |
16318 | esac | |
3fc11d3e JM |
16319 | |
16320 | GDBTKLIBS= | |
16321 | if test "${enable_gdbtk}" = "yes"; then | |
16322 | ||
d1c3b63a KS |
16323 | # Gdbtk must have an absolute path to srcdir in order to run |
16324 | # properly when not installed. | |
16325 | here=`pwd` | |
16326 | cd ${srcdir} | |
16327 | GDBTK_SRC_DIR=`pwd` | |
16328 | cd $here | |
16329 | ||
bec39cab | 16330 | |
5062cc19 KS |
16331 | # |
16332 | # Ok, lets find the tcl configuration | |
16333 | # First, look for one uninstalled. | |
16334 | # the alternative search directory is invoked by --with-tcl | |
16335 | # | |
3fc11d3e | 16336 | |
5062cc19 KS |
16337 | if test x"${no_tcl}" = x ; then |
16338 | # we reset no_tcl in case something fails here | |
16339 | no_tcl=true | |
bec39cab | 16340 | |
81ecdfbb RW |
16341 | # Check whether --with-tcl was given. |
16342 | if test "${with_tcl+set}" = set; then : | |
16343 | withval=$with_tcl; with_tclconfig=${withval} | |
16344 | fi | |
16345 | ||
16346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
16347 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
16348 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
16349 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 16350 | else |
bec39cab | 16351 | |
3fc11d3e | 16352 | |
5062cc19 KS |
16353 | # First check to see if --with-tcl was specified. |
16354 | case "${host}" in | |
16355 | *-*-cygwin*) platDir="win" ;; | |
16356 | *) platDir="unix" ;; | |
16357 | esac | |
16358 | if test x"${with_tclconfig}" != x ; then | |
16359 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
16360 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
16361 | else | |
81ecdfbb | 16362 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16363 | fi |
16364 | fi | |
16365 | ||
16366 | # then check for a private Tcl installation | |
16367 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16368 | for i in \ | |
16369 | ../tcl \ | |
16370 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16371 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
16372 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16373 | ../../tcl \ | |
16374 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16375 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16376 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16377 | ../../../tcl \ | |
16378 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16379 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16380 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16381 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16382 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16383 | break | |
16384 | fi | |
16385 | done | |
16386 | fi | |
16387 | ||
16388 | # on Darwin, check in Framework installation locations | |
16389 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
16390 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16391 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16392 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16393 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16394 | ; do | |
16395 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
16396 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
16397 | break | |
16398 | fi | |
16399 | done | |
16400 | fi | |
16401 | ||
16402 | # check in a few common install locations | |
16403 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16404 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16405 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16406 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16407 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16408 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16409 | `ls -d /usr/lib 2>/dev/null` \ | |
16410 | ; do | |
16411 | if test -f "$i/tclConfig.sh" ; then | |
16412 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
16413 | break | |
16414 | fi | |
16415 | done | |
16416 | fi | |
3fc11d3e | 16417 | |
5062cc19 KS |
16418 | # check in a few other private locations |
16419 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16420 | for i in \ | |
16421 | ${srcdir}/../tcl \ | |
16422 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16423 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
16424 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16425 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16426 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16427 | break | |
16428 | fi | |
16429 | done | |
16430 | fi | |
bec39cab | 16431 | |
3fc11d3e JM |
16432 | fi |
16433 | ||
5062cc19 KS |
16434 | |
16435 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16436 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
16437 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
16438 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
16439 | else |
16440 | no_tcl= | |
16441 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
16442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16443 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
16444 | fi |
16445 | fi | |
3fc11d3e | 16446 | |
bec39cab | 16447 | |
85541719 DE |
16448 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
16449 | # point to doing Tcl. | |
bec39cab | 16450 | |
5062cc19 KS |
16451 | # |
16452 | # Ok, lets find the tk configuration | |
16453 | # First, look for one uninstalled. | |
16454 | # the alternative search directory is invoked by --with-tk | |
16455 | # | |
3fc11d3e | 16456 | |
5062cc19 KS |
16457 | if test x"${no_tk}" = x ; then |
16458 | # we reset no_tk in case something fails here | |
16459 | no_tk=true | |
bec39cab | 16460 | |
81ecdfbb RW |
16461 | # Check whether --with-tk was given. |
16462 | if test "${with_tk+set}" = set; then : | |
16463 | withval=$with_tk; with_tkconfig=${withval} | |
16464 | fi | |
16465 | ||
16466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
16467 | $as_echo_n "checking for Tk configuration... " >&6; } | |
16468 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
16469 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16470 | else |
3fc11d3e JM |
16471 | |
16472 | ||
5062cc19 KS |
16473 | # First check to see if --with-tkconfig was specified. |
16474 | if test x"${with_tkconfig}" != x ; then | |
16475 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
16476 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
16477 | else | |
81ecdfbb | 16478 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16479 | fi |
16480 | fi | |
3fc11d3e | 16481 | |
5062cc19 KS |
16482 | # then check for a private Tk library |
16483 | case "${host}" in | |
16484 | *-*-cygwin*) platDir="win" ;; | |
16485 | *) platDir="unix" ;; | |
16486 | esac | |
16487 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16488 | for i in \ | |
16489 | ../tk \ | |
16490 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16491 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
16492 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
16493 | ../../tk \ | |
16494 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16495 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
16496 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
16497 | ../../../tk \ | |
16498 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16499 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
16500 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16501 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16502 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16503 | break | |
16504 | fi | |
16505 | done | |
16506 | fi | |
16507 | ||
16508 | # on Darwin, check in Framework installation locations | |
16509 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
16510 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16511 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16512 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16513 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16514 | ; do | |
16515 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
16516 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
16517 | break | |
16518 | fi | |
16519 | done | |
16520 | fi | |
16521 | ||
16522 | # check in a few common install locations | |
16523 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16524 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16525 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16526 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16527 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16528 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16529 | `ls -d /usr/lib 2>/dev/null` \ | |
16530 | ; do | |
16531 | if test -f "$i/tkConfig.sh" ; then | |
16532 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
16533 | break | |
16534 | fi | |
16535 | done | |
16536 | fi | |
16537 | # check in a few other private locations | |
16538 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16539 | for i in \ | |
16540 | ${srcdir}/../tk \ | |
16541 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16542 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
16543 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16544 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16545 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16546 | break | |
16547 | fi | |
16548 | done | |
16549 | fi | |
3fc11d3e | 16550 | |
3fc11d3e JM |
16551 | fi |
16552 | ||
16553 | ||
5062cc19 KS |
16554 | if test x"${ac_cv_c_tkconfig}" = x ; then |
16555 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
16556 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
16557 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
16558 | else |
16559 | no_tk= | |
16560 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
16561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16562 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 16563 | fi |
3fc11d3e | 16564 | fi |
dd2504ab | 16565 | |
dd2504ab | 16566 | |
85541719 DE |
16567 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
16568 | ||
81ecdfbb RW |
16569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16570 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
16571 | |
16572 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
16573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16574 | $as_echo "loading" >&6; } | |
85541719 DE |
16575 | . ${TCL_BIN_DIR}/tclConfig.sh |
16576 | else | |
81ecdfbb RW |
16577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16578 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
16579 | fi |
16580 | ||
16581 | # eval is required to do the TCL_DBGX substitution | |
16582 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
16583 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
16584 | ||
16585 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
16586 | # then set the common variable name to the value of the build variables. | |
16587 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
16588 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
16589 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
16590 | # installed and uninstalled version of Tcl. | |
16591 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
16592 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
16593 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
16594 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
16595 | elif test "`uname -s`" = "Darwin"; then | |
16596 | # If Tcl was built as a framework, attempt to use the libraries | |
16597 | # from the framework at the given location so that linking works | |
a68ffae9 | 16598 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
16599 | case ${TCL_DEFS} in |
16600 | *TCL_FRAMEWORK*) | |
16601 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
16602 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
16603 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
16604 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
16605 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
16606 | break | |
16607 | fi | |
16608 | done | |
16609 | fi | |
16610 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
16611 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
16612 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
16613 | fi | |
16614 | ;; | |
16615 | esac | |
16616 | fi | |
16617 | ||
16618 | # eval is required to do the TCL_DBGX substitution | |
16619 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
16620 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
16621 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
16622 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
16623 | ||
16624 | ||
16625 | ||
16626 | ||
16627 | ||
16628 | ||
16629 | ||
16630 | ||
16631 | ||
16632 | ||
16633 | ||
16634 | ||
16635 | ||
16636 | ||
16637 | ||
16638 | # Check for in-tree tcl | |
16639 | here=`pwd` | |
16640 | cd ${srcdir}/.. | |
16641 | topdir=`pwd` | |
16642 | cd ${here} | |
16643 | ||
16644 | intree="no" | |
16645 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
16646 | intree="yes" | |
16647 | fi | |
16648 | ||
16649 | # Find Tcl private headers | |
16650 | if test x"${intree}" = xno; then | |
16651 | ||
81ecdfbb RW |
16652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
16653 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
16654 | private_dir="" |
16655 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
16656 | if test -f ${dir}/tclInt.h ; then | |
16657 | private_dir=${dir} | |
16658 | fi | |
16659 | ||
16660 | if test x"${private_dir}" = x; then | |
81ecdfbb | 16661 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
16662 | else |
16663 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
16664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16665 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
16666 | fi |
16667 | ||
16668 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
16669 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
16670 | TCL_DEPS="" | |
16671 | else | |
16672 | # If building tcl in the same src tree, private headers | |
16673 | # are not needed, but we need to be sure to use the right | |
16674 | # headers library | |
16675 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
16676 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
16677 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
16678 | fi | |
16679 | ||
16680 | ||
16681 | ||
16682 | ||
16683 | ||
81ecdfbb RW |
16684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16685 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 16686 | |
5062cc19 | 16687 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
16688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16689 | $as_echo "loading" >&6; } | |
5062cc19 | 16690 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 16691 | else |
81ecdfbb RW |
16692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16693 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 16694 | fi |
bec39cab | 16695 | |
5062cc19 KS |
16696 | # eval is required to do the TK_DBGX substitution |
16697 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
16698 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
16699 | ||
16700 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
16701 | # then set the common variable name to the value of the build variables. | |
16702 | # For example, the variable TK_LIB_SPEC will be set to the value | |
16703 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
16704 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
16705 | # installed and uninstalled version of Tcl. | |
85541719 | 16706 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
16707 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
16708 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
16709 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
16710 | elif test "`uname -s`" = "Darwin"; then | |
16711 | # If Tk was built as a framework, attempt to use the libraries | |
16712 | # from the framework at the given location so that linking works | |
a68ffae9 | 16713 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
16714 | case ${TK_DEFS} in |
16715 | *TK_FRAMEWORK*) | |
85541719 | 16716 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
16717 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
16718 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
16719 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
16720 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
16721 | break | |
16722 | fi | |
16723 | done | |
16724 | fi | |
85541719 | 16725 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
16726 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
16727 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
16728 | fi | |
16729 | ;; | |
16730 | esac | |
3fc11d3e JM |
16731 | fi |
16732 | ||
5062cc19 KS |
16733 | # eval is required to do the TK_DBGX substitution |
16734 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
16735 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
16736 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
16737 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 16738 | |
3fc11d3e JM |
16739 | |
16740 | ||
bec39cab AC |
16741 | |
16742 | ||
16743 | ||
16744 | ||
16745 | ||
16746 | ||
16747 | ||
3fc11d3e | 16748 | |
3fc11d3e | 16749 | |
bec39cab | 16750 | |
bec39cab | 16751 | |
85541719 DE |
16752 | # Check for in-tree Tk |
16753 | intree="no" | |
16754 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
16755 | intree="yes" | |
16756 | fi | |
3fc11d3e | 16757 | |
85541719 DE |
16758 | # Find Tk private headers |
16759 | if test x"${intree}" = xno; then | |
3fc11d3e | 16760 | |
81ecdfbb RW |
16761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
16762 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
16763 | private_dir="" |
16764 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
16765 | if test -f ${dir}/tkInt.h; then | |
16766 | private_dir=${dir} | |
3fc11d3e | 16767 | fi |
bec39cab | 16768 | |
5062cc19 | 16769 | if test x"${private_dir}" = x; then |
81ecdfbb | 16770 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 16771 | else |
5062cc19 | 16772 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
16773 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16774 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 16775 | fi |
3fc11d3e | 16776 | |
85541719 DE |
16777 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
16778 | TK_LIBRARY=${TK_LIB_SPEC} | |
16779 | TK_DEPS="" | |
16780 | else | |
16781 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
16782 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
16783 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
16784 | fi | |
3fc11d3e JM |
16785 | |
16786 | ||
3fc11d3e JM |
16787 | |
16788 | ||
3fc11d3e | 16789 | |
85541719 | 16790 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 16791 | |
85541719 DE |
16792 | # Include some libraries that Tcl and Tk want. |
16793 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
16794 | # Yes, the ordering seems wrong here. But it isn't. | |
16795 | # TK_LIBS is the list of libraries that need to be linked | |
16796 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
16797 | # were in LIBS then any link tests after this point would | |
16798 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
16799 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 16800 | |
85541719 DE |
16801 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
16802 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
16803 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
16804 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
16805 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
16806 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
16807 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 16808 | |
85541719 DE |
16809 | if test x$gdb_cv_os_cygwin = xyes; then |
16810 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
16811 | WIN32LDAPP="-Wl,--subsystem,console" | |
16812 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 16813 | fi |
ffc6a242 | 16814 | |
81ecdfbb | 16815 | subdirs="$subdirs gdbtk" |
3ace7edb | 16816 | |
85541719 | 16817 | fi |
3fc11d3e JM |
16818 | fi |
16819 | ||
16820 | ||
16821 | ||
16822 | ||
16823 | ||
16824 | ||
16825 | ||
16826 | ||
81ecdfbb RW |
16827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
16828 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 16829 | |
c906108c | 16830 | |
81ecdfbb RW |
16831 | # Check whether --with-x was given. |
16832 | if test "${with_x+set}" = set; then : | |
16833 | withval=$with_x; | |
16834 | fi | |
c906108c SS |
16835 | |
16836 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
16837 | if test "x$with_x" = xno; then | |
16838 | # The user explicitly disabled X. | |
16839 | have_x=disabled | |
16840 | else | |
81ecdfbb RW |
16841 | case $x_includes,$x_libraries in #( |
16842 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
16843 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
16844 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
16845 | else |
16846 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 16847 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 16848 | rm -f -r conftest.dir |
bec39cab AC |
16849 | if mkdir conftest.dir; then |
16850 | cd conftest.dir | |
bec39cab | 16851 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
16852 | incroot: |
16853 | @echo incroot='${INCROOT}' | |
16854 | usrlibdir: | |
16855 | @echo usrlibdir='${USRLIBDIR}' | |
16856 | libdir: | |
16857 | @echo libdir='${LIBDIR}' | |
16858 | _ACEOF | |
16859 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 16860 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
16861 | for ac_var in incroot usrlibdir libdir; do |
16862 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
16863 | done | |
c906108c | 16864 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
16865 | for ac_extension in a so sl dylib la dll; do |
16866 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
16867 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 16868 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
16869 | fi |
16870 | done | |
16871 | # Screen out bogus values from the imake configuration. They are | |
16872 | # bogus both because they are the default anyway, and because | |
16873 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 16874 | case $ac_im_incroot in |
81ecdfbb | 16875 | /usr/include) ac_x_includes= ;; |
bec39cab | 16876 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 16877 | esac |
bec39cab | 16878 | case $ac_im_usrlibdir in |
81ecdfbb | 16879 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 16880 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
16881 | esac |
16882 | fi | |
16883 | cd .. | |
81ecdfbb | 16884 | rm -f -r conftest.dir |
c906108c SS |
16885 | fi |
16886 | ||
bec39cab AC |
16887 | # Standard set of common directories for X headers. |
16888 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
16889 | ac_x_header_dirs=' | |
16890 | /usr/X11/include | |
81ecdfbb | 16891 | /usr/X11R7/include |
bec39cab AC |
16892 | /usr/X11R6/include |
16893 | /usr/X11R5/include | |
16894 | /usr/X11R4/include | |
16895 | ||
16896 | /usr/include/X11 | |
81ecdfbb | 16897 | /usr/include/X11R7 |
bec39cab AC |
16898 | /usr/include/X11R6 |
16899 | /usr/include/X11R5 | |
16900 | /usr/include/X11R4 | |
16901 | ||
16902 | /usr/local/X11/include | |
81ecdfbb | 16903 | /usr/local/X11R7/include |
bec39cab AC |
16904 | /usr/local/X11R6/include |
16905 | /usr/local/X11R5/include | |
16906 | /usr/local/X11R4/include | |
16907 | ||
16908 | /usr/local/include/X11 | |
81ecdfbb | 16909 | /usr/local/include/X11R7 |
bec39cab AC |
16910 | /usr/local/include/X11R6 |
16911 | /usr/local/include/X11R5 | |
16912 | /usr/local/include/X11R4 | |
16913 | ||
16914 | /usr/X386/include | |
16915 | /usr/x386/include | |
16916 | /usr/XFree86/include/X11 | |
16917 | ||
16918 | /usr/include | |
16919 | /usr/local/include | |
16920 | /usr/unsupported/include | |
16921 | /usr/athena/include | |
16922 | /usr/local/x11r5/include | |
16923 | /usr/lpp/Xamples/include | |
16924 | ||
16925 | /usr/openwin/include | |
16926 | /usr/openwin/share/include' | |
16927 | ||
16928 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 16929 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 16930 | # First, try using that file with no special directory specified. |
81ecdfbb | 16931 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16932 | /* end confdefs.h. */ |
81ecdfbb | 16933 | #include <X11/Xlib.h> |
bec39cab | 16934 | _ACEOF |
81ecdfbb | 16935 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
16936 | # We can compile using X headers with no special include directory. |
16937 | ac_x_includes= | |
16938 | else | |
bec39cab | 16939 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 16940 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
16941 | ac_x_includes=$ac_dir |
16942 | break | |
16943 | fi | |
16944 | done | |
c906108c | 16945 | fi |
bec39cab AC |
16946 | rm -f conftest.err conftest.$ac_ext |
16947 | fi # $ac_x_includes = no | |
c906108c | 16948 | |
bec39cab | 16949 | if test "$ac_x_libraries" = no; then |
c906108c | 16950 | # Check for the libraries. |
c906108c SS |
16951 | # See if we find them without any special options. |
16952 | # Don't add to $LIBS permanently. | |
bec39cab | 16953 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
16954 | LIBS="-lX11 $LIBS" |
16955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16956 | /* end confdefs.h. */ |
81ecdfbb | 16957 | #include <X11/Xlib.h> |
bec39cab AC |
16958 | int |
16959 | main () | |
16960 | { | |
81ecdfbb | 16961 | XrmInitialize () |
bec39cab AC |
16962 | ; |
16963 | return 0; | |
16964 | } | |
16965 | _ACEOF | |
81ecdfbb | 16966 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16967 | LIBS=$ac_save_LIBS |
c906108c SS |
16968 | # We can link X programs with no special library path. |
16969 | ac_x_libraries= | |
16970 | else | |
81ecdfbb RW |
16971 | LIBS=$ac_save_LIBS |
16972 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 16973 | do |
bec39cab | 16974 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
16975 | for ac_extension in a so sl dylib la dll; do |
16976 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
16977 | ac_x_libraries=$ac_dir |
16978 | break 2 | |
16979 | fi | |
16980 | done | |
16981 | done | |
16982 | fi | |
81ecdfbb RW |
16983 | rm -f core conftest.err conftest.$ac_objext \ |
16984 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 16985 | fi # $ac_x_libraries = no |
c906108c | 16986 | |
81ecdfbb RW |
16987 | case $ac_x_includes,$ac_x_libraries in #( |
16988 | no,* | *,no | *\'*) | |
16989 | # Didn't find X, or a directory has "'" in its name. | |
16990 | ac_cv_have_x="have_x=no";; #( | |
16991 | *) | |
16992 | # Record where we found X for the cache. | |
16993 | ac_cv_have_x="have_x=yes\ | |
16994 | ac_x_includes='$ac_x_includes'\ | |
16995 | ac_x_libraries='$ac_x_libraries'" | |
16996 | esac | |
c906108c | 16997 | fi |
81ecdfbb RW |
16998 | ;; #( |
16999 | *) have_x=yes;; | |
17000 | esac | |
c906108c SS |
17001 | eval "$ac_cv_have_x" |
17002 | fi # $with_x != no | |
17003 | ||
17004 | if test "$have_x" != yes; then | |
81ecdfbb RW |
17005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
17006 | $as_echo "$have_x" >&6; } | |
c906108c SS |
17007 | no_x=yes |
17008 | else | |
17009 | # If each of the values was on the command line, it overrides each guess. | |
17010 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
17011 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
17012 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
17013 | ac_cv_have_x="have_x=yes\ |
17014 | ac_x_includes='$x_includes'\ | |
17015 | ac_x_libraries='$x_libraries'" | |
17016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
17017 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
17018 | fi |
17019 | ||
17020 | ||
bec39cab | 17021 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 17022 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
17023 | # This code just checks for a few cases where we'd like to ignore those |
17024 | # definitions, even when they're present in the '.mt' file. These cases | |
17025 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 17026 | # not part of the source tree. |
7a292a7a | 17027 | # |
81ecdfbb RW |
17028 | # Check whether --enable-sim was given. |
17029 | if test "${enable_sim+set}" = set; then : | |
17030 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
17031 | echo "enableval = ${enableval}"; |
17032 | case "${enableval}" in | |
17033 | yes) ignore_sim=false ;; | |
17034 | no) ignore_sim=true ;; | |
17035 | *) ignore_sim=false ;; | |
17036 | esac | |
17037 | else | |
17038 | ignore_sim=false | |
81ecdfbb RW |
17039 | fi |
17040 | ||
7a292a7a SS |
17041 | |
17042 | if test ! -d "${srcdir}/../sim"; then | |
17043 | ignore_sim=true | |
17044 | fi | |
17045 | ||
9b624dbe UW |
17046 | SIM= |
17047 | SIM_OBS= | |
17048 | if test "${ignore_sim}" = "false"; then | |
17049 | if test x"${gdb_sim}" != x ; then | |
17050 | SIM="${gdb_sim}" | |
17051 | SIM_OBS="remote-sim.o" | |
60ca704f | 17052 | |
81ecdfbb | 17053 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 17054 | |
976102cd PA |
17055 | |
17056 | # Some tdep code should only be compiled in when the ppc sim is | |
17057 | # built. PR sim/13418. | |
17058 | case $target in | |
17059 | powerpc*-*-*) | |
17060 | ||
17061 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
17062 | ||
17063 | ;; | |
17064 | esac | |
9b624dbe | 17065 | fi |
7a292a7a SS |
17066 | fi |
17067 | ||
17068 | ||
17069 | ||
c906108c SS |
17070 | |
17071 | ||
17072 | ||
17073 | ||
17074 | ||
17075 | ||
dfcd3bfb | 17076 | |
e56ac5c3 AC |
17077 | |
17078 | ||
b3a90332 AC |
17079 | |
17080 | ||
c35f4ffc | 17081 | # List of host floatformats. |
bec39cab AC |
17082 | |
17083 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17084 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 17085 | _ACEOF |
c35f4ffc | 17086 | |
bec39cab AC |
17087 | |
17088 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17089 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
17090 | _ACEOF |
17091 | ||
c35f4ffc | 17092 | |
bec39cab | 17093 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 17094 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 17095 | _ACEOF |
c35f4ffc AC |
17096 | |
17097 | ||
c906108c SS |
17098 | # target_subdir is used by the testsuite to find the target libraries. |
17099 | target_subdir= | |
17100 | if test "${host}" != "${target}"; then | |
17101 | target_subdir="${target_alias}/" | |
17102 | fi | |
17103 | ||
17104 | ||
21ea5acd | 17105 | # Import nat definitions. |
2b351b19 | 17106 | nat_makefile_frag=/dev/null |
771b4502 | 17107 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
17108 | . ${srcdir}/configure.nat |
17109 | nativefile=$NAT_FILE | |
c906108c | 17110 | fi |
c906108c | 17111 | |
c906108c SS |
17112 | |
17113 | ||
17114 | ||
21ea5acd SDJ |
17115 | |
17116 | ||
17117 | ||
17118 | ||
17119 | ||
c906108c SS |
17120 | |
17121 | ||
b00a8037 | 17122 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
17123 | |
17124 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 17125 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 17126 | _ACEOF |
b00a8037 DJ |
17127 | |
17128 | fi | |
17129 | ||
8dcde887 | 17130 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
17131 | # Check whether --enable-multi-ice was given. |
17132 | if test "${enable_multi_ice+set}" = set; then : | |
17133 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
17134 | yes | no) |
17135 | ;; | |
81ecdfbb | 17136 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 17137 | esac |
81ecdfbb | 17138 | fi |
b4e70030 | 17139 | |
81ecdfbb RW |
17140 | if test "x$enable_multi_ice" = xyes; then |
17141 | subdirs="$subdirs multi-ice" | |
3ace7edb | 17142 | |
a85f51e7 DJ |
17143 | fi |
17144 | ||
496c0e1b JB |
17145 | # Check whether --enable-gdbserver was given. |
17146 | if test "${enable_gdbserver+set}" = set; then : | |
17147 | enableval=$enable_gdbserver; case "${enableval}" in | |
17148 | yes| no|auto) ;; | |
17149 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
17150 | esac | |
17151 | else | |
17152 | enable_gdbserver=auto | |
17153 | fi | |
17154 | ||
17155 | ||
17156 | # We only build gdbserver automatically in a native configuration, and | |
17157 | # only if the user did not explicitly disable its build. | |
17158 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
17159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
17160 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 17161 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
17162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17163 | $as_echo "yes" >&6; } | |
17164 | subdirs="$subdirs gdbserver" | |
3ace7edb | 17165 | |
496c0e1b | 17166 | gdbserver_build_enabled=yes |
8dcde887 | 17167 | else |
81ecdfbb RW |
17168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17169 | $as_echo "no" >&6; } | |
8dcde887 MK |
17170 | fi |
17171 | fi | |
17172 | ||
496c0e1b JB |
17173 | # If the user explicitly request the gdbserver to be built, verify that |
17174 | # we were in fact able to enable it. | |
17175 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
17176 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
17177 | fi | |
17178 | ||
393fd4c3 YQ |
17179 | # Check for babeltrace and babeltrace-ctf |
17180 | ||
17181 | # Check whether --with-babeltrace was given. | |
17182 | if test "${with_babeltrace+set}" = set; then : | |
17183 | withval=$with_babeltrace; | |
17184 | else | |
17185 | with_babeltrace=auto | |
17186 | fi | |
17187 | ||
17188 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
17189 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
17190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
17191 | $as_echo "$with_babeltrace" >&6; } | |
17192 | ||
17193 | if test "x$with_babeltrace" = "xno"; then | |
17194 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
17195 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
17196 | else | |
17197 | # Append -Werror to CFLAGS so that configure can catch the warning | |
17198 | # "assignment from incompatible pointer type", which is related to | |
17199 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
17200 | # in GDB, while babeltrace 1.0.3 is broken. | |
17201 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
17202 | # safe to save and restore CFLAGS here. | |
17203 | saved_CFLAGS=$CFLAGS | |
17204 | CFLAGS="$CFLAGS -Werror" | |
17205 | ||
17206 | ||
17207 | ||
17208 | ||
17209 | ||
17210 | ||
17211 | ||
17212 | ||
17213 | use_additional=yes | |
17214 | ||
17215 | acl_save_prefix="$prefix" | |
17216 | prefix="$acl_final_prefix" | |
17217 | acl_save_exec_prefix="$exec_prefix" | |
17218 | exec_prefix="$acl_final_exec_prefix" | |
17219 | ||
17220 | eval additional_includedir=\"$includedir\" | |
17221 | eval additional_libdir=\"$libdir\" | |
17222 | ||
17223 | exec_prefix="$acl_save_exec_prefix" | |
17224 | prefix="$acl_save_prefix" | |
17225 | ||
17226 | ||
17227 | # Check whether --with-libbabeltrace-prefix was given. | |
17228 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
17229 | withval=$with_libbabeltrace_prefix; | |
17230 | if test "X$withval" = "Xno"; then | |
17231 | use_additional=no | |
17232 | else | |
17233 | if test "X$withval" = "X"; then | |
17234 | ||
17235 | acl_save_prefix="$prefix" | |
17236 | prefix="$acl_final_prefix" | |
17237 | acl_save_exec_prefix="$exec_prefix" | |
17238 | exec_prefix="$acl_final_exec_prefix" | |
17239 | ||
17240 | eval additional_includedir=\"$includedir\" | |
17241 | eval additional_libdir=\"$libdir\" | |
17242 | ||
17243 | exec_prefix="$acl_save_exec_prefix" | |
17244 | prefix="$acl_save_prefix" | |
17245 | ||
17246 | else | |
17247 | additional_includedir="$withval/include" | |
17248 | additional_libdir="$withval/lib" | |
17249 | fi | |
17250 | fi | |
17251 | ||
17252 | fi | |
17253 | ||
17254 | LIBBABELTRACE= | |
17255 | LTLIBBABELTRACE= | |
17256 | INCBABELTRACE= | |
17257 | rpathdirs= | |
17258 | ltrpathdirs= | |
17259 | names_already_handled= | |
17260 | names_next_round='babeltrace babeltrace-ctf' | |
17261 | while test -n "$names_next_round"; do | |
17262 | names_this_round="$names_next_round" | |
17263 | names_next_round= | |
17264 | for name in $names_this_round; do | |
17265 | already_handled= | |
17266 | for n in $names_already_handled; do | |
17267 | if test "$n" = "$name"; then | |
17268 | already_handled=yes | |
17269 | break | |
17270 | fi | |
17271 | done | |
17272 | if test -z "$already_handled"; then | |
17273 | names_already_handled="$names_already_handled $name" | |
17274 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17275 | eval value=\"\$HAVE_LIB$uppername\" | |
17276 | if test -n "$value"; then | |
17277 | if test "$value" = yes; then | |
17278 | eval value=\"\$LIB$uppername\" | |
17279 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
17280 | eval value=\"\$LTLIB$uppername\" | |
17281 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
17282 | else | |
17283 | : | |
17284 | fi | |
17285 | else | |
17286 | found_dir= | |
17287 | found_la= | |
17288 | found_so= | |
17289 | found_a= | |
17290 | if test $use_additional = yes; then | |
17291 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
17292 | found_dir="$additional_libdir" | |
17293 | found_so="$additional_libdir/lib$name.$shlibext" | |
17294 | if test -f "$additional_libdir/lib$name.la"; then | |
17295 | found_la="$additional_libdir/lib$name.la" | |
17296 | fi | |
17297 | else | |
17298 | if test -f "$additional_libdir/lib$name.$libext"; then | |
17299 | found_dir="$additional_libdir" | |
17300 | found_a="$additional_libdir/lib$name.$libext" | |
17301 | if test -f "$additional_libdir/lib$name.la"; then | |
17302 | found_la="$additional_libdir/lib$name.la" | |
17303 | fi | |
17304 | fi | |
17305 | fi | |
17306 | fi | |
17307 | if test "X$found_dir" = "X"; then | |
17308 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17309 | ||
17310 | acl_save_prefix="$prefix" | |
17311 | prefix="$acl_final_prefix" | |
17312 | acl_save_exec_prefix="$exec_prefix" | |
17313 | exec_prefix="$acl_final_exec_prefix" | |
17314 | eval x=\"$x\" | |
17315 | exec_prefix="$acl_save_exec_prefix" | |
17316 | prefix="$acl_save_prefix" | |
17317 | ||
17318 | case "$x" in | |
17319 | -L*) | |
17320 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
17321 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
17322 | found_dir="$dir" | |
17323 | found_so="$dir/lib$name.$shlibext" | |
17324 | if test -f "$dir/lib$name.la"; then | |
17325 | found_la="$dir/lib$name.la" | |
17326 | fi | |
17327 | else | |
17328 | if test -f "$dir/lib$name.$libext"; then | |
17329 | found_dir="$dir" | |
17330 | found_a="$dir/lib$name.$libext" | |
17331 | if test -f "$dir/lib$name.la"; then | |
17332 | found_la="$dir/lib$name.la" | |
17333 | fi | |
17334 | fi | |
17335 | fi | |
17336 | ;; | |
17337 | esac | |
17338 | if test "X$found_dir" != "X"; then | |
17339 | break | |
17340 | fi | |
17341 | done | |
17342 | fi | |
17343 | if test "X$found_dir" != "X"; then | |
17344 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
17345 | if test "X$found_so" != "X"; then | |
17346 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17347 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17348 | else | |
17349 | haveit= | |
17350 | for x in $ltrpathdirs; do | |
17351 | if test "X$x" = "X$found_dir"; then | |
17352 | haveit=yes | |
17353 | break | |
17354 | fi | |
17355 | done | |
17356 | if test -z "$haveit"; then | |
17357 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17358 | fi | |
17359 | if test "$hardcode_direct" = yes; then | |
17360 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17361 | else | |
17362 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17363 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17364 | haveit= | |
17365 | for x in $rpathdirs; do | |
17366 | if test "X$x" = "X$found_dir"; then | |
17367 | haveit=yes | |
17368 | break | |
17369 | fi | |
17370 | done | |
17371 | if test -z "$haveit"; then | |
17372 | rpathdirs="$rpathdirs $found_dir" | |
17373 | fi | |
17374 | else | |
17375 | haveit= | |
17376 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17377 | ||
17378 | acl_save_prefix="$prefix" | |
17379 | prefix="$acl_final_prefix" | |
17380 | acl_save_exec_prefix="$exec_prefix" | |
17381 | exec_prefix="$acl_final_exec_prefix" | |
17382 | eval x=\"$x\" | |
17383 | exec_prefix="$acl_save_exec_prefix" | |
17384 | prefix="$acl_save_prefix" | |
17385 | ||
17386 | if test "X$x" = "X-L$found_dir"; then | |
17387 | haveit=yes | |
17388 | break | |
17389 | fi | |
17390 | done | |
17391 | if test -z "$haveit"; then | |
17392 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
17393 | fi | |
17394 | if test "$hardcode_minus_L" != no; then | |
17395 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17396 | else | |
17397 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17398 | fi | |
17399 | fi | |
17400 | fi | |
17401 | fi | |
17402 | else | |
17403 | if test "X$found_a" != "X"; then | |
17404 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
17405 | else | |
17406 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
17407 | fi | |
17408 | fi | |
17409 | additional_includedir= | |
17410 | case "$found_dir" in | |
17411 | */lib | */lib/) | |
17412 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17413 | additional_includedir="$basedir/include" | |
17414 | ;; | |
17415 | esac | |
17416 | if test "X$additional_includedir" != "X"; then | |
17417 | if test "X$additional_includedir" != "X/usr/include"; then | |
17418 | haveit= | |
17419 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17420 | if test -n "$GCC"; then | |
17421 | case $host_os in | |
17422 | linux*) haveit=yes;; | |
17423 | esac | |
17424 | fi | |
17425 | fi | |
17426 | if test -z "$haveit"; then | |
17427 | for x in $CPPFLAGS $INCBABELTRACE; do | |
17428 | ||
17429 | acl_save_prefix="$prefix" | |
17430 | prefix="$acl_final_prefix" | |
17431 | acl_save_exec_prefix="$exec_prefix" | |
17432 | exec_prefix="$acl_final_exec_prefix" | |
17433 | eval x=\"$x\" | |
17434 | exec_prefix="$acl_save_exec_prefix" | |
17435 | prefix="$acl_save_prefix" | |
17436 | ||
17437 | if test "X$x" = "X-I$additional_includedir"; then | |
17438 | haveit=yes | |
17439 | break | |
17440 | fi | |
17441 | done | |
17442 | if test -z "$haveit"; then | |
17443 | if test -d "$additional_includedir"; then | |
17444 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
17445 | fi | |
17446 | fi | |
17447 | fi | |
17448 | fi | |
17449 | fi | |
17450 | if test -n "$found_la"; then | |
17451 | save_libdir="$libdir" | |
17452 | case "$found_la" in | |
17453 | */* | *\\*) . "$found_la" ;; | |
17454 | *) . "./$found_la" ;; | |
17455 | esac | |
17456 | libdir="$save_libdir" | |
17457 | for dep in $dependency_libs; do | |
17458 | case "$dep" in | |
17459 | -L*) | |
17460 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17461 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17462 | haveit= | |
17463 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17464 | if test -n "$GCC"; then | |
17465 | case $host_os in | |
17466 | linux*) haveit=yes;; | |
17467 | esac | |
17468 | fi | |
17469 | fi | |
17470 | if test -z "$haveit"; then | |
17471 | haveit= | |
17472 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17473 | ||
17474 | acl_save_prefix="$prefix" | |
17475 | prefix="$acl_final_prefix" | |
17476 | acl_save_exec_prefix="$exec_prefix" | |
17477 | exec_prefix="$acl_final_exec_prefix" | |
17478 | eval x=\"$x\" | |
17479 | exec_prefix="$acl_save_exec_prefix" | |
17480 | prefix="$acl_save_prefix" | |
17481 | ||
17482 | if test "X$x" = "X-L$additional_libdir"; then | |
17483 | haveit=yes | |
17484 | break | |
17485 | fi | |
17486 | done | |
17487 | if test -z "$haveit"; then | |
17488 | if test -d "$additional_libdir"; then | |
17489 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
17490 | fi | |
17491 | fi | |
17492 | haveit= | |
17493 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17494 | ||
17495 | acl_save_prefix="$prefix" | |
17496 | prefix="$acl_final_prefix" | |
17497 | acl_save_exec_prefix="$exec_prefix" | |
17498 | exec_prefix="$acl_final_exec_prefix" | |
17499 | eval x=\"$x\" | |
17500 | exec_prefix="$acl_save_exec_prefix" | |
17501 | prefix="$acl_save_prefix" | |
17502 | ||
17503 | if test "X$x" = "X-L$additional_libdir"; then | |
17504 | haveit=yes | |
17505 | break | |
17506 | fi | |
17507 | done | |
17508 | if test -z "$haveit"; then | |
17509 | if test -d "$additional_libdir"; then | |
17510 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
17511 | fi | |
17512 | fi | |
17513 | fi | |
17514 | fi | |
17515 | ;; | |
17516 | -R*) | |
17517 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17518 | if test "$enable_rpath" != no; then | |
17519 | haveit= | |
17520 | for x in $rpathdirs; do | |
17521 | if test "X$x" = "X$dir"; then | |
17522 | haveit=yes | |
17523 | break | |
17524 | fi | |
17525 | done | |
17526 | if test -z "$haveit"; then | |
17527 | rpathdirs="$rpathdirs $dir" | |
17528 | fi | |
17529 | haveit= | |
17530 | for x in $ltrpathdirs; do | |
17531 | if test "X$x" = "X$dir"; then | |
17532 | haveit=yes | |
17533 | break | |
17534 | fi | |
17535 | done | |
17536 | if test -z "$haveit"; then | |
17537 | ltrpathdirs="$ltrpathdirs $dir" | |
17538 | fi | |
17539 | fi | |
17540 | ;; | |
17541 | -l*) | |
17542 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17543 | ;; | |
17544 | *.la) | |
17545 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17546 | ;; | |
17547 | *) | |
17548 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
17549 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
17550 | ;; | |
17551 | esac | |
17552 | done | |
17553 | fi | |
17554 | else | |
17555 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17556 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
17557 | fi | |
17558 | fi | |
17559 | fi | |
17560 | done | |
17561 | done | |
17562 | if test "X$rpathdirs" != "X"; then | |
17563 | if test -n "$hardcode_libdir_separator"; then | |
17564 | alldirs= | |
17565 | for found_dir in $rpathdirs; do | |
17566 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17567 | done | |
17568 | acl_save_libdir="$libdir" | |
17569 | libdir="$alldirs" | |
17570 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17571 | libdir="$acl_save_libdir" | |
17572 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17573 | else | |
17574 | for found_dir in $rpathdirs; do | |
17575 | acl_save_libdir="$libdir" | |
17576 | libdir="$found_dir" | |
17577 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17578 | libdir="$acl_save_libdir" | |
17579 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17580 | done | |
17581 | fi | |
17582 | fi | |
17583 | if test "X$ltrpathdirs" != "X"; then | |
17584 | for found_dir in $ltrpathdirs; do | |
17585 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
17586 | done | |
17587 | fi | |
17588 | ||
17589 | ||
17590 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17591 | ||
17592 | for element in $INCBABELTRACE; do | |
17593 | haveit= | |
17594 | for x in $CPPFLAGS; do | |
17595 | ||
17596 | acl_save_prefix="$prefix" | |
17597 | prefix="$acl_final_prefix" | |
17598 | acl_save_exec_prefix="$exec_prefix" | |
17599 | exec_prefix="$acl_final_exec_prefix" | |
17600 | eval x=\"$x\" | |
17601 | exec_prefix="$acl_save_exec_prefix" | |
17602 | prefix="$acl_save_prefix" | |
17603 | ||
17604 | if test "X$x" = "X$element"; then | |
17605 | haveit=yes | |
17606 | break | |
17607 | fi | |
17608 | done | |
17609 | if test -z "$haveit"; then | |
17610 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17611 | fi | |
17612 | done | |
17613 | ||
17614 | ||
17615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
17616 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
17617 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
17618 | $as_echo_n "(cached) " >&6 | |
17619 | else | |
17620 | ||
17621 | ac_save_LIBS="$LIBS" | |
17622 | LIBS="$LIBS $LIBBABELTRACE" | |
17623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17624 | /* end confdefs.h. */ | |
17625 | #include <babeltrace/babeltrace.h> | |
17626 | #include <babeltrace/ctf/events.h> | |
17627 | #include <babeltrace/ctf/iterator.h> | |
17628 | int | |
17629 | main () | |
17630 | { | |
17631 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
17632 | struct bt_ctf_event *event = NULL; | |
17633 | const struct bt_definition *scope; | |
17634 | ||
13cdc2af | 17635 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 17636 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
17637 | scope = bt_ctf_get_top_level_scope (event, |
17638 | BT_STREAM_EVENT_HEADER); | |
17639 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
17640 | ||
17641 | ; | |
17642 | return 0; | |
17643 | } | |
17644 | _ACEOF | |
17645 | if ac_fn_c_try_link "$LINENO"; then : | |
17646 | ac_cv_libbabeltrace=yes | |
17647 | else | |
17648 | ac_cv_libbabeltrace=no | |
17649 | fi | |
17650 | rm -f core conftest.err conftest.$ac_objext \ | |
17651 | conftest$ac_exeext conftest.$ac_ext | |
17652 | LIBS="$ac_save_LIBS" | |
17653 | ||
17654 | fi | |
17655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
17656 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
17657 | if test "$ac_cv_libbabeltrace" = yes; then | |
17658 | HAVE_LIBBABELTRACE=yes | |
17659 | ||
17660 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
17661 | ||
17662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
17663 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
17664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
17665 | $as_echo "$LIBBABELTRACE" >&6; } | |
17666 | else | |
17667 | HAVE_LIBBABELTRACE=no | |
17668 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17669 | LIBBABELTRACE= | |
17670 | LTLIBBABELTRACE= | |
17671 | fi | |
17672 | ||
17673 | ||
17674 | ||
17675 | ||
17676 | ||
17677 | ||
17678 | CFLAGS=$saved_CFLAGS | |
17679 | ||
17680 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
17681 | if test "$with_babeltrace" = yes; then | |
17682 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
17683 | else | |
17684 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
17685 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
17686 | fi | |
17687 | fi | |
17688 | fi | |
17689 | ||
21ea5acd SDJ |
17690 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an |
17691 | # empty version. | |
c906108c SS |
17692 | |
17693 | files= | |
17694 | links= | |
5a2402b8 | 17695 | |
c906108c SS |
17696 | rm -f nm.h |
17697 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
17698 | case "${nativefile}" in |
17699 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
17700 | * ) GDB_NM_FILE="${nativefile}" | |
17701 | esac | |
5a2402b8 AC |
17702 | files="${files} ${GDB_NM_FILE}" |
17703 | links="${links} nm.h" | |
60ca704f SE |
17704 | |
17705 | cat >>confdefs.h <<_ACEOF | |
b78960be | 17706 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 17707 | _ACEOF |
5a2402b8 | 17708 | |
c906108c | 17709 | fi |
5a2402b8 AC |
17710 | |
17711 | ||
e3487908 GKB |
17712 | for ac_prog in xsltproc |
17713 | do | |
17714 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
17715 | set dummy $ac_prog; ac_word=$2 | |
17716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
17717 | $as_echo_n "checking for $ac_word... " >&6; } | |
17718 | if test "${ac_cv_path_XSLTPROC+set}" = set; then : | |
17719 | $as_echo_n "(cached) " >&6 | |
17720 | else | |
17721 | case $XSLTPROC in | |
17722 | [\\/]* | ?:[\\/]*) | |
17723 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
17724 | ;; | |
17725 | *) | |
17726 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17727 | for as_dir in $PATH | |
17728 | do | |
17729 | IFS=$as_save_IFS | |
17730 | test -z "$as_dir" && as_dir=. | |
17731 | for ac_exec_ext in '' $ac_executable_extensions; do | |
17732 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
17733 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" | |
17734 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
17735 | break 2 | |
17736 | fi | |
17737 | done | |
17738 | done | |
17739 | IFS=$as_save_IFS | |
17740 | ||
17741 | ;; | |
17742 | esac | |
17743 | fi | |
17744 | XSLTPROC=$ac_cv_path_XSLTPROC | |
17745 | if test -n "$XSLTPROC"; then | |
17746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
17747 | $as_echo "$XSLTPROC" >&6; } | |
17748 | else | |
17749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
17750 | $as_echo "no" >&6; } | |
17751 | fi | |
17752 | ||
17753 | ||
17754 | test -n "$XSLTPROC" && break | |
17755 | done | |
17756 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
17757 | ||
17758 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
17759 | if test "${XSLTPROC}" = missing; then | |
17760 | as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 | |
17761 | fi | |
17762 | fi | |
17763 | ||
17764 | ||
bec39cab AC |
17765 | ac_sources="$files" |
17766 | ac_dests="$links" | |
17767 | while test -n "$ac_sources"; do | |
17768 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
17769 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
17770 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
17771 | done | |
81ecdfbb | 17772 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
17773 | |
17774 | ||
c906108c SS |
17775 | |
17776 | ||
c906108c | 17777 | |
81ecdfbb | 17778 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 17779 | |
bec39cab | 17780 | |
dcd1f979 TT |
17781 | if $development; then |
17782 | ||
17783 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
17784 | ||
07e253aa PA |
17785 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)" |
17786 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)" | |
dcd1f979 TT |
17787 | fi |
17788 | ||
b292c783 | 17789 | |
f6a88844 JM |
17790 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
17791 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
17792 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
17793 | GDB_TRANSFORM_NAME=gdb | |
17794 | fi | |
17795 | ||
17796 | ||
17797 | ||
17798 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
17799 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
17800 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
17801 | GCORE_TRANSFORM_NAME=gcore | |
17802 | fi | |
17803 | ||
b292c783 JK |
17804 | |
17805 | ac_config_files="$ac_config_files gcore" | |
17806 | ||
c971b7fa | 17807 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb | 17808 | |
89a34d1b | 17809 | |
bec39cab AC |
17810 | cat >confcache <<\_ACEOF |
17811 | # This file is a shell script that caches the results of configure | |
17812 | # tests run on this system so they can be shared between configure | |
17813 | # scripts and configure runs, see configure's option --config-cache. | |
17814 | # It is not useful on other systems. If it contains results you don't | |
17815 | # want to keep, you may remove or edit it. | |
17816 | # | |
17817 | # config.status only pays attention to the cache file if you give it | |
17818 | # the --recheck option to rerun configure. | |
17819 | # | |
17820 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
17821 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17822 | # following values. | |
17823 | ||
17824 | _ACEOF | |
17825 | ||
17826 | # The following way of writing the cache mishandles newlines in values, | |
17827 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 17828 | # So, we kill variables containing newlines. |
bec39cab AC |
17829 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17830 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
17831 | ( |
17832 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17833 | eval ac_val=\$$ac_var | |
17834 | case $ac_val in #( | |
17835 | *${as_nl}*) | |
17836 | case $ac_var in #( | |
17837 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
17838 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
17839 | esac | |
17840 | case $ac_var in #( | |
17841 | _ | IFS | as_nl) ;; #( | |
17842 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
17843 | *) { eval $ac_var=; unset $ac_var;} ;; | |
17844 | esac ;; | |
17845 | esac | |
17846 | done | |
17847 | ||
bec39cab | 17848 | (set) 2>&1 | |
81ecdfbb RW |
17849 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
17850 | *${as_nl}ac_space=\ *) | |
17851 | # `set' does not quote correctly, so add quotes: double-quote | |
17852 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
17853 | sed -n \ |
17854 | "s/'/'\\\\''/g; | |
17855 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 17856 | ;; #( |
bec39cab AC |
17857 | *) |
17858 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 17859 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 17860 | ;; |
81ecdfbb RW |
17861 | esac | |
17862 | sort | |
17863 | ) | | |
bec39cab | 17864 | sed ' |
81ecdfbb | 17865 | /^ac_cv_env_/b end |
bec39cab | 17866 | t clear |
81ecdfbb | 17867 | :clear |
bec39cab AC |
17868 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17869 | t end | |
81ecdfbb RW |
17870 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17871 | :end' >>confcache | |
17872 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17873 | if test -w "$cache_file"; then | |
17874 | test "x$cache_file" != "x/dev/null" && | |
17875 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
17876 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
17877 | cat confcache >$cache_file |
17878 | else | |
81ecdfbb RW |
17879 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
17880 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
17881 | fi |
17882 | fi | |
17883 | rm -f confcache | |
17884 | ||
17885 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17886 | # Let make expand exec_prefix. | |
17887 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17888 | ||
bec39cab AC |
17889 | DEFS=-DHAVE_CONFIG_H |
17890 | ||
17891 | ac_libobjs= | |
17892 | ac_ltlibobjs= | |
17893 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
17894 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
17895 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
17896 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
17897 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17898 | # will be set to the directory where LIBOBJS objects are built. | |
17899 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17900 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
17901 | done |
17902 | LIBOBJS=$ac_libobjs | |
17903 | ||
17904 | LTLIBOBJS=$ac_ltlibobjs | |
17905 | ||
17906 | ||
85981d60 | 17907 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
17908 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
17909 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 17910 | fi |
4df42755 DE |
17911 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
17912 | as_fn_error "conditional \"HAVE_PYTHON\" was never defined. | |
17913 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17914 | fi | |
17915 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
17916 | as_fn_error "conditional \"HAVE_GUILE\" was never defined. | |
17917 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17918 | fi | |
81ecdfbb RW |
17919 | |
17920 | ||
bec39cab | 17921 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 17922 | ac_write_fail=0 |
bec39cab AC |
17923 | ac_clean_files_save=$ac_clean_files |
17924 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
17925 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
17926 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17927 | as_write_fail=0 | |
17928 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
17929 | #! $SHELL |
17930 | # Generated by $as_me. | |
17931 | # Run this file to recreate the current configuration. | |
17932 | # Compiler output produced by configure, useful for debugging | |
17933 | # configure, is in config.log if it exists. | |
17934 | ||
17935 | debug=false | |
17936 | ac_cs_recheck=false | |
17937 | ac_cs_silent=false | |
bec39cab | 17938 | |
81ecdfbb RW |
17939 | SHELL=\${CONFIG_SHELL-$SHELL} |
17940 | export SHELL | |
17941 | _ASEOF | |
17942 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
17943 | ## -------------------- ## | |
17944 | ## M4sh Initialization. ## | |
17945 | ## -------------------- ## | |
17946 | ||
17947 | # Be more Bourne compatible | |
17948 | DUALCASE=1; export DUALCASE # for MKS sh | |
17949 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
17950 | emulate sh |
17951 | NULLCMD=: | |
81ecdfbb | 17952 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
17953 | # is contrary to our usage. Disable this feature. |
17954 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
17955 | setopt NO_GLOB_SUBST |
17956 | else | |
17957 | case `(set -o) 2>/dev/null` in #( | |
17958 | *posix*) : | |
17959 | set -o posix ;; #( | |
17960 | *) : | |
17961 | ;; | |
17962 | esac | |
bec39cab | 17963 | fi |
bec39cab | 17964 | |
81ecdfbb RW |
17965 | |
17966 | as_nl=' | |
17967 | ' | |
17968 | export as_nl | |
17969 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
17970 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
17971 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
17972 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
17973 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
17974 | # but without wasting forks for bash or zsh. | |
17975 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
17976 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17977 | as_echo='print -r --' | |
17978 | as_echo_n='print -rn --' | |
17979 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17980 | as_echo='printf %s\n' | |
17981 | as_echo_n='printf %s' | |
17982 | else | |
17983 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
17984 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
17985 | as_echo_n='/usr/ucb/echo -n' | |
17986 | else | |
17987 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
17988 | as_echo_n_body='eval | |
17989 | arg=$1; | |
17990 | case $arg in #( | |
17991 | *"$as_nl"*) | |
17992 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
17993 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
17994 | esac; | |
17995 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
17996 | ' | |
17997 | export as_echo_n_body | |
17998 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
17999 | fi | |
18000 | export as_echo_body | |
18001 | as_echo='sh -c $as_echo_body as_echo' | |
18002 | fi | |
18003 | ||
18004 | # The user is always right. | |
18005 | if test "${PATH_SEPARATOR+set}" != set; then | |
18006 | PATH_SEPARATOR=: | |
18007 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
18008 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
18009 | PATH_SEPARATOR=';' | |
18010 | } | |
bec39cab AC |
18011 | fi |
18012 | ||
18013 | ||
81ecdfbb RW |
18014 | # IFS |
18015 | # We need space, tab and new line, in precisely that order. Quoting is | |
18016 | # there to prevent editors from complaining about space-tab. | |
18017 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
18018 | # splitting by setting IFS to empty value.) | |
18019 | IFS=" "" $as_nl" | |
18020 | ||
18021 | # Find who we are. Look in the path if we contain no directory separator. | |
18022 | case $0 in #(( | |
18023 | *[\\/]* ) as_myself=$0 ;; | |
18024 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
18025 | for as_dir in $PATH | |
18026 | do | |
18027 | IFS=$as_save_IFS | |
18028 | test -z "$as_dir" && as_dir=. | |
18029 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
18030 | done | |
18031 | IFS=$as_save_IFS | |
18032 | ||
18033 | ;; | |
18034 | esac | |
18035 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
18036 | # in which case we are not to be found in the path. | |
18037 | if test "x$as_myself" = x; then | |
18038 | as_myself=$0 | |
18039 | fi | |
18040 | if test ! -f "$as_myself"; then | |
18041 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
18042 | exit 1 | |
18043 | fi | |
18044 | ||
18045 | # Unset variables that we do not need and which cause bugs (e.g. in | |
18046 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
18047 | # suppresses any "Segmentation fault" message there. '((' could | |
18048 | # trigger a bug in pdksh 5.2.14. | |
18049 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
18050 | do eval test x\${$as_var+set} = xset \ | |
18051 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
18052 | done | |
bec39cab AC |
18053 | PS1='$ ' |
18054 | PS2='> ' | |
18055 | PS4='+ ' | |
18056 | ||
18057 | # NLS nuisances. | |
81ecdfbb RW |
18058 | LC_ALL=C |
18059 | export LC_ALL | |
18060 | LANGUAGE=C | |
18061 | export LANGUAGE | |
18062 | ||
18063 | # CDPATH. | |
18064 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
18065 | ||
18066 | ||
18067 | # as_fn_error ERROR [LINENO LOG_FD] | |
18068 | # --------------------------------- | |
18069 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
18070 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
18071 | # script with status $?, using 1 if that was 0. | |
18072 | as_fn_error () | |
18073 | { | |
18074 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
18075 | if test "$3"; then | |
18076 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
18077 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
18078 | fi | |
18079 | $as_echo "$as_me: error: $1" >&2 | |
18080 | as_fn_exit $as_status | |
18081 | } # as_fn_error | |
18082 | ||
18083 | ||
18084 | # as_fn_set_status STATUS | |
18085 | # ----------------------- | |
18086 | # Set $? to STATUS, without forking. | |
18087 | as_fn_set_status () | |
18088 | { | |
18089 | return $1 | |
18090 | } # as_fn_set_status | |
18091 | ||
18092 | # as_fn_exit STATUS | |
18093 | # ----------------- | |
18094 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
18095 | as_fn_exit () | |
18096 | { | |
18097 | set +e | |
18098 | as_fn_set_status $1 | |
18099 | exit $1 | |
18100 | } # as_fn_exit | |
18101 | ||
18102 | # as_fn_unset VAR | |
18103 | # --------------- | |
18104 | # Portably unset VAR. | |
18105 | as_fn_unset () | |
18106 | { | |
18107 | { eval $1=; unset $1;} | |
18108 | } | |
18109 | as_unset=as_fn_unset | |
18110 | # as_fn_append VAR VALUE | |
18111 | # ---------------------- | |
18112 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
18113 | # advantage of any shell optimizations that allow amortized linear growth over | |
18114 | # repeated appends, instead of the typical quadratic growth present in naive | |
18115 | # implementations. | |
18116 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
18117 | eval 'as_fn_append () | |
18118 | { | |
18119 | eval $1+=\$2 | |
18120 | }' | |
18121 | else | |
18122 | as_fn_append () | |
18123 | { | |
18124 | eval $1=\$$1\$2 | |
18125 | } | |
18126 | fi # as_fn_append | |
18127 | ||
18128 | # as_fn_arith ARG... | |
18129 | # ------------------ | |
18130 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
18131 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
18132 | # must be portable across $(()) and expr. | |
18133 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
18134 | eval 'as_fn_arith () | |
18135 | { | |
18136 | as_val=$(( $* )) | |
18137 | }' | |
18138 | else | |
18139 | as_fn_arith () | |
18140 | { | |
18141 | as_val=`expr "$@" || test $? -eq 1` | |
18142 | } | |
18143 | fi # as_fn_arith | |
bec39cab | 18144 | |
81ecdfbb RW |
18145 | |
18146 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
18147 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
18148 | as_expr=expr |
18149 | else | |
18150 | as_expr=false | |
18151 | fi | |
18152 | ||
81ecdfbb | 18153 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
18154 | as_basename=basename |
18155 | else | |
18156 | as_basename=false | |
18157 | fi | |
18158 | ||
81ecdfbb RW |
18159 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
18160 | as_dirname=dirname | |
18161 | else | |
18162 | as_dirname=false | |
18163 | fi | |
bec39cab | 18164 | |
81ecdfbb | 18165 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
18166 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
18167 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18168 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
18169 | $as_echo X/"$0" | | |
18170 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
18171 | s//\1/ | |
18172 | q | |
18173 | } | |
18174 | /^X\/\(\/\/\)$/{ | |
18175 | s//\1/ | |
18176 | q | |
18177 | } | |
18178 | /^X\/\(\/\).*/{ | |
18179 | s//\1/ | |
18180 | q | |
18181 | } | |
18182 | s/.*/./; q'` | |
b4e70030 | 18183 | |
b4e70030 JB |
18184 | # Avoid depending upon Character Ranges. |
18185 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
18186 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
18187 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
18188 | as_cr_digits='0123456789' | |
18189 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
18190 | ||
81ecdfbb RW |
18191 | ECHO_C= ECHO_N= ECHO_T= |
18192 | case `echo -n x` in #((((( | |
18193 | -n*) | |
18194 | case `echo 'xy\c'` in | |
18195 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
18196 | xy) ECHO_C='\c';; | |
18197 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
18198 | ECHO_T=' ';; | |
18199 | esac;; | |
18200 | *) | |
18201 | ECHO_N='-n';; | |
bec39cab AC |
18202 | esac |
18203 | ||
81ecdfbb RW |
18204 | rm -f conf$$ conf$$.exe conf$$.file |
18205 | if test -d conf$$.dir; then | |
18206 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 18207 | else |
81ecdfbb RW |
18208 | rm -f conf$$.dir |
18209 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 18210 | fi |
81ecdfbb RW |
18211 | if (echo >conf$$.file) 2>/dev/null; then |
18212 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 18213 | as_ln_s='ln -s' |
81ecdfbb RW |
18214 | # ... but there are two gotchas: |
18215 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
18216 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
18217 | # In both cases, we have to default to `cp -p'. | |
18218 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
18219 | as_ln_s='cp -p' | |
18220 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
18221 | as_ln_s=ln | |
18222 | else | |
18223 | as_ln_s='cp -p' | |
b4e70030 | 18224 | fi |
bec39cab AC |
18225 | else |
18226 | as_ln_s='cp -p' | |
18227 | fi | |
81ecdfbb RW |
18228 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
18229 | rmdir conf$$.dir 2>/dev/null | |
18230 | ||
18231 | ||
18232 | # as_fn_mkdir_p | |
18233 | # ------------- | |
18234 | # Create "$as_dir" as a directory, including parents if necessary. | |
18235 | as_fn_mkdir_p () | |
18236 | { | |
18237 | ||
18238 | case $as_dir in #( | |
18239 | -*) as_dir=./$as_dir;; | |
18240 | esac | |
18241 | test -d "$as_dir" || eval $as_mkdir_p || { | |
18242 | as_dirs= | |
18243 | while :; do | |
18244 | case $as_dir in #( | |
18245 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
18246 | *) as_qdir=$as_dir;; | |
18247 | esac | |
18248 | as_dirs="'$as_qdir' $as_dirs" | |
18249 | as_dir=`$as_dirname -- "$as_dir" || | |
18250 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18251 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
18252 | X"$as_dir" : 'X\(//\)$' \| \ | |
18253 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
18254 | $as_echo X"$as_dir" | | |
18255 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18256 | s//\1/ | |
18257 | q | |
18258 | } | |
18259 | /^X\(\/\/\)[^/].*/{ | |
18260 | s//\1/ | |
18261 | q | |
18262 | } | |
18263 | /^X\(\/\/\)$/{ | |
18264 | s//\1/ | |
18265 | q | |
18266 | } | |
18267 | /^X\(\/\).*/{ | |
18268 | s//\1/ | |
18269 | q | |
18270 | } | |
18271 | s/.*/./; q'` | |
18272 | test -d "$as_dir" && break | |
18273 | done | |
18274 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
18275 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
18276 | ||
bec39cab | 18277 | |
81ecdfbb | 18278 | } # as_fn_mkdir_p |
bec39cab | 18279 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 18280 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
18281 | else |
18282 | test -d ./-p && rmdir ./-p | |
18283 | as_mkdir_p=false | |
18284 | fi | |
18285 | ||
81ecdfbb RW |
18286 | if test -x / >/dev/null 2>&1; then |
18287 | as_test_x='test -x' | |
18288 | else | |
18289 | if ls -dL / >/dev/null 2>&1; then | |
18290 | as_ls_L_option=L | |
18291 | else | |
18292 | as_ls_L_option= | |
18293 | fi | |
18294 | as_test_x=' | |
18295 | eval sh -c '\'' | |
18296 | if test -d "$1"; then | |
18297 | test -d "$1/."; | |
18298 | else | |
18299 | case $1 in #( | |
18300 | -*)set "./$1";; | |
18301 | esac; | |
18302 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
18303 | ???[sx]*):;;*)false;;esac;fi | |
18304 | '\'' sh | |
18305 | ' | |
18306 | fi | |
18307 | as_executable_p=$as_test_x | |
bec39cab AC |
18308 | |
18309 | # Sed expression to map a string onto a valid CPP name. | |
18310 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
18311 | ||
18312 | # Sed expression to map a string onto a valid variable name. | |
18313 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
18314 | ||
18315 | ||
bec39cab | 18316 | exec 6>&1 |
81ecdfbb RW |
18317 | ## ----------------------------------- ## |
18318 | ## Main body of $CONFIG_STATUS script. ## | |
18319 | ## ----------------------------------- ## | |
18320 | _ASEOF | |
18321 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
18322 | ||
18323 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18324 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 18325 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
18326 | # values after options handling. |
18327 | ac_log=" | |
bec39cab | 18328 | This file was extended by $as_me, which was |
81ecdfbb | 18329 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
18330 | |
18331 | CONFIG_FILES = $CONFIG_FILES | |
18332 | CONFIG_HEADERS = $CONFIG_HEADERS | |
18333 | CONFIG_LINKS = $CONFIG_LINKS | |
18334 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
18335 | $ $0 $@ | |
18336 | ||
81ecdfbb RW |
18337 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
18338 | " | |
18339 | ||
bec39cab AC |
18340 | _ACEOF |
18341 | ||
81ecdfbb RW |
18342 | case $ac_config_files in *" |
18343 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
18344 | esac | |
234b45d4 | 18345 | |
81ecdfbb RW |
18346 | case $ac_config_headers in *" |
18347 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
18348 | esac | |
b4e70030 | 18349 | |
b4e70030 | 18350 | |
81ecdfbb RW |
18351 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
18352 | # Files that config.status was made for. | |
18353 | config_files="$ac_config_files" | |
18354 | config_headers="$ac_config_headers" | |
18355 | config_links="$ac_config_links" | |
18356 | config_commands="$ac_config_commands" | |
234b45d4 | 18357 | |
81ecdfbb | 18358 | _ACEOF |
b4e70030 | 18359 | |
81ecdfbb | 18360 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 18361 | ac_cs_usage="\ |
81ecdfbb RW |
18362 | \`$as_me' instantiates files and other configuration actions |
18363 | from templates according to the current configuration. Unless the files | |
18364 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 18365 | |
81ecdfbb | 18366 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 18367 | |
bec39cab | 18368 | -h, --help print this help, then exit |
81ecdfbb RW |
18369 | -V, --version print version number and configuration settings, then exit |
18370 | -q, --quiet, --silent | |
18371 | do not print progress messages | |
bec39cab AC |
18372 | -d, --debug don't remove temporary files |
18373 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
18374 | --file=FILE[:TEMPLATE] |
18375 | instantiate the configuration file FILE | |
18376 | --header=FILE[:TEMPLATE] | |
18377 | instantiate the configuration header FILE | |
234b45d4 | 18378 | |
bec39cab AC |
18379 | Configuration files: |
18380 | $config_files | |
234b45d4 | 18381 | |
bec39cab AC |
18382 | Configuration headers: |
18383 | $config_headers | |
234b45d4 | 18384 | |
bec39cab AC |
18385 | Configuration links: |
18386 | $config_links | |
234b45d4 | 18387 | |
bec39cab AC |
18388 | Configuration commands: |
18389 | $config_commands | |
18390 | ||
81ecdfbb | 18391 | Report bugs to the package provider." |
b4e70030 | 18392 | |
81ecdfbb RW |
18393 | _ACEOF |
18394 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
18395 | ac_cs_version="\\ |
18396 | config.status | |
81ecdfbb RW |
18397 | configured by $0, generated by GNU Autoconf 2.64, |
18398 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 18399 | |
81ecdfbb | 18400 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
18401 | This config.status script is free software; the Free Software Foundation |
18402 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
18403 | |
18404 | ac_pwd='$ac_pwd' | |
18405 | srcdir='$srcdir' | |
18406 | INSTALL='$INSTALL' | |
81ecdfbb RW |
18407 | AWK='$AWK' |
18408 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
18409 | _ACEOF |
18410 | ||
81ecdfbb RW |
18411 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18412 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
18413 | ac_need_defaults=: |
18414 | while test $# != 0 | |
18415 | do | |
18416 | case $1 in | |
18417 | --*=*) | |
81ecdfbb RW |
18418 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18419 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 18420 | ac_shift=: |
c906108c | 18421 | ;; |
81ecdfbb | 18422 | *) |
bec39cab AC |
18423 | ac_option=$1 |
18424 | ac_optarg=$2 | |
18425 | ac_shift=shift | |
c906108c | 18426 | ;; |
bec39cab | 18427 | esac |
c906108c | 18428 | |
bec39cab AC |
18429 | case $ac_option in |
18430 | # Handling of the options. | |
bec39cab AC |
18431 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
18432 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
18433 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
18434 | $as_echo "$ac_cs_version"; exit ;; | |
18435 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
18436 | debug=: ;; |
18437 | --file | --fil | --fi | --f ) | |
18438 | $ac_shift | |
81ecdfbb RW |
18439 | case $ac_optarg in |
18440 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18441 | esac | |
18442 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
18443 | ac_need_defaults=false;; |
18444 | --header | --heade | --head | --hea ) | |
18445 | $ac_shift | |
81ecdfbb RW |
18446 | case $ac_optarg in |
18447 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18448 | esac | |
18449 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 18450 | ac_need_defaults=false;; |
81ecdfbb RW |
18451 | --he | --h) |
18452 | # Conflict between --help and --header | |
18453 | as_fn_error "ambiguous option: \`$1' | |
18454 | Try \`$0 --help' for more information.";; | |
18455 | --help | --hel | -h ) | |
18456 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
18457 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
18458 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18459 | ac_cs_silent=: ;; | |
c906108c | 18460 | |
bec39cab | 18461 | # This is an error. |
81ecdfbb RW |
18462 | -*) as_fn_error "unrecognized option: \`$1' |
18463 | Try \`$0 --help' for more information." ;; | |
c906108c | 18464 | |
81ecdfbb RW |
18465 | *) as_fn_append ac_config_targets " $1" |
18466 | ac_need_defaults=false ;; | |
c906108c | 18467 | |
bec39cab AC |
18468 | esac |
18469 | shift | |
18470 | done | |
c906108c | 18471 | |
bec39cab | 18472 | ac_configure_extra_args= |
c906108c | 18473 | |
bec39cab AC |
18474 | if $ac_cs_silent; then |
18475 | exec 6>/dev/null | |
18476 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
18477 | fi | |
c906108c | 18478 | |
bec39cab | 18479 | _ACEOF |
81ecdfbb | 18480 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 18481 | if \$ac_cs_recheck; then |
81ecdfbb RW |
18482 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
18483 | shift | |
18484 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
18485 | CONFIG_SHELL='$SHELL' | |
18486 | export CONFIG_SHELL | |
18487 | exec "\$@" | |
bec39cab AC |
18488 | fi |
18489 | ||
18490 | _ACEOF | |
81ecdfbb RW |
18491 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18492 | exec 5>>config.log | |
18493 | { | |
18494 | echo | |
18495 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18496 | ## Running $as_me. ## | |
18497 | _ASBOX | |
18498 | $as_echo "$ac_log" | |
18499 | } >&5 | |
bec39cab | 18500 | |
81ecdfbb RW |
18501 | _ACEOF |
18502 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 18503 | # |
81ecdfbb | 18504 | # INIT-COMMANDS |
c906108c | 18505 | # |
a417dc56 | 18506 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 18507 | |
bec39cab AC |
18508 | _ACEOF |
18509 | ||
81ecdfbb | 18510 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 18511 | |
81ecdfbb | 18512 | # Handling of arguments. |
bec39cab | 18513 | for ac_config_target in $ac_config_targets |
c906108c | 18514 | do |
81ecdfbb RW |
18515 | case $ac_config_target in |
18516 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
18517 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 18518 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 18519 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 18520 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 18521 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 18522 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 18523 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 18524 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
18525 | |
18526 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
18527 | esac |
18528 | done | |
18529 | ||
81ecdfbb | 18530 | |
bec39cab AC |
18531 | # If the user did not use the arguments to specify the items to instantiate, |
18532 | # then the envvar interface is used. Set only those that are not. | |
18533 | # We use the long form for the default assignment because of an extremely | |
18534 | # bizarre bug on SunOS 4.1.3. | |
18535 | if $ac_need_defaults; then | |
18536 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18537 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18538 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
18539 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18540 | fi | |
18541 | ||
b4e70030 | 18542 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 18543 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 18544 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
18545 | # Hook for its removal unless debugging. |
18546 | # Note that there is a small window in which the directory will not be cleaned: | |
18547 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
18548 | $debug || |
18549 | { | |
81ecdfbb RW |
18550 | tmp= |
18551 | trap 'exit_status=$? | |
18552 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
18553 | ' 0 | |
18554 | trap 'as_fn_exit 1' 1 2 13 15 | |
18555 | } | |
18556 | # Create a (secure) tmp directory for tmp files. | |
18557 | ||
18558 | { | |
18559 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
18560 | test -n "$tmp" && test -d "$tmp" | |
18561 | } || | |
18562 | { | |
18563 | tmp=./conf$$-$RANDOM | |
18564 | (umask 077 && mkdir "$tmp") | |
18565 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
18566 | ||
18567 | # Set up the scripts for CONFIG_FILES section. | |
18568 | # No need to generate them if there are no CONFIG_FILES. | |
18569 | # This happens for instance with `./config.status config.h'. | |
18570 | if test -n "$CONFIG_FILES"; then | |
18571 | ||
18572 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
18573 | ac_cs_awk_getline=: | |
18574 | ac_cs_awk_pipe_init= | |
18575 | ac_cs_awk_read_file=' | |
18576 | while ((getline aline < (F[key])) > 0) | |
18577 | print(aline) | |
18578 | close(F[key])' | |
18579 | ac_cs_awk_pipe_fini= | |
18580 | else | |
18581 | ac_cs_awk_getline=false | |
18582 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
18583 | ac_cs_awk_read_file=' | |
18584 | print "|#_!!_#|" | |
18585 | print "cat " F[key] " &&" | |
18586 | '$ac_cs_awk_pipe_init | |
18587 | # The final `:' finishes the AND list. | |
18588 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
18589 | fi | |
18590 | ac_cr=`echo X | tr X '\015'` | |
18591 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
18592 | # But we know of no other shell where ac_cr would be empty at this | |
18593 | # point, so we can use a bashism as a fallback. | |
18594 | if test "x$ac_cr" = x; then | |
18595 | eval ac_cr=\$\'\\r\' | |
18596 | fi | |
18597 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
18598 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
18599 | ac_cs_awk_cr='\r' | |
18600 | else | |
18601 | ac_cs_awk_cr=$ac_cr | |
18602 | fi | |
18603 | ||
18604 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
18605 | _ACEOF | |
18606 | ||
18607 | # Create commands to substitute file output variables. | |
18608 | { | |
18609 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
18610 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
18611 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
18612 | echo "_ACAWK" && | |
18613 | echo "_ACEOF" | |
18614 | } >conf$$files.sh && | |
18615 | . ./conf$$files.sh || | |
18616 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18617 | rm -f conf$$files.sh | |
18618 | ||
18619 | { | |
18620 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
18621 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
18622 | echo "_ACEOF" | |
18623 | } >conf$$subs.sh || | |
18624 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18625 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
18626 | ac_delim='%!_!# ' | |
18627 | for ac_last_try in false false false false false :; do | |
18628 | . ./conf$$subs.sh || | |
18629 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18630 | ||
18631 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
18632 | if test $ac_delim_n = $ac_delim_num; then | |
18633 | break | |
18634 | elif $ac_last_try; then | |
18635 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18636 | else | |
18637 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18638 | fi | |
18639 | done | |
18640 | rm -f conf$$subs.sh | |
18641 | ||
18642 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18643 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
18644 | _ACEOF | |
18645 | sed -n ' | |
18646 | h | |
18647 | s/^/S["/; s/!.*/"]=/ | |
18648 | p | |
18649 | g | |
18650 | s/^[^!]*!// | |
18651 | :repl | |
18652 | t repl | |
18653 | s/'"$ac_delim"'$// | |
18654 | t delim | |
18655 | :nl | |
18656 | h | |
18657 | s/\(.\{148\}\).*/\1/ | |
18658 | t more1 | |
18659 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
18660 | p | |
18661 | n | |
18662 | b repl | |
18663 | :more1 | |
18664 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18665 | p | |
18666 | g | |
18667 | s/.\{148\}// | |
18668 | t nl | |
18669 | :delim | |
18670 | h | |
18671 | s/\(.\{148\}\).*/\1/ | |
18672 | t more2 | |
18673 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
18674 | p | |
18675 | b | |
18676 | :more2 | |
18677 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18678 | p | |
18679 | g | |
18680 | s/.\{148\}// | |
18681 | t delim | |
18682 | ' <conf$$subs.awk | sed ' | |
18683 | /^[^""]/{ | |
18684 | N | |
18685 | s/\n// | |
18686 | } | |
18687 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
18688 | rm -f conf$$subs.awk | |
18689 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18690 | _ACAWK | |
18691 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
18692 | for (key in S) S_is_set[key] = 1 | |
18693 | FS = "\a" | |
18694 | \$ac_cs_awk_pipe_init | |
18695 | } | |
18696 | { | |
18697 | line = $ 0 | |
18698 | nfields = split(line, field, "@") | |
18699 | substed = 0 | |
18700 | len = length(field[1]) | |
18701 | for (i = 2; i < nfields; i++) { | |
18702 | key = field[i] | |
18703 | keylen = length(key) | |
18704 | if (S_is_set[key]) { | |
18705 | value = S[key] | |
18706 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
18707 | len += length(value) + length(field[++i]) | |
18708 | substed = 1 | |
18709 | } else | |
18710 | len += 1 + keylen | |
18711 | } | |
18712 | if (nfields == 3 && !substed) { | |
18713 | key = field[2] | |
18714 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
18715 | \$ac_cs_awk_read_file | |
18716 | next | |
18717 | } | |
18718 | } | |
18719 | print line | |
b4e70030 | 18720 | } |
81ecdfbb RW |
18721 | \$ac_cs_awk_pipe_fini |
18722 | _ACAWK | |
18723 | _ACEOF | |
18724 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18725 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
18726 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
18727 | else | |
18728 | cat | |
18729 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
18730 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
18731 | _ACEOF | |
18732 | ||
18733 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
18734 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
18735 | # trailing colons and then remove the whole line if VPATH becomes empty | |
18736 | # (actually we leave an empty line to preserve line numbers). | |
18737 | if test "x$srcdir" = x.; then | |
18738 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
18739 | s/:*\$(srcdir):*/:/ | |
18740 | s/:*\${srcdir}:*/:/ | |
18741 | s/:*@srcdir@:*/:/ | |
18742 | s/^\([^=]*=[ ]*\):*/\1/ | |
18743 | s/:*$// | |
18744 | s/^[^=]*=[ ]*$// | |
18745 | }' | |
18746 | fi | |
18747 | ||
18748 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18749 | fi # test -n "$CONFIG_FILES" | |
18750 | ||
18751 | # Set up the scripts for CONFIG_HEADERS section. | |
18752 | # No need to generate them if there are no CONFIG_HEADERS. | |
18753 | # This happens for instance with `./config.status Makefile'. | |
18754 | if test -n "$CONFIG_HEADERS"; then | |
18755 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
18756 | BEGIN { | |
18757 | _ACEOF | |
18758 | ||
18759 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
18760 | # here-document in config.status, that substitutes the proper values into | |
18761 | # config.h.in to produce config.h. | |
4e8d927d | 18762 | |
81ecdfbb RW |
18763 | # Create a delimiter string that does not exist in confdefs.h, to ease |
18764 | # handling of long lines. | |
18765 | ac_delim='%!_!# ' | |
18766 | for ac_last_try in false false :; do | |
18767 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
18768 | if test -z "$ac_t"; then | |
18769 | break | |
18770 | elif $ac_last_try; then | |
18771 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
18772 | else | |
18773 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18774 | fi | |
18775 | done | |
4e8d927d | 18776 | |
81ecdfbb RW |
18777 | # For the awk script, D is an array of macro values keyed by name, |
18778 | # likewise P contains macro parameters if any. Preserve backslash | |
18779 | # newline sequences. | |
18780 | ||
18781 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18782 | sed -n ' | |
18783 | s/.\{148\}/&'"$ac_delim"'/g | |
18784 | t rset | |
18785 | :rset | |
18786 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
18787 | t def | |
18788 | d | |
18789 | :def | |
18790 | s/\\$// | |
18791 | t bsnl | |
18792 | s/["\\]/\\&/g | |
18793 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18794 | D["\1"]=" \3"/p | |
18795 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
18796 | d | |
18797 | :bsnl | |
18798 | s/["\\]/\\&/g | |
18799 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18800 | D["\1"]=" \3\\\\\\n"\\/p | |
18801 | t cont | |
18802 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
18803 | t cont | |
18804 | d | |
18805 | :cont | |
18806 | n | |
18807 | s/.\{148\}/&'"$ac_delim"'/g | |
18808 | t clear | |
18809 | :clear | |
18810 | s/\\$// | |
18811 | t bsnlc | |
18812 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
18813 | d | |
18814 | :bsnlc | |
18815 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
18816 | b cont | |
18817 | ' <confdefs.h | sed ' | |
18818 | s/'"$ac_delim"'/"\\\ | |
18819 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
18820 | ||
18821 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18822 | for (key in D) D_is_set[key] = 1 | |
18823 | FS = "\a" | |
18824 | } | |
18825 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
18826 | line = \$ 0 | |
18827 | split(line, arg, " ") | |
18828 | if (arg[1] == "#") { | |
18829 | defundef = arg[2] | |
18830 | mac1 = arg[3] | |
18831 | } else { | |
18832 | defundef = substr(arg[1], 2) | |
18833 | mac1 = arg[2] | |
18834 | } | |
18835 | split(mac1, mac2, "(") #) | |
18836 | macro = mac2[1] | |
18837 | prefix = substr(line, 1, index(line, defundef) - 1) | |
18838 | if (D_is_set[macro]) { | |
18839 | # Preserve the white space surrounding the "#". | |
18840 | print prefix "define", macro P[macro] D[macro] | |
18841 | next | |
18842 | } else { | |
18843 | # Replace #undef with comments. This is necessary, for example, | |
18844 | # in the case of _POSIX_SOURCE, which is predefined and required | |
18845 | # on some systems where configure will not decide to define it. | |
18846 | if (defundef == "undef") { | |
18847 | print "/*", prefix defundef, macro, "*/" | |
18848 | next | |
18849 | } | |
18850 | } | |
b4e70030 | 18851 | } |
81ecdfbb RW |
18852 | { print } |
18853 | _ACAWK | |
b4e70030 | 18854 | _ACEOF |
81ecdfbb RW |
18855 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18856 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
18857 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 18858 | |
4e8d927d | 18859 | |
81ecdfbb RW |
18860 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
18861 | shift | |
18862 | for ac_tag | |
18863 | do | |
18864 | case $ac_tag in | |
18865 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18866 | esac | |
18867 | case $ac_mode$ac_tag in | |
18868 | :[FHL]*:*);; | |
18869 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
18870 | :[FH]-) ac_tag=-:-;; | |
18871 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18872 | esac | |
18873 | ac_save_IFS=$IFS | |
18874 | IFS=: | |
18875 | set x $ac_tag | |
18876 | IFS=$ac_save_IFS | |
18877 | shift | |
18878 | ac_file=$1 | |
18879 | shift | |
4e8d927d | 18880 | |
81ecdfbb RW |
18881 | case $ac_mode in |
18882 | :L) ac_source=$1;; | |
18883 | :[FH]) | |
18884 | ac_file_inputs= | |
18885 | for ac_f | |
18886 | do | |
18887 | case $ac_f in | |
18888 | -) ac_f="$tmp/stdin";; | |
18889 | *) # Look for the file first in the build tree, then in the source tree | |
18890 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18891 | # because $ac_f cannot contain `:'. | |
18892 | test -f "$ac_f" || | |
18893 | case $ac_f in | |
18894 | [\\/$]*) false;; | |
18895 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18896 | esac || | |
18897 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
18898 | esac | |
18899 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
18900 | as_fn_append ac_file_inputs " '$ac_f'" | |
18901 | done | |
18902 | ||
18903 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18904 | # use $as_me), people would be surprised to read: | |
18905 | # /* config.h. Generated by config.status. */ | |
18906 | configure_input='Generated from '` | |
18907 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
18908 | `' by configure.' | |
18909 | if test x"$ac_file" != x-; then | |
18910 | configure_input="$ac_file. $configure_input" | |
18911 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
18912 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 18913 | fi |
81ecdfbb RW |
18914 | # Neutralize special characters interpreted by sed in replacement strings. |
18915 | case $configure_input in #( | |
18916 | *\&* | *\|* | *\\* ) | |
18917 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
18918 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
18919 | *) ac_sed_conf_input=$configure_input;; | |
18920 | esac | |
4e8d927d | 18921 | |
81ecdfbb RW |
18922 | case $ac_tag in |
18923 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
18924 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
18925 | esac | |
18926 | ;; | |
c906108c SS |
18927 | esac |
18928 | ||
81ecdfbb | 18929 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
18930 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
18931 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18932 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18933 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
18934 | $as_echo X"$ac_file" | | |
18935 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18936 | s//\1/ | |
18937 | q | |
18938 | } | |
18939 | /^X\(\/\/\)[^/].*/{ | |
18940 | s//\1/ | |
18941 | q | |
18942 | } | |
18943 | /^X\(\/\/\)$/{ | |
18944 | s//\1/ | |
18945 | q | |
18946 | } | |
18947 | /^X\(\/\).*/{ | |
18948 | s//\1/ | |
18949 | q | |
18950 | } | |
18951 | s/.*/./; q'` | |
18952 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
18953 | ac_builddir=. |
18954 | ||
81ecdfbb RW |
18955 | case "$ac_dir" in |
18956 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18957 | *) | |
18958 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18959 | # A ".." for each directory in $ac_dir_suffix. | |
18960 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18961 | case $ac_top_builddir_sub in | |
18962 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18963 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18964 | esac ;; | |
18965 | esac | |
18966 | ac_abs_top_builddir=$ac_pwd | |
18967 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18968 | # for backward compatibility: | |
18969 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
18970 | |
18971 | case $srcdir in | |
81ecdfbb | 18972 | .) # We are building in place. |
bec39cab | 18973 | ac_srcdir=. |
81ecdfbb RW |
18974 | ac_top_srcdir=$ac_top_builddir_sub |
18975 | ac_abs_top_srcdir=$ac_pwd ;; | |
18976 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 18977 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
18978 | ac_top_srcdir=$srcdir |
18979 | ac_abs_top_srcdir=$srcdir ;; | |
18980 | *) # Relative name. | |
18981 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18982 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18983 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 18984 | esac |
81ecdfbb | 18985 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 18986 | |
c906108c | 18987 | |
81ecdfbb RW |
18988 | case $ac_mode in |
18989 | :F) | |
18990 | # | |
18991 | # CONFIG_FILE | |
18992 | # | |
c906108c | 18993 | |
bec39cab AC |
18994 | case $INSTALL in |
18995 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 18996 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 18997 | esac |
81ecdfbb | 18998 | _ACEOF |
121ce6e5 | 18999 | |
81ecdfbb RW |
19000 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
19001 | # If the template does not know about datarootdir, expand it. | |
19002 | # FIXME: This hack should be removed a few years after 2.60. | |
19003 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
19004 | ac_sed_dataroot=' | |
19005 | /datarootdir/ { | |
19006 | p | |
19007 | q | |
19008 | } | |
19009 | /@datadir@/p | |
19010 | /@docdir@/p | |
19011 | /@infodir@/p | |
19012 | /@localedir@/p | |
19013 | /@mandir@/p' | |
19014 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
19015 | *datarootdir*) ac_datarootdir_seen=yes;; | |
19016 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
19017 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
19018 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
19019 | _ACEOF | |
19020 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
19021 | ac_datarootdir_hack=' | |
19022 | s&@datadir@&$datadir&g | |
19023 | s&@docdir@&$docdir&g | |
19024 | s&@infodir@&$infodir&g | |
19025 | s&@localedir@&$localedir&g | |
19026 | s&@mandir@&$mandir&g | |
19027 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
19028 | esac | |
4e8d927d | 19029 | _ACEOF |
81ecdfbb RW |
19030 | |
19031 | # Neutralize VPATH when `$srcdir' = `.'. | |
19032 | # Shell code in configure.ac might set extrasub. | |
19033 | # FIXME: do we really want to maintain this feature? | |
19034 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
19035 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
19036 | $extrasub |
19037 | _ACEOF | |
81ecdfbb | 19038 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
19039 | :t |
19040 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
19041 | s|@configure_input@|$ac_sed_conf_input|;t t |
19042 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
19043 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
19044 | s&@srcdir@&$ac_srcdir&;t t | |
19045 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
19046 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
19047 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
19048 | s&@builddir@&$ac_builddir&;t t | |
19049 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
19050 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
19051 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
19052 | $ac_datarootdir_hack |
19053 | " | |
19054 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
19055 | if $ac_cs_awk_getline; then | |
19056 | $AWK -f "$tmp/subs.awk" | |
19057 | else | |
19058 | $AWK -f "$tmp/subs.awk" | $SHELL | |
19059 | fi >$tmp/out \ | |
19060 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
19061 | ||
19062 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
19063 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
19064 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
19065 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
19066 | which seems to be undefined. Please make sure it is defined." >&5 | |
19067 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
19068 | which seems to be undefined. Please make sure it is defined." >&2;} | |
19069 | ||
19070 | rm -f "$tmp/stdin" | |
bec39cab | 19071 | case $ac_file in |
81ecdfbb RW |
19072 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
19073 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
19074 | esac \ | |
19075 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
19076 | ;; | |
19077 | :H) | |
19078 | # | |
19079 | # CONFIG_HEADER | |
19080 | # | |
bec39cab | 19081 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
19082 | { |
19083 | $as_echo "/* $configure_input */" \ | |
19084 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
19085 | } >"$tmp/config.h" \ | |
19086 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
19087 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
19088 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
19089 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 19090 | else |
81ecdfbb RW |
19091 | rm -f "$ac_file" |
19092 | mv "$tmp/config.h" "$ac_file" \ | |
19093 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
19094 | fi |
19095 | else | |
81ecdfbb RW |
19096 | $as_echo "/* $configure_input */" \ |
19097 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
19098 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 19099 | fi |
81ecdfbb RW |
19100 | ;; |
19101 | :L) | |
19102 | # | |
19103 | # CONFIG_LINK | |
19104 | # | |
c906108c | 19105 | |
81ecdfbb RW |
19106 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
19107 | : | |
b4e70030 | 19108 | else |
81ecdfbb RW |
19109 | # Prefer the file from the source tree if names are identical. |
19110 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
19111 | ac_source=$srcdir/$ac_source | |
19112 | fi | |
b4e70030 | 19113 | |
81ecdfbb RW |
19114 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
19115 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 19116 | |
81ecdfbb RW |
19117 | if test ! -r "$ac_source"; then |
19118 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
19119 | fi | |
19120 | rm -f "$ac_file" | |
bec39cab | 19121 | |
81ecdfbb RW |
19122 | # Try a relative symlink, then a hard link, then a copy. |
19123 | case $srcdir in | |
19124 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
19125 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
19126 | esac | |
19127 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
19128 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
19129 | cp -p "$ac_source" "$ac_file" || | |
19130 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
19131 | fi | |
19132 | ;; | |
19133 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
19134 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
19135 | ;; | |
c906108c | 19136 | esac |
b4e70030 | 19137 | |
bec39cab | 19138 | |
81ecdfbb RW |
19139 | case $ac_file$ac_mode in |
19140 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 19141 | "gcore":F) chmod +x gcore ;; |
1e94266c SM |
19142 | "Makefile":F) |
19143 | case x$CONFIG_HEADERS in | |
19144 | xconfig.h:config.in) | |
19145 | echo > stamp-h ;; | |
19146 | esac | |
19147 | ;; | |
19148 | "gdb-gdb.gdb":F) | |
19149 | case x$CONFIG_HEADERS in | |
19150 | xconfig.h:config.in) | |
19151 | echo > stamp-h ;; | |
19152 | esac | |
19153 | ;; | |
19154 | "doc/Makefile":F) | |
19155 | case x$CONFIG_HEADERS in | |
19156 | xconfig.h:config.in) | |
19157 | echo > stamp-h ;; | |
19158 | esac | |
19159 | ;; | |
19160 | "data-directory/Makefile":F) | |
c906108c SS |
19161 | case x$CONFIG_HEADERS in |
19162 | xconfig.h:config.in) | |
19163 | echo > stamp-h ;; | |
19164 | esac | |
bec39cab | 19165 | ;; |
81ecdfbb | 19166 | |
bec39cab | 19167 | esac |
81ecdfbb | 19168 | done # for ac_tag |
c906108c | 19169 | |
bec39cab | 19170 | |
81ecdfbb | 19171 | as_fn_exit 0 |
bec39cab | 19172 | _ACEOF |
bec39cab AC |
19173 | ac_clean_files=$ac_clean_files_save |
19174 | ||
81ecdfbb RW |
19175 | test $ac_write_fail = 0 || |
19176 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
19177 | ||
bec39cab AC |
19178 | |
19179 | # configure is writing to config.log, and then calls config.status. | |
19180 | # config.status does its own redirection, appending to config.log. | |
19181 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
19182 | # by configure, so config.status won't be able to write to it; its | |
19183 | # output is simply discarded. So we exec the FD to /dev/null, | |
19184 | # effectively closing config.log, so it can be properly (re)opened and | |
19185 | # appended to by config.status. When coming back to configure, we | |
19186 | # need to make the FD available again. | |
19187 | if test "$no_create" != yes; then | |
19188 | ac_cs_success=: | |
19189 | ac_config_status_args= | |
19190 | test "$silent" = yes && | |
19191 | ac_config_status_args="$ac_config_status_args --quiet" | |
19192 | exec 5>/dev/null | |
19193 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
19194 | exec 5>>config.log | |
19195 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
19196 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 19197 | $ac_cs_success || as_fn_exit $? |
bec39cab | 19198 | fi |
c906108c | 19199 | |
bec39cab | 19200 | # |
81ecdfbb | 19201 | # CONFIG_SUBDIRS section. |
bec39cab | 19202 | # |
c906108c SS |
19203 | if test "$no_recursion" != yes; then |
19204 | ||
81ecdfbb RW |
19205 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
19206 | # so they do not pile up. | |
c906108c SS |
19207 | ac_sub_configure_args= |
19208 | ac_prev= | |
fdc59709 PB |
19209 | eval "set x $ac_configure_args" |
19210 | shift | |
19211 | for ac_arg | |
19212 | do | |
c906108c SS |
19213 | if test -n "$ac_prev"; then |
19214 | ac_prev= | |
19215 | continue | |
19216 | fi | |
bec39cab | 19217 | case $ac_arg in |
c906108c SS |
19218 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
19219 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
19220 | ac_prev=cache_file ;; | |
19221 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
19222 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
19223 | | --c=*) | |
19224 | ;; | |
19225 | --config-cache | -C) | |
c906108c SS |
19226 | ;; |
19227 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
19228 | ac_prev=srcdir ;; | |
19229 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
19230 | ;; | |
bec39cab AC |
19231 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
19232 | ac_prev=prefix ;; | |
19233 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
19234 | ;; | |
81ecdfbb RW |
19235 | --disable-option-checking) |
19236 | ;; | |
fdc59709 PB |
19237 | *) |
19238 | case $ac_arg in | |
81ecdfbb | 19239 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19240 | esac |
81ecdfbb | 19241 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
19242 | esac |
19243 | done | |
19244 | ||
bec39cab AC |
19245 | # Always prepend --prefix to ensure using the same prefix |
19246 | # in subdir configurations. | |
fdc59709 PB |
19247 | ac_arg="--prefix=$prefix" |
19248 | case $ac_arg in | |
81ecdfbb | 19249 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19250 | esac |
81ecdfbb RW |
19251 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
19252 | ||
19253 | # Pass --silent | |
19254 | if test "$silent" = yes; then | |
19255 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
19256 | fi | |
19257 | ||
19258 | # Always prepend --disable-option-checking to silence warnings, since | |
19259 | # different subdirs can have different --enable and --with options. | |
19260 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 19261 | |
b4e70030 | 19262 | ac_popdir=`pwd` |
bec39cab | 19263 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
19264 | |
19265 | # Do not complain, so a configure script can configure whichever | |
19266 | # parts of a large source tree are present. | |
fdc59709 | 19267 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 19268 | |
81ecdfbb RW |
19269 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
19270 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
19271 | $as_echo "$ac_msg" >&6 | |
19272 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
19273 | ac_builddir=. |
19274 | ||
81ecdfbb RW |
19275 | case "$ac_dir" in |
19276 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19277 | *) | |
19278 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
19279 | # A ".." for each directory in $ac_dir_suffix. | |
19280 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
19281 | case $ac_top_builddir_sub in | |
19282 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19283 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
19284 | esac ;; | |
19285 | esac | |
19286 | ac_abs_top_builddir=$ac_pwd | |
19287 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
19288 | # for backward compatibility: | |
19289 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
19290 | |
19291 | case $srcdir in | |
81ecdfbb | 19292 | .) # We are building in place. |
bec39cab | 19293 | ac_srcdir=. |
81ecdfbb RW |
19294 | ac_top_srcdir=$ac_top_builddir_sub |
19295 | ac_abs_top_srcdir=$ac_pwd ;; | |
19296 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 19297 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
19298 | ac_top_srcdir=$srcdir |
19299 | ac_abs_top_srcdir=$srcdir ;; | |
19300 | *) # Relative name. | |
19301 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
19302 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
19303 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 19304 | esac |
81ecdfbb | 19305 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 19306 | |
c906108c | 19307 | |
fdc59709 | 19308 | cd "$ac_dir" |
c906108c SS |
19309 | |
19310 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
19311 | if test -f "$ac_srcdir/configure.gnu"; then |
19312 | ac_sub_configure=$ac_srcdir/configure.gnu | |
19313 | elif test -f "$ac_srcdir/configure"; then | |
19314 | ac_sub_configure=$ac_srcdir/configure | |
19315 | elif test -f "$ac_srcdir/configure.in"; then | |
19316 | # This should be Cygnus configure. | |
19317 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 19318 | else |
81ecdfbb RW |
19319 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
19320 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
19321 | ac_sub_configure= |
19322 | fi | |
19323 | ||
19324 | # The recursion is here. | |
19325 | if test -n "$ac_sub_configure"; then | |
c906108c | 19326 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
19327 | case $cache_file in |
19328 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
19329 | *) # Relative name. |
19330 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 19331 | esac |
c906108c | 19332 | |
81ecdfbb RW |
19333 | { $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 |
19334 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 19335 | # The eval makes quoting arguments work. |
fdc59709 PB |
19336 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
19337 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 19338 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
19339 | fi |
19340 | ||
fdc59709 | 19341 | cd "$ac_popdir" |
c906108c SS |
19342 | done |
19343 | fi | |
81ecdfbb RW |
19344 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
19345 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
19346 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
19347 | fi | |
c906108c | 19348 |