]>
Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell [email protected] about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
81ecdfbb | 591 | enable_option_checking=no |
c971b7fa | 592 | ac_subst_vars='LTLIBOBJS |
81ecdfbb | 593 | LIBOBJS |
b292c783 JK |
594 | GCORE_TRANSFORM_NAME |
595 | GDB_TRANSFORM_NAME | |
e3487908 | 596 | XSLTPROC |
81ecdfbb | 597 | GDB_NM_FILE |
393fd4c3 YQ |
598 | LTLIBBABELTRACE |
599 | LIBBABELTRACE | |
600 | HAVE_LIBBABELTRACE | |
81ecdfbb RW |
601 | frags |
602 | target_subdir | |
603 | CONFIG_UNINSTALL | |
604 | CONFIG_INSTALL | |
605 | CONFIG_CLEAN | |
606 | CONFIG_ALL | |
607 | CONFIG_SRCS | |
608 | CONFIG_DEPS | |
609 | CONFIG_OBS | |
610 | PROFILE_CFLAGS | |
611 | ENABLE_CFLAGS | |
612 | SIM_OBS | |
613 | SIM | |
614 | XMKMF | |
615 | GDBTK_SRC_DIR | |
616 | GDBTK_CFLAGS | |
617 | GDBTKLIBS | |
618 | X_LIBS | |
619 | X_LDFLAGS | |
620 | X_CFLAGS | |
621 | TK_XINCLUDES | |
622 | TK_DEPS | |
623 | TK_LIBRARY | |
624 | TK_INCLUDE | |
625 | TK_STUB_LIB_SPEC | |
626 | TK_STUB_LIB_FLAG | |
627 | TK_STUB_LIB_FILE | |
628 | TK_LIB_SPEC | |
629 | TK_LIB_FLAG | |
630 | TK_LIB_FILE | |
631 | TK_SRC_DIR | |
632 | TK_BIN_DIR | |
633 | TK_VERSION | |
634 | TCL_DEPS | |
635 | TCL_LIBRARY | |
636 | TCL_INCLUDE | |
637 | TCL_STUB_LIB_SPEC | |
638 | TCL_STUB_LIB_FLAG | |
639 | TCL_STUB_LIB_FILE | |
640 | TCL_LIB_SPEC | |
641 | TCL_LIB_FLAG | |
642 | TCL_LIB_FILE | |
643 | TCL_SRC_DIR | |
644 | TCL_BIN_DIR | |
645 | TCL_PATCH_LEVEL | |
646 | TCL_VERSION | |
647 | WIN32LDAPP | |
648 | GUI_CFLAGS_X | |
649 | LIBGUI | |
608e2dbb TT |
650 | LTLIBLZMA |
651 | LIBLZMA | |
652 | HAVE_LIBLZMA | |
81ecdfbb RW |
653 | WIN32LIBS |
654 | SER_HARDWIRE | |
655 | WERROR_CFLAGS | |
656 | WARN_CFLAGS | |
657 | SYSTEM_GDBINIT | |
81ecdfbb RW |
658 | TARGET_SYSTEM_ROOT |
659 | CONFIG_LDFLAGS | |
f6528abd | 660 | RDYNAMIC |
81ecdfbb | 661 | ALLOCA |
58bfce93 MM |
662 | LTLIBIPT |
663 | LIBIPT | |
664 | HAVE_LIBIPT | |
4df42755 DE |
665 | HAVE_GUILE_FALSE |
666 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
667 | GUILE_LIBS |
668 | GUILE_CPPFLAGS | |
e76c5d17 DE |
669 | GUILD_TARGET_FLAG |
670 | GUILD | |
ed3ef339 | 671 | pkg_config_prog_path |
4df42755 DE |
672 | HAVE_PYTHON_FALSE |
673 | HAVE_PYTHON_TRUE | |
ac534cba JB |
674 | PYTHON_LIBS |
675 | PYTHON_CPPFLAGS | |
81ecdfbb | 676 | PYTHON_CFLAGS |
ec685c5e | 677 | python_prog_path |
81ecdfbb RW |
678 | LTLIBEXPAT |
679 | LIBEXPAT | |
680 | HAVE_LIBEXPAT | |
b8e0a31c | 681 | JIT_READER_DIR |
f997c383 | 682 | TARGET_PTR |
39037522 | 683 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
684 | READLINE_CFLAGS |
685 | READLINE_DEPS | |
686 | READLINE | |
016a3251 DD |
687 | LTLIBICONV |
688 | LIBICONV | |
711a72d3 L |
689 | zlibinc |
690 | zlibdir | |
81ecdfbb RW |
691 | MIG |
692 | WINDRES | |
693 | DLLTOOL | |
c971b7fa | 694 | AR |
81ecdfbb RW |
695 | YFLAGS |
696 | YACC | |
c971b7fa | 697 | RANLIB |
81ecdfbb | 698 | LN_S |
c971b7fa PA |
699 | INSTALL_DATA |
700 | INSTALL_SCRIPT | |
701 | INSTALL_PROGRAM | |
702 | AWK | |
81ecdfbb RW |
703 | REPORT_BUGS_TEXI |
704 | REPORT_BUGS_TO | |
705 | PKGVERSION | |
b292c783 | 706 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
707 | TARGET_OBS |
708 | subdirs | |
709 | GDB_DATADIR | |
710 | DEBUGDIR | |
5048e516 JK |
711 | MAKEINFO_EXTRA_FLAGS |
712 | MAKEINFOFLAGS | |
713 | MAKEINFO | |
81ecdfbb RW |
714 | PACKAGE |
715 | GNULIB_STDINT_H | |
81ecdfbb RW |
716 | CATOBJEXT |
717 | GENCAT | |
718 | INSTOBJEXT | |
719 | DATADIRNAME | |
720 | CATALOGS | |
721 | POSUB | |
722 | GMSGFMT | |
723 | XGETTEXT | |
724 | INCINTL | |
725 | LIBINTL_DEP | |
726 | LIBINTL | |
727 | USE_NLS | |
728 | SET_MAKE | |
729 | GMAKE_FALSE | |
730 | GMAKE_TRUE | |
731 | MAKE | |
732 | CCDEPMODE | |
733 | DEPDIR | |
734 | am__leading_dot | |
0bcda685 PA |
735 | CXX_DIALECT |
736 | HAVE_CXX11 | |
4869db5e RM |
737 | INSTALL_STRIP_PROGRAM |
738 | STRIP | |
739 | install_sh | |
81ecdfbb RW |
740 | target_os |
741 | target_vendor | |
742 | target_cpu | |
743 | target | |
744 | host_os | |
745 | host_vendor | |
746 | host_cpu | |
747 | host | |
748 | build_os | |
749 | build_vendor | |
750 | build_cpu | |
751 | build | |
c971b7fa PA |
752 | EGREP |
753 | GREP | |
754 | CPP | |
3bc3d82a PA |
755 | ac_ct_CXX |
756 | CXXFLAGS | |
757 | CXX | |
81ecdfbb RW |
758 | OBJEXT |
759 | EXEEXT | |
760 | ac_ct_CC | |
761 | CPPFLAGS | |
762 | LDFLAGS | |
763 | CFLAGS | |
764 | CC | |
765 | MAINT | |
766 | MAINTAINER_MODE_FALSE | |
767 | MAINTAINER_MODE_TRUE | |
768 | target_alias | |
769 | host_alias | |
770 | build_alias | |
771 | LIBS | |
772 | ECHO_T | |
773 | ECHO_N | |
774 | ECHO_C | |
775 | DEFS | |
776 | mandir | |
777 | localedir | |
778 | libdir | |
779 | psdir | |
780 | pdfdir | |
781 | dvidir | |
782 | htmldir | |
783 | infodir | |
784 | docdir | |
785 | oldincludedir | |
786 | includedir | |
787 | localstatedir | |
788 | sharedstatedir | |
789 | sysconfdir | |
790 | datadir | |
791 | datarootdir | |
792 | libexecdir | |
793 | sbindir | |
794 | bindir | |
795 | program_transform_name | |
796 | prefix | |
797 | exec_prefix | |
798 | PACKAGE_URL | |
799 | PACKAGE_BUGREPORT | |
800 | PACKAGE_STRING | |
801 | PACKAGE_VERSION | |
802 | PACKAGE_TARNAME | |
803 | PACKAGE_NAME | |
804 | PATH_SEPARATOR | |
805 | SHELL' | |
a4ce5b0d | 806 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
807 | ac_user_opts=' |
808 | enable_option_checking | |
809 | enable_maintainer_mode | |
da2f07f1 JK |
810 | enable_plugins |
811 | enable_largefile | |
81ecdfbb RW |
812 | with_separate_debug_dir |
813 | with_gdb_datadir | |
814 | with_relocated_sources | |
7349ff92 | 815 | with_auto_load_dir |
bccbefd2 | 816 | with_auto_load_safe_path |
81ecdfbb RW |
817 | enable_targets |
818 | enable_64_bit_bfd | |
819 | enable_gdbcli | |
820 | enable_gdbmi | |
821 | enable_tui | |
822 | enable_gdbtk | |
05e7c244 | 823 | with_libunwind_ia64 |
81ecdfbb RW |
824 | with_curses |
825 | enable_profiling | |
826 | with_pkgversion | |
827 | with_bugurl | |
711a72d3 | 828 | with_system_zlib |
016a3251 DD |
829 | with_gnu_ld |
830 | enable_rpath | |
81ecdfbb | 831 | with_libiconv_prefix |
478aac75 | 832 | with_iconv_bin |
81ecdfbb | 833 | with_system_readline |
b8e0a31c | 834 | with_jit_reader_dir |
81ecdfbb | 835 | with_expat |
81ecdfbb RW |
836 | with_libexpat_prefix |
837 | with_python | |
ed3ef339 | 838 | with_guile |
a8db4212 | 839 | enable_libmcheck |
58bfce93 MM |
840 | with_intel_pt |
841 | with_libipt_prefix | |
81ecdfbb RW |
842 | with_included_regex |
843 | with_sysroot | |
844 | with_system_gdbinit | |
845 | enable_werror | |
846 | enable_build_warnings | |
847 | enable_gdb_build_warnings | |
608e2dbb TT |
848 | with_lzma |
849 | with_liblzma_prefix | |
81ecdfbb RW |
850 | with_tcl |
851 | with_tk | |
852 | with_x | |
853 | enable_sim | |
854 | enable_multi_ice | |
496c0e1b | 855 | enable_gdbserver |
393fd4c3 YQ |
856 | with_babeltrace |
857 | with_libbabeltrace_prefix | |
81ecdfbb RW |
858 | ' |
859 | ac_precious_vars='build_alias | |
860 | host_alias | |
861 | target_alias | |
862 | CC | |
863 | CFLAGS | |
864 | LDFLAGS | |
865 | LIBS | |
866 | CPPFLAGS | |
3bc3d82a PA |
867 | CXX |
868 | CXXFLAGS | |
869 | CCC | |
81ecdfbb | 870 | CPP |
f06e05e0 JK |
871 | MAKEINFO |
872 | MAKEINFOFLAGS | |
81ecdfbb RW |
873 | YACC |
874 | YFLAGS | |
875 | XMKMF' | |
5ae98d25 | 876 | ac_subdirs_all='testsuite |
81ecdfbb RW |
877 | gdbtk |
878 | multi-ice | |
879 | gdbserver' | |
c906108c SS |
880 | |
881 | # Initialize some variables set by options. | |
bec39cab AC |
882 | ac_init_help= |
883 | ac_init_version=false | |
81ecdfbb RW |
884 | ac_unrecognized_opts= |
885 | ac_unrecognized_sep= | |
c906108c SS |
886 | # The variables have the same names as the options, with |
887 | # dashes changed to underlines. | |
bec39cab | 888 | cache_file=/dev/null |
c906108c | 889 | exec_prefix=NONE |
c906108c | 890 | no_create= |
c906108c SS |
891 | no_recursion= |
892 | prefix=NONE | |
893 | program_prefix=NONE | |
894 | program_suffix=NONE | |
895 | program_transform_name=s,x,x, | |
896 | silent= | |
897 | site= | |
898 | srcdir= | |
c906108c SS |
899 | verbose= |
900 | x_includes=NONE | |
901 | x_libraries=NONE | |
bec39cab AC |
902 | |
903 | # Installation directory options. | |
904 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
905 | # and all the variables that are supposed to be based on exec_prefix | |
906 | # by default will actually change. | |
907 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 908 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
909 | bindir='${exec_prefix}/bin' |
910 | sbindir='${exec_prefix}/sbin' | |
911 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
912 | datarootdir='${prefix}/share' |
913 | datadir='${datarootdir}' | |
c906108c SS |
914 | sysconfdir='${prefix}/etc' |
915 | sharedstatedir='${prefix}/com' | |
916 | localstatedir='${prefix}/var' | |
c906108c SS |
917 | includedir='${prefix}/include' |
918 | oldincludedir='/usr/include' | |
81ecdfbb RW |
919 | docdir='${datarootdir}/doc/${PACKAGE}' |
920 | infodir='${datarootdir}/info' | |
921 | htmldir='${docdir}' | |
922 | dvidir='${docdir}' | |
923 | pdfdir='${docdir}' | |
924 | psdir='${docdir}' | |
925 | libdir='${exec_prefix}/lib' | |
926 | localedir='${datarootdir}/locale' | |
927 | mandir='${datarootdir}/man' | |
c906108c | 928 | |
c906108c | 929 | ac_prev= |
81ecdfbb | 930 | ac_dashdash= |
c906108c SS |
931 | for ac_option |
932 | do | |
c906108c SS |
933 | # If the previous option needs an argument, assign it. |
934 | if test -n "$ac_prev"; then | |
81ecdfbb | 935 | eval $ac_prev=\$ac_option |
c906108c SS |
936 | ac_prev= |
937 | continue | |
938 | fi | |
939 | ||
81ecdfbb RW |
940 | case $ac_option in |
941 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
942 | *) ac_optarg=yes ;; | |
943 | esac | |
c906108c SS |
944 | |
945 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
946 | ||
81ecdfbb RW |
947 | case $ac_dashdash$ac_option in |
948 | --) | |
949 | ac_dashdash=yes ;; | |
c906108c SS |
950 | |
951 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
952 | ac_prev=bindir ;; | |
953 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 954 | bindir=$ac_optarg ;; |
c906108c SS |
955 | |
956 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 957 | ac_prev=build_alias ;; |
c906108c | 958 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 959 | build_alias=$ac_optarg ;; |
c906108c SS |
960 | |
961 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
962 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
963 | ac_prev=cache_file ;; | |
964 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
965 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
966 | cache_file=$ac_optarg ;; |
967 | ||
968 | --config-cache | -C) | |
969 | cache_file=config.cache ;; | |
c906108c | 970 | |
81ecdfbb | 971 | -datadir | --datadir | --datadi | --datad) |
c906108c | 972 | ac_prev=datadir ;; |
81ecdfbb | 973 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 974 | datadir=$ac_optarg ;; |
c906108c | 975 | |
81ecdfbb RW |
976 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
977 | | --dataroo | --dataro | --datar) | |
978 | ac_prev=datarootdir ;; | |
979 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
980 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
981 | datarootdir=$ac_optarg ;; | |
982 | ||
c906108c | 983 | -disable-* | --disable-*) |
81ecdfbb | 984 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 985 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
986 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
987 | as_fn_error "invalid feature name: $ac_useropt" | |
988 | ac_useropt_orig=$ac_useropt | |
989 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
990 | case $ac_user_opts in | |
991 | *" | |
992 | "enable_$ac_useropt" | |
993 | "*) ;; | |
994 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
995 | ac_unrecognized_sep=', ';; | |
996 | esac | |
997 | eval enable_$ac_useropt=no ;; | |
998 | ||
999 | -docdir | --docdir | --docdi | --doc | --do) | |
1000 | ac_prev=docdir ;; | |
1001 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1002 | docdir=$ac_optarg ;; | |
1003 | ||
1004 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1005 | ac_prev=dvidir ;; | |
1006 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1007 | dvidir=$ac_optarg ;; | |
c906108c SS |
1008 | |
1009 | -enable-* | --enable-*) | |
81ecdfbb | 1010 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1011 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1012 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1013 | as_fn_error "invalid feature name: $ac_useropt" | |
1014 | ac_useropt_orig=$ac_useropt | |
1015 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1016 | case $ac_user_opts in | |
1017 | *" | |
1018 | "enable_$ac_useropt" | |
1019 | "*) ;; | |
1020 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1021 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1022 | esac |
81ecdfbb | 1023 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1024 | |
1025 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1026 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1027 | | --exec | --exe | --ex) | |
1028 | ac_prev=exec_prefix ;; | |
1029 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1030 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1031 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1032 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1033 | |
1034 | -gas | --gas | --ga | --g) | |
1035 | # Obsolete; use --with-gas. | |
1036 | with_gas=yes ;; | |
1037 | ||
bec39cab AC |
1038 | -help | --help | --hel | --he | -h) |
1039 | ac_init_help=long ;; | |
1040 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1041 | ac_init_help=recursive ;; | |
1042 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1043 | ac_init_help=short ;; | |
c906108c SS |
1044 | |
1045 | -host | --host | --hos | --ho) | |
bec39cab | 1046 | ac_prev=host_alias ;; |
c906108c | 1047 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1048 | host_alias=$ac_optarg ;; |
c906108c | 1049 | |
81ecdfbb RW |
1050 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1051 | ac_prev=htmldir ;; | |
1052 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1053 | | --ht=*) | |
1054 | htmldir=$ac_optarg ;; | |
1055 | ||
c906108c SS |
1056 | -includedir | --includedir | --includedi | --included | --include \ |
1057 | | --includ | --inclu | --incl | --inc) | |
1058 | ac_prev=includedir ;; | |
1059 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1060 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1061 | includedir=$ac_optarg ;; |
c906108c SS |
1062 | |
1063 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1064 | ac_prev=infodir ;; | |
1065 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1066 | infodir=$ac_optarg ;; |
c906108c SS |
1067 | |
1068 | -libdir | --libdir | --libdi | --libd) | |
1069 | ac_prev=libdir ;; | |
1070 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1071 | libdir=$ac_optarg ;; |
c906108c SS |
1072 | |
1073 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1074 | | --libexe | --libex | --libe) | |
1075 | ac_prev=libexecdir ;; | |
1076 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1077 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1078 | libexecdir=$ac_optarg ;; |
c906108c | 1079 | |
81ecdfbb RW |
1080 | -localedir | --localedir | --localedi | --localed | --locale) |
1081 | ac_prev=localedir ;; | |
1082 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1083 | localedir=$ac_optarg ;; | |
1084 | ||
c906108c | 1085 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1086 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1087 | ac_prev=localstatedir ;; |
1088 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1089 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1090 | localstatedir=$ac_optarg ;; |
c906108c SS |
1091 | |
1092 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1093 | ac_prev=mandir ;; | |
1094 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1095 | mandir=$ac_optarg ;; |
c906108c SS |
1096 | |
1097 | -nfp | --nfp | --nf) | |
1098 | # Obsolete; use --without-fp. | |
1099 | with_fp=no ;; | |
1100 | ||
1101 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1102 | | --no-cr | --no-c | -n) |
c906108c SS |
1103 | no_create=yes ;; |
1104 | ||
1105 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1106 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1107 | no_recursion=yes ;; | |
1108 | ||
1109 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1110 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1111 | | --oldin | --oldi | --old | --ol | --o) | |
1112 | ac_prev=oldincludedir ;; | |
1113 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1114 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1115 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1116 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1117 | |
1118 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1119 | ac_prev=prefix ;; | |
1120 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1121 | prefix=$ac_optarg ;; |
c906108c SS |
1122 | |
1123 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1124 | | --program-pre | --program-pr | --program-p) | |
1125 | ac_prev=program_prefix ;; | |
1126 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1127 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1128 | program_prefix=$ac_optarg ;; |
c906108c SS |
1129 | |
1130 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1131 | | --program-suf | --program-su | --program-s) | |
1132 | ac_prev=program_suffix ;; | |
1133 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1134 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1135 | program_suffix=$ac_optarg ;; |
c906108c SS |
1136 | |
1137 | -program-transform-name | --program-transform-name \ | |
1138 | | --program-transform-nam | --program-transform-na \ | |
1139 | | --program-transform-n | --program-transform- \ | |
1140 | | --program-transform | --program-transfor \ | |
1141 | | --program-transfo | --program-transf \ | |
1142 | | --program-trans | --program-tran \ | |
1143 | | --progr-tra | --program-tr | --program-t) | |
1144 | ac_prev=program_transform_name ;; | |
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=*) | |
bec39cab | 1152 | program_transform_name=$ac_optarg ;; |
c906108c | 1153 | |
81ecdfbb RW |
1154 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1155 | ac_prev=pdfdir ;; | |
1156 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1157 | pdfdir=$ac_optarg ;; | |
1158 | ||
1159 | -psdir | --psdir | --psdi | --psd | --ps) | |
1160 | ac_prev=psdir ;; | |
1161 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1162 | psdir=$ac_optarg ;; | |
1163 | ||
c906108c SS |
1164 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1165 | | -silent | --silent | --silen | --sile | --sil) | |
1166 | silent=yes ;; | |
1167 | ||
1168 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1169 | ac_prev=sbindir ;; | |
1170 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1171 | | --sbi=* | --sb=*) | |
bec39cab | 1172 | sbindir=$ac_optarg ;; |
c906108c SS |
1173 | |
1174 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1175 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1176 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1177 | | --sha | --sh) | |
1178 | ac_prev=sharedstatedir ;; | |
1179 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1180 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1181 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1182 | | --sha=* | --sh=*) | |
bec39cab | 1183 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1184 | |
1185 | -site | --site | --sit) | |
1186 | ac_prev=site ;; | |
1187 | -site=* | --site=* | --sit=*) | |
bec39cab | 1188 | site=$ac_optarg ;; |
3ace7edb | 1189 | |
c906108c SS |
1190 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1191 | ac_prev=srcdir ;; | |
1192 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1193 | srcdir=$ac_optarg ;; |
c906108c SS |
1194 | |
1195 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1196 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1197 | ac_prev=sysconfdir ;; | |
1198 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1199 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1200 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1201 | |
1202 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1203 | ac_prev=target_alias ;; |
c906108c | 1204 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1205 | target_alias=$ac_optarg ;; |
c906108c SS |
1206 | |
1207 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1208 | verbose=yes ;; | |
1209 | ||
bec39cab AC |
1210 | -version | --version | --versio | --versi | --vers | -V) |
1211 | ac_init_version=: ;; | |
c906108c SS |
1212 | |
1213 | -with-* | --with-*) | |
81ecdfbb | 1214 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1215 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1216 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1217 | as_fn_error "invalid package name: $ac_useropt" | |
1218 | ac_useropt_orig=$ac_useropt | |
1219 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1220 | case $ac_user_opts in | |
1221 | *" | |
1222 | "with_$ac_useropt" | |
1223 | "*) ;; | |
1224 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1225 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1226 | esac |
81ecdfbb | 1227 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1228 | |
1229 | -without-* | --without-*) | |
81ecdfbb | 1230 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1231 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1232 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1233 | as_fn_error "invalid package name: $ac_useropt" | |
1234 | ac_useropt_orig=$ac_useropt | |
1235 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1236 | case $ac_user_opts in | |
1237 | *" | |
1238 | "with_$ac_useropt" | |
1239 | "*) ;; | |
1240 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1241 | ac_unrecognized_sep=', ';; | |
1242 | esac | |
1243 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1244 | |
1245 | --x) | |
1246 | # Obsolete; use --with-x. | |
1247 | with_x=yes ;; | |
1248 | ||
1249 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1250 | | --x-incl | --x-inc | --x-in | --x-i) | |
1251 | ac_prev=x_includes ;; | |
1252 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1253 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1254 | x_includes=$ac_optarg ;; |
c906108c SS |
1255 | |
1256 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1257 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1258 | ac_prev=x_libraries ;; | |
1259 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1260 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1261 | x_libraries=$ac_optarg ;; |
c906108c | 1262 | |
81ecdfbb RW |
1263 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1264 | Try \`$0 --help' for more information." | |
c906108c SS |
1265 | ;; |
1266 | ||
bec39cab AC |
1267 | *=*) |
1268 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1269 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1270 | case $ac_envvar in #( |
1271 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1272 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1273 | esac | |
1274 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1275 | export $ac_envvar ;; |
1276 | ||
c906108c | 1277 | *) |
bec39cab | 1278 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1279 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1280 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1281 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1282 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1283 | ;; |
1284 | ||
1285 | esac | |
1286 | done | |
1287 | ||
1288 | if test -n "$ac_prev"; then | |
bec39cab | 1289 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1290 | as_fn_error "missing argument to $ac_option" |
c906108c | 1291 | fi |
c906108c | 1292 | |
81ecdfbb RW |
1293 | if test -n "$ac_unrecognized_opts"; then |
1294 | case $enable_option_checking in | |
1295 | no) ;; | |
1296 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1297 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1298 | esac |
81ecdfbb | 1299 | fi |
b4e70030 | 1300 | |
81ecdfbb RW |
1301 | # Check all directory arguments for consistency. |
1302 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1303 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1304 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1305 | libdir localedir mandir | |
b4e70030 | 1306 | do |
81ecdfbb RW |
1307 | eval ac_val=\$$ac_var |
1308 | # Remove trailing slashes. | |
1309 | case $ac_val in | |
1310 | */ ) | |
1311 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1312 | eval $ac_var=\$ac_val;; | |
1313 | esac | |
1314 | # Be sure to have absolute directory names. | |
b4e70030 | 1315 | case $ac_val in |
81ecdfbb RW |
1316 | [\\/$]* | ?:[\\/]* ) continue;; |
1317 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1318 | esac |
81ecdfbb | 1319 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1320 | done |
1321 | ||
bec39cab AC |
1322 | # There might be people who depend on the old broken behavior: `$host' |
1323 | # used to hold the argument of --host etc. | |
1324 | # FIXME: To remove some day. | |
1325 | build=$build_alias | |
1326 | host=$host_alias | |
1327 | target=$target_alias | |
1328 | ||
1329 | # FIXME: To remove some day. | |
1330 | if test "x$host_alias" != x; then | |
1331 | if test "x$build_alias" = x; then | |
1332 | cross_compiling=maybe | |
81ecdfbb | 1333 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1334 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1335 | elif test "x$build_alias" != "x$host_alias"; then | |
1336 | cross_compiling=yes | |
1337 | fi | |
1338 | fi | |
c906108c | 1339 | |
bec39cab AC |
1340 | ac_tool_prefix= |
1341 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1342 | ||
1343 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1344 | |
c906108c | 1345 | |
81ecdfbb RW |
1346 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1347 | ac_ls_di=`ls -di .` && | |
1348 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1349 | as_fn_error "working directory cannot be determined" | |
1350 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1351 | as_fn_error "pwd does not report name of working directory" | |
1352 | ||
1353 | ||
c906108c SS |
1354 | # Find the source files, if location was not specified. |
1355 | if test -z "$srcdir"; then | |
1356 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1357 | # Try the directory containing this script, then the parent directory. |
1358 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1359 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1360 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1361 | X"$as_myself" : 'X\(//\)$' \| \ | |
1362 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1363 | $as_echo X"$as_myself" | | |
1364 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1365 | s//\1/ | |
1366 | q | |
1367 | } | |
1368 | /^X\(\/\/\)[^/].*/{ | |
1369 | s//\1/ | |
1370 | q | |
1371 | } | |
1372 | /^X\(\/\/\)$/{ | |
1373 | s//\1/ | |
1374 | q | |
1375 | } | |
1376 | /^X\(\/\).*/{ | |
1377 | s//\1/ | |
1378 | q | |
1379 | } | |
1380 | s/.*/./; q'` | |
c906108c | 1381 | srcdir=$ac_confdir |
81ecdfbb | 1382 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1383 | srcdir=.. |
1384 | fi | |
1385 | else | |
1386 | ac_srcdir_defaulted=no | |
1387 | fi | |
81ecdfbb RW |
1388 | if test ! -r "$srcdir/$ac_unique_file"; then |
1389 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1390 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1391 | fi | |
1392 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1393 | ac_abs_confdir=`( | |
1394 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1395 | pwd)` | |
1396 | # When building in place, set srcdir=. | |
1397 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1398 | srcdir=. | |
1399 | fi | |
1400 | # Remove unnecessary trailing slashes from srcdir. | |
1401 | # Double slashes in file names in object file debugging info | |
1402 | # mess up M-x gdb in Emacs. | |
1403 | case $srcdir in | |
1404 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1405 | esac | |
1406 | for ac_var in $ac_precious_vars; do | |
1407 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1408 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1409 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1410 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1411 | done | |
c906108c | 1412 | |
bec39cab AC |
1413 | # |
1414 | # Report the --help message. | |
1415 | # | |
1416 | if test "$ac_init_help" = "long"; then | |
1417 | # Omit some internal or obsolete options to make the list less imposing. | |
1418 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1419 | cat <<_ACEOF | |
1420 | \`configure' configures this package to adapt to many kinds of systems. | |
1421 | ||
1422 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1423 | ||
1424 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1425 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1426 | ||
1427 | Defaults for the options are specified in brackets. | |
1428 | ||
1429 | Configuration: | |
1430 | -h, --help display this help and exit | |
1431 | --help=short display options specific to this package | |
1432 | --help=recursive display the short help of all the included packages | |
1433 | -V, --version display version information and exit | |
1434 | -q, --quiet, --silent do not print \`checking...' messages | |
1435 | --cache-file=FILE cache test results in FILE [disabled] | |
1436 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1437 | -n, --no-create do not create output files | |
1438 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1439 | ||
bec39cab AC |
1440 | Installation directories: |
1441 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1442 | [$ac_default_prefix] |
bec39cab | 1443 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1444 | [PREFIX] |
bec39cab AC |
1445 | |
1446 | By default, \`make install' will install all the files in | |
1447 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1448 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1449 | for instance \`--prefix=\$HOME'. | |
1450 | ||
1451 | For better control, use the options below. | |
1452 | ||
1453 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1454 | --bindir=DIR user executables [EPREFIX/bin] |
1455 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1456 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1457 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1458 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1459 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1460 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1461 | --includedir=DIR C header files [PREFIX/include] | |
1462 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1463 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1464 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1465 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1466 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1467 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1468 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1469 | --htmldir=DIR html documentation [DOCDIR] | |
1470 | --dvidir=DIR dvi documentation [DOCDIR] | |
1471 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1472 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1473 | _ACEOF |
1474 | ||
1475 | cat <<\_ACEOF | |
1476 | ||
9009e1ae MR |
1477 | Program names: |
1478 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1479 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1480 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1481 | ||
bec39cab AC |
1482 | X features: |
1483 | --x-includes=DIR X include files are in DIR | |
1484 | --x-libraries=DIR X library files are in DIR | |
1485 | ||
1486 | System types: | |
1487 | --build=BUILD configure for building on BUILD [guessed] | |
1488 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1489 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1490 | _ACEOF | |
1491 | fi | |
1492 | ||
1493 | if test -n "$ac_init_help"; then | |
1494 | ||
1495 | cat <<\_ACEOF | |
1496 | ||
1497 | Optional Features: | |
81ecdfbb | 1498 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1499 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1500 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1501 | --enable-maintainer-mode enable make rules and dependencies not useful |
1502 | (and sometimes confusing) to the casual installer | |
2974be62 | 1503 | --enable-plugins Enable support for plugins |
da2f07f1 | 1504 | --disable-largefile omit support for large files |
a1220294 TT |
1505 | --enable-targets=TARGETS |
1506 | alternative target configurations | |
c0993dbe | 1507 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1508 | --disable-gdbcli disable command-line interface (CLI) |
1509 | --disable-gdbmi disable machine-interface (MI) | |
1510 | --enable-tui enable full-screen terminal user interface (TUI) | |
1511 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1512 | --enable-profiling enable profiling of GDB | |
3841debe | 1513 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1514 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1515 | --enable-werror treat compile warnings as errors |
32c1c914 | 1516 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1517 | --enable-gdb-build-warnings |
32c1c914 | 1518 | enable GDB specific build-time compiler warnings if |
a1220294 | 1519 | gcc is used |
32c1c914 | 1520 | --enable-sim link gdb with simulator |
bec39cab | 1521 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1522 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1523 | is auto) | |
bec39cab AC |
1524 | |
1525 | Optional Packages: | |
1526 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1527 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1528 | --with-separate-debug-dir=PATH |
32c1c914 | 1529 | look for global separate debug info in this path |
62e4f60c | 1530 | [LIBDIR/debug] |
b14b1491 TT |
1531 | --with-gdb-datadir=PATH look for global separate data files in this path |
1532 | [DATADIR/gdb] | |
29b0e8a2 | 1533 | --with-relocated-sources=PATH |
32c1c914 | 1534 | automatically relocate this path for source files |
7349ff92 | 1535 | --with-auto-load-dir=PATH |
aff139ff | 1536 | directories from which to load auto-loaded scripts |
1564a261 | 1537 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1538 | --with-auto-load-safe-path=PATH |
aff139ff | 1539 | directories safe to hold auto-loaded files |
7349ff92 | 1540 | [--with-auto-load-dir] |
bccbefd2 JK |
1541 | --without-auto-load-safe-path |
1542 | do not restrict auto-loaded files locations | |
05e7c244 | 1543 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1544 | --with-curses use the curses library instead of the termcap |
1545 | library | |
c16158bc JM |
1546 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1547 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1548 | --with-system-zlib use installed libz |
016a3251 DD |
1549 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1550 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1551 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
478aac75 | 1552 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1553 | --with-system-readline use installed readline library |
b8e0a31c SD |
1554 | --with-jit-reader-dir=PATH |
1555 | directory to load the JIT readers from | |
5c39566f | 1556 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1557 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1558 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1559 | --with-python[=PYTHON] include python support |
1560 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1561 | --with-guile[=GUILE] include guile support |
1562 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1563 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1564 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1565 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
a1220294 TT |
1566 | --without-included-regex |
1567 | don't use included regex; this is the default on | |
1568 | systems with version 2 of the GNU C library (use | |
1569 | with caution on other system) | |
81ecdfbb | 1570 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1571 | --with-system-gdbinit=PATH |
32c1c914 | 1572 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1573 | --with-lzma support lzma compression (auto/yes/no) |
1574 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1575 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1576 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1577 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1578 | --with-x use the X Window System |
393fd4c3 YQ |
1579 | --with-babeltrace include babeltrace support (auto/yes/no) |
1580 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1581 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1582 | |
1583 | Some influential environment variables: | |
1584 | CC C compiler command | |
1585 | CFLAGS C compiler flags | |
1586 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1587 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1588 | LIBS libraries to pass to the linker, e.g. -l<library> |
1589 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1590 | you have headers in a nonstandard directory <include dir> | |
3bc3d82a PA |
1591 | CXX C++ compiler command |
1592 | CXXFLAGS C++ compiler flags | |
bec39cab | 1593 | CPP C preprocessor |
f06e05e0 JK |
1594 | MAKEINFO Parent configure detects if it is of sufficient version. |
1595 | MAKEINFOFLAGS | |
1596 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1597 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1598 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1599 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1600 | This script will default YFLAGS to the empty string to avoid a | |
1601 | default value of `-d' given by some make applications. | |
1602 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1603 | |
1604 | Use these variables to override the choices made by `configure' or to help | |
1605 | it to find libraries and programs with nonstandard names/locations. | |
1606 | ||
81ecdfbb | 1607 | Report bugs to the package provider. |
bec39cab | 1608 | _ACEOF |
81ecdfbb | 1609 | ac_status=$? |
bec39cab AC |
1610 | fi |
1611 | ||
1612 | if test "$ac_init_help" = "recursive"; then | |
1613 | # If there are subdirs, report their specific --help. | |
bec39cab | 1614 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1615 | test -d "$ac_dir" || |
1616 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1617 | continue | |
bec39cab AC |
1618 | ac_builddir=. |
1619 | ||
81ecdfbb RW |
1620 | case "$ac_dir" in |
1621 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1622 | *) | |
1623 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1624 | # A ".." for each directory in $ac_dir_suffix. | |
1625 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1626 | case $ac_top_builddir_sub in | |
1627 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1628 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1629 | esac ;; | |
1630 | esac | |
1631 | ac_abs_top_builddir=$ac_pwd | |
1632 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1633 | # for backward compatibility: | |
1634 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1635 | |
1636 | case $srcdir in | |
81ecdfbb | 1637 | .) # We are building in place. |
bec39cab | 1638 | ac_srcdir=. |
81ecdfbb RW |
1639 | ac_top_srcdir=$ac_top_builddir_sub |
1640 | ac_abs_top_srcdir=$ac_pwd ;; | |
1641 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1642 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1643 | ac_top_srcdir=$srcdir |
1644 | ac_abs_top_srcdir=$srcdir ;; | |
1645 | *) # Relative name. | |
1646 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1647 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1648 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1649 | esac |
81ecdfbb | 1650 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1651 | |
81ecdfbb RW |
1652 | cd "$ac_dir" || { ac_status=$?; continue; } |
1653 | # Check for guested configure. | |
1654 | if test -f "$ac_srcdir/configure.gnu"; then | |
1655 | echo && | |
1656 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1657 | elif test -f "$ac_srcdir/configure"; then | |
1658 | echo && | |
1659 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1660 | else |
81ecdfbb RW |
1661 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1662 | fi || ac_status=$? | |
1663 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1664 | done |
1665 | fi | |
1666 | ||
81ecdfbb | 1667 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1668 | if $ac_init_version; then |
1669 | cat <<\_ACEOF | |
81ecdfbb RW |
1670 | configure |
1671 | generated by GNU Autoconf 2.64 | |
bec39cab | 1672 | |
81ecdfbb | 1673 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1674 | This configure script is free software; the Free Software Foundation |
1675 | gives unlimited permission to copy, distribute and modify it. | |
1676 | _ACEOF | |
81ecdfbb | 1677 | exit |
bec39cab | 1678 | fi |
bec39cab | 1679 | |
81ecdfbb RW |
1680 | ## ------------------------ ## |
1681 | ## Autoconf initialization. ## | |
1682 | ## ------------------------ ## | |
bec39cab | 1683 | |
81ecdfbb RW |
1684 | # ac_fn_c_try_compile LINENO |
1685 | # -------------------------- | |
1686 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1687 | ac_fn_c_try_compile () | |
1688 | { | |
1689 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1690 | rm -f conftest.$ac_objext | |
1691 | if { { ac_try="$ac_compile" | |
1692 | case "(($ac_try" in | |
1693 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1694 | *) ac_try_echo=$ac_try;; | |
1695 | esac | |
1696 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1697 | $as_echo "$ac_try_echo"; } >&5 | |
1698 | (eval "$ac_compile") 2>conftest.err | |
1699 | ac_status=$? | |
1700 | if test -s conftest.err; then | |
1701 | grep -v '^ *+' conftest.err >conftest.er1 | |
1702 | cat conftest.er1 >&5 | |
1703 | mv -f conftest.er1 conftest.err | |
1704 | fi | |
1705 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1706 | test $ac_status = 0; } && { | |
1707 | test -z "$ac_c_werror_flag" || | |
1708 | test ! -s conftest.err | |
1709 | } && test -s conftest.$ac_objext; then : | |
1710 | ac_retval=0 | |
1711 | else | |
1712 | $as_echo "$as_me: failed program was:" >&5 | |
1713 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1714 | |
81ecdfbb RW |
1715 | ac_retval=1 |
1716 | fi | |
1717 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1718 | return $ac_retval | |
1719 | ||
1720 | } # ac_fn_c_try_compile | |
1721 | ||
3bc3d82a PA |
1722 | # ac_fn_cxx_try_compile LINENO |
1723 | # ---------------------------- | |
1724 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1725 | ac_fn_cxx_try_compile () | |
1726 | { | |
1727 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1728 | rm -f conftest.$ac_objext | |
1729 | if { { ac_try="$ac_compile" | |
1730 | case "(($ac_try" in | |
1731 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1732 | *) ac_try_echo=$ac_try;; | |
1733 | esac | |
1734 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1735 | $as_echo "$ac_try_echo"; } >&5 | |
1736 | (eval "$ac_compile") 2>conftest.err | |
1737 | ac_status=$? | |
1738 | if test -s conftest.err; then | |
1739 | grep -v '^ *+' conftest.err >conftest.er1 | |
1740 | cat conftest.er1 >&5 | |
1741 | mv -f conftest.er1 conftest.err | |
1742 | fi | |
1743 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1744 | test $ac_status = 0; } && { | |
1745 | test -z "$ac_cxx_werror_flag" || | |
1746 | test ! -s conftest.err | |
1747 | } && test -s conftest.$ac_objext; then : | |
1748 | ac_retval=0 | |
1749 | else | |
1750 | $as_echo "$as_me: failed program was:" >&5 | |
1751 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1752 | ||
1753 | ac_retval=1 | |
1754 | fi | |
1755 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1756 | return $ac_retval | |
1757 | ||
1758 | } # ac_fn_cxx_try_compile | |
1759 | ||
81ecdfbb RW |
1760 | # ac_fn_c_try_cpp LINENO |
1761 | # ---------------------- | |
1762 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1763 | ac_fn_c_try_cpp () | |
bec39cab | 1764 | { |
81ecdfbb RW |
1765 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1766 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1767 | case "(($ac_try" in | |
1768 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1769 | *) ac_try_echo=$ac_try;; | |
1770 | esac | |
1771 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1772 | $as_echo "$ac_try_echo"; } >&5 | |
1773 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1774 | ac_status=$? | |
1775 | if test -s conftest.err; then | |
1776 | grep -v '^ *+' conftest.err >conftest.er1 | |
1777 | cat conftest.er1 >&5 | |
1778 | mv -f conftest.er1 conftest.err | |
1779 | fi | |
1780 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1781 | test $ac_status = 0; } >/dev/null && { | |
1782 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1783 | test ! -s conftest.err | |
1784 | }; then : | |
1785 | ac_retval=0 | |
1786 | else | |
1787 | $as_echo "$as_me: failed program was:" >&5 | |
1788 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1789 | |
81ecdfbb RW |
1790 | ac_retval=1 |
1791 | fi | |
1792 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1793 | return $ac_retval | |
bec39cab | 1794 | |
81ecdfbb | 1795 | } # ac_fn_c_try_cpp |
bec39cab | 1796 | |
81ecdfbb RW |
1797 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1798 | # ------------------------------------------------------- | |
1799 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1800 | # the include files in INCLUDES and setting the cache variable VAR | |
1801 | # accordingly. | |
1802 | ac_fn_c_check_header_mongrel () | |
1803 | { | |
1804 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1805 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1807 | $as_echo_n "checking for $2... " >&6; } | |
1808 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1809 | $as_echo_n "(cached) " >&6 | |
1810 | fi | |
1811 | eval ac_res=\$$3 | |
1812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1813 | $as_echo "$ac_res" >&6; } | |
1814 | else | |
1815 | # Is the header compilable? | |
1816 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1817 | $as_echo_n "checking $2 usability... " >&6; } | |
1818 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1819 | /* end confdefs.h. */ | |
1820 | $4 | |
1821 | #include <$2> | |
1822 | _ACEOF | |
1823 | if ac_fn_c_try_compile "$LINENO"; then : | |
1824 | ac_header_compiler=yes | |
1825 | else | |
1826 | ac_header_compiler=no | |
1827 | fi | |
1828 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1830 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1831 | |
81ecdfbb RW |
1832 | # Is the header present? |
1833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1834 | $as_echo_n "checking $2 presence... " >&6; } | |
1835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1836 | /* end confdefs.h. */ | |
1837 | #include <$2> | |
1838 | _ACEOF | |
1839 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1840 | ac_header_preproc=yes | |
1841 | else | |
1842 | ac_header_preproc=no | |
1843 | fi | |
1844 | rm -f conftest.err conftest.$ac_ext | |
1845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1846 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1847 | |
81ecdfbb RW |
1848 | # So? What about this header? |
1849 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1850 | yes:no: ) | |
1851 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1852 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1853 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1854 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1855 | ;; | |
1856 | no:yes:* ) | |
1857 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1858 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1859 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1860 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1861 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1862 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1863 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1864 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1865 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1866 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1867 | ;; | |
1868 | esac | |
1869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1870 | $as_echo_n "checking for $2... " >&6; } | |
1871 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1872 | $as_echo_n "(cached) " >&6 | |
1873 | else | |
1874 | eval "$3=\$ac_header_compiler" | |
1875 | fi | |
1876 | eval ac_res=\$$3 | |
1877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1878 | $as_echo "$ac_res" >&6; } | |
1879 | fi | |
1880 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1881 | |
81ecdfbb | 1882 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1883 | |
81ecdfbb RW |
1884 | # ac_fn_c_try_run LINENO |
1885 | # ---------------------- | |
1886 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1887 | # that executables *can* be run. | |
1888 | ac_fn_c_try_run () | |
1889 | { | |
1890 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1891 | if { { ac_try="$ac_link" | |
1892 | case "(($ac_try" in | |
1893 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1894 | *) ac_try_echo=$ac_try;; | |
1895 | esac | |
1896 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1897 | $as_echo "$ac_try_echo"; } >&5 | |
1898 | (eval "$ac_link") 2>&5 | |
1899 | ac_status=$? | |
1900 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1901 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1902 | { { case "(($ac_try" in | |
1903 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1904 | *) ac_try_echo=$ac_try;; | |
1905 | esac | |
1906 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1907 | $as_echo "$ac_try_echo"; } >&5 | |
1908 | (eval "$ac_try") 2>&5 | |
1909 | ac_status=$? | |
1910 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1911 | test $ac_status = 0; }; }; then : | |
1912 | ac_retval=0 | |
1913 | else | |
1914 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1915 | $as_echo "$as_me: failed program was:" >&5 | |
1916 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1917 | |
81ecdfbb RW |
1918 | ac_retval=$ac_status |
1919 | fi | |
1920 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1921 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1922 | return $ac_retval | |
bec39cab | 1923 | |
81ecdfbb | 1924 | } # ac_fn_c_try_run |
bec39cab | 1925 | |
81ecdfbb RW |
1926 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1927 | # ------------------------------------------------------- | |
1928 | # Tests whether HEADER exists and can be compiled using the include files in | |
1929 | # INCLUDES, setting the cache variable VAR accordingly. | |
1930 | ac_fn_c_check_header_compile () | |
1931 | { | |
1932 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1934 | $as_echo_n "checking for $2... " >&6; } | |
1935 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1936 | $as_echo_n "(cached) " >&6 | |
1937 | else | |
1938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1939 | /* end confdefs.h. */ | |
1940 | $4 | |
1941 | #include <$2> | |
bec39cab | 1942 | _ACEOF |
81ecdfbb RW |
1943 | if ac_fn_c_try_compile "$LINENO"; then : |
1944 | eval "$3=yes" | |
1945 | else | |
1946 | eval "$3=no" | |
1947 | fi | |
1948 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1949 | fi | |
1950 | eval ac_res=\$$3 | |
1951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1952 | $as_echo "$ac_res" >&6; } | |
1953 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1954 | |
81ecdfbb | 1955 | } # ac_fn_c_check_header_compile |
bec39cab | 1956 | |
2974be62 AM |
1957 | # ac_fn_c_try_link LINENO |
1958 | # ----------------------- | |
1959 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1960 | ac_fn_c_try_link () | |
1961 | { | |
1962 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1963 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1964 | if { { ac_try="$ac_link" | |
1965 | case "(($ac_try" in | |
1966 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1967 | *) ac_try_echo=$ac_try;; | |
1968 | esac | |
1969 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1970 | $as_echo "$ac_try_echo"; } >&5 | |
1971 | (eval "$ac_link") 2>conftest.err | |
1972 | ac_status=$? | |
1973 | if test -s conftest.err; then | |
1974 | grep -v '^ *+' conftest.err >conftest.er1 | |
1975 | cat conftest.er1 >&5 | |
1976 | mv -f conftest.er1 conftest.err | |
1977 | fi | |
1978 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1979 | test $ac_status = 0; } && { | |
1980 | test -z "$ac_c_werror_flag" || | |
1981 | test ! -s conftest.err | |
1982 | } && test -s conftest$ac_exeext && { | |
1983 | test "$cross_compiling" = yes || | |
1984 | $as_test_x conftest$ac_exeext | |
1985 | }; then : | |
1986 | ac_retval=0 | |
1987 | else | |
1988 | $as_echo "$as_me: failed program was:" >&5 | |
1989 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1990 | ||
1991 | ac_retval=1 | |
1992 | fi | |
1993 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1994 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1995 | # interfere with the next link command; also delete a directory that is | |
1996 | # left behind by Apple's compiler. We do this before executing the actions. | |
1997 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1998 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1999 | return $ac_retval | |
2000 | ||
2001 | } # ac_fn_c_try_link | |
2002 | ||
81ecdfbb RW |
2003 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2004 | # -------------------------------------------- | |
2005 | # Tries to find the compile-time value of EXPR in a program that includes | |
2006 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2007 | # computed | |
2008 | ac_fn_c_compute_int () | |
2009 | { | |
2010 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2011 | if test "$cross_compiling" = yes; then | |
2012 | # Depending upon the size, compute the lo and hi bounds. | |
2013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2014 | /* end confdefs.h. */ | |
2015 | $4 | |
2016 | int | |
2017 | main () | |
2018 | { | |
2019 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2020 | test_array [0] = 0 | |
bec39cab | 2021 | |
81ecdfbb RW |
2022 | ; |
2023 | return 0; | |
2024 | } | |
2025 | _ACEOF | |
2026 | if ac_fn_c_try_compile "$LINENO"; then : | |
2027 | ac_lo=0 ac_mid=0 | |
2028 | while :; do | |
2029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2030 | /* end confdefs.h. */ | |
2031 | $4 | |
2032 | int | |
2033 | main () | |
2034 | { | |
2035 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2036 | test_array [0] = 0 | |
bec39cab | 2037 | |
81ecdfbb RW |
2038 | ; |
2039 | return 0; | |
2040 | } | |
2041 | _ACEOF | |
2042 | if ac_fn_c_try_compile "$LINENO"; then : | |
2043 | ac_hi=$ac_mid; break | |
2044 | else | |
2045 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2046 | if test $ac_lo -le $ac_mid; then | |
2047 | ac_lo= ac_hi= | |
2048 | break | |
2049 | fi | |
2050 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2051 | fi |
81ecdfbb RW |
2052 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2053 | done | |
c906108c | 2054 | else |
81ecdfbb RW |
2055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2056 | /* end confdefs.h. */ | |
2057 | $4 | |
2058 | int | |
2059 | main () | |
2060 | { | |
2061 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2062 | test_array [0] = 0 | |
bec39cab | 2063 | |
81ecdfbb RW |
2064 | ; |
2065 | return 0; | |
2066 | } | |
2067 | _ACEOF | |
2068 | if ac_fn_c_try_compile "$LINENO"; then : | |
2069 | ac_hi=-1 ac_mid=-1 | |
2070 | while :; do | |
2071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2072 | /* end confdefs.h. */ | |
2073 | $4 | |
2074 | int | |
2075 | main () | |
2076 | { | |
2077 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2078 | test_array [0] = 0 | |
bec39cab | 2079 | |
81ecdfbb RW |
2080 | ; |
2081 | return 0; | |
2082 | } | |
2083 | _ACEOF | |
2084 | if ac_fn_c_try_compile "$LINENO"; then : | |
2085 | ac_lo=$ac_mid; break | |
2086 | else | |
2087 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2088 | if test $ac_mid -le $ac_hi; then | |
2089 | ac_lo= ac_hi= | |
2090 | break | |
2091 | fi | |
2092 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2093 | fi | |
2094 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2095 | done | |
2096 | else | |
2097 | ac_lo= ac_hi= | |
2098 | fi | |
2099 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2100 | fi | |
2101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2102 | # Binary search between lo and hi bounds. | |
2103 | while test "x$ac_lo" != "x$ac_hi"; do | |
2104 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2106 | /* end confdefs.h. */ | |
2107 | $4 | |
2108 | int | |
2109 | main () | |
2110 | { | |
2111 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2112 | test_array [0] = 0 | |
bec39cab | 2113 | |
81ecdfbb RW |
2114 | ; |
2115 | return 0; | |
2116 | } | |
2117 | _ACEOF | |
2118 | if ac_fn_c_try_compile "$LINENO"; then : | |
2119 | ac_hi=$ac_mid | |
2120 | else | |
2121 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2122 | fi | |
2123 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2124 | done | |
2125 | case $ac_lo in #(( | |
2126 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2127 | '') ac_retval=1 ;; | |
2128 | esac | |
2129 | else | |
2130 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2131 | /* end confdefs.h. */ | |
2132 | $4 | |
2133 | static long int longval () { return $2; } | |
2134 | static unsigned long int ulongval () { return $2; } | |
2135 | #include <stdio.h> | |
2136 | #include <stdlib.h> | |
2137 | int | |
2138 | main () | |
2139 | { | |
bec39cab | 2140 | |
81ecdfbb RW |
2141 | FILE *f = fopen ("conftest.val", "w"); |
2142 | if (! f) | |
2143 | return 1; | |
2144 | if (($2) < 0) | |
2145 | { | |
2146 | long int i = longval (); | |
2147 | if (i != ($2)) | |
2148 | return 1; | |
2149 | fprintf (f, "%ld", i); | |
2150 | } | |
2151 | else | |
2152 | { | |
2153 | unsigned long int i = ulongval (); | |
2154 | if (i != ($2)) | |
2155 | return 1; | |
2156 | fprintf (f, "%lu", i); | |
2157 | } | |
2158 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2159 | on some platforms. */ | |
2160 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2161 | |
81ecdfbb RW |
2162 | ; |
2163 | return 0; | |
2164 | } | |
2165 | _ACEOF | |
2166 | if ac_fn_c_try_run "$LINENO"; then : | |
2167 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2168 | else | |
2169 | ac_retval=1 | |
2170 | fi | |
2171 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2172 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2173 | rm -f conftest.val | |
bec39cab | 2174 | |
81ecdfbb RW |
2175 | fi |
2176 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2177 | return $ac_retval | |
bec39cab | 2178 | |
81ecdfbb | 2179 | } # ac_fn_c_compute_int |
bec39cab | 2180 | |
55a8c076 YQ |
2181 | # ac_fn_c_check_func LINENO FUNC VAR |
2182 | # ---------------------------------- | |
2183 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2184 | ac_fn_c_check_func () | |
81ecdfbb RW |
2185 | { |
2186 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2188 | $as_echo_n "checking for $2... " >&6; } | |
2189 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2190 | $as_echo_n "(cached) " >&6 | |
2191 | else | |
81ecdfbb RW |
2192 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2193 | /* end confdefs.h. */ | |
55a8c076 YQ |
2194 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2195 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2196 | #define $2 innocuous_$2 | |
2197 | ||
2198 | /* System header to define __stub macros and hopefully few prototypes, | |
2199 | which can conflict with char $2 (); below. | |
2200 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2201 | <limits.h> exists even on freestanding compilers. */ | |
2202 | ||
2203 | #ifdef __STDC__ | |
2204 | # include <limits.h> | |
2205 | #else | |
2206 | # include <assert.h> | |
2207 | #endif | |
2208 | ||
2209 | #undef $2 | |
2210 | ||
2211 | /* Override any GCC internal prototype to avoid an error. | |
2212 | Use char because int might match the return type of a GCC | |
2213 | builtin and then its argument prototype would still apply. */ | |
2214 | #ifdef __cplusplus | |
2215 | extern "C" | |
2216 | #endif | |
2217 | char $2 (); | |
2218 | /* The GNU C library defines this for functions which it implements | |
2219 | to always fail with ENOSYS. Some functions are actually named | |
2220 | something starting with __ and the normal name is an alias. */ | |
2221 | #if defined __stub_$2 || defined __stub___$2 | |
2222 | choke me | |
2223 | #endif | |
2224 | ||
2225 | int | |
2226 | main () | |
2227 | { | |
2228 | return $2 (); | |
2229 | ; | |
2230 | return 0; | |
2231 | } | |
2232 | _ACEOF | |
2233 | if ac_fn_c_try_link "$LINENO"; then : | |
2234 | eval "$3=yes" | |
2235 | else | |
2236 | eval "$3=no" | |
2237 | fi | |
2238 | rm -f core conftest.err conftest.$ac_objext \ | |
2239 | conftest$ac_exeext conftest.$ac_ext | |
2240 | fi | |
2241 | eval ac_res=\$$3 | |
2242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2243 | $as_echo "$ac_res" >&6; } | |
2244 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2245 | ||
2246 | } # ac_fn_c_check_func | |
2247 | ||
07697489 PA |
2248 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2249 | # ------------------------------------------- | |
2250 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2251 | # variable VAR accordingly. | |
2252 | ac_fn_c_check_type () | |
2253 | { | |
2254 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2256 | $as_echo_n "checking for $2... " >&6; } | |
2257 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2258 | $as_echo_n "(cached) " >&6 | |
2259 | else | |
2260 | eval "$3=no" | |
2261 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2262 | /* end confdefs.h. */ | |
2263 | $4 | |
2264 | int | |
2265 | main () | |
2266 | { | |
2267 | if (sizeof ($2)) | |
2268 | return 0; | |
2269 | ; | |
2270 | return 0; | |
2271 | } | |
2272 | _ACEOF | |
2273 | if ac_fn_c_try_compile "$LINENO"; then : | |
2274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2275 | /* end confdefs.h. */ | |
2276 | $4 | |
2277 | int | |
2278 | main () | |
2279 | { | |
2280 | if (sizeof (($2))) | |
2281 | return 0; | |
2282 | ; | |
2283 | return 0; | |
2284 | } | |
2285 | _ACEOF | |
2286 | if ac_fn_c_try_compile "$LINENO"; then : | |
2287 | ||
2288 | else | |
2289 | eval "$3=yes" | |
2290 | fi | |
2291 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2292 | fi | |
2293 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2294 | fi | |
2295 | eval ac_res=\$$3 | |
2296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2297 | $as_echo "$ac_res" >&6; } | |
2298 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2299 | ||
2300 | } # ac_fn_c_check_type | |
2301 | ||
770d76d7 PA |
2302 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2303 | # ------------------------------------ | |
2304 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2305 | ac_fn_c_check_decl () | |
2306 | { | |
2307 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2308 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2309 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2311 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2312 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2313 | $as_echo_n "(cached) " >&6 | |
2314 | else | |
2315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2316 | /* end confdefs.h. */ | |
2317 | $4 | |
2318 | int | |
2319 | main () | |
2320 | { | |
2321 | #ifndef $as_decl_name | |
2322 | #ifdef __cplusplus | |
2323 | (void) $as_decl_use; | |
2324 | #else | |
2325 | (void) $as_decl_name; | |
2326 | #endif | |
2327 | #endif | |
2328 | ||
2329 | ; | |
2330 | return 0; | |
2331 | } | |
2332 | _ACEOF | |
2333 | if ac_fn_c_try_compile "$LINENO"; then : | |
2334 | eval "$3=yes" | |
2335 | else | |
2336 | eval "$3=no" | |
2337 | fi | |
2338 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2339 | fi | |
2340 | eval ac_res=\$$3 | |
2341 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2342 | $as_echo "$ac_res" >&6; } | |
2343 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2344 | ||
2345 | } # ac_fn_c_check_decl | |
2346 | ||
55a8c076 YQ |
2347 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2348 | # ---------------------------------------------------- | |
2349 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2350 | # INCLUDES, setting cache variable VAR accordingly. | |
2351 | ac_fn_c_check_member () | |
2352 | { | |
2353 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2355 | $as_echo_n "checking for $2.$3... " >&6; } | |
2356 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2357 | $as_echo_n "(cached) " >&6 | |
2358 | else | |
2359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2360 | /* end confdefs.h. */ | |
2361 | $5 | |
2362 | int | |
2363 | main () | |
2364 | { | |
2365 | static $2 ac_aggr; | |
2366 | if (ac_aggr.$3) | |
2367 | return 0; | |
2368 | ; | |
2369 | return 0; | |
2370 | } | |
2371 | _ACEOF | |
2372 | if ac_fn_c_try_compile "$LINENO"; then : | |
2373 | eval "$4=yes" | |
2374 | else | |
2375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2376 | /* end confdefs.h. */ | |
2377 | $5 | |
2378 | int | |
2379 | main () | |
2380 | { | |
2381 | static $2 ac_aggr; | |
2382 | if (sizeof ac_aggr.$3) | |
2383 | return 0; | |
2384 | ; | |
2385 | return 0; | |
2386 | } | |
2387 | _ACEOF | |
2388 | if ac_fn_c_try_compile "$LINENO"; then : | |
2389 | eval "$4=yes" | |
2390 | else | |
2391 | eval "$4=no" | |
2392 | fi | |
2393 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2394 | fi | |
2395 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2396 | fi | |
2397 | eval ac_res=\$$4 | |
2398 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2399 | $as_echo "$ac_res" >&6; } | |
2400 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2401 | ||
2402 | } # ac_fn_c_check_member | |
81ecdfbb RW |
2403 | cat >config.log <<_ACEOF |
2404 | This file contains any messages produced by compilers while | |
2405 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2406 | |
81ecdfbb RW |
2407 | It was created by $as_me, which was |
2408 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2409 | |
81ecdfbb | 2410 | $ $0 $@ |
413ccac7 | 2411 | |
81ecdfbb RW |
2412 | _ACEOF |
2413 | exec 5>>config.log | |
2414 | { | |
2415 | cat <<_ASUNAME | |
2416 | ## --------- ## | |
2417 | ## Platform. ## | |
2418 | ## --------- ## | |
413ccac7 | 2419 | |
81ecdfbb RW |
2420 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2421 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2422 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2423 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2424 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2425 | |
81ecdfbb RW |
2426 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2427 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2428 | |
81ecdfbb RW |
2429 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2430 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2431 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2432 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2433 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2434 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2435 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2436 | |
81ecdfbb | 2437 | _ASUNAME |
bec39cab | 2438 | |
bec39cab AC |
2439 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2440 | for as_dir in $PATH | |
2441 | do | |
2442 | IFS=$as_save_IFS | |
2443 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2444 | $as_echo "PATH: $as_dir" |
2445 | done | |
2446 | IFS=$as_save_IFS | |
bec39cab | 2447 | |
81ecdfbb | 2448 | } >&5 |
bec39cab | 2449 | |
81ecdfbb | 2450 | cat >&5 <<_ACEOF |
bec39cab | 2451 | |
bec39cab | 2452 | |
81ecdfbb RW |
2453 | ## ----------- ## |
2454 | ## Core tests. ## | |
2455 | ## ----------- ## | |
2456 | ||
2457 | _ACEOF | |
2458 | ||
2459 | ||
2460 | # Keep a trace of the command line. | |
2461 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2462 | # Strip out --silent because we don't want to record it for future runs. | |
2463 | # Also quote any args containing shell meta-characters. | |
2464 | # Make two passes to allow for proper duplicate-argument suppression. | |
2465 | ac_configure_args= | |
2466 | ac_configure_args0= | |
2467 | ac_configure_args1= | |
2468 | ac_must_keep_next=false | |
2469 | for ac_pass in 1 2 | |
2470 | do | |
2471 | for ac_arg | |
2472 | do | |
2473 | case $ac_arg in | |
2474 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2475 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2476 | | -silent | --silent | --silen | --sile | --sil) | |
2477 | continue ;; | |
2478 | *\'*) | |
2479 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2480 | esac | |
2481 | case $ac_pass in | |
2482 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2483 | 2) | |
2484 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2485 | if test $ac_must_keep_next = true; then | |
2486 | ac_must_keep_next=false # Got value, back to normal. | |
2487 | else | |
2488 | case $ac_arg in | |
2489 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2490 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2491 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2492 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2493 | case "$ac_configure_args0 " in | |
2494 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2495 | esac | |
2496 | ;; | |
2497 | -* ) ac_must_keep_next=true ;; | |
2498 | esac | |
2499 | fi | |
2500 | as_fn_append ac_configure_args " '$ac_arg'" | |
2501 | ;; | |
2502 | esac | |
2503 | done | |
2504 | done | |
2505 | { ac_configure_args0=; unset ac_configure_args0;} | |
2506 | { ac_configure_args1=; unset ac_configure_args1;} | |
2507 | ||
2508 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2509 | # config.log. We remove comments because anyway the quotes in there | |
2510 | # would cause problems or look ugly. | |
2511 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2512 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2513 | trap 'exit_status=$? | |
2514 | # Save into config.log some information that might help in debugging. | |
2515 | { | |
2516 | echo | |
2517 | ||
2518 | cat <<\_ASBOX | |
2519 | ## ---------------- ## | |
2520 | ## Cache variables. ## | |
2521 | ## ---------------- ## | |
2522 | _ASBOX | |
2523 | echo | |
2524 | # The following way of writing the cache mishandles newlines in values, | |
2525 | ( | |
2526 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2527 | eval ac_val=\$$ac_var | |
2528 | case $ac_val in #( | |
2529 | *${as_nl}*) | |
2530 | case $ac_var in #( | |
2531 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2532 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2533 | esac | |
2534 | case $ac_var in #( | |
2535 | _ | IFS | as_nl) ;; #( | |
2536 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2537 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2538 | esac ;; | |
2539 | esac | |
2540 | done | |
2541 | (set) 2>&1 | | |
2542 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2543 | *${as_nl}ac_space=\ *) | |
2544 | sed -n \ | |
2545 | "s/'\''/'\''\\\\'\'''\''/g; | |
2546 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2547 | ;; #( | |
2548 | *) | |
2549 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2550 | ;; | |
2551 | esac | | |
2552 | sort | |
2553 | ) | |
2554 | echo | |
2555 | ||
2556 | cat <<\_ASBOX | |
2557 | ## ----------------- ## | |
2558 | ## Output variables. ## | |
2559 | ## ----------------- ## | |
2560 | _ASBOX | |
2561 | echo | |
2562 | for ac_var in $ac_subst_vars | |
2563 | do | |
2564 | eval ac_val=\$$ac_var | |
2565 | case $ac_val in | |
2566 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2567 | esac | |
2568 | $as_echo "$ac_var='\''$ac_val'\''" | |
2569 | done | sort | |
2570 | echo | |
2571 | ||
2572 | if test -n "$ac_subst_files"; then | |
2573 | cat <<\_ASBOX | |
2574 | ## ------------------- ## | |
2575 | ## File substitutions. ## | |
2576 | ## ------------------- ## | |
2577 | _ASBOX | |
2578 | echo | |
2579 | for ac_var in $ac_subst_files | |
2580 | do | |
2581 | eval ac_val=\$$ac_var | |
2582 | case $ac_val in | |
2583 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2584 | esac | |
2585 | $as_echo "$ac_var='\''$ac_val'\''" | |
2586 | done | sort | |
2587 | echo | |
2588 | fi | |
2589 | ||
2590 | if test -s confdefs.h; then | |
2591 | cat <<\_ASBOX | |
2592 | ## ----------- ## | |
2593 | ## confdefs.h. ## | |
2594 | ## ----------- ## | |
2595 | _ASBOX | |
2596 | echo | |
2597 | cat confdefs.h | |
2598 | echo | |
2599 | fi | |
2600 | test "$ac_signal" != 0 && | |
2601 | $as_echo "$as_me: caught signal $ac_signal" | |
2602 | $as_echo "$as_me: exit $exit_status" | |
2603 | } >&5 | |
2604 | rm -f core *.core core.conftest.* && | |
2605 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2606 | exit $exit_status | |
2607 | ' 0 | |
2608 | for ac_signal in 1 2 13 15; do | |
2609 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2610 | done | |
2611 | ac_signal=0 | |
2612 | ||
2613 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2614 | rm -f -r conftest* confdefs.h | |
2615 | ||
2616 | $as_echo "/* confdefs.h */" > confdefs.h | |
2617 | ||
2618 | # Predefined preprocessor variables. | |
2619 | ||
2620 | cat >>confdefs.h <<_ACEOF | |
2621 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2622 | _ACEOF | |
2623 | ||
2624 | cat >>confdefs.h <<_ACEOF | |
2625 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2626 | _ACEOF | |
2627 | ||
2628 | cat >>confdefs.h <<_ACEOF | |
2629 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2630 | _ACEOF | |
2631 | ||
2632 | cat >>confdefs.h <<_ACEOF | |
2633 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2634 | _ACEOF | |
2635 | ||
2636 | cat >>confdefs.h <<_ACEOF | |
2637 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2638 | _ACEOF | |
2639 | ||
2640 | cat >>confdefs.h <<_ACEOF | |
2641 | #define PACKAGE_URL "$PACKAGE_URL" | |
2642 | _ACEOF | |
2643 | ||
2644 | ||
2645 | # Let the site file select an alternate cache file if it wants to. | |
2646 | # Prefer an explicitly selected file to automatically selected ones. | |
2647 | ac_site_file1=NONE | |
2648 | ac_site_file2=NONE | |
2649 | if test -n "$CONFIG_SITE"; then | |
2650 | ac_site_file1=$CONFIG_SITE | |
2651 | elif test "x$prefix" != xNONE; then | |
2652 | ac_site_file1=$prefix/share/config.site | |
2653 | ac_site_file2=$prefix/etc/config.site | |
2654 | else | |
2655 | ac_site_file1=$ac_default_prefix/share/config.site | |
2656 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2657 | fi | |
2658 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2659 | do | |
2660 | test "x$ac_site_file" = xNONE && continue | |
2661 | if test -r "$ac_site_file"; then | |
2662 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2663 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2664 | sed 's/^/| /' "$ac_site_file" >&5 | |
2665 | . "$ac_site_file" | |
2666 | fi | |
2667 | done | |
2668 | ||
2669 | if test -r "$cache_file"; then | |
2670 | # Some versions of bash will fail to source /dev/null (special | |
2671 | # files actually), so we avoid doing that. | |
2672 | if test -f "$cache_file"; then | |
2673 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2674 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2675 | case $cache_file in | |
2676 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2677 | *) . "./$cache_file";; | |
2678 | esac | |
2679 | fi | |
2680 | else | |
2681 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2682 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2683 | >$cache_file | |
bec39cab AC |
2684 | fi |
2685 | ||
81ecdfbb RW |
2686 | # Check that the precious variables saved in the cache have kept the same |
2687 | # value. | |
2688 | ac_cache_corrupted=false | |
2689 | for ac_var in $ac_precious_vars; do | |
2690 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2691 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2692 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2693 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2694 | case $ac_old_set,$ac_new_set in | |
2695 | set,) | |
2696 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2697 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2698 | ac_cache_corrupted=: ;; | |
2699 | ,set) | |
2700 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2701 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2702 | ac_cache_corrupted=: ;; | |
2703 | ,);; | |
2704 | *) | |
2705 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2706 | # differences in whitespace do not lead to failure. | |
2707 | ac_old_val_w=`echo x $ac_old_val` | |
2708 | ac_new_val_w=`echo x $ac_new_val` | |
2709 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2710 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2711 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2712 | ac_cache_corrupted=: | |
2713 | else | |
2714 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2715 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2716 | eval $ac_var=\$ac_old_val | |
2717 | fi | |
2718 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2719 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2720 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2721 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2722 | fi;; | |
2723 | esac | |
2724 | # Pass precious variables to config.status. | |
2725 | if test "$ac_new_set" = set; then | |
2726 | case $ac_new_val in | |
2727 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2728 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2729 | esac | |
2730 | case " $ac_configure_args " in | |
2731 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2732 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2733 | esac | |
2734 | fi | |
2735 | done | |
2736 | if $ac_cache_corrupted; then | |
2737 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2738 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2740 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2741 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2742 | fi | |
2743 | ## -------------------- ## | |
2744 | ## Main body of script. ## | |
2745 | ## -------------------- ## | |
2746 | ||
2747 | ac_ext=c | |
2748 | ac_cpp='$CPP $CPPFLAGS' | |
2749 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2750 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2751 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2752 | ||
2753 | ||
2754 | ||
2755 | ||
2756 | ||
2757 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2758 | ||
2759 | ||
2760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2761 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2762 | # Check whether --enable-maintainer-mode was given. | |
2763 | if test "${enable_maintainer_mode+set}" = set; then : | |
2764 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2765 | else | |
2766 | USE_MAINTAINER_MODE=no | |
2767 | fi | |
2768 | ||
2769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2770 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2771 | if test $USE_MAINTAINER_MODE = yes; then | |
2772 | MAINTAINER_MODE_TRUE= | |
2773 | MAINTAINER_MODE_FALSE='#' | |
2774 | else | |
2775 | MAINTAINER_MODE_TRUE='#' | |
2776 | MAINTAINER_MODE_FALSE= | |
2777 | fi | |
2778 | ||
2779 | MAINT=$MAINTAINER_MODE_TRUE | |
2780 | ||
2781 | ||
2782 | ||
17ef446e | 2783 | # Set the 'development' global. |
270c9937 | 2784 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2785 | |
81ecdfbb RW |
2786 | ac_ext=c |
2787 | ac_cpp='$CPP $CPPFLAGS' | |
2788 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2789 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2790 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2791 | if test -n "$ac_tool_prefix"; then | |
2792 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2793 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2795 | $as_echo_n "checking for $ac_word... " >&6; } | |
2796 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2797 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2798 | else |
2799 | if test -n "$CC"; then | |
2800 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2801 | else | |
bec39cab AC |
2802 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2803 | for as_dir in $PATH | |
2804 | do | |
2805 | IFS=$as_save_IFS | |
2806 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2807 | for ac_exec_ext in '' $ac_executable_extensions; do |
2808 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2809 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2810 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2811 | break 2 |
2812 | fi | |
2813 | done | |
81ecdfbb RW |
2814 | done |
2815 | IFS=$as_save_IFS | |
bec39cab | 2816 | |
c906108c SS |
2817 | fi |
2818 | fi | |
bec39cab | 2819 | CC=$ac_cv_prog_CC |
c906108c | 2820 | if test -n "$CC"; then |
81ecdfbb RW |
2821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2822 | $as_echo "$CC" >&6; } | |
c906108c | 2823 | else |
81ecdfbb RW |
2824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2825 | $as_echo "no" >&6; } | |
c906108c SS |
2826 | fi |
2827 | ||
81ecdfbb | 2828 | |
b4e70030 JB |
2829 | fi |
2830 | if test -z "$ac_cv_prog_CC"; then | |
2831 | ac_ct_CC=$CC | |
81ecdfbb RW |
2832 | # Extract the first word of "gcc", so it can be a program name with args. |
2833 | set dummy gcc; ac_word=$2 | |
2834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2835 | $as_echo_n "checking for $ac_word... " >&6; } | |
2836 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2837 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2838 | else |
2839 | if test -n "$ac_ct_CC"; then | |
2840 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2841 | else | |
2842 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2843 | for as_dir in $PATH | |
2844 | do | |
2845 | IFS=$as_save_IFS | |
2846 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2847 | for ac_exec_ext in '' $ac_executable_extensions; do |
2848 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2849 | ac_cv_prog_ac_ct_CC="gcc" | |
2850 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2851 | break 2 |
4e8d927d | 2852 | fi |
b4e70030 | 2853 | done |
81ecdfbb RW |
2854 | done |
2855 | IFS=$as_save_IFS | |
b4e70030 JB |
2856 | |
2857 | fi | |
2858 | fi | |
2859 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2860 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2862 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2863 | else |
81ecdfbb RW |
2864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2865 | $as_echo "no" >&6; } | |
b4e70030 JB |
2866 | fi |
2867 | ||
81ecdfbb RW |
2868 | if test "x$ac_ct_CC" = x; then |
2869 | CC="" | |
2870 | else | |
2871 | case $cross_compiling:$ac_tool_warned in | |
2872 | yes:) | |
2873 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2874 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2875 | ac_tool_warned=yes ;; | |
2876 | esac | |
2877 | CC=$ac_ct_CC | |
2878 | fi | |
b4e70030 JB |
2879 | else |
2880 | CC="$ac_cv_prog_CC" | |
2881 | fi | |
2882 | ||
c906108c | 2883 | if test -z "$CC"; then |
81ecdfbb RW |
2884 | if test -n "$ac_tool_prefix"; then |
2885 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2886 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2887 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2888 | $as_echo_n "checking for $ac_word... " >&6; } | |
2889 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2890 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2891 | else |
2892 | if test -n "$CC"; then | |
2893 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2894 | else | |
bec39cab AC |
2895 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2896 | for as_dir in $PATH | |
2897 | do | |
2898 | IFS=$as_save_IFS | |
2899 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2900 | for ac_exec_ext in '' $ac_executable_extensions; do |
2901 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2902 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2903 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2904 | break 2 |
2905 | fi | |
2906 | done | |
81ecdfbb RW |
2907 | done |
2908 | IFS=$as_save_IFS | |
2909 | ||
2910 | fi | |
2911 | fi | |
2912 | CC=$ac_cv_prog_CC | |
2913 | if test -n "$CC"; then | |
2914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2915 | $as_echo "$CC" >&6; } | |
2916 | else | |
2917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2918 | $as_echo "no" >&6; } | |
2919 | fi | |
2920 | ||
2921 | ||
2922 | fi | |
2923 | fi | |
2924 | if test -z "$CC"; then | |
2925 | # Extract the first word of "cc", so it can be a program name with args. | |
2926 | set dummy cc; ac_word=$2 | |
2927 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2928 | $as_echo_n "checking for $ac_word... " >&6; } | |
2929 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2930 | $as_echo_n "(cached) " >&6 | |
2931 | else | |
2932 | if test -n "$CC"; then | |
2933 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2934 | else | |
2935 | ac_prog_rejected=no | |
2936 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2937 | for as_dir in $PATH | |
2938 | do | |
2939 | IFS=$as_save_IFS | |
2940 | test -z "$as_dir" && as_dir=. | |
2941 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2942 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2943 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2944 | ac_prog_rejected=yes | |
2945 | continue | |
2946 | fi | |
2947 | ac_cv_prog_CC="cc" | |
2948 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2949 | break 2 | |
2950 | fi | |
2951 | done | |
2952 | done | |
2953 | IFS=$as_save_IFS | |
bec39cab | 2954 | |
c906108c SS |
2955 | if test $ac_prog_rejected = yes; then |
2956 | # We found a bogon in the path, so make sure we never use it. | |
2957 | set dummy $ac_cv_prog_CC | |
2958 | shift | |
bec39cab | 2959 | if test $# != 0; then |
c906108c SS |
2960 | # We chose a different compiler from the bogus one. |
2961 | # However, it has the same basename, so the bogon will be chosen | |
2962 | # first if we set CC to just the basename; use the full file name. | |
2963 | shift | |
bec39cab | 2964 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2965 | fi |
2966 | fi | |
2967 | fi | |
2968 | fi | |
bec39cab | 2969 | CC=$ac_cv_prog_CC |
c906108c | 2970 | if test -n "$CC"; then |
81ecdfbb RW |
2971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2972 | $as_echo "$CC" >&6; } | |
c906108c | 2973 | else |
81ecdfbb RW |
2974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2975 | $as_echo "no" >&6; } | |
c906108c SS |
2976 | fi |
2977 | ||
81ecdfbb | 2978 | |
bec39cab AC |
2979 | fi |
2980 | if test -z "$CC"; then | |
2981 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2982 | for ac_prog in cl.exe |
bec39cab AC |
2983 | do |
2984 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2985 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2987 | $as_echo_n "checking for $ac_word... " >&6; } | |
2988 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2989 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2990 | else |
2991 | if test -n "$CC"; then | |
2992 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2993 | else | |
bec39cab AC |
2994 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2995 | for as_dir in $PATH | |
2996 | do | |
2997 | IFS=$as_save_IFS | |
2998 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2999 | for ac_exec_ext in '' $ac_executable_extensions; do |
3000 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3001 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3002 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3003 | break 2 |
3004 | fi | |
3005 | done | |
81ecdfbb RW |
3006 | done |
3007 | IFS=$as_save_IFS | |
bec39cab | 3008 | |
c906108c SS |
3009 | fi |
3010 | fi | |
bec39cab | 3011 | CC=$ac_cv_prog_CC |
c906108c | 3012 | if test -n "$CC"; then |
81ecdfbb RW |
3013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3014 | $as_echo "$CC" >&6; } | |
c906108c | 3015 | else |
81ecdfbb RW |
3016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3017 | $as_echo "no" >&6; } | |
c906108c | 3018 | fi |
bec39cab | 3019 | |
81ecdfbb | 3020 | |
bec39cab AC |
3021 | test -n "$CC" && break |
3022 | done | |
3023 | fi | |
3024 | if test -z "$CC"; then | |
3025 | ac_ct_CC=$CC | |
81ecdfbb | 3026 | for ac_prog in cl.exe |
bec39cab AC |
3027 | do |
3028 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3029 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3031 | $as_echo_n "checking for $ac_word... " >&6; } | |
3032 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3033 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3034 | else |
3035 | if test -n "$ac_ct_CC"; then | |
3036 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3037 | else | |
3038 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3039 | for as_dir in $PATH | |
3040 | do | |
3041 | IFS=$as_save_IFS | |
3042 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3043 | for ac_exec_ext in '' $ac_executable_extensions; do |
3044 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3045 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3046 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3047 | break 2 |
c906108c | 3048 | fi |
bec39cab | 3049 | done |
81ecdfbb RW |
3050 | done |
3051 | IFS=$as_save_IFS | |
bec39cab AC |
3052 | |
3053 | fi | |
3054 | fi | |
3055 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3056 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3058 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3059 | else |
81ecdfbb RW |
3060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3061 | $as_echo "no" >&6; } | |
c906108c SS |
3062 | fi |
3063 | ||
81ecdfbb | 3064 | |
bec39cab AC |
3065 | test -n "$ac_ct_CC" && break |
3066 | done | |
c906108c | 3067 | |
81ecdfbb RW |
3068 | if test "x$ac_ct_CC" = x; then |
3069 | CC="" | |
3070 | else | |
3071 | case $cross_compiling:$ac_tool_warned in | |
3072 | yes:) | |
3073 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3074 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3075 | ac_tool_warned=yes ;; | |
3076 | esac | |
3077 | CC=$ac_ct_CC | |
3078 | fi | |
bec39cab AC |
3079 | fi |
3080 | ||
3081 | fi | |
3082 | ||
3083 | ||
81ecdfbb RW |
3084 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3085 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3086 | as_fn_error "no acceptable C compiler found in \$PATH | |
3087 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3088 | |
3089 | # Provide some information about the compiler. | |
81ecdfbb RW |
3090 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3091 | set X $ac_compile | |
3092 | ac_compiler=$2 | |
3093 | for ac_option in --version -v -V -qversion; do | |
3094 | { { ac_try="$ac_compiler $ac_option >&5" | |
3095 | case "(($ac_try" in | |
3096 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3097 | *) ac_try_echo=$ac_try;; | |
3098 | esac | |
3099 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3100 | $as_echo "$ac_try_echo"; } >&5 | |
3101 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3102 | ac_status=$? |
81ecdfbb RW |
3103 | if test -s conftest.err; then |
3104 | sed '10a\ | |
3105 | ... rest of stderr output deleted ... | |
3106 | 10q' conftest.err >conftest.er1 | |
3107 | cat conftest.er1 >&5 | |
3108 | rm -f conftest.er1 conftest.err | |
3109 | fi | |
3110 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3111 | test $ac_status = 0; } | |
3112 | done | |
bec39cab | 3113 | |
81ecdfbb | 3114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3115 | /* end confdefs.h. */ |
3116 | ||
3117 | int | |
3118 | main () | |
3119 | { | |
3120 | ||
3121 | ; | |
3122 | return 0; | |
3123 | } | |
3124 | _ACEOF | |
3125 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3126 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3127 | # Try to create an executable without -o first, disregard a.out. |
3128 | # It will help us diagnose broken compilers, and finding out an intuition | |
3129 | # of exeext. | |
81ecdfbb RW |
3130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3131 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3132 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3133 | ||
3134 | # The possible output files: | |
3135 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3136 | ||
3137 | ac_rmfiles= | |
3138 | for ac_file in $ac_files | |
3139 | do | |
3140 | case $ac_file in | |
3141 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3142 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3143 | esac | |
3144 | done | |
3145 | rm -f $ac_rmfiles | |
3146 | ||
3147 | if { { ac_try="$ac_link_default" | |
3148 | case "(($ac_try" in | |
3149 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3150 | *) ac_try_echo=$ac_try;; | |
3151 | esac | |
3152 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3153 | $as_echo "$ac_try_echo"; } >&5 | |
3154 | (eval "$ac_link_default") 2>&5 | |
3155 | ac_status=$? | |
3156 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3157 | test $ac_status = 0; }; then : | |
3158 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3159 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3160 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3161 | # so that the user can short-circuit this test for compilers unknown to | |
3162 | # Autoconf. | |
3163 | for ac_file in $ac_files '' | |
bec39cab AC |
3164 | do |
3165 | test -f "$ac_file" || continue | |
3166 | case $ac_file in | |
81ecdfbb | 3167 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3168 | ;; |
3169 | [ab].out ) | |
3170 | # We found the default executable, but exeext='' is most | |
3171 | # certainly right. | |
3172 | break;; | |
3173 | *.* ) | |
81ecdfbb RW |
3174 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3175 | then :; else | |
3176 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3177 | fi | |
3178 | # We set ac_cv_exeext here because the later test for it is not | |
3179 | # safe: cross compilers may not add the suffix if given an `-o' | |
3180 | # argument, so we may need to know it at that point already. | |
3181 | # Even if this section looks crufty: it has the advantage of | |
3182 | # actually working. | |
b4e70030 JB |
3183 | break;; |
3184 | * ) | |
3185 | break;; | |
bec39cab AC |
3186 | esac |
3187 | done | |
81ecdfbb RW |
3188 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3189 | ||
bec39cab | 3190 | else |
81ecdfbb RW |
3191 | ac_file='' |
3192 | fi | |
3193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3194 | $as_echo "$ac_file" >&6; } | |
3195 | if test -z "$ac_file"; then : | |
3196 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3197 | sed 's/^/| /' conftest.$ac_ext >&5 |
3198 | ||
81ecdfbb RW |
3199 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3200 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3201 | { as_fn_set_status 77 | |
3202 | as_fn_error "C compiler cannot create executables | |
3203 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3204 | fi |
b4e70030 | 3205 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3206 | |
81ecdfbb | 3207 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3208 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3210 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3211 | # If not cross compiling, check that we can run a simple program. |
3212 | if test "$cross_compiling" != yes; then | |
3213 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3214 | { { case "(($ac_try" in |
3215 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3216 | *) ac_try_echo=$ac_try;; | |
3217 | esac | |
3218 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3219 | $as_echo "$ac_try_echo"; } >&5 | |
3220 | (eval "$ac_try") 2>&5 | |
bec39cab | 3221 | ac_status=$? |
81ecdfbb RW |
3222 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3223 | test $ac_status = 0; }; }; then | |
bec39cab | 3224 | cross_compiling=no |
c906108c | 3225 | else |
bec39cab AC |
3226 | if test "$cross_compiling" = maybe; then |
3227 | cross_compiling=yes | |
3228 | else | |
81ecdfbb RW |
3229 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3230 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3231 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3232 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3233 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3234 | fi |
c906108c | 3235 | fi |
bec39cab | 3236 | fi |
81ecdfbb RW |
3237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3238 | $as_echo "yes" >&6; } | |
bec39cab | 3239 | |
81ecdfbb | 3240 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3241 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3242 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3243 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3245 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3247 | $as_echo "$cross_compiling" >&6; } | |
3248 | ||
3249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3250 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3251 | if { { ac_try="$ac_link" | |
3252 | case "(($ac_try" in | |
3253 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3254 | *) ac_try_echo=$ac_try;; | |
3255 | esac | |
3256 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3257 | $as_echo "$ac_try_echo"; } >&5 | |
3258 | (eval "$ac_link") 2>&5 | |
bec39cab | 3259 | ac_status=$? |
81ecdfbb RW |
3260 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3261 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3262 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3263 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3264 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3265 | # `rm'. | |
3266 | for ac_file in conftest.exe conftest conftest.*; do | |
3267 | test -f "$ac_file" || continue | |
3268 | case $ac_file in | |
81ecdfbb | 3269 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3270 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3271 | break;; |
3272 | * ) break;; | |
3273 | esac | |
3274 | done | |
c906108c | 3275 | else |
81ecdfbb RW |
3276 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3277 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3278 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3279 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3280 | fi |
b4e70030 | 3281 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3283 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3284 | |
b4e70030 | 3285 | rm -f conftest.$ac_ext |
bec39cab AC |
3286 | EXEEXT=$ac_cv_exeext |
3287 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3289 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3290 | if test "${ac_cv_objext+set}" = set; then : | |
3291 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3292 | else |
81ecdfbb | 3293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3294 | /* end confdefs.h. */ |
3295 | ||
3296 | int | |
3297 | main () | |
3298 | { | |
3299 | ||
3300 | ; | |
3301 | return 0; | |
3302 | } | |
3303 | _ACEOF | |
3304 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3305 | if { { ac_try="$ac_compile" |
3306 | case "(($ac_try" in | |
3307 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3308 | *) ac_try_echo=$ac_try;; | |
3309 | esac | |
3310 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3311 | $as_echo "$ac_try_echo"; } >&5 | |
3312 | (eval "$ac_compile") 2>&5 | |
3313 | ac_status=$? | |
3314 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3315 | test $ac_status = 0; }; then : | |
3316 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3317 | test -f "$ac_file" || continue; | |
bec39cab | 3318 | case $ac_file in |
81ecdfbb | 3319 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3320 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3321 | break;; | |
3322 | esac | |
3323 | done | |
c906108c | 3324 | else |
81ecdfbb | 3325 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3326 | sed 's/^/| /' conftest.$ac_ext >&5 |
3327 | ||
81ecdfbb RW |
3328 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3329 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3330 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3331 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3332 | fi |
b4e70030 | 3333 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3334 | fi |
81ecdfbb RW |
3335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3336 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3337 | OBJEXT=$ac_cv_objext |
3338 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3340 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3341 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3342 | $as_echo_n "(cached) " >&6 | |
c906108c | 3343 | else |
81ecdfbb | 3344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3345 | /* end confdefs.h. */ |
3346 | ||
3347 | int | |
3348 | main () | |
3349 | { | |
3350 | #ifndef __GNUC__ | |
3351 | choke me | |
3352 | #endif | |
3353 | ||
3354 | ; | |
3355 | return 0; | |
3356 | } | |
3357 | _ACEOF | |
81ecdfbb | 3358 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3359 | ac_compiler_gnu=yes |
3360 | else | |
81ecdfbb | 3361 | ac_compiler_gnu=no |
bec39cab | 3362 | fi |
81ecdfbb | 3363 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3364 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3365 | ||
3366 | fi | |
81ecdfbb RW |
3367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3368 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3369 | if test $ac_compiler_gnu = yes; then | |
3370 | GCC=yes | |
3371 | else | |
3372 | GCC= | |
3373 | fi | |
bec39cab AC |
3374 | ac_test_CFLAGS=${CFLAGS+set} |
3375 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3376 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3377 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3378 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3379 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3380 | else |
81ecdfbb RW |
3381 | ac_save_c_werror_flag=$ac_c_werror_flag |
3382 | ac_c_werror_flag=yes | |
3383 | ac_cv_prog_cc_g=no | |
3384 | CFLAGS="-g" | |
3385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3386 | /* end confdefs.h. */ |
3387 | ||
3388 | int | |
3389 | main () | |
3390 | { | |
3391 | ||
3392 | ; | |
3393 | return 0; | |
3394 | } | |
3395 | _ACEOF | |
81ecdfbb | 3396 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3397 | ac_cv_prog_cc_g=yes |
3398 | else | |
81ecdfbb RW |
3399 | CFLAGS="" |
3400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3401 | /* end confdefs.h. */ | |
3402 | ||
3403 | int | |
3404 | main () | |
3405 | { | |
3406 | ||
3407 | ; | |
3408 | return 0; | |
3409 | } | |
3410 | _ACEOF | |
3411 | if ac_fn_c_try_compile "$LINENO"; then : | |
3412 | ||
3413 | else | |
3414 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3415 | CFLAGS="-g" | |
3416 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3417 | /* end confdefs.h. */ | |
3418 | ||
3419 | int | |
3420 | main () | |
3421 | { | |
c906108c | 3422 | |
81ecdfbb RW |
3423 | ; |
3424 | return 0; | |
3425 | } | |
3426 | _ACEOF | |
3427 | if ac_fn_c_try_compile "$LINENO"; then : | |
3428 | ac_cv_prog_cc_g=yes | |
3429 | fi | |
3430 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3431 | fi | |
3432 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3433 | fi |
81ecdfbb RW |
3434 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3435 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3436 | fi |
81ecdfbb RW |
3437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3438 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3439 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3440 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3441 | elif test $ac_cv_prog_cc_g = yes; then |
3442 | if test "$GCC" = yes; then | |
3443 | CFLAGS="-g -O2" | |
3444 | else | |
3445 | CFLAGS="-g" | |
3446 | fi | |
3447 | else | |
3448 | if test "$GCC" = yes; then | |
3449 | CFLAGS="-O2" | |
3450 | else | |
3451 | CFLAGS= | |
3452 | fi | |
3453 | fi | |
81ecdfbb RW |
3454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3455 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3456 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3457 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3458 | else |
81ecdfbb | 3459 | ac_cv_prog_cc_c89=no |
bec39cab | 3460 | ac_save_CC=$CC |
81ecdfbb | 3461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3462 | /* end confdefs.h. */ |
c906108c SS |
3463 | #include <stdarg.h> |
3464 | #include <stdio.h> | |
3465 | #include <sys/types.h> | |
3466 | #include <sys/stat.h> | |
3467 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3468 | struct buf { int x; }; | |
3469 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3470 | static char *e (p, i) | |
3471 | char **p; | |
3472 | int i; | |
3473 | { | |
3474 | return p[i]; | |
3475 | } | |
3476 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3477 | { | |
3478 | char *s; | |
3479 | va_list v; | |
3480 | va_start (v,p); | |
3481 | s = g (p, va_arg (v,int)); | |
3482 | va_end (v); | |
3483 | return s; | |
3484 | } | |
bec39cab AC |
3485 | |
3486 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3487 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3488 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3489 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3490 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3491 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3492 | that's true only with -std. */ |
bec39cab AC |
3493 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3494 | ||
81ecdfbb RW |
3495 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3496 | inside strings and character constants. */ | |
3497 | #define FOO(x) 'x' | |
3498 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3499 | ||
c906108c SS |
3500 | int test (int i, double x); |
3501 | struct s1 {int (*f) (int a);}; | |
3502 | struct s2 {int (*f) (double a);}; | |
3503 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3504 | int argc; | |
3505 | char **argv; | |
bec39cab AC |
3506 | int |
3507 | main () | |
3508 | { | |
c906108c | 3509 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3510 | ; |
3511 | return 0; | |
3512 | } | |
3513 | _ACEOF | |
81ecdfbb RW |
3514 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3515 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3516 | do |
3517 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3518 | if ac_fn_c_try_compile "$LINENO"; then : |
3519 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3520 | fi |
81ecdfbb RW |
3521 | rm -f core conftest.err conftest.$ac_objext |
3522 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3523 | done |
81ecdfbb | 3524 | rm -f conftest.$ac_ext |
bec39cab | 3525 | CC=$ac_save_CC |
c906108c SS |
3526 | |
3527 | fi | |
81ecdfbb RW |
3528 | # AC_CACHE_VAL |
3529 | case "x$ac_cv_prog_cc_c89" in | |
3530 | x) | |
3531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3532 | $as_echo "none needed" >&6; } ;; | |
3533 | xno) | |
3534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3535 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3536 | *) |
81ecdfbb RW |
3537 | CC="$CC $ac_cv_prog_cc_c89" |
3538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3539 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3540 | esac |
81ecdfbb | 3541 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3542 | |
b4e70030 JB |
3543 | fi |
3544 | ||
bec39cab AC |
3545 | ac_ext=c |
3546 | ac_cpp='$CPP $CPPFLAGS' | |
3547 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3548 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3549 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3550 | |
3bc3d82a PA |
3551 | ac_ext=cpp |
3552 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3553 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3554 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3555 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3556 | if test -z "$CXX"; then | |
3557 | if test -n "$CCC"; then | |
3558 | CXX=$CCC | |
3559 | else | |
3560 | if test -n "$ac_tool_prefix"; then | |
3561 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3562 | do | |
3563 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3564 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3566 | $as_echo_n "checking for $ac_word... " >&6; } | |
3567 | if test "${ac_cv_prog_CXX+set}" = set; then : | |
3568 | $as_echo_n "(cached) " >&6 | |
3569 | else | |
3570 | if test -n "$CXX"; then | |
3571 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3572 | else | |
3573 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3574 | for as_dir in $PATH | |
3575 | do | |
3576 | IFS=$as_save_IFS | |
3577 | test -z "$as_dir" && as_dir=. | |
3578 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3579 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3580 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
3581 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3582 | break 2 | |
3583 | fi | |
3584 | done | |
3585 | done | |
3586 | IFS=$as_save_IFS | |
3587 | ||
3588 | fi | |
3589 | fi | |
3590 | CXX=$ac_cv_prog_CXX | |
3591 | if test -n "$CXX"; then | |
3592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3593 | $as_echo "$CXX" >&6; } | |
3594 | else | |
3595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3596 | $as_echo "no" >&6; } | |
3597 | fi | |
3598 | ||
3599 | ||
3600 | test -n "$CXX" && break | |
3601 | done | |
3602 | fi | |
3603 | if test -z "$CXX"; then | |
3604 | ac_ct_CXX=$CXX | |
3605 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3606 | do | |
3607 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3608 | set dummy $ac_prog; ac_word=$2 | |
3609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3610 | $as_echo_n "checking for $ac_word... " >&6; } | |
3611 | if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : | |
3612 | $as_echo_n "(cached) " >&6 | |
3613 | else | |
3614 | if test -n "$ac_ct_CXX"; then | |
3615 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3616 | else | |
3617 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3618 | for as_dir in $PATH | |
3619 | do | |
3620 | IFS=$as_save_IFS | |
3621 | test -z "$as_dir" && as_dir=. | |
3622 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3623 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3624 | ac_cv_prog_ac_ct_CXX="$ac_prog" | |
3625 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3626 | break 2 | |
3627 | fi | |
3628 | done | |
3629 | done | |
3630 | IFS=$as_save_IFS | |
3631 | ||
3632 | fi | |
3633 | fi | |
3634 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3635 | if test -n "$ac_ct_CXX"; then | |
3636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3637 | $as_echo "$ac_ct_CXX" >&6; } | |
3638 | else | |
3639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3640 | $as_echo "no" >&6; } | |
3641 | fi | |
3642 | ||
3643 | ||
3644 | test -n "$ac_ct_CXX" && break | |
3645 | done | |
3646 | ||
3647 | if test "x$ac_ct_CXX" = x; then | |
3648 | CXX="g++" | |
3649 | else | |
3650 | case $cross_compiling:$ac_tool_warned in | |
3651 | yes:) | |
3652 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3653 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3654 | ac_tool_warned=yes ;; | |
3655 | esac | |
3656 | CXX=$ac_ct_CXX | |
3657 | fi | |
3658 | fi | |
3659 | ||
3660 | fi | |
3661 | fi | |
3662 | # Provide some information about the compiler. | |
3663 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3664 | set X $ac_compile | |
3665 | ac_compiler=$2 | |
3666 | for ac_option in --version -v -V -qversion; do | |
3667 | { { ac_try="$ac_compiler $ac_option >&5" | |
3668 | case "(($ac_try" in | |
3669 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3670 | *) ac_try_echo=$ac_try;; | |
3671 | esac | |
3672 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3673 | $as_echo "$ac_try_echo"; } >&5 | |
3674 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3675 | ac_status=$? | |
3676 | if test -s conftest.err; then | |
3677 | sed '10a\ | |
3678 | ... rest of stderr output deleted ... | |
3679 | 10q' conftest.err >conftest.er1 | |
3680 | cat conftest.er1 >&5 | |
3681 | rm -f conftest.er1 conftest.err | |
3682 | fi | |
3683 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3684 | test $ac_status = 0; } | |
3685 | done | |
3686 | ||
3687 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3688 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
3689 | if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : | |
3690 | $as_echo_n "(cached) " >&6 | |
3691 | else | |
3692 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3693 | /* end confdefs.h. */ | |
3694 | ||
3695 | int | |
3696 | main () | |
3697 | { | |
3698 | #ifndef __GNUC__ | |
3699 | choke me | |
3700 | #endif | |
3701 | ||
3702 | ; | |
3703 | return 0; | |
3704 | } | |
3705 | _ACEOF | |
3706 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3707 | ac_compiler_gnu=yes | |
3708 | else | |
3709 | ac_compiler_gnu=no | |
3710 | fi | |
3711 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3712 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3713 | ||
3714 | fi | |
3715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3716 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3717 | if test $ac_compiler_gnu = yes; then | |
3718 | GXX=yes | |
3719 | else | |
3720 | GXX= | |
3721 | fi | |
3722 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3723 | ac_save_CXXFLAGS=$CXXFLAGS | |
3724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3725 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
3726 | if test "${ac_cv_prog_cxx_g+set}" = set; then : | |
3727 | $as_echo_n "(cached) " >&6 | |
3728 | else | |
3729 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3730 | ac_cxx_werror_flag=yes | |
3731 | ac_cv_prog_cxx_g=no | |
3732 | CXXFLAGS="-g" | |
3733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3734 | /* end confdefs.h. */ | |
3735 | ||
3736 | int | |
3737 | main () | |
3738 | { | |
3739 | ||
3740 | ; | |
3741 | return 0; | |
3742 | } | |
3743 | _ACEOF | |
3744 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3745 | ac_cv_prog_cxx_g=yes | |
3746 | else | |
3747 | CXXFLAGS="" | |
3748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3749 | /* end confdefs.h. */ | |
3750 | ||
3751 | int | |
3752 | main () | |
3753 | { | |
3754 | ||
3755 | ; | |
3756 | return 0; | |
3757 | } | |
3758 | _ACEOF | |
3759 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3760 | ||
3761 | else | |
3762 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3763 | CXXFLAGS="-g" | |
3764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3765 | /* end confdefs.h. */ | |
3766 | ||
3767 | int | |
3768 | main () | |
3769 | { | |
3770 | ||
3771 | ; | |
3772 | return 0; | |
3773 | } | |
3774 | _ACEOF | |
3775 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3776 | ac_cv_prog_cxx_g=yes | |
3777 | fi | |
3778 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3779 | fi | |
3780 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3781 | fi | |
3782 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3783 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3784 | fi | |
3785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3786 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3787 | if test "$ac_test_CXXFLAGS" = set; then | |
3788 | CXXFLAGS=$ac_save_CXXFLAGS | |
3789 | elif test $ac_cv_prog_cxx_g = yes; then | |
3790 | if test "$GXX" = yes; then | |
3791 | CXXFLAGS="-g -O2" | |
3792 | else | |
3793 | CXXFLAGS="-g" | |
3794 | fi | |
3795 | else | |
3796 | if test "$GXX" = yes; then | |
3797 | CXXFLAGS="-O2" | |
3798 | else | |
3799 | CXXFLAGS= | |
3800 | fi | |
3801 | fi | |
3802 | ac_ext=c | |
3803 | ac_cpp='$CPP $CPPFLAGS' | |
3804 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3805 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3806 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3807 | ||
3808 | ||
60ca704f | 3809 | |
bec39cab AC |
3810 | ac_ext=c |
3811 | ac_cpp='$CPP $CPPFLAGS' | |
3812 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3813 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3814 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3816 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3817 | # On Suns, sometimes $CPP names a directory. |
3818 | if test -n "$CPP" && test -d "$CPP"; then | |
3819 | CPP= | |
8bb2c122 | 3820 | fi |
bec39cab | 3821 | if test -z "$CPP"; then |
81ecdfbb RW |
3822 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3823 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3824 | else |
3825 | # Double quotes because CPP needs to be expanded | |
3826 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3827 | do | |
3828 | ac_preproc_ok=false | |
3829 | for ac_c_preproc_warn_flag in '' yes | |
3830 | do | |
3831 | # Use a header file that comes with gcc, so configuring glibc | |
3832 | # with a fresh cross-compiler works. | |
3833 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3834 | # <limits.h> exists even on freestanding compilers. | |
3835 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3836 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3837 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3838 | /* end confdefs.h. */ |
3839 | #ifdef __STDC__ | |
3840 | # include <limits.h> | |
3841 | #else | |
3842 | # include <assert.h> | |
3843 | #endif | |
3844 | Syntax error | |
3845 | _ACEOF | |
81ecdfbb | 3846 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3847 | |
81ecdfbb | 3848 | else |
bec39cab AC |
3849 | # Broken: fails on valid input. |
3850 | continue | |
3851 | fi | |
3852 | rm -f conftest.err conftest.$ac_ext | |
3853 | ||
81ecdfbb | 3854 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3855 | # can be detected and how. |
81ecdfbb | 3856 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3857 | /* end confdefs.h. */ |
3858 | #include <ac_nonexistent.h> | |
3859 | _ACEOF | |
81ecdfbb | 3860 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3861 | # Broken: success on invalid input. |
3862 | continue | |
8bb2c122 | 3863 | else |
bec39cab AC |
3864 | # Passes both tests. |
3865 | ac_preproc_ok=: | |
3866 | break | |
8bb2c122 | 3867 | fi |
bec39cab | 3868 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3869 | |
bec39cab AC |
3870 | done |
3871 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3872 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3873 | if $ac_preproc_ok; then : |
bec39cab AC |
3874 | break |
3875 | fi | |
8bb2c122 | 3876 | |
bec39cab AC |
3877 | done |
3878 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3879 | |
c906108c | 3880 | fi |
bec39cab AC |
3881 | CPP=$ac_cv_prog_CPP |
3882 | else | |
3883 | ac_cv_prog_CPP=$CPP | |
c906108c | 3884 | fi |
81ecdfbb RW |
3885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3886 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3887 | ac_preproc_ok=false |
3888 | for ac_c_preproc_warn_flag in '' yes | |
3889 | do | |
3890 | # Use a header file that comes with gcc, so configuring glibc | |
3891 | # with a fresh cross-compiler works. | |
3892 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3893 | # <limits.h> exists even on freestanding compilers. | |
3894 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3895 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3897 | /* end confdefs.h. */ |
3898 | #ifdef __STDC__ | |
3899 | # include <limits.h> | |
3900 | #else | |
3901 | # include <assert.h> | |
3902 | #endif | |
3903 | Syntax error | |
3904 | _ACEOF | |
81ecdfbb | 3905 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3906 | |
81ecdfbb | 3907 | else |
bec39cab AC |
3908 | # Broken: fails on valid input. |
3909 | continue | |
3910 | fi | |
3911 | rm -f conftest.err conftest.$ac_ext | |
3912 | ||
81ecdfbb | 3913 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3914 | # can be detected and how. |
81ecdfbb | 3915 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3916 | /* end confdefs.h. */ |
3917 | #include <ac_nonexistent.h> | |
3918 | _ACEOF | |
81ecdfbb | 3919 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3920 | # Broken: success on invalid input. |
3921 | continue | |
c906108c | 3922 | else |
bec39cab AC |
3923 | # Passes both tests. |
3924 | ac_preproc_ok=: | |
3925 | break | |
c906108c | 3926 | fi |
bec39cab | 3927 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3928 | |
bec39cab AC |
3929 | done |
3930 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3931 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3932 | if $ac_preproc_ok; then : |
3933 | ||
c906108c | 3934 | else |
81ecdfbb RW |
3935 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3936 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3937 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3938 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3939 | fi |
c906108c | 3940 | |
bec39cab AC |
3941 | ac_ext=c |
3942 | ac_cpp='$CPP $CPPFLAGS' | |
3943 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3944 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3945 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3946 | ||
3947 | ||
81ecdfbb RW |
3948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3949 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3950 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3951 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3952 | else |
81ecdfbb RW |
3953 | if test -z "$GREP"; then |
3954 | ac_path_GREP_found=false | |
3955 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3956 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3957 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3958 | do | |
3959 | IFS=$as_save_IFS | |
3960 | test -z "$as_dir" && as_dir=. | |
3961 | for ac_prog in grep ggrep; do | |
3962 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3963 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3964 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3965 | # Check for GNU ac_path_GREP and select it if it is found. | |
3966 | # Check for GNU $ac_path_GREP | |
3967 | case `"$ac_path_GREP" --version 2>&1` in | |
3968 | *GNU*) | |
3969 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3970 | *) | |
3971 | ac_count=0 | |
3972 | $as_echo_n 0123456789 >"conftest.in" | |
3973 | while : | |
3974 | do | |
3975 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3976 | mv "conftest.tmp" "conftest.in" | |
3977 | cp "conftest.in" "conftest.nl" | |
3978 | $as_echo 'GREP' >> "conftest.nl" | |
3979 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3980 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3981 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3982 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3983 | # Best one so far, save it but keep looking for a better one | |
3984 | ac_cv_path_GREP="$ac_path_GREP" | |
3985 | ac_path_GREP_max=$ac_count | |
bec39cab | 3986 | fi |
81ecdfbb RW |
3987 | # 10*(2^10) chars as input seems more than enough |
3988 | test $ac_count -gt 10 && break | |
3989 | done | |
3990 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3991 | esac | |
bec39cab | 3992 | |
81ecdfbb RW |
3993 | $ac_path_GREP_found && break 3 |
3994 | done | |
3995 | done | |
3996 | done | |
3997 | IFS=$as_save_IFS | |
3998 | if test -z "$ac_cv_path_GREP"; then | |
3999 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4000 | fi | |
c906108c | 4001 | else |
81ecdfbb | 4002 | ac_cv_path_GREP=$GREP |
c906108c | 4003 | fi |
c906108c | 4004 | |
81ecdfbb RW |
4005 | fi |
4006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4007 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4008 | GREP="$ac_cv_path_GREP" | |
c906108c | 4009 | |
c906108c | 4010 | |
81ecdfbb RW |
4011 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4012 | $as_echo_n "checking for egrep... " >&6; } | |
4013 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
4014 | $as_echo_n "(cached) " >&6 | |
783e057b | 4015 | else |
81ecdfbb RW |
4016 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4017 | then ac_cv_path_EGREP="$GREP -E" | |
4018 | else | |
4019 | if test -z "$EGREP"; then | |
4020 | ac_path_EGREP_found=false | |
4021 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4022 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4023 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4024 | do |
4025 | IFS=$as_save_IFS | |
4026 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4027 | for ac_prog in egrep; do |
4028 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4029 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4030 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
4031 | # Check for GNU ac_path_EGREP and select it if it is found. | |
4032 | # Check for GNU $ac_path_EGREP | |
4033 | case `"$ac_path_EGREP" --version 2>&1` in | |
4034 | *GNU*) | |
4035 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4036 | *) | |
4037 | ac_count=0 | |
4038 | $as_echo_n 0123456789 >"conftest.in" | |
4039 | while : | |
4040 | do | |
4041 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4042 | mv "conftest.tmp" "conftest.in" | |
4043 | cp "conftest.in" "conftest.nl" | |
4044 | $as_echo 'EGREP' >> "conftest.nl" | |
4045 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4046 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4047 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4048 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4049 | # Best one so far, save it but keep looking for a better one | |
4050 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4051 | ac_path_EGREP_max=$ac_count | |
4052 | fi | |
4053 | # 10*(2^10) chars as input seems more than enough | |
4054 | test $ac_count -gt 10 && break | |
4055 | done | |
4056 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4057 | esac | |
bec39cab | 4058 | |
81ecdfbb RW |
4059 | $ac_path_EGREP_found && break 3 |
4060 | done | |
4061 | done | |
4062 | done | |
4063 | IFS=$as_save_IFS | |
4064 | if test -z "$ac_cv_path_EGREP"; then | |
4065 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 4066 | fi |
783e057b | 4067 | else |
81ecdfbb | 4068 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4069 | fi |
4070 | ||
81ecdfbb | 4071 | fi |
783e057b | 4072 | fi |
81ecdfbb RW |
4073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4074 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4075 | EGREP="$ac_cv_path_EGREP" | |
4076 | ||
783e057b | 4077 | |
81ecdfbb RW |
4078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4079 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
4080 | if test "${ac_cv_header_stdc+set}" = set; then : | |
4081 | $as_echo_n "(cached) " >&6 | |
783e057b | 4082 | else |
81ecdfbb | 4083 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4084 | /* end confdefs.h. */ |
783e057b | 4085 | #include <stdlib.h> |
bec39cab | 4086 | #include <stdarg.h> |
783e057b DJ |
4087 | #include <string.h> |
4088 | #include <float.h> | |
c906108c | 4089 | |
bec39cab AC |
4090 | int |
4091 | main () | |
4092 | { | |
c906108c | 4093 | |
bec39cab AC |
4094 | ; |
4095 | return 0; | |
4096 | } | |
4097 | _ACEOF | |
81ecdfbb | 4098 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4099 | ac_cv_header_stdc=yes |
c906108c | 4100 | else |
81ecdfbb | 4101 | ac_cv_header_stdc=no |
c906108c | 4102 | fi |
81ecdfbb | 4103 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4104 | |
783e057b DJ |
4105 | if test $ac_cv_header_stdc = yes; then |
4106 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4108 | /* end confdefs.h. */ |
4109 | #include <string.h> | |
c906108c | 4110 | |
783e057b DJ |
4111 | _ACEOF |
4112 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4113 | $EGREP "memchr" >/dev/null 2>&1; then : |
4114 | ||
c906108c | 4115 | else |
783e057b | 4116 | ac_cv_header_stdc=no |
c906108c | 4117 | fi |
783e057b | 4118 | rm -f conftest* |
c906108c SS |
4119 | |
4120 | fi | |
4121 | ||
783e057b DJ |
4122 | if test $ac_cv_header_stdc = yes; then |
4123 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4125 | /* end confdefs.h. */ |
4126 | #include <stdlib.h> | |
bec39cab | 4127 | |
783e057b DJ |
4128 | _ACEOF |
4129 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4130 | $EGREP "free" >/dev/null 2>&1; then : |
4131 | ||
bec39cab | 4132 | else |
783e057b | 4133 | ac_cv_header_stdc=no |
bec39cab | 4134 | fi |
783e057b | 4135 | rm -f conftest* |
bec39cab AC |
4136 | |
4137 | fi | |
bec39cab | 4138 | |
783e057b DJ |
4139 | if test $ac_cv_header_stdc = yes; then |
4140 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4141 | if test "$cross_compiling" = yes; then : |
783e057b | 4142 | : |
bec39cab | 4143 | else |
81ecdfbb | 4144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4145 | /* end confdefs.h. */ |
4146 | #include <ctype.h> | |
81ecdfbb | 4147 | #include <stdlib.h> |
783e057b DJ |
4148 | #if ((' ' & 0x0FF) == 0x020) |
4149 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4150 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4151 | #else | |
4152 | # define ISLOWER(c) \ | |
4153 | (('a' <= (c) && (c) <= 'i') \ | |
4154 | || ('j' <= (c) && (c) <= 'r') \ | |
4155 | || ('s' <= (c) && (c) <= 'z')) | |
4156 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4157 | #endif | |
4158 | ||
4159 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4160 | int | |
4161 | main () | |
4162 | { | |
4163 | int i; | |
4164 | for (i = 0; i < 256; i++) | |
4165 | if (XOR (islower (i), ISLOWER (i)) | |
4166 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4167 | return 2; |
4168 | return 0; | |
783e057b DJ |
4169 | } |
4170 | _ACEOF | |
81ecdfbb | 4171 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4172 | |
81ecdfbb RW |
4173 | else |
4174 | ac_cv_header_stdc=no | |
783e057b | 4175 | fi |
81ecdfbb RW |
4176 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4177 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4178 | fi |
81ecdfbb | 4179 | |
783e057b DJ |
4180 | fi |
4181 | fi | |
81ecdfbb RW |
4182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4183 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4184 | if test $ac_cv_header_stdc = yes; then |
4185 | ||
81ecdfbb | 4186 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4187 | |
4188 | fi | |
4189 | ||
4190 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4191 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4192 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4193 | do : |
4194 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4195 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4196 | " | |
4197 | eval as_val=\$$as_ac_Header | |
4198 | if test "x$as_val" = x""yes; then : | |
783e057b | 4199 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4200 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4201 | _ACEOF |
4202 | ||
4203 | fi | |
4204 | ||
4205 | done | |
4206 | ||
4207 | ||
4208 | ||
81ecdfbb RW |
4209 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4210 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4211 | MINIX=yes |
4212 | else | |
4213 | MINIX= | |
4214 | fi | |
4215 | ||
4216 | ||
4217 | if test "$MINIX" = yes; then | |
4218 | ||
81ecdfbb | 4219 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4220 | |
4221 | ||
81ecdfbb | 4222 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4223 | |
4224 | ||
81ecdfbb | 4225 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4226 | |
4227 | fi | |
4228 | ||
4229 | ||
81ecdfbb RW |
4230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4231 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4232 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4233 | $as_echo_n "(cached) " >&6 | |
783e057b | 4234 | else |
81ecdfbb | 4235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4236 | /* end confdefs.h. */ |
4237 | ||
c971b7fa PA |
4238 | # define __EXTENSIONS__ 1 |
4239 | $ac_includes_default | |
783e057b DJ |
4240 | int |
4241 | main () | |
4242 | { | |
4243 | ||
4244 | ; | |
4245 | return 0; | |
4246 | } | |
4247 | _ACEOF | |
81ecdfbb | 4248 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4249 | ac_cv_safe_to_define___extensions__=yes |
4250 | else | |
81ecdfbb | 4251 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4252 | fi |
81ecdfbb | 4253 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4254 | fi |
81ecdfbb RW |
4255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4256 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4257 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4258 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4259 | |
81ecdfbb | 4260 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4261 | |
81ecdfbb | 4262 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4263 | |
81ecdfbb | 4264 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4265 | |
81ecdfbb | 4266 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4267 | |
4268 | ||
c971b7fa PA |
4269 | ac_aux_dir= |
4270 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
4271 | for ac_t in install-sh install.sh shtool; do | |
4272 | if test -f "$ac_dir/$ac_t"; then | |
4273 | ac_aux_dir=$ac_dir | |
4274 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4275 | break 2 | |
4276 | fi | |
4277 | done | |
4278 | done | |
4279 | if test -z "$ac_aux_dir"; then | |
4280 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
4281 | fi | |
770d76d7 | 4282 | |
c971b7fa PA |
4283 | # These three variables are undocumented and unsupported, |
4284 | # and are intended to be withdrawn in a future Autoconf release. | |
4285 | # They can cause serious problems if a builder's source tree is in a directory | |
4286 | # whose full name contains unusual characters. | |
4287 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4288 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4289 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4290 | |
770d76d7 | 4291 | |
c971b7fa PA |
4292 | # Make sure we can run config.sub. |
4293 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
4294 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 4295 | |
c971b7fa PA |
4296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4297 | $as_echo_n "checking build system type... " >&6; } | |
4298 | if test "${ac_cv_build+set}" = set; then : | |
4299 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 4300 | else |
c971b7fa PA |
4301 | ac_build_alias=$build_alias |
4302 | test "x$ac_build_alias" = x && | |
4303 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4304 | test "x$ac_build_alias" = x && | |
4305 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
4306 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
4307 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
4308 | ||
770d76d7 | 4309 | fi |
c971b7fa PA |
4310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4311 | $as_echo "$ac_cv_build" >&6; } | |
4312 | case $ac_cv_build in | |
4313 | *-*-*) ;; | |
4314 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 4315 | esac |
c971b7fa PA |
4316 | build=$ac_cv_build |
4317 | ac_save_IFS=$IFS; IFS='-' | |
4318 | set x $ac_cv_build | |
4319 | shift | |
4320 | build_cpu=$1 | |
4321 | build_vendor=$2 | |
4322 | shift; shift | |
4323 | # Remember, the first character of IFS is used to create $*, | |
4324 | # except with old shells: | |
4325 | build_os=$* | |
4326 | IFS=$ac_save_IFS | |
4327 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4328 | |
4329 | ||
c971b7fa PA |
4330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4331 | $as_echo_n "checking host system type... " >&6; } | |
4332 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
4333 | $as_echo_n "(cached) " >&6 |
4334 | else | |
c971b7fa PA |
4335 | if test "x$host_alias" = x; then |
4336 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4337 | else |
c971b7fa PA |
4338 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4339 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 4340 | fi |
81ecdfbb RW |
4341 | |
4342 | fi | |
c971b7fa PA |
4343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4344 | $as_echo "$ac_cv_host" >&6; } | |
4345 | case $ac_cv_host in | |
4346 | *-*-*) ;; | |
4347 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4348 | esac |
c971b7fa PA |
4349 | host=$ac_cv_host |
4350 | ac_save_IFS=$IFS; IFS='-' | |
4351 | set x $ac_cv_host | |
4352 | shift | |
4353 | host_cpu=$1 | |
4354 | host_vendor=$2 | |
4355 | shift; shift | |
4356 | # Remember, the first character of IFS is used to create $*, | |
4357 | # except with old shells: | |
4358 | host_os=$* | |
4359 | IFS=$ac_save_IFS | |
4360 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4361 | |
4362 | ||
4363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4364 | $as_echo_n "checking target system type... " >&6; } | |
4365 | if test "${ac_cv_target+set}" = set; then : | |
4366 | $as_echo_n "(cached) " >&6 | |
4367 | else | |
4368 | if test "x$target_alias" = x; then | |
4369 | ac_cv_target=$ac_cv_host | |
4370 | else | |
4371 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4372 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4373 | fi | |
4374 | ||
4375 | fi | |
4376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4377 | $as_echo "$ac_cv_target" >&6; } | |
4378 | case $ac_cv_target in | |
4379 | *-*-*) ;; | |
4380 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4381 | esac | |
4382 | target=$ac_cv_target | |
4383 | ac_save_IFS=$IFS; IFS='-' | |
4384 | set x $ac_cv_target | |
4385 | shift | |
4386 | target_cpu=$1 | |
4387 | target_vendor=$2 | |
4388 | shift; shift | |
4389 | # Remember, the first character of IFS is used to create $*, | |
4390 | # except with old shells: | |
4391 | target_os=$* | |
4392 | IFS=$ac_save_IFS | |
4393 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4394 | ||
4395 | ||
4396 | # The aliases save the names the user supplied, while $host etc. | |
4397 | # will get canonicalized. | |
4398 | test -n "$target_alias" && | |
4399 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4400 | NONENONEs,x,x, && | |
4401 | program_prefix=${target_alias}- | |
4402 | ||
4403 | # The tests for host and target for $enable_largefile require | |
4404 | # canonical names. | |
4405 | ||
4406 | ||
81ecdfbb | 4407 | |
da2f07f1 JK |
4408 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4409 | # even in directories otherwise not depending on the $plugins option. | |
4410 | ||
4411 | ||
2974be62 AM |
4412 | maybe_plugins=no |
4413 | for ac_header in dlfcn.h | |
4414 | do : | |
4415 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4416 | " | |
4417 | if test "x$ac_cv_header_dlfcn_h" = x""yes; then : | |
4418 | cat >>confdefs.h <<_ACEOF | |
4419 | #define HAVE_DLFCN_H 1 | |
4420 | _ACEOF | |
4421 | maybe_plugins=yes | |
4422 | fi | |
4423 | ||
4424 | done | |
4425 | ||
4426 | for ac_header in windows.h | |
4427 | do : | |
4428 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4429 | " | |
4430 | if test "x$ac_cv_header_windows_h" = x""yes; then : | |
4431 | cat >>confdefs.h <<_ACEOF | |
4432 | #define HAVE_WINDOWS_H 1 | |
4433 | _ACEOF | |
4434 | maybe_plugins=yes | |
4435 | fi | |
4436 | ||
4437 | done | |
4438 | ||
4439 | ||
4440 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4441 | if test "${enable_plugins+set}" = set; then : |
4442 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4443 | no) plugins=no ;; |
4444 | *) plugins=yes | |
4445 | if test "$maybe_plugins" != "yes" ; then | |
4446 | as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
4447 | fi ;; | |
4448 | esac | |
da2f07f1 | 4449 | else |
2974be62 AM |
4450 | plugins=$maybe_plugins |
4451 | ||
da2f07f1 JK |
4452 | fi |
4453 | ||
2974be62 AM |
4454 | if test "$plugins" = "yes"; then |
4455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 | |
4456 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
4457 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4458 | $as_echo_n "(cached) " >&6 | |
4459 | else | |
4460 | ac_func_search_save_LIBS=$LIBS | |
4461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4462 | /* end confdefs.h. */ | |
4463 | ||
4464 | /* Override any GCC internal prototype to avoid an error. | |
4465 | Use char because int might match the return type of a GCC | |
4466 | builtin and then its argument prototype would still apply. */ | |
4467 | #ifdef __cplusplus | |
4468 | extern "C" | |
4469 | #endif | |
4470 | char dlopen (); | |
4471 | int | |
4472 | main () | |
4473 | { | |
4474 | return dlopen (); | |
4475 | ; | |
4476 | return 0; | |
4477 | } | |
4478 | _ACEOF | |
4479 | for ac_lib in '' dl; do | |
4480 | if test -z "$ac_lib"; then | |
4481 | ac_res="none required" | |
4482 | else | |
4483 | ac_res=-l$ac_lib | |
4484 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4485 | fi | |
4486 | if ac_fn_c_try_link "$LINENO"; then : | |
4487 | ac_cv_search_dlopen=$ac_res | |
4488 | fi | |
4489 | rm -f core conftest.err conftest.$ac_objext \ | |
4490 | conftest$ac_exeext | |
4491 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4492 | break | |
4493 | fi | |
4494 | done | |
4495 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
4496 | ||
4497 | else | |
4498 | ac_cv_search_dlopen=no | |
4499 | fi | |
4500 | rm conftest.$ac_ext | |
4501 | LIBS=$ac_func_search_save_LIBS | |
4502 | fi | |
4503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
4504 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
4505 | ac_res=$ac_cv_search_dlopen | |
4506 | if test "$ac_res" != no; then : | |
4507 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4508 | ||
4509 | fi | |
4510 | ||
4511 | fi | |
da2f07f1 JK |
4512 | |
4513 | ||
4514 | case "${host}" in | |
4515 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4516 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4517 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4518 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4519 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4520 | # large-file support through the --enable-largefile switch, disable | |
4521 | # large-file support in favor of procfs support. | |
4522 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4523 | && : ${enable_largefile="no"} | |
4524 | ;; | |
4525 | esac | |
4526 | ||
4527 | # Check whether --enable-largefile was given. | |
4528 | if test "${enable_largefile+set}" = set; then : | |
4529 | enableval=$enable_largefile; | |
4530 | fi | |
4531 | ||
4532 | if test "$enable_largefile" != no; then | |
4533 | ||
4534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4535 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4536 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4537 | $as_echo_n "(cached) " >&6 | |
4538 | else | |
4539 | ac_cv_sys_largefile_CC=no | |
4540 | if test "$GCC" != yes; then | |
4541 | ac_save_CC=$CC | |
4542 | while :; do | |
4543 | # IRIX 6.2 and later do not support large files by default, | |
4544 | # so use the C compiler's -n32 option if that helps. | |
4545 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4546 | /* end confdefs.h. */ | |
4547 | #include <sys/types.h> | |
4548 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4549 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4550 | since some C++ compilers masquerading as C compilers | |
4551 | incorrectly reject 9223372036854775807. */ | |
4552 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4553 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4554 | && LARGE_OFF_T % 2147483647 == 1) | |
4555 | ? 1 : -1]; | |
4556 | int | |
4557 | main () | |
4558 | { | |
4559 | ||
4560 | ; | |
4561 | return 0; | |
4562 | } | |
4563 | _ACEOF | |
4564 | if ac_fn_c_try_compile "$LINENO"; then : | |
4565 | break | |
4566 | fi | |
4567 | rm -f core conftest.err conftest.$ac_objext | |
4568 | CC="$CC -n32" | |
4569 | if ac_fn_c_try_compile "$LINENO"; then : | |
4570 | ac_cv_sys_largefile_CC=' -n32'; break | |
4571 | fi | |
4572 | rm -f core conftest.err conftest.$ac_objext | |
4573 | break | |
4574 | done | |
4575 | CC=$ac_save_CC | |
4576 | rm -f conftest.$ac_ext | |
4577 | fi | |
4578 | fi | |
4579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4580 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4581 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4582 | CC=$CC$ac_cv_sys_largefile_CC | |
4583 | fi | |
4584 | ||
4585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4586 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4587 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4588 | $as_echo_n "(cached) " >&6 | |
4589 | else | |
4590 | while :; do | |
4591 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4592 | /* end confdefs.h. */ | |
4593 | #include <sys/types.h> | |
4594 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4595 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4596 | since some C++ compilers masquerading as C compilers | |
4597 | incorrectly reject 9223372036854775807. */ | |
4598 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4599 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4600 | && LARGE_OFF_T % 2147483647 == 1) | |
4601 | ? 1 : -1]; | |
4602 | int | |
4603 | main () | |
4604 | { | |
4605 | ||
4606 | ; | |
4607 | return 0; | |
4608 | } | |
4609 | _ACEOF | |
4610 | if ac_fn_c_try_compile "$LINENO"; then : | |
4611 | ac_cv_sys_file_offset_bits=no; break | |
4612 | fi | |
4613 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4614 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4615 | /* end confdefs.h. */ | |
4616 | #define _FILE_OFFSET_BITS 64 | |
4617 | #include <sys/types.h> | |
4618 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4619 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4620 | since some C++ compilers masquerading as C compilers | |
4621 | incorrectly reject 9223372036854775807. */ | |
4622 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4623 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4624 | && LARGE_OFF_T % 2147483647 == 1) | |
4625 | ? 1 : -1]; | |
4626 | int | |
4627 | main () | |
4628 | { | |
4629 | ||
4630 | ; | |
4631 | return 0; | |
4632 | } | |
4633 | _ACEOF | |
4634 | if ac_fn_c_try_compile "$LINENO"; then : | |
4635 | ac_cv_sys_file_offset_bits=64; break | |
4636 | fi | |
4637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4638 | ac_cv_sys_file_offset_bits=unknown | |
4639 | break | |
4640 | done | |
4641 | fi | |
4642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4643 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4644 | case $ac_cv_sys_file_offset_bits in #( | |
4645 | no | unknown) ;; | |
4646 | *) | |
4647 | cat >>confdefs.h <<_ACEOF | |
4648 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4649 | _ACEOF | |
4650 | ;; | |
4651 | esac | |
4652 | rm -rf conftest* | |
4653 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4655 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4656 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4657 | $as_echo_n "(cached) " >&6 | |
4658 | else | |
4659 | while :; do | |
4660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4661 | /* end confdefs.h. */ | |
4662 | #include <sys/types.h> | |
4663 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4664 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4665 | since some C++ compilers masquerading as C compilers | |
4666 | incorrectly reject 9223372036854775807. */ | |
4667 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4668 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4669 | && LARGE_OFF_T % 2147483647 == 1) | |
4670 | ? 1 : -1]; | |
4671 | int | |
4672 | main () | |
4673 | { | |
4674 | ||
4675 | ; | |
4676 | return 0; | |
4677 | } | |
4678 | _ACEOF | |
4679 | if ac_fn_c_try_compile "$LINENO"; then : | |
4680 | ac_cv_sys_large_files=no; break | |
4681 | fi | |
4682 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4683 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4684 | /* end confdefs.h. */ | |
4685 | #define _LARGE_FILES 1 | |
4686 | #include <sys/types.h> | |
4687 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4688 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4689 | since some C++ compilers masquerading as C compilers | |
4690 | incorrectly reject 9223372036854775807. */ | |
4691 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4692 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4693 | && LARGE_OFF_T % 2147483647 == 1) | |
4694 | ? 1 : -1]; | |
4695 | int | |
4696 | main () | |
4697 | { | |
4698 | ||
4699 | ; | |
4700 | return 0; | |
4701 | } | |
4702 | _ACEOF | |
4703 | if ac_fn_c_try_compile "$LINENO"; then : | |
4704 | ac_cv_sys_large_files=1; break | |
4705 | fi | |
4706 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4707 | ac_cv_sys_large_files=unknown | |
4708 | break | |
4709 | done | |
4710 | fi | |
4711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4712 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4713 | case $ac_cv_sys_large_files in #( | |
4714 | no | unknown) ;; | |
4715 | *) | |
4716 | cat >>confdefs.h <<_ACEOF | |
4717 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4718 | _ACEOF | |
4719 | ;; | |
4720 | esac | |
4721 | rm -rf conftest* | |
4722 | fi | |
4723 | fi | |
4724 | ||
4725 | ||
4726 | ||
81ecdfbb RW |
4727 | |
4728 | ||
4729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4730 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4731 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4732 | $as_echo_n "(cached) " >&6 | |
4733 | else | |
4734 | am_cv_prog_cc_stdc=no | |
4735 | ac_save_CC="$CC" | |
4736 | # Don't try gcc -ansi; that turns off useful extensions and | |
4737 | # breaks some systems' header files. | |
4738 | # AIX -qlanglvl=ansi | |
4739 | # Ultrix and OSF/1 -std1 | |
4740 | # HP-UX 10.20 and later -Ae | |
4741 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4742 | # SVR4 -Xc -D__EXTENSIONS__ | |
4743 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4744 | do | |
783e057b | 4745 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4746 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4747 | /* end confdefs.h. */ |
4748 | #include <stdarg.h> | |
4749 | #include <stdio.h> | |
4750 | #include <sys/types.h> | |
4751 | #include <sys/stat.h> | |
4752 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4753 | struct buf { int x; }; | |
4754 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4755 | static char *e (p, i) | |
4756 | char **p; | |
4757 | int i; | |
4758 | { | |
4759 | return p[i]; | |
4760 | } | |
4761 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4762 | { | |
4763 | char *s; | |
4764 | va_list v; | |
4765 | va_start (v,p); | |
4766 | s = g (p, va_arg (v,int)); | |
4767 | va_end (v); | |
4768 | return s; | |
4769 | } | |
4770 | int test (int i, double x); | |
4771 | struct s1 {int (*f) (int a);}; | |
4772 | struct s2 {int (*f) (double a);}; | |
4773 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4774 | int argc; | |
4775 | char **argv; | |
4776 | ||
4777 | int | |
4778 | main () | |
4779 | { | |
4780 | ||
4781 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4782 | ||
4783 | ; | |
4784 | return 0; | |
4785 | } | |
4786 | _ACEOF | |
81ecdfbb | 4787 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4788 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4789 | fi |
81ecdfbb | 4790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4791 | done |
4792 | CC="$ac_save_CC" | |
4793 | ||
4794 | fi | |
4795 | ||
4796 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4798 | $as_echo "none needed" >&6; } | |
783e057b | 4799 | else |
81ecdfbb RW |
4800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4801 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4802 | fi |
4803 | case "x$am_cv_prog_cc_stdc" in | |
4804 | x|xno) ;; | |
4805 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4806 | esac | |
4807 | ||
4869db5e RM |
4808 | # expand $ac_aux_dir to an absolute path |
4809 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4810 | ||
4811 | if test x"${install_sh}" != xset; then | |
4812 | case $am_aux_dir in | |
4813 | *\ * | *\ *) | |
4814 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4815 | *) | |
4816 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4817 | esac | |
4818 | fi | |
4819 | ||
4820 | # Installed binaries are usually stripped using `strip' when the user | |
4821 | # run `make install-strip'. However `strip' might not be the right | |
4822 | # tool to use in cross-compilation environments, therefore Automake | |
4823 | # will honor the `STRIP' environment variable to overrule this program. | |
4824 | if test "$cross_compiling" != no; then | |
4825 | if test -n "$ac_tool_prefix"; then | |
4826 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4827 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4829 | $as_echo_n "checking for $ac_word... " >&6; } | |
4830 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
4831 | $as_echo_n "(cached) " >&6 | |
4832 | else | |
4833 | if test -n "$STRIP"; then | |
4834 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4835 | else | |
4836 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4837 | for as_dir in $PATH | |
4838 | do | |
4839 | IFS=$as_save_IFS | |
4840 | test -z "$as_dir" && as_dir=. | |
4841 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4842 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4843 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4844 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4845 | break 2 | |
4846 | fi | |
4847 | done | |
4848 | done | |
4849 | IFS=$as_save_IFS | |
4850 | ||
4851 | fi | |
4852 | fi | |
4853 | STRIP=$ac_cv_prog_STRIP | |
4854 | if test -n "$STRIP"; then | |
4855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4856 | $as_echo "$STRIP" >&6; } | |
4857 | else | |
4858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4859 | $as_echo "no" >&6; } | |
4860 | fi | |
4861 | ||
4862 | ||
4863 | fi | |
4864 | if test -z "$ac_cv_prog_STRIP"; then | |
4865 | ac_ct_STRIP=$STRIP | |
4866 | # Extract the first word of "strip", so it can be a program name with args. | |
4867 | set dummy strip; ac_word=$2 | |
4868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4869 | $as_echo_n "checking for $ac_word... " >&6; } | |
4870 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
4871 | $as_echo_n "(cached) " >&6 | |
4872 | else | |
4873 | if test -n "$ac_ct_STRIP"; then | |
4874 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4875 | else | |
4876 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4877 | for as_dir in $PATH | |
4878 | do | |
4879 | IFS=$as_save_IFS | |
4880 | test -z "$as_dir" && as_dir=. | |
4881 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4882 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4883 | ac_cv_prog_ac_ct_STRIP="strip" | |
4884 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4885 | break 2 | |
4886 | fi | |
4887 | done | |
4888 | done | |
4889 | IFS=$as_save_IFS | |
4890 | ||
4891 | fi | |
4892 | fi | |
4893 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4894 | if test -n "$ac_ct_STRIP"; then | |
4895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4896 | $as_echo "$ac_ct_STRIP" >&6; } | |
4897 | else | |
4898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4899 | $as_echo "no" >&6; } | |
4900 | fi | |
4901 | ||
4902 | if test "x$ac_ct_STRIP" = x; then | |
4903 | STRIP=":" | |
4904 | else | |
4905 | case $cross_compiling:$ac_tool_warned in | |
4906 | yes:) | |
4907 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4908 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4909 | ac_tool_warned=yes ;; | |
4910 | esac | |
4911 | STRIP=$ac_ct_STRIP | |
4912 | fi | |
4913 | else | |
4914 | STRIP="$ac_cv_prog_STRIP" | |
4915 | fi | |
4916 | ||
4917 | fi | |
4918 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4919 | ||
783e057b DJ |
4920 | |
4921 | ac_aux_dir= | |
81ecdfbb RW |
4922 | for ac_dir in .. "$srcdir"/..; do |
4923 | for ac_t in install-sh install.sh shtool; do | |
4924 | if test -f "$ac_dir/$ac_t"; then | |
4925 | ac_aux_dir=$ac_dir | |
4926 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4927 | break 2 | |
4928 | fi | |
4929 | done | |
783e057b DJ |
4930 | done |
4931 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4932 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4933 | fi |
81ecdfbb RW |
4934 | |
4935 | # These three variables are undocumented and unsupported, | |
4936 | # and are intended to be withdrawn in a future Autoconf release. | |
4937 | # They can cause serious problems if a builder's source tree is in a directory | |
4938 | # whose full name contains unusual characters. | |
4939 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4940 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4941 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4942 | ||
783e057b | 4943 | |
783e057b | 4944 | |
9009e1ae MR |
4945 | test "$program_prefix" != NONE && |
4946 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4947 | # Use a double $ so make ignores it. | |
4948 | test "$program_suffix" != NONE && | |
4949 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4950 | # Double any \ or $. | |
4951 | # By default was `s,x,x', remove it if useless. | |
4952 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4953 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4954 | ||
81ecdfbb | 4955 | |
0bcda685 PA |
4956 | # We require a C++11 compiler. Check if one is available, and if |
4957 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
4958 | ||
4959 | ax_cxx_compile_cxx11_required=true | |
4960 | ac_ext=cpp | |
4961 | ac_cpp='$CXXCPP $CPPFLAGS' | |
4962 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4963 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4964 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
4965 | CXX_DIALECT="" | |
4966 | ac_success=no | |
4967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
4968 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
4969 | if test "${ax_cv_cxx_compile_cxx11+set}" = set; then : | |
4970 | $as_echo_n "(cached) " >&6 | |
4971 | else | |
4972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4973 | /* end confdefs.h. */ | |
4974 | ||
4975 | ||
4976 | // If the compiler admits that it is not ready for C++11, why torture it? | |
4977 | // Hopefully, this will speed up the test. | |
4978 | ||
4979 | #ifndef __cplusplus | |
4980 | ||
4981 | #error "This is not a C++ compiler" | |
4982 | ||
4983 | #elif __cplusplus < 201103L | |
4984 | ||
4985 | #error "This is not a C++11 compiler" | |
4986 | ||
4987 | #else | |
4988 | ||
4989 | namespace cxx11 | |
4990 | { | |
4991 | ||
4992 | namespace test_static_assert | |
4993 | { | |
4994 | ||
4995 | template <typename T> | |
4996 | struct check | |
4997 | { | |
4998 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
4999 | }; | |
5000 | ||
5001 | } | |
5002 | ||
5003 | namespace test_final_override | |
5004 | { | |
5005 | ||
5006 | struct Base | |
5007 | { | |
5008 | virtual void f() {} | |
5009 | }; | |
5010 | ||
5011 | struct Derived : public Base | |
5012 | { | |
5013 | virtual void f() override {} | |
5014 | }; | |
5015 | ||
5016 | } | |
5017 | ||
5018 | namespace test_double_right_angle_brackets | |
5019 | { | |
5020 | ||
5021 | template < typename T > | |
5022 | struct check {}; | |
5023 | ||
5024 | typedef check<void> single_type; | |
5025 | typedef check<check<void>> double_type; | |
5026 | typedef check<check<check<void>>> triple_type; | |
5027 | typedef check<check<check<check<void>>>> quadruple_type; | |
5028 | ||
5029 | } | |
5030 | ||
5031 | namespace test_decltype | |
5032 | { | |
5033 | ||
5034 | int | |
5035 | f() | |
5036 | { | |
5037 | int a = 1; | |
5038 | decltype(a) b = 2; | |
5039 | return a + b; | |
5040 | } | |
5041 | ||
5042 | } | |
5043 | ||
5044 | namespace test_type_deduction | |
5045 | { | |
5046 | ||
5047 | template < typename T1, typename T2 > | |
5048 | struct is_same | |
5049 | { | |
5050 | static const bool value = false; | |
5051 | }; | |
5052 | ||
5053 | template < typename T > | |
5054 | struct is_same<T, T> | |
5055 | { | |
5056 | static const bool value = true; | |
5057 | }; | |
5058 | ||
5059 | template < typename T1, typename T2 > | |
5060 | auto | |
5061 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5062 | { | |
5063 | return a1 + a2; | |
5064 | } | |
5065 | ||
5066 | int | |
5067 | test(const int c, volatile int v) | |
5068 | { | |
5069 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5070 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5071 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5072 | auto ac = c; | |
5073 | auto av = v; | |
5074 | auto sumi = ac + av + 'x'; | |
5075 | auto sumf = ac + av + 1.0; | |
5076 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5077 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5078 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5079 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5080 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5081 | return (sumf > 0.0) ? sumi : add(c, v); | |
5082 | } | |
5083 | ||
5084 | } | |
5085 | ||
5086 | namespace test_noexcept | |
5087 | { | |
5088 | ||
5089 | int f() { return 0; } | |
5090 | int g() noexcept { return 0; } | |
5091 | ||
5092 | static_assert(noexcept(f()) == false, ""); | |
5093 | static_assert(noexcept(g()) == true, ""); | |
5094 | ||
5095 | } | |
5096 | ||
5097 | namespace test_constexpr | |
5098 | { | |
5099 | ||
5100 | template < typename CharT > | |
5101 | unsigned long constexpr | |
5102 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5103 | { | |
5104 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5105 | } | |
5106 | ||
5107 | template < typename CharT > | |
5108 | unsigned long constexpr | |
5109 | strlen_c(const CharT *const s) noexcept | |
5110 | { | |
5111 | return strlen_c_r(s, 0UL); | |
5112 | } | |
5113 | ||
5114 | static_assert(strlen_c("") == 0UL, ""); | |
5115 | static_assert(strlen_c("1") == 1UL, ""); | |
5116 | static_assert(strlen_c("example") == 7UL, ""); | |
5117 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5118 | ||
5119 | } | |
5120 | ||
5121 | namespace test_rvalue_references | |
5122 | { | |
5123 | ||
5124 | template < int N > | |
5125 | struct answer | |
5126 | { | |
5127 | static constexpr int value = N; | |
5128 | }; | |
5129 | ||
5130 | answer<1> f(int&) { return answer<1>(); } | |
5131 | answer<2> f(const int&) { return answer<2>(); } | |
5132 | answer<3> f(int&&) { return answer<3>(); } | |
5133 | ||
5134 | void | |
5135 | test() | |
5136 | { | |
5137 | int i = 0; | |
5138 | const int c = 0; | |
5139 | static_assert(decltype(f(i))::value == 1, ""); | |
5140 | static_assert(decltype(f(c))::value == 2, ""); | |
5141 | static_assert(decltype(f(0))::value == 3, ""); | |
5142 | } | |
5143 | ||
5144 | } | |
5145 | ||
5146 | namespace test_uniform_initialization | |
5147 | { | |
5148 | ||
5149 | struct test | |
5150 | { | |
5151 | static const int zero {}; | |
5152 | static const int one {1}; | |
5153 | }; | |
5154 | ||
5155 | static_assert(test::zero == 0, ""); | |
5156 | static_assert(test::one == 1, ""); | |
5157 | ||
5158 | } | |
5159 | ||
5160 | namespace test_lambdas | |
5161 | { | |
5162 | ||
5163 | void | |
5164 | test1() | |
5165 | { | |
5166 | auto lambda1 = [](){}; | |
5167 | auto lambda2 = lambda1; | |
5168 | lambda1(); | |
5169 | lambda2(); | |
5170 | } | |
5171 | ||
5172 | int | |
5173 | test2() | |
5174 | { | |
5175 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5176 | auto b = []() -> int { return '0'; }(); | |
5177 | auto c = [=](){ return a + b; }(); | |
5178 | auto d = [&](){ return c; }(); | |
5179 | auto e = [a, &b](int x) mutable { | |
5180 | const auto identity = [](int y){ return y; }; | |
5181 | for (auto i = 0; i < a; ++i) | |
5182 | a += b--; | |
5183 | return x + identity(a + b); | |
5184 | }(0); | |
5185 | return a + b + c + d + e; | |
5186 | } | |
5187 | ||
5188 | int | |
5189 | test3() | |
5190 | { | |
5191 | const auto nullary = [](){ return 0; }; | |
5192 | const auto unary = [](int x){ return x; }; | |
5193 | using nullary_t = decltype(nullary); | |
5194 | using unary_t = decltype(unary); | |
5195 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5196 | const auto higher2nd = [unary](nullary_t f1){ | |
5197 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5198 | }; | |
5199 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5200 | } | |
5201 | ||
5202 | } | |
5203 | ||
5204 | namespace test_variadic_templates | |
5205 | { | |
5206 | ||
5207 | template <int...> | |
5208 | struct sum; | |
5209 | ||
5210 | template <int N0, int... N1toN> | |
5211 | struct sum<N0, N1toN...> | |
5212 | { | |
5213 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5214 | }; | |
5215 | ||
5216 | template <> | |
5217 | struct sum<> | |
5218 | { | |
5219 | static constexpr auto value = 0; | |
5220 | }; | |
5221 | ||
5222 | static_assert(sum<>::value == 0, ""); | |
5223 | static_assert(sum<1>::value == 1, ""); | |
5224 | static_assert(sum<23>::value == 23, ""); | |
5225 | static_assert(sum<1, 2>::value == 3, ""); | |
5226 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5227 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5228 | ||
5229 | } | |
5230 | ||
5231 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5232 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5233 | // because of this. | |
5234 | namespace test_template_alias_sfinae | |
5235 | { | |
5236 | ||
5237 | struct foo {}; | |
5238 | ||
5239 | template<typename T> | |
5240 | using member = typename T::member_type; | |
5241 | ||
5242 | template<typename T> | |
5243 | void func(...) {} | |
5244 | ||
5245 | template<typename T> | |
5246 | void func(member<T>*) {} | |
5247 | ||
5248 | void test(); | |
5249 | ||
5250 | void test() { func<foo>(0); } | |
5251 | ||
5252 | } | |
5253 | ||
5254 | } // namespace cxx11 | |
5255 | ||
5256 | #endif // __cplusplus >= 201103L | |
5257 | ||
5258 | ||
5259 | ||
5260 | _ACEOF | |
5261 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5262 | ax_cv_cxx_compile_cxx11=yes | |
5263 | else | |
5264 | ax_cv_cxx_compile_cxx11=no | |
5265 | fi | |
5266 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5267 | fi | |
5268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5269 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5270 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5271 | ac_success=yes | |
5272 | fi | |
5273 | ||
5274 | if test x$ac_success = xno; then | |
5275 | for switch in -std=gnu++11 -std=gnu++0x; do | |
5276 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5278 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
5279 | if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5280 | $as_echo_n "(cached) " >&6 | |
5281 | else | |
5282 | ac_save_CXX="$CXX" | |
5283 | CXX="$CXX $switch" | |
5284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5285 | /* end confdefs.h. */ | |
5286 | ||
5287 | ||
5288 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5289 | // Hopefully, this will speed up the test. | |
5290 | ||
5291 | #ifndef __cplusplus | |
5292 | ||
5293 | #error "This is not a C++ compiler" | |
5294 | ||
5295 | #elif __cplusplus < 201103L | |
5296 | ||
5297 | #error "This is not a C++11 compiler" | |
5298 | ||
5299 | #else | |
5300 | ||
5301 | namespace cxx11 | |
5302 | { | |
5303 | ||
5304 | namespace test_static_assert | |
5305 | { | |
5306 | ||
5307 | template <typename T> | |
5308 | struct check | |
5309 | { | |
5310 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5311 | }; | |
5312 | ||
5313 | } | |
5314 | ||
5315 | namespace test_final_override | |
5316 | { | |
5317 | ||
5318 | struct Base | |
5319 | { | |
5320 | virtual void f() {} | |
5321 | }; | |
5322 | ||
5323 | struct Derived : public Base | |
5324 | { | |
5325 | virtual void f() override {} | |
5326 | }; | |
5327 | ||
5328 | } | |
5329 | ||
5330 | namespace test_double_right_angle_brackets | |
5331 | { | |
5332 | ||
5333 | template < typename T > | |
5334 | struct check {}; | |
5335 | ||
5336 | typedef check<void> single_type; | |
5337 | typedef check<check<void>> double_type; | |
5338 | typedef check<check<check<void>>> triple_type; | |
5339 | typedef check<check<check<check<void>>>> quadruple_type; | |
5340 | ||
5341 | } | |
5342 | ||
5343 | namespace test_decltype | |
5344 | { | |
5345 | ||
5346 | int | |
5347 | f() | |
5348 | { | |
5349 | int a = 1; | |
5350 | decltype(a) b = 2; | |
5351 | return a + b; | |
5352 | } | |
5353 | ||
5354 | } | |
5355 | ||
5356 | namespace test_type_deduction | |
5357 | { | |
5358 | ||
5359 | template < typename T1, typename T2 > | |
5360 | struct is_same | |
5361 | { | |
5362 | static const bool value = false; | |
5363 | }; | |
5364 | ||
5365 | template < typename T > | |
5366 | struct is_same<T, T> | |
5367 | { | |
5368 | static const bool value = true; | |
5369 | }; | |
5370 | ||
5371 | template < typename T1, typename T2 > | |
5372 | auto | |
5373 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5374 | { | |
5375 | return a1 + a2; | |
5376 | } | |
5377 | ||
5378 | int | |
5379 | test(const int c, volatile int v) | |
5380 | { | |
5381 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5382 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5383 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5384 | auto ac = c; | |
5385 | auto av = v; | |
5386 | auto sumi = ac + av + 'x'; | |
5387 | auto sumf = ac + av + 1.0; | |
5388 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5389 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5390 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5391 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5392 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5393 | return (sumf > 0.0) ? sumi : add(c, v); | |
5394 | } | |
5395 | ||
5396 | } | |
5397 | ||
5398 | namespace test_noexcept | |
5399 | { | |
5400 | ||
5401 | int f() { return 0; } | |
5402 | int g() noexcept { return 0; } | |
5403 | ||
5404 | static_assert(noexcept(f()) == false, ""); | |
5405 | static_assert(noexcept(g()) == true, ""); | |
5406 | ||
5407 | } | |
5408 | ||
5409 | namespace test_constexpr | |
5410 | { | |
5411 | ||
5412 | template < typename CharT > | |
5413 | unsigned long constexpr | |
5414 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5415 | { | |
5416 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5417 | } | |
5418 | ||
5419 | template < typename CharT > | |
5420 | unsigned long constexpr | |
5421 | strlen_c(const CharT *const s) noexcept | |
5422 | { | |
5423 | return strlen_c_r(s, 0UL); | |
5424 | } | |
5425 | ||
5426 | static_assert(strlen_c("") == 0UL, ""); | |
5427 | static_assert(strlen_c("1") == 1UL, ""); | |
5428 | static_assert(strlen_c("example") == 7UL, ""); | |
5429 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5430 | ||
5431 | } | |
5432 | ||
5433 | namespace test_rvalue_references | |
5434 | { | |
5435 | ||
5436 | template < int N > | |
5437 | struct answer | |
5438 | { | |
5439 | static constexpr int value = N; | |
5440 | }; | |
5441 | ||
5442 | answer<1> f(int&) { return answer<1>(); } | |
5443 | answer<2> f(const int&) { return answer<2>(); } | |
5444 | answer<3> f(int&&) { return answer<3>(); } | |
5445 | ||
5446 | void | |
5447 | test() | |
5448 | { | |
5449 | int i = 0; | |
5450 | const int c = 0; | |
5451 | static_assert(decltype(f(i))::value == 1, ""); | |
5452 | static_assert(decltype(f(c))::value == 2, ""); | |
5453 | static_assert(decltype(f(0))::value == 3, ""); | |
5454 | } | |
5455 | ||
5456 | } | |
5457 | ||
5458 | namespace test_uniform_initialization | |
5459 | { | |
5460 | ||
5461 | struct test | |
5462 | { | |
5463 | static const int zero {}; | |
5464 | static const int one {1}; | |
5465 | }; | |
5466 | ||
5467 | static_assert(test::zero == 0, ""); | |
5468 | static_assert(test::one == 1, ""); | |
5469 | ||
5470 | } | |
5471 | ||
5472 | namespace test_lambdas | |
5473 | { | |
5474 | ||
5475 | void | |
5476 | test1() | |
5477 | { | |
5478 | auto lambda1 = [](){}; | |
5479 | auto lambda2 = lambda1; | |
5480 | lambda1(); | |
5481 | lambda2(); | |
5482 | } | |
5483 | ||
5484 | int | |
5485 | test2() | |
5486 | { | |
5487 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5488 | auto b = []() -> int { return '0'; }(); | |
5489 | auto c = [=](){ return a + b; }(); | |
5490 | auto d = [&](){ return c; }(); | |
5491 | auto e = [a, &b](int x) mutable { | |
5492 | const auto identity = [](int y){ return y; }; | |
5493 | for (auto i = 0; i < a; ++i) | |
5494 | a += b--; | |
5495 | return x + identity(a + b); | |
5496 | }(0); | |
5497 | return a + b + c + d + e; | |
5498 | } | |
5499 | ||
5500 | int | |
5501 | test3() | |
5502 | { | |
5503 | const auto nullary = [](){ return 0; }; | |
5504 | const auto unary = [](int x){ return x; }; | |
5505 | using nullary_t = decltype(nullary); | |
5506 | using unary_t = decltype(unary); | |
5507 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5508 | const auto higher2nd = [unary](nullary_t f1){ | |
5509 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5510 | }; | |
5511 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5512 | } | |
5513 | ||
5514 | } | |
5515 | ||
5516 | namespace test_variadic_templates | |
5517 | { | |
5518 | ||
5519 | template <int...> | |
5520 | struct sum; | |
5521 | ||
5522 | template <int N0, int... N1toN> | |
5523 | struct sum<N0, N1toN...> | |
5524 | { | |
5525 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5526 | }; | |
5527 | ||
5528 | template <> | |
5529 | struct sum<> | |
5530 | { | |
5531 | static constexpr auto value = 0; | |
5532 | }; | |
5533 | ||
5534 | static_assert(sum<>::value == 0, ""); | |
5535 | static_assert(sum<1>::value == 1, ""); | |
5536 | static_assert(sum<23>::value == 23, ""); | |
5537 | static_assert(sum<1, 2>::value == 3, ""); | |
5538 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5539 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5540 | ||
5541 | } | |
5542 | ||
5543 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5544 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5545 | // because of this. | |
5546 | namespace test_template_alias_sfinae | |
5547 | { | |
5548 | ||
5549 | struct foo {}; | |
5550 | ||
5551 | template<typename T> | |
5552 | using member = typename T::member_type; | |
5553 | ||
5554 | template<typename T> | |
5555 | void func(...) {} | |
5556 | ||
5557 | template<typename T> | |
5558 | void func(member<T>*) {} | |
5559 | ||
5560 | void test(); | |
5561 | ||
5562 | void test() { func<foo>(0); } | |
5563 | ||
5564 | } | |
5565 | ||
5566 | } // namespace cxx11 | |
5567 | ||
5568 | #endif // __cplusplus >= 201103L | |
5569 | ||
5570 | ||
5571 | ||
5572 | _ACEOF | |
5573 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5574 | eval $cachevar=yes | |
5575 | else | |
5576 | eval $cachevar=no | |
5577 | fi | |
5578 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5579 | CXX="$ac_save_CXX" | |
5580 | fi | |
5581 | eval ac_res=\$$cachevar | |
5582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5583 | $as_echo "$ac_res" >&6; } | |
5584 | if eval test x\$$cachevar = xyes; then | |
5585 | CXX_DIALECT="$switch" | |
5586 | ac_success=yes | |
5587 | break | |
5588 | fi | |
5589 | done | |
5590 | fi | |
5591 | ||
5592 | if test x$ac_success = xno; then | |
5593 | for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do | |
5594 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5596 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
5597 | if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5598 | $as_echo_n "(cached) " >&6 | |
5599 | else | |
5600 | ac_save_CXX="$CXX" | |
5601 | CXX="$CXX $switch" | |
5602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5603 | /* end confdefs.h. */ | |
5604 | ||
5605 | ||
5606 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5607 | // Hopefully, this will speed up the test. | |
5608 | ||
5609 | #ifndef __cplusplus | |
5610 | ||
5611 | #error "This is not a C++ compiler" | |
5612 | ||
5613 | #elif __cplusplus < 201103L | |
5614 | ||
5615 | #error "This is not a C++11 compiler" | |
5616 | ||
5617 | #else | |
5618 | ||
5619 | namespace cxx11 | |
5620 | { | |
5621 | ||
5622 | namespace test_static_assert | |
5623 | { | |
5624 | ||
5625 | template <typename T> | |
5626 | struct check | |
5627 | { | |
5628 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5629 | }; | |
5630 | ||
5631 | } | |
5632 | ||
5633 | namespace test_final_override | |
5634 | { | |
5635 | ||
5636 | struct Base | |
5637 | { | |
5638 | virtual void f() {} | |
5639 | }; | |
5640 | ||
5641 | struct Derived : public Base | |
5642 | { | |
5643 | virtual void f() override {} | |
5644 | }; | |
5645 | ||
5646 | } | |
5647 | ||
5648 | namespace test_double_right_angle_brackets | |
5649 | { | |
5650 | ||
5651 | template < typename T > | |
5652 | struct check {}; | |
5653 | ||
5654 | typedef check<void> single_type; | |
5655 | typedef check<check<void>> double_type; | |
5656 | typedef check<check<check<void>>> triple_type; | |
5657 | typedef check<check<check<check<void>>>> quadruple_type; | |
5658 | ||
5659 | } | |
5660 | ||
5661 | namespace test_decltype | |
5662 | { | |
5663 | ||
5664 | int | |
5665 | f() | |
5666 | { | |
5667 | int a = 1; | |
5668 | decltype(a) b = 2; | |
5669 | return a + b; | |
5670 | } | |
5671 | ||
5672 | } | |
5673 | ||
5674 | namespace test_type_deduction | |
5675 | { | |
5676 | ||
5677 | template < typename T1, typename T2 > | |
5678 | struct is_same | |
5679 | { | |
5680 | static const bool value = false; | |
5681 | }; | |
5682 | ||
5683 | template < typename T > | |
5684 | struct is_same<T, T> | |
5685 | { | |
5686 | static const bool value = true; | |
5687 | }; | |
5688 | ||
5689 | template < typename T1, typename T2 > | |
5690 | auto | |
5691 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5692 | { | |
5693 | return a1 + a2; | |
5694 | } | |
5695 | ||
5696 | int | |
5697 | test(const int c, volatile int v) | |
5698 | { | |
5699 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5700 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5701 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5702 | auto ac = c; | |
5703 | auto av = v; | |
5704 | auto sumi = ac + av + 'x'; | |
5705 | auto sumf = ac + av + 1.0; | |
5706 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5707 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5708 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5709 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5710 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5711 | return (sumf > 0.0) ? sumi : add(c, v); | |
5712 | } | |
5713 | ||
5714 | } | |
5715 | ||
5716 | namespace test_noexcept | |
5717 | { | |
5718 | ||
5719 | int f() { return 0; } | |
5720 | int g() noexcept { return 0; } | |
5721 | ||
5722 | static_assert(noexcept(f()) == false, ""); | |
5723 | static_assert(noexcept(g()) == true, ""); | |
5724 | ||
5725 | } | |
5726 | ||
5727 | namespace test_constexpr | |
5728 | { | |
5729 | ||
5730 | template < typename CharT > | |
5731 | unsigned long constexpr | |
5732 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5733 | { | |
5734 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5735 | } | |
5736 | ||
5737 | template < typename CharT > | |
5738 | unsigned long constexpr | |
5739 | strlen_c(const CharT *const s) noexcept | |
5740 | { | |
5741 | return strlen_c_r(s, 0UL); | |
5742 | } | |
5743 | ||
5744 | static_assert(strlen_c("") == 0UL, ""); | |
5745 | static_assert(strlen_c("1") == 1UL, ""); | |
5746 | static_assert(strlen_c("example") == 7UL, ""); | |
5747 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5748 | ||
5749 | } | |
5750 | ||
5751 | namespace test_rvalue_references | |
5752 | { | |
5753 | ||
5754 | template < int N > | |
5755 | struct answer | |
5756 | { | |
5757 | static constexpr int value = N; | |
5758 | }; | |
5759 | ||
5760 | answer<1> f(int&) { return answer<1>(); } | |
5761 | answer<2> f(const int&) { return answer<2>(); } | |
5762 | answer<3> f(int&&) { return answer<3>(); } | |
5763 | ||
5764 | void | |
5765 | test() | |
5766 | { | |
5767 | int i = 0; | |
5768 | const int c = 0; | |
5769 | static_assert(decltype(f(i))::value == 1, ""); | |
5770 | static_assert(decltype(f(c))::value == 2, ""); | |
5771 | static_assert(decltype(f(0))::value == 3, ""); | |
5772 | } | |
5773 | ||
5774 | } | |
5775 | ||
5776 | namespace test_uniform_initialization | |
5777 | { | |
5778 | ||
5779 | struct test | |
5780 | { | |
5781 | static const int zero {}; | |
5782 | static const int one {1}; | |
5783 | }; | |
5784 | ||
5785 | static_assert(test::zero == 0, ""); | |
5786 | static_assert(test::one == 1, ""); | |
5787 | ||
5788 | } | |
5789 | ||
5790 | namespace test_lambdas | |
5791 | { | |
5792 | ||
5793 | void | |
5794 | test1() | |
5795 | { | |
5796 | auto lambda1 = [](){}; | |
5797 | auto lambda2 = lambda1; | |
5798 | lambda1(); | |
5799 | lambda2(); | |
5800 | } | |
5801 | ||
5802 | int | |
5803 | test2() | |
5804 | { | |
5805 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5806 | auto b = []() -> int { return '0'; }(); | |
5807 | auto c = [=](){ return a + b; }(); | |
5808 | auto d = [&](){ return c; }(); | |
5809 | auto e = [a, &b](int x) mutable { | |
5810 | const auto identity = [](int y){ return y; }; | |
5811 | for (auto i = 0; i < a; ++i) | |
5812 | a += b--; | |
5813 | return x + identity(a + b); | |
5814 | }(0); | |
5815 | return a + b + c + d + e; | |
5816 | } | |
5817 | ||
5818 | int | |
5819 | test3() | |
5820 | { | |
5821 | const auto nullary = [](){ return 0; }; | |
5822 | const auto unary = [](int x){ return x; }; | |
5823 | using nullary_t = decltype(nullary); | |
5824 | using unary_t = decltype(unary); | |
5825 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5826 | const auto higher2nd = [unary](nullary_t f1){ | |
5827 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5828 | }; | |
5829 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5830 | } | |
5831 | ||
5832 | } | |
5833 | ||
5834 | namespace test_variadic_templates | |
5835 | { | |
5836 | ||
5837 | template <int...> | |
5838 | struct sum; | |
5839 | ||
5840 | template <int N0, int... N1toN> | |
5841 | struct sum<N0, N1toN...> | |
5842 | { | |
5843 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5844 | }; | |
5845 | ||
5846 | template <> | |
5847 | struct sum<> | |
5848 | { | |
5849 | static constexpr auto value = 0; | |
5850 | }; | |
5851 | ||
5852 | static_assert(sum<>::value == 0, ""); | |
5853 | static_assert(sum<1>::value == 1, ""); | |
5854 | static_assert(sum<23>::value == 23, ""); | |
5855 | static_assert(sum<1, 2>::value == 3, ""); | |
5856 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5857 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5858 | ||
5859 | } | |
5860 | ||
5861 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5862 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5863 | // because of this. | |
5864 | namespace test_template_alias_sfinae | |
5865 | { | |
5866 | ||
5867 | struct foo {}; | |
5868 | ||
5869 | template<typename T> | |
5870 | using member = typename T::member_type; | |
5871 | ||
5872 | template<typename T> | |
5873 | void func(...) {} | |
5874 | ||
5875 | template<typename T> | |
5876 | void func(member<T>*) {} | |
5877 | ||
5878 | void test(); | |
5879 | ||
5880 | void test() { func<foo>(0); } | |
5881 | ||
5882 | } | |
5883 | ||
5884 | } // namespace cxx11 | |
5885 | ||
5886 | #endif // __cplusplus >= 201103L | |
5887 | ||
5888 | ||
5889 | ||
5890 | _ACEOF | |
5891 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5892 | eval $cachevar=yes | |
5893 | else | |
5894 | eval $cachevar=no | |
5895 | fi | |
5896 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5897 | CXX="$ac_save_CXX" | |
5898 | fi | |
5899 | eval ac_res=\$$cachevar | |
5900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5901 | $as_echo "$ac_res" >&6; } | |
5902 | if eval test x\$$cachevar = xyes; then | |
5903 | CXX_DIALECT="$switch" | |
5904 | ac_success=yes | |
5905 | break | |
5906 | fi | |
5907 | done | |
5908 | fi | |
5909 | ac_ext=c | |
5910 | ac_cpp='$CPP $CPPFLAGS' | |
5911 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5912 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5913 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5914 | ||
5915 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
5916 | if test x$ac_success = xno; then | |
5917 | as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5 | |
5918 | fi | |
5919 | fi | |
5920 | if test x$ac_success = xno; then | |
5921 | HAVE_CXX11=0 | |
5922 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
5923 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
5924 | else | |
5925 | HAVE_CXX11=1 | |
5926 | ||
5927 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
5928 | ||
5929 | fi | |
5930 | ||
5931 | ||
5932 | ||
5933 | ||
a417dc56 RW |
5934 | # Dependency checking. |
5935 | rm -rf .tst 2>/dev/null | |
5936 | mkdir .tst 2>/dev/null | |
5937 | if test -d .tst; then | |
5938 | am__leading_dot=. | |
5939 | else | |
5940 | am__leading_dot=_ | |
5941 | fi | |
5942 | rmdir .tst 2>/dev/null | |
5943 | ||
5944 | DEPDIR="${am__leading_dot}deps" | |
5945 | ||
81ecdfbb | 5946 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
5947 | |
5948 | ||
5949 | depcc="$CC" am_compiler_list= | |
5950 | ||
5951 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
5952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
5953 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
5954 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
5955 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
5956 | else |
5957 | if test -f "$am_depcomp"; then | |
5958 | # We make a subdir and do the tests there. Otherwise we can end up | |
5959 | # making bogus files that we don't know about and never remove. For | |
5960 | # instance it was reported that on HP-UX the gcc test will end up | |
5961 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5962 | # in D'. | |
5963 | mkdir conftest.dir | |
5964 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5965 | # using a relative directory. | |
5966 | cp "$am_depcomp" conftest.dir | |
5967 | cd conftest.dir | |
5968 | # We will build objects and dependencies in a subdirectory because | |
5969 | # it helps to detect inapplicable dependency modes. For instance | |
5970 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5971 | # side effect of compilation, but ICC will put the dependencies in | |
5972 | # the current directory while Tru64 will put them in the object | |
5973 | # directory. | |
5974 | mkdir sub | |
5975 | ||
5976 | am_cv_CC_dependencies_compiler_type=none | |
5977 | if test "$am_compiler_list" = ""; then | |
5978 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5979 | fi | |
5980 | for depmode in $am_compiler_list; do | |
5981 | if test $depmode = none; then break; fi | |
5982 | ||
81ecdfbb | 5983 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
5984 | # Setup a source with many dependencies, because some compilers |
5985 | # like to wrap large dependency lists on column 80 (with \), and | |
5986 | # we should not choose a depcomp mode which is confused by this. | |
5987 | # | |
5988 | # We need to recreate these files for each test, as the compiler may | |
5989 | # overwrite some of them when testing with obscure command lines. | |
5990 | # This happens at least with the AIX C compiler. | |
5991 | : > sub/conftest.c | |
5992 | for i in 1 2 3 4 5 6; do | |
5993 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5994 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5995 | # Solaris 8's {/usr,}/bin/sh. | |
5996 | touch sub/conftst$i.h | |
5997 | done | |
5998 | echo "include sub/conftest.Po" > confmf | |
5999 | ||
6000 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6001 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6002 | # handle `-M -o', and we need to detect this. | |
6003 | depcmd="depmode=$depmode \ | |
6004 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6005 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6006 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6007 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6008 | if env $depcmd > conftest.err 2>&1 && | |
6009 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6010 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6011 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6012 | # icc doesn't choke on unknown options, it will just issue warnings | |
6013 | # or remarks (even with -Werror). So we grep stderr for any message | |
6014 | # that says an option was ignored or not supported. | |
6015 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6016 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6017 | # The diagnosis changed in icc 8.0: | |
6018 | # icc: Command line remark: option '-MP' not supported | |
6019 | if (grep 'ignoring option' conftest.err || | |
6020 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6021 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6022 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6023 | break |
6024 | fi | |
6025 | fi | |
81ecdfbb | 6026 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6027 | sed -e 's/^/| /' < conftest.err >&5 |
6028 | done | |
6029 | ||
6030 | cd .. | |
6031 | rm -rf conftest.dir | |
6032 | else | |
6033 | am_cv_CC_dependencies_compiler_type=none | |
6034 | fi | |
6035 | ||
6036 | fi | |
81ecdfbb RW |
6037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6038 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6039 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 6040 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6041 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6042 | ||
6043 | fi | |
6044 | ||
6045 | ||
6046 | # Check for the 'make' the user wants to use. | |
6047 | for ac_prog in make | |
6048 | do | |
6049 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6050 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
6051 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6052 | $as_echo_n "checking for $ac_word... " >&6; } | |
6053 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
6054 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
6055 | else |
6056 | if test -n "$MAKE"; then | |
6057 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
6058 | else | |
6059 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6060 | for as_dir in $PATH | |
6061 | do | |
6062 | IFS=$as_save_IFS | |
6063 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6064 | for ac_exec_ext in '' $ac_executable_extensions; do |
6065 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 6066 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 6067 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
6068 | break 2 |
6069 | fi | |
6070 | done | |
81ecdfbb RW |
6071 | done |
6072 | IFS=$as_save_IFS | |
a417dc56 RW |
6073 | |
6074 | fi | |
6075 | fi | |
6076 | MAKE=$ac_cv_prog_MAKE | |
6077 | if test -n "$MAKE"; then | |
81ecdfbb RW |
6078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
6079 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 6080 | else |
81ecdfbb RW |
6081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6082 | $as_echo "no" >&6; } | |
a417dc56 RW |
6083 | fi |
6084 | ||
81ecdfbb | 6085 | |
a417dc56 RW |
6086 | test -n "$MAKE" && break |
6087 | done | |
6088 | ||
6089 | MAKE_IS_GNU= | |
6090 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
6091 | *GNU*) | |
6092 | MAKE_IS_GNU=yes | |
6093 | ;; | |
6094 | esac | |
81ecdfbb | 6095 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
6096 | GMAKE_TRUE= |
6097 | GMAKE_FALSE='#' | |
6098 | else | |
6099 | GMAKE_TRUE='#' | |
6100 | GMAKE_FALSE= | |
6101 | fi | |
6102 | ||
81ecdfbb RW |
6103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
6104 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
6105 | set x ${MAKE-make} | |
6106 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
6107 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6108 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
6109 | else |
6110 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 6111 | SHELL = /bin/sh |
a417dc56 | 6112 | all: |
81ecdfbb | 6113 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
6114 | _ACEOF |
6115 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
6116 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
6117 | *@@@%%%=?*=@@@%%%*) | |
6118 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
6119 | *) | |
6120 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
6121 | esac | |
a417dc56 RW |
6122 | rm -f conftest.make |
6123 | fi | |
81ecdfbb RW |
6124 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
6125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6126 | $as_echo "yes" >&6; } | |
a417dc56 RW |
6127 | SET_MAKE= |
6128 | else | |
81ecdfbb RW |
6129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6130 | $as_echo "no" >&6; } | |
a417dc56 RW |
6131 | SET_MAKE="MAKE=${MAKE-make}" |
6132 | fi | |
6133 | ||
6134 | ||
648d586d JB |
6135 | gnulib_extra_configure_args= |
6136 | # If large-file support is disabled, make sure gnulib does the same. | |
6137 | if test "$enable_largefile" = no; then | |
6138 | gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" | |
6139 | fi | |
6140 | ||
c971b7fa PA |
6141 | # Configure gnulib. We need to build gnulib under some other |
6142 | # directory not "gnulib", to avoid the problem of both GDB and | |
6143 | # GDBserver wanting to build it in the same directory, when building | |
6144 | # in the source dir. | |
783e057b | 6145 | |
c971b7fa PA |
6146 | in_src="gnulib" |
6147 | in_build="build-gnulib" | |
648d586d | 6148 | in_extra_args="$gnulib_extra_configure_args" |
c971b7fa PA |
6149 | |
6150 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
6151 | # so they do not pile up. | |
6152 | ac_sub_configure_args= | |
6153 | ac_prev= | |
6154 | eval "set x $ac_configure_args" | |
6155 | shift | |
6156 | for ac_arg | |
6157 | do | |
6158 | if test -n "$ac_prev"; then | |
6159 | ac_prev= | |
6160 | continue | |
6161 | fi | |
6162 | case $ac_arg in | |
6163 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6164 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6165 | ac_prev=cache_file ;; | |
6166 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6167 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
6168 | | --c=*) | |
6169 | ;; | |
6170 | --config-cache | -C) | |
6171 | ;; | |
6172 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6173 | ac_prev=srcdir ;; | |
6174 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6175 | ;; | |
6176 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
6177 | ac_prev=prefix ;; | |
6178 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
6179 | ;; | |
6180 | --disable-option-checking) | |
6181 | ;; | |
6182 | *) | |
6183 | case $ac_arg in | |
6184 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6185 | esac | |
6186 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
6187 | esac | |
6188 | done | |
6189 | ||
6190 | # Always prepend --prefix to ensure using the same prefix | |
6191 | # in subdir configurations. | |
6192 | ac_arg="--prefix=$prefix" | |
6193 | case $ac_arg in | |
6194 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6195 | esac | |
6196 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
6197 | ||
6198 | # Pass --silent | |
6199 | if test "$silent" = yes; then | |
6200 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
6201 | fi | |
6202 | ||
6203 | # Always prepend --disable-option-checking to silence warnings, since | |
6204 | # different subdirs can have different --enable and --with options. | |
6205 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
6206 | ||
6207 | ac_popdir=`pwd` | |
6208 | ac_dir=$in_build | |
6209 | ||
6210 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
6211 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
6212 | $as_echo "$ac_msg" >&6 | |
6213 | as_dir="$ac_dir"; as_fn_mkdir_p | |
6214 | ||
38ea300a PA |
6215 | case $srcdir in |
6216 | [\\/]* | ?:[\\/]* ) | |
6217 | ac_srcdir=$srcdir/$in_src ;; | |
6218 | *) # Relative name. | |
6219 | ac_srcdir=../$srcdir/$in_src ;; | |
6220 | esac | |
c971b7fa PA |
6221 | |
6222 | cd "$ac_dir" | |
6223 | ||
6224 | ac_sub_configure=$ac_srcdir/configure | |
6225 | ||
6226 | # Make the cache file name correct relative to the subdirectory. | |
6227 | case $cache_file in | |
6228 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
6229 | *) # Relative name. | |
6230 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
6231 | esac | |
6232 | ||
648d586d JB |
6233 | if test -n "$in_extra_args"; then |
6234 | # Add the extra args at the end. | |
6235 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
6236 | fi | |
6237 | ||
c971b7fa PA |
6238 | { $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 |
6239 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
6240 | # The eval makes quoting arguments work. | |
6241 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
6242 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
6243 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
6244 | ||
6245 | cd "$ac_popdir" | |
783e057b | 6246 | |
c971b7fa PA |
6247 | |
6248 | ||
6249 | CONFIG_OBS= | |
6250 | CONFIG_DEPS= | |
6251 | CONFIG_SRCS= | |
6252 | ENABLE_CFLAGS= | |
6253 | ||
6254 | CONFIG_ALL= | |
6255 | CONFIG_CLEAN= | |
6256 | CONFIG_INSTALL= | |
6257 | CONFIG_UNINSTALL= | |
6258 | ||
6259 | # If we haven't got the data from the intl directory, | |
6260 | # assume NLS is disabled. | |
6261 | USE_NLS=no | |
6262 | LIBINTL= | |
6263 | LIBINTL_DEP= | |
6264 | INCINTL= | |
6265 | XGETTEXT= | |
6266 | GMSGFMT= | |
6267 | POSUB= | |
783e057b DJ |
6268 | |
6269 | if test -f ../intl/config.intl; then | |
6270 | . ../intl/config.intl | |
6271 | fi | |
81ecdfbb RW |
6272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6273 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6274 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6276 | $as_echo "no" >&6; } | |
783e057b | 6277 | else |
81ecdfbb RW |
6278 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6279 | $as_echo "yes" >&6; } | |
783e057b | 6280 | |
81ecdfbb | 6281 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6282 | |
6283 | ||
81ecdfbb RW |
6284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6285 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6286 | # Look for .po and .gmo files in the source directory. |
6287 | CATALOGS= | |
6288 | XLINGUAS= | |
6289 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6290 | # If there aren't any .gmo files the shell will give us the | |
6291 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6292 | # weeded out. | |
6293 | case "$cat" in *\**) | |
6294 | continue;; | |
6295 | esac | |
6296 | # The quadruple backslash is collapsed to a double backslash | |
6297 | # by the backticks, then collapsed again by the double quotes, | |
6298 | # leaving us with one backslash in the sed expression (right | |
6299 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6300 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6301 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6302 | # The user is allowed to set LINGUAS to a list of languages to | |
6303 | # install catalogs for. If it's empty that means "all of them." | |
6304 | if test "x$LINGUAS" = x; then | |
6305 | CATALOGS="$CATALOGS $cat" | |
6306 | XLINGUAS="$XLINGUAS $lang" | |
6307 | else | |
6308 | case "$LINGUAS" in *$lang*) | |
6309 | CATALOGS="$CATALOGS $cat" | |
6310 | XLINGUAS="$XLINGUAS $lang" | |
6311 | ;; | |
6312 | esac | |
e28b3332 DJ |
6313 | fi |
6314 | done | |
c971b7fa PA |
6315 | LINGUAS="$XLINGUAS" |
6316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6317 | $as_echo "$LINGUAS" >&6; } | |
6318 | ||
6319 | ||
6320 | DATADIRNAME=share | |
6321 | ||
6322 | INSTOBJEXT=.mo | |
6323 | ||
6324 | GENCAT=gencat | |
6325 | ||
6326 | CATOBJEXT=.gmo | |
e28b3332 | 6327 | |
e28b3332 DJ |
6328 | fi |
6329 | ||
c971b7fa PA |
6330 | localedir='${datadir}/locale' |
6331 | ||
6332 | ||
6333 | if test x"$USE_NLS" = xyes; then | |
6334 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6335 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6336 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6337 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6338 | fi |
e28b3332 | 6339 | |
c971b7fa PA |
6340 | GNULIB=build-gnulib/import |
6341 | ||
6342 | # For Makefile dependencies. | |
6343 | GNULIB_STDINT_H= | |
6344 | if test x"$STDINT_H" != x; then | |
6345 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
6346 | fi |
6347 | ||
6348 | ||
c971b7fa PA |
6349 | PACKAGE=gdb |
6350 | ||
6351 | cat >>confdefs.h <<_ACEOF | |
6352 | #define PACKAGE "$PACKAGE" | |
6353 | _ACEOF | |
6354 | ||
6355 | ||
6356 | ||
6357 | # We never need to detect it in this sub-configure. | |
6358 | # But preserve it for config.status --recheck. | |
6359 | ||
6360 | ||
6361 | ||
6362 | MAKEINFO_EXTRA_FLAGS="" | |
6363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6364 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
6365 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
6366 | $as_echo_n "(cached) " >&6 | |
6367 | else | |
6368 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6369 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6370 | gdb_cv_have_makeinfo_click=yes | |
6371 | else | |
6372 | gdb_cv_have_makeinfo_click=no | |
6373 | fi | |
6374 | fi | |
6375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6376 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6377 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6378 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6379 | fi | |
e28b3332 DJ |
6380 | |
6381 | ||
bec39cab AC |
6382 | |
6383 | ||
81ecdfbb RW |
6384 | # Check whether --with-separate-debug-dir was given. |
6385 | if test "${with_separate_debug_dir+set}" = set; then : | |
6386 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6387 | DEBUGDIR=$withval |
6388 | else | |
6389 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6390 | fi |
6391 | ||
20e95c23 | 6392 | |
783e057b DJ |
6393 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6394 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6395 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6396 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6397 | |
783e057b DJ |
6398 | cat >>confdefs.h <<_ACEOF |
6399 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6400 | _ACEOF |
20e95c23 | 6401 | |
20e95c23 | 6402 | |
20e95c23 | 6403 | |
0c4a4063 | 6404 | |
b14b1491 TT |
6405 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6406 | if test "x$prefix" = xNONE; then | |
6407 | test_prefix=/usr/local | |
6408 | else | |
6409 | test_prefix=$prefix | |
6410 | fi | |
783e057b | 6411 | else |
b14b1491 | 6412 | test_prefix=$exec_prefix |
783e057b | 6413 | fi |
b14b1491 TT |
6414 | value=0 |
6415 | case ${ac_define_dir} in | |
6416 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6417 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6418 | value=1 | |
6419 | ;; | |
6420 | esac | |
6421 | ||
6422 | cat >>confdefs.h <<_ACEOF | |
6423 | #define DEBUGDIR_RELOCATABLE $value | |
6424 | _ACEOF | |
6425 | ||
6426 | ||
6427 | ||
0c4a4063 | 6428 | |
f83d8a90 DE |
6429 | # We can't pass paths as command line arguments. |
6430 | # Mingw32 tries to be clever and will convert the paths for us. | |
6431 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6432 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6433 | # This breaks GDB's relocatable path conversions since paths passed in | |
6434 | # config.h would not get so translated, the path prefixes no longer match. | |
6435 | ||
6436 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6437 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6438 | ac_define_dir=`eval echo $bindir` | |
6439 | ac_define_dir=`eval echo $ac_define_dir` | |
6440 | ||
6441 | cat >>confdefs.h <<_ACEOF | |
6442 | #define BINDIR "$ac_define_dir" | |
6443 | _ACEOF | |
6444 | ||
6445 | ||
6446 | ||
b14b1491 TT |
6447 | # GDB's datadir relocation |
6448 | ||
6449 | ||
6450 | ||
81ecdfbb RW |
6451 | # Check whether --with-gdb-datadir was given. |
6452 | if test "${with_gdb_datadir+set}" = set; then : | |
6453 | withval=$with_gdb_datadir; | |
b14b1491 | 6454 | GDB_DATADIR=$withval |
20e95c23 | 6455 | else |
b14b1491 | 6456 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6457 | fi |
6458 | ||
20e95c23 | 6459 | |
b14b1491 TT |
6460 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6461 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6462 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6463 | ac_define_dir=`eval echo $ac_define_dir` | |
6464 | ||
6465 | cat >>confdefs.h <<_ACEOF | |
6466 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6467 | _ACEOF |
6468 | ||
b14b1491 TT |
6469 | |
6470 | ||
0c4a4063 | 6471 | |
b14b1491 TT |
6472 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6473 | if test "x$prefix" = xNONE; then | |
6474 | test_prefix=/usr/local | |
6475 | else | |
6476 | test_prefix=$prefix | |
6477 | fi | |
6478 | else | |
6479 | test_prefix=$exec_prefix | |
6480 | fi | |
6481 | value=0 | |
6482 | case ${ac_define_dir} in | |
6483 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6484 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6485 | value=1 | |
6486 | ;; | |
6487 | esac | |
6488 | ||
6489 | cat >>confdefs.h <<_ACEOF | |
6490 | #define GDB_DATADIR_RELOCATABLE $value | |
6491 | _ACEOF | |
6492 | ||
6493 | ||
783e057b | 6494 | |
20e95c23 | 6495 | |
0c4a4063 | 6496 | |
81ecdfbb RW |
6497 | # Check whether --with-relocated-sources was given. |
6498 | if test "${with_relocated_sources+set}" = set; then : | |
6499 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6500 | |
6501 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6502 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6503 | ac_define_dir=`eval echo $reloc_srcdir` | |
6504 | ac_define_dir=`eval echo $ac_define_dir` | |
6505 | ||
6506 | cat >>confdefs.h <<_ACEOF | |
6507 | #define RELOC_SRCDIR "$ac_define_dir" | |
6508 | _ACEOF | |
6509 | ||
6510 | ||
6511 | ||
81ecdfbb RW |
6512 | fi |
6513 | ||
29b0e8a2 | 6514 | |
7349ff92 JK |
6515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6516 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6517 | ||
6518 | # Check whether --with-auto-load-dir was given. | |
6519 | if test "${with_auto_load_dir+set}" = set; then : | |
6520 | withval=$with_auto_load_dir; | |
6521 | else | |
1564a261 | 6522 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6523 | fi |
6524 | ||
1564a261 | 6525 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6526 | |
6527 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6528 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6529 | ac_define_dir=`eval echo $escape_dir` | |
6530 | ac_define_dir=`eval echo $ac_define_dir` | |
6531 | ||
6532 | cat >>confdefs.h <<_ACEOF | |
6533 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6534 | _ACEOF | |
6535 | ||
6536 | ||
6537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6538 | $as_echo "$with_auto_load_dir" >&6; } | |
6539 | ||
bccbefd2 JK |
6540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6541 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6542 | ||
6543 | # Check whether --with-auto-load-safe-path was given. | |
6544 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6545 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6546 | with_auto_load_safe_path="/" |
6547 | fi | |
bccbefd2 | 6548 | else |
7349ff92 | 6549 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6550 | fi |
6551 | ||
1564a261 | 6552 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6553 | |
6554 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6555 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6556 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6557 | ac_define_dir=`eval echo $ac_define_dir` |
6558 | ||
6559 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6560 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6561 | _ACEOF |
6562 | ||
6563 | ||
6564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6565 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6566 | ||
29b0e8a2 | 6567 | |
20e95c23 | 6568 | |
5ae98d25 | 6569 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6570 | |
6571 | ||
783e057b | 6572 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6573 | # Check whether --enable-targets was given. |
6574 | if test "${enable_targets+set}" = set; then : | |
6575 | enableval=$enable_targets; case "${enableval}" in | |
6576 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
6577 | ;; |
6578 | no) enable_targets= ;; | |
6579 | *) enable_targets=$enableval ;; | |
6580 | esac | |
81ecdfbb RW |
6581 | fi |
6582 | ||
20e95c23 | 6583 | |
783e057b | 6584 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6585 | # Check whether --enable-64-bit-bfd was given. |
6586 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6587 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6588 | yes) want64=true ;; |
6589 | no) want64=false ;; | |
81ecdfbb | 6590 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6591 | esac |
6592 | else | |
6593 | want64=false | |
81ecdfbb RW |
6594 | fi |
6595 | ||
783e057b DJ |
6596 | # Provide defaults for some variables set by the per-host and per-target |
6597 | # configuration. | |
6598 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6599 | |
783e057b DJ |
6600 | if test "${target}" = "${host}"; then |
6601 | gdb_native=yes | |
6602 | else | |
6603 | gdb_native=no | |
6604 | fi | |
20e95c23 | 6605 | |
783e057b | 6606 | . $srcdir/configure.host |
20e95c23 | 6607 | |
fb23d554 SDJ |
6608 | # Add in the common host objects. |
6609 | . $srcdir/common/common.host | |
6610 | gdb_host_obs="$gdb_host_obs $common_host_obs" | |
6611 | ||
783e057b | 6612 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6613 | |
783e057b DJ |
6614 | TARGET_OBS= |
6615 | all_targets= | |
b292c783 | 6616 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6617 | |
783e057b | 6618 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6619 | do |
783e057b DJ |
6620 | if test "$targ_alias" = "all"; then |
6621 | all_targets=true | |
6622 | else | |
6623 | # Canonicalize the secondary target names. | |
6624 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6625 | if test -n "$result"; then | |
6626 | targ=$result | |
6627 | else | |
6628 | targ=$targ_alias | |
6629 | fi | |
20e95c23 | 6630 | |
783e057b | 6631 | . ${srcdir}/configure.tgt |
20e95c23 | 6632 | |
bf307134 JB |
6633 | if test -z "${gdb_target_obs}"; then : |
6634 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
6635 | fi | |
6636 | ||
783e057b DJ |
6637 | # Target-specific object files |
6638 | for i in ${gdb_target_obs}; do | |
6639 | case " $TARGET_OBS " in | |
6640 | *" ${i} "*) ;; | |
6641 | *) | |
6642 | TARGET_OBS="$TARGET_OBS ${i}" | |
6643 | ;; | |
6644 | esac | |
6645 | done | |
20e95c23 | 6646 | |
783e057b DJ |
6647 | # Check whether this target needs 64-bit CORE_ADDR |
6648 | if test x${want64} = xfalse; then | |
6649 | . ${srcdir}/../bfd/config.bfd | |
6650 | fi | |
b292c783 JK |
6651 | |
6652 | # Check whether this target is native and supports gcore. | |
6653 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6654 | && $gdb_have_gcore; then | |
6655 | HAVE_NATIVE_GCORE_TARGET=1 | |
6656 | fi | |
783e057b | 6657 | fi |
20e95c23 DJ |
6658 | done |
6659 | ||
783e057b DJ |
6660 | if test x${all_targets} = xtrue; then |
6661 | ||
6662 | # We want all 64-bit targets if we either: | |
6663 | # - run on a 64-bit host or | |
6664 | # - already require 64-bit support for some other target or | |
6665 | # - the --enable-64-bit-bfd option was supplied | |
6666 | # Otherwise we only support all 32-bit targets. | |
6667 | # | |
6668 | # NOTE: This test must be in sync with the corresponding | |
6669 | # tests in BFD! | |
20e95c23 | 6670 | |
783e057b | 6671 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6672 | # The cast to long int works around a bug in the HP C Compiler |
6673 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6674 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6675 | # This bug is HP SR number 8606223364. | |
6676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6677 | $as_echo_n "checking size of long... " >&6; } | |
6678 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
6679 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 6680 | else |
81ecdfbb | 6681 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6682 | |
81ecdfbb RW |
6683 | else |
6684 | if test "$ac_cv_type_long" = yes; then | |
6685 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6686 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6687 | { as_fn_set_status 77 | |
6688 | as_fn_error "cannot compute sizeof (long) | |
6689 | See \`config.log' for more details." "$LINENO" 5; }; } | |
6690 | else | |
6691 | ac_cv_sizeof_long=0 | |
6692 | fi | |
c0993dbe | 6693 | fi |
81ecdfbb | 6694 | |
c0993dbe | 6695 | fi |
81ecdfbb RW |
6696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6697 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6698 | |
c0993dbe | 6699 | |
c0993dbe | 6700 | |
c0993dbe UW |
6701 | cat >>confdefs.h <<_ACEOF |
6702 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6703 | _ACEOF | |
6704 | ||
6705 | ||
6706 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6707 | want64=true | |
6708 | fi | |
6709 | fi | |
6710 | if test x${want64} = xtrue; then | |
6711 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6712 | else | |
6713 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6714 | fi | |
6715 | fi | |
6716 | ||
6717 | ||
6718 | ||
b292c783 | 6719 | |
c0993dbe UW |
6720 | # For other settings, only the main target counts. |
6721 | gdb_sim= | |
6722 | gdb_osabi= | |
6723 | build_gdbserver= | |
6724 | targ=$target; . ${srcdir}/configure.tgt | |
6725 | ||
6726 | # Fetch the default architecture and default target vector from BFD. | |
6727 | targ=$target; . $srcdir/../bfd/config.bfd | |
6728 | ||
6729 | # We only want the first architecture, so strip off the others if | |
6730 | # there is more than one. | |
6731 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6732 | ||
6733 | if test "x$targ_archs" != x; then | |
6734 | ||
6735 | cat >>confdefs.h <<_ACEOF | |
6736 | #define DEFAULT_BFD_ARCH $targ_archs | |
6737 | _ACEOF | |
6738 | ||
6739 | fi | |
6740 | if test "x$targ_defvec" != x; then | |
6741 | ||
6742 | cat >>confdefs.h <<_ACEOF | |
6743 | #define DEFAULT_BFD_VEC $targ_defvec | |
6744 | _ACEOF | |
6745 | ||
6746 | fi | |
6747 | ||
c0993dbe UW |
6748 | # The CLI cannot be disabled yet, but may be in the future. |
6749 | ||
6750 | # Enable CLI. | |
81ecdfbb RW |
6751 | # Check whether --enable-gdbcli was given. |
6752 | if test "${enable_gdbcli+set}" = set; then : | |
6753 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
6754 | yes) |
6755 | ;; | |
6756 | no) | |
81ecdfbb | 6757 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 6758 | *) |
81ecdfbb | 6759 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
6760 | esac |
6761 | else | |
6762 | enable_gdbcli=yes | |
81ecdfbb RW |
6763 | fi |
6764 | ||
c0993dbe UW |
6765 | if test x"$enable_gdbcli" = xyes; then |
6766 | if test -d $srcdir/cli; then | |
6767 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
6768 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
6769 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
6770 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
6771 | fi | |
6772 | fi | |
6773 | ||
6774 | # Enable MI. | |
81ecdfbb RW |
6775 | # Check whether --enable-gdbmi was given. |
6776 | if test "${enable_gdbmi+set}" = set; then : | |
6777 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6778 | yes | no) |
6779 | ;; | |
6780 | *) | |
81ecdfbb | 6781 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6782 | esac |
6783 | else | |
6784 | enable_gdbmi=yes | |
81ecdfbb RW |
6785 | fi |
6786 | ||
c0993dbe UW |
6787 | if test x"$enable_gdbmi" = xyes; then |
6788 | if test -d $srcdir/mi; then | |
6789 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
6790 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6791 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6792 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6793 | fi | |
6794 | fi | |
6795 | ||
6796 | # Enable TUI. | |
81ecdfbb RW |
6797 | # Check whether --enable-tui was given. |
6798 | if test "${enable_tui+set}" = set; then : | |
6799 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6800 | yes | no | auto) |
c0993dbe UW |
6801 | ;; |
6802 | *) | |
81ecdfbb | 6803 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6804 | esac |
6805 | else | |
3ca64bd3 | 6806 | enable_tui=auto |
81ecdfbb RW |
6807 | fi |
6808 | ||
c0993dbe UW |
6809 | |
6810 | # Enable gdbtk. | |
81ecdfbb RW |
6811 | # Check whether --enable-gdbtk was given. |
6812 | if test "${enable_gdbtk+set}" = set; then : | |
6813 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6814 | yes | no) |
6815 | ;; | |
6816 | *) | |
81ecdfbb | 6817 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6818 | esac |
6819 | else | |
5062cc19 | 6820 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
6821 | enable_gdbtk=yes |
6822 | else | |
6823 | enable_gdbtk=no | |
6824 | fi | |
81ecdfbb RW |
6825 | fi |
6826 | ||
c0993dbe UW |
6827 | # We unconditionally disable gdbtk tests on selected platforms. |
6828 | case $host_os in | |
6829 | go32* | windows*) | |
81ecdfbb RW |
6830 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6831 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6832 | enable_gdbtk=no ;; |
6833 | esac | |
6834 | ||
05e7c244 | 6835 | # Libunwind support for ia64. |
bec39cab | 6836 | |
05e7c244 JK |
6837 | |
6838 | # Check whether --with-libunwind-ia64 was given. | |
6839 | if test "${with_libunwind_ia64+set}" = set; then : | |
6840 | withval=$with_libunwind_ia64; | |
bec39cab | 6841 | else |
05e7c244 JK |
6842 | with_libunwind_ia64=auto |
6843 | fi | |
bec39cab | 6844 | |
05e7c244 JK |
6845 | |
6846 | # Backward compatibility option. | |
6847 | if test "${with_libunwind+set}" = set; then | |
6848 | if test x"$with_libunwind_ia64" != xauto; then | |
6849 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
6850 | fi | |
6851 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
6852 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
6853 | with_libunwind_ia64="$with_libunwind" | |
6854 | fi | |
6855 | ||
6856 | case "$with_libunwind_ia64" in | |
6857 | yes | no) | |
6858 | ;; | |
6859 | auto) | |
6860 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 6861 | do : |
b54a8fd7 PA |
6862 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
6863 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 6864 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6865 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6866 | _ACEOF |
6867 | ||
6868 | fi | |
6869 | ||
6870 | done | |
6871 | ||
05e7c244 JK |
6872 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
6873 | ;; | |
6874 | *) | |
6875 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
6876 | ;; | |
6877 | esac | |
bec39cab | 6878 | |
05e7c244 | 6879 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 6880 | for ac_header in libunwind-ia64.h |
81ecdfbb | 6881 | do : |
b54a8fd7 PA |
6882 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
6883 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 6884 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6885 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6886 | _ACEOF |
6887 | ||
6888 | fi | |
6889 | ||
6890 | done | |
6891 | ||
05e7c244 JK |
6892 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
6893 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
6894 | fi | |
6895 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
6896 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
6897 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
6898 | fi |
6899 | ||
cb01cfba JB |
6900 | opt_curses=no |
6901 | ||
81ecdfbb RW |
6902 | # Check whether --with-curses was given. |
6903 | if test "${with_curses+set}" = set; then : | |
6904 | withval=$with_curses; opt_curses=$withval | |
6905 | fi | |
6906 | ||
cb01cfba | 6907 | |
76a39ba7 | 6908 | prefer_curses=no |
cb01cfba | 6909 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 6910 | prefer_curses=yes |
cb01cfba JB |
6911 | fi |
6912 | ||
a9322a30 | 6913 | # Profiling support. |
81ecdfbb RW |
6914 | # Check whether --enable-profiling was given. |
6915 | if test "${enable_profiling+set}" = set; then : | |
6916 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
6917 | yes | no) |
6918 | ;; | |
6919 | *) | |
81ecdfbb | 6920 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
6921 | esac |
6922 | else | |
6923 | enable_profiling=no | |
81ecdfbb | 6924 | fi |
bec39cab | 6925 | |
a9322a30 TT |
6926 | |
6927 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
6928 | do : |
6929 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6930 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6931 | eval as_val=\$$as_ac_var | |
6932 | if test "x$as_val" = x""yes; then : | |
6933 | cat >>confdefs.h <<_ACEOF | |
6934 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 6935 | _ACEOF |
a9322a30 | 6936 | |
81ecdfbb RW |
6937 | fi |
6938 | done | |
a9322a30 | 6939 | |
81ecdfbb RW |
6940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
6941 | $as_echo_n "checking for _etext... " >&6; } | |
6942 | if test "${ac_cv_var__etext+set}" = set; then : | |
6943 | $as_echo_n "(cached) " >&6 | |
6944 | else | |
6945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6946 | /* end confdefs.h. */ | |
6947 | #include <stdlib.h> | |
6948 | extern char _etext; | |
a9322a30 TT |
6949 | |
6950 | int | |
6951 | main () | |
6952 | { | |
6953 | free (&_etext); | |
6954 | ; | |
6955 | return 0; | |
6956 | } | |
bec39cab | 6957 | _ACEOF |
81ecdfbb | 6958 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6959 | ac_cv_var__etext=yes |
bec39cab | 6960 | else |
81ecdfbb | 6961 | ac_cv_var__etext=no |
bec39cab | 6962 | fi |
81ecdfbb RW |
6963 | rm -f core conftest.err conftest.$ac_objext \ |
6964 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6965 | fi |
81ecdfbb RW |
6966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6967 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 6968 | if test $ac_cv_var__etext = yes; then |
60ca704f | 6969 | |
81ecdfbb | 6970 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6971 | |
bec39cab | 6972 | fi |
81ecdfbb RW |
6973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6974 | $as_echo_n "checking for etext... " >&6; } | |
6975 | if test "${ac_cv_var_etext+set}" = set; then : | |
6976 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6977 | else |
81ecdfbb | 6978 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6979 | /* end confdefs.h. */ |
a9322a30 TT |
6980 | #include <stdlib.h> |
6981 | extern char etext; | |
bec39cab AC |
6982 | |
6983 | int | |
6984 | main () | |
6985 | { | |
a9322a30 | 6986 | free (&etext); |
bec39cab AC |
6987 | ; |
6988 | return 0; | |
6989 | } | |
6990 | _ACEOF | |
81ecdfbb | 6991 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6992 | ac_cv_var_etext=yes |
bec39cab | 6993 | else |
81ecdfbb | 6994 | ac_cv_var_etext=no |
bec39cab | 6995 | fi |
81ecdfbb RW |
6996 | rm -f core conftest.err conftest.$ac_objext \ |
6997 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6998 | fi |
81ecdfbb RW |
6999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
7000 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
7001 | if test $ac_cv_var_etext = yes; then |
7002 | ||
81ecdfbb | 7003 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
7004 | |
7005 | fi | |
a9322a30 TT |
7006 | if test "$enable_profiling" = yes ; then |
7007 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 7008 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
7009 | fi |
7010 | PROFILE_CFLAGS=-pg | |
7011 | OLD_CFLAGS="$CFLAGS" | |
7012 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 7013 | |
81ecdfbb RW |
7014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7015 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
7016 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
7017 | $as_echo_n "(cached) " >&6 | |
bec39cab | 7018 | else |
81ecdfbb | 7019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7020 | /* end confdefs.h. */ |
bec39cab AC |
7021 | |
7022 | int | |
7023 | main () | |
7024 | { | |
a9322a30 | 7025 | int x; |
bec39cab AC |
7026 | ; |
7027 | return 0; | |
7028 | } | |
7029 | _ACEOF | |
81ecdfbb | 7030 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7031 | ac_cv_cc_supports_pg=yes |
bec39cab | 7032 | else |
81ecdfbb | 7033 | ac_cv_cc_supports_pg=no |
bec39cab | 7034 | fi |
81ecdfbb | 7035 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 7036 | fi |
81ecdfbb RW |
7037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7038 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7039 | |
a9322a30 | 7040 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 7041 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7042 | fi |
bec39cab | 7043 | |
a9322a30 | 7044 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7045 | fi |
7046 | ||
c16158bc JM |
7047 | |
7048 | ||
81ecdfbb RW |
7049 | # Check whether --with-pkgversion was given. |
7050 | if test "${with_pkgversion+set}" = set; then : | |
7051 | withval=$with_pkgversion; case "$withval" in | |
7052 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
7053 | no) PKGVERSION= ;; |
7054 | *) PKGVERSION="($withval) " ;; | |
7055 | esac | |
7056 | else | |
7057 | PKGVERSION="(GDB) " | |
7058 | ||
81ecdfbb | 7059 | fi |
c16158bc JM |
7060 | |
7061 | ||
7062 | ||
7063 | ||
81ecdfbb RW |
7064 | |
7065 | # Check whether --with-bugurl was given. | |
7066 | if test "${with_bugurl+set}" = set; then : | |
7067 | withval=$with_bugurl; case "$withval" in | |
7068 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
7069 | no) BUGURL= |
7070 | ;; | |
7071 | *) BUGURL="$withval" | |
7072 | ;; | |
7073 | esac | |
7074 | else | |
7075 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
7076 | ||
81ecdfbb RW |
7077 | fi |
7078 | ||
c16158bc JM |
7079 | case ${BUGURL} in |
7080 | "") | |
7081 | REPORT_BUGS_TO= | |
7082 | REPORT_BUGS_TEXI= | |
7083 | ;; | |
7084 | *) | |
7085 | REPORT_BUGS_TO="<$BUGURL>" | |
7086 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7087 | ;; | |
7088 | esac; | |
7089 | ||
7090 | ||
7091 | ||
7092 | ||
7093 | cat >>confdefs.h <<_ACEOF | |
7094 | #define PKGVERSION "$PKGVERSION" | |
7095 | _ACEOF | |
7096 | ||
7097 | ||
7098 | cat >>confdefs.h <<_ACEOF | |
7099 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7100 | _ACEOF | |
7101 | ||
7102 | ||
bec39cab AC |
7103 | # --------------------- # |
7104 | # Checks for programs. # | |
7105 | # --------------------- # | |
7106 | ||
7107 | for ac_prog in gawk mawk nawk awk | |
7108 | do | |
7109 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7110 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7112 | $as_echo_n "checking for $ac_word... " >&6; } | |
7113 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7114 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7115 | else |
7116 | if test -n "$AWK"; then | |
7117 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7118 | else | |
7119 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7120 | for as_dir in $PATH | |
7121 | do | |
7122 | IFS=$as_save_IFS | |
7123 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7124 | for ac_exec_ext in '' $ac_executable_extensions; do |
7125 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7126 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7127 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7128 | break 2 |
7129 | fi | |
7130 | done | |
81ecdfbb RW |
7131 | done |
7132 | IFS=$as_save_IFS | |
bec39cab AC |
7133 | |
7134 | fi | |
7135 | fi | |
7136 | AWK=$ac_cv_prog_AWK | |
7137 | if test -n "$AWK"; then | |
81ecdfbb RW |
7138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7139 | $as_echo "$AWK" >&6; } | |
bec39cab | 7140 | else |
81ecdfbb RW |
7141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7142 | $as_echo "no" >&6; } | |
bec39cab AC |
7143 | fi |
7144 | ||
bec39cab | 7145 | |
81ecdfbb | 7146 | test -n "$AWK" && break |
bec39cab AC |
7147 | done |
7148 | ||
c971b7fa PA |
7149 | # Find a good install program. We prefer a C program (faster), |
7150 | # so one script is as good as another. But avoid the broken or | |
7151 | # incompatible versions: | |
7152 | # SysV /etc/install, /usr/sbin/install | |
7153 | # SunOS /usr/etc/install | |
7154 | # IRIX /sbin/install | |
7155 | # AIX /bin/install | |
7156 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7157 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7158 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7159 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7160 | # OS/2's system install, which has a completely different semantic | |
7161 | # ./install, which can be erroneously created by make from ./install.sh. | |
7162 | # Reject install programs that cannot install multiple files. | |
7163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7164 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7165 | if test -z "$INSTALL"; then | |
7166 | if test "${ac_cv_path_install+set}" = set; then : | |
7167 | $as_echo_n "(cached) " >&6 | |
7168 | else | |
7169 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7170 | for as_dir in $PATH | |
7171 | do | |
7172 | IFS=$as_save_IFS | |
7173 | test -z "$as_dir" && as_dir=. | |
7174 | # Account for people who put trailing slashes in PATH elements. | |
7175 | case $as_dir/ in #(( | |
7176 | ./ | .// | /[cC]/* | \ | |
7177 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7178 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7179 | /usr/ucb/* ) ;; | |
7180 | *) | |
7181 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7182 | # Don't use installbsd from OSF since it installs stuff as root | |
7183 | # by default. | |
7184 | for ac_prog in ginstall scoinst install; do | |
7185 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7186 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
7187 | if test $ac_prog = install && | |
7188 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7189 | # AIX install. It has an incompatible calling convention. | |
7190 | : | |
7191 | elif test $ac_prog = install && | |
7192 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7193 | # program-specific install script used by HP pwplus--don't use. | |
7194 | : | |
7195 | else | |
7196 | rm -rf conftest.one conftest.two conftest.dir | |
7197 | echo one > conftest.one | |
7198 | echo two > conftest.two | |
7199 | mkdir conftest.dir | |
7200 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7201 | test -s conftest.one && test -s conftest.two && | |
7202 | test -s conftest.dir/conftest.one && | |
7203 | test -s conftest.dir/conftest.two | |
7204 | then | |
7205 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7206 | break 3 | |
7207 | fi | |
7208 | fi | |
7209 | fi | |
7210 | done | |
7211 | done | |
7212 | ;; | |
7213 | esac | |
7214 | ||
7215 | done | |
7216 | IFS=$as_save_IFS | |
7217 | ||
7218 | rm -rf conftest.one conftest.two conftest.dir | |
7219 | ||
7220 | fi | |
7221 | if test "${ac_cv_path_install+set}" = set; then | |
7222 | INSTALL=$ac_cv_path_install | |
7223 | else | |
7224 | # As a last resort, use the slow shell script. Don't cache a | |
7225 | # value for INSTALL within a source directory, because that will | |
7226 | # break other packages using the cache if that directory is | |
7227 | # removed, or if the value is a relative name. | |
7228 | INSTALL=$ac_install_sh | |
7229 | fi | |
7230 | fi | |
7231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7232 | $as_echo "$INSTALL" >&6; } | |
7233 | ||
7234 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7235 | # It thinks the first close brace ends the variable substitution. | |
7236 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7237 | ||
7238 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7239 | ||
7240 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7241 | |
81ecdfbb RW |
7242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7243 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7244 | LN_S=$as_ln_s |
7245 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7247 | $as_echo "yes" >&6; } | |
bec39cab | 7248 | else |
81ecdfbb RW |
7249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7250 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7251 | fi |
7252 | ||
7253 | if test -n "$ac_tool_prefix"; then | |
7254 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7255 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7257 | $as_echo_n "checking for $ac_word... " >&6; } | |
7258 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
7259 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7260 | else |
7261 | if test -n "$RANLIB"; then | |
7262 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7263 | else | |
7264 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7265 | for as_dir in $PATH | |
7266 | do | |
7267 | IFS=$as_save_IFS | |
7268 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7269 | for ac_exec_ext in '' $ac_executable_extensions; do |
7270 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7271 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7272 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7273 | break 2 |
7274 | fi | |
7275 | done | |
81ecdfbb RW |
7276 | done |
7277 | IFS=$as_save_IFS | |
bec39cab AC |
7278 | |
7279 | fi | |
7280 | fi | |
7281 | RANLIB=$ac_cv_prog_RANLIB | |
7282 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7284 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7285 | else |
81ecdfbb RW |
7286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7287 | $as_echo "no" >&6; } | |
bec39cab AC |
7288 | fi |
7289 | ||
81ecdfbb | 7290 | |
bec39cab AC |
7291 | fi |
7292 | if test -z "$ac_cv_prog_RANLIB"; then | |
7293 | ac_ct_RANLIB=$RANLIB | |
7294 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7295 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7297 | $as_echo_n "checking for $ac_word... " >&6; } | |
7298 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
7299 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7300 | else |
7301 | if test -n "$ac_ct_RANLIB"; then | |
7302 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7303 | else | |
7304 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7305 | for as_dir in $PATH | |
7306 | do | |
7307 | IFS=$as_save_IFS | |
7308 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7309 | for ac_exec_ext in '' $ac_executable_extensions; do |
7310 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7311 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7312 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7313 | break 2 |
7314 | fi | |
7315 | done | |
81ecdfbb RW |
7316 | done |
7317 | IFS=$as_save_IFS | |
bec39cab | 7318 | |
bec39cab AC |
7319 | fi |
7320 | fi | |
7321 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7322 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7324 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7325 | else |
81ecdfbb RW |
7326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7327 | $as_echo "no" >&6; } | |
bec39cab AC |
7328 | fi |
7329 | ||
81ecdfbb RW |
7330 | if test "x$ac_ct_RANLIB" = x; then |
7331 | RANLIB=":" | |
7332 | else | |
7333 | case $cross_compiling:$ac_tool_warned in | |
7334 | yes:) | |
7335 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7336 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7337 | ac_tool_warned=yes ;; | |
7338 | esac | |
7339 | RANLIB=$ac_ct_RANLIB | |
7340 | fi | |
bec39cab AC |
7341 | else |
7342 | RANLIB="$ac_cv_prog_RANLIB" | |
7343 | fi | |
7344 | ||
7345 | for ac_prog in 'bison -y' byacc | |
7346 | do | |
7347 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7348 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7349 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7350 | $as_echo_n "checking for $ac_word... " >&6; } | |
7351 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
7352 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7353 | else |
7354 | if test -n "$YACC"; then | |
7355 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7356 | else | |
7357 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7358 | for as_dir in $PATH | |
7359 | do | |
7360 | IFS=$as_save_IFS | |
7361 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7362 | for ac_exec_ext in '' $ac_executable_extensions; do |
7363 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7364 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7365 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7366 | break 2 |
7367 | fi | |
7368 | done | |
81ecdfbb RW |
7369 | done |
7370 | IFS=$as_save_IFS | |
bec39cab AC |
7371 | |
7372 | fi | |
7373 | fi | |
7374 | YACC=$ac_cv_prog_YACC | |
7375 | if test -n "$YACC"; then | |
81ecdfbb RW |
7376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7377 | $as_echo "$YACC" >&6; } | |
bec39cab | 7378 | else |
81ecdfbb RW |
7379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7380 | $as_echo "no" >&6; } | |
bec39cab AC |
7381 | fi |
7382 | ||
81ecdfbb | 7383 | |
bec39cab AC |
7384 | test -n "$YACC" && break |
7385 | done | |
7386 | test -n "$YACC" || YACC="yacc" | |
7387 | ||
7388 | ||
7389 | if test -n "$ac_tool_prefix"; then | |
7390 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7391 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7393 | $as_echo_n "checking for $ac_word... " >&6; } | |
7394 | if test "${ac_cv_prog_AR+set}" = set; then : | |
7395 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7396 | else |
7397 | if test -n "$AR"; then | |
7398 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7399 | else | |
7400 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7401 | for as_dir in $PATH | |
7402 | do | |
7403 | IFS=$as_save_IFS | |
7404 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7405 | for ac_exec_ext in '' $ac_executable_extensions; do |
7406 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7407 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7408 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7409 | break 2 |
7410 | fi | |
7411 | done | |
81ecdfbb RW |
7412 | done |
7413 | IFS=$as_save_IFS | |
bec39cab AC |
7414 | |
7415 | fi | |
7416 | fi | |
7417 | AR=$ac_cv_prog_AR | |
7418 | if test -n "$AR"; then | |
81ecdfbb RW |
7419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7420 | $as_echo "$AR" >&6; } | |
bec39cab | 7421 | else |
81ecdfbb RW |
7422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7423 | $as_echo "no" >&6; } | |
bec39cab AC |
7424 | fi |
7425 | ||
81ecdfbb | 7426 | |
bec39cab AC |
7427 | fi |
7428 | if test -z "$ac_cv_prog_AR"; then | |
7429 | ac_ct_AR=$AR | |
7430 | # Extract the first word of "ar", so it can be a program name with args. | |
7431 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7432 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7433 | $as_echo_n "checking for $ac_word... " >&6; } | |
7434 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
7435 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7436 | else |
7437 | if test -n "$ac_ct_AR"; then | |
7438 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7439 | else | |
7440 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7441 | for as_dir in $PATH | |
7442 | do | |
7443 | IFS=$as_save_IFS | |
7444 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7445 | for ac_exec_ext in '' $ac_executable_extensions; do |
7446 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7447 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7448 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7449 | break 2 |
7450 | fi | |
7451 | done | |
81ecdfbb RW |
7452 | done |
7453 | IFS=$as_save_IFS | |
bec39cab AC |
7454 | |
7455 | fi | |
7456 | fi | |
7457 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7458 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7460 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7461 | else |
81ecdfbb RW |
7462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7463 | $as_echo "no" >&6; } | |
bec39cab AC |
7464 | fi |
7465 | ||
81ecdfbb RW |
7466 | if test "x$ac_ct_AR" = x; then |
7467 | AR="" | |
7468 | else | |
7469 | case $cross_compiling:$ac_tool_warned in | |
7470 | yes:) | |
7471 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7472 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7473 | ac_tool_warned=yes ;; | |
7474 | esac | |
7475 | AR=$ac_ct_AR | |
7476 | fi | |
bec39cab AC |
7477 | else |
7478 | AR="$ac_cv_prog_AR" | |
7479 | fi | |
7480 | ||
7481 | if test -n "$ac_tool_prefix"; then | |
7482 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7483 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7485 | $as_echo_n "checking for $ac_word... " >&6; } | |
7486 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
7487 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7488 | else |
7489 | if test -n "$DLLTOOL"; then | |
7490 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7491 | else | |
7492 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7493 | for as_dir in $PATH | |
7494 | do | |
7495 | IFS=$as_save_IFS | |
7496 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7497 | for ac_exec_ext in '' $ac_executable_extensions; do |
7498 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7499 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7500 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7501 | break 2 |
7502 | fi | |
7503 | done | |
81ecdfbb RW |
7504 | done |
7505 | IFS=$as_save_IFS | |
bec39cab AC |
7506 | |
7507 | fi | |
7508 | fi | |
7509 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7510 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7512 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7513 | else |
81ecdfbb RW |
7514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7515 | $as_echo "no" >&6; } | |
bec39cab AC |
7516 | fi |
7517 | ||
81ecdfbb | 7518 | |
bec39cab AC |
7519 | fi |
7520 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7521 | ac_ct_DLLTOOL=$DLLTOOL | |
7522 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7523 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7525 | $as_echo_n "checking for $ac_word... " >&6; } | |
7526 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
7527 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7528 | else |
7529 | if test -n "$ac_ct_DLLTOOL"; then | |
7530 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7531 | else | |
7532 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7533 | for as_dir in $PATH | |
7534 | do | |
7535 | IFS=$as_save_IFS | |
7536 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7537 | for ac_exec_ext in '' $ac_executable_extensions; do |
7538 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7539 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7540 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7541 | break 2 |
7542 | fi | |
7543 | done | |
81ecdfbb RW |
7544 | done |
7545 | IFS=$as_save_IFS | |
bec39cab AC |
7546 | |
7547 | fi | |
7548 | fi | |
7549 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7550 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7552 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7553 | else |
81ecdfbb RW |
7554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7555 | $as_echo "no" >&6; } | |
bec39cab AC |
7556 | fi |
7557 | ||
81ecdfbb RW |
7558 | if test "x$ac_ct_DLLTOOL" = x; then |
7559 | DLLTOOL="" | |
7560 | else | |
7561 | case $cross_compiling:$ac_tool_warned in | |
7562 | yes:) | |
7563 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7564 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7565 | ac_tool_warned=yes ;; | |
7566 | esac | |
7567 | DLLTOOL=$ac_ct_DLLTOOL | |
7568 | fi | |
bec39cab AC |
7569 | else |
7570 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7571 | fi | |
7572 | ||
7573 | if test -n "$ac_tool_prefix"; then | |
7574 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7575 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7577 | $as_echo_n "checking for $ac_word... " >&6; } | |
7578 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
7579 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7580 | else |
7581 | if test -n "$WINDRES"; then | |
7582 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7583 | else | |
7584 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7585 | for as_dir in $PATH | |
7586 | do | |
7587 | IFS=$as_save_IFS | |
7588 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7589 | for ac_exec_ext in '' $ac_executable_extensions; do |
7590 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7591 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7592 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7593 | break 2 |
7594 | fi | |
7595 | done | |
81ecdfbb RW |
7596 | done |
7597 | IFS=$as_save_IFS | |
bec39cab AC |
7598 | |
7599 | fi | |
7600 | fi | |
7601 | WINDRES=$ac_cv_prog_WINDRES | |
7602 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7604 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7605 | else |
81ecdfbb RW |
7606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7607 | $as_echo "no" >&6; } | |
bec39cab AC |
7608 | fi |
7609 | ||
81ecdfbb | 7610 | |
bec39cab AC |
7611 | fi |
7612 | if test -z "$ac_cv_prog_WINDRES"; then | |
7613 | ac_ct_WINDRES=$WINDRES | |
7614 | # Extract the first word of "windres", so it can be a program name with args. | |
7615 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7617 | $as_echo_n "checking for $ac_word... " >&6; } | |
7618 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
7619 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7620 | else |
7621 | if test -n "$ac_ct_WINDRES"; then | |
7622 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7623 | else | |
7624 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7625 | for as_dir in $PATH | |
7626 | do | |
7627 | IFS=$as_save_IFS | |
7628 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7629 | for ac_exec_ext in '' $ac_executable_extensions; do |
7630 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7631 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7632 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7633 | break 2 |
7634 | fi | |
7635 | done | |
81ecdfbb RW |
7636 | done |
7637 | IFS=$as_save_IFS | |
bec39cab AC |
7638 | |
7639 | fi | |
7640 | fi | |
7641 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7642 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7644 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7645 | else |
81ecdfbb RW |
7646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7647 | $as_echo "no" >&6; } | |
c906108c | 7648 | fi |
bec39cab | 7649 | |
81ecdfbb RW |
7650 | if test "x$ac_ct_WINDRES" = x; then |
7651 | WINDRES="" | |
7652 | else | |
7653 | case $cross_compiling:$ac_tool_warned in | |
7654 | yes:) | |
7655 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7656 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7657 | ac_tool_warned=yes ;; | |
7658 | esac | |
7659 | WINDRES=$ac_ct_WINDRES | |
7660 | fi | |
c906108c | 7661 | else |
bec39cab | 7662 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7663 | fi |
7664 | ||
bec39cab | 7665 | |
036c3acb TS |
7666 | case $host_os in |
7667 | gnu*) | |
7668 | # Needed for GNU Hurd hosts. | |
7669 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7670 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7671 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7673 | $as_echo_n "checking for $ac_word... " >&6; } | |
7674 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
7675 | $as_echo_n "(cached) " >&6 | |
c906108c | 7676 | else |
bec39cab AC |
7677 | if test -n "$MIG"; then |
7678 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7679 | else | |
7680 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7681 | for as_dir in $PATH | |
7682 | do | |
7683 | IFS=$as_save_IFS | |
7684 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7685 | for ac_exec_ext in '' $ac_executable_extensions; do |
7686 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7687 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7688 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7689 | break 2 |
7690 | fi | |
7691 | done | |
81ecdfbb RW |
7692 | done |
7693 | IFS=$as_save_IFS | |
bec39cab | 7694 | |
c906108c | 7695 | fi |
bec39cab AC |
7696 | fi |
7697 | MIG=$ac_cv_prog_MIG | |
7698 | if test -n "$MIG"; then | |
81ecdfbb RW |
7699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7700 | $as_echo "$MIG" >&6; } | |
c906108c | 7701 | else |
81ecdfbb RW |
7702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7703 | $as_echo "no" >&6; } | |
c906108c SS |
7704 | fi |
7705 | ||
81ecdfbb | 7706 | |
bec39cab AC |
7707 | fi |
7708 | if test -z "$ac_cv_prog_MIG"; then | |
7709 | ac_ct_MIG=$MIG | |
7710 | # Extract the first word of "mig", so it can be a program name with args. | |
7711 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
7712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7713 | $as_echo_n "checking for $ac_word... " >&6; } | |
7714 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
7715 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7716 | else |
7717 | if test -n "$ac_ct_MIG"; then | |
7718 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
7719 | else | |
7720 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7721 | for as_dir in $PATH | |
7722 | do | |
7723 | IFS=$as_save_IFS | |
7724 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7725 | for ac_exec_ext in '' $ac_executable_extensions; do |
7726 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7727 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 7728 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7729 | break 2 |
7730 | fi | |
7731 | done | |
81ecdfbb RW |
7732 | done |
7733 | IFS=$as_save_IFS | |
c906108c | 7734 | |
bec39cab AC |
7735 | fi |
7736 | fi | |
7737 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
7738 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
7739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
7740 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 7741 | else |
81ecdfbb RW |
7742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7743 | $as_echo "no" >&6; } | |
bec39cab | 7744 | fi |
c906108c | 7745 | |
81ecdfbb RW |
7746 | if test "x$ac_ct_MIG" = x; then |
7747 | MIG="" | |
7748 | else | |
7749 | case $cross_compiling:$ac_tool_warned in | |
7750 | yes:) | |
7751 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7752 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7753 | ac_tool_warned=yes ;; | |
7754 | esac | |
7755 | MIG=$ac_ct_MIG | |
7756 | fi | |
bec39cab AC |
7757 | else |
7758 | MIG="$ac_cv_prog_MIG" | |
7759 | fi | |
c906108c | 7760 | |
036c3acb TS |
7761 | if test x"$MIG" = x; then |
7762 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
7763 | fi | |
7764 | ;; | |
7765 | esac | |
c906108c | 7766 | |
bec39cab AC |
7767 | # ---------------------- # |
7768 | # Checks for libraries. # | |
7769 | # ---------------------- # | |
c906108c | 7770 | |
bec39cab | 7771 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
7772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
7773 | $as_echo_n "checking for main in -lm... " >&6; } | |
7774 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
7775 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7776 | else |
7777 | ac_check_lib_save_LIBS=$LIBS | |
7778 | LIBS="-lm $LIBS" | |
81ecdfbb | 7779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7780 | /* end confdefs.h. */ |
c906108c | 7781 | |
c906108c | 7782 | |
bec39cab AC |
7783 | int |
7784 | main () | |
7785 | { | |
81ecdfbb | 7786 | return main (); |
bec39cab AC |
7787 | ; |
7788 | return 0; | |
7789 | } | |
7790 | _ACEOF | |
81ecdfbb | 7791 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7792 | ac_cv_lib_m_main=yes |
7793 | else | |
81ecdfbb | 7794 | ac_cv_lib_m_main=no |
bec39cab | 7795 | fi |
81ecdfbb RW |
7796 | rm -f core conftest.err conftest.$ac_objext \ |
7797 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7798 | LIBS=$ac_check_lib_save_LIBS |
7799 | fi | |
81ecdfbb RW |
7800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
7801 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
7802 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
7803 | cat >>confdefs.h <<_ACEOF |
7804 | #define HAVE_LIBM 1 | |
7805 | _ACEOF | |
7806 | ||
7807 | LIBS="-lm $LIBS" | |
c906108c | 7808 | |
c906108c | 7809 | fi |
bec39cab AC |
7810 | |
7811 | ||
7812 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
7813 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
7814 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
7815 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
7816 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
7817 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 7818 | |
c906108c | 7819 | else |
81ecdfbb RW |
7820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
7821 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
7822 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
7823 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7824 | else |
7825 | ac_check_lib_save_LIBS=$LIBS | |
7826 | LIBS="-lw $LIBS" | |
81ecdfbb | 7827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7828 | /* end confdefs.h. */ |
c906108c | 7829 | |
81ecdfbb RW |
7830 | /* Override any GCC internal prototype to avoid an error. |
7831 | Use char because int might match the return type of a GCC | |
7832 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7833 | #ifdef __cplusplus |
7834 | extern "C" | |
7835 | #endif | |
bec39cab AC |
7836 | char wctype (); |
7837 | int | |
7838 | main () | |
7839 | { | |
81ecdfbb | 7840 | return wctype (); |
bec39cab AC |
7841 | ; |
7842 | return 0; | |
7843 | } | |
7844 | _ACEOF | |
81ecdfbb | 7845 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7846 | ac_cv_lib_w_wctype=yes |
7847 | else | |
81ecdfbb | 7848 | ac_cv_lib_w_wctype=no |
bec39cab | 7849 | fi |
81ecdfbb RW |
7850 | rm -f core conftest.err conftest.$ac_objext \ |
7851 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7852 | LIBS=$ac_check_lib_save_LIBS |
7853 | fi | |
81ecdfbb RW |
7854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
7855 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
7856 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
7857 | cat >>confdefs.h <<_ACEOF |
7858 | #define HAVE_LIBW 1 | |
7859 | _ACEOF | |
c906108c | 7860 | |
bec39cab | 7861 | LIBS="-lw $LIBS" |
c906108c | 7862 | |
bec39cab | 7863 | fi |
c906108c | 7864 | |
bec39cab | 7865 | fi |
c906108c | 7866 | |
ddc9cd0f | 7867 | |
bec39cab | 7868 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
7869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
7870 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
7871 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7872 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7873 | else |
7874 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7875 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7876 | /* end confdefs.h. */ |
ddc9cd0f | 7877 | |
81ecdfbb RW |
7878 | /* Override any GCC internal prototype to avoid an error. |
7879 | Use char because int might match the return type of a GCC | |
7880 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7881 | #ifdef __cplusplus |
7882 | extern "C" | |
7883 | #endif | |
bec39cab AC |
7884 | char gethostbyname (); |
7885 | int | |
7886 | main () | |
7887 | { | |
81ecdfbb | 7888 | return gethostbyname (); |
bec39cab AC |
7889 | ; |
7890 | return 0; | |
7891 | } | |
7892 | _ACEOF | |
81ecdfbb RW |
7893 | for ac_lib in '' nsl; do |
7894 | if test -z "$ac_lib"; then | |
7895 | ac_res="none required" | |
7896 | else | |
7897 | ac_res=-l$ac_lib | |
b4e70030 | 7898 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7899 | fi |
7900 | if ac_fn_c_try_link "$LINENO"; then : | |
7901 | ac_cv_search_gethostbyname=$ac_res | |
7902 | fi | |
7903 | rm -f core conftest.err conftest.$ac_objext \ | |
7904 | conftest$ac_exeext | |
7905 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7906 | break | |
7907 | fi | |
7908 | done | |
7909 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 7910 | |
bec39cab | 7911 | else |
81ecdfbb | 7912 | ac_cv_search_gethostbyname=no |
bec39cab | 7913 | fi |
81ecdfbb | 7914 | rm conftest.$ac_ext |
bec39cab AC |
7915 | LIBS=$ac_func_search_save_LIBS |
7916 | fi | |
81ecdfbb RW |
7917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
7918 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
7919 | ac_res=$ac_cv_search_gethostbyname | |
7920 | if test "$ac_res" != no; then : | |
7921 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 7922 | |
bec39cab | 7923 | fi |
96baa820 | 7924 | |
c906108c | 7925 | |
b4e70030 | 7926 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
7927 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
7928 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
7929 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7930 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
7931 | else |
7932 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7934 | /* end confdefs.h. */ |
7935 | ||
81ecdfbb RW |
7936 | /* Override any GCC internal prototype to avoid an error. |
7937 | Use char because int might match the return type of a GCC | |
7938 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
7939 | #ifdef __cplusplus |
7940 | extern "C" | |
7941 | #endif | |
b4e70030 JB |
7942 | char socketpair (); |
7943 | int | |
7944 | main () | |
7945 | { | |
81ecdfbb | 7946 | return socketpair (); |
b4e70030 JB |
7947 | ; |
7948 | return 0; | |
7949 | } | |
7950 | _ACEOF | |
81ecdfbb RW |
7951 | for ac_lib in '' socket; do |
7952 | if test -z "$ac_lib"; then | |
7953 | ac_res="none required" | |
7954 | else | |
7955 | ac_res=-l$ac_lib | |
b4e70030 | 7956 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7957 | fi |
7958 | if ac_fn_c_try_link "$LINENO"; then : | |
7959 | ac_cv_search_socketpair=$ac_res | |
7960 | fi | |
7961 | rm -f core conftest.err conftest.$ac_objext \ | |
7962 | conftest$ac_exeext | |
7963 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7964 | break | |
7965 | fi | |
7966 | done | |
7967 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 7968 | |
b4e70030 | 7969 | else |
81ecdfbb | 7970 | ac_cv_search_socketpair=no |
b4e70030 | 7971 | fi |
81ecdfbb | 7972 | rm conftest.$ac_ext |
b4e70030 JB |
7973 | LIBS=$ac_func_search_save_LIBS |
7974 | fi | |
81ecdfbb RW |
7975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7976 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7977 | ac_res=$ac_cv_search_socketpair | |
7978 | if test "$ac_res" != no; then : | |
7979 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7980 | |
7981 | fi | |
7982 | ||
7983 | ||
233a11ab | 7984 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 7985 | |
711a72d3 | 7986 | # Use the system's zlib library. |
39f3de7c L |
7987 | zlibdir="-L\$(top_builddir)/../zlib" |
7988 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 7989 | |
711a72d3 L |
7990 | # Check whether --with-system-zlib was given. |
7991 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
7992 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
7993 | zlibdir= | |
7994 | zlibinc= | |
7995 | fi | |
b040ad30 | 7996 | |
233a11ab | 7997 | fi |
233a11ab | 7998 | |
233a11ab | 7999 | |
233a11ab | 8000 | |
b040ad30 | 8001 | |
233a11ab | 8002 | |
25268153 | 8003 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
37773e78 | 8004 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
25268153 JB |
8005 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
8006 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
8007 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
8008 | $as_echo_n "(cached) " >&6 | |
8009 | else | |
8010 | ac_func_search_save_LIBS=$LIBS | |
8011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8012 | /* end confdefs.h. */ | |
8013 | ||
8014 | /* Override any GCC internal prototype to avoid an error. | |
8015 | Use char because int might match the return type of a GCC | |
8016 | builtin and then its argument prototype would still apply. */ | |
8017 | #ifdef __cplusplus | |
8018 | extern "C" | |
8019 | #endif | |
8020 | char kinfo_getvmmap (); | |
8021 | int | |
8022 | main () | |
8023 | { | |
8024 | return kinfo_getvmmap (); | |
8025 | ; | |
8026 | return 0; | |
8027 | } | |
8028 | _ACEOF | |
37773e78 | 8029 | for ac_lib in '' util util-freebsd; do |
25268153 JB |
8030 | if test -z "$ac_lib"; then |
8031 | ac_res="none required" | |
8032 | else | |
8033 | ac_res=-l$ac_lib | |
8034 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8035 | fi | |
8036 | if ac_fn_c_try_link "$LINENO"; then : | |
8037 | ac_cv_search_kinfo_getvmmap=$ac_res | |
8038 | fi | |
8039 | rm -f core conftest.err conftest.$ac_objext \ | |
8040 | conftest$ac_exeext | |
8041 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
8042 | break | |
8043 | fi | |
8044 | done | |
8045 | if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : | |
8046 | ||
8047 | else | |
8048 | ac_cv_search_kinfo_getvmmap=no | |
8049 | fi | |
8050 | rm conftest.$ac_ext | |
8051 | LIBS=$ac_func_search_save_LIBS | |
8052 | fi | |
8053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
8054 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
8055 | ac_res=$ac_cv_search_kinfo_getvmmap | |
8056 | if test "$ac_res" != no; then : | |
8057 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
8058 | ||
8059 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
8060 | ||
8061 | fi | |
8062 | ||
8063 | ||
77f120bf | 8064 | |
016a3251 DD |
8065 | if test "X$prefix" = "XNONE"; then |
8066 | acl_final_prefix="$ac_default_prefix" | |
8067 | else | |
8068 | acl_final_prefix="$prefix" | |
8069 | fi | |
8070 | if test "X$exec_prefix" = "XNONE"; then | |
8071 | acl_final_exec_prefix='${prefix}' | |
8072 | else | |
8073 | acl_final_exec_prefix="$exec_prefix" | |
8074 | fi | |
8075 | acl_save_prefix="$prefix" | |
8076 | prefix="$acl_final_prefix" | |
8077 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8078 | prefix="$acl_save_prefix" | |
8079 | ||
8080 | ||
8081 | # Check whether --with-gnu-ld was given. | |
8082 | if test "${with_gnu_ld+set}" = set; then : | |
8083 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8084 | else | |
8085 | with_gnu_ld=no | |
8086 | fi | |
8087 | ||
8088 | # Prepare PATH_SEPARATOR. | |
8089 | # The user is always right. | |
8090 | if test "${PATH_SEPARATOR+set}" != set; then | |
8091 | echo "#! /bin/sh" >conf$$.sh | |
8092 | echo "exit 0" >>conf$$.sh | |
8093 | chmod +x conf$$.sh | |
8094 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8095 | PATH_SEPARATOR=';' | |
8096 | else | |
8097 | PATH_SEPARATOR=: | |
8098 | fi | |
8099 | rm -f conf$$.sh | |
8100 | fi | |
8101 | ac_prog=ld | |
8102 | if test "$GCC" = yes; then | |
8103 | # Check if gcc -print-prog-name=ld gives a path. | |
8104 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8105 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8106 | case $host in | |
8107 | *-*-mingw*) | |
8108 | # gcc leaves a trailing carriage return which upsets mingw | |
8109 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8110 | *) | |
8111 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8112 | esac | |
8113 | case $ac_prog in | |
8114 | # Accept absolute paths. | |
8115 | [\\/]* | [A-Za-z]:[\\/]*) | |
8116 | re_direlt='/[^/][^/]*/\.\./' | |
8117 | # Canonicalize the path of ld | |
8118 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8119 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8120 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8121 | done | |
8122 | test -z "$LD" && LD="$ac_prog" | |
8123 | ;; | |
8124 | "") | |
8125 | # If it fails, then pretend we aren't using GCC. | |
8126 | ac_prog=ld | |
8127 | ;; | |
8128 | *) | |
8129 | # If it is relative, then search for the first ld in PATH. | |
8130 | with_gnu_ld=unknown | |
8131 | ;; | |
8132 | esac | |
8133 | elif test "$with_gnu_ld" = yes; then | |
8134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8135 | $as_echo_n "checking for GNU ld... " >&6; } | |
8136 | else | |
8137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8138 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8139 | fi | |
8140 | if test "${acl_cv_path_LD+set}" = set; then : | |
8141 | $as_echo_n "(cached) " >&6 | |
8142 | else | |
8143 | if test -z "$LD"; then | |
8144 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8145 | for ac_dir in $PATH; do | |
8146 | test -z "$ac_dir" && ac_dir=. | |
8147 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8148 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8149 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8150 | # but apparently some GNU ld's only accept -v. | |
8151 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8152 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8153 | test "$with_gnu_ld" != no && break | |
8154 | else | |
8155 | test "$with_gnu_ld" != yes && break | |
8156 | fi | |
8157 | fi | |
8158 | done | |
8159 | IFS="$ac_save_ifs" | |
8160 | else | |
8161 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8162 | fi | |
8163 | fi | |
8164 | ||
8165 | LD="$acl_cv_path_LD" | |
8166 | if test -n "$LD"; then | |
8167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8168 | $as_echo "$LD" >&6; } | |
8169 | else | |
8170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8171 | $as_echo "no" >&6; } | |
8172 | fi | |
8173 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 | |
8174 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
8175 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
8176 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
8177 | $as_echo_n "(cached) " >&6 | |
8178 | else | |
8179 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8180 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8181 | acl_cv_prog_gnu_ld=yes | |
8182 | else | |
8183 | acl_cv_prog_gnu_ld=no | |
8184 | fi | |
8185 | fi | |
8186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8187 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8188 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8189 | ||
8190 | ||
8191 | ||
8192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8193 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
8194 | if test "${acl_cv_rpath+set}" = set; then : | |
8195 | $as_echo_n "(cached) " >&6 | |
8196 | else | |
8197 | ||
8198 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8199 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8200 | . ./conftest.sh | |
8201 | rm -f ./conftest.sh | |
8202 | acl_cv_rpath=done | |
8203 | ||
8204 | fi | |
8205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8206 | $as_echo "$acl_cv_rpath" >&6; } | |
8207 | wl="$acl_cv_wl" | |
8208 | libext="$acl_cv_libext" | |
8209 | shlibext="$acl_cv_shlibext" | |
8210 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8211 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8212 | hardcode_direct="$acl_cv_hardcode_direct" | |
8213 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8214 | # Check whether --enable-rpath was given. | |
8215 | if test "${enable_rpath+set}" = set; then : | |
8216 | enableval=$enable_rpath; : | |
8217 | else | |
8218 | enable_rpath=yes | |
8219 | fi | |
8220 | ||
8221 | ||
8222 | ||
8223 | ||
8224 | ||
8225 | ||
8226 | ||
8227 | ||
8228 | use_additional=yes | |
8229 | ||
8230 | acl_save_prefix="$prefix" | |
8231 | prefix="$acl_final_prefix" | |
8232 | acl_save_exec_prefix="$exec_prefix" | |
8233 | exec_prefix="$acl_final_exec_prefix" | |
8234 | ||
8235 | eval additional_includedir=\"$includedir\" | |
8236 | eval additional_libdir=\"$libdir\" | |
8237 | ||
8238 | exec_prefix="$acl_save_exec_prefix" | |
8239 | prefix="$acl_save_prefix" | |
77f120bf | 8240 | |
6c7a06a3 | 8241 | |
81ecdfbb RW |
8242 | # Check whether --with-libiconv-prefix was given. |
8243 | if test "${with_libiconv_prefix+set}" = set; then : | |
8244 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8245 | if test "X$withval" = "Xno"; then |
8246 | use_additional=no | |
8247 | else | |
8248 | if test "X$withval" = "X"; then | |
8249 | ||
8250 | acl_save_prefix="$prefix" | |
8251 | prefix="$acl_final_prefix" | |
8252 | acl_save_exec_prefix="$exec_prefix" | |
8253 | exec_prefix="$acl_final_exec_prefix" | |
8254 | ||
8255 | eval additional_includedir=\"$includedir\" | |
8256 | eval additional_libdir=\"$libdir\" | |
8257 | ||
8258 | exec_prefix="$acl_save_exec_prefix" | |
8259 | prefix="$acl_save_prefix" | |
8260 | ||
8261 | else | |
8262 | additional_includedir="$withval/include" | |
8263 | additional_libdir="$withval/lib" | |
8264 | fi | |
8265 | fi | |
6c7a06a3 | 8266 | |
81ecdfbb RW |
8267 | fi |
8268 | ||
016a3251 DD |
8269 | LIBICONV= |
8270 | LTLIBICONV= | |
8271 | INCICONV= | |
8272 | rpathdirs= | |
8273 | ltrpathdirs= | |
8274 | names_already_handled= | |
8275 | names_next_round='iconv ' | |
8276 | while test -n "$names_next_round"; do | |
8277 | names_this_round="$names_next_round" | |
8278 | names_next_round= | |
8279 | for name in $names_this_round; do | |
8280 | already_handled= | |
8281 | for n in $names_already_handled; do | |
8282 | if test "$n" = "$name"; then | |
8283 | already_handled=yes | |
8284 | break | |
8285 | fi | |
8286 | done | |
8287 | if test -z "$already_handled"; then | |
8288 | names_already_handled="$names_already_handled $name" | |
8289 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8290 | eval value=\"\$HAVE_LIB$uppername\" | |
8291 | if test -n "$value"; then | |
8292 | if test "$value" = yes; then | |
8293 | eval value=\"\$LIB$uppername\" | |
8294 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8295 | eval value=\"\$LTLIB$uppername\" | |
8296 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8297 | else | |
8298 | : | |
8299 | fi | |
8300 | else | |
8301 | found_dir= | |
8302 | found_la= | |
8303 | found_so= | |
8304 | found_a= | |
8305 | if test $use_additional = yes; then | |
8306 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8307 | found_dir="$additional_libdir" | |
8308 | found_so="$additional_libdir/lib$name.$shlibext" | |
8309 | if test -f "$additional_libdir/lib$name.la"; then | |
8310 | found_la="$additional_libdir/lib$name.la" | |
8311 | fi | |
8312 | else | |
8313 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8314 | found_dir="$additional_libdir" | |
8315 | found_a="$additional_libdir/lib$name.$libext" | |
8316 | if test -f "$additional_libdir/lib$name.la"; then | |
8317 | found_la="$additional_libdir/lib$name.la" | |
8318 | fi | |
8319 | fi | |
8320 | fi | |
8321 | fi | |
8322 | if test "X$found_dir" = "X"; then | |
8323 | for x in $LDFLAGS $LTLIBICONV; 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 | case "$x" in | |
8334 | -L*) | |
8335 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8336 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8337 | found_dir="$dir" | |
8338 | found_so="$dir/lib$name.$shlibext" | |
8339 | if test -f "$dir/lib$name.la"; then | |
8340 | found_la="$dir/lib$name.la" | |
8341 | fi | |
8342 | else | |
8343 | if test -f "$dir/lib$name.$libext"; then | |
8344 | found_dir="$dir" | |
8345 | found_a="$dir/lib$name.$libext" | |
8346 | if test -f "$dir/lib$name.la"; then | |
8347 | found_la="$dir/lib$name.la" | |
8348 | fi | |
8349 | fi | |
8350 | fi | |
8351 | ;; | |
8352 | esac | |
8353 | if test "X$found_dir" != "X"; then | |
8354 | break | |
8355 | fi | |
8356 | done | |
8357 | fi | |
8358 | if test "X$found_dir" != "X"; then | |
8359 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8360 | if test "X$found_so" != "X"; then | |
8361 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8362 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8363 | else | |
8364 | haveit= | |
8365 | for x in $ltrpathdirs; do | |
8366 | if test "X$x" = "X$found_dir"; then | |
8367 | haveit=yes | |
8368 | break | |
8369 | fi | |
8370 | done | |
8371 | if test -z "$haveit"; then | |
8372 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8373 | fi | |
8374 | if test "$hardcode_direct" = yes; then | |
8375 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8376 | else | |
8377 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8378 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8379 | haveit= | |
8380 | for x in $rpathdirs; do | |
8381 | if test "X$x" = "X$found_dir"; then | |
8382 | haveit=yes | |
8383 | break | |
8384 | fi | |
8385 | done | |
8386 | if test -z "$haveit"; then | |
8387 | rpathdirs="$rpathdirs $found_dir" | |
8388 | fi | |
8389 | else | |
8390 | haveit= | |
8391 | for x in $LDFLAGS $LIBICONV; do | |
8392 | ||
8393 | acl_save_prefix="$prefix" | |
8394 | prefix="$acl_final_prefix" | |
8395 | acl_save_exec_prefix="$exec_prefix" | |
8396 | exec_prefix="$acl_final_exec_prefix" | |
8397 | eval x=\"$x\" | |
8398 | exec_prefix="$acl_save_exec_prefix" | |
8399 | prefix="$acl_save_prefix" | |
8400 | ||
8401 | if test "X$x" = "X-L$found_dir"; then | |
8402 | haveit=yes | |
8403 | break | |
8404 | fi | |
8405 | done | |
8406 | if test -z "$haveit"; then | |
8407 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8408 | fi | |
8409 | if test "$hardcode_minus_L" != no; then | |
8410 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8411 | else | |
8412 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8413 | fi | |
8414 | fi | |
8415 | fi | |
8416 | fi | |
8417 | else | |
8418 | if test "X$found_a" != "X"; then | |
8419 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8420 | else | |
8421 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8422 | fi | |
8423 | fi | |
8424 | additional_includedir= | |
8425 | case "$found_dir" in | |
8426 | */lib | */lib/) | |
8427 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8428 | additional_includedir="$basedir/include" | |
8429 | ;; | |
8430 | esac | |
8431 | if test "X$additional_includedir" != "X"; then | |
8432 | if test "X$additional_includedir" != "X/usr/include"; then | |
8433 | haveit= | |
8434 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8435 | if test -n "$GCC"; then | |
8436 | case $host_os in | |
8437 | linux*) haveit=yes;; | |
8438 | esac | |
8439 | fi | |
8440 | fi | |
8441 | if test -z "$haveit"; then | |
8442 | for x in $CPPFLAGS $INCICONV; do | |
8443 | ||
8444 | acl_save_prefix="$prefix" | |
8445 | prefix="$acl_final_prefix" | |
8446 | acl_save_exec_prefix="$exec_prefix" | |
8447 | exec_prefix="$acl_final_exec_prefix" | |
8448 | eval x=\"$x\" | |
8449 | exec_prefix="$acl_save_exec_prefix" | |
8450 | prefix="$acl_save_prefix" | |
8451 | ||
8452 | if test "X$x" = "X-I$additional_includedir"; then | |
8453 | haveit=yes | |
8454 | break | |
8455 | fi | |
8456 | done | |
8457 | if test -z "$haveit"; then | |
8458 | if test -d "$additional_includedir"; then | |
8459 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8460 | fi | |
8461 | fi | |
8462 | fi | |
8463 | fi | |
8464 | fi | |
8465 | if test -n "$found_la"; then | |
8466 | save_libdir="$libdir" | |
8467 | case "$found_la" in | |
8468 | */* | *\\*) . "$found_la" ;; | |
8469 | *) . "./$found_la" ;; | |
8470 | esac | |
8471 | libdir="$save_libdir" | |
8472 | for dep in $dependency_libs; do | |
8473 | case "$dep" in | |
8474 | -L*) | |
8475 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8476 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8477 | haveit= | |
8478 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8479 | if test -n "$GCC"; then | |
8480 | case $host_os in | |
8481 | linux*) haveit=yes;; | |
8482 | esac | |
8483 | fi | |
8484 | fi | |
8485 | if test -z "$haveit"; then | |
8486 | haveit= | |
8487 | for x in $LDFLAGS $LIBICONV; do | |
8488 | ||
8489 | acl_save_prefix="$prefix" | |
8490 | prefix="$acl_final_prefix" | |
8491 | acl_save_exec_prefix="$exec_prefix" | |
8492 | exec_prefix="$acl_final_exec_prefix" | |
8493 | eval x=\"$x\" | |
8494 | exec_prefix="$acl_save_exec_prefix" | |
8495 | prefix="$acl_save_prefix" | |
8496 | ||
8497 | if test "X$x" = "X-L$additional_libdir"; then | |
8498 | haveit=yes | |
8499 | break | |
8500 | fi | |
8501 | done | |
8502 | if test -z "$haveit"; then | |
8503 | if test -d "$additional_libdir"; then | |
8504 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8505 | fi | |
8506 | fi | |
8507 | haveit= | |
8508 | for x in $LDFLAGS $LTLIBICONV; do | |
8509 | ||
8510 | acl_save_prefix="$prefix" | |
8511 | prefix="$acl_final_prefix" | |
8512 | acl_save_exec_prefix="$exec_prefix" | |
8513 | exec_prefix="$acl_final_exec_prefix" | |
8514 | eval x=\"$x\" | |
8515 | exec_prefix="$acl_save_exec_prefix" | |
8516 | prefix="$acl_save_prefix" | |
8517 | ||
8518 | if test "X$x" = "X-L$additional_libdir"; then | |
8519 | haveit=yes | |
8520 | break | |
8521 | fi | |
8522 | done | |
8523 | if test -z "$haveit"; then | |
8524 | if test -d "$additional_libdir"; then | |
8525 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8526 | fi | |
8527 | fi | |
8528 | fi | |
8529 | fi | |
8530 | ;; | |
8531 | -R*) | |
8532 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8533 | if test "$enable_rpath" != no; then | |
8534 | haveit= | |
8535 | for x in $rpathdirs; do | |
8536 | if test "X$x" = "X$dir"; then | |
8537 | haveit=yes | |
8538 | break | |
8539 | fi | |
8540 | done | |
8541 | if test -z "$haveit"; then | |
8542 | rpathdirs="$rpathdirs $dir" | |
8543 | fi | |
8544 | haveit= | |
8545 | for x in $ltrpathdirs; do | |
8546 | if test "X$x" = "X$dir"; then | |
8547 | haveit=yes | |
8548 | break | |
8549 | fi | |
8550 | done | |
8551 | if test -z "$haveit"; then | |
8552 | ltrpathdirs="$ltrpathdirs $dir" | |
8553 | fi | |
8554 | fi | |
8555 | ;; | |
8556 | -l*) | |
8557 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8558 | ;; | |
8559 | *.la) | |
8560 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8561 | ;; | |
8562 | *) | |
8563 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8564 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8565 | ;; | |
8566 | esac | |
8567 | done | |
8568 | fi | |
8569 | else | |
8570 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8571 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8572 | fi | |
8573 | fi | |
8574 | fi | |
8575 | done | |
8576 | done | |
8577 | if test "X$rpathdirs" != "X"; then | |
8578 | if test -n "$hardcode_libdir_separator"; then | |
8579 | alldirs= | |
8580 | for found_dir in $rpathdirs; do | |
8581 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8582 | done | |
8583 | acl_save_libdir="$libdir" | |
8584 | libdir="$alldirs" | |
8585 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8586 | libdir="$acl_save_libdir" | |
8587 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8588 | else | |
8589 | for found_dir in $rpathdirs; do | |
8590 | acl_save_libdir="$libdir" | |
8591 | libdir="$found_dir" | |
8592 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8593 | libdir="$acl_save_libdir" | |
8594 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8595 | done | |
8596 | fi | |
8597 | fi | |
8598 | if test "X$ltrpathdirs" != "X"; then | |
8599 | for found_dir in $ltrpathdirs; do | |
8600 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8601 | done | |
8602 | fi | |
8603 | ||
8604 | ||
8605 | ||
8606 | ||
8607 | ||
6c7a06a3 | 8608 | |
6c7a06a3 | 8609 | |
81ecdfbb RW |
8610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8611 | $as_echo_n "checking for iconv... " >&6; } | |
8612 | if test "${am_cv_func_iconv+set}" = set; then : | |
8613 | $as_echo_n "(cached) " >&6 | |
d542061a | 8614 | else |
6c7a06a3 TT |
8615 | |
8616 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8617 | am_cv_lib_iconv=no | |
016a3251 DD |
8618 | am_save_CPPFLAGS="$CPPFLAGS" |
8619 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8621 | /* end confdefs.h. */ |
6c7a06a3 TT |
8622 | #include <stdlib.h> |
8623 | #include <iconv.h> | |
d542061a UW |
8624 | int |
8625 | main () | |
8626 | { | |
6c7a06a3 | 8627 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8628 | iconv(cd,NULL,NULL,NULL,NULL); |
8629 | iconv_close(cd); | |
d542061a UW |
8630 | ; |
8631 | return 0; | |
8632 | } | |
8633 | _ACEOF | |
81ecdfbb | 8634 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8635 | am_cv_func_iconv=yes |
d542061a | 8636 | fi |
81ecdfbb RW |
8637 | rm -f core conftest.err conftest.$ac_objext \ |
8638 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8639 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8640 | |
016a3251 DD |
8641 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8642 | for _libs in .libs _libs; do | |
8643 | am_save_CPPFLAGS="$CPPFLAGS" | |
8644 | am_save_LIBS="$LIBS" | |
8645 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8646 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8648 | /* end confdefs.h. */ |
6c7a06a3 TT |
8649 | #include <stdlib.h> |
8650 | #include <iconv.h> | |
d542061a UW |
8651 | int |
8652 | main () | |
8653 | { | |
6c7a06a3 | 8654 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8655 | iconv(cd,NULL,NULL,NULL,NULL); |
8656 | iconv_close(cd); | |
d542061a UW |
8657 | ; |
8658 | return 0; | |
8659 | } | |
8660 | _ACEOF | |
81ecdfbb | 8661 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8662 | INCICONV="-I../libiconv/include" |
8663 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8664 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8665 | am_cv_lib_iconv=yes | |
8666 | am_cv_func_iconv=yes | |
d542061a | 8667 | fi |
81ecdfbb RW |
8668 | rm -f core conftest.err conftest.$ac_objext \ |
8669 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8670 | CPPFLAGS="$am_save_CPPFLAGS" |
8671 | LIBS="$am_save_LIBS" | |
8672 | if test "$am_cv_func_iconv" = "yes"; then | |
8673 | break | |
8674 | fi | |
8675 | done | |
77f120bf | 8676 | fi |
94ae1714 | 8677 | |
4edb1e84 | 8678 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8679 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8680 | am_save_LIBS="$LIBS" |
016a3251 DD |
8681 | CPPFLAGS="$LIBS $INCICONV" |
8682 | LIBS="$LIBS $LIBICONV" | |
81ecdfbb | 8683 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8684 | /* end confdefs.h. */ |
6c7a06a3 TT |
8685 | #include <stdlib.h> |
8686 | #include <iconv.h> | |
bec39cab AC |
8687 | int |
8688 | main () | |
8689 | { | |
6c7a06a3 TT |
8690 | iconv_t cd = iconv_open("",""); |
8691 | iconv(cd,NULL,NULL,NULL,NULL); | |
8692 | iconv_close(cd); | |
bec39cab AC |
8693 | ; |
8694 | return 0; | |
8695 | } | |
8696 | _ACEOF | |
81ecdfbb | 8697 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8698 | am_cv_lib_iconv=yes |
6c7a06a3 | 8699 | am_cv_func_iconv=yes |
627af7ea | 8700 | fi |
81ecdfbb RW |
8701 | rm -f core conftest.err conftest.$ac_objext \ |
8702 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8703 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8704 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8705 | fi |
8706 | ||
8707 | fi | |
81ecdfbb RW |
8708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8709 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8710 | if test "$am_cv_func_iconv" = yes; then |
8711 | ||
8712 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8713 | |
016a3251 | 8714 | fi |
fc3b640d | 8715 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8716 | |
8717 | for element in $INCICONV; do | |
8718 | haveit= | |
8719 | for x in $CPPFLAGS; do | |
8720 | ||
8721 | acl_save_prefix="$prefix" | |
8722 | prefix="$acl_final_prefix" | |
8723 | acl_save_exec_prefix="$exec_prefix" | |
8724 | exec_prefix="$acl_final_exec_prefix" | |
8725 | eval x=\"$x\" | |
8726 | exec_prefix="$acl_save_exec_prefix" | |
8727 | prefix="$acl_save_prefix" | |
8728 | ||
8729 | if test "X$x" = "X$element"; then | |
8730 | haveit=yes | |
8731 | break | |
8732 | fi | |
8733 | done | |
8734 | if test -z "$haveit"; then | |
8735 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8736 | fi | |
8737 | done | |
8738 | ||
8739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8740 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8742 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8743 | else |
016a3251 DD |
8744 | LIBICONV= |
8745 | LTLIBICONV= | |
fc3b640d | 8746 | fi |
94ae1714 | 8747 | |
6c7a06a3 | 8748 | |
6c7a06a3 | 8749 | |
016a3251 | 8750 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8752 | $as_echo_n "checking for iconv declaration... " >&6; } | |
8753 | if test "${am_cv_proto_iconv+set}" = set; then : | |
8754 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8755 | else |
8756 | ||
81ecdfbb | 8757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8758 | /* end confdefs.h. */ |
8759 | ||
6c7a06a3 TT |
8760 | #include <stdlib.h> |
8761 | #include <iconv.h> | |
8762 | extern | |
b4e70030 | 8763 | #ifdef __cplusplus |
6c7a06a3 | 8764 | "C" |
b4e70030 | 8765 | #endif |
6c7a06a3 TT |
8766 | #if defined(__STDC__) || defined(__cplusplus) |
8767 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8768 | #else | |
8769 | size_t iconv(); | |
8770 | #endif | |
8771 | ||
b4e70030 JB |
8772 | int |
8773 | main () | |
8774 | { | |
6c7a06a3 | 8775 | |
b4e70030 JB |
8776 | ; |
8777 | return 0; | |
8778 | } | |
8779 | _ACEOF | |
81ecdfbb | 8780 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8781 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8782 | else |
81ecdfbb | 8783 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8784 | fi |
81ecdfbb | 8785 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8786 | 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);" |
8787 | fi | |
8788 | ||
8789 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8791 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8792 | $as_echo "${ac_t:- |
8793 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8794 | |
8795 | cat >>confdefs.h <<_ACEOF | |
8796 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8797 | _ACEOF | |
8798 | ||
8799 | fi | |
6c7a06a3 TT |
8800 | |
8801 | ||
478aac75 DE |
8802 | # GDB may fork/exec the iconv program to get the list of supported character |
8803 | # sets. Allow the user to specify where to find it. | |
8804 | # There are several factors affecting the choice of option name: | |
8805 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
8806 | # the build-time location of libiconv files. | |
8807 | # - The program we need to find is iconv, which comes with glibc. The user | |
8808 | # doesn't necessarily have libiconv installed. Therefore naming this | |
8809 | # --with-libiconv-foo feels wrong. | |
8810 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
8811 | # defined to work on directories not files (though it really doesn't know | |
8812 | # the difference). | |
8813 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
8814 | # with --with-libiconv-prefix. | |
8815 | # Putting these together is why the option name is --with-iconv-bin. | |
8816 | ||
8817 | ||
8818 | # Check whether --with-iconv-bin was given. | |
8819 | if test "${with_iconv_bin+set}" = set; then : | |
8820 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
8821 | ||
8822 | cat >>confdefs.h <<_ACEOF | |
8823 | #define ICONV_BIN "${iconv_bin}" | |
8824 | _ACEOF | |
8825 | ||
8826 | ||
8827 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8828 | if test "x$prefix" = xNONE; then | |
8829 | test_prefix=/usr/local | |
8830 | else | |
8831 | test_prefix=$prefix | |
8832 | fi | |
8833 | else | |
8834 | test_prefix=$exec_prefix | |
8835 | fi | |
8836 | value=0 | |
8837 | case ${iconv_bin} in | |
8838 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8839 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8840 | value=1 | |
8841 | ;; | |
8842 | esac | |
8843 | ||
8844 | cat >>confdefs.h <<_ACEOF | |
8845 | #define ICONV_BIN_RELOCATABLE $value | |
8846 | _ACEOF | |
8847 | ||
8848 | ||
8849 | ||
8850 | fi | |
8851 | ||
8852 | ||
cb01cfba | 8853 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 8854 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
8855 | prefer_curses=yes |
8856 | fi | |
8857 | ||
8858 | curses_found=no | |
8859 | if test x"$prefer_curses" = xyes; then | |
8860 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
8861 | # curses library because the latter might not provide all the | |
8862 | # functionality we need. However, this leads to problems on systems | |
8863 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
8864 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
8865 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
8866 | # a situation. | |
81ecdfbb RW |
8867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
8868 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
8869 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8870 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8871 | else |
8872 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8874 | /* end confdefs.h. */ |
8875 | ||
81ecdfbb RW |
8876 | /* Override any GCC internal prototype to avoid an error. |
8877 | Use char because int might match the return type of a GCC | |
8878 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8879 | #ifdef __cplusplus |
8880 | extern "C" | |
8881 | #endif | |
6c7a06a3 TT |
8882 | char waddstr (); |
8883 | int | |
8884 | main () | |
8885 | { | |
81ecdfbb | 8886 | return waddstr (); |
6c7a06a3 TT |
8887 | ; |
8888 | return 0; | |
8889 | } | |
8890 | _ACEOF | |
81ecdfbb RW |
8891 | for ac_lib in '' ncurses cursesX curses; do |
8892 | if test -z "$ac_lib"; then | |
8893 | ac_res="none required" | |
8894 | else | |
8895 | ac_res=-l$ac_lib | |
8896 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8897 | fi | |
8898 | if ac_fn_c_try_link "$LINENO"; then : | |
8899 | ac_cv_search_waddstr=$ac_res | |
8900 | fi | |
8901 | rm -f core conftest.err conftest.$ac_objext \ | |
8902 | conftest$ac_exeext | |
8903 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8904 | break | |
8905 | fi | |
8906 | done | |
8907 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8908 | ||
6c7a06a3 | 8909 | else |
81ecdfbb RW |
8910 | ac_cv_search_waddstr=no |
8911 | fi | |
8912 | rm conftest.$ac_ext | |
8913 | LIBS=$ac_func_search_save_LIBS | |
8914 | fi | |
8915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
8916 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
8917 | ac_res=$ac_cv_search_waddstr | |
8918 | if test "$ac_res" != no; then : | |
8919 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
8920 | |
8921 | fi | |
8922 | ||
8923 | ||
cb01cfba JB |
8924 | if test "$ac_cv_search_waddstr" != no; then |
8925 | curses_found=yes | |
8926 | fi | |
8927 | fi | |
8928 | ||
8929 | # Check whether we should enable the TUI, but only do so if we really | |
8930 | # can. | |
8931 | if test x"$enable_tui" != xno; then | |
8932 | if test -d $srcdir/tui; then | |
8933 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
8934 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
8935 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
8936 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
8937 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
8938 | else |
8939 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 8940 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 8941 | else |
81ecdfbb RW |
8942 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
8943 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
8944 | fi |
8945 | fi | |
8946 | fi | |
8947 | fi | |
8948 | ||
8949 | # Since GDB uses Readline, we need termcap functionality. In many | |
8950 | # cases this will be provided by the curses library, but some systems | |
8951 | # have a seperate termcap library, or no curses library at all. | |
8952 | ||
8953 | case $host_os in | |
8954 | cygwin*) | |
8955 | if test -d $srcdir/libtermcap; then | |
8956 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
8957 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
8958 | fi ;; | |
8959 | go32* | *djgpp*) | |
8960 | ac_cv_search_tgetent="none required" | |
8961 | ;; | |
6c7a06a3 TT |
8962 | esac |
8963 | ||
8964 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
8965 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
8966 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
8967 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8968 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8969 | else |
8970 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8971 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8972 | /* end confdefs.h. */ |
8973 | ||
81ecdfbb RW |
8974 | /* Override any GCC internal prototype to avoid an error. |
8975 | Use char because int might match the return type of a GCC | |
8976 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8977 | #ifdef __cplusplus |
8978 | extern "C" | |
8979 | #endif | |
6c7a06a3 TT |
8980 | char tgetent (); |
8981 | int | |
8982 | main () | |
8983 | { | |
81ecdfbb | 8984 | return tgetent (); |
6c7a06a3 TT |
8985 | ; |
8986 | return 0; | |
8987 | } | |
8988 | _ACEOF | |
81ecdfbb RW |
8989 | for ac_lib in '' termcap tinfo curses ncurses; do |
8990 | if test -z "$ac_lib"; then | |
8991 | ac_res="none required" | |
8992 | else | |
8993 | ac_res=-l$ac_lib | |
6c7a06a3 | 8994 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8995 | fi |
8996 | if ac_fn_c_try_link "$LINENO"; then : | |
8997 | ac_cv_search_tgetent=$ac_res | |
8998 | fi | |
8999 | rm -f core conftest.err conftest.$ac_objext \ | |
9000 | conftest$ac_exeext | |
9001 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9002 | break | |
9003 | fi | |
9004 | done | |
9005 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 9006 | |
6c7a06a3 | 9007 | else |
81ecdfbb | 9008 | ac_cv_search_tgetent=no |
6c7a06a3 | 9009 | fi |
81ecdfbb | 9010 | rm conftest.$ac_ext |
6c7a06a3 TT |
9011 | LIBS=$ac_func_search_save_LIBS |
9012 | fi | |
81ecdfbb RW |
9013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9014 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9015 | ac_res=$ac_cv_search_tgetent | |
9016 | if test "$ac_res" != no; then : | |
9017 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9018 | |
06825bd1 MK |
9019 | fi |
9020 | ||
06825bd1 | 9021 | |
bec39cab | 9022 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 9023 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
9024 | fi |
9025 | ||
3841debe | 9026 | |
81ecdfbb RW |
9027 | # Check whether --with-system-readline was given. |
9028 | if test "${with_system_readline+set}" = set; then : | |
9029 | withval=$with_system_readline; | |
9030 | fi | |
6a30b0a5 | 9031 | |
6a30b0a5 AS |
9032 | |
9033 | if test "$with_system_readline" = yes; then | |
9034 | READLINE=-lreadline | |
9035 | READLINE_DEPS= | |
9036 | READLINE_CFLAGS= | |
39037522 | 9037 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9038 | else |
9039 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9040 | READLINE_DEPS='$(READLINE)' | |
9041 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9042 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9043 | fi |
9044 | ||
9045 | ||
9046 | ||
9047 | ||
9048 | ||
f997c383 SD |
9049 | # Generate jit-reader.h |
9050 | ||
9051 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9052 | TARGET_PTR= | |
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 long long" >&5 | |
9059 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
9060 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
9061 | $as_echo_n "(cached) " >&6 | |
9062 | else | |
9063 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9064 | ||
9065 | else | |
9066 | if test "$ac_cv_type_unsigned_long_long" = 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 long long) | |
9071 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9072 | else | |
9073 | ac_cv_sizeof_unsigned_long_long=0 | |
9074 | fi | |
9075 | fi | |
9076 | ||
9077 | fi | |
9078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9079 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9080 | ||
9081 | ||
9082 | ||
9083 | cat >>confdefs.h <<_ACEOF | |
9084 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9085 | _ACEOF | |
9086 | ||
9087 | ||
9088 | # The cast to long int works around a bug in the HP C Compiler | |
9089 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9090 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9091 | # This bug is HP SR number 8606223364. | |
9092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9093 | $as_echo_n "checking size of unsigned long... " >&6; } | |
9094 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
9095 | $as_echo_n "(cached) " >&6 | |
9096 | else | |
9097 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9098 | ||
9099 | else | |
9100 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9101 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9102 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9103 | { as_fn_set_status 77 | |
9104 | as_fn_error "cannot compute sizeof (unsigned long) | |
9105 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9106 | else | |
9107 | ac_cv_sizeof_unsigned_long=0 | |
9108 | fi | |
9109 | fi | |
9110 | ||
9111 | fi | |
9112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9113 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9114 | ||
9115 | ||
9116 | ||
9117 | cat >>confdefs.h <<_ACEOF | |
9118 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9119 | _ACEOF | |
9120 | ||
9121 | ||
9122 | # The cast to long int works around a bug in the HP C Compiler | |
9123 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9124 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9125 | # This bug is HP SR number 8606223364. | |
9126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9127 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
9128 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
9129 | $as_echo_n "(cached) " >&6 | |
9130 | else | |
9131 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9132 | ||
9133 | else | |
9134 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9135 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9136 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9137 | { as_fn_set_status 77 | |
9138 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
9139 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9140 | else | |
9141 | ac_cv_sizeof_unsigned___int128=0 | |
9142 | fi | |
9143 | fi | |
9144 | ||
9145 | fi | |
9146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9147 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9148 | ||
9149 | ||
9150 | ||
9151 | cat >>confdefs.h <<_ACEOF | |
9152 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9153 | _ACEOF | |
9154 | ||
9155 | ||
9156 | ||
9157 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9158 | TARGET_PTR="unsigned long" | |
9159 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9160 | TARGET_PTR="unsigned long long" | |
9161 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9162 | TARGET_PTR="unsigned __int128" | |
9163 | else | |
9164 | TARGET_PTR="unsigned long" | |
9165 | fi | |
9166 | ||
9167 | ||
9168 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9169 | ||
9170 | ||
a2d08b9e SD |
9171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9172 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
9173 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9174 | $as_echo_n "(cached) " >&6 | |
9175 | else | |
9176 | ac_func_search_save_LIBS=$LIBS | |
9177 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9178 | /* end confdefs.h. */ | |
9179 | ||
9180 | /* Override any GCC internal prototype to avoid an error. | |
9181 | Use char because int might match the return type of a GCC | |
9182 | builtin and then its argument prototype would still apply. */ | |
9183 | #ifdef __cplusplus | |
9184 | extern "C" | |
9185 | #endif | |
9186 | char dlopen (); | |
9187 | int | |
9188 | main () | |
9189 | { | |
9190 | return dlopen (); | |
9191 | ; | |
9192 | return 0; | |
9193 | } | |
9194 | _ACEOF | |
9195 | for ac_lib in '' dl; do | |
9196 | if test -z "$ac_lib"; then | |
9197 | ac_res="none required" | |
9198 | else | |
9199 | ac_res=-l$ac_lib | |
9200 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9201 | fi | |
9202 | if ac_fn_c_try_link "$LINENO"; then : | |
9203 | ac_cv_search_dlopen=$ac_res | |
9204 | fi | |
9205 | rm -f core conftest.err conftest.$ac_objext \ | |
9206 | conftest$ac_exeext | |
9207 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9208 | break | |
9209 | fi | |
9210 | done | |
9211 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
9212 | ||
9213 | else | |
9214 | ac_cv_search_dlopen=no | |
9215 | fi | |
9216 | rm conftest.$ac_ext | |
9217 | LIBS=$ac_func_search_save_LIBS | |
9218 | fi | |
9219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9220 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9221 | ac_res=$ac_cv_search_dlopen | |
9222 | if test "$ac_res" != no; then : | |
9223 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9224 | ||
9225 | fi | |
9226 | ||
9227 | ||
39037522 | 9228 | |
b8e0a31c SD |
9229 | |
9230 | # Check whether --with-jit-reader-dir was given. | |
9231 | if test "${with_jit_reader_dir+set}" = set; then : | |
9232 | withval=$with_jit_reader_dir; | |
9233 | JIT_READER_DIR=$withval | |
9234 | else | |
9235 | JIT_READER_DIR=${libdir}/gdb | |
9236 | fi | |
9237 | ||
9238 | ||
9239 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9240 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9241 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9242 | ac_define_dir=`eval echo $ac_define_dir` | |
9243 | ||
9244 | cat >>confdefs.h <<_ACEOF | |
9245 | #define JIT_READER_DIR "$ac_define_dir" | |
9246 | _ACEOF | |
9247 | ||
9248 | ||
9249 | ||
9250 | ||
9251 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9252 | if test "x$prefix" = xNONE; then | |
9253 | test_prefix=/usr/local | |
9254 | else | |
9255 | test_prefix=$prefix | |
9256 | fi | |
9257 | else | |
9258 | test_prefix=$exec_prefix | |
9259 | fi | |
9260 | value=0 | |
9261 | case ${ac_define_dir} in | |
9262 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9263 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9264 | value=1 | |
9265 | ;; | |
9266 | esac | |
9267 | ||
9268 | cat >>confdefs.h <<_ACEOF | |
9269 | #define JIT_READER_DIR_RELOCATABLE $value | |
9270 | _ACEOF | |
9271 | ||
9272 | ||
9273 | ||
9274 | ||
9275 | ||
81ecdfbb RW |
9276 | # Check whether --with-expat was given. |
9277 | if test "${with_expat+set}" = set; then : | |
9278 | withval=$with_expat; | |
5c39566f DJ |
9279 | else |
9280 | with_expat=auto | |
81ecdfbb RW |
9281 | fi |
9282 | ||
9283 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9284 | $as_echo_n "checking whether to use expat... " >&6; } | |
9285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9286 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9287 | |
9288 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9289 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9290 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9291 | HAVE_LIBEXPAT=no |
9292 | else | |
9293 | ||
3841debe DJ |
9294 | |
9295 | ||
9296 | ||
9297 | ||
9298 | ||
9299 | ||
9300 | ||
9301 | use_additional=yes | |
9302 | ||
9303 | acl_save_prefix="$prefix" | |
9304 | prefix="$acl_final_prefix" | |
9305 | acl_save_exec_prefix="$exec_prefix" | |
9306 | exec_prefix="$acl_final_exec_prefix" | |
9307 | ||
9308 | eval additional_includedir=\"$includedir\" | |
9309 | eval additional_libdir=\"$libdir\" | |
9310 | ||
9311 | exec_prefix="$acl_save_exec_prefix" | |
9312 | prefix="$acl_save_prefix" | |
9313 | ||
9314 | ||
81ecdfbb RW |
9315 | # Check whether --with-libexpat-prefix was given. |
9316 | if test "${with_libexpat_prefix+set}" = set; then : | |
9317 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9318 | if test "X$withval" = "Xno"; then |
9319 | use_additional=no | |
9320 | else | |
9321 | if test "X$withval" = "X"; then | |
9322 | ||
9323 | acl_save_prefix="$prefix" | |
9324 | prefix="$acl_final_prefix" | |
9325 | acl_save_exec_prefix="$exec_prefix" | |
9326 | exec_prefix="$acl_final_exec_prefix" | |
9327 | ||
9328 | eval additional_includedir=\"$includedir\" | |
9329 | eval additional_libdir=\"$libdir\" | |
9330 | ||
9331 | exec_prefix="$acl_save_exec_prefix" | |
9332 | prefix="$acl_save_prefix" | |
9333 | ||
9334 | else | |
9335 | additional_includedir="$withval/include" | |
9336 | additional_libdir="$withval/lib" | |
9337 | fi | |
9338 | fi | |
9339 | ||
81ecdfbb RW |
9340 | fi |
9341 | ||
3841debe DJ |
9342 | LIBEXPAT= |
9343 | LTLIBEXPAT= | |
9344 | INCEXPAT= | |
9345 | rpathdirs= | |
9346 | ltrpathdirs= | |
9347 | names_already_handled= | |
9348 | names_next_round='expat ' | |
9349 | while test -n "$names_next_round"; do | |
9350 | names_this_round="$names_next_round" | |
9351 | names_next_round= | |
9352 | for name in $names_this_round; do | |
9353 | already_handled= | |
9354 | for n in $names_already_handled; do | |
9355 | if test "$n" = "$name"; then | |
9356 | already_handled=yes | |
9357 | break | |
9358 | fi | |
9359 | done | |
9360 | if test -z "$already_handled"; then | |
9361 | names_already_handled="$names_already_handled $name" | |
9362 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9363 | eval value=\"\$HAVE_LIB$uppername\" | |
9364 | if test -n "$value"; then | |
9365 | if test "$value" = yes; then | |
9366 | eval value=\"\$LIB$uppername\" | |
9367 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9368 | eval value=\"\$LTLIB$uppername\" | |
9369 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9370 | else | |
9371 | : | |
9372 | fi | |
9373 | else | |
9374 | found_dir= | |
9375 | found_la= | |
9376 | found_so= | |
9377 | found_a= | |
9378 | if test $use_additional = yes; then | |
9379 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9380 | found_dir="$additional_libdir" | |
9381 | found_so="$additional_libdir/lib$name.$shlibext" | |
9382 | if test -f "$additional_libdir/lib$name.la"; then | |
9383 | found_la="$additional_libdir/lib$name.la" | |
9384 | fi | |
9385 | else | |
9386 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9387 | found_dir="$additional_libdir" | |
9388 | found_a="$additional_libdir/lib$name.$libext" | |
9389 | if test -f "$additional_libdir/lib$name.la"; then | |
9390 | found_la="$additional_libdir/lib$name.la" | |
9391 | fi | |
9392 | fi | |
9393 | fi | |
9394 | fi | |
9395 | if test "X$found_dir" = "X"; then | |
9396 | for x in $LDFLAGS $LTLIBEXPAT; 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 | case "$x" in | |
9407 | -L*) | |
9408 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9409 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9410 | found_dir="$dir" | |
9411 | found_so="$dir/lib$name.$shlibext" | |
9412 | if test -f "$dir/lib$name.la"; then | |
9413 | found_la="$dir/lib$name.la" | |
9414 | fi | |
9415 | else | |
9416 | if test -f "$dir/lib$name.$libext"; then | |
9417 | found_dir="$dir" | |
9418 | found_a="$dir/lib$name.$libext" | |
9419 | if test -f "$dir/lib$name.la"; then | |
9420 | found_la="$dir/lib$name.la" | |
9421 | fi | |
9422 | fi | |
9423 | fi | |
9424 | ;; | |
9425 | esac | |
9426 | if test "X$found_dir" != "X"; then | |
9427 | break | |
9428 | fi | |
9429 | done | |
9430 | fi | |
9431 | if test "X$found_dir" != "X"; then | |
9432 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9433 | if test "X$found_so" != "X"; then | |
9434 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9435 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9436 | else | |
9437 | haveit= | |
9438 | for x in $ltrpathdirs; do | |
9439 | if test "X$x" = "X$found_dir"; then | |
9440 | haveit=yes | |
9441 | break | |
9442 | fi | |
9443 | done | |
9444 | if test -z "$haveit"; then | |
9445 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9446 | fi | |
9447 | if test "$hardcode_direct" = yes; then | |
9448 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9449 | else | |
9450 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9451 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9452 | haveit= | |
9453 | for x in $rpathdirs; do | |
9454 | if test "X$x" = "X$found_dir"; then | |
9455 | haveit=yes | |
9456 | break | |
9457 | fi | |
9458 | done | |
9459 | if test -z "$haveit"; then | |
9460 | rpathdirs="$rpathdirs $found_dir" | |
9461 | fi | |
9462 | else | |
9463 | haveit= | |
9464 | for x in $LDFLAGS $LIBEXPAT; do | |
9465 | ||
9466 | acl_save_prefix="$prefix" | |
9467 | prefix="$acl_final_prefix" | |
9468 | acl_save_exec_prefix="$exec_prefix" | |
9469 | exec_prefix="$acl_final_exec_prefix" | |
9470 | eval x=\"$x\" | |
9471 | exec_prefix="$acl_save_exec_prefix" | |
9472 | prefix="$acl_save_prefix" | |
9473 | ||
9474 | if test "X$x" = "X-L$found_dir"; then | |
9475 | haveit=yes | |
9476 | break | |
9477 | fi | |
9478 | done | |
9479 | if test -z "$haveit"; then | |
9480 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9481 | fi | |
9482 | if test "$hardcode_minus_L" != no; then | |
9483 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9484 | else | |
9485 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9486 | fi | |
9487 | fi | |
9488 | fi | |
9489 | fi | |
9490 | else | |
9491 | if test "X$found_a" != "X"; then | |
9492 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9493 | else | |
9494 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9495 | fi | |
9496 | fi | |
9497 | additional_includedir= | |
9498 | case "$found_dir" in | |
9499 | */lib | */lib/) | |
9500 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9501 | additional_includedir="$basedir/include" | |
9502 | ;; | |
9503 | esac | |
9504 | if test "X$additional_includedir" != "X"; then | |
9505 | if test "X$additional_includedir" != "X/usr/include"; then | |
9506 | haveit= | |
9507 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9508 | if test -n "$GCC"; then | |
9509 | case $host_os in | |
9510 | linux*) haveit=yes;; | |
9511 | esac | |
9512 | fi | |
9513 | fi | |
9514 | if test -z "$haveit"; then | |
9515 | for x in $CPPFLAGS $INCEXPAT; do | |
9516 | ||
9517 | acl_save_prefix="$prefix" | |
9518 | prefix="$acl_final_prefix" | |
9519 | acl_save_exec_prefix="$exec_prefix" | |
9520 | exec_prefix="$acl_final_exec_prefix" | |
9521 | eval x=\"$x\" | |
9522 | exec_prefix="$acl_save_exec_prefix" | |
9523 | prefix="$acl_save_prefix" | |
9524 | ||
9525 | if test "X$x" = "X-I$additional_includedir"; then | |
9526 | haveit=yes | |
9527 | break | |
9528 | fi | |
9529 | done | |
9530 | if test -z "$haveit"; then | |
9531 | if test -d "$additional_includedir"; then | |
9532 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9533 | fi | |
9534 | fi | |
9535 | fi | |
9536 | fi | |
9537 | fi | |
9538 | if test -n "$found_la"; then | |
9539 | save_libdir="$libdir" | |
9540 | case "$found_la" in | |
9541 | */* | *\\*) . "$found_la" ;; | |
9542 | *) . "./$found_la" ;; | |
9543 | esac | |
9544 | libdir="$save_libdir" | |
9545 | for dep in $dependency_libs; do | |
9546 | case "$dep" in | |
9547 | -L*) | |
9548 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9549 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9550 | haveit= | |
9551 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9552 | if test -n "$GCC"; then | |
9553 | case $host_os in | |
9554 | linux*) haveit=yes;; | |
9555 | esac | |
9556 | fi | |
9557 | fi | |
9558 | if test -z "$haveit"; then | |
9559 | haveit= | |
9560 | for x in $LDFLAGS $LIBEXPAT; do | |
9561 | ||
9562 | acl_save_prefix="$prefix" | |
9563 | prefix="$acl_final_prefix" | |
9564 | acl_save_exec_prefix="$exec_prefix" | |
9565 | exec_prefix="$acl_final_exec_prefix" | |
9566 | eval x=\"$x\" | |
9567 | exec_prefix="$acl_save_exec_prefix" | |
9568 | prefix="$acl_save_prefix" | |
9569 | ||
9570 | if test "X$x" = "X-L$additional_libdir"; then | |
9571 | haveit=yes | |
9572 | break | |
9573 | fi | |
9574 | done | |
9575 | if test -z "$haveit"; then | |
9576 | if test -d "$additional_libdir"; then | |
9577 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9578 | fi | |
9579 | fi | |
9580 | haveit= | |
9581 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9582 | ||
9583 | acl_save_prefix="$prefix" | |
9584 | prefix="$acl_final_prefix" | |
9585 | acl_save_exec_prefix="$exec_prefix" | |
9586 | exec_prefix="$acl_final_exec_prefix" | |
9587 | eval x=\"$x\" | |
9588 | exec_prefix="$acl_save_exec_prefix" | |
9589 | prefix="$acl_save_prefix" | |
9590 | ||
9591 | if test "X$x" = "X-L$additional_libdir"; then | |
9592 | haveit=yes | |
9593 | break | |
9594 | fi | |
9595 | done | |
9596 | if test -z "$haveit"; then | |
9597 | if test -d "$additional_libdir"; then | |
9598 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9599 | fi | |
9600 | fi | |
9601 | fi | |
9602 | fi | |
9603 | ;; | |
9604 | -R*) | |
9605 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9606 | if test "$enable_rpath" != no; then | |
9607 | haveit= | |
9608 | for x in $rpathdirs; do | |
9609 | if test "X$x" = "X$dir"; then | |
9610 | haveit=yes | |
9611 | break | |
9612 | fi | |
9613 | done | |
9614 | if test -z "$haveit"; then | |
9615 | rpathdirs="$rpathdirs $dir" | |
9616 | fi | |
9617 | haveit= | |
9618 | for x in $ltrpathdirs; do | |
9619 | if test "X$x" = "X$dir"; then | |
9620 | haveit=yes | |
9621 | break | |
9622 | fi | |
9623 | done | |
9624 | if test -z "$haveit"; then | |
9625 | ltrpathdirs="$ltrpathdirs $dir" | |
9626 | fi | |
9627 | fi | |
9628 | ;; | |
9629 | -l*) | |
9630 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9631 | ;; | |
9632 | *.la) | |
9633 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9634 | ;; | |
9635 | *) | |
9636 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9637 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9638 | ;; | |
81ecdfbb RW |
9639 | esac |
9640 | done | |
9641 | fi | |
9642 | else | |
9643 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9644 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9645 | fi | |
9646 | fi | |
9647 | fi | |
9648 | done | |
9649 | done | |
9650 | if test "X$rpathdirs" != "X"; then | |
9651 | if test -n "$hardcode_libdir_separator"; then | |
9652 | alldirs= | |
9653 | for found_dir in $rpathdirs; do | |
9654 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9655 | done | |
9656 | acl_save_libdir="$libdir" | |
9657 | libdir="$alldirs" | |
9658 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9659 | libdir="$acl_save_libdir" | |
9660 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9661 | else | |
9662 | for found_dir in $rpathdirs; do | |
9663 | acl_save_libdir="$libdir" | |
9664 | libdir="$found_dir" | |
9665 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9666 | libdir="$acl_save_libdir" | |
9667 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9668 | done | |
9669 | fi | |
9670 | fi | |
9671 | if test "X$ltrpathdirs" != "X"; then | |
9672 | for found_dir in $ltrpathdirs; do | |
9673 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9674 | done | |
9675 | fi | |
a9322a30 TT |
9676 | |
9677 | ||
81ecdfbb | 9678 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9679 | |
81ecdfbb RW |
9680 | for element in $INCEXPAT; do |
9681 | haveit= | |
9682 | for x in $CPPFLAGS; do | |
a9322a30 | 9683 | |
81ecdfbb RW |
9684 | acl_save_prefix="$prefix" |
9685 | prefix="$acl_final_prefix" | |
9686 | acl_save_exec_prefix="$exec_prefix" | |
9687 | exec_prefix="$acl_final_exec_prefix" | |
9688 | eval x=\"$x\" | |
9689 | exec_prefix="$acl_save_exec_prefix" | |
9690 | prefix="$acl_save_prefix" | |
a8111142 | 9691 | |
81ecdfbb RW |
9692 | if test "X$x" = "X$element"; then |
9693 | haveit=yes | |
9694 | break | |
9695 | fi | |
9696 | done | |
9697 | if test -z "$haveit"; then | |
9698 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9699 | fi | |
9700 | done | |
a9322a30 TT |
9701 | |
9702 | ||
81ecdfbb RW |
9703 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9704 | $as_echo_n "checking for libexpat... " >&6; } | |
9705 | if test "${ac_cv_libexpat+set}" = set; then : | |
9706 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9707 | else |
bec39cab | 9708 | |
81ecdfbb RW |
9709 | ac_save_LIBS="$LIBS" |
9710 | LIBS="$LIBS $LIBEXPAT" | |
9711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9712 | /* end confdefs.h. */ |
81ecdfbb RW |
9713 | #include "expat.h" |
9714 | int | |
9715 | main () | |
9716 | { | |
9717 | XML_Parser p = XML_ParserCreate (0); | |
9718 | ; | |
9719 | return 0; | |
9720 | } | |
bec39cab | 9721 | _ACEOF |
81ecdfbb RW |
9722 | if ac_fn_c_try_link "$LINENO"; then : |
9723 | ac_cv_libexpat=yes | |
c906108c | 9724 | else |
81ecdfbb | 9725 | ac_cv_libexpat=no |
bec39cab | 9726 | fi |
81ecdfbb RW |
9727 | rm -f core conftest.err conftest.$ac_objext \ |
9728 | conftest$ac_exeext conftest.$ac_ext | |
9729 | LIBS="$ac_save_LIBS" | |
c906108c | 9730 | |
95ca63c4 | 9731 | fi |
81ecdfbb RW |
9732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9733 | $as_echo "$ac_cv_libexpat" >&6; } | |
9734 | if test "$ac_cv_libexpat" = yes; then | |
9735 | HAVE_LIBEXPAT=yes | |
bec39cab | 9736 | |
81ecdfbb | 9737 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9738 | |
81ecdfbb RW |
9739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9740 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9742 | $as_echo "$LIBEXPAT" >&6; } | |
9743 | else | |
9744 | HAVE_LIBEXPAT=no | |
9745 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9746 | LIBEXPAT= | |
9747 | LTLIBEXPAT= | |
9748 | fi | |
95ca63c4 CF |
9749 | |
9750 | ||
9751 | ||
7cb9022a MK |
9752 | |
9753 | ||
bec39cab | 9754 | |
81ecdfbb RW |
9755 | if test "$HAVE_LIBEXPAT" != yes; then |
9756 | if test "$with_expat" = yes; then | |
9757 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
9758 | else | |
9759 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9760 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
9761 | fi | |
9762 | else | |
9763 | save_LIBS=$LIBS | |
9764 | LIBS="$LIBS $LIBEXPAT" | |
9765 | for ac_func in XML_StopParser | |
9766 | do : | |
9767 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
9768 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 9769 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9770 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 9771 | _ACEOF |
95ca63c4 | 9772 | |
bec39cab | 9773 | fi |
bec39cab | 9774 | done |
95ca63c4 | 9775 | |
81ecdfbb RW |
9776 | LIBS=$save_LIBS |
9777 | fi | |
a9322a30 TT |
9778 | fi |
9779 | ||
d344e670 DE |
9780 | # --------------------- # |
9781 | # Check for libpython. # | |
9782 | # --------------------- # | |
9783 | ||
a9322a30 | 9784 | |
a9322a30 TT |
9785 | |
9786 | ||
ec685c5e | 9787 | |
0c4a4063 | 9788 | |
81ecdfbb RW |
9789 | # Check whether --with-python was given. |
9790 | if test "${with_python+set}" = set; then : | |
9791 | withval=$with_python; | |
bec39cab | 9792 | else |
81ecdfbb | 9793 | with_python=auto |
bec39cab | 9794 | fi |
bec39cab | 9795 | |
81ecdfbb RW |
9796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
9797 | $as_echo_n "checking whether to use python... " >&6; } | |
9798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
9799 | $as_echo "$with_python" >&6; } | |
9a156167 | 9800 | |
81ecdfbb RW |
9801 | if test "${with_python}" = no; then |
9802 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
9803 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
9804 | have_libpython=no | |
bec39cab | 9805 | else |
81ecdfbb | 9806 | case "${with_python}" in |
8c85a4e2 | 9807 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
9808 | if test -d ${with_python}; then |
9809 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 9810 | python_prog="${with_python}/bin/python" |
0c4a4063 | 9811 | python_prefix= |
9c4ea6c5 JB |
9812 | # If python does not exit ${with_python}/bin, then try in |
9813 | # ${with_python}. On Windows/MinGW, this is where the Python | |
9814 | # executable is. | |
9815 | if test ! -x "${python_prog}"; then | |
9816 | python_prog="${with_python}/python" | |
9817 | python_prefix= | |
9818 | fi | |
e7a30f46 | 9819 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
9820 | # Fall back to gdb 7.0/7.1 behaviour. |
9821 | python_prog=missing | |
0c4a4063 | 9822 | python_prefix=${with_python} |
ec685c5e | 9823 | fi |
e7a30f46 | 9824 | elif test -x "${with_python}"; then |
ec685c5e DE |
9825 | # While we can't run python compiled for $host (unless host == build), |
9826 | # the user could write a script that provides the needed information, | |
9827 | # so we support that. | |
ec685c5e | 9828 | python_prog=${with_python} |
0c4a4063 | 9829 | python_prefix= |
ec685c5e DE |
9830 | else |
9831 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
9832 | fi | |
81ecdfbb | 9833 | ;; |
ec685c5e DE |
9834 | */*) |
9835 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
9836 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
9837 | ;; | |
ec685c5e DE |
9838 | *) |
9839 | # The user has either specified auto, yes, or the name of the python | |
9840 | # program assumed to be in $PATH. | |
9841 | python_prefix= | |
9842 | case "${with_python}" in | |
9843 | yes | auto) | |
9844 | if test ${build} = ${host}; then | |
9845 | # Extract the first word of "python", so it can be a program name with args. | |
9846 | set dummy python; ac_word=$2 | |
9847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9848 | $as_echo_n "checking for $ac_word... " >&6; } | |
9849 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
9850 | $as_echo_n "(cached) " >&6 | |
9851 | else | |
9852 | case $python_prog_path in | |
9853 | [\\/]* | ?:[\\/]*) | |
9854 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
9855 | ;; | |
9856 | *) | |
9857 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9858 | for as_dir in $PATH | |
9859 | do | |
9860 | IFS=$as_save_IFS | |
9861 | test -z "$as_dir" && as_dir=. | |
9862 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9863 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9864 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
9865 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9866 | break 2 | |
9867 | fi | |
9868 | done | |
9869 | done | |
9870 | IFS=$as_save_IFS | |
9871 | ||
9872 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
9873 | ;; | |
9874 | esac | |
9875 | fi | |
9876 | python_prog_path=$ac_cv_path_python_prog_path | |
9877 | if test -n "$python_prog_path"; then | |
9878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
9879 | $as_echo "$python_prog_path" >&6; } | |
9880 | else | |
9881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9882 | $as_echo "no" >&6; } | |
9883 | fi | |
9884 | ||
9885 | ||
9886 | if test "${python_prog_path}" = missing; then | |
9887 | python_prog=missing | |
9888 | else | |
9889 | python_prog=${python_prog_path} | |
9890 | fi | |
9891 | else | |
9892 | # Not much we can do except assume the cross-compiler will find the | |
9893 | # right files. | |
9894 | python_prog=missing | |
9895 | fi | |
9896 | ;; | |
9897 | *) | |
9898 | # While we can't run python compiled for $host (unless host == build), | |
9899 | # the user could write a script that provides the needed information, | |
9900 | # so we support that. | |
9901 | python_prog="${with_python}" | |
9902 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
9903 | set dummy ${python_prog}; ac_word=$2 | |
9904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9905 | $as_echo_n "checking for $ac_word... " >&6; } | |
9906 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
9907 | $as_echo_n "(cached) " >&6 | |
9908 | else | |
9909 | case $python_prog_path in | |
9910 | [\\/]* | ?:[\\/]*) | |
9911 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
9912 | ;; | |
9913 | *) | |
9914 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9915 | for as_dir in $PATH | |
9916 | do | |
9917 | IFS=$as_save_IFS | |
9918 | test -z "$as_dir" && as_dir=. | |
9919 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9920 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9921 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
9922 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9923 | break 2 | |
9924 | fi | |
9925 | done | |
9926 | done | |
9927 | IFS=$as_save_IFS | |
9928 | ||
9929 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
9930 | ;; | |
9931 | esac | |
9932 | fi | |
9933 | python_prog_path=$ac_cv_path_python_prog_path | |
9934 | if test -n "$python_prog_path"; then | |
9935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
9936 | $as_echo "$python_prog_path" >&6; } | |
9937 | else | |
9938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9939 | $as_echo "no" >&6; } | |
9940 | fi | |
9941 | ||
9942 | ||
9943 | if test "${python_prog_path}" = missing; then | |
9944 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
9945 | fi | |
9946 | ;; | |
9947 | esac | |
81ecdfbb RW |
9948 | esac |
9949 | ||
ec685c5e | 9950 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
9951 | # We have a python program to use, but it may be too old. |
9952 | # Don't flag an error for --with-python=auto (the default). | |
9953 | have_python_config=yes | |
ec685c5e DE |
9954 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
9955 | if test $? != 0; then | |
e7a30f46 DE |
9956 | have_python_config=failed |
9957 | if test "${with_python}" != auto; then | |
9958 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
9959 | fi | |
ec685c5e DE |
9960 | fi |
9961 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
9962 | if test $? != 0; then | |
e7a30f46 DE |
9963 | have_python_config=failed |
9964 | if test "${with_python}" != auto; then | |
9965 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
9966 | fi | |
ec685c5e | 9967 | fi |
0c4a4063 DE |
9968 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
9969 | if test $? != 0; then | |
e7a30f46 DE |
9970 | have_python_config=failed |
9971 | if test "${with_python}" != auto; then | |
9972 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
9973 | fi | |
0c4a4063 | 9974 | fi |
ec685c5e | 9975 | else |
ac534cba JB |
9976 | # We do not have a python executable we can use to determine where |
9977 | # to find the Python headers and libs. We cannot guess the include | |
9978 | # path from the python_prefix either, because that include path | |
9979 | # depends on the Python version. So, there is nothing much we can | |
9980 | # do except assume that the compiler will be able to find those files. | |
9981 | python_includes= | |
9982 | python_libs= | |
0c4a4063 | 9983 | have_python_config=no |
ec685c5e | 9984 | fi |
bec39cab | 9985 | |
ec685c5e DE |
9986 | # If we have python-config, only try the configuration it provides. |
9987 | # Otherwise fallback on the old way of trying different versions of | |
9988 | # python in turn. | |
81ecdfbb | 9989 | |
ec685c5e DE |
9990 | have_libpython=no |
9991 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
9992 | # Determine the Python version by extracting "-lpython<version>" |
9993 | # part of the python_libs. <version> is usually X.Y with X and Y | |
9994 | # being decimal numbers, but can also be XY (seen on Windows). | |
9995 | # | |
9996 | # The extraction is performed using sed with a regular expression. | |
9997 | # Initially, the regexp used was using the '?' quantifier to make | |
9998 | # the dot in the version number optional. Unfortunately, this | |
9999 | # does not work with non-GNU versions of sed because, because of | |
10000 | # what looks like a limitation (the '?' quantifier does not work | |
10001 | # with back-references). We work around this limitation by using | |
10002 | # the '*' quantifier instead. It means that, in theory, we might | |
10003 | # match unexpected version strings such as "-lpython2..7", but | |
10004 | # this seems unlikely in practice. And even if that happens, | |
10005 | # an error will be triggered later on, when checking that version | |
10006 | # number. | |
ec685c5e | 10007 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 10008 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
10009 | case "${python_version}" in |
10010 | python*) | |
ec685c5e DE |
10011 | |
10012 | version=${python_version} | |
10013 | ||
10014 | new_CPPFLAGS=${python_includes} | |
10015 | new_LIBS=${python_libs} | |
81ecdfbb RW |
10016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10017 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10018 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10019 | save_LIBS=$LIBS |
ec685c5e DE |
10020 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10021 | LIBS="$LIBS $new_LIBS" | |
10022 | found_usable_python=no | |
81ecdfbb | 10023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10024 | /* end confdefs.h. */ |
ac534cba | 10025 | #include "Python.h" |
81ecdfbb RW |
10026 | int |
10027 | main () | |
10028 | { | |
10029 | Py_Initialize (); | |
10030 | ; | |
10031 | return 0; | |
10032 | } | |
bec39cab | 10033 | _ACEOF |
81ecdfbb | 10034 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10035 | have_libpython=${version} |
10036 | found_usable_python=yes | |
ac534cba JB |
10037 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10038 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 10039 | fi |
81ecdfbb RW |
10040 | rm -f core conftest.err conftest.$ac_objext \ |
10041 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10042 | CPPFLAGS=$save_CPPFLAGS |
10043 | LIBS=$save_LIBS | |
ec685c5e DE |
10044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10045 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10046 | |
0c4a4063 DE |
10047 | ;; |
10048 | *) | |
ec685c5e | 10049 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
10050 | ;; |
10051 | esac | |
e7a30f46 | 10052 | elif test "${have_python_config}" != failed; then |
ec685c5e | 10053 | if test "${have_libpython}" = no; then |
9a156167 | 10054 | |
420697bb TT |
10055 | version=python2.7 |
10056 | ||
10057 | new_CPPFLAGS=${python_includes} | |
10058 | new_LIBS="${python_libs} -lpython2.7" | |
10059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10060 | $as_echo_n "checking for ${version}... " >&6; } | |
10061 | save_CPPFLAGS=$CPPFLAGS | |
10062 | save_LIBS=$LIBS | |
10063 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10064 | LIBS="$LIBS $new_LIBS" | |
10065 | found_usable_python=no | |
10066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10067 | /* end confdefs.h. */ | |
ac534cba | 10068 | #include "Python.h" |
420697bb TT |
10069 | int |
10070 | main () | |
10071 | { | |
10072 | Py_Initialize (); | |
10073 | ; | |
10074 | return 0; | |
10075 | } | |
10076 | _ACEOF | |
10077 | if ac_fn_c_try_link "$LINENO"; then : | |
10078 | have_libpython=${version} | |
10079 | found_usable_python=yes | |
ac534cba JB |
10080 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10081 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
10082 | fi |
10083 | rm -f core conftest.err conftest.$ac_objext \ | |
10084 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10085 | CPPFLAGS=$save_CPPFLAGS |
10086 | LIBS=$save_LIBS | |
420697bb TT |
10087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10088 | $as_echo "${found_usable_python}" >&6; } | |
10089 | ||
10090 | fi | |
10091 | if test "${have_libpython}" = no; then | |
10092 | ||
ec685c5e DE |
10093 | version=python2.6 |
10094 | ||
10095 | new_CPPFLAGS=${python_includes} | |
10096 | new_LIBS="${python_libs} -lpython2.6" | |
10097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10098 | $as_echo_n "checking for ${version}... " >&6; } | |
10099 | save_CPPFLAGS=$CPPFLAGS | |
10100 | save_LIBS=$LIBS | |
10101 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10102 | LIBS="$LIBS $new_LIBS" | |
10103 | found_usable_python=no | |
10104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10105 | /* end confdefs.h. */ | |
ac534cba | 10106 | #include "Python.h" |
ec685c5e DE |
10107 | int |
10108 | main () | |
10109 | { | |
10110 | Py_Initialize (); | |
10111 | ; | |
10112 | return 0; | |
10113 | } | |
10114 | _ACEOF | |
10115 | if ac_fn_c_try_link "$LINENO"; then : | |
10116 | have_libpython=${version} | |
10117 | found_usable_python=yes | |
ac534cba JB |
10118 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10119 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
10120 | fi |
10121 | rm -f core conftest.err conftest.$ac_objext \ | |
10122 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10123 | CPPFLAGS=$save_CPPFLAGS |
10124 | LIBS=$save_LIBS | |
ec685c5e DE |
10125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10126 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10127 | |
81ecdfbb | 10128 | fi |
ec685c5e | 10129 | if test ${have_libpython} = no; then |
9a156167 | 10130 | |
81ecdfbb | 10131 | version=python2.5 |
9a156167 | 10132 | |
ec685c5e DE |
10133 | new_CPPFLAGS=${python_includes} |
10134 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
10135 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10136 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10137 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10138 | save_LIBS=$LIBS |
ec685c5e DE |
10139 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10140 | LIBS="$LIBS $new_LIBS" | |
10141 | found_usable_python=no | |
81ecdfbb | 10142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10143 | /* end confdefs.h. */ |
ac534cba | 10144 | #include "Python.h" |
81ecdfbb RW |
10145 | int |
10146 | main () | |
10147 | { | |
10148 | Py_Initialize (); | |
10149 | ; | |
10150 | return 0; | |
10151 | } | |
436868fb | 10152 | _ACEOF |
81ecdfbb | 10153 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10154 | have_libpython=${version} |
10155 | found_usable_python=yes | |
ac534cba JB |
10156 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10157 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10158 | fi |
81ecdfbb RW |
10159 | rm -f core conftest.err conftest.$ac_objext \ |
10160 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10161 | CPPFLAGS=$save_CPPFLAGS |
10162 | LIBS=$save_LIBS | |
ec685c5e DE |
10163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10164 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 10165 | |
81ecdfbb | 10166 | fi |
ec685c5e | 10167 | if test ${have_libpython} = no; then |
a9322a30 | 10168 | |
81ecdfbb | 10169 | version=python2.4 |
a9322a30 | 10170 | |
ec685c5e DE |
10171 | new_CPPFLAGS=${python_includes} |
10172 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
10173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10174 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10175 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10176 | save_LIBS=$LIBS |
ec685c5e DE |
10177 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10178 | LIBS="$LIBS $new_LIBS" | |
10179 | found_usable_python=no | |
81ecdfbb | 10180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10181 | /* end confdefs.h. */ |
ac534cba | 10182 | #include "Python.h" |
a9322a30 TT |
10183 | int |
10184 | main () | |
10185 | { | |
81ecdfbb | 10186 | Py_Initialize (); |
a9322a30 TT |
10187 | ; |
10188 | return 0; | |
10189 | } | |
436868fb | 10190 | _ACEOF |
81ecdfbb | 10191 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10192 | have_libpython=${version} |
10193 | found_usable_python=yes | |
ac534cba JB |
10194 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10195 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10196 | fi |
81ecdfbb RW |
10197 | rm -f core conftest.err conftest.$ac_objext \ |
10198 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10199 | CPPFLAGS=$save_CPPFLAGS |
10200 | LIBS=$save_LIBS | |
ec685c5e DE |
10201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10202 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10203 | |
ec685c5e DE |
10204 | fi |
10205 | fi | |
9c4ea6c5 | 10206 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
10207 | |
10208 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
10209 | ||
9c4ea6c5 | 10210 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
10211 | |
10212 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
10213 | ||
9c4ea6c5 | 10214 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
10215 | |
10216 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
10217 | ||
9c4ea6c5 | 10218 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
10219 | |
10220 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
10221 | ||
81ecdfbb | 10222 | fi |
ec685c5e DE |
10223 | |
10224 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10225 | case "${with_python}" in |
10226 | yes) | |
10227 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
10228 | ;; | |
10229 | auto) | |
10230 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10231 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10232 | ;; | |
10233 | *) | |
10234 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
10235 | ;; | |
10236 | esac | |
0c4a4063 DE |
10237 | else |
10238 | if test -n "${python_prefix}"; then | |
10239 | ||
10240 | cat >>confdefs.h <<_ACEOF | |
10241 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10242 | _ACEOF | |
10243 | ||
10244 | ||
10245 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10246 | if test "x$prefix" = xNONE; then | |
10247 | test_prefix=/usr/local | |
10248 | else | |
10249 | test_prefix=$prefix | |
10250 | fi | |
10251 | else | |
10252 | test_prefix=$exec_prefix | |
10253 | fi | |
10254 | value=0 | |
10255 | case ${python_prefix} in | |
10256 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10257 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10258 | value=1 | |
10259 | ;; | |
10260 | esac | |
10261 | ||
10262 | cat >>confdefs.h <<_ACEOF | |
10263 | #define PYTHON_PATH_RELOCATABLE $value | |
10264 | _ACEOF | |
10265 | ||
10266 | ||
10267 | fi | |
81ecdfbb | 10268 | fi |
436868fb | 10269 | fi |
436868fb | 10270 | |
ec685c5e | 10271 | if test "${have_libpython}" != no; then |
436868fb | 10272 | |
81ecdfbb | 10273 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10274 | |
81ecdfbb RW |
10275 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10276 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10277 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 10278 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 10279 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 10280 | |
81ecdfbb RW |
10281 | # Flags needed to compile Python code (taken from python-config --cflags). |
10282 | # We cannot call python-config directly because it will output whatever was | |
10283 | # used when compiling the Python interpreter itself, including flags which | |
10284 | # would make the python-related objects be compiled differently from the | |
10285 | # rest of GDB (e.g., -O2 and -fPIC). | |
10286 | if test "${GCC}" = yes; then | |
10287 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
10288 | fi | |
436868fb | 10289 | |
81ecdfbb RW |
10290 | if test "x${tentative_python_cflags}" != x; then |
10291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10292 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10293 | for flag in ${tentative_python_cflags}; do | |
10294 | # Check that the compiler accepts it | |
10295 | saved_CFLAGS="$CFLAGS" | |
10296 | CFLAGS="$CFLAGS $flag" | |
10297 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10298 | /* end confdefs.h. */ |
81ecdfbb | 10299 | |
a9322a30 TT |
10300 | int |
10301 | main () | |
10302 | { | |
a9322a30 TT |
10303 | |
10304 | ; | |
10305 | return 0; | |
10306 | } | |
bec39cab | 10307 | _ACEOF |
81ecdfbb RW |
10308 | if ac_fn_c_try_compile "$LINENO"; then : |
10309 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10310 | fi |
81ecdfbb RW |
10311 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10312 | CFLAGS="$saved_CFLAGS" | |
10313 | done | |
10314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10315 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10316 | fi | |
043b6510 | 10317 | |
c83393b9 JB |
10318 | # On x64 Windows, Python's include headers, and pyconfig.h in |
10319 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
10320 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
10321 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
10322 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
10323 | # The issue was reported to the Python community, but still isn't | |
10324 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
10325 | ||
043b6510 | 10326 | case "$gdb_host" in |
c83393b9 JB |
10327 | mingw64) |
10328 | if test "${GCC}" = yes; then | |
10329 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
10330 | fi | |
10331 | ;; | |
043b6510 | 10332 | esac |
a8db4212 YPK |
10333 | |
10334 | # Note that "python -m threading" cannot be used to check for | |
10335 | # threading support due to a bug in Python 2.7.3 | |
10336 | # (http://bugs.python.org/issue15567). | |
10337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
10338 | $as_echo_n "checking whether python supports threads... " >&6; } | |
10339 | saved_CPPFLAGS="${CPPFLAGS}" | |
10340 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
10341 | # Note that the test is reversed so that python_has_threads=yes on | |
10342 | # unexpected failures. | |
10343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10344 | /* end confdefs.h. */ | |
10345 | ||
10346 | #include <Python.h> | |
10347 | #ifdef WITH_THREAD | |
10348 | # error | |
10349 | #endif | |
10350 | ||
10351 | _ACEOF | |
10352 | if ac_fn_c_try_cpp "$LINENO"; then : | |
10353 | python_has_threads=no | |
10354 | else | |
10355 | python_has_threads=yes | |
10356 | fi | |
10357 | rm -f conftest.err conftest.$ac_ext | |
10358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
10359 | $as_echo "${python_has_threads}" >&6; } | |
10360 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 10361 | else |
6dddc817 DE |
10362 | # Even if Python support is not compiled in, we need to have this file |
10363 | # included so that the "python" command, et.al., still exists. | |
10364 | CONFIG_OBS="$CONFIG_OBS python.o" | |
10365 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" | |
a9322a30 | 10366 | fi |
9a156167 | 10367 | |
a4a1c157 PA |
10368 | # Work around Python http://bugs.python.org/issue10112. See also |
10369 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
10370 | # no effect. Note that the only test after this that uses Python is | |
10371 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
10372 | # run without -export-dynamic too. | |
10373 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
10374 | ||
10375 | ||
ed3ef339 DE |
10376 | |
10377 | ||
4df42755 DE |
10378 | if test "${have_libpython}" != no; then |
10379 | HAVE_PYTHON_TRUE= | |
10380 | HAVE_PYTHON_FALSE='#' | |
10381 | else | |
10382 | HAVE_PYTHON_TRUE='#' | |
10383 | HAVE_PYTHON_FALSE= | |
10384 | fi | |
10385 | ||
ed3ef339 DE |
10386 | |
10387 | # -------------------- # | |
10388 | # Check for libguile. # | |
10389 | # -------------------- # | |
10390 | ||
10391 | ||
e1402065 DE |
10392 | |
10393 | ||
10394 | ||
10395 | ||
10396 | # Check whether --with-guile was given. | |
10397 | if test "${with_guile+set}" = set; then : | |
10398 | withval=$with_guile; | |
10399 | else | |
10400 | with_guile=auto | |
10401 | fi | |
10402 | ||
10403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
10404 | $as_echo_n "checking whether to use guile... " >&6; } | |
10405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
10406 | $as_echo "$with_guile" >&6; } | |
10407 | ||
ed3ef339 DE |
10408 | # Extract the first word of "pkg-config", so it can be a program name with args. |
10409 | set dummy pkg-config; ac_word=$2 | |
10410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10411 | $as_echo_n "checking for $ac_word... " >&6; } | |
10412 | if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : | |
10413 | $as_echo_n "(cached) " >&6 | |
10414 | else | |
10415 | case $pkg_config_prog_path in | |
10416 | [\\/]* | ?:[\\/]*) | |
10417 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
10418 | ;; | |
10419 | *) | |
10420 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10421 | for as_dir in $PATH | |
10422 | do | |
10423 | IFS=$as_save_IFS | |
10424 | test -z "$as_dir" && as_dir=. | |
10425 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10426 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10427 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10428 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10429 | break 2 | |
10430 | fi | |
10431 | done | |
10432 | done | |
10433 | IFS=$as_save_IFS | |
10434 | ||
10435 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
10436 | ;; | |
10437 | esac | |
10438 | fi | |
10439 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
10440 | if test -n "$pkg_config_prog_path"; then | |
10441 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
10442 | $as_echo "$pkg_config_prog_path" >&6; } | |
10443 | else | |
10444 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10445 | $as_echo "no" >&6; } | |
10446 | fi | |
10447 | ||
10448 | ||
10449 | ||
214ab2da | 10450 | try_guile_versions="guile-2.2 guile-2.0" |
ed3ef339 DE |
10451 | have_libguile=no |
10452 | case "${with_guile}" in | |
10453 | no) | |
10454 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
10455 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
10456 | ;; | |
10457 | auto) | |
e1402065 DE |
10458 | if test "${pkg_config_prog_path}" = "missing"; then |
10459 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
10460 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
10461 | else | |
ed3ef339 DE |
10462 | |
10463 | pkg_config=${pkg_config_prog_path} | |
10464 | guile_version_list=${try_guile_versions} | |
10465 | flag_errors=no | |
10466 | ||
ed3ef339 DE |
10467 | found_usable_guile=checking |
10468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10469 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10470 | for guile_version in ${guile_version_list}; do | |
10471 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10472 | if test $? != 0; then | |
10473 | continue | |
10474 | fi | |
10475 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10476 | if test $? != 0; then | |
10477 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10478 | fi | |
10479 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10480 | if test $? != 0; then | |
10481 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10482 | fi | |
10483 | found_usable_guile=${guile_version} | |
10484 | break | |
10485 | done | |
10486 | if test "${found_usable_guile}" = "checking"; then | |
10487 | if test "${flag_errors}" = "yes"; then | |
10488 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10489 | else | |
10490 | found_usable_guile=no | |
10491 | fi | |
10492 | fi | |
10493 | if test "${found_usable_guile}" != no; then | |
10494 | save_CPPFLAGS=$CPPFLAGS | |
10495 | save_LIBS=$LIBS | |
10496 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10497 | LIBS="$LIBS $new_LIBS" | |
10498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10499 | /* end confdefs.h. */ | |
10500 | #include "libguile.h" | |
10501 | int | |
10502 | main () | |
10503 | { | |
10504 | scm_init_guile (); | |
10505 | ; | |
10506 | return 0; | |
10507 | } | |
10508 | _ACEOF | |
10509 | if ac_fn_c_try_link "$LINENO"; then : | |
10510 | have_libguile=yes | |
10511 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10512 | GUILE_LIBS=$new_LIBS | |
10513 | else | |
10514 | found_usable_guile=no | |
10515 | fi | |
10516 | rm -f core conftest.err conftest.$ac_objext \ | |
10517 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
10518 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
10519 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
10520 | ||
10521 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10522 | ||
10523 | ||
10524 | fi | |
10525 | ||
ed3ef339 DE |
10526 | CPPFLAGS=$save_CPPFLAGS |
10527 | LIBS=$save_LIBS | |
10528 | if test "${found_usable_guile}" = no; then | |
10529 | if test "${flag_errors}" = yes; then | |
10530 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10531 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10532 | as_fn_error "linking guile version ${guile_version} test program failed | |
10533 | See \`config.log' for more details." "$LINENO" 5; } | |
10534 | fi | |
10535 | fi | |
10536 | fi | |
10537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10538 | $as_echo "${found_usable_guile}" >&6; } | |
10539 | ||
e1402065 | 10540 | fi |
ed3ef339 DE |
10541 | ;; |
10542 | yes) | |
e1402065 DE |
10543 | if test "${pkg_config_prog_path}" = "missing"; then |
10544 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
10545 | fi | |
ed3ef339 DE |
10546 | |
10547 | pkg_config=${pkg_config_prog_path} | |
10548 | guile_version_list=${try_guile_versions} | |
10549 | flag_errors=yes | |
10550 | ||
ed3ef339 DE |
10551 | found_usable_guile=checking |
10552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10553 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10554 | for guile_version in ${guile_version_list}; do | |
10555 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10556 | if test $? != 0; then | |
10557 | continue | |
10558 | fi | |
10559 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10560 | if test $? != 0; then | |
10561 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10562 | fi | |
10563 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10564 | if test $? != 0; then | |
10565 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10566 | fi | |
10567 | found_usable_guile=${guile_version} | |
10568 | break | |
10569 | done | |
10570 | if test "${found_usable_guile}" = "checking"; then | |
10571 | if test "${flag_errors}" = "yes"; then | |
10572 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10573 | else | |
10574 | found_usable_guile=no | |
10575 | fi | |
10576 | fi | |
10577 | if test "${found_usable_guile}" != no; then | |
10578 | save_CPPFLAGS=$CPPFLAGS | |
10579 | save_LIBS=$LIBS | |
10580 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10581 | LIBS="$LIBS $new_LIBS" | |
10582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10583 | /* end confdefs.h. */ | |
10584 | #include "libguile.h" | |
10585 | int | |
10586 | main () | |
10587 | { | |
10588 | scm_init_guile (); | |
10589 | ; | |
10590 | return 0; | |
10591 | } | |
10592 | _ACEOF | |
10593 | if ac_fn_c_try_link "$LINENO"; then : | |
10594 | have_libguile=yes | |
10595 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10596 | GUILE_LIBS=$new_LIBS | |
10597 | else | |
10598 | found_usable_guile=no | |
10599 | fi | |
10600 | rm -f core conftest.err conftest.$ac_objext \ | |
10601 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
10602 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
10603 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
10604 | ||
10605 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10606 | ||
10607 | ||
10608 | fi | |
10609 | ||
ed3ef339 DE |
10610 | CPPFLAGS=$save_CPPFLAGS |
10611 | LIBS=$save_LIBS | |
10612 | if test "${found_usable_guile}" = no; then | |
10613 | if test "${flag_errors}" = yes; then | |
10614 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10615 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10616 | as_fn_error "linking guile version ${guile_version} test program failed | |
10617 | See \`config.log' for more details." "$LINENO" 5; } | |
10618 | fi | |
10619 | fi | |
10620 | fi | |
10621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10622 | $as_echo "${found_usable_guile}" >&6; } | |
10623 | ||
10624 | ;; | |
10625 | [\\/]* | ?:[\\/]*) | |
e1402065 | 10626 | if test -x "${with_guile}"; then |
ed3ef339 DE |
10627 | |
10628 | pkg_config=${with_guile} | |
10629 | guile_version_list=${try_guile_versions} | |
10630 | flag_errors=yes | |
10631 | ||
ed3ef339 DE |
10632 | found_usable_guile=checking |
10633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10634 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10635 | for guile_version in ${guile_version_list}; do | |
10636 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10637 | if test $? != 0; then | |
10638 | continue | |
10639 | fi | |
10640 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10641 | if test $? != 0; then | |
10642 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10643 | fi | |
10644 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10645 | if test $? != 0; then | |
10646 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10647 | fi | |
10648 | found_usable_guile=${guile_version} | |
10649 | break | |
10650 | done | |
10651 | if test "${found_usable_guile}" = "checking"; then | |
10652 | if test "${flag_errors}" = "yes"; then | |
10653 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10654 | else | |
10655 | found_usable_guile=no | |
10656 | fi | |
10657 | fi | |
10658 | if test "${found_usable_guile}" != no; then | |
10659 | save_CPPFLAGS=$CPPFLAGS | |
10660 | save_LIBS=$LIBS | |
10661 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10662 | LIBS="$LIBS $new_LIBS" | |
10663 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10664 | /* end confdefs.h. */ | |
10665 | #include "libguile.h" | |
10666 | int | |
10667 | main () | |
10668 | { | |
10669 | scm_init_guile (); | |
10670 | ; | |
10671 | return 0; | |
10672 | } | |
10673 | _ACEOF | |
10674 | if ac_fn_c_try_link "$LINENO"; then : | |
10675 | have_libguile=yes | |
10676 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10677 | GUILE_LIBS=$new_LIBS | |
10678 | else | |
10679 | found_usable_guile=no | |
10680 | fi | |
10681 | rm -f core conftest.err conftest.$ac_objext \ | |
10682 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
10683 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
10684 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
10685 | ||
10686 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10687 | ||
10688 | ||
10689 | fi | |
10690 | ||
ed3ef339 DE |
10691 | CPPFLAGS=$save_CPPFLAGS |
10692 | LIBS=$save_LIBS | |
10693 | if test "${found_usable_guile}" = no; then | |
10694 | if test "${flag_errors}" = yes; then | |
10695 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10696 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10697 | as_fn_error "linking guile version ${guile_version} test program failed | |
10698 | See \`config.log' for more details." "$LINENO" 5; } | |
10699 | fi | |
10700 | fi | |
10701 | fi | |
10702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10703 | $as_echo "${found_usable_guile}" >&6; } | |
10704 | ||
e1402065 DE |
10705 | else |
10706 | as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 | |
10707 | fi | |
ed3ef339 DE |
10708 | ;; |
10709 | "" | */*) | |
10710 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
10711 | as_fn_error "invalid value for --with-guile" "$LINENO" 5 | |
10712 | ;; | |
10713 | *) | |
10714 | # A space separate list of guile versions to try, in order. | |
e1402065 DE |
10715 | if test "${pkg_config_prog_path}" = "missing"; then |
10716 | as_fn_error "pkg-config not found" "$LINENO" 5 | |
10717 | fi | |
ed3ef339 DE |
10718 | |
10719 | pkg_config=${pkg_config_prog_path} | |
10720 | guile_version_list=${with_guile} | |
10721 | flag_errors=yes | |
10722 | ||
ed3ef339 DE |
10723 | found_usable_guile=checking |
10724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10725 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10726 | for guile_version in ${guile_version_list}; do | |
10727 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10728 | if test $? != 0; then | |
10729 | continue | |
10730 | fi | |
10731 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10732 | if test $? != 0; then | |
10733 | as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 | |
10734 | fi | |
10735 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10736 | if test $? != 0; then | |
10737 | as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 | |
10738 | fi | |
10739 | found_usable_guile=${guile_version} | |
10740 | break | |
10741 | done | |
10742 | if test "${found_usable_guile}" = "checking"; then | |
10743 | if test "${flag_errors}" = "yes"; then | |
10744 | as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 | |
10745 | else | |
10746 | found_usable_guile=no | |
10747 | fi | |
10748 | fi | |
10749 | if test "${found_usable_guile}" != no; then | |
10750 | save_CPPFLAGS=$CPPFLAGS | |
10751 | save_LIBS=$LIBS | |
10752 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10753 | LIBS="$LIBS $new_LIBS" | |
10754 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10755 | /* end confdefs.h. */ | |
10756 | #include "libguile.h" | |
10757 | int | |
10758 | main () | |
10759 | { | |
10760 | scm_init_guile (); | |
10761 | ; | |
10762 | return 0; | |
10763 | } | |
10764 | _ACEOF | |
10765 | if ac_fn_c_try_link "$LINENO"; then : | |
10766 | have_libguile=yes | |
10767 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10768 | GUILE_LIBS=$new_LIBS | |
10769 | else | |
10770 | found_usable_guile=no | |
10771 | fi | |
10772 | rm -f core conftest.err conftest.$ac_objext \ | |
10773 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 AW |
10774 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
10775 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : | |
10776 | ||
10777 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10778 | ||
10779 | ||
10780 | fi | |
10781 | ||
ed3ef339 DE |
10782 | CPPFLAGS=$save_CPPFLAGS |
10783 | LIBS=$save_LIBS | |
10784 | if test "${found_usable_guile}" = no; then | |
10785 | if test "${flag_errors}" = yes; then | |
10786 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10787 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10788 | as_fn_error "linking guile version ${guile_version} test program failed | |
10789 | See \`config.log' for more details." "$LINENO" 5; } | |
10790 | fi | |
10791 | fi | |
10792 | fi | |
10793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10794 | $as_echo "${found_usable_guile}" >&6; } | |
10795 | ||
10796 | ;; | |
10797 | esac | |
10798 | ||
e76c5d17 | 10799 | if test "${have_libguile}" != no; then |
d342a0da DE |
10800 | case "${with_guile}" in |
10801 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
10802 | |
10803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
10804 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
10805 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
10806 | $as_echo_n "(cached) " >&6 | |
10807 | else | |
d342a0da | 10808 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
10809 | |
10810 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
10811 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
10812 | # what the program name is, at the risk of getting it wrong if | |
10813 | # Guile was configured with '--program-suffix' or similar. | |
10814 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 10815 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
10816 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
10817 | fi | |
10818 | ||
10819 | fi | |
10820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
10821 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
10822 | ||
10823 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
10824 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
10825 | fi | |
10826 | ||
10827 | GUILD="$ac_cv_guild_program_name" | |
10828 | ||
10829 | ||
d342a0da DE |
10830 | ;; |
10831 | *) | |
10832 | ||
10833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
10834 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
10835 | if test "${ac_cv_guild_program_name+set}" = set; then : | |
10836 | $as_echo_n "(cached) " >&6 | |
10837 | else | |
10838 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
10839 | ||
10840 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
10841 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
10842 | # what the program name is, at the risk of getting it wrong if | |
10843 | # Guile was configured with '--program-suffix' or similar. | |
10844 | if test "x$ac_cv_guild_program_name" = "x"; then | |
10845 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
10846 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
10847 | fi | |
10848 | ||
10849 | fi | |
10850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
10851 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
10852 | ||
10853 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
10854 | as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 | |
10855 | fi | |
10856 | ||
10857 | GUILD="$ac_cv_guild_program_name" | |
10858 | ||
10859 | ||
10860 | ;; | |
10861 | esac | |
e76c5d17 DE |
10862 | |
10863 | ||
10864 | if test "$cross_compiling" = no; then | |
10865 | GUILD_TARGET_FLAG= | |
10866 | else | |
10867 | GUILD_TARGET_FLAG="--target=$host" | |
10868 | fi | |
10869 | ||
10870 | ||
10871 | ||
10872 | ||
10873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
10874 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
10875 | if test "${ac_cv_guild_ok+set}" = set; then : | |
10876 | $as_echo_n "(cached) " >&6 | |
10877 | else | |
10878 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
10879 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
10880 | ac_cv_guild_ok=yes | |
10881 | else | |
10882 | ac_cv_guild_ok=no | |
10883 | fi | |
10884 | fi | |
10885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
10886 | $as_echo "$ac_cv_guild_ok" >&6; } | |
10887 | ||
10888 | if test "$ac_cv_guild_ok" = no; then | |
10889 | have_libguile=no | |
10890 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
10891 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
10892 | fi | |
10893 | fi | |
10894 | ||
ed3ef339 DE |
10895 | if test "${have_libguile}" != no; then |
10896 | ||
10897 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
10898 | ||
10899 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
10900 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
10901 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
10902 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
10903 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
10904 | |
10905 | save_LIBS="$LIBS" | |
10906 | save_CPPFLAGS="$CPPFLAGS" | |
10907 | LIBS="$GUILE_LIBS" | |
10908 | CPPFLAGS="$GUILE_CPPFLAGS" | |
10909 | for ac_func in scm_new_smob | |
10910 | do : | |
10911 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
10912 | if test "x$ac_cv_func_scm_new_smob" = x""yes; then : | |
10913 | cat >>confdefs.h <<_ACEOF | |
10914 | #define HAVE_SCM_NEW_SMOB 1 | |
10915 | _ACEOF | |
10916 | ||
10917 | fi | |
10918 | done | |
10919 | ||
10920 | LIBS="$save_LIBS" | |
10921 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
10922 | else |
10923 | # Even if Guile support is not compiled in, we need to have these files | |
10924 | # included. | |
10925 | CONFIG_OBS="$CONFIG_OBS guile.o" | |
10926 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" | |
10927 | fi | |
9a156167 | 10928 | |
ac534cba | 10929 | |
4df42755 DE |
10930 | if test "${have_libguile}" != no; then |
10931 | HAVE_GUILE_TRUE= | |
10932 | HAVE_GUILE_FALSE='#' | |
10933 | else | |
10934 | HAVE_GUILE_TRUE='#' | |
10935 | HAVE_GUILE_FALSE= | |
10936 | fi | |
10937 | ||
ac534cba | 10938 | |
d344e670 DE |
10939 | # --------------------- # |
10940 | # Check for libmcheck. # | |
10941 | # --------------------- # | |
10942 | ||
a8db4212 YPK |
10943 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
10944 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
10945 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
10946 | # and for releases. | |
17ef446e PA |
10947 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
10948 | && $development; then | |
10949 | libmcheck_default=yes | |
10950 | else | |
10951 | libmcheck_default=no | |
a8db4212 YPK |
10952 | fi |
10953 | ||
17ef446e PA |
10954 | # Check whether --enable-libmcheck was given. |
10955 | if test "${enable_libmcheck+set}" = set; then : | |
10956 | enableval=$enable_libmcheck; case "${enableval}" in | |
10957 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
10958 | no | n) ENABLE_LIBMCHECK="no" ;; | |
10959 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
10960 | esac | |
10961 | fi | |
10962 | ||
10963 | ||
10964 | if test -z "${ENABLE_LIBMCHECK}"; then | |
10965 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 10966 | fi |
17ef446e PA |
10967 | |
10968 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
10969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
10970 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
10971 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
10972 | $as_echo_n "(cached) " >&6 | |
10973 | else | |
10974 | ac_check_lib_save_LIBS=$LIBS | |
10975 | LIBS="-lmcheck $LIBS" | |
10976 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10977 | /* end confdefs.h. */ | |
10978 | ||
10979 | ||
10980 | int | |
10981 | main () | |
10982 | { | |
10983 | return main (); | |
10984 | ; | |
10985 | return 0; | |
10986 | } | |
10987 | _ACEOF | |
10988 | if ac_fn_c_try_link "$LINENO"; then : | |
10989 | ac_cv_lib_mcheck_main=yes | |
10990 | else | |
10991 | ac_cv_lib_mcheck_main=no | |
10992 | fi | |
10993 | rm -f core conftest.err conftest.$ac_objext \ | |
10994 | conftest$ac_exeext conftest.$ac_ext | |
10995 | LIBS=$ac_check_lib_save_LIBS | |
10996 | fi | |
10997 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
10998 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
10999 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
11000 | cat >>confdefs.h <<_ACEOF | |
11001 | #define HAVE_LIBMCHECK 1 | |
11002 | _ACEOF | |
11003 | ||
11004 | LIBS="-lmcheck $LIBS" | |
11005 | ||
11006 | fi | |
11007 | ||
17ef446e PA |
11008 | fi |
11009 | ||
11010 | ||
11011 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
11012 | -a "${have_libpython}" != "no" \ | |
11013 | -a "${python_has_threads}" = "yes" ; then | |
11014 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
11015 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
11016 | fi |
11017 | ||
58bfce93 MM |
11018 | |
11019 | # Check whether --with-intel_pt was given. | |
11020 | if test "${with_intel_pt+set}" = set; then : | |
11021 | withval=$with_intel_pt; | |
11022 | else | |
11023 | with_intel_pt=auto | |
11024 | fi | |
11025 | ||
11026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
11027 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
11028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
11029 | $as_echo "$with_intel_pt" >&6; } | |
11030 | ||
11031 | if test "${with_intel_pt}" = no; then | |
bc504a31 PA |
11032 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 |
11033 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
58bfce93 MM |
11034 | HAVE_LIBIPT=no |
11035 | else | |
5599c404 MM |
11036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11037 | /* end confdefs.h. */ | |
11038 | ||
11039 | #include <linux/perf_event.h> | |
11040 | #ifndef PERF_ATTR_SIZE_VER5 | |
11041 | # error | |
11042 | #endif | |
11043 | ||
11044 | _ACEOF | |
11045 | if ac_fn_c_try_cpp "$LINENO"; then : | |
11046 | perf_event=yes | |
11047 | else | |
11048 | perf_event=no | |
11049 | fi | |
11050 | rm -f conftest.err conftest.$ac_ext | |
11051 | if test "$perf_event" != yes; then | |
11052 | if test "$with_intel_pt" = yes; then | |
11053 | as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5 | |
11054 | else | |
11055 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
11056 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
11057 | fi | |
11058 | fi | |
11059 | ||
58bfce93 MM |
11060 | |
11061 | ||
11062 | ||
11063 | ||
11064 | ||
11065 | ||
11066 | ||
11067 | ||
11068 | use_additional=yes | |
11069 | ||
11070 | acl_save_prefix="$prefix" | |
11071 | prefix="$acl_final_prefix" | |
11072 | acl_save_exec_prefix="$exec_prefix" | |
11073 | exec_prefix="$acl_final_exec_prefix" | |
11074 | ||
11075 | eval additional_includedir=\"$includedir\" | |
11076 | eval additional_libdir=\"$libdir\" | |
11077 | ||
11078 | exec_prefix="$acl_save_exec_prefix" | |
11079 | prefix="$acl_save_prefix" | |
11080 | ||
11081 | ||
11082 | # Check whether --with-libipt-prefix was given. | |
11083 | if test "${with_libipt_prefix+set}" = set; then : | |
11084 | withval=$with_libipt_prefix; | |
11085 | if test "X$withval" = "Xno"; then | |
11086 | use_additional=no | |
11087 | else | |
11088 | if test "X$withval" = "X"; then | |
11089 | ||
11090 | acl_save_prefix="$prefix" | |
11091 | prefix="$acl_final_prefix" | |
11092 | acl_save_exec_prefix="$exec_prefix" | |
11093 | exec_prefix="$acl_final_exec_prefix" | |
11094 | ||
11095 | eval additional_includedir=\"$includedir\" | |
11096 | eval additional_libdir=\"$libdir\" | |
11097 | ||
11098 | exec_prefix="$acl_save_exec_prefix" | |
11099 | prefix="$acl_save_prefix" | |
11100 | ||
11101 | else | |
11102 | additional_includedir="$withval/include" | |
11103 | additional_libdir="$withval/lib" | |
11104 | fi | |
11105 | fi | |
11106 | ||
11107 | fi | |
11108 | ||
11109 | LIBIPT= | |
11110 | LTLIBIPT= | |
11111 | INCIPT= | |
11112 | rpathdirs= | |
11113 | ltrpathdirs= | |
11114 | names_already_handled= | |
11115 | names_next_round='ipt ' | |
11116 | while test -n "$names_next_round"; do | |
11117 | names_this_round="$names_next_round" | |
11118 | names_next_round= | |
11119 | for name in $names_this_round; do | |
11120 | already_handled= | |
11121 | for n in $names_already_handled; do | |
11122 | if test "$n" = "$name"; then | |
11123 | already_handled=yes | |
11124 | break | |
11125 | fi | |
11126 | done | |
11127 | if test -z "$already_handled"; then | |
11128 | names_already_handled="$names_already_handled $name" | |
11129 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
11130 | eval value=\"\$HAVE_LIB$uppername\" | |
11131 | if test -n "$value"; then | |
11132 | if test "$value" = yes; then | |
11133 | eval value=\"\$LIB$uppername\" | |
11134 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
11135 | eval value=\"\$LTLIB$uppername\" | |
11136 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
11137 | else | |
11138 | : | |
11139 | fi | |
11140 | else | |
11141 | found_dir= | |
11142 | found_la= | |
11143 | found_so= | |
11144 | found_a= | |
11145 | if test $use_additional = yes; then | |
11146 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
11147 | found_dir="$additional_libdir" | |
11148 | found_so="$additional_libdir/lib$name.$shlibext" | |
11149 | if test -f "$additional_libdir/lib$name.la"; then | |
11150 | found_la="$additional_libdir/lib$name.la" | |
11151 | fi | |
11152 | else | |
11153 | if test -f "$additional_libdir/lib$name.$libext"; then | |
11154 | found_dir="$additional_libdir" | |
11155 | found_a="$additional_libdir/lib$name.$libext" | |
11156 | if test -f "$additional_libdir/lib$name.la"; then | |
11157 | found_la="$additional_libdir/lib$name.la" | |
11158 | fi | |
11159 | fi | |
11160 | fi | |
11161 | fi | |
11162 | if test "X$found_dir" = "X"; then | |
11163 | for x in $LDFLAGS $LTLIBIPT; do | |
11164 | ||
11165 | acl_save_prefix="$prefix" | |
11166 | prefix="$acl_final_prefix" | |
11167 | acl_save_exec_prefix="$exec_prefix" | |
11168 | exec_prefix="$acl_final_exec_prefix" | |
11169 | eval x=\"$x\" | |
11170 | exec_prefix="$acl_save_exec_prefix" | |
11171 | prefix="$acl_save_prefix" | |
11172 | ||
11173 | case "$x" in | |
11174 | -L*) | |
11175 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
11176 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
11177 | found_dir="$dir" | |
11178 | found_so="$dir/lib$name.$shlibext" | |
11179 | if test -f "$dir/lib$name.la"; then | |
11180 | found_la="$dir/lib$name.la" | |
11181 | fi | |
11182 | else | |
11183 | if test -f "$dir/lib$name.$libext"; then | |
11184 | found_dir="$dir" | |
11185 | found_a="$dir/lib$name.$libext" | |
11186 | if test -f "$dir/lib$name.la"; then | |
11187 | found_la="$dir/lib$name.la" | |
11188 | fi | |
11189 | fi | |
11190 | fi | |
11191 | ;; | |
11192 | esac | |
11193 | if test "X$found_dir" != "X"; then | |
11194 | break | |
11195 | fi | |
11196 | done | |
11197 | fi | |
11198 | if test "X$found_dir" != "X"; then | |
11199 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
11200 | if test "X$found_so" != "X"; then | |
11201 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
11202 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11203 | else | |
11204 | haveit= | |
11205 | for x in $ltrpathdirs; do | |
11206 | if test "X$x" = "X$found_dir"; then | |
11207 | haveit=yes | |
11208 | break | |
11209 | fi | |
11210 | done | |
11211 | if test -z "$haveit"; then | |
11212 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11213 | fi | |
11214 | if test "$hardcode_direct" = yes; then | |
11215 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11216 | else | |
11217 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11218 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11219 | haveit= | |
11220 | for x in $rpathdirs; do | |
11221 | if test "X$x" = "X$found_dir"; then | |
11222 | haveit=yes | |
11223 | break | |
11224 | fi | |
11225 | done | |
11226 | if test -z "$haveit"; then | |
11227 | rpathdirs="$rpathdirs $found_dir" | |
11228 | fi | |
11229 | else | |
11230 | haveit= | |
11231 | for x in $LDFLAGS $LIBIPT; do | |
11232 | ||
11233 | acl_save_prefix="$prefix" | |
11234 | prefix="$acl_final_prefix" | |
11235 | acl_save_exec_prefix="$exec_prefix" | |
11236 | exec_prefix="$acl_final_exec_prefix" | |
11237 | eval x=\"$x\" | |
11238 | exec_prefix="$acl_save_exec_prefix" | |
11239 | prefix="$acl_save_prefix" | |
11240 | ||
11241 | if test "X$x" = "X-L$found_dir"; then | |
11242 | haveit=yes | |
11243 | break | |
11244 | fi | |
11245 | done | |
11246 | if test -z "$haveit"; then | |
11247 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
11248 | fi | |
11249 | if test "$hardcode_minus_L" != no; then | |
11250 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11251 | else | |
11252 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11253 | fi | |
11254 | fi | |
11255 | fi | |
11256 | fi | |
11257 | else | |
11258 | if test "X$found_a" != "X"; then | |
11259 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
11260 | else | |
11261 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
11262 | fi | |
11263 | fi | |
11264 | additional_includedir= | |
11265 | case "$found_dir" in | |
11266 | */lib | */lib/) | |
11267 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11268 | additional_includedir="$basedir/include" | |
11269 | ;; | |
11270 | esac | |
11271 | if test "X$additional_includedir" != "X"; then | |
11272 | if test "X$additional_includedir" != "X/usr/include"; then | |
11273 | haveit= | |
11274 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11275 | if test -n "$GCC"; then | |
11276 | case $host_os in | |
11277 | linux*) haveit=yes;; | |
11278 | esac | |
11279 | fi | |
11280 | fi | |
11281 | if test -z "$haveit"; then | |
11282 | for x in $CPPFLAGS $INCIPT; do | |
11283 | ||
11284 | acl_save_prefix="$prefix" | |
11285 | prefix="$acl_final_prefix" | |
11286 | acl_save_exec_prefix="$exec_prefix" | |
11287 | exec_prefix="$acl_final_exec_prefix" | |
11288 | eval x=\"$x\" | |
11289 | exec_prefix="$acl_save_exec_prefix" | |
11290 | prefix="$acl_save_prefix" | |
11291 | ||
11292 | if test "X$x" = "X-I$additional_includedir"; then | |
11293 | haveit=yes | |
11294 | break | |
11295 | fi | |
11296 | done | |
11297 | if test -z "$haveit"; then | |
11298 | if test -d "$additional_includedir"; then | |
11299 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
11300 | fi | |
11301 | fi | |
11302 | fi | |
11303 | fi | |
11304 | fi | |
11305 | if test -n "$found_la"; then | |
11306 | save_libdir="$libdir" | |
11307 | case "$found_la" in | |
11308 | */* | *\\*) . "$found_la" ;; | |
11309 | *) . "./$found_la" ;; | |
11310 | esac | |
11311 | libdir="$save_libdir" | |
11312 | for dep in $dependency_libs; do | |
11313 | case "$dep" in | |
11314 | -L*) | |
11315 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11316 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11317 | haveit= | |
11318 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11319 | if test -n "$GCC"; then | |
11320 | case $host_os in | |
11321 | linux*) haveit=yes;; | |
11322 | esac | |
11323 | fi | |
11324 | fi | |
11325 | if test -z "$haveit"; then | |
11326 | haveit= | |
11327 | for x in $LDFLAGS $LIBIPT; do | |
11328 | ||
11329 | acl_save_prefix="$prefix" | |
11330 | prefix="$acl_final_prefix" | |
11331 | acl_save_exec_prefix="$exec_prefix" | |
11332 | exec_prefix="$acl_final_exec_prefix" | |
11333 | eval x=\"$x\" | |
11334 | exec_prefix="$acl_save_exec_prefix" | |
11335 | prefix="$acl_save_prefix" | |
11336 | ||
11337 | if test "X$x" = "X-L$additional_libdir"; then | |
11338 | haveit=yes | |
11339 | break | |
11340 | fi | |
11341 | done | |
11342 | if test -z "$haveit"; then | |
11343 | if test -d "$additional_libdir"; then | |
11344 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
11345 | fi | |
11346 | fi | |
11347 | haveit= | |
11348 | for x in $LDFLAGS $LTLIBIPT; do | |
11349 | ||
11350 | acl_save_prefix="$prefix" | |
11351 | prefix="$acl_final_prefix" | |
11352 | acl_save_exec_prefix="$exec_prefix" | |
11353 | exec_prefix="$acl_final_exec_prefix" | |
11354 | eval x=\"$x\" | |
11355 | exec_prefix="$acl_save_exec_prefix" | |
11356 | prefix="$acl_save_prefix" | |
11357 | ||
11358 | if test "X$x" = "X-L$additional_libdir"; then | |
11359 | haveit=yes | |
11360 | break | |
11361 | fi | |
11362 | done | |
11363 | if test -z "$haveit"; then | |
11364 | if test -d "$additional_libdir"; then | |
11365 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
11366 | fi | |
11367 | fi | |
11368 | fi | |
11369 | fi | |
11370 | ;; | |
11371 | -R*) | |
11372 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
11373 | if test "$enable_rpath" != no; then | |
11374 | haveit= | |
11375 | for x in $rpathdirs; do | |
11376 | if test "X$x" = "X$dir"; then | |
11377 | haveit=yes | |
11378 | break | |
11379 | fi | |
11380 | done | |
11381 | if test -z "$haveit"; then | |
11382 | rpathdirs="$rpathdirs $dir" | |
11383 | fi | |
11384 | haveit= | |
11385 | for x in $ltrpathdirs; do | |
11386 | if test "X$x" = "X$dir"; then | |
11387 | haveit=yes | |
11388 | break | |
11389 | fi | |
11390 | done | |
11391 | if test -z "$haveit"; then | |
11392 | ltrpathdirs="$ltrpathdirs $dir" | |
11393 | fi | |
11394 | fi | |
11395 | ;; | |
11396 | -l*) | |
11397 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
11398 | ;; | |
11399 | *.la) | |
11400 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
11401 | ;; | |
11402 | *) | |
11403 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
11404 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
11405 | ;; | |
11406 | esac | |
11407 | done | |
11408 | fi | |
11409 | else | |
11410 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11411 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
11412 | fi | |
11413 | fi | |
11414 | fi | |
11415 | done | |
11416 | done | |
11417 | if test "X$rpathdirs" != "X"; then | |
11418 | if test -n "$hardcode_libdir_separator"; then | |
11419 | alldirs= | |
11420 | for found_dir in $rpathdirs; do | |
11421 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11422 | done | |
11423 | acl_save_libdir="$libdir" | |
11424 | libdir="$alldirs" | |
11425 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11426 | libdir="$acl_save_libdir" | |
11427 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11428 | else | |
11429 | for found_dir in $rpathdirs; do | |
11430 | acl_save_libdir="$libdir" | |
11431 | libdir="$found_dir" | |
11432 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11433 | libdir="$acl_save_libdir" | |
11434 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11435 | done | |
11436 | fi | |
11437 | fi | |
11438 | if test "X$ltrpathdirs" != "X"; then | |
11439 | for found_dir in $ltrpathdirs; do | |
11440 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
11441 | done | |
11442 | fi | |
11443 | ||
11444 | ||
11445 | ac_save_CPPFLAGS="$CPPFLAGS" | |
11446 | ||
11447 | for element in $INCIPT; do | |
11448 | haveit= | |
11449 | for x in $CPPFLAGS; do | |
11450 | ||
11451 | acl_save_prefix="$prefix" | |
11452 | prefix="$acl_final_prefix" | |
11453 | acl_save_exec_prefix="$exec_prefix" | |
11454 | exec_prefix="$acl_final_exec_prefix" | |
11455 | eval x=\"$x\" | |
11456 | exec_prefix="$acl_save_exec_prefix" | |
11457 | prefix="$acl_save_prefix" | |
11458 | ||
11459 | if test "X$x" = "X$element"; then | |
11460 | haveit=yes | |
11461 | break | |
11462 | fi | |
11463 | done | |
11464 | if test -z "$haveit"; then | |
11465 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11466 | fi | |
11467 | done | |
11468 | ||
11469 | ||
11470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
11471 | $as_echo_n "checking for libipt... " >&6; } | |
11472 | if test "${ac_cv_libipt+set}" = set; then : | |
11473 | $as_echo_n "(cached) " >&6 | |
11474 | else | |
11475 | ||
11476 | ac_save_LIBS="$LIBS" | |
11477 | LIBS="$LIBS $LIBIPT" | |
11478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11479 | /* end confdefs.h. */ | |
11480 | #include "intel-pt.h" | |
11481 | int | |
11482 | main () | |
11483 | { | |
11484 | pt_insn_alloc_decoder (0); | |
11485 | ; | |
11486 | return 0; | |
11487 | } | |
11488 | _ACEOF | |
11489 | if ac_fn_c_try_link "$LINENO"; then : | |
11490 | ac_cv_libipt=yes | |
11491 | else | |
11492 | ac_cv_libipt=no | |
11493 | fi | |
11494 | rm -f core conftest.err conftest.$ac_objext \ | |
11495 | conftest$ac_exeext conftest.$ac_ext | |
11496 | LIBS="$ac_save_LIBS" | |
11497 | ||
11498 | fi | |
11499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 | |
11500 | $as_echo "$ac_cv_libipt" >&6; } | |
11501 | if test "$ac_cv_libipt" = yes; then | |
11502 | HAVE_LIBIPT=yes | |
11503 | ||
11504 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h | |
11505 | ||
11506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
11507 | $as_echo_n "checking how to link with libipt... " >&6; } | |
11508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
11509 | $as_echo "$LIBIPT" >&6; } | |
11510 | else | |
11511 | HAVE_LIBIPT=no | |
11512 | CPPFLAGS="$ac_save_CPPFLAGS" | |
11513 | LIBIPT= | |
11514 | LTLIBIPT= | |
11515 | fi | |
11516 | ||
11517 | ||
11518 | ||
11519 | ||
11520 | ||
11521 | ||
11522 | if test "$HAVE_LIBIPT" != yes; then | |
11523 | if test "$with_intel_pt" = yes; then | |
11524 | as_fn_error "libipt is missing or unusable" "$LINENO" 5 | |
11525 | else | |
11526 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
11527 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
11528 | fi | |
11529 | fi | |
11530 | fi | |
11531 | ||
81ecdfbb RW |
11532 | # ------------------------- # |
11533 | # Checks for header files. # | |
11534 | # ------------------------- # | |
c890192f | 11535 | |
81ecdfbb RW |
11536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
11537 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11538 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11539 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11540 | else |
81ecdfbb | 11541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11542 | /* end confdefs.h. */ |
81ecdfbb RW |
11543 | #include <stdlib.h> |
11544 | #include <stdarg.h> | |
11545 | #include <string.h> | |
11546 | #include <float.h> | |
11547 | ||
a9322a30 TT |
11548 | int |
11549 | main () | |
11550 | { | |
a9322a30 TT |
11551 | |
11552 | ; | |
11553 | return 0; | |
11554 | } | |
bec39cab | 11555 | _ACEOF |
81ecdfbb RW |
11556 | if ac_fn_c_try_compile "$LINENO"; then : |
11557 | ac_cv_header_stdc=yes | |
bec39cab | 11558 | else |
81ecdfbb | 11559 | ac_cv_header_stdc=no |
a9322a30 | 11560 | fi |
81ecdfbb | 11561 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11562 | |
81ecdfbb RW |
11563 | if test $ac_cv_header_stdc = yes; then |
11564 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11566 | /* end confdefs.h. */ | |
11567 | #include <string.h> | |
bec39cab | 11568 | |
81ecdfbb RW |
11569 | _ACEOF |
11570 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11571 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 11572 | |
bec39cab | 11573 | else |
81ecdfbb RW |
11574 | ac_cv_header_stdc=no |
11575 | fi | |
11576 | rm -f conftest* | |
11577 | ||
11578 | fi | |
11579 | ||
11580 | if test $ac_cv_header_stdc = yes; then | |
11581 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11583 | /* end confdefs.h. */ | |
11584 | #include <stdlib.h> | |
11585 | ||
bec39cab | 11586 | _ACEOF |
81ecdfbb RW |
11587 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11588 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 11589 | |
81ecdfbb RW |
11590 | else |
11591 | ac_cv_header_stdc=no | |
11592 | fi | |
11593 | rm -f conftest* | |
bec39cab | 11594 | |
bec39cab | 11595 | fi |
81ecdfbb RW |
11596 | |
11597 | if test $ac_cv_header_stdc = yes; then | |
11598 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11599 | if test "$cross_compiling" = yes; then : | |
11600 | : | |
bec39cab | 11601 | else |
81ecdfbb | 11602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11603 | /* end confdefs.h. */ |
81ecdfbb RW |
11604 | #include <ctype.h> |
11605 | #include <stdlib.h> | |
11606 | #if ((' ' & 0x0FF) == 0x020) | |
11607 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11608 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11609 | #else | |
11610 | # define ISLOWER(c) \ | |
11611 | (('a' <= (c) && (c) <= 'i') \ | |
11612 | || ('j' <= (c) && (c) <= 'r') \ | |
11613 | || ('s' <= (c) && (c) <= 'z')) | |
11614 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11615 | #endif | |
11616 | ||
11617 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
11618 | int |
11619 | main () | |
11620 | { | |
81ecdfbb RW |
11621 | int i; |
11622 | for (i = 0; i < 256; i++) | |
11623 | if (XOR (islower (i), ISLOWER (i)) | |
11624 | || toupper (i) != TOUPPER (i)) | |
11625 | return 2; | |
a9322a30 TT |
11626 | return 0; |
11627 | } | |
bec39cab | 11628 | _ACEOF |
81ecdfbb RW |
11629 | if ac_fn_c_try_run "$LINENO"; then : |
11630 | ||
bec39cab | 11631 | else |
81ecdfbb RW |
11632 | ac_cv_header_stdc=no |
11633 | fi | |
11634 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11635 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11636 | fi | |
bec39cab | 11637 | |
bec39cab | 11638 | fi |
a9322a30 | 11639 | fi |
81ecdfbb RW |
11640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
11641 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11642 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 11643 | |
81ecdfbb | 11644 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 11645 | |
81ecdfbb | 11646 | fi |
bec39cab | 11647 | |
81ecdfbb | 11648 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 11649 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 11650 | thread_db.h \ |
0080a2f6 | 11651 | sys/fault.h \ |
81ecdfbb RW |
11652 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
11653 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
11654 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
9467110b | 11655 | termios.h termio.h \ |
3447c057 | 11656 | sgtty.h elf_hp.h \ |
9467110b | 11657 | dlfcn.h |
81ecdfbb RW |
11658 | do : |
11659 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11660 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11661 | eval as_val=\$$as_ac_Header | |
11662 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11663 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11664 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11665 | _ACEOF |
c906108c | 11666 | |
bec39cab | 11667 | fi |
81ecdfbb RW |
11668 | |
11669 | done | |
11670 | ||
81ecdfbb RW |
11671 | for ac_header in sys/proc.h |
11672 | do : | |
11673 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
11674 | # include <sys/param.h> | |
11675 | #endif | |
c906108c | 11676 | |
81ecdfbb RW |
11677 | " |
11678 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 11679 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11680 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 11681 | _ACEOF |
5ee754fc | 11682 | |
bec39cab | 11683 | fi |
81ecdfbb RW |
11684 | |
11685 | done | |
11686 | ||
11687 | for ac_header in sys/user.h | |
11688 | do : | |
11689 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
11690 | # include <sys/param.h> | |
a9322a30 TT |
11691 | #endif |
11692 | ||
81ecdfbb RW |
11693 | " |
11694 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
11695 | cat >>confdefs.h <<_ACEOF | |
11696 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 11697 | _ACEOF |
bec39cab | 11698 | |
a9322a30 | 11699 | fi |
bec39cab | 11700 | |
81ecdfbb | 11701 | done |
5ee754fc | 11702 | |
5ee754fc | 11703 | |
81ecdfbb RW |
11704 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
11705 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
11706 | # think that we don't have <curses.h> if we're using GCC. | |
11707 | case $host_os in | |
11708 | solaris2.[789]) | |
11709 | if test "$GCC" = yes; then | |
11710 | ||
11711 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
11712 | ||
11713 | fi ;; | |
11714 | esac | |
11715 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
11716 | do : | |
11717 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11718 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11719 | eval as_val=\$$as_ac_Header | |
11720 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11721 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11722 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11723 | _ACEOF |
5ee754fc MK |
11724 | |
11725 | fi | |
11726 | ||
81ecdfbb | 11727 | done |
bec39cab | 11728 | |
81ecdfbb RW |
11729 | for ac_header in term.h |
11730 | do : | |
11731 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
11732 | # include <curses.h> | |
11733 | #endif | |
bec39cab | 11734 | |
81ecdfbb RW |
11735 | " |
11736 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
11737 | cat >>confdefs.h <<_ACEOF | |
11738 | #define HAVE_TERM_H 1 | |
a8111142 | 11739 | _ACEOF |
a8111142 | 11740 | |
a8111142 | 11741 | fi |
a8111142 | 11742 | |
81ecdfbb | 11743 | done |
a8111142 TT |
11744 | |
11745 | ||
81ecdfbb RW |
11746 | # ------------------------- # |
11747 | # Checks for declarations. # | |
11748 | # ------------------------- # | |
a9322a30 | 11749 | |
07697489 PA |
11750 | |
11751 | # Check for presence and size of long long. | |
11752 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
11753 | if test "x$ac_cv_type_long_long" = x""yes; then : | |
11754 | ||
11755 | cat >>confdefs.h <<_ACEOF | |
11756 | #define HAVE_LONG_LONG 1 | |
11757 | _ACEOF | |
11758 | ||
11759 | # The cast to long int works around a bug in the HP C Compiler | |
11760 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11761 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11762 | # This bug is HP SR number 8606223364. | |
11763 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
11764 | $as_echo_n "checking size of long long... " >&6; } | |
11765 | if test "${ac_cv_sizeof_long_long+set}" = set; then : | |
11766 | $as_echo_n "(cached) " >&6 | |
11767 | else | |
11768 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
11769 | ||
11770 | else | |
11771 | if test "$ac_cv_type_long_long" = yes; then | |
11772 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11773 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11774 | { as_fn_set_status 77 | |
11775 | as_fn_error "cannot compute sizeof (long long) | |
11776 | See \`config.log' for more details." "$LINENO" 5; }; } | |
11777 | else | |
11778 | ac_cv_sizeof_long_long=0 | |
11779 | fi | |
11780 | fi | |
11781 | ||
11782 | fi | |
11783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
11784 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
11785 | ||
11786 | ||
11787 | ||
11788 | cat >>confdefs.h <<_ACEOF | |
11789 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
11790 | _ACEOF | |
11791 | ||
11792 | ||
11793 | fi | |
11794 | ||
11795 | ||
11796 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" | |
11797 | if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : | |
11798 | ac_have_decl=1 | |
11799 | else | |
11800 | ac_have_decl=0 | |
11801 | fi | |
11802 | ||
11803 | cat >>confdefs.h <<_ACEOF | |
11804 | #define HAVE_DECL_BASENAME $ac_have_decl | |
11805 | _ACEOF | |
11806 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
11807 | if test "x$ac_cv_have_decl_ffs" = x""yes; then : | |
11808 | ac_have_decl=1 | |
11809 | else | |
11810 | ac_have_decl=0 | |
11811 | fi | |
11812 | ||
11813 | cat >>confdefs.h <<_ACEOF | |
11814 | #define HAVE_DECL_FFS $ac_have_decl | |
11815 | _ACEOF | |
11816 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
11817 | if test "x$ac_cv_have_decl_asprintf" = x""yes; then : | |
11818 | ac_have_decl=1 | |
11819 | else | |
11820 | ac_have_decl=0 | |
11821 | fi | |
11822 | ||
11823 | cat >>confdefs.h <<_ACEOF | |
11824 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
11825 | _ACEOF | |
11826 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
11827 | if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : | |
11828 | ac_have_decl=1 | |
11829 | else | |
11830 | ac_have_decl=0 | |
11831 | fi | |
11832 | ||
11833 | cat >>confdefs.h <<_ACEOF | |
11834 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
11835 | _ACEOF | |
11836 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
11837 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
11838 | ac_have_decl=1 | |
11839 | else | |
11840 | ac_have_decl=0 | |
11841 | fi | |
11842 | ||
11843 | cat >>confdefs.h <<_ACEOF | |
11844 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11845 | _ACEOF | |
11846 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
11847 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
11848 | ac_have_decl=1 | |
11849 | else | |
11850 | ac_have_decl=0 | |
11851 | fi | |
11852 | ||
11853 | cat >>confdefs.h <<_ACEOF | |
11854 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
11855 | _ACEOF | |
11856 | ||
11857 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
11858 | if test "x$ac_cv_have_decl_strtol" = x""yes; then : | |
11859 | ac_have_decl=1 | |
11860 | else | |
11861 | ac_have_decl=0 | |
11862 | fi | |
11863 | ||
11864 | cat >>confdefs.h <<_ACEOF | |
11865 | #define HAVE_DECL_STRTOL $ac_have_decl | |
11866 | _ACEOF | |
11867 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
11868 | if test "x$ac_cv_have_decl_strtoul" = x""yes; then : | |
11869 | ac_have_decl=1 | |
11870 | else | |
11871 | ac_have_decl=0 | |
11872 | fi | |
11873 | ||
11874 | cat >>confdefs.h <<_ACEOF | |
11875 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
11876 | _ACEOF | |
11877 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
11878 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
11879 | ac_have_decl=1 | |
11880 | else | |
11881 | ac_have_decl=0 | |
11882 | fi | |
11883 | ||
11884 | cat >>confdefs.h <<_ACEOF | |
11885 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
11886 | _ACEOF | |
11887 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
11888 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
11889 | ac_have_decl=1 | |
11890 | else | |
11891 | ac_have_decl=0 | |
11892 | fi | |
11893 | ||
11894 | cat >>confdefs.h <<_ACEOF | |
11895 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
11896 | _ACEOF | |
11897 | ||
11898 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
11899 | if test "x$ac_cv_have_decl_strverscmp" = x""yes; then : | |
11900 | ac_have_decl=1 | |
11901 | else | |
11902 | ac_have_decl=0 | |
11903 | fi | |
11904 | ||
11905 | cat >>confdefs.h <<_ACEOF | |
11906 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
11907 | _ACEOF | |
11908 | ||
11909 | ||
11910 | ||
81ecdfbb RW |
11911 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
11912 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
11913 | ac_have_decl=1 | |
bec39cab | 11914 | else |
81ecdfbb RW |
11915 | ac_have_decl=0 |
11916 | fi | |
11917 | ||
11918 | cat >>confdefs.h <<_ACEOF | |
11919 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 11920 | _ACEOF |
81ecdfbb RW |
11921 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
11922 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
11923 | ac_have_decl=1 | |
11924 | else | |
11925 | ac_have_decl=0 | |
11926 | fi | |
11927 | ||
11928 | cat >>confdefs.h <<_ACEOF | |
11929 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 11930 | _ACEOF |
81ecdfbb RW |
11931 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
11932 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
11933 | ac_have_decl=1 | |
bec39cab | 11934 | else |
81ecdfbb RW |
11935 | ac_have_decl=0 |
11936 | fi | |
bec39cab | 11937 | |
81ecdfbb RW |
11938 | cat >>confdefs.h <<_ACEOF |
11939 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 11940 | _ACEOF |
81ecdfbb RW |
11941 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
11942 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
11943 | ac_have_decl=1 | |
11944 | else | |
11945 | ac_have_decl=0 | |
5ee754fc | 11946 | fi |
81ecdfbb RW |
11947 | |
11948 | cat >>confdefs.h <<_ACEOF | |
11949 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 11950 | _ACEOF |
5ee754fc | 11951 | |
5ee754fc | 11952 | |
81ecdfbb RW |
11953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
11954 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
11955 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
11956 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11957 | else |
81ecdfbb | 11958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11959 | /* end confdefs.h. */ |
81ecdfbb | 11960 | #include <locale.h> |
a9322a30 TT |
11961 | int |
11962 | main () | |
11963 | { | |
81ecdfbb | 11964 | return LC_MESSAGES |
a9322a30 TT |
11965 | ; |
11966 | return 0; | |
11967 | } | |
bec39cab | 11968 | _ACEOF |
81ecdfbb RW |
11969 | if ac_fn_c_try_link "$LINENO"; then : |
11970 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 11971 | else |
81ecdfbb RW |
11972 | am_cv_val_LC_MESSAGES=no |
11973 | fi | |
11974 | rm -f core conftest.err conftest.$ac_objext \ | |
11975 | conftest$ac_exeext conftest.$ac_ext | |
11976 | fi | |
11977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
11978 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
11979 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 11980 | |
81ecdfbb RW |
11981 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
11982 | ||
11983 | fi | |
11984 | ||
11985 | ||
11986 | # ----------------------- # | |
11987 | # Checks for structures. # | |
11988 | # ----------------------- # | |
11989 | ||
11990 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
11991 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
11992 | ||
11993 | cat >>confdefs.h <<_ACEOF | |
11994 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 11995 | _ACEOF |
7eb368b3 | 11996 | |
81ecdfbb | 11997 | |
7eb368b3 | 11998 | fi |
81ecdfbb RW |
11999 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
12000 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 12001 | |
a9322a30 TT |
12002 | cat >>confdefs.h <<_ACEOF |
12003 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
12004 | _ACEOF |
12005 | ||
a9322a30 | 12006 | |
7eb368b3 NR |
12007 | fi |
12008 | ||
7eb368b3 | 12009 | |
a9322a30 TT |
12010 | # ------------------ # |
12011 | # Checks for types. # | |
12012 | # ------------------ # | |
7eb368b3 | 12013 | |
81ecdfbb | 12014 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
12015 | #include <sys/socket.h> |
12016 | ||
81ecdfbb RW |
12017 | " |
12018 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 12019 | |
a9322a30 TT |
12020 | cat >>confdefs.h <<_ACEOF |
12021 | #define HAVE_SOCKLEN_T 1 | |
12022 | _ACEOF | |
12023 | ||
12024 | ||
12025 | fi | |
12026 | ||
12027 | ||
12028 | # ------------------------------------- # | |
12029 | # Checks for compiler characteristics. # | |
12030 | # ------------------------------------- # | |
12031 | ||
81ecdfbb RW |
12032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12033 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12034 | if test "${ac_cv_c_const+set}" = set; then : | |
12035 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12036 | else |
81ecdfbb | 12037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12038 | /* end confdefs.h. */ |
a9322a30 TT |
12039 | |
12040 | int | |
12041 | main () | |
12042 | { | |
12043 | /* FIXME: Include the comments suggested by Paul. */ | |
12044 | #ifndef __cplusplus | |
12045 | /* Ultrix mips cc rejects this. */ | |
12046 | typedef int charset[2]; | |
81ecdfbb | 12047 | const charset cs; |
a9322a30 | 12048 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
12049 | char const *const *pcpcc; |
12050 | char **ppc; | |
a9322a30 TT |
12051 | /* NEC SVR4.0.2 mips cc rejects this. */ |
12052 | struct point {int x, y;}; | |
12053 | static struct point const zero = {0,0}; | |
12054 | /* AIX XL C 1.02.0.0 rejects this. | |
12055 | It does not let you subtract one const X* pointer from another in | |
12056 | an arm of an if-expression whose if-part is not a constant | |
12057 | expression */ | |
12058 | const char *g = "string"; | |
81ecdfbb | 12059 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 12060 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
12061 | ++pcpcc; |
12062 | ppc = (char**) pcpcc; | |
12063 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
12064 | { /* SCO 3.2v4 cc rejects this. */ |
12065 | char *t; | |
12066 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
12067 | ||
12068 | *t++ = 0; | |
81ecdfbb | 12069 | if (s) return 0; |
a9322a30 TT |
12070 | } |
12071 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12072 | int x[] = {25, 17}; | |
12073 | const int *foo = &x[0]; | |
12074 | ++foo; | |
12075 | } | |
12076 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12077 | typedef const int *iptr; | |
12078 | iptr p = 0; | |
12079 | ++p; | |
12080 | } | |
12081 | { /* AIX XL C 1.02.0.0 rejects this saying | |
12082 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12083 | struct s { int j; const int *ap[3]; }; | |
12084 | struct s *b; b->j = 5; | |
12085 | } | |
12086 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12087 | const int foo = 10; | |
81ecdfbb | 12088 | if (!foo) return 0; |
a9322a30 | 12089 | } |
81ecdfbb | 12090 | return !cs[0] && !zero.x; |
a9322a30 TT |
12091 | #endif |
12092 | ||
12093 | ; | |
12094 | return 0; | |
12095 | } | |
bec39cab | 12096 | _ACEOF |
81ecdfbb | 12097 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12098 | ac_cv_c_const=yes |
5ee754fc | 12099 | else |
81ecdfbb | 12100 | ac_cv_c_const=no |
5ee754fc | 12101 | fi |
81ecdfbb | 12102 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 12103 | fi |
81ecdfbb RW |
12104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12105 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 12106 | if test $ac_cv_c_const = no; then |
bec39cab | 12107 | |
81ecdfbb | 12108 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12109 | |
5ee754fc | 12110 | fi |
bec39cab | 12111 | |
81ecdfbb RW |
12112 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
12113 | $as_echo_n "checking for inline... " >&6; } | |
12114 | if test "${ac_cv_c_inline+set}" = set; then : | |
12115 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12116 | else |
a9322a30 TT |
12117 | ac_cv_c_inline=no |
12118 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 12119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12120 | /* end confdefs.h. */ |
a9322a30 TT |
12121 | #ifndef __cplusplus |
12122 | typedef int foo_t; | |
12123 | static $ac_kw foo_t static_foo () {return 0; } | |
12124 | $ac_kw foo_t foo () {return 0; } | |
12125 | #endif | |
12126 | ||
bec39cab | 12127 | _ACEOF |
81ecdfbb RW |
12128 | if ac_fn_c_try_compile "$LINENO"; then : |
12129 | ac_cv_c_inline=$ac_kw | |
bec39cab | 12130 | fi |
81ecdfbb RW |
12131 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12132 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 12133 | done |
bec39cab | 12134 | |
5ee754fc | 12135 | fi |
81ecdfbb RW |
12136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
12137 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 12138 | |
a9322a30 TT |
12139 | case $ac_cv_c_inline in |
12140 | inline | yes) ;; | |
12141 | *) | |
12142 | case $ac_cv_c_inline in | |
12143 | no) ac_val=;; | |
12144 | *) ac_val=$ac_cv_c_inline;; | |
12145 | esac | |
12146 | cat >>confdefs.h <<_ACEOF | |
12147 | #ifndef __cplusplus | |
12148 | #define inline $ac_val | |
12149 | #endif | |
12150 | _ACEOF | |
bec39cab AC |
12151 | ;; |
12152 | esac | |
bec39cab | 12153 | |
81ecdfbb RW |
12154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12155 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12156 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
12157 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12158 | else |
81ecdfbb RW |
12159 | ac_cv_c_bigendian=unknown |
12160 | # See if we're dealing with a universal compiler. | |
12161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12162 | /* end confdefs.h. */ | |
12163 | #ifndef __APPLE_CC__ | |
12164 | not a universal capable compiler | |
12165 | #endif | |
12166 | typedef int dummy; | |
12167 | ||
12168 | _ACEOF | |
12169 | if ac_fn_c_try_compile "$LINENO"; then : | |
12170 | ||
12171 | # Check for potential -arch flags. It is not universal unless | |
12172 | # there are at least two -arch flags with different values. | |
12173 | ac_arch= | |
12174 | ac_prev= | |
12175 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12176 | if test -n "$ac_prev"; then | |
12177 | case $ac_word in | |
12178 | i?86 | x86_64 | ppc | ppc64) | |
12179 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12180 | ac_arch=$ac_word | |
12181 | else | |
12182 | ac_cv_c_bigendian=universal | |
12183 | break | |
12184 | fi | |
12185 | ;; | |
12186 | esac | |
12187 | ac_prev= | |
12188 | elif test "x$ac_word" = "x-arch"; then | |
12189 | ac_prev=arch | |
12190 | fi | |
12191 | done | |
12192 | fi | |
12193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12194 | if test $ac_cv_c_bigendian = unknown; then | |
12195 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12197 | /* end confdefs.h. */ |
a9322a30 | 12198 | #include <sys/types.h> |
81ecdfbb | 12199 | #include <sys/param.h> |
a9322a30 TT |
12200 | |
12201 | int | |
12202 | main () | |
12203 | { | |
81ecdfbb RW |
12204 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
12205 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12206 | && LITTLE_ENDIAN) | |
12207 | bogus endian macros | |
12208 | #endif | |
a9322a30 TT |
12209 | |
12210 | ; | |
12211 | return 0; | |
12212 | } | |
bec39cab | 12213 | _ACEOF |
81ecdfbb | 12214 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12215 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 12216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12217 | /* end confdefs.h. */ |
a9322a30 | 12218 | #include <sys/types.h> |
81ecdfbb | 12219 | #include <sys/param.h> |
a9322a30 TT |
12220 | |
12221 | int | |
12222 | main () | |
12223 | { | |
12224 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
12225 | not big endian |
12226 | #endif | |
a9322a30 TT |
12227 | |
12228 | ; | |
12229 | return 0; | |
12230 | } | |
bec39cab | 12231 | _ACEOF |
81ecdfbb | 12232 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12233 | ac_cv_c_bigendian=yes |
5ee754fc | 12234 | else |
81ecdfbb | 12235 | ac_cv_c_bigendian=no |
5ee754fc | 12236 | fi |
81ecdfbb RW |
12237 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12238 | fi | |
12239 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12240 | fi | |
12241 | if test $ac_cv_c_bigendian = unknown; then | |
12242 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12244 | /* end confdefs.h. */ | |
12245 | #include <limits.h> | |
bec39cab | 12246 | |
81ecdfbb RW |
12247 | int |
12248 | main () | |
12249 | { | |
12250 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12251 | bogus endian macros | |
12252 | #endif | |
12253 | ||
12254 | ; | |
12255 | return 0; | |
12256 | } | |
7eb368b3 | 12257 | _ACEOF |
81ecdfbb RW |
12258 | if ac_fn_c_try_compile "$LINENO"; then : |
12259 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 12261 | /* end confdefs.h. */ |
81ecdfbb RW |
12262 | #include <limits.h> |
12263 | ||
7eb368b3 NR |
12264 | int |
12265 | main () | |
12266 | { | |
81ecdfbb RW |
12267 | #ifndef _BIG_ENDIAN |
12268 | not big endian | |
12269 | #endif | |
12270 | ||
7eb368b3 NR |
12271 | ; |
12272 | return 0; | |
12273 | } | |
12274 | _ACEOF | |
81ecdfbb | 12275 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12276 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
12277 | else |
12278 | ac_cv_c_bigendian=no | |
a9322a30 | 12279 | fi |
81ecdfbb | 12280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 12281 | fi |
81ecdfbb RW |
12282 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12283 | fi | |
12284 | if test $ac_cv_c_bigendian = unknown; then | |
12285 | # Compile a test program. | |
12286 | if test "$cross_compiling" = yes; then : | |
12287 | # Try to guess by grepping values from an object file. | |
12288 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12289 | /* end confdefs.h. */ | |
12290 | short int ascii_mm[] = | |
12291 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12292 | short int ascii_ii[] = | |
12293 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12294 | int use_ascii (int i) { | |
12295 | return ascii_mm[i] + ascii_ii[i]; | |
12296 | } | |
12297 | short int ebcdic_ii[] = | |
12298 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12299 | short int ebcdic_mm[] = | |
12300 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12301 | int use_ebcdic (int i) { | |
12302 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12303 | } | |
12304 | extern int foo; | |
7eb368b3 | 12305 | |
81ecdfbb RW |
12306 | int |
12307 | main () | |
12308 | { | |
12309 | return use_ascii (foo) == use_ebcdic (foo); | |
12310 | ; | |
12311 | return 0; | |
12312 | } | |
12313 | _ACEOF | |
12314 | if ac_fn_c_try_compile "$LINENO"; then : | |
12315 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12316 | ac_cv_c_bigendian=yes | |
12317 | fi | |
12318 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12319 | if test "$ac_cv_c_bigendian" = unknown; then | |
12320 | ac_cv_c_bigendian=no | |
12321 | else | |
12322 | # finding both strings is unlikely to happen, but who knows? | |
12323 | ac_cv_c_bigendian=unknown | |
12324 | fi | |
12325 | fi | |
7eb368b3 | 12326 | fi |
81ecdfbb | 12327 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12328 | else |
81ecdfbb | 12329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12330 | /* end confdefs.h. */ |
81ecdfbb | 12331 | $ac_includes_default |
d3ea6809 MM |
12332 | int |
12333 | main () | |
12334 | { | |
81ecdfbb RW |
12335 | |
12336 | /* Are we little or big endian? From Harbison&Steele. */ | |
12337 | union | |
12338 | { | |
12339 | long int l; | |
12340 | char c[sizeof (long int)]; | |
12341 | } u; | |
12342 | u.l = 1; | |
12343 | return u.c[sizeof (long int) - 1] == 1; | |
12344 | ||
12345 | ; | |
12346 | return 0; | |
d3ea6809 MM |
12347 | } |
12348 | _ACEOF | |
81ecdfbb | 12349 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12350 | ac_cv_c_bigendian=no |
d3ea6809 | 12351 | else |
81ecdfbb | 12352 | ac_cv_c_bigendian=yes |
d3ea6809 | 12353 | fi |
81ecdfbb RW |
12354 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12355 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12356 | fi |
a9322a30 | 12357 | |
81ecdfbb RW |
12358 | fi |
12359 | fi | |
12360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
12361 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12362 | case $ac_cv_c_bigendian in #( | |
12363 | yes) | |
12364 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12365 | ;; #( | |
12366 | no) | |
12367 | ;; #( | |
12368 | universal) | |
12369 | ||
12370 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
12371 | ||
12372 | ;; #( | |
12373 | *) | |
12374 | as_fn_error "unknown endianness | |
12375 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12376 | esac | |
d3ea6809 MM |
12377 | |
12378 | ||
a9322a30 TT |
12379 | # ------------------------------ # |
12380 | # Checks for library functions. # | |
12381 | # ------------------------------ # | |
d3ea6809 | 12382 | |
a9322a30 | 12383 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
12384 | do : |
12385 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12386 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12387 | eval as_val=\$$as_ac_Header | |
12388 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12389 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12390 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12391 | _ACEOF |
b757528f | 12392 | |
b757528f | 12393 | fi |
bec39cab | 12394 | |
a9322a30 | 12395 | done |
a3828db0 | 12396 | |
a9322a30 | 12397 | for ac_func in getpagesize |
81ecdfbb RW |
12398 | do : |
12399 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
12400 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 12401 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12402 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12403 | _ACEOF |
bcb3dc3d | 12404 | |
bcb3dc3d MK |
12405 | fi |
12406 | done | |
12407 | ||
81ecdfbb RW |
12408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12409 | $as_echo_n "checking for working mmap... " >&6; } | |
12410 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
12411 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12412 | else |
81ecdfbb | 12413 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12414 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12415 | else |
81ecdfbb | 12416 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12417 | /* end confdefs.h. */ |
a9322a30 TT |
12418 | $ac_includes_default |
12419 | /* malloc might have been renamed as rpl_malloc. */ | |
12420 | #undef malloc | |
bec39cab | 12421 | |
a9322a30 TT |
12422 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12423 | Here is a matrix of mmap possibilities: | |
12424 | mmap private not fixed | |
12425 | mmap private fixed at somewhere currently unmapped | |
12426 | mmap private fixed at somewhere already mapped | |
12427 | mmap shared not fixed | |
12428 | mmap shared fixed at somewhere currently unmapped | |
12429 | mmap shared fixed at somewhere already mapped | |
12430 | For private mappings, we should verify that changes cannot be read() | |
12431 | back from the file, nor mmap's back from the file at a different | |
12432 | address. (There have been systems where private was not correctly | |
12433 | implemented like the infamous i386 svr4.0, and systems where the | |
12434 | VM page cache was not coherent with the file system buffer cache | |
12435 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12436 | For shared mappings, we should conversely verify that changes get | |
12437 | propagated back to all the places they're supposed to be. | |
bec39cab | 12438 | |
a9322a30 TT |
12439 | Grep wants private fixed already mapped. |
12440 | The main things grep needs to know about mmap are: | |
12441 | * does it exist and is it safe to write into the mmap'd area | |
12442 | * how to use it (BSD variants) */ | |
8b9cf735 | 12443 | |
a9322a30 TT |
12444 | #include <fcntl.h> |
12445 | #include <sys/mman.h> | |
8b9cf735 | 12446 | |
81ecdfbb | 12447 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12448 | char *malloc (); |
a3828db0 MK |
12449 | #endif |
12450 | ||
a9322a30 | 12451 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12452 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 12453 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 12454 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
12455 | # define HAVE_SYS_PARAM_H 1 |
12456 | # endif | |
12457 | ||
12458 | # ifdef _SC_PAGESIZE | |
12459 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12460 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12461 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12462 | # include <sys/param.h> |
12463 | # ifdef EXEC_PAGESIZE | |
12464 | # define getpagesize() EXEC_PAGESIZE | |
12465 | # else /* no EXEC_PAGESIZE */ | |
12466 | # ifdef NBPG | |
12467 | # define getpagesize() NBPG * CLSIZE | |
12468 | # ifndef CLSIZE | |
12469 | # define CLSIZE 1 | |
12470 | # endif /* no CLSIZE */ | |
12471 | # else /* no NBPG */ | |
12472 | # ifdef NBPC | |
12473 | # define getpagesize() NBPC | |
12474 | # else /* no NBPC */ | |
12475 | # ifdef PAGESIZE | |
12476 | # define getpagesize() PAGESIZE | |
12477 | # endif /* PAGESIZE */ | |
12478 | # endif /* no NBPC */ | |
12479 | # endif /* no NBPG */ | |
12480 | # endif /* no EXEC_PAGESIZE */ | |
12481 | # else /* no HAVE_SYS_PARAM_H */ | |
12482 | # define getpagesize() 8192 /* punt totally */ | |
12483 | # endif /* no HAVE_SYS_PARAM_H */ | |
12484 | # endif /* no _SC_PAGESIZE */ | |
12485 | ||
12486 | #endif /* no HAVE_GETPAGESIZE */ | |
12487 | ||
bec39cab AC |
12488 | int |
12489 | main () | |
12490 | { | |
a9322a30 TT |
12491 | char *data, *data2, *data3; |
12492 | int i, pagesize; | |
12493 | int fd; | |
12494 | ||
12495 | pagesize = getpagesize (); | |
12496 | ||
12497 | /* First, make a file with some known garbage in it. */ | |
12498 | data = (char *) malloc (pagesize); | |
12499 | if (!data) | |
81ecdfbb | 12500 | return 1; |
a9322a30 TT |
12501 | for (i = 0; i < pagesize; ++i) |
12502 | *(data + i) = rand (); | |
12503 | umask (0); | |
12504 | fd = creat ("conftest.mmap", 0600); | |
12505 | if (fd < 0) | |
81ecdfbb | 12506 | return 1; |
a9322a30 | 12507 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 12508 | return 1; |
a9322a30 TT |
12509 | close (fd); |
12510 | ||
12511 | /* Next, try to mmap the file at a fixed address which already has | |
12512 | something else allocated at it. If we can, also make sure that | |
12513 | we see the same garbage. */ | |
12514 | fd = open ("conftest.mmap", O_RDWR); | |
12515 | if (fd < 0) | |
81ecdfbb | 12516 | return 1; |
a9322a30 TT |
12517 | data2 = (char *) malloc (2 * pagesize); |
12518 | if (!data2) | |
81ecdfbb RW |
12519 | return 1; |
12520 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
12521 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12522 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 12523 | return 1; |
a9322a30 TT |
12524 | for (i = 0; i < pagesize; ++i) |
12525 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 12526 | return 1; |
a9322a30 TT |
12527 | |
12528 | /* Finally, make sure that changes to the mapped area do not | |
12529 | percolate back to the file as seen by read(). (This is a bug on | |
12530 | some variants of i386 svr4.0.) */ | |
12531 | for (i = 0; i < pagesize; ++i) | |
12532 | *(data2 + i) = *(data2 + i) + 1; | |
12533 | data3 = (char *) malloc (pagesize); | |
12534 | if (!data3) | |
81ecdfbb | 12535 | return 1; |
a9322a30 | 12536 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 12537 | return 1; |
a9322a30 TT |
12538 | for (i = 0; i < pagesize; ++i) |
12539 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 12540 | return 1; |
a9322a30 | 12541 | close (fd); |
81ecdfbb | 12542 | return 0; |
bec39cab AC |
12543 | } |
12544 | _ACEOF | |
81ecdfbb | 12545 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12546 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12547 | else |
81ecdfbb | 12548 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12549 | fi |
81ecdfbb RW |
12550 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12551 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12552 | fi |
81ecdfbb | 12553 | |
a9322a30 | 12554 | fi |
81ecdfbb RW |
12555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12556 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12557 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12558 | ||
81ecdfbb | 12559 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12560 | |
086ec9eb | 12561 | fi |
a9322a30 | 12562 | rm -f conftest.mmap |
a3828db0 | 12563 | |
81ecdfbb RW |
12564 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
12565 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 12566 | |
a9322a30 TT |
12567 | else |
12568 | ||
12569 | cat >>confdefs.h <<_ACEOF | |
12570 | #define pid_t int | |
bec39cab | 12571 | _ACEOF |
086ec9eb MK |
12572 | |
12573 | fi | |
12574 | ||
81ecdfbb RW |
12575 | for ac_header in vfork.h |
12576 | do : | |
12577 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
12578 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 12579 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12580 | #define HAVE_VFORK_H 1 |
bec39cab | 12581 | _ACEOF |
c906108c SS |
12582 | |
12583 | fi | |
a9322a30 | 12584 | |
a3828db0 | 12585 | done |
c906108c | 12586 | |
a9322a30 | 12587 | for ac_func in fork vfork |
81ecdfbb RW |
12588 | do : |
12589 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12590 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12591 | eval as_val=\$$as_ac_var | |
12592 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 12593 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12594 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 12595 | _ACEOF |
b83266a0 | 12596 | |
97bf5e38 | 12597 | fi |
a3828db0 | 12598 | done |
b83266a0 | 12599 | |
a9322a30 | 12600 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
12601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
12602 | $as_echo_n "checking for working fork... " >&6; } | |
12603 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
12604 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12605 | else |
81ecdfbb | 12606 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12607 | ac_cv_func_fork_works=cross |
12608 | else | |
81ecdfbb RW |
12609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12610 | /* end confdefs.h. */ | |
12611 | $ac_includes_default | |
12612 | int | |
12613 | main () | |
12614 | { | |
12615 | ||
12616 | /* By Ruediger Kuhlmann. */ | |
12617 | return fork () < 0; | |
12618 | ||
12619 | ; | |
12620 | return 0; | |
12621 | } | |
a9322a30 | 12622 | _ACEOF |
81ecdfbb | 12623 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12624 | ac_cv_func_fork_works=yes |
12625 | else | |
81ecdfbb | 12626 | ac_cv_func_fork_works=no |
a9322a30 | 12627 | fi |
81ecdfbb RW |
12628 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12629 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12630 | fi |
81ecdfbb | 12631 | |
a9322a30 | 12632 | fi |
81ecdfbb RW |
12633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
12634 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
12635 | |
12636 | else | |
12637 | ac_cv_func_fork_works=$ac_cv_func_fork | |
12638 | fi | |
12639 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12640 | case $host in | |
12641 | *-*-amigaos* | *-*-msdosdjgpp*) | |
12642 | # Override, as these systems have only a dummy fork() stub | |
12643 | ac_cv_func_fork_works=no | |
12644 | ;; | |
12645 | *) | |
12646 | ac_cv_func_fork_works=yes | |
12647 | ;; | |
12648 | esac | |
81ecdfbb RW |
12649 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
12650 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12651 | fi |
12652 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
12653 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
12654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
12655 | $as_echo_n "checking for working vfork... " >&6; } | |
12656 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
12657 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12658 | else |
81ecdfbb | 12659 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12660 | ac_cv_func_vfork_works=cross |
12661 | else | |
81ecdfbb | 12662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
12663 | /* end confdefs.h. */ |
12664 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 12665 | $ac_includes_default |
a9322a30 | 12666 | #include <sys/wait.h> |
81ecdfbb | 12667 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
12668 | # include <vfork.h> |
12669 | #endif | |
12670 | /* On some sparc systems, changes by the child to local and incoming | |
12671 | argument registers are propagated back to the parent. The compiler | |
12672 | is told about this with #include <vfork.h>, but some compilers | |
12673 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
12674 | static variable whose address is put into a register that is | |
12675 | clobbered by the vfork. */ | |
12676 | static void | |
12677 | #ifdef __cplusplus | |
12678 | sparc_address_test (int arg) | |
12679 | # else | |
12680 | sparc_address_test (arg) int arg; | |
12681 | #endif | |
12682 | { | |
12683 | static pid_t child; | |
12684 | if (!child) { | |
12685 | child = vfork (); | |
12686 | if (child < 0) { | |
12687 | perror ("vfork"); | |
12688 | _exit(2); | |
12689 | } | |
12690 | if (!child) { | |
12691 | arg = getpid(); | |
12692 | write(-1, "", 0); | |
12693 | _exit (arg); | |
12694 | } | |
12695 | } | |
12696 | } | |
12697 | ||
12698 | int | |
12699 | main () | |
12700 | { | |
12701 | pid_t parent = getpid (); | |
12702 | pid_t child; | |
12703 | ||
12704 | sparc_address_test (0); | |
12705 | ||
12706 | child = vfork (); | |
12707 | ||
12708 | if (child == 0) { | |
12709 | /* Here is another test for sparc vfork register problems. This | |
12710 | test uses lots of local variables, at least as many local | |
12711 | variables as main has allocated so far including compiler | |
12712 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
12713 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
12714 | reuse the register of parent for one of the local variables, | |
12715 | since it will think that parent can't possibly be used any more | |
12716 | in this routine. Assigning to the local variable will thus | |
12717 | munge parent in the parent process. */ | |
12718 | pid_t | |
12719 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
12720 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
12721 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
12722 | use the same hardware register for all 8 local variables. */ | |
12723 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
12724 | || p != p5 || p != p6 || p != p7) | |
12725 | _exit(1); | |
12726 | ||
12727 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
12728 | from child file descriptors. If the child closes a descriptor | |
12729 | before it execs or exits, this munges the parent's descriptor | |
12730 | as well. Test for this by closing stdout in the child. */ | |
12731 | _exit(close(fileno(stdout)) != 0); | |
12732 | } else { | |
12733 | int status; | |
12734 | struct stat st; | |
12735 | ||
12736 | while (wait(&status) != child) | |
12737 | ; | |
81ecdfbb | 12738 | return ( |
a9322a30 TT |
12739 | /* Was there some problem with vforking? */ |
12740 | child < 0 | |
12741 | ||
12742 | /* Did the child fail? (This shouldn't happen.) */ | |
12743 | || status | |
12744 | ||
12745 | /* Did the vfork/compiler bug occur? */ | |
12746 | || parent != getpid() | |
12747 | ||
12748 | /* Did the file descriptor bug occur? */ | |
12749 | || fstat(fileno(stdout), &st) != 0 | |
12750 | ); | |
12751 | } | |
12752 | } | |
12753 | _ACEOF | |
81ecdfbb | 12754 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12755 | ac_cv_func_vfork_works=yes |
12756 | else | |
81ecdfbb | 12757 | ac_cv_func_vfork_works=no |
a9322a30 | 12758 | fi |
81ecdfbb RW |
12759 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12760 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12761 | fi |
81ecdfbb | 12762 | |
a9322a30 | 12763 | fi |
81ecdfbb RW |
12764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
12765 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
12766 | |
12767 | fi; | |
12768 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12769 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
12770 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
12771 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12772 | fi |
12773 | ||
12774 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
12775 | ||
81ecdfbb | 12776 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
12777 | |
12778 | else | |
12779 | ||
81ecdfbb | 12780 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
12781 | |
12782 | fi | |
12783 | if test "x$ac_cv_func_fork_works" = xyes; then | |
12784 | ||
81ecdfbb | 12785 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
12786 | |
12787 | fi | |
12788 | ||
cdf43629 | 12789 | for ac_func in getauxval getrusage getuid getgid \ |
bdca27a2 | 12790 | pipe poll pread pread64 pwrite resize_term \ |
7313baad | 12791 | sbrk setpgid setpgrp setsid \ |
9467110b | 12792 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 12793 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
3332aaf2 | 12794 | setrlimit getrlimit posix_madvise waitpid \ |
4b8b5e72 | 12795 | ptrace64 sigaltstack mkdtemp setns |
81ecdfbb RW |
12796 | do : |
12797 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12798 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12799 | eval as_val=\$$as_ac_var | |
12800 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 12801 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12802 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
12803 | _ACEOF |
12804 | ||
12805 | fi | |
12806 | done | |
12807 | ||
12808 | ||
81ecdfbb RW |
12809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
12810 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12811 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
12812 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 12813 | else |
81ecdfbb | 12814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
12815 | /* end confdefs.h. */ |
12816 | #include <langinfo.h> | |
12817 | int | |
12818 | main () | |
12819 | { | |
12820 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
12821 | ; |
12822 | return 0; | |
12823 | } | |
12824 | _ACEOF | |
81ecdfbb | 12825 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 12826 | am_cv_langinfo_codeset=yes |
a4db0f07 | 12827 | else |
81ecdfbb | 12828 | am_cv_langinfo_codeset=no |
a4db0f07 | 12829 | fi |
81ecdfbb RW |
12830 | rm -f core conftest.err conftest.$ac_objext \ |
12831 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 12832 | |
a4db0f07 | 12833 | fi |
81ecdfbb RW |
12834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12835 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
12836 | if test $am_cv_langinfo_codeset = yes; then |
12837 | ||
81ecdfbb | 12838 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 12839 | |
6c7a06a3 | 12840 | fi |
c906108c | 12841 | |
06825bd1 | 12842 | |
3266f10b TT |
12843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12844 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12845 | if test "${ac_cv_header_stdc+set}" = set; then : | |
12846 | $as_echo_n "(cached) " >&6 | |
12847 | else | |
12848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12849 | /* end confdefs.h. */ | |
12850 | #include <stdlib.h> | |
12851 | #include <stdarg.h> | |
12852 | #include <string.h> | |
12853 | #include <float.h> | |
12854 | ||
12855 | int | |
12856 | main () | |
12857 | { | |
12858 | ||
12859 | ; | |
12860 | return 0; | |
12861 | } | |
12862 | _ACEOF | |
12863 | if ac_fn_c_try_compile "$LINENO"; then : | |
12864 | ac_cv_header_stdc=yes | |
12865 | else | |
12866 | ac_cv_header_stdc=no | |
12867 | fi | |
12868 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12869 | ||
12870 | if test $ac_cv_header_stdc = yes; then | |
12871 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12872 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12873 | /* end confdefs.h. */ | |
12874 | #include <string.h> | |
12875 | ||
12876 | _ACEOF | |
12877 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12878 | $EGREP "memchr" >/dev/null 2>&1; then : | |
12879 | ||
12880 | else | |
12881 | ac_cv_header_stdc=no | |
12882 | fi | |
12883 | rm -f conftest* | |
12884 | ||
12885 | fi | |
12886 | ||
12887 | if test $ac_cv_header_stdc = yes; then | |
12888 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12889 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12890 | /* end confdefs.h. */ | |
12891 | #include <stdlib.h> | |
12892 | ||
12893 | _ACEOF | |
12894 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12895 | $EGREP "free" >/dev/null 2>&1; then : | |
12896 | ||
12897 | else | |
12898 | ac_cv_header_stdc=no | |
12899 | fi | |
12900 | rm -f conftest* | |
12901 | ||
12902 | fi | |
12903 | ||
12904 | if test $ac_cv_header_stdc = yes; then | |
12905 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12906 | if test "$cross_compiling" = yes; then : | |
12907 | : | |
12908 | else | |
12909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12910 | /* end confdefs.h. */ | |
12911 | #include <ctype.h> | |
12912 | #include <stdlib.h> | |
12913 | #if ((' ' & 0x0FF) == 0x020) | |
12914 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12915 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12916 | #else | |
12917 | # define ISLOWER(c) \ | |
12918 | (('a' <= (c) && (c) <= 'i') \ | |
12919 | || ('j' <= (c) && (c) <= 'r') \ | |
12920 | || ('s' <= (c) && (c) <= 'z')) | |
12921 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12922 | #endif | |
12923 | ||
12924 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
12925 | int | |
12926 | main () | |
12927 | { | |
12928 | int i; | |
12929 | for (i = 0; i < 256; i++) | |
12930 | if (XOR (islower (i), ISLOWER (i)) | |
12931 | || toupper (i) != TOUPPER (i)) | |
12932 | return 2; | |
12933 | return 0; | |
12934 | } | |
12935 | _ACEOF | |
12936 | if ac_fn_c_try_run "$LINENO"; then : | |
12937 | ||
12938 | else | |
12939 | ac_cv_header_stdc=no | |
12940 | fi | |
12941 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12942 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12943 | fi | |
12944 | ||
12945 | fi | |
12946 | fi | |
12947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
12948 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12949 | if test $ac_cv_header_stdc = yes; then | |
12950 | ||
12951 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
12952 | ||
3266f10b TT |
12953 | fi |
12954 | ||
12955 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
12956 | # for constant arguments. Useless! | |
12957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
12958 | $as_echo_n "checking for working alloca.h... " >&6; } | |
12959 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
12960 | $as_echo_n "(cached) " >&6 | |
12961 | else | |
12962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12963 | /* end confdefs.h. */ | |
12964 | #include <alloca.h> | |
12965 | int | |
12966 | main () | |
12967 | { | |
12968 | char *p = (char *) alloca (2 * sizeof (int)); | |
12969 | if (p) return 0; | |
12970 | ; | |
12971 | return 0; | |
12972 | } | |
12973 | _ACEOF | |
12974 | if ac_fn_c_try_link "$LINENO"; then : | |
12975 | ac_cv_working_alloca_h=yes | |
12976 | else | |
12977 | ac_cv_working_alloca_h=no | |
12978 | fi | |
12979 | rm -f core conftest.err conftest.$ac_objext \ | |
12980 | conftest$ac_exeext conftest.$ac_ext | |
12981 | fi | |
12982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
12983 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
12984 | if test $ac_cv_working_alloca_h = yes; then | |
12985 | ||
12986 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
12987 | ||
12988 | fi | |
12989 | ||
12990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
12991 | $as_echo_n "checking for alloca... " >&6; } | |
12992 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
12993 | $as_echo_n "(cached) " >&6 | |
12994 | else | |
12995 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12996 | /* end confdefs.h. */ | |
12997 | #ifdef __GNUC__ | |
12998 | # define alloca __builtin_alloca | |
12999 | #else | |
13000 | # ifdef _MSC_VER | |
13001 | # include <malloc.h> | |
13002 | # define alloca _alloca | |
13003 | # else | |
13004 | # ifdef HAVE_ALLOCA_H | |
13005 | # include <alloca.h> | |
13006 | # else | |
13007 | # ifdef _AIX | |
13008 | #pragma alloca | |
13009 | # else | |
13010 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13011 | char *alloca (); | |
13012 | # endif | |
13013 | # endif | |
13014 | # endif | |
13015 | # endif | |
13016 | #endif | |
13017 | ||
13018 | int | |
13019 | main () | |
13020 | { | |
13021 | char *p = (char *) alloca (1); | |
13022 | if (p) return 0; | |
13023 | ; | |
13024 | return 0; | |
13025 | } | |
13026 | _ACEOF | |
13027 | if ac_fn_c_try_link "$LINENO"; then : | |
13028 | ac_cv_func_alloca_works=yes | |
13029 | else | |
13030 | ac_cv_func_alloca_works=no | |
13031 | fi | |
13032 | rm -f core conftest.err conftest.$ac_objext \ | |
13033 | conftest$ac_exeext conftest.$ac_ext | |
13034 | fi | |
13035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
13036 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
13037 | ||
13038 | if test $ac_cv_func_alloca_works = yes; then | |
13039 | ||
13040 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
13041 | ||
13042 | else | |
13043 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13044 | # that cause trouble. Some versions do not even contain alloca or | |
13045 | # contain a buggy version. If you still want to use their alloca, | |
13046 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
13047 | ||
13048 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
13049 | ||
13050 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
13051 | ||
13052 | ||
13053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
13054 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13055 | if test "${ac_cv_os_cray+set}" = set; then : | |
13056 | $as_echo_n "(cached) " >&6 | |
13057 | else | |
13058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13059 | /* end confdefs.h. */ | |
13060 | #if defined CRAY && ! defined CRAY2 | |
13061 | webecray | |
13062 | #else | |
13063 | wenotbecray | |
13064 | #endif | |
13065 | ||
13066 | _ACEOF | |
13067 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13068 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13069 | ac_cv_os_cray=yes | |
13070 | else | |
13071 | ac_cv_os_cray=no | |
13072 | fi | |
13073 | rm -f conftest* | |
13074 | ||
13075 | fi | |
13076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13077 | $as_echo "$ac_cv_os_cray" >&6; } | |
13078 | if test $ac_cv_os_cray = yes; then | |
13079 | for ac_func in _getb67 GETB67 getb67; do | |
13080 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13081 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13082 | eval as_val=\$$as_ac_var | |
13083 | if test "x$as_val" = x""yes; then : | |
13084 | ||
13085 | cat >>confdefs.h <<_ACEOF | |
13086 | #define CRAY_STACKSEG_END $ac_func | |
13087 | _ACEOF | |
13088 | ||
13089 | break | |
13090 | fi | |
13091 | ||
13092 | done | |
13093 | fi | |
13094 | ||
13095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13096 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13097 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
13098 | $as_echo_n "(cached) " >&6 | |
13099 | else | |
13100 | if test "$cross_compiling" = yes; then : | |
13101 | ac_cv_c_stack_direction=0 | |
13102 | else | |
13103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13104 | /* end confdefs.h. */ | |
13105 | $ac_includes_default | |
13106 | int | |
13107 | find_stack_direction () | |
13108 | { | |
13109 | static char *addr = 0; | |
13110 | auto char dummy; | |
13111 | if (addr == 0) | |
13112 | { | |
13113 | addr = &dummy; | |
13114 | return find_stack_direction (); | |
13115 | } | |
13116 | else | |
13117 | return (&dummy > addr) ? 1 : -1; | |
13118 | } | |
13119 | ||
13120 | int | |
13121 | main () | |
13122 | { | |
13123 | return find_stack_direction () < 0; | |
13124 | } | |
13125 | _ACEOF | |
13126 | if ac_fn_c_try_run "$LINENO"; then : | |
13127 | ac_cv_c_stack_direction=1 | |
13128 | else | |
13129 | ac_cv_c_stack_direction=-1 | |
13130 | fi | |
13131 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13132 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13133 | fi | |
13134 | ||
13135 | fi | |
13136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13137 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13138 | cat >>confdefs.h <<_ACEOF | |
13139 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13140 | _ACEOF | |
13141 | ||
13142 | ||
13143 | fi | |
13144 | ||
13145 | ||
13146 | ||
13147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13148 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13149 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
13150 | $as_echo_n "(cached) " >&6 | |
13151 | else | |
13152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13153 | /* end confdefs.h. */ | |
13154 | #include <langinfo.h> | |
13155 | int | |
13156 | main () | |
13157 | { | |
13158 | char* cs = nl_langinfo(CODESET); | |
13159 | ; | |
13160 | return 0; | |
13161 | } | |
13162 | _ACEOF | |
13163 | if ac_fn_c_try_link "$LINENO"; then : | |
13164 | am_cv_langinfo_codeset=yes | |
13165 | else | |
13166 | am_cv_langinfo_codeset=no | |
13167 | fi | |
13168 | rm -f core conftest.err conftest.$ac_objext \ | |
13169 | conftest$ac_exeext conftest.$ac_ext | |
13170 | ||
13171 | fi | |
13172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13173 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13174 | if test $am_cv_langinfo_codeset = yes; then | |
13175 | ||
13176 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13177 | ||
13178 | fi | |
13179 | ||
13180 | ||
a3d08894 | 13181 | for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h |
3266f10b TT |
13182 | do : |
13183 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13184 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13185 | eval as_val=\$$as_ac_Header | |
13186 | if test "x$as_val" = x""yes; then : | |
13187 | cat >>confdefs.h <<_ACEOF | |
13188 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13189 | _ACEOF | |
13190 | ||
13191 | fi | |
13192 | ||
13193 | done | |
13194 | ||
13195 | ||
f348d89a | 13196 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction |
3266f10b TT |
13197 | do : |
13198 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13199 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13200 | eval as_val=\$$as_ac_var | |
13201 | if test "x$as_val" = x""yes; then : | |
13202 | cat >>confdefs.h <<_ACEOF | |
13203 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13204 | _ACEOF | |
13205 | ||
13206 | fi | |
13207 | done | |
13208 | ||
13209 | ||
13210 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
13211 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
13212 | ac_have_decl=1 | |
13213 | else | |
13214 | ac_have_decl=0 | |
13215 | fi | |
13216 | ||
13217 | cat >>confdefs.h <<_ACEOF | |
13218 | #define HAVE_DECL_STRERROR $ac_have_decl | |
13219 | _ACEOF | |
13220 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
13221 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
13222 | ac_have_decl=1 | |
13223 | else | |
13224 | ac_have_decl=0 | |
13225 | fi | |
13226 | ||
13227 | cat >>confdefs.h <<_ACEOF | |
13228 | #define HAVE_DECL_STRSTR $ac_have_decl | |
13229 | _ACEOF | |
13230 | ||
13231 | ||
e9bcb658 GB |
13232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
13233 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
13234 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
13235 | $as_echo_n "(cached) " >&6 | |
13236 | else | |
13237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13238 | /* end confdefs.h. */ | |
13239 | ||
13240 | #include <setjmp.h> | |
13241 | ||
13242 | int | |
13243 | main () | |
13244 | { | |
13245 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
13246 | ; | |
13247 | return 0; | |
13248 | } | |
13249 | _ACEOF | |
13250 | if ac_fn_c_try_compile "$LINENO"; then : | |
13251 | gdb_cv_func_sigsetjmp=yes | |
13252 | else | |
13253 | gdb_cv_func_sigsetjmp=no | |
13254 | fi | |
13255 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13256 | fi | |
13257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
13258 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
13259 | if test $gdb_cv_func_sigsetjmp = yes; then | |
13260 | ||
13261 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
13262 | ||
13263 | fi | |
13264 | ||
3266f10b | 13265 | |
54019719 PA |
13266 | # Check the return and argument types of ptrace. |
13267 | ||
13268 | ||
54019719 PA |
13269 | for ac_header in sys/ptrace.h ptrace.h |
13270 | do : | |
13271 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13272 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13273 | eval as_val=\$$as_ac_Header | |
13274 | if test "x$as_val" = x""yes; then : | |
13275 | cat >>confdefs.h <<_ACEOF | |
13276 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13277 | _ACEOF | |
13278 | ||
13279 | fi | |
13280 | ||
13281 | done | |
13282 | ||
13283 | ||
a3828db0 | 13284 | gdb_ptrace_headers=' |
4ff70b84 | 13285 | #include <sys/types.h> |
a3828db0 MK |
13286 | #if HAVE_SYS_PTRACE_H |
13287 | # include <sys/ptrace.h> | |
13288 | #endif | |
13289 | #if HAVE_UNISTD_H | |
13290 | # include <unistd.h> | |
13291 | #endif | |
13292 | ' | |
13293 | # There is no point in checking if we don't have a prototype. | |
9b30624b | 13294 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
81ecdfbb RW |
13295 | " |
13296 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
13297 | ac_have_decl=1 | |
06825bd1 | 13298 | else |
81ecdfbb | 13299 | ac_have_decl=0 |
06825bd1 | 13300 | fi |
06825bd1 | 13301 | |
a3828db0 | 13302 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13303 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 13304 | _ACEOF |
81ecdfbb | 13305 | if test $ac_have_decl = 1; then : |
bec39cab | 13306 | |
a3828db0 | 13307 | else |
a3828db0 MK |
13308 | |
13309 | : ${gdb_cv_func_ptrace_ret='int'} | |
13310 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13311 | ||
06825bd1 MK |
13312 | fi |
13313 | ||
064ef605 DJ |
13314 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
13315 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
13316 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
13317 | $as_echo_n "checking return type of ptrace... " >&6; } | |
13318 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
13319 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13320 | else |
81ecdfbb | 13321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13322 | /* end confdefs.h. */ |
a3828db0 | 13323 | $gdb_ptrace_headers |
bec39cab AC |
13324 | int |
13325 | main () | |
13326 | { | |
064ef605 DJ |
13327 | extern long ptrace (enum __ptrace_request, ...); |
13328 | ; | |
13329 | return 0; | |
13330 | } | |
13331 | _ACEOF | |
9b30624b | 13332 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
13333 | gdb_cv_func_ptrace_ret='long' |
13334 | else | |
81ecdfbb | 13335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13336 | /* end confdefs.h. */ |
13337 | $gdb_ptrace_headers | |
13338 | int | |
13339 | main () | |
13340 | { | |
a3828db0 | 13341 | extern int ptrace (); |
bec39cab AC |
13342 | ; |
13343 | return 0; | |
13344 | } | |
13345 | _ACEOF | |
9b30624b | 13346 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13347 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 13348 | else |
81ecdfbb | 13349 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 13350 | fi |
81ecdfbb | 13351 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 13352 | fi |
81ecdfbb | 13353 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 13354 | fi |
81ecdfbb RW |
13355 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
13356 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 13357 | |
a3828db0 MK |
13358 | cat >>confdefs.h <<_ACEOF |
13359 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 13360 | _ACEOF |
70f9f479 | 13361 | |
a3828db0 | 13362 | # Check argument types. |
81ecdfbb RW |
13363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
13364 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
13365 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
13366 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13367 | else |
a3828db0 | 13368 | |
81ecdfbb | 13369 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13370 | /* end confdefs.h. */ |
13371 | $gdb_ptrace_headers | |
13372 | int | |
13373 | main () | |
13374 | { | |
13375 | extern long ptrace (enum __ptrace_request, ...); | |
13376 | ; | |
13377 | return 0; | |
13378 | } | |
13379 | _ACEOF | |
9b30624b | 13380 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 13381 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
064ef605 | 13382 | else |
064ef605 | 13383 | |
a3828db0 MK |
13384 | for gdb_arg1 in 'int' 'long'; do |
13385 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 13386 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 13387 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 13388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13389 | /* end confdefs.h. */ |
a3828db0 | 13390 | $gdb_ptrace_headers |
bec39cab AC |
13391 | int |
13392 | main () | |
13393 | { | |
a3828db0 MK |
13394 | |
13395 | extern $gdb_cv_func_ptrace_ret | |
13396 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
13397 | ||
bec39cab AC |
13398 | ; |
13399 | return 0; | |
13400 | } | |
13401 | _ACEOF | |
9b30624b | 13402 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13403 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
13404 | break 4; | |
5c7f2947 | 13405 | fi |
81ecdfbb | 13406 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 13407 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 13408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13409 | /* end confdefs.h. */ |
a3828db0 | 13410 | $gdb_ptrace_headers |
bec39cab AC |
13411 | int |
13412 | main () | |
13413 | { | |
a3828db0 MK |
13414 | |
13415 | extern $gdb_cv_func_ptrace_ret | |
13416 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
13417 | ||
bec39cab AC |
13418 | ; |
13419 | return 0; | |
13420 | } | |
13421 | _ACEOF | |
9b30624b | 13422 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13423 | |
13424 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
13425 | break 5; | |
78434e59 | 13426 | fi |
81ecdfbb | 13427 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
13428 | done |
13429 | done | |
13430 | done | |
13431 | done | |
13432 | done | |
13433 | # Provide a safe default value. | |
13434 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13435 | ||
064ef605 | 13436 | fi |
81ecdfbb | 13437 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 13438 | fi |
81ecdfbb RW |
13439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
13440 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
13441 | ac_save_IFS=$IFS; IFS=',' |
13442 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
13443 | IFS=$ac_save_IFS | |
13444 | shift | |
bec39cab | 13445 | |
54019719 PA |
13446 | cat >>confdefs.h <<_ACEOF |
13447 | #define PTRACE_TYPE_ARG1 $1 | |
13448 | _ACEOF | |
13449 | ||
13450 | ||
a3828db0 MK |
13451 | cat >>confdefs.h <<_ACEOF |
13452 | #define PTRACE_TYPE_ARG3 $3 | |
13453 | _ACEOF | |
13454 | ||
96d7229d LM |
13455 | |
13456 | cat >>confdefs.h <<_ACEOF | |
13457 | #define PTRACE_TYPE_ARG4 $4 | |
13458 | _ACEOF | |
13459 | ||
a3828db0 MK |
13460 | if test -n "$5"; then |
13461 | ||
13462 | cat >>confdefs.h <<_ACEOF | |
13463 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 13464 | _ACEOF |
78434e59 MK |
13465 | |
13466 | fi | |
13467 | ||
54019719 | 13468 | |
a3828db0 | 13469 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
13470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13471 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13472 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13473 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 13474 | else |
81ecdfbb RW |
13475 | if test "$cross_compiling" = yes; then : |
13476 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 13477 | else |
81ecdfbb | 13478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13479 | /* end confdefs.h. */ |
81ecdfbb | 13480 | $ac_includes_default |
bec39cab AC |
13481 | int |
13482 | main () | |
13483 | { | |
a3828db0 MK |
13484 | /* If this system has a BSD-style setpgrp which takes arguments, |
13485 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
13486 | exit successfully. */ | |
81ecdfbb | 13487 | return setpgrp (1,1) != -1; |
bec39cab AC |
13488 | ; |
13489 | return 0; | |
13490 | } | |
13491 | _ACEOF | |
81ecdfbb | 13492 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 13493 | ac_cv_func_setpgrp_void=no |
c906108c | 13494 | else |
81ecdfbb | 13495 | ac_cv_func_setpgrp_void=yes |
c906108c | 13496 | fi |
81ecdfbb RW |
13497 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13498 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13499 | fi |
81ecdfbb | 13500 | |
a3828db0 | 13501 | fi |
81ecdfbb RW |
13502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13503 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
13504 | if test $ac_cv_func_setpgrp_void = yes; then |
13505 | ||
81ecdfbb | 13506 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
13507 | |
13508 | fi | |
a3828db0 MK |
13509 | |
13510 | else | |
81ecdfbb RW |
13511 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13512 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13513 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13514 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13515 | else |
81ecdfbb | 13516 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13517 | /* end confdefs.h. */ |
a3828db0 MK |
13518 | |
13519 | #include <unistd.h> | |
13520 | ||
bec39cab AC |
13521 | int |
13522 | main () | |
13523 | { | |
a3828db0 MK |
13524 | |
13525 | if (setpgrp(1,1) == -1) | |
13526 | exit (0); | |
13527 | else | |
13528 | exit (1); | |
13529 | ||
bec39cab AC |
13530 | ; |
13531 | return 0; | |
13532 | } | |
13533 | _ACEOF | |
81ecdfbb | 13534 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13535 | ac_cv_func_setpgrp_void=no |
c906108c | 13536 | else |
81ecdfbb | 13537 | ac_cv_func_setpgrp_void=yes |
c906108c | 13538 | fi |
81ecdfbb | 13539 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13540 | fi |
81ecdfbb RW |
13541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13542 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 13543 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 13544 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 13545 | |
a3828db0 | 13546 | fi |
c906108c SS |
13547 | fi |
13548 | ||
db1ff28b JK |
13549 | # Assume we'll default to using the included libiberty regex. |
13550 | gdb_use_included_regex=yes | |
13551 | ||
13552 | # However, if the system regex is GNU regex, then default to *not* | |
13553 | # using the included regex. | |
13554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
13555 | $as_echo_n "checking for GNU regex... " >&6; } | |
13556 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
13557 | $as_echo_n "(cached) " >&6 | |
13558 | else | |
13559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13560 | /* end confdefs.h. */ | |
13561 | #include <gnu-versions.h> | |
13562 | int | |
13563 | main () | |
13564 | { | |
13565 | #define REGEX_INTERFACE_VERSION 1 | |
13566 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
13567 | # error "Version mismatch" | |
13568 | #endif | |
13569 | ; | |
13570 | return 0; | |
13571 | } | |
13572 | _ACEOF | |
13573 | if ac_fn_c_try_compile "$LINENO"; then : | |
13574 | gdb_cv_have_gnu_regex=yes | |
13575 | else | |
13576 | gdb_cv_have_gnu_regex=no | |
13577 | fi | |
13578 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13579 | fi | |
13580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
13581 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
13582 | if test $gdb_cv_have_gnu_regex = yes; then | |
13583 | gdb_use_included_regex=no | |
13584 | fi | |
13585 | ||
13586 | ||
13587 | # Check whether --with-included-regex was given. | |
13588 | if test "${with_included_regex+set}" = set; then : | |
13589 | withval=$with_included_regex; gdb_with_regex=$withval | |
13590 | else | |
13591 | gdb_with_regex=$gdb_use_included_regex | |
13592 | fi | |
13593 | ||
13594 | if test "$gdb_with_regex" = yes; then | |
13595 | ||
13596 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
13597 | ||
13598 | fi | |
13599 | ||
81ecdfbb RW |
13600 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
13601 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
13602 | #include <sys/proc.h> | |
13603 | ||
13604 | " | |
13605 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 13606 | |
5c45e068 | 13607 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 13608 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 13609 | _ACEOF |
c906108c | 13610 | |
5c45e068 | 13611 | |
97bf5e38 | 13612 | fi |
c906108c | 13613 | |
5c45e068 | 13614 | |
a3828db0 | 13615 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
13616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
13617 | $as_echo_n "checking for struct lwp... " >&6; } | |
13618 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
13619 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13620 | else |
81ecdfbb | 13621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13622 | /* end confdefs.h. */ |
a3828db0 MK |
13623 | #include <sys/param.h> |
13624 | #include <sys/lwp.h> | |
bec39cab AC |
13625 | int |
13626 | main () | |
13627 | { | |
a3828db0 | 13628 | struct lwp l; |
bec39cab AC |
13629 | ; |
13630 | return 0; | |
13631 | } | |
13632 | _ACEOF | |
81ecdfbb | 13633 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13634 | gdb_cv_struct_lwp=yes |
c906108c | 13635 | else |
81ecdfbb | 13636 | gdb_cv_struct_lwp=no |
c906108c | 13637 | fi |
81ecdfbb | 13638 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13639 | fi |
81ecdfbb RW |
13640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
13641 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 13642 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 13643 | |
81ecdfbb | 13644 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 13645 | |
97bf5e38 | 13646 | fi |
c906108c | 13647 | |
a3828db0 | 13648 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
13649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
13650 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
13651 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
13652 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13653 | else |
81ecdfbb | 13654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13655 | /* end confdefs.h. */ |
a3828db0 MK |
13656 | #include <sys/types.h> |
13657 | #include <machine/reg.h> | |
bec39cab AC |
13658 | int |
13659 | main () | |
13660 | { | |
a3828db0 | 13661 | struct reg r; |
bec39cab AC |
13662 | ; |
13663 | return 0; | |
13664 | } | |
13665 | _ACEOF | |
81ecdfbb | 13666 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13667 | gdb_cv_struct_reg=yes |
27ca5dad | 13668 | else |
81ecdfbb | 13669 | gdb_cv_struct_reg=no |
27ca5dad | 13670 | fi |
81ecdfbb | 13671 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 13672 | fi |
81ecdfbb RW |
13673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
13674 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 13675 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 13676 | |
81ecdfbb | 13677 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
13678 | |
13679 | fi | |
97bf5e38 | 13680 | |
a3828db0 MK |
13681 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
13682 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
a6e69c1f JB |
13683 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> |
13684 | #include <machine/reg.h> | |
81ecdfbb RW |
13685 | " |
13686 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
13687 | |
13688 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 13689 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 13690 | _ACEOF |
3862412b | 13691 | |
5c45e068 | 13692 | |
97bf5e38 | 13693 | fi |
a6e69c1f JB |
13694 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> |
13695 | #include <machine/reg.h> | |
81ecdfbb RW |
13696 | " |
13697 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
13698 | |
13699 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 13700 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 13701 | _ACEOF |
3862412b | 13702 | |
5c45e068 | 13703 | |
97bf5e38 | 13704 | fi |
3862412b | 13705 | |
5c45e068 | 13706 | |
6fea9e18 L |
13707 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
13708 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
13709 | # `struct user_regs_struct'. | |
13710 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h> | |
13711 | " | |
13712 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
13713 | ||
13714 | cat >>confdefs.h <<_ACEOF | |
13715 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
13716 | _ACEOF | |
13717 | ||
13718 | ||
13719 | fi | |
13720 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h> | |
13721 | " | |
13722 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
13723 | ||
13724 | cat >>confdefs.h <<_ACEOF | |
13725 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
13726 | _ACEOF | |
13727 | ||
13728 | ||
13729 | fi | |
13730 | ||
13731 | ||
a3828db0 | 13732 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
13733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
13734 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
13735 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
13736 | $as_echo_n "(cached) " >&6 | |
451928c5 | 13737 | else |
81ecdfbb | 13738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13739 | /* end confdefs.h. */ |
a3828db0 | 13740 | #include <sys/ptrace.h> |
bec39cab AC |
13741 | int |
13742 | main () | |
13743 | { | |
a3828db0 | 13744 | PTRACE_GETREGS; |
bec39cab AC |
13745 | ; |
13746 | return 0; | |
13747 | } | |
13748 | _ACEOF | |
81ecdfbb | 13749 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13750 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 13751 | else |
81ecdfbb | 13752 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 13753 | fi |
81ecdfbb | 13754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13755 | fi |
13756 | ||
81ecdfbb RW |
13757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
13758 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 13759 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 13760 | |
81ecdfbb | 13761 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 13762 | |
97bf5e38 | 13763 | fi |
451928c5 | 13764 | |
a3828db0 | 13765 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
13766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
13767 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
13768 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
13769 | $as_echo_n "(cached) " >&6 | |
451928c5 | 13770 | else |
81ecdfbb | 13771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13772 | /* end confdefs.h. */ |
a3828db0 | 13773 | #include <sys/ptrace.h> |
bec39cab AC |
13774 | int |
13775 | main () | |
13776 | { | |
a3828db0 | 13777 | PTRACE_GETFPXREGS; |
bec39cab AC |
13778 | ; |
13779 | return 0; | |
13780 | } | |
13781 | _ACEOF | |
81ecdfbb | 13782 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13783 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 13784 | else |
81ecdfbb | 13785 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 13786 | fi |
81ecdfbb | 13787 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13788 | fi |
13789 | ||
81ecdfbb RW |
13790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
13791 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 13792 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 13793 | |
81ecdfbb | 13794 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 13795 | |
97bf5e38 | 13796 | fi |
451928c5 | 13797 | |
a3828db0 | 13798 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
13799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
13800 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
13801 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
13802 | $as_echo_n "(cached) " >&6 | |
3862412b | 13803 | else |
81ecdfbb | 13804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13805 | /* end confdefs.h. */ |
a3828db0 MK |
13806 | #include <sys/types.h> |
13807 | #include <sys/ptrace.h> | |
bec39cab AC |
13808 | int |
13809 | main () | |
13810 | { | |
a3828db0 | 13811 | PT_GETDBREGS; |
bec39cab AC |
13812 | ; |
13813 | return 0; | |
13814 | } | |
13815 | _ACEOF | |
81ecdfbb | 13816 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13817 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 13818 | else |
81ecdfbb | 13819 | gdb_cv_have_pt_getdbregs=no |
3862412b | 13820 | fi |
81ecdfbb | 13821 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13822 | fi |
13823 | ||
81ecdfbb RW |
13824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
13825 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 13826 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 13827 | |
81ecdfbb | 13828 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 13829 | |
97bf5e38 | 13830 | fi |
3862412b | 13831 | |
a3828db0 | 13832 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
13833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
13834 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
13835 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
13836 | $as_echo_n "(cached) " >&6 | |
3862412b | 13837 | else |
81ecdfbb | 13838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13839 | /* end confdefs.h. */ |
a3828db0 MK |
13840 | #include <sys/types.h> |
13841 | #include <sys/ptrace.h> | |
bec39cab AC |
13842 | int |
13843 | main () | |
13844 | { | |
a3828db0 | 13845 | PT_GETXMMREGS; |
bec39cab AC |
13846 | ; |
13847 | return 0; | |
13848 | } | |
13849 | _ACEOF | |
81ecdfbb | 13850 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13851 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 13852 | else |
81ecdfbb | 13853 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 13854 | fi |
81ecdfbb | 13855 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13856 | fi |
13857 | ||
81ecdfbb RW |
13858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
13859 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 13860 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 13861 | |
81ecdfbb | 13862 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 13863 | |
97bf5e38 | 13864 | fi |
3862412b | 13865 | |
6e9567fe JB |
13866 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
13867 | # Older FreeBSD versions don't have the pl_tdname member of | |
13868 | # `struct ptrace_lwpinfo'. | |
13869 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
13870 | " | |
13871 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then : | |
13872 | ||
13873 | cat >>confdefs.h <<_ACEOF | |
13874 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
13875 | _ACEOF | |
13876 | ||
13877 | ||
13878 | fi | |
13879 | ||
13880 | ||
e6cdd38e JB |
13881 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
13882 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
13883 | # FreeBSD 10.3. | |
13884 | 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> | |
13885 | " | |
13886 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then : | |
13887 | ||
13888 | cat >>confdefs.h <<_ACEOF | |
13889 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
13890 | _ACEOF | |
13891 | ||
13892 | ||
13893 | fi | |
13894 | ||
6e9567fe | 13895 | |
05b4bd79 | 13896 | # Detect which type of /proc is in use, such as for Solaris. |
97bf5e38 MK |
13897 | |
13898 | if test "${target}" = "${host}"; then | |
13899 | case "${host}" in | |
7b00db47 | 13900 | *-*-sysv4.2* | *-*-sysv5* ) |
60ca704f | 13901 | |
81ecdfbb | 13902 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
13903 | |
13904 | ;; | |
c162e8c9 | 13905 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 13906 | |
81ecdfbb | 13907 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
13908 | |
13909 | ;; | |
13910 | mips-sgi-irix5*) | |
13911 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 13912 | |
81ecdfbb | 13913 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
13914 | |
13915 | ;; | |
13916 | esac | |
13917 | fi | |
13918 | ||
13919 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
13920 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
13921 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
13922 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
13923 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13924 | else |
81ecdfbb | 13925 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13926 | /* end confdefs.h. */ |
596c9d4b KB |
13927 | |
13928 | #define _SYSCALL32 | |
d30c5336 JK |
13929 | /* Needed for new procfs interface on sparc-solaris. */ |
13930 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13931 | #include <sys/procfs.h> |
bec39cab AC |
13932 | int |
13933 | main () | |
13934 | { | |
97bf5e38 | 13935 | gregset_t avar |
bec39cab AC |
13936 | ; |
13937 | return 0; | |
13938 | } | |
13939 | _ACEOF | |
81ecdfbb | 13940 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13941 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 13942 | else |
81ecdfbb | 13943 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 13944 | |
596c9d4b | 13945 | fi |
81ecdfbb | 13946 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13947 | fi |
13948 | ||
97bf5e38 | 13949 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 13950 | |
81ecdfbb | 13951 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
13952 | |
13953 | fi | |
81ecdfbb RW |
13954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
13955 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 13956 | |
81ecdfbb RW |
13957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
13958 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
13959 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
13960 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 13961 | else |
81ecdfbb | 13962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13963 | /* end confdefs.h. */ |
97bf5e38 MK |
13964 | |
13965 | #define _SYSCALL32 | |
d30c5336 JK |
13966 | /* Needed for new procfs interface on sparc-solaris. */ |
13967 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 13968 | #include <sys/procfs.h> |
bec39cab AC |
13969 | int |
13970 | main () | |
13971 | { | |
97bf5e38 | 13972 | fpregset_t avar |
bec39cab AC |
13973 | ; |
13974 | return 0; | |
13975 | } | |
13976 | _ACEOF | |
81ecdfbb | 13977 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13978 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 13979 | else |
81ecdfbb | 13980 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 13981 | |
d84dd0c5 | 13982 | fi |
81ecdfbb | 13983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
13984 | fi |
13985 | ||
97bf5e38 | 13986 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 13987 | |
81ecdfbb | 13988 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 13989 | |
97bf5e38 | 13990 | fi |
81ecdfbb RW |
13991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
13992 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 13993 | |
81ecdfbb RW |
13994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
13995 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
13996 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
13997 | $as_echo_n "(cached) " >&6 | |
c906108c | 13998 | else |
81ecdfbb | 13999 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14000 | /* end confdefs.h. */ |
c906108c | 14001 | |
97bf5e38 | 14002 | #define _SYSCALL32 |
d30c5336 JK |
14003 | /* Needed for new procfs interface on sparc-solaris. */ |
14004 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14005 | #include <sys/procfs.h> |
bec39cab AC |
14006 | int |
14007 | main () | |
14008 | { | |
97bf5e38 | 14009 | prgregset_t avar |
bec39cab AC |
14010 | ; |
14011 | return 0; | |
14012 | } | |
14013 | _ACEOF | |
81ecdfbb | 14014 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14015 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 14016 | else |
81ecdfbb | 14017 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 14018 | |
c906108c | 14019 | fi |
81ecdfbb | 14020 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14021 | fi |
14022 | ||
97bf5e38 | 14023 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 14024 | |
81ecdfbb | 14025 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 14026 | |
97bf5e38 | 14027 | fi |
81ecdfbb RW |
14028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
14029 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 14030 | |
81ecdfbb RW |
14031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
14032 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
14033 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
14034 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14035 | else |
81ecdfbb | 14036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14037 | /* end confdefs.h. */ |
97bf5e38 MK |
14038 | |
14039 | #define _SYSCALL32 | |
d30c5336 JK |
14040 | /* Needed for new procfs interface on sparc-solaris. */ |
14041 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14042 | #include <sys/procfs.h> |
bec39cab AC |
14043 | int |
14044 | main () | |
14045 | { | |
97bf5e38 | 14046 | prfpregset_t avar |
bec39cab AC |
14047 | ; |
14048 | return 0; | |
14049 | } | |
14050 | _ACEOF | |
81ecdfbb | 14051 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14052 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 14053 | else |
81ecdfbb | 14054 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 14055 | |
d45fe813 | 14056 | fi |
81ecdfbb | 14057 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14058 | fi |
14059 | ||
97bf5e38 | 14060 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 14061 | |
81ecdfbb | 14062 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 14063 | |
97bf5e38 | 14064 | fi |
81ecdfbb RW |
14065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
14066 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 14067 | |
81ecdfbb RW |
14068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
14069 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
14070 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
14071 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14072 | else |
81ecdfbb | 14073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14074 | /* end confdefs.h. */ |
97bf5e38 MK |
14075 | |
14076 | #define _SYSCALL32 | |
d30c5336 JK |
14077 | /* Needed for new procfs interface on sparc-solaris. */ |
14078 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14079 | #include <sys/procfs.h> |
bec39cab AC |
14080 | int |
14081 | main () | |
14082 | { | |
97bf5e38 | 14083 | prgregset32_t avar |
bec39cab AC |
14084 | ; |
14085 | return 0; | |
14086 | } | |
14087 | _ACEOF | |
81ecdfbb | 14088 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14089 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 14090 | else |
81ecdfbb | 14091 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 14092 | |
d45fe813 | 14093 | fi |
81ecdfbb | 14094 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14095 | fi |
14096 | ||
97bf5e38 | 14097 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 14098 | |
81ecdfbb | 14099 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 14100 | |
97bf5e38 | 14101 | fi |
81ecdfbb RW |
14102 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
14103 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 14104 | |
81ecdfbb RW |
14105 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
14106 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
14107 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
14108 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 14109 | else |
81ecdfbb | 14110 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14111 | /* end confdefs.h. */ |
97bf5e38 | 14112 | |
d45fe813 | 14113 | #define _SYSCALL32 |
d30c5336 JK |
14114 | /* Needed for new procfs interface on sparc-solaris. */ |
14115 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14116 | #include <sys/procfs.h> |
bec39cab AC |
14117 | int |
14118 | main () | |
14119 | { | |
97bf5e38 | 14120 | lwpid_t avar |
bec39cab AC |
14121 | ; |
14122 | return 0; | |
14123 | } | |
14124 | _ACEOF | |
81ecdfbb | 14125 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14126 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 14127 | else |
81ecdfbb | 14128 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 14129 | |
d45fe813 | 14130 | fi |
81ecdfbb | 14131 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14132 | fi |
14133 | ||
97bf5e38 | 14134 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 14135 | |
81ecdfbb | 14136 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 14137 | |
97bf5e38 | 14138 | fi |
81ecdfbb RW |
14139 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
14140 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 14141 | |
81ecdfbb RW |
14142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
14143 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
14144 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
14145 | $as_echo_n "(cached) " >&6 | |
c906108c | 14146 | else |
81ecdfbb | 14147 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14148 | /* end confdefs.h. */ |
c906108c | 14149 | |
97bf5e38 | 14150 | #define _SYSCALL32 |
d30c5336 JK |
14151 | /* Needed for new procfs interface on sparc-solaris. */ |
14152 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14153 | #include <sys/procfs.h> |
bec39cab AC |
14154 | int |
14155 | main () | |
14156 | { | |
97bf5e38 | 14157 | psaddr_t avar |
bec39cab AC |
14158 | ; |
14159 | return 0; | |
14160 | } | |
14161 | _ACEOF | |
81ecdfbb | 14162 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14163 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 14164 | else |
81ecdfbb | 14165 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 14166 | |
c906108c | 14167 | fi |
81ecdfbb | 14168 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14169 | fi |
14170 | ||
97bf5e38 | 14171 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 14172 | |
81ecdfbb | 14173 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 14174 | |
97bf5e38 | 14175 | fi |
81ecdfbb RW |
14176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
14177 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 14178 | |
81ecdfbb RW |
14179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
14180 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
14181 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
14182 | $as_echo_n "(cached) " >&6 | |
c906108c | 14183 | else |
81ecdfbb | 14184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14185 | /* end confdefs.h. */ |
c906108c | 14186 | |
97bf5e38 | 14187 | #define _SYSCALL32 |
d30c5336 JK |
14188 | /* Needed for new procfs interface on sparc-solaris. */ |
14189 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14190 | #include <sys/procfs.h> |
bec39cab AC |
14191 | int |
14192 | main () | |
14193 | { | |
97bf5e38 | 14194 | prsysent_t avar |
bec39cab AC |
14195 | ; |
14196 | return 0; | |
14197 | } | |
14198 | _ACEOF | |
81ecdfbb | 14199 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14200 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 14201 | else |
81ecdfbb | 14202 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 14203 | |
c906108c | 14204 | fi |
81ecdfbb | 14205 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14206 | fi |
14207 | ||
97bf5e38 | 14208 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 14209 | |
81ecdfbb | 14210 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 14211 | |
97bf5e38 | 14212 | fi |
81ecdfbb RW |
14213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
14214 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 14215 | |
81ecdfbb RW |
14216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
14217 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
14218 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
14219 | $as_echo_n "(cached) " >&6 | |
c906108c | 14220 | else |
81ecdfbb | 14221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14222 | /* end confdefs.h. */ |
c906108c | 14223 | |
97bf5e38 | 14224 | #define _SYSCALL32 |
d30c5336 JK |
14225 | /* Needed for new procfs interface on sparc-solaris. */ |
14226 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14227 | #include <sys/procfs.h> |
bec39cab AC |
14228 | int |
14229 | main () | |
14230 | { | |
97bf5e38 | 14231 | pr_sigset_t avar |
bec39cab AC |
14232 | ; |
14233 | return 0; | |
14234 | } | |
14235 | _ACEOF | |
81ecdfbb | 14236 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14237 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 14238 | else |
81ecdfbb | 14239 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 14240 | |
c906108c | 14241 | fi |
81ecdfbb | 14242 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14243 | fi |
14244 | ||
97bf5e38 | 14245 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 14246 | |
81ecdfbb | 14247 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 14248 | |
97bf5e38 | 14249 | fi |
81ecdfbb RW |
14250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
14251 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 14252 | |
81ecdfbb RW |
14253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
14254 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
14255 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
14256 | $as_echo_n "(cached) " >&6 | |
c906108c | 14257 | else |
81ecdfbb | 14258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14259 | /* end confdefs.h. */ |
c906108c | 14260 | |
97bf5e38 | 14261 | #define _SYSCALL32 |
d30c5336 JK |
14262 | /* Needed for new procfs interface on sparc-solaris. */ |
14263 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14264 | #include <sys/procfs.h> |
bec39cab AC |
14265 | int |
14266 | main () | |
14267 | { | |
97bf5e38 | 14268 | pr_sigaction64_t avar |
bec39cab AC |
14269 | ; |
14270 | return 0; | |
14271 | } | |
14272 | _ACEOF | |
81ecdfbb | 14273 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14274 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 14275 | else |
81ecdfbb | 14276 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 14277 | |
c906108c | 14278 | fi |
81ecdfbb | 14279 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14280 | fi |
14281 | ||
97bf5e38 | 14282 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 14283 | |
81ecdfbb | 14284 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 14285 | |
97bf5e38 | 14286 | fi |
81ecdfbb RW |
14287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
14288 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 14289 | |
81ecdfbb RW |
14290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
14291 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
14292 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
14293 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14294 | else |
81ecdfbb | 14295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14296 | /* end confdefs.h. */ |
97bf5e38 MK |
14297 | |
14298 | #define _SYSCALL32 | |
d30c5336 JK |
14299 | /* Needed for new procfs interface on sparc-solaris. */ |
14300 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14301 | #include <sys/procfs.h> |
bec39cab AC |
14302 | int |
14303 | main () | |
14304 | { | |
97bf5e38 | 14305 | pr_siginfo64_t avar |
bec39cab AC |
14306 | ; |
14307 | return 0; | |
14308 | } | |
14309 | _ACEOF | |
81ecdfbb | 14310 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14311 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
14312 | else | |
81ecdfbb | 14313 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 14314 | |
97bf5e38 | 14315 | fi |
81ecdfbb | 14316 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14317 | fi |
c906108c | 14318 | |
97bf5e38 | 14319 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 14320 | |
81ecdfbb | 14321 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 14322 | |
97bf5e38 | 14323 | fi |
81ecdfbb RW |
14324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
14325 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
14326 | |
14327 | ||
97bf5e38 MK |
14328 | |
14329 | ||
14330 | ||
97bf5e38 | 14331 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
14332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
14333 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
14334 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
14335 | $as_echo_n "(cached) " >&6 | |
c906108c | 14336 | else |
81ecdfbb | 14337 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 14338 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 14339 | else |
81ecdfbb | 14340 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14341 | /* end confdefs.h. */ |
97bf5e38 MK |
14342 | #include <sys/procfs.h> |
14343 | int main () | |
14344 | { | |
14345 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
14346 | return 1; | |
14347 | return 0; | |
14348 | } | |
bec39cab | 14349 | _ACEOF |
81ecdfbb | 14350 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14351 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
14352 | else |
14353 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 14354 | fi |
81ecdfbb RW |
14355 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14356 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14357 | fi |
81ecdfbb | 14358 | |
c906108c SS |
14359 | fi |
14360 | ||
81ecdfbb RW |
14361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
14362 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 14363 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 14364 | |
81ecdfbb | 14365 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 14366 | |
97bf5e38 MK |
14367 | fi |
14368 | fi | |
c906108c | 14369 | fi |
c906108c | 14370 | |
bc8bcb4b | 14371 | # Check if the compiler supports the `long long' type. |
c906108c | 14372 | |
81ecdfbb RW |
14373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
14374 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
14375 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
14376 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14377 | else |
81ecdfbb | 14378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14379 | /* end confdefs.h. */ |
bc8bcb4b | 14380 | extern long long foo; |
bec39cab AC |
14381 | int |
14382 | main () | |
14383 | { | |
bc8bcb4b | 14384 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
14385 | ; |
14386 | return 0; | |
14387 | } | |
14388 | _ACEOF | |
81ecdfbb | 14389 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14390 | gdb_cv_c_long_long=yes |
14391 | else | |
81ecdfbb | 14392 | gdb_cv_c_long_long=no |
97bf5e38 | 14393 | fi |
81ecdfbb | 14394 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14395 | fi |
81ecdfbb RW |
14396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
14397 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
14398 | if test $gdb_cv_c_long_long != yes; then |
14399 | # libdecnumber requires long long. | |
14400 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
14401 | fi |
14402 | ||
bc8bcb4b | 14403 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 14404 | |
81ecdfbb RW |
14405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
14406 | $as_echo_n "checking for long long support in printf... " >&6; } | |
14407 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
14408 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14409 | else |
81ecdfbb | 14410 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14411 | gdb_cv_printf_has_long_long=no |
14412 | else | |
81ecdfbb | 14413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14414 | /* end confdefs.h. */ |
bc8bcb4b MK |
14415 | $ac_includes_default |
14416 | int | |
14417 | main () | |
14418 | { | |
14419 | char buf[32]; | |
97bf5e38 MK |
14420 | long long l = 0; |
14421 | l = (l << 16) + 0x0123; | |
14422 | l = (l << 16) + 0x4567; | |
14423 | l = (l << 16) + 0x89ab; | |
14424 | l = (l << 16) + 0xcdef; | |
14425 | sprintf (buf, "0x%016llx", l); | |
14426 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
14427 | ; |
14428 | return 0; | |
c906108c | 14429 | } |
bec39cab | 14430 | _ACEOF |
81ecdfbb | 14431 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14432 | gdb_cv_printf_has_long_long=yes |
14433 | else | |
81ecdfbb | 14434 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 14435 | fi |
81ecdfbb RW |
14436 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14437 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14438 | fi |
81ecdfbb | 14439 | |
97bf5e38 | 14440 | fi |
81ecdfbb RW |
14441 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
14442 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 14443 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 14444 | |
81ecdfbb | 14445 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14446 | |
14447 | fi | |
97bf5e38 | 14448 | |
1a619819 LM |
14449 | # Check if the compiler and runtime support printing decfloats. |
14450 | ||
81ecdfbb RW |
14451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
14452 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
14453 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
14454 | $as_echo_n "(cached) " >&6 | |
1a619819 | 14455 | else |
81ecdfbb | 14456 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
14457 | gdb_cv_printf_has_decfloat=no |
14458 | else | |
81ecdfbb | 14459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
14460 | /* end confdefs.h. */ |
14461 | $ac_includes_default | |
14462 | int | |
14463 | main () | |
14464 | { | |
14465 | char buf[64]; | |
14466 | _Decimal32 d32 = 1.2345df; | |
14467 | _Decimal64 d64 = 1.2345dd; | |
14468 | _Decimal128 d128 = 1.2345dl; | |
14469 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
14470 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
14471 | ; | |
14472 | return 0; | |
14473 | } | |
14474 | _ACEOF | |
81ecdfbb | 14475 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
14476 | gdb_cv_printf_has_decfloat=yes |
14477 | else | |
81ecdfbb | 14478 | gdb_cv_printf_has_decfloat=no |
1a619819 | 14479 | fi |
81ecdfbb RW |
14480 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14481 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 14482 | fi |
81ecdfbb | 14483 | |
1a619819 | 14484 | fi |
81ecdfbb RW |
14485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
14486 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
14487 | if test $gdb_cv_printf_has_decfloat = yes; then |
14488 | ||
81ecdfbb | 14489 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
14490 | |
14491 | fi | |
14492 | ||
bc8bcb4b MK |
14493 | # Check if the compiler supports the `long double' type. We can't use |
14494 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
14495 | # constants defined in <float.h> that fail on some systems, | |
14496 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 14497 | |
81ecdfbb RW |
14498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
14499 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
14500 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
14501 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14502 | else |
81ecdfbb | 14503 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14504 | /* end confdefs.h. */ |
97bf5e38 | 14505 | long double foo; |
bec39cab | 14506 | _ACEOF |
81ecdfbb | 14507 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 14508 | gdb_cv_c_long_double=yes |
97bf5e38 | 14509 | else |
81ecdfbb | 14510 | gdb_cv_c_long_double=no |
97bf5e38 | 14511 | fi |
81ecdfbb | 14512 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14513 | fi |
81ecdfbb RW |
14514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
14515 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 14516 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 14517 | |
81ecdfbb | 14518 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14519 | |
14520 | fi | |
14521 | ||
bc8bcb4b | 14522 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14523 | |
81ecdfbb RW |
14524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14525 | $as_echo_n "checking for long double support in printf... " >&6; } | |
14526 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
14527 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14528 | else |
81ecdfbb | 14529 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14530 | gdb_cv_printf_has_long_double=no |
14531 | else | |
81ecdfbb | 14532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14533 | /* end confdefs.h. */ |
bc8bcb4b MK |
14534 | $ac_includes_default |
14535 | int | |
14536 | main () | |
14537 | { | |
14538 | char buf[16]; | |
97bf5e38 MK |
14539 | long double f = 3.141592653; |
14540 | sprintf (buf, "%Lg", f); | |
14541 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14542 | ; |
14543 | return 0; | |
97bf5e38 | 14544 | } |
bec39cab | 14545 | _ACEOF |
81ecdfbb | 14546 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14547 | gdb_cv_printf_has_long_double=yes |
c906108c | 14548 | else |
81ecdfbb | 14549 | gdb_cv_printf_has_long_double=no |
c906108c | 14550 | fi |
81ecdfbb RW |
14551 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14552 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14553 | fi |
81ecdfbb | 14554 | |
c906108c | 14555 | fi |
81ecdfbb RW |
14556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14557 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14558 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14559 | |
81ecdfbb | 14560 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14561 | |
14562 | fi | |
97bf5e38 | 14563 | |
bc8bcb4b | 14564 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14565 | |
81ecdfbb RW |
14566 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14567 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
14568 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
14569 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14570 | else |
81ecdfbb | 14571 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14572 | gdb_cv_scanf_has_long_double=no |
14573 | else | |
81ecdfbb | 14574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14575 | /* end confdefs.h. */ |
bc8bcb4b MK |
14576 | #include <stdio.h> |
14577 | int | |
14578 | main () | |
14579 | { | |
14580 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14581 | long double f = 0; |
14582 | sscanf (buf, "%Lg", &f); | |
14583 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14584 | ; |
14585 | return 0; | |
97bf5e38 | 14586 | } |
bec39cab | 14587 | _ACEOF |
81ecdfbb | 14588 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14589 | gdb_cv_scanf_has_long_double=yes |
14590 | else | |
81ecdfbb | 14591 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14592 | fi |
81ecdfbb RW |
14593 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14594 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14595 | fi |
81ecdfbb | 14596 | |
c906108c | 14597 | fi |
81ecdfbb RW |
14598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14599 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14600 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14601 | |
81ecdfbb | 14602 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14603 | |
14604 | fi | |
c906108c | 14605 | |
438013df AO |
14606 | case ${host_os} in |
14607 | aix*) | |
81ecdfbb RW |
14608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14609 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
14610 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
14611 | $as_echo_n "(cached) " >&6 | |
438013df | 14612 | else |
bec39cab | 14613 | |
438013df AO |
14614 | SAVE_LDFLAGS=$LDFLAGS |
14615 | ||
14616 | case $GCC in | |
14617 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14618 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14619 | esac | |
14620 | ||
14621 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14623 | /* end confdefs.h. */ |
438013df | 14624 | |
bec39cab AC |
14625 | int |
14626 | main () | |
14627 | { | |
438013df | 14628 | int i; |
bec39cab AC |
14629 | ; |
14630 | return 0; | |
14631 | } | |
14632 | _ACEOF | |
81ecdfbb | 14633 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14634 | |
81ecdfbb RW |
14635 | else |
14636 | gdb_cv_bigtoc= | |
438013df | 14637 | fi |
81ecdfbb RW |
14638 | rm -f core conftest.err conftest.$ac_objext \ |
14639 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 14640 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 14641 | |
bec39cab | 14642 | fi |
81ecdfbb RW |
14643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
14644 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
14645 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
14646 | ;; | |
14647 | esac | |
14648 | ||
38f6b338 | 14649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 14650 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
14651 | dynamic_list=false |
14652 | if test "${gdb_native}" = yes; then | |
14653 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
14654 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
14655 | # may not be supported there. | |
14656 | old_LDFLAGS="$LDFLAGS" | |
14657 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
14658 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
14659 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
14660 | if test "${have_libpython}" = no; then | |
14661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
14662 | /* end confdefs.h. */ |
14663 | ||
14664 | int | |
14665 | main () | |
14666 | { | |
14667 | ||
14668 | ; | |
14669 | return 0; | |
14670 | } | |
14671 | _ACEOF | |
14672 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
14673 | dynamic_list=true |
14674 | fi | |
14675 | rm -f core conftest.err conftest.$ac_objext \ | |
14676 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
14677 | else |
14678 | # Workaround http://bugs.python.org/issue4434 where static | |
14679 | # libpythonX.Y.a would get its symbols required for | |
14680 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
14681 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
14682 | |
14683 | # Note the workaround for Python | |
14684 | # http://bugs.python.org/issue10112 earlier has removed | |
14685 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
14686 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
14687 | # always pass. | |
38f6b338 JK |
14688 | old_CFLAGS="$CFLAGS" |
14689 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
14690 | old_LIBS="$LIBS" |
14691 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
14692 | old_CPPFLAGS="$CPPFLAGS" |
14693 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 14694 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 14695 | true |
f6528abd | 14696 | else |
3bebe2f2 JK |
14697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14698 | /* end confdefs.h. */ | |
1b4f615e | 14699 | #include "Python.h" |
3bebe2f2 JK |
14700 | int |
14701 | main () | |
14702 | { | |
14703 | int err; | |
38f6b338 JK |
14704 | Py_Initialize (); |
14705 | err = PyRun_SimpleString ("import itertools\n"); | |
14706 | Py_Finalize (); | |
14707 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
14708 | ; |
14709 | return 0; | |
14710 | } | |
14711 | _ACEOF | |
14712 | if ac_fn_c_try_run "$LINENO"; then : | |
14713 | dynamic_list=true | |
14714 | fi | |
14715 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14716 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14717 | fi | |
14718 | ||
8c1fb155 | 14719 | LIBS="$old_LIBS" |
38f6b338 | 14720 | CFLAGS="$old_CFLAGS" |
1b4f615e | 14721 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
14722 | fi |
14723 | LDFLAGS="$old_LDFLAGS" | |
14724 | fi | |
14725 | if $dynamic_list; then | |
14726 | found="-Wl,--dynamic-list" | |
14727 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 14728 | else |
38f6b338 JK |
14729 | found="-rdynamic" |
14730 | RDYNAMIC="-rdynamic" | |
f6528abd | 14731 | fi |
f6528abd | 14732 | |
38f6b338 | 14733 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 14734 | $as_echo "$found" >&6; } |
0407b3f1 | 14735 | |
f6528abd | 14736 | |
0407b3f1 | 14737 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 14738 | case ${host_os} in |
c906108c | 14739 | solaris*) |
d92419e5 JB |
14740 | # See if thread_db library is around for Solaris thread debugging. |
14741 | # Note that we must explicitly test for version 1 of the library | |
14742 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
14743 | # the same API. | |
81ecdfbb RW |
14744 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
14745 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 14746 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
14747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14748 | $as_echo "yes" >&6; } | |
60ca704f | 14749 | |
81ecdfbb | 14750 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 14751 | |
3483b318 | 14752 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 14753 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
14754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
14755 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
14756 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
14757 | $as_echo_n "(cached) " >&6 | |
c906108c | 14758 | else |
bec39cab | 14759 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 14760 | LIBS="-ldl $LIBS" |
81ecdfbb | 14761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
14762 | /* end confdefs.h. */ |
14763 | ||
81ecdfbb RW |
14764 | /* Override any GCC internal prototype to avoid an error. |
14765 | Use char because int might match the return type of a GCC | |
14766 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
14767 | #ifdef __cplusplus |
14768 | extern "C" | |
14769 | #endif | |
bec39cab AC |
14770 | char dlopen (); |
14771 | int | |
14772 | main () | |
14773 | { | |
81ecdfbb | 14774 | return dlopen (); |
bec39cab AC |
14775 | ; |
14776 | return 0; | |
14777 | } | |
14778 | _ACEOF | |
81ecdfbb | 14779 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
14780 | ac_cv_lib_dl_dlopen=yes |
14781 | else | |
81ecdfbb | 14782 | ac_cv_lib_dl_dlopen=no |
bec39cab | 14783 | fi |
81ecdfbb RW |
14784 | rm -f core conftest.err conftest.$ac_objext \ |
14785 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
14786 | LIBS=$ac_check_lib_save_LIBS |
14787 | fi | |
81ecdfbb RW |
14788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
14789 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
14790 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
14791 | cat >>confdefs.h <<_ACEOF |
14792 | #define HAVE_LIBDL 1 | |
14793 | _ACEOF | |
c906108c SS |
14794 | |
14795 | LIBS="-ldl $LIBS" | |
14796 | ||
c906108c SS |
14797 | fi |
14798 | ||
f6528abd | 14799 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
14800 | # Sun randomly tweaked the prototypes in <proc_service.h> |
14801 | # at one point. | |
81ecdfbb RW |
14802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
14803 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
14804 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
14805 | $as_echo_n "(cached) " >&6 | |
c906108c | 14806 | else |
bec39cab | 14807 | |
81ecdfbb | 14808 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14809 | /* end confdefs.h. */ |
c906108c SS |
14810 | |
14811 | #include <proc_service.h> | |
14812 | ps_err_e ps_pdwrite | |
14813 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 14814 | |
bec39cab AC |
14815 | int |
14816 | main () | |
14817 | { | |
14818 | ||
14819 | ; | |
14820 | return 0; | |
14821 | } | |
14822 | _ACEOF | |
81ecdfbb | 14823 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
14824 | gdb_cv_proc_service_is_old=no |
14825 | else | |
81ecdfbb | 14826 | gdb_cv_proc_service_is_old=yes |
c906108c | 14827 | fi |
81ecdfbb | 14828 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 14829 | |
c906108c SS |
14830 | fi |
14831 | ||
81ecdfbb RW |
14832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
14833 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 14834 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 14835 | |
81ecdfbb | 14836 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
14837 | |
14838 | fi | |
14839 | else | |
81ecdfbb RW |
14840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14841 | $as_echo "no" >&6; } | |
c906108c SS |
14842 | fi |
14843 | ;; | |
d92419e5 | 14844 | aix*) |
81ecdfbb RW |
14845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
14846 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
14847 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
14848 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14849 | else |
81ecdfbb | 14850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14851 | /* end confdefs.h. */ |
d92419e5 | 14852 | #include <sys/pthdebug.h> |
bec39cab AC |
14853 | int |
14854 | main () | |
14855 | { | |
d92419e5 JB |
14856 | #ifndef PTHDB_VERSION_3 |
14857 | #error | |
14858 | #endif | |
bec39cab AC |
14859 | ; |
14860 | return 0; | |
14861 | } | |
14862 | _ACEOF | |
81ecdfbb | 14863 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
14864 | gdb_cv_have_aix_thread_debug=yes |
14865 | else | |
81ecdfbb | 14866 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 14867 | fi |
81ecdfbb | 14868 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
14869 | fi |
14870 | ||
81ecdfbb RW |
14871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
14872 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
14873 | if test $gdb_cv_have_aix_thread_debug = yes; then |
14874 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 14875 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 14876 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
14877 | |
14878 | # Older versions of AIX do not provide the declaration for | |
14879 | # the getthrds function (it appears that it was introduced | |
14880 | # with AIX 6.x). | |
14881 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
14882 | " | |
14883 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
14884 | ac_have_decl=1 | |
14885 | else | |
14886 | ac_have_decl=0 | |
14887 | fi | |
14888 | ||
14889 | cat >>confdefs.h <<_ACEOF | |
14890 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
14891 | _ACEOF | |
14892 | ||
d92419e5 JB |
14893 | fi |
14894 | ;; | |
c906108c | 14895 | esac |
bec39cab | 14896 | |
c906108c SS |
14897 | fi |
14898 | ||
3f47be5c | 14899 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
14900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
14901 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
14902 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
14903 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14904 | else |
81ecdfbb | 14905 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14906 | /* end confdefs.h. */ |
3f47be5c | 14907 | #include <thread_db.h> |
bec39cab AC |
14908 | int |
14909 | main () | |
14910 | { | |
3f47be5c | 14911 | int i = TD_NOTALLOC; |
bec39cab AC |
14912 | ; |
14913 | return 0; | |
14914 | } | |
14915 | _ACEOF | |
81ecdfbb | 14916 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
14917 | gdb_cv_thread_db_h_has_td_notalloc=yes |
14918 | else | |
81ecdfbb | 14919 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 14920 | |
3f47be5c | 14921 | fi |
81ecdfbb | 14922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 14923 | |
bec39cab | 14924 | fi |
81ecdfbb RW |
14925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
14926 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
14927 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
14928 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
14929 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
14930 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14931 | else |
81ecdfbb | 14932 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14933 | /* end confdefs.h. */ |
14934 | #include <thread_db.h> | |
14935 | int | |
14936 | main () | |
14937 | { | |
14938 | int i = TD_VERSION; | |
14939 | ; | |
14940 | return 0; | |
14941 | } | |
14942 | _ACEOF | |
81ecdfbb | 14943 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14944 | gdb_cv_thread_db_h_has_td_version=yes |
14945 | else | |
81ecdfbb | 14946 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
14947 | |
14948 | fi | |
81ecdfbb | 14949 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14950 | |
14951 | fi | |
81ecdfbb RW |
14952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
14953 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
14954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
14955 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
14956 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
14957 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14958 | else |
81ecdfbb | 14959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14960 | /* end confdefs.h. */ |
14961 | #include <thread_db.h> | |
14962 | int | |
14963 | main () | |
14964 | { | |
14965 | int i = TD_NOTLS; | |
14966 | ; | |
14967 | return 0; | |
14968 | } | |
14969 | _ACEOF | |
81ecdfbb | 14970 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14971 | gdb_cv_thread_db_h_has_td_notls=yes |
14972 | else | |
81ecdfbb | 14973 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
14974 | |
14975 | fi | |
81ecdfbb | 14976 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14977 | |
14978 | fi | |
81ecdfbb RW |
14979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
14980 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
14981 | fi |
14982 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 14983 | |
81ecdfbb | 14984 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 14985 | |
59f80f10 DJ |
14986 | fi |
14987 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
14988 | ||
81ecdfbb | 14989 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
14990 | |
14991 | fi | |
14992 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
14993 | ||
81ecdfbb | 14994 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 14995 | |
3f47be5c EZ |
14996 | fi |
14997 | ||
81ecdfbb RW |
14998 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
14999 | " | |
15000 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
15001 | ac_have_decl=1 | |
10568435 | 15002 | else |
81ecdfbb | 15003 | ac_have_decl=0 |
10568435 | 15004 | fi |
10568435 JK |
15005 | |
15006 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 15007 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
15008 | _ACEOF |
15009 | ||
15010 | ||
81ecdfbb RW |
15011 | if test "$cross_compiling" = yes; then : |
15012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
15013 | /* end confdefs.h. */ |
15014 | #include <sys/personality.h> | |
15015 | int | |
15016 | main () | |
15017 | { | |
15018 | ||
15019 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15020 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15021 | # endif | |
15022 | /* Test the flag could be set and stays set. */ | |
15023 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15024 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15025 | return 1 | |
15026 | ; | |
15027 | return 0; | |
15028 | } | |
15029 | _ACEOF | |
81ecdfbb | 15030 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
15031 | have_personality=true |
15032 | else | |
81ecdfbb | 15033 | have_personality=false |
10568435 | 15034 | fi |
81ecdfbb RW |
15035 | rm -f core conftest.err conftest.$ac_objext \ |
15036 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 15037 | else |
81ecdfbb | 15038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
15039 | /* end confdefs.h. */ |
15040 | #include <sys/personality.h> | |
15041 | int | |
15042 | main () | |
15043 | { | |
15044 | ||
15045 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15046 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15047 | # endif | |
15048 | /* Test the flag could be set and stays set. */ | |
15049 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15050 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15051 | return 1 | |
15052 | ; | |
15053 | return 0; | |
15054 | } | |
15055 | _ACEOF | |
81ecdfbb | 15056 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
15057 | have_personality=true |
15058 | else | |
81ecdfbb | 15059 | have_personality=false |
10568435 | 15060 | fi |
81ecdfbb RW |
15061 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15062 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 15063 | fi |
81ecdfbb | 15064 | |
10568435 JK |
15065 | if $have_personality |
15066 | then | |
15067 | ||
81ecdfbb | 15068 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
15069 | |
15070 | fi | |
15071 | ||
e655c1a2 PA |
15072 | case $host_os in |
15073 | go32* | *djgpp*) | |
15074 | gdbinit=gdb.ini | |
15075 | ;; | |
15076 | *) | |
15077 | gdbinit=.gdbinit | |
15078 | ;; | |
15079 | esac | |
15080 | ||
15081 | cat >>confdefs.h <<_ACEOF | |
15082 | #define GDBINIT "$gdbinit" | |
15083 | _ACEOF | |
15084 | ||
15085 | ||
fb40c209 | 15086 | |
f83d8a90 DE |
15087 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
15088 | # except that the argument to --with-sysroot is optional. | |
15089 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
15090 | if test "x$with_sysroot" = xyes; then | |
15091 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
15092 | fi | |
bec39cab | 15093 | |
81ecdfbb RW |
15094 | # Check whether --with-sysroot was given. |
15095 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
15096 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
15097 | else | |
15098 | TARGET_SYSTEM_ROOT= | |
15099 | fi | |
030292b7 | 15100 | |
030292b7 | 15101 | |
f83d8a90 DE |
15102 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
15103 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15104 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
15105 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 15106 | |
f83d8a90 DE |
15107 | cat >>confdefs.h <<_ACEOF |
15108 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
15109 | _ACEOF | |
bec39cab | 15110 | |
030292b7 | 15111 | |
b14b1491 | 15112 | |
f83d8a90 DE |
15113 | |
15114 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
15115 | if test "x$prefix" = xNONE; then | |
15116 | test_prefix=/usr/local | |
15117 | else | |
15118 | test_prefix=$prefix | |
15119 | fi | |
15120 | else | |
15121 | test_prefix=$exec_prefix | |
15122 | fi | |
15123 | value=0 | |
15124 | case ${ac_define_dir} in | |
15125 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15126 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15127 | value=1 | |
15128 | ;; | |
15129 | esac | |
15130 | ||
15131 | cat >>confdefs.h <<_ACEOF | |
15132 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
15133 | _ACEOF | |
030292b7 DJ |
15134 | |
15135 | ||
15136 | ||
16e7150e | 15137 | |
16e7150e | 15138 | |
81ecdfbb RW |
15139 | # Check whether --with-system-gdbinit was given. |
15140 | if test "${with_system_gdbinit+set}" = set; then : | |
15141 | withval=$with_system_gdbinit; | |
b14b1491 TT |
15142 | SYSTEM_GDBINIT=$withval |
15143 | else | |
15144 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
15145 | fi |
15146 | ||
16e7150e JG |
15147 | |
15148 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
15149 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 15150 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
15151 | ac_define_dir=`eval echo $ac_define_dir` |
15152 | ||
15153 | cat >>confdefs.h <<_ACEOF | |
15154 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
15155 | _ACEOF | |
15156 | ||
15157 | ||
15158 | ||
0c4a4063 | 15159 | |
b14b1491 TT |
15160 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
15161 | if test "x$prefix" = xNONE; then | |
15162 | test_prefix=/usr/local | |
15163 | else | |
15164 | test_prefix=$prefix | |
15165 | fi | |
15166 | else | |
15167 | test_prefix=$exec_prefix | |
15168 | fi | |
15169 | value=0 | |
15170 | case ${ac_define_dir} in | |
15171 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15172 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15173 | value=1 | |
15174 | ;; | |
15175 | esac | |
16e7150e | 15176 | |
b14b1491 TT |
15177 | cat >>confdefs.h <<_ACEOF |
15178 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
15179 | _ACEOF |
15180 | ||
b14b1491 | 15181 | |
16e7150e | 15182 | |
0c4a4063 | 15183 | |
b835bb52 | 15184 | |
81ecdfbb RW |
15185 | # Check whether --enable-werror was given. |
15186 | if test "${enable_werror+set}" = set; then : | |
15187 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
15188 | yes | y) ERROR_ON_WARNING="yes" ;; |
15189 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 15190 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 15191 | esac |
81ecdfbb RW |
15192 | fi |
15193 | ||
094a342e | 15194 | |
9a084706 PA |
15195 | # Enable -Werror by default when using gcc. Turn it off for releases. |
15196 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
15197 | ERROR_ON_WARNING=yes |
15198 | fi | |
15199 | ||
15200 | WERROR_CFLAGS="" | |
15201 | if test "${ERROR_ON_WARNING}" = yes ; then | |
15202 | WERROR_CFLAGS="-Werror" | |
15203 | fi | |
15204 | ||
cf6de44d | 15205 | # The options we'll try to enable. |
aac331e4 | 15206 | build_warnings="-Wall -Wpointer-arith \ |
1cb5e2a4 | 15207 | -Wno-unused -Wunused-value -Wunused-function \ |
aac331e4 | 15208 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d PA |
15209 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
15210 | -Wno-sign-compare -Wno-write-strings -Wno-narrowing" | |
3bc3d82a | 15211 | |
3526781e DJ |
15212 | # Enable -Wno-format by default when using gcc on mingw since many |
15213 | # GCC versions complain about %I64. | |
15214 | case "${host}" in | |
15215 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
d3685d60 | 15216 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
15217 | esac |
15218 | ||
81ecdfbb RW |
15219 | # Check whether --enable-build-warnings was given. |
15220 | if test "${enable_build_warnings+set}" = set; then : | |
15221 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
15222 | yes) ;; |
15223 | no) build_warnings="-w";; | |
15224 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15225 | build_warnings="${build_warnings} ${t}";; | |
15226 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15227 | build_warnings="${t} ${build_warnings}";; | |
15228 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15229 | esac | |
d4f3574e | 15230 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 15231 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 15232 | fi |
81ecdfbb RW |
15233 | fi |
15234 | # Check whether --enable-gdb-build-warnings was given. | |
15235 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
15236 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
15237 | yes) ;; |
15238 | no) build_warnings="-w";; | |
15239 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15240 | build_warnings="${build_warnings} ${t}";; | |
15241 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15242 | build_warnings="${t} ${build_warnings}";; | |
15243 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15244 | esac | |
15245 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
15246 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
15247 | fi | |
81ecdfbb | 15248 | fi |
3bc3d82a PA |
15249 | |
15250 | # The set of warnings supported by a C++ compiler is not the same as | |
15251 | # of the C compiler. | |
cf6de44d | 15252 | ac_ext=cpp |
3bc3d82a PA |
15253 | ac_cpp='$CXXCPP $CPPFLAGS' |
15254 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15255 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15256 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
15257 | ||
3bc3d82a | 15258 | |
81ecdfbb | 15259 | WARN_CFLAGS="" |
c906108c SS |
15260 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
15261 | then | |
81ecdfbb RW |
15262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
15263 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
15264 | # Separate out the -Werror flag as some files just cannot be |
15265 | # compiled with it enabled. | |
15266 | for w in ${build_warnings}; do | |
7544db95 PA |
15267 | # GCC does not complain about -Wno-unknown-warning. Invert |
15268 | # and test -Wunknown-warning instead. | |
15269 | case $w in | |
15270 | -Wno-*) | |
15271 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
15272 | *) | |
15273 | wtest=$w ;; | |
15274 | esac | |
15275 | ||
746a987d AC |
15276 | case $w in |
15277 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
15278 | *) |
15279 | # Check whether GCC accepts it. | |
4536bbc6 | 15280 | saved_CFLAGS="$CFLAGS" |
7544db95 | 15281 | CFLAGS="$CFLAGS $wtest" |
3bc3d82a | 15282 | saved_CXXFLAGS="$CXXFLAGS" |
7544db95 | 15283 | CXXFLAGS="$CXXFLAGS $wtest" |
54019719 | 15284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15285 | /* end confdefs.h. */ |
4536bbc6 | 15286 | |
bec39cab AC |
15287 | int |
15288 | main () | |
15289 | { | |
4536bbc6 | 15290 | |
bec39cab AC |
15291 | ; |
15292 | return 0; | |
15293 | } | |
15294 | _ACEOF | |
3bc3d82a | 15295 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 15296 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 15297 | fi |
81ecdfbb | 15298 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 15299 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 15300 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
15301 | esac |
15302 | done | |
81ecdfbb RW |
15303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
15304 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
15305 | fi |
15306 | ||
15307 | ||
104c1213 | 15308 | |
cf6de44d | 15309 | ac_ext=c |
3bc3d82a PA |
15310 | ac_cpp='$CPP $CPPFLAGS' |
15311 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15312 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15313 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
15314 | ||
3bc3d82a | 15315 | |
b835bb52 | 15316 | |
7a292a7a | 15317 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
15318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
15319 | $as_echo_n "checking for cygwin... " >&6; } | |
15320 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
15321 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15322 | else |
81ecdfbb | 15323 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15324 | /* end confdefs.h. */ |
7a292a7a SS |
15325 | |
15326 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
15327 | lose | |
15328 | #endif | |
bec39cab | 15329 | _ACEOF |
7a292a7a | 15330 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 15331 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
15332 | gdb_cv_os_cygwin=yes |
15333 | else | |
7a292a7a SS |
15334 | gdb_cv_os_cygwin=no |
15335 | fi | |
15336 | rm -f conftest* | |
15337 | ||
15338 | fi | |
81ecdfbb RW |
15339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
15340 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 15341 | |
aff38e61 | 15342 | |
3eb25fda | 15343 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 15344 | case ${host} in |
95cbc983 AC |
15345 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
15346 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 15347 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
15348 | esac |
15349 | ||
15350 | ||
cd0fc7c3 SS |
15351 | # libreadline needs libuser32.a in a cygwin environment |
15352 | WIN32LIBS= | |
15353 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
15354 | WIN32LIBS="-luser32" |
15355 | case "${target}" in | |
15356 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
15357 | ;; | |
15358 | esac | |
cd0fc7c3 | 15359 | fi |
c906108c | 15360 | |
b4505029 MM |
15361 | # The ser-tcp.c module requires sockets. |
15362 | case ${host} in | |
15363 | *mingw32*) | |
15364 | ||
81ecdfbb | 15365 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
15366 | |
15367 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
15368 | ;; | |
15369 | esac | |
15370 | ||
7a292a7a | 15371 | |
31d99776 | 15372 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
15373 | |
15374 | OLD_CFLAGS=$CFLAGS | |
15375 | OLD_LDFLAGS=$LDFLAGS | |
15376 | OLD_LIBS=$LIBS | |
15377 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15378 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15379 | # always want our bfd. | |
15380 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15381 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15382 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 15383 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15384 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 15385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb RW |
15386 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
15387 | if test "${gdb_cv_var_elf+set}" = set; then : | |
15388 | $as_echo_n "(cached) " >&6 | |
31d99776 | 15389 | else |
81ecdfbb | 15390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
15391 | /* end confdefs.h. */ |
15392 | #include <stdlib.h> | |
def63ff0 TT |
15393 | #include "bfd.h" |
15394 | #include "elf-bfd.h" | |
31d99776 DJ |
15395 | |
15396 | int | |
15397 | main () | |
15398 | { | |
def63ff0 | 15399 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
15400 | ; |
15401 | return 0; | |
15402 | } | |
15403 | _ACEOF | |
81ecdfbb | 15404 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
15405 | gdb_cv_var_elf=yes |
15406 | else | |
81ecdfbb | 15407 | gdb_cv_var_elf=no |
31d99776 | 15408 | fi |
81ecdfbb RW |
15409 | rm -f core conftest.err conftest.$ac_objext \ |
15410 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 15411 | fi |
81ecdfbb RW |
15412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
15413 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
15414 | CFLAGS=$OLD_CFLAGS |
15415 | LDFLAGS=$OLD_LDFLAGS | |
15416 | LIBS=$OLD_LIBS | |
31d99776 | 15417 | if test $gdb_cv_var_elf = yes; then |
d4777acb | 15418 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 15419 | |
81ecdfbb | 15420 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 15421 | |
075ff26d JK |
15422 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
15423 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
15424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
15425 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
15426 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15427 | $as_echo_n "(cached) " >&6 | |
15428 | else | |
15429 | ac_func_search_save_LIBS=$LIBS | |
15430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15431 | /* end confdefs.h. */ | |
15432 | ||
15433 | /* Override any GCC internal prototype to avoid an error. | |
15434 | Use char because int might match the return type of a GCC | |
15435 | builtin and then its argument prototype would still apply. */ | |
15436 | #ifdef __cplusplus | |
15437 | extern "C" | |
15438 | #endif | |
15439 | char dlopen (); | |
15440 | int | |
15441 | main () | |
15442 | { | |
15443 | return dlopen (); | |
15444 | ; | |
15445 | return 0; | |
15446 | } | |
15447 | _ACEOF | |
15448 | for ac_lib in '' dl; do | |
15449 | if test -z "$ac_lib"; then | |
15450 | ac_res="none required" | |
15451 | else | |
15452 | ac_res=-l$ac_lib | |
15453 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
15454 | fi | |
15455 | if ac_fn_c_try_link "$LINENO"; then : | |
15456 | ac_cv_search_dlopen=$ac_res | |
15457 | fi | |
15458 | rm -f core conftest.err conftest.$ac_objext \ | |
15459 | conftest$ac_exeext | |
15460 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15461 | break | |
15462 | fi | |
15463 | done | |
15464 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
15465 | ||
15466 | else | |
15467 | ac_cv_search_dlopen=no | |
15468 | fi | |
15469 | rm conftest.$ac_ext | |
15470 | LIBS=$ac_func_search_save_LIBS | |
15471 | fi | |
15472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
15473 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
15474 | ac_res=$ac_cv_search_dlopen | |
15475 | if test "$ac_res" != no; then : | |
15476 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
15477 | ||
15478 | fi | |
15479 | ||
075ff26d | 15480 | fi |
31d99776 | 15481 | fi |
31d99776 | 15482 | |
4f05add4 TT |
15483 | # Add macho support to GDB, but only if BFD includes it. |
15484 | ||
15485 | OLD_CFLAGS=$CFLAGS | |
15486 | OLD_LDFLAGS=$LDFLAGS | |
15487 | OLD_LIBS=$LIBS | |
15488 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15489 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15490 | # always want our bfd. | |
15491 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15492 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15493 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 15494 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15495 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
15496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
15497 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
15498 | if test "${gdb_cv_var_macho+set}" = set; then : | |
15499 | $as_echo_n "(cached) " >&6 | |
15500 | else | |
15501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15502 | /* end confdefs.h. */ | |
15503 | #include <stdlib.h> | |
15504 | #include "bfd.h" | |
15505 | #include "mach-o.h" | |
15506 | ||
15507 | int | |
15508 | main () | |
15509 | { | |
15510 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
15511 | ; | |
15512 | return 0; | |
15513 | } | |
15514 | _ACEOF | |
15515 | if ac_fn_c_try_link "$LINENO"; then : | |
15516 | gdb_cv_var_macho=yes | |
15517 | else | |
15518 | gdb_cv_var_macho=no | |
15519 | fi | |
15520 | rm -f core conftest.err conftest.$ac_objext \ | |
15521 | conftest$ac_exeext conftest.$ac_ext | |
15522 | fi | |
15523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
15524 | $as_echo "$gdb_cv_var_macho" >&6; } | |
15525 | CFLAGS=$OLD_CFLAGS | |
15526 | LDFLAGS=$OLD_LDFLAGS | |
15527 | LIBS=$OLD_LIBS | |
15528 | if test $gdb_cv_var_macho = yes; then | |
15529 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
15530 | fi | |
15531 | ||
121ce6e5 DJ |
15532 | # Add any host-specific objects to GDB. |
15533 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
15534 | ||
608e2dbb TT |
15535 | # If building on ELF, look for lzma support for embedded compressed debug info. |
15536 | if test $gdb_cv_var_elf = yes; then | |
15537 | ||
15538 | # Check whether --with-lzma was given. | |
15539 | if test "${with_lzma+set}" = set; then : | |
15540 | withval=$with_lzma; | |
15541 | else | |
15542 | with_lzma=auto | |
15543 | fi | |
15544 | ||
15545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
15546 | $as_echo_n "checking whether to use lzma... " >&6; } | |
15547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
15548 | $as_echo "$with_lzma" >&6; } | |
15549 | ||
15550 | if test "${with_lzma}" != no; then | |
15551 | ||
15552 | ||
15553 | ||
15554 | ||
15555 | ||
15556 | ||
15557 | ||
15558 | ||
15559 | use_additional=yes | |
15560 | ||
15561 | acl_save_prefix="$prefix" | |
15562 | prefix="$acl_final_prefix" | |
15563 | acl_save_exec_prefix="$exec_prefix" | |
15564 | exec_prefix="$acl_final_exec_prefix" | |
15565 | ||
15566 | eval additional_includedir=\"$includedir\" | |
15567 | eval additional_libdir=\"$libdir\" | |
15568 | ||
15569 | exec_prefix="$acl_save_exec_prefix" | |
15570 | prefix="$acl_save_prefix" | |
15571 | ||
15572 | ||
15573 | # Check whether --with-liblzma-prefix was given. | |
15574 | if test "${with_liblzma_prefix+set}" = set; then : | |
15575 | withval=$with_liblzma_prefix; | |
15576 | if test "X$withval" = "Xno"; then | |
15577 | use_additional=no | |
15578 | else | |
15579 | if test "X$withval" = "X"; then | |
15580 | ||
15581 | acl_save_prefix="$prefix" | |
15582 | prefix="$acl_final_prefix" | |
15583 | acl_save_exec_prefix="$exec_prefix" | |
15584 | exec_prefix="$acl_final_exec_prefix" | |
15585 | ||
15586 | eval additional_includedir=\"$includedir\" | |
15587 | eval additional_libdir=\"$libdir\" | |
15588 | ||
15589 | exec_prefix="$acl_save_exec_prefix" | |
15590 | prefix="$acl_save_prefix" | |
15591 | ||
15592 | else | |
15593 | additional_includedir="$withval/include" | |
15594 | additional_libdir="$withval/lib" | |
15595 | fi | |
15596 | fi | |
15597 | ||
15598 | fi | |
15599 | ||
15600 | LIBLZMA= | |
15601 | LTLIBLZMA= | |
15602 | INCLZMA= | |
15603 | rpathdirs= | |
15604 | ltrpathdirs= | |
15605 | names_already_handled= | |
15606 | names_next_round='lzma ' | |
15607 | while test -n "$names_next_round"; do | |
15608 | names_this_round="$names_next_round" | |
15609 | names_next_round= | |
15610 | for name in $names_this_round; do | |
15611 | already_handled= | |
15612 | for n in $names_already_handled; do | |
15613 | if test "$n" = "$name"; then | |
15614 | already_handled=yes | |
15615 | break | |
15616 | fi | |
15617 | done | |
15618 | if test -z "$already_handled"; then | |
15619 | names_already_handled="$names_already_handled $name" | |
15620 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
15621 | eval value=\"\$HAVE_LIB$uppername\" | |
15622 | if test -n "$value"; then | |
15623 | if test "$value" = yes; then | |
15624 | eval value=\"\$LIB$uppername\" | |
15625 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
15626 | eval value=\"\$LTLIB$uppername\" | |
15627 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
15628 | else | |
15629 | : | |
15630 | fi | |
15631 | else | |
15632 | found_dir= | |
15633 | found_la= | |
15634 | found_so= | |
15635 | found_a= | |
15636 | if test $use_additional = yes; then | |
15637 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
15638 | found_dir="$additional_libdir" | |
15639 | found_so="$additional_libdir/lib$name.$shlibext" | |
15640 | if test -f "$additional_libdir/lib$name.la"; then | |
15641 | found_la="$additional_libdir/lib$name.la" | |
15642 | fi | |
15643 | else | |
15644 | if test -f "$additional_libdir/lib$name.$libext"; then | |
15645 | found_dir="$additional_libdir" | |
15646 | found_a="$additional_libdir/lib$name.$libext" | |
15647 | if test -f "$additional_libdir/lib$name.la"; then | |
15648 | found_la="$additional_libdir/lib$name.la" | |
15649 | fi | |
15650 | fi | |
15651 | fi | |
15652 | fi | |
15653 | if test "X$found_dir" = "X"; then | |
15654 | for x in $LDFLAGS $LTLIBLZMA; do | |
15655 | ||
15656 | acl_save_prefix="$prefix" | |
15657 | prefix="$acl_final_prefix" | |
15658 | acl_save_exec_prefix="$exec_prefix" | |
15659 | exec_prefix="$acl_final_exec_prefix" | |
15660 | eval x=\"$x\" | |
15661 | exec_prefix="$acl_save_exec_prefix" | |
15662 | prefix="$acl_save_prefix" | |
15663 | ||
15664 | case "$x" in | |
15665 | -L*) | |
15666 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
15667 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
15668 | found_dir="$dir" | |
15669 | found_so="$dir/lib$name.$shlibext" | |
15670 | if test -f "$dir/lib$name.la"; then | |
15671 | found_la="$dir/lib$name.la" | |
15672 | fi | |
15673 | else | |
15674 | if test -f "$dir/lib$name.$libext"; then | |
15675 | found_dir="$dir" | |
15676 | found_a="$dir/lib$name.$libext" | |
15677 | if test -f "$dir/lib$name.la"; then | |
15678 | found_la="$dir/lib$name.la" | |
15679 | fi | |
15680 | fi | |
15681 | fi | |
15682 | ;; | |
15683 | esac | |
15684 | if test "X$found_dir" != "X"; then | |
15685 | break | |
15686 | fi | |
15687 | done | |
15688 | fi | |
15689 | if test "X$found_dir" != "X"; then | |
15690 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
15691 | if test "X$found_so" != "X"; then | |
15692 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
15693 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15694 | else | |
15695 | haveit= | |
15696 | for x in $ltrpathdirs; do | |
15697 | if test "X$x" = "X$found_dir"; then | |
15698 | haveit=yes | |
15699 | break | |
15700 | fi | |
15701 | done | |
15702 | if test -z "$haveit"; then | |
15703 | ltrpathdirs="$ltrpathdirs $found_dir" | |
15704 | fi | |
15705 | if test "$hardcode_direct" = yes; then | |
15706 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15707 | else | |
15708 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
15709 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15710 | haveit= | |
15711 | for x in $rpathdirs; do | |
15712 | if test "X$x" = "X$found_dir"; then | |
15713 | haveit=yes | |
15714 | break | |
15715 | fi | |
15716 | done | |
15717 | if test -z "$haveit"; then | |
15718 | rpathdirs="$rpathdirs $found_dir" | |
15719 | fi | |
15720 | else | |
15721 | haveit= | |
15722 | for x in $LDFLAGS $LIBLZMA; do | |
15723 | ||
15724 | acl_save_prefix="$prefix" | |
15725 | prefix="$acl_final_prefix" | |
15726 | acl_save_exec_prefix="$exec_prefix" | |
15727 | exec_prefix="$acl_final_exec_prefix" | |
15728 | eval x=\"$x\" | |
15729 | exec_prefix="$acl_save_exec_prefix" | |
15730 | prefix="$acl_save_prefix" | |
15731 | ||
15732 | if test "X$x" = "X-L$found_dir"; then | |
15733 | haveit=yes | |
15734 | break | |
15735 | fi | |
15736 | done | |
15737 | if test -z "$haveit"; then | |
15738 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
15739 | fi | |
15740 | if test "$hardcode_minus_L" != no; then | |
15741 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15742 | else | |
15743 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
15744 | fi | |
15745 | fi | |
15746 | fi | |
15747 | fi | |
15748 | else | |
15749 | if test "X$found_a" != "X"; then | |
15750 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
15751 | else | |
15752 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
15753 | fi | |
15754 | fi | |
15755 | additional_includedir= | |
15756 | case "$found_dir" in | |
15757 | */lib | */lib/) | |
15758 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
15759 | additional_includedir="$basedir/include" | |
15760 | ;; | |
15761 | esac | |
15762 | if test "X$additional_includedir" != "X"; then | |
15763 | if test "X$additional_includedir" != "X/usr/include"; then | |
15764 | haveit= | |
15765 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
15766 | if test -n "$GCC"; then | |
15767 | case $host_os in | |
15768 | linux*) haveit=yes;; | |
15769 | esac | |
15770 | fi | |
15771 | fi | |
15772 | if test -z "$haveit"; then | |
15773 | for x in $CPPFLAGS $INCLZMA; do | |
15774 | ||
15775 | acl_save_prefix="$prefix" | |
15776 | prefix="$acl_final_prefix" | |
15777 | acl_save_exec_prefix="$exec_prefix" | |
15778 | exec_prefix="$acl_final_exec_prefix" | |
15779 | eval x=\"$x\" | |
15780 | exec_prefix="$acl_save_exec_prefix" | |
15781 | prefix="$acl_save_prefix" | |
15782 | ||
15783 | if test "X$x" = "X-I$additional_includedir"; then | |
15784 | haveit=yes | |
15785 | break | |
15786 | fi | |
15787 | done | |
15788 | if test -z "$haveit"; then | |
15789 | if test -d "$additional_includedir"; then | |
15790 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
15791 | fi | |
15792 | fi | |
15793 | fi | |
15794 | fi | |
15795 | fi | |
15796 | if test -n "$found_la"; then | |
15797 | save_libdir="$libdir" | |
15798 | case "$found_la" in | |
15799 | */* | *\\*) . "$found_la" ;; | |
15800 | *) . "./$found_la" ;; | |
15801 | esac | |
15802 | libdir="$save_libdir" | |
15803 | for dep in $dependency_libs; do | |
15804 | case "$dep" in | |
15805 | -L*) | |
15806 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15807 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15808 | haveit= | |
15809 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15810 | if test -n "$GCC"; then | |
15811 | case $host_os in | |
15812 | linux*) haveit=yes;; | |
15813 | esac | |
15814 | fi | |
15815 | fi | |
15816 | if test -z "$haveit"; then | |
15817 | haveit= | |
15818 | for x in $LDFLAGS $LIBLZMA; do | |
15819 | ||
15820 | acl_save_prefix="$prefix" | |
15821 | prefix="$acl_final_prefix" | |
15822 | acl_save_exec_prefix="$exec_prefix" | |
15823 | exec_prefix="$acl_final_exec_prefix" | |
15824 | eval x=\"$x\" | |
15825 | exec_prefix="$acl_save_exec_prefix" | |
15826 | prefix="$acl_save_prefix" | |
15827 | ||
15828 | if test "X$x" = "X-L$additional_libdir"; then | |
15829 | haveit=yes | |
15830 | break | |
15831 | fi | |
15832 | done | |
15833 | if test -z "$haveit"; then | |
15834 | if test -d "$additional_libdir"; then | |
15835 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
15836 | fi | |
15837 | fi | |
15838 | haveit= | |
15839 | for x in $LDFLAGS $LTLIBLZMA; do | |
15840 | ||
15841 | acl_save_prefix="$prefix" | |
15842 | prefix="$acl_final_prefix" | |
15843 | acl_save_exec_prefix="$exec_prefix" | |
15844 | exec_prefix="$acl_final_exec_prefix" | |
15845 | eval x=\"$x\" | |
15846 | exec_prefix="$acl_save_exec_prefix" | |
15847 | prefix="$acl_save_prefix" | |
15848 | ||
15849 | if test "X$x" = "X-L$additional_libdir"; then | |
15850 | haveit=yes | |
15851 | break | |
15852 | fi | |
15853 | done | |
15854 | if test -z "$haveit"; then | |
15855 | if test -d "$additional_libdir"; then | |
15856 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
15857 | fi | |
15858 | fi | |
15859 | fi | |
15860 | fi | |
15861 | ;; | |
15862 | -R*) | |
15863 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
15864 | if test "$enable_rpath" != no; then | |
15865 | haveit= | |
15866 | for x in $rpathdirs; do | |
15867 | if test "X$x" = "X$dir"; then | |
15868 | haveit=yes | |
15869 | break | |
15870 | fi | |
15871 | done | |
15872 | if test -z "$haveit"; then | |
15873 | rpathdirs="$rpathdirs $dir" | |
15874 | fi | |
15875 | haveit= | |
15876 | for x in $ltrpathdirs; do | |
15877 | if test "X$x" = "X$dir"; then | |
15878 | haveit=yes | |
15879 | break | |
15880 | fi | |
15881 | done | |
15882 | if test -z "$haveit"; then | |
15883 | ltrpathdirs="$ltrpathdirs $dir" | |
15884 | fi | |
15885 | fi | |
15886 | ;; | |
15887 | -l*) | |
15888 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
15889 | ;; | |
15890 | *.la) | |
15891 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
15892 | ;; | |
15893 | *) | |
15894 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
15895 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
15896 | ;; | |
15897 | esac | |
15898 | done | |
15899 | fi | |
15900 | else | |
15901 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
15902 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
15903 | fi | |
15904 | fi | |
15905 | fi | |
15906 | done | |
15907 | done | |
15908 | if test "X$rpathdirs" != "X"; then | |
15909 | if test -n "$hardcode_libdir_separator"; then | |
15910 | alldirs= | |
15911 | for found_dir in $rpathdirs; do | |
15912 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
15913 | done | |
15914 | acl_save_libdir="$libdir" | |
15915 | libdir="$alldirs" | |
15916 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15917 | libdir="$acl_save_libdir" | |
15918 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
15919 | else | |
15920 | for found_dir in $rpathdirs; do | |
15921 | acl_save_libdir="$libdir" | |
15922 | libdir="$found_dir" | |
15923 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15924 | libdir="$acl_save_libdir" | |
15925 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
15926 | done | |
15927 | fi | |
15928 | fi | |
15929 | if test "X$ltrpathdirs" != "X"; then | |
15930 | for found_dir in $ltrpathdirs; do | |
15931 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
15932 | done | |
15933 | fi | |
15934 | ||
15935 | ||
15936 | ac_save_CPPFLAGS="$CPPFLAGS" | |
15937 | ||
15938 | for element in $INCLZMA; do | |
15939 | haveit= | |
15940 | for x in $CPPFLAGS; do | |
15941 | ||
15942 | acl_save_prefix="$prefix" | |
15943 | prefix="$acl_final_prefix" | |
15944 | acl_save_exec_prefix="$exec_prefix" | |
15945 | exec_prefix="$acl_final_exec_prefix" | |
15946 | eval x=\"$x\" | |
15947 | exec_prefix="$acl_save_exec_prefix" | |
15948 | prefix="$acl_save_prefix" | |
15949 | ||
15950 | if test "X$x" = "X$element"; then | |
15951 | haveit=yes | |
15952 | break | |
15953 | fi | |
15954 | done | |
15955 | if test -z "$haveit"; then | |
15956 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15957 | fi | |
15958 | done | |
15959 | ||
15960 | ||
15961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
15962 | $as_echo_n "checking for liblzma... " >&6; } | |
15963 | if test "${ac_cv_liblzma+set}" = set; then : | |
15964 | $as_echo_n "(cached) " >&6 | |
15965 | else | |
15966 | ||
15967 | ac_save_LIBS="$LIBS" | |
15968 | LIBS="$LIBS $LIBLZMA" | |
15969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15970 | /* end confdefs.h. */ | |
15971 | #include "lzma.h" | |
15972 | int | |
15973 | main () | |
15974 | { | |
15975 | lzma_index_iter iter; | |
15976 | lzma_index_iter_init (&iter, 0); | |
15977 | lzma_mf_is_supported (LZMA_MF_HC3); | |
15978 | ; | |
15979 | return 0; | |
15980 | } | |
15981 | _ACEOF | |
15982 | if ac_fn_c_try_link "$LINENO"; then : | |
15983 | ac_cv_liblzma=yes | |
15984 | else | |
15985 | ac_cv_liblzma=no | |
15986 | fi | |
15987 | rm -f core conftest.err conftest.$ac_objext \ | |
15988 | conftest$ac_exeext conftest.$ac_ext | |
15989 | LIBS="$ac_save_LIBS" | |
15990 | ||
15991 | fi | |
15992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
15993 | $as_echo "$ac_cv_liblzma" >&6; } | |
15994 | if test "$ac_cv_liblzma" = yes; then | |
15995 | HAVE_LIBLZMA=yes | |
15996 | ||
15997 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
15998 | ||
15999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
16000 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
16001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
16002 | $as_echo "$LIBLZMA" >&6; } | |
16003 | else | |
16004 | HAVE_LIBLZMA=no | |
16005 | CPPFLAGS="$ac_save_CPPFLAGS" | |
16006 | LIBLZMA= | |
16007 | LTLIBLZMA= | |
16008 | fi | |
16009 | ||
16010 | ||
16011 | ||
16012 | ||
16013 | ||
16014 | ||
16015 | if test "$HAVE_LIBLZMA" != yes; then | |
16016 | if test "$with_lzma" = yes; then | |
16017 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
16018 | fi | |
16019 | fi | |
16020 | fi | |
16021 | fi | |
16022 | ||
3fc11d3e JM |
16023 | LIBGUI="../libgui/src/libgui.a" |
16024 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
16025 | ||
16026 | ||
7a292a7a | 16027 | |
3fc11d3e JM |
16028 | WIN32LDAPP= |
16029 | ||
16030 | ||
16031 | ||
d91670b9 | 16032 | case "${host}" in |
686a5eed | 16033 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
16034 | configdir="win" |
16035 | ;; | |
16036 | *) | |
16037 | configdir="unix" | |
16038 | ;; | |
16039 | esac | |
3fc11d3e JM |
16040 | |
16041 | GDBTKLIBS= | |
16042 | if test "${enable_gdbtk}" = "yes"; then | |
16043 | ||
d1c3b63a KS |
16044 | # Gdbtk must have an absolute path to srcdir in order to run |
16045 | # properly when not installed. | |
16046 | here=`pwd` | |
16047 | cd ${srcdir} | |
16048 | GDBTK_SRC_DIR=`pwd` | |
16049 | cd $here | |
16050 | ||
bec39cab | 16051 | |
5062cc19 KS |
16052 | # |
16053 | # Ok, lets find the tcl configuration | |
16054 | # First, look for one uninstalled. | |
16055 | # the alternative search directory is invoked by --with-tcl | |
16056 | # | |
3fc11d3e | 16057 | |
5062cc19 KS |
16058 | if test x"${no_tcl}" = x ; then |
16059 | # we reset no_tcl in case something fails here | |
16060 | no_tcl=true | |
bec39cab | 16061 | |
81ecdfbb RW |
16062 | # Check whether --with-tcl was given. |
16063 | if test "${with_tcl+set}" = set; then : | |
16064 | withval=$with_tcl; with_tclconfig=${withval} | |
16065 | fi | |
16066 | ||
16067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
16068 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
16069 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
16070 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 16071 | else |
bec39cab | 16072 | |
3fc11d3e | 16073 | |
5062cc19 KS |
16074 | # First check to see if --with-tcl was specified. |
16075 | case "${host}" in | |
16076 | *-*-cygwin*) platDir="win" ;; | |
16077 | *) platDir="unix" ;; | |
16078 | esac | |
16079 | if test x"${with_tclconfig}" != x ; then | |
16080 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
16081 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
16082 | else | |
81ecdfbb | 16083 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16084 | fi |
16085 | fi | |
16086 | ||
16087 | # then check for a private Tcl installation | |
16088 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16089 | for i in \ | |
16090 | ../tcl \ | |
16091 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16092 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
16093 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16094 | ../../tcl \ | |
16095 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16096 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16097 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16098 | ../../../tcl \ | |
16099 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16100 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16101 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16102 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16103 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16104 | break | |
16105 | fi | |
16106 | done | |
16107 | fi | |
16108 | ||
16109 | # on Darwin, check in Framework installation locations | |
16110 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
16111 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16112 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16113 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16114 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16115 | ; do | |
16116 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
16117 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
16118 | break | |
16119 | fi | |
16120 | done | |
16121 | fi | |
16122 | ||
16123 | # check in a few common install locations | |
16124 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16125 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16126 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16127 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16128 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16129 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16130 | `ls -d /usr/lib 2>/dev/null` \ | |
16131 | ; do | |
16132 | if test -f "$i/tclConfig.sh" ; then | |
16133 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
16134 | break | |
16135 | fi | |
16136 | done | |
16137 | fi | |
3fc11d3e | 16138 | |
5062cc19 KS |
16139 | # check in a few other private locations |
16140 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16141 | for i in \ | |
16142 | ${srcdir}/../tcl \ | |
16143 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16144 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
16145 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16146 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16147 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16148 | break | |
16149 | fi | |
16150 | done | |
16151 | fi | |
bec39cab | 16152 | |
3fc11d3e JM |
16153 | fi |
16154 | ||
5062cc19 KS |
16155 | |
16156 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16157 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
16158 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
16159 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
16160 | else |
16161 | no_tcl= | |
16162 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
16163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16164 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
16165 | fi |
16166 | fi | |
3fc11d3e | 16167 | |
bec39cab | 16168 | |
85541719 DE |
16169 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
16170 | # point to doing Tcl. | |
bec39cab | 16171 | |
5062cc19 KS |
16172 | # |
16173 | # Ok, lets find the tk configuration | |
16174 | # First, look for one uninstalled. | |
16175 | # the alternative search directory is invoked by --with-tk | |
16176 | # | |
3fc11d3e | 16177 | |
5062cc19 KS |
16178 | if test x"${no_tk}" = x ; then |
16179 | # we reset no_tk in case something fails here | |
16180 | no_tk=true | |
bec39cab | 16181 | |
81ecdfbb RW |
16182 | # Check whether --with-tk was given. |
16183 | if test "${with_tk+set}" = set; then : | |
16184 | withval=$with_tk; with_tkconfig=${withval} | |
16185 | fi | |
16186 | ||
16187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
16188 | $as_echo_n "checking for Tk configuration... " >&6; } | |
16189 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
16190 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16191 | else |
3fc11d3e JM |
16192 | |
16193 | ||
5062cc19 KS |
16194 | # First check to see if --with-tkconfig was specified. |
16195 | if test x"${with_tkconfig}" != x ; then | |
16196 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
16197 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
16198 | else | |
81ecdfbb | 16199 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16200 | fi |
16201 | fi | |
3fc11d3e | 16202 | |
5062cc19 KS |
16203 | # then check for a private Tk library |
16204 | case "${host}" in | |
16205 | *-*-cygwin*) platDir="win" ;; | |
16206 | *) platDir="unix" ;; | |
16207 | esac | |
16208 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16209 | for i in \ | |
16210 | ../tk \ | |
16211 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16212 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
16213 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
16214 | ../../tk \ | |
16215 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16216 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
16217 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
16218 | ../../../tk \ | |
16219 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16220 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
16221 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16222 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16223 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16224 | break | |
16225 | fi | |
16226 | done | |
16227 | fi | |
16228 | ||
16229 | # on Darwin, check in Framework installation locations | |
16230 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
16231 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16232 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16233 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16234 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16235 | ; do | |
16236 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
16237 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
16238 | break | |
16239 | fi | |
16240 | done | |
16241 | fi | |
16242 | ||
16243 | # check in a few common install locations | |
16244 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16245 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16246 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16247 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16248 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16249 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16250 | `ls -d /usr/lib 2>/dev/null` \ | |
16251 | ; do | |
16252 | if test -f "$i/tkConfig.sh" ; then | |
16253 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
16254 | break | |
16255 | fi | |
16256 | done | |
16257 | fi | |
16258 | # check in a few other private locations | |
16259 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16260 | for i in \ | |
16261 | ${srcdir}/../tk \ | |
16262 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16263 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
16264 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16265 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16266 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16267 | break | |
16268 | fi | |
16269 | done | |
16270 | fi | |
3fc11d3e | 16271 | |
3fc11d3e JM |
16272 | fi |
16273 | ||
16274 | ||
5062cc19 KS |
16275 | if test x"${ac_cv_c_tkconfig}" = x ; then |
16276 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
16277 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
16278 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
16279 | else |
16280 | no_tk= | |
16281 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
16282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16283 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 16284 | fi |
3fc11d3e | 16285 | fi |
dd2504ab | 16286 | |
dd2504ab | 16287 | |
85541719 DE |
16288 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
16289 | ||
81ecdfbb RW |
16290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16291 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
16292 | |
16293 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
16294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16295 | $as_echo "loading" >&6; } | |
85541719 DE |
16296 | . ${TCL_BIN_DIR}/tclConfig.sh |
16297 | else | |
81ecdfbb RW |
16298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16299 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
16300 | fi |
16301 | ||
16302 | # eval is required to do the TCL_DBGX substitution | |
16303 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
16304 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
16305 | ||
16306 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
16307 | # then set the common variable name to the value of the build variables. | |
16308 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
16309 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
16310 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
16311 | # installed and uninstalled version of Tcl. | |
16312 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
16313 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
16314 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
16315 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
16316 | elif test "`uname -s`" = "Darwin"; then | |
16317 | # If Tcl was built as a framework, attempt to use the libraries | |
16318 | # from the framework at the given location so that linking works | |
a68ffae9 | 16319 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
16320 | case ${TCL_DEFS} in |
16321 | *TCL_FRAMEWORK*) | |
16322 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
16323 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
16324 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
16325 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
16326 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
16327 | break | |
16328 | fi | |
16329 | done | |
16330 | fi | |
16331 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
16332 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
16333 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
16334 | fi | |
16335 | ;; | |
16336 | esac | |
16337 | fi | |
16338 | ||
16339 | # eval is required to do the TCL_DBGX substitution | |
16340 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
16341 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
16342 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
16343 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
16344 | ||
16345 | ||
16346 | ||
16347 | ||
16348 | ||
16349 | ||
16350 | ||
16351 | ||
16352 | ||
16353 | ||
16354 | ||
16355 | ||
16356 | ||
16357 | ||
16358 | ||
16359 | # Check for in-tree tcl | |
16360 | here=`pwd` | |
16361 | cd ${srcdir}/.. | |
16362 | topdir=`pwd` | |
16363 | cd ${here} | |
16364 | ||
16365 | intree="no" | |
16366 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
16367 | intree="yes" | |
16368 | fi | |
16369 | ||
16370 | # Find Tcl private headers | |
16371 | if test x"${intree}" = xno; then | |
16372 | ||
81ecdfbb RW |
16373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
16374 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
16375 | private_dir="" |
16376 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
16377 | if test -f ${dir}/tclInt.h ; then | |
16378 | private_dir=${dir} | |
16379 | fi | |
16380 | ||
16381 | if test x"${private_dir}" = x; then | |
81ecdfbb | 16382 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
16383 | else |
16384 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
16385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16386 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
16387 | fi |
16388 | ||
16389 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
16390 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
16391 | TCL_DEPS="" | |
16392 | else | |
16393 | # If building tcl in the same src tree, private headers | |
16394 | # are not needed, but we need to be sure to use the right | |
16395 | # headers library | |
16396 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
16397 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
16398 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
16399 | fi | |
16400 | ||
16401 | ||
16402 | ||
16403 | ||
16404 | ||
81ecdfbb RW |
16405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16406 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 16407 | |
5062cc19 | 16408 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
16409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16410 | $as_echo "loading" >&6; } | |
5062cc19 | 16411 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 16412 | else |
81ecdfbb RW |
16413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16414 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 16415 | fi |
bec39cab | 16416 | |
5062cc19 KS |
16417 | # eval is required to do the TK_DBGX substitution |
16418 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
16419 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
16420 | ||
16421 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
16422 | # then set the common variable name to the value of the build variables. | |
16423 | # For example, the variable TK_LIB_SPEC will be set to the value | |
16424 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
16425 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
16426 | # installed and uninstalled version of Tcl. | |
85541719 | 16427 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
16428 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
16429 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
16430 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
16431 | elif test "`uname -s`" = "Darwin"; then | |
16432 | # If Tk was built as a framework, attempt to use the libraries | |
16433 | # from the framework at the given location so that linking works | |
a68ffae9 | 16434 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
16435 | case ${TK_DEFS} in |
16436 | *TK_FRAMEWORK*) | |
85541719 | 16437 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
16438 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
16439 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
16440 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
16441 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
16442 | break | |
16443 | fi | |
16444 | done | |
16445 | fi | |
85541719 | 16446 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
16447 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
16448 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
16449 | fi | |
16450 | ;; | |
16451 | esac | |
3fc11d3e JM |
16452 | fi |
16453 | ||
5062cc19 KS |
16454 | # eval is required to do the TK_DBGX substitution |
16455 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
16456 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
16457 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
16458 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 16459 | |
3fc11d3e JM |
16460 | |
16461 | ||
bec39cab AC |
16462 | |
16463 | ||
16464 | ||
16465 | ||
16466 | ||
16467 | ||
16468 | ||
3fc11d3e | 16469 | |
3fc11d3e | 16470 | |
bec39cab | 16471 | |
bec39cab | 16472 | |
85541719 DE |
16473 | # Check for in-tree Tk |
16474 | intree="no" | |
16475 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
16476 | intree="yes" | |
16477 | fi | |
3fc11d3e | 16478 | |
85541719 DE |
16479 | # Find Tk private headers |
16480 | if test x"${intree}" = xno; then | |
3fc11d3e | 16481 | |
81ecdfbb RW |
16482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
16483 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
16484 | private_dir="" |
16485 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
16486 | if test -f ${dir}/tkInt.h; then | |
16487 | private_dir=${dir} | |
3fc11d3e | 16488 | fi |
bec39cab | 16489 | |
5062cc19 | 16490 | if test x"${private_dir}" = x; then |
81ecdfbb | 16491 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 16492 | else |
5062cc19 | 16493 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
16494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16495 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 16496 | fi |
3fc11d3e | 16497 | |
85541719 DE |
16498 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
16499 | TK_LIBRARY=${TK_LIB_SPEC} | |
16500 | TK_DEPS="" | |
16501 | else | |
16502 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
16503 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
16504 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
16505 | fi | |
3fc11d3e JM |
16506 | |
16507 | ||
3fc11d3e JM |
16508 | |
16509 | ||
3fc11d3e | 16510 | |
85541719 | 16511 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 16512 | |
85541719 DE |
16513 | # Include some libraries that Tcl and Tk want. |
16514 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
16515 | # Yes, the ordering seems wrong here. But it isn't. | |
16516 | # TK_LIBS is the list of libraries that need to be linked | |
16517 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
16518 | # were in LIBS then any link tests after this point would | |
16519 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
16520 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 16521 | |
85541719 DE |
16522 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
16523 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
16524 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
16525 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
16526 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
16527 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
16528 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 16529 | |
85541719 DE |
16530 | if test x$gdb_cv_os_cygwin = xyes; then |
16531 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
16532 | WIN32LDAPP="-Wl,--subsystem,console" | |
16533 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 16534 | fi |
ffc6a242 | 16535 | |
81ecdfbb | 16536 | subdirs="$subdirs gdbtk" |
3ace7edb | 16537 | |
85541719 | 16538 | fi |
3fc11d3e JM |
16539 | fi |
16540 | ||
16541 | ||
16542 | ||
16543 | ||
16544 | ||
16545 | ||
16546 | ||
16547 | ||
81ecdfbb RW |
16548 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
16549 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 16550 | |
c906108c | 16551 | |
81ecdfbb RW |
16552 | # Check whether --with-x was given. |
16553 | if test "${with_x+set}" = set; then : | |
16554 | withval=$with_x; | |
16555 | fi | |
c906108c SS |
16556 | |
16557 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
16558 | if test "x$with_x" = xno; then | |
16559 | # The user explicitly disabled X. | |
16560 | have_x=disabled | |
16561 | else | |
81ecdfbb RW |
16562 | case $x_includes,$x_libraries in #( |
16563 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
16564 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
16565 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
16566 | else |
16567 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 16568 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 16569 | rm -f -r conftest.dir |
bec39cab AC |
16570 | if mkdir conftest.dir; then |
16571 | cd conftest.dir | |
bec39cab | 16572 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
16573 | incroot: |
16574 | @echo incroot='${INCROOT}' | |
16575 | usrlibdir: | |
16576 | @echo usrlibdir='${USRLIBDIR}' | |
16577 | libdir: | |
16578 | @echo libdir='${LIBDIR}' | |
16579 | _ACEOF | |
16580 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 16581 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
16582 | for ac_var in incroot usrlibdir libdir; do |
16583 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
16584 | done | |
c906108c | 16585 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
16586 | for ac_extension in a so sl dylib la dll; do |
16587 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
16588 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 16589 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
16590 | fi |
16591 | done | |
16592 | # Screen out bogus values from the imake configuration. They are | |
16593 | # bogus both because they are the default anyway, and because | |
16594 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 16595 | case $ac_im_incroot in |
81ecdfbb | 16596 | /usr/include) ac_x_includes= ;; |
bec39cab | 16597 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 16598 | esac |
bec39cab | 16599 | case $ac_im_usrlibdir in |
81ecdfbb | 16600 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 16601 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
16602 | esac |
16603 | fi | |
16604 | cd .. | |
81ecdfbb | 16605 | rm -f -r conftest.dir |
c906108c SS |
16606 | fi |
16607 | ||
bec39cab AC |
16608 | # Standard set of common directories for X headers. |
16609 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
16610 | ac_x_header_dirs=' | |
16611 | /usr/X11/include | |
81ecdfbb | 16612 | /usr/X11R7/include |
bec39cab AC |
16613 | /usr/X11R6/include |
16614 | /usr/X11R5/include | |
16615 | /usr/X11R4/include | |
16616 | ||
16617 | /usr/include/X11 | |
81ecdfbb | 16618 | /usr/include/X11R7 |
bec39cab AC |
16619 | /usr/include/X11R6 |
16620 | /usr/include/X11R5 | |
16621 | /usr/include/X11R4 | |
16622 | ||
16623 | /usr/local/X11/include | |
81ecdfbb | 16624 | /usr/local/X11R7/include |
bec39cab AC |
16625 | /usr/local/X11R6/include |
16626 | /usr/local/X11R5/include | |
16627 | /usr/local/X11R4/include | |
16628 | ||
16629 | /usr/local/include/X11 | |
81ecdfbb | 16630 | /usr/local/include/X11R7 |
bec39cab AC |
16631 | /usr/local/include/X11R6 |
16632 | /usr/local/include/X11R5 | |
16633 | /usr/local/include/X11R4 | |
16634 | ||
16635 | /usr/X386/include | |
16636 | /usr/x386/include | |
16637 | /usr/XFree86/include/X11 | |
16638 | ||
16639 | /usr/include | |
16640 | /usr/local/include | |
16641 | /usr/unsupported/include | |
16642 | /usr/athena/include | |
16643 | /usr/local/x11r5/include | |
16644 | /usr/lpp/Xamples/include | |
16645 | ||
16646 | /usr/openwin/include | |
16647 | /usr/openwin/share/include' | |
16648 | ||
16649 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 16650 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 16651 | # First, try using that file with no special directory specified. |
81ecdfbb | 16652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16653 | /* end confdefs.h. */ |
81ecdfbb | 16654 | #include <X11/Xlib.h> |
bec39cab | 16655 | _ACEOF |
81ecdfbb | 16656 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
16657 | # We can compile using X headers with no special include directory. |
16658 | ac_x_includes= | |
16659 | else | |
bec39cab | 16660 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 16661 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
16662 | ac_x_includes=$ac_dir |
16663 | break | |
16664 | fi | |
16665 | done | |
c906108c | 16666 | fi |
bec39cab AC |
16667 | rm -f conftest.err conftest.$ac_ext |
16668 | fi # $ac_x_includes = no | |
c906108c | 16669 | |
bec39cab | 16670 | if test "$ac_x_libraries" = no; then |
c906108c | 16671 | # Check for the libraries. |
c906108c SS |
16672 | # See if we find them without any special options. |
16673 | # Don't add to $LIBS permanently. | |
bec39cab | 16674 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
16675 | LIBS="-lX11 $LIBS" |
16676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16677 | /* end confdefs.h. */ |
81ecdfbb | 16678 | #include <X11/Xlib.h> |
bec39cab AC |
16679 | int |
16680 | main () | |
16681 | { | |
81ecdfbb | 16682 | XrmInitialize () |
bec39cab AC |
16683 | ; |
16684 | return 0; | |
16685 | } | |
16686 | _ACEOF | |
81ecdfbb | 16687 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16688 | LIBS=$ac_save_LIBS |
c906108c SS |
16689 | # We can link X programs with no special library path. |
16690 | ac_x_libraries= | |
16691 | else | |
81ecdfbb RW |
16692 | LIBS=$ac_save_LIBS |
16693 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 16694 | do |
bec39cab | 16695 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
16696 | for ac_extension in a so sl dylib la dll; do |
16697 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
16698 | ac_x_libraries=$ac_dir |
16699 | break 2 | |
16700 | fi | |
16701 | done | |
16702 | done | |
16703 | fi | |
81ecdfbb RW |
16704 | rm -f core conftest.err conftest.$ac_objext \ |
16705 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 16706 | fi # $ac_x_libraries = no |
c906108c | 16707 | |
81ecdfbb RW |
16708 | case $ac_x_includes,$ac_x_libraries in #( |
16709 | no,* | *,no | *\'*) | |
16710 | # Didn't find X, or a directory has "'" in its name. | |
16711 | ac_cv_have_x="have_x=no";; #( | |
16712 | *) | |
16713 | # Record where we found X for the cache. | |
16714 | ac_cv_have_x="have_x=yes\ | |
16715 | ac_x_includes='$ac_x_includes'\ | |
16716 | ac_x_libraries='$ac_x_libraries'" | |
16717 | esac | |
c906108c | 16718 | fi |
81ecdfbb RW |
16719 | ;; #( |
16720 | *) have_x=yes;; | |
16721 | esac | |
c906108c SS |
16722 | eval "$ac_cv_have_x" |
16723 | fi # $with_x != no | |
16724 | ||
16725 | if test "$have_x" != yes; then | |
81ecdfbb RW |
16726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
16727 | $as_echo "$have_x" >&6; } | |
c906108c SS |
16728 | no_x=yes |
16729 | else | |
16730 | # If each of the values was on the command line, it overrides each guess. | |
16731 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
16732 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
16733 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
16734 | ac_cv_have_x="have_x=yes\ |
16735 | ac_x_includes='$x_includes'\ | |
16736 | ac_x_libraries='$x_libraries'" | |
16737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
16738 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
16739 | fi |
16740 | ||
16741 | ||
bec39cab | 16742 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 16743 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
16744 | # This code just checks for a few cases where we'd like to ignore those |
16745 | # definitions, even when they're present in the '.mt' file. These cases | |
16746 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 16747 | # not part of the source tree. |
7a292a7a | 16748 | # |
81ecdfbb RW |
16749 | # Check whether --enable-sim was given. |
16750 | if test "${enable_sim+set}" = set; then : | |
16751 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
16752 | echo "enableval = ${enableval}"; |
16753 | case "${enableval}" in | |
16754 | yes) ignore_sim=false ;; | |
16755 | no) ignore_sim=true ;; | |
16756 | *) ignore_sim=false ;; | |
16757 | esac | |
16758 | else | |
16759 | ignore_sim=false | |
81ecdfbb RW |
16760 | fi |
16761 | ||
7a292a7a SS |
16762 | |
16763 | if test ! -d "${srcdir}/../sim"; then | |
16764 | ignore_sim=true | |
16765 | fi | |
16766 | ||
9b624dbe UW |
16767 | SIM= |
16768 | SIM_OBS= | |
16769 | if test "${ignore_sim}" = "false"; then | |
16770 | if test x"${gdb_sim}" != x ; then | |
16771 | SIM="${gdb_sim}" | |
16772 | SIM_OBS="remote-sim.o" | |
60ca704f | 16773 | |
81ecdfbb | 16774 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 16775 | |
976102cd PA |
16776 | |
16777 | # Some tdep code should only be compiled in when the ppc sim is | |
16778 | # built. PR sim/13418. | |
16779 | case $target in | |
16780 | powerpc*-*-*) | |
16781 | ||
16782 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
16783 | ||
16784 | ;; | |
16785 | esac | |
9b624dbe | 16786 | fi |
7a292a7a SS |
16787 | fi |
16788 | ||
16789 | ||
16790 | ||
c906108c SS |
16791 | |
16792 | ||
16793 | ||
16794 | ||
16795 | ||
16796 | ||
dfcd3bfb | 16797 | |
e56ac5c3 AC |
16798 | |
16799 | ||
b3a90332 AC |
16800 | |
16801 | ||
c35f4ffc | 16802 | # List of host floatformats. |
bec39cab AC |
16803 | |
16804 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 16805 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 16806 | _ACEOF |
c35f4ffc | 16807 | |
bec39cab AC |
16808 | |
16809 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 16810 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
16811 | _ACEOF |
16812 | ||
c35f4ffc | 16813 | |
bec39cab | 16814 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 16815 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 16816 | _ACEOF |
c35f4ffc AC |
16817 | |
16818 | ||
c906108c SS |
16819 | # target_subdir is used by the testsuite to find the target libraries. |
16820 | target_subdir= | |
16821 | if test "${host}" != "${target}"; then | |
16822 | target_subdir="${target_alias}/" | |
16823 | fi | |
16824 | ||
16825 | ||
16826 | frags= | |
771b4502 | 16827 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
16828 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
16829 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 16830 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
16831 | fi |
16832 | frags="$frags $host_makefile_frag" | |
16833 | else | |
16834 | host_makefile_frag=/dev/null | |
c906108c | 16835 | fi |
c906108c | 16836 | |
c906108c SS |
16837 | |
16838 | ||
16839 | ||
771b4502 | 16840 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
16841 | # We pick this up from the host configuration file (.mh) because we |
16842 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
16843 | nativefile=`sed -n ' |
16844 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
16845 | ' ${host_makefile_frag}` | |
c906108c SS |
16846 | fi |
16847 | ||
16848 | ||
b00a8037 | 16849 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
16850 | |
16851 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 16852 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 16853 | _ACEOF |
b00a8037 DJ |
16854 | |
16855 | fi | |
16856 | ||
8dcde887 | 16857 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
16858 | # Check whether --enable-multi-ice was given. |
16859 | if test "${enable_multi_ice+set}" = set; then : | |
16860 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
16861 | yes | no) |
16862 | ;; | |
81ecdfbb | 16863 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 16864 | esac |
81ecdfbb | 16865 | fi |
b4e70030 | 16866 | |
81ecdfbb RW |
16867 | if test "x$enable_multi_ice" = xyes; then |
16868 | subdirs="$subdirs multi-ice" | |
3ace7edb | 16869 | |
a85f51e7 DJ |
16870 | fi |
16871 | ||
496c0e1b JB |
16872 | # Check whether --enable-gdbserver was given. |
16873 | if test "${enable_gdbserver+set}" = set; then : | |
16874 | enableval=$enable_gdbserver; case "${enableval}" in | |
16875 | yes| no|auto) ;; | |
16876 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
16877 | esac | |
16878 | else | |
16879 | enable_gdbserver=auto | |
16880 | fi | |
16881 | ||
16882 | ||
16883 | # We only build gdbserver automatically in a native configuration, and | |
16884 | # only if the user did not explicitly disable its build. | |
16885 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
16886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
16887 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 16888 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
16889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
16890 | $as_echo "yes" >&6; } | |
16891 | subdirs="$subdirs gdbserver" | |
3ace7edb | 16892 | |
496c0e1b | 16893 | gdbserver_build_enabled=yes |
8dcde887 | 16894 | else |
81ecdfbb RW |
16895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
16896 | $as_echo "no" >&6; } | |
8dcde887 MK |
16897 | fi |
16898 | fi | |
16899 | ||
496c0e1b JB |
16900 | # If the user explicitly request the gdbserver to be built, verify that |
16901 | # we were in fact able to enable it. | |
16902 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
16903 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
16904 | fi | |
16905 | ||
393fd4c3 YQ |
16906 | # Check for babeltrace and babeltrace-ctf |
16907 | ||
16908 | # Check whether --with-babeltrace was given. | |
16909 | if test "${with_babeltrace+set}" = set; then : | |
16910 | withval=$with_babeltrace; | |
16911 | else | |
16912 | with_babeltrace=auto | |
16913 | fi | |
16914 | ||
16915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
16916 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
16917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
16918 | $as_echo "$with_babeltrace" >&6; } | |
16919 | ||
16920 | if test "x$with_babeltrace" = "xno"; then | |
16921 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
16922 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
16923 | else | |
16924 | # Append -Werror to CFLAGS so that configure can catch the warning | |
16925 | # "assignment from incompatible pointer type", which is related to | |
16926 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
16927 | # in GDB, while babeltrace 1.0.3 is broken. | |
16928 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
16929 | # safe to save and restore CFLAGS here. | |
16930 | saved_CFLAGS=$CFLAGS | |
16931 | CFLAGS="$CFLAGS -Werror" | |
16932 | ||
16933 | ||
16934 | ||
16935 | ||
16936 | ||
16937 | ||
16938 | ||
16939 | ||
16940 | use_additional=yes | |
16941 | ||
16942 | acl_save_prefix="$prefix" | |
16943 | prefix="$acl_final_prefix" | |
16944 | acl_save_exec_prefix="$exec_prefix" | |
16945 | exec_prefix="$acl_final_exec_prefix" | |
16946 | ||
16947 | eval additional_includedir=\"$includedir\" | |
16948 | eval additional_libdir=\"$libdir\" | |
16949 | ||
16950 | exec_prefix="$acl_save_exec_prefix" | |
16951 | prefix="$acl_save_prefix" | |
16952 | ||
16953 | ||
16954 | # Check whether --with-libbabeltrace-prefix was given. | |
16955 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
16956 | withval=$with_libbabeltrace_prefix; | |
16957 | if test "X$withval" = "Xno"; then | |
16958 | use_additional=no | |
16959 | else | |
16960 | if test "X$withval" = "X"; then | |
16961 | ||
16962 | acl_save_prefix="$prefix" | |
16963 | prefix="$acl_final_prefix" | |
16964 | acl_save_exec_prefix="$exec_prefix" | |
16965 | exec_prefix="$acl_final_exec_prefix" | |
16966 | ||
16967 | eval additional_includedir=\"$includedir\" | |
16968 | eval additional_libdir=\"$libdir\" | |
16969 | ||
16970 | exec_prefix="$acl_save_exec_prefix" | |
16971 | prefix="$acl_save_prefix" | |
16972 | ||
16973 | else | |
16974 | additional_includedir="$withval/include" | |
16975 | additional_libdir="$withval/lib" | |
16976 | fi | |
16977 | fi | |
16978 | ||
16979 | fi | |
16980 | ||
16981 | LIBBABELTRACE= | |
16982 | LTLIBBABELTRACE= | |
16983 | INCBABELTRACE= | |
16984 | rpathdirs= | |
16985 | ltrpathdirs= | |
16986 | names_already_handled= | |
16987 | names_next_round='babeltrace babeltrace-ctf' | |
16988 | while test -n "$names_next_round"; do | |
16989 | names_this_round="$names_next_round" | |
16990 | names_next_round= | |
16991 | for name in $names_this_round; do | |
16992 | already_handled= | |
16993 | for n in $names_already_handled; do | |
16994 | if test "$n" = "$name"; then | |
16995 | already_handled=yes | |
16996 | break | |
16997 | fi | |
16998 | done | |
16999 | if test -z "$already_handled"; then | |
17000 | names_already_handled="$names_already_handled $name" | |
17001 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17002 | eval value=\"\$HAVE_LIB$uppername\" | |
17003 | if test -n "$value"; then | |
17004 | if test "$value" = yes; then | |
17005 | eval value=\"\$LIB$uppername\" | |
17006 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
17007 | eval value=\"\$LTLIB$uppername\" | |
17008 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
17009 | else | |
17010 | : | |
17011 | fi | |
17012 | else | |
17013 | found_dir= | |
17014 | found_la= | |
17015 | found_so= | |
17016 | found_a= | |
17017 | if test $use_additional = yes; then | |
17018 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
17019 | found_dir="$additional_libdir" | |
17020 | found_so="$additional_libdir/lib$name.$shlibext" | |
17021 | if test -f "$additional_libdir/lib$name.la"; then | |
17022 | found_la="$additional_libdir/lib$name.la" | |
17023 | fi | |
17024 | else | |
17025 | if test -f "$additional_libdir/lib$name.$libext"; then | |
17026 | found_dir="$additional_libdir" | |
17027 | found_a="$additional_libdir/lib$name.$libext" | |
17028 | if test -f "$additional_libdir/lib$name.la"; then | |
17029 | found_la="$additional_libdir/lib$name.la" | |
17030 | fi | |
17031 | fi | |
17032 | fi | |
17033 | fi | |
17034 | if test "X$found_dir" = "X"; then | |
17035 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17036 | ||
17037 | acl_save_prefix="$prefix" | |
17038 | prefix="$acl_final_prefix" | |
17039 | acl_save_exec_prefix="$exec_prefix" | |
17040 | exec_prefix="$acl_final_exec_prefix" | |
17041 | eval x=\"$x\" | |
17042 | exec_prefix="$acl_save_exec_prefix" | |
17043 | prefix="$acl_save_prefix" | |
17044 | ||
17045 | case "$x" in | |
17046 | -L*) | |
17047 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
17048 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
17049 | found_dir="$dir" | |
17050 | found_so="$dir/lib$name.$shlibext" | |
17051 | if test -f "$dir/lib$name.la"; then | |
17052 | found_la="$dir/lib$name.la" | |
17053 | fi | |
17054 | else | |
17055 | if test -f "$dir/lib$name.$libext"; then | |
17056 | found_dir="$dir" | |
17057 | found_a="$dir/lib$name.$libext" | |
17058 | if test -f "$dir/lib$name.la"; then | |
17059 | found_la="$dir/lib$name.la" | |
17060 | fi | |
17061 | fi | |
17062 | fi | |
17063 | ;; | |
17064 | esac | |
17065 | if test "X$found_dir" != "X"; then | |
17066 | break | |
17067 | fi | |
17068 | done | |
17069 | fi | |
17070 | if test "X$found_dir" != "X"; then | |
17071 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
17072 | if test "X$found_so" != "X"; then | |
17073 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17074 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17075 | else | |
17076 | haveit= | |
17077 | for x in $ltrpathdirs; do | |
17078 | if test "X$x" = "X$found_dir"; then | |
17079 | haveit=yes | |
17080 | break | |
17081 | fi | |
17082 | done | |
17083 | if test -z "$haveit"; then | |
17084 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17085 | fi | |
17086 | if test "$hardcode_direct" = yes; then | |
17087 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17088 | else | |
17089 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17090 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17091 | haveit= | |
17092 | for x in $rpathdirs; do | |
17093 | if test "X$x" = "X$found_dir"; then | |
17094 | haveit=yes | |
17095 | break | |
17096 | fi | |
17097 | done | |
17098 | if test -z "$haveit"; then | |
17099 | rpathdirs="$rpathdirs $found_dir" | |
17100 | fi | |
17101 | else | |
17102 | haveit= | |
17103 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17104 | ||
17105 | acl_save_prefix="$prefix" | |
17106 | prefix="$acl_final_prefix" | |
17107 | acl_save_exec_prefix="$exec_prefix" | |
17108 | exec_prefix="$acl_final_exec_prefix" | |
17109 | eval x=\"$x\" | |
17110 | exec_prefix="$acl_save_exec_prefix" | |
17111 | prefix="$acl_save_prefix" | |
17112 | ||
17113 | if test "X$x" = "X-L$found_dir"; then | |
17114 | haveit=yes | |
17115 | break | |
17116 | fi | |
17117 | done | |
17118 | if test -z "$haveit"; then | |
17119 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
17120 | fi | |
17121 | if test "$hardcode_minus_L" != no; then | |
17122 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17123 | else | |
17124 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17125 | fi | |
17126 | fi | |
17127 | fi | |
17128 | fi | |
17129 | else | |
17130 | if test "X$found_a" != "X"; then | |
17131 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
17132 | else | |
17133 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
17134 | fi | |
17135 | fi | |
17136 | additional_includedir= | |
17137 | case "$found_dir" in | |
17138 | */lib | */lib/) | |
17139 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17140 | additional_includedir="$basedir/include" | |
17141 | ;; | |
17142 | esac | |
17143 | if test "X$additional_includedir" != "X"; then | |
17144 | if test "X$additional_includedir" != "X/usr/include"; then | |
17145 | haveit= | |
17146 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17147 | if test -n "$GCC"; then | |
17148 | case $host_os in | |
17149 | linux*) haveit=yes;; | |
17150 | esac | |
17151 | fi | |
17152 | fi | |
17153 | if test -z "$haveit"; then | |
17154 | for x in $CPPFLAGS $INCBABELTRACE; do | |
17155 | ||
17156 | acl_save_prefix="$prefix" | |
17157 | prefix="$acl_final_prefix" | |
17158 | acl_save_exec_prefix="$exec_prefix" | |
17159 | exec_prefix="$acl_final_exec_prefix" | |
17160 | eval x=\"$x\" | |
17161 | exec_prefix="$acl_save_exec_prefix" | |
17162 | prefix="$acl_save_prefix" | |
17163 | ||
17164 | if test "X$x" = "X-I$additional_includedir"; then | |
17165 | haveit=yes | |
17166 | break | |
17167 | fi | |
17168 | done | |
17169 | if test -z "$haveit"; then | |
17170 | if test -d "$additional_includedir"; then | |
17171 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
17172 | fi | |
17173 | fi | |
17174 | fi | |
17175 | fi | |
17176 | fi | |
17177 | if test -n "$found_la"; then | |
17178 | save_libdir="$libdir" | |
17179 | case "$found_la" in | |
17180 | */* | *\\*) . "$found_la" ;; | |
17181 | *) . "./$found_la" ;; | |
17182 | esac | |
17183 | libdir="$save_libdir" | |
17184 | for dep in $dependency_libs; do | |
17185 | case "$dep" in | |
17186 | -L*) | |
17187 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17188 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17189 | haveit= | |
17190 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17191 | if test -n "$GCC"; then | |
17192 | case $host_os in | |
17193 | linux*) haveit=yes;; | |
17194 | esac | |
17195 | fi | |
17196 | fi | |
17197 | if test -z "$haveit"; then | |
17198 | haveit= | |
17199 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17200 | ||
17201 | acl_save_prefix="$prefix" | |
17202 | prefix="$acl_final_prefix" | |
17203 | acl_save_exec_prefix="$exec_prefix" | |
17204 | exec_prefix="$acl_final_exec_prefix" | |
17205 | eval x=\"$x\" | |
17206 | exec_prefix="$acl_save_exec_prefix" | |
17207 | prefix="$acl_save_prefix" | |
17208 | ||
17209 | if test "X$x" = "X-L$additional_libdir"; then | |
17210 | haveit=yes | |
17211 | break | |
17212 | fi | |
17213 | done | |
17214 | if test -z "$haveit"; then | |
17215 | if test -d "$additional_libdir"; then | |
17216 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
17217 | fi | |
17218 | fi | |
17219 | haveit= | |
17220 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17221 | ||
17222 | acl_save_prefix="$prefix" | |
17223 | prefix="$acl_final_prefix" | |
17224 | acl_save_exec_prefix="$exec_prefix" | |
17225 | exec_prefix="$acl_final_exec_prefix" | |
17226 | eval x=\"$x\" | |
17227 | exec_prefix="$acl_save_exec_prefix" | |
17228 | prefix="$acl_save_prefix" | |
17229 | ||
17230 | if test "X$x" = "X-L$additional_libdir"; then | |
17231 | haveit=yes | |
17232 | break | |
17233 | fi | |
17234 | done | |
17235 | if test -z "$haveit"; then | |
17236 | if test -d "$additional_libdir"; then | |
17237 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
17238 | fi | |
17239 | fi | |
17240 | fi | |
17241 | fi | |
17242 | ;; | |
17243 | -R*) | |
17244 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17245 | if test "$enable_rpath" != no; then | |
17246 | haveit= | |
17247 | for x in $rpathdirs; do | |
17248 | if test "X$x" = "X$dir"; then | |
17249 | haveit=yes | |
17250 | break | |
17251 | fi | |
17252 | done | |
17253 | if test -z "$haveit"; then | |
17254 | rpathdirs="$rpathdirs $dir" | |
17255 | fi | |
17256 | haveit= | |
17257 | for x in $ltrpathdirs; do | |
17258 | if test "X$x" = "X$dir"; then | |
17259 | haveit=yes | |
17260 | break | |
17261 | fi | |
17262 | done | |
17263 | if test -z "$haveit"; then | |
17264 | ltrpathdirs="$ltrpathdirs $dir" | |
17265 | fi | |
17266 | fi | |
17267 | ;; | |
17268 | -l*) | |
17269 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17270 | ;; | |
17271 | *.la) | |
17272 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17273 | ;; | |
17274 | *) | |
17275 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
17276 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
17277 | ;; | |
17278 | esac | |
17279 | done | |
17280 | fi | |
17281 | else | |
17282 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17283 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
17284 | fi | |
17285 | fi | |
17286 | fi | |
17287 | done | |
17288 | done | |
17289 | if test "X$rpathdirs" != "X"; then | |
17290 | if test -n "$hardcode_libdir_separator"; then | |
17291 | alldirs= | |
17292 | for found_dir in $rpathdirs; do | |
17293 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17294 | done | |
17295 | acl_save_libdir="$libdir" | |
17296 | libdir="$alldirs" | |
17297 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17298 | libdir="$acl_save_libdir" | |
17299 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17300 | else | |
17301 | for found_dir in $rpathdirs; do | |
17302 | acl_save_libdir="$libdir" | |
17303 | libdir="$found_dir" | |
17304 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17305 | libdir="$acl_save_libdir" | |
17306 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17307 | done | |
17308 | fi | |
17309 | fi | |
17310 | if test "X$ltrpathdirs" != "X"; then | |
17311 | for found_dir in $ltrpathdirs; do | |
17312 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
17313 | done | |
17314 | fi | |
17315 | ||
17316 | ||
17317 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17318 | ||
17319 | for element in $INCBABELTRACE; do | |
17320 | haveit= | |
17321 | for x in $CPPFLAGS; do | |
17322 | ||
17323 | acl_save_prefix="$prefix" | |
17324 | prefix="$acl_final_prefix" | |
17325 | acl_save_exec_prefix="$exec_prefix" | |
17326 | exec_prefix="$acl_final_exec_prefix" | |
17327 | eval x=\"$x\" | |
17328 | exec_prefix="$acl_save_exec_prefix" | |
17329 | prefix="$acl_save_prefix" | |
17330 | ||
17331 | if test "X$x" = "X$element"; then | |
17332 | haveit=yes | |
17333 | break | |
17334 | fi | |
17335 | done | |
17336 | if test -z "$haveit"; then | |
17337 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17338 | fi | |
17339 | done | |
17340 | ||
17341 | ||
17342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
17343 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
17344 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
17345 | $as_echo_n "(cached) " >&6 | |
17346 | else | |
17347 | ||
17348 | ac_save_LIBS="$LIBS" | |
17349 | LIBS="$LIBS $LIBBABELTRACE" | |
17350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17351 | /* end confdefs.h. */ | |
17352 | #include <babeltrace/babeltrace.h> | |
17353 | #include <babeltrace/ctf/events.h> | |
17354 | #include <babeltrace/ctf/iterator.h> | |
17355 | int | |
17356 | main () | |
17357 | { | |
17358 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
17359 | struct bt_ctf_event *event = NULL; | |
17360 | const struct bt_definition *scope; | |
17361 | ||
13cdc2af | 17362 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 17363 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
17364 | scope = bt_ctf_get_top_level_scope (event, |
17365 | BT_STREAM_EVENT_HEADER); | |
17366 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
17367 | ||
17368 | ; | |
17369 | return 0; | |
17370 | } | |
17371 | _ACEOF | |
17372 | if ac_fn_c_try_link "$LINENO"; then : | |
17373 | ac_cv_libbabeltrace=yes | |
17374 | else | |
17375 | ac_cv_libbabeltrace=no | |
17376 | fi | |
17377 | rm -f core conftest.err conftest.$ac_objext \ | |
17378 | conftest$ac_exeext conftest.$ac_ext | |
17379 | LIBS="$ac_save_LIBS" | |
17380 | ||
17381 | fi | |
17382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
17383 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
17384 | if test "$ac_cv_libbabeltrace" = yes; then | |
17385 | HAVE_LIBBABELTRACE=yes | |
17386 | ||
17387 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
17388 | ||
17389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
17390 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
17391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
17392 | $as_echo "$LIBBABELTRACE" >&6; } | |
17393 | else | |
17394 | HAVE_LIBBABELTRACE=no | |
17395 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17396 | LIBBABELTRACE= | |
17397 | LTLIBBABELTRACE= | |
17398 | fi | |
17399 | ||
17400 | ||
17401 | ||
17402 | ||
17403 | ||
17404 | ||
17405 | CFLAGS=$saved_CFLAGS | |
17406 | ||
17407 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
17408 | if test "$with_babeltrace" = yes; then | |
17409 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
17410 | else | |
17411 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
17412 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
17413 | fi | |
17414 | fi | |
17415 | fi | |
17416 | ||
db985757 | 17417 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 17418 | # to an empty version. |
c906108c SS |
17419 | |
17420 | files= | |
17421 | links= | |
5a2402b8 | 17422 | |
c906108c SS |
17423 | rm -f nm.h |
17424 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
17425 | case "${nativefile}" in |
17426 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
17427 | * ) GDB_NM_FILE="${nativefile}" | |
17428 | esac | |
5a2402b8 AC |
17429 | files="${files} ${GDB_NM_FILE}" |
17430 | links="${links} nm.h" | |
60ca704f SE |
17431 | |
17432 | cat >>confdefs.h <<_ACEOF | |
b78960be | 17433 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 17434 | _ACEOF |
5a2402b8 | 17435 | |
c906108c | 17436 | fi |
5a2402b8 AC |
17437 | |
17438 | ||
e3487908 GKB |
17439 | for ac_prog in xsltproc |
17440 | do | |
17441 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
17442 | set dummy $ac_prog; ac_word=$2 | |
17443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
17444 | $as_echo_n "checking for $ac_word... " >&6; } | |
17445 | if test "${ac_cv_path_XSLTPROC+set}" = set; then : | |
17446 | $as_echo_n "(cached) " >&6 | |
17447 | else | |
17448 | case $XSLTPROC in | |
17449 | [\\/]* | ?:[\\/]*) | |
17450 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
17451 | ;; | |
17452 | *) | |
17453 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17454 | for as_dir in $PATH | |
17455 | do | |
17456 | IFS=$as_save_IFS | |
17457 | test -z "$as_dir" && as_dir=. | |
17458 | for ac_exec_ext in '' $ac_executable_extensions; do | |
17459 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
17460 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" | |
17461 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
17462 | break 2 | |
17463 | fi | |
17464 | done | |
17465 | done | |
17466 | IFS=$as_save_IFS | |
17467 | ||
17468 | ;; | |
17469 | esac | |
17470 | fi | |
17471 | XSLTPROC=$ac_cv_path_XSLTPROC | |
17472 | if test -n "$XSLTPROC"; then | |
17473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
17474 | $as_echo "$XSLTPROC" >&6; } | |
17475 | else | |
17476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
17477 | $as_echo "no" >&6; } | |
17478 | fi | |
17479 | ||
17480 | ||
17481 | test -n "$XSLTPROC" && break | |
17482 | done | |
17483 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
17484 | ||
17485 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
17486 | if test "${XSLTPROC}" = missing; then | |
17487 | as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 | |
17488 | fi | |
17489 | fi | |
17490 | ||
17491 | ||
bec39cab AC |
17492 | ac_sources="$files" |
17493 | ac_dests="$links" | |
17494 | while test -n "$ac_sources"; do | |
17495 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
17496 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
17497 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
17498 | done | |
81ecdfbb | 17499 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
17500 | |
17501 | ||
c906108c SS |
17502 | |
17503 | ||
c906108c | 17504 | |
81ecdfbb | 17505 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 17506 | |
bec39cab | 17507 | |
dcd1f979 TT |
17508 | if $development; then |
17509 | ||
17510 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
17511 | ||
17512 | fi | |
17513 | ||
b292c783 | 17514 | |
f6a88844 JM |
17515 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
17516 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
17517 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
17518 | GDB_TRANSFORM_NAME=gdb | |
17519 | fi | |
17520 | ||
17521 | ||
17522 | ||
17523 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
17524 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
17525 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
17526 | GCORE_TRANSFORM_NAME=gcore | |
17527 | fi | |
17528 | ||
b292c783 JK |
17529 | |
17530 | ac_config_files="$ac_config_files gcore" | |
17531 | ||
c971b7fa | 17532 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb | 17533 | |
89a34d1b | 17534 | |
bec39cab AC |
17535 | cat >confcache <<\_ACEOF |
17536 | # This file is a shell script that caches the results of configure | |
17537 | # tests run on this system so they can be shared between configure | |
17538 | # scripts and configure runs, see configure's option --config-cache. | |
17539 | # It is not useful on other systems. If it contains results you don't | |
17540 | # want to keep, you may remove or edit it. | |
17541 | # | |
17542 | # config.status only pays attention to the cache file if you give it | |
17543 | # the --recheck option to rerun configure. | |
17544 | # | |
17545 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
17546 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17547 | # following values. | |
17548 | ||
17549 | _ACEOF | |
17550 | ||
17551 | # The following way of writing the cache mishandles newlines in values, | |
17552 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 17553 | # So, we kill variables containing newlines. |
bec39cab AC |
17554 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17555 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
17556 | ( |
17557 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17558 | eval ac_val=\$$ac_var | |
17559 | case $ac_val in #( | |
17560 | *${as_nl}*) | |
17561 | case $ac_var in #( | |
17562 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
17563 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
17564 | esac | |
17565 | case $ac_var in #( | |
17566 | _ | IFS | as_nl) ;; #( | |
17567 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
17568 | *) { eval $ac_var=; unset $ac_var;} ;; | |
17569 | esac ;; | |
17570 | esac | |
17571 | done | |
17572 | ||
bec39cab | 17573 | (set) 2>&1 | |
81ecdfbb RW |
17574 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
17575 | *${as_nl}ac_space=\ *) | |
17576 | # `set' does not quote correctly, so add quotes: double-quote | |
17577 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
17578 | sed -n \ |
17579 | "s/'/'\\\\''/g; | |
17580 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 17581 | ;; #( |
bec39cab AC |
17582 | *) |
17583 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 17584 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 17585 | ;; |
81ecdfbb RW |
17586 | esac | |
17587 | sort | |
17588 | ) | | |
bec39cab | 17589 | sed ' |
81ecdfbb | 17590 | /^ac_cv_env_/b end |
bec39cab | 17591 | t clear |
81ecdfbb | 17592 | :clear |
bec39cab AC |
17593 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17594 | t end | |
81ecdfbb RW |
17595 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17596 | :end' >>confcache | |
17597 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17598 | if test -w "$cache_file"; then | |
17599 | test "x$cache_file" != "x/dev/null" && | |
17600 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
17601 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
17602 | cat confcache >$cache_file |
17603 | else | |
81ecdfbb RW |
17604 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
17605 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
17606 | fi |
17607 | fi | |
17608 | rm -f confcache | |
17609 | ||
17610 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17611 | # Let make expand exec_prefix. | |
17612 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17613 | ||
bec39cab AC |
17614 | DEFS=-DHAVE_CONFIG_H |
17615 | ||
17616 | ac_libobjs= | |
17617 | ac_ltlibobjs= | |
17618 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
17619 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
17620 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
17621 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
17622 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17623 | # will be set to the directory where LIBOBJS objects are built. | |
17624 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17625 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
17626 | done |
17627 | LIBOBJS=$ac_libobjs | |
17628 | ||
17629 | LTLIBOBJS=$ac_ltlibobjs | |
17630 | ||
17631 | ||
85981d60 | 17632 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
17633 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
17634 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 17635 | fi |
a417dc56 | 17636 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
17637 | as_fn_error "conditional \"GMAKE\" was never defined. |
17638 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 17639 | fi |
4df42755 DE |
17640 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
17641 | as_fn_error "conditional \"HAVE_PYTHON\" was never defined. | |
17642 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17643 | fi | |
17644 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
17645 | as_fn_error "conditional \"HAVE_GUILE\" was never defined. | |
17646 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17647 | fi | |
81ecdfbb RW |
17648 | |
17649 | ||
bec39cab | 17650 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 17651 | ac_write_fail=0 |
bec39cab AC |
17652 | ac_clean_files_save=$ac_clean_files |
17653 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
17654 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
17655 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17656 | as_write_fail=0 | |
17657 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
17658 | #! $SHELL |
17659 | # Generated by $as_me. | |
17660 | # Run this file to recreate the current configuration. | |
17661 | # Compiler output produced by configure, useful for debugging | |
17662 | # configure, is in config.log if it exists. | |
17663 | ||
17664 | debug=false | |
17665 | ac_cs_recheck=false | |
17666 | ac_cs_silent=false | |
bec39cab | 17667 | |
81ecdfbb RW |
17668 | SHELL=\${CONFIG_SHELL-$SHELL} |
17669 | export SHELL | |
17670 | _ASEOF | |
17671 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
17672 | ## -------------------- ## | |
17673 | ## M4sh Initialization. ## | |
17674 | ## -------------------- ## | |
17675 | ||
17676 | # Be more Bourne compatible | |
17677 | DUALCASE=1; export DUALCASE # for MKS sh | |
17678 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
17679 | emulate sh |
17680 | NULLCMD=: | |
81ecdfbb | 17681 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
17682 | # is contrary to our usage. Disable this feature. |
17683 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
17684 | setopt NO_GLOB_SUBST |
17685 | else | |
17686 | case `(set -o) 2>/dev/null` in #( | |
17687 | *posix*) : | |
17688 | set -o posix ;; #( | |
17689 | *) : | |
17690 | ;; | |
17691 | esac | |
bec39cab | 17692 | fi |
bec39cab | 17693 | |
81ecdfbb RW |
17694 | |
17695 | as_nl=' | |
17696 | ' | |
17697 | export as_nl | |
17698 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
17699 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
17700 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
17701 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
17702 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
17703 | # but without wasting forks for bash or zsh. | |
17704 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
17705 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17706 | as_echo='print -r --' | |
17707 | as_echo_n='print -rn --' | |
17708 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17709 | as_echo='printf %s\n' | |
17710 | as_echo_n='printf %s' | |
17711 | else | |
17712 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
17713 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
17714 | as_echo_n='/usr/ucb/echo -n' | |
17715 | else | |
17716 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
17717 | as_echo_n_body='eval | |
17718 | arg=$1; | |
17719 | case $arg in #( | |
17720 | *"$as_nl"*) | |
17721 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
17722 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
17723 | esac; | |
17724 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
17725 | ' | |
17726 | export as_echo_n_body | |
17727 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
17728 | fi | |
17729 | export as_echo_body | |
17730 | as_echo='sh -c $as_echo_body as_echo' | |
17731 | fi | |
17732 | ||
17733 | # The user is always right. | |
17734 | if test "${PATH_SEPARATOR+set}" != set; then | |
17735 | PATH_SEPARATOR=: | |
17736 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
17737 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
17738 | PATH_SEPARATOR=';' | |
17739 | } | |
bec39cab AC |
17740 | fi |
17741 | ||
17742 | ||
81ecdfbb RW |
17743 | # IFS |
17744 | # We need space, tab and new line, in precisely that order. Quoting is | |
17745 | # there to prevent editors from complaining about space-tab. | |
17746 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17747 | # splitting by setting IFS to empty value.) | |
17748 | IFS=" "" $as_nl" | |
17749 | ||
17750 | # Find who we are. Look in the path if we contain no directory separator. | |
17751 | case $0 in #(( | |
17752 | *[\\/]* ) as_myself=$0 ;; | |
17753 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17754 | for as_dir in $PATH | |
17755 | do | |
17756 | IFS=$as_save_IFS | |
17757 | test -z "$as_dir" && as_dir=. | |
17758 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17759 | done | |
17760 | IFS=$as_save_IFS | |
17761 | ||
17762 | ;; | |
17763 | esac | |
17764 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17765 | # in which case we are not to be found in the path. | |
17766 | if test "x$as_myself" = x; then | |
17767 | as_myself=$0 | |
17768 | fi | |
17769 | if test ! -f "$as_myself"; then | |
17770 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
17771 | exit 1 | |
17772 | fi | |
17773 | ||
17774 | # Unset variables that we do not need and which cause bugs (e.g. in | |
17775 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
17776 | # suppresses any "Segmentation fault" message there. '((' could | |
17777 | # trigger a bug in pdksh 5.2.14. | |
17778 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
17779 | do eval test x\${$as_var+set} = xset \ | |
17780 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
17781 | done | |
bec39cab AC |
17782 | PS1='$ ' |
17783 | PS2='> ' | |
17784 | PS4='+ ' | |
17785 | ||
17786 | # NLS nuisances. | |
81ecdfbb RW |
17787 | LC_ALL=C |
17788 | export LC_ALL | |
17789 | LANGUAGE=C | |
17790 | export LANGUAGE | |
17791 | ||
17792 | # CDPATH. | |
17793 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
17794 | ||
17795 | ||
17796 | # as_fn_error ERROR [LINENO LOG_FD] | |
17797 | # --------------------------------- | |
17798 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
17799 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
17800 | # script with status $?, using 1 if that was 0. | |
17801 | as_fn_error () | |
17802 | { | |
17803 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
17804 | if test "$3"; then | |
17805 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
17806 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
17807 | fi | |
17808 | $as_echo "$as_me: error: $1" >&2 | |
17809 | as_fn_exit $as_status | |
17810 | } # as_fn_error | |
17811 | ||
17812 | ||
17813 | # as_fn_set_status STATUS | |
17814 | # ----------------------- | |
17815 | # Set $? to STATUS, without forking. | |
17816 | as_fn_set_status () | |
17817 | { | |
17818 | return $1 | |
17819 | } # as_fn_set_status | |
17820 | ||
17821 | # as_fn_exit STATUS | |
17822 | # ----------------- | |
17823 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
17824 | as_fn_exit () | |
17825 | { | |
17826 | set +e | |
17827 | as_fn_set_status $1 | |
17828 | exit $1 | |
17829 | } # as_fn_exit | |
17830 | ||
17831 | # as_fn_unset VAR | |
17832 | # --------------- | |
17833 | # Portably unset VAR. | |
17834 | as_fn_unset () | |
17835 | { | |
17836 | { eval $1=; unset $1;} | |
17837 | } | |
17838 | as_unset=as_fn_unset | |
17839 | # as_fn_append VAR VALUE | |
17840 | # ---------------------- | |
17841 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
17842 | # advantage of any shell optimizations that allow amortized linear growth over | |
17843 | # repeated appends, instead of the typical quadratic growth present in naive | |
17844 | # implementations. | |
17845 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
17846 | eval 'as_fn_append () | |
17847 | { | |
17848 | eval $1+=\$2 | |
17849 | }' | |
17850 | else | |
17851 | as_fn_append () | |
17852 | { | |
17853 | eval $1=\$$1\$2 | |
17854 | } | |
17855 | fi # as_fn_append | |
17856 | ||
17857 | # as_fn_arith ARG... | |
17858 | # ------------------ | |
17859 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
17860 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
17861 | # must be portable across $(()) and expr. | |
17862 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
17863 | eval 'as_fn_arith () | |
17864 | { | |
17865 | as_val=$(( $* )) | |
17866 | }' | |
17867 | else | |
17868 | as_fn_arith () | |
17869 | { | |
17870 | as_val=`expr "$@" || test $? -eq 1` | |
17871 | } | |
17872 | fi # as_fn_arith | |
bec39cab | 17873 | |
81ecdfbb RW |
17874 | |
17875 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
17876 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
17877 | as_expr=expr |
17878 | else | |
17879 | as_expr=false | |
17880 | fi | |
17881 | ||
81ecdfbb | 17882 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
17883 | as_basename=basename |
17884 | else | |
17885 | as_basename=false | |
17886 | fi | |
17887 | ||
81ecdfbb RW |
17888 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
17889 | as_dirname=dirname | |
17890 | else | |
17891 | as_dirname=false | |
17892 | fi | |
bec39cab | 17893 | |
81ecdfbb | 17894 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
17895 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
17896 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17897 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
17898 | $as_echo X/"$0" | | |
17899 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
17900 | s//\1/ | |
17901 | q | |
17902 | } | |
17903 | /^X\/\(\/\/\)$/{ | |
17904 | s//\1/ | |
17905 | q | |
17906 | } | |
17907 | /^X\/\(\/\).*/{ | |
17908 | s//\1/ | |
17909 | q | |
17910 | } | |
17911 | s/.*/./; q'` | |
b4e70030 | 17912 | |
b4e70030 JB |
17913 | # Avoid depending upon Character Ranges. |
17914 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
17915 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
17916 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
17917 | as_cr_digits='0123456789' | |
17918 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
17919 | ||
81ecdfbb RW |
17920 | ECHO_C= ECHO_N= ECHO_T= |
17921 | case `echo -n x` in #((((( | |
17922 | -n*) | |
17923 | case `echo 'xy\c'` in | |
17924 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
17925 | xy) ECHO_C='\c';; | |
17926 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
17927 | ECHO_T=' ';; | |
17928 | esac;; | |
17929 | *) | |
17930 | ECHO_N='-n';; | |
bec39cab AC |
17931 | esac |
17932 | ||
81ecdfbb RW |
17933 | rm -f conf$$ conf$$.exe conf$$.file |
17934 | if test -d conf$$.dir; then | |
17935 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 17936 | else |
81ecdfbb RW |
17937 | rm -f conf$$.dir |
17938 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 17939 | fi |
81ecdfbb RW |
17940 | if (echo >conf$$.file) 2>/dev/null; then |
17941 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 17942 | as_ln_s='ln -s' |
81ecdfbb RW |
17943 | # ... but there are two gotchas: |
17944 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
17945 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
17946 | # In both cases, we have to default to `cp -p'. | |
17947 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
17948 | as_ln_s='cp -p' | |
17949 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
17950 | as_ln_s=ln | |
17951 | else | |
17952 | as_ln_s='cp -p' | |
b4e70030 | 17953 | fi |
bec39cab AC |
17954 | else |
17955 | as_ln_s='cp -p' | |
17956 | fi | |
81ecdfbb RW |
17957 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
17958 | rmdir conf$$.dir 2>/dev/null | |
17959 | ||
17960 | ||
17961 | # as_fn_mkdir_p | |
17962 | # ------------- | |
17963 | # Create "$as_dir" as a directory, including parents if necessary. | |
17964 | as_fn_mkdir_p () | |
17965 | { | |
17966 | ||
17967 | case $as_dir in #( | |
17968 | -*) as_dir=./$as_dir;; | |
17969 | esac | |
17970 | test -d "$as_dir" || eval $as_mkdir_p || { | |
17971 | as_dirs= | |
17972 | while :; do | |
17973 | case $as_dir in #( | |
17974 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
17975 | *) as_qdir=$as_dir;; | |
17976 | esac | |
17977 | as_dirs="'$as_qdir' $as_dirs" | |
17978 | as_dir=`$as_dirname -- "$as_dir" || | |
17979 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17980 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17981 | X"$as_dir" : 'X\(//\)$' \| \ | |
17982 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
17983 | $as_echo X"$as_dir" | | |
17984 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17985 | s//\1/ | |
17986 | q | |
17987 | } | |
17988 | /^X\(\/\/\)[^/].*/{ | |
17989 | s//\1/ | |
17990 | q | |
17991 | } | |
17992 | /^X\(\/\/\)$/{ | |
17993 | s//\1/ | |
17994 | q | |
17995 | } | |
17996 | /^X\(\/\).*/{ | |
17997 | s//\1/ | |
17998 | q | |
17999 | } | |
18000 | s/.*/./; q'` | |
18001 | test -d "$as_dir" && break | |
18002 | done | |
18003 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
18004 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
18005 | ||
bec39cab | 18006 | |
81ecdfbb | 18007 | } # as_fn_mkdir_p |
bec39cab | 18008 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 18009 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
18010 | else |
18011 | test -d ./-p && rmdir ./-p | |
18012 | as_mkdir_p=false | |
18013 | fi | |
18014 | ||
81ecdfbb RW |
18015 | if test -x / >/dev/null 2>&1; then |
18016 | as_test_x='test -x' | |
18017 | else | |
18018 | if ls -dL / >/dev/null 2>&1; then | |
18019 | as_ls_L_option=L | |
18020 | else | |
18021 | as_ls_L_option= | |
18022 | fi | |
18023 | as_test_x=' | |
18024 | eval sh -c '\'' | |
18025 | if test -d "$1"; then | |
18026 | test -d "$1/."; | |
18027 | else | |
18028 | case $1 in #( | |
18029 | -*)set "./$1";; | |
18030 | esac; | |
18031 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
18032 | ???[sx]*):;;*)false;;esac;fi | |
18033 | '\'' sh | |
18034 | ' | |
18035 | fi | |
18036 | as_executable_p=$as_test_x | |
bec39cab AC |
18037 | |
18038 | # Sed expression to map a string onto a valid CPP name. | |
18039 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
18040 | ||
18041 | # Sed expression to map a string onto a valid variable name. | |
18042 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
18043 | ||
18044 | ||
bec39cab | 18045 | exec 6>&1 |
81ecdfbb RW |
18046 | ## ----------------------------------- ## |
18047 | ## Main body of $CONFIG_STATUS script. ## | |
18048 | ## ----------------------------------- ## | |
18049 | _ASEOF | |
18050 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
18051 | ||
18052 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18053 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 18054 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
18055 | # values after options handling. |
18056 | ac_log=" | |
bec39cab | 18057 | This file was extended by $as_me, which was |
81ecdfbb | 18058 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
18059 | |
18060 | CONFIG_FILES = $CONFIG_FILES | |
18061 | CONFIG_HEADERS = $CONFIG_HEADERS | |
18062 | CONFIG_LINKS = $CONFIG_LINKS | |
18063 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
18064 | $ $0 $@ | |
18065 | ||
81ecdfbb RW |
18066 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
18067 | " | |
18068 | ||
bec39cab AC |
18069 | _ACEOF |
18070 | ||
81ecdfbb RW |
18071 | case $ac_config_files in *" |
18072 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
18073 | esac | |
234b45d4 | 18074 | |
81ecdfbb RW |
18075 | case $ac_config_headers in *" |
18076 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
18077 | esac | |
b4e70030 | 18078 | |
b4e70030 | 18079 | |
81ecdfbb RW |
18080 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
18081 | # Files that config.status was made for. | |
18082 | config_files="$ac_config_files" | |
18083 | config_headers="$ac_config_headers" | |
18084 | config_links="$ac_config_links" | |
18085 | config_commands="$ac_config_commands" | |
234b45d4 | 18086 | |
81ecdfbb | 18087 | _ACEOF |
b4e70030 | 18088 | |
81ecdfbb | 18089 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 18090 | ac_cs_usage="\ |
81ecdfbb RW |
18091 | \`$as_me' instantiates files and other configuration actions |
18092 | from templates according to the current configuration. Unless the files | |
18093 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 18094 | |
81ecdfbb | 18095 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 18096 | |
bec39cab | 18097 | -h, --help print this help, then exit |
81ecdfbb RW |
18098 | -V, --version print version number and configuration settings, then exit |
18099 | -q, --quiet, --silent | |
18100 | do not print progress messages | |
bec39cab AC |
18101 | -d, --debug don't remove temporary files |
18102 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
18103 | --file=FILE[:TEMPLATE] |
18104 | instantiate the configuration file FILE | |
18105 | --header=FILE[:TEMPLATE] | |
18106 | instantiate the configuration header FILE | |
234b45d4 | 18107 | |
bec39cab AC |
18108 | Configuration files: |
18109 | $config_files | |
234b45d4 | 18110 | |
bec39cab AC |
18111 | Configuration headers: |
18112 | $config_headers | |
234b45d4 | 18113 | |
bec39cab AC |
18114 | Configuration links: |
18115 | $config_links | |
234b45d4 | 18116 | |
bec39cab AC |
18117 | Configuration commands: |
18118 | $config_commands | |
18119 | ||
81ecdfbb | 18120 | Report bugs to the package provider." |
b4e70030 | 18121 | |
81ecdfbb RW |
18122 | _ACEOF |
18123 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
18124 | ac_cs_version="\\ |
18125 | config.status | |
81ecdfbb RW |
18126 | configured by $0, generated by GNU Autoconf 2.64, |
18127 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 18128 | |
81ecdfbb | 18129 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
18130 | This config.status script is free software; the Free Software Foundation |
18131 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
18132 | |
18133 | ac_pwd='$ac_pwd' | |
18134 | srcdir='$srcdir' | |
18135 | INSTALL='$INSTALL' | |
81ecdfbb RW |
18136 | AWK='$AWK' |
18137 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
18138 | _ACEOF |
18139 | ||
81ecdfbb RW |
18140 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18141 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
18142 | ac_need_defaults=: |
18143 | while test $# != 0 | |
18144 | do | |
18145 | case $1 in | |
18146 | --*=*) | |
81ecdfbb RW |
18147 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18148 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 18149 | ac_shift=: |
c906108c | 18150 | ;; |
81ecdfbb | 18151 | *) |
bec39cab AC |
18152 | ac_option=$1 |
18153 | ac_optarg=$2 | |
18154 | ac_shift=shift | |
c906108c | 18155 | ;; |
bec39cab | 18156 | esac |
c906108c | 18157 | |
bec39cab AC |
18158 | case $ac_option in |
18159 | # Handling of the options. | |
bec39cab AC |
18160 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
18161 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
18162 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
18163 | $as_echo "$ac_cs_version"; exit ;; | |
18164 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
18165 | debug=: ;; |
18166 | --file | --fil | --fi | --f ) | |
18167 | $ac_shift | |
81ecdfbb RW |
18168 | case $ac_optarg in |
18169 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18170 | esac | |
18171 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
18172 | ac_need_defaults=false;; |
18173 | --header | --heade | --head | --hea ) | |
18174 | $ac_shift | |
81ecdfbb RW |
18175 | case $ac_optarg in |
18176 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18177 | esac | |
18178 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 18179 | ac_need_defaults=false;; |
81ecdfbb RW |
18180 | --he | --h) |
18181 | # Conflict between --help and --header | |
18182 | as_fn_error "ambiguous option: \`$1' | |
18183 | Try \`$0 --help' for more information.";; | |
18184 | --help | --hel | -h ) | |
18185 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
18186 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
18187 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18188 | ac_cs_silent=: ;; | |
c906108c | 18189 | |
bec39cab | 18190 | # This is an error. |
81ecdfbb RW |
18191 | -*) as_fn_error "unrecognized option: \`$1' |
18192 | Try \`$0 --help' for more information." ;; | |
c906108c | 18193 | |
81ecdfbb RW |
18194 | *) as_fn_append ac_config_targets " $1" |
18195 | ac_need_defaults=false ;; | |
c906108c | 18196 | |
bec39cab AC |
18197 | esac |
18198 | shift | |
18199 | done | |
c906108c | 18200 | |
bec39cab | 18201 | ac_configure_extra_args= |
c906108c | 18202 | |
bec39cab AC |
18203 | if $ac_cs_silent; then |
18204 | exec 6>/dev/null | |
18205 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
18206 | fi | |
c906108c | 18207 | |
bec39cab | 18208 | _ACEOF |
81ecdfbb | 18209 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 18210 | if \$ac_cs_recheck; then |
81ecdfbb RW |
18211 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
18212 | shift | |
18213 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
18214 | CONFIG_SHELL='$SHELL' | |
18215 | export CONFIG_SHELL | |
18216 | exec "\$@" | |
bec39cab AC |
18217 | fi |
18218 | ||
18219 | _ACEOF | |
81ecdfbb RW |
18220 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18221 | exec 5>>config.log | |
18222 | { | |
18223 | echo | |
18224 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18225 | ## Running $as_me. ## | |
18226 | _ASBOX | |
18227 | $as_echo "$ac_log" | |
18228 | } >&5 | |
bec39cab | 18229 | |
81ecdfbb RW |
18230 | _ACEOF |
18231 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 18232 | # |
81ecdfbb | 18233 | # INIT-COMMANDS |
c906108c | 18234 | # |
a417dc56 | 18235 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 18236 | |
bec39cab AC |
18237 | _ACEOF |
18238 | ||
81ecdfbb | 18239 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 18240 | |
81ecdfbb | 18241 | # Handling of arguments. |
bec39cab | 18242 | for ac_config_target in $ac_config_targets |
c906108c | 18243 | do |
81ecdfbb RW |
18244 | case $ac_config_target in |
18245 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
18246 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 18247 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 18248 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 18249 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 18250 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 18251 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 18252 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 18253 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
18254 | |
18255 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
18256 | esac |
18257 | done | |
18258 | ||
81ecdfbb | 18259 | |
bec39cab AC |
18260 | # If the user did not use the arguments to specify the items to instantiate, |
18261 | # then the envvar interface is used. Set only those that are not. | |
18262 | # We use the long form for the default assignment because of an extremely | |
18263 | # bizarre bug on SunOS 4.1.3. | |
18264 | if $ac_need_defaults; then | |
18265 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18266 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18267 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
18268 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18269 | fi | |
18270 | ||
b4e70030 | 18271 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 18272 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 18273 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
18274 | # Hook for its removal unless debugging. |
18275 | # Note that there is a small window in which the directory will not be cleaned: | |
18276 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
18277 | $debug || |
18278 | { | |
81ecdfbb RW |
18279 | tmp= |
18280 | trap 'exit_status=$? | |
18281 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
18282 | ' 0 | |
18283 | trap 'as_fn_exit 1' 1 2 13 15 | |
18284 | } | |
18285 | # Create a (secure) tmp directory for tmp files. | |
18286 | ||
18287 | { | |
18288 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
18289 | test -n "$tmp" && test -d "$tmp" | |
18290 | } || | |
18291 | { | |
18292 | tmp=./conf$$-$RANDOM | |
18293 | (umask 077 && mkdir "$tmp") | |
18294 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
18295 | ||
18296 | # Set up the scripts for CONFIG_FILES section. | |
18297 | # No need to generate them if there are no CONFIG_FILES. | |
18298 | # This happens for instance with `./config.status config.h'. | |
18299 | if test -n "$CONFIG_FILES"; then | |
18300 | ||
18301 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
18302 | ac_cs_awk_getline=: | |
18303 | ac_cs_awk_pipe_init= | |
18304 | ac_cs_awk_read_file=' | |
18305 | while ((getline aline < (F[key])) > 0) | |
18306 | print(aline) | |
18307 | close(F[key])' | |
18308 | ac_cs_awk_pipe_fini= | |
18309 | else | |
18310 | ac_cs_awk_getline=false | |
18311 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
18312 | ac_cs_awk_read_file=' | |
18313 | print "|#_!!_#|" | |
18314 | print "cat " F[key] " &&" | |
18315 | '$ac_cs_awk_pipe_init | |
18316 | # The final `:' finishes the AND list. | |
18317 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
18318 | fi | |
18319 | ac_cr=`echo X | tr X '\015'` | |
18320 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
18321 | # But we know of no other shell where ac_cr would be empty at this | |
18322 | # point, so we can use a bashism as a fallback. | |
18323 | if test "x$ac_cr" = x; then | |
18324 | eval ac_cr=\$\'\\r\' | |
18325 | fi | |
18326 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
18327 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
18328 | ac_cs_awk_cr='\r' | |
18329 | else | |
18330 | ac_cs_awk_cr=$ac_cr | |
18331 | fi | |
18332 | ||
18333 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
18334 | _ACEOF | |
18335 | ||
18336 | # Create commands to substitute file output variables. | |
18337 | { | |
18338 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
18339 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
18340 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
18341 | echo "_ACAWK" && | |
18342 | echo "_ACEOF" | |
18343 | } >conf$$files.sh && | |
18344 | . ./conf$$files.sh || | |
18345 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18346 | rm -f conf$$files.sh | |
18347 | ||
18348 | { | |
18349 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
18350 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
18351 | echo "_ACEOF" | |
18352 | } >conf$$subs.sh || | |
18353 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18354 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
18355 | ac_delim='%!_!# ' | |
18356 | for ac_last_try in false false false false false :; do | |
18357 | . ./conf$$subs.sh || | |
18358 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18359 | ||
18360 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
18361 | if test $ac_delim_n = $ac_delim_num; then | |
18362 | break | |
18363 | elif $ac_last_try; then | |
18364 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18365 | else | |
18366 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18367 | fi | |
18368 | done | |
18369 | rm -f conf$$subs.sh | |
18370 | ||
18371 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18372 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
18373 | _ACEOF | |
18374 | sed -n ' | |
18375 | h | |
18376 | s/^/S["/; s/!.*/"]=/ | |
18377 | p | |
18378 | g | |
18379 | s/^[^!]*!// | |
18380 | :repl | |
18381 | t repl | |
18382 | s/'"$ac_delim"'$// | |
18383 | t delim | |
18384 | :nl | |
18385 | h | |
18386 | s/\(.\{148\}\).*/\1/ | |
18387 | t more1 | |
18388 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
18389 | p | |
18390 | n | |
18391 | b repl | |
18392 | :more1 | |
18393 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18394 | p | |
18395 | g | |
18396 | s/.\{148\}// | |
18397 | t nl | |
18398 | :delim | |
18399 | h | |
18400 | s/\(.\{148\}\).*/\1/ | |
18401 | t more2 | |
18402 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
18403 | p | |
18404 | b | |
18405 | :more2 | |
18406 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18407 | p | |
18408 | g | |
18409 | s/.\{148\}// | |
18410 | t delim | |
18411 | ' <conf$$subs.awk | sed ' | |
18412 | /^[^""]/{ | |
18413 | N | |
18414 | s/\n// | |
18415 | } | |
18416 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
18417 | rm -f conf$$subs.awk | |
18418 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18419 | _ACAWK | |
18420 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
18421 | for (key in S) S_is_set[key] = 1 | |
18422 | FS = "\a" | |
18423 | \$ac_cs_awk_pipe_init | |
18424 | } | |
18425 | { | |
18426 | line = $ 0 | |
18427 | nfields = split(line, field, "@") | |
18428 | substed = 0 | |
18429 | len = length(field[1]) | |
18430 | for (i = 2; i < nfields; i++) { | |
18431 | key = field[i] | |
18432 | keylen = length(key) | |
18433 | if (S_is_set[key]) { | |
18434 | value = S[key] | |
18435 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
18436 | len += length(value) + length(field[++i]) | |
18437 | substed = 1 | |
18438 | } else | |
18439 | len += 1 + keylen | |
18440 | } | |
18441 | if (nfields == 3 && !substed) { | |
18442 | key = field[2] | |
18443 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
18444 | \$ac_cs_awk_read_file | |
18445 | next | |
18446 | } | |
18447 | } | |
18448 | print line | |
b4e70030 | 18449 | } |
81ecdfbb RW |
18450 | \$ac_cs_awk_pipe_fini |
18451 | _ACAWK | |
18452 | _ACEOF | |
18453 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18454 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
18455 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
18456 | else | |
18457 | cat | |
18458 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
18459 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
18460 | _ACEOF | |
18461 | ||
18462 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
18463 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
18464 | # trailing colons and then remove the whole line if VPATH becomes empty | |
18465 | # (actually we leave an empty line to preserve line numbers). | |
18466 | if test "x$srcdir" = x.; then | |
18467 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
18468 | s/:*\$(srcdir):*/:/ | |
18469 | s/:*\${srcdir}:*/:/ | |
18470 | s/:*@srcdir@:*/:/ | |
18471 | s/^\([^=]*=[ ]*\):*/\1/ | |
18472 | s/:*$// | |
18473 | s/^[^=]*=[ ]*$// | |
18474 | }' | |
18475 | fi | |
18476 | ||
18477 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18478 | fi # test -n "$CONFIG_FILES" | |
18479 | ||
18480 | # Set up the scripts for CONFIG_HEADERS section. | |
18481 | # No need to generate them if there are no CONFIG_HEADERS. | |
18482 | # This happens for instance with `./config.status Makefile'. | |
18483 | if test -n "$CONFIG_HEADERS"; then | |
18484 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
18485 | BEGIN { | |
18486 | _ACEOF | |
18487 | ||
18488 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
18489 | # here-document in config.status, that substitutes the proper values into | |
18490 | # config.h.in to produce config.h. | |
4e8d927d | 18491 | |
81ecdfbb RW |
18492 | # Create a delimiter string that does not exist in confdefs.h, to ease |
18493 | # handling of long lines. | |
18494 | ac_delim='%!_!# ' | |
18495 | for ac_last_try in false false :; do | |
18496 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
18497 | if test -z "$ac_t"; then | |
18498 | break | |
18499 | elif $ac_last_try; then | |
18500 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
18501 | else | |
18502 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18503 | fi | |
18504 | done | |
4e8d927d | 18505 | |
81ecdfbb RW |
18506 | # For the awk script, D is an array of macro values keyed by name, |
18507 | # likewise P contains macro parameters if any. Preserve backslash | |
18508 | # newline sequences. | |
18509 | ||
18510 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18511 | sed -n ' | |
18512 | s/.\{148\}/&'"$ac_delim"'/g | |
18513 | t rset | |
18514 | :rset | |
18515 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
18516 | t def | |
18517 | d | |
18518 | :def | |
18519 | s/\\$// | |
18520 | t bsnl | |
18521 | s/["\\]/\\&/g | |
18522 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18523 | D["\1"]=" \3"/p | |
18524 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
18525 | d | |
18526 | :bsnl | |
18527 | s/["\\]/\\&/g | |
18528 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18529 | D["\1"]=" \3\\\\\\n"\\/p | |
18530 | t cont | |
18531 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
18532 | t cont | |
18533 | d | |
18534 | :cont | |
18535 | n | |
18536 | s/.\{148\}/&'"$ac_delim"'/g | |
18537 | t clear | |
18538 | :clear | |
18539 | s/\\$// | |
18540 | t bsnlc | |
18541 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
18542 | d | |
18543 | :bsnlc | |
18544 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
18545 | b cont | |
18546 | ' <confdefs.h | sed ' | |
18547 | s/'"$ac_delim"'/"\\\ | |
18548 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
18549 | ||
18550 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18551 | for (key in D) D_is_set[key] = 1 | |
18552 | FS = "\a" | |
18553 | } | |
18554 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
18555 | line = \$ 0 | |
18556 | split(line, arg, " ") | |
18557 | if (arg[1] == "#") { | |
18558 | defundef = arg[2] | |
18559 | mac1 = arg[3] | |
18560 | } else { | |
18561 | defundef = substr(arg[1], 2) | |
18562 | mac1 = arg[2] | |
18563 | } | |
18564 | split(mac1, mac2, "(") #) | |
18565 | macro = mac2[1] | |
18566 | prefix = substr(line, 1, index(line, defundef) - 1) | |
18567 | if (D_is_set[macro]) { | |
18568 | # Preserve the white space surrounding the "#". | |
18569 | print prefix "define", macro P[macro] D[macro] | |
18570 | next | |
18571 | } else { | |
18572 | # Replace #undef with comments. This is necessary, for example, | |
18573 | # in the case of _POSIX_SOURCE, which is predefined and required | |
18574 | # on some systems where configure will not decide to define it. | |
18575 | if (defundef == "undef") { | |
18576 | print "/*", prefix defundef, macro, "*/" | |
18577 | next | |
18578 | } | |
18579 | } | |
b4e70030 | 18580 | } |
81ecdfbb RW |
18581 | { print } |
18582 | _ACAWK | |
b4e70030 | 18583 | _ACEOF |
81ecdfbb RW |
18584 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18585 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
18586 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 18587 | |
4e8d927d | 18588 | |
81ecdfbb RW |
18589 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
18590 | shift | |
18591 | for ac_tag | |
18592 | do | |
18593 | case $ac_tag in | |
18594 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18595 | esac | |
18596 | case $ac_mode$ac_tag in | |
18597 | :[FHL]*:*);; | |
18598 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
18599 | :[FH]-) ac_tag=-:-;; | |
18600 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18601 | esac | |
18602 | ac_save_IFS=$IFS | |
18603 | IFS=: | |
18604 | set x $ac_tag | |
18605 | IFS=$ac_save_IFS | |
18606 | shift | |
18607 | ac_file=$1 | |
18608 | shift | |
4e8d927d | 18609 | |
81ecdfbb RW |
18610 | case $ac_mode in |
18611 | :L) ac_source=$1;; | |
18612 | :[FH]) | |
18613 | ac_file_inputs= | |
18614 | for ac_f | |
18615 | do | |
18616 | case $ac_f in | |
18617 | -) ac_f="$tmp/stdin";; | |
18618 | *) # Look for the file first in the build tree, then in the source tree | |
18619 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18620 | # because $ac_f cannot contain `:'. | |
18621 | test -f "$ac_f" || | |
18622 | case $ac_f in | |
18623 | [\\/$]*) false;; | |
18624 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18625 | esac || | |
18626 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
18627 | esac | |
18628 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
18629 | as_fn_append ac_file_inputs " '$ac_f'" | |
18630 | done | |
18631 | ||
18632 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18633 | # use $as_me), people would be surprised to read: | |
18634 | # /* config.h. Generated by config.status. */ | |
18635 | configure_input='Generated from '` | |
18636 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
18637 | `' by configure.' | |
18638 | if test x"$ac_file" != x-; then | |
18639 | configure_input="$ac_file. $configure_input" | |
18640 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
18641 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 18642 | fi |
81ecdfbb RW |
18643 | # Neutralize special characters interpreted by sed in replacement strings. |
18644 | case $configure_input in #( | |
18645 | *\&* | *\|* | *\\* ) | |
18646 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
18647 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
18648 | *) ac_sed_conf_input=$configure_input;; | |
18649 | esac | |
4e8d927d | 18650 | |
81ecdfbb RW |
18651 | case $ac_tag in |
18652 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
18653 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
18654 | esac | |
18655 | ;; | |
c906108c SS |
18656 | esac |
18657 | ||
81ecdfbb | 18658 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
18659 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
18660 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18661 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18662 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
18663 | $as_echo X"$ac_file" | | |
18664 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18665 | s//\1/ | |
18666 | q | |
18667 | } | |
18668 | /^X\(\/\/\)[^/].*/{ | |
18669 | s//\1/ | |
18670 | q | |
18671 | } | |
18672 | /^X\(\/\/\)$/{ | |
18673 | s//\1/ | |
18674 | q | |
18675 | } | |
18676 | /^X\(\/\).*/{ | |
18677 | s//\1/ | |
18678 | q | |
18679 | } | |
18680 | s/.*/./; q'` | |
18681 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
18682 | ac_builddir=. |
18683 | ||
81ecdfbb RW |
18684 | case "$ac_dir" in |
18685 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18686 | *) | |
18687 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18688 | # A ".." for each directory in $ac_dir_suffix. | |
18689 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18690 | case $ac_top_builddir_sub in | |
18691 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18692 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18693 | esac ;; | |
18694 | esac | |
18695 | ac_abs_top_builddir=$ac_pwd | |
18696 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18697 | # for backward compatibility: | |
18698 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
18699 | |
18700 | case $srcdir in | |
81ecdfbb | 18701 | .) # We are building in place. |
bec39cab | 18702 | ac_srcdir=. |
81ecdfbb RW |
18703 | ac_top_srcdir=$ac_top_builddir_sub |
18704 | ac_abs_top_srcdir=$ac_pwd ;; | |
18705 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 18706 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
18707 | ac_top_srcdir=$srcdir |
18708 | ac_abs_top_srcdir=$srcdir ;; | |
18709 | *) # Relative name. | |
18710 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18711 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18712 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 18713 | esac |
81ecdfbb | 18714 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 18715 | |
c906108c | 18716 | |
81ecdfbb RW |
18717 | case $ac_mode in |
18718 | :F) | |
18719 | # | |
18720 | # CONFIG_FILE | |
18721 | # | |
c906108c | 18722 | |
bec39cab AC |
18723 | case $INSTALL in |
18724 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 18725 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 18726 | esac |
81ecdfbb | 18727 | _ACEOF |
121ce6e5 | 18728 | |
81ecdfbb RW |
18729 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18730 | # If the template does not know about datarootdir, expand it. | |
18731 | # FIXME: This hack should be removed a few years after 2.60. | |
18732 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18733 | ac_sed_dataroot=' | |
18734 | /datarootdir/ { | |
18735 | p | |
18736 | q | |
18737 | } | |
18738 | /@datadir@/p | |
18739 | /@docdir@/p | |
18740 | /@infodir@/p | |
18741 | /@localedir@/p | |
18742 | /@mandir@/p' | |
18743 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
18744 | *datarootdir*) ac_datarootdir_seen=yes;; | |
18745 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
18746 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
18747 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
18748 | _ACEOF | |
18749 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18750 | ac_datarootdir_hack=' | |
18751 | s&@datadir@&$datadir&g | |
18752 | s&@docdir@&$docdir&g | |
18753 | s&@infodir@&$infodir&g | |
18754 | s&@localedir@&$localedir&g | |
18755 | s&@mandir@&$mandir&g | |
18756 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
18757 | esac | |
4e8d927d | 18758 | _ACEOF |
81ecdfbb RW |
18759 | |
18760 | # Neutralize VPATH when `$srcdir' = `.'. | |
18761 | # Shell code in configure.ac might set extrasub. | |
18762 | # FIXME: do we really want to maintain this feature? | |
18763 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18764 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
18765 | $extrasub |
18766 | _ACEOF | |
81ecdfbb | 18767 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
18768 | :t |
18769 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
18770 | s|@configure_input@|$ac_sed_conf_input|;t t |
18771 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
18772 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
18773 | s&@srcdir@&$ac_srcdir&;t t | |
18774 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
18775 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
18776 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
18777 | s&@builddir@&$ac_builddir&;t t | |
18778 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
18779 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
18780 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
18781 | $ac_datarootdir_hack |
18782 | " | |
18783 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
18784 | if $ac_cs_awk_getline; then | |
18785 | $AWK -f "$tmp/subs.awk" | |
18786 | else | |
18787 | $AWK -f "$tmp/subs.awk" | $SHELL | |
18788 | fi >$tmp/out \ | |
18789 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
18790 | ||
18791 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
18792 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
18793 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
18794 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18795 | which seems to be undefined. Please make sure it is defined." >&5 | |
18796 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18797 | which seems to be undefined. Please make sure it is defined." >&2;} | |
18798 | ||
18799 | rm -f "$tmp/stdin" | |
bec39cab | 18800 | case $ac_file in |
81ecdfbb RW |
18801 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
18802 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
18803 | esac \ | |
18804 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
18805 | ;; | |
18806 | :H) | |
18807 | # | |
18808 | # CONFIG_HEADER | |
18809 | # | |
bec39cab | 18810 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
18811 | { |
18812 | $as_echo "/* $configure_input */" \ | |
18813 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
18814 | } >"$tmp/config.h" \ | |
18815 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
18816 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
18817 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
18818 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 18819 | else |
81ecdfbb RW |
18820 | rm -f "$ac_file" |
18821 | mv "$tmp/config.h" "$ac_file" \ | |
18822 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
18823 | fi |
18824 | else | |
81ecdfbb RW |
18825 | $as_echo "/* $configure_input */" \ |
18826 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
18827 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 18828 | fi |
81ecdfbb RW |
18829 | ;; |
18830 | :L) | |
18831 | # | |
18832 | # CONFIG_LINK | |
18833 | # | |
c906108c | 18834 | |
81ecdfbb RW |
18835 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
18836 | : | |
b4e70030 | 18837 | else |
81ecdfbb RW |
18838 | # Prefer the file from the source tree if names are identical. |
18839 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
18840 | ac_source=$srcdir/$ac_source | |
18841 | fi | |
b4e70030 | 18842 | |
81ecdfbb RW |
18843 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
18844 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 18845 | |
81ecdfbb RW |
18846 | if test ! -r "$ac_source"; then |
18847 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
18848 | fi | |
18849 | rm -f "$ac_file" | |
bec39cab | 18850 | |
81ecdfbb RW |
18851 | # Try a relative symlink, then a hard link, then a copy. |
18852 | case $srcdir in | |
18853 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
18854 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
18855 | esac | |
18856 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
18857 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
18858 | cp -p "$ac_source" "$ac_file" || | |
18859 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
18860 | fi | |
18861 | ;; | |
18862 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
18863 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
18864 | ;; | |
c906108c | 18865 | esac |
b4e70030 | 18866 | |
bec39cab | 18867 | |
81ecdfbb RW |
18868 | case $ac_file$ac_mode in |
18869 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 18870 | "gcore":F) chmod +x gcore ;; |
1e94266c SM |
18871 | "Makefile":F) |
18872 | case x$CONFIG_HEADERS in | |
18873 | xconfig.h:config.in) | |
18874 | echo > stamp-h ;; | |
18875 | esac | |
18876 | ;; | |
18877 | "gdb-gdb.gdb":F) | |
18878 | case x$CONFIG_HEADERS in | |
18879 | xconfig.h:config.in) | |
18880 | echo > stamp-h ;; | |
18881 | esac | |
18882 | ;; | |
18883 | "doc/Makefile":F) | |
18884 | case x$CONFIG_HEADERS in | |
18885 | xconfig.h:config.in) | |
18886 | echo > stamp-h ;; | |
18887 | esac | |
18888 | ;; | |
18889 | "data-directory/Makefile":F) | |
c906108c SS |
18890 | case x$CONFIG_HEADERS in |
18891 | xconfig.h:config.in) | |
18892 | echo > stamp-h ;; | |
18893 | esac | |
bec39cab | 18894 | ;; |
81ecdfbb | 18895 | |
bec39cab | 18896 | esac |
81ecdfbb | 18897 | done # for ac_tag |
c906108c | 18898 | |
bec39cab | 18899 | |
81ecdfbb | 18900 | as_fn_exit 0 |
bec39cab | 18901 | _ACEOF |
bec39cab AC |
18902 | ac_clean_files=$ac_clean_files_save |
18903 | ||
81ecdfbb RW |
18904 | test $ac_write_fail = 0 || |
18905 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
18906 | ||
bec39cab AC |
18907 | |
18908 | # configure is writing to config.log, and then calls config.status. | |
18909 | # config.status does its own redirection, appending to config.log. | |
18910 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
18911 | # by configure, so config.status won't be able to write to it; its | |
18912 | # output is simply discarded. So we exec the FD to /dev/null, | |
18913 | # effectively closing config.log, so it can be properly (re)opened and | |
18914 | # appended to by config.status. When coming back to configure, we | |
18915 | # need to make the FD available again. | |
18916 | if test "$no_create" != yes; then | |
18917 | ac_cs_success=: | |
18918 | ac_config_status_args= | |
18919 | test "$silent" = yes && | |
18920 | ac_config_status_args="$ac_config_status_args --quiet" | |
18921 | exec 5>/dev/null | |
18922 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
18923 | exec 5>>config.log | |
18924 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
18925 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 18926 | $ac_cs_success || as_fn_exit $? |
bec39cab | 18927 | fi |
c906108c | 18928 | |
bec39cab | 18929 | # |
81ecdfbb | 18930 | # CONFIG_SUBDIRS section. |
bec39cab | 18931 | # |
c906108c SS |
18932 | if test "$no_recursion" != yes; then |
18933 | ||
81ecdfbb RW |
18934 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
18935 | # so they do not pile up. | |
c906108c SS |
18936 | ac_sub_configure_args= |
18937 | ac_prev= | |
fdc59709 PB |
18938 | eval "set x $ac_configure_args" |
18939 | shift | |
18940 | for ac_arg | |
18941 | do | |
c906108c SS |
18942 | if test -n "$ac_prev"; then |
18943 | ac_prev= | |
18944 | continue | |
18945 | fi | |
bec39cab | 18946 | case $ac_arg in |
c906108c SS |
18947 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
18948 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
18949 | ac_prev=cache_file ;; | |
18950 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
18951 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
18952 | | --c=*) | |
18953 | ;; | |
18954 | --config-cache | -C) | |
c906108c SS |
18955 | ;; |
18956 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
18957 | ac_prev=srcdir ;; | |
18958 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
18959 | ;; | |
bec39cab AC |
18960 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
18961 | ac_prev=prefix ;; | |
18962 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
18963 | ;; | |
81ecdfbb RW |
18964 | --disable-option-checking) |
18965 | ;; | |
fdc59709 PB |
18966 | *) |
18967 | case $ac_arg in | |
81ecdfbb | 18968 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 18969 | esac |
81ecdfbb | 18970 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
18971 | esac |
18972 | done | |
18973 | ||
bec39cab AC |
18974 | # Always prepend --prefix to ensure using the same prefix |
18975 | # in subdir configurations. | |
fdc59709 PB |
18976 | ac_arg="--prefix=$prefix" |
18977 | case $ac_arg in | |
81ecdfbb | 18978 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 18979 | esac |
81ecdfbb RW |
18980 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
18981 | ||
18982 | # Pass --silent | |
18983 | if test "$silent" = yes; then | |
18984 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
18985 | fi | |
18986 | ||
18987 | # Always prepend --disable-option-checking to silence warnings, since | |
18988 | # different subdirs can have different --enable and --with options. | |
18989 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 18990 | |
b4e70030 | 18991 | ac_popdir=`pwd` |
bec39cab | 18992 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
18993 | |
18994 | # Do not complain, so a configure script can configure whichever | |
18995 | # parts of a large source tree are present. | |
fdc59709 | 18996 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 18997 | |
81ecdfbb RW |
18998 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
18999 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
19000 | $as_echo "$ac_msg" >&6 | |
19001 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
19002 | ac_builddir=. |
19003 | ||
81ecdfbb RW |
19004 | case "$ac_dir" in |
19005 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19006 | *) | |
19007 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
19008 | # A ".." for each directory in $ac_dir_suffix. | |
19009 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
19010 | case $ac_top_builddir_sub in | |
19011 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19012 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
19013 | esac ;; | |
19014 | esac | |
19015 | ac_abs_top_builddir=$ac_pwd | |
19016 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
19017 | # for backward compatibility: | |
19018 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
19019 | |
19020 | case $srcdir in | |
81ecdfbb | 19021 | .) # We are building in place. |
bec39cab | 19022 | ac_srcdir=. |
81ecdfbb RW |
19023 | ac_top_srcdir=$ac_top_builddir_sub |
19024 | ac_abs_top_srcdir=$ac_pwd ;; | |
19025 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 19026 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
19027 | ac_top_srcdir=$srcdir |
19028 | ac_abs_top_srcdir=$srcdir ;; | |
19029 | *) # Relative name. | |
19030 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
19031 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
19032 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 19033 | esac |
81ecdfbb | 19034 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 19035 | |
c906108c | 19036 | |
fdc59709 | 19037 | cd "$ac_dir" |
c906108c SS |
19038 | |
19039 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
19040 | if test -f "$ac_srcdir/configure.gnu"; then |
19041 | ac_sub_configure=$ac_srcdir/configure.gnu | |
19042 | elif test -f "$ac_srcdir/configure"; then | |
19043 | ac_sub_configure=$ac_srcdir/configure | |
19044 | elif test -f "$ac_srcdir/configure.in"; then | |
19045 | # This should be Cygnus configure. | |
19046 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 19047 | else |
81ecdfbb RW |
19048 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
19049 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
19050 | ac_sub_configure= |
19051 | fi | |
19052 | ||
19053 | # The recursion is here. | |
19054 | if test -n "$ac_sub_configure"; then | |
c906108c | 19055 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
19056 | case $cache_file in |
19057 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
19058 | *) # Relative name. |
19059 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 19060 | esac |
c906108c | 19061 | |
81ecdfbb RW |
19062 | { $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 |
19063 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 19064 | # The eval makes quoting arguments work. |
fdc59709 PB |
19065 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
19066 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 19067 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
19068 | fi |
19069 | ||
fdc59709 | 19070 | cd "$ac_popdir" |
c906108c SS |
19071 | done |
19072 | fi | |
81ecdfbb RW |
19073 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
19074 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
19075 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
19076 | fi | |
c906108c | 19077 |