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 | 4465 | if test "$plugins" = "yes"; then |
458412c3 TT |
4466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4467 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
4468 | if test "${ac_cv_search_dlsym+set}" = set; then : | |
2974be62 AM |
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 | |
458412c3 | 4481 | char dlsym (); |
2974be62 AM |
4482 | int |
4483 | main () | |
4484 | { | |
458412c3 | 4485 | return dlsym (); |
2974be62 AM |
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 : | |
458412c3 | 4498 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4499 | fi |
4500 | rm -f core conftest.err conftest.$ac_objext \ | |
4501 | conftest$ac_exeext | |
458412c3 | 4502 | if test "${ac_cv_search_dlsym+set}" = set; then : |
2974be62 AM |
4503 | break |
4504 | fi | |
4505 | done | |
458412c3 | 4506 | if test "${ac_cv_search_dlsym+set}" = set; then : |
2974be62 AM |
4507 | |
4508 | else | |
458412c3 | 4509 | ac_cv_search_dlsym=no |
2974be62 AM |
4510 | fi |
4511 | rm conftest.$ac_ext | |
4512 | LIBS=$ac_func_search_save_LIBS | |
4513 | fi | |
458412c3 TT |
4514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4515 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4516 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
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 | ||
41260ac2 | 4970 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
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 | |
41260ac2 SM |
5286 | for alternative in ${ax_cxx_compile_alternatives}; do |
5287 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5288 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5290 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
5291 | if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5292 | $as_echo_n "(cached) " >&6 | |
5293 | else | |
5294 | ac_save_CXX="$CXX" | |
5295 | CXX="$CXX $switch" | |
5296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5297 | /* end confdefs.h. */ | |
5298 | ||
5299 | ||
5300 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5301 | // Hopefully, this will speed up the test. | |
5302 | ||
5303 | #ifndef __cplusplus | |
5304 | ||
5305 | #error "This is not a C++ compiler" | |
5306 | ||
5307 | #elif __cplusplus < 201103L | |
5308 | ||
5309 | #error "This is not a C++11 compiler" | |
5310 | ||
5311 | #else | |
5312 | ||
5313 | namespace cxx11 | |
5314 | { | |
5315 | ||
5316 | namespace test_static_assert | |
5317 | { | |
5318 | ||
5319 | template <typename T> | |
5320 | struct check | |
5321 | { | |
5322 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5323 | }; | |
5324 | ||
5325 | } | |
5326 | ||
5327 | namespace test_final_override | |
5328 | { | |
5329 | ||
5330 | struct Base | |
5331 | { | |
5332 | virtual void f() {} | |
5333 | }; | |
5334 | ||
5335 | struct Derived : public Base | |
5336 | { | |
5337 | virtual void f() override {} | |
5338 | }; | |
5339 | ||
5340 | } | |
5341 | ||
5342 | namespace test_double_right_angle_brackets | |
5343 | { | |
5344 | ||
5345 | template < typename T > | |
5346 | struct check {}; | |
5347 | ||
5348 | typedef check<void> single_type; | |
5349 | typedef check<check<void>> double_type; | |
5350 | typedef check<check<check<void>>> triple_type; | |
5351 | typedef check<check<check<check<void>>>> quadruple_type; | |
5352 | ||
5353 | } | |
5354 | ||
5355 | namespace test_decltype | |
5356 | { | |
5357 | ||
5358 | int | |
5359 | f() | |
5360 | { | |
5361 | int a = 1; | |
5362 | decltype(a) b = 2; | |
5363 | return a + b; | |
5364 | } | |
5365 | ||
5366 | } | |
5367 | ||
5368 | namespace test_type_deduction | |
5369 | { | |
5370 | ||
5371 | template < typename T1, typename T2 > | |
5372 | struct is_same | |
5373 | { | |
5374 | static const bool value = false; | |
5375 | }; | |
5376 | ||
5377 | template < typename T > | |
5378 | struct is_same<T, T> | |
5379 | { | |
5380 | static const bool value = true; | |
5381 | }; | |
5382 | ||
5383 | template < typename T1, typename T2 > | |
5384 | auto | |
5385 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5386 | { | |
5387 | return a1 + a2; | |
5388 | } | |
5389 | ||
5390 | int | |
5391 | test(const int c, volatile int v) | |
5392 | { | |
5393 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5394 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5395 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5396 | auto ac = c; | |
5397 | auto av = v; | |
5398 | auto sumi = ac + av + 'x'; | |
5399 | auto sumf = ac + av + 1.0; | |
5400 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5401 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5402 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5403 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5404 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5405 | return (sumf > 0.0) ? sumi : add(c, v); | |
5406 | } | |
5407 | ||
5408 | } | |
5409 | ||
5410 | namespace test_noexcept | |
5411 | { | |
5412 | ||
5413 | int f() { return 0; } | |
5414 | int g() noexcept { return 0; } | |
5415 | ||
5416 | static_assert(noexcept(f()) == false, ""); | |
5417 | static_assert(noexcept(g()) == true, ""); | |
5418 | ||
5419 | } | |
5420 | ||
5421 | namespace test_constexpr | |
5422 | { | |
5423 | ||
5424 | template < typename CharT > | |
5425 | unsigned long constexpr | |
5426 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5427 | { | |
5428 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5429 | } | |
5430 | ||
5431 | template < typename CharT > | |
5432 | unsigned long constexpr | |
5433 | strlen_c(const CharT *const s) noexcept | |
5434 | { | |
5435 | return strlen_c_r(s, 0UL); | |
5436 | } | |
5437 | ||
5438 | static_assert(strlen_c("") == 0UL, ""); | |
5439 | static_assert(strlen_c("1") == 1UL, ""); | |
5440 | static_assert(strlen_c("example") == 7UL, ""); | |
5441 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5442 | ||
5443 | } | |
5444 | ||
5445 | namespace test_rvalue_references | |
5446 | { | |
5447 | ||
5448 | template < int N > | |
5449 | struct answer | |
5450 | { | |
5451 | static constexpr int value = N; | |
5452 | }; | |
5453 | ||
5454 | answer<1> f(int&) { return answer<1>(); } | |
5455 | answer<2> f(const int&) { return answer<2>(); } | |
5456 | answer<3> f(int&&) { return answer<3>(); } | |
5457 | ||
5458 | void | |
5459 | test() | |
5460 | { | |
5461 | int i = 0; | |
5462 | const int c = 0; | |
5463 | static_assert(decltype(f(i))::value == 1, ""); | |
5464 | static_assert(decltype(f(c))::value == 2, ""); | |
5465 | static_assert(decltype(f(0))::value == 3, ""); | |
5466 | } | |
5467 | ||
5468 | } | |
5469 | ||
5470 | namespace test_uniform_initialization | |
5471 | { | |
5472 | ||
5473 | struct test | |
5474 | { | |
5475 | static const int zero {}; | |
5476 | static const int one {1}; | |
5477 | }; | |
5478 | ||
5479 | static_assert(test::zero == 0, ""); | |
5480 | static_assert(test::one == 1, ""); | |
5481 | ||
5482 | } | |
5483 | ||
5484 | namespace test_lambdas | |
5485 | { | |
5486 | ||
5487 | void | |
5488 | test1() | |
5489 | { | |
5490 | auto lambda1 = [](){}; | |
5491 | auto lambda2 = lambda1; | |
5492 | lambda1(); | |
5493 | lambda2(); | |
5494 | } | |
5495 | ||
5496 | int | |
5497 | test2() | |
5498 | { | |
5499 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5500 | auto b = []() -> int { return '0'; }(); | |
5501 | auto c = [=](){ return a + b; }(); | |
5502 | auto d = [&](){ return c; }(); | |
5503 | auto e = [a, &b](int x) mutable { | |
5504 | const auto identity = [](int y){ return y; }; | |
5505 | for (auto i = 0; i < a; ++i) | |
5506 | a += b--; | |
5507 | return x + identity(a + b); | |
5508 | }(0); | |
5509 | return a + b + c + d + e; | |
5510 | } | |
5511 | ||
5512 | int | |
5513 | test3() | |
5514 | { | |
5515 | const auto nullary = [](){ return 0; }; | |
5516 | const auto unary = [](int x){ return x; }; | |
5517 | using nullary_t = decltype(nullary); | |
5518 | using unary_t = decltype(unary); | |
5519 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5520 | const auto higher2nd = [unary](nullary_t f1){ | |
5521 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5522 | }; | |
5523 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5524 | } | |
5525 | ||
5526 | } | |
5527 | ||
5528 | namespace test_variadic_templates | |
5529 | { | |
5530 | ||
5531 | template <int...> | |
5532 | struct sum; | |
5533 | ||
5534 | template <int N0, int... N1toN> | |
5535 | struct sum<N0, N1toN...> | |
5536 | { | |
5537 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5538 | }; | |
5539 | ||
5540 | template <> | |
5541 | struct sum<> | |
5542 | { | |
5543 | static constexpr auto value = 0; | |
5544 | }; | |
5545 | ||
5546 | static_assert(sum<>::value == 0, ""); | |
5547 | static_assert(sum<1>::value == 1, ""); | |
5548 | static_assert(sum<23>::value == 23, ""); | |
5549 | static_assert(sum<1, 2>::value == 3, ""); | |
5550 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5551 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5552 | ||
5553 | } | |
5554 | ||
5555 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5556 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5557 | // because of this. | |
5558 | namespace test_template_alias_sfinae | |
5559 | { | |
5560 | ||
5561 | struct foo {}; | |
5562 | ||
5563 | template<typename T> | |
5564 | using member = typename T::member_type; | |
5565 | ||
5566 | template<typename T> | |
5567 | void func(...) {} | |
5568 | ||
5569 | template<typename T> | |
5570 | void func(member<T>*) {} | |
5571 | ||
5572 | void test(); | |
5573 | ||
5574 | void test() { func<foo>(0); } | |
5575 | ||
5576 | } | |
5577 | ||
5578 | } // namespace cxx11 | |
5579 | ||
5580 | #endif // __cplusplus >= 201103L | |
5581 | ||
5582 | ||
5583 | ||
5584 | _ACEOF | |
5585 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5586 | eval $cachevar=yes | |
5587 | else | |
5588 | eval $cachevar=no | |
5589 | fi | |
5590 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5591 | CXX="$ac_save_CXX" | |
5592 | fi | |
5593 | eval ac_res=\$$cachevar | |
5594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5595 | $as_echo "$ac_res" >&6; } | |
5596 | if eval test x\$$cachevar = xyes; then | |
5597 | CXX_DIALECT="$switch" | |
5598 | ac_success=yes | |
5599 | break | |
5600 | fi | |
5601 | done | |
5602 | fi | |
5603 | ||
5604 | if test x$ac_success = xno; then | |
41260ac2 SM |
5605 | for alternative in ${ax_cxx_compile_alternatives}; do |
5606 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5607 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 PA |
5609 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
5610 | if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5611 | $as_echo_n "(cached) " >&6 | |
5612 | else | |
5613 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5614 | CXX="$CXX $switch" |
5615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5616 | /* end confdefs.h. */ |
5617 | ||
5618 | ||
5619 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5620 | // Hopefully, this will speed up the test. | |
5621 | ||
5622 | #ifndef __cplusplus | |
5623 | ||
5624 | #error "This is not a C++ compiler" | |
5625 | ||
5626 | #elif __cplusplus < 201103L | |
5627 | ||
5628 | #error "This is not a C++11 compiler" | |
5629 | ||
5630 | #else | |
5631 | ||
5632 | namespace cxx11 | |
5633 | { | |
5634 | ||
5635 | namespace test_static_assert | |
5636 | { | |
5637 | ||
5638 | template <typename T> | |
5639 | struct check | |
5640 | { | |
5641 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5642 | }; | |
5643 | ||
5644 | } | |
5645 | ||
5646 | namespace test_final_override | |
5647 | { | |
5648 | ||
5649 | struct Base | |
5650 | { | |
5651 | virtual void f() {} | |
5652 | }; | |
5653 | ||
5654 | struct Derived : public Base | |
5655 | { | |
5656 | virtual void f() override {} | |
5657 | }; | |
5658 | ||
5659 | } | |
5660 | ||
5661 | namespace test_double_right_angle_brackets | |
5662 | { | |
5663 | ||
5664 | template < typename T > | |
5665 | struct check {}; | |
5666 | ||
5667 | typedef check<void> single_type; | |
5668 | typedef check<check<void>> double_type; | |
5669 | typedef check<check<check<void>>> triple_type; | |
5670 | typedef check<check<check<check<void>>>> quadruple_type; | |
5671 | ||
5672 | } | |
5673 | ||
5674 | namespace test_decltype | |
5675 | { | |
5676 | ||
5677 | int | |
5678 | f() | |
5679 | { | |
5680 | int a = 1; | |
5681 | decltype(a) b = 2; | |
5682 | return a + b; | |
5683 | } | |
5684 | ||
5685 | } | |
5686 | ||
5687 | namespace test_type_deduction | |
5688 | { | |
5689 | ||
5690 | template < typename T1, typename T2 > | |
5691 | struct is_same | |
5692 | { | |
5693 | static const bool value = false; | |
5694 | }; | |
5695 | ||
5696 | template < typename T > | |
5697 | struct is_same<T, T> | |
5698 | { | |
5699 | static const bool value = true; | |
5700 | }; | |
5701 | ||
5702 | template < typename T1, typename T2 > | |
5703 | auto | |
5704 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5705 | { | |
5706 | return a1 + a2; | |
5707 | } | |
5708 | ||
5709 | int | |
5710 | test(const int c, volatile int v) | |
5711 | { | |
5712 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5713 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5714 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5715 | auto ac = c; | |
5716 | auto av = v; | |
5717 | auto sumi = ac + av + 'x'; | |
5718 | auto sumf = ac + av + 1.0; | |
5719 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5720 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5721 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5722 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5723 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5724 | return (sumf > 0.0) ? sumi : add(c, v); | |
5725 | } | |
5726 | ||
5727 | } | |
5728 | ||
5729 | namespace test_noexcept | |
5730 | { | |
5731 | ||
5732 | int f() { return 0; } | |
5733 | int g() noexcept { return 0; } | |
5734 | ||
5735 | static_assert(noexcept(f()) == false, ""); | |
5736 | static_assert(noexcept(g()) == true, ""); | |
5737 | ||
5738 | } | |
5739 | ||
5740 | namespace test_constexpr | |
5741 | { | |
5742 | ||
5743 | template < typename CharT > | |
5744 | unsigned long constexpr | |
5745 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5746 | { | |
5747 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5748 | } | |
5749 | ||
5750 | template < typename CharT > | |
5751 | unsigned long constexpr | |
5752 | strlen_c(const CharT *const s) noexcept | |
5753 | { | |
5754 | return strlen_c_r(s, 0UL); | |
5755 | } | |
5756 | ||
5757 | static_assert(strlen_c("") == 0UL, ""); | |
5758 | static_assert(strlen_c("1") == 1UL, ""); | |
5759 | static_assert(strlen_c("example") == 7UL, ""); | |
5760 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5761 | ||
5762 | } | |
5763 | ||
5764 | namespace test_rvalue_references | |
5765 | { | |
5766 | ||
5767 | template < int N > | |
5768 | struct answer | |
5769 | { | |
5770 | static constexpr int value = N; | |
5771 | }; | |
5772 | ||
5773 | answer<1> f(int&) { return answer<1>(); } | |
5774 | answer<2> f(const int&) { return answer<2>(); } | |
5775 | answer<3> f(int&&) { return answer<3>(); } | |
5776 | ||
5777 | void | |
5778 | test() | |
5779 | { | |
5780 | int i = 0; | |
5781 | const int c = 0; | |
5782 | static_assert(decltype(f(i))::value == 1, ""); | |
5783 | static_assert(decltype(f(c))::value == 2, ""); | |
5784 | static_assert(decltype(f(0))::value == 3, ""); | |
5785 | } | |
5786 | ||
5787 | } | |
5788 | ||
5789 | namespace test_uniform_initialization | |
5790 | { | |
5791 | ||
5792 | struct test | |
5793 | { | |
5794 | static const int zero {}; | |
5795 | static const int one {1}; | |
5796 | }; | |
5797 | ||
5798 | static_assert(test::zero == 0, ""); | |
5799 | static_assert(test::one == 1, ""); | |
5800 | ||
5801 | } | |
5802 | ||
5803 | namespace test_lambdas | |
5804 | { | |
5805 | ||
5806 | void | |
5807 | test1() | |
5808 | { | |
5809 | auto lambda1 = [](){}; | |
5810 | auto lambda2 = lambda1; | |
5811 | lambda1(); | |
5812 | lambda2(); | |
5813 | } | |
5814 | ||
5815 | int | |
5816 | test2() | |
5817 | { | |
5818 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5819 | auto b = []() -> int { return '0'; }(); | |
5820 | auto c = [=](){ return a + b; }(); | |
5821 | auto d = [&](){ return c; }(); | |
5822 | auto e = [a, &b](int x) mutable { | |
5823 | const auto identity = [](int y){ return y; }; | |
5824 | for (auto i = 0; i < a; ++i) | |
5825 | a += b--; | |
5826 | return x + identity(a + b); | |
5827 | }(0); | |
5828 | return a + b + c + d + e; | |
5829 | } | |
5830 | ||
5831 | int | |
5832 | test3() | |
5833 | { | |
5834 | const auto nullary = [](){ return 0; }; | |
5835 | const auto unary = [](int x){ return x; }; | |
5836 | using nullary_t = decltype(nullary); | |
5837 | using unary_t = decltype(unary); | |
5838 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5839 | const auto higher2nd = [unary](nullary_t f1){ | |
5840 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5841 | }; | |
5842 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5843 | } | |
5844 | ||
5845 | } | |
5846 | ||
5847 | namespace test_variadic_templates | |
5848 | { | |
5849 | ||
5850 | template <int...> | |
5851 | struct sum; | |
5852 | ||
5853 | template <int N0, int... N1toN> | |
5854 | struct sum<N0, N1toN...> | |
5855 | { | |
5856 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5857 | }; | |
5858 | ||
5859 | template <> | |
5860 | struct sum<> | |
5861 | { | |
5862 | static constexpr auto value = 0; | |
5863 | }; | |
5864 | ||
5865 | static_assert(sum<>::value == 0, ""); | |
5866 | static_assert(sum<1>::value == 1, ""); | |
5867 | static_assert(sum<23>::value == 23, ""); | |
5868 | static_assert(sum<1, 2>::value == 3, ""); | |
5869 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5870 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5871 | ||
5872 | } | |
5873 | ||
5874 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5875 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5876 | // because of this. | |
5877 | namespace test_template_alias_sfinae | |
5878 | { | |
5879 | ||
5880 | struct foo {}; | |
5881 | ||
5882 | template<typename T> | |
5883 | using member = typename T::member_type; | |
5884 | ||
5885 | template<typename T> | |
5886 | void func(...) {} | |
5887 | ||
5888 | template<typename T> | |
5889 | void func(member<T>*) {} | |
5890 | ||
5891 | void test(); | |
5892 | ||
5893 | void test() { func<foo>(0); } | |
5894 | ||
5895 | } | |
5896 | ||
5897 | } // namespace cxx11 | |
5898 | ||
5899 | #endif // __cplusplus >= 201103L | |
5900 | ||
5901 | ||
5902 | ||
5903 | _ACEOF | |
5904 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5905 | eval $cachevar=yes | |
5906 | else | |
5907 | eval $cachevar=no | |
5908 | fi | |
5909 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 5910 | CXX="$ac_save_CXX" |
0bcda685 PA |
5911 | fi |
5912 | eval ac_res=\$$cachevar | |
5913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5914 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
5915 | if eval test x\$$cachevar = xyes; then |
5916 | CXX_DIALECT="$switch" | |
5917 | ac_success=yes | |
5918 | break | |
5919 | fi | |
5920 | done | |
5921 | if test x$ac_success = xyes; then | |
0bcda685 PA |
5922 | break |
5923 | fi | |
5924 | done | |
5925 | fi | |
5926 | ac_ext=c | |
5927 | ac_cpp='$CPP $CPPFLAGS' | |
5928 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5929 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5930 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5931 | ||
5932 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
5933 | if test x$ac_success = xno; then | |
5934 | as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5 | |
5935 | fi | |
5936 | fi | |
5937 | if test x$ac_success = xno; then | |
5938 | HAVE_CXX11=0 | |
5939 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
5940 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
5941 | else | |
5942 | HAVE_CXX11=1 | |
5943 | ||
5944 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
5945 | ||
5946 | fi | |
5947 | ||
5948 | ||
5949 | ||
5950 | ||
a417dc56 RW |
5951 | # Dependency checking. |
5952 | rm -rf .tst 2>/dev/null | |
5953 | mkdir .tst 2>/dev/null | |
5954 | if test -d .tst; then | |
5955 | am__leading_dot=. | |
5956 | else | |
5957 | am__leading_dot=_ | |
5958 | fi | |
5959 | rmdir .tst 2>/dev/null | |
5960 | ||
5961 | DEPDIR="${am__leading_dot}deps" | |
5962 | ||
81ecdfbb | 5963 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
5964 | |
5965 | ||
5966 | depcc="$CC" am_compiler_list= | |
5967 | ||
5968 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
5969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
5970 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
5971 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
5972 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5973 | else |
5974 | if test -f "$am_depcomp"; then | |
5975 | # We make a subdir and do the tests there. Otherwise we can end up | |
5976 | # making bogus files that we don't know about and never remove. For | |
5977 | # instance it was reported that on HP-UX the gcc test will end up | |
5978 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5979 | # in D'. | |
5980 | mkdir conftest.dir | |
5981 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5982 | # using a relative directory. | |
5983 | cp "$am_depcomp" conftest.dir | |
5984 | cd conftest.dir | |
5985 | # We will build objects and dependencies in a subdirectory because | |
5986 | # it helps to detect inapplicable dependency modes. For instance | |
5987 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5988 | # side effect of compilation, but ICC will put the dependencies in | |
5989 | # the current directory while Tru64 will put them in the object | |
5990 | # directory. | |
5991 | mkdir sub | |
5992 | ||
5993 | am_cv_CC_dependencies_compiler_type=none | |
5994 | if test "$am_compiler_list" = ""; then | |
5995 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5996 | fi | |
5997 | for depmode in $am_compiler_list; do | |
5998 | if test $depmode = none; then break; fi | |
5999 | ||
81ecdfbb | 6000 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6001 | # Setup a source with many dependencies, because some compilers |
6002 | # like to wrap large dependency lists on column 80 (with \), and | |
6003 | # we should not choose a depcomp mode which is confused by this. | |
6004 | # | |
6005 | # We need to recreate these files for each test, as the compiler may | |
6006 | # overwrite some of them when testing with obscure command lines. | |
6007 | # This happens at least with the AIX C compiler. | |
6008 | : > sub/conftest.c | |
6009 | for i in 1 2 3 4 5 6; do | |
6010 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6011 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6012 | # Solaris 8's {/usr,}/bin/sh. | |
6013 | touch sub/conftst$i.h | |
6014 | done | |
6015 | echo "include sub/conftest.Po" > confmf | |
6016 | ||
6017 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6018 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6019 | # handle `-M -o', and we need to detect this. | |
6020 | depcmd="depmode=$depmode \ | |
6021 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6022 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6023 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6024 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6025 | if env $depcmd > conftest.err 2>&1 && | |
6026 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6027 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6028 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6029 | # icc doesn't choke on unknown options, it will just issue warnings | |
6030 | # or remarks (even with -Werror). So we grep stderr for any message | |
6031 | # that says an option was ignored or not supported. | |
6032 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6033 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6034 | # The diagnosis changed in icc 8.0: | |
6035 | # icc: Command line remark: option '-MP' not supported | |
6036 | if (grep 'ignoring option' conftest.err || | |
6037 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6038 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6039 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6040 | break |
6041 | fi | |
6042 | fi | |
81ecdfbb | 6043 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6044 | sed -e 's/^/| /' < conftest.err >&5 |
6045 | done | |
6046 | ||
6047 | cd .. | |
6048 | rm -rf conftest.dir | |
6049 | else | |
6050 | am_cv_CC_dependencies_compiler_type=none | |
6051 | fi | |
6052 | ||
6053 | fi | |
81ecdfbb RW |
6054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6055 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6056 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 6057 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6058 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6059 | ||
6060 | fi | |
6061 | ||
6062 | ||
648d586d JB |
6063 | gnulib_extra_configure_args= |
6064 | # If large-file support is disabled, make sure gnulib does the same. | |
6065 | if test "$enable_largefile" = no; then | |
6066 | gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" | |
6067 | fi | |
6068 | ||
c971b7fa PA |
6069 | # Configure gnulib. We need to build gnulib under some other |
6070 | # directory not "gnulib", to avoid the problem of both GDB and | |
6071 | # GDBserver wanting to build it in the same directory, when building | |
6072 | # in the source dir. | |
783e057b | 6073 | |
c971b7fa PA |
6074 | in_src="gnulib" |
6075 | in_build="build-gnulib" | |
648d586d | 6076 | in_extra_args="$gnulib_extra_configure_args" |
c971b7fa PA |
6077 | |
6078 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
6079 | # so they do not pile up. | |
6080 | ac_sub_configure_args= | |
6081 | ac_prev= | |
6082 | eval "set x $ac_configure_args" | |
6083 | shift | |
6084 | for ac_arg | |
6085 | do | |
6086 | if test -n "$ac_prev"; then | |
6087 | ac_prev= | |
6088 | continue | |
6089 | fi | |
6090 | case $ac_arg in | |
6091 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6092 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6093 | ac_prev=cache_file ;; | |
6094 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6095 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
6096 | | --c=*) | |
6097 | ;; | |
6098 | --config-cache | -C) | |
6099 | ;; | |
6100 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6101 | ac_prev=srcdir ;; | |
6102 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6103 | ;; | |
6104 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
6105 | ac_prev=prefix ;; | |
6106 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
6107 | ;; | |
6108 | --disable-option-checking) | |
6109 | ;; | |
6110 | *) | |
6111 | case $ac_arg in | |
6112 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6113 | esac | |
6114 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
6115 | esac | |
6116 | done | |
6117 | ||
6118 | # Always prepend --prefix to ensure using the same prefix | |
6119 | # in subdir configurations. | |
6120 | ac_arg="--prefix=$prefix" | |
6121 | case $ac_arg in | |
6122 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6123 | esac | |
6124 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
6125 | ||
6126 | # Pass --silent | |
6127 | if test "$silent" = yes; then | |
6128 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
6129 | fi | |
6130 | ||
6131 | # Always prepend --disable-option-checking to silence warnings, since | |
6132 | # different subdirs can have different --enable and --with options. | |
6133 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
6134 | ||
6135 | ac_popdir=`pwd` | |
6136 | ac_dir=$in_build | |
6137 | ||
6138 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
6139 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
6140 | $as_echo "$ac_msg" >&6 | |
6141 | as_dir="$ac_dir"; as_fn_mkdir_p | |
6142 | ||
38ea300a PA |
6143 | case $srcdir in |
6144 | [\\/]* | ?:[\\/]* ) | |
6145 | ac_srcdir=$srcdir/$in_src ;; | |
6146 | *) # Relative name. | |
6147 | ac_srcdir=../$srcdir/$in_src ;; | |
6148 | esac | |
c971b7fa PA |
6149 | |
6150 | cd "$ac_dir" | |
6151 | ||
6152 | ac_sub_configure=$ac_srcdir/configure | |
6153 | ||
6154 | # Make the cache file name correct relative to the subdirectory. | |
6155 | case $cache_file in | |
6156 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
6157 | *) # Relative name. | |
6158 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
6159 | esac | |
6160 | ||
648d586d JB |
6161 | if test -n "$in_extra_args"; then |
6162 | # Add the extra args at the end. | |
6163 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
6164 | fi | |
6165 | ||
c971b7fa PA |
6166 | { $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 |
6167 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
6168 | # The eval makes quoting arguments work. | |
6169 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
6170 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
6171 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
6172 | ||
6173 | cd "$ac_popdir" | |
783e057b | 6174 | |
c971b7fa PA |
6175 | |
6176 | ||
6177 | CONFIG_OBS= | |
6178 | CONFIG_DEPS= | |
6179 | CONFIG_SRCS= | |
6180 | ENABLE_CFLAGS= | |
6181 | ||
6182 | CONFIG_ALL= | |
6183 | CONFIG_CLEAN= | |
6184 | CONFIG_INSTALL= | |
6185 | CONFIG_UNINSTALL= | |
6186 | ||
6187 | # If we haven't got the data from the intl directory, | |
6188 | # assume NLS is disabled. | |
6189 | USE_NLS=no | |
6190 | LIBINTL= | |
6191 | LIBINTL_DEP= | |
6192 | INCINTL= | |
6193 | XGETTEXT= | |
6194 | GMSGFMT= | |
6195 | POSUB= | |
783e057b DJ |
6196 | |
6197 | if test -f ../intl/config.intl; then | |
6198 | . ../intl/config.intl | |
6199 | fi | |
81ecdfbb RW |
6200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6201 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6202 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6204 | $as_echo "no" >&6; } | |
783e057b | 6205 | else |
81ecdfbb RW |
6206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6207 | $as_echo "yes" >&6; } | |
783e057b | 6208 | |
81ecdfbb | 6209 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6210 | |
6211 | ||
81ecdfbb RW |
6212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6213 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6214 | # Look for .po and .gmo files in the source directory. |
6215 | CATALOGS= | |
6216 | XLINGUAS= | |
6217 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6218 | # If there aren't any .gmo files the shell will give us the | |
6219 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6220 | # weeded out. | |
6221 | case "$cat" in *\**) | |
6222 | continue;; | |
6223 | esac | |
6224 | # The quadruple backslash is collapsed to a double backslash | |
6225 | # by the backticks, then collapsed again by the double quotes, | |
6226 | # leaving us with one backslash in the sed expression (right | |
6227 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6228 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6229 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6230 | # The user is allowed to set LINGUAS to a list of languages to | |
6231 | # install catalogs for. If it's empty that means "all of them." | |
6232 | if test "x$LINGUAS" = x; then | |
6233 | CATALOGS="$CATALOGS $cat" | |
6234 | XLINGUAS="$XLINGUAS $lang" | |
6235 | else | |
6236 | case "$LINGUAS" in *$lang*) | |
6237 | CATALOGS="$CATALOGS $cat" | |
6238 | XLINGUAS="$XLINGUAS $lang" | |
6239 | ;; | |
6240 | esac | |
e28b3332 DJ |
6241 | fi |
6242 | done | |
c971b7fa PA |
6243 | LINGUAS="$XLINGUAS" |
6244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6245 | $as_echo "$LINGUAS" >&6; } | |
6246 | ||
6247 | ||
6248 | DATADIRNAME=share | |
6249 | ||
6250 | INSTOBJEXT=.mo | |
6251 | ||
6252 | GENCAT=gencat | |
6253 | ||
6254 | CATOBJEXT=.gmo | |
e28b3332 | 6255 | |
e28b3332 DJ |
6256 | fi |
6257 | ||
c971b7fa PA |
6258 | localedir='${datadir}/locale' |
6259 | ||
6260 | ||
6261 | if test x"$USE_NLS" = xyes; then | |
6262 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6263 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6264 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6265 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6266 | fi |
e28b3332 | 6267 | |
c971b7fa PA |
6268 | GNULIB=build-gnulib/import |
6269 | ||
6270 | # For Makefile dependencies. | |
6271 | GNULIB_STDINT_H= | |
6272 | if test x"$STDINT_H" != x; then | |
6273 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
6274 | fi |
6275 | ||
6276 | ||
c971b7fa PA |
6277 | PACKAGE=gdb |
6278 | ||
6279 | cat >>confdefs.h <<_ACEOF | |
6280 | #define PACKAGE "$PACKAGE" | |
6281 | _ACEOF | |
6282 | ||
6283 | ||
6284 | ||
6285 | # We never need to detect it in this sub-configure. | |
6286 | # But preserve it for config.status --recheck. | |
6287 | ||
6288 | ||
6289 | ||
6290 | MAKEINFO_EXTRA_FLAGS="" | |
6291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6292 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
6293 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
6294 | $as_echo_n "(cached) " >&6 | |
6295 | else | |
6296 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6297 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6298 | gdb_cv_have_makeinfo_click=yes | |
6299 | else | |
6300 | gdb_cv_have_makeinfo_click=no | |
6301 | fi | |
6302 | fi | |
6303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6304 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6305 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6306 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6307 | fi | |
e28b3332 DJ |
6308 | |
6309 | ||
bec39cab AC |
6310 | |
6311 | ||
81ecdfbb RW |
6312 | # Check whether --with-separate-debug-dir was given. |
6313 | if test "${with_separate_debug_dir+set}" = set; then : | |
6314 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6315 | DEBUGDIR=$withval |
6316 | else | |
6317 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6318 | fi |
6319 | ||
20e95c23 | 6320 | |
783e057b DJ |
6321 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6322 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6323 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6324 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6325 | |
783e057b DJ |
6326 | cat >>confdefs.h <<_ACEOF |
6327 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6328 | _ACEOF |
20e95c23 | 6329 | |
20e95c23 | 6330 | |
20e95c23 | 6331 | |
0c4a4063 | 6332 | |
b14b1491 TT |
6333 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6334 | if test "x$prefix" = xNONE; then | |
6335 | test_prefix=/usr/local | |
6336 | else | |
6337 | test_prefix=$prefix | |
6338 | fi | |
783e057b | 6339 | else |
b14b1491 | 6340 | test_prefix=$exec_prefix |
783e057b | 6341 | fi |
b14b1491 TT |
6342 | value=0 |
6343 | case ${ac_define_dir} in | |
6344 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6345 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6346 | value=1 | |
6347 | ;; | |
6348 | esac | |
6349 | ||
6350 | cat >>confdefs.h <<_ACEOF | |
6351 | #define DEBUGDIR_RELOCATABLE $value | |
6352 | _ACEOF | |
6353 | ||
6354 | ||
6355 | ||
0c4a4063 | 6356 | |
f83d8a90 DE |
6357 | # We can't pass paths as command line arguments. |
6358 | # Mingw32 tries to be clever and will convert the paths for us. | |
6359 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6360 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6361 | # This breaks GDB's relocatable path conversions since paths passed in | |
6362 | # config.h would not get so translated, the path prefixes no longer match. | |
6363 | ||
6364 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6365 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6366 | ac_define_dir=`eval echo $bindir` | |
6367 | ac_define_dir=`eval echo $ac_define_dir` | |
6368 | ||
6369 | cat >>confdefs.h <<_ACEOF | |
6370 | #define BINDIR "$ac_define_dir" | |
6371 | _ACEOF | |
6372 | ||
6373 | ||
6374 | ||
b14b1491 TT |
6375 | # GDB's datadir relocation |
6376 | ||
6377 | ||
6378 | ||
81ecdfbb RW |
6379 | # Check whether --with-gdb-datadir was given. |
6380 | if test "${with_gdb_datadir+set}" = set; then : | |
6381 | withval=$with_gdb_datadir; | |
b14b1491 | 6382 | GDB_DATADIR=$withval |
20e95c23 | 6383 | else |
b14b1491 | 6384 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6385 | fi |
6386 | ||
20e95c23 | 6387 | |
b14b1491 TT |
6388 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6389 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6390 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6391 | ac_define_dir=`eval echo $ac_define_dir` | |
6392 | ||
6393 | cat >>confdefs.h <<_ACEOF | |
6394 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6395 | _ACEOF |
6396 | ||
b14b1491 TT |
6397 | |
6398 | ||
0c4a4063 | 6399 | |
b14b1491 TT |
6400 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6401 | if test "x$prefix" = xNONE; then | |
6402 | test_prefix=/usr/local | |
6403 | else | |
6404 | test_prefix=$prefix | |
6405 | fi | |
6406 | else | |
6407 | test_prefix=$exec_prefix | |
6408 | fi | |
6409 | value=0 | |
6410 | case ${ac_define_dir} in | |
6411 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6412 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6413 | value=1 | |
6414 | ;; | |
6415 | esac | |
6416 | ||
6417 | cat >>confdefs.h <<_ACEOF | |
6418 | #define GDB_DATADIR_RELOCATABLE $value | |
6419 | _ACEOF | |
6420 | ||
6421 | ||
783e057b | 6422 | |
20e95c23 | 6423 | |
0c4a4063 | 6424 | |
81ecdfbb RW |
6425 | # Check whether --with-relocated-sources was given. |
6426 | if test "${with_relocated_sources+set}" = set; then : | |
6427 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6428 | |
6429 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6430 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6431 | ac_define_dir=`eval echo $reloc_srcdir` | |
6432 | ac_define_dir=`eval echo $ac_define_dir` | |
6433 | ||
6434 | cat >>confdefs.h <<_ACEOF | |
6435 | #define RELOC_SRCDIR "$ac_define_dir" | |
6436 | _ACEOF | |
6437 | ||
6438 | ||
6439 | ||
81ecdfbb RW |
6440 | fi |
6441 | ||
29b0e8a2 | 6442 | |
7349ff92 JK |
6443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6444 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6445 | ||
6446 | # Check whether --with-auto-load-dir was given. | |
6447 | if test "${with_auto_load_dir+set}" = set; then : | |
6448 | withval=$with_auto_load_dir; | |
6449 | else | |
1564a261 | 6450 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6451 | fi |
6452 | ||
1564a261 | 6453 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6454 | |
6455 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6456 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6457 | ac_define_dir=`eval echo $escape_dir` | |
6458 | ac_define_dir=`eval echo $ac_define_dir` | |
6459 | ||
6460 | cat >>confdefs.h <<_ACEOF | |
6461 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6462 | _ACEOF | |
6463 | ||
6464 | ||
6465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6466 | $as_echo "$with_auto_load_dir" >&6; } | |
6467 | ||
bccbefd2 JK |
6468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6469 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6470 | ||
6471 | # Check whether --with-auto-load-safe-path was given. | |
6472 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6473 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6474 | with_auto_load_safe_path="/" |
6475 | fi | |
bccbefd2 | 6476 | else |
7349ff92 | 6477 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6478 | fi |
6479 | ||
1564a261 | 6480 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6481 | |
6482 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6483 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6484 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6485 | ac_define_dir=`eval echo $ac_define_dir` |
6486 | ||
6487 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6488 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6489 | _ACEOF |
6490 | ||
6491 | ||
6492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6493 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6494 | ||
29b0e8a2 | 6495 | |
20e95c23 | 6496 | |
5ae98d25 | 6497 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6498 | |
6499 | ||
783e057b | 6500 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6501 | # Check whether --enable-targets was given. |
6502 | if test "${enable_targets+set}" = set; then : | |
6503 | enableval=$enable_targets; case "${enableval}" in | |
6504 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
6505 | ;; |
6506 | no) enable_targets= ;; | |
6507 | *) enable_targets=$enableval ;; | |
6508 | esac | |
81ecdfbb RW |
6509 | fi |
6510 | ||
20e95c23 | 6511 | |
783e057b | 6512 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6513 | # Check whether --enable-64-bit-bfd was given. |
6514 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6515 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6516 | yes) want64=true ;; |
6517 | no) want64=false ;; | |
81ecdfbb | 6518 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6519 | esac |
6520 | else | |
6521 | want64=false | |
81ecdfbb RW |
6522 | fi |
6523 | ||
783e057b DJ |
6524 | # Provide defaults for some variables set by the per-host and per-target |
6525 | # configuration. | |
6526 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6527 | |
783e057b DJ |
6528 | if test "${target}" = "${host}"; then |
6529 | gdb_native=yes | |
6530 | else | |
6531 | gdb_native=no | |
6532 | fi | |
20e95c23 | 6533 | |
783e057b | 6534 | . $srcdir/configure.host |
20e95c23 | 6535 | |
fb23d554 SDJ |
6536 | # Add in the common host objects. |
6537 | . $srcdir/common/common.host | |
6538 | gdb_host_obs="$gdb_host_obs $common_host_obs" | |
6539 | ||
783e057b | 6540 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6541 | |
783e057b DJ |
6542 | TARGET_OBS= |
6543 | all_targets= | |
b292c783 | 6544 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6545 | |
783e057b | 6546 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6547 | do |
783e057b DJ |
6548 | if test "$targ_alias" = "all"; then |
6549 | all_targets=true | |
6550 | else | |
6551 | # Canonicalize the secondary target names. | |
6552 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6553 | if test -n "$result"; then | |
6554 | targ=$result | |
6555 | else | |
6556 | targ=$targ_alias | |
6557 | fi | |
20e95c23 | 6558 | |
783e057b | 6559 | . ${srcdir}/configure.tgt |
20e95c23 | 6560 | |
bf307134 JB |
6561 | if test -z "${gdb_target_obs}"; then : |
6562 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
6563 | fi | |
6564 | ||
783e057b DJ |
6565 | # Target-specific object files |
6566 | for i in ${gdb_target_obs}; do | |
6567 | case " $TARGET_OBS " in | |
6568 | *" ${i} "*) ;; | |
6569 | *) | |
6570 | TARGET_OBS="$TARGET_OBS ${i}" | |
6571 | ;; | |
6572 | esac | |
6573 | done | |
20e95c23 | 6574 | |
783e057b DJ |
6575 | # Check whether this target needs 64-bit CORE_ADDR |
6576 | if test x${want64} = xfalse; then | |
6577 | . ${srcdir}/../bfd/config.bfd | |
6578 | fi | |
b292c783 JK |
6579 | |
6580 | # Check whether this target is native and supports gcore. | |
6581 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6582 | && $gdb_have_gcore; then | |
6583 | HAVE_NATIVE_GCORE_TARGET=1 | |
6584 | fi | |
783e057b | 6585 | fi |
20e95c23 DJ |
6586 | done |
6587 | ||
783e057b DJ |
6588 | if test x${all_targets} = xtrue; then |
6589 | ||
6590 | # We want all 64-bit targets if we either: | |
6591 | # - run on a 64-bit host or | |
6592 | # - already require 64-bit support for some other target or | |
6593 | # - the --enable-64-bit-bfd option was supplied | |
6594 | # Otherwise we only support all 32-bit targets. | |
6595 | # | |
6596 | # NOTE: This test must be in sync with the corresponding | |
6597 | # tests in BFD! | |
20e95c23 | 6598 | |
783e057b | 6599 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6600 | # The cast to long int works around a bug in the HP C Compiler |
6601 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6602 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6603 | # This bug is HP SR number 8606223364. | |
6604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6605 | $as_echo_n "checking size of long... " >&6; } | |
6606 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
6607 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 6608 | else |
81ecdfbb | 6609 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6610 | |
81ecdfbb RW |
6611 | else |
6612 | if test "$ac_cv_type_long" = yes; then | |
6613 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6614 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6615 | { as_fn_set_status 77 | |
6616 | as_fn_error "cannot compute sizeof (long) | |
6617 | See \`config.log' for more details." "$LINENO" 5; }; } | |
6618 | else | |
6619 | ac_cv_sizeof_long=0 | |
6620 | fi | |
c0993dbe | 6621 | fi |
81ecdfbb | 6622 | |
c0993dbe | 6623 | fi |
81ecdfbb RW |
6624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6625 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6626 | |
c0993dbe | 6627 | |
c0993dbe | 6628 | |
c0993dbe UW |
6629 | cat >>confdefs.h <<_ACEOF |
6630 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6631 | _ACEOF | |
6632 | ||
6633 | ||
6634 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6635 | want64=true | |
6636 | fi | |
6637 | fi | |
6638 | if test x${want64} = xtrue; then | |
6639 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6640 | else | |
6641 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6642 | fi | |
6643 | fi | |
6644 | ||
6645 | ||
6646 | ||
b292c783 | 6647 | |
c0993dbe UW |
6648 | # For other settings, only the main target counts. |
6649 | gdb_sim= | |
6650 | gdb_osabi= | |
6651 | build_gdbserver= | |
6652 | targ=$target; . ${srcdir}/configure.tgt | |
6653 | ||
6654 | # Fetch the default architecture and default target vector from BFD. | |
6655 | targ=$target; . $srcdir/../bfd/config.bfd | |
6656 | ||
6657 | # We only want the first architecture, so strip off the others if | |
6658 | # there is more than one. | |
6659 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6660 | ||
6661 | if test "x$targ_archs" != x; then | |
6662 | ||
6663 | cat >>confdefs.h <<_ACEOF | |
6664 | #define DEFAULT_BFD_ARCH $targ_archs | |
6665 | _ACEOF | |
6666 | ||
6667 | fi | |
6668 | if test "x$targ_defvec" != x; then | |
6669 | ||
6670 | cat >>confdefs.h <<_ACEOF | |
6671 | #define DEFAULT_BFD_VEC $targ_defvec | |
6672 | _ACEOF | |
6673 | ||
6674 | fi | |
6675 | ||
c0993dbe UW |
6676 | # The CLI cannot be disabled yet, but may be in the future. |
6677 | ||
6678 | # Enable CLI. | |
81ecdfbb RW |
6679 | # Check whether --enable-gdbcli was given. |
6680 | if test "${enable_gdbcli+set}" = set; then : | |
6681 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
6682 | yes) |
6683 | ;; | |
6684 | no) | |
81ecdfbb | 6685 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 6686 | *) |
81ecdfbb | 6687 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
6688 | esac |
6689 | else | |
6690 | enable_gdbcli=yes | |
81ecdfbb RW |
6691 | fi |
6692 | ||
c0993dbe UW |
6693 | if test x"$enable_gdbcli" = xyes; then |
6694 | if test -d $srcdir/cli; then | |
6695 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
6696 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
6697 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
6698 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
6699 | fi | |
6700 | fi | |
6701 | ||
6702 | # Enable MI. | |
81ecdfbb RW |
6703 | # Check whether --enable-gdbmi was given. |
6704 | if test "${enable_gdbmi+set}" = set; then : | |
6705 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6706 | yes | no) |
6707 | ;; | |
6708 | *) | |
81ecdfbb | 6709 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6710 | esac |
6711 | else | |
6712 | enable_gdbmi=yes | |
81ecdfbb RW |
6713 | fi |
6714 | ||
c0993dbe UW |
6715 | if test x"$enable_gdbmi" = xyes; then |
6716 | if test -d $srcdir/mi; then | |
6717 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
6718 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6719 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6720 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6721 | fi | |
6722 | fi | |
6723 | ||
6724 | # Enable TUI. | |
81ecdfbb RW |
6725 | # Check whether --enable-tui was given. |
6726 | if test "${enable_tui+set}" = set; then : | |
6727 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6728 | yes | no | auto) |
c0993dbe UW |
6729 | ;; |
6730 | *) | |
81ecdfbb | 6731 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6732 | esac |
6733 | else | |
3ca64bd3 | 6734 | enable_tui=auto |
81ecdfbb RW |
6735 | fi |
6736 | ||
c0993dbe UW |
6737 | |
6738 | # Enable gdbtk. | |
81ecdfbb RW |
6739 | # Check whether --enable-gdbtk was given. |
6740 | if test "${enable_gdbtk+set}" = set; then : | |
6741 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6742 | yes | no) |
6743 | ;; | |
6744 | *) | |
81ecdfbb | 6745 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6746 | esac |
6747 | else | |
5062cc19 | 6748 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
6749 | enable_gdbtk=yes |
6750 | else | |
6751 | enable_gdbtk=no | |
6752 | fi | |
81ecdfbb RW |
6753 | fi |
6754 | ||
c0993dbe UW |
6755 | # We unconditionally disable gdbtk tests on selected platforms. |
6756 | case $host_os in | |
6757 | go32* | windows*) | |
81ecdfbb RW |
6758 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6759 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6760 | enable_gdbtk=no ;; |
6761 | esac | |
6762 | ||
05e7c244 | 6763 | # Libunwind support for ia64. |
bec39cab | 6764 | |
05e7c244 JK |
6765 | |
6766 | # Check whether --with-libunwind-ia64 was given. | |
6767 | if test "${with_libunwind_ia64+set}" = set; then : | |
6768 | withval=$with_libunwind_ia64; | |
bec39cab | 6769 | else |
05e7c244 JK |
6770 | with_libunwind_ia64=auto |
6771 | fi | |
bec39cab | 6772 | |
05e7c244 JK |
6773 | |
6774 | # Backward compatibility option. | |
6775 | if test "${with_libunwind+set}" = set; then | |
6776 | if test x"$with_libunwind_ia64" != xauto; then | |
6777 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
6778 | fi | |
6779 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
6780 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
6781 | with_libunwind_ia64="$with_libunwind" | |
6782 | fi | |
6783 | ||
6784 | case "$with_libunwind_ia64" in | |
6785 | yes | no) | |
6786 | ;; | |
6787 | auto) | |
6788 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 6789 | do : |
b54a8fd7 PA |
6790 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
6791 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 6792 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6793 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6794 | _ACEOF |
6795 | ||
6796 | fi | |
6797 | ||
6798 | done | |
6799 | ||
05e7c244 JK |
6800 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
6801 | ;; | |
6802 | *) | |
6803 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
6804 | ;; | |
6805 | esac | |
bec39cab | 6806 | |
05e7c244 | 6807 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 6808 | for ac_header in libunwind-ia64.h |
81ecdfbb | 6809 | do : |
b54a8fd7 PA |
6810 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
6811 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 6812 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6813 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6814 | _ACEOF |
6815 | ||
6816 | fi | |
6817 | ||
6818 | done | |
6819 | ||
05e7c244 JK |
6820 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
6821 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
6822 | fi | |
6823 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
6824 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
6825 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
6826 | fi |
6827 | ||
cb01cfba JB |
6828 | opt_curses=no |
6829 | ||
81ecdfbb RW |
6830 | # Check whether --with-curses was given. |
6831 | if test "${with_curses+set}" = set; then : | |
6832 | withval=$with_curses; opt_curses=$withval | |
6833 | fi | |
6834 | ||
cb01cfba | 6835 | |
76a39ba7 | 6836 | prefer_curses=no |
cb01cfba | 6837 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 6838 | prefer_curses=yes |
cb01cfba JB |
6839 | fi |
6840 | ||
a9322a30 | 6841 | # Profiling support. |
81ecdfbb RW |
6842 | # Check whether --enable-profiling was given. |
6843 | if test "${enable_profiling+set}" = set; then : | |
6844 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
6845 | yes | no) |
6846 | ;; | |
6847 | *) | |
81ecdfbb | 6848 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
6849 | esac |
6850 | else | |
6851 | enable_profiling=no | |
81ecdfbb | 6852 | fi |
bec39cab | 6853 | |
a9322a30 TT |
6854 | |
6855 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
6856 | do : |
6857 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6858 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6859 | eval as_val=\$$as_ac_var | |
6860 | if test "x$as_val" = x""yes; then : | |
6861 | cat >>confdefs.h <<_ACEOF | |
6862 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 6863 | _ACEOF |
a9322a30 | 6864 | |
81ecdfbb RW |
6865 | fi |
6866 | done | |
a9322a30 | 6867 | |
81ecdfbb RW |
6868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
6869 | $as_echo_n "checking for _etext... " >&6; } | |
6870 | if test "${ac_cv_var__etext+set}" = set; then : | |
6871 | $as_echo_n "(cached) " >&6 | |
6872 | else | |
6873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6874 | /* end confdefs.h. */ | |
6875 | #include <stdlib.h> | |
6876 | extern char _etext; | |
a9322a30 TT |
6877 | |
6878 | int | |
6879 | main () | |
6880 | { | |
6881 | free (&_etext); | |
6882 | ; | |
6883 | return 0; | |
6884 | } | |
bec39cab | 6885 | _ACEOF |
81ecdfbb | 6886 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6887 | ac_cv_var__etext=yes |
bec39cab | 6888 | else |
81ecdfbb | 6889 | ac_cv_var__etext=no |
bec39cab | 6890 | fi |
81ecdfbb RW |
6891 | rm -f core conftest.err conftest.$ac_objext \ |
6892 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6893 | fi |
81ecdfbb RW |
6894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6895 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 6896 | if test $ac_cv_var__etext = yes; then |
60ca704f | 6897 | |
81ecdfbb | 6898 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6899 | |
bec39cab | 6900 | fi |
81ecdfbb RW |
6901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6902 | $as_echo_n "checking for etext... " >&6; } | |
6903 | if test "${ac_cv_var_etext+set}" = set; then : | |
6904 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6905 | else |
81ecdfbb | 6906 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6907 | /* end confdefs.h. */ |
a9322a30 TT |
6908 | #include <stdlib.h> |
6909 | extern char etext; | |
bec39cab AC |
6910 | |
6911 | int | |
6912 | main () | |
6913 | { | |
a9322a30 | 6914 | free (&etext); |
bec39cab AC |
6915 | ; |
6916 | return 0; | |
6917 | } | |
6918 | _ACEOF | |
81ecdfbb | 6919 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6920 | ac_cv_var_etext=yes |
bec39cab | 6921 | else |
81ecdfbb | 6922 | ac_cv_var_etext=no |
bec39cab | 6923 | fi |
81ecdfbb RW |
6924 | rm -f core conftest.err conftest.$ac_objext \ |
6925 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6926 | fi |
81ecdfbb RW |
6927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
6928 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
6929 | if test $ac_cv_var_etext = yes; then |
6930 | ||
81ecdfbb | 6931 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
6932 | |
6933 | fi | |
a9322a30 TT |
6934 | if test "$enable_profiling" = yes ; then |
6935 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 6936 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
6937 | fi |
6938 | PROFILE_CFLAGS=-pg | |
6939 | OLD_CFLAGS="$CFLAGS" | |
6940 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 6941 | |
81ecdfbb RW |
6942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
6943 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
6944 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
6945 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6946 | else |
81ecdfbb | 6947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6948 | /* end confdefs.h. */ |
bec39cab AC |
6949 | |
6950 | int | |
6951 | main () | |
6952 | { | |
a9322a30 | 6953 | int x; |
bec39cab AC |
6954 | ; |
6955 | return 0; | |
6956 | } | |
6957 | _ACEOF | |
81ecdfbb | 6958 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 6959 | ac_cv_cc_supports_pg=yes |
bec39cab | 6960 | else |
81ecdfbb | 6961 | ac_cv_cc_supports_pg=no |
bec39cab | 6962 | fi |
81ecdfbb | 6963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 6964 | fi |
81ecdfbb RW |
6965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
6966 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 6967 | |
a9322a30 | 6968 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 6969 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 6970 | fi |
bec39cab | 6971 | |
a9322a30 | 6972 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
6973 | fi |
6974 | ||
c16158bc JM |
6975 | |
6976 | ||
81ecdfbb RW |
6977 | # Check whether --with-pkgversion was given. |
6978 | if test "${with_pkgversion+set}" = set; then : | |
6979 | withval=$with_pkgversion; case "$withval" in | |
6980 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6981 | no) PKGVERSION= ;; |
6982 | *) PKGVERSION="($withval) " ;; | |
6983 | esac | |
6984 | else | |
6985 | PKGVERSION="(GDB) " | |
6986 | ||
81ecdfbb | 6987 | fi |
c16158bc JM |
6988 | |
6989 | ||
6990 | ||
6991 | ||
81ecdfbb RW |
6992 | |
6993 | # Check whether --with-bugurl was given. | |
6994 | if test "${with_bugurl+set}" = set; then : | |
6995 | withval=$with_bugurl; case "$withval" in | |
6996 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
6997 | no) BUGURL= |
6998 | ;; | |
6999 | *) BUGURL="$withval" | |
7000 | ;; | |
7001 | esac | |
7002 | else | |
7003 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
7004 | ||
81ecdfbb RW |
7005 | fi |
7006 | ||
c16158bc JM |
7007 | case ${BUGURL} in |
7008 | "") | |
7009 | REPORT_BUGS_TO= | |
7010 | REPORT_BUGS_TEXI= | |
7011 | ;; | |
7012 | *) | |
7013 | REPORT_BUGS_TO="<$BUGURL>" | |
7014 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7015 | ;; | |
7016 | esac; | |
7017 | ||
7018 | ||
7019 | ||
7020 | ||
7021 | cat >>confdefs.h <<_ACEOF | |
7022 | #define PKGVERSION "$PKGVERSION" | |
7023 | _ACEOF | |
7024 | ||
7025 | ||
7026 | cat >>confdefs.h <<_ACEOF | |
7027 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7028 | _ACEOF | |
7029 | ||
7030 | ||
bec39cab AC |
7031 | # --------------------- # |
7032 | # Checks for programs. # | |
7033 | # --------------------- # | |
7034 | ||
7035 | for ac_prog in gawk mawk nawk awk | |
7036 | do | |
7037 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7038 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7040 | $as_echo_n "checking for $ac_word... " >&6; } | |
7041 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7042 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7043 | else |
7044 | if test -n "$AWK"; then | |
7045 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7046 | else | |
7047 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7048 | for as_dir in $PATH | |
7049 | do | |
7050 | IFS=$as_save_IFS | |
7051 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7052 | for ac_exec_ext in '' $ac_executable_extensions; do |
7053 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7054 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7055 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7056 | break 2 |
7057 | fi | |
7058 | done | |
81ecdfbb RW |
7059 | done |
7060 | IFS=$as_save_IFS | |
bec39cab AC |
7061 | |
7062 | fi | |
7063 | fi | |
7064 | AWK=$ac_cv_prog_AWK | |
7065 | if test -n "$AWK"; then | |
81ecdfbb RW |
7066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7067 | $as_echo "$AWK" >&6; } | |
bec39cab | 7068 | else |
81ecdfbb RW |
7069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7070 | $as_echo "no" >&6; } | |
bec39cab AC |
7071 | fi |
7072 | ||
bec39cab | 7073 | |
81ecdfbb | 7074 | test -n "$AWK" && break |
bec39cab AC |
7075 | done |
7076 | ||
c971b7fa PA |
7077 | # Find a good install program. We prefer a C program (faster), |
7078 | # so one script is as good as another. But avoid the broken or | |
7079 | # incompatible versions: | |
7080 | # SysV /etc/install, /usr/sbin/install | |
7081 | # SunOS /usr/etc/install | |
7082 | # IRIX /sbin/install | |
7083 | # AIX /bin/install | |
7084 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7085 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7086 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7087 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7088 | # OS/2's system install, which has a completely different semantic | |
7089 | # ./install, which can be erroneously created by make from ./install.sh. | |
7090 | # Reject install programs that cannot install multiple files. | |
7091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7092 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7093 | if test -z "$INSTALL"; then | |
7094 | if test "${ac_cv_path_install+set}" = set; then : | |
7095 | $as_echo_n "(cached) " >&6 | |
7096 | else | |
7097 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7098 | for as_dir in $PATH | |
7099 | do | |
7100 | IFS=$as_save_IFS | |
7101 | test -z "$as_dir" && as_dir=. | |
7102 | # Account for people who put trailing slashes in PATH elements. | |
7103 | case $as_dir/ in #(( | |
7104 | ./ | .// | /[cC]/* | \ | |
7105 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7106 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7107 | /usr/ucb/* ) ;; | |
7108 | *) | |
7109 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7110 | # Don't use installbsd from OSF since it installs stuff as root | |
7111 | # by default. | |
7112 | for ac_prog in ginstall scoinst install; do | |
7113 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7114 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
7115 | if test $ac_prog = install && | |
7116 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7117 | # AIX install. It has an incompatible calling convention. | |
7118 | : | |
7119 | elif test $ac_prog = install && | |
7120 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7121 | # program-specific install script used by HP pwplus--don't use. | |
7122 | : | |
7123 | else | |
7124 | rm -rf conftest.one conftest.two conftest.dir | |
7125 | echo one > conftest.one | |
7126 | echo two > conftest.two | |
7127 | mkdir conftest.dir | |
7128 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7129 | test -s conftest.one && test -s conftest.two && | |
7130 | test -s conftest.dir/conftest.one && | |
7131 | test -s conftest.dir/conftest.two | |
7132 | then | |
7133 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7134 | break 3 | |
7135 | fi | |
7136 | fi | |
7137 | fi | |
7138 | done | |
7139 | done | |
7140 | ;; | |
7141 | esac | |
7142 | ||
7143 | done | |
7144 | IFS=$as_save_IFS | |
7145 | ||
7146 | rm -rf conftest.one conftest.two conftest.dir | |
7147 | ||
7148 | fi | |
7149 | if test "${ac_cv_path_install+set}" = set; then | |
7150 | INSTALL=$ac_cv_path_install | |
7151 | else | |
7152 | # As a last resort, use the slow shell script. Don't cache a | |
7153 | # value for INSTALL within a source directory, because that will | |
7154 | # break other packages using the cache if that directory is | |
7155 | # removed, or if the value is a relative name. | |
7156 | INSTALL=$ac_install_sh | |
7157 | fi | |
7158 | fi | |
7159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7160 | $as_echo "$INSTALL" >&6; } | |
7161 | ||
7162 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7163 | # It thinks the first close brace ends the variable substitution. | |
7164 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7165 | ||
7166 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7167 | ||
7168 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7169 | |
81ecdfbb RW |
7170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7171 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7172 | LN_S=$as_ln_s |
7173 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7175 | $as_echo "yes" >&6; } | |
bec39cab | 7176 | else |
81ecdfbb RW |
7177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7178 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7179 | fi |
7180 | ||
7181 | if test -n "$ac_tool_prefix"; then | |
7182 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7183 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7185 | $as_echo_n "checking for $ac_word... " >&6; } | |
7186 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
7187 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7188 | else |
7189 | if test -n "$RANLIB"; then | |
7190 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7191 | else | |
7192 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7193 | for as_dir in $PATH | |
7194 | do | |
7195 | IFS=$as_save_IFS | |
7196 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7197 | for ac_exec_ext in '' $ac_executable_extensions; do |
7198 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7199 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7200 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7201 | break 2 |
7202 | fi | |
7203 | done | |
81ecdfbb RW |
7204 | done |
7205 | IFS=$as_save_IFS | |
bec39cab AC |
7206 | |
7207 | fi | |
7208 | fi | |
7209 | RANLIB=$ac_cv_prog_RANLIB | |
7210 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7212 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7213 | else |
81ecdfbb RW |
7214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7215 | $as_echo "no" >&6; } | |
bec39cab AC |
7216 | fi |
7217 | ||
81ecdfbb | 7218 | |
bec39cab AC |
7219 | fi |
7220 | if test -z "$ac_cv_prog_RANLIB"; then | |
7221 | ac_ct_RANLIB=$RANLIB | |
7222 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7223 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7225 | $as_echo_n "checking for $ac_word... " >&6; } | |
7226 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
7227 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7228 | else |
7229 | if test -n "$ac_ct_RANLIB"; then | |
7230 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7231 | else | |
7232 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7233 | for as_dir in $PATH | |
7234 | do | |
7235 | IFS=$as_save_IFS | |
7236 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7237 | for ac_exec_ext in '' $ac_executable_extensions; do |
7238 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7239 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7240 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7241 | break 2 |
7242 | fi | |
7243 | done | |
81ecdfbb RW |
7244 | done |
7245 | IFS=$as_save_IFS | |
bec39cab | 7246 | |
bec39cab AC |
7247 | fi |
7248 | fi | |
7249 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7250 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7252 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7253 | else |
81ecdfbb RW |
7254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7255 | $as_echo "no" >&6; } | |
bec39cab AC |
7256 | fi |
7257 | ||
81ecdfbb RW |
7258 | if test "x$ac_ct_RANLIB" = x; then |
7259 | RANLIB=":" | |
7260 | else | |
7261 | case $cross_compiling:$ac_tool_warned in | |
7262 | yes:) | |
7263 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7264 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7265 | ac_tool_warned=yes ;; | |
7266 | esac | |
7267 | RANLIB=$ac_ct_RANLIB | |
7268 | fi | |
bec39cab AC |
7269 | else |
7270 | RANLIB="$ac_cv_prog_RANLIB" | |
7271 | fi | |
7272 | ||
7273 | for ac_prog in 'bison -y' byacc | |
7274 | do | |
7275 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7276 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7278 | $as_echo_n "checking for $ac_word... " >&6; } | |
7279 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
7280 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7281 | else |
7282 | if test -n "$YACC"; then | |
7283 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7284 | else | |
7285 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7286 | for as_dir in $PATH | |
7287 | do | |
7288 | IFS=$as_save_IFS | |
7289 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7290 | for ac_exec_ext in '' $ac_executable_extensions; do |
7291 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7292 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7293 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7294 | break 2 |
7295 | fi | |
7296 | done | |
81ecdfbb RW |
7297 | done |
7298 | IFS=$as_save_IFS | |
bec39cab AC |
7299 | |
7300 | fi | |
7301 | fi | |
7302 | YACC=$ac_cv_prog_YACC | |
7303 | if test -n "$YACC"; then | |
81ecdfbb RW |
7304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7305 | $as_echo "$YACC" >&6; } | |
bec39cab | 7306 | else |
81ecdfbb RW |
7307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7308 | $as_echo "no" >&6; } | |
bec39cab AC |
7309 | fi |
7310 | ||
81ecdfbb | 7311 | |
bec39cab AC |
7312 | test -n "$YACC" && break |
7313 | done | |
7314 | test -n "$YACC" || YACC="yacc" | |
7315 | ||
7316 | ||
7317 | if test -n "$ac_tool_prefix"; then | |
7318 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7319 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7321 | $as_echo_n "checking for $ac_word... " >&6; } | |
7322 | if test "${ac_cv_prog_AR+set}" = set; then : | |
7323 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7324 | else |
7325 | if test -n "$AR"; then | |
7326 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7327 | else | |
7328 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7329 | for as_dir in $PATH | |
7330 | do | |
7331 | IFS=$as_save_IFS | |
7332 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7333 | for ac_exec_ext in '' $ac_executable_extensions; do |
7334 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7335 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7336 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7337 | break 2 |
7338 | fi | |
7339 | done | |
81ecdfbb RW |
7340 | done |
7341 | IFS=$as_save_IFS | |
bec39cab AC |
7342 | |
7343 | fi | |
7344 | fi | |
7345 | AR=$ac_cv_prog_AR | |
7346 | if test -n "$AR"; then | |
81ecdfbb RW |
7347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7348 | $as_echo "$AR" >&6; } | |
bec39cab | 7349 | else |
81ecdfbb RW |
7350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7351 | $as_echo "no" >&6; } | |
bec39cab AC |
7352 | fi |
7353 | ||
81ecdfbb | 7354 | |
bec39cab AC |
7355 | fi |
7356 | if test -z "$ac_cv_prog_AR"; then | |
7357 | ac_ct_AR=$AR | |
7358 | # Extract the first word of "ar", so it can be a program name with args. | |
7359 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7361 | $as_echo_n "checking for $ac_word... " >&6; } | |
7362 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
7363 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7364 | else |
7365 | if test -n "$ac_ct_AR"; then | |
7366 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7367 | else | |
7368 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7369 | for as_dir in $PATH | |
7370 | do | |
7371 | IFS=$as_save_IFS | |
7372 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7373 | for ac_exec_ext in '' $ac_executable_extensions; do |
7374 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7375 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7376 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7377 | break 2 |
7378 | fi | |
7379 | done | |
81ecdfbb RW |
7380 | done |
7381 | IFS=$as_save_IFS | |
bec39cab AC |
7382 | |
7383 | fi | |
7384 | fi | |
7385 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7386 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7388 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7389 | else |
81ecdfbb RW |
7390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7391 | $as_echo "no" >&6; } | |
bec39cab AC |
7392 | fi |
7393 | ||
81ecdfbb RW |
7394 | if test "x$ac_ct_AR" = x; then |
7395 | AR="" | |
7396 | else | |
7397 | case $cross_compiling:$ac_tool_warned in | |
7398 | yes:) | |
7399 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7400 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7401 | ac_tool_warned=yes ;; | |
7402 | esac | |
7403 | AR=$ac_ct_AR | |
7404 | fi | |
bec39cab AC |
7405 | else |
7406 | AR="$ac_cv_prog_AR" | |
7407 | fi | |
7408 | ||
7409 | if test -n "$ac_tool_prefix"; then | |
7410 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7411 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7413 | $as_echo_n "checking for $ac_word... " >&6; } | |
7414 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
7415 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7416 | else |
7417 | if test -n "$DLLTOOL"; then | |
7418 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7419 | else | |
7420 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7421 | for as_dir in $PATH | |
7422 | do | |
7423 | IFS=$as_save_IFS | |
7424 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7425 | for ac_exec_ext in '' $ac_executable_extensions; do |
7426 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7427 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7428 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7429 | break 2 |
7430 | fi | |
7431 | done | |
81ecdfbb RW |
7432 | done |
7433 | IFS=$as_save_IFS | |
bec39cab AC |
7434 | |
7435 | fi | |
7436 | fi | |
7437 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7438 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7440 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7441 | else |
81ecdfbb RW |
7442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7443 | $as_echo "no" >&6; } | |
bec39cab AC |
7444 | fi |
7445 | ||
81ecdfbb | 7446 | |
bec39cab AC |
7447 | fi |
7448 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7449 | ac_ct_DLLTOOL=$DLLTOOL | |
7450 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7451 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7453 | $as_echo_n "checking for $ac_word... " >&6; } | |
7454 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
7455 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7456 | else |
7457 | if test -n "$ac_ct_DLLTOOL"; then | |
7458 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7459 | else | |
7460 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7461 | for as_dir in $PATH | |
7462 | do | |
7463 | IFS=$as_save_IFS | |
7464 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7465 | for ac_exec_ext in '' $ac_executable_extensions; do |
7466 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7467 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7468 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7469 | break 2 |
7470 | fi | |
7471 | done | |
81ecdfbb RW |
7472 | done |
7473 | IFS=$as_save_IFS | |
bec39cab AC |
7474 | |
7475 | fi | |
7476 | fi | |
7477 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7478 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7479 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7480 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7481 | else |
81ecdfbb RW |
7482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7483 | $as_echo "no" >&6; } | |
bec39cab AC |
7484 | fi |
7485 | ||
81ecdfbb RW |
7486 | if test "x$ac_ct_DLLTOOL" = x; then |
7487 | DLLTOOL="" | |
7488 | else | |
7489 | case $cross_compiling:$ac_tool_warned in | |
7490 | yes:) | |
7491 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7492 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7493 | ac_tool_warned=yes ;; | |
7494 | esac | |
7495 | DLLTOOL=$ac_ct_DLLTOOL | |
7496 | fi | |
bec39cab AC |
7497 | else |
7498 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7499 | fi | |
7500 | ||
7501 | if test -n "$ac_tool_prefix"; then | |
7502 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7503 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7505 | $as_echo_n "checking for $ac_word... " >&6; } | |
7506 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
7507 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7508 | else |
7509 | if test -n "$WINDRES"; then | |
7510 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7511 | else | |
7512 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7513 | for as_dir in $PATH | |
7514 | do | |
7515 | IFS=$as_save_IFS | |
7516 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7517 | for ac_exec_ext in '' $ac_executable_extensions; do |
7518 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7519 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7520 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7521 | break 2 |
7522 | fi | |
7523 | done | |
81ecdfbb RW |
7524 | done |
7525 | IFS=$as_save_IFS | |
bec39cab AC |
7526 | |
7527 | fi | |
7528 | fi | |
7529 | WINDRES=$ac_cv_prog_WINDRES | |
7530 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7532 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7533 | else |
81ecdfbb RW |
7534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7535 | $as_echo "no" >&6; } | |
bec39cab AC |
7536 | fi |
7537 | ||
81ecdfbb | 7538 | |
bec39cab AC |
7539 | fi |
7540 | if test -z "$ac_cv_prog_WINDRES"; then | |
7541 | ac_ct_WINDRES=$WINDRES | |
7542 | # Extract the first word of "windres", so it can be a program name with args. | |
7543 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7544 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7545 | $as_echo_n "checking for $ac_word... " >&6; } | |
7546 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
7547 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7548 | else |
7549 | if test -n "$ac_ct_WINDRES"; then | |
7550 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7551 | else | |
7552 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7553 | for as_dir in $PATH | |
7554 | do | |
7555 | IFS=$as_save_IFS | |
7556 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7557 | for ac_exec_ext in '' $ac_executable_extensions; do |
7558 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7559 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7560 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7561 | break 2 |
7562 | fi | |
7563 | done | |
81ecdfbb RW |
7564 | done |
7565 | IFS=$as_save_IFS | |
bec39cab AC |
7566 | |
7567 | fi | |
7568 | fi | |
7569 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7570 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7572 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7573 | else |
81ecdfbb RW |
7574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7575 | $as_echo "no" >&6; } | |
c906108c | 7576 | fi |
bec39cab | 7577 | |
81ecdfbb RW |
7578 | if test "x$ac_ct_WINDRES" = x; then |
7579 | WINDRES="" | |
7580 | else | |
7581 | case $cross_compiling:$ac_tool_warned in | |
7582 | yes:) | |
7583 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7584 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7585 | ac_tool_warned=yes ;; | |
7586 | esac | |
7587 | WINDRES=$ac_ct_WINDRES | |
7588 | fi | |
c906108c | 7589 | else |
bec39cab | 7590 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7591 | fi |
7592 | ||
bec39cab | 7593 | |
036c3acb TS |
7594 | case $host_os in |
7595 | gnu*) | |
7596 | # Needed for GNU Hurd hosts. | |
7597 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7598 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7599 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7601 | $as_echo_n "checking for $ac_word... " >&6; } | |
7602 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
7603 | $as_echo_n "(cached) " >&6 | |
c906108c | 7604 | else |
bec39cab AC |
7605 | if test -n "$MIG"; then |
7606 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7607 | else | |
7608 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7609 | for as_dir in $PATH | |
7610 | do | |
7611 | IFS=$as_save_IFS | |
7612 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7613 | for ac_exec_ext in '' $ac_executable_extensions; do |
7614 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7615 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7616 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7617 | break 2 |
7618 | fi | |
7619 | done | |
81ecdfbb RW |
7620 | done |
7621 | IFS=$as_save_IFS | |
bec39cab | 7622 | |
c906108c | 7623 | fi |
bec39cab AC |
7624 | fi |
7625 | MIG=$ac_cv_prog_MIG | |
7626 | if test -n "$MIG"; then | |
81ecdfbb RW |
7627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7628 | $as_echo "$MIG" >&6; } | |
c906108c | 7629 | else |
81ecdfbb RW |
7630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7631 | $as_echo "no" >&6; } | |
c906108c SS |
7632 | fi |
7633 | ||
81ecdfbb | 7634 | |
bec39cab AC |
7635 | fi |
7636 | if test -z "$ac_cv_prog_MIG"; then | |
7637 | ac_ct_MIG=$MIG | |
7638 | # Extract the first word of "mig", so it can be a program name with args. | |
7639 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
7640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7641 | $as_echo_n "checking for $ac_word... " >&6; } | |
7642 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
7643 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7644 | else |
7645 | if test -n "$ac_ct_MIG"; then | |
7646 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
7647 | else | |
7648 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7649 | for as_dir in $PATH | |
7650 | do | |
7651 | IFS=$as_save_IFS | |
7652 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7653 | for ac_exec_ext in '' $ac_executable_extensions; do |
7654 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7655 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 7656 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7657 | break 2 |
7658 | fi | |
7659 | done | |
81ecdfbb RW |
7660 | done |
7661 | IFS=$as_save_IFS | |
c906108c | 7662 | |
bec39cab AC |
7663 | fi |
7664 | fi | |
7665 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
7666 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
7667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
7668 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 7669 | else |
81ecdfbb RW |
7670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7671 | $as_echo "no" >&6; } | |
bec39cab | 7672 | fi |
c906108c | 7673 | |
81ecdfbb RW |
7674 | if test "x$ac_ct_MIG" = x; then |
7675 | MIG="" | |
7676 | else | |
7677 | case $cross_compiling:$ac_tool_warned in | |
7678 | yes:) | |
7679 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7680 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7681 | ac_tool_warned=yes ;; | |
7682 | esac | |
7683 | MIG=$ac_ct_MIG | |
7684 | fi | |
bec39cab AC |
7685 | else |
7686 | MIG="$ac_cv_prog_MIG" | |
7687 | fi | |
c906108c | 7688 | |
036c3acb TS |
7689 | if test x"$MIG" = x; then |
7690 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
7691 | fi | |
7692 | ;; | |
7693 | esac | |
c906108c | 7694 | |
bec39cab AC |
7695 | # ---------------------- # |
7696 | # Checks for libraries. # | |
7697 | # ---------------------- # | |
c906108c | 7698 | |
bec39cab | 7699 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
7700 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
7701 | $as_echo_n "checking for main in -lm... " >&6; } | |
7702 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
7703 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7704 | else |
7705 | ac_check_lib_save_LIBS=$LIBS | |
7706 | LIBS="-lm $LIBS" | |
81ecdfbb | 7707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7708 | /* end confdefs.h. */ |
c906108c | 7709 | |
c906108c | 7710 | |
bec39cab AC |
7711 | int |
7712 | main () | |
7713 | { | |
81ecdfbb | 7714 | return main (); |
bec39cab AC |
7715 | ; |
7716 | return 0; | |
7717 | } | |
7718 | _ACEOF | |
81ecdfbb | 7719 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7720 | ac_cv_lib_m_main=yes |
7721 | else | |
81ecdfbb | 7722 | ac_cv_lib_m_main=no |
bec39cab | 7723 | fi |
81ecdfbb RW |
7724 | rm -f core conftest.err conftest.$ac_objext \ |
7725 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7726 | LIBS=$ac_check_lib_save_LIBS |
7727 | fi | |
81ecdfbb RW |
7728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
7729 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
7730 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
7731 | cat >>confdefs.h <<_ACEOF |
7732 | #define HAVE_LIBM 1 | |
7733 | _ACEOF | |
7734 | ||
7735 | LIBS="-lm $LIBS" | |
c906108c | 7736 | |
c906108c | 7737 | fi |
bec39cab AC |
7738 | |
7739 | ||
bec39cab | 7740 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
7741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
7742 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
7743 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7744 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7745 | else |
7746 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7748 | /* end confdefs.h. */ |
ddc9cd0f | 7749 | |
81ecdfbb RW |
7750 | /* Override any GCC internal prototype to avoid an error. |
7751 | Use char because int might match the return type of a GCC | |
7752 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7753 | #ifdef __cplusplus |
7754 | extern "C" | |
7755 | #endif | |
bec39cab AC |
7756 | char gethostbyname (); |
7757 | int | |
7758 | main () | |
7759 | { | |
81ecdfbb | 7760 | return gethostbyname (); |
bec39cab AC |
7761 | ; |
7762 | return 0; | |
7763 | } | |
7764 | _ACEOF | |
81ecdfbb RW |
7765 | for ac_lib in '' nsl; do |
7766 | if test -z "$ac_lib"; then | |
7767 | ac_res="none required" | |
7768 | else | |
7769 | ac_res=-l$ac_lib | |
b4e70030 | 7770 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7771 | fi |
7772 | if ac_fn_c_try_link "$LINENO"; then : | |
7773 | ac_cv_search_gethostbyname=$ac_res | |
7774 | fi | |
7775 | rm -f core conftest.err conftest.$ac_objext \ | |
7776 | conftest$ac_exeext | |
7777 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7778 | break | |
7779 | fi | |
7780 | done | |
7781 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 7782 | |
bec39cab | 7783 | else |
81ecdfbb | 7784 | ac_cv_search_gethostbyname=no |
bec39cab | 7785 | fi |
81ecdfbb | 7786 | rm conftest.$ac_ext |
bec39cab AC |
7787 | LIBS=$ac_func_search_save_LIBS |
7788 | fi | |
81ecdfbb RW |
7789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
7790 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
7791 | ac_res=$ac_cv_search_gethostbyname | |
7792 | if test "$ac_res" != no; then : | |
7793 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 7794 | |
bec39cab | 7795 | fi |
96baa820 | 7796 | |
c906108c | 7797 | |
b4e70030 | 7798 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
7799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
7800 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
7801 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7802 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
7803 | else |
7804 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7806 | /* end confdefs.h. */ |
7807 | ||
81ecdfbb RW |
7808 | /* Override any GCC internal prototype to avoid an error. |
7809 | Use char because int might match the return type of a GCC | |
7810 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
7811 | #ifdef __cplusplus |
7812 | extern "C" | |
7813 | #endif | |
b4e70030 JB |
7814 | char socketpair (); |
7815 | int | |
7816 | main () | |
7817 | { | |
81ecdfbb | 7818 | return socketpair (); |
b4e70030 JB |
7819 | ; |
7820 | return 0; | |
7821 | } | |
7822 | _ACEOF | |
81ecdfbb RW |
7823 | for ac_lib in '' socket; do |
7824 | if test -z "$ac_lib"; then | |
7825 | ac_res="none required" | |
7826 | else | |
7827 | ac_res=-l$ac_lib | |
b4e70030 | 7828 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7829 | fi |
7830 | if ac_fn_c_try_link "$LINENO"; then : | |
7831 | ac_cv_search_socketpair=$ac_res | |
7832 | fi | |
7833 | rm -f core conftest.err conftest.$ac_objext \ | |
7834 | conftest$ac_exeext | |
7835 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7836 | break | |
7837 | fi | |
7838 | done | |
7839 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 7840 | |
b4e70030 | 7841 | else |
81ecdfbb | 7842 | ac_cv_search_socketpair=no |
b4e70030 | 7843 | fi |
81ecdfbb | 7844 | rm conftest.$ac_ext |
b4e70030 JB |
7845 | LIBS=$ac_func_search_save_LIBS |
7846 | fi | |
81ecdfbb RW |
7847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7848 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7849 | ac_res=$ac_cv_search_socketpair | |
7850 | if test "$ac_res" != no; then : | |
7851 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7852 | |
7853 | fi | |
7854 | ||
7855 | ||
233a11ab | 7856 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 7857 | |
711a72d3 | 7858 | # Use the system's zlib library. |
39f3de7c L |
7859 | zlibdir="-L\$(top_builddir)/../zlib" |
7860 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 7861 | |
711a72d3 L |
7862 | # Check whether --with-system-zlib was given. |
7863 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
7864 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
7865 | zlibdir= | |
7866 | zlibinc= | |
7867 | fi | |
b040ad30 | 7868 | |
233a11ab | 7869 | fi |
233a11ab | 7870 | |
233a11ab | 7871 | |
233a11ab | 7872 | |
b040ad30 | 7873 | |
233a11ab | 7874 | |
25268153 | 7875 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
37773e78 | 7876 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
25268153 JB |
7877 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
7878 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
7879 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7880 | $as_echo_n "(cached) " >&6 | |
7881 | else | |
7882 | ac_func_search_save_LIBS=$LIBS | |
7883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7884 | /* end confdefs.h. */ | |
7885 | ||
7886 | /* Override any GCC internal prototype to avoid an error. | |
7887 | Use char because int might match the return type of a GCC | |
7888 | builtin and then its argument prototype would still apply. */ | |
7889 | #ifdef __cplusplus | |
7890 | extern "C" | |
7891 | #endif | |
7892 | char kinfo_getvmmap (); | |
7893 | int | |
7894 | main () | |
7895 | { | |
7896 | return kinfo_getvmmap (); | |
7897 | ; | |
7898 | return 0; | |
7899 | } | |
7900 | _ACEOF | |
37773e78 | 7901 | for ac_lib in '' util util-freebsd; do |
25268153 JB |
7902 | if test -z "$ac_lib"; then |
7903 | ac_res="none required" | |
7904 | else | |
7905 | ac_res=-l$ac_lib | |
7906 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7907 | fi | |
7908 | if ac_fn_c_try_link "$LINENO"; then : | |
7909 | ac_cv_search_kinfo_getvmmap=$ac_res | |
7910 | fi | |
7911 | rm -f core conftest.err conftest.$ac_objext \ | |
7912 | conftest$ac_exeext | |
7913 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7914 | break | |
7915 | fi | |
7916 | done | |
7917 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
7918 | ||
7919 | else | |
7920 | ac_cv_search_kinfo_getvmmap=no | |
7921 | fi | |
7922 | rm conftest.$ac_ext | |
7923 | LIBS=$ac_func_search_save_LIBS | |
7924 | fi | |
7925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
7926 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
7927 | ac_res=$ac_cv_search_kinfo_getvmmap | |
7928 | if test "$ac_res" != no; then : | |
7929 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7930 | ||
7931 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
7932 | ||
7933 | fi | |
7934 | ||
7935 | ||
92fce24d JB |
7936 | # fbsd-nat.c can also use kinfo_getfile. |
7937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 | |
7938 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
7939 | if test "${ac_cv_search_kinfo_getfile+set}" = set; then : | |
7940 | $as_echo_n "(cached) " >&6 | |
7941 | else | |
7942 | ac_func_search_save_LIBS=$LIBS | |
7943 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7944 | /* end confdefs.h. */ | |
7945 | ||
7946 | /* Override any GCC internal prototype to avoid an error. | |
7947 | Use char because int might match the return type of a GCC | |
7948 | builtin and then its argument prototype would still apply. */ | |
7949 | #ifdef __cplusplus | |
7950 | extern "C" | |
7951 | #endif | |
7952 | char kinfo_getfile (); | |
7953 | int | |
7954 | main () | |
7955 | { | |
7956 | return kinfo_getfile (); | |
7957 | ; | |
7958 | return 0; | |
7959 | } | |
7960 | _ACEOF | |
7961 | for ac_lib in '' util util-freebsd; do | |
7962 | if test -z "$ac_lib"; then | |
7963 | ac_res="none required" | |
7964 | else | |
7965 | ac_res=-l$ac_lib | |
7966 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7967 | fi | |
7968 | if ac_fn_c_try_link "$LINENO"; then : | |
7969 | ac_cv_search_kinfo_getfile=$ac_res | |
7970 | fi | |
7971 | rm -f core conftest.err conftest.$ac_objext \ | |
7972 | conftest$ac_exeext | |
7973 | if test "${ac_cv_search_kinfo_getfile+set}" = set; then : | |
7974 | break | |
7975 | fi | |
7976 | done | |
7977 | if test "${ac_cv_search_kinfo_getfile+set}" = set; then : | |
7978 | ||
7979 | else | |
7980 | ac_cv_search_kinfo_getfile=no | |
7981 | fi | |
7982 | rm conftest.$ac_ext | |
7983 | LIBS=$ac_func_search_save_LIBS | |
7984 | fi | |
7985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
7986 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
7987 | ac_res=$ac_cv_search_kinfo_getfile | |
7988 | if test "$ac_res" != no; then : | |
7989 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7990 | ||
7991 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | |
7992 | ||
7993 | fi | |
7994 | ||
7995 | ||
77f120bf | 7996 | |
016a3251 DD |
7997 | if test "X$prefix" = "XNONE"; then |
7998 | acl_final_prefix="$ac_default_prefix" | |
7999 | else | |
8000 | acl_final_prefix="$prefix" | |
8001 | fi | |
8002 | if test "X$exec_prefix" = "XNONE"; then | |
8003 | acl_final_exec_prefix='${prefix}' | |
8004 | else | |
8005 | acl_final_exec_prefix="$exec_prefix" | |
8006 | fi | |
8007 | acl_save_prefix="$prefix" | |
8008 | prefix="$acl_final_prefix" | |
8009 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8010 | prefix="$acl_save_prefix" | |
8011 | ||
8012 | ||
8013 | # Check whether --with-gnu-ld was given. | |
8014 | if test "${with_gnu_ld+set}" = set; then : | |
8015 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8016 | else | |
8017 | with_gnu_ld=no | |
8018 | fi | |
8019 | ||
8020 | # Prepare PATH_SEPARATOR. | |
8021 | # The user is always right. | |
8022 | if test "${PATH_SEPARATOR+set}" != set; then | |
8023 | echo "#! /bin/sh" >conf$$.sh | |
8024 | echo "exit 0" >>conf$$.sh | |
8025 | chmod +x conf$$.sh | |
8026 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8027 | PATH_SEPARATOR=';' | |
8028 | else | |
8029 | PATH_SEPARATOR=: | |
8030 | fi | |
8031 | rm -f conf$$.sh | |
8032 | fi | |
8033 | ac_prog=ld | |
8034 | if test "$GCC" = yes; then | |
8035 | # Check if gcc -print-prog-name=ld gives a path. | |
8036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8037 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8038 | case $host in | |
8039 | *-*-mingw*) | |
8040 | # gcc leaves a trailing carriage return which upsets mingw | |
8041 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8042 | *) | |
8043 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8044 | esac | |
8045 | case $ac_prog in | |
8046 | # Accept absolute paths. | |
8047 | [\\/]* | [A-Za-z]:[\\/]*) | |
8048 | re_direlt='/[^/][^/]*/\.\./' | |
8049 | # Canonicalize the path of ld | |
8050 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8051 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8052 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8053 | done | |
8054 | test -z "$LD" && LD="$ac_prog" | |
8055 | ;; | |
8056 | "") | |
8057 | # If it fails, then pretend we aren't using GCC. | |
8058 | ac_prog=ld | |
8059 | ;; | |
8060 | *) | |
8061 | # If it is relative, then search for the first ld in PATH. | |
8062 | with_gnu_ld=unknown | |
8063 | ;; | |
8064 | esac | |
8065 | elif test "$with_gnu_ld" = yes; then | |
8066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8067 | $as_echo_n "checking for GNU ld... " >&6; } | |
8068 | else | |
8069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8070 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8071 | fi | |
8072 | if test "${acl_cv_path_LD+set}" = set; then : | |
8073 | $as_echo_n "(cached) " >&6 | |
8074 | else | |
8075 | if test -z "$LD"; then | |
8076 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8077 | for ac_dir in $PATH; do | |
8078 | test -z "$ac_dir" && ac_dir=. | |
8079 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8080 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8081 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8082 | # but apparently some GNU ld's only accept -v. | |
8083 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8084 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8085 | test "$with_gnu_ld" != no && break | |
8086 | else | |
8087 | test "$with_gnu_ld" != yes && break | |
8088 | fi | |
8089 | fi | |
8090 | done | |
8091 | IFS="$ac_save_ifs" | |
8092 | else | |
8093 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8094 | fi | |
8095 | fi | |
8096 | ||
8097 | LD="$acl_cv_path_LD" | |
8098 | if test -n "$LD"; then | |
8099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8100 | $as_echo "$LD" >&6; } | |
8101 | else | |
8102 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8103 | $as_echo "no" >&6; } | |
8104 | fi | |
8105 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 | |
8106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
8107 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
8108 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
8109 | $as_echo_n "(cached) " >&6 | |
8110 | else | |
8111 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8112 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8113 | acl_cv_prog_gnu_ld=yes | |
8114 | else | |
8115 | acl_cv_prog_gnu_ld=no | |
8116 | fi | |
8117 | fi | |
8118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8119 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8120 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8121 | ||
8122 | ||
8123 | ||
8124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8125 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
8126 | if test "${acl_cv_rpath+set}" = set; then : | |
8127 | $as_echo_n "(cached) " >&6 | |
8128 | else | |
8129 | ||
8130 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8131 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8132 | . ./conftest.sh | |
8133 | rm -f ./conftest.sh | |
8134 | acl_cv_rpath=done | |
8135 | ||
8136 | fi | |
8137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8138 | $as_echo "$acl_cv_rpath" >&6; } | |
8139 | wl="$acl_cv_wl" | |
8140 | libext="$acl_cv_libext" | |
8141 | shlibext="$acl_cv_shlibext" | |
8142 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8143 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8144 | hardcode_direct="$acl_cv_hardcode_direct" | |
8145 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8146 | # Check whether --enable-rpath was given. | |
8147 | if test "${enable_rpath+set}" = set; then : | |
8148 | enableval=$enable_rpath; : | |
8149 | else | |
8150 | enable_rpath=yes | |
8151 | fi | |
8152 | ||
8153 | ||
8154 | ||
8155 | ||
8156 | ||
8157 | ||
8158 | ||
8159 | ||
8160 | use_additional=yes | |
8161 | ||
8162 | acl_save_prefix="$prefix" | |
8163 | prefix="$acl_final_prefix" | |
8164 | acl_save_exec_prefix="$exec_prefix" | |
8165 | exec_prefix="$acl_final_exec_prefix" | |
8166 | ||
8167 | eval additional_includedir=\"$includedir\" | |
8168 | eval additional_libdir=\"$libdir\" | |
8169 | ||
8170 | exec_prefix="$acl_save_exec_prefix" | |
8171 | prefix="$acl_save_prefix" | |
77f120bf | 8172 | |
6c7a06a3 | 8173 | |
81ecdfbb RW |
8174 | # Check whether --with-libiconv-prefix was given. |
8175 | if test "${with_libiconv_prefix+set}" = set; then : | |
8176 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8177 | if test "X$withval" = "Xno"; then |
8178 | use_additional=no | |
8179 | else | |
8180 | if test "X$withval" = "X"; then | |
8181 | ||
8182 | acl_save_prefix="$prefix" | |
8183 | prefix="$acl_final_prefix" | |
8184 | acl_save_exec_prefix="$exec_prefix" | |
8185 | exec_prefix="$acl_final_exec_prefix" | |
8186 | ||
8187 | eval additional_includedir=\"$includedir\" | |
8188 | eval additional_libdir=\"$libdir\" | |
8189 | ||
8190 | exec_prefix="$acl_save_exec_prefix" | |
8191 | prefix="$acl_save_prefix" | |
8192 | ||
8193 | else | |
8194 | additional_includedir="$withval/include" | |
8195 | additional_libdir="$withval/lib" | |
8196 | fi | |
8197 | fi | |
6c7a06a3 | 8198 | |
81ecdfbb RW |
8199 | fi |
8200 | ||
016a3251 DD |
8201 | LIBICONV= |
8202 | LTLIBICONV= | |
8203 | INCICONV= | |
8204 | rpathdirs= | |
8205 | ltrpathdirs= | |
8206 | names_already_handled= | |
8207 | names_next_round='iconv ' | |
8208 | while test -n "$names_next_round"; do | |
8209 | names_this_round="$names_next_round" | |
8210 | names_next_round= | |
8211 | for name in $names_this_round; do | |
8212 | already_handled= | |
8213 | for n in $names_already_handled; do | |
8214 | if test "$n" = "$name"; then | |
8215 | already_handled=yes | |
8216 | break | |
8217 | fi | |
8218 | done | |
8219 | if test -z "$already_handled"; then | |
8220 | names_already_handled="$names_already_handled $name" | |
8221 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8222 | eval value=\"\$HAVE_LIB$uppername\" | |
8223 | if test -n "$value"; then | |
8224 | if test "$value" = yes; then | |
8225 | eval value=\"\$LIB$uppername\" | |
8226 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8227 | eval value=\"\$LTLIB$uppername\" | |
8228 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8229 | else | |
8230 | : | |
8231 | fi | |
8232 | else | |
8233 | found_dir= | |
8234 | found_la= | |
8235 | found_so= | |
8236 | found_a= | |
8237 | if test $use_additional = yes; then | |
8238 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8239 | found_dir="$additional_libdir" | |
8240 | found_so="$additional_libdir/lib$name.$shlibext" | |
8241 | if test -f "$additional_libdir/lib$name.la"; then | |
8242 | found_la="$additional_libdir/lib$name.la" | |
8243 | fi | |
8244 | else | |
8245 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8246 | found_dir="$additional_libdir" | |
8247 | found_a="$additional_libdir/lib$name.$libext" | |
8248 | if test -f "$additional_libdir/lib$name.la"; then | |
8249 | found_la="$additional_libdir/lib$name.la" | |
8250 | fi | |
8251 | fi | |
8252 | fi | |
8253 | fi | |
8254 | if test "X$found_dir" = "X"; then | |
8255 | for x in $LDFLAGS $LTLIBICONV; do | |
8256 | ||
8257 | acl_save_prefix="$prefix" | |
8258 | prefix="$acl_final_prefix" | |
8259 | acl_save_exec_prefix="$exec_prefix" | |
8260 | exec_prefix="$acl_final_exec_prefix" | |
8261 | eval x=\"$x\" | |
8262 | exec_prefix="$acl_save_exec_prefix" | |
8263 | prefix="$acl_save_prefix" | |
8264 | ||
8265 | case "$x" in | |
8266 | -L*) | |
8267 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8268 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8269 | found_dir="$dir" | |
8270 | found_so="$dir/lib$name.$shlibext" | |
8271 | if test -f "$dir/lib$name.la"; then | |
8272 | found_la="$dir/lib$name.la" | |
8273 | fi | |
8274 | else | |
8275 | if test -f "$dir/lib$name.$libext"; then | |
8276 | found_dir="$dir" | |
8277 | found_a="$dir/lib$name.$libext" | |
8278 | if test -f "$dir/lib$name.la"; then | |
8279 | found_la="$dir/lib$name.la" | |
8280 | fi | |
8281 | fi | |
8282 | fi | |
8283 | ;; | |
8284 | esac | |
8285 | if test "X$found_dir" != "X"; then | |
8286 | break | |
8287 | fi | |
8288 | done | |
8289 | fi | |
8290 | if test "X$found_dir" != "X"; then | |
8291 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8292 | if test "X$found_so" != "X"; then | |
8293 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8294 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8295 | else | |
8296 | haveit= | |
8297 | for x in $ltrpathdirs; do | |
8298 | if test "X$x" = "X$found_dir"; then | |
8299 | haveit=yes | |
8300 | break | |
8301 | fi | |
8302 | done | |
8303 | if test -z "$haveit"; then | |
8304 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8305 | fi | |
8306 | if test "$hardcode_direct" = yes; then | |
8307 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8308 | else | |
8309 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8310 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8311 | haveit= | |
8312 | for x in $rpathdirs; do | |
8313 | if test "X$x" = "X$found_dir"; then | |
8314 | haveit=yes | |
8315 | break | |
8316 | fi | |
8317 | done | |
8318 | if test -z "$haveit"; then | |
8319 | rpathdirs="$rpathdirs $found_dir" | |
8320 | fi | |
8321 | else | |
8322 | haveit= | |
8323 | for x in $LDFLAGS $LIBICONV; do | |
8324 | ||
8325 | acl_save_prefix="$prefix" | |
8326 | prefix="$acl_final_prefix" | |
8327 | acl_save_exec_prefix="$exec_prefix" | |
8328 | exec_prefix="$acl_final_exec_prefix" | |
8329 | eval x=\"$x\" | |
8330 | exec_prefix="$acl_save_exec_prefix" | |
8331 | prefix="$acl_save_prefix" | |
8332 | ||
8333 | if test "X$x" = "X-L$found_dir"; then | |
8334 | haveit=yes | |
8335 | break | |
8336 | fi | |
8337 | done | |
8338 | if test -z "$haveit"; then | |
8339 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8340 | fi | |
8341 | if test "$hardcode_minus_L" != no; then | |
8342 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8343 | else | |
8344 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8345 | fi | |
8346 | fi | |
8347 | fi | |
8348 | fi | |
8349 | else | |
8350 | if test "X$found_a" != "X"; then | |
8351 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8352 | else | |
8353 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8354 | fi | |
8355 | fi | |
8356 | additional_includedir= | |
8357 | case "$found_dir" in | |
8358 | */lib | */lib/) | |
8359 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8360 | additional_includedir="$basedir/include" | |
8361 | ;; | |
8362 | esac | |
8363 | if test "X$additional_includedir" != "X"; then | |
8364 | if test "X$additional_includedir" != "X/usr/include"; then | |
8365 | haveit= | |
8366 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8367 | if test -n "$GCC"; then | |
8368 | case $host_os in | |
8369 | linux*) haveit=yes;; | |
8370 | esac | |
8371 | fi | |
8372 | fi | |
8373 | if test -z "$haveit"; then | |
8374 | for x in $CPPFLAGS $INCICONV; 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-I$additional_includedir"; then | |
8385 | haveit=yes | |
8386 | break | |
8387 | fi | |
8388 | done | |
8389 | if test -z "$haveit"; then | |
8390 | if test -d "$additional_includedir"; then | |
8391 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8392 | fi | |
8393 | fi | |
8394 | fi | |
8395 | fi | |
8396 | fi | |
8397 | if test -n "$found_la"; then | |
8398 | save_libdir="$libdir" | |
8399 | case "$found_la" in | |
8400 | */* | *\\*) . "$found_la" ;; | |
8401 | *) . "./$found_la" ;; | |
8402 | esac | |
8403 | libdir="$save_libdir" | |
8404 | for dep in $dependency_libs; do | |
8405 | case "$dep" in | |
8406 | -L*) | |
8407 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8408 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8409 | haveit= | |
8410 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8411 | if test -n "$GCC"; then | |
8412 | case $host_os in | |
8413 | linux*) haveit=yes;; | |
8414 | esac | |
8415 | fi | |
8416 | fi | |
8417 | if test -z "$haveit"; then | |
8418 | haveit= | |
8419 | for x in $LDFLAGS $LIBICONV; do | |
8420 | ||
8421 | acl_save_prefix="$prefix" | |
8422 | prefix="$acl_final_prefix" | |
8423 | acl_save_exec_prefix="$exec_prefix" | |
8424 | exec_prefix="$acl_final_exec_prefix" | |
8425 | eval x=\"$x\" | |
8426 | exec_prefix="$acl_save_exec_prefix" | |
8427 | prefix="$acl_save_prefix" | |
8428 | ||
8429 | if test "X$x" = "X-L$additional_libdir"; then | |
8430 | haveit=yes | |
8431 | break | |
8432 | fi | |
8433 | done | |
8434 | if test -z "$haveit"; then | |
8435 | if test -d "$additional_libdir"; then | |
8436 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8437 | fi | |
8438 | fi | |
8439 | haveit= | |
8440 | for x in $LDFLAGS $LTLIBICONV; do | |
8441 | ||
8442 | acl_save_prefix="$prefix" | |
8443 | prefix="$acl_final_prefix" | |
8444 | acl_save_exec_prefix="$exec_prefix" | |
8445 | exec_prefix="$acl_final_exec_prefix" | |
8446 | eval x=\"$x\" | |
8447 | exec_prefix="$acl_save_exec_prefix" | |
8448 | prefix="$acl_save_prefix" | |
8449 | ||
8450 | if test "X$x" = "X-L$additional_libdir"; then | |
8451 | haveit=yes | |
8452 | break | |
8453 | fi | |
8454 | done | |
8455 | if test -z "$haveit"; then | |
8456 | if test -d "$additional_libdir"; then | |
8457 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8458 | fi | |
8459 | fi | |
8460 | fi | |
8461 | fi | |
8462 | ;; | |
8463 | -R*) | |
8464 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8465 | if test "$enable_rpath" != no; then | |
8466 | haveit= | |
8467 | for x in $rpathdirs; do | |
8468 | if test "X$x" = "X$dir"; then | |
8469 | haveit=yes | |
8470 | break | |
8471 | fi | |
8472 | done | |
8473 | if test -z "$haveit"; then | |
8474 | rpathdirs="$rpathdirs $dir" | |
8475 | fi | |
8476 | haveit= | |
8477 | for x in $ltrpathdirs; do | |
8478 | if test "X$x" = "X$dir"; then | |
8479 | haveit=yes | |
8480 | break | |
8481 | fi | |
8482 | done | |
8483 | if test -z "$haveit"; then | |
8484 | ltrpathdirs="$ltrpathdirs $dir" | |
8485 | fi | |
8486 | fi | |
8487 | ;; | |
8488 | -l*) | |
8489 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8490 | ;; | |
8491 | *.la) | |
8492 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8493 | ;; | |
8494 | *) | |
8495 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8496 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8497 | ;; | |
8498 | esac | |
8499 | done | |
8500 | fi | |
8501 | else | |
8502 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8503 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8504 | fi | |
8505 | fi | |
8506 | fi | |
8507 | done | |
8508 | done | |
8509 | if test "X$rpathdirs" != "X"; then | |
8510 | if test -n "$hardcode_libdir_separator"; then | |
8511 | alldirs= | |
8512 | for found_dir in $rpathdirs; do | |
8513 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8514 | done | |
8515 | acl_save_libdir="$libdir" | |
8516 | libdir="$alldirs" | |
8517 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8518 | libdir="$acl_save_libdir" | |
8519 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8520 | else | |
8521 | for found_dir in $rpathdirs; do | |
8522 | acl_save_libdir="$libdir" | |
8523 | libdir="$found_dir" | |
8524 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8525 | libdir="$acl_save_libdir" | |
8526 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8527 | done | |
8528 | fi | |
8529 | fi | |
8530 | if test "X$ltrpathdirs" != "X"; then | |
8531 | for found_dir in $ltrpathdirs; do | |
8532 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8533 | done | |
8534 | fi | |
8535 | ||
8536 | ||
8537 | ||
8538 | ||
8539 | ||
6c7a06a3 | 8540 | |
6c7a06a3 | 8541 | |
81ecdfbb RW |
8542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8543 | $as_echo_n "checking for iconv... " >&6; } | |
8544 | if test "${am_cv_func_iconv+set}" = set; then : | |
8545 | $as_echo_n "(cached) " >&6 | |
d542061a | 8546 | else |
6c7a06a3 TT |
8547 | |
8548 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8549 | am_cv_lib_iconv=no | |
016a3251 DD |
8550 | am_save_CPPFLAGS="$CPPFLAGS" |
8551 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8553 | /* end confdefs.h. */ |
6c7a06a3 TT |
8554 | #include <stdlib.h> |
8555 | #include <iconv.h> | |
d542061a UW |
8556 | int |
8557 | main () | |
8558 | { | |
6c7a06a3 | 8559 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8560 | iconv(cd,NULL,NULL,NULL,NULL); |
8561 | iconv_close(cd); | |
d542061a UW |
8562 | ; |
8563 | return 0; | |
8564 | } | |
8565 | _ACEOF | |
81ecdfbb | 8566 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8567 | am_cv_func_iconv=yes |
d542061a | 8568 | fi |
81ecdfbb RW |
8569 | rm -f core conftest.err conftest.$ac_objext \ |
8570 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8571 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8572 | |
016a3251 DD |
8573 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8574 | for _libs in .libs _libs; do | |
8575 | am_save_CPPFLAGS="$CPPFLAGS" | |
8576 | am_save_LIBS="$LIBS" | |
8577 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8578 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8580 | /* end confdefs.h. */ |
6c7a06a3 TT |
8581 | #include <stdlib.h> |
8582 | #include <iconv.h> | |
d542061a UW |
8583 | int |
8584 | main () | |
8585 | { | |
6c7a06a3 | 8586 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8587 | iconv(cd,NULL,NULL,NULL,NULL); |
8588 | iconv_close(cd); | |
d542061a UW |
8589 | ; |
8590 | return 0; | |
8591 | } | |
8592 | _ACEOF | |
81ecdfbb | 8593 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8594 | INCICONV="-I../libiconv/include" |
8595 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8596 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8597 | am_cv_lib_iconv=yes | |
8598 | am_cv_func_iconv=yes | |
d542061a | 8599 | fi |
81ecdfbb RW |
8600 | rm -f core conftest.err conftest.$ac_objext \ |
8601 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8602 | CPPFLAGS="$am_save_CPPFLAGS" |
8603 | LIBS="$am_save_LIBS" | |
8604 | if test "$am_cv_func_iconv" = "yes"; then | |
8605 | break | |
8606 | fi | |
8607 | done | |
77f120bf | 8608 | fi |
94ae1714 | 8609 | |
4edb1e84 | 8610 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8611 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8612 | am_save_LIBS="$LIBS" |
016a3251 DD |
8613 | CPPFLAGS="$LIBS $INCICONV" |
8614 | LIBS="$LIBS $LIBICONV" | |
81ecdfbb | 8615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8616 | /* end confdefs.h. */ |
6c7a06a3 TT |
8617 | #include <stdlib.h> |
8618 | #include <iconv.h> | |
bec39cab AC |
8619 | int |
8620 | main () | |
8621 | { | |
6c7a06a3 TT |
8622 | iconv_t cd = iconv_open("",""); |
8623 | iconv(cd,NULL,NULL,NULL,NULL); | |
8624 | iconv_close(cd); | |
bec39cab AC |
8625 | ; |
8626 | return 0; | |
8627 | } | |
8628 | _ACEOF | |
81ecdfbb | 8629 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8630 | am_cv_lib_iconv=yes |
6c7a06a3 | 8631 | am_cv_func_iconv=yes |
627af7ea | 8632 | fi |
81ecdfbb RW |
8633 | rm -f core conftest.err conftest.$ac_objext \ |
8634 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8635 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8636 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8637 | fi |
8638 | ||
8639 | fi | |
81ecdfbb RW |
8640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8641 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8642 | if test "$am_cv_func_iconv" = yes; then |
8643 | ||
8644 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8645 | |
016a3251 | 8646 | fi |
fc3b640d | 8647 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8648 | |
8649 | for element in $INCICONV; do | |
8650 | haveit= | |
8651 | for x in $CPPFLAGS; do | |
8652 | ||
8653 | acl_save_prefix="$prefix" | |
8654 | prefix="$acl_final_prefix" | |
8655 | acl_save_exec_prefix="$exec_prefix" | |
8656 | exec_prefix="$acl_final_exec_prefix" | |
8657 | eval x=\"$x\" | |
8658 | exec_prefix="$acl_save_exec_prefix" | |
8659 | prefix="$acl_save_prefix" | |
8660 | ||
8661 | if test "X$x" = "X$element"; then | |
8662 | haveit=yes | |
8663 | break | |
8664 | fi | |
8665 | done | |
8666 | if test -z "$haveit"; then | |
8667 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8668 | fi | |
8669 | done | |
8670 | ||
8671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8672 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8674 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8675 | else |
016a3251 DD |
8676 | LIBICONV= |
8677 | LTLIBICONV= | |
fc3b640d | 8678 | fi |
94ae1714 | 8679 | |
6c7a06a3 | 8680 | |
6c7a06a3 | 8681 | |
016a3251 | 8682 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8684 | $as_echo_n "checking for iconv declaration... " >&6; } | |
8685 | if test "${am_cv_proto_iconv+set}" = set; then : | |
8686 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8687 | else |
8688 | ||
81ecdfbb | 8689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8690 | /* end confdefs.h. */ |
8691 | ||
6c7a06a3 TT |
8692 | #include <stdlib.h> |
8693 | #include <iconv.h> | |
8694 | extern | |
b4e70030 | 8695 | #ifdef __cplusplus |
6c7a06a3 | 8696 | "C" |
b4e70030 | 8697 | #endif |
6c7a06a3 TT |
8698 | #if defined(__STDC__) || defined(__cplusplus) |
8699 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8700 | #else | |
8701 | size_t iconv(); | |
8702 | #endif | |
8703 | ||
b4e70030 JB |
8704 | int |
8705 | main () | |
8706 | { | |
6c7a06a3 | 8707 | |
b4e70030 JB |
8708 | ; |
8709 | return 0; | |
8710 | } | |
8711 | _ACEOF | |
81ecdfbb | 8712 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8713 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8714 | else |
81ecdfbb | 8715 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8716 | fi |
81ecdfbb | 8717 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8718 | 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);" |
8719 | fi | |
8720 | ||
8721 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8723 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8724 | $as_echo "${ac_t:- |
8725 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8726 | |
8727 | cat >>confdefs.h <<_ACEOF | |
8728 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8729 | _ACEOF | |
8730 | ||
8731 | fi | |
6c7a06a3 TT |
8732 | |
8733 | ||
478aac75 DE |
8734 | # GDB may fork/exec the iconv program to get the list of supported character |
8735 | # sets. Allow the user to specify where to find it. | |
8736 | # There are several factors affecting the choice of option name: | |
8737 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
8738 | # the build-time location of libiconv files. | |
8739 | # - The program we need to find is iconv, which comes with glibc. The user | |
8740 | # doesn't necessarily have libiconv installed. Therefore naming this | |
8741 | # --with-libiconv-foo feels wrong. | |
8742 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
8743 | # defined to work on directories not files (though it really doesn't know | |
8744 | # the difference). | |
8745 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
8746 | # with --with-libiconv-prefix. | |
8747 | # Putting these together is why the option name is --with-iconv-bin. | |
8748 | ||
8749 | ||
8750 | # Check whether --with-iconv-bin was given. | |
8751 | if test "${with_iconv_bin+set}" = set; then : | |
8752 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
8753 | ||
8754 | cat >>confdefs.h <<_ACEOF | |
8755 | #define ICONV_BIN "${iconv_bin}" | |
8756 | _ACEOF | |
8757 | ||
8758 | ||
8759 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8760 | if test "x$prefix" = xNONE; then | |
8761 | test_prefix=/usr/local | |
8762 | else | |
8763 | test_prefix=$prefix | |
8764 | fi | |
8765 | else | |
8766 | test_prefix=$exec_prefix | |
8767 | fi | |
8768 | value=0 | |
8769 | case ${iconv_bin} in | |
8770 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8771 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8772 | value=1 | |
8773 | ;; | |
8774 | esac | |
8775 | ||
8776 | cat >>confdefs.h <<_ACEOF | |
8777 | #define ICONV_BIN_RELOCATABLE $value | |
8778 | _ACEOF | |
8779 | ||
8780 | ||
8781 | ||
8782 | fi | |
8783 | ||
8784 | ||
cb01cfba | 8785 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 8786 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
8787 | prefer_curses=yes |
8788 | fi | |
8789 | ||
8790 | curses_found=no | |
8791 | if test x"$prefer_curses" = xyes; then | |
8792 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
8793 | # curses library because the latter might not provide all the | |
8794 | # functionality we need. However, this leads to problems on systems | |
8795 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
8796 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
8797 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
8798 | # a situation. | |
81ecdfbb RW |
8799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
8800 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
8801 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8802 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8803 | else |
8804 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8806 | /* end confdefs.h. */ |
8807 | ||
81ecdfbb RW |
8808 | /* Override any GCC internal prototype to avoid an error. |
8809 | Use char because int might match the return type of a GCC | |
8810 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8811 | #ifdef __cplusplus |
8812 | extern "C" | |
8813 | #endif | |
6c7a06a3 TT |
8814 | char waddstr (); |
8815 | int | |
8816 | main () | |
8817 | { | |
81ecdfbb | 8818 | return waddstr (); |
6c7a06a3 TT |
8819 | ; |
8820 | return 0; | |
8821 | } | |
8822 | _ACEOF | |
5007d765 | 8823 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
8824 | if test -z "$ac_lib"; then |
8825 | ac_res="none required" | |
8826 | else | |
8827 | ac_res=-l$ac_lib | |
8828 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8829 | fi | |
8830 | if ac_fn_c_try_link "$LINENO"; then : | |
8831 | ac_cv_search_waddstr=$ac_res | |
8832 | fi | |
8833 | rm -f core conftest.err conftest.$ac_objext \ | |
8834 | conftest$ac_exeext | |
8835 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8836 | break | |
8837 | fi | |
8838 | done | |
8839 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8840 | ||
6c7a06a3 | 8841 | else |
81ecdfbb RW |
8842 | ac_cv_search_waddstr=no |
8843 | fi | |
8844 | rm conftest.$ac_ext | |
8845 | LIBS=$ac_func_search_save_LIBS | |
8846 | fi | |
8847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
8848 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
8849 | ac_res=$ac_cv_search_waddstr | |
8850 | if test "$ac_res" != no; then : | |
8851 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
8852 | |
8853 | fi | |
8854 | ||
8855 | ||
cb01cfba JB |
8856 | if test "$ac_cv_search_waddstr" != no; then |
8857 | curses_found=yes | |
8858 | fi | |
8859 | fi | |
8860 | ||
8861 | # Check whether we should enable the TUI, but only do so if we really | |
8862 | # can. | |
8863 | if test x"$enable_tui" != xno; then | |
8864 | if test -d $srcdir/tui; then | |
8865 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
8866 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
8867 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
8868 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
8869 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
8870 | else |
8871 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 8872 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 8873 | else |
81ecdfbb RW |
8874 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
8875 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
8876 | fi |
8877 | fi | |
8878 | fi | |
8879 | fi | |
8880 | ||
8881 | # Since GDB uses Readline, we need termcap functionality. In many | |
8882 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 8883 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
8884 | |
8885 | case $host_os in | |
8886 | cygwin*) | |
8887 | if test -d $srcdir/libtermcap; then | |
8888 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
8889 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
8890 | fi ;; | |
8891 | go32* | *djgpp*) | |
8892 | ac_cv_search_tgetent="none required" | |
8893 | ;; | |
6c7a06a3 TT |
8894 | esac |
8895 | ||
8896 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
8897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
8898 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
8899 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8900 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8901 | else |
8902 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8903 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8904 | /* end confdefs.h. */ |
8905 | ||
81ecdfbb RW |
8906 | /* Override any GCC internal prototype to avoid an error. |
8907 | Use char because int might match the return type of a GCC | |
8908 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8909 | #ifdef __cplusplus |
8910 | extern "C" | |
8911 | #endif | |
6c7a06a3 TT |
8912 | char tgetent (); |
8913 | int | |
8914 | main () | |
8915 | { | |
81ecdfbb | 8916 | return tgetent (); |
6c7a06a3 TT |
8917 | ; |
8918 | return 0; | |
8919 | } | |
8920 | _ACEOF | |
5007d765 | 8921 | for ac_lib in '' termcap tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
8922 | if test -z "$ac_lib"; then |
8923 | ac_res="none required" | |
8924 | else | |
8925 | ac_res=-l$ac_lib | |
6c7a06a3 | 8926 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8927 | fi |
8928 | if ac_fn_c_try_link "$LINENO"; then : | |
8929 | ac_cv_search_tgetent=$ac_res | |
8930 | fi | |
8931 | rm -f core conftest.err conftest.$ac_objext \ | |
8932 | conftest$ac_exeext | |
8933 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8934 | break | |
8935 | fi | |
8936 | done | |
8937 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 8938 | |
6c7a06a3 | 8939 | else |
81ecdfbb | 8940 | ac_cv_search_tgetent=no |
6c7a06a3 | 8941 | fi |
81ecdfbb | 8942 | rm conftest.$ac_ext |
6c7a06a3 TT |
8943 | LIBS=$ac_func_search_save_LIBS |
8944 | fi | |
81ecdfbb RW |
8945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
8946 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
8947 | ac_res=$ac_cv_search_tgetent | |
8948 | if test "$ac_res" != no; then : | |
8949 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 8950 | |
06825bd1 MK |
8951 | fi |
8952 | ||
06825bd1 | 8953 | |
bec39cab | 8954 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 8955 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
8956 | fi |
8957 | ||
3841debe | 8958 | |
81ecdfbb RW |
8959 | # Check whether --with-system-readline was given. |
8960 | if test "${with_system_readline+set}" = set; then : | |
8961 | withval=$with_system_readline; | |
8962 | fi | |
6a30b0a5 | 8963 | |
6a30b0a5 AS |
8964 | |
8965 | if test "$with_system_readline" = yes; then | |
8966 | READLINE=-lreadline | |
8967 | READLINE_DEPS= | |
8968 | READLINE_CFLAGS= | |
39037522 | 8969 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
8970 | else |
8971 | READLINE='$(READLINE_DIR)/libreadline.a' | |
8972 | READLINE_DEPS='$(READLINE)' | |
8973 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 8974 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
8975 | fi |
8976 | ||
8977 | ||
8978 | ||
8979 | ||
8980 | ||
f997c383 SD |
8981 | # Generate jit-reader.h |
8982 | ||
8983 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
8984 | TARGET_PTR= | |
8985 | ||
8986 | # The cast to long int works around a bug in the HP C Compiler | |
8987 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8988 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8989 | # This bug is HP SR number 8606223364. | |
8990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
8991 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
8992 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
8993 | $as_echo_n "(cached) " >&6 | |
8994 | else | |
8995 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
8996 | ||
8997 | else | |
8998 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
8999 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9000 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9001 | { as_fn_set_status 77 | |
9002 | as_fn_error "cannot compute sizeof (unsigned long long) | |
9003 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9004 | else | |
9005 | ac_cv_sizeof_unsigned_long_long=0 | |
9006 | fi | |
9007 | fi | |
9008 | ||
9009 | fi | |
9010 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9011 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9012 | ||
9013 | ||
9014 | ||
9015 | cat >>confdefs.h <<_ACEOF | |
9016 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9017 | _ACEOF | |
9018 | ||
9019 | ||
9020 | # The cast to long int works around a bug in the HP C Compiler | |
9021 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9022 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9023 | # This bug is HP SR number 8606223364. | |
9024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9025 | $as_echo_n "checking size of unsigned long... " >&6; } | |
9026 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
9027 | $as_echo_n "(cached) " >&6 | |
9028 | else | |
9029 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9030 | ||
9031 | else | |
9032 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9033 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9034 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9035 | { as_fn_set_status 77 | |
9036 | as_fn_error "cannot compute sizeof (unsigned long) | |
9037 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9038 | else | |
9039 | ac_cv_sizeof_unsigned_long=0 | |
9040 | fi | |
9041 | fi | |
9042 | ||
9043 | fi | |
9044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9045 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9046 | ||
9047 | ||
9048 | ||
9049 | cat >>confdefs.h <<_ACEOF | |
9050 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9051 | _ACEOF | |
9052 | ||
9053 | ||
9054 | # The cast to long int works around a bug in the HP C Compiler | |
9055 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9056 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9057 | # This bug is HP SR number 8606223364. | |
9058 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9059 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
9060 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
9061 | $as_echo_n "(cached) " >&6 | |
9062 | else | |
9063 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9064 | ||
9065 | else | |
9066 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9067 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9068 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9069 | { as_fn_set_status 77 | |
9070 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
9071 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9072 | else | |
9073 | ac_cv_sizeof_unsigned___int128=0 | |
9074 | fi | |
9075 | fi | |
9076 | ||
9077 | fi | |
9078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9079 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9080 | ||
9081 | ||
9082 | ||
9083 | cat >>confdefs.h <<_ACEOF | |
9084 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9085 | _ACEOF | |
9086 | ||
9087 | ||
9088 | ||
9089 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9090 | TARGET_PTR="unsigned long" | |
9091 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9092 | TARGET_PTR="unsigned long long" | |
9093 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9094 | TARGET_PTR="unsigned __int128" | |
9095 | else | |
9096 | TARGET_PTR="unsigned long" | |
9097 | fi | |
9098 | ||
9099 | ||
9100 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9101 | ||
9102 | ||
a2d08b9e SD |
9103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9104 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
9105 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9106 | $as_echo_n "(cached) " >&6 | |
9107 | else | |
9108 | ac_func_search_save_LIBS=$LIBS | |
9109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9110 | /* end confdefs.h. */ | |
9111 | ||
9112 | /* Override any GCC internal prototype to avoid an error. | |
9113 | Use char because int might match the return type of a GCC | |
9114 | builtin and then its argument prototype would still apply. */ | |
9115 | #ifdef __cplusplus | |
9116 | extern "C" | |
9117 | #endif | |
9118 | char dlopen (); | |
9119 | int | |
9120 | main () | |
9121 | { | |
9122 | return dlopen (); | |
9123 | ; | |
9124 | return 0; | |
9125 | } | |
9126 | _ACEOF | |
9127 | for ac_lib in '' dl; do | |
9128 | if test -z "$ac_lib"; then | |
9129 | ac_res="none required" | |
9130 | else | |
9131 | ac_res=-l$ac_lib | |
9132 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9133 | fi | |
9134 | if ac_fn_c_try_link "$LINENO"; then : | |
9135 | ac_cv_search_dlopen=$ac_res | |
9136 | fi | |
9137 | rm -f core conftest.err conftest.$ac_objext \ | |
9138 | conftest$ac_exeext | |
9139 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9140 | break | |
9141 | fi | |
9142 | done | |
9143 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9144 | ||
9145 | else | |
9146 | ac_cv_search_dlopen=no | |
9147 | fi | |
9148 | rm conftest.$ac_ext | |
9149 | LIBS=$ac_func_search_save_LIBS | |
9150 | fi | |
9151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9152 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9153 | ac_res=$ac_cv_search_dlopen | |
9154 | if test "$ac_res" != no; then : | |
9155 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9156 | ||
9157 | fi | |
9158 | ||
9159 | ||
39037522 | 9160 | |
b8e0a31c SD |
9161 | |
9162 | # Check whether --with-jit-reader-dir was given. | |
9163 | if test "${with_jit_reader_dir+set}" = set; then : | |
9164 | withval=$with_jit_reader_dir; | |
9165 | JIT_READER_DIR=$withval | |
9166 | else | |
9167 | JIT_READER_DIR=${libdir}/gdb | |
9168 | fi | |
9169 | ||
9170 | ||
9171 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9172 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9173 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9174 | ac_define_dir=`eval echo $ac_define_dir` | |
9175 | ||
9176 | cat >>confdefs.h <<_ACEOF | |
9177 | #define JIT_READER_DIR "$ac_define_dir" | |
9178 | _ACEOF | |
9179 | ||
9180 | ||
9181 | ||
9182 | ||
9183 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9184 | if test "x$prefix" = xNONE; then | |
9185 | test_prefix=/usr/local | |
9186 | else | |
9187 | test_prefix=$prefix | |
9188 | fi | |
9189 | else | |
9190 | test_prefix=$exec_prefix | |
9191 | fi | |
9192 | value=0 | |
9193 | case ${ac_define_dir} in | |
9194 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9195 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9196 | value=1 | |
9197 | ;; | |
9198 | esac | |
9199 | ||
9200 | cat >>confdefs.h <<_ACEOF | |
9201 | #define JIT_READER_DIR_RELOCATABLE $value | |
9202 | _ACEOF | |
9203 | ||
9204 | ||
9205 | ||
9206 | ||
9207 | ||
81ecdfbb RW |
9208 | # Check whether --with-expat was given. |
9209 | if test "${with_expat+set}" = set; then : | |
9210 | withval=$with_expat; | |
5c39566f DJ |
9211 | else |
9212 | with_expat=auto | |
81ecdfbb RW |
9213 | fi |
9214 | ||
9215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9216 | $as_echo_n "checking whether to use expat... " >&6; } | |
9217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9218 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9219 | |
9220 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9221 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9222 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9223 | HAVE_LIBEXPAT=no |
9224 | else | |
9225 | ||
3841debe DJ |
9226 | |
9227 | ||
9228 | ||
9229 | ||
9230 | ||
9231 | ||
9232 | ||
9233 | use_additional=yes | |
9234 | ||
9235 | acl_save_prefix="$prefix" | |
9236 | prefix="$acl_final_prefix" | |
9237 | acl_save_exec_prefix="$exec_prefix" | |
9238 | exec_prefix="$acl_final_exec_prefix" | |
9239 | ||
9240 | eval additional_includedir=\"$includedir\" | |
9241 | eval additional_libdir=\"$libdir\" | |
9242 | ||
9243 | exec_prefix="$acl_save_exec_prefix" | |
9244 | prefix="$acl_save_prefix" | |
9245 | ||
9246 | ||
81ecdfbb RW |
9247 | # Check whether --with-libexpat-prefix was given. |
9248 | if test "${with_libexpat_prefix+set}" = set; then : | |
9249 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9250 | if test "X$withval" = "Xno"; then |
9251 | use_additional=no | |
9252 | else | |
9253 | if test "X$withval" = "X"; then | |
9254 | ||
9255 | acl_save_prefix="$prefix" | |
9256 | prefix="$acl_final_prefix" | |
9257 | acl_save_exec_prefix="$exec_prefix" | |
9258 | exec_prefix="$acl_final_exec_prefix" | |
9259 | ||
9260 | eval additional_includedir=\"$includedir\" | |
9261 | eval additional_libdir=\"$libdir\" | |
9262 | ||
9263 | exec_prefix="$acl_save_exec_prefix" | |
9264 | prefix="$acl_save_prefix" | |
9265 | ||
9266 | else | |
9267 | additional_includedir="$withval/include" | |
9268 | additional_libdir="$withval/lib" | |
9269 | fi | |
9270 | fi | |
9271 | ||
81ecdfbb RW |
9272 | fi |
9273 | ||
3841debe DJ |
9274 | LIBEXPAT= |
9275 | LTLIBEXPAT= | |
9276 | INCEXPAT= | |
9277 | rpathdirs= | |
9278 | ltrpathdirs= | |
9279 | names_already_handled= | |
9280 | names_next_round='expat ' | |
9281 | while test -n "$names_next_round"; do | |
9282 | names_this_round="$names_next_round" | |
9283 | names_next_round= | |
9284 | for name in $names_this_round; do | |
9285 | already_handled= | |
9286 | for n in $names_already_handled; do | |
9287 | if test "$n" = "$name"; then | |
9288 | already_handled=yes | |
9289 | break | |
9290 | fi | |
9291 | done | |
9292 | if test -z "$already_handled"; then | |
9293 | names_already_handled="$names_already_handled $name" | |
9294 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9295 | eval value=\"\$HAVE_LIB$uppername\" | |
9296 | if test -n "$value"; then | |
9297 | if test "$value" = yes; then | |
9298 | eval value=\"\$LIB$uppername\" | |
9299 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9300 | eval value=\"\$LTLIB$uppername\" | |
9301 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9302 | else | |
9303 | : | |
9304 | fi | |
9305 | else | |
9306 | found_dir= | |
9307 | found_la= | |
9308 | found_so= | |
9309 | found_a= | |
9310 | if test $use_additional = yes; then | |
9311 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9312 | found_dir="$additional_libdir" | |
9313 | found_so="$additional_libdir/lib$name.$shlibext" | |
9314 | if test -f "$additional_libdir/lib$name.la"; then | |
9315 | found_la="$additional_libdir/lib$name.la" | |
9316 | fi | |
9317 | else | |
9318 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9319 | found_dir="$additional_libdir" | |
9320 | found_a="$additional_libdir/lib$name.$libext" | |
9321 | if test -f "$additional_libdir/lib$name.la"; then | |
9322 | found_la="$additional_libdir/lib$name.la" | |
9323 | fi | |
9324 | fi | |
9325 | fi | |
9326 | fi | |
9327 | if test "X$found_dir" = "X"; then | |
9328 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9329 | ||
9330 | acl_save_prefix="$prefix" | |
9331 | prefix="$acl_final_prefix" | |
9332 | acl_save_exec_prefix="$exec_prefix" | |
9333 | exec_prefix="$acl_final_exec_prefix" | |
9334 | eval x=\"$x\" | |
9335 | exec_prefix="$acl_save_exec_prefix" | |
9336 | prefix="$acl_save_prefix" | |
9337 | ||
9338 | case "$x" in | |
9339 | -L*) | |
9340 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9341 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9342 | found_dir="$dir" | |
9343 | found_so="$dir/lib$name.$shlibext" | |
9344 | if test -f "$dir/lib$name.la"; then | |
9345 | found_la="$dir/lib$name.la" | |
9346 | fi | |
9347 | else | |
9348 | if test -f "$dir/lib$name.$libext"; then | |
9349 | found_dir="$dir" | |
9350 | found_a="$dir/lib$name.$libext" | |
9351 | if test -f "$dir/lib$name.la"; then | |
9352 | found_la="$dir/lib$name.la" | |
9353 | fi | |
9354 | fi | |
9355 | fi | |
9356 | ;; | |
9357 | esac | |
9358 | if test "X$found_dir" != "X"; then | |
9359 | break | |
9360 | fi | |
9361 | done | |
9362 | fi | |
9363 | if test "X$found_dir" != "X"; then | |
9364 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9365 | if test "X$found_so" != "X"; then | |
9366 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9367 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9368 | else | |
9369 | haveit= | |
9370 | for x in $ltrpathdirs; do | |
9371 | if test "X$x" = "X$found_dir"; then | |
9372 | haveit=yes | |
9373 | break | |
9374 | fi | |
9375 | done | |
9376 | if test -z "$haveit"; then | |
9377 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9378 | fi | |
9379 | if test "$hardcode_direct" = yes; then | |
9380 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9381 | else | |
9382 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9383 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9384 | haveit= | |
9385 | for x in $rpathdirs; do | |
9386 | if test "X$x" = "X$found_dir"; then | |
9387 | haveit=yes | |
9388 | break | |
9389 | fi | |
9390 | done | |
9391 | if test -z "$haveit"; then | |
9392 | rpathdirs="$rpathdirs $found_dir" | |
9393 | fi | |
9394 | else | |
9395 | haveit= | |
9396 | for x in $LDFLAGS $LIBEXPAT; do | |
9397 | ||
9398 | acl_save_prefix="$prefix" | |
9399 | prefix="$acl_final_prefix" | |
9400 | acl_save_exec_prefix="$exec_prefix" | |
9401 | exec_prefix="$acl_final_exec_prefix" | |
9402 | eval x=\"$x\" | |
9403 | exec_prefix="$acl_save_exec_prefix" | |
9404 | prefix="$acl_save_prefix" | |
9405 | ||
9406 | if test "X$x" = "X-L$found_dir"; then | |
9407 | haveit=yes | |
9408 | break | |
9409 | fi | |
9410 | done | |
9411 | if test -z "$haveit"; then | |
9412 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9413 | fi | |
9414 | if test "$hardcode_minus_L" != no; then | |
9415 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9416 | else | |
9417 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9418 | fi | |
9419 | fi | |
9420 | fi | |
9421 | fi | |
9422 | else | |
9423 | if test "X$found_a" != "X"; then | |
9424 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9425 | else | |
9426 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9427 | fi | |
9428 | fi | |
9429 | additional_includedir= | |
9430 | case "$found_dir" in | |
9431 | */lib | */lib/) | |
9432 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9433 | additional_includedir="$basedir/include" | |
9434 | ;; | |
9435 | esac | |
9436 | if test "X$additional_includedir" != "X"; then | |
9437 | if test "X$additional_includedir" != "X/usr/include"; then | |
9438 | haveit= | |
9439 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9440 | if test -n "$GCC"; then | |
9441 | case $host_os in | |
9442 | linux*) haveit=yes;; | |
9443 | esac | |
9444 | fi | |
9445 | fi | |
9446 | if test -z "$haveit"; then | |
9447 | for x in $CPPFLAGS $INCEXPAT; 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-I$additional_includedir"; then | |
9458 | haveit=yes | |
9459 | break | |
9460 | fi | |
9461 | done | |
9462 | if test -z "$haveit"; then | |
9463 | if test -d "$additional_includedir"; then | |
9464 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9465 | fi | |
9466 | fi | |
9467 | fi | |
9468 | fi | |
9469 | fi | |
9470 | if test -n "$found_la"; then | |
9471 | save_libdir="$libdir" | |
9472 | case "$found_la" in | |
9473 | */* | *\\*) . "$found_la" ;; | |
9474 | *) . "./$found_la" ;; | |
9475 | esac | |
9476 | libdir="$save_libdir" | |
9477 | for dep in $dependency_libs; do | |
9478 | case "$dep" in | |
9479 | -L*) | |
9480 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9481 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9482 | haveit= | |
9483 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9484 | if test -n "$GCC"; then | |
9485 | case $host_os in | |
9486 | linux*) haveit=yes;; | |
9487 | esac | |
9488 | fi | |
9489 | fi | |
9490 | if test -z "$haveit"; then | |
9491 | haveit= | |
9492 | for x in $LDFLAGS $LIBEXPAT; do | |
9493 | ||
9494 | acl_save_prefix="$prefix" | |
9495 | prefix="$acl_final_prefix" | |
9496 | acl_save_exec_prefix="$exec_prefix" | |
9497 | exec_prefix="$acl_final_exec_prefix" | |
9498 | eval x=\"$x\" | |
9499 | exec_prefix="$acl_save_exec_prefix" | |
9500 | prefix="$acl_save_prefix" | |
9501 | ||
9502 | if test "X$x" = "X-L$additional_libdir"; then | |
9503 | haveit=yes | |
9504 | break | |
9505 | fi | |
9506 | done | |
9507 | if test -z "$haveit"; then | |
9508 | if test -d "$additional_libdir"; then | |
9509 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9510 | fi | |
9511 | fi | |
9512 | haveit= | |
9513 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9514 | ||
9515 | acl_save_prefix="$prefix" | |
9516 | prefix="$acl_final_prefix" | |
9517 | acl_save_exec_prefix="$exec_prefix" | |
9518 | exec_prefix="$acl_final_exec_prefix" | |
9519 | eval x=\"$x\" | |
9520 | exec_prefix="$acl_save_exec_prefix" | |
9521 | prefix="$acl_save_prefix" | |
9522 | ||
9523 | if test "X$x" = "X-L$additional_libdir"; then | |
9524 | haveit=yes | |
9525 | break | |
9526 | fi | |
9527 | done | |
9528 | if test -z "$haveit"; then | |
9529 | if test -d "$additional_libdir"; then | |
9530 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9531 | fi | |
9532 | fi | |
9533 | fi | |
9534 | fi | |
9535 | ;; | |
9536 | -R*) | |
9537 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9538 | if test "$enable_rpath" != no; then | |
9539 | haveit= | |
9540 | for x in $rpathdirs; do | |
9541 | if test "X$x" = "X$dir"; then | |
9542 | haveit=yes | |
9543 | break | |
9544 | fi | |
9545 | done | |
9546 | if test -z "$haveit"; then | |
9547 | rpathdirs="$rpathdirs $dir" | |
9548 | fi | |
9549 | haveit= | |
9550 | for x in $ltrpathdirs; do | |
9551 | if test "X$x" = "X$dir"; then | |
9552 | haveit=yes | |
9553 | break | |
9554 | fi | |
9555 | done | |
9556 | if test -z "$haveit"; then | |
9557 | ltrpathdirs="$ltrpathdirs $dir" | |
9558 | fi | |
9559 | fi | |
9560 | ;; | |
9561 | -l*) | |
9562 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9563 | ;; | |
9564 | *.la) | |
9565 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9566 | ;; | |
9567 | *) | |
9568 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9569 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9570 | ;; | |
81ecdfbb RW |
9571 | esac |
9572 | done | |
9573 | fi | |
9574 | else | |
9575 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9576 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9577 | fi | |
9578 | fi | |
9579 | fi | |
9580 | done | |
9581 | done | |
9582 | if test "X$rpathdirs" != "X"; then | |
9583 | if test -n "$hardcode_libdir_separator"; then | |
9584 | alldirs= | |
9585 | for found_dir in $rpathdirs; do | |
9586 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9587 | done | |
9588 | acl_save_libdir="$libdir" | |
9589 | libdir="$alldirs" | |
9590 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9591 | libdir="$acl_save_libdir" | |
9592 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9593 | else | |
9594 | for found_dir in $rpathdirs; do | |
9595 | acl_save_libdir="$libdir" | |
9596 | libdir="$found_dir" | |
9597 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9598 | libdir="$acl_save_libdir" | |
9599 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9600 | done | |
9601 | fi | |
9602 | fi | |
9603 | if test "X$ltrpathdirs" != "X"; then | |
9604 | for found_dir in $ltrpathdirs; do | |
9605 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9606 | done | |
9607 | fi | |
a9322a30 TT |
9608 | |
9609 | ||
81ecdfbb | 9610 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9611 | |
81ecdfbb RW |
9612 | for element in $INCEXPAT; do |
9613 | haveit= | |
9614 | for x in $CPPFLAGS; do | |
a9322a30 | 9615 | |
81ecdfbb RW |
9616 | acl_save_prefix="$prefix" |
9617 | prefix="$acl_final_prefix" | |
9618 | acl_save_exec_prefix="$exec_prefix" | |
9619 | exec_prefix="$acl_final_exec_prefix" | |
9620 | eval x=\"$x\" | |
9621 | exec_prefix="$acl_save_exec_prefix" | |
9622 | prefix="$acl_save_prefix" | |
a8111142 | 9623 | |
81ecdfbb RW |
9624 | if test "X$x" = "X$element"; then |
9625 | haveit=yes | |
9626 | break | |
9627 | fi | |
9628 | done | |
9629 | if test -z "$haveit"; then | |
9630 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9631 | fi | |
9632 | done | |
a9322a30 TT |
9633 | |
9634 | ||
81ecdfbb RW |
9635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9636 | $as_echo_n "checking for libexpat... " >&6; } | |
9637 | if test "${ac_cv_libexpat+set}" = set; then : | |
9638 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9639 | else |
bec39cab | 9640 | |
81ecdfbb RW |
9641 | ac_save_LIBS="$LIBS" |
9642 | LIBS="$LIBS $LIBEXPAT" | |
9643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9644 | /* end confdefs.h. */ |
81ecdfbb RW |
9645 | #include "expat.h" |
9646 | int | |
9647 | main () | |
9648 | { | |
9649 | XML_Parser p = XML_ParserCreate (0); | |
9650 | ; | |
9651 | return 0; | |
9652 | } | |
bec39cab | 9653 | _ACEOF |
81ecdfbb RW |
9654 | if ac_fn_c_try_link "$LINENO"; then : |
9655 | ac_cv_libexpat=yes | |
c906108c | 9656 | else |
81ecdfbb | 9657 | ac_cv_libexpat=no |
bec39cab | 9658 | fi |
81ecdfbb RW |
9659 | rm -f core conftest.err conftest.$ac_objext \ |
9660 | conftest$ac_exeext conftest.$ac_ext | |
9661 | LIBS="$ac_save_LIBS" | |
c906108c | 9662 | |
95ca63c4 | 9663 | fi |
81ecdfbb RW |
9664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9665 | $as_echo "$ac_cv_libexpat" >&6; } | |
9666 | if test "$ac_cv_libexpat" = yes; then | |
9667 | HAVE_LIBEXPAT=yes | |
bec39cab | 9668 | |
81ecdfbb | 9669 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9670 | |
81ecdfbb RW |
9671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9672 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9674 | $as_echo "$LIBEXPAT" >&6; } | |
9675 | else | |
9676 | HAVE_LIBEXPAT=no | |
9677 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9678 | LIBEXPAT= | |
9679 | LTLIBEXPAT= | |
9680 | fi | |
95ca63c4 CF |
9681 | |
9682 | ||
9683 | ||
7cb9022a MK |
9684 | |
9685 | ||
bec39cab | 9686 | |
81ecdfbb RW |
9687 | if test "$HAVE_LIBEXPAT" != yes; then |
9688 | if test "$with_expat" = yes; then | |
9689 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
9690 | else | |
9691 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9692 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
9693 | fi | |
9694 | else | |
9695 | save_LIBS=$LIBS | |
9696 | LIBS="$LIBS $LIBEXPAT" | |
9697 | for ac_func in XML_StopParser | |
9698 | do : | |
9699 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
9700 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 9701 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9702 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 9703 | _ACEOF |
95ca63c4 | 9704 | |
bec39cab | 9705 | fi |
bec39cab | 9706 | done |
95ca63c4 | 9707 | |
81ecdfbb RW |
9708 | LIBS=$save_LIBS |
9709 | fi | |
a9322a30 TT |
9710 | fi |
9711 | ||
2400729e UW |
9712 | |
9713 | # Check whether --with-mpfr was given. | |
9714 | if test "${with_mpfr+set}" = set; then : | |
9715 | withval=$with_mpfr; | |
9716 | else | |
9717 | with_mpfr=auto | |
9718 | fi | |
9719 | ||
9720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
9721 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
9722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
9723 | $as_echo "$with_mpfr" >&6; } | |
9724 | ||
9725 | if test "${with_mpfr}" = no; then | |
9726 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
9727 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
9728 | HAVE_LIBMPFR=no | |
9729 | else | |
9730 | ||
9731 | ||
9732 | ||
9733 | ||
9734 | ||
9735 | ||
9736 | ||
9737 | ||
9738 | use_additional=yes | |
9739 | ||
9740 | acl_save_prefix="$prefix" | |
9741 | prefix="$acl_final_prefix" | |
9742 | acl_save_exec_prefix="$exec_prefix" | |
9743 | exec_prefix="$acl_final_exec_prefix" | |
9744 | ||
9745 | eval additional_includedir=\"$includedir\" | |
9746 | eval additional_libdir=\"$libdir\" | |
9747 | ||
9748 | exec_prefix="$acl_save_exec_prefix" | |
9749 | prefix="$acl_save_prefix" | |
9750 | ||
9751 | ||
9752 | # Check whether --with-libmpfr-prefix was given. | |
9753 | if test "${with_libmpfr_prefix+set}" = set; then : | |
9754 | withval=$with_libmpfr_prefix; | |
9755 | if test "X$withval" = "Xno"; then | |
9756 | use_additional=no | |
9757 | else | |
9758 | if test "X$withval" = "X"; then | |
9759 | ||
9760 | acl_save_prefix="$prefix" | |
9761 | prefix="$acl_final_prefix" | |
9762 | acl_save_exec_prefix="$exec_prefix" | |
9763 | exec_prefix="$acl_final_exec_prefix" | |
9764 | ||
9765 | eval additional_includedir=\"$includedir\" | |
9766 | eval additional_libdir=\"$libdir\" | |
9767 | ||
9768 | exec_prefix="$acl_save_exec_prefix" | |
9769 | prefix="$acl_save_prefix" | |
9770 | ||
9771 | else | |
9772 | additional_includedir="$withval/include" | |
9773 | additional_libdir="$withval/lib" | |
9774 | fi | |
9775 | fi | |
9776 | ||
9777 | fi | |
9778 | ||
9779 | LIBMPFR= | |
9780 | LTLIBMPFR= | |
9781 | INCMPFR= | |
9782 | rpathdirs= | |
9783 | ltrpathdirs= | |
9784 | names_already_handled= | |
9785 | names_next_round='mpfr ' | |
9786 | while test -n "$names_next_round"; do | |
9787 | names_this_round="$names_next_round" | |
9788 | names_next_round= | |
9789 | for name in $names_this_round; do | |
9790 | already_handled= | |
9791 | for n in $names_already_handled; do | |
9792 | if test "$n" = "$name"; then | |
9793 | already_handled=yes | |
9794 | break | |
9795 | fi | |
9796 | done | |
9797 | if test -z "$already_handled"; then | |
9798 | names_already_handled="$names_already_handled $name" | |
9799 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9800 | eval value=\"\$HAVE_LIB$uppername\" | |
9801 | if test -n "$value"; then | |
9802 | if test "$value" = yes; then | |
9803 | eval value=\"\$LIB$uppername\" | |
9804 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
9805 | eval value=\"\$LTLIB$uppername\" | |
9806 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
9807 | else | |
9808 | : | |
9809 | fi | |
9810 | else | |
9811 | found_dir= | |
9812 | found_la= | |
9813 | found_so= | |
9814 | found_a= | |
9815 | if test $use_additional = yes; then | |
9816 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9817 | found_dir="$additional_libdir" | |
9818 | found_so="$additional_libdir/lib$name.$shlibext" | |
9819 | if test -f "$additional_libdir/lib$name.la"; then | |
9820 | found_la="$additional_libdir/lib$name.la" | |
9821 | fi | |
9822 | else | |
9823 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9824 | found_dir="$additional_libdir" | |
9825 | found_a="$additional_libdir/lib$name.$libext" | |
9826 | if test -f "$additional_libdir/lib$name.la"; then | |
9827 | found_la="$additional_libdir/lib$name.la" | |
9828 | fi | |
9829 | fi | |
9830 | fi | |
9831 | fi | |
9832 | if test "X$found_dir" = "X"; then | |
9833 | for x in $LDFLAGS $LTLIBMPFR; do | |
9834 | ||
9835 | acl_save_prefix="$prefix" | |
9836 | prefix="$acl_final_prefix" | |
9837 | acl_save_exec_prefix="$exec_prefix" | |
9838 | exec_prefix="$acl_final_exec_prefix" | |
9839 | eval x=\"$x\" | |
9840 | exec_prefix="$acl_save_exec_prefix" | |
9841 | prefix="$acl_save_prefix" | |
9842 | ||
9843 | case "$x" in | |
9844 | -L*) | |
9845 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9846 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9847 | found_dir="$dir" | |
9848 | found_so="$dir/lib$name.$shlibext" | |
9849 | if test -f "$dir/lib$name.la"; then | |
9850 | found_la="$dir/lib$name.la" | |
9851 | fi | |
9852 | else | |
9853 | if test -f "$dir/lib$name.$libext"; then | |
9854 | found_dir="$dir" | |
9855 | found_a="$dir/lib$name.$libext" | |
9856 | if test -f "$dir/lib$name.la"; then | |
9857 | found_la="$dir/lib$name.la" | |
9858 | fi | |
9859 | fi | |
9860 | fi | |
9861 | ;; | |
9862 | esac | |
9863 | if test "X$found_dir" != "X"; then | |
9864 | break | |
9865 | fi | |
9866 | done | |
9867 | fi | |
9868 | if test "X$found_dir" != "X"; then | |
9869 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
9870 | if test "X$found_so" != "X"; then | |
9871 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9872 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9873 | else | |
9874 | haveit= | |
9875 | for x in $ltrpathdirs; do | |
9876 | if test "X$x" = "X$found_dir"; then | |
9877 | haveit=yes | |
9878 | break | |
9879 | fi | |
9880 | done | |
9881 | if test -z "$haveit"; then | |
9882 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9883 | fi | |
9884 | if test "$hardcode_direct" = yes; then | |
9885 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9886 | else | |
9887 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9888 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9889 | haveit= | |
9890 | for x in $rpathdirs; do | |
9891 | if test "X$x" = "X$found_dir"; then | |
9892 | haveit=yes | |
9893 | break | |
9894 | fi | |
9895 | done | |
9896 | if test -z "$haveit"; then | |
9897 | rpathdirs="$rpathdirs $found_dir" | |
9898 | fi | |
9899 | else | |
9900 | haveit= | |
9901 | for x in $LDFLAGS $LIBMPFR; do | |
9902 | ||
9903 | acl_save_prefix="$prefix" | |
9904 | prefix="$acl_final_prefix" | |
9905 | acl_save_exec_prefix="$exec_prefix" | |
9906 | exec_prefix="$acl_final_exec_prefix" | |
9907 | eval x=\"$x\" | |
9908 | exec_prefix="$acl_save_exec_prefix" | |
9909 | prefix="$acl_save_prefix" | |
9910 | ||
9911 | if test "X$x" = "X-L$found_dir"; then | |
9912 | haveit=yes | |
9913 | break | |
9914 | fi | |
9915 | done | |
9916 | if test -z "$haveit"; then | |
9917 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
9918 | fi | |
9919 | if test "$hardcode_minus_L" != no; then | |
9920 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9921 | else | |
9922 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
9923 | fi | |
9924 | fi | |
9925 | fi | |
9926 | fi | |
9927 | else | |
9928 | if test "X$found_a" != "X"; then | |
9929 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
9930 | else | |
9931 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
9932 | fi | |
9933 | fi | |
9934 | additional_includedir= | |
9935 | case "$found_dir" in | |
9936 | */lib | */lib/) | |
9937 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9938 | additional_includedir="$basedir/include" | |
9939 | ;; | |
9940 | esac | |
9941 | if test "X$additional_includedir" != "X"; then | |
9942 | if test "X$additional_includedir" != "X/usr/include"; then | |
9943 | haveit= | |
9944 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9945 | if test -n "$GCC"; then | |
9946 | case $host_os in | |
9947 | linux*) haveit=yes;; | |
9948 | esac | |
9949 | fi | |
9950 | fi | |
9951 | if test -z "$haveit"; then | |
9952 | for x in $CPPFLAGS $INCMPFR; 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-I$additional_includedir"; then | |
9963 | haveit=yes | |
9964 | break | |
9965 | fi | |
9966 | done | |
9967 | if test -z "$haveit"; then | |
9968 | if test -d "$additional_includedir"; then | |
9969 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
9970 | fi | |
9971 | fi | |
9972 | fi | |
9973 | fi | |
9974 | fi | |
9975 | if test -n "$found_la"; then | |
9976 | save_libdir="$libdir" | |
9977 | case "$found_la" in | |
9978 | */* | *\\*) . "$found_la" ;; | |
9979 | *) . "./$found_la" ;; | |
9980 | esac | |
9981 | libdir="$save_libdir" | |
9982 | for dep in $dependency_libs; do | |
9983 | case "$dep" in | |
9984 | -L*) | |
9985 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9986 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9987 | haveit= | |
9988 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9989 | if test -n "$GCC"; then | |
9990 | case $host_os in | |
9991 | linux*) haveit=yes;; | |
9992 | esac | |
9993 | fi | |
9994 | fi | |
9995 | if test -z "$haveit"; then | |
9996 | haveit= | |
9997 | for x in $LDFLAGS $LIBMPFR; do | |
9998 | ||
9999 | acl_save_prefix="$prefix" | |
10000 | prefix="$acl_final_prefix" | |
10001 | acl_save_exec_prefix="$exec_prefix" | |
10002 | exec_prefix="$acl_final_exec_prefix" | |
10003 | eval x=\"$x\" | |
10004 | exec_prefix="$acl_save_exec_prefix" | |
10005 | prefix="$acl_save_prefix" | |
10006 | ||
10007 | if test "X$x" = "X-L$additional_libdir"; then | |
10008 | haveit=yes | |
10009 | break | |
10010 | fi | |
10011 | done | |
10012 | if test -z "$haveit"; then | |
10013 | if test -d "$additional_libdir"; then | |
10014 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10015 | fi | |
10016 | fi | |
10017 | haveit= | |
10018 | for x in $LDFLAGS $LTLIBMPFR; do | |
10019 | ||
10020 | acl_save_prefix="$prefix" | |
10021 | prefix="$acl_final_prefix" | |
10022 | acl_save_exec_prefix="$exec_prefix" | |
10023 | exec_prefix="$acl_final_exec_prefix" | |
10024 | eval x=\"$x\" | |
10025 | exec_prefix="$acl_save_exec_prefix" | |
10026 | prefix="$acl_save_prefix" | |
10027 | ||
10028 | if test "X$x" = "X-L$additional_libdir"; then | |
10029 | haveit=yes | |
10030 | break | |
10031 | fi | |
10032 | done | |
10033 | if test -z "$haveit"; then | |
10034 | if test -d "$additional_libdir"; then | |
10035 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10036 | fi | |
10037 | fi | |
10038 | fi | |
10039 | fi | |
10040 | ;; | |
10041 | -R*) | |
10042 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10043 | if test "$enable_rpath" != no; then | |
10044 | haveit= | |
10045 | for x in $rpathdirs; do | |
10046 | if test "X$x" = "X$dir"; then | |
10047 | haveit=yes | |
10048 | break | |
10049 | fi | |
10050 | done | |
10051 | if test -z "$haveit"; then | |
10052 | rpathdirs="$rpathdirs $dir" | |
10053 | fi | |
10054 | haveit= | |
10055 | for x in $ltrpathdirs; do | |
10056 | if test "X$x" = "X$dir"; then | |
10057 | haveit=yes | |
10058 | break | |
10059 | fi | |
10060 | done | |
10061 | if test -z "$haveit"; then | |
10062 | ltrpathdirs="$ltrpathdirs $dir" | |
10063 | fi | |
10064 | fi | |
10065 | ;; | |
10066 | -l*) | |
10067 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10068 | ;; | |
10069 | *.la) | |
10070 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10071 | ;; | |
10072 | *) | |
10073 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10074 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10075 | ;; | |
10076 | esac | |
10077 | done | |
10078 | fi | |
10079 | else | |
10080 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10081 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10082 | fi | |
10083 | fi | |
10084 | fi | |
10085 | done | |
10086 | done | |
10087 | if test "X$rpathdirs" != "X"; then | |
10088 | if test -n "$hardcode_libdir_separator"; then | |
10089 | alldirs= | |
10090 | for found_dir in $rpathdirs; do | |
10091 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10092 | done | |
10093 | acl_save_libdir="$libdir" | |
10094 | libdir="$alldirs" | |
10095 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10096 | libdir="$acl_save_libdir" | |
10097 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10098 | else | |
10099 | for found_dir in $rpathdirs; do | |
10100 | acl_save_libdir="$libdir" | |
10101 | libdir="$found_dir" | |
10102 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10103 | libdir="$acl_save_libdir" | |
10104 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10105 | done | |
10106 | fi | |
10107 | fi | |
10108 | if test "X$ltrpathdirs" != "X"; then | |
10109 | for found_dir in $ltrpathdirs; do | |
10110 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10111 | done | |
10112 | fi | |
10113 | ||
10114 | ||
10115 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10116 | ||
10117 | for element in $INCMPFR; do | |
10118 | haveit= | |
10119 | for x in $CPPFLAGS; do | |
10120 | ||
10121 | acl_save_prefix="$prefix" | |
10122 | prefix="$acl_final_prefix" | |
10123 | acl_save_exec_prefix="$exec_prefix" | |
10124 | exec_prefix="$acl_final_exec_prefix" | |
10125 | eval x=\"$x\" | |
10126 | exec_prefix="$acl_save_exec_prefix" | |
10127 | prefix="$acl_save_prefix" | |
10128 | ||
10129 | if test "X$x" = "X$element"; then | |
10130 | haveit=yes | |
10131 | break | |
10132 | fi | |
10133 | done | |
10134 | if test -z "$haveit"; then | |
10135 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10136 | fi | |
10137 | done | |
10138 | ||
10139 | ||
10140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10141 | $as_echo_n "checking for libmpfr... " >&6; } | |
10142 | if test "${ac_cv_libmpfr+set}" = set; then : | |
10143 | $as_echo_n "(cached) " >&6 | |
10144 | else | |
10145 | ||
10146 | ac_save_LIBS="$LIBS" | |
10147 | LIBS="$LIBS $LIBMPFR" | |
10148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10149 | /* end confdefs.h. */ | |
10150 | #include <mpfr.h> | |
10151 | int | |
10152 | main () | |
10153 | { | |
10154 | mpfr_exp_t exp; mpfr_t x; | |
10155 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10156 | ; | |
10157 | return 0; | |
10158 | } | |
10159 | _ACEOF | |
10160 | if ac_fn_c_try_link "$LINENO"; then : | |
10161 | ac_cv_libmpfr=yes | |
10162 | else | |
10163 | ac_cv_libmpfr=no | |
10164 | fi | |
10165 | rm -f core conftest.err conftest.$ac_objext \ | |
10166 | conftest$ac_exeext conftest.$ac_ext | |
10167 | LIBS="$ac_save_LIBS" | |
10168 | ||
10169 | fi | |
10170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10171 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10172 | if test "$ac_cv_libmpfr" = yes; then | |
10173 | HAVE_LIBMPFR=yes | |
10174 | ||
10175 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
10176 | ||
10177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
10178 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
10179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
10180 | $as_echo "$LIBMPFR" >&6; } | |
10181 | else | |
10182 | HAVE_LIBMPFR=no | |
10183 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10184 | LIBMPFR= | |
10185 | LTLIBMPFR= | |
10186 | fi | |
10187 | ||
10188 | ||
10189 | ||
10190 | ||
10191 | ||
10192 | ||
10193 | if test "$HAVE_LIBMPFR" != yes; then | |
10194 | if test "$with_mpfr" = yes; then | |
10195 | as_fn_error "MPFR is missing or unusable" "$LINENO" 5 | |
10196 | else | |
10197 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
10198 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
10199 | fi | |
10200 | fi | |
10201 | fi | |
10202 | ||
d344e670 DE |
10203 | # --------------------- # |
10204 | # Check for libpython. # | |
10205 | # --------------------- # | |
10206 | ||
a9322a30 | 10207 | |
a9322a30 TT |
10208 | |
10209 | ||
ec685c5e | 10210 | |
0c4a4063 | 10211 | |
81ecdfbb RW |
10212 | # Check whether --with-python was given. |
10213 | if test "${with_python+set}" = set; then : | |
10214 | withval=$with_python; | |
bec39cab | 10215 | else |
81ecdfbb | 10216 | with_python=auto |
bec39cab | 10217 | fi |
bec39cab | 10218 | |
81ecdfbb RW |
10219 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10220 | $as_echo_n "checking whether to use python... " >&6; } | |
10221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10222 | $as_echo "$with_python" >&6; } | |
9a156167 | 10223 | |
81ecdfbb RW |
10224 | if test "${with_python}" = no; then |
10225 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10226 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10227 | have_libpython=no | |
bec39cab | 10228 | else |
81ecdfbb | 10229 | case "${with_python}" in |
8c85a4e2 | 10230 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
10231 | if test -d ${with_python}; then |
10232 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 10233 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10234 | python_prefix= |
9c4ea6c5 JB |
10235 | # If python does not exit ${with_python}/bin, then try in |
10236 | # ${with_python}. On Windows/MinGW, this is where the Python | |
10237 | # executable is. | |
10238 | if test ! -x "${python_prog}"; then | |
10239 | python_prog="${with_python}/python" | |
10240 | python_prefix= | |
10241 | fi | |
e7a30f46 | 10242 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
10243 | # Fall back to gdb 7.0/7.1 behaviour. |
10244 | python_prog=missing | |
0c4a4063 | 10245 | python_prefix=${with_python} |
ec685c5e | 10246 | fi |
e7a30f46 | 10247 | elif test -x "${with_python}"; then |
ec685c5e DE |
10248 | # While we can't run python compiled for $host (unless host == build), |
10249 | # the user could write a script that provides the needed information, | |
10250 | # so we support that. | |
ec685c5e | 10251 | python_prog=${with_python} |
0c4a4063 | 10252 | python_prefix= |
ec685c5e DE |
10253 | else |
10254 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
10255 | fi | |
81ecdfbb | 10256 | ;; |
ec685c5e DE |
10257 | */*) |
10258 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
10259 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
10260 | ;; | |
ec685c5e DE |
10261 | *) |
10262 | # The user has either specified auto, yes, or the name of the python | |
10263 | # program assumed to be in $PATH. | |
10264 | python_prefix= | |
10265 | case "${with_python}" in | |
10266 | yes | auto) | |
10267 | if test ${build} = ${host}; then | |
10268 | # Extract the first word of "python", so it can be a program name with args. | |
10269 | set dummy python; ac_word=$2 | |
10270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10271 | $as_echo_n "checking for $ac_word... " >&6; } | |
10272 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10273 | $as_echo_n "(cached) " >&6 | |
10274 | else | |
10275 | case $python_prog_path in | |
10276 | [\\/]* | ?:[\\/]*) | |
10277 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10278 | ;; | |
10279 | *) | |
10280 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10281 | for as_dir in $PATH | |
10282 | do | |
10283 | IFS=$as_save_IFS | |
10284 | test -z "$as_dir" && as_dir=. | |
10285 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10286 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10287 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10288 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10289 | break 2 | |
10290 | fi | |
10291 | done | |
10292 | done | |
10293 | IFS=$as_save_IFS | |
10294 | ||
10295 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10296 | ;; | |
10297 | esac | |
10298 | fi | |
10299 | python_prog_path=$ac_cv_path_python_prog_path | |
10300 | if test -n "$python_prog_path"; then | |
10301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10302 | $as_echo "$python_prog_path" >&6; } | |
10303 | else | |
10304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10305 | $as_echo "no" >&6; } | |
10306 | fi | |
10307 | ||
10308 | ||
10309 | if test "${python_prog_path}" = missing; then | |
10310 | python_prog=missing | |
10311 | else | |
10312 | python_prog=${python_prog_path} | |
10313 | fi | |
10314 | else | |
10315 | # Not much we can do except assume the cross-compiler will find the | |
10316 | # right files. | |
10317 | python_prog=missing | |
10318 | fi | |
10319 | ;; | |
10320 | *) | |
10321 | # While we can't run python compiled for $host (unless host == build), | |
10322 | # the user could write a script that provides the needed information, | |
10323 | # so we support that. | |
10324 | python_prog="${with_python}" | |
10325 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10326 | set dummy ${python_prog}; ac_word=$2 | |
10327 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10328 | $as_echo_n "checking for $ac_word... " >&6; } | |
10329 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10330 | $as_echo_n "(cached) " >&6 | |
10331 | else | |
10332 | case $python_prog_path in | |
10333 | [\\/]* | ?:[\\/]*) | |
10334 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10335 | ;; | |
10336 | *) | |
10337 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10338 | for as_dir in $PATH | |
10339 | do | |
10340 | IFS=$as_save_IFS | |
10341 | test -z "$as_dir" && as_dir=. | |
10342 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10343 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10344 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10345 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10346 | break 2 | |
10347 | fi | |
10348 | done | |
10349 | done | |
10350 | IFS=$as_save_IFS | |
10351 | ||
10352 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10353 | ;; | |
10354 | esac | |
10355 | fi | |
10356 | python_prog_path=$ac_cv_path_python_prog_path | |
10357 | if test -n "$python_prog_path"; then | |
10358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10359 | $as_echo "$python_prog_path" >&6; } | |
10360 | else | |
10361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10362 | $as_echo "no" >&6; } | |
10363 | fi | |
10364 | ||
10365 | ||
10366 | if test "${python_prog_path}" = missing; then | |
10367 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
10368 | fi | |
10369 | ;; | |
10370 | esac | |
81ecdfbb RW |
10371 | esac |
10372 | ||
ec685c5e | 10373 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
10374 | # We have a python program to use, but it may be too old. |
10375 | # Don't flag an error for --with-python=auto (the default). | |
10376 | have_python_config=yes | |
ec685c5e DE |
10377 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
10378 | if test $? != 0; then | |
e7a30f46 DE |
10379 | have_python_config=failed |
10380 | if test "${with_python}" != auto; then | |
10381 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
10382 | fi | |
ec685c5e DE |
10383 | fi |
10384 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10385 | if test $? != 0; then | |
e7a30f46 DE |
10386 | have_python_config=failed |
10387 | if test "${with_python}" != auto; then | |
10388 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
10389 | fi | |
ec685c5e | 10390 | fi |
0c4a4063 DE |
10391 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10392 | if test $? != 0; then | |
e7a30f46 DE |
10393 | have_python_config=failed |
10394 | if test "${with_python}" != auto; then | |
10395 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
10396 | fi | |
0c4a4063 | 10397 | fi |
ec685c5e | 10398 | else |
ac534cba JB |
10399 | # We do not have a python executable we can use to determine where |
10400 | # to find the Python headers and libs. We cannot guess the include | |
10401 | # path from the python_prefix either, because that include path | |
10402 | # depends on the Python version. So, there is nothing much we can | |
10403 | # do except assume that the compiler will be able to find those files. | |
10404 | python_includes= | |
10405 | python_libs= | |
0c4a4063 | 10406 | have_python_config=no |
ec685c5e | 10407 | fi |
bec39cab | 10408 | |
ec685c5e DE |
10409 | # If we have python-config, only try the configuration it provides. |
10410 | # Otherwise fallback on the old way of trying different versions of | |
10411 | # python in turn. | |
81ecdfbb | 10412 | |
ec685c5e DE |
10413 | have_libpython=no |
10414 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
10415 | # Determine the Python version by extracting "-lpython<version>" |
10416 | # part of the python_libs. <version> is usually X.Y with X and Y | |
10417 | # being decimal numbers, but can also be XY (seen on Windows). | |
10418 | # | |
10419 | # The extraction is performed using sed with a regular expression. | |
10420 | # Initially, the regexp used was using the '?' quantifier to make | |
10421 | # the dot in the version number optional. Unfortunately, this | |
10422 | # does not work with non-GNU versions of sed because, because of | |
10423 | # what looks like a limitation (the '?' quantifier does not work | |
10424 | # with back-references). We work around this limitation by using | |
10425 | # the '*' quantifier instead. It means that, in theory, we might | |
10426 | # match unexpected version strings such as "-lpython2..7", but | |
10427 | # this seems unlikely in practice. And even if that happens, | |
10428 | # an error will be triggered later on, when checking that version | |
10429 | # number. | |
ec685c5e | 10430 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 10431 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
10432 | case "${python_version}" in |
10433 | python*) | |
ec685c5e DE |
10434 | |
10435 | version=${python_version} | |
10436 | ||
10437 | new_CPPFLAGS=${python_includes} | |
10438 | new_LIBS=${python_libs} | |
81ecdfbb RW |
10439 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10440 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10441 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10442 | save_LIBS=$LIBS |
ec685c5e DE |
10443 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10444 | LIBS="$LIBS $new_LIBS" | |
10445 | found_usable_python=no | |
81ecdfbb | 10446 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10447 | /* end confdefs.h. */ |
ac534cba | 10448 | #include "Python.h" |
81ecdfbb RW |
10449 | int |
10450 | main () | |
10451 | { | |
10452 | Py_Initialize (); | |
10453 | ; | |
10454 | return 0; | |
10455 | } | |
bec39cab | 10456 | _ACEOF |
81ecdfbb | 10457 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10458 | have_libpython=${version} |
10459 | found_usable_python=yes | |
ac534cba JB |
10460 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10461 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 10462 | fi |
81ecdfbb RW |
10463 | rm -f core conftest.err conftest.$ac_objext \ |
10464 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10465 | CPPFLAGS=$save_CPPFLAGS |
10466 | LIBS=$save_LIBS | |
ec685c5e DE |
10467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10468 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10469 | |
0c4a4063 DE |
10470 | ;; |
10471 | *) | |
ec685c5e | 10472 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
10473 | ;; |
10474 | esac | |
e7a30f46 | 10475 | elif test "${have_python_config}" != failed; then |
ec685c5e | 10476 | if test "${have_libpython}" = no; then |
9a156167 | 10477 | |
420697bb TT |
10478 | version=python2.7 |
10479 | ||
10480 | new_CPPFLAGS=${python_includes} | |
10481 | new_LIBS="${python_libs} -lpython2.7" | |
10482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10483 | $as_echo_n "checking for ${version}... " >&6; } | |
10484 | save_CPPFLAGS=$CPPFLAGS | |
10485 | save_LIBS=$LIBS | |
10486 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10487 | LIBS="$LIBS $new_LIBS" | |
10488 | found_usable_python=no | |
10489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10490 | /* end confdefs.h. */ | |
ac534cba | 10491 | #include "Python.h" |
420697bb TT |
10492 | int |
10493 | main () | |
10494 | { | |
10495 | Py_Initialize (); | |
10496 | ; | |
10497 | return 0; | |
10498 | } | |
10499 | _ACEOF | |
10500 | if ac_fn_c_try_link "$LINENO"; then : | |
10501 | have_libpython=${version} | |
10502 | found_usable_python=yes | |
ac534cba JB |
10503 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10504 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
10505 | fi |
10506 | rm -f core conftest.err conftest.$ac_objext \ | |
10507 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10508 | CPPFLAGS=$save_CPPFLAGS |
10509 | LIBS=$save_LIBS | |
420697bb TT |
10510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10511 | $as_echo "${found_usable_python}" >&6; } | |
10512 | ||
10513 | fi | |
10514 | if test "${have_libpython}" = no; then | |
10515 | ||
ec685c5e DE |
10516 | version=python2.6 |
10517 | ||
10518 | new_CPPFLAGS=${python_includes} | |
10519 | new_LIBS="${python_libs} -lpython2.6" | |
10520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10521 | $as_echo_n "checking for ${version}... " >&6; } | |
10522 | save_CPPFLAGS=$CPPFLAGS | |
10523 | save_LIBS=$LIBS | |
10524 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10525 | LIBS="$LIBS $new_LIBS" | |
10526 | found_usable_python=no | |
10527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10528 | /* end confdefs.h. */ | |
ac534cba | 10529 | #include "Python.h" |
ec685c5e DE |
10530 | int |
10531 | main () | |
10532 | { | |
10533 | Py_Initialize (); | |
10534 | ; | |
10535 | return 0; | |
10536 | } | |
10537 | _ACEOF | |
10538 | if ac_fn_c_try_link "$LINENO"; then : | |
10539 | have_libpython=${version} | |
10540 | found_usable_python=yes | |
ac534cba JB |
10541 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10542 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
10543 | fi |
10544 | rm -f core conftest.err conftest.$ac_objext \ | |
10545 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10546 | CPPFLAGS=$save_CPPFLAGS |
10547 | LIBS=$save_LIBS | |
ec685c5e DE |
10548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10549 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10550 | |
81ecdfbb | 10551 | fi |
ec685c5e | 10552 | if test ${have_libpython} = no; then |
9a156167 | 10553 | |
81ecdfbb | 10554 | version=python2.5 |
9a156167 | 10555 | |
ec685c5e DE |
10556 | new_CPPFLAGS=${python_includes} |
10557 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
10558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10559 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10560 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10561 | save_LIBS=$LIBS |
ec685c5e DE |
10562 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10563 | LIBS="$LIBS $new_LIBS" | |
10564 | found_usable_python=no | |
81ecdfbb | 10565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10566 | /* end confdefs.h. */ |
ac534cba | 10567 | #include "Python.h" |
81ecdfbb RW |
10568 | int |
10569 | main () | |
10570 | { | |
10571 | Py_Initialize (); | |
10572 | ; | |
10573 | return 0; | |
10574 | } | |
436868fb | 10575 | _ACEOF |
81ecdfbb | 10576 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10577 | have_libpython=${version} |
10578 | found_usable_python=yes | |
ac534cba JB |
10579 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10580 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10581 | fi |
81ecdfbb RW |
10582 | rm -f core conftest.err conftest.$ac_objext \ |
10583 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10584 | CPPFLAGS=$save_CPPFLAGS |
10585 | LIBS=$save_LIBS | |
ec685c5e DE |
10586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10587 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 10588 | |
81ecdfbb | 10589 | fi |
ec685c5e | 10590 | if test ${have_libpython} = no; then |
a9322a30 | 10591 | |
81ecdfbb | 10592 | version=python2.4 |
a9322a30 | 10593 | |
ec685c5e DE |
10594 | new_CPPFLAGS=${python_includes} |
10595 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
10596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10597 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10598 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10599 | save_LIBS=$LIBS |
ec685c5e DE |
10600 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10601 | LIBS="$LIBS $new_LIBS" | |
10602 | found_usable_python=no | |
81ecdfbb | 10603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10604 | /* end confdefs.h. */ |
ac534cba | 10605 | #include "Python.h" |
a9322a30 TT |
10606 | int |
10607 | main () | |
10608 | { | |
81ecdfbb | 10609 | Py_Initialize (); |
a9322a30 TT |
10610 | ; |
10611 | return 0; | |
10612 | } | |
436868fb | 10613 | _ACEOF |
81ecdfbb | 10614 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10615 | have_libpython=${version} |
10616 | found_usable_python=yes | |
ac534cba JB |
10617 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10618 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10619 | fi |
81ecdfbb RW |
10620 | rm -f core conftest.err conftest.$ac_objext \ |
10621 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10622 | CPPFLAGS=$save_CPPFLAGS |
10623 | LIBS=$save_LIBS | |
ec685c5e DE |
10624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10625 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10626 | |
ec685c5e DE |
10627 | fi |
10628 | fi | |
9c4ea6c5 | 10629 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
10630 | |
10631 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
10632 | ||
9c4ea6c5 | 10633 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
10634 | |
10635 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
10636 | ||
9c4ea6c5 | 10637 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
10638 | |
10639 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
10640 | ||
9c4ea6c5 | 10641 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
10642 | |
10643 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
10644 | ||
81ecdfbb | 10645 | fi |
ec685c5e DE |
10646 | |
10647 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10648 | case "${with_python}" in |
10649 | yes) | |
10650 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
10651 | ;; | |
10652 | auto) | |
10653 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10654 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10655 | ;; | |
10656 | *) | |
10657 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
10658 | ;; | |
10659 | esac | |
0c4a4063 DE |
10660 | else |
10661 | if test -n "${python_prefix}"; then | |
10662 | ||
10663 | cat >>confdefs.h <<_ACEOF | |
10664 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10665 | _ACEOF | |
10666 | ||
10667 | ||
10668 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10669 | if test "x$prefix" = xNONE; then | |
10670 | test_prefix=/usr/local | |
10671 | else | |
10672 | test_prefix=$prefix | |
10673 | fi | |
10674 | else | |
10675 | test_prefix=$exec_prefix | |
10676 | fi | |
10677 | value=0 | |
10678 | case ${python_prefix} in | |
10679 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10680 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10681 | value=1 | |
10682 | ;; | |
10683 | esac | |
10684 | ||
10685 | cat >>confdefs.h <<_ACEOF | |
10686 | #define PYTHON_PATH_RELOCATABLE $value | |
10687 | _ACEOF | |
10688 | ||
10689 | ||
10690 | fi | |
81ecdfbb | 10691 | fi |
436868fb | 10692 | fi |
436868fb | 10693 | |
ec685c5e | 10694 | if test "${have_libpython}" != no; then |
436868fb | 10695 | |
81ecdfbb | 10696 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10697 | |
81ecdfbb RW |
10698 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10699 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10700 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 10701 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 10702 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 10703 | |
81ecdfbb RW |
10704 | # Flags needed to compile Python code (taken from python-config --cflags). |
10705 | # We cannot call python-config directly because it will output whatever was | |
10706 | # used when compiling the Python interpreter itself, including flags which | |
10707 | # would make the python-related objects be compiled differently from the | |
10708 | # rest of GDB (e.g., -O2 and -fPIC). | |
10709 | if test "${GCC}" = yes; then | |
10710 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
10711 | fi | |
436868fb | 10712 | |
81ecdfbb RW |
10713 | if test "x${tentative_python_cflags}" != x; then |
10714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10715 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10716 | for flag in ${tentative_python_cflags}; do | |
10717 | # Check that the compiler accepts it | |
10718 | saved_CFLAGS="$CFLAGS" | |
10719 | CFLAGS="$CFLAGS $flag" | |
10720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10721 | /* end confdefs.h. */ |
81ecdfbb | 10722 | |
a9322a30 TT |
10723 | int |
10724 | main () | |
10725 | { | |
a9322a30 TT |
10726 | |
10727 | ; | |
10728 | return 0; | |
10729 | } | |
bec39cab | 10730 | _ACEOF |
81ecdfbb RW |
10731 | if ac_fn_c_try_compile "$LINENO"; then : |
10732 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10733 | fi |
81ecdfbb RW |
10734 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10735 | CFLAGS="$saved_CFLAGS" | |
10736 | done | |
10737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10738 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10739 | fi | |
043b6510 | 10740 | |
c83393b9 JB |
10741 | # On x64 Windows, Python's include headers, and pyconfig.h in |
10742 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
10743 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
10744 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
10745 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
10746 | # The issue was reported to the Python community, but still isn't | |
10747 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
10748 | ||
043b6510 | 10749 | case "$gdb_host" in |
c83393b9 JB |
10750 | mingw64) |
10751 | if test "${GCC}" = yes; then | |
10752 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
10753 | fi | |
10754 | ;; | |
043b6510 | 10755 | esac |
a8db4212 YPK |
10756 | |
10757 | # Note that "python -m threading" cannot be used to check for | |
10758 | # threading support due to a bug in Python 2.7.3 | |
10759 | # (http://bugs.python.org/issue15567). | |
10760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
10761 | $as_echo_n "checking whether python supports threads... " >&6; } | |
10762 | saved_CPPFLAGS="${CPPFLAGS}" | |
10763 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
10764 | # Note that the test is reversed so that python_has_threads=yes on | |
10765 | # unexpected failures. | |
10766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10767 | /* end confdefs.h. */ | |
10768 | ||
10769 | #include <Python.h> | |
10770 | #ifdef WITH_THREAD | |
10771 | # error | |
10772 | #endif | |
10773 | ||
10774 | _ACEOF | |
10775 | if ac_fn_c_try_cpp "$LINENO"; then : | |
10776 | python_has_threads=no | |
10777 | else | |
10778 | python_has_threads=yes | |
10779 | fi | |
10780 | rm -f conftest.err conftest.$ac_ext | |
10781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
10782 | $as_echo "${python_has_threads}" >&6; } | |
10783 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 10784 | else |
6dddc817 DE |
10785 | # Even if Python support is not compiled in, we need to have this file |
10786 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 10787 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 10788 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 10789 | fi |
9a156167 | 10790 | |
a4a1c157 PA |
10791 | # Work around Python http://bugs.python.org/issue10112. See also |
10792 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
10793 | # no effect. Note that the only test after this that uses Python is | |
10794 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
10795 | # run without -export-dynamic too. | |
10796 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
10797 | ||
10798 | ||
ed3ef339 DE |
10799 | |
10800 | ||
4df42755 DE |
10801 | if test "${have_libpython}" != no; then |
10802 | HAVE_PYTHON_TRUE= | |
10803 | HAVE_PYTHON_FALSE='#' | |
10804 | else | |
10805 | HAVE_PYTHON_TRUE='#' | |
10806 | HAVE_PYTHON_FALSE= | |
10807 | fi | |
10808 | ||
ed3ef339 DE |
10809 | |
10810 | # -------------------- # | |
10811 | # Check for libguile. # | |
10812 | # -------------------- # | |
10813 | ||
10814 | ||
e1402065 DE |
10815 | |
10816 | ||
10817 | ||
10818 | ||
10819 | # Check whether --with-guile was given. | |
10820 | if test "${with_guile+set}" = set; then : | |
10821 | withval=$with_guile; | |
10822 | else | |
10823 | with_guile=auto | |
10824 | fi | |
10825 | ||
10826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
10827 | $as_echo_n "checking whether to use guile... " >&6; } | |
10828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
10829 | $as_echo "$with_guile" >&6; } | |
10830 | ||
ed3ef339 DE |
10831 | # Extract the first word of "pkg-config", so it can be a program name with args. |
10832 | set dummy pkg-config; ac_word=$2 | |
10833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10834 | $as_echo_n "checking for $ac_word... " >&6; } | |
10835 | if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : | |
10836 | $as_echo_n "(cached) " >&6 | |
10837 | else | |
10838 | case $pkg_config_prog_path in | |
10839 | [\\/]* | ?:[\\/]*) | |
10840 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
10841 | ;; | |
10842 | *) | |
10843 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10844 | for as_dir in $PATH | |
10845 | do | |
10846 | IFS=$as_save_IFS | |
10847 | test -z "$as_dir" && as_dir=. | |
10848 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10849 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10850 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10851 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10852 | break 2 | |
10853 | fi | |
10854 | done | |
10855 | done | |
10856 | IFS=$as_save_IFS | |
10857 | ||
10858 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
10859 | ;; | |
10860 | esac | |
10861 | fi | |
10862 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
10863 | if test -n "$pkg_config_prog_path"; then | |
10864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
10865 | $as_echo "$pkg_config_prog_path" >&6; } | |
10866 | else | |
10867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10868 | $as_echo "no" >&6; } | |
10869 | fi | |
10870 | ||
10871 | ||
10872 | ||
6e66f753 | 10873 | try_guile_versions="guile-2.0" |
ed3ef339 DE |
10874 | have_libguile=no |
10875 | case "${with_guile}" in | |
10876 | no) | |
10877 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
10878 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
10879 | ;; | |
10880 | auto) | |
e1402065 DE |
10881 | if test "${pkg_config_prog_path}" = "missing"; then |
10882 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
10883 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
10884 | else | |
ed3ef339 DE |
10885 | |
10886 | pkg_config=${pkg_config_prog_path} | |
10887 | guile_version_list=${try_guile_versions} | |
10888 | flag_errors=no | |
10889 | ||
ed3ef339 DE |
10890 | found_usable_guile=checking |
10891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10892 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10893 | for guile_version in ${guile_version_list}; do | |
10894 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10895 | if test $? != 0; then | |
10896 | continue | |
10897 | fi | |
10898 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10899 | if test $? != 0; then | |
10900 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10901 | fi | |
10902 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10903 | if test $? != 0; then | |
10904 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10905 | fi | |
10906 | found_usable_guile=${guile_version} | |
10907 | break | |
10908 | done | |
10909 | if test "${found_usable_guile}" = "checking"; then | |
10910 | if test "${flag_errors}" = "yes"; then | |
10911 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10912 | else | |
10913 | found_usable_guile=no | |
10914 | fi | |
10915 | fi | |
10916 | if test "${found_usable_guile}" != no; then | |
10917 | save_CPPFLAGS=$CPPFLAGS | |
10918 | save_LIBS=$LIBS | |
10919 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10920 | LIBS="$LIBS $new_LIBS" | |
10921 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10922 | /* end confdefs.h. */ | |
10923 | #include "libguile.h" | |
10924 | int | |
10925 | main () | |
10926 | { | |
10927 | scm_init_guile (); | |
10928 | ; | |
10929 | return 0; | |
10930 | } | |
10931 | _ACEOF | |
10932 | if ac_fn_c_try_link "$LINENO"; then : | |
10933 | have_libguile=yes | |
10934 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10935 | GUILE_LIBS=$new_LIBS | |
10936 | else | |
10937 | found_usable_guile=no | |
10938 | fi | |
10939 | rm -f core conftest.err conftest.$ac_objext \ | |
10940 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
10941 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
10942 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
10943 | ||
10944 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10945 | ||
10946 | ||
10947 | fi | |
10948 | ||
ed3ef339 DE |
10949 | CPPFLAGS=$save_CPPFLAGS |
10950 | LIBS=$save_LIBS | |
10951 | if test "${found_usable_guile}" = no; then | |
10952 | if test "${flag_errors}" = yes; then | |
10953 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10954 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10955 | as_fn_error "linking guile version ${guile_version} test program failed | |
10956 | See \`config.log' for more details." "$LINENO" 5; } | |
10957 | fi | |
10958 | fi | |
10959 | fi | |
10960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10961 | $as_echo "${found_usable_guile}" >&6; } | |
10962 | ||
e1402065 | 10963 | fi |
ed3ef339 DE |
10964 | ;; |
10965 | yes) | |
e1402065 DE |
10966 | if test "${pkg_config_prog_path}" = "missing"; then |
10967 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
10968 | fi | |
ed3ef339 DE |
10969 | |
10970 | pkg_config=${pkg_config_prog_path} | |
10971 | guile_version_list=${try_guile_versions} | |
10972 | flag_errors=yes | |
10973 | ||
ed3ef339 DE |
10974 | found_usable_guile=checking |
10975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10976 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10977 | for guile_version in ${guile_version_list}; do | |
10978 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10979 | if test $? != 0; then | |
10980 | continue | |
10981 | fi | |
10982 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10983 | if test $? != 0; then | |
10984 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10985 | fi | |
10986 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10987 | if test $? != 0; then | |
10988 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10989 | fi | |
10990 | found_usable_guile=${guile_version} | |
10991 | break | |
10992 | done | |
10993 | if test "${found_usable_guile}" = "checking"; then | |
10994 | if test "${flag_errors}" = "yes"; then | |
10995 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10996 | else | |
10997 | found_usable_guile=no | |
10998 | fi | |
10999 | fi | |
11000 | if test "${found_usable_guile}" != no; then | |
11001 | save_CPPFLAGS=$CPPFLAGS | |
11002 | save_LIBS=$LIBS | |
11003 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11004 | LIBS="$LIBS $new_LIBS" | |
11005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11006 | /* end confdefs.h. */ | |
11007 | #include "libguile.h" | |
11008 | int | |
11009 | main () | |
11010 | { | |
11011 | scm_init_guile (); | |
11012 | ; | |
11013 | return 0; | |
11014 | } | |
11015 | _ACEOF | |
11016 | if ac_fn_c_try_link "$LINENO"; then : | |
11017 | have_libguile=yes | |
11018 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11019 | GUILE_LIBS=$new_LIBS | |
11020 | else | |
11021 | found_usable_guile=no | |
11022 | fi | |
11023 | rm -f core conftest.err conftest.$ac_objext \ | |
11024 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
11025 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
11026 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
11027 | ||
11028 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11029 | ||
11030 | ||
11031 | fi | |
11032 | ||
ed3ef339 DE |
11033 | CPPFLAGS=$save_CPPFLAGS |
11034 | LIBS=$save_LIBS | |
11035 | if test "${found_usable_guile}" = no; then | |
11036 | if test "${flag_errors}" = yes; then | |
11037 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11038 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11039 | as_fn_error "linking guile version ${guile_version} test program failed | |
11040 | See \`config.log' for more details." "$LINENO" 5; } | |
11041 | fi | |
11042 | fi | |
11043 | fi | |
11044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11045 | $as_echo "${found_usable_guile}" >&6; } | |
11046 | ||
11047 | ;; | |
11048 | [\\/]* | ?:[\\/]*) | |
e1402065 | 11049 | if test -x "${with_guile}"; then |
ed3ef339 DE |
11050 | |
11051 | pkg_config=${with_guile} | |
11052 | guile_version_list=${try_guile_versions} | |
11053 | flag_errors=yes | |
11054 | ||
ed3ef339 DE |
11055 | found_usable_guile=checking |
11056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11057 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11058 | for guile_version in ${guile_version_list}; do | |
11059 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11060 | if test $? != 0; then | |
11061 | continue | |
11062 | fi | |
11063 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11064 | if test $? != 0; then | |
11065 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
11066 | fi | |
11067 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11068 | if test $? != 0; then | |
11069 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
11070 | fi | |
11071 | found_usable_guile=${guile_version} | |
11072 | break | |
11073 | done | |
11074 | if test "${found_usable_guile}" = "checking"; then | |
11075 | if test "${flag_errors}" = "yes"; then | |
11076 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
11077 | else | |
11078 | found_usable_guile=no | |
11079 | fi | |
11080 | fi | |
11081 | if test "${found_usable_guile}" != no; then | |
11082 | save_CPPFLAGS=$CPPFLAGS | |
11083 | save_LIBS=$LIBS | |
11084 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11085 | LIBS="$LIBS $new_LIBS" | |
11086 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11087 | /* end confdefs.h. */ | |
11088 | #include "libguile.h" | |
11089 | int | |
11090 | main () | |
11091 | { | |
11092 | scm_init_guile (); | |
11093 | ; | |
11094 | return 0; | |
11095 | } | |
11096 | _ACEOF | |
11097 | if ac_fn_c_try_link "$LINENO"; then : | |
11098 | have_libguile=yes | |
11099 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11100 | GUILE_LIBS=$new_LIBS | |
11101 | else | |
11102 | found_usable_guile=no | |
11103 | fi | |
11104 | rm -f core conftest.err conftest.$ac_objext \ | |
11105 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
11106 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
11107 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
11108 | ||
11109 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11110 | ||
11111 | ||
11112 | fi | |
11113 | ||
ed3ef339 DE |
11114 | CPPFLAGS=$save_CPPFLAGS |
11115 | LIBS=$save_LIBS | |
11116 | if test "${found_usable_guile}" = no; then | |
11117 | if test "${flag_errors}" = yes; then | |
11118 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11119 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11120 | as_fn_error "linking guile version ${guile_version} test program failed | |
11121 | See \`config.log' for more details." "$LINENO" 5; } | |
11122 | fi | |
11123 | fi | |
11124 | fi | |
11125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11126 | $as_echo "${found_usable_guile}" >&6; } | |
11127 | ||
e1402065 DE |
11128 | else |
11129 | as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 | |
11130 | fi | |
ed3ef339 DE |
11131 | ;; |
11132 | "" | */*) | |
11133 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
11134 | as_fn_error "invalid value for --with-guile" "$LINENO" 5 | |
11135 | ;; | |
11136 | *) | |
11137 | # A space separate list of guile versions to try, in order. | |
e1402065 DE |
11138 | if test "${pkg_config_prog_path}" = "missing"; then |
11139 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
11140 | fi | |
ed3ef339 DE |
11141 | |
11142 | pkg_config=${pkg_config_prog_path} | |
11143 | guile_version_list=${with_guile} | |
11144 | flag_errors=yes | |
11145 | ||
ed3ef339 DE |
11146 | found_usable_guile=checking |
11147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11148 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11149 | for guile_version in ${guile_version_list}; do | |
11150 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11151 | if test $? != 0; then | |
11152 | continue | |
11153 | fi | |
11154 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11155 | if test $? != 0; then | |
11156 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
11157 | fi | |
11158 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11159 | if test $? != 0; then | |
11160 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
11161 | fi | |
11162 | found_usable_guile=${guile_version} | |
11163 | break | |
11164 | done | |
11165 | if test "${found_usable_guile}" = "checking"; then | |
11166 | if test "${flag_errors}" = "yes"; then | |
11167 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
11168 | else | |
11169 | found_usable_guile=no | |
11170 | fi | |
11171 | fi | |
11172 | if test "${found_usable_guile}" != no; then | |
11173 | save_CPPFLAGS=$CPPFLAGS | |
11174 | save_LIBS=$LIBS | |
11175 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11176 | LIBS="$LIBS $new_LIBS" | |
11177 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11178 | /* end confdefs.h. */ | |
11179 | #include "libguile.h" | |
11180 | int | |
11181 | main () | |
11182 | { | |
11183 | scm_init_guile (); | |
11184 | ; | |
11185 | return 0; | |
11186 | } | |
11187 | _ACEOF | |
11188 | if ac_fn_c_try_link "$LINENO"; then : | |
11189 | have_libguile=yes | |
11190 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11191 | GUILE_LIBS=$new_LIBS | |
11192 | else | |
11193 | found_usable_guile=no | |
11194 | fi | |
11195 | rm -f core conftest.err conftest.$ac_objext \ | |
11196 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
11197 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
11198 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
11199 | ||
11200 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11201 | ||
11202 | ||
11203 | fi | |
11204 | ||
ed3ef339 DE |
11205 | CPPFLAGS=$save_CPPFLAGS |
11206 | LIBS=$save_LIBS | |
11207 | if test "${found_usable_guile}" = no; then | |
11208 | if test "${flag_errors}" = yes; then | |
11209 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11210 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11211 | as_fn_error "linking guile version ${guile_version} test program failed | |
11212 | See \`config.log' for more details." "$LINENO" 5; } | |
11213 | fi | |
11214 | fi | |
11215 | fi | |
11216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11217 | $as_echo "${found_usable_guile}" >&6; } | |
11218 | ||
11219 | ;; | |
11220 | esac | |
11221 | ||
e76c5d17 | 11222 | if test "${have_libguile}" != no; then |
d342a0da DE |
11223 | case "${with_guile}" in |
11224 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11225 | |
11226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11227 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
11228 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
11229 | $as_echo_n "(cached) " >&6 | |
11230 | else | |
d342a0da | 11231 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11232 | |
11233 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11234 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11235 | # what the program name is, at the risk of getting it wrong if | |
11236 | # Guile was configured with '--program-suffix' or similar. | |
11237 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11238 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11239 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11240 | fi | |
11241 | ||
11242 | fi | |
11243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11244 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11245 | ||
11246 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
11247 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
11248 | fi | |
11249 | ||
11250 | GUILD="$ac_cv_guild_program_name" | |
11251 | ||
11252 | ||
d342a0da DE |
11253 | ;; |
11254 | *) | |
11255 | ||
11256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11257 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
11258 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
11259 | $as_echo_n "(cached) " >&6 | |
11260 | else | |
11261 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11262 | ||
11263 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11264 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11265 | # what the program name is, at the risk of getting it wrong if | |
11266 | # Guile was configured with '--program-suffix' or similar. | |
11267 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11268 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11269 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11270 | fi | |
11271 | ||
11272 | fi | |
11273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11274 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11275 | ||
11276 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
11277 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
11278 | fi | |
11279 | ||
11280 | GUILD="$ac_cv_guild_program_name" | |
11281 | ||
11282 | ||
11283 | ;; | |
11284 | esac | |
e76c5d17 DE |
11285 | |
11286 | ||
11287 | if test "$cross_compiling" = no; then | |
11288 | GUILD_TARGET_FLAG= | |
11289 | else | |
11290 | GUILD_TARGET_FLAG="--target=$host" | |
11291 | fi | |
11292 | ||
11293 | ||
11294 | ||
11295 | ||
11296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
11297 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
11298 | if test "${ac_cv_guild_ok+set}" = set; then : | |
11299 | $as_echo_n "(cached) " >&6 | |
11300 | else | |
11301 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
11302 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
11303 | ac_cv_guild_ok=yes | |
11304 | else | |
11305 | ac_cv_guild_ok=no | |
11306 | fi | |
11307 | fi | |
11308 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
11309 | $as_echo "$ac_cv_guild_ok" >&6; } | |
11310 | ||
11311 | if test "$ac_cv_guild_ok" = no; then | |
11312 | have_libguile=no | |
11313 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
11314 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
11315 | fi | |
11316 | fi | |
11317 | ||
ed3ef339 DE |
11318 | if test "${have_libguile}" != no; then |
11319 | ||
11320 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
11321 | ||
11322 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
11323 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
11324 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
11325 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
11326 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
11327 | |
11328 | save_LIBS="$LIBS" | |
11329 | save_CPPFLAGS="$CPPFLAGS" | |
11330 | LIBS="$GUILE_LIBS" | |
11331 | CPPFLAGS="$GUILE_CPPFLAGS" | |
11332 | for ac_func in scm_new_smob | |
11333 | do : | |
11334 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
11335 | if test "x$ac_cv_func_scm_new_smob" = x""yes; then : | |
11336 | cat >>confdefs.h <<_ACEOF | |
11337 | #define HAVE_SCM_NEW_SMOB 1 | |
11338 | _ACEOF | |
11339 | ||
11340 | fi | |
11341 | done | |
11342 | ||
11343 | LIBS="$save_LIBS" | |
11344 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
11345 | else |
11346 | # Even if Guile support is not compiled in, we need to have these files | |
11347 | # included. | |
bd810fff | 11348 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
11349 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
11350 | fi | |
9a156167 | 11351 | |
ac534cba | 11352 | |
4df42755 DE |
11353 | if test "${have_libguile}" != no; then |
11354 | HAVE_GUILE_TRUE= | |
11355 | HAVE_GUILE_FALSE='#' | |
11356 | else | |
11357 | HAVE_GUILE_TRUE='#' | |
11358 | HAVE_GUILE_FALSE= | |
11359 | fi | |
11360 | ||
ac534cba | 11361 | |
d344e670 DE |
11362 | # --------------------- # |
11363 | # Check for libmcheck. # | |
11364 | # --------------------- # | |
11365 | ||
a8db4212 YPK |
11366 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
11367 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
11368 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
11369 | # and for releases. | |
17ef446e PA |
11370 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
11371 | && $development; then | |
11372 | libmcheck_default=yes | |
11373 | else | |
11374 | libmcheck_default=no | |
a8db4212 YPK |
11375 | fi |
11376 | ||
17ef446e PA |
11377 | # Check whether --enable-libmcheck was given. |
11378 | if test "${enable_libmcheck+set}" = set; then : | |
11379 | enableval=$enable_libmcheck; case "${enableval}" in | |
11380 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
11381 | no | n) ENABLE_LIBMCHECK="no" ;; | |
11382 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
11383 | esac | |
11384 | fi | |
11385 | ||
11386 | ||
11387 | if test -z "${ENABLE_LIBMCHECK}"; then | |
11388 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 11389 | fi |
17ef446e PA |
11390 | |
11391 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
11392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
11393 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
11394 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
11395 | $as_echo_n "(cached) " >&6 | |
11396 | else | |
11397 | ac_check_lib_save_LIBS=$LIBS | |
11398 | LIBS="-lmcheck $LIBS" | |
11399 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11400 | /* end confdefs.h. */ | |
11401 | ||
11402 | ||
11403 | int | |
11404 | main () | |
11405 | { | |
11406 | return main (); | |
11407 | ; | |
11408 | return 0; | |
11409 | } | |
11410 | _ACEOF | |
11411 | if ac_fn_c_try_link "$LINENO"; then : | |
11412 | ac_cv_lib_mcheck_main=yes | |
11413 | else | |
11414 | ac_cv_lib_mcheck_main=no | |
11415 | fi | |
11416 | rm -f core conftest.err conftest.$ac_objext \ | |
11417 | conftest$ac_exeext conftest.$ac_ext | |
11418 | LIBS=$ac_check_lib_save_LIBS | |
11419 | fi | |
11420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
11421 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
11422 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
11423 | cat >>confdefs.h <<_ACEOF | |
11424 | #define HAVE_LIBMCHECK 1 | |
11425 | _ACEOF | |
11426 | ||
11427 | LIBS="-lmcheck $LIBS" | |
11428 | ||
11429 | fi | |
11430 | ||
17ef446e PA |
11431 | fi |
11432 | ||
11433 | ||
11434 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
11435 | -a "${have_libpython}" != "no" \ | |
11436 | -a "${python_has_threads}" = "yes" ; then | |
11437 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
11438 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
11439 | fi |
11440 | ||
58bfce93 MM |
11441 | |
11442 | # Check whether --with-intel_pt was given. | |
11443 | if test "${with_intel_pt+set}" = set; then : | |
11444 | withval=$with_intel_pt; | |
11445 | else | |
11446 | with_intel_pt=auto | |
11447 | fi | |
11448 | ||
11449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
11450 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
11451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
11452 | $as_echo "$with_intel_pt" >&6; } | |
11453 | ||
11454 | if test "${with_intel_pt}" = no; then | |
bc504a31 PA |
11455 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 |
11456 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
58bfce93 MM |
11457 | HAVE_LIBIPT=no |
11458 | else | |
5599c404 MM |
11459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11460 | /* end confdefs.h. */ | |
11461 | ||
11462 | #include <linux/perf_event.h> | |
11463 | #ifndef PERF_ATTR_SIZE_VER5 | |
11464 | # error | |
11465 | #endif | |
11466 | ||
11467 | _ACEOF | |
11468 | if ac_fn_c_try_cpp "$LINENO"; then : | |
11469 | perf_event=yes | |
11470 | else | |
11471 | perf_event=no | |
11472 | fi | |
11473 | rm -f conftest.err conftest.$ac_ext | |
11474 | if test "$perf_event" != yes; then | |
11475 | if test "$with_intel_pt" = yes; then | |
11476 | as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5 | |
11477 | else | |
11478 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
11479 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
11480 | fi | |
11481 | fi | |
11482 | ||
58bfce93 MM |
11483 | |
11484 | ||
11485 | ||
11486 | ||
11487 | ||
11488 | ||
11489 | ||
11490 | ||
11491 | use_additional=yes | |
11492 | ||
11493 | acl_save_prefix="$prefix" | |
11494 | prefix="$acl_final_prefix" | |
11495 | acl_save_exec_prefix="$exec_prefix" | |
11496 | exec_prefix="$acl_final_exec_prefix" | |
11497 | ||
11498 | eval additional_includedir=\"$includedir\" | |
11499 | eval additional_libdir=\"$libdir\" | |
11500 | ||
11501 | exec_prefix="$acl_save_exec_prefix" | |
11502 | prefix="$acl_save_prefix" | |
11503 | ||
11504 | ||
11505 | # Check whether --with-libipt-prefix was given. | |
11506 | if test "${with_libipt_prefix+set}" = set; then : | |
11507 | withval=$with_libipt_prefix; | |
11508 | if test "X$withval" = "Xno"; then | |
11509 | use_additional=no | |
11510 | else | |
11511 | if test "X$withval" = "X"; then | |
11512 | ||
11513 | acl_save_prefix="$prefix" | |
11514 | prefix="$acl_final_prefix" | |
11515 | acl_save_exec_prefix="$exec_prefix" | |
11516 | exec_prefix="$acl_final_exec_prefix" | |
11517 | ||
11518 | eval additional_includedir=\"$includedir\" | |
11519 | eval additional_libdir=\"$libdir\" | |
11520 | ||
11521 | exec_prefix="$acl_save_exec_prefix" | |
11522 | prefix="$acl_save_prefix" | |
11523 | ||
11524 | else | |
11525 | additional_includedir="$withval/include" | |
11526 | additional_libdir="$withval/lib" | |
11527 | fi | |
11528 | fi | |
11529 | ||
11530 | fi | |
11531 | ||
11532 | LIBIPT= | |
11533 | LTLIBIPT= | |
11534 | INCIPT= | |
11535 | rpathdirs= | |
11536 | ltrpathdirs= | |
11537 | names_already_handled= | |
11538 | names_next_round='ipt ' | |
11539 | while test -n "$names_next_round"; do | |
11540 | names_this_round="$names_next_round" | |
11541 | names_next_round= | |
11542 | for name in $names_this_round; do | |
11543 | already_handled= | |
11544 | for n in $names_already_handled; do | |
11545 | if test "$n" = "$name"; then | |
11546 | already_handled=yes | |
11547 | break | |
11548 | fi | |
11549 | done | |
11550 | if test -z "$already_handled"; then | |
11551 | names_already_handled="$names_already_handled $name" | |
11552 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
11553 | eval value=\"\$HAVE_LIB$uppername\" | |
11554 | if test -n "$value"; then | |
11555 | if test "$value" = yes; then | |
11556 | eval value=\"\$LIB$uppername\" | |
11557 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
11558 | eval value=\"\$LTLIB$uppername\" | |
11559 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
11560 | else | |
11561 | : | |
11562 | fi | |
11563 | else | |
11564 | found_dir= | |
11565 | found_la= | |
11566 | found_so= | |
11567 | found_a= | |
11568 | if test $use_additional = yes; then | |
11569 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
11570 | found_dir="$additional_libdir" | |
11571 | found_so="$additional_libdir/lib$name.$shlibext" | |
11572 | if test -f "$additional_libdir/lib$name.la"; then | |
11573 | found_la="$additional_libdir/lib$name.la" | |
11574 | fi | |
11575 | else | |
11576 | if test -f "$additional_libdir/lib$name.$libext"; then | |
11577 | found_dir="$additional_libdir" | |
11578 | found_a="$additional_libdir/lib$name.$libext" | |
11579 | if test -f "$additional_libdir/lib$name.la"; then | |
11580 | found_la="$additional_libdir/lib$name.la" | |
11581 | fi | |
11582 | fi | |
11583 | fi | |
11584 | fi | |
11585 | if test "X$found_dir" = "X"; then | |
11586 | for x in $LDFLAGS $LTLIBIPT; do | |
11587 | ||
11588 | acl_save_prefix="$prefix" | |
11589 | prefix="$acl_final_prefix" | |
11590 | acl_save_exec_prefix="$exec_prefix" | |
11591 | exec_prefix="$acl_final_exec_prefix" | |
11592 | eval x=\"$x\" | |
11593 | exec_prefix="$acl_save_exec_prefix" | |
11594 | prefix="$acl_save_prefix" | |
11595 | ||
11596 | case "$x" in | |
11597 | -L*) | |
11598 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
11599 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
11600 | found_dir="$dir" | |
11601 | found_so="$dir/lib$name.$shlibext" | |
11602 | if test -f "$dir/lib$name.la"; then | |
11603 | found_la="$dir/lib$name.la" | |
11604 | fi | |
11605 | else | |
11606 | if test -f "$dir/lib$name.$libext"; then | |
11607 | found_dir="$dir" | |
11608 | found_a="$dir/lib$name.$libext" | |
11609 | if test -f "$dir/lib$name.la"; then | |
11610 | found_la="$dir/lib$name.la" | |
11611 | fi | |
11612 | fi | |
11613 | fi | |
11614 | ;; | |
11615 | esac | |
11616 | if test "X$found_dir" != "X"; then | |
11617 | break | |
11618 | fi | |
11619 | done | |
11620 | fi | |
11621 | if test "X$found_dir" != "X"; then | |
11622 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
11623 | if test "X$found_so" != "X"; then | |
11624 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
11625 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11626 | else | |
11627 | haveit= | |
11628 | for x in $ltrpathdirs; do | |
11629 | if test "X$x" = "X$found_dir"; then | |
11630 | haveit=yes | |
11631 | break | |
11632 | fi | |
11633 | done | |
11634 | if test -z "$haveit"; then | |
11635 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11636 | fi | |
11637 | if test "$hardcode_direct" = yes; then | |
11638 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11639 | else | |
11640 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11641 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11642 | haveit= | |
11643 | for x in $rpathdirs; do | |
11644 | if test "X$x" = "X$found_dir"; then | |
11645 | haveit=yes | |
11646 | break | |
11647 | fi | |
11648 | done | |
11649 | if test -z "$haveit"; then | |
11650 | rpathdirs="$rpathdirs $found_dir" | |
11651 | fi | |
11652 | else | |
11653 | haveit= | |
11654 | for x in $LDFLAGS $LIBIPT; do | |
11655 | ||
11656 | acl_save_prefix="$prefix" | |
11657 | prefix="$acl_final_prefix" | |
11658 | acl_save_exec_prefix="$exec_prefix" | |
11659 | exec_prefix="$acl_final_exec_prefix" | |
11660 | eval x=\"$x\" | |
11661 | exec_prefix="$acl_save_exec_prefix" | |
11662 | prefix="$acl_save_prefix" | |
11663 | ||
11664 | if test "X$x" = "X-L$found_dir"; then | |
11665 | haveit=yes | |
11666 | break | |
11667 | fi | |
11668 | done | |
11669 | if test -z "$haveit"; then | |
11670 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
11671 | fi | |
11672 | if test "$hardcode_minus_L" != no; then | |
11673 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11674 | else | |
11675 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11676 | fi | |
11677 | fi | |
11678 | fi | |
11679 | fi | |
11680 | else | |
11681 | if test "X$found_a" != "X"; then | |
11682 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
11683 | else | |
11684 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
11685 | fi | |
11686 | fi | |
11687 | additional_includedir= | |
11688 | case "$found_dir" in | |
11689 | */lib | */lib/) | |
11690 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11691 | additional_includedir="$basedir/include" | |
11692 | ;; | |
11693 | esac | |
11694 | if test "X$additional_includedir" != "X"; then | |
11695 | if test "X$additional_includedir" != "X/usr/include"; then | |
11696 | haveit= | |
11697 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11698 | if test -n "$GCC"; then | |
11699 | case $host_os in | |
11700 | linux*) haveit=yes;; | |
11701 | esac | |
11702 | fi | |
11703 | fi | |
11704 | if test -z "$haveit"; then | |
11705 | for x in $CPPFLAGS $INCIPT; 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-I$additional_includedir"; then | |
11716 | haveit=yes | |
11717 | break | |
11718 | fi | |
11719 | done | |
11720 | if test -z "$haveit"; then | |
11721 | if test -d "$additional_includedir"; then | |
11722 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
11723 | fi | |
11724 | fi | |
11725 | fi | |
11726 | fi | |
11727 | fi | |
11728 | if test -n "$found_la"; then | |
11729 | save_libdir="$libdir" | |
11730 | case "$found_la" in | |
11731 | */* | *\\*) . "$found_la" ;; | |
11732 | *) . "./$found_la" ;; | |
11733 | esac | |
11734 | libdir="$save_libdir" | |
11735 | for dep in $dependency_libs; do | |
11736 | case "$dep" in | |
11737 | -L*) | |
11738 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11739 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11740 | haveit= | |
11741 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11742 | if test -n "$GCC"; then | |
11743 | case $host_os in | |
11744 | linux*) haveit=yes;; | |
11745 | esac | |
11746 | fi | |
11747 | fi | |
11748 | if test -z "$haveit"; then | |
11749 | haveit= | |
11750 | for x in $LDFLAGS $LIBIPT; do | |
11751 | ||
11752 | acl_save_prefix="$prefix" | |
11753 | prefix="$acl_final_prefix" | |
11754 | acl_save_exec_prefix="$exec_prefix" | |
11755 | exec_prefix="$acl_final_exec_prefix" | |
11756 | eval x=\"$x\" | |
11757 | exec_prefix="$acl_save_exec_prefix" | |
11758 | prefix="$acl_save_prefix" | |
11759 | ||
11760 | if test "X$x" = "X-L$additional_libdir"; then | |
11761 | haveit=yes | |
11762 | break | |
11763 | fi | |
11764 | done | |
11765 | if test -z "$haveit"; then | |
11766 | if test -d "$additional_libdir"; then | |
11767 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
11768 | fi | |
11769 | fi | |
11770 | haveit= | |
11771 | for x in $LDFLAGS $LTLIBIPT; do | |
11772 | ||
11773 | acl_save_prefix="$prefix" | |
11774 | prefix="$acl_final_prefix" | |
11775 | acl_save_exec_prefix="$exec_prefix" | |
11776 | exec_prefix="$acl_final_exec_prefix" | |
11777 | eval x=\"$x\" | |
11778 | exec_prefix="$acl_save_exec_prefix" | |
11779 | prefix="$acl_save_prefix" | |
11780 | ||
11781 | if test "X$x" = "X-L$additional_libdir"; then | |
11782 | haveit=yes | |
11783 | break | |
11784 | fi | |
11785 | done | |
11786 | if test -z "$haveit"; then | |
11787 | if test -d "$additional_libdir"; then | |
11788 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
11789 | fi | |
11790 | fi | |
11791 | fi | |
11792 | fi | |
11793 | ;; | |
11794 | -R*) | |
11795 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
11796 | if test "$enable_rpath" != no; then | |
11797 | haveit= | |
11798 | for x in $rpathdirs; do | |
11799 | if test "X$x" = "X$dir"; then | |
11800 | haveit=yes | |
11801 | break | |
11802 | fi | |
11803 | done | |
11804 | if test -z "$haveit"; then | |
11805 | rpathdirs="$rpathdirs $dir" | |
11806 | fi | |
11807 | haveit= | |
11808 | for x in $ltrpathdirs; do | |
11809 | if test "X$x" = "X$dir"; then | |
11810 | haveit=yes | |
11811 | break | |
11812 | fi | |
11813 | done | |
11814 | if test -z "$haveit"; then | |
11815 | ltrpathdirs="$ltrpathdirs $dir" | |
11816 | fi | |
11817 | fi | |
11818 | ;; | |
11819 | -l*) | |
11820 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
11821 | ;; | |
11822 | *.la) | |
11823 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
11824 | ;; | |
11825 | *) | |
11826 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
11827 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
11828 | ;; | |
11829 | esac | |
11830 | done | |
11831 | fi | |
11832 | else | |
11833 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11834 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
11835 | fi | |
11836 | fi | |
11837 | fi | |
11838 | done | |
11839 | done | |
11840 | if test "X$rpathdirs" != "X"; then | |
11841 | if test -n "$hardcode_libdir_separator"; then | |
11842 | alldirs= | |
11843 | for found_dir in $rpathdirs; do | |
11844 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11845 | done | |
11846 | acl_save_libdir="$libdir" | |
11847 | libdir="$alldirs" | |
11848 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11849 | libdir="$acl_save_libdir" | |
11850 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11851 | else | |
11852 | for found_dir in $rpathdirs; do | |
11853 | acl_save_libdir="$libdir" | |
11854 | libdir="$found_dir" | |
11855 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11856 | libdir="$acl_save_libdir" | |
11857 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11858 | done | |
11859 | fi | |
11860 | fi | |
11861 | if test "X$ltrpathdirs" != "X"; then | |
11862 | for found_dir in $ltrpathdirs; do | |
11863 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
11864 | done | |
11865 | fi | |
11866 | ||
11867 | ||
11868 | ac_save_CPPFLAGS="$CPPFLAGS" | |
11869 | ||
11870 | for element in $INCIPT; do | |
11871 | haveit= | |
11872 | for x in $CPPFLAGS; do | |
11873 | ||
11874 | acl_save_prefix="$prefix" | |
11875 | prefix="$acl_final_prefix" | |
11876 | acl_save_exec_prefix="$exec_prefix" | |
11877 | exec_prefix="$acl_final_exec_prefix" | |
11878 | eval x=\"$x\" | |
11879 | exec_prefix="$acl_save_exec_prefix" | |
11880 | prefix="$acl_save_prefix" | |
11881 | ||
11882 | if test "X$x" = "X$element"; then | |
11883 | haveit=yes | |
11884 | break | |
11885 | fi | |
11886 | done | |
11887 | if test -z "$haveit"; then | |
11888 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11889 | fi | |
11890 | done | |
11891 | ||
11892 | ||
11893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
11894 | $as_echo_n "checking for libipt... " >&6; } | |
11895 | if test "${ac_cv_libipt+set}" = set; then : | |
11896 | $as_echo_n "(cached) " >&6 | |
11897 | else | |
11898 | ||
11899 | ac_save_LIBS="$LIBS" | |
11900 | LIBS="$LIBS $LIBIPT" | |
11901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11902 | /* end confdefs.h. */ | |
11903 | #include "intel-pt.h" | |
11904 | int | |
11905 | main () | |
11906 | { | |
11907 | pt_insn_alloc_decoder (0); | |
11908 | ; | |
11909 | return 0; | |
11910 | } | |
11911 | _ACEOF | |
11912 | if ac_fn_c_try_link "$LINENO"; then : | |
11913 | ac_cv_libipt=yes | |
11914 | else | |
11915 | ac_cv_libipt=no | |
11916 | fi | |
11917 | rm -f core conftest.err conftest.$ac_objext \ | |
11918 | conftest$ac_exeext conftest.$ac_ext | |
11919 | LIBS="$ac_save_LIBS" | |
11920 | ||
11921 | fi | |
11922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 | |
11923 | $as_echo "$ac_cv_libipt" >&6; } | |
11924 | if test "$ac_cv_libipt" = yes; then | |
11925 | HAVE_LIBIPT=yes | |
11926 | ||
11927 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h | |
11928 | ||
11929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
11930 | $as_echo_n "checking how to link with libipt... " >&6; } | |
11931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
11932 | $as_echo "$LIBIPT" >&6; } | |
11933 | else | |
11934 | HAVE_LIBIPT=no | |
11935 | CPPFLAGS="$ac_save_CPPFLAGS" | |
11936 | LIBIPT= | |
11937 | LTLIBIPT= | |
11938 | fi | |
11939 | ||
11940 | ||
11941 | ||
11942 | ||
11943 | ||
11944 | ||
11945 | if test "$HAVE_LIBIPT" != yes; then | |
11946 | if test "$with_intel_pt" = yes; then | |
11947 | as_fn_error "libipt is missing or unusable" "$LINENO" 5 | |
11948 | else | |
11949 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
11950 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
11951 | fi | |
c56ccc05 MM |
11952 | else |
11953 | save_LIBS=$LIBS | |
11954 | LIBS="$LIBS $LIBIPT" | |
11955 | for ac_func in pt_insn_event | |
11956 | do : | |
11957 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
11958 | if test "x$ac_cv_func_pt_insn_event" = x""yes; then : | |
11959 | cat >>confdefs.h <<_ACEOF | |
11960 | #define HAVE_PT_INSN_EVENT 1 | |
11961 | _ACEOF | |
11962 | ||
11963 | fi | |
11964 | done | |
11965 | ||
11966 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> | |
11967 | " | |
11968 | if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then : | |
11969 | ||
11970 | cat >>confdefs.h <<_ACEOF | |
11971 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
11972 | _ACEOF | |
11973 | ||
11974 | ||
11975 | fi | |
11976 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
11977 | " | |
11978 | if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then : | |
11979 | ||
11980 | cat >>confdefs.h <<_ACEOF | |
11981 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
11982 | _ACEOF | |
11983 | ||
11984 | ||
11985 | fi | |
11986 | ||
11987 | LIBS=$save_LIBS | |
58bfce93 MM |
11988 | fi |
11989 | fi | |
11990 | ||
81ecdfbb RW |
11991 | # ------------------------- # |
11992 | # Checks for header files. # | |
11993 | # ------------------------- # | |
c890192f | 11994 | |
81ecdfbb RW |
11995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
11996 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11997 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11998 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11999 | else |
81ecdfbb | 12000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12001 | /* end confdefs.h. */ |
81ecdfbb RW |
12002 | #include <stdlib.h> |
12003 | #include <stdarg.h> | |
12004 | #include <string.h> | |
12005 | #include <float.h> | |
12006 | ||
a9322a30 TT |
12007 | int |
12008 | main () | |
12009 | { | |
a9322a30 TT |
12010 | |
12011 | ; | |
12012 | return 0; | |
12013 | } | |
bec39cab | 12014 | _ACEOF |
81ecdfbb RW |
12015 | if ac_fn_c_try_compile "$LINENO"; then : |
12016 | ac_cv_header_stdc=yes | |
bec39cab | 12017 | else |
81ecdfbb | 12018 | ac_cv_header_stdc=no |
a9322a30 | 12019 | fi |
81ecdfbb | 12020 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12021 | |
81ecdfbb RW |
12022 | if test $ac_cv_header_stdc = yes; then |
12023 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12024 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12025 | /* end confdefs.h. */ | |
12026 | #include <string.h> | |
bec39cab | 12027 | |
81ecdfbb RW |
12028 | _ACEOF |
12029 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12030 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 12031 | |
bec39cab | 12032 | else |
81ecdfbb RW |
12033 | ac_cv_header_stdc=no |
12034 | fi | |
12035 | rm -f conftest* | |
12036 | ||
12037 | fi | |
12038 | ||
12039 | if test $ac_cv_header_stdc = yes; then | |
12040 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12042 | /* end confdefs.h. */ | |
12043 | #include <stdlib.h> | |
12044 | ||
bec39cab | 12045 | _ACEOF |
81ecdfbb RW |
12046 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
12047 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 12048 | |
81ecdfbb RW |
12049 | else |
12050 | ac_cv_header_stdc=no | |
12051 | fi | |
12052 | rm -f conftest* | |
bec39cab | 12053 | |
bec39cab | 12054 | fi |
81ecdfbb RW |
12055 | |
12056 | if test $ac_cv_header_stdc = yes; then | |
12057 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12058 | if test "$cross_compiling" = yes; then : | |
12059 | : | |
bec39cab | 12060 | else |
81ecdfbb | 12061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12062 | /* end confdefs.h. */ |
81ecdfbb RW |
12063 | #include <ctype.h> |
12064 | #include <stdlib.h> | |
12065 | #if ((' ' & 0x0FF) == 0x020) | |
12066 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12067 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12068 | #else | |
12069 | # define ISLOWER(c) \ | |
12070 | (('a' <= (c) && (c) <= 'i') \ | |
12071 | || ('j' <= (c) && (c) <= 'r') \ | |
12072 | || ('s' <= (c) && (c) <= 'z')) | |
12073 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12074 | #endif | |
12075 | ||
12076 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
12077 | int |
12078 | main () | |
12079 | { | |
81ecdfbb RW |
12080 | int i; |
12081 | for (i = 0; i < 256; i++) | |
12082 | if (XOR (islower (i), ISLOWER (i)) | |
12083 | || toupper (i) != TOUPPER (i)) | |
12084 | return 2; | |
a9322a30 TT |
12085 | return 0; |
12086 | } | |
bec39cab | 12087 | _ACEOF |
81ecdfbb RW |
12088 | if ac_fn_c_try_run "$LINENO"; then : |
12089 | ||
bec39cab | 12090 | else |
81ecdfbb RW |
12091 | ac_cv_header_stdc=no |
12092 | fi | |
12093 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12094 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12095 | fi | |
bec39cab | 12096 | |
bec39cab | 12097 | fi |
a9322a30 | 12098 | fi |
81ecdfbb RW |
12099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
12100 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12101 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 12102 | |
81ecdfbb | 12103 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 12104 | |
81ecdfbb | 12105 | fi |
bec39cab | 12106 | |
81ecdfbb | 12107 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 12108 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 12109 | thread_db.h \ |
81ecdfbb RW |
12110 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
12111 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
44122162 | 12112 | sys/reg.h sys/debugreg.h sys/select.h \ |
726e1356 | 12113 | termios.h elf_hp.h \ |
9467110b | 12114 | dlfcn.h |
81ecdfbb RW |
12115 | do : |
12116 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12117 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12118 | eval as_val=\$$as_ac_Header | |
12119 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12120 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12121 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12122 | _ACEOF |
c906108c | 12123 | |
bec39cab | 12124 | fi |
81ecdfbb RW |
12125 | |
12126 | done | |
12127 | ||
81ecdfbb RW |
12128 | for ac_header in sys/user.h |
12129 | do : | |
12130 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
12131 | # include <sys/param.h> | |
a9322a30 TT |
12132 | #endif |
12133 | ||
81ecdfbb RW |
12134 | " |
12135 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
12136 | cat >>confdefs.h <<_ACEOF | |
12137 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 12138 | _ACEOF |
bec39cab | 12139 | |
a9322a30 | 12140 | fi |
bec39cab | 12141 | |
81ecdfbb | 12142 | done |
5ee754fc | 12143 | |
5ee754fc | 12144 | |
5007d765 | 12145 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
81ecdfbb RW |
12146 | do : |
12147 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12148 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12149 | eval as_val=\$$as_ac_Header | |
12150 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12151 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12152 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12153 | _ACEOF |
5ee754fc MK |
12154 | |
12155 | fi | |
12156 | ||
81ecdfbb | 12157 | done |
bec39cab | 12158 | |
81ecdfbb RW |
12159 | for ac_header in term.h |
12160 | do : | |
12161 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
12162 | # include <curses.h> | |
12163 | #endif | |
bec39cab | 12164 | |
81ecdfbb RW |
12165 | " |
12166 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
12167 | cat >>confdefs.h <<_ACEOF | |
12168 | #define HAVE_TERM_H 1 | |
a8111142 | 12169 | _ACEOF |
a8111142 | 12170 | |
a8111142 | 12171 | fi |
a8111142 | 12172 | |
81ecdfbb | 12173 | done |
a8111142 TT |
12174 | |
12175 | ||
81ecdfbb RW |
12176 | # ------------------------- # |
12177 | # Checks for declarations. # | |
12178 | # ------------------------- # | |
a9322a30 | 12179 | |
07697489 PA |
12180 | |
12181 | # Check for presence and size of long long. | |
12182 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
12183 | if test "x$ac_cv_type_long_long" = x""yes; then : | |
12184 | ||
12185 | cat >>confdefs.h <<_ACEOF | |
12186 | #define HAVE_LONG_LONG 1 | |
12187 | _ACEOF | |
12188 | ||
12189 | # The cast to long int works around a bug in the HP C Compiler | |
12190 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12191 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12192 | # This bug is HP SR number 8606223364. | |
12193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12194 | $as_echo_n "checking size of long long... " >&6; } | |
12195 | if test "${ac_cv_sizeof_long_long+set}" = set; then : | |
12196 | $as_echo_n "(cached) " >&6 | |
12197 | else | |
12198 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
12199 | ||
12200 | else | |
12201 | if test "$ac_cv_type_long_long" = yes; then | |
12202 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12203 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12204 | { as_fn_set_status 77 | |
12205 | as_fn_error "cannot compute sizeof (long long) | |
12206 | See \`config.log' for more details." "$LINENO" 5; }; } | |
12207 | else | |
12208 | ac_cv_sizeof_long_long=0 | |
12209 | fi | |
12210 | fi | |
12211 | ||
12212 | fi | |
12213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
12214 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
12215 | ||
12216 | ||
12217 | ||
12218 | cat >>confdefs.h <<_ACEOF | |
12219 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12220 | _ACEOF | |
12221 | ||
12222 | ||
12223 | fi | |
12224 | ||
12225 | ||
12226 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" | |
12227 | if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : | |
12228 | ac_have_decl=1 | |
12229 | else | |
12230 | ac_have_decl=0 | |
12231 | fi | |
12232 | ||
12233 | cat >>confdefs.h <<_ACEOF | |
12234 | #define HAVE_DECL_BASENAME $ac_have_decl | |
12235 | _ACEOF | |
12236 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
12237 | if test "x$ac_cv_have_decl_ffs" = x""yes; then : | |
12238 | ac_have_decl=1 | |
12239 | else | |
12240 | ac_have_decl=0 | |
12241 | fi | |
12242 | ||
12243 | cat >>confdefs.h <<_ACEOF | |
12244 | #define HAVE_DECL_FFS $ac_have_decl | |
12245 | _ACEOF | |
12246 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
12247 | if test "x$ac_cv_have_decl_asprintf" = x""yes; then : | |
12248 | ac_have_decl=1 | |
12249 | else | |
12250 | ac_have_decl=0 | |
12251 | fi | |
12252 | ||
12253 | cat >>confdefs.h <<_ACEOF | |
12254 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
12255 | _ACEOF | |
12256 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
12257 | if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : | |
12258 | ac_have_decl=1 | |
12259 | else | |
12260 | ac_have_decl=0 | |
12261 | fi | |
12262 | ||
12263 | cat >>confdefs.h <<_ACEOF | |
12264 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
12265 | _ACEOF | |
12266 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
12267 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
12268 | ac_have_decl=1 | |
12269 | else | |
12270 | ac_have_decl=0 | |
12271 | fi | |
12272 | ||
12273 | cat >>confdefs.h <<_ACEOF | |
12274 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12275 | _ACEOF | |
12276 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
12277 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
12278 | ac_have_decl=1 | |
12279 | else | |
12280 | ac_have_decl=0 | |
12281 | fi | |
12282 | ||
12283 | cat >>confdefs.h <<_ACEOF | |
12284 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12285 | _ACEOF | |
12286 | ||
12287 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
12288 | if test "x$ac_cv_have_decl_strtol" = x""yes; then : | |
12289 | ac_have_decl=1 | |
12290 | else | |
12291 | ac_have_decl=0 | |
12292 | fi | |
12293 | ||
12294 | cat >>confdefs.h <<_ACEOF | |
12295 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12296 | _ACEOF | |
12297 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
12298 | if test "x$ac_cv_have_decl_strtoul" = x""yes; then : | |
12299 | ac_have_decl=1 | |
12300 | else | |
12301 | ac_have_decl=0 | |
12302 | fi | |
12303 | ||
12304 | cat >>confdefs.h <<_ACEOF | |
12305 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
12306 | _ACEOF | |
12307 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
12308 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
12309 | ac_have_decl=1 | |
12310 | else | |
12311 | ac_have_decl=0 | |
12312 | fi | |
12313 | ||
12314 | cat >>confdefs.h <<_ACEOF | |
12315 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12316 | _ACEOF | |
12317 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
12318 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
12319 | ac_have_decl=1 | |
12320 | else | |
12321 | ac_have_decl=0 | |
12322 | fi | |
12323 | ||
12324 | cat >>confdefs.h <<_ACEOF | |
12325 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
12326 | _ACEOF | |
12327 | ||
12328 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
12329 | if test "x$ac_cv_have_decl_strverscmp" = x""yes; then : | |
12330 | ac_have_decl=1 | |
12331 | else | |
12332 | ac_have_decl=0 | |
12333 | fi | |
12334 | ||
12335 | cat >>confdefs.h <<_ACEOF | |
12336 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12337 | _ACEOF | |
12338 | ||
12339 | ||
12340 | ||
81ecdfbb RW |
12341 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
12342 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
12343 | ac_have_decl=1 | |
bec39cab | 12344 | else |
81ecdfbb RW |
12345 | ac_have_decl=0 |
12346 | fi | |
12347 | ||
12348 | cat >>confdefs.h <<_ACEOF | |
12349 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 12350 | _ACEOF |
81ecdfbb RW |
12351 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
12352 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
12353 | ac_have_decl=1 | |
12354 | else | |
12355 | ac_have_decl=0 | |
12356 | fi | |
12357 | ||
12358 | cat >>confdefs.h <<_ACEOF | |
12359 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 12360 | _ACEOF |
81ecdfbb RW |
12361 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
12362 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
12363 | ac_have_decl=1 | |
bec39cab | 12364 | else |
81ecdfbb RW |
12365 | ac_have_decl=0 |
12366 | fi | |
bec39cab | 12367 | |
81ecdfbb RW |
12368 | cat >>confdefs.h <<_ACEOF |
12369 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 12370 | _ACEOF |
81ecdfbb RW |
12371 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
12372 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
12373 | ac_have_decl=1 | |
12374 | else | |
12375 | ac_have_decl=0 | |
5ee754fc | 12376 | fi |
81ecdfbb RW |
12377 | |
12378 | cat >>confdefs.h <<_ACEOF | |
12379 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 12380 | _ACEOF |
5ee754fc | 12381 | |
5ee754fc | 12382 | |
81ecdfbb RW |
12383 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
12384 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
12385 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
12386 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12387 | else |
81ecdfbb | 12388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12389 | /* end confdefs.h. */ |
81ecdfbb | 12390 | #include <locale.h> |
a9322a30 TT |
12391 | int |
12392 | main () | |
12393 | { | |
81ecdfbb | 12394 | return LC_MESSAGES |
a9322a30 TT |
12395 | ; |
12396 | return 0; | |
12397 | } | |
bec39cab | 12398 | _ACEOF |
81ecdfbb RW |
12399 | if ac_fn_c_try_link "$LINENO"; then : |
12400 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12401 | else |
81ecdfbb RW |
12402 | am_cv_val_LC_MESSAGES=no |
12403 | fi | |
12404 | rm -f core conftest.err conftest.$ac_objext \ | |
12405 | conftest$ac_exeext conftest.$ac_ext | |
12406 | fi | |
12407 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
12408 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12409 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12410 | |
81ecdfbb RW |
12411 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
12412 | ||
12413 | fi | |
12414 | ||
12415 | ||
12416 | # ----------------------- # | |
12417 | # Checks for structures. # | |
12418 | # ----------------------- # | |
12419 | ||
12420 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
12421 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
12422 | ||
12423 | cat >>confdefs.h <<_ACEOF | |
12424 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 12425 | _ACEOF |
7eb368b3 | 12426 | |
81ecdfbb | 12427 | |
7eb368b3 | 12428 | fi |
81ecdfbb RW |
12429 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
12430 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 12431 | |
a9322a30 TT |
12432 | cat >>confdefs.h <<_ACEOF |
12433 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
12434 | _ACEOF |
12435 | ||
a9322a30 | 12436 | |
7eb368b3 NR |
12437 | fi |
12438 | ||
7eb368b3 | 12439 | |
a9322a30 TT |
12440 | # ------------------ # |
12441 | # Checks for types. # | |
12442 | # ------------------ # | |
7eb368b3 | 12443 | |
81ecdfbb | 12444 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
12445 | #include <sys/socket.h> |
12446 | ||
81ecdfbb RW |
12447 | " |
12448 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 12449 | |
a9322a30 TT |
12450 | cat >>confdefs.h <<_ACEOF |
12451 | #define HAVE_SOCKLEN_T 1 | |
12452 | _ACEOF | |
12453 | ||
12454 | ||
12455 | fi | |
12456 | ||
12457 | ||
12458 | # ------------------------------------- # | |
12459 | # Checks for compiler characteristics. # | |
12460 | # ------------------------------------- # | |
12461 | ||
81ecdfbb RW |
12462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12463 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12464 | if test "${ac_cv_c_const+set}" = set; then : | |
12465 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12466 | else |
81ecdfbb | 12467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12468 | /* end confdefs.h. */ |
a9322a30 TT |
12469 | |
12470 | int | |
12471 | main () | |
12472 | { | |
12473 | /* FIXME: Include the comments suggested by Paul. */ | |
12474 | #ifndef __cplusplus | |
12475 | /* Ultrix mips cc rejects this. */ | |
12476 | typedef int charset[2]; | |
81ecdfbb | 12477 | const charset cs; |
a9322a30 | 12478 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
12479 | char const *const *pcpcc; |
12480 | char **ppc; | |
a9322a30 TT |
12481 | /* NEC SVR4.0.2 mips cc rejects this. */ |
12482 | struct point {int x, y;}; | |
12483 | static struct point const zero = {0,0}; | |
12484 | /* AIX XL C 1.02.0.0 rejects this. | |
12485 | It does not let you subtract one const X* pointer from another in | |
12486 | an arm of an if-expression whose if-part is not a constant | |
12487 | expression */ | |
12488 | const char *g = "string"; | |
81ecdfbb | 12489 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 12490 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
12491 | ++pcpcc; |
12492 | ppc = (char**) pcpcc; | |
12493 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
12494 | { /* SCO 3.2v4 cc rejects this. */ |
12495 | char *t; | |
12496 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
12497 | ||
12498 | *t++ = 0; | |
81ecdfbb | 12499 | if (s) return 0; |
a9322a30 TT |
12500 | } |
12501 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12502 | int x[] = {25, 17}; | |
12503 | const int *foo = &x[0]; | |
12504 | ++foo; | |
12505 | } | |
12506 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12507 | typedef const int *iptr; | |
12508 | iptr p = 0; | |
12509 | ++p; | |
12510 | } | |
12511 | { /* AIX XL C 1.02.0.0 rejects this saying | |
12512 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12513 | struct s { int j; const int *ap[3]; }; | |
12514 | struct s *b; b->j = 5; | |
12515 | } | |
12516 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12517 | const int foo = 10; | |
81ecdfbb | 12518 | if (!foo) return 0; |
a9322a30 | 12519 | } |
81ecdfbb | 12520 | return !cs[0] && !zero.x; |
a9322a30 TT |
12521 | #endif |
12522 | ||
12523 | ; | |
12524 | return 0; | |
12525 | } | |
bec39cab | 12526 | _ACEOF |
81ecdfbb | 12527 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12528 | ac_cv_c_const=yes |
5ee754fc | 12529 | else |
81ecdfbb | 12530 | ac_cv_c_const=no |
5ee754fc | 12531 | fi |
81ecdfbb | 12532 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 12533 | fi |
81ecdfbb RW |
12534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12535 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 12536 | if test $ac_cv_c_const = no; then |
bec39cab | 12537 | |
81ecdfbb | 12538 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12539 | |
5ee754fc | 12540 | fi |
bec39cab | 12541 | |
81ecdfbb RW |
12542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
12543 | $as_echo_n "checking for inline... " >&6; } | |
12544 | if test "${ac_cv_c_inline+set}" = set; then : | |
12545 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12546 | else |
a9322a30 TT |
12547 | ac_cv_c_inline=no |
12548 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 12549 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12550 | /* end confdefs.h. */ |
a9322a30 TT |
12551 | #ifndef __cplusplus |
12552 | typedef int foo_t; | |
12553 | static $ac_kw foo_t static_foo () {return 0; } | |
12554 | $ac_kw foo_t foo () {return 0; } | |
12555 | #endif | |
12556 | ||
bec39cab | 12557 | _ACEOF |
81ecdfbb RW |
12558 | if ac_fn_c_try_compile "$LINENO"; then : |
12559 | ac_cv_c_inline=$ac_kw | |
bec39cab | 12560 | fi |
81ecdfbb RW |
12561 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12562 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 12563 | done |
bec39cab | 12564 | |
5ee754fc | 12565 | fi |
81ecdfbb RW |
12566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
12567 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 12568 | |
a9322a30 TT |
12569 | case $ac_cv_c_inline in |
12570 | inline | yes) ;; | |
12571 | *) | |
12572 | case $ac_cv_c_inline in | |
12573 | no) ac_val=;; | |
12574 | *) ac_val=$ac_cv_c_inline;; | |
12575 | esac | |
12576 | cat >>confdefs.h <<_ACEOF | |
12577 | #ifndef __cplusplus | |
12578 | #define inline $ac_val | |
12579 | #endif | |
12580 | _ACEOF | |
bec39cab AC |
12581 | ;; |
12582 | esac | |
bec39cab | 12583 | |
81ecdfbb RW |
12584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12585 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12586 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
12587 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12588 | else |
81ecdfbb RW |
12589 | ac_cv_c_bigendian=unknown |
12590 | # See if we're dealing with a universal compiler. | |
12591 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12592 | /* end confdefs.h. */ | |
12593 | #ifndef __APPLE_CC__ | |
12594 | not a universal capable compiler | |
12595 | #endif | |
12596 | typedef int dummy; | |
12597 | ||
12598 | _ACEOF | |
12599 | if ac_fn_c_try_compile "$LINENO"; then : | |
12600 | ||
12601 | # Check for potential -arch flags. It is not universal unless | |
12602 | # there are at least two -arch flags with different values. | |
12603 | ac_arch= | |
12604 | ac_prev= | |
12605 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12606 | if test -n "$ac_prev"; then | |
12607 | case $ac_word in | |
12608 | i?86 | x86_64 | ppc | ppc64) | |
12609 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12610 | ac_arch=$ac_word | |
12611 | else | |
12612 | ac_cv_c_bigendian=universal | |
12613 | break | |
12614 | fi | |
12615 | ;; | |
12616 | esac | |
12617 | ac_prev= | |
12618 | elif test "x$ac_word" = "x-arch"; then | |
12619 | ac_prev=arch | |
12620 | fi | |
12621 | done | |
12622 | fi | |
12623 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12624 | if test $ac_cv_c_bigendian = unknown; then | |
12625 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12626 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12627 | /* end confdefs.h. */ |
a9322a30 | 12628 | #include <sys/types.h> |
81ecdfbb | 12629 | #include <sys/param.h> |
a9322a30 TT |
12630 | |
12631 | int | |
12632 | main () | |
12633 | { | |
81ecdfbb RW |
12634 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
12635 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12636 | && LITTLE_ENDIAN) | |
12637 | bogus endian macros | |
12638 | #endif | |
a9322a30 TT |
12639 | |
12640 | ; | |
12641 | return 0; | |
12642 | } | |
bec39cab | 12643 | _ACEOF |
81ecdfbb | 12644 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12645 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 12646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12647 | /* end confdefs.h. */ |
a9322a30 | 12648 | #include <sys/types.h> |
81ecdfbb | 12649 | #include <sys/param.h> |
a9322a30 TT |
12650 | |
12651 | int | |
12652 | main () | |
12653 | { | |
12654 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
12655 | not big endian |
12656 | #endif | |
a9322a30 TT |
12657 | |
12658 | ; | |
12659 | return 0; | |
12660 | } | |
bec39cab | 12661 | _ACEOF |
81ecdfbb | 12662 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12663 | ac_cv_c_bigendian=yes |
5ee754fc | 12664 | else |
81ecdfbb | 12665 | ac_cv_c_bigendian=no |
5ee754fc | 12666 | fi |
81ecdfbb RW |
12667 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12668 | fi | |
12669 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12670 | fi | |
12671 | if test $ac_cv_c_bigendian = unknown; then | |
12672 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12673 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12674 | /* end confdefs.h. */ | |
12675 | #include <limits.h> | |
bec39cab | 12676 | |
81ecdfbb RW |
12677 | int |
12678 | main () | |
12679 | { | |
12680 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12681 | bogus endian macros | |
12682 | #endif | |
12683 | ||
12684 | ; | |
12685 | return 0; | |
12686 | } | |
7eb368b3 | 12687 | _ACEOF |
81ecdfbb RW |
12688 | if ac_fn_c_try_compile "$LINENO"; then : |
12689 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 12691 | /* end confdefs.h. */ |
81ecdfbb RW |
12692 | #include <limits.h> |
12693 | ||
7eb368b3 NR |
12694 | int |
12695 | main () | |
12696 | { | |
81ecdfbb RW |
12697 | #ifndef _BIG_ENDIAN |
12698 | not big endian | |
12699 | #endif | |
12700 | ||
7eb368b3 NR |
12701 | ; |
12702 | return 0; | |
12703 | } | |
12704 | _ACEOF | |
81ecdfbb | 12705 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12706 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
12707 | else |
12708 | ac_cv_c_bigendian=no | |
a9322a30 | 12709 | fi |
81ecdfbb | 12710 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 12711 | fi |
81ecdfbb RW |
12712 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12713 | fi | |
12714 | if test $ac_cv_c_bigendian = unknown; then | |
12715 | # Compile a test program. | |
12716 | if test "$cross_compiling" = yes; then : | |
12717 | # Try to guess by grepping values from an object file. | |
12718 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12719 | /* end confdefs.h. */ | |
12720 | short int ascii_mm[] = | |
12721 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12722 | short int ascii_ii[] = | |
12723 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12724 | int use_ascii (int i) { | |
12725 | return ascii_mm[i] + ascii_ii[i]; | |
12726 | } | |
12727 | short int ebcdic_ii[] = | |
12728 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12729 | short int ebcdic_mm[] = | |
12730 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12731 | int use_ebcdic (int i) { | |
12732 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12733 | } | |
12734 | extern int foo; | |
7eb368b3 | 12735 | |
81ecdfbb RW |
12736 | int |
12737 | main () | |
12738 | { | |
12739 | return use_ascii (foo) == use_ebcdic (foo); | |
12740 | ; | |
12741 | return 0; | |
12742 | } | |
12743 | _ACEOF | |
12744 | if ac_fn_c_try_compile "$LINENO"; then : | |
12745 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12746 | ac_cv_c_bigendian=yes | |
12747 | fi | |
12748 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12749 | if test "$ac_cv_c_bigendian" = unknown; then | |
12750 | ac_cv_c_bigendian=no | |
12751 | else | |
12752 | # finding both strings is unlikely to happen, but who knows? | |
12753 | ac_cv_c_bigendian=unknown | |
12754 | fi | |
12755 | fi | |
7eb368b3 | 12756 | fi |
81ecdfbb | 12757 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12758 | else |
81ecdfbb | 12759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12760 | /* end confdefs.h. */ |
81ecdfbb | 12761 | $ac_includes_default |
d3ea6809 MM |
12762 | int |
12763 | main () | |
12764 | { | |
81ecdfbb RW |
12765 | |
12766 | /* Are we little or big endian? From Harbison&Steele. */ | |
12767 | union | |
12768 | { | |
12769 | long int l; | |
12770 | char c[sizeof (long int)]; | |
12771 | } u; | |
12772 | u.l = 1; | |
12773 | return u.c[sizeof (long int) - 1] == 1; | |
12774 | ||
12775 | ; | |
12776 | return 0; | |
d3ea6809 MM |
12777 | } |
12778 | _ACEOF | |
81ecdfbb | 12779 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12780 | ac_cv_c_bigendian=no |
d3ea6809 | 12781 | else |
81ecdfbb | 12782 | ac_cv_c_bigendian=yes |
d3ea6809 | 12783 | fi |
81ecdfbb RW |
12784 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12785 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12786 | fi |
a9322a30 | 12787 | |
81ecdfbb RW |
12788 | fi |
12789 | fi | |
12790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
12791 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12792 | case $ac_cv_c_bigendian in #( | |
12793 | yes) | |
12794 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12795 | ;; #( | |
12796 | no) | |
12797 | ;; #( | |
12798 | universal) | |
12799 | ||
12800 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
12801 | ||
12802 | ;; #( | |
12803 | *) | |
12804 | as_fn_error "unknown endianness | |
12805 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12806 | esac | |
d3ea6809 MM |
12807 | |
12808 | ||
a9322a30 TT |
12809 | # ------------------------------ # |
12810 | # Checks for library functions. # | |
12811 | # ------------------------------ # | |
d3ea6809 | 12812 | |
a9322a30 | 12813 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
12814 | do : |
12815 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12816 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12817 | eval as_val=\$$as_ac_Header | |
12818 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12819 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12820 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12821 | _ACEOF |
b757528f | 12822 | |
b757528f | 12823 | fi |
bec39cab | 12824 | |
a9322a30 | 12825 | done |
a3828db0 | 12826 | |
a9322a30 | 12827 | for ac_func in getpagesize |
81ecdfbb RW |
12828 | do : |
12829 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
12830 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 12831 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12832 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12833 | _ACEOF |
bcb3dc3d | 12834 | |
bcb3dc3d MK |
12835 | fi |
12836 | done | |
12837 | ||
81ecdfbb RW |
12838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12839 | $as_echo_n "checking for working mmap... " >&6; } | |
12840 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
12841 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12842 | else |
81ecdfbb | 12843 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12844 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12845 | else |
81ecdfbb | 12846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12847 | /* end confdefs.h. */ |
a9322a30 TT |
12848 | $ac_includes_default |
12849 | /* malloc might have been renamed as rpl_malloc. */ | |
12850 | #undef malloc | |
bec39cab | 12851 | |
a9322a30 TT |
12852 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12853 | Here is a matrix of mmap possibilities: | |
12854 | mmap private not fixed | |
12855 | mmap private fixed at somewhere currently unmapped | |
12856 | mmap private fixed at somewhere already mapped | |
12857 | mmap shared not fixed | |
12858 | mmap shared fixed at somewhere currently unmapped | |
12859 | mmap shared fixed at somewhere already mapped | |
12860 | For private mappings, we should verify that changes cannot be read() | |
12861 | back from the file, nor mmap's back from the file at a different | |
12862 | address. (There have been systems where private was not correctly | |
12863 | implemented like the infamous i386 svr4.0, and systems where the | |
12864 | VM page cache was not coherent with the file system buffer cache | |
12865 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12866 | For shared mappings, we should conversely verify that changes get | |
12867 | propagated back to all the places they're supposed to be. | |
bec39cab | 12868 | |
a9322a30 TT |
12869 | Grep wants private fixed already mapped. |
12870 | The main things grep needs to know about mmap are: | |
12871 | * does it exist and is it safe to write into the mmap'd area | |
12872 | * how to use it (BSD variants) */ | |
8b9cf735 | 12873 | |
a9322a30 TT |
12874 | #include <fcntl.h> |
12875 | #include <sys/mman.h> | |
8b9cf735 | 12876 | |
81ecdfbb | 12877 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12878 | char *malloc (); |
a3828db0 MK |
12879 | #endif |
12880 | ||
a9322a30 | 12881 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12882 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 12883 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 12884 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
12885 | # define HAVE_SYS_PARAM_H 1 |
12886 | # endif | |
12887 | ||
12888 | # ifdef _SC_PAGESIZE | |
12889 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12890 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12891 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12892 | # include <sys/param.h> |
12893 | # ifdef EXEC_PAGESIZE | |
12894 | # define getpagesize() EXEC_PAGESIZE | |
12895 | # else /* no EXEC_PAGESIZE */ | |
12896 | # ifdef NBPG | |
12897 | # define getpagesize() NBPG * CLSIZE | |
12898 | # ifndef CLSIZE | |
12899 | # define CLSIZE 1 | |
12900 | # endif /* no CLSIZE */ | |
12901 | # else /* no NBPG */ | |
12902 | # ifdef NBPC | |
12903 | # define getpagesize() NBPC | |
12904 | # else /* no NBPC */ | |
12905 | # ifdef PAGESIZE | |
12906 | # define getpagesize() PAGESIZE | |
12907 | # endif /* PAGESIZE */ | |
12908 | # endif /* no NBPC */ | |
12909 | # endif /* no NBPG */ | |
12910 | # endif /* no EXEC_PAGESIZE */ | |
12911 | # else /* no HAVE_SYS_PARAM_H */ | |
12912 | # define getpagesize() 8192 /* punt totally */ | |
12913 | # endif /* no HAVE_SYS_PARAM_H */ | |
12914 | # endif /* no _SC_PAGESIZE */ | |
12915 | ||
12916 | #endif /* no HAVE_GETPAGESIZE */ | |
12917 | ||
bec39cab AC |
12918 | int |
12919 | main () | |
12920 | { | |
a9322a30 TT |
12921 | char *data, *data2, *data3; |
12922 | int i, pagesize; | |
12923 | int fd; | |
12924 | ||
12925 | pagesize = getpagesize (); | |
12926 | ||
12927 | /* First, make a file with some known garbage in it. */ | |
12928 | data = (char *) malloc (pagesize); | |
12929 | if (!data) | |
81ecdfbb | 12930 | return 1; |
a9322a30 TT |
12931 | for (i = 0; i < pagesize; ++i) |
12932 | *(data + i) = rand (); | |
12933 | umask (0); | |
12934 | fd = creat ("conftest.mmap", 0600); | |
12935 | if (fd < 0) | |
81ecdfbb | 12936 | return 1; |
a9322a30 | 12937 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 12938 | return 1; |
a9322a30 TT |
12939 | close (fd); |
12940 | ||
12941 | /* Next, try to mmap the file at a fixed address which already has | |
12942 | something else allocated at it. If we can, also make sure that | |
12943 | we see the same garbage. */ | |
12944 | fd = open ("conftest.mmap", O_RDWR); | |
12945 | if (fd < 0) | |
81ecdfbb | 12946 | return 1; |
a9322a30 TT |
12947 | data2 = (char *) malloc (2 * pagesize); |
12948 | if (!data2) | |
81ecdfbb RW |
12949 | return 1; |
12950 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
12951 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12952 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 12953 | return 1; |
a9322a30 TT |
12954 | for (i = 0; i < pagesize; ++i) |
12955 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 12956 | return 1; |
a9322a30 TT |
12957 | |
12958 | /* Finally, make sure that changes to the mapped area do not | |
12959 | percolate back to the file as seen by read(). (This is a bug on | |
12960 | some variants of i386 svr4.0.) */ | |
12961 | for (i = 0; i < pagesize; ++i) | |
12962 | *(data2 + i) = *(data2 + i) + 1; | |
12963 | data3 = (char *) malloc (pagesize); | |
12964 | if (!data3) | |
81ecdfbb | 12965 | return 1; |
a9322a30 | 12966 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 12967 | return 1; |
a9322a30 TT |
12968 | for (i = 0; i < pagesize; ++i) |
12969 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 12970 | return 1; |
a9322a30 | 12971 | close (fd); |
81ecdfbb | 12972 | return 0; |
bec39cab AC |
12973 | } |
12974 | _ACEOF | |
81ecdfbb | 12975 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12976 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12977 | else |
81ecdfbb | 12978 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12979 | fi |
81ecdfbb RW |
12980 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12981 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12982 | fi |
81ecdfbb | 12983 | |
a9322a30 | 12984 | fi |
81ecdfbb RW |
12985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12986 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12987 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12988 | ||
81ecdfbb | 12989 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12990 | |
086ec9eb | 12991 | fi |
a9322a30 | 12992 | rm -f conftest.mmap |
a3828db0 | 12993 | |
81ecdfbb RW |
12994 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
12995 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 12996 | |
a9322a30 TT |
12997 | else |
12998 | ||
12999 | cat >>confdefs.h <<_ACEOF | |
13000 | #define pid_t int | |
bec39cab | 13001 | _ACEOF |
086ec9eb MK |
13002 | |
13003 | fi | |
13004 | ||
81ecdfbb RW |
13005 | for ac_header in vfork.h |
13006 | do : | |
13007 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
13008 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 13009 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13010 | #define HAVE_VFORK_H 1 |
bec39cab | 13011 | _ACEOF |
c906108c SS |
13012 | |
13013 | fi | |
a9322a30 | 13014 | |
a3828db0 | 13015 | done |
c906108c | 13016 | |
a9322a30 | 13017 | for ac_func in fork vfork |
81ecdfbb RW |
13018 | do : |
13019 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13020 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13021 | eval as_val=\$$as_ac_var | |
13022 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 13023 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13024 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 13025 | _ACEOF |
b83266a0 | 13026 | |
97bf5e38 | 13027 | fi |
a3828db0 | 13028 | done |
b83266a0 | 13029 | |
a9322a30 | 13030 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
13031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
13032 | $as_echo_n "checking for working fork... " >&6; } | |
13033 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
13034 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 13035 | else |
81ecdfbb | 13036 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13037 | ac_cv_func_fork_works=cross |
13038 | else | |
81ecdfbb RW |
13039 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13040 | /* end confdefs.h. */ | |
13041 | $ac_includes_default | |
13042 | int | |
13043 | main () | |
13044 | { | |
13045 | ||
13046 | /* By Ruediger Kuhlmann. */ | |
13047 | return fork () < 0; | |
13048 | ||
13049 | ; | |
13050 | return 0; | |
13051 | } | |
a9322a30 | 13052 | _ACEOF |
81ecdfbb | 13053 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13054 | ac_cv_func_fork_works=yes |
13055 | else | |
81ecdfbb | 13056 | ac_cv_func_fork_works=no |
a9322a30 | 13057 | fi |
81ecdfbb RW |
13058 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13059 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13060 | fi |
81ecdfbb | 13061 | |
a9322a30 | 13062 | fi |
81ecdfbb RW |
13063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13064 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13065 | |
13066 | else | |
13067 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13068 | fi | |
13069 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13070 | case $host in | |
13071 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13072 | # Override, as these systems have only a dummy fork() stub | |
13073 | ac_cv_func_fork_works=no | |
13074 | ;; | |
13075 | *) | |
13076 | ac_cv_func_fork_works=yes | |
13077 | ;; | |
13078 | esac | |
81ecdfbb RW |
13079 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13080 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13081 | fi |
13082 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13083 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13085 | $as_echo_n "checking for working vfork... " >&6; } | |
13086 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
13087 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 13088 | else |
81ecdfbb | 13089 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13090 | ac_cv_func_vfork_works=cross |
13091 | else | |
81ecdfbb | 13092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13093 | /* end confdefs.h. */ |
13094 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13095 | $ac_includes_default |
a9322a30 | 13096 | #include <sys/wait.h> |
81ecdfbb | 13097 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13098 | # include <vfork.h> |
13099 | #endif | |
13100 | /* On some sparc systems, changes by the child to local and incoming | |
13101 | argument registers are propagated back to the parent. The compiler | |
13102 | is told about this with #include <vfork.h>, but some compilers | |
13103 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13104 | static variable whose address is put into a register that is | |
13105 | clobbered by the vfork. */ | |
13106 | static void | |
13107 | #ifdef __cplusplus | |
13108 | sparc_address_test (int arg) | |
13109 | # else | |
13110 | sparc_address_test (arg) int arg; | |
13111 | #endif | |
13112 | { | |
13113 | static pid_t child; | |
13114 | if (!child) { | |
13115 | child = vfork (); | |
13116 | if (child < 0) { | |
13117 | perror ("vfork"); | |
13118 | _exit(2); | |
13119 | } | |
13120 | if (!child) { | |
13121 | arg = getpid(); | |
13122 | write(-1, "", 0); | |
13123 | _exit (arg); | |
13124 | } | |
13125 | } | |
13126 | } | |
13127 | ||
13128 | int | |
13129 | main () | |
13130 | { | |
13131 | pid_t parent = getpid (); | |
13132 | pid_t child; | |
13133 | ||
13134 | sparc_address_test (0); | |
13135 | ||
13136 | child = vfork (); | |
13137 | ||
13138 | if (child == 0) { | |
13139 | /* Here is another test for sparc vfork register problems. This | |
13140 | test uses lots of local variables, at least as many local | |
13141 | variables as main has allocated so far including compiler | |
13142 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13143 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13144 | reuse the register of parent for one of the local variables, | |
13145 | since it will think that parent can't possibly be used any more | |
13146 | in this routine. Assigning to the local variable will thus | |
13147 | munge parent in the parent process. */ | |
13148 | pid_t | |
13149 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13150 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13151 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13152 | use the same hardware register for all 8 local variables. */ | |
13153 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13154 | || p != p5 || p != p6 || p != p7) | |
13155 | _exit(1); | |
13156 | ||
13157 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13158 | from child file descriptors. If the child closes a descriptor | |
13159 | before it execs or exits, this munges the parent's descriptor | |
13160 | as well. Test for this by closing stdout in the child. */ | |
13161 | _exit(close(fileno(stdout)) != 0); | |
13162 | } else { | |
13163 | int status; | |
13164 | struct stat st; | |
13165 | ||
13166 | while (wait(&status) != child) | |
13167 | ; | |
81ecdfbb | 13168 | return ( |
a9322a30 TT |
13169 | /* Was there some problem with vforking? */ |
13170 | child < 0 | |
13171 | ||
13172 | /* Did the child fail? (This shouldn't happen.) */ | |
13173 | || status | |
13174 | ||
13175 | /* Did the vfork/compiler bug occur? */ | |
13176 | || parent != getpid() | |
13177 | ||
13178 | /* Did the file descriptor bug occur? */ | |
13179 | || fstat(fileno(stdout), &st) != 0 | |
13180 | ); | |
13181 | } | |
13182 | } | |
13183 | _ACEOF | |
81ecdfbb | 13184 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13185 | ac_cv_func_vfork_works=yes |
13186 | else | |
81ecdfbb | 13187 | ac_cv_func_vfork_works=no |
a9322a30 | 13188 | fi |
81ecdfbb RW |
13189 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13190 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13191 | fi |
81ecdfbb | 13192 | |
a9322a30 | 13193 | fi |
81ecdfbb RW |
13194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13195 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13196 | |
13197 | fi; | |
13198 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13199 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13200 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13201 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13202 | fi |
13203 | ||
13204 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13205 | ||
81ecdfbb | 13206 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13207 | |
13208 | else | |
13209 | ||
81ecdfbb | 13210 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13211 | |
13212 | fi | |
13213 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13214 | ||
81ecdfbb | 13215 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13216 | |
13217 | fi | |
13218 | ||
cdf43629 | 13219 | for ac_func in getauxval getrusage getuid getgid \ |
bdca27a2 | 13220 | pipe poll pread pread64 pwrite resize_term \ |
e671cd59 | 13221 | sbrk getpgid setpgid setpgrp setsid \ |
9467110b | 13222 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 13223 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
3332aaf2 | 13224 | setrlimit getrlimit posix_madvise waitpid \ |
4b8b5e72 | 13225 | ptrace64 sigaltstack mkdtemp setns |
81ecdfbb RW |
13226 | do : |
13227 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13228 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13229 | eval as_val=\$$as_ac_var | |
13230 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 13231 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13232 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13233 | _ACEOF |
13234 | ||
13235 | fi | |
13236 | done | |
13237 | ||
13238 | ||
81ecdfbb RW |
13239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
13240 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13241 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
13242 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 13243 | else |
81ecdfbb | 13244 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
13245 | /* end confdefs.h. */ |
13246 | #include <langinfo.h> | |
13247 | int | |
13248 | main () | |
13249 | { | |
13250 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
13251 | ; |
13252 | return 0; | |
13253 | } | |
13254 | _ACEOF | |
81ecdfbb | 13255 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 13256 | am_cv_langinfo_codeset=yes |
a4db0f07 | 13257 | else |
81ecdfbb | 13258 | am_cv_langinfo_codeset=no |
a4db0f07 | 13259 | fi |
81ecdfbb RW |
13260 | rm -f core conftest.err conftest.$ac_objext \ |
13261 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 13262 | |
a4db0f07 | 13263 | fi |
81ecdfbb RW |
13264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
13265 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
13266 | if test $am_cv_langinfo_codeset = yes; then |
13267 | ||
81ecdfbb | 13268 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 13269 | |
6c7a06a3 | 13270 | fi |
c906108c | 13271 | |
06825bd1 | 13272 | |
3266f10b TT |
13273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
13274 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
13275 | if test "${ac_cv_header_stdc+set}" = set; then : | |
13276 | $as_echo_n "(cached) " >&6 | |
13277 | else | |
13278 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13279 | /* end confdefs.h. */ | |
13280 | #include <stdlib.h> | |
13281 | #include <stdarg.h> | |
13282 | #include <string.h> | |
13283 | #include <float.h> | |
13284 | ||
13285 | int | |
13286 | main () | |
13287 | { | |
13288 | ||
13289 | ; | |
13290 | return 0; | |
13291 | } | |
13292 | _ACEOF | |
13293 | if ac_fn_c_try_compile "$LINENO"; then : | |
13294 | ac_cv_header_stdc=yes | |
13295 | else | |
13296 | ac_cv_header_stdc=no | |
13297 | fi | |
13298 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13299 | ||
13300 | if test $ac_cv_header_stdc = yes; then | |
13301 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
13302 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13303 | /* end confdefs.h. */ | |
13304 | #include <string.h> | |
13305 | ||
13306 | _ACEOF | |
13307 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13308 | $EGREP "memchr" >/dev/null 2>&1; then : | |
13309 | ||
13310 | else | |
13311 | ac_cv_header_stdc=no | |
13312 | fi | |
13313 | rm -f conftest* | |
13314 | ||
13315 | fi | |
13316 | ||
13317 | if test $ac_cv_header_stdc = yes; then | |
13318 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
13319 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13320 | /* end confdefs.h. */ | |
13321 | #include <stdlib.h> | |
13322 | ||
13323 | _ACEOF | |
13324 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13325 | $EGREP "free" >/dev/null 2>&1; then : | |
13326 | ||
13327 | else | |
13328 | ac_cv_header_stdc=no | |
13329 | fi | |
13330 | rm -f conftest* | |
13331 | ||
13332 | fi | |
13333 | ||
13334 | if test $ac_cv_header_stdc = yes; then | |
13335 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13336 | if test "$cross_compiling" = yes; then : | |
13337 | : | |
13338 | else | |
13339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13340 | /* end confdefs.h. */ | |
13341 | #include <ctype.h> | |
13342 | #include <stdlib.h> | |
13343 | #if ((' ' & 0x0FF) == 0x020) | |
13344 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13345 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13346 | #else | |
13347 | # define ISLOWER(c) \ | |
13348 | (('a' <= (c) && (c) <= 'i') \ | |
13349 | || ('j' <= (c) && (c) <= 'r') \ | |
13350 | || ('s' <= (c) && (c) <= 'z')) | |
13351 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13352 | #endif | |
13353 | ||
13354 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
13355 | int | |
13356 | main () | |
13357 | { | |
13358 | int i; | |
13359 | for (i = 0; i < 256; i++) | |
13360 | if (XOR (islower (i), ISLOWER (i)) | |
13361 | || toupper (i) != TOUPPER (i)) | |
13362 | return 2; | |
13363 | return 0; | |
13364 | } | |
13365 | _ACEOF | |
13366 | if ac_fn_c_try_run "$LINENO"; then : | |
13367 | ||
13368 | else | |
13369 | ac_cv_header_stdc=no | |
13370 | fi | |
13371 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13372 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13373 | fi | |
13374 | ||
13375 | fi | |
13376 | fi | |
13377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
13378 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13379 | if test $ac_cv_header_stdc = yes; then | |
13380 | ||
13381 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
13382 | ||
3266f10b TT |
13383 | fi |
13384 | ||
13385 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
13386 | # for constant arguments. Useless! | |
13387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
13388 | $as_echo_n "checking for working alloca.h... " >&6; } | |
13389 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
13390 | $as_echo_n "(cached) " >&6 | |
13391 | else | |
13392 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13393 | /* end confdefs.h. */ | |
13394 | #include <alloca.h> | |
13395 | int | |
13396 | main () | |
13397 | { | |
13398 | char *p = (char *) alloca (2 * sizeof (int)); | |
13399 | if (p) return 0; | |
13400 | ; | |
13401 | return 0; | |
13402 | } | |
13403 | _ACEOF | |
13404 | if ac_fn_c_try_link "$LINENO"; then : | |
13405 | ac_cv_working_alloca_h=yes | |
13406 | else | |
13407 | ac_cv_working_alloca_h=no | |
13408 | fi | |
13409 | rm -f core conftest.err conftest.$ac_objext \ | |
13410 | conftest$ac_exeext conftest.$ac_ext | |
13411 | fi | |
13412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
13413 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
13414 | if test $ac_cv_working_alloca_h = yes; then | |
13415 | ||
13416 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
13417 | ||
13418 | fi | |
13419 | ||
13420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
13421 | $as_echo_n "checking for alloca... " >&6; } | |
13422 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
13423 | $as_echo_n "(cached) " >&6 | |
13424 | else | |
13425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13426 | /* end confdefs.h. */ | |
13427 | #ifdef __GNUC__ | |
13428 | # define alloca __builtin_alloca | |
13429 | #else | |
13430 | # ifdef _MSC_VER | |
13431 | # include <malloc.h> | |
13432 | # define alloca _alloca | |
13433 | # else | |
13434 | # ifdef HAVE_ALLOCA_H | |
13435 | # include <alloca.h> | |
13436 | # else | |
13437 | # ifdef _AIX | |
13438 | #pragma alloca | |
13439 | # else | |
13440 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13441 | char *alloca (); | |
13442 | # endif | |
13443 | # endif | |
13444 | # endif | |
13445 | # endif | |
13446 | #endif | |
13447 | ||
13448 | int | |
13449 | main () | |
13450 | { | |
13451 | char *p = (char *) alloca (1); | |
13452 | if (p) return 0; | |
13453 | ; | |
13454 | return 0; | |
13455 | } | |
13456 | _ACEOF | |
13457 | if ac_fn_c_try_link "$LINENO"; then : | |
13458 | ac_cv_func_alloca_works=yes | |
13459 | else | |
13460 | ac_cv_func_alloca_works=no | |
13461 | fi | |
13462 | rm -f core conftest.err conftest.$ac_objext \ | |
13463 | conftest$ac_exeext conftest.$ac_ext | |
13464 | fi | |
13465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
13466 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
13467 | ||
13468 | if test $ac_cv_func_alloca_works = yes; then | |
13469 | ||
13470 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
13471 | ||
13472 | else | |
13473 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13474 | # that cause trouble. Some versions do not even contain alloca or | |
13475 | # contain a buggy version. If you still want to use their alloca, | |
13476 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
13477 | ||
13478 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
13479 | ||
13480 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
13481 | ||
13482 | ||
13483 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
13484 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13485 | if test "${ac_cv_os_cray+set}" = set; then : | |
13486 | $as_echo_n "(cached) " >&6 | |
13487 | else | |
13488 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13489 | /* end confdefs.h. */ | |
13490 | #if defined CRAY && ! defined CRAY2 | |
13491 | webecray | |
13492 | #else | |
13493 | wenotbecray | |
13494 | #endif | |
13495 | ||
13496 | _ACEOF | |
13497 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13498 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13499 | ac_cv_os_cray=yes | |
13500 | else | |
13501 | ac_cv_os_cray=no | |
13502 | fi | |
13503 | rm -f conftest* | |
13504 | ||
13505 | fi | |
13506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13507 | $as_echo "$ac_cv_os_cray" >&6; } | |
13508 | if test $ac_cv_os_cray = yes; then | |
13509 | for ac_func in _getb67 GETB67 getb67; do | |
13510 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13511 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13512 | eval as_val=\$$as_ac_var | |
13513 | if test "x$as_val" = x""yes; then : | |
13514 | ||
13515 | cat >>confdefs.h <<_ACEOF | |
13516 | #define CRAY_STACKSEG_END $ac_func | |
13517 | _ACEOF | |
13518 | ||
13519 | break | |
13520 | fi | |
13521 | ||
13522 | done | |
13523 | fi | |
13524 | ||
13525 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13526 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13527 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
13528 | $as_echo_n "(cached) " >&6 | |
13529 | else | |
13530 | if test "$cross_compiling" = yes; then : | |
13531 | ac_cv_c_stack_direction=0 | |
13532 | else | |
13533 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13534 | /* end confdefs.h. */ | |
13535 | $ac_includes_default | |
13536 | int | |
13537 | find_stack_direction () | |
13538 | { | |
13539 | static char *addr = 0; | |
13540 | auto char dummy; | |
13541 | if (addr == 0) | |
13542 | { | |
13543 | addr = &dummy; | |
13544 | return find_stack_direction (); | |
13545 | } | |
13546 | else | |
13547 | return (&dummy > addr) ? 1 : -1; | |
13548 | } | |
13549 | ||
13550 | int | |
13551 | main () | |
13552 | { | |
13553 | return find_stack_direction () < 0; | |
13554 | } | |
13555 | _ACEOF | |
13556 | if ac_fn_c_try_run "$LINENO"; then : | |
13557 | ac_cv_c_stack_direction=1 | |
13558 | else | |
13559 | ac_cv_c_stack_direction=-1 | |
13560 | fi | |
13561 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13562 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13563 | fi | |
13564 | ||
13565 | fi | |
13566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13567 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13568 | cat >>confdefs.h <<_ACEOF | |
13569 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13570 | _ACEOF | |
13571 | ||
13572 | ||
13573 | fi | |
13574 | ||
13575 | ||
13576 | ||
13577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13578 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13579 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
13580 | $as_echo_n "(cached) " >&6 | |
13581 | else | |
13582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13583 | /* end confdefs.h. */ | |
13584 | #include <langinfo.h> | |
13585 | int | |
13586 | main () | |
13587 | { | |
13588 | char* cs = nl_langinfo(CODESET); | |
13589 | ; | |
13590 | return 0; | |
13591 | } | |
13592 | _ACEOF | |
13593 | if ac_fn_c_try_link "$LINENO"; then : | |
13594 | am_cv_langinfo_codeset=yes | |
13595 | else | |
13596 | am_cv_langinfo_codeset=no | |
13597 | fi | |
13598 | rm -f core conftest.err conftest.$ac_objext \ | |
13599 | conftest$ac_exeext conftest.$ac_ext | |
13600 | ||
13601 | fi | |
13602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13603 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13604 | if test $am_cv_langinfo_codeset = yes; then | |
13605 | ||
13606 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13607 | ||
13608 | fi | |
13609 | ||
13610 | ||
44122162 | 13611 | for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h |
3266f10b TT |
13612 | do : |
13613 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13614 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13615 | eval as_val=\$$as_ac_Header | |
13616 | if test "x$as_val" = x""yes; then : | |
13617 | cat >>confdefs.h <<_ACEOF | |
13618 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13619 | _ACEOF | |
13620 | ||
13621 | fi | |
13622 | ||
13623 | done | |
13624 | ||
13625 | ||
f348d89a | 13626 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction |
3266f10b TT |
13627 | do : |
13628 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13629 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13630 | eval as_val=\$$as_ac_var | |
13631 | if test "x$as_val" = x""yes; then : | |
13632 | cat >>confdefs.h <<_ACEOF | |
13633 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13634 | _ACEOF | |
13635 | ||
13636 | fi | |
13637 | done | |
13638 | ||
13639 | ||
13640 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
13641 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
13642 | ac_have_decl=1 | |
13643 | else | |
13644 | ac_have_decl=0 | |
13645 | fi | |
13646 | ||
13647 | cat >>confdefs.h <<_ACEOF | |
13648 | #define HAVE_DECL_STRERROR $ac_have_decl | |
13649 | _ACEOF | |
13650 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
13651 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
13652 | ac_have_decl=1 | |
13653 | else | |
13654 | ac_have_decl=0 | |
13655 | fi | |
13656 | ||
13657 | cat >>confdefs.h <<_ACEOF | |
13658 | #define HAVE_DECL_STRSTR $ac_have_decl | |
13659 | _ACEOF | |
13660 | ||
13661 | ||
e9bcb658 GB |
13662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
13663 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
13664 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
13665 | $as_echo_n "(cached) " >&6 | |
13666 | else | |
13667 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13668 | /* end confdefs.h. */ | |
13669 | ||
13670 | #include <setjmp.h> | |
13671 | ||
13672 | int | |
13673 | main () | |
13674 | { | |
13675 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
13676 | ; | |
13677 | return 0; | |
13678 | } | |
13679 | _ACEOF | |
13680 | if ac_fn_c_try_compile "$LINENO"; then : | |
13681 | gdb_cv_func_sigsetjmp=yes | |
13682 | else | |
13683 | gdb_cv_func_sigsetjmp=no | |
13684 | fi | |
13685 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13686 | fi | |
13687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
13688 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
13689 | if test $gdb_cv_func_sigsetjmp = yes; then | |
13690 | ||
13691 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
13692 | ||
13693 | fi | |
13694 | ||
3266f10b | 13695 | |
54019719 PA |
13696 | # Check the return and argument types of ptrace. |
13697 | ||
13698 | ||
54019719 PA |
13699 | for ac_header in sys/ptrace.h ptrace.h |
13700 | do : | |
13701 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13702 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13703 | eval as_val=\$$as_ac_Header | |
13704 | if test "x$as_val" = x""yes; then : | |
13705 | cat >>confdefs.h <<_ACEOF | |
13706 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13707 | _ACEOF | |
13708 | ||
13709 | fi | |
13710 | ||
13711 | done | |
13712 | ||
13713 | ||
a3828db0 | 13714 | gdb_ptrace_headers=' |
4ff70b84 | 13715 | #include <sys/types.h> |
a3828db0 MK |
13716 | #if HAVE_SYS_PTRACE_H |
13717 | # include <sys/ptrace.h> | |
13718 | #endif | |
13719 | #if HAVE_UNISTD_H | |
13720 | # include <unistd.h> | |
13721 | #endif | |
13722 | ' | |
13723 | # There is no point in checking if we don't have a prototype. | |
9b30624b | 13724 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
81ecdfbb RW |
13725 | " |
13726 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
13727 | ac_have_decl=1 | |
06825bd1 | 13728 | else |
81ecdfbb | 13729 | ac_have_decl=0 |
06825bd1 | 13730 | fi |
06825bd1 | 13731 | |
a3828db0 | 13732 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13733 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 13734 | _ACEOF |
81ecdfbb | 13735 | if test $ac_have_decl = 1; then : |
bec39cab | 13736 | |
a3828db0 | 13737 | else |
a3828db0 MK |
13738 | |
13739 | : ${gdb_cv_func_ptrace_ret='int'} | |
13740 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13741 | ||
06825bd1 MK |
13742 | fi |
13743 | ||
064ef605 DJ |
13744 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
13745 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
13746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
13747 | $as_echo_n "checking return type of ptrace... " >&6; } | |
13748 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
13749 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13750 | else |
81ecdfbb | 13751 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13752 | /* end confdefs.h. */ |
a3828db0 | 13753 | $gdb_ptrace_headers |
bec39cab AC |
13754 | int |
13755 | main () | |
13756 | { | |
064ef605 DJ |
13757 | extern long ptrace (enum __ptrace_request, ...); |
13758 | ; | |
13759 | return 0; | |
13760 | } | |
13761 | _ACEOF | |
9b30624b | 13762 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
13763 | gdb_cv_func_ptrace_ret='long' |
13764 | else | |
81ecdfbb | 13765 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13766 | /* end confdefs.h. */ |
13767 | $gdb_ptrace_headers | |
13768 | int | |
13769 | main () | |
13770 | { | |
a3828db0 | 13771 | extern int ptrace (); |
bec39cab AC |
13772 | ; |
13773 | return 0; | |
13774 | } | |
13775 | _ACEOF | |
9b30624b | 13776 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13777 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 13778 | else |
81ecdfbb | 13779 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 13780 | fi |
81ecdfbb | 13781 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 13782 | fi |
81ecdfbb | 13783 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 13784 | fi |
81ecdfbb RW |
13785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
13786 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 13787 | |
a3828db0 MK |
13788 | cat >>confdefs.h <<_ACEOF |
13789 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 13790 | _ACEOF |
70f9f479 | 13791 | |
a3828db0 | 13792 | # Check argument types. |
81ecdfbb RW |
13793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
13794 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
13795 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
13796 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13797 | else |
a3828db0 | 13798 | |
81ecdfbb | 13799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13800 | /* end confdefs.h. */ |
13801 | $gdb_ptrace_headers | |
13802 | int | |
13803 | main () | |
13804 | { | |
13805 | extern long ptrace (enum __ptrace_request, ...); | |
13806 | ; | |
13807 | return 0; | |
13808 | } | |
13809 | _ACEOF | |
9b30624b | 13810 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 13811 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
064ef605 | 13812 | else |
064ef605 | 13813 | |
a3828db0 MK |
13814 | for gdb_arg1 in 'int' 'long'; do |
13815 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 13816 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 13817 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 13818 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13819 | /* end confdefs.h. */ |
a3828db0 | 13820 | $gdb_ptrace_headers |
bec39cab AC |
13821 | int |
13822 | main () | |
13823 | { | |
a3828db0 MK |
13824 | |
13825 | extern $gdb_cv_func_ptrace_ret | |
13826 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
13827 | ||
bec39cab AC |
13828 | ; |
13829 | return 0; | |
13830 | } | |
13831 | _ACEOF | |
9b30624b | 13832 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13833 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
13834 | break 4; | |
5c7f2947 | 13835 | fi |
81ecdfbb | 13836 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 13837 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 13838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13839 | /* end confdefs.h. */ |
a3828db0 | 13840 | $gdb_ptrace_headers |
bec39cab AC |
13841 | int |
13842 | main () | |
13843 | { | |
a3828db0 MK |
13844 | |
13845 | extern $gdb_cv_func_ptrace_ret | |
13846 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
13847 | ||
bec39cab AC |
13848 | ; |
13849 | return 0; | |
13850 | } | |
13851 | _ACEOF | |
9b30624b | 13852 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13853 | |
13854 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
13855 | break 5; | |
78434e59 | 13856 | fi |
81ecdfbb | 13857 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
13858 | done |
13859 | done | |
13860 | done | |
13861 | done | |
13862 | done | |
13863 | # Provide a safe default value. | |
13864 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13865 | ||
064ef605 | 13866 | fi |
81ecdfbb | 13867 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 13868 | fi |
81ecdfbb RW |
13869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
13870 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
13871 | ac_save_IFS=$IFS; IFS=',' |
13872 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
13873 | IFS=$ac_save_IFS | |
13874 | shift | |
bec39cab | 13875 | |
54019719 PA |
13876 | cat >>confdefs.h <<_ACEOF |
13877 | #define PTRACE_TYPE_ARG1 $1 | |
13878 | _ACEOF | |
13879 | ||
13880 | ||
a3828db0 MK |
13881 | cat >>confdefs.h <<_ACEOF |
13882 | #define PTRACE_TYPE_ARG3 $3 | |
13883 | _ACEOF | |
13884 | ||
96d7229d LM |
13885 | |
13886 | cat >>confdefs.h <<_ACEOF | |
13887 | #define PTRACE_TYPE_ARG4 $4 | |
13888 | _ACEOF | |
13889 | ||
a3828db0 MK |
13890 | if test -n "$5"; then |
13891 | ||
13892 | cat >>confdefs.h <<_ACEOF | |
13893 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 13894 | _ACEOF |
78434e59 MK |
13895 | |
13896 | fi | |
13897 | ||
54019719 | 13898 | |
a3828db0 | 13899 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
13900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13901 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13902 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13903 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 13904 | else |
81ecdfbb RW |
13905 | if test "$cross_compiling" = yes; then : |
13906 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 13907 | else |
81ecdfbb | 13908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13909 | /* end confdefs.h. */ |
81ecdfbb | 13910 | $ac_includes_default |
bec39cab AC |
13911 | int |
13912 | main () | |
13913 | { | |
a3828db0 MK |
13914 | /* If this system has a BSD-style setpgrp which takes arguments, |
13915 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
13916 | exit successfully. */ | |
81ecdfbb | 13917 | return setpgrp (1,1) != -1; |
bec39cab AC |
13918 | ; |
13919 | return 0; | |
13920 | } | |
13921 | _ACEOF | |
81ecdfbb | 13922 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 13923 | ac_cv_func_setpgrp_void=no |
c906108c | 13924 | else |
81ecdfbb | 13925 | ac_cv_func_setpgrp_void=yes |
c906108c | 13926 | fi |
81ecdfbb RW |
13927 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13928 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13929 | fi |
81ecdfbb | 13930 | |
a3828db0 | 13931 | fi |
81ecdfbb RW |
13932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13933 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
13934 | if test $ac_cv_func_setpgrp_void = yes; then |
13935 | ||
81ecdfbb | 13936 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
13937 | |
13938 | fi | |
a3828db0 MK |
13939 | |
13940 | else | |
81ecdfbb RW |
13941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13942 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13943 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13944 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13945 | else |
81ecdfbb | 13946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13947 | /* end confdefs.h. */ |
a3828db0 MK |
13948 | |
13949 | #include <unistd.h> | |
13950 | ||
bec39cab AC |
13951 | int |
13952 | main () | |
13953 | { | |
a3828db0 MK |
13954 | |
13955 | if (setpgrp(1,1) == -1) | |
13956 | exit (0); | |
13957 | else | |
13958 | exit (1); | |
13959 | ||
bec39cab AC |
13960 | ; |
13961 | return 0; | |
13962 | } | |
13963 | _ACEOF | |
81ecdfbb | 13964 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13965 | ac_cv_func_setpgrp_void=no |
c906108c | 13966 | else |
81ecdfbb | 13967 | ac_cv_func_setpgrp_void=yes |
c906108c | 13968 | fi |
81ecdfbb | 13969 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13970 | fi |
81ecdfbb RW |
13971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13972 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 13973 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 13974 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 13975 | |
a3828db0 | 13976 | fi |
c906108c SS |
13977 | fi |
13978 | ||
db1ff28b JK |
13979 | # Assume we'll default to using the included libiberty regex. |
13980 | gdb_use_included_regex=yes | |
13981 | ||
13982 | # However, if the system regex is GNU regex, then default to *not* | |
13983 | # using the included regex. | |
13984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
13985 | $as_echo_n "checking for GNU regex... " >&6; } | |
13986 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
13987 | $as_echo_n "(cached) " >&6 | |
13988 | else | |
13989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13990 | /* end confdefs.h. */ | |
13991 | #include <gnu-versions.h> | |
13992 | int | |
13993 | main () | |
13994 | { | |
13995 | #define REGEX_INTERFACE_VERSION 1 | |
13996 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
13997 | # error "Version mismatch" | |
13998 | #endif | |
13999 | ; | |
14000 | return 0; | |
14001 | } | |
14002 | _ACEOF | |
14003 | if ac_fn_c_try_compile "$LINENO"; then : | |
14004 | gdb_cv_have_gnu_regex=yes | |
14005 | else | |
14006 | gdb_cv_have_gnu_regex=no | |
14007 | fi | |
14008 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14009 | fi | |
14010 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
14011 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
14012 | if test $gdb_cv_have_gnu_regex = yes; then | |
14013 | gdb_use_included_regex=no | |
14014 | fi | |
14015 | ||
14016 | ||
14017 | # Check whether --with-included-regex was given. | |
14018 | if test "${with_included_regex+set}" = set; then : | |
14019 | withval=$with_included_regex; gdb_with_regex=$withval | |
14020 | else | |
14021 | gdb_with_regex=$gdb_use_included_regex | |
14022 | fi | |
14023 | ||
14024 | if test "$gdb_with_regex" = yes; then | |
14025 | ||
14026 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
14027 | ||
14028 | fi | |
14029 | ||
81ecdfbb RW |
14030 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
14031 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
14032 | #include <sys/proc.h> | |
14033 | ||
14034 | " | |
14035 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 14036 | |
5c45e068 | 14037 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 14038 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 14039 | _ACEOF |
c906108c | 14040 | |
5c45e068 | 14041 | |
97bf5e38 | 14042 | fi |
c906108c | 14043 | |
5c45e068 | 14044 | |
a3828db0 | 14045 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
14046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
14047 | $as_echo_n "checking for struct lwp... " >&6; } | |
14048 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
14049 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14050 | else |
81ecdfbb | 14051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14052 | /* end confdefs.h. */ |
a3828db0 | 14053 | #include <sys/param.h> |
c49fbc6c | 14054 | #define _KMEMUSER |
a3828db0 | 14055 | #include <sys/lwp.h> |
bec39cab AC |
14056 | int |
14057 | main () | |
14058 | { | |
a3828db0 | 14059 | struct lwp l; |
bec39cab AC |
14060 | ; |
14061 | return 0; | |
14062 | } | |
14063 | _ACEOF | |
81ecdfbb | 14064 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14065 | gdb_cv_struct_lwp=yes |
c906108c | 14066 | else |
81ecdfbb | 14067 | gdb_cv_struct_lwp=no |
c906108c | 14068 | fi |
81ecdfbb | 14069 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14070 | fi |
81ecdfbb RW |
14071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
14072 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 14073 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 14074 | |
81ecdfbb | 14075 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 14076 | |
97bf5e38 | 14077 | fi |
c906108c | 14078 | |
a3828db0 | 14079 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
14080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
14081 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
14082 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
14083 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14084 | else |
81ecdfbb | 14085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14086 | /* end confdefs.h. */ |
a3828db0 MK |
14087 | #include <sys/types.h> |
14088 | #include <machine/reg.h> | |
bec39cab AC |
14089 | int |
14090 | main () | |
14091 | { | |
a3828db0 | 14092 | struct reg r; |
bec39cab AC |
14093 | ; |
14094 | return 0; | |
14095 | } | |
14096 | _ACEOF | |
81ecdfbb | 14097 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14098 | gdb_cv_struct_reg=yes |
27ca5dad | 14099 | else |
81ecdfbb | 14100 | gdb_cv_struct_reg=no |
27ca5dad | 14101 | fi |
81ecdfbb | 14102 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 14103 | fi |
81ecdfbb RW |
14104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
14105 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 14106 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 14107 | |
81ecdfbb | 14108 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
14109 | |
14110 | fi | |
97bf5e38 | 14111 | |
a3828db0 MK |
14112 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
14113 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
a6e69c1f JB |
14114 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> |
14115 | #include <machine/reg.h> | |
81ecdfbb RW |
14116 | " |
14117 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
14118 | |
14119 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14120 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 14121 | _ACEOF |
3862412b | 14122 | |
5c45e068 | 14123 | |
97bf5e38 | 14124 | fi |
a6e69c1f JB |
14125 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> |
14126 | #include <machine/reg.h> | |
81ecdfbb RW |
14127 | " |
14128 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
14129 | |
14130 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14131 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 14132 | _ACEOF |
3862412b | 14133 | |
5c45e068 | 14134 | |
97bf5e38 | 14135 | fi |
3862412b | 14136 | |
5c45e068 | 14137 | |
6fea9e18 L |
14138 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
14139 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
14140 | # `struct user_regs_struct'. | |
f517c180 EA |
14141 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h> |
14142 | #include <sys/user.h> | |
6fea9e18 L |
14143 | " |
14144 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
14145 | ||
14146 | cat >>confdefs.h <<_ACEOF | |
14147 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
14148 | _ACEOF | |
14149 | ||
14150 | ||
14151 | fi | |
f517c180 EA |
14152 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h> |
14153 | #include <sys/user.h> | |
6fea9e18 L |
14154 | " |
14155 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
14156 | ||
14157 | cat >>confdefs.h <<_ACEOF | |
14158 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
14159 | _ACEOF | |
14160 | ||
14161 | ||
14162 | fi | |
14163 | ||
14164 | ||
a3828db0 | 14165 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
14166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
14167 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
14168 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
14169 | $as_echo_n "(cached) " >&6 | |
451928c5 | 14170 | else |
81ecdfbb | 14171 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14172 | /* end confdefs.h. */ |
a3828db0 | 14173 | #include <sys/ptrace.h> |
bec39cab AC |
14174 | int |
14175 | main () | |
14176 | { | |
a3828db0 | 14177 | PTRACE_GETREGS; |
bec39cab AC |
14178 | ; |
14179 | return 0; | |
14180 | } | |
14181 | _ACEOF | |
81ecdfbb | 14182 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14183 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 14184 | else |
81ecdfbb | 14185 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 14186 | fi |
81ecdfbb | 14187 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14188 | fi |
14189 | ||
81ecdfbb RW |
14190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
14191 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 14192 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 14193 | |
81ecdfbb | 14194 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 14195 | |
97bf5e38 | 14196 | fi |
451928c5 | 14197 | |
a3828db0 | 14198 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
14199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
14200 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
14201 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
14202 | $as_echo_n "(cached) " >&6 | |
451928c5 | 14203 | else |
81ecdfbb | 14204 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14205 | /* end confdefs.h. */ |
a3828db0 | 14206 | #include <sys/ptrace.h> |
bec39cab AC |
14207 | int |
14208 | main () | |
14209 | { | |
a3828db0 | 14210 | PTRACE_GETFPXREGS; |
bec39cab AC |
14211 | ; |
14212 | return 0; | |
14213 | } | |
14214 | _ACEOF | |
81ecdfbb | 14215 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14216 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 14217 | else |
81ecdfbb | 14218 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 14219 | fi |
81ecdfbb | 14220 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14221 | fi |
14222 | ||
81ecdfbb RW |
14223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
14224 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 14225 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 14226 | |
81ecdfbb | 14227 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 14228 | |
97bf5e38 | 14229 | fi |
451928c5 | 14230 | |
a3828db0 | 14231 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
14232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
14233 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
14234 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
14235 | $as_echo_n "(cached) " >&6 | |
3862412b | 14236 | else |
81ecdfbb | 14237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14238 | /* end confdefs.h. */ |
a3828db0 MK |
14239 | #include <sys/types.h> |
14240 | #include <sys/ptrace.h> | |
bec39cab AC |
14241 | int |
14242 | main () | |
14243 | { | |
a3828db0 | 14244 | PT_GETDBREGS; |
bec39cab AC |
14245 | ; |
14246 | return 0; | |
14247 | } | |
14248 | _ACEOF | |
81ecdfbb | 14249 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14250 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 14251 | else |
81ecdfbb | 14252 | gdb_cv_have_pt_getdbregs=no |
3862412b | 14253 | fi |
81ecdfbb | 14254 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14255 | fi |
14256 | ||
81ecdfbb RW |
14257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
14258 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 14259 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 14260 | |
81ecdfbb | 14261 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 14262 | |
97bf5e38 | 14263 | fi |
3862412b | 14264 | |
a3828db0 | 14265 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
14266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
14267 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
14268 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
14269 | $as_echo_n "(cached) " >&6 | |
3862412b | 14270 | else |
81ecdfbb | 14271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14272 | /* end confdefs.h. */ |
a3828db0 MK |
14273 | #include <sys/types.h> |
14274 | #include <sys/ptrace.h> | |
bec39cab AC |
14275 | int |
14276 | main () | |
14277 | { | |
a3828db0 | 14278 | PT_GETXMMREGS; |
bec39cab AC |
14279 | ; |
14280 | return 0; | |
14281 | } | |
14282 | _ACEOF | |
81ecdfbb | 14283 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14284 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 14285 | else |
81ecdfbb | 14286 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 14287 | fi |
81ecdfbb | 14288 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14289 | fi |
14290 | ||
81ecdfbb RW |
14291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
14292 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 14293 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 14294 | |
81ecdfbb | 14295 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 14296 | |
97bf5e38 | 14297 | fi |
3862412b | 14298 | |
6e9567fe JB |
14299 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
14300 | # Older FreeBSD versions don't have the pl_tdname member of | |
14301 | # `struct ptrace_lwpinfo'. | |
14302 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
14303 | " | |
14304 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then : | |
14305 | ||
14306 | cat >>confdefs.h <<_ACEOF | |
14307 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
14308 | _ACEOF | |
14309 | ||
14310 | ||
14311 | fi | |
14312 | ||
14313 | ||
e6cdd38e JB |
14314 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
14315 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
14316 | # FreeBSD 10.3. | |
14317 | 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> | |
14318 | " | |
14319 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then : | |
14320 | ||
14321 | cat >>confdefs.h <<_ACEOF | |
14322 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
14323 | _ACEOF | |
14324 | ||
14325 | ||
14326 | fi | |
14327 | ||
6e9567fe | 14328 | |
97bf5e38 | 14329 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
81ecdfbb RW |
14330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
14331 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
14332 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
14333 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 14334 | else |
81ecdfbb | 14335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14336 | /* end confdefs.h. */ |
596c9d4b KB |
14337 | |
14338 | #define _SYSCALL32 | |
d30c5336 JK |
14339 | /* Needed for new procfs interface on sparc-solaris. */ |
14340 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 14341 | #include <sys/procfs.h> |
bec39cab AC |
14342 | int |
14343 | main () | |
14344 | { | |
97bf5e38 | 14345 | gregset_t avar |
bec39cab AC |
14346 | ; |
14347 | return 0; | |
14348 | } | |
14349 | _ACEOF | |
81ecdfbb | 14350 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14351 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 14352 | else |
81ecdfbb | 14353 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 14354 | |
596c9d4b | 14355 | fi |
81ecdfbb | 14356 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
14357 | fi |
14358 | ||
97bf5e38 | 14359 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 14360 | |
81ecdfbb | 14361 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
14362 | |
14363 | fi | |
81ecdfbb RW |
14364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
14365 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 14366 | |
81ecdfbb RW |
14367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
14368 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
14369 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
14370 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 14371 | else |
81ecdfbb | 14372 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14373 | /* end confdefs.h. */ |
97bf5e38 MK |
14374 | |
14375 | #define _SYSCALL32 | |
d30c5336 JK |
14376 | /* Needed for new procfs interface on sparc-solaris. */ |
14377 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 14378 | #include <sys/procfs.h> |
bec39cab AC |
14379 | int |
14380 | main () | |
14381 | { | |
97bf5e38 | 14382 | fpregset_t avar |
bec39cab AC |
14383 | ; |
14384 | return 0; | |
14385 | } | |
14386 | _ACEOF | |
81ecdfbb | 14387 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14388 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 14389 | else |
81ecdfbb | 14390 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 14391 | |
d84dd0c5 | 14392 | fi |
81ecdfbb | 14393 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
14394 | fi |
14395 | ||
97bf5e38 | 14396 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 14397 | |
81ecdfbb | 14398 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 14399 | |
97bf5e38 | 14400 | fi |
81ecdfbb RW |
14401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
14402 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 14403 | |
81ecdfbb RW |
14404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
14405 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
14406 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
14407 | $as_echo_n "(cached) " >&6 | |
c906108c | 14408 | else |
81ecdfbb | 14409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14410 | /* end confdefs.h. */ |
c906108c | 14411 | |
97bf5e38 | 14412 | #define _SYSCALL32 |
d30c5336 JK |
14413 | /* Needed for new procfs interface on sparc-solaris. */ |
14414 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14415 | #include <sys/procfs.h> |
bec39cab AC |
14416 | int |
14417 | main () | |
14418 | { | |
97bf5e38 | 14419 | prgregset_t avar |
bec39cab AC |
14420 | ; |
14421 | return 0; | |
14422 | } | |
14423 | _ACEOF | |
81ecdfbb | 14424 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14425 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 14426 | else |
81ecdfbb | 14427 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 14428 | |
c906108c | 14429 | fi |
81ecdfbb | 14430 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14431 | fi |
14432 | ||
97bf5e38 | 14433 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 14434 | |
81ecdfbb | 14435 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 14436 | |
97bf5e38 | 14437 | fi |
81ecdfbb RW |
14438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
14439 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 14440 | |
81ecdfbb RW |
14441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
14442 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
14443 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
14444 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14445 | else |
81ecdfbb | 14446 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14447 | /* end confdefs.h. */ |
97bf5e38 MK |
14448 | |
14449 | #define _SYSCALL32 | |
d30c5336 JK |
14450 | /* Needed for new procfs interface on sparc-solaris. */ |
14451 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14452 | #include <sys/procfs.h> |
bec39cab AC |
14453 | int |
14454 | main () | |
14455 | { | |
97bf5e38 | 14456 | prfpregset_t avar |
bec39cab AC |
14457 | ; |
14458 | return 0; | |
14459 | } | |
14460 | _ACEOF | |
81ecdfbb | 14461 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14462 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 14463 | else |
81ecdfbb | 14464 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 14465 | |
d45fe813 | 14466 | fi |
81ecdfbb | 14467 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14468 | fi |
14469 | ||
97bf5e38 | 14470 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 14471 | |
81ecdfbb | 14472 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 14473 | |
97bf5e38 | 14474 | fi |
81ecdfbb RW |
14475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
14476 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 14477 | |
81ecdfbb RW |
14478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
14479 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
14480 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
14481 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14482 | else |
81ecdfbb | 14483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14484 | /* end confdefs.h. */ |
97bf5e38 MK |
14485 | |
14486 | #define _SYSCALL32 | |
d30c5336 JK |
14487 | /* Needed for new procfs interface on sparc-solaris. */ |
14488 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14489 | #include <sys/procfs.h> |
bec39cab AC |
14490 | int |
14491 | main () | |
14492 | { | |
97bf5e38 | 14493 | prgregset32_t avar |
bec39cab AC |
14494 | ; |
14495 | return 0; | |
14496 | } | |
14497 | _ACEOF | |
81ecdfbb | 14498 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14499 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 14500 | else |
81ecdfbb | 14501 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 14502 | |
d45fe813 | 14503 | fi |
81ecdfbb | 14504 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14505 | fi |
14506 | ||
97bf5e38 | 14507 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 14508 | |
81ecdfbb | 14509 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 14510 | |
97bf5e38 | 14511 | fi |
81ecdfbb RW |
14512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
14513 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 14514 | |
81ecdfbb RW |
14515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
14516 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
14517 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
14518 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14519 | else |
81ecdfbb | 14520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14521 | /* end confdefs.h. */ |
97bf5e38 | 14522 | |
d45fe813 | 14523 | #define _SYSCALL32 |
d30c5336 JK |
14524 | /* Needed for new procfs interface on sparc-solaris. */ |
14525 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14526 | #include <sys/procfs.h> |
bec39cab AC |
14527 | int |
14528 | main () | |
14529 | { | |
97bf5e38 | 14530 | lwpid_t avar |
bec39cab AC |
14531 | ; |
14532 | return 0; | |
14533 | } | |
14534 | _ACEOF | |
81ecdfbb | 14535 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14536 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 14537 | else |
81ecdfbb | 14538 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 14539 | |
d45fe813 | 14540 | fi |
81ecdfbb | 14541 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14542 | fi |
14543 | ||
97bf5e38 | 14544 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 14545 | |
81ecdfbb | 14546 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 14547 | |
97bf5e38 | 14548 | fi |
81ecdfbb RW |
14549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
14550 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 14551 | |
81ecdfbb RW |
14552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
14553 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
14554 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
14555 | $as_echo_n "(cached) " >&6 | |
c906108c | 14556 | else |
81ecdfbb | 14557 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14558 | /* end confdefs.h. */ |
c906108c | 14559 | |
97bf5e38 | 14560 | #define _SYSCALL32 |
d30c5336 JK |
14561 | /* Needed for new procfs interface on sparc-solaris. */ |
14562 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14563 | #include <sys/procfs.h> |
bec39cab AC |
14564 | int |
14565 | main () | |
14566 | { | |
97bf5e38 | 14567 | psaddr_t avar |
bec39cab AC |
14568 | ; |
14569 | return 0; | |
14570 | } | |
14571 | _ACEOF | |
81ecdfbb | 14572 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14573 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 14574 | else |
81ecdfbb | 14575 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 14576 | |
c906108c | 14577 | fi |
81ecdfbb | 14578 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14579 | fi |
14580 | ||
97bf5e38 | 14581 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 14582 | |
81ecdfbb | 14583 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 14584 | |
97bf5e38 | 14585 | fi |
81ecdfbb RW |
14586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
14587 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 14588 | |
97bf5e38 MK |
14589 | |
14590 | ||
14591 | ||
97bf5e38 | 14592 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
14593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
14594 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
14595 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
14596 | $as_echo_n "(cached) " >&6 | |
c906108c | 14597 | else |
81ecdfbb | 14598 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 14599 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 14600 | else |
81ecdfbb | 14601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14602 | /* end confdefs.h. */ |
97bf5e38 MK |
14603 | #include <sys/procfs.h> |
14604 | int main () | |
14605 | { | |
14606 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
14607 | return 1; | |
14608 | return 0; | |
14609 | } | |
bec39cab | 14610 | _ACEOF |
81ecdfbb | 14611 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14612 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
14613 | else |
14614 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 14615 | fi |
81ecdfbb RW |
14616 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14617 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14618 | fi |
81ecdfbb | 14619 | |
c906108c SS |
14620 | fi |
14621 | ||
81ecdfbb RW |
14622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
14623 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 14624 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 14625 | |
81ecdfbb | 14626 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 14627 | |
97bf5e38 MK |
14628 | fi |
14629 | fi | |
c906108c | 14630 | fi |
c906108c | 14631 | |
bc8bcb4b | 14632 | # Check if the compiler supports the `long long' type. |
c906108c | 14633 | |
81ecdfbb RW |
14634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
14635 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
14636 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
14637 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14638 | else |
81ecdfbb | 14639 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14640 | /* end confdefs.h. */ |
bc8bcb4b | 14641 | extern long long foo; |
bec39cab AC |
14642 | int |
14643 | main () | |
14644 | { | |
bc8bcb4b | 14645 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
14646 | ; |
14647 | return 0; | |
14648 | } | |
14649 | _ACEOF | |
81ecdfbb | 14650 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14651 | gdb_cv_c_long_long=yes |
14652 | else | |
81ecdfbb | 14653 | gdb_cv_c_long_long=no |
97bf5e38 | 14654 | fi |
81ecdfbb | 14655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14656 | fi |
81ecdfbb RW |
14657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
14658 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
14659 | if test $gdb_cv_c_long_long != yes; then |
14660 | # libdecnumber requires long long. | |
14661 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
14662 | fi |
14663 | ||
bc8bcb4b | 14664 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 14665 | |
81ecdfbb RW |
14666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
14667 | $as_echo_n "checking for long long support in printf... " >&6; } | |
14668 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
14669 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14670 | else |
81ecdfbb | 14671 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14672 | gdb_cv_printf_has_long_long=no |
14673 | else | |
81ecdfbb | 14674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14675 | /* end confdefs.h. */ |
bc8bcb4b MK |
14676 | $ac_includes_default |
14677 | int | |
14678 | main () | |
14679 | { | |
14680 | char buf[32]; | |
97bf5e38 MK |
14681 | long long l = 0; |
14682 | l = (l << 16) + 0x0123; | |
14683 | l = (l << 16) + 0x4567; | |
14684 | l = (l << 16) + 0x89ab; | |
14685 | l = (l << 16) + 0xcdef; | |
14686 | sprintf (buf, "0x%016llx", l); | |
14687 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
14688 | ; |
14689 | return 0; | |
c906108c | 14690 | } |
bec39cab | 14691 | _ACEOF |
81ecdfbb | 14692 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14693 | gdb_cv_printf_has_long_long=yes |
14694 | else | |
81ecdfbb | 14695 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 14696 | fi |
81ecdfbb RW |
14697 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14698 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14699 | fi |
81ecdfbb | 14700 | |
97bf5e38 | 14701 | fi |
81ecdfbb RW |
14702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
14703 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 14704 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 14705 | |
81ecdfbb | 14706 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14707 | |
14708 | fi | |
97bf5e38 | 14709 | |
1a619819 LM |
14710 | # Check if the compiler and runtime support printing decfloats. |
14711 | ||
81ecdfbb RW |
14712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
14713 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
14714 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
14715 | $as_echo_n "(cached) " >&6 | |
1a619819 | 14716 | else |
81ecdfbb | 14717 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
14718 | gdb_cv_printf_has_decfloat=no |
14719 | else | |
81ecdfbb | 14720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
14721 | /* end confdefs.h. */ |
14722 | $ac_includes_default | |
14723 | int | |
14724 | main () | |
14725 | { | |
14726 | char buf[64]; | |
14727 | _Decimal32 d32 = 1.2345df; | |
14728 | _Decimal64 d64 = 1.2345dd; | |
14729 | _Decimal128 d128 = 1.2345dl; | |
14730 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
14731 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
14732 | ; | |
14733 | return 0; | |
14734 | } | |
14735 | _ACEOF | |
81ecdfbb | 14736 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
14737 | gdb_cv_printf_has_decfloat=yes |
14738 | else | |
81ecdfbb | 14739 | gdb_cv_printf_has_decfloat=no |
1a619819 | 14740 | fi |
81ecdfbb RW |
14741 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14742 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 14743 | fi |
81ecdfbb | 14744 | |
1a619819 | 14745 | fi |
81ecdfbb RW |
14746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
14747 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
14748 | if test $gdb_cv_printf_has_decfloat = yes; then |
14749 | ||
81ecdfbb | 14750 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
14751 | |
14752 | fi | |
14753 | ||
bc8bcb4b MK |
14754 | # Check if the compiler supports the `long double' type. We can't use |
14755 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
14756 | # constants defined in <float.h> that fail on some systems, | |
14757 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 14758 | |
81ecdfbb RW |
14759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
14760 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
14761 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
14762 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14763 | else |
81ecdfbb | 14764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14765 | /* end confdefs.h. */ |
97bf5e38 | 14766 | long double foo; |
bec39cab | 14767 | _ACEOF |
81ecdfbb | 14768 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 14769 | gdb_cv_c_long_double=yes |
97bf5e38 | 14770 | else |
81ecdfbb | 14771 | gdb_cv_c_long_double=no |
97bf5e38 | 14772 | fi |
81ecdfbb | 14773 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14774 | fi |
81ecdfbb RW |
14775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
14776 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 14777 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 14778 | |
81ecdfbb | 14779 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14780 | |
14781 | fi | |
14782 | ||
bc8bcb4b | 14783 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14784 | |
81ecdfbb RW |
14785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14786 | $as_echo_n "checking for long double support in printf... " >&6; } | |
14787 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
14788 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14789 | else |
81ecdfbb | 14790 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14791 | gdb_cv_printf_has_long_double=no |
14792 | else | |
81ecdfbb | 14793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14794 | /* end confdefs.h. */ |
bc8bcb4b MK |
14795 | $ac_includes_default |
14796 | int | |
14797 | main () | |
14798 | { | |
14799 | char buf[16]; | |
97bf5e38 MK |
14800 | long double f = 3.141592653; |
14801 | sprintf (buf, "%Lg", f); | |
14802 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14803 | ; |
14804 | return 0; | |
97bf5e38 | 14805 | } |
bec39cab | 14806 | _ACEOF |
81ecdfbb | 14807 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14808 | gdb_cv_printf_has_long_double=yes |
c906108c | 14809 | else |
81ecdfbb | 14810 | gdb_cv_printf_has_long_double=no |
c906108c | 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 | |
c906108c | 14814 | fi |
81ecdfbb | 14815 | |
c906108c | 14816 | fi |
81ecdfbb RW |
14817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14818 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14819 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14820 | |
81ecdfbb | 14821 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14822 | |
14823 | fi | |
97bf5e38 | 14824 | |
bc8bcb4b | 14825 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14826 | |
81ecdfbb RW |
14827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14828 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
14829 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
14830 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14831 | else |
81ecdfbb | 14832 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14833 | gdb_cv_scanf_has_long_double=no |
14834 | else | |
81ecdfbb | 14835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14836 | /* end confdefs.h. */ |
bc8bcb4b MK |
14837 | #include <stdio.h> |
14838 | int | |
14839 | main () | |
14840 | { | |
14841 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14842 | long double f = 0; |
14843 | sscanf (buf, "%Lg", &f); | |
14844 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14845 | ; |
14846 | return 0; | |
97bf5e38 | 14847 | } |
bec39cab | 14848 | _ACEOF |
81ecdfbb | 14849 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14850 | gdb_cv_scanf_has_long_double=yes |
14851 | else | |
81ecdfbb | 14852 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14853 | fi |
81ecdfbb RW |
14854 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14855 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14856 | fi |
81ecdfbb | 14857 | |
c906108c | 14858 | fi |
81ecdfbb RW |
14859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14860 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14861 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14862 | |
81ecdfbb | 14863 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14864 | |
14865 | fi | |
c906108c | 14866 | |
438013df AO |
14867 | case ${host_os} in |
14868 | aix*) | |
81ecdfbb RW |
14869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14870 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
14871 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
14872 | $as_echo_n "(cached) " >&6 | |
438013df | 14873 | else |
bec39cab | 14874 | |
438013df AO |
14875 | SAVE_LDFLAGS=$LDFLAGS |
14876 | ||
14877 | case $GCC in | |
14878 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14879 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14880 | esac | |
14881 | ||
14882 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14884 | /* end confdefs.h. */ |
438013df | 14885 | |
bec39cab AC |
14886 | int |
14887 | main () | |
14888 | { | |
438013df | 14889 | int i; |
bec39cab AC |
14890 | ; |
14891 | return 0; | |
14892 | } | |
14893 | _ACEOF | |
81ecdfbb | 14894 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14895 | |
81ecdfbb RW |
14896 | else |
14897 | gdb_cv_bigtoc= | |
438013df | 14898 | fi |
81ecdfbb RW |
14899 | rm -f core conftest.err conftest.$ac_objext \ |
14900 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 14901 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 14902 | |
bec39cab | 14903 | fi |
81ecdfbb RW |
14904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
14905 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
14906 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
14907 | ;; | |
14908 | esac | |
14909 | ||
38f6b338 | 14910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 14911 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
14912 | dynamic_list=false |
14913 | if test "${gdb_native}" = yes; then | |
14914 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
14915 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
14916 | # may not be supported there. | |
14917 | old_LDFLAGS="$LDFLAGS" | |
14918 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
14919 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
14920 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
14921 | if test "${have_libpython}" = no; then | |
14922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
14923 | /* end confdefs.h. */ |
14924 | ||
14925 | int | |
14926 | main () | |
14927 | { | |
14928 | ||
14929 | ; | |
14930 | return 0; | |
14931 | } | |
14932 | _ACEOF | |
14933 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
14934 | dynamic_list=true |
14935 | fi | |
14936 | rm -f core conftest.err conftest.$ac_objext \ | |
14937 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
14938 | else |
14939 | # Workaround http://bugs.python.org/issue4434 where static | |
14940 | # libpythonX.Y.a would get its symbols required for | |
14941 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
14942 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
14943 | |
14944 | # Note the workaround for Python | |
14945 | # http://bugs.python.org/issue10112 earlier has removed | |
14946 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
14947 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
14948 | # always pass. | |
38f6b338 JK |
14949 | old_CFLAGS="$CFLAGS" |
14950 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
14951 | old_LIBS="$LIBS" |
14952 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
14953 | old_CPPFLAGS="$CPPFLAGS" |
14954 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 14955 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 14956 | true |
f6528abd | 14957 | else |
3bebe2f2 JK |
14958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14959 | /* end confdefs.h. */ | |
1b4f615e | 14960 | #include "Python.h" |
3bebe2f2 JK |
14961 | int |
14962 | main () | |
14963 | { | |
14964 | int err; | |
38f6b338 JK |
14965 | Py_Initialize (); |
14966 | err = PyRun_SimpleString ("import itertools\n"); | |
14967 | Py_Finalize (); | |
14968 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
14969 | ; |
14970 | return 0; | |
14971 | } | |
14972 | _ACEOF | |
14973 | if ac_fn_c_try_run "$LINENO"; then : | |
14974 | dynamic_list=true | |
14975 | fi | |
14976 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14977 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14978 | fi | |
14979 | ||
8c1fb155 | 14980 | LIBS="$old_LIBS" |
38f6b338 | 14981 | CFLAGS="$old_CFLAGS" |
1b4f615e | 14982 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
14983 | fi |
14984 | LDFLAGS="$old_LDFLAGS" | |
14985 | fi | |
14986 | if $dynamic_list; then | |
14987 | found="-Wl,--dynamic-list" | |
14988 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 14989 | else |
38f6b338 JK |
14990 | found="-rdynamic" |
14991 | RDYNAMIC="-rdynamic" | |
f6528abd | 14992 | fi |
f6528abd | 14993 | |
38f6b338 | 14994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 14995 | $as_echo "$found" >&6; } |
0407b3f1 | 14996 | |
f6528abd | 14997 | |
0407b3f1 | 14998 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 14999 | case ${host_os} in |
d92419e5 | 15000 | aix*) |
81ecdfbb RW |
15001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
15002 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
15003 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
15004 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15005 | else |
81ecdfbb | 15006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15007 | /* end confdefs.h. */ |
d92419e5 | 15008 | #include <sys/pthdebug.h> |
bec39cab AC |
15009 | int |
15010 | main () | |
15011 | { | |
d92419e5 JB |
15012 | #ifndef PTHDB_VERSION_3 |
15013 | #error | |
15014 | #endif | |
bec39cab AC |
15015 | ; |
15016 | return 0; | |
15017 | } | |
15018 | _ACEOF | |
81ecdfbb | 15019 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
15020 | gdb_cv_have_aix_thread_debug=yes |
15021 | else | |
81ecdfbb | 15022 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 15023 | fi |
81ecdfbb | 15024 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
15025 | fi |
15026 | ||
81ecdfbb RW |
15027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
15028 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
15029 | if test $gdb_cv_have_aix_thread_debug = yes; then |
15030 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 15031 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 15032 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
15033 | |
15034 | # Older versions of AIX do not provide the declaration for | |
15035 | # the getthrds function (it appears that it was introduced | |
15036 | # with AIX 6.x). | |
15037 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
15038 | " | |
15039 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
15040 | ac_have_decl=1 | |
15041 | else | |
15042 | ac_have_decl=0 | |
15043 | fi | |
15044 | ||
15045 | cat >>confdefs.h <<_ACEOF | |
15046 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
15047 | _ACEOF | |
15048 | ||
d92419e5 JB |
15049 | fi |
15050 | ;; | |
c906108c | 15051 | esac |
bec39cab | 15052 | |
c906108c SS |
15053 | fi |
15054 | ||
3f47be5c | 15055 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
15056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
15057 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
15058 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
15059 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15060 | else |
81ecdfbb | 15061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15062 | /* end confdefs.h. */ |
3f47be5c | 15063 | #include <thread_db.h> |
bec39cab AC |
15064 | int |
15065 | main () | |
15066 | { | |
3f47be5c | 15067 | int i = TD_NOTALLOC; |
bec39cab AC |
15068 | ; |
15069 | return 0; | |
15070 | } | |
15071 | _ACEOF | |
81ecdfbb | 15072 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
15073 | gdb_cv_thread_db_h_has_td_notalloc=yes |
15074 | else | |
81ecdfbb | 15075 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 15076 | |
3f47be5c | 15077 | fi |
81ecdfbb | 15078 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 15079 | |
bec39cab | 15080 | fi |
81ecdfbb RW |
15081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
15082 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
15083 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
15084 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
15085 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
15086 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 15087 | else |
81ecdfbb | 15088 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15089 | /* end confdefs.h. */ |
15090 | #include <thread_db.h> | |
15091 | int | |
15092 | main () | |
15093 | { | |
15094 | int i = TD_VERSION; | |
15095 | ; | |
15096 | return 0; | |
15097 | } | |
15098 | _ACEOF | |
81ecdfbb | 15099 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15100 | gdb_cv_thread_db_h_has_td_version=yes |
15101 | else | |
81ecdfbb | 15102 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
15103 | |
15104 | fi | |
81ecdfbb | 15105 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15106 | |
15107 | fi | |
81ecdfbb RW |
15108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
15109 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
15110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
15111 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
15112 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
15113 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 15114 | else |
81ecdfbb | 15115 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15116 | /* end confdefs.h. */ |
15117 | #include <thread_db.h> | |
15118 | int | |
15119 | main () | |
15120 | { | |
15121 | int i = TD_NOTLS; | |
15122 | ; | |
15123 | return 0; | |
15124 | } | |
15125 | _ACEOF | |
81ecdfbb | 15126 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15127 | gdb_cv_thread_db_h_has_td_notls=yes |
15128 | else | |
81ecdfbb | 15129 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
15130 | |
15131 | fi | |
81ecdfbb | 15132 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15133 | |
15134 | fi | |
81ecdfbb RW |
15135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
15136 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
15137 | fi |
15138 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 15139 | |
81ecdfbb | 15140 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 15141 | |
59f80f10 DJ |
15142 | fi |
15143 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
15144 | ||
81ecdfbb | 15145 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
15146 | |
15147 | fi | |
15148 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
15149 | ||
81ecdfbb | 15150 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 15151 | |
3f47be5c EZ |
15152 | fi |
15153 | ||
81ecdfbb RW |
15154 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
15155 | " | |
15156 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
15157 | ac_have_decl=1 | |
10568435 | 15158 | else |
81ecdfbb | 15159 | ac_have_decl=0 |
10568435 | 15160 | fi |
10568435 JK |
15161 | |
15162 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 15163 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
15164 | _ACEOF |
15165 | ||
15166 | ||
81ecdfbb RW |
15167 | if test "$cross_compiling" = yes; then : |
15168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
15169 | /* end confdefs.h. */ |
15170 | #include <sys/personality.h> | |
15171 | int | |
15172 | main () | |
15173 | { | |
15174 | ||
15175 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15176 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15177 | # endif | |
15178 | /* Test the flag could be set and stays set. */ | |
15179 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15180 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15181 | return 1 | |
15182 | ; | |
15183 | return 0; | |
15184 | } | |
15185 | _ACEOF | |
81ecdfbb | 15186 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
15187 | have_personality=true |
15188 | else | |
81ecdfbb | 15189 | have_personality=false |
10568435 | 15190 | fi |
81ecdfbb RW |
15191 | rm -f core conftest.err conftest.$ac_objext \ |
15192 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 15193 | else |
81ecdfbb | 15194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
15195 | /* end confdefs.h. */ |
15196 | #include <sys/personality.h> | |
15197 | int | |
15198 | main () | |
15199 | { | |
15200 | ||
15201 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15202 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15203 | # endif | |
15204 | /* Test the flag could be set and stays set. */ | |
15205 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15206 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15207 | return 1 | |
15208 | ; | |
15209 | return 0; | |
15210 | } | |
15211 | _ACEOF | |
81ecdfbb | 15212 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
15213 | have_personality=true |
15214 | else | |
81ecdfbb | 15215 | have_personality=false |
10568435 | 15216 | fi |
81ecdfbb RW |
15217 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15218 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 15219 | fi |
81ecdfbb | 15220 | |
10568435 JK |
15221 | if $have_personality |
15222 | then | |
15223 | ||
81ecdfbb | 15224 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
15225 | |
15226 | fi | |
15227 | ||
e655c1a2 PA |
15228 | case $host_os in |
15229 | go32* | *djgpp*) | |
15230 | gdbinit=gdb.ini | |
15231 | ;; | |
15232 | *) | |
15233 | gdbinit=.gdbinit | |
15234 | ;; | |
15235 | esac | |
15236 | ||
15237 | cat >>confdefs.h <<_ACEOF | |
15238 | #define GDBINIT "$gdbinit" | |
15239 | _ACEOF | |
15240 | ||
15241 | ||
fb40c209 | 15242 | |
f83d8a90 DE |
15243 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
15244 | # except that the argument to --with-sysroot is optional. | |
15245 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
15246 | if test "x$with_sysroot" = xyes; then | |
15247 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
15248 | fi | |
bec39cab | 15249 | |
81ecdfbb RW |
15250 | # Check whether --with-sysroot was given. |
15251 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
15252 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
15253 | else | |
15254 | TARGET_SYSTEM_ROOT= | |
15255 | fi | |
030292b7 | 15256 | |
030292b7 | 15257 | |
f83d8a90 DE |
15258 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
15259 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15260 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
15261 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 15262 | |
f83d8a90 DE |
15263 | cat >>confdefs.h <<_ACEOF |
15264 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
15265 | _ACEOF | |
bec39cab | 15266 | |
030292b7 | 15267 | |
b14b1491 | 15268 | |
f83d8a90 DE |
15269 | |
15270 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
15271 | if test "x$prefix" = xNONE; then | |
15272 | test_prefix=/usr/local | |
15273 | else | |
15274 | test_prefix=$prefix | |
15275 | fi | |
15276 | else | |
15277 | test_prefix=$exec_prefix | |
15278 | fi | |
15279 | value=0 | |
15280 | case ${ac_define_dir} in | |
15281 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15282 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15283 | value=1 | |
15284 | ;; | |
15285 | esac | |
15286 | ||
15287 | cat >>confdefs.h <<_ACEOF | |
15288 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
15289 | _ACEOF | |
030292b7 DJ |
15290 | |
15291 | ||
15292 | ||
16e7150e | 15293 | |
16e7150e | 15294 | |
81ecdfbb RW |
15295 | # Check whether --with-system-gdbinit was given. |
15296 | if test "${with_system_gdbinit+set}" = set; then : | |
15297 | withval=$with_system_gdbinit; | |
b14b1491 TT |
15298 | SYSTEM_GDBINIT=$withval |
15299 | else | |
15300 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
15301 | fi |
15302 | ||
16e7150e JG |
15303 | |
15304 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
15305 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 15306 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
15307 | ac_define_dir=`eval echo $ac_define_dir` |
15308 | ||
15309 | cat >>confdefs.h <<_ACEOF | |
15310 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
15311 | _ACEOF | |
15312 | ||
15313 | ||
15314 | ||
0c4a4063 | 15315 | |
b14b1491 TT |
15316 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
15317 | if test "x$prefix" = xNONE; then | |
15318 | test_prefix=/usr/local | |
15319 | else | |
15320 | test_prefix=$prefix | |
15321 | fi | |
15322 | else | |
15323 | test_prefix=$exec_prefix | |
15324 | fi | |
15325 | value=0 | |
15326 | case ${ac_define_dir} in | |
15327 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15328 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15329 | value=1 | |
15330 | ;; | |
15331 | esac | |
16e7150e | 15332 | |
b14b1491 TT |
15333 | cat >>confdefs.h <<_ACEOF |
15334 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
15335 | _ACEOF |
15336 | ||
b14b1491 | 15337 | |
16e7150e | 15338 | |
0c4a4063 | 15339 | |
b835bb52 | 15340 | |
81ecdfbb RW |
15341 | # Check whether --enable-werror was given. |
15342 | if test "${enable_werror+set}" = set; then : | |
15343 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
15344 | yes | y) ERROR_ON_WARNING="yes" ;; |
15345 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 15346 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 15347 | esac |
81ecdfbb RW |
15348 | fi |
15349 | ||
094a342e | 15350 | |
9a084706 PA |
15351 | # Enable -Werror by default when using gcc. Turn it off for releases. |
15352 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
15353 | ERROR_ON_WARNING=yes |
15354 | fi | |
15355 | ||
15356 | WERROR_CFLAGS="" | |
15357 | if test "${ERROR_ON_WARNING}" = yes ; then | |
15358 | WERROR_CFLAGS="-Werror" | |
15359 | fi | |
15360 | ||
cf6de44d | 15361 | # The options we'll try to enable. |
aac331e4 | 15362 | build_warnings="-Wall -Wpointer-arith \ |
1cb5e2a4 | 15363 | -Wno-unused -Wunused-value -Wunused-function \ |
aac331e4 | 15364 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 15365 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
8465943a | 15366 | -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 15367 | -Wno-mismatched-tags \ |
632e107b TT |
15368 | -Wno-error=deprecated-register \ |
15369 | -Wsuggest-override" | |
3bc3d82a | 15370 | |
3526781e | 15371 | case "${host}" in |
4fa7574e RO |
15372 | *-*-mingw32*) |
15373 | # Enable -Wno-format by default when using gcc on mingw since many | |
15374 | # GCC versions complain about %I64. | |
15375 | build_warnings="$build_warnings -Wno-format" ;; | |
15376 | *-*-solaris*) | |
15377 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
15378 | # doesn't understand. | |
15379 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
15380 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
15381 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
d3685d60 | 15382 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
15383 | esac |
15384 | ||
81ecdfbb RW |
15385 | # Check whether --enable-build-warnings was given. |
15386 | if test "${enable_build_warnings+set}" = set; then : | |
15387 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
15388 | yes) ;; |
15389 | no) build_warnings="-w";; | |
15390 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15391 | build_warnings="${build_warnings} ${t}";; | |
15392 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15393 | build_warnings="${t} ${build_warnings}";; | |
15394 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15395 | esac | |
d4f3574e | 15396 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 15397 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 15398 | fi |
81ecdfbb RW |
15399 | fi |
15400 | # Check whether --enable-gdb-build-warnings was given. | |
15401 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
15402 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
15403 | yes) ;; |
15404 | no) build_warnings="-w";; | |
15405 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15406 | build_warnings="${build_warnings} ${t}";; | |
15407 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15408 | build_warnings="${t} ${build_warnings}";; | |
15409 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15410 | esac | |
15411 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
15412 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
15413 | fi | |
81ecdfbb | 15414 | fi |
3bc3d82a PA |
15415 | |
15416 | # The set of warnings supported by a C++ compiler is not the same as | |
15417 | # of the C compiler. | |
cf6de44d | 15418 | ac_ext=cpp |
3bc3d82a PA |
15419 | ac_cpp='$CXXCPP $CPPFLAGS' |
15420 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15421 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15422 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
15423 | ||
3bc3d82a | 15424 | |
81ecdfbb | 15425 | WARN_CFLAGS="" |
c906108c SS |
15426 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
15427 | then | |
81ecdfbb RW |
15428 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
15429 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
15430 | # Separate out the -Werror flag as some files just cannot be |
15431 | # compiled with it enabled. | |
15432 | for w in ${build_warnings}; do | |
7544db95 PA |
15433 | # GCC does not complain about -Wno-unknown-warning. Invert |
15434 | # and test -Wunknown-warning instead. | |
15435 | case $w in | |
15436 | -Wno-*) | |
15437 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
15438 | *) | |
15439 | wtest=$w ;; | |
15440 | esac | |
15441 | ||
746a987d AC |
15442 | case $w in |
15443 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
15444 | *) |
15445 | # Check whether GCC accepts it. | |
4536bbc6 | 15446 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 15447 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 15448 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 15449 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
54019719 | 15450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15451 | /* end confdefs.h. */ |
4536bbc6 | 15452 | |
bec39cab AC |
15453 | int |
15454 | main () | |
15455 | { | |
4536bbc6 | 15456 | |
bec39cab AC |
15457 | ; |
15458 | return 0; | |
15459 | } | |
15460 | _ACEOF | |
3bc3d82a | 15461 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 15462 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 15463 | fi |
81ecdfbb | 15464 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 15465 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 15466 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
15467 | esac |
15468 | done | |
81ecdfbb RW |
15469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
15470 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
15471 | fi |
15472 | ||
15473 | ||
104c1213 | 15474 | |
cf6de44d | 15475 | ac_ext=c |
3bc3d82a PA |
15476 | ac_cpp='$CPP $CPPFLAGS' |
15477 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15478 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15479 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
15480 | ||
3bc3d82a | 15481 | |
b835bb52 | 15482 | |
7a292a7a | 15483 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
15484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
15485 | $as_echo_n "checking for cygwin... " >&6; } | |
15486 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
15487 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15488 | else |
81ecdfbb | 15489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15490 | /* end confdefs.h. */ |
7a292a7a SS |
15491 | |
15492 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
15493 | lose | |
15494 | #endif | |
bec39cab | 15495 | _ACEOF |
7a292a7a | 15496 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 15497 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
15498 | gdb_cv_os_cygwin=yes |
15499 | else | |
7a292a7a SS |
15500 | gdb_cv_os_cygwin=no |
15501 | fi | |
15502 | rm -f conftest* | |
15503 | ||
15504 | fi | |
81ecdfbb RW |
15505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
15506 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 15507 | |
aff38e61 | 15508 | |
3eb25fda | 15509 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 15510 | case ${host} in |
95cbc983 AC |
15511 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
15512 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 15513 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
15514 | esac |
15515 | ||
15516 | ||
cd0fc7c3 SS |
15517 | # libreadline needs libuser32.a in a cygwin environment |
15518 | WIN32LIBS= | |
15519 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
15520 | WIN32LIBS="-luser32" |
15521 | case "${target}" in | |
15522 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
15523 | ;; | |
15524 | esac | |
cd0fc7c3 | 15525 | fi |
c906108c | 15526 | |
b4505029 MM |
15527 | # The ser-tcp.c module requires sockets. |
15528 | case ${host} in | |
15529 | *mingw32*) | |
15530 | ||
81ecdfbb | 15531 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
15532 | |
15533 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
15534 | ;; | |
15535 | esac | |
15536 | ||
7a292a7a | 15537 | |
31d99776 | 15538 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
15539 | |
15540 | OLD_CFLAGS=$CFLAGS | |
15541 | OLD_LDFLAGS=$LDFLAGS | |
15542 | OLD_LIBS=$LIBS | |
15543 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15544 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15545 | # always want our bfd. | |
15546 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15547 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15548 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 15549 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15550 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 15551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb RW |
15552 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
15553 | if test "${gdb_cv_var_elf+set}" = set; then : | |
15554 | $as_echo_n "(cached) " >&6 | |
31d99776 | 15555 | else |
81ecdfbb | 15556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
15557 | /* end confdefs.h. */ |
15558 | #include <stdlib.h> | |
def63ff0 TT |
15559 | #include "bfd.h" |
15560 | #include "elf-bfd.h" | |
31d99776 DJ |
15561 | |
15562 | int | |
15563 | main () | |
15564 | { | |
def63ff0 | 15565 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
15566 | ; |
15567 | return 0; | |
15568 | } | |
15569 | _ACEOF | |
81ecdfbb | 15570 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
15571 | gdb_cv_var_elf=yes |
15572 | else | |
81ecdfbb | 15573 | gdb_cv_var_elf=no |
31d99776 | 15574 | fi |
81ecdfbb RW |
15575 | rm -f core conftest.err conftest.$ac_objext \ |
15576 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 15577 | fi |
81ecdfbb RW |
15578 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
15579 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
15580 | CFLAGS=$OLD_CFLAGS |
15581 | LDFLAGS=$OLD_LDFLAGS | |
15582 | LIBS=$OLD_LIBS | |
31d99776 | 15583 | if test $gdb_cv_var_elf = yes; then |
d4777acb | 15584 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 15585 | |
81ecdfbb | 15586 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 15587 | |
075ff26d JK |
15588 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
15589 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
15590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
15591 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
15592 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15593 | $as_echo_n "(cached) " >&6 | |
15594 | else | |
15595 | ac_func_search_save_LIBS=$LIBS | |
15596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15597 | /* end confdefs.h. */ | |
15598 | ||
15599 | /* Override any GCC internal prototype to avoid an error. | |
15600 | Use char because int might match the return type of a GCC | |
15601 | builtin and then its argument prototype would still apply. */ | |
15602 | #ifdef __cplusplus | |
15603 | extern "C" | |
15604 | #endif | |
15605 | char dlopen (); | |
15606 | int | |
15607 | main () | |
15608 | { | |
15609 | return dlopen (); | |
15610 | ; | |
15611 | return 0; | |
15612 | } | |
15613 | _ACEOF | |
15614 | for ac_lib in '' dl; do | |
15615 | if test -z "$ac_lib"; then | |
15616 | ac_res="none required" | |
15617 | else | |
15618 | ac_res=-l$ac_lib | |
15619 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
15620 | fi | |
15621 | if ac_fn_c_try_link "$LINENO"; then : | |
15622 | ac_cv_search_dlopen=$ac_res | |
15623 | fi | |
15624 | rm -f core conftest.err conftest.$ac_objext \ | |
15625 | conftest$ac_exeext | |
15626 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15627 | break | |
15628 | fi | |
15629 | done | |
15630 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15631 | ||
15632 | else | |
15633 | ac_cv_search_dlopen=no | |
15634 | fi | |
15635 | rm conftest.$ac_ext | |
15636 | LIBS=$ac_func_search_save_LIBS | |
15637 | fi | |
15638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
15639 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
15640 | ac_res=$ac_cv_search_dlopen | |
15641 | if test "$ac_res" != no; then : | |
15642 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
15643 | ||
15644 | fi | |
15645 | ||
075ff26d | 15646 | fi |
31d99776 | 15647 | fi |
31d99776 | 15648 | |
4f05add4 TT |
15649 | # Add macho support to GDB, but only if BFD includes it. |
15650 | ||
15651 | OLD_CFLAGS=$CFLAGS | |
15652 | OLD_LDFLAGS=$LDFLAGS | |
15653 | OLD_LIBS=$LIBS | |
15654 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15655 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15656 | # always want our bfd. | |
15657 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15658 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15659 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 15660 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15661 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
15662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
15663 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
15664 | if test "${gdb_cv_var_macho+set}" = set; then : | |
15665 | $as_echo_n "(cached) " >&6 | |
15666 | else | |
15667 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15668 | /* end confdefs.h. */ | |
15669 | #include <stdlib.h> | |
15670 | #include "bfd.h" | |
15671 | #include "mach-o.h" | |
15672 | ||
15673 | int | |
15674 | main () | |
15675 | { | |
15676 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
15677 | ; | |
15678 | return 0; | |
15679 | } | |
15680 | _ACEOF | |
15681 | if ac_fn_c_try_link "$LINENO"; then : | |
15682 | gdb_cv_var_macho=yes | |
15683 | else | |
15684 | gdb_cv_var_macho=no | |
15685 | fi | |
15686 | rm -f core conftest.err conftest.$ac_objext \ | |
15687 | conftest$ac_exeext conftest.$ac_ext | |
15688 | fi | |
15689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
15690 | $as_echo "$gdb_cv_var_macho" >&6; } | |
15691 | CFLAGS=$OLD_CFLAGS | |
15692 | LDFLAGS=$OLD_LDFLAGS | |
15693 | LIBS=$OLD_LIBS | |
15694 | if test $gdb_cv_var_macho = yes; then | |
15695 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
15696 | fi | |
15697 | ||
121ce6e5 DJ |
15698 | # Add any host-specific objects to GDB. |
15699 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
15700 | ||
608e2dbb TT |
15701 | # If building on ELF, look for lzma support for embedded compressed debug info. |
15702 | if test $gdb_cv_var_elf = yes; then | |
15703 | ||
15704 | # Check whether --with-lzma was given. | |
15705 | if test "${with_lzma+set}" = set; then : | |
15706 | withval=$with_lzma; | |
15707 | else | |
15708 | with_lzma=auto | |
15709 | fi | |
15710 | ||
15711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
15712 | $as_echo_n "checking whether to use lzma... " >&6; } | |
15713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
15714 | $as_echo "$with_lzma" >&6; } | |
15715 | ||
15716 | if test "${with_lzma}" != no; then | |
15717 | ||
15718 | ||
15719 | ||
15720 | ||
15721 | ||
15722 | ||
15723 | ||
15724 | ||
15725 | use_additional=yes | |
15726 | ||
15727 | acl_save_prefix="$prefix" | |
15728 | prefix="$acl_final_prefix" | |
15729 | acl_save_exec_prefix="$exec_prefix" | |
15730 | exec_prefix="$acl_final_exec_prefix" | |
15731 | ||
15732 | eval additional_includedir=\"$includedir\" | |
15733 | eval additional_libdir=\"$libdir\" | |
15734 | ||
15735 | exec_prefix="$acl_save_exec_prefix" | |
15736 | prefix="$acl_save_prefix" | |
15737 | ||
15738 | ||
15739 | # Check whether --with-liblzma-prefix was given. | |
15740 | if test "${with_liblzma_prefix+set}" = set; then : | |
15741 | withval=$with_liblzma_prefix; | |
15742 | if test "X$withval" = "Xno"; then | |
15743 | use_additional=no | |
15744 | else | |
15745 | if test "X$withval" = "X"; then | |
15746 | ||
15747 | acl_save_prefix="$prefix" | |
15748 | prefix="$acl_final_prefix" | |
15749 | acl_save_exec_prefix="$exec_prefix" | |
15750 | exec_prefix="$acl_final_exec_prefix" | |
15751 | ||
15752 | eval additional_includedir=\"$includedir\" | |
15753 | eval additional_libdir=\"$libdir\" | |
15754 | ||
15755 | exec_prefix="$acl_save_exec_prefix" | |
15756 | prefix="$acl_save_prefix" | |
15757 | ||
15758 | else | |
15759 | additional_includedir="$withval/include" | |
15760 | additional_libdir="$withval/lib" | |
15761 | fi | |
15762 | fi | |
15763 | ||
15764 | fi | |
15765 | ||
15766 | LIBLZMA= | |
15767 | LTLIBLZMA= | |
15768 | INCLZMA= | |
15769 | rpathdirs= | |
15770 | ltrpathdirs= | |
15771 | names_already_handled= | |
15772 | names_next_round='lzma ' | |
15773 | while test -n "$names_next_round"; do | |
15774 | names_this_round="$names_next_round" | |
15775 | names_next_round= | |
15776 | for name in $names_this_round; do | |
15777 | already_handled= | |
15778 | for n in $names_already_handled; do | |
15779 | if test "$n" = "$name"; then | |
15780 | already_handled=yes | |
15781 | break | |
15782 | fi | |
15783 | done | |
15784 | if test -z "$already_handled"; then | |
15785 | names_already_handled="$names_already_handled $name" | |
15786 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
15787 | eval value=\"\$HAVE_LIB$uppername\" | |
15788 | if test -n "$value"; then | |
15789 | if test "$value" = yes; then | |
15790 | eval value=\"\$LIB$uppername\" | |
15791 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
15792 | eval value=\"\$LTLIB$uppername\" | |
15793 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
15794 | else | |
15795 | : | |
15796 | fi | |
15797 | else | |
15798 | found_dir= | |
15799 | found_la= | |
15800 | found_so= | |
15801 | found_a= | |
15802 | if test $use_additional = yes; then | |
15803 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
15804 | found_dir="$additional_libdir" | |
15805 | found_so="$additional_libdir/lib$name.$shlibext" | |
15806 | if test -f "$additional_libdir/lib$name.la"; then | |
15807 | found_la="$additional_libdir/lib$name.la" | |
15808 | fi | |
15809 | else | |
15810 | if test -f "$additional_libdir/lib$name.$libext"; then | |
15811 | found_dir="$additional_libdir" | |
15812 | found_a="$additional_libdir/lib$name.$libext" | |
15813 | if test -f "$additional_libdir/lib$name.la"; then | |
15814 | found_la="$additional_libdir/lib$name.la" | |
15815 | fi | |
15816 | fi | |
15817 | fi | |
15818 | fi | |
15819 | if test "X$found_dir" = "X"; then | |
15820 | for x in $LDFLAGS $LTLIBLZMA; do | |
15821 | ||
15822 | acl_save_prefix="$prefix" | |
15823 | prefix="$acl_final_prefix" | |
15824 | acl_save_exec_prefix="$exec_prefix" | |
15825 | exec_prefix="$acl_final_exec_prefix" | |
15826 | eval x=\"$x\" | |
15827 | exec_prefix="$acl_save_exec_prefix" | |
15828 | prefix="$acl_save_prefix" | |
15829 | ||
15830 | case "$x" in | |
15831 | -L*) | |
15832 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
15833 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
15834 | found_dir="$dir" | |
15835 | found_so="$dir/lib$name.$shlibext" | |
15836 | if test -f "$dir/lib$name.la"; then | |
15837 | found_la="$dir/lib$name.la" | |
15838 | fi | |
15839 | else | |
15840 | if test -f "$dir/lib$name.$libext"; then | |
15841 | found_dir="$dir" | |
15842 | found_a="$dir/lib$name.$libext" | |
15843 | if test -f "$dir/lib$name.la"; then | |
15844 | found_la="$dir/lib$name.la" | |
15845 | fi | |
15846 | fi | |
15847 | fi | |
15848 | ;; | |
15849 | esac | |
15850 | if test "X$found_dir" != "X"; then | |
15851 | break | |
15852 | fi | |
15853 | done | |
15854 | fi | |
15855 | if test "X$found_dir" != "X"; then | |
15856 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
15857 | if test "X$found_so" != "X"; then | |
15858 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
15859 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15860 | else | |
15861 | haveit= | |
15862 | for x in $ltrpathdirs; do | |
15863 | if test "X$x" = "X$found_dir"; then | |
15864 | haveit=yes | |
15865 | break | |
15866 | fi | |
15867 | done | |
15868 | if test -z "$haveit"; then | |
15869 | ltrpathdirs="$ltrpathdirs $found_dir" | |
15870 | fi | |
15871 | if test "$hardcode_direct" = yes; then | |
15872 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15873 | else | |
15874 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
15875 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15876 | haveit= | |
15877 | for x in $rpathdirs; do | |
15878 | if test "X$x" = "X$found_dir"; then | |
15879 | haveit=yes | |
15880 | break | |
15881 | fi | |
15882 | done | |
15883 | if test -z "$haveit"; then | |
15884 | rpathdirs="$rpathdirs $found_dir" | |
15885 | fi | |
15886 | else | |
15887 | haveit= | |
15888 | for x in $LDFLAGS $LIBLZMA; do | |
15889 | ||
15890 | acl_save_prefix="$prefix" | |
15891 | prefix="$acl_final_prefix" | |
15892 | acl_save_exec_prefix="$exec_prefix" | |
15893 | exec_prefix="$acl_final_exec_prefix" | |
15894 | eval x=\"$x\" | |
15895 | exec_prefix="$acl_save_exec_prefix" | |
15896 | prefix="$acl_save_prefix" | |
15897 | ||
15898 | if test "X$x" = "X-L$found_dir"; then | |
15899 | haveit=yes | |
15900 | break | |
15901 | fi | |
15902 | done | |
15903 | if test -z "$haveit"; then | |
15904 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
15905 | fi | |
15906 | if test "$hardcode_minus_L" != no; then | |
15907 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15908 | else | |
15909 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
15910 | fi | |
15911 | fi | |
15912 | fi | |
15913 | fi | |
15914 | else | |
15915 | if test "X$found_a" != "X"; then | |
15916 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
15917 | else | |
15918 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
15919 | fi | |
15920 | fi | |
15921 | additional_includedir= | |
15922 | case "$found_dir" in | |
15923 | */lib | */lib/) | |
15924 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
15925 | additional_includedir="$basedir/include" | |
15926 | ;; | |
15927 | esac | |
15928 | if test "X$additional_includedir" != "X"; then | |
15929 | if test "X$additional_includedir" != "X/usr/include"; then | |
15930 | haveit= | |
15931 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
15932 | if test -n "$GCC"; then | |
15933 | case $host_os in | |
15934 | linux*) haveit=yes;; | |
15935 | esac | |
15936 | fi | |
15937 | fi | |
15938 | if test -z "$haveit"; then | |
15939 | for x in $CPPFLAGS $INCLZMA; do | |
15940 | ||
15941 | acl_save_prefix="$prefix" | |
15942 | prefix="$acl_final_prefix" | |
15943 | acl_save_exec_prefix="$exec_prefix" | |
15944 | exec_prefix="$acl_final_exec_prefix" | |
15945 | eval x=\"$x\" | |
15946 | exec_prefix="$acl_save_exec_prefix" | |
15947 | prefix="$acl_save_prefix" | |
15948 | ||
15949 | if test "X$x" = "X-I$additional_includedir"; then | |
15950 | haveit=yes | |
15951 | break | |
15952 | fi | |
15953 | done | |
15954 | if test -z "$haveit"; then | |
15955 | if test -d "$additional_includedir"; then | |
15956 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
15957 | fi | |
15958 | fi | |
15959 | fi | |
15960 | fi | |
15961 | fi | |
15962 | if test -n "$found_la"; then | |
15963 | save_libdir="$libdir" | |
15964 | case "$found_la" in | |
15965 | */* | *\\*) . "$found_la" ;; | |
15966 | *) . "./$found_la" ;; | |
15967 | esac | |
15968 | libdir="$save_libdir" | |
15969 | for dep in $dependency_libs; do | |
15970 | case "$dep" in | |
15971 | -L*) | |
15972 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15973 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15974 | haveit= | |
15975 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15976 | if test -n "$GCC"; then | |
15977 | case $host_os in | |
15978 | linux*) haveit=yes;; | |
15979 | esac | |
15980 | fi | |
15981 | fi | |
15982 | if test -z "$haveit"; then | |
15983 | haveit= | |
15984 | for x in $LDFLAGS $LIBLZMA; do | |
15985 | ||
15986 | acl_save_prefix="$prefix" | |
15987 | prefix="$acl_final_prefix" | |
15988 | acl_save_exec_prefix="$exec_prefix" | |
15989 | exec_prefix="$acl_final_exec_prefix" | |
15990 | eval x=\"$x\" | |
15991 | exec_prefix="$acl_save_exec_prefix" | |
15992 | prefix="$acl_save_prefix" | |
15993 | ||
15994 | if test "X$x" = "X-L$additional_libdir"; then | |
15995 | haveit=yes | |
15996 | break | |
15997 | fi | |
15998 | done | |
15999 | if test -z "$haveit"; then | |
16000 | if test -d "$additional_libdir"; then | |
16001 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
16002 | fi | |
16003 | fi | |
16004 | haveit= | |
16005 | for x in $LDFLAGS $LTLIBLZMA; do | |
16006 | ||
16007 | acl_save_prefix="$prefix" | |
16008 | prefix="$acl_final_prefix" | |
16009 | acl_save_exec_prefix="$exec_prefix" | |
16010 | exec_prefix="$acl_final_exec_prefix" | |
16011 | eval x=\"$x\" | |
16012 | exec_prefix="$acl_save_exec_prefix" | |
16013 | prefix="$acl_save_prefix" | |
16014 | ||
16015 | if test "X$x" = "X-L$additional_libdir"; then | |
16016 | haveit=yes | |
16017 | break | |
16018 | fi | |
16019 | done | |
16020 | if test -z "$haveit"; then | |
16021 | if test -d "$additional_libdir"; then | |
16022 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
16023 | fi | |
16024 | fi | |
16025 | fi | |
16026 | fi | |
16027 | ;; | |
16028 | -R*) | |
16029 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
16030 | if test "$enable_rpath" != no; then | |
16031 | haveit= | |
16032 | for x in $rpathdirs; do | |
16033 | if test "X$x" = "X$dir"; then | |
16034 | haveit=yes | |
16035 | break | |
16036 | fi | |
16037 | done | |
16038 | if test -z "$haveit"; then | |
16039 | rpathdirs="$rpathdirs $dir" | |
16040 | fi | |
16041 | haveit= | |
16042 | for x in $ltrpathdirs; do | |
16043 | if test "X$x" = "X$dir"; then | |
16044 | haveit=yes | |
16045 | break | |
16046 | fi | |
16047 | done | |
16048 | if test -z "$haveit"; then | |
16049 | ltrpathdirs="$ltrpathdirs $dir" | |
16050 | fi | |
16051 | fi | |
16052 | ;; | |
16053 | -l*) | |
16054 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
16055 | ;; | |
16056 | *.la) | |
16057 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
16058 | ;; | |
16059 | *) | |
16060 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
16061 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
16062 | ;; | |
16063 | esac | |
16064 | done | |
16065 | fi | |
16066 | else | |
16067 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
16068 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
16069 | fi | |
16070 | fi | |
16071 | fi | |
16072 | done | |
16073 | done | |
16074 | if test "X$rpathdirs" != "X"; then | |
16075 | if test -n "$hardcode_libdir_separator"; then | |
16076 | alldirs= | |
16077 | for found_dir in $rpathdirs; do | |
16078 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
16079 | done | |
16080 | acl_save_libdir="$libdir" | |
16081 | libdir="$alldirs" | |
16082 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16083 | libdir="$acl_save_libdir" | |
16084 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16085 | else | |
16086 | for found_dir in $rpathdirs; do | |
16087 | acl_save_libdir="$libdir" | |
16088 | libdir="$found_dir" | |
16089 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16090 | libdir="$acl_save_libdir" | |
16091 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16092 | done | |
16093 | fi | |
16094 | fi | |
16095 | if test "X$ltrpathdirs" != "X"; then | |
16096 | for found_dir in $ltrpathdirs; do | |
16097 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
16098 | done | |
16099 | fi | |
16100 | ||
16101 | ||
16102 | ac_save_CPPFLAGS="$CPPFLAGS" | |
16103 | ||
16104 | for element in $INCLZMA; do | |
16105 | haveit= | |
16106 | for x in $CPPFLAGS; do | |
16107 | ||
16108 | acl_save_prefix="$prefix" | |
16109 | prefix="$acl_final_prefix" | |
16110 | acl_save_exec_prefix="$exec_prefix" | |
16111 | exec_prefix="$acl_final_exec_prefix" | |
16112 | eval x=\"$x\" | |
16113 | exec_prefix="$acl_save_exec_prefix" | |
16114 | prefix="$acl_save_prefix" | |
16115 | ||
16116 | if test "X$x" = "X$element"; then | |
16117 | haveit=yes | |
16118 | break | |
16119 | fi | |
16120 | done | |
16121 | if test -z "$haveit"; then | |
16122 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
16123 | fi | |
16124 | done | |
16125 | ||
16126 | ||
16127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
16128 | $as_echo_n "checking for liblzma... " >&6; } | |
16129 | if test "${ac_cv_liblzma+set}" = set; then : | |
16130 | $as_echo_n "(cached) " >&6 | |
16131 | else | |
16132 | ||
16133 | ac_save_LIBS="$LIBS" | |
16134 | LIBS="$LIBS $LIBLZMA" | |
16135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16136 | /* end confdefs.h. */ | |
16137 | #include "lzma.h" | |
16138 | int | |
16139 | main () | |
16140 | { | |
16141 | lzma_index_iter iter; | |
16142 | lzma_index_iter_init (&iter, 0); | |
16143 | lzma_mf_is_supported (LZMA_MF_HC3); | |
16144 | ; | |
16145 | return 0; | |
16146 | } | |
16147 | _ACEOF | |
16148 | if ac_fn_c_try_link "$LINENO"; then : | |
16149 | ac_cv_liblzma=yes | |
16150 | else | |
16151 | ac_cv_liblzma=no | |
16152 | fi | |
16153 | rm -f core conftest.err conftest.$ac_objext \ | |
16154 | conftest$ac_exeext conftest.$ac_ext | |
16155 | LIBS="$ac_save_LIBS" | |
16156 | ||
16157 | fi | |
16158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
16159 | $as_echo "$ac_cv_liblzma" >&6; } | |
16160 | if test "$ac_cv_liblzma" = yes; then | |
16161 | HAVE_LIBLZMA=yes | |
16162 | ||
16163 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
16164 | ||
16165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
16166 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
16167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
16168 | $as_echo "$LIBLZMA" >&6; } | |
16169 | else | |
16170 | HAVE_LIBLZMA=no | |
16171 | CPPFLAGS="$ac_save_CPPFLAGS" | |
16172 | LIBLZMA= | |
16173 | LTLIBLZMA= | |
16174 | fi | |
16175 | ||
16176 | ||
16177 | ||
16178 | ||
16179 | ||
16180 | ||
16181 | if test "$HAVE_LIBLZMA" != yes; then | |
16182 | if test "$with_lzma" = yes; then | |
16183 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
16184 | fi | |
16185 | fi | |
16186 | fi | |
16187 | fi | |
16188 | ||
3fc11d3e JM |
16189 | LIBGUI="../libgui/src/libgui.a" |
16190 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
16191 | ||
16192 | ||
7a292a7a | 16193 | |
3fc11d3e JM |
16194 | WIN32LDAPP= |
16195 | ||
16196 | ||
16197 | ||
d91670b9 | 16198 | case "${host}" in |
686a5eed | 16199 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
16200 | configdir="win" |
16201 | ;; | |
16202 | *) | |
16203 | configdir="unix" | |
16204 | ;; | |
16205 | esac | |
3fc11d3e JM |
16206 | |
16207 | GDBTKLIBS= | |
16208 | if test "${enable_gdbtk}" = "yes"; then | |
16209 | ||
d1c3b63a KS |
16210 | # Gdbtk must have an absolute path to srcdir in order to run |
16211 | # properly when not installed. | |
16212 | here=`pwd` | |
16213 | cd ${srcdir} | |
16214 | GDBTK_SRC_DIR=`pwd` | |
16215 | cd $here | |
16216 | ||
bec39cab | 16217 | |
5062cc19 KS |
16218 | # |
16219 | # Ok, lets find the tcl configuration | |
16220 | # First, look for one uninstalled. | |
16221 | # the alternative search directory is invoked by --with-tcl | |
16222 | # | |
3fc11d3e | 16223 | |
5062cc19 KS |
16224 | if test x"${no_tcl}" = x ; then |
16225 | # we reset no_tcl in case something fails here | |
16226 | no_tcl=true | |
bec39cab | 16227 | |
81ecdfbb RW |
16228 | # Check whether --with-tcl was given. |
16229 | if test "${with_tcl+set}" = set; then : | |
16230 | withval=$with_tcl; with_tclconfig=${withval} | |
16231 | fi | |
16232 | ||
16233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
16234 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
16235 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
16236 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 16237 | else |
bec39cab | 16238 | |
3fc11d3e | 16239 | |
5062cc19 KS |
16240 | # First check to see if --with-tcl was specified. |
16241 | case "${host}" in | |
16242 | *-*-cygwin*) platDir="win" ;; | |
16243 | *) platDir="unix" ;; | |
16244 | esac | |
16245 | if test x"${with_tclconfig}" != x ; then | |
16246 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
16247 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
16248 | else | |
81ecdfbb | 16249 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16250 | fi |
16251 | fi | |
16252 | ||
16253 | # then check for a private Tcl installation | |
16254 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16255 | for i in \ | |
16256 | ../tcl \ | |
16257 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16258 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
16259 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16260 | ../../tcl \ | |
16261 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16262 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16263 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16264 | ../../../tcl \ | |
16265 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16266 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16267 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16268 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16269 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16270 | break | |
16271 | fi | |
16272 | done | |
16273 | fi | |
16274 | ||
16275 | # on Darwin, check in Framework installation locations | |
16276 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
16277 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16278 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16279 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16280 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16281 | ; do | |
16282 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
16283 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
16284 | break | |
16285 | fi | |
16286 | done | |
16287 | fi | |
16288 | ||
16289 | # check in a few common install locations | |
16290 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16291 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16292 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16293 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16294 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16295 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16296 | `ls -d /usr/lib 2>/dev/null` \ | |
16297 | ; do | |
16298 | if test -f "$i/tclConfig.sh" ; then | |
16299 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
16300 | break | |
16301 | fi | |
16302 | done | |
16303 | fi | |
3fc11d3e | 16304 | |
5062cc19 KS |
16305 | # check in a few other private locations |
16306 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16307 | for i in \ | |
16308 | ${srcdir}/../tcl \ | |
16309 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16310 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
16311 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16312 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16313 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16314 | break | |
16315 | fi | |
16316 | done | |
16317 | fi | |
bec39cab | 16318 | |
3fc11d3e JM |
16319 | fi |
16320 | ||
5062cc19 KS |
16321 | |
16322 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16323 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
16324 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
16325 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
16326 | else |
16327 | no_tcl= | |
16328 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
16329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16330 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
16331 | fi |
16332 | fi | |
3fc11d3e | 16333 | |
bec39cab | 16334 | |
85541719 DE |
16335 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
16336 | # point to doing Tcl. | |
bec39cab | 16337 | |
5062cc19 KS |
16338 | # |
16339 | # Ok, lets find the tk configuration | |
16340 | # First, look for one uninstalled. | |
16341 | # the alternative search directory is invoked by --with-tk | |
16342 | # | |
3fc11d3e | 16343 | |
5062cc19 KS |
16344 | if test x"${no_tk}" = x ; then |
16345 | # we reset no_tk in case something fails here | |
16346 | no_tk=true | |
bec39cab | 16347 | |
81ecdfbb RW |
16348 | # Check whether --with-tk was given. |
16349 | if test "${with_tk+set}" = set; then : | |
16350 | withval=$with_tk; with_tkconfig=${withval} | |
16351 | fi | |
16352 | ||
16353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
16354 | $as_echo_n "checking for Tk configuration... " >&6; } | |
16355 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
16356 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16357 | else |
3fc11d3e JM |
16358 | |
16359 | ||
5062cc19 KS |
16360 | # First check to see if --with-tkconfig was specified. |
16361 | if test x"${with_tkconfig}" != x ; then | |
16362 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
16363 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
16364 | else | |
81ecdfbb | 16365 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16366 | fi |
16367 | fi | |
3fc11d3e | 16368 | |
5062cc19 KS |
16369 | # then check for a private Tk library |
16370 | case "${host}" in | |
16371 | *-*-cygwin*) platDir="win" ;; | |
16372 | *) platDir="unix" ;; | |
16373 | esac | |
16374 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16375 | for i in \ | |
16376 | ../tk \ | |
16377 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16378 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
16379 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
16380 | ../../tk \ | |
16381 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16382 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
16383 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
16384 | ../../../tk \ | |
16385 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16386 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
16387 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16388 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16389 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16390 | break | |
16391 | fi | |
16392 | done | |
16393 | fi | |
16394 | ||
16395 | # on Darwin, check in Framework installation locations | |
16396 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
16397 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16398 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16399 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16400 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16401 | ; do | |
16402 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
16403 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
16404 | break | |
16405 | fi | |
16406 | done | |
16407 | fi | |
16408 | ||
16409 | # check in a few common install locations | |
16410 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16411 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16412 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16413 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16414 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16415 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16416 | `ls -d /usr/lib 2>/dev/null` \ | |
16417 | ; do | |
16418 | if test -f "$i/tkConfig.sh" ; then | |
16419 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
16420 | break | |
16421 | fi | |
16422 | done | |
16423 | fi | |
16424 | # check in a few other private locations | |
16425 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16426 | for i in \ | |
16427 | ${srcdir}/../tk \ | |
16428 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16429 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
16430 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16431 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16432 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16433 | break | |
16434 | fi | |
16435 | done | |
16436 | fi | |
3fc11d3e | 16437 | |
3fc11d3e JM |
16438 | fi |
16439 | ||
16440 | ||
5062cc19 KS |
16441 | if test x"${ac_cv_c_tkconfig}" = x ; then |
16442 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
16443 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
16444 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
16445 | else |
16446 | no_tk= | |
16447 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
16448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16449 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 16450 | fi |
3fc11d3e | 16451 | fi |
dd2504ab | 16452 | |
dd2504ab | 16453 | |
85541719 DE |
16454 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
16455 | ||
81ecdfbb RW |
16456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16457 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
16458 | |
16459 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
16460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16461 | $as_echo "loading" >&6; } | |
85541719 DE |
16462 | . ${TCL_BIN_DIR}/tclConfig.sh |
16463 | else | |
81ecdfbb RW |
16464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16465 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
16466 | fi |
16467 | ||
16468 | # eval is required to do the TCL_DBGX substitution | |
16469 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
16470 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
16471 | ||
16472 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
16473 | # then set the common variable name to the value of the build variables. | |
16474 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
16475 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
16476 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
16477 | # installed and uninstalled version of Tcl. | |
16478 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
16479 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
16480 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
16481 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
16482 | elif test "`uname -s`" = "Darwin"; then | |
16483 | # If Tcl was built as a framework, attempt to use the libraries | |
16484 | # from the framework at the given location so that linking works | |
a68ffae9 | 16485 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
16486 | case ${TCL_DEFS} in |
16487 | *TCL_FRAMEWORK*) | |
16488 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
16489 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
16490 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
16491 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
16492 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
16493 | break | |
16494 | fi | |
16495 | done | |
16496 | fi | |
16497 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
16498 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
16499 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
16500 | fi | |
16501 | ;; | |
16502 | esac | |
16503 | fi | |
16504 | ||
16505 | # eval is required to do the TCL_DBGX substitution | |
16506 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
16507 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
16508 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
16509 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
16510 | ||
16511 | ||
16512 | ||
16513 | ||
16514 | ||
16515 | ||
16516 | ||
16517 | ||
16518 | ||
16519 | ||
16520 | ||
16521 | ||
16522 | ||
16523 | ||
16524 | ||
16525 | # Check for in-tree tcl | |
16526 | here=`pwd` | |
16527 | cd ${srcdir}/.. | |
16528 | topdir=`pwd` | |
16529 | cd ${here} | |
16530 | ||
16531 | intree="no" | |
16532 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
16533 | intree="yes" | |
16534 | fi | |
16535 | ||
16536 | # Find Tcl private headers | |
16537 | if test x"${intree}" = xno; then | |
16538 | ||
81ecdfbb RW |
16539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
16540 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
16541 | private_dir="" |
16542 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
16543 | if test -f ${dir}/tclInt.h ; then | |
16544 | private_dir=${dir} | |
16545 | fi | |
16546 | ||
16547 | if test x"${private_dir}" = x; then | |
81ecdfbb | 16548 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
16549 | else |
16550 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
16551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16552 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
16553 | fi |
16554 | ||
16555 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
16556 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
16557 | TCL_DEPS="" | |
16558 | else | |
16559 | # If building tcl in the same src tree, private headers | |
16560 | # are not needed, but we need to be sure to use the right | |
16561 | # headers library | |
16562 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
16563 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
16564 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
16565 | fi | |
16566 | ||
16567 | ||
16568 | ||
16569 | ||
16570 | ||
81ecdfbb RW |
16571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16572 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 16573 | |
5062cc19 | 16574 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
16575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16576 | $as_echo "loading" >&6; } | |
5062cc19 | 16577 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 16578 | else |
81ecdfbb RW |
16579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16580 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 16581 | fi |
bec39cab | 16582 | |
5062cc19 KS |
16583 | # eval is required to do the TK_DBGX substitution |
16584 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
16585 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
16586 | ||
16587 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
16588 | # then set the common variable name to the value of the build variables. | |
16589 | # For example, the variable TK_LIB_SPEC will be set to the value | |
16590 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
16591 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
16592 | # installed and uninstalled version of Tcl. | |
85541719 | 16593 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
16594 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
16595 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
16596 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
16597 | elif test "`uname -s`" = "Darwin"; then | |
16598 | # If Tk was built as a framework, attempt to use the libraries | |
16599 | # from the framework at the given location so that linking works | |
a68ffae9 | 16600 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
16601 | case ${TK_DEFS} in |
16602 | *TK_FRAMEWORK*) | |
85541719 | 16603 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
16604 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
16605 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
16606 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
16607 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
16608 | break | |
16609 | fi | |
16610 | done | |
16611 | fi | |
85541719 | 16612 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
16613 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
16614 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
16615 | fi | |
16616 | ;; | |
16617 | esac | |
3fc11d3e JM |
16618 | fi |
16619 | ||
5062cc19 KS |
16620 | # eval is required to do the TK_DBGX substitution |
16621 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
16622 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
16623 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
16624 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 16625 | |
3fc11d3e JM |
16626 | |
16627 | ||
bec39cab AC |
16628 | |
16629 | ||
16630 | ||
16631 | ||
16632 | ||
16633 | ||
16634 | ||
3fc11d3e | 16635 | |
3fc11d3e | 16636 | |
bec39cab | 16637 | |
bec39cab | 16638 | |
85541719 DE |
16639 | # Check for in-tree Tk |
16640 | intree="no" | |
16641 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
16642 | intree="yes" | |
16643 | fi | |
3fc11d3e | 16644 | |
85541719 DE |
16645 | # Find Tk private headers |
16646 | if test x"${intree}" = xno; then | |
3fc11d3e | 16647 | |
81ecdfbb RW |
16648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
16649 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
16650 | private_dir="" |
16651 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
16652 | if test -f ${dir}/tkInt.h; then | |
16653 | private_dir=${dir} | |
3fc11d3e | 16654 | fi |
bec39cab | 16655 | |
5062cc19 | 16656 | if test x"${private_dir}" = x; then |
81ecdfbb | 16657 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 16658 | else |
5062cc19 | 16659 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
16660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16661 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 16662 | fi |
3fc11d3e | 16663 | |
85541719 DE |
16664 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
16665 | TK_LIBRARY=${TK_LIB_SPEC} | |
16666 | TK_DEPS="" | |
16667 | else | |
16668 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
16669 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
16670 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
16671 | fi | |
3fc11d3e JM |
16672 | |
16673 | ||
3fc11d3e JM |
16674 | |
16675 | ||
3fc11d3e | 16676 | |
85541719 | 16677 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 16678 | |
85541719 DE |
16679 | # Include some libraries that Tcl and Tk want. |
16680 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
16681 | # Yes, the ordering seems wrong here. But it isn't. | |
16682 | # TK_LIBS is the list of libraries that need to be linked | |
16683 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
16684 | # were in LIBS then any link tests after this point would | |
16685 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
16686 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 16687 | |
85541719 DE |
16688 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
16689 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
16690 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
16691 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
16692 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
16693 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
16694 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 16695 | |
85541719 DE |
16696 | if test x$gdb_cv_os_cygwin = xyes; then |
16697 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
16698 | WIN32LDAPP="-Wl,--subsystem,console" | |
16699 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 16700 | fi |
ffc6a242 | 16701 | |
81ecdfbb | 16702 | subdirs="$subdirs gdbtk" |
3ace7edb | 16703 | |
85541719 | 16704 | fi |
3fc11d3e JM |
16705 | fi |
16706 | ||
16707 | ||
16708 | ||
16709 | ||
16710 | ||
16711 | ||
16712 | ||
16713 | ||
81ecdfbb RW |
16714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
16715 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 16716 | |
c906108c | 16717 | |
81ecdfbb RW |
16718 | # Check whether --with-x was given. |
16719 | if test "${with_x+set}" = set; then : | |
16720 | withval=$with_x; | |
16721 | fi | |
c906108c SS |
16722 | |
16723 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
16724 | if test "x$with_x" = xno; then | |
16725 | # The user explicitly disabled X. | |
16726 | have_x=disabled | |
16727 | else | |
81ecdfbb RW |
16728 | case $x_includes,$x_libraries in #( |
16729 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
16730 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
16731 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
16732 | else |
16733 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 16734 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 16735 | rm -f -r conftest.dir |
bec39cab AC |
16736 | if mkdir conftest.dir; then |
16737 | cd conftest.dir | |
bec39cab | 16738 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
16739 | incroot: |
16740 | @echo incroot='${INCROOT}' | |
16741 | usrlibdir: | |
16742 | @echo usrlibdir='${USRLIBDIR}' | |
16743 | libdir: | |
16744 | @echo libdir='${LIBDIR}' | |
16745 | _ACEOF | |
16746 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 16747 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
16748 | for ac_var in incroot usrlibdir libdir; do |
16749 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
16750 | done | |
c906108c | 16751 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
16752 | for ac_extension in a so sl dylib la dll; do |
16753 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
16754 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 16755 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
16756 | fi |
16757 | done | |
16758 | # Screen out bogus values from the imake configuration. They are | |
16759 | # bogus both because they are the default anyway, and because | |
16760 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 16761 | case $ac_im_incroot in |
81ecdfbb | 16762 | /usr/include) ac_x_includes= ;; |
bec39cab | 16763 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 16764 | esac |
bec39cab | 16765 | case $ac_im_usrlibdir in |
81ecdfbb | 16766 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 16767 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
16768 | esac |
16769 | fi | |
16770 | cd .. | |
81ecdfbb | 16771 | rm -f -r conftest.dir |
c906108c SS |
16772 | fi |
16773 | ||
bec39cab AC |
16774 | # Standard set of common directories for X headers. |
16775 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
16776 | ac_x_header_dirs=' | |
16777 | /usr/X11/include | |
81ecdfbb | 16778 | /usr/X11R7/include |
bec39cab AC |
16779 | /usr/X11R6/include |
16780 | /usr/X11R5/include | |
16781 | /usr/X11R4/include | |
16782 | ||
16783 | /usr/include/X11 | |
81ecdfbb | 16784 | /usr/include/X11R7 |
bec39cab AC |
16785 | /usr/include/X11R6 |
16786 | /usr/include/X11R5 | |
16787 | /usr/include/X11R4 | |
16788 | ||
16789 | /usr/local/X11/include | |
81ecdfbb | 16790 | /usr/local/X11R7/include |
bec39cab AC |
16791 | /usr/local/X11R6/include |
16792 | /usr/local/X11R5/include | |
16793 | /usr/local/X11R4/include | |
16794 | ||
16795 | /usr/local/include/X11 | |
81ecdfbb | 16796 | /usr/local/include/X11R7 |
bec39cab AC |
16797 | /usr/local/include/X11R6 |
16798 | /usr/local/include/X11R5 | |
16799 | /usr/local/include/X11R4 | |
16800 | ||
16801 | /usr/X386/include | |
16802 | /usr/x386/include | |
16803 | /usr/XFree86/include/X11 | |
16804 | ||
16805 | /usr/include | |
16806 | /usr/local/include | |
16807 | /usr/unsupported/include | |
16808 | /usr/athena/include | |
16809 | /usr/local/x11r5/include | |
16810 | /usr/lpp/Xamples/include | |
16811 | ||
16812 | /usr/openwin/include | |
16813 | /usr/openwin/share/include' | |
16814 | ||
16815 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 16816 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 16817 | # First, try using that file with no special directory specified. |
81ecdfbb | 16818 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16819 | /* end confdefs.h. */ |
81ecdfbb | 16820 | #include <X11/Xlib.h> |
bec39cab | 16821 | _ACEOF |
81ecdfbb | 16822 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
16823 | # We can compile using X headers with no special include directory. |
16824 | ac_x_includes= | |
16825 | else | |
bec39cab | 16826 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 16827 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
16828 | ac_x_includes=$ac_dir |
16829 | break | |
16830 | fi | |
16831 | done | |
c906108c | 16832 | fi |
bec39cab AC |
16833 | rm -f conftest.err conftest.$ac_ext |
16834 | fi # $ac_x_includes = no | |
c906108c | 16835 | |
bec39cab | 16836 | if test "$ac_x_libraries" = no; then |
c906108c | 16837 | # Check for the libraries. |
c906108c SS |
16838 | # See if we find them without any special options. |
16839 | # Don't add to $LIBS permanently. | |
bec39cab | 16840 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
16841 | LIBS="-lX11 $LIBS" |
16842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16843 | /* end confdefs.h. */ |
81ecdfbb | 16844 | #include <X11/Xlib.h> |
bec39cab AC |
16845 | int |
16846 | main () | |
16847 | { | |
81ecdfbb | 16848 | XrmInitialize () |
bec39cab AC |
16849 | ; |
16850 | return 0; | |
16851 | } | |
16852 | _ACEOF | |
81ecdfbb | 16853 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16854 | LIBS=$ac_save_LIBS |
c906108c SS |
16855 | # We can link X programs with no special library path. |
16856 | ac_x_libraries= | |
16857 | else | |
81ecdfbb RW |
16858 | LIBS=$ac_save_LIBS |
16859 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 16860 | do |
bec39cab | 16861 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
16862 | for ac_extension in a so sl dylib la dll; do |
16863 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
16864 | ac_x_libraries=$ac_dir |
16865 | break 2 | |
16866 | fi | |
16867 | done | |
16868 | done | |
16869 | fi | |
81ecdfbb RW |
16870 | rm -f core conftest.err conftest.$ac_objext \ |
16871 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 16872 | fi # $ac_x_libraries = no |
c906108c | 16873 | |
81ecdfbb RW |
16874 | case $ac_x_includes,$ac_x_libraries in #( |
16875 | no,* | *,no | *\'*) | |
16876 | # Didn't find X, or a directory has "'" in its name. | |
16877 | ac_cv_have_x="have_x=no";; #( | |
16878 | *) | |
16879 | # Record where we found X for the cache. | |
16880 | ac_cv_have_x="have_x=yes\ | |
16881 | ac_x_includes='$ac_x_includes'\ | |
16882 | ac_x_libraries='$ac_x_libraries'" | |
16883 | esac | |
c906108c | 16884 | fi |
81ecdfbb RW |
16885 | ;; #( |
16886 | *) have_x=yes;; | |
16887 | esac | |
c906108c SS |
16888 | eval "$ac_cv_have_x" |
16889 | fi # $with_x != no | |
16890 | ||
16891 | if test "$have_x" != yes; then | |
81ecdfbb RW |
16892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
16893 | $as_echo "$have_x" >&6; } | |
c906108c SS |
16894 | no_x=yes |
16895 | else | |
16896 | # If each of the values was on the command line, it overrides each guess. | |
16897 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
16898 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
16899 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
16900 | ac_cv_have_x="have_x=yes\ |
16901 | ac_x_includes='$x_includes'\ | |
16902 | ac_x_libraries='$x_libraries'" | |
16903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
16904 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
16905 | fi |
16906 | ||
16907 | ||
bec39cab | 16908 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 16909 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
16910 | # This code just checks for a few cases where we'd like to ignore those |
16911 | # definitions, even when they're present in the '.mt' file. These cases | |
16912 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 16913 | # not part of the source tree. |
7a292a7a | 16914 | # |
81ecdfbb RW |
16915 | # Check whether --enable-sim was given. |
16916 | if test "${enable_sim+set}" = set; then : | |
16917 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
16918 | echo "enableval = ${enableval}"; |
16919 | case "${enableval}" in | |
16920 | yes) ignore_sim=false ;; | |
16921 | no) ignore_sim=true ;; | |
16922 | *) ignore_sim=false ;; | |
16923 | esac | |
16924 | else | |
16925 | ignore_sim=false | |
81ecdfbb RW |
16926 | fi |
16927 | ||
7a292a7a SS |
16928 | |
16929 | if test ! -d "${srcdir}/../sim"; then | |
16930 | ignore_sim=true | |
16931 | fi | |
16932 | ||
9b624dbe UW |
16933 | SIM= |
16934 | SIM_OBS= | |
16935 | if test "${ignore_sim}" = "false"; then | |
16936 | if test x"${gdb_sim}" != x ; then | |
16937 | SIM="${gdb_sim}" | |
16938 | SIM_OBS="remote-sim.o" | |
60ca704f | 16939 | |
81ecdfbb | 16940 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 16941 | |
976102cd PA |
16942 | |
16943 | # Some tdep code should only be compiled in when the ppc sim is | |
16944 | # built. PR sim/13418. | |
16945 | case $target in | |
16946 | powerpc*-*-*) | |
16947 | ||
16948 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
16949 | ||
16950 | ;; | |
16951 | esac | |
9b624dbe | 16952 | fi |
7a292a7a SS |
16953 | fi |
16954 | ||
16955 | ||
16956 | ||
c906108c SS |
16957 | |
16958 | ||
16959 | ||
16960 | ||
16961 | ||
16962 | ||
dfcd3bfb | 16963 | |
e56ac5c3 AC |
16964 | |
16965 | ||
b3a90332 AC |
16966 | |
16967 | ||
c35f4ffc | 16968 | # List of host floatformats. |
bec39cab AC |
16969 | |
16970 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 16971 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 16972 | _ACEOF |
c35f4ffc | 16973 | |
bec39cab AC |
16974 | |
16975 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 16976 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
16977 | _ACEOF |
16978 | ||
c35f4ffc | 16979 | |
bec39cab | 16980 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 16981 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 16982 | _ACEOF |
c35f4ffc AC |
16983 | |
16984 | ||
c906108c SS |
16985 | # target_subdir is used by the testsuite to find the target libraries. |
16986 | target_subdir= | |
16987 | if test "${host}" != "${target}"; then | |
16988 | target_subdir="${target_alias}/" | |
16989 | fi | |
16990 | ||
16991 | ||
21ea5acd | 16992 | # Import nat definitions. |
2b351b19 | 16993 | nat_makefile_frag=/dev/null |
771b4502 | 16994 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
16995 | . ${srcdir}/configure.nat |
16996 | nativefile=$NAT_FILE | |
c906108c | 16997 | fi |
c906108c | 16998 | |
c906108c SS |
16999 | |
17000 | ||
17001 | ||
21ea5acd SDJ |
17002 | |
17003 | ||
17004 | ||
17005 | ||
17006 | ||
c906108c SS |
17007 | |
17008 | ||
b00a8037 | 17009 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
17010 | |
17011 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 17012 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 17013 | _ACEOF |
b00a8037 DJ |
17014 | |
17015 | fi | |
17016 | ||
8dcde887 | 17017 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
17018 | # Check whether --enable-multi-ice was given. |
17019 | if test "${enable_multi_ice+set}" = set; then : | |
17020 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
17021 | yes | no) |
17022 | ;; | |
81ecdfbb | 17023 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 17024 | esac |
81ecdfbb | 17025 | fi |
b4e70030 | 17026 | |
81ecdfbb RW |
17027 | if test "x$enable_multi_ice" = xyes; then |
17028 | subdirs="$subdirs multi-ice" | |
3ace7edb | 17029 | |
a85f51e7 DJ |
17030 | fi |
17031 | ||
496c0e1b JB |
17032 | # Check whether --enable-gdbserver was given. |
17033 | if test "${enable_gdbserver+set}" = set; then : | |
17034 | enableval=$enable_gdbserver; case "${enableval}" in | |
17035 | yes| no|auto) ;; | |
17036 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
17037 | esac | |
17038 | else | |
17039 | enable_gdbserver=auto | |
17040 | fi | |
17041 | ||
17042 | ||
17043 | # We only build gdbserver automatically in a native configuration, and | |
17044 | # only if the user did not explicitly disable its build. | |
17045 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
17046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
17047 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 17048 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
17049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17050 | $as_echo "yes" >&6; } | |
17051 | subdirs="$subdirs gdbserver" | |
3ace7edb | 17052 | |
496c0e1b | 17053 | gdbserver_build_enabled=yes |
8dcde887 | 17054 | else |
81ecdfbb RW |
17055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17056 | $as_echo "no" >&6; } | |
8dcde887 MK |
17057 | fi |
17058 | fi | |
17059 | ||
496c0e1b JB |
17060 | # If the user explicitly request the gdbserver to be built, verify that |
17061 | # we were in fact able to enable it. | |
17062 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
17063 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
17064 | fi | |
17065 | ||
393fd4c3 YQ |
17066 | # Check for babeltrace and babeltrace-ctf |
17067 | ||
17068 | # Check whether --with-babeltrace was given. | |
17069 | if test "${with_babeltrace+set}" = set; then : | |
17070 | withval=$with_babeltrace; | |
17071 | else | |
17072 | with_babeltrace=auto | |
17073 | fi | |
17074 | ||
17075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
17076 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
17077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
17078 | $as_echo "$with_babeltrace" >&6; } | |
17079 | ||
17080 | if test "x$with_babeltrace" = "xno"; then | |
17081 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
17082 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
17083 | else | |
17084 | # Append -Werror to CFLAGS so that configure can catch the warning | |
17085 | # "assignment from incompatible pointer type", which is related to | |
17086 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
17087 | # in GDB, while babeltrace 1.0.3 is broken. | |
17088 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
17089 | # safe to save and restore CFLAGS here. | |
17090 | saved_CFLAGS=$CFLAGS | |
17091 | CFLAGS="$CFLAGS -Werror" | |
17092 | ||
17093 | ||
17094 | ||
17095 | ||
17096 | ||
17097 | ||
17098 | ||
17099 | ||
17100 | use_additional=yes | |
17101 | ||
17102 | acl_save_prefix="$prefix" | |
17103 | prefix="$acl_final_prefix" | |
17104 | acl_save_exec_prefix="$exec_prefix" | |
17105 | exec_prefix="$acl_final_exec_prefix" | |
17106 | ||
17107 | eval additional_includedir=\"$includedir\" | |
17108 | eval additional_libdir=\"$libdir\" | |
17109 | ||
17110 | exec_prefix="$acl_save_exec_prefix" | |
17111 | prefix="$acl_save_prefix" | |
17112 | ||
17113 | ||
17114 | # Check whether --with-libbabeltrace-prefix was given. | |
17115 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
17116 | withval=$with_libbabeltrace_prefix; | |
17117 | if test "X$withval" = "Xno"; then | |
17118 | use_additional=no | |
17119 | else | |
17120 | if test "X$withval" = "X"; then | |
17121 | ||
17122 | acl_save_prefix="$prefix" | |
17123 | prefix="$acl_final_prefix" | |
17124 | acl_save_exec_prefix="$exec_prefix" | |
17125 | exec_prefix="$acl_final_exec_prefix" | |
17126 | ||
17127 | eval additional_includedir=\"$includedir\" | |
17128 | eval additional_libdir=\"$libdir\" | |
17129 | ||
17130 | exec_prefix="$acl_save_exec_prefix" | |
17131 | prefix="$acl_save_prefix" | |
17132 | ||
17133 | else | |
17134 | additional_includedir="$withval/include" | |
17135 | additional_libdir="$withval/lib" | |
17136 | fi | |
17137 | fi | |
17138 | ||
17139 | fi | |
17140 | ||
17141 | LIBBABELTRACE= | |
17142 | LTLIBBABELTRACE= | |
17143 | INCBABELTRACE= | |
17144 | rpathdirs= | |
17145 | ltrpathdirs= | |
17146 | names_already_handled= | |
17147 | names_next_round='babeltrace babeltrace-ctf' | |
17148 | while test -n "$names_next_round"; do | |
17149 | names_this_round="$names_next_round" | |
17150 | names_next_round= | |
17151 | for name in $names_this_round; do | |
17152 | already_handled= | |
17153 | for n in $names_already_handled; do | |
17154 | if test "$n" = "$name"; then | |
17155 | already_handled=yes | |
17156 | break | |
17157 | fi | |
17158 | done | |
17159 | if test -z "$already_handled"; then | |
17160 | names_already_handled="$names_already_handled $name" | |
17161 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17162 | eval value=\"\$HAVE_LIB$uppername\" | |
17163 | if test -n "$value"; then | |
17164 | if test "$value" = yes; then | |
17165 | eval value=\"\$LIB$uppername\" | |
17166 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
17167 | eval value=\"\$LTLIB$uppername\" | |
17168 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
17169 | else | |
17170 | : | |
17171 | fi | |
17172 | else | |
17173 | found_dir= | |
17174 | found_la= | |
17175 | found_so= | |
17176 | found_a= | |
17177 | if test $use_additional = yes; then | |
17178 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
17179 | found_dir="$additional_libdir" | |
17180 | found_so="$additional_libdir/lib$name.$shlibext" | |
17181 | if test -f "$additional_libdir/lib$name.la"; then | |
17182 | found_la="$additional_libdir/lib$name.la" | |
17183 | fi | |
17184 | else | |
17185 | if test -f "$additional_libdir/lib$name.$libext"; then | |
17186 | found_dir="$additional_libdir" | |
17187 | found_a="$additional_libdir/lib$name.$libext" | |
17188 | if test -f "$additional_libdir/lib$name.la"; then | |
17189 | found_la="$additional_libdir/lib$name.la" | |
17190 | fi | |
17191 | fi | |
17192 | fi | |
17193 | fi | |
17194 | if test "X$found_dir" = "X"; then | |
17195 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17196 | ||
17197 | acl_save_prefix="$prefix" | |
17198 | prefix="$acl_final_prefix" | |
17199 | acl_save_exec_prefix="$exec_prefix" | |
17200 | exec_prefix="$acl_final_exec_prefix" | |
17201 | eval x=\"$x\" | |
17202 | exec_prefix="$acl_save_exec_prefix" | |
17203 | prefix="$acl_save_prefix" | |
17204 | ||
17205 | case "$x" in | |
17206 | -L*) | |
17207 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
17208 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
17209 | found_dir="$dir" | |
17210 | found_so="$dir/lib$name.$shlibext" | |
17211 | if test -f "$dir/lib$name.la"; then | |
17212 | found_la="$dir/lib$name.la" | |
17213 | fi | |
17214 | else | |
17215 | if test -f "$dir/lib$name.$libext"; then | |
17216 | found_dir="$dir" | |
17217 | found_a="$dir/lib$name.$libext" | |
17218 | if test -f "$dir/lib$name.la"; then | |
17219 | found_la="$dir/lib$name.la" | |
17220 | fi | |
17221 | fi | |
17222 | fi | |
17223 | ;; | |
17224 | esac | |
17225 | if test "X$found_dir" != "X"; then | |
17226 | break | |
17227 | fi | |
17228 | done | |
17229 | fi | |
17230 | if test "X$found_dir" != "X"; then | |
17231 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
17232 | if test "X$found_so" != "X"; then | |
17233 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17234 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17235 | else | |
17236 | haveit= | |
17237 | for x in $ltrpathdirs; do | |
17238 | if test "X$x" = "X$found_dir"; then | |
17239 | haveit=yes | |
17240 | break | |
17241 | fi | |
17242 | done | |
17243 | if test -z "$haveit"; then | |
17244 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17245 | fi | |
17246 | if test "$hardcode_direct" = yes; then | |
17247 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17248 | else | |
17249 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17250 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17251 | haveit= | |
17252 | for x in $rpathdirs; do | |
17253 | if test "X$x" = "X$found_dir"; then | |
17254 | haveit=yes | |
17255 | break | |
17256 | fi | |
17257 | done | |
17258 | if test -z "$haveit"; then | |
17259 | rpathdirs="$rpathdirs $found_dir" | |
17260 | fi | |
17261 | else | |
17262 | haveit= | |
17263 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17264 | ||
17265 | acl_save_prefix="$prefix" | |
17266 | prefix="$acl_final_prefix" | |
17267 | acl_save_exec_prefix="$exec_prefix" | |
17268 | exec_prefix="$acl_final_exec_prefix" | |
17269 | eval x=\"$x\" | |
17270 | exec_prefix="$acl_save_exec_prefix" | |
17271 | prefix="$acl_save_prefix" | |
17272 | ||
17273 | if test "X$x" = "X-L$found_dir"; then | |
17274 | haveit=yes | |
17275 | break | |
17276 | fi | |
17277 | done | |
17278 | if test -z "$haveit"; then | |
17279 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
17280 | fi | |
17281 | if test "$hardcode_minus_L" != no; then | |
17282 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17283 | else | |
17284 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17285 | fi | |
17286 | fi | |
17287 | fi | |
17288 | fi | |
17289 | else | |
17290 | if test "X$found_a" != "X"; then | |
17291 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
17292 | else | |
17293 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
17294 | fi | |
17295 | fi | |
17296 | additional_includedir= | |
17297 | case "$found_dir" in | |
17298 | */lib | */lib/) | |
17299 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17300 | additional_includedir="$basedir/include" | |
17301 | ;; | |
17302 | esac | |
17303 | if test "X$additional_includedir" != "X"; then | |
17304 | if test "X$additional_includedir" != "X/usr/include"; then | |
17305 | haveit= | |
17306 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17307 | if test -n "$GCC"; then | |
17308 | case $host_os in | |
17309 | linux*) haveit=yes;; | |
17310 | esac | |
17311 | fi | |
17312 | fi | |
17313 | if test -z "$haveit"; then | |
17314 | for x in $CPPFLAGS $INCBABELTRACE; do | |
17315 | ||
17316 | acl_save_prefix="$prefix" | |
17317 | prefix="$acl_final_prefix" | |
17318 | acl_save_exec_prefix="$exec_prefix" | |
17319 | exec_prefix="$acl_final_exec_prefix" | |
17320 | eval x=\"$x\" | |
17321 | exec_prefix="$acl_save_exec_prefix" | |
17322 | prefix="$acl_save_prefix" | |
17323 | ||
17324 | if test "X$x" = "X-I$additional_includedir"; then | |
17325 | haveit=yes | |
17326 | break | |
17327 | fi | |
17328 | done | |
17329 | if test -z "$haveit"; then | |
17330 | if test -d "$additional_includedir"; then | |
17331 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
17332 | fi | |
17333 | fi | |
17334 | fi | |
17335 | fi | |
17336 | fi | |
17337 | if test -n "$found_la"; then | |
17338 | save_libdir="$libdir" | |
17339 | case "$found_la" in | |
17340 | */* | *\\*) . "$found_la" ;; | |
17341 | *) . "./$found_la" ;; | |
17342 | esac | |
17343 | libdir="$save_libdir" | |
17344 | for dep in $dependency_libs; do | |
17345 | case "$dep" in | |
17346 | -L*) | |
17347 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17348 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17349 | haveit= | |
17350 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17351 | if test -n "$GCC"; then | |
17352 | case $host_os in | |
17353 | linux*) haveit=yes;; | |
17354 | esac | |
17355 | fi | |
17356 | fi | |
17357 | if test -z "$haveit"; then | |
17358 | haveit= | |
17359 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17360 | ||
17361 | acl_save_prefix="$prefix" | |
17362 | prefix="$acl_final_prefix" | |
17363 | acl_save_exec_prefix="$exec_prefix" | |
17364 | exec_prefix="$acl_final_exec_prefix" | |
17365 | eval x=\"$x\" | |
17366 | exec_prefix="$acl_save_exec_prefix" | |
17367 | prefix="$acl_save_prefix" | |
17368 | ||
17369 | if test "X$x" = "X-L$additional_libdir"; then | |
17370 | haveit=yes | |
17371 | break | |
17372 | fi | |
17373 | done | |
17374 | if test -z "$haveit"; then | |
17375 | if test -d "$additional_libdir"; then | |
17376 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
17377 | fi | |
17378 | fi | |
17379 | haveit= | |
17380 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17381 | ||
17382 | acl_save_prefix="$prefix" | |
17383 | prefix="$acl_final_prefix" | |
17384 | acl_save_exec_prefix="$exec_prefix" | |
17385 | exec_prefix="$acl_final_exec_prefix" | |
17386 | eval x=\"$x\" | |
17387 | exec_prefix="$acl_save_exec_prefix" | |
17388 | prefix="$acl_save_prefix" | |
17389 | ||
17390 | if test "X$x" = "X-L$additional_libdir"; then | |
17391 | haveit=yes | |
17392 | break | |
17393 | fi | |
17394 | done | |
17395 | if test -z "$haveit"; then | |
17396 | if test -d "$additional_libdir"; then | |
17397 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
17398 | fi | |
17399 | fi | |
17400 | fi | |
17401 | fi | |
17402 | ;; | |
17403 | -R*) | |
17404 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17405 | if test "$enable_rpath" != no; then | |
17406 | haveit= | |
17407 | for x in $rpathdirs; do | |
17408 | if test "X$x" = "X$dir"; then | |
17409 | haveit=yes | |
17410 | break | |
17411 | fi | |
17412 | done | |
17413 | if test -z "$haveit"; then | |
17414 | rpathdirs="$rpathdirs $dir" | |
17415 | fi | |
17416 | haveit= | |
17417 | for x in $ltrpathdirs; do | |
17418 | if test "X$x" = "X$dir"; then | |
17419 | haveit=yes | |
17420 | break | |
17421 | fi | |
17422 | done | |
17423 | if test -z "$haveit"; then | |
17424 | ltrpathdirs="$ltrpathdirs $dir" | |
17425 | fi | |
17426 | fi | |
17427 | ;; | |
17428 | -l*) | |
17429 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17430 | ;; | |
17431 | *.la) | |
17432 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17433 | ;; | |
17434 | *) | |
17435 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
17436 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
17437 | ;; | |
17438 | esac | |
17439 | done | |
17440 | fi | |
17441 | else | |
17442 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17443 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
17444 | fi | |
17445 | fi | |
17446 | fi | |
17447 | done | |
17448 | done | |
17449 | if test "X$rpathdirs" != "X"; then | |
17450 | if test -n "$hardcode_libdir_separator"; then | |
17451 | alldirs= | |
17452 | for found_dir in $rpathdirs; do | |
17453 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17454 | done | |
17455 | acl_save_libdir="$libdir" | |
17456 | libdir="$alldirs" | |
17457 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17458 | libdir="$acl_save_libdir" | |
17459 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17460 | else | |
17461 | for found_dir in $rpathdirs; do | |
17462 | acl_save_libdir="$libdir" | |
17463 | libdir="$found_dir" | |
17464 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17465 | libdir="$acl_save_libdir" | |
17466 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17467 | done | |
17468 | fi | |
17469 | fi | |
17470 | if test "X$ltrpathdirs" != "X"; then | |
17471 | for found_dir in $ltrpathdirs; do | |
17472 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
17473 | done | |
17474 | fi | |
17475 | ||
17476 | ||
17477 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17478 | ||
17479 | for element in $INCBABELTRACE; do | |
17480 | haveit= | |
17481 | for x in $CPPFLAGS; do | |
17482 | ||
17483 | acl_save_prefix="$prefix" | |
17484 | prefix="$acl_final_prefix" | |
17485 | acl_save_exec_prefix="$exec_prefix" | |
17486 | exec_prefix="$acl_final_exec_prefix" | |
17487 | eval x=\"$x\" | |
17488 | exec_prefix="$acl_save_exec_prefix" | |
17489 | prefix="$acl_save_prefix" | |
17490 | ||
17491 | if test "X$x" = "X$element"; then | |
17492 | haveit=yes | |
17493 | break | |
17494 | fi | |
17495 | done | |
17496 | if test -z "$haveit"; then | |
17497 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17498 | fi | |
17499 | done | |
17500 | ||
17501 | ||
17502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
17503 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
17504 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
17505 | $as_echo_n "(cached) " >&6 | |
17506 | else | |
17507 | ||
17508 | ac_save_LIBS="$LIBS" | |
17509 | LIBS="$LIBS $LIBBABELTRACE" | |
17510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17511 | /* end confdefs.h. */ | |
17512 | #include <babeltrace/babeltrace.h> | |
17513 | #include <babeltrace/ctf/events.h> | |
17514 | #include <babeltrace/ctf/iterator.h> | |
17515 | int | |
17516 | main () | |
17517 | { | |
17518 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
17519 | struct bt_ctf_event *event = NULL; | |
17520 | const struct bt_definition *scope; | |
17521 | ||
13cdc2af | 17522 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 17523 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
17524 | scope = bt_ctf_get_top_level_scope (event, |
17525 | BT_STREAM_EVENT_HEADER); | |
17526 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
17527 | ||
17528 | ; | |
17529 | return 0; | |
17530 | } | |
17531 | _ACEOF | |
17532 | if ac_fn_c_try_link "$LINENO"; then : | |
17533 | ac_cv_libbabeltrace=yes | |
17534 | else | |
17535 | ac_cv_libbabeltrace=no | |
17536 | fi | |
17537 | rm -f core conftest.err conftest.$ac_objext \ | |
17538 | conftest$ac_exeext conftest.$ac_ext | |
17539 | LIBS="$ac_save_LIBS" | |
17540 | ||
17541 | fi | |
17542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
17543 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
17544 | if test "$ac_cv_libbabeltrace" = yes; then | |
17545 | HAVE_LIBBABELTRACE=yes | |
17546 | ||
17547 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
17548 | ||
17549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
17550 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
17551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
17552 | $as_echo "$LIBBABELTRACE" >&6; } | |
17553 | else | |
17554 | HAVE_LIBBABELTRACE=no | |
17555 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17556 | LIBBABELTRACE= | |
17557 | LTLIBBABELTRACE= | |
17558 | fi | |
17559 | ||
17560 | ||
17561 | ||
17562 | ||
17563 | ||
17564 | ||
17565 | CFLAGS=$saved_CFLAGS | |
17566 | ||
17567 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
17568 | if test "$with_babeltrace" = yes; then | |
17569 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
17570 | else | |
17571 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
17572 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
17573 | fi | |
17574 | fi | |
17575 | fi | |
17576 | ||
21ea5acd SDJ |
17577 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an |
17578 | # empty version. | |
c906108c SS |
17579 | |
17580 | files= | |
17581 | links= | |
5a2402b8 | 17582 | |
c906108c SS |
17583 | rm -f nm.h |
17584 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
17585 | case "${nativefile}" in |
17586 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
17587 | * ) GDB_NM_FILE="${nativefile}" | |
17588 | esac | |
5a2402b8 AC |
17589 | files="${files} ${GDB_NM_FILE}" |
17590 | links="${links} nm.h" | |
60ca704f SE |
17591 | |
17592 | cat >>confdefs.h <<_ACEOF | |
b78960be | 17593 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 17594 | _ACEOF |
5a2402b8 | 17595 | |
c906108c | 17596 | fi |
5a2402b8 AC |
17597 | |
17598 | ||
e3487908 GKB |
17599 | for ac_prog in xsltproc |
17600 | do | |
17601 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
17602 | set dummy $ac_prog; ac_word=$2 | |
17603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
17604 | $as_echo_n "checking for $ac_word... " >&6; } | |
17605 | if test "${ac_cv_path_XSLTPROC+set}" = set; then : | |
17606 | $as_echo_n "(cached) " >&6 | |
17607 | else | |
17608 | case $XSLTPROC in | |
17609 | [\\/]* | ?:[\\/]*) | |
17610 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
17611 | ;; | |
17612 | *) | |
17613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17614 | for as_dir in $PATH | |
17615 | do | |
17616 | IFS=$as_save_IFS | |
17617 | test -z "$as_dir" && as_dir=. | |
17618 | for ac_exec_ext in '' $ac_executable_extensions; do | |
17619 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
17620 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" | |
17621 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
17622 | break 2 | |
17623 | fi | |
17624 | done | |
17625 | done | |
17626 | IFS=$as_save_IFS | |
17627 | ||
17628 | ;; | |
17629 | esac | |
17630 | fi | |
17631 | XSLTPROC=$ac_cv_path_XSLTPROC | |
17632 | if test -n "$XSLTPROC"; then | |
17633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
17634 | $as_echo "$XSLTPROC" >&6; } | |
17635 | else | |
17636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
17637 | $as_echo "no" >&6; } | |
17638 | fi | |
17639 | ||
17640 | ||
17641 | test -n "$XSLTPROC" && break | |
17642 | done | |
17643 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
17644 | ||
17645 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
17646 | if test "${XSLTPROC}" = missing; then | |
17647 | as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 | |
17648 | fi | |
17649 | fi | |
17650 | ||
17651 | ||
bec39cab AC |
17652 | ac_sources="$files" |
17653 | ac_dests="$links" | |
17654 | while test -n "$ac_sources"; do | |
17655 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
17656 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
17657 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
17658 | done | |
81ecdfbb | 17659 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
17660 | |
17661 | ||
c906108c SS |
17662 | |
17663 | ||
c906108c | 17664 | |
81ecdfbb | 17665 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 17666 | |
bec39cab | 17667 | |
dcd1f979 TT |
17668 | if $development; then |
17669 | ||
17670 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
17671 | ||
b5884fa7 | 17672 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o" |
1e5ded6c | 17673 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c" |
dcd1f979 TT |
17674 | fi |
17675 | ||
b292c783 | 17676 | |
f6a88844 JM |
17677 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
17678 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
17679 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
17680 | GDB_TRANSFORM_NAME=gdb | |
17681 | fi | |
17682 | ||
17683 | ||
17684 | ||
17685 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
17686 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
17687 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
17688 | GCORE_TRANSFORM_NAME=gcore | |
17689 | fi | |
17690 | ||
b292c783 JK |
17691 | |
17692 | ac_config_files="$ac_config_files gcore" | |
17693 | ||
c971b7fa | 17694 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb | 17695 | |
89a34d1b | 17696 | |
bec39cab AC |
17697 | cat >confcache <<\_ACEOF |
17698 | # This file is a shell script that caches the results of configure | |
17699 | # tests run on this system so they can be shared between configure | |
17700 | # scripts and configure runs, see configure's option --config-cache. | |
17701 | # It is not useful on other systems. If it contains results you don't | |
17702 | # want to keep, you may remove or edit it. | |
17703 | # | |
17704 | # config.status only pays attention to the cache file if you give it | |
17705 | # the --recheck option to rerun configure. | |
17706 | # | |
17707 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
17708 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17709 | # following values. | |
17710 | ||
17711 | _ACEOF | |
17712 | ||
17713 | # The following way of writing the cache mishandles newlines in values, | |
17714 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 17715 | # So, we kill variables containing newlines. |
bec39cab AC |
17716 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17717 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
17718 | ( |
17719 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17720 | eval ac_val=\$$ac_var | |
17721 | case $ac_val in #( | |
17722 | *${as_nl}*) | |
17723 | case $ac_var in #( | |
17724 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
17725 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
17726 | esac | |
17727 | case $ac_var in #( | |
17728 | _ | IFS | as_nl) ;; #( | |
17729 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
17730 | *) { eval $ac_var=; unset $ac_var;} ;; | |
17731 | esac ;; | |
17732 | esac | |
17733 | done | |
17734 | ||
bec39cab | 17735 | (set) 2>&1 | |
81ecdfbb RW |
17736 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
17737 | *${as_nl}ac_space=\ *) | |
17738 | # `set' does not quote correctly, so add quotes: double-quote | |
17739 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
17740 | sed -n \ |
17741 | "s/'/'\\\\''/g; | |
17742 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 17743 | ;; #( |
bec39cab AC |
17744 | *) |
17745 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 17746 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 17747 | ;; |
81ecdfbb RW |
17748 | esac | |
17749 | sort | |
17750 | ) | | |
bec39cab | 17751 | sed ' |
81ecdfbb | 17752 | /^ac_cv_env_/b end |
bec39cab | 17753 | t clear |
81ecdfbb | 17754 | :clear |
bec39cab AC |
17755 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17756 | t end | |
81ecdfbb RW |
17757 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17758 | :end' >>confcache | |
17759 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17760 | if test -w "$cache_file"; then | |
17761 | test "x$cache_file" != "x/dev/null" && | |
17762 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
17763 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
17764 | cat confcache >$cache_file |
17765 | else | |
81ecdfbb RW |
17766 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
17767 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
17768 | fi |
17769 | fi | |
17770 | rm -f confcache | |
17771 | ||
17772 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17773 | # Let make expand exec_prefix. | |
17774 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17775 | ||
bec39cab AC |
17776 | DEFS=-DHAVE_CONFIG_H |
17777 | ||
17778 | ac_libobjs= | |
17779 | ac_ltlibobjs= | |
17780 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
17781 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
17782 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
17783 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
17784 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17785 | # will be set to the directory where LIBOBJS objects are built. | |
17786 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17787 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
17788 | done |
17789 | LIBOBJS=$ac_libobjs | |
17790 | ||
17791 | LTLIBOBJS=$ac_ltlibobjs | |
17792 | ||
17793 | ||
85981d60 | 17794 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
17795 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
17796 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 17797 | fi |
4df42755 DE |
17798 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
17799 | as_fn_error "conditional \"HAVE_PYTHON\" was never defined. | |
17800 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17801 | fi | |
17802 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
17803 | as_fn_error "conditional \"HAVE_GUILE\" was never defined. | |
17804 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17805 | fi | |
81ecdfbb RW |
17806 | |
17807 | ||
bec39cab | 17808 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 17809 | ac_write_fail=0 |
bec39cab AC |
17810 | ac_clean_files_save=$ac_clean_files |
17811 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
17812 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
17813 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17814 | as_write_fail=0 | |
17815 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
17816 | #! $SHELL |
17817 | # Generated by $as_me. | |
17818 | # Run this file to recreate the current configuration. | |
17819 | # Compiler output produced by configure, useful for debugging | |
17820 | # configure, is in config.log if it exists. | |
17821 | ||
17822 | debug=false | |
17823 | ac_cs_recheck=false | |
17824 | ac_cs_silent=false | |
bec39cab | 17825 | |
81ecdfbb RW |
17826 | SHELL=\${CONFIG_SHELL-$SHELL} |
17827 | export SHELL | |
17828 | _ASEOF | |
17829 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
17830 | ## -------------------- ## | |
17831 | ## M4sh Initialization. ## | |
17832 | ## -------------------- ## | |
17833 | ||
17834 | # Be more Bourne compatible | |
17835 | DUALCASE=1; export DUALCASE # for MKS sh | |
17836 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
17837 | emulate sh |
17838 | NULLCMD=: | |
81ecdfbb | 17839 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
17840 | # is contrary to our usage. Disable this feature. |
17841 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
17842 | setopt NO_GLOB_SUBST |
17843 | else | |
17844 | case `(set -o) 2>/dev/null` in #( | |
17845 | *posix*) : | |
17846 | set -o posix ;; #( | |
17847 | *) : | |
17848 | ;; | |
17849 | esac | |
bec39cab | 17850 | fi |
bec39cab | 17851 | |
81ecdfbb RW |
17852 | |
17853 | as_nl=' | |
17854 | ' | |
17855 | export as_nl | |
17856 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
17857 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
17858 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
17859 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
17860 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
17861 | # but without wasting forks for bash or zsh. | |
17862 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
17863 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17864 | as_echo='print -r --' | |
17865 | as_echo_n='print -rn --' | |
17866 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17867 | as_echo='printf %s\n' | |
17868 | as_echo_n='printf %s' | |
17869 | else | |
17870 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
17871 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
17872 | as_echo_n='/usr/ucb/echo -n' | |
17873 | else | |
17874 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
17875 | as_echo_n_body='eval | |
17876 | arg=$1; | |
17877 | case $arg in #( | |
17878 | *"$as_nl"*) | |
17879 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
17880 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
17881 | esac; | |
17882 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
17883 | ' | |
17884 | export as_echo_n_body | |
17885 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
17886 | fi | |
17887 | export as_echo_body | |
17888 | as_echo='sh -c $as_echo_body as_echo' | |
17889 | fi | |
17890 | ||
17891 | # The user is always right. | |
17892 | if test "${PATH_SEPARATOR+set}" != set; then | |
17893 | PATH_SEPARATOR=: | |
17894 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
17895 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
17896 | PATH_SEPARATOR=';' | |
17897 | } | |
bec39cab AC |
17898 | fi |
17899 | ||
17900 | ||
81ecdfbb RW |
17901 | # IFS |
17902 | # We need space, tab and new line, in precisely that order. Quoting is | |
17903 | # there to prevent editors from complaining about space-tab. | |
17904 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17905 | # splitting by setting IFS to empty value.) | |
17906 | IFS=" "" $as_nl" | |
17907 | ||
17908 | # Find who we are. Look in the path if we contain no directory separator. | |
17909 | case $0 in #(( | |
17910 | *[\\/]* ) as_myself=$0 ;; | |
17911 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17912 | for as_dir in $PATH | |
17913 | do | |
17914 | IFS=$as_save_IFS | |
17915 | test -z "$as_dir" && as_dir=. | |
17916 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17917 | done | |
17918 | IFS=$as_save_IFS | |
17919 | ||
17920 | ;; | |
17921 | esac | |
17922 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17923 | # in which case we are not to be found in the path. | |
17924 | if test "x$as_myself" = x; then | |
17925 | as_myself=$0 | |
17926 | fi | |
17927 | if test ! -f "$as_myself"; then | |
17928 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
17929 | exit 1 | |
17930 | fi | |
17931 | ||
17932 | # Unset variables that we do not need and which cause bugs (e.g. in | |
17933 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
17934 | # suppresses any "Segmentation fault" message there. '((' could | |
17935 | # trigger a bug in pdksh 5.2.14. | |
17936 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
17937 | do eval test x\${$as_var+set} = xset \ | |
17938 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
17939 | done | |
bec39cab AC |
17940 | PS1='$ ' |
17941 | PS2='> ' | |
17942 | PS4='+ ' | |
17943 | ||
17944 | # NLS nuisances. | |
81ecdfbb RW |
17945 | LC_ALL=C |
17946 | export LC_ALL | |
17947 | LANGUAGE=C | |
17948 | export LANGUAGE | |
17949 | ||
17950 | # CDPATH. | |
17951 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
17952 | ||
17953 | ||
17954 | # as_fn_error ERROR [LINENO LOG_FD] | |
17955 | # --------------------------------- | |
17956 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
17957 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
17958 | # script with status $?, using 1 if that was 0. | |
17959 | as_fn_error () | |
17960 | { | |
17961 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
17962 | if test "$3"; then | |
17963 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
17964 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
17965 | fi | |
17966 | $as_echo "$as_me: error: $1" >&2 | |
17967 | as_fn_exit $as_status | |
17968 | } # as_fn_error | |
17969 | ||
17970 | ||
17971 | # as_fn_set_status STATUS | |
17972 | # ----------------------- | |
17973 | # Set $? to STATUS, without forking. | |
17974 | as_fn_set_status () | |
17975 | { | |
17976 | return $1 | |
17977 | } # as_fn_set_status | |
17978 | ||
17979 | # as_fn_exit STATUS | |
17980 | # ----------------- | |
17981 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
17982 | as_fn_exit () | |
17983 | { | |
17984 | set +e | |
17985 | as_fn_set_status $1 | |
17986 | exit $1 | |
17987 | } # as_fn_exit | |
17988 | ||
17989 | # as_fn_unset VAR | |
17990 | # --------------- | |
17991 | # Portably unset VAR. | |
17992 | as_fn_unset () | |
17993 | { | |
17994 | { eval $1=; unset $1;} | |
17995 | } | |
17996 | as_unset=as_fn_unset | |
17997 | # as_fn_append VAR VALUE | |
17998 | # ---------------------- | |
17999 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
18000 | # advantage of any shell optimizations that allow amortized linear growth over | |
18001 | # repeated appends, instead of the typical quadratic growth present in naive | |
18002 | # implementations. | |
18003 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
18004 | eval 'as_fn_append () | |
18005 | { | |
18006 | eval $1+=\$2 | |
18007 | }' | |
18008 | else | |
18009 | as_fn_append () | |
18010 | { | |
18011 | eval $1=\$$1\$2 | |
18012 | } | |
18013 | fi # as_fn_append | |
18014 | ||
18015 | # as_fn_arith ARG... | |
18016 | # ------------------ | |
18017 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
18018 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
18019 | # must be portable across $(()) and expr. | |
18020 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
18021 | eval 'as_fn_arith () | |
18022 | { | |
18023 | as_val=$(( $* )) | |
18024 | }' | |
18025 | else | |
18026 | as_fn_arith () | |
18027 | { | |
18028 | as_val=`expr "$@" || test $? -eq 1` | |
18029 | } | |
18030 | fi # as_fn_arith | |
bec39cab | 18031 | |
81ecdfbb RW |
18032 | |
18033 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
18034 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
18035 | as_expr=expr |
18036 | else | |
18037 | as_expr=false | |
18038 | fi | |
18039 | ||
81ecdfbb | 18040 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
18041 | as_basename=basename |
18042 | else | |
18043 | as_basename=false | |
18044 | fi | |
18045 | ||
81ecdfbb RW |
18046 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
18047 | as_dirname=dirname | |
18048 | else | |
18049 | as_dirname=false | |
18050 | fi | |
bec39cab | 18051 | |
81ecdfbb | 18052 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
18053 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
18054 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18055 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
18056 | $as_echo X/"$0" | | |
18057 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
18058 | s//\1/ | |
18059 | q | |
18060 | } | |
18061 | /^X\/\(\/\/\)$/{ | |
18062 | s//\1/ | |
18063 | q | |
18064 | } | |
18065 | /^X\/\(\/\).*/{ | |
18066 | s//\1/ | |
18067 | q | |
18068 | } | |
18069 | s/.*/./; q'` | |
b4e70030 | 18070 | |
b4e70030 JB |
18071 | # Avoid depending upon Character Ranges. |
18072 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
18073 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
18074 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
18075 | as_cr_digits='0123456789' | |
18076 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
18077 | ||
81ecdfbb RW |
18078 | ECHO_C= ECHO_N= ECHO_T= |
18079 | case `echo -n x` in #((((( | |
18080 | -n*) | |
18081 | case `echo 'xy\c'` in | |
18082 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
18083 | xy) ECHO_C='\c';; | |
18084 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
18085 | ECHO_T=' ';; | |
18086 | esac;; | |
18087 | *) | |
18088 | ECHO_N='-n';; | |
bec39cab AC |
18089 | esac |
18090 | ||
81ecdfbb RW |
18091 | rm -f conf$$ conf$$.exe conf$$.file |
18092 | if test -d conf$$.dir; then | |
18093 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 18094 | else |
81ecdfbb RW |
18095 | rm -f conf$$.dir |
18096 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 18097 | fi |
81ecdfbb RW |
18098 | if (echo >conf$$.file) 2>/dev/null; then |
18099 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 18100 | as_ln_s='ln -s' |
81ecdfbb RW |
18101 | # ... but there are two gotchas: |
18102 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
18103 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
18104 | # In both cases, we have to default to `cp -p'. | |
18105 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
18106 | as_ln_s='cp -p' | |
18107 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
18108 | as_ln_s=ln | |
18109 | else | |
18110 | as_ln_s='cp -p' | |
b4e70030 | 18111 | fi |
bec39cab AC |
18112 | else |
18113 | as_ln_s='cp -p' | |
18114 | fi | |
81ecdfbb RW |
18115 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
18116 | rmdir conf$$.dir 2>/dev/null | |
18117 | ||
18118 | ||
18119 | # as_fn_mkdir_p | |
18120 | # ------------- | |
18121 | # Create "$as_dir" as a directory, including parents if necessary. | |
18122 | as_fn_mkdir_p () | |
18123 | { | |
18124 | ||
18125 | case $as_dir in #( | |
18126 | -*) as_dir=./$as_dir;; | |
18127 | esac | |
18128 | test -d "$as_dir" || eval $as_mkdir_p || { | |
18129 | as_dirs= | |
18130 | while :; do | |
18131 | case $as_dir in #( | |
18132 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
18133 | *) as_qdir=$as_dir;; | |
18134 | esac | |
18135 | as_dirs="'$as_qdir' $as_dirs" | |
18136 | as_dir=`$as_dirname -- "$as_dir" || | |
18137 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18138 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
18139 | X"$as_dir" : 'X\(//\)$' \| \ | |
18140 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
18141 | $as_echo X"$as_dir" | | |
18142 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18143 | s//\1/ | |
18144 | q | |
18145 | } | |
18146 | /^X\(\/\/\)[^/].*/{ | |
18147 | s//\1/ | |
18148 | q | |
18149 | } | |
18150 | /^X\(\/\/\)$/{ | |
18151 | s//\1/ | |
18152 | q | |
18153 | } | |
18154 | /^X\(\/\).*/{ | |
18155 | s//\1/ | |
18156 | q | |
18157 | } | |
18158 | s/.*/./; q'` | |
18159 | test -d "$as_dir" && break | |
18160 | done | |
18161 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
18162 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
18163 | ||
bec39cab | 18164 | |
81ecdfbb | 18165 | } # as_fn_mkdir_p |
bec39cab | 18166 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 18167 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
18168 | else |
18169 | test -d ./-p && rmdir ./-p | |
18170 | as_mkdir_p=false | |
18171 | fi | |
18172 | ||
81ecdfbb RW |
18173 | if test -x / >/dev/null 2>&1; then |
18174 | as_test_x='test -x' | |
18175 | else | |
18176 | if ls -dL / >/dev/null 2>&1; then | |
18177 | as_ls_L_option=L | |
18178 | else | |
18179 | as_ls_L_option= | |
18180 | fi | |
18181 | as_test_x=' | |
18182 | eval sh -c '\'' | |
18183 | if test -d "$1"; then | |
18184 | test -d "$1/."; | |
18185 | else | |
18186 | case $1 in #( | |
18187 | -*)set "./$1";; | |
18188 | esac; | |
18189 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
18190 | ???[sx]*):;;*)false;;esac;fi | |
18191 | '\'' sh | |
18192 | ' | |
18193 | fi | |
18194 | as_executable_p=$as_test_x | |
bec39cab AC |
18195 | |
18196 | # Sed expression to map a string onto a valid CPP name. | |
18197 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
18198 | ||
18199 | # Sed expression to map a string onto a valid variable name. | |
18200 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
18201 | ||
18202 | ||
bec39cab | 18203 | exec 6>&1 |
81ecdfbb RW |
18204 | ## ----------------------------------- ## |
18205 | ## Main body of $CONFIG_STATUS script. ## | |
18206 | ## ----------------------------------- ## | |
18207 | _ASEOF | |
18208 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
18209 | ||
18210 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18211 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 18212 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
18213 | # values after options handling. |
18214 | ac_log=" | |
bec39cab | 18215 | This file was extended by $as_me, which was |
81ecdfbb | 18216 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
18217 | |
18218 | CONFIG_FILES = $CONFIG_FILES | |
18219 | CONFIG_HEADERS = $CONFIG_HEADERS | |
18220 | CONFIG_LINKS = $CONFIG_LINKS | |
18221 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
18222 | $ $0 $@ | |
18223 | ||
81ecdfbb RW |
18224 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
18225 | " | |
18226 | ||
bec39cab AC |
18227 | _ACEOF |
18228 | ||
81ecdfbb RW |
18229 | case $ac_config_files in *" |
18230 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
18231 | esac | |
234b45d4 | 18232 | |
81ecdfbb RW |
18233 | case $ac_config_headers in *" |
18234 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
18235 | esac | |
b4e70030 | 18236 | |
b4e70030 | 18237 | |
81ecdfbb RW |
18238 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
18239 | # Files that config.status was made for. | |
18240 | config_files="$ac_config_files" | |
18241 | config_headers="$ac_config_headers" | |
18242 | config_links="$ac_config_links" | |
18243 | config_commands="$ac_config_commands" | |
234b45d4 | 18244 | |
81ecdfbb | 18245 | _ACEOF |
b4e70030 | 18246 | |
81ecdfbb | 18247 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 18248 | ac_cs_usage="\ |
81ecdfbb RW |
18249 | \`$as_me' instantiates files and other configuration actions |
18250 | from templates according to the current configuration. Unless the files | |
18251 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 18252 | |
81ecdfbb | 18253 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 18254 | |
bec39cab | 18255 | -h, --help print this help, then exit |
81ecdfbb RW |
18256 | -V, --version print version number and configuration settings, then exit |
18257 | -q, --quiet, --silent | |
18258 | do not print progress messages | |
bec39cab AC |
18259 | -d, --debug don't remove temporary files |
18260 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
18261 | --file=FILE[:TEMPLATE] |
18262 | instantiate the configuration file FILE | |
18263 | --header=FILE[:TEMPLATE] | |
18264 | instantiate the configuration header FILE | |
234b45d4 | 18265 | |
bec39cab AC |
18266 | Configuration files: |
18267 | $config_files | |
234b45d4 | 18268 | |
bec39cab AC |
18269 | Configuration headers: |
18270 | $config_headers | |
234b45d4 | 18271 | |
bec39cab AC |
18272 | Configuration links: |
18273 | $config_links | |
234b45d4 | 18274 | |
bec39cab AC |
18275 | Configuration commands: |
18276 | $config_commands | |
18277 | ||
81ecdfbb | 18278 | Report bugs to the package provider." |
b4e70030 | 18279 | |
81ecdfbb RW |
18280 | _ACEOF |
18281 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
18282 | ac_cs_version="\\ |
18283 | config.status | |
81ecdfbb RW |
18284 | configured by $0, generated by GNU Autoconf 2.64, |
18285 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 18286 | |
81ecdfbb | 18287 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
18288 | This config.status script is free software; the Free Software Foundation |
18289 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
18290 | |
18291 | ac_pwd='$ac_pwd' | |
18292 | srcdir='$srcdir' | |
18293 | INSTALL='$INSTALL' | |
81ecdfbb RW |
18294 | AWK='$AWK' |
18295 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
18296 | _ACEOF |
18297 | ||
81ecdfbb RW |
18298 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18299 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
18300 | ac_need_defaults=: |
18301 | while test $# != 0 | |
18302 | do | |
18303 | case $1 in | |
18304 | --*=*) | |
81ecdfbb RW |
18305 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18306 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 18307 | ac_shift=: |
c906108c | 18308 | ;; |
81ecdfbb | 18309 | *) |
bec39cab AC |
18310 | ac_option=$1 |
18311 | ac_optarg=$2 | |
18312 | ac_shift=shift | |
c906108c | 18313 | ;; |
bec39cab | 18314 | esac |
c906108c | 18315 | |
bec39cab AC |
18316 | case $ac_option in |
18317 | # Handling of the options. | |
bec39cab AC |
18318 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
18319 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
18320 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
18321 | $as_echo "$ac_cs_version"; exit ;; | |
18322 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
18323 | debug=: ;; |
18324 | --file | --fil | --fi | --f ) | |
18325 | $ac_shift | |
81ecdfbb RW |
18326 | case $ac_optarg in |
18327 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18328 | esac | |
18329 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
18330 | ac_need_defaults=false;; |
18331 | --header | --heade | --head | --hea ) | |
18332 | $ac_shift | |
81ecdfbb RW |
18333 | case $ac_optarg in |
18334 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18335 | esac | |
18336 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 18337 | ac_need_defaults=false;; |
81ecdfbb RW |
18338 | --he | --h) |
18339 | # Conflict between --help and --header | |
18340 | as_fn_error "ambiguous option: \`$1' | |
18341 | Try \`$0 --help' for more information.";; | |
18342 | --help | --hel | -h ) | |
18343 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
18344 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
18345 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18346 | ac_cs_silent=: ;; | |
c906108c | 18347 | |
bec39cab | 18348 | # This is an error. |
81ecdfbb RW |
18349 | -*) as_fn_error "unrecognized option: \`$1' |
18350 | Try \`$0 --help' for more information." ;; | |
c906108c | 18351 | |
81ecdfbb RW |
18352 | *) as_fn_append ac_config_targets " $1" |
18353 | ac_need_defaults=false ;; | |
c906108c | 18354 | |
bec39cab AC |
18355 | esac |
18356 | shift | |
18357 | done | |
c906108c | 18358 | |
bec39cab | 18359 | ac_configure_extra_args= |
c906108c | 18360 | |
bec39cab AC |
18361 | if $ac_cs_silent; then |
18362 | exec 6>/dev/null | |
18363 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
18364 | fi | |
c906108c | 18365 | |
bec39cab | 18366 | _ACEOF |
81ecdfbb | 18367 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 18368 | if \$ac_cs_recheck; then |
81ecdfbb RW |
18369 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
18370 | shift | |
18371 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
18372 | CONFIG_SHELL='$SHELL' | |
18373 | export CONFIG_SHELL | |
18374 | exec "\$@" | |
bec39cab AC |
18375 | fi |
18376 | ||
18377 | _ACEOF | |
81ecdfbb RW |
18378 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18379 | exec 5>>config.log | |
18380 | { | |
18381 | echo | |
18382 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18383 | ## Running $as_me. ## | |
18384 | _ASBOX | |
18385 | $as_echo "$ac_log" | |
18386 | } >&5 | |
bec39cab | 18387 | |
81ecdfbb RW |
18388 | _ACEOF |
18389 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 18390 | # |
81ecdfbb | 18391 | # INIT-COMMANDS |
c906108c | 18392 | # |
a417dc56 | 18393 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 18394 | |
bec39cab AC |
18395 | _ACEOF |
18396 | ||
81ecdfbb | 18397 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 18398 | |
81ecdfbb | 18399 | # Handling of arguments. |
bec39cab | 18400 | for ac_config_target in $ac_config_targets |
c906108c | 18401 | do |
81ecdfbb RW |
18402 | case $ac_config_target in |
18403 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
18404 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 18405 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 18406 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 18407 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 18408 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 18409 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 18410 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 18411 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
18412 | |
18413 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
18414 | esac |
18415 | done | |
18416 | ||
81ecdfbb | 18417 | |
bec39cab AC |
18418 | # If the user did not use the arguments to specify the items to instantiate, |
18419 | # then the envvar interface is used. Set only those that are not. | |
18420 | # We use the long form for the default assignment because of an extremely | |
18421 | # bizarre bug on SunOS 4.1.3. | |
18422 | if $ac_need_defaults; then | |
18423 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18424 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18425 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
18426 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18427 | fi | |
18428 | ||
b4e70030 | 18429 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 18430 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 18431 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
18432 | # Hook for its removal unless debugging. |
18433 | # Note that there is a small window in which the directory will not be cleaned: | |
18434 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
18435 | $debug || |
18436 | { | |
81ecdfbb RW |
18437 | tmp= |
18438 | trap 'exit_status=$? | |
18439 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
18440 | ' 0 | |
18441 | trap 'as_fn_exit 1' 1 2 13 15 | |
18442 | } | |
18443 | # Create a (secure) tmp directory for tmp files. | |
18444 | ||
18445 | { | |
18446 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
18447 | test -n "$tmp" && test -d "$tmp" | |
18448 | } || | |
18449 | { | |
18450 | tmp=./conf$$-$RANDOM | |
18451 | (umask 077 && mkdir "$tmp") | |
18452 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
18453 | ||
18454 | # Set up the scripts for CONFIG_FILES section. | |
18455 | # No need to generate them if there are no CONFIG_FILES. | |
18456 | # This happens for instance with `./config.status config.h'. | |
18457 | if test -n "$CONFIG_FILES"; then | |
18458 | ||
18459 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
18460 | ac_cs_awk_getline=: | |
18461 | ac_cs_awk_pipe_init= | |
18462 | ac_cs_awk_read_file=' | |
18463 | while ((getline aline < (F[key])) > 0) | |
18464 | print(aline) | |
18465 | close(F[key])' | |
18466 | ac_cs_awk_pipe_fini= | |
18467 | else | |
18468 | ac_cs_awk_getline=false | |
18469 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
18470 | ac_cs_awk_read_file=' | |
18471 | print "|#_!!_#|" | |
18472 | print "cat " F[key] " &&" | |
18473 | '$ac_cs_awk_pipe_init | |
18474 | # The final `:' finishes the AND list. | |
18475 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
18476 | fi | |
18477 | ac_cr=`echo X | tr X '\015'` | |
18478 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
18479 | # But we know of no other shell where ac_cr would be empty at this | |
18480 | # point, so we can use a bashism as a fallback. | |
18481 | if test "x$ac_cr" = x; then | |
18482 | eval ac_cr=\$\'\\r\' | |
18483 | fi | |
18484 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
18485 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
18486 | ac_cs_awk_cr='\r' | |
18487 | else | |
18488 | ac_cs_awk_cr=$ac_cr | |
18489 | fi | |
18490 | ||
18491 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
18492 | _ACEOF | |
18493 | ||
18494 | # Create commands to substitute file output variables. | |
18495 | { | |
18496 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
18497 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
18498 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
18499 | echo "_ACAWK" && | |
18500 | echo "_ACEOF" | |
18501 | } >conf$$files.sh && | |
18502 | . ./conf$$files.sh || | |
18503 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18504 | rm -f conf$$files.sh | |
18505 | ||
18506 | { | |
18507 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
18508 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
18509 | echo "_ACEOF" | |
18510 | } >conf$$subs.sh || | |
18511 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18512 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
18513 | ac_delim='%!_!# ' | |
18514 | for ac_last_try in false false false false false :; do | |
18515 | . ./conf$$subs.sh || | |
18516 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18517 | ||
18518 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
18519 | if test $ac_delim_n = $ac_delim_num; then | |
18520 | break | |
18521 | elif $ac_last_try; then | |
18522 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18523 | else | |
18524 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18525 | fi | |
18526 | done | |
18527 | rm -f conf$$subs.sh | |
18528 | ||
18529 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18530 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
18531 | _ACEOF | |
18532 | sed -n ' | |
18533 | h | |
18534 | s/^/S["/; s/!.*/"]=/ | |
18535 | p | |
18536 | g | |
18537 | s/^[^!]*!// | |
18538 | :repl | |
18539 | t repl | |
18540 | s/'"$ac_delim"'$// | |
18541 | t delim | |
18542 | :nl | |
18543 | h | |
18544 | s/\(.\{148\}\).*/\1/ | |
18545 | t more1 | |
18546 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
18547 | p | |
18548 | n | |
18549 | b repl | |
18550 | :more1 | |
18551 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18552 | p | |
18553 | g | |
18554 | s/.\{148\}// | |
18555 | t nl | |
18556 | :delim | |
18557 | h | |
18558 | s/\(.\{148\}\).*/\1/ | |
18559 | t more2 | |
18560 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
18561 | p | |
18562 | b | |
18563 | :more2 | |
18564 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18565 | p | |
18566 | g | |
18567 | s/.\{148\}// | |
18568 | t delim | |
18569 | ' <conf$$subs.awk | sed ' | |
18570 | /^[^""]/{ | |
18571 | N | |
18572 | s/\n// | |
18573 | } | |
18574 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
18575 | rm -f conf$$subs.awk | |
18576 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18577 | _ACAWK | |
18578 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
18579 | for (key in S) S_is_set[key] = 1 | |
18580 | FS = "\a" | |
18581 | \$ac_cs_awk_pipe_init | |
18582 | } | |
18583 | { | |
18584 | line = $ 0 | |
18585 | nfields = split(line, field, "@") | |
18586 | substed = 0 | |
18587 | len = length(field[1]) | |
18588 | for (i = 2; i < nfields; i++) { | |
18589 | key = field[i] | |
18590 | keylen = length(key) | |
18591 | if (S_is_set[key]) { | |
18592 | value = S[key] | |
18593 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
18594 | len += length(value) + length(field[++i]) | |
18595 | substed = 1 | |
18596 | } else | |
18597 | len += 1 + keylen | |
18598 | } | |
18599 | if (nfields == 3 && !substed) { | |
18600 | key = field[2] | |
18601 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
18602 | \$ac_cs_awk_read_file | |
18603 | next | |
18604 | } | |
18605 | } | |
18606 | print line | |
b4e70030 | 18607 | } |
81ecdfbb RW |
18608 | \$ac_cs_awk_pipe_fini |
18609 | _ACAWK | |
18610 | _ACEOF | |
18611 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18612 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
18613 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
18614 | else | |
18615 | cat | |
18616 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
18617 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
18618 | _ACEOF | |
18619 | ||
18620 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
18621 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
18622 | # trailing colons and then remove the whole line if VPATH becomes empty | |
18623 | # (actually we leave an empty line to preserve line numbers). | |
18624 | if test "x$srcdir" = x.; then | |
18625 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
18626 | s/:*\$(srcdir):*/:/ | |
18627 | s/:*\${srcdir}:*/:/ | |
18628 | s/:*@srcdir@:*/:/ | |
18629 | s/^\([^=]*=[ ]*\):*/\1/ | |
18630 | s/:*$// | |
18631 | s/^[^=]*=[ ]*$// | |
18632 | }' | |
18633 | fi | |
18634 | ||
18635 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18636 | fi # test -n "$CONFIG_FILES" | |
18637 | ||
18638 | # Set up the scripts for CONFIG_HEADERS section. | |
18639 | # No need to generate them if there are no CONFIG_HEADERS. | |
18640 | # This happens for instance with `./config.status Makefile'. | |
18641 | if test -n "$CONFIG_HEADERS"; then | |
18642 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
18643 | BEGIN { | |
18644 | _ACEOF | |
18645 | ||
18646 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
18647 | # here-document in config.status, that substitutes the proper values into | |
18648 | # config.h.in to produce config.h. | |
4e8d927d | 18649 | |
81ecdfbb RW |
18650 | # Create a delimiter string that does not exist in confdefs.h, to ease |
18651 | # handling of long lines. | |
18652 | ac_delim='%!_!# ' | |
18653 | for ac_last_try in false false :; do | |
18654 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
18655 | if test -z "$ac_t"; then | |
18656 | break | |
18657 | elif $ac_last_try; then | |
18658 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
18659 | else | |
18660 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18661 | fi | |
18662 | done | |
4e8d927d | 18663 | |
81ecdfbb RW |
18664 | # For the awk script, D is an array of macro values keyed by name, |
18665 | # likewise P contains macro parameters if any. Preserve backslash | |
18666 | # newline sequences. | |
18667 | ||
18668 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18669 | sed -n ' | |
18670 | s/.\{148\}/&'"$ac_delim"'/g | |
18671 | t rset | |
18672 | :rset | |
18673 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
18674 | t def | |
18675 | d | |
18676 | :def | |
18677 | s/\\$// | |
18678 | t bsnl | |
18679 | s/["\\]/\\&/g | |
18680 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18681 | D["\1"]=" \3"/p | |
18682 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
18683 | d | |
18684 | :bsnl | |
18685 | s/["\\]/\\&/g | |
18686 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18687 | D["\1"]=" \3\\\\\\n"\\/p | |
18688 | t cont | |
18689 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
18690 | t cont | |
18691 | d | |
18692 | :cont | |
18693 | n | |
18694 | s/.\{148\}/&'"$ac_delim"'/g | |
18695 | t clear | |
18696 | :clear | |
18697 | s/\\$// | |
18698 | t bsnlc | |
18699 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
18700 | d | |
18701 | :bsnlc | |
18702 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
18703 | b cont | |
18704 | ' <confdefs.h | sed ' | |
18705 | s/'"$ac_delim"'/"\\\ | |
18706 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
18707 | ||
18708 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18709 | for (key in D) D_is_set[key] = 1 | |
18710 | FS = "\a" | |
18711 | } | |
18712 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
18713 | line = \$ 0 | |
18714 | split(line, arg, " ") | |
18715 | if (arg[1] == "#") { | |
18716 | defundef = arg[2] | |
18717 | mac1 = arg[3] | |
18718 | } else { | |
18719 | defundef = substr(arg[1], 2) | |
18720 | mac1 = arg[2] | |
18721 | } | |
18722 | split(mac1, mac2, "(") #) | |
18723 | macro = mac2[1] | |
18724 | prefix = substr(line, 1, index(line, defundef) - 1) | |
18725 | if (D_is_set[macro]) { | |
18726 | # Preserve the white space surrounding the "#". | |
18727 | print prefix "define", macro P[macro] D[macro] | |
18728 | next | |
18729 | } else { | |
18730 | # Replace #undef with comments. This is necessary, for example, | |
18731 | # in the case of _POSIX_SOURCE, which is predefined and required | |
18732 | # on some systems where configure will not decide to define it. | |
18733 | if (defundef == "undef") { | |
18734 | print "/*", prefix defundef, macro, "*/" | |
18735 | next | |
18736 | } | |
18737 | } | |
b4e70030 | 18738 | } |
81ecdfbb RW |
18739 | { print } |
18740 | _ACAWK | |
b4e70030 | 18741 | _ACEOF |
81ecdfbb RW |
18742 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18743 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
18744 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 18745 | |
4e8d927d | 18746 | |
81ecdfbb RW |
18747 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
18748 | shift | |
18749 | for ac_tag | |
18750 | do | |
18751 | case $ac_tag in | |
18752 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18753 | esac | |
18754 | case $ac_mode$ac_tag in | |
18755 | :[FHL]*:*);; | |
18756 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
18757 | :[FH]-) ac_tag=-:-;; | |
18758 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18759 | esac | |
18760 | ac_save_IFS=$IFS | |
18761 | IFS=: | |
18762 | set x $ac_tag | |
18763 | IFS=$ac_save_IFS | |
18764 | shift | |
18765 | ac_file=$1 | |
18766 | shift | |
4e8d927d | 18767 | |
81ecdfbb RW |
18768 | case $ac_mode in |
18769 | :L) ac_source=$1;; | |
18770 | :[FH]) | |
18771 | ac_file_inputs= | |
18772 | for ac_f | |
18773 | do | |
18774 | case $ac_f in | |
18775 | -) ac_f="$tmp/stdin";; | |
18776 | *) # Look for the file first in the build tree, then in the source tree | |
18777 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18778 | # because $ac_f cannot contain `:'. | |
18779 | test -f "$ac_f" || | |
18780 | case $ac_f in | |
18781 | [\\/$]*) false;; | |
18782 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18783 | esac || | |
18784 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
18785 | esac | |
18786 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
18787 | as_fn_append ac_file_inputs " '$ac_f'" | |
18788 | done | |
18789 | ||
18790 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18791 | # use $as_me), people would be surprised to read: | |
18792 | # /* config.h. Generated by config.status. */ | |
18793 | configure_input='Generated from '` | |
18794 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
18795 | `' by configure.' | |
18796 | if test x"$ac_file" != x-; then | |
18797 | configure_input="$ac_file. $configure_input" | |
18798 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
18799 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 18800 | fi |
81ecdfbb RW |
18801 | # Neutralize special characters interpreted by sed in replacement strings. |
18802 | case $configure_input in #( | |
18803 | *\&* | *\|* | *\\* ) | |
18804 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
18805 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
18806 | *) ac_sed_conf_input=$configure_input;; | |
18807 | esac | |
4e8d927d | 18808 | |
81ecdfbb RW |
18809 | case $ac_tag in |
18810 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
18811 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
18812 | esac | |
18813 | ;; | |
c906108c SS |
18814 | esac |
18815 | ||
81ecdfbb | 18816 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
18817 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
18818 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18819 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18820 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
18821 | $as_echo X"$ac_file" | | |
18822 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18823 | s//\1/ | |
18824 | q | |
18825 | } | |
18826 | /^X\(\/\/\)[^/].*/{ | |
18827 | s//\1/ | |
18828 | q | |
18829 | } | |
18830 | /^X\(\/\/\)$/{ | |
18831 | s//\1/ | |
18832 | q | |
18833 | } | |
18834 | /^X\(\/\).*/{ | |
18835 | s//\1/ | |
18836 | q | |
18837 | } | |
18838 | s/.*/./; q'` | |
18839 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
18840 | ac_builddir=. |
18841 | ||
81ecdfbb RW |
18842 | case "$ac_dir" in |
18843 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18844 | *) | |
18845 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18846 | # A ".." for each directory in $ac_dir_suffix. | |
18847 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18848 | case $ac_top_builddir_sub in | |
18849 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18850 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18851 | esac ;; | |
18852 | esac | |
18853 | ac_abs_top_builddir=$ac_pwd | |
18854 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18855 | # for backward compatibility: | |
18856 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
18857 | |
18858 | case $srcdir in | |
81ecdfbb | 18859 | .) # We are building in place. |
bec39cab | 18860 | ac_srcdir=. |
81ecdfbb RW |
18861 | ac_top_srcdir=$ac_top_builddir_sub |
18862 | ac_abs_top_srcdir=$ac_pwd ;; | |
18863 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 18864 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
18865 | ac_top_srcdir=$srcdir |
18866 | ac_abs_top_srcdir=$srcdir ;; | |
18867 | *) # Relative name. | |
18868 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18869 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18870 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 18871 | esac |
81ecdfbb | 18872 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 18873 | |
c906108c | 18874 | |
81ecdfbb RW |
18875 | case $ac_mode in |
18876 | :F) | |
18877 | # | |
18878 | # CONFIG_FILE | |
18879 | # | |
c906108c | 18880 | |
bec39cab AC |
18881 | case $INSTALL in |
18882 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 18883 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 18884 | esac |
81ecdfbb | 18885 | _ACEOF |
121ce6e5 | 18886 | |
81ecdfbb RW |
18887 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18888 | # If the template does not know about datarootdir, expand it. | |
18889 | # FIXME: This hack should be removed a few years after 2.60. | |
18890 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18891 | ac_sed_dataroot=' | |
18892 | /datarootdir/ { | |
18893 | p | |
18894 | q | |
18895 | } | |
18896 | /@datadir@/p | |
18897 | /@docdir@/p | |
18898 | /@infodir@/p | |
18899 | /@localedir@/p | |
18900 | /@mandir@/p' | |
18901 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
18902 | *datarootdir*) ac_datarootdir_seen=yes;; | |
18903 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
18904 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
18905 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
18906 | _ACEOF | |
18907 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18908 | ac_datarootdir_hack=' | |
18909 | s&@datadir@&$datadir&g | |
18910 | s&@docdir@&$docdir&g | |
18911 | s&@infodir@&$infodir&g | |
18912 | s&@localedir@&$localedir&g | |
18913 | s&@mandir@&$mandir&g | |
18914 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
18915 | esac | |
4e8d927d | 18916 | _ACEOF |
81ecdfbb RW |
18917 | |
18918 | # Neutralize VPATH when `$srcdir' = `.'. | |
18919 | # Shell code in configure.ac might set extrasub. | |
18920 | # FIXME: do we really want to maintain this feature? | |
18921 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18922 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
18923 | $extrasub |
18924 | _ACEOF | |
81ecdfbb | 18925 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
18926 | :t |
18927 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
18928 | s|@configure_input@|$ac_sed_conf_input|;t t |
18929 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
18930 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
18931 | s&@srcdir@&$ac_srcdir&;t t | |
18932 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
18933 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
18934 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
18935 | s&@builddir@&$ac_builddir&;t t | |
18936 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
18937 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
18938 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
18939 | $ac_datarootdir_hack |
18940 | " | |
18941 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
18942 | if $ac_cs_awk_getline; then | |
18943 | $AWK -f "$tmp/subs.awk" | |
18944 | else | |
18945 | $AWK -f "$tmp/subs.awk" | $SHELL | |
18946 | fi >$tmp/out \ | |
18947 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
18948 | ||
18949 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
18950 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
18951 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
18952 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18953 | which seems to be undefined. Please make sure it is defined." >&5 | |
18954 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18955 | which seems to be undefined. Please make sure it is defined." >&2;} | |
18956 | ||
18957 | rm -f "$tmp/stdin" | |
bec39cab | 18958 | case $ac_file in |
81ecdfbb RW |
18959 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
18960 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
18961 | esac \ | |
18962 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
18963 | ;; | |
18964 | :H) | |
18965 | # | |
18966 | # CONFIG_HEADER | |
18967 | # | |
bec39cab | 18968 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
18969 | { |
18970 | $as_echo "/* $configure_input */" \ | |
18971 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
18972 | } >"$tmp/config.h" \ | |
18973 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
18974 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
18975 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
18976 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 18977 | else |
81ecdfbb RW |
18978 | rm -f "$ac_file" |
18979 | mv "$tmp/config.h" "$ac_file" \ | |
18980 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
18981 | fi |
18982 | else | |
81ecdfbb RW |
18983 | $as_echo "/* $configure_input */" \ |
18984 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
18985 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 18986 | fi |
81ecdfbb RW |
18987 | ;; |
18988 | :L) | |
18989 | # | |
18990 | # CONFIG_LINK | |
18991 | # | |
c906108c | 18992 | |
81ecdfbb RW |
18993 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
18994 | : | |
b4e70030 | 18995 | else |
81ecdfbb RW |
18996 | # Prefer the file from the source tree if names are identical. |
18997 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
18998 | ac_source=$srcdir/$ac_source | |
18999 | fi | |
b4e70030 | 19000 | |
81ecdfbb RW |
19001 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
19002 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 19003 | |
81ecdfbb RW |
19004 | if test ! -r "$ac_source"; then |
19005 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
19006 | fi | |
19007 | rm -f "$ac_file" | |
bec39cab | 19008 | |
81ecdfbb RW |
19009 | # Try a relative symlink, then a hard link, then a copy. |
19010 | case $srcdir in | |
19011 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
19012 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
19013 | esac | |
19014 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
19015 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
19016 | cp -p "$ac_source" "$ac_file" || | |
19017 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
19018 | fi | |
19019 | ;; | |
19020 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
19021 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
19022 | ;; | |
c906108c | 19023 | esac |
b4e70030 | 19024 | |
bec39cab | 19025 | |
81ecdfbb RW |
19026 | case $ac_file$ac_mode in |
19027 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 19028 | "gcore":F) chmod +x gcore ;; |
1e94266c SM |
19029 | "Makefile":F) |
19030 | case x$CONFIG_HEADERS in | |
19031 | xconfig.h:config.in) | |
19032 | echo > stamp-h ;; | |
19033 | esac | |
19034 | ;; | |
19035 | "gdb-gdb.gdb":F) | |
19036 | case x$CONFIG_HEADERS in | |
19037 | xconfig.h:config.in) | |
19038 | echo > stamp-h ;; | |
19039 | esac | |
19040 | ;; | |
19041 | "doc/Makefile":F) | |
19042 | case x$CONFIG_HEADERS in | |
19043 | xconfig.h:config.in) | |
19044 | echo > stamp-h ;; | |
19045 | esac | |
19046 | ;; | |
19047 | "data-directory/Makefile":F) | |
c906108c SS |
19048 | case x$CONFIG_HEADERS in |
19049 | xconfig.h:config.in) | |
19050 | echo > stamp-h ;; | |
19051 | esac | |
bec39cab | 19052 | ;; |
81ecdfbb | 19053 | |
bec39cab | 19054 | esac |
81ecdfbb | 19055 | done # for ac_tag |
c906108c | 19056 | |
bec39cab | 19057 | |
81ecdfbb | 19058 | as_fn_exit 0 |
bec39cab | 19059 | _ACEOF |
bec39cab AC |
19060 | ac_clean_files=$ac_clean_files_save |
19061 | ||
81ecdfbb RW |
19062 | test $ac_write_fail = 0 || |
19063 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
19064 | ||
bec39cab AC |
19065 | |
19066 | # configure is writing to config.log, and then calls config.status. | |
19067 | # config.status does its own redirection, appending to config.log. | |
19068 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
19069 | # by configure, so config.status won't be able to write to it; its | |
19070 | # output is simply discarded. So we exec the FD to /dev/null, | |
19071 | # effectively closing config.log, so it can be properly (re)opened and | |
19072 | # appended to by config.status. When coming back to configure, we | |
19073 | # need to make the FD available again. | |
19074 | if test "$no_create" != yes; then | |
19075 | ac_cs_success=: | |
19076 | ac_config_status_args= | |
19077 | test "$silent" = yes && | |
19078 | ac_config_status_args="$ac_config_status_args --quiet" | |
19079 | exec 5>/dev/null | |
19080 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
19081 | exec 5>>config.log | |
19082 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
19083 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 19084 | $ac_cs_success || as_fn_exit $? |
bec39cab | 19085 | fi |
c906108c | 19086 | |
bec39cab | 19087 | # |
81ecdfbb | 19088 | # CONFIG_SUBDIRS section. |
bec39cab | 19089 | # |
c906108c SS |
19090 | if test "$no_recursion" != yes; then |
19091 | ||
81ecdfbb RW |
19092 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
19093 | # so they do not pile up. | |
c906108c SS |
19094 | ac_sub_configure_args= |
19095 | ac_prev= | |
fdc59709 PB |
19096 | eval "set x $ac_configure_args" |
19097 | shift | |
19098 | for ac_arg | |
19099 | do | |
c906108c SS |
19100 | if test -n "$ac_prev"; then |
19101 | ac_prev= | |
19102 | continue | |
19103 | fi | |
bec39cab | 19104 | case $ac_arg in |
c906108c SS |
19105 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
19106 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
19107 | ac_prev=cache_file ;; | |
19108 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
19109 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
19110 | | --c=*) | |
19111 | ;; | |
19112 | --config-cache | -C) | |
c906108c SS |
19113 | ;; |
19114 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
19115 | ac_prev=srcdir ;; | |
19116 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
19117 | ;; | |
bec39cab AC |
19118 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
19119 | ac_prev=prefix ;; | |
19120 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
19121 | ;; | |
81ecdfbb RW |
19122 | --disable-option-checking) |
19123 | ;; | |
fdc59709 PB |
19124 | *) |
19125 | case $ac_arg in | |
81ecdfbb | 19126 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19127 | esac |
81ecdfbb | 19128 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
19129 | esac |
19130 | done | |
19131 | ||
bec39cab AC |
19132 | # Always prepend --prefix to ensure using the same prefix |
19133 | # in subdir configurations. | |
fdc59709 PB |
19134 | ac_arg="--prefix=$prefix" |
19135 | case $ac_arg in | |
81ecdfbb | 19136 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19137 | esac |
81ecdfbb RW |
19138 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
19139 | ||
19140 | # Pass --silent | |
19141 | if test "$silent" = yes; then | |
19142 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
19143 | fi | |
19144 | ||
19145 | # Always prepend --disable-option-checking to silence warnings, since | |
19146 | # different subdirs can have different --enable and --with options. | |
19147 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 19148 | |
b4e70030 | 19149 | ac_popdir=`pwd` |
bec39cab | 19150 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
19151 | |
19152 | # Do not complain, so a configure script can configure whichever | |
19153 | # parts of a large source tree are present. | |
fdc59709 | 19154 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 19155 | |
81ecdfbb RW |
19156 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
19157 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
19158 | $as_echo "$ac_msg" >&6 | |
19159 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
19160 | ac_builddir=. |
19161 | ||
81ecdfbb RW |
19162 | case "$ac_dir" in |
19163 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19164 | *) | |
19165 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
19166 | # A ".." for each directory in $ac_dir_suffix. | |
19167 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
19168 | case $ac_top_builddir_sub in | |
19169 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19170 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
19171 | esac ;; | |
19172 | esac | |
19173 | ac_abs_top_builddir=$ac_pwd | |
19174 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
19175 | # for backward compatibility: | |
19176 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
19177 | |
19178 | case $srcdir in | |
81ecdfbb | 19179 | .) # We are building in place. |
bec39cab | 19180 | ac_srcdir=. |
81ecdfbb RW |
19181 | ac_top_srcdir=$ac_top_builddir_sub |
19182 | ac_abs_top_srcdir=$ac_pwd ;; | |
19183 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 19184 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
19185 | ac_top_srcdir=$srcdir |
19186 | ac_abs_top_srcdir=$srcdir ;; | |
19187 | *) # Relative name. | |
19188 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
19189 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
19190 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 19191 | esac |
81ecdfbb | 19192 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 19193 | |
c906108c | 19194 | |
fdc59709 | 19195 | cd "$ac_dir" |
c906108c SS |
19196 | |
19197 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
19198 | if test -f "$ac_srcdir/configure.gnu"; then |
19199 | ac_sub_configure=$ac_srcdir/configure.gnu | |
19200 | elif test -f "$ac_srcdir/configure"; then | |
19201 | ac_sub_configure=$ac_srcdir/configure | |
19202 | elif test -f "$ac_srcdir/configure.in"; then | |
19203 | # This should be Cygnus configure. | |
19204 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 19205 | else |
81ecdfbb RW |
19206 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
19207 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
19208 | ac_sub_configure= |
19209 | fi | |
19210 | ||
19211 | # The recursion is here. | |
19212 | if test -n "$ac_sub_configure"; then | |
c906108c | 19213 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
19214 | case $cache_file in |
19215 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
19216 | *) # Relative name. |
19217 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 19218 | esac |
c906108c | 19219 | |
81ecdfbb RW |
19220 | { $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 |
19221 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 19222 | # The eval makes quoting arguments work. |
fdc59709 PB |
19223 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
19224 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 19225 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
19226 | fi |
19227 | ||
fdc59709 | 19228 | cd "$ac_popdir" |
c906108c SS |
19229 | done |
19230 | fi | |
81ecdfbb RW |
19231 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
19232 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
19233 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
19234 | fi | |
c906108c | 19235 |