Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
783e057b | 591 | gl_header_list= |
f434ba03 | 592 | gl_func_list= |
81ecdfbb RW |
593 | enable_option_checking=no |
594 | ac_subst_vars='am__EXEEXT_FALSE | |
595 | am__EXEEXT_TRUE | |
596 | gltests_LTLIBOBJS | |
597 | gltests_LIBOBJS | |
598 | gl_LTLIBOBJS | |
599 | gl_LIBOBJS | |
600 | LTLIBOBJS | |
601 | LIBOBJS | |
602 | GDB_NM_FILE | |
603 | frags | |
604 | target_subdir | |
605 | CONFIG_UNINSTALL | |
606 | CONFIG_INSTALL | |
607 | CONFIG_CLEAN | |
608 | CONFIG_ALL | |
609 | CONFIG_SRCS | |
610 | CONFIG_DEPS | |
611 | CONFIG_OBS | |
612 | PROFILE_CFLAGS | |
613 | ENABLE_CFLAGS | |
614 | SIM_OBS | |
615 | SIM | |
616 | XMKMF | |
617 | GDBTK_SRC_DIR | |
618 | GDBTK_CFLAGS | |
619 | GDBTKLIBS | |
620 | X_LIBS | |
621 | X_LDFLAGS | |
622 | X_CFLAGS | |
623 | TK_XINCLUDES | |
624 | TK_DEPS | |
625 | TK_LIBRARY | |
626 | TK_INCLUDE | |
627 | TK_STUB_LIB_SPEC | |
628 | TK_STUB_LIB_FLAG | |
629 | TK_STUB_LIB_FILE | |
630 | TK_LIB_SPEC | |
631 | TK_LIB_FLAG | |
632 | TK_LIB_FILE | |
633 | TK_SRC_DIR | |
634 | TK_BIN_DIR | |
635 | TK_VERSION | |
636 | TCL_DEPS | |
637 | TCL_LIBRARY | |
638 | TCL_INCLUDE | |
639 | TCL_STUB_LIB_SPEC | |
640 | TCL_STUB_LIB_FLAG | |
641 | TCL_STUB_LIB_FILE | |
642 | TCL_LIB_SPEC | |
643 | TCL_LIB_FLAG | |
644 | TCL_LIB_FILE | |
645 | TCL_SRC_DIR | |
646 | TCL_BIN_DIR | |
647 | TCL_PATCH_LEVEL | |
648 | TCL_VERSION | |
649 | WIN32LDAPP | |
650 | GUI_CFLAGS_X | |
651 | LIBGUI | |
652 | WIN32LIBS | |
653 | SER_HARDWIRE | |
654 | WERROR_CFLAGS | |
655 | WARN_CFLAGS | |
656 | SYSTEM_GDBINIT | |
657 | TARGET_SYSTEM_ROOT_DEFINE | |
658 | TARGET_SYSTEM_ROOT | |
659 | CONFIG_LDFLAGS | |
f6528abd | 660 | RDYNAMIC |
81ecdfbb | 661 | ALLOCA |
ac534cba JB |
662 | PYTHON_LIBS |
663 | PYTHON_CPPFLAGS | |
81ecdfbb | 664 | PYTHON_CFLAGS |
ec685c5e | 665 | python_prog_path |
81ecdfbb RW |
666 | LTLIBEXPAT |
667 | LIBEXPAT | |
668 | HAVE_LIBEXPAT | |
b8e0a31c | 669 | JIT_READER_DIR |
f997c383 | 670 | TARGET_PTR |
39037522 | 671 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
672 | READLINE_CFLAGS |
673 | READLINE_DEPS | |
674 | READLINE | |
675 | MIG | |
676 | WINDRES | |
677 | DLLTOOL | |
678 | AR | |
679 | YFLAGS | |
680 | YACC | |
681 | LN_S | |
682 | REPORT_BUGS_TEXI | |
683 | REPORT_BUGS_TO | |
684 | PKGVERSION | |
685 | TARGET_OBS | |
686 | subdirs | |
687 | GDB_DATADIR | |
688 | DEBUGDIR | |
689 | am__fastdepCC_FALSE | |
690 | am__fastdepCC_TRUE | |
691 | AMDEPBACKSLASH | |
692 | AMDEP_FALSE | |
693 | AMDEP_TRUE | |
694 | am__quote | |
695 | am__include | |
696 | am__untar | |
697 | am__tar | |
698 | AMTAR | |
699 | AWK | |
700 | mkdir_p | |
701 | MKDIR_P | |
702 | INSTALL_STRIP_PROGRAM | |
703 | STRIP | |
704 | install_sh | |
81ecdfbb RW |
705 | AUTOHEADER |
706 | AUTOMAKE | |
707 | AUTOCONF | |
708 | ACLOCAL | |
709 | VERSION | |
710 | CYGPATH_W | |
711 | am__isrc | |
712 | INSTALL_DATA | |
713 | INSTALL_SCRIPT | |
714 | INSTALL_PROGRAM | |
5048e516 JK |
715 | MAKEINFO_EXTRA_FLAGS |
716 | MAKEINFOFLAGS | |
717 | MAKEINFO | |
81ecdfbb RW |
718 | PACKAGE |
719 | GNULIB_STDINT_H | |
720 | LIBGNU_LTLIBDEPS | |
721 | LIBGNU_LIBDEPS | |
f434ba03 PA |
722 | gltests_WITNESS |
723 | HAVE_WINT_T | |
81ecdfbb | 724 | HAVE_WCHAR_H |
f434ba03 PA |
725 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H |
726 | NEXT_WCHAR_H | |
81ecdfbb | 727 | REPLACE_WCWIDTH |
f434ba03 PA |
728 | REPLACE_WCSNRTOMBS |
729 | REPLACE_WCSRTOMBS | |
730 | REPLACE_WCRTOMB | |
731 | REPLACE_MBSNRTOWCS | |
732 | REPLACE_MBSRTOWCS | |
733 | REPLACE_MBRLEN | |
734 | REPLACE_MBRTOWC | |
735 | REPLACE_MBSINIT | |
736 | REPLACE_WCTOB | |
737 | REPLACE_BTOWC | |
738 | REPLACE_MBSTATE_T | |
81ecdfbb | 739 | HAVE_DECL_WCWIDTH |
f434ba03 PA |
740 | HAVE_DECL_WCTOB |
741 | HAVE_WCSNRTOMBS | |
742 | HAVE_WCSRTOMBS | |
743 | HAVE_WCRTOMB | |
744 | HAVE_MBSNRTOWCS | |
745 | HAVE_MBSRTOWCS | |
746 | HAVE_MBRLEN | |
747 | HAVE_MBRTOWC | |
748 | HAVE_MBSINIT | |
749 | HAVE_BTOWC | |
81ecdfbb | 750 | GNULIB_WCWIDTH |
f434ba03 PA |
751 | GNULIB_WCSNRTOMBS |
752 | GNULIB_WCSRTOMBS | |
753 | GNULIB_WCRTOMB | |
754 | GNULIB_MBSNRTOWCS | |
755 | GNULIB_MBSRTOWCS | |
756 | GNULIB_MBRLEN | |
757 | GNULIB_MBRTOWC | |
758 | GNULIB_MBSINIT | |
759 | GNULIB_WCTOB | |
760 | GNULIB_BTOWC | |
761 | NEXT_AS_FIRST_DIRECTIVE_STRING_H | |
81ecdfbb RW |
762 | NEXT_STRING_H |
763 | STDINT_H | |
764 | WINT_T_SUFFIX | |
765 | WCHAR_T_SUFFIX | |
81ecdfbb | 766 | SIG_ATOMIC_T_SUFFIX |
f434ba03 | 767 | SIZE_T_SUFFIX |
81ecdfbb RW |
768 | PTRDIFF_T_SUFFIX |
769 | HAVE_SIGNED_WINT_T | |
770 | HAVE_SIGNED_WCHAR_T | |
771 | HAVE_SIGNED_SIG_ATOMIC_T | |
772 | BITSIZEOF_WINT_T | |
773 | BITSIZEOF_WCHAR_T | |
81ecdfbb | 774 | BITSIZEOF_SIG_ATOMIC_T |
f434ba03 | 775 | BITSIZEOF_SIZE_T |
81ecdfbb RW |
776 | BITSIZEOF_PTRDIFF_T |
777 | HAVE_SYS_BITYPES_H | |
778 | HAVE_SYS_INTTYPES_H | |
779 | HAVE_STDINT_H | |
f434ba03 | 780 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H |
81ecdfbb | 781 | NEXT_STDINT_H |
81ecdfbb RW |
782 | HAVE_SYS_TYPES_H |
783 | HAVE_INTTYPES_H | |
784 | HAVE_UNSIGNED_LONG_LONG_INT | |
785 | HAVE_LONG_LONG_INT | |
f434ba03 PA |
786 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
787 | NEXT_STDDEF_H | |
788 | PRAGMA_SYSTEM_HEADER | |
789 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
790 | INCLUDE_NEXT | |
791 | STDDEF_H | |
792 | HAVE_WCHAR_T | |
793 | REPLACE_NULL | |
794 | APPLE_UNIVERSAL_BUILD | |
795 | UNDEFINE_STRTOK_R | |
796 | REPLACE_STRTOK_R | |
81ecdfbb | 797 | REPLACE_STRSIGNAL |
f434ba03 PA |
798 | REPLACE_STRNLEN |
799 | REPLACE_STRNDUP | |
800 | REPLACE_STRNCAT | |
81ecdfbb | 801 | REPLACE_STRERROR |
f434ba03 PA |
802 | REPLACE_STRCASESTR |
803 | REPLACE_STRSTR | |
804 | REPLACE_STRDUP | |
805 | REPLACE_STPNCPY | |
806 | REPLACE_MEMMEM | |
807 | REPLACE_MEMCHR | |
808 | HAVE_STRVERSCMP | |
81ecdfbb | 809 | HAVE_DECL_STRSIGNAL |
81ecdfbb RW |
810 | HAVE_DECL_STRTOK_R |
811 | HAVE_STRCASESTR | |
812 | HAVE_STRSEP | |
813 | HAVE_STRPBRK | |
814 | HAVE_DECL_STRNLEN | |
815 | HAVE_DECL_STRNDUP | |
81ecdfbb RW |
816 | HAVE_DECL_STRDUP |
817 | HAVE_STRCHRNUL | |
818 | HAVE_STPNCPY | |
819 | HAVE_STPCPY | |
f434ba03 | 820 | HAVE_RAWMEMCHR |
81ecdfbb RW |
821 | HAVE_DECL_MEMRCHR |
822 | HAVE_MEMPCPY | |
823 | HAVE_DECL_MEMMEM | |
f434ba03 PA |
824 | HAVE_MEMCHR |
825 | HAVE_MBSLEN | |
826 | GNULIB_STRVERSCMP | |
81ecdfbb RW |
827 | GNULIB_STRSIGNAL |
828 | GNULIB_STRERROR | |
829 | GNULIB_MBSTOK_R | |
830 | GNULIB_MBSSEP | |
831 | GNULIB_MBSSPN | |
832 | GNULIB_MBSPBRK | |
833 | GNULIB_MBSCSPN | |
834 | GNULIB_MBSCASESTR | |
835 | GNULIB_MBSPCASECMP | |
836 | GNULIB_MBSNCASECMP | |
837 | GNULIB_MBSCASECMP | |
838 | GNULIB_MBSSTR | |
839 | GNULIB_MBSRCHR | |
840 | GNULIB_MBSCHR | |
841 | GNULIB_MBSNLEN | |
842 | GNULIB_MBSLEN | |
843 | GNULIB_STRTOK_R | |
844 | GNULIB_STRCASESTR | |
845 | GNULIB_STRSTR | |
846 | GNULIB_STRSEP | |
847 | GNULIB_STRPBRK | |
848 | GNULIB_STRNLEN | |
849 | GNULIB_STRNDUP | |
f434ba03 | 850 | GNULIB_STRNCAT |
81ecdfbb RW |
851 | GNULIB_STRDUP |
852 | GNULIB_STRCHRNUL | |
853 | GNULIB_STPNCPY | |
854 | GNULIB_STPCPY | |
f434ba03 | 855 | GNULIB_RAWMEMCHR |
81ecdfbb RW |
856 | GNULIB_MEMRCHR |
857 | GNULIB_MEMPCPY | |
858 | GNULIB_MEMMEM | |
f434ba03 | 859 | GNULIB_MEMCHR |
81ecdfbb RW |
860 | GL_COND_LIBTOOL_FALSE |
861 | GL_COND_LIBTOOL_TRUE | |
862 | CATOBJEXT | |
863 | GENCAT | |
864 | INSTOBJEXT | |
865 | DATADIRNAME | |
866 | CATALOGS | |
867 | POSUB | |
868 | GMSGFMT | |
869 | XGETTEXT | |
870 | INCINTL | |
871 | LIBINTL_DEP | |
872 | LIBINTL | |
873 | USE_NLS | |
874 | SET_MAKE | |
875 | GMAKE_FALSE | |
876 | GMAKE_TRUE | |
877 | MAKE | |
878 | CCDEPMODE | |
879 | DEPDIR | |
880 | am__leading_dot | |
881 | target_os | |
882 | target_vendor | |
883 | target_cpu | |
884 | target | |
f434ba03 PA |
885 | RANLIB |
886 | EGREP | |
887 | GREP | |
888 | CPP | |
81ecdfbb RW |
889 | host_os |
890 | host_vendor | |
891 | host_cpu | |
892 | host | |
893 | build_os | |
894 | build_vendor | |
895 | build_cpu | |
896 | build | |
81ecdfbb RW |
897 | OBJEXT |
898 | EXEEXT | |
899 | ac_ct_CC | |
900 | CPPFLAGS | |
901 | LDFLAGS | |
902 | CFLAGS | |
903 | CC | |
904 | MAINT | |
905 | MAINTAINER_MODE_FALSE | |
906 | MAINTAINER_MODE_TRUE | |
907 | target_alias | |
908 | host_alias | |
909 | build_alias | |
910 | LIBS | |
911 | ECHO_T | |
912 | ECHO_N | |
913 | ECHO_C | |
914 | DEFS | |
915 | mandir | |
916 | localedir | |
917 | libdir | |
918 | psdir | |
919 | pdfdir | |
920 | dvidir | |
921 | htmldir | |
922 | infodir | |
923 | docdir | |
924 | oldincludedir | |
925 | includedir | |
926 | localstatedir | |
927 | sharedstatedir | |
928 | sysconfdir | |
929 | datadir | |
930 | datarootdir | |
931 | libexecdir | |
932 | sbindir | |
933 | bindir | |
934 | program_transform_name | |
935 | prefix | |
936 | exec_prefix | |
937 | PACKAGE_URL | |
938 | PACKAGE_BUGREPORT | |
939 | PACKAGE_STRING | |
940 | PACKAGE_VERSION | |
941 | PACKAGE_TARNAME | |
942 | PACKAGE_NAME | |
943 | PATH_SEPARATOR | |
944 | SHELL' | |
a4ce5b0d | 945 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
946 | ac_user_opts=' |
947 | enable_option_checking | |
948 | enable_maintainer_mode | |
da2f07f1 JK |
949 | enable_plugins |
950 | enable_largefile | |
81ecdfbb RW |
951 | enable_dependency_tracking |
952 | with_separate_debug_dir | |
953 | with_gdb_datadir | |
954 | with_relocated_sources | |
955 | enable_targets | |
956 | enable_64_bit_bfd | |
957 | enable_gdbcli | |
958 | enable_gdbmi | |
959 | enable_tui | |
960 | enable_gdbtk | |
961 | with_libunwind | |
962 | with_curses | |
963 | enable_profiling | |
964 | with_pkgversion | |
965 | with_bugurl | |
b040ad30 | 966 | with_zlib |
81ecdfbb | 967 | with_libiconv_prefix |
478aac75 | 968 | with_iconv_bin |
81ecdfbb | 969 | with_system_readline |
b8e0a31c | 970 | with_jit_reader_dir |
81ecdfbb RW |
971 | with_expat |
972 | with_gnu_ld | |
973 | enable_rpath | |
974 | with_libexpat_prefix | |
975 | with_python | |
976 | with_included_regex | |
977 | with_sysroot | |
978 | with_system_gdbinit | |
979 | enable_werror | |
980 | enable_build_warnings | |
981 | enable_gdb_build_warnings | |
982 | with_tcl | |
983 | with_tk | |
984 | with_x | |
985 | enable_sim | |
986 | enable_multi_ice | |
496c0e1b | 987 | enable_gdbserver |
81ecdfbb RW |
988 | ' |
989 | ac_precious_vars='build_alias | |
990 | host_alias | |
991 | target_alias | |
992 | CC | |
993 | CFLAGS | |
994 | LDFLAGS | |
995 | LIBS | |
996 | CPPFLAGS | |
997 | CPP | |
998 | YACC | |
999 | YFLAGS | |
1000 | XMKMF' | |
5ae98d25 | 1001 | ac_subdirs_all='testsuite |
81ecdfbb RW |
1002 | gdbtk |
1003 | multi-ice | |
1004 | gdbserver' | |
c906108c SS |
1005 | |
1006 | # Initialize some variables set by options. | |
bec39cab AC |
1007 | ac_init_help= |
1008 | ac_init_version=false | |
81ecdfbb RW |
1009 | ac_unrecognized_opts= |
1010 | ac_unrecognized_sep= | |
c906108c SS |
1011 | # The variables have the same names as the options, with |
1012 | # dashes changed to underlines. | |
bec39cab | 1013 | cache_file=/dev/null |
c906108c | 1014 | exec_prefix=NONE |
c906108c | 1015 | no_create= |
c906108c SS |
1016 | no_recursion= |
1017 | prefix=NONE | |
1018 | program_prefix=NONE | |
1019 | program_suffix=NONE | |
1020 | program_transform_name=s,x,x, | |
1021 | silent= | |
1022 | site= | |
1023 | srcdir= | |
c906108c SS |
1024 | verbose= |
1025 | x_includes=NONE | |
1026 | x_libraries=NONE | |
bec39cab AC |
1027 | |
1028 | # Installation directory options. | |
1029 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1030 | # and all the variables that are supposed to be based on exec_prefix | |
1031 | # by default will actually change. | |
1032 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 1033 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
1034 | bindir='${exec_prefix}/bin' |
1035 | sbindir='${exec_prefix}/sbin' | |
1036 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
1037 | datarootdir='${prefix}/share' |
1038 | datadir='${datarootdir}' | |
c906108c SS |
1039 | sysconfdir='${prefix}/etc' |
1040 | sharedstatedir='${prefix}/com' | |
1041 | localstatedir='${prefix}/var' | |
c906108c SS |
1042 | includedir='${prefix}/include' |
1043 | oldincludedir='/usr/include' | |
81ecdfbb RW |
1044 | docdir='${datarootdir}/doc/${PACKAGE}' |
1045 | infodir='${datarootdir}/info' | |
1046 | htmldir='${docdir}' | |
1047 | dvidir='${docdir}' | |
1048 | pdfdir='${docdir}' | |
1049 | psdir='${docdir}' | |
1050 | libdir='${exec_prefix}/lib' | |
1051 | localedir='${datarootdir}/locale' | |
1052 | mandir='${datarootdir}/man' | |
c906108c | 1053 | |
c906108c | 1054 | ac_prev= |
81ecdfbb | 1055 | ac_dashdash= |
c906108c SS |
1056 | for ac_option |
1057 | do | |
c906108c SS |
1058 | # If the previous option needs an argument, assign it. |
1059 | if test -n "$ac_prev"; then | |
81ecdfbb | 1060 | eval $ac_prev=\$ac_option |
c906108c SS |
1061 | ac_prev= |
1062 | continue | |
1063 | fi | |
1064 | ||
81ecdfbb RW |
1065 | case $ac_option in |
1066 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
1067 | *) ac_optarg=yes ;; | |
1068 | esac | |
c906108c SS |
1069 | |
1070 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1071 | ||
81ecdfbb RW |
1072 | case $ac_dashdash$ac_option in |
1073 | --) | |
1074 | ac_dashdash=yes ;; | |
c906108c SS |
1075 | |
1076 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1077 | ac_prev=bindir ;; | |
1078 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1079 | bindir=$ac_optarg ;; |
c906108c SS |
1080 | |
1081 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1082 | ac_prev=build_alias ;; |
c906108c | 1083 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1084 | build_alias=$ac_optarg ;; |
c906108c SS |
1085 | |
1086 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1087 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1088 | ac_prev=cache_file ;; | |
1089 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1090 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1091 | cache_file=$ac_optarg ;; |
1092 | ||
1093 | --config-cache | -C) | |
1094 | cache_file=config.cache ;; | |
c906108c | 1095 | |
81ecdfbb | 1096 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1097 | ac_prev=datadir ;; |
81ecdfbb | 1098 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1099 | datadir=$ac_optarg ;; |
c906108c | 1100 | |
81ecdfbb RW |
1101 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1102 | | --dataroo | --dataro | --datar) | |
1103 | ac_prev=datarootdir ;; | |
1104 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1105 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1106 | datarootdir=$ac_optarg ;; | |
1107 | ||
c906108c | 1108 | -disable-* | --disable-*) |
81ecdfbb | 1109 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1110 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1111 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1112 | as_fn_error "invalid feature name: $ac_useropt" | |
1113 | ac_useropt_orig=$ac_useropt | |
1114 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1115 | case $ac_user_opts in | |
1116 | *" | |
1117 | "enable_$ac_useropt" | |
1118 | "*) ;; | |
1119 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1120 | ac_unrecognized_sep=', ';; | |
1121 | esac | |
1122 | eval enable_$ac_useropt=no ;; | |
1123 | ||
1124 | -docdir | --docdir | --docdi | --doc | --do) | |
1125 | ac_prev=docdir ;; | |
1126 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1127 | docdir=$ac_optarg ;; | |
1128 | ||
1129 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1130 | ac_prev=dvidir ;; | |
1131 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1132 | dvidir=$ac_optarg ;; | |
c906108c SS |
1133 | |
1134 | -enable-* | --enable-*) | |
81ecdfbb | 1135 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1136 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1137 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1138 | as_fn_error "invalid feature name: $ac_useropt" | |
1139 | ac_useropt_orig=$ac_useropt | |
1140 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1141 | case $ac_user_opts in | |
1142 | *" | |
1143 | "enable_$ac_useropt" | |
1144 | "*) ;; | |
1145 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1146 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1147 | esac |
81ecdfbb | 1148 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1149 | |
1150 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1151 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1152 | | --exec | --exe | --ex) | |
1153 | ac_prev=exec_prefix ;; | |
1154 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1155 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1156 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1157 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1158 | |
1159 | -gas | --gas | --ga | --g) | |
1160 | # Obsolete; use --with-gas. | |
1161 | with_gas=yes ;; | |
1162 | ||
bec39cab AC |
1163 | -help | --help | --hel | --he | -h) |
1164 | ac_init_help=long ;; | |
1165 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1166 | ac_init_help=recursive ;; | |
1167 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1168 | ac_init_help=short ;; | |
c906108c SS |
1169 | |
1170 | -host | --host | --hos | --ho) | |
bec39cab | 1171 | ac_prev=host_alias ;; |
c906108c | 1172 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1173 | host_alias=$ac_optarg ;; |
c906108c | 1174 | |
81ecdfbb RW |
1175 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1176 | ac_prev=htmldir ;; | |
1177 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1178 | | --ht=*) | |
1179 | htmldir=$ac_optarg ;; | |
1180 | ||
c906108c SS |
1181 | -includedir | --includedir | --includedi | --included | --include \ |
1182 | | --includ | --inclu | --incl | --inc) | |
1183 | ac_prev=includedir ;; | |
1184 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1185 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1186 | includedir=$ac_optarg ;; |
c906108c SS |
1187 | |
1188 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1189 | ac_prev=infodir ;; | |
1190 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1191 | infodir=$ac_optarg ;; |
c906108c SS |
1192 | |
1193 | -libdir | --libdir | --libdi | --libd) | |
1194 | ac_prev=libdir ;; | |
1195 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1196 | libdir=$ac_optarg ;; |
c906108c SS |
1197 | |
1198 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1199 | | --libexe | --libex | --libe) | |
1200 | ac_prev=libexecdir ;; | |
1201 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1202 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1203 | libexecdir=$ac_optarg ;; |
c906108c | 1204 | |
81ecdfbb RW |
1205 | -localedir | --localedir | --localedi | --localed | --locale) |
1206 | ac_prev=localedir ;; | |
1207 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1208 | localedir=$ac_optarg ;; | |
1209 | ||
c906108c | 1210 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1211 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1212 | ac_prev=localstatedir ;; |
1213 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1214 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1215 | localstatedir=$ac_optarg ;; |
c906108c SS |
1216 | |
1217 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1218 | ac_prev=mandir ;; | |
1219 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1220 | mandir=$ac_optarg ;; |
c906108c SS |
1221 | |
1222 | -nfp | --nfp | --nf) | |
1223 | # Obsolete; use --without-fp. | |
1224 | with_fp=no ;; | |
1225 | ||
1226 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1227 | | --no-cr | --no-c | -n) |
c906108c SS |
1228 | no_create=yes ;; |
1229 | ||
1230 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1231 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1232 | no_recursion=yes ;; | |
1233 | ||
1234 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1235 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1236 | | --oldin | --oldi | --old | --ol | --o) | |
1237 | ac_prev=oldincludedir ;; | |
1238 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1239 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1240 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1241 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1242 | |
1243 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1244 | ac_prev=prefix ;; | |
1245 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1246 | prefix=$ac_optarg ;; |
c906108c SS |
1247 | |
1248 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1249 | | --program-pre | --program-pr | --program-p) | |
1250 | ac_prev=program_prefix ;; | |
1251 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1252 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1253 | program_prefix=$ac_optarg ;; |
c906108c SS |
1254 | |
1255 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1256 | | --program-suf | --program-su | --program-s) | |
1257 | ac_prev=program_suffix ;; | |
1258 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1259 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1260 | program_suffix=$ac_optarg ;; |
c906108c SS |
1261 | |
1262 | -program-transform-name | --program-transform-name \ | |
1263 | | --program-transform-nam | --program-transform-na \ | |
1264 | | --program-transform-n | --program-transform- \ | |
1265 | | --program-transform | --program-transfor \ | |
1266 | | --program-transfo | --program-transf \ | |
1267 | | --program-trans | --program-tran \ | |
1268 | | --progr-tra | --program-tr | --program-t) | |
1269 | ac_prev=program_transform_name ;; | |
1270 | -program-transform-name=* | --program-transform-name=* \ | |
1271 | | --program-transform-nam=* | --program-transform-na=* \ | |
1272 | | --program-transform-n=* | --program-transform-=* \ | |
1273 | | --program-transform=* | --program-transfor=* \ | |
1274 | | --program-transfo=* | --program-transf=* \ | |
1275 | | --program-trans=* | --program-tran=* \ | |
1276 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1277 | program_transform_name=$ac_optarg ;; |
c906108c | 1278 | |
81ecdfbb RW |
1279 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1280 | ac_prev=pdfdir ;; | |
1281 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1282 | pdfdir=$ac_optarg ;; | |
1283 | ||
1284 | -psdir | --psdir | --psdi | --psd | --ps) | |
1285 | ac_prev=psdir ;; | |
1286 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1287 | psdir=$ac_optarg ;; | |
1288 | ||
c906108c SS |
1289 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1290 | | -silent | --silent | --silen | --sile | --sil) | |
1291 | silent=yes ;; | |
1292 | ||
1293 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1294 | ac_prev=sbindir ;; | |
1295 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1296 | | --sbi=* | --sb=*) | |
bec39cab | 1297 | sbindir=$ac_optarg ;; |
c906108c SS |
1298 | |
1299 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1300 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1301 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1302 | | --sha | --sh) | |
1303 | ac_prev=sharedstatedir ;; | |
1304 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1305 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1306 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1307 | | --sha=* | --sh=*) | |
bec39cab | 1308 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1309 | |
1310 | -site | --site | --sit) | |
1311 | ac_prev=site ;; | |
1312 | -site=* | --site=* | --sit=*) | |
bec39cab | 1313 | site=$ac_optarg ;; |
3ace7edb | 1314 | |
c906108c SS |
1315 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1316 | ac_prev=srcdir ;; | |
1317 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1318 | srcdir=$ac_optarg ;; |
c906108c SS |
1319 | |
1320 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1321 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1322 | ac_prev=sysconfdir ;; | |
1323 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1324 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1325 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1326 | |
1327 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1328 | ac_prev=target_alias ;; |
c906108c | 1329 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1330 | target_alias=$ac_optarg ;; |
c906108c SS |
1331 | |
1332 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1333 | verbose=yes ;; | |
1334 | ||
bec39cab AC |
1335 | -version | --version | --versio | --versi | --vers | -V) |
1336 | ac_init_version=: ;; | |
c906108c SS |
1337 | |
1338 | -with-* | --with-*) | |
81ecdfbb | 1339 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1340 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1341 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1342 | as_fn_error "invalid package name: $ac_useropt" | |
1343 | ac_useropt_orig=$ac_useropt | |
1344 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1345 | case $ac_user_opts in | |
1346 | *" | |
1347 | "with_$ac_useropt" | |
1348 | "*) ;; | |
1349 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1350 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1351 | esac |
81ecdfbb | 1352 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1353 | |
1354 | -without-* | --without-*) | |
81ecdfbb | 1355 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1356 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1357 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1358 | as_fn_error "invalid package name: $ac_useropt" | |
1359 | ac_useropt_orig=$ac_useropt | |
1360 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1361 | case $ac_user_opts in | |
1362 | *" | |
1363 | "with_$ac_useropt" | |
1364 | "*) ;; | |
1365 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1366 | ac_unrecognized_sep=', ';; | |
1367 | esac | |
1368 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1369 | |
1370 | --x) | |
1371 | # Obsolete; use --with-x. | |
1372 | with_x=yes ;; | |
1373 | ||
1374 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1375 | | --x-incl | --x-inc | --x-in | --x-i) | |
1376 | ac_prev=x_includes ;; | |
1377 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1378 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1379 | x_includes=$ac_optarg ;; |
c906108c SS |
1380 | |
1381 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1382 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1383 | ac_prev=x_libraries ;; | |
1384 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1385 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1386 | x_libraries=$ac_optarg ;; |
c906108c | 1387 | |
81ecdfbb RW |
1388 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1389 | Try \`$0 --help' for more information." | |
c906108c SS |
1390 | ;; |
1391 | ||
bec39cab AC |
1392 | *=*) |
1393 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1394 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1395 | case $ac_envvar in #( |
1396 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1397 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1398 | esac | |
1399 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1400 | export $ac_envvar ;; |
1401 | ||
c906108c | 1402 | *) |
bec39cab | 1403 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1404 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1405 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1406 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1407 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1408 | ;; |
1409 | ||
1410 | esac | |
1411 | done | |
1412 | ||
1413 | if test -n "$ac_prev"; then | |
bec39cab | 1414 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1415 | as_fn_error "missing argument to $ac_option" |
c906108c | 1416 | fi |
c906108c | 1417 | |
81ecdfbb RW |
1418 | if test -n "$ac_unrecognized_opts"; then |
1419 | case $enable_option_checking in | |
1420 | no) ;; | |
1421 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1422 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1423 | esac |
81ecdfbb | 1424 | fi |
b4e70030 | 1425 | |
81ecdfbb RW |
1426 | # Check all directory arguments for consistency. |
1427 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1428 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1429 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1430 | libdir localedir mandir | |
b4e70030 | 1431 | do |
81ecdfbb RW |
1432 | eval ac_val=\$$ac_var |
1433 | # Remove trailing slashes. | |
1434 | case $ac_val in | |
1435 | */ ) | |
1436 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1437 | eval $ac_var=\$ac_val;; | |
1438 | esac | |
1439 | # Be sure to have absolute directory names. | |
b4e70030 | 1440 | case $ac_val in |
81ecdfbb RW |
1441 | [\\/$]* | ?:[\\/]* ) continue;; |
1442 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1443 | esac |
81ecdfbb | 1444 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1445 | done |
1446 | ||
bec39cab AC |
1447 | # There might be people who depend on the old broken behavior: `$host' |
1448 | # used to hold the argument of --host etc. | |
1449 | # FIXME: To remove some day. | |
1450 | build=$build_alias | |
1451 | host=$host_alias | |
1452 | target=$target_alias | |
1453 | ||
1454 | # FIXME: To remove some day. | |
1455 | if test "x$host_alias" != x; then | |
1456 | if test "x$build_alias" = x; then | |
1457 | cross_compiling=maybe | |
81ecdfbb | 1458 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1459 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1460 | elif test "x$build_alias" != "x$host_alias"; then | |
1461 | cross_compiling=yes | |
1462 | fi | |
1463 | fi | |
c906108c | 1464 | |
bec39cab AC |
1465 | ac_tool_prefix= |
1466 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1467 | ||
1468 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1469 | |
c906108c | 1470 | |
81ecdfbb RW |
1471 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1472 | ac_ls_di=`ls -di .` && | |
1473 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1474 | as_fn_error "working directory cannot be determined" | |
1475 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1476 | as_fn_error "pwd does not report name of working directory" | |
1477 | ||
1478 | ||
c906108c SS |
1479 | # Find the source files, if location was not specified. |
1480 | if test -z "$srcdir"; then | |
1481 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1482 | # Try the directory containing this script, then the parent directory. |
1483 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1484 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1485 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1486 | X"$as_myself" : 'X\(//\)$' \| \ | |
1487 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1488 | $as_echo X"$as_myself" | | |
1489 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1490 | s//\1/ | |
1491 | q | |
1492 | } | |
1493 | /^X\(\/\/\)[^/].*/{ | |
1494 | s//\1/ | |
1495 | q | |
1496 | } | |
1497 | /^X\(\/\/\)$/{ | |
1498 | s//\1/ | |
1499 | q | |
1500 | } | |
1501 | /^X\(\/\).*/{ | |
1502 | s//\1/ | |
1503 | q | |
1504 | } | |
1505 | s/.*/./; q'` | |
c906108c | 1506 | srcdir=$ac_confdir |
81ecdfbb | 1507 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1508 | srcdir=.. |
1509 | fi | |
1510 | else | |
1511 | ac_srcdir_defaulted=no | |
1512 | fi | |
81ecdfbb RW |
1513 | if test ! -r "$srcdir/$ac_unique_file"; then |
1514 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1515 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1516 | fi | |
1517 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1518 | ac_abs_confdir=`( | |
1519 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1520 | pwd)` | |
1521 | # When building in place, set srcdir=. | |
1522 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1523 | srcdir=. | |
1524 | fi | |
1525 | # Remove unnecessary trailing slashes from srcdir. | |
1526 | # Double slashes in file names in object file debugging info | |
1527 | # mess up M-x gdb in Emacs. | |
1528 | case $srcdir in | |
1529 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1530 | esac | |
1531 | for ac_var in $ac_precious_vars; do | |
1532 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1533 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1534 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1535 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1536 | done | |
c906108c | 1537 | |
bec39cab AC |
1538 | # |
1539 | # Report the --help message. | |
1540 | # | |
1541 | if test "$ac_init_help" = "long"; then | |
1542 | # Omit some internal or obsolete options to make the list less imposing. | |
1543 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1544 | cat <<_ACEOF | |
1545 | \`configure' configures this package to adapt to many kinds of systems. | |
1546 | ||
1547 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1548 | ||
1549 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1550 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1551 | ||
1552 | Defaults for the options are specified in brackets. | |
1553 | ||
1554 | Configuration: | |
1555 | -h, --help display this help and exit | |
1556 | --help=short display options specific to this package | |
1557 | --help=recursive display the short help of all the included packages | |
1558 | -V, --version display version information and exit | |
1559 | -q, --quiet, --silent do not print \`checking...' messages | |
1560 | --cache-file=FILE cache test results in FILE [disabled] | |
1561 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1562 | -n, --no-create do not create output files | |
1563 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1564 | ||
bec39cab AC |
1565 | Installation directories: |
1566 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1567 | [$ac_default_prefix] |
bec39cab | 1568 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1569 | [PREFIX] |
bec39cab AC |
1570 | |
1571 | By default, \`make install' will install all the files in | |
1572 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1573 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1574 | for instance \`--prefix=\$HOME'. | |
1575 | ||
1576 | For better control, use the options below. | |
1577 | ||
1578 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1579 | --bindir=DIR user executables [EPREFIX/bin] |
1580 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1581 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1582 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1583 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1584 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1585 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1586 | --includedir=DIR C header files [PREFIX/include] | |
1587 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1588 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1589 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1590 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1591 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1592 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1593 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1594 | --htmldir=DIR html documentation [DOCDIR] | |
1595 | --dvidir=DIR dvi documentation [DOCDIR] | |
1596 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1597 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1598 | _ACEOF |
1599 | ||
1600 | cat <<\_ACEOF | |
1601 | ||
1602 | Program names: | |
1603 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1604 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1605 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1606 | ||
1607 | X features: | |
1608 | --x-includes=DIR X include files are in DIR | |
1609 | --x-libraries=DIR X library files are in DIR | |
1610 | ||
1611 | System types: | |
1612 | --build=BUILD configure for building on BUILD [guessed] | |
1613 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1614 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1615 | _ACEOF | |
1616 | fi | |
1617 | ||
1618 | if test -n "$ac_init_help"; then | |
1619 | ||
1620 | cat <<\_ACEOF | |
1621 | ||
1622 | Optional Features: | |
81ecdfbb | 1623 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1624 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1625 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1626 | --enable-maintainer-mode enable make rules and dependencies not useful |
1627 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1628 | --enable-plugins Enable support for plugins (defaults no) |
1629 | --disable-largefile omit support for large files | |
e28b3332 DJ |
1630 | --disable-dependency-tracking speeds up one-time build |
1631 | --enable-dependency-tracking do not reject slow dependency extractors | |
a1220294 TT |
1632 | --enable-targets=TARGETS |
1633 | alternative target configurations | |
c0993dbe | 1634 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1635 | --disable-gdbcli disable command-line interface (CLI) |
1636 | --disable-gdbmi disable machine-interface (MI) | |
1637 | --enable-tui enable full-screen terminal user interface (TUI) | |
1638 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1639 | --enable-profiling enable profiling of GDB | |
3841debe | 1640 | --disable-rpath do not hardcode runtime library paths |
a1220294 | 1641 | --enable-werror treat compile warnings as errors |
32c1c914 | 1642 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1643 | --enable-gdb-build-warnings |
32c1c914 | 1644 | enable GDB specific build-time compiler warnings if |
a1220294 | 1645 | gcc is used |
32c1c914 | 1646 | --enable-sim link gdb with simulator |
bec39cab | 1647 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1648 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1649 | is auto) | |
bec39cab AC |
1650 | |
1651 | Optional Packages: | |
1652 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1653 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1654 | --with-separate-debug-dir=PATH |
32c1c914 | 1655 | look for global separate debug info in this path |
62e4f60c | 1656 | [LIBDIR/debug] |
b14b1491 TT |
1657 | --with-gdb-datadir=PATH look for global separate data files in this path |
1658 | [DATADIR/gdb] | |
29b0e8a2 | 1659 | --with-relocated-sources=PATH |
32c1c914 TT |
1660 | automatically relocate this path for source files |
1661 | --with-libunwind use libunwind frame unwinding support | |
cb01cfba JB |
1662 | --with-curses use the curses library instead of the termcap |
1663 | library | |
c16158bc JM |
1664 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1665 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1666 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1667 | --with-libiconv-prefix=DIR |
1668 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1669 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1670 | --with-system-readline use installed readline library |
b8e0a31c SD |
1671 | --with-jit-reader-dir=PATH |
1672 | directory to load the JIT readers from | |
5c39566f | 1673 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1674 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1675 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1676 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1677 | --with-python[=PYTHON] include python support |
1678 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1679 | --without-included-regex |
1680 | don't use included regex; this is the default on | |
1681 | systems with version 2 of the GNU C library (use | |
1682 | with caution on other system) | |
81ecdfbb | 1683 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1684 | --with-system-gdbinit=PATH |
32c1c914 | 1685 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1686 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1687 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1688 | --with-x use the X Window System |
bec39cab AC |
1689 | |
1690 | Some influential environment variables: | |
1691 | CC C compiler command | |
1692 | CFLAGS C compiler flags | |
1693 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1694 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1695 | LIBS libraries to pass to the linker, e.g. -l<library> |
1696 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1697 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1698 | CPP C preprocessor |
81ecdfbb RW |
1699 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1700 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1701 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1702 | This script will default YFLAGS to the empty string to avoid a | |
1703 | default value of `-d' given by some make applications. | |
1704 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1705 | |
1706 | Use these variables to override the choices made by `configure' or to help | |
1707 | it to find libraries and programs with nonstandard names/locations. | |
1708 | ||
81ecdfbb | 1709 | Report bugs to the package provider. |
bec39cab | 1710 | _ACEOF |
81ecdfbb | 1711 | ac_status=$? |
bec39cab AC |
1712 | fi |
1713 | ||
1714 | if test "$ac_init_help" = "recursive"; then | |
1715 | # If there are subdirs, report their specific --help. | |
bec39cab | 1716 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1717 | test -d "$ac_dir" || |
1718 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1719 | continue | |
bec39cab AC |
1720 | ac_builddir=. |
1721 | ||
81ecdfbb RW |
1722 | case "$ac_dir" in |
1723 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1724 | *) | |
1725 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1726 | # A ".." for each directory in $ac_dir_suffix. | |
1727 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1728 | case $ac_top_builddir_sub in | |
1729 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1730 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1731 | esac ;; | |
1732 | esac | |
1733 | ac_abs_top_builddir=$ac_pwd | |
1734 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1735 | # for backward compatibility: | |
1736 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1737 | |
1738 | case $srcdir in | |
81ecdfbb | 1739 | .) # We are building in place. |
bec39cab | 1740 | ac_srcdir=. |
81ecdfbb RW |
1741 | ac_top_srcdir=$ac_top_builddir_sub |
1742 | ac_abs_top_srcdir=$ac_pwd ;; | |
1743 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1744 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1745 | ac_top_srcdir=$srcdir |
1746 | ac_abs_top_srcdir=$srcdir ;; | |
1747 | *) # Relative name. | |
1748 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1749 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1750 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1751 | esac |
81ecdfbb | 1752 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1753 | |
81ecdfbb RW |
1754 | cd "$ac_dir" || { ac_status=$?; continue; } |
1755 | # Check for guested configure. | |
1756 | if test -f "$ac_srcdir/configure.gnu"; then | |
1757 | echo && | |
1758 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1759 | elif test -f "$ac_srcdir/configure"; then | |
1760 | echo && | |
1761 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1762 | else |
81ecdfbb RW |
1763 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1764 | fi || ac_status=$? | |
1765 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1766 | done |
1767 | fi | |
1768 | ||
81ecdfbb | 1769 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1770 | if $ac_init_version; then |
1771 | cat <<\_ACEOF | |
81ecdfbb RW |
1772 | configure |
1773 | generated by GNU Autoconf 2.64 | |
bec39cab | 1774 | |
81ecdfbb | 1775 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1776 | This configure script is free software; the Free Software Foundation |
1777 | gives unlimited permission to copy, distribute and modify it. | |
1778 | _ACEOF | |
81ecdfbb | 1779 | exit |
bec39cab | 1780 | fi |
bec39cab | 1781 | |
81ecdfbb RW |
1782 | ## ------------------------ ## |
1783 | ## Autoconf initialization. ## | |
1784 | ## ------------------------ ## | |
bec39cab | 1785 | |
81ecdfbb RW |
1786 | # ac_fn_c_try_compile LINENO |
1787 | # -------------------------- | |
1788 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1789 | ac_fn_c_try_compile () | |
1790 | { | |
1791 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1792 | rm -f conftest.$ac_objext | |
1793 | if { { ac_try="$ac_compile" | |
1794 | case "(($ac_try" in | |
1795 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1796 | *) ac_try_echo=$ac_try;; | |
1797 | esac | |
1798 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1799 | $as_echo "$ac_try_echo"; } >&5 | |
1800 | (eval "$ac_compile") 2>conftest.err | |
1801 | ac_status=$? | |
1802 | if test -s conftest.err; then | |
1803 | grep -v '^ *+' conftest.err >conftest.er1 | |
1804 | cat conftest.er1 >&5 | |
1805 | mv -f conftest.er1 conftest.err | |
1806 | fi | |
1807 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1808 | test $ac_status = 0; } && { | |
1809 | test -z "$ac_c_werror_flag" || | |
1810 | test ! -s conftest.err | |
1811 | } && test -s conftest.$ac_objext; then : | |
1812 | ac_retval=0 | |
1813 | else | |
1814 | $as_echo "$as_me: failed program was:" >&5 | |
1815 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1816 | |
81ecdfbb RW |
1817 | ac_retval=1 |
1818 | fi | |
1819 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1820 | return $ac_retval | |
1821 | ||
1822 | } # ac_fn_c_try_compile | |
1823 | ||
1824 | # ac_fn_c_try_cpp LINENO | |
1825 | # ---------------------- | |
1826 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1827 | ac_fn_c_try_cpp () | |
bec39cab | 1828 | { |
81ecdfbb RW |
1829 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1830 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1831 | case "(($ac_try" in | |
1832 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1833 | *) ac_try_echo=$ac_try;; | |
1834 | esac | |
1835 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1836 | $as_echo "$ac_try_echo"; } >&5 | |
1837 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1838 | ac_status=$? | |
1839 | if test -s conftest.err; then | |
1840 | grep -v '^ *+' conftest.err >conftest.er1 | |
1841 | cat conftest.er1 >&5 | |
1842 | mv -f conftest.er1 conftest.err | |
1843 | fi | |
1844 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1845 | test $ac_status = 0; } >/dev/null && { | |
1846 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1847 | test ! -s conftest.err | |
1848 | }; then : | |
1849 | ac_retval=0 | |
1850 | else | |
1851 | $as_echo "$as_me: failed program was:" >&5 | |
1852 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1853 | |
81ecdfbb RW |
1854 | ac_retval=1 |
1855 | fi | |
1856 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1857 | return $ac_retval | |
bec39cab | 1858 | |
81ecdfbb | 1859 | } # ac_fn_c_try_cpp |
bec39cab | 1860 | |
81ecdfbb RW |
1861 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1862 | # ------------------------------------------------------- | |
1863 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1864 | # the include files in INCLUDES and setting the cache variable VAR | |
1865 | # accordingly. | |
1866 | ac_fn_c_check_header_mongrel () | |
1867 | { | |
1868 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1869 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1871 | $as_echo_n "checking for $2... " >&6; } | |
1872 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1873 | $as_echo_n "(cached) " >&6 | |
1874 | fi | |
1875 | eval ac_res=\$$3 | |
1876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1877 | $as_echo "$ac_res" >&6; } | |
1878 | else | |
1879 | # Is the header compilable? | |
1880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1881 | $as_echo_n "checking $2 usability... " >&6; } | |
1882 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1883 | /* end confdefs.h. */ | |
1884 | $4 | |
1885 | #include <$2> | |
1886 | _ACEOF | |
1887 | if ac_fn_c_try_compile "$LINENO"; then : | |
1888 | ac_header_compiler=yes | |
1889 | else | |
1890 | ac_header_compiler=no | |
1891 | fi | |
1892 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1894 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1895 | |
81ecdfbb RW |
1896 | # Is the header present? |
1897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1898 | $as_echo_n "checking $2 presence... " >&6; } | |
1899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1900 | /* end confdefs.h. */ | |
1901 | #include <$2> | |
1902 | _ACEOF | |
1903 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1904 | ac_header_preproc=yes | |
1905 | else | |
1906 | ac_header_preproc=no | |
1907 | fi | |
1908 | rm -f conftest.err conftest.$ac_ext | |
1909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1910 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1911 | |
81ecdfbb RW |
1912 | # So? What about this header? |
1913 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1914 | yes:no: ) | |
1915 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1916 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1917 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1918 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1919 | ;; | |
1920 | no:yes:* ) | |
1921 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1922 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1923 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1924 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1925 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1926 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1927 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1928 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1929 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1930 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1931 | ;; | |
1932 | esac | |
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 | eval "$3=\$ac_header_compiler" | |
1939 | fi | |
1940 | eval ac_res=\$$3 | |
1941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1942 | $as_echo "$ac_res" >&6; } | |
1943 | fi | |
1944 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1945 | |
81ecdfbb | 1946 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1947 | |
81ecdfbb RW |
1948 | # ac_fn_c_try_run LINENO |
1949 | # ---------------------- | |
1950 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1951 | # that executables *can* be run. | |
1952 | ac_fn_c_try_run () | |
1953 | { | |
1954 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1955 | if { { ac_try="$ac_link" | |
1956 | case "(($ac_try" in | |
1957 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1958 | *) ac_try_echo=$ac_try;; | |
1959 | esac | |
1960 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1961 | $as_echo "$ac_try_echo"; } >&5 | |
1962 | (eval "$ac_link") 2>&5 | |
1963 | ac_status=$? | |
1964 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1965 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1966 | { { case "(($ac_try" in | |
1967 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1968 | *) ac_try_echo=$ac_try;; | |
1969 | esac | |
1970 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1971 | $as_echo "$ac_try_echo"; } >&5 | |
1972 | (eval "$ac_try") 2>&5 | |
1973 | ac_status=$? | |
1974 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1975 | test $ac_status = 0; }; }; then : | |
1976 | ac_retval=0 | |
1977 | else | |
1978 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1979 | $as_echo "$as_me: failed program was:" >&5 | |
1980 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1981 | |
81ecdfbb RW |
1982 | ac_retval=$ac_status |
1983 | fi | |
1984 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1985 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1986 | return $ac_retval | |
bec39cab | 1987 | |
81ecdfbb | 1988 | } # ac_fn_c_try_run |
bec39cab | 1989 | |
81ecdfbb RW |
1990 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1991 | # ------------------------------------------------------- | |
1992 | # Tests whether HEADER exists and can be compiled using the include files in | |
1993 | # INCLUDES, setting the cache variable VAR accordingly. | |
1994 | ac_fn_c_check_header_compile () | |
1995 | { | |
1996 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1998 | $as_echo_n "checking for $2... " >&6; } | |
1999 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2000 | $as_echo_n "(cached) " >&6 | |
2001 | else | |
2002 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2003 | /* end confdefs.h. */ | |
2004 | $4 | |
2005 | #include <$2> | |
bec39cab | 2006 | _ACEOF |
81ecdfbb RW |
2007 | if ac_fn_c_try_compile "$LINENO"; then : |
2008 | eval "$3=yes" | |
2009 | else | |
2010 | eval "$3=no" | |
2011 | fi | |
2012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2013 | fi | |
2014 | eval ac_res=\$$3 | |
2015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2016 | $as_echo "$ac_res" >&6; } | |
2017 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2018 | |
81ecdfbb | 2019 | } # ac_fn_c_check_header_compile |
bec39cab | 2020 | |
81ecdfbb RW |
2021 | # ac_fn_c_try_link LINENO |
2022 | # ----------------------- | |
2023 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2024 | ac_fn_c_try_link () | |
b4e70030 | 2025 | { |
81ecdfbb RW |
2026 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
2027 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2028 | if { { ac_try="$ac_link" | |
2029 | case "(($ac_try" in | |
2030 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2031 | *) ac_try_echo=$ac_try;; | |
2032 | esac | |
2033 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2034 | $as_echo "$ac_try_echo"; } >&5 | |
2035 | (eval "$ac_link") 2>conftest.err | |
2036 | ac_status=$? | |
2037 | if test -s conftest.err; then | |
2038 | grep -v '^ *+' conftest.err >conftest.er1 | |
2039 | cat conftest.er1 >&5 | |
2040 | mv -f conftest.er1 conftest.err | |
2041 | fi | |
2042 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2043 | test $ac_status = 0; } && { | |
2044 | test -z "$ac_c_werror_flag" || | |
2045 | test ! -s conftest.err | |
2046 | } && test -s conftest$ac_exeext && { | |
2047 | test "$cross_compiling" = yes || | |
2048 | $as_test_x conftest$ac_exeext | |
2049 | }; then : | |
2050 | ac_retval=0 | |
2051 | else | |
2052 | $as_echo "$as_me: failed program was:" >&5 | |
2053 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2054 | |
81ecdfbb RW |
2055 | ac_retval=1 |
2056 | fi | |
2057 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2058 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2059 | # interfere with the next link command; also delete a directory that is | |
2060 | # left behind by Apple's compiler. We do this before executing the actions. | |
2061 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2062 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2063 | return $ac_retval | |
bec39cab | 2064 | |
81ecdfbb | 2065 | } # ac_fn_c_try_link |
bec39cab | 2066 | |
81ecdfbb RW |
2067 | # ac_fn_c_check_func LINENO FUNC VAR |
2068 | # ---------------------------------- | |
2069 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2070 | ac_fn_c_check_func () | |
2071 | { | |
2072 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2074 | $as_echo_n "checking for $2... " >&6; } | |
2075 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2076 | $as_echo_n "(cached) " >&6 | |
2077 | else | |
2078 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2079 | /* end confdefs.h. */ | |
2080 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2081 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2082 | #define $2 innocuous_$2 | |
bec39cab | 2083 | |
81ecdfbb RW |
2084 | /* System header to define __stub macros and hopefully few prototypes, |
2085 | which can conflict with char $2 (); below. | |
2086 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2087 | <limits.h> exists even on freestanding compilers. */ | |
bec39cab | 2088 | |
81ecdfbb RW |
2089 | #ifdef __STDC__ |
2090 | # include <limits.h> | |
2091 | #else | |
2092 | # include <assert.h> | |
2093 | #endif | |
bec39cab | 2094 | |
81ecdfbb | 2095 | #undef $2 |
bec39cab | 2096 | |
81ecdfbb RW |
2097 | /* Override any GCC internal prototype to avoid an error. |
2098 | Use char because int might match the return type of a GCC | |
2099 | builtin and then its argument prototype would still apply. */ | |
2100 | #ifdef __cplusplus | |
2101 | extern "C" | |
2102 | #endif | |
2103 | char $2 (); | |
2104 | /* The GNU C library defines this for functions which it implements | |
2105 | to always fail with ENOSYS. Some functions are actually named | |
2106 | something starting with __ and the normal name is an alias. */ | |
2107 | #if defined __stub_$2 || defined __stub___$2 | |
2108 | choke me | |
2109 | #endif | |
bec39cab | 2110 | |
81ecdfbb RW |
2111 | int |
2112 | main () | |
2113 | { | |
2114 | return $2 (); | |
2115 | ; | |
2116 | return 0; | |
2117 | } | |
bec39cab | 2118 | _ACEOF |
81ecdfbb RW |
2119 | if ac_fn_c_try_link "$LINENO"; then : |
2120 | eval "$3=yes" | |
2121 | else | |
2122 | eval "$3=no" | |
2123 | fi | |
2124 | rm -f core conftest.err conftest.$ac_objext \ | |
2125 | conftest$ac_exeext conftest.$ac_ext | |
2126 | fi | |
2127 | eval ac_res=\$$3 | |
2128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2129 | $as_echo "$ac_res" >&6; } | |
2130 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2131 | |
81ecdfbb | 2132 | } # ac_fn_c_check_func |
bec39cab | 2133 | |
81ecdfbb RW |
2134 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2135 | # ------------------------------------ | |
2136 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2137 | ac_fn_c_check_decl () | |
2138 | { | |
2139 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
e7a30f46 DE |
2140 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
2141 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2143 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
81ecdfbb RW |
2144 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
2145 | $as_echo_n "(cached) " >&6 | |
2146 | else | |
2147 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2148 | /* end confdefs.h. */ | |
2149 | $4 | |
2150 | int | |
2151 | main () | |
2152 | { | |
e7a30f46 DE |
2153 | #ifndef $as_decl_name |
2154 | #ifdef __cplusplus | |
2155 | (void) $as_decl_use; | |
2156 | #else | |
2157 | (void) $as_decl_name; | |
2158 | #endif | |
81ecdfbb | 2159 | #endif |
bec39cab | 2160 | |
81ecdfbb RW |
2161 | ; |
2162 | return 0; | |
2163 | } | |
bec39cab | 2164 | _ACEOF |
81ecdfbb RW |
2165 | if ac_fn_c_try_compile "$LINENO"; then : |
2166 | eval "$3=yes" | |
2167 | else | |
2168 | eval "$3=no" | |
2169 | fi | |
2170 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2171 | fi | |
2172 | eval ac_res=\$$3 | |
2173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2174 | $as_echo "$ac_res" >&6; } | |
2175 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2176 | |
81ecdfbb | 2177 | } # ac_fn_c_check_decl |
bec39cab | 2178 | |
81ecdfbb RW |
2179 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2180 | # -------------------------------------------- | |
2181 | # Tries to find the compile-time value of EXPR in a program that includes | |
2182 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2183 | # computed | |
2184 | ac_fn_c_compute_int () | |
2185 | { | |
2186 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2187 | if test "$cross_compiling" = yes; then | |
2188 | # Depending upon the size, compute the lo and hi bounds. | |
2189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2190 | /* end confdefs.h. */ | |
2191 | $4 | |
2192 | int | |
2193 | main () | |
2194 | { | |
2195 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2196 | test_array [0] = 0 | |
bec39cab | 2197 | |
81ecdfbb RW |
2198 | ; |
2199 | return 0; | |
2200 | } | |
2201 | _ACEOF | |
2202 | if ac_fn_c_try_compile "$LINENO"; then : | |
2203 | ac_lo=0 ac_mid=0 | |
2204 | while :; do | |
2205 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2206 | /* end confdefs.h. */ | |
2207 | $4 | |
2208 | int | |
2209 | main () | |
2210 | { | |
2211 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2212 | test_array [0] = 0 | |
bec39cab | 2213 | |
81ecdfbb RW |
2214 | ; |
2215 | return 0; | |
2216 | } | |
2217 | _ACEOF | |
2218 | if ac_fn_c_try_compile "$LINENO"; then : | |
2219 | ac_hi=$ac_mid; break | |
2220 | else | |
2221 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2222 | if test $ac_lo -le $ac_mid; then | |
2223 | ac_lo= ac_hi= | |
2224 | break | |
2225 | fi | |
2226 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2227 | fi |
81ecdfbb RW |
2228 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2229 | done | |
c906108c | 2230 | else |
81ecdfbb RW |
2231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2232 | /* end confdefs.h. */ | |
2233 | $4 | |
2234 | int | |
2235 | main () | |
2236 | { | |
2237 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2238 | test_array [0] = 0 | |
bec39cab | 2239 | |
81ecdfbb RW |
2240 | ; |
2241 | return 0; | |
2242 | } | |
2243 | _ACEOF | |
2244 | if ac_fn_c_try_compile "$LINENO"; then : | |
2245 | ac_hi=-1 ac_mid=-1 | |
2246 | while :; do | |
2247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2248 | /* end confdefs.h. */ | |
2249 | $4 | |
2250 | int | |
2251 | main () | |
2252 | { | |
2253 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2254 | test_array [0] = 0 | |
bec39cab | 2255 | |
81ecdfbb RW |
2256 | ; |
2257 | return 0; | |
2258 | } | |
2259 | _ACEOF | |
2260 | if ac_fn_c_try_compile "$LINENO"; then : | |
2261 | ac_lo=$ac_mid; break | |
2262 | else | |
2263 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2264 | if test $ac_mid -le $ac_hi; then | |
2265 | ac_lo= ac_hi= | |
2266 | break | |
2267 | fi | |
2268 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2269 | fi | |
2270 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2271 | done | |
2272 | else | |
2273 | ac_lo= ac_hi= | |
2274 | fi | |
2275 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2276 | fi | |
2277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2278 | # Binary search between lo and hi bounds. | |
2279 | while test "x$ac_lo" != "x$ac_hi"; do | |
2280 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2282 | /* end confdefs.h. */ | |
2283 | $4 | |
2284 | int | |
2285 | main () | |
2286 | { | |
2287 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2288 | test_array [0] = 0 | |
bec39cab | 2289 | |
81ecdfbb RW |
2290 | ; |
2291 | return 0; | |
2292 | } | |
2293 | _ACEOF | |
2294 | if ac_fn_c_try_compile "$LINENO"; then : | |
2295 | ac_hi=$ac_mid | |
2296 | else | |
2297 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2298 | fi | |
2299 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2300 | done | |
2301 | case $ac_lo in #(( | |
2302 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2303 | '') ac_retval=1 ;; | |
2304 | esac | |
2305 | else | |
2306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2307 | /* end confdefs.h. */ | |
2308 | $4 | |
2309 | static long int longval () { return $2; } | |
2310 | static unsigned long int ulongval () { return $2; } | |
2311 | #include <stdio.h> | |
2312 | #include <stdlib.h> | |
2313 | int | |
2314 | main () | |
2315 | { | |
bec39cab | 2316 | |
81ecdfbb RW |
2317 | FILE *f = fopen ("conftest.val", "w"); |
2318 | if (! f) | |
2319 | return 1; | |
2320 | if (($2) < 0) | |
2321 | { | |
2322 | long int i = longval (); | |
2323 | if (i != ($2)) | |
2324 | return 1; | |
2325 | fprintf (f, "%ld", i); | |
2326 | } | |
2327 | else | |
2328 | { | |
2329 | unsigned long int i = ulongval (); | |
2330 | if (i != ($2)) | |
2331 | return 1; | |
2332 | fprintf (f, "%lu", i); | |
2333 | } | |
2334 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2335 | on some platforms. */ | |
2336 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2337 | |
81ecdfbb RW |
2338 | ; |
2339 | return 0; | |
2340 | } | |
2341 | _ACEOF | |
2342 | if ac_fn_c_try_run "$LINENO"; then : | |
2343 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2344 | else | |
2345 | ac_retval=1 | |
2346 | fi | |
2347 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2348 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2349 | rm -f conftest.val | |
bec39cab | 2350 | |
81ecdfbb RW |
2351 | fi |
2352 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2353 | return $ac_retval | |
bec39cab | 2354 | |
81ecdfbb | 2355 | } # ac_fn_c_compute_int |
bec39cab | 2356 | |
81ecdfbb RW |
2357 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2358 | # ---------------------------------------------------- | |
2359 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2360 | # INCLUDES, setting cache variable VAR accordingly. | |
2361 | ac_fn_c_check_member () | |
2362 | { | |
2363 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2365 | $as_echo_n "checking for $2.$3... " >&6; } | |
2366 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2367 | $as_echo_n "(cached) " >&6 | |
2368 | else | |
2369 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2370 | /* end confdefs.h. */ | |
2371 | $5 | |
2372 | int | |
2373 | main () | |
2374 | { | |
2375 | static $2 ac_aggr; | |
2376 | if (ac_aggr.$3) | |
2377 | return 0; | |
2378 | ; | |
2379 | return 0; | |
2380 | } | |
2381 | _ACEOF | |
2382 | if ac_fn_c_try_compile "$LINENO"; then : | |
2383 | eval "$4=yes" | |
2384 | else | |
2385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2386 | /* end confdefs.h. */ | |
2387 | $5 | |
2388 | int | |
2389 | main () | |
2390 | { | |
2391 | static $2 ac_aggr; | |
2392 | if (sizeof ac_aggr.$3) | |
2393 | return 0; | |
2394 | ; | |
2395 | return 0; | |
2396 | } | |
2397 | _ACEOF | |
2398 | if ac_fn_c_try_compile "$LINENO"; then : | |
2399 | eval "$4=yes" | |
2400 | else | |
2401 | eval "$4=no" | |
2402 | fi | |
2403 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2404 | fi | |
2405 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2406 | fi | |
2407 | eval ac_res=\$$4 | |
2408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2409 | $as_echo "$ac_res" >&6; } | |
2410 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2411 | |
81ecdfbb | 2412 | } # ac_fn_c_check_member |
bec39cab | 2413 | |
81ecdfbb RW |
2414 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2415 | # ------------------------------------------- | |
2416 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2417 | # variable VAR accordingly. | |
2418 | ac_fn_c_check_type () | |
2419 | { | |
2420 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2422 | $as_echo_n "checking for $2... " >&6; } | |
2423 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2424 | $as_echo_n "(cached) " >&6 | |
2425 | else | |
2426 | eval "$3=no" | |
2427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2428 | /* end confdefs.h. */ | |
2429 | $4 | |
2430 | int | |
2431 | main () | |
2432 | { | |
2433 | if (sizeof ($2)) | |
2434 | return 0; | |
2435 | ; | |
2436 | return 0; | |
2437 | } | |
2438 | _ACEOF | |
2439 | if ac_fn_c_try_compile "$LINENO"; then : | |
2440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2441 | /* end confdefs.h. */ | |
2442 | $4 | |
2443 | int | |
2444 | main () | |
2445 | { | |
2446 | if (sizeof (($2))) | |
2447 | return 0; | |
2448 | ; | |
2449 | return 0; | |
2450 | } | |
2451 | _ACEOF | |
2452 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2453 | |
81ecdfbb RW |
2454 | else |
2455 | eval "$3=yes" | |
2456 | fi | |
2457 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2458 | fi | |
2459 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2460 | fi | |
2461 | eval ac_res=\$$3 | |
2462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2463 | $as_echo "$ac_res" >&6; } | |
2464 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2465 | |
81ecdfbb RW |
2466 | } # ac_fn_c_check_type |
2467 | cat >config.log <<_ACEOF | |
2468 | This file contains any messages produced by compilers while | |
2469 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2470 | |
81ecdfbb RW |
2471 | It was created by $as_me, which was |
2472 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2473 | |
81ecdfbb | 2474 | $ $0 $@ |
413ccac7 | 2475 | |
81ecdfbb RW |
2476 | _ACEOF |
2477 | exec 5>>config.log | |
2478 | { | |
2479 | cat <<_ASUNAME | |
2480 | ## --------- ## | |
2481 | ## Platform. ## | |
2482 | ## --------- ## | |
413ccac7 | 2483 | |
81ecdfbb RW |
2484 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2485 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2486 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2487 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2488 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2489 | |
81ecdfbb RW |
2490 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2491 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2492 | |
81ecdfbb RW |
2493 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2494 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2495 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2496 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2497 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2498 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2499 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2500 | |
81ecdfbb | 2501 | _ASUNAME |
bec39cab | 2502 | |
bec39cab AC |
2503 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2504 | for as_dir in $PATH | |
2505 | do | |
2506 | IFS=$as_save_IFS | |
2507 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2508 | $as_echo "PATH: $as_dir" |
2509 | done | |
2510 | IFS=$as_save_IFS | |
bec39cab | 2511 | |
81ecdfbb | 2512 | } >&5 |
bec39cab | 2513 | |
81ecdfbb | 2514 | cat >&5 <<_ACEOF |
bec39cab | 2515 | |
bec39cab | 2516 | |
81ecdfbb RW |
2517 | ## ----------- ## |
2518 | ## Core tests. ## | |
2519 | ## ----------- ## | |
2520 | ||
2521 | _ACEOF | |
2522 | ||
2523 | ||
2524 | # Keep a trace of the command line. | |
2525 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2526 | # Strip out --silent because we don't want to record it for future runs. | |
2527 | # Also quote any args containing shell meta-characters. | |
2528 | # Make two passes to allow for proper duplicate-argument suppression. | |
2529 | ac_configure_args= | |
2530 | ac_configure_args0= | |
2531 | ac_configure_args1= | |
2532 | ac_must_keep_next=false | |
2533 | for ac_pass in 1 2 | |
2534 | do | |
2535 | for ac_arg | |
2536 | do | |
2537 | case $ac_arg in | |
2538 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2539 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2540 | | -silent | --silent | --silen | --sile | --sil) | |
2541 | continue ;; | |
2542 | *\'*) | |
2543 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2544 | esac | |
2545 | case $ac_pass in | |
2546 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2547 | 2) | |
2548 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2549 | if test $ac_must_keep_next = true; then | |
2550 | ac_must_keep_next=false # Got value, back to normal. | |
2551 | else | |
2552 | case $ac_arg in | |
2553 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2554 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2555 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2556 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2557 | case "$ac_configure_args0 " in | |
2558 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2559 | esac | |
2560 | ;; | |
2561 | -* ) ac_must_keep_next=true ;; | |
2562 | esac | |
2563 | fi | |
2564 | as_fn_append ac_configure_args " '$ac_arg'" | |
2565 | ;; | |
2566 | esac | |
2567 | done | |
2568 | done | |
2569 | { ac_configure_args0=; unset ac_configure_args0;} | |
2570 | { ac_configure_args1=; unset ac_configure_args1;} | |
2571 | ||
2572 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2573 | # config.log. We remove comments because anyway the quotes in there | |
2574 | # would cause problems or look ugly. | |
2575 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2576 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2577 | trap 'exit_status=$? | |
2578 | # Save into config.log some information that might help in debugging. | |
2579 | { | |
2580 | echo | |
2581 | ||
2582 | cat <<\_ASBOX | |
2583 | ## ---------------- ## | |
2584 | ## Cache variables. ## | |
2585 | ## ---------------- ## | |
2586 | _ASBOX | |
2587 | echo | |
2588 | # The following way of writing the cache mishandles newlines in values, | |
2589 | ( | |
2590 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2591 | eval ac_val=\$$ac_var | |
2592 | case $ac_val in #( | |
2593 | *${as_nl}*) | |
2594 | case $ac_var in #( | |
2595 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2596 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2597 | esac | |
2598 | case $ac_var in #( | |
2599 | _ | IFS | as_nl) ;; #( | |
2600 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2601 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2602 | esac ;; | |
2603 | esac | |
2604 | done | |
2605 | (set) 2>&1 | | |
2606 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2607 | *${as_nl}ac_space=\ *) | |
2608 | sed -n \ | |
2609 | "s/'\''/'\''\\\\'\'''\''/g; | |
2610 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2611 | ;; #( | |
2612 | *) | |
2613 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2614 | ;; | |
2615 | esac | | |
2616 | sort | |
2617 | ) | |
2618 | echo | |
2619 | ||
2620 | cat <<\_ASBOX | |
2621 | ## ----------------- ## | |
2622 | ## Output variables. ## | |
2623 | ## ----------------- ## | |
2624 | _ASBOX | |
2625 | echo | |
2626 | for ac_var in $ac_subst_vars | |
2627 | do | |
2628 | eval ac_val=\$$ac_var | |
2629 | case $ac_val in | |
2630 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2631 | esac | |
2632 | $as_echo "$ac_var='\''$ac_val'\''" | |
2633 | done | sort | |
2634 | echo | |
2635 | ||
2636 | if test -n "$ac_subst_files"; then | |
2637 | cat <<\_ASBOX | |
2638 | ## ------------------- ## | |
2639 | ## File substitutions. ## | |
2640 | ## ------------------- ## | |
2641 | _ASBOX | |
2642 | echo | |
2643 | for ac_var in $ac_subst_files | |
2644 | do | |
2645 | eval ac_val=\$$ac_var | |
2646 | case $ac_val in | |
2647 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2648 | esac | |
2649 | $as_echo "$ac_var='\''$ac_val'\''" | |
2650 | done | sort | |
2651 | echo | |
2652 | fi | |
2653 | ||
2654 | if test -s confdefs.h; then | |
2655 | cat <<\_ASBOX | |
2656 | ## ----------- ## | |
2657 | ## confdefs.h. ## | |
2658 | ## ----------- ## | |
2659 | _ASBOX | |
2660 | echo | |
2661 | cat confdefs.h | |
2662 | echo | |
2663 | fi | |
2664 | test "$ac_signal" != 0 && | |
2665 | $as_echo "$as_me: caught signal $ac_signal" | |
2666 | $as_echo "$as_me: exit $exit_status" | |
2667 | } >&5 | |
2668 | rm -f core *.core core.conftest.* && | |
2669 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2670 | exit $exit_status | |
2671 | ' 0 | |
2672 | for ac_signal in 1 2 13 15; do | |
2673 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2674 | done | |
2675 | ac_signal=0 | |
2676 | ||
2677 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2678 | rm -f -r conftest* confdefs.h | |
2679 | ||
2680 | $as_echo "/* confdefs.h */" > confdefs.h | |
2681 | ||
2682 | # Predefined preprocessor variables. | |
2683 | ||
2684 | cat >>confdefs.h <<_ACEOF | |
2685 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2686 | _ACEOF | |
2687 | ||
2688 | cat >>confdefs.h <<_ACEOF | |
2689 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2690 | _ACEOF | |
2691 | ||
2692 | cat >>confdefs.h <<_ACEOF | |
2693 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2694 | _ACEOF | |
2695 | ||
2696 | cat >>confdefs.h <<_ACEOF | |
2697 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2698 | _ACEOF | |
2699 | ||
2700 | cat >>confdefs.h <<_ACEOF | |
2701 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2702 | _ACEOF | |
2703 | ||
2704 | cat >>confdefs.h <<_ACEOF | |
2705 | #define PACKAGE_URL "$PACKAGE_URL" | |
2706 | _ACEOF | |
2707 | ||
2708 | ||
2709 | # Let the site file select an alternate cache file if it wants to. | |
2710 | # Prefer an explicitly selected file to automatically selected ones. | |
2711 | ac_site_file1=NONE | |
2712 | ac_site_file2=NONE | |
2713 | if test -n "$CONFIG_SITE"; then | |
2714 | ac_site_file1=$CONFIG_SITE | |
2715 | elif test "x$prefix" != xNONE; then | |
2716 | ac_site_file1=$prefix/share/config.site | |
2717 | ac_site_file2=$prefix/etc/config.site | |
2718 | else | |
2719 | ac_site_file1=$ac_default_prefix/share/config.site | |
2720 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2721 | fi | |
2722 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2723 | do | |
2724 | test "x$ac_site_file" = xNONE && continue | |
2725 | if test -r "$ac_site_file"; then | |
2726 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2727 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2728 | sed 's/^/| /' "$ac_site_file" >&5 | |
2729 | . "$ac_site_file" | |
2730 | fi | |
2731 | done | |
2732 | ||
2733 | if test -r "$cache_file"; then | |
2734 | # Some versions of bash will fail to source /dev/null (special | |
2735 | # files actually), so we avoid doing that. | |
2736 | if test -f "$cache_file"; then | |
2737 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2738 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2739 | case $cache_file in | |
2740 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2741 | *) . "./$cache_file";; | |
2742 | esac | |
2743 | fi | |
2744 | else | |
2745 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2746 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2747 | >$cache_file | |
bec39cab AC |
2748 | fi |
2749 | ||
f434ba03 PA |
2750 | gl_header_list="$gl_header_list sys/mman.h" |
2751 | gl_func_list="$gl_func_list mprotect" | |
2752 | gl_func_list="$gl_func_list memchr" | |
2753 | gl_header_list="$gl_header_list stddef.h" | |
81ecdfbb RW |
2754 | gl_header_list="$gl_header_list stdint.h" |
2755 | gl_header_list="$gl_header_list wchar.h" | |
2756 | gl_header_list="$gl_header_list string.h" | |
2757 | # Check that the precious variables saved in the cache have kept the same | |
2758 | # value. | |
2759 | ac_cache_corrupted=false | |
2760 | for ac_var in $ac_precious_vars; do | |
2761 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2762 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2763 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2764 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2765 | case $ac_old_set,$ac_new_set in | |
2766 | set,) | |
2767 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2768 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2769 | ac_cache_corrupted=: ;; | |
2770 | ,set) | |
2771 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2772 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2773 | ac_cache_corrupted=: ;; | |
2774 | ,);; | |
2775 | *) | |
2776 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2777 | # differences in whitespace do not lead to failure. | |
2778 | ac_old_val_w=`echo x $ac_old_val` | |
2779 | ac_new_val_w=`echo x $ac_new_val` | |
2780 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2781 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2782 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2783 | ac_cache_corrupted=: | |
2784 | else | |
2785 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2786 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2787 | eval $ac_var=\$ac_old_val | |
2788 | fi | |
2789 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2790 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2791 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2792 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2793 | fi;; | |
2794 | esac | |
2795 | # Pass precious variables to config.status. | |
2796 | if test "$ac_new_set" = set; then | |
2797 | case $ac_new_val in | |
2798 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2799 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2800 | esac | |
2801 | case " $ac_configure_args " in | |
2802 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2803 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2804 | esac | |
2805 | fi | |
2806 | done | |
2807 | if $ac_cache_corrupted; then | |
2808 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2809 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2810 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2811 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2812 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2813 | fi | |
2814 | ## -------------------- ## | |
2815 | ## Main body of script. ## | |
2816 | ## -------------------- ## | |
2817 | ||
2818 | ac_ext=c | |
2819 | ac_cpp='$CPP $CPPFLAGS' | |
2820 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2821 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2822 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2823 | ||
2824 | ||
2825 | ||
2826 | ||
2827 | ||
2828 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2829 | ||
2830 | ||
2831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2832 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2833 | # Check whether --enable-maintainer-mode was given. | |
2834 | if test "${enable_maintainer_mode+set}" = set; then : | |
2835 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2836 | else | |
2837 | USE_MAINTAINER_MODE=no | |
2838 | fi | |
2839 | ||
2840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2841 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2842 | if test $USE_MAINTAINER_MODE = yes; then | |
2843 | MAINTAINER_MODE_TRUE= | |
2844 | MAINTAINER_MODE_FALSE='#' | |
2845 | else | |
2846 | MAINTAINER_MODE_TRUE='#' | |
2847 | MAINTAINER_MODE_FALSE= | |
2848 | fi | |
2849 | ||
2850 | MAINT=$MAINTAINER_MODE_TRUE | |
2851 | ||
2852 | ||
2853 | ||
2854 | ac_ext=c | |
2855 | ac_cpp='$CPP $CPPFLAGS' | |
2856 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2857 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2858 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2859 | if test -n "$ac_tool_prefix"; then | |
2860 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2861 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2863 | $as_echo_n "checking for $ac_word... " >&6; } | |
2864 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2865 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2866 | else |
2867 | if test -n "$CC"; then | |
2868 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2869 | else | |
bec39cab AC |
2870 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2871 | for as_dir in $PATH | |
2872 | do | |
2873 | IFS=$as_save_IFS | |
2874 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2875 | for ac_exec_ext in '' $ac_executable_extensions; do |
2876 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2877 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2878 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2879 | break 2 |
2880 | fi | |
2881 | done | |
81ecdfbb RW |
2882 | done |
2883 | IFS=$as_save_IFS | |
bec39cab | 2884 | |
c906108c SS |
2885 | fi |
2886 | fi | |
bec39cab | 2887 | CC=$ac_cv_prog_CC |
c906108c | 2888 | if test -n "$CC"; then |
81ecdfbb RW |
2889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2890 | $as_echo "$CC" >&6; } | |
c906108c | 2891 | else |
81ecdfbb RW |
2892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2893 | $as_echo "no" >&6; } | |
c906108c SS |
2894 | fi |
2895 | ||
81ecdfbb | 2896 | |
b4e70030 JB |
2897 | fi |
2898 | if test -z "$ac_cv_prog_CC"; then | |
2899 | ac_ct_CC=$CC | |
81ecdfbb RW |
2900 | # Extract the first word of "gcc", so it can be a program name with args. |
2901 | set dummy gcc; ac_word=$2 | |
2902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2903 | $as_echo_n "checking for $ac_word... " >&6; } | |
2904 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2905 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2906 | else |
2907 | if test -n "$ac_ct_CC"; then | |
2908 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2909 | else | |
2910 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2911 | for as_dir in $PATH | |
2912 | do | |
2913 | IFS=$as_save_IFS | |
2914 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2915 | for ac_exec_ext in '' $ac_executable_extensions; do |
2916 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2917 | ac_cv_prog_ac_ct_CC="gcc" | |
2918 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2919 | break 2 |
4e8d927d | 2920 | fi |
b4e70030 | 2921 | done |
81ecdfbb RW |
2922 | done |
2923 | IFS=$as_save_IFS | |
b4e70030 JB |
2924 | |
2925 | fi | |
2926 | fi | |
2927 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2928 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2930 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2931 | else |
81ecdfbb RW |
2932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2933 | $as_echo "no" >&6; } | |
b4e70030 JB |
2934 | fi |
2935 | ||
81ecdfbb RW |
2936 | if test "x$ac_ct_CC" = x; then |
2937 | CC="" | |
2938 | else | |
2939 | case $cross_compiling:$ac_tool_warned in | |
2940 | yes:) | |
2941 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2942 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2943 | ac_tool_warned=yes ;; | |
2944 | esac | |
2945 | CC=$ac_ct_CC | |
2946 | fi | |
b4e70030 JB |
2947 | else |
2948 | CC="$ac_cv_prog_CC" | |
2949 | fi | |
2950 | ||
c906108c | 2951 | if test -z "$CC"; then |
81ecdfbb RW |
2952 | if test -n "$ac_tool_prefix"; then |
2953 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2954 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2956 | $as_echo_n "checking for $ac_word... " >&6; } | |
2957 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2958 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2959 | else |
2960 | if test -n "$CC"; then | |
2961 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2962 | else | |
bec39cab AC |
2963 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2964 | for as_dir in $PATH | |
2965 | do | |
2966 | IFS=$as_save_IFS | |
2967 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2968 | for ac_exec_ext in '' $ac_executable_extensions; do |
2969 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2970 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2971 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2972 | break 2 |
2973 | fi | |
2974 | done | |
81ecdfbb RW |
2975 | done |
2976 | IFS=$as_save_IFS | |
2977 | ||
2978 | fi | |
2979 | fi | |
2980 | CC=$ac_cv_prog_CC | |
2981 | if test -n "$CC"; then | |
2982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2983 | $as_echo "$CC" >&6; } | |
2984 | else | |
2985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2986 | $as_echo "no" >&6; } | |
2987 | fi | |
2988 | ||
2989 | ||
2990 | fi | |
2991 | fi | |
2992 | if test -z "$CC"; then | |
2993 | # Extract the first word of "cc", so it can be a program name with args. | |
2994 | set dummy cc; ac_word=$2 | |
2995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2996 | $as_echo_n "checking for $ac_word... " >&6; } | |
2997 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2998 | $as_echo_n "(cached) " >&6 | |
2999 | else | |
3000 | if test -n "$CC"; then | |
3001 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3002 | else | |
3003 | ac_prog_rejected=no | |
3004 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3005 | for as_dir in $PATH | |
3006 | do | |
3007 | IFS=$as_save_IFS | |
3008 | test -z "$as_dir" && as_dir=. | |
3009 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3010 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3011 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3012 | ac_prog_rejected=yes | |
3013 | continue | |
3014 | fi | |
3015 | ac_cv_prog_CC="cc" | |
3016 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3017 | break 2 | |
3018 | fi | |
3019 | done | |
3020 | done | |
3021 | IFS=$as_save_IFS | |
bec39cab | 3022 | |
c906108c SS |
3023 | if test $ac_prog_rejected = yes; then |
3024 | # We found a bogon in the path, so make sure we never use it. | |
3025 | set dummy $ac_cv_prog_CC | |
3026 | shift | |
bec39cab | 3027 | if test $# != 0; then |
c906108c SS |
3028 | # We chose a different compiler from the bogus one. |
3029 | # However, it has the same basename, so the bogon will be chosen | |
3030 | # first if we set CC to just the basename; use the full file name. | |
3031 | shift | |
bec39cab | 3032 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3033 | fi |
3034 | fi | |
3035 | fi | |
3036 | fi | |
bec39cab | 3037 | CC=$ac_cv_prog_CC |
c906108c | 3038 | if test -n "$CC"; then |
81ecdfbb RW |
3039 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3040 | $as_echo "$CC" >&6; } | |
c906108c | 3041 | else |
81ecdfbb RW |
3042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3043 | $as_echo "no" >&6; } | |
c906108c SS |
3044 | fi |
3045 | ||
81ecdfbb | 3046 | |
bec39cab AC |
3047 | fi |
3048 | if test -z "$CC"; then | |
3049 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3050 | for ac_prog in cl.exe |
bec39cab AC |
3051 | do |
3052 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3053 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3055 | $as_echo_n "checking for $ac_word... " >&6; } | |
3056 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3057 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
3058 | else |
3059 | if test -n "$CC"; then | |
3060 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3061 | else | |
bec39cab AC |
3062 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3063 | for as_dir in $PATH | |
3064 | do | |
3065 | IFS=$as_save_IFS | |
3066 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3067 | for ac_exec_ext in '' $ac_executable_extensions; do |
3068 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3069 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3070 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3071 | break 2 |
3072 | fi | |
3073 | done | |
81ecdfbb RW |
3074 | done |
3075 | IFS=$as_save_IFS | |
bec39cab | 3076 | |
c906108c SS |
3077 | fi |
3078 | fi | |
bec39cab | 3079 | CC=$ac_cv_prog_CC |
c906108c | 3080 | if test -n "$CC"; then |
81ecdfbb RW |
3081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3082 | $as_echo "$CC" >&6; } | |
c906108c | 3083 | else |
81ecdfbb RW |
3084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3085 | $as_echo "no" >&6; } | |
c906108c | 3086 | fi |
bec39cab | 3087 | |
81ecdfbb | 3088 | |
bec39cab AC |
3089 | test -n "$CC" && break |
3090 | done | |
3091 | fi | |
3092 | if test -z "$CC"; then | |
3093 | ac_ct_CC=$CC | |
81ecdfbb | 3094 | for ac_prog in cl.exe |
bec39cab AC |
3095 | do |
3096 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3097 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3099 | $as_echo_n "checking for $ac_word... " >&6; } | |
3100 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3101 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3102 | else |
3103 | if test -n "$ac_ct_CC"; then | |
3104 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3105 | else | |
3106 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3107 | for as_dir in $PATH | |
3108 | do | |
3109 | IFS=$as_save_IFS | |
3110 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3111 | for ac_exec_ext in '' $ac_executable_extensions; do |
3112 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3113 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3114 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3115 | break 2 |
c906108c | 3116 | fi |
bec39cab | 3117 | done |
81ecdfbb RW |
3118 | done |
3119 | IFS=$as_save_IFS | |
bec39cab AC |
3120 | |
3121 | fi | |
3122 | fi | |
3123 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3124 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3126 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3127 | else |
81ecdfbb RW |
3128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3129 | $as_echo "no" >&6; } | |
c906108c SS |
3130 | fi |
3131 | ||
81ecdfbb | 3132 | |
bec39cab AC |
3133 | test -n "$ac_ct_CC" && break |
3134 | done | |
c906108c | 3135 | |
81ecdfbb RW |
3136 | if test "x$ac_ct_CC" = x; then |
3137 | CC="" | |
3138 | else | |
3139 | case $cross_compiling:$ac_tool_warned in | |
3140 | yes:) | |
3141 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3142 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3143 | ac_tool_warned=yes ;; | |
3144 | esac | |
3145 | CC=$ac_ct_CC | |
3146 | fi | |
bec39cab AC |
3147 | fi |
3148 | ||
3149 | fi | |
3150 | ||
3151 | ||
81ecdfbb RW |
3152 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3153 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3154 | as_fn_error "no acceptable C compiler found in \$PATH | |
3155 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3156 | |
3157 | # Provide some information about the compiler. | |
81ecdfbb RW |
3158 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3159 | set X $ac_compile | |
3160 | ac_compiler=$2 | |
3161 | for ac_option in --version -v -V -qversion; do | |
3162 | { { ac_try="$ac_compiler $ac_option >&5" | |
3163 | case "(($ac_try" in | |
3164 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3165 | *) ac_try_echo=$ac_try;; | |
3166 | esac | |
3167 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3168 | $as_echo "$ac_try_echo"; } >&5 | |
3169 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3170 | ac_status=$? |
81ecdfbb RW |
3171 | if test -s conftest.err; then |
3172 | sed '10a\ | |
3173 | ... rest of stderr output deleted ... | |
3174 | 10q' conftest.err >conftest.er1 | |
3175 | cat conftest.er1 >&5 | |
3176 | rm -f conftest.er1 conftest.err | |
3177 | fi | |
3178 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3179 | test $ac_status = 0; } | |
3180 | done | |
bec39cab | 3181 | |
81ecdfbb | 3182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3183 | /* end confdefs.h. */ |
3184 | ||
3185 | int | |
3186 | main () | |
3187 | { | |
3188 | ||
3189 | ; | |
3190 | return 0; | |
3191 | } | |
3192 | _ACEOF | |
3193 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3194 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3195 | # Try to create an executable without -o first, disregard a.out. |
3196 | # It will help us diagnose broken compilers, and finding out an intuition | |
3197 | # of exeext. | |
81ecdfbb RW |
3198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3199 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3200 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3201 | ||
3202 | # The possible output files: | |
3203 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3204 | ||
3205 | ac_rmfiles= | |
3206 | for ac_file in $ac_files | |
3207 | do | |
3208 | case $ac_file in | |
3209 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3210 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3211 | esac | |
3212 | done | |
3213 | rm -f $ac_rmfiles | |
3214 | ||
3215 | if { { ac_try="$ac_link_default" | |
3216 | case "(($ac_try" in | |
3217 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3218 | *) ac_try_echo=$ac_try;; | |
3219 | esac | |
3220 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3221 | $as_echo "$ac_try_echo"; } >&5 | |
3222 | (eval "$ac_link_default") 2>&5 | |
3223 | ac_status=$? | |
3224 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3225 | test $ac_status = 0; }; then : | |
3226 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3227 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3228 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3229 | # so that the user can short-circuit this test for compilers unknown to | |
3230 | # Autoconf. | |
3231 | for ac_file in $ac_files '' | |
bec39cab AC |
3232 | do |
3233 | test -f "$ac_file" || continue | |
3234 | case $ac_file in | |
81ecdfbb | 3235 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3236 | ;; |
3237 | [ab].out ) | |
3238 | # We found the default executable, but exeext='' is most | |
3239 | # certainly right. | |
3240 | break;; | |
3241 | *.* ) | |
81ecdfbb RW |
3242 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3243 | then :; else | |
3244 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3245 | fi | |
3246 | # We set ac_cv_exeext here because the later test for it is not | |
3247 | # safe: cross compilers may not add the suffix if given an `-o' | |
3248 | # argument, so we may need to know it at that point already. | |
3249 | # Even if this section looks crufty: it has the advantage of | |
3250 | # actually working. | |
b4e70030 JB |
3251 | break;; |
3252 | * ) | |
3253 | break;; | |
bec39cab AC |
3254 | esac |
3255 | done | |
81ecdfbb RW |
3256 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3257 | ||
bec39cab | 3258 | else |
81ecdfbb RW |
3259 | ac_file='' |
3260 | fi | |
3261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3262 | $as_echo "$ac_file" >&6; } | |
3263 | if test -z "$ac_file"; then : | |
3264 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3265 | sed 's/^/| /' conftest.$ac_ext >&5 |
3266 | ||
81ecdfbb RW |
3267 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3268 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3269 | { as_fn_set_status 77 | |
3270 | as_fn_error "C compiler cannot create executables | |
3271 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3272 | fi |
b4e70030 | 3273 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3274 | |
81ecdfbb | 3275 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3276 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3278 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3279 | # If not cross compiling, check that we can run a simple program. |
3280 | if test "$cross_compiling" != yes; then | |
3281 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3282 | { { case "(($ac_try" in |
3283 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3284 | *) ac_try_echo=$ac_try;; | |
3285 | esac | |
3286 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3287 | $as_echo "$ac_try_echo"; } >&5 | |
3288 | (eval "$ac_try") 2>&5 | |
bec39cab | 3289 | ac_status=$? |
81ecdfbb RW |
3290 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3291 | test $ac_status = 0; }; }; then | |
bec39cab | 3292 | cross_compiling=no |
c906108c | 3293 | else |
bec39cab AC |
3294 | if test "$cross_compiling" = maybe; then |
3295 | cross_compiling=yes | |
3296 | else | |
81ecdfbb RW |
3297 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3298 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3299 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3300 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3301 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3302 | fi |
c906108c | 3303 | fi |
bec39cab | 3304 | fi |
81ecdfbb RW |
3305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3306 | $as_echo "yes" >&6; } | |
bec39cab | 3307 | |
81ecdfbb | 3308 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3309 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3310 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3311 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3313 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3315 | $as_echo "$cross_compiling" >&6; } | |
3316 | ||
3317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3318 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3319 | if { { ac_try="$ac_link" | |
3320 | case "(($ac_try" in | |
3321 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3322 | *) ac_try_echo=$ac_try;; | |
3323 | esac | |
3324 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3325 | $as_echo "$ac_try_echo"; } >&5 | |
3326 | (eval "$ac_link") 2>&5 | |
bec39cab | 3327 | ac_status=$? |
81ecdfbb RW |
3328 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3329 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3330 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3331 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3332 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3333 | # `rm'. | |
3334 | for ac_file in conftest.exe conftest conftest.*; do | |
3335 | test -f "$ac_file" || continue | |
3336 | case $ac_file in | |
81ecdfbb | 3337 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3338 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3339 | break;; |
3340 | * ) break;; | |
3341 | esac | |
3342 | done | |
c906108c | 3343 | else |
81ecdfbb RW |
3344 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3345 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3346 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3347 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3348 | fi |
b4e70030 | 3349 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3351 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3352 | |
b4e70030 | 3353 | rm -f conftest.$ac_ext |
bec39cab AC |
3354 | EXEEXT=$ac_cv_exeext |
3355 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3357 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3358 | if test "${ac_cv_objext+set}" = set; then : | |
3359 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3360 | else |
81ecdfbb | 3361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3362 | /* end confdefs.h. */ |
3363 | ||
3364 | int | |
3365 | main () | |
3366 | { | |
3367 | ||
3368 | ; | |
3369 | return 0; | |
3370 | } | |
3371 | _ACEOF | |
3372 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3373 | if { { ac_try="$ac_compile" |
3374 | case "(($ac_try" in | |
3375 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3376 | *) ac_try_echo=$ac_try;; | |
3377 | esac | |
3378 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3379 | $as_echo "$ac_try_echo"; } >&5 | |
3380 | (eval "$ac_compile") 2>&5 | |
3381 | ac_status=$? | |
3382 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3383 | test $ac_status = 0; }; then : | |
3384 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3385 | test -f "$ac_file" || continue; | |
bec39cab | 3386 | case $ac_file in |
81ecdfbb | 3387 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3388 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3389 | break;; | |
3390 | esac | |
3391 | done | |
c906108c | 3392 | else |
81ecdfbb | 3393 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3394 | sed 's/^/| /' conftest.$ac_ext >&5 |
3395 | ||
81ecdfbb RW |
3396 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3397 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3398 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3399 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3400 | fi |
b4e70030 | 3401 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3402 | fi |
81ecdfbb RW |
3403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3404 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3405 | OBJEXT=$ac_cv_objext |
3406 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3408 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3409 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3410 | $as_echo_n "(cached) " >&6 | |
c906108c | 3411 | else |
81ecdfbb | 3412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3413 | /* end confdefs.h. */ |
3414 | ||
3415 | int | |
3416 | main () | |
3417 | { | |
3418 | #ifndef __GNUC__ | |
3419 | choke me | |
3420 | #endif | |
3421 | ||
3422 | ; | |
3423 | return 0; | |
3424 | } | |
3425 | _ACEOF | |
81ecdfbb | 3426 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3427 | ac_compiler_gnu=yes |
3428 | else | |
81ecdfbb | 3429 | ac_compiler_gnu=no |
bec39cab | 3430 | fi |
81ecdfbb | 3431 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3432 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3433 | ||
3434 | fi | |
81ecdfbb RW |
3435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3436 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3437 | if test $ac_compiler_gnu = yes; then | |
3438 | GCC=yes | |
3439 | else | |
3440 | GCC= | |
3441 | fi | |
bec39cab AC |
3442 | ac_test_CFLAGS=${CFLAGS+set} |
3443 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3445 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3446 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3447 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3448 | else |
81ecdfbb RW |
3449 | ac_save_c_werror_flag=$ac_c_werror_flag |
3450 | ac_c_werror_flag=yes | |
3451 | ac_cv_prog_cc_g=no | |
3452 | CFLAGS="-g" | |
3453 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3454 | /* end confdefs.h. */ |
3455 | ||
3456 | int | |
3457 | main () | |
3458 | { | |
3459 | ||
3460 | ; | |
3461 | return 0; | |
3462 | } | |
3463 | _ACEOF | |
81ecdfbb | 3464 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3465 | ac_cv_prog_cc_g=yes |
3466 | else | |
81ecdfbb RW |
3467 | CFLAGS="" |
3468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3469 | /* end confdefs.h. */ | |
3470 | ||
3471 | int | |
3472 | main () | |
3473 | { | |
3474 | ||
3475 | ; | |
3476 | return 0; | |
3477 | } | |
3478 | _ACEOF | |
3479 | if ac_fn_c_try_compile "$LINENO"; then : | |
3480 | ||
3481 | else | |
3482 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3483 | CFLAGS="-g" | |
3484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3485 | /* end confdefs.h. */ | |
3486 | ||
3487 | int | |
3488 | main () | |
3489 | { | |
c906108c | 3490 | |
81ecdfbb RW |
3491 | ; |
3492 | return 0; | |
3493 | } | |
3494 | _ACEOF | |
3495 | if ac_fn_c_try_compile "$LINENO"; then : | |
3496 | ac_cv_prog_cc_g=yes | |
3497 | fi | |
3498 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3499 | fi | |
3500 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3501 | fi |
81ecdfbb RW |
3502 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3503 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3504 | fi |
81ecdfbb RW |
3505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3506 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3507 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3508 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3509 | elif test $ac_cv_prog_cc_g = yes; then |
3510 | if test "$GCC" = yes; then | |
3511 | CFLAGS="-g -O2" | |
3512 | else | |
3513 | CFLAGS="-g" | |
3514 | fi | |
3515 | else | |
3516 | if test "$GCC" = yes; then | |
3517 | CFLAGS="-O2" | |
3518 | else | |
3519 | CFLAGS= | |
3520 | fi | |
3521 | fi | |
81ecdfbb RW |
3522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3523 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3524 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3525 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3526 | else |
81ecdfbb | 3527 | ac_cv_prog_cc_c89=no |
bec39cab | 3528 | ac_save_CC=$CC |
81ecdfbb | 3529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3530 | /* end confdefs.h. */ |
c906108c SS |
3531 | #include <stdarg.h> |
3532 | #include <stdio.h> | |
3533 | #include <sys/types.h> | |
3534 | #include <sys/stat.h> | |
3535 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3536 | struct buf { int x; }; | |
3537 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3538 | static char *e (p, i) | |
3539 | char **p; | |
3540 | int i; | |
3541 | { | |
3542 | return p[i]; | |
3543 | } | |
3544 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3545 | { | |
3546 | char *s; | |
3547 | va_list v; | |
3548 | va_start (v,p); | |
3549 | s = g (p, va_arg (v,int)); | |
3550 | va_end (v); | |
3551 | return s; | |
3552 | } | |
bec39cab AC |
3553 | |
3554 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3555 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3556 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3557 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3558 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3559 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3560 | that's true only with -std. */ |
bec39cab AC |
3561 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3562 | ||
81ecdfbb RW |
3563 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3564 | inside strings and character constants. */ | |
3565 | #define FOO(x) 'x' | |
3566 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3567 | ||
c906108c SS |
3568 | int test (int i, double x); |
3569 | struct s1 {int (*f) (int a);}; | |
3570 | struct s2 {int (*f) (double a);}; | |
3571 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3572 | int argc; | |
3573 | char **argv; | |
bec39cab AC |
3574 | int |
3575 | main () | |
3576 | { | |
c906108c | 3577 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3578 | ; |
3579 | return 0; | |
3580 | } | |
3581 | _ACEOF | |
81ecdfbb RW |
3582 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3583 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3584 | do |
3585 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3586 | if ac_fn_c_try_compile "$LINENO"; then : |
3587 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3588 | fi |
81ecdfbb RW |
3589 | rm -f core conftest.err conftest.$ac_objext |
3590 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3591 | done |
81ecdfbb | 3592 | rm -f conftest.$ac_ext |
bec39cab | 3593 | CC=$ac_save_CC |
c906108c SS |
3594 | |
3595 | fi | |
81ecdfbb RW |
3596 | # AC_CACHE_VAL |
3597 | case "x$ac_cv_prog_cc_c89" in | |
3598 | x) | |
3599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3600 | $as_echo "none needed" >&6; } ;; | |
3601 | xno) | |
3602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3603 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3604 | *) |
81ecdfbb RW |
3605 | CC="$CC $ac_cv_prog_cc_c89" |
3606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3607 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3608 | esac |
81ecdfbb | 3609 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3610 | |
b4e70030 JB |
3611 | fi |
3612 | ||
bec39cab AC |
3613 | ac_ext=c |
3614 | ac_cpp='$CPP $CPPFLAGS' | |
3615 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3616 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3617 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3618 | |
f434ba03 PA |
3619 | ac_aux_dir= |
3620 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3621 | for ac_t in install-sh install.sh shtool; do | |
3622 | if test -f "$ac_dir/$ac_t"; then | |
3623 | ac_aux_dir=$ac_dir | |
3624 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3625 | break 2 | |
3626 | fi | |
3627 | done | |
3628 | done | |
3629 | if test -z "$ac_aux_dir"; then | |
3630 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3631 | fi | |
3632 | ||
3633 | # These three variables are undocumented and unsupported, | |
3634 | # and are intended to be withdrawn in a future Autoconf release. | |
3635 | # They can cause serious problems if a builder's source tree is in a directory | |
3636 | # whose full name contains unusual characters. | |
3637 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3638 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3639 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3640 | ||
3641 | ||
3642 | # Make sure we can run config.sub. | |
3643 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3644 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3645 | ||
3646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3647 | $as_echo_n "checking build system type... " >&6; } | |
3648 | if test "${ac_cv_build+set}" = set; then : | |
3649 | $as_echo_n "(cached) " >&6 | |
3650 | else | |
3651 | ac_build_alias=$build_alias | |
3652 | test "x$ac_build_alias" = x && | |
3653 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3654 | test "x$ac_build_alias" = x && | |
3655 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3656 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3657 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3658 | ||
3659 | fi | |
3660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3661 | $as_echo "$ac_cv_build" >&6; } | |
3662 | case $ac_cv_build in | |
3663 | *-*-*) ;; | |
3664 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
3665 | esac | |
3666 | build=$ac_cv_build | |
3667 | ac_save_IFS=$IFS; IFS='-' | |
3668 | set x $ac_cv_build | |
3669 | shift | |
3670 | build_cpu=$1 | |
3671 | build_vendor=$2 | |
3672 | shift; shift | |
3673 | # Remember, the first character of IFS is used to create $*, | |
3674 | # except with old shells: | |
3675 | build_os=$* | |
3676 | IFS=$ac_save_IFS | |
3677 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3678 | ||
3679 | ||
3680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3681 | $as_echo_n "checking host system type... " >&6; } | |
3682 | if test "${ac_cv_host+set}" = set; then : | |
3683 | $as_echo_n "(cached) " >&6 | |
3684 | else | |
3685 | if test "x$host_alias" = x; then | |
3686 | ac_cv_host=$ac_cv_build | |
3687 | else | |
3688 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3689 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
3690 | fi | |
3691 | ||
3692 | fi | |
3693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3694 | $as_echo "$ac_cv_host" >&6; } | |
3695 | case $ac_cv_host in | |
3696 | *-*-*) ;; | |
3697 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
3698 | esac | |
3699 | host=$ac_cv_host | |
3700 | ac_save_IFS=$IFS; IFS='-' | |
3701 | set x $ac_cv_host | |
3702 | shift | |
3703 | host_cpu=$1 | |
3704 | host_vendor=$2 | |
3705 | shift; shift | |
3706 | # Remember, the first character of IFS is used to create $*, | |
3707 | # except with old shells: | |
3708 | host_os=$* | |
3709 | IFS=$ac_save_IFS | |
3710 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3711 | ||
3712 | ||
60ca704f | 3713 | |
bec39cab AC |
3714 | ac_ext=c |
3715 | ac_cpp='$CPP $CPPFLAGS' | |
3716 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3717 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3718 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3720 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3721 | # On Suns, sometimes $CPP names a directory. |
3722 | if test -n "$CPP" && test -d "$CPP"; then | |
3723 | CPP= | |
8bb2c122 | 3724 | fi |
bec39cab | 3725 | if test -z "$CPP"; then |
81ecdfbb RW |
3726 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3727 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3728 | else |
3729 | # Double quotes because CPP needs to be expanded | |
3730 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3731 | do | |
3732 | ac_preproc_ok=false | |
3733 | for ac_c_preproc_warn_flag in '' yes | |
3734 | do | |
3735 | # Use a header file that comes with gcc, so configuring glibc | |
3736 | # with a fresh cross-compiler works. | |
3737 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3738 | # <limits.h> exists even on freestanding compilers. | |
3739 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3740 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3741 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3742 | /* end confdefs.h. */ |
3743 | #ifdef __STDC__ | |
3744 | # include <limits.h> | |
3745 | #else | |
3746 | # include <assert.h> | |
3747 | #endif | |
3748 | Syntax error | |
3749 | _ACEOF | |
81ecdfbb | 3750 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3751 | |
81ecdfbb | 3752 | else |
bec39cab AC |
3753 | # Broken: fails on valid input. |
3754 | continue | |
3755 | fi | |
3756 | rm -f conftest.err conftest.$ac_ext | |
3757 | ||
81ecdfbb | 3758 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3759 | # can be detected and how. |
81ecdfbb | 3760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3761 | /* end confdefs.h. */ |
3762 | #include <ac_nonexistent.h> | |
3763 | _ACEOF | |
81ecdfbb | 3764 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3765 | # Broken: success on invalid input. |
3766 | continue | |
8bb2c122 | 3767 | else |
bec39cab AC |
3768 | # Passes both tests. |
3769 | ac_preproc_ok=: | |
3770 | break | |
8bb2c122 | 3771 | fi |
bec39cab | 3772 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3773 | |
bec39cab AC |
3774 | done |
3775 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3776 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3777 | if $ac_preproc_ok; then : |
bec39cab AC |
3778 | break |
3779 | fi | |
8bb2c122 | 3780 | |
bec39cab AC |
3781 | done |
3782 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3783 | |
c906108c | 3784 | fi |
bec39cab AC |
3785 | CPP=$ac_cv_prog_CPP |
3786 | else | |
3787 | ac_cv_prog_CPP=$CPP | |
c906108c | 3788 | fi |
81ecdfbb RW |
3789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3790 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3791 | ac_preproc_ok=false |
3792 | for ac_c_preproc_warn_flag in '' yes | |
3793 | do | |
3794 | # Use a header file that comes with gcc, so configuring glibc | |
3795 | # with a fresh cross-compiler works. | |
3796 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3797 | # <limits.h> exists even on freestanding compilers. | |
3798 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3799 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3800 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3801 | /* end confdefs.h. */ |
3802 | #ifdef __STDC__ | |
3803 | # include <limits.h> | |
3804 | #else | |
3805 | # include <assert.h> | |
3806 | #endif | |
3807 | Syntax error | |
3808 | _ACEOF | |
81ecdfbb | 3809 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3810 | |
81ecdfbb | 3811 | else |
bec39cab AC |
3812 | # Broken: fails on valid input. |
3813 | continue | |
3814 | fi | |
3815 | rm -f conftest.err conftest.$ac_ext | |
3816 | ||
81ecdfbb | 3817 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3818 | # can be detected and how. |
81ecdfbb | 3819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3820 | /* end confdefs.h. */ |
3821 | #include <ac_nonexistent.h> | |
3822 | _ACEOF | |
81ecdfbb | 3823 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3824 | # Broken: success on invalid input. |
3825 | continue | |
c906108c | 3826 | else |
bec39cab AC |
3827 | # Passes both tests. |
3828 | ac_preproc_ok=: | |
3829 | break | |
c906108c | 3830 | fi |
bec39cab | 3831 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3832 | |
bec39cab AC |
3833 | done |
3834 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3835 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3836 | if $ac_preproc_ok; then : |
3837 | ||
c906108c | 3838 | else |
81ecdfbb RW |
3839 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3840 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3841 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3842 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3843 | fi |
c906108c | 3844 | |
bec39cab AC |
3845 | ac_ext=c |
3846 | ac_cpp='$CPP $CPPFLAGS' | |
3847 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3848 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3849 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3850 | ||
3851 | ||
81ecdfbb RW |
3852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3853 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3854 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3855 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3856 | else |
81ecdfbb RW |
3857 | if test -z "$GREP"; then |
3858 | ac_path_GREP_found=false | |
3859 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3860 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3861 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3862 | do | |
3863 | IFS=$as_save_IFS | |
3864 | test -z "$as_dir" && as_dir=. | |
3865 | for ac_prog in grep ggrep; do | |
3866 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3867 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3868 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3869 | # Check for GNU ac_path_GREP and select it if it is found. | |
3870 | # Check for GNU $ac_path_GREP | |
3871 | case `"$ac_path_GREP" --version 2>&1` in | |
3872 | *GNU*) | |
3873 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3874 | *) | |
3875 | ac_count=0 | |
3876 | $as_echo_n 0123456789 >"conftest.in" | |
3877 | while : | |
3878 | do | |
3879 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3880 | mv "conftest.tmp" "conftest.in" | |
3881 | cp "conftest.in" "conftest.nl" | |
3882 | $as_echo 'GREP' >> "conftest.nl" | |
3883 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3884 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3885 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3886 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3887 | # Best one so far, save it but keep looking for a better one | |
3888 | ac_cv_path_GREP="$ac_path_GREP" | |
3889 | ac_path_GREP_max=$ac_count | |
bec39cab | 3890 | fi |
81ecdfbb RW |
3891 | # 10*(2^10) chars as input seems more than enough |
3892 | test $ac_count -gt 10 && break | |
3893 | done | |
3894 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3895 | esac | |
bec39cab | 3896 | |
81ecdfbb RW |
3897 | $ac_path_GREP_found && break 3 |
3898 | done | |
3899 | done | |
3900 | done | |
3901 | IFS=$as_save_IFS | |
3902 | if test -z "$ac_cv_path_GREP"; then | |
3903 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3904 | fi | |
c906108c | 3905 | else |
81ecdfbb | 3906 | ac_cv_path_GREP=$GREP |
c906108c | 3907 | fi |
c906108c | 3908 | |
81ecdfbb RW |
3909 | fi |
3910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3911 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3912 | GREP="$ac_cv_path_GREP" | |
c906108c | 3913 | |
c906108c | 3914 | |
81ecdfbb RW |
3915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3916 | $as_echo_n "checking for egrep... " >&6; } | |
3917 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3918 | $as_echo_n "(cached) " >&6 | |
783e057b | 3919 | else |
81ecdfbb RW |
3920 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3921 | then ac_cv_path_EGREP="$GREP -E" | |
3922 | else | |
3923 | if test -z "$EGREP"; then | |
3924 | ac_path_EGREP_found=false | |
3925 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3926 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3927 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3928 | do |
3929 | IFS=$as_save_IFS | |
3930 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3931 | for ac_prog in egrep; do |
3932 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3933 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3934 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3935 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3936 | # Check for GNU $ac_path_EGREP | |
3937 | case `"$ac_path_EGREP" --version 2>&1` in | |
3938 | *GNU*) | |
3939 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3940 | *) | |
3941 | ac_count=0 | |
3942 | $as_echo_n 0123456789 >"conftest.in" | |
3943 | while : | |
3944 | do | |
3945 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3946 | mv "conftest.tmp" "conftest.in" | |
3947 | cp "conftest.in" "conftest.nl" | |
3948 | $as_echo 'EGREP' >> "conftest.nl" | |
3949 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3950 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3951 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3952 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3953 | # Best one so far, save it but keep looking for a better one | |
3954 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3955 | ac_path_EGREP_max=$ac_count | |
3956 | fi | |
3957 | # 10*(2^10) chars as input seems more than enough | |
3958 | test $ac_count -gt 10 && break | |
3959 | done | |
3960 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3961 | esac | |
bec39cab | 3962 | |
81ecdfbb RW |
3963 | $ac_path_EGREP_found && break 3 |
3964 | done | |
3965 | done | |
3966 | done | |
3967 | IFS=$as_save_IFS | |
3968 | if test -z "$ac_cv_path_EGREP"; then | |
3969 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3970 | fi |
783e057b | 3971 | else |
81ecdfbb | 3972 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3973 | fi |
3974 | ||
81ecdfbb | 3975 | fi |
783e057b | 3976 | fi |
81ecdfbb RW |
3977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3978 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3979 | EGREP="$ac_cv_path_EGREP" | |
3980 | ||
783e057b | 3981 | |
81ecdfbb RW |
3982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3983 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3984 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3985 | $as_echo_n "(cached) " >&6 | |
783e057b | 3986 | else |
81ecdfbb | 3987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3988 | /* end confdefs.h. */ |
783e057b | 3989 | #include <stdlib.h> |
bec39cab | 3990 | #include <stdarg.h> |
783e057b DJ |
3991 | #include <string.h> |
3992 | #include <float.h> | |
c906108c | 3993 | |
bec39cab AC |
3994 | int |
3995 | main () | |
3996 | { | |
c906108c | 3997 | |
bec39cab AC |
3998 | ; |
3999 | return 0; | |
4000 | } | |
4001 | _ACEOF | |
81ecdfbb | 4002 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4003 | ac_cv_header_stdc=yes |
c906108c | 4004 | else |
81ecdfbb | 4005 | ac_cv_header_stdc=no |
c906108c | 4006 | fi |
81ecdfbb | 4007 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4008 | |
783e057b DJ |
4009 | if test $ac_cv_header_stdc = yes; then |
4010 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4012 | /* end confdefs.h. */ |
4013 | #include <string.h> | |
c906108c | 4014 | |
783e057b DJ |
4015 | _ACEOF |
4016 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4017 | $EGREP "memchr" >/dev/null 2>&1; then : |
4018 | ||
c906108c | 4019 | else |
783e057b | 4020 | ac_cv_header_stdc=no |
c906108c | 4021 | fi |
783e057b | 4022 | rm -f conftest* |
c906108c SS |
4023 | |
4024 | fi | |
4025 | ||
783e057b DJ |
4026 | if test $ac_cv_header_stdc = yes; then |
4027 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4029 | /* end confdefs.h. */ |
4030 | #include <stdlib.h> | |
bec39cab | 4031 | |
783e057b DJ |
4032 | _ACEOF |
4033 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4034 | $EGREP "free" >/dev/null 2>&1; then : |
4035 | ||
bec39cab | 4036 | else |
783e057b | 4037 | ac_cv_header_stdc=no |
bec39cab | 4038 | fi |
783e057b | 4039 | rm -f conftest* |
bec39cab AC |
4040 | |
4041 | fi | |
bec39cab | 4042 | |
783e057b DJ |
4043 | if test $ac_cv_header_stdc = yes; then |
4044 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4045 | if test "$cross_compiling" = yes; then : |
783e057b | 4046 | : |
bec39cab | 4047 | else |
81ecdfbb | 4048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4049 | /* end confdefs.h. */ |
4050 | #include <ctype.h> | |
81ecdfbb | 4051 | #include <stdlib.h> |
783e057b DJ |
4052 | #if ((' ' & 0x0FF) == 0x020) |
4053 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4054 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4055 | #else | |
4056 | # define ISLOWER(c) \ | |
4057 | (('a' <= (c) && (c) <= 'i') \ | |
4058 | || ('j' <= (c) && (c) <= 'r') \ | |
4059 | || ('s' <= (c) && (c) <= 'z')) | |
4060 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4061 | #endif | |
4062 | ||
4063 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4064 | int | |
4065 | main () | |
4066 | { | |
4067 | int i; | |
4068 | for (i = 0; i < 256; i++) | |
4069 | if (XOR (islower (i), ISLOWER (i)) | |
4070 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4071 | return 2; |
4072 | return 0; | |
783e057b DJ |
4073 | } |
4074 | _ACEOF | |
81ecdfbb | 4075 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4076 | |
81ecdfbb RW |
4077 | else |
4078 | ac_cv_header_stdc=no | |
783e057b | 4079 | fi |
81ecdfbb RW |
4080 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4081 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4082 | fi |
81ecdfbb | 4083 | |
783e057b DJ |
4084 | fi |
4085 | fi | |
81ecdfbb RW |
4086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4087 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4088 | if test $ac_cv_header_stdc = yes; then |
4089 | ||
81ecdfbb | 4090 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4091 | |
4092 | fi | |
4093 | ||
4094 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4095 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4096 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4097 | do : |
4098 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4099 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4100 | " | |
4101 | eval as_val=\$$as_ac_Header | |
4102 | if test "x$as_val" = x""yes; then : | |
783e057b | 4103 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4104 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4105 | _ACEOF |
4106 | ||
4107 | fi | |
4108 | ||
4109 | done | |
4110 | ||
4111 | ||
4112 | ||
f434ba03 PA |
4113 | |
4114 | ||
81ecdfbb RW |
4115 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4116 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4117 | MINIX=yes |
4118 | else | |
4119 | MINIX= | |
4120 | fi | |
4121 | ||
4122 | ||
4123 | if test "$MINIX" = yes; then | |
4124 | ||
81ecdfbb | 4125 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4126 | |
4127 | ||
81ecdfbb | 4128 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4129 | |
4130 | ||
81ecdfbb | 4131 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4132 | |
4133 | fi | |
4134 | ||
f434ba03 PA |
4135 | case "$host_os" in |
4136 | hpux*) | |
4137 | ||
4138 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
4139 | ||
4140 | ;; | |
4141 | esac | |
4142 | ||
783e057b | 4143 | |
81ecdfbb RW |
4144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4145 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4146 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4147 | $as_echo_n "(cached) " >&6 | |
783e057b | 4148 | else |
81ecdfbb | 4149 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4150 | /* end confdefs.h. */ |
4151 | ||
f434ba03 PA |
4152 | # define __EXTENSIONS__ 1 |
4153 | $ac_includes_default | |
783e057b DJ |
4154 | int |
4155 | main () | |
4156 | { | |
4157 | ||
4158 | ; | |
4159 | return 0; | |
4160 | } | |
4161 | _ACEOF | |
81ecdfbb | 4162 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4163 | ac_cv_safe_to_define___extensions__=yes |
4164 | else | |
81ecdfbb | 4165 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4166 | fi |
81ecdfbb | 4167 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4168 | fi |
81ecdfbb RW |
4169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4170 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4171 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4172 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4173 | |
81ecdfbb | 4174 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4175 | |
81ecdfbb | 4176 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4177 | |
81ecdfbb | 4178 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4179 | |
81ecdfbb | 4180 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4181 | |
4182 | ||
81ecdfbb RW |
4183 | if test -n "$ac_tool_prefix"; then |
4184 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4185 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4187 | $as_echo_n "checking for $ac_word... " >&6; } | |
4188 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
4189 | $as_echo_n "(cached) " >&6 | |
4190 | else | |
4191 | if test -n "$RANLIB"; then | |
4192 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4193 | else | |
4194 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4195 | for as_dir in $PATH | |
4196 | do | |
4197 | IFS=$as_save_IFS | |
4198 | test -z "$as_dir" && as_dir=. | |
4199 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4200 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4201 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4202 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4203 | break 2 | |
4204 | fi | |
4205 | done | |
4206 | done | |
4207 | IFS=$as_save_IFS | |
783e057b | 4208 | |
81ecdfbb RW |
4209 | fi |
4210 | fi | |
4211 | RANLIB=$ac_cv_prog_RANLIB | |
4212 | if test -n "$RANLIB"; then | |
4213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4214 | $as_echo "$RANLIB" >&6; } | |
4215 | else | |
4216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4217 | $as_echo "no" >&6; } | |
4218 | fi | |
783e057b DJ |
4219 | |
4220 | ||
81ecdfbb RW |
4221 | fi |
4222 | if test -z "$ac_cv_prog_RANLIB"; then | |
4223 | ac_ct_RANLIB=$RANLIB | |
4224 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4225 | set dummy ranlib; ac_word=$2 | |
4226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4227 | $as_echo_n "checking for $ac_word... " >&6; } | |
4228 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
4229 | $as_echo_n "(cached) " >&6 | |
783e057b | 4230 | else |
81ecdfbb RW |
4231 | if test -n "$ac_ct_RANLIB"; then |
4232 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4233 | else | |
4234 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4235 | for as_dir in $PATH | |
4236 | do | |
4237 | IFS=$as_save_IFS | |
4238 | test -z "$as_dir" && as_dir=. | |
4239 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4240 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4241 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
4242 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4243 | break 2 | |
4244 | fi | |
4245 | done | |
4246 | done | |
4247 | IFS=$as_save_IFS | |
4248 | ||
4249 | fi | |
4250 | fi | |
4251 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4252 | if test -n "$ac_ct_RANLIB"; then | |
4253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4254 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4255 | else | |
4256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4257 | $as_echo "no" >&6; } | |
4258 | fi | |
4259 | ||
4260 | if test "x$ac_ct_RANLIB" = x; then | |
4261 | RANLIB=":" | |
4262 | else | |
4263 | case $cross_compiling:$ac_tool_warned in | |
4264 | yes:) | |
4265 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4266 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4267 | ac_tool_warned=yes ;; | |
4268 | esac | |
4269 | RANLIB=$ac_ct_RANLIB | |
4270 | fi | |
4271 | else | |
4272 | RANLIB="$ac_cv_prog_RANLIB" | |
4273 | fi | |
4274 | ||
4275 | ||
4276 | ||
4277 | ||
4278 | ||
4279 | ||
3388710e JM |
4280 | |
4281 | ||
3388710e | 4282 | |
f434ba03 PA |
4283 | # Code from module arg-nonnull: |
4284 | # Code from module c++defs: | |
4285 | # Code from module extensions: | |
3388710e | 4286 | |
f434ba03 PA |
4287 | # Code from module include_next: |
4288 | # Code from module memchr: | |
4289 | # Code from module memmem: | |
4290 | # Code from module memmem-simple: | |
4291 | # Code from module multiarch: | |
4292 | # Code from module stddef: | |
4293 | # Code from module stdint: | |
4294 | # Code from module string: | |
4295 | # Code from module warn-on-use: | |
4296 | # Code from module wchar: | |
3388710e JM |
4297 | |
4298 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4299 | $as_echo_n "checking target system type... " >&6; } | |
4300 | if test "${ac_cv_target+set}" = set; then : | |
4301 | $as_echo_n "(cached) " >&6 | |
4302 | else | |
4303 | if test "x$target_alias" = x; then | |
4304 | ac_cv_target=$ac_cv_host | |
4305 | else | |
4306 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4307 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4308 | fi | |
4309 | ||
4310 | fi | |
4311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4312 | $as_echo "$ac_cv_target" >&6; } | |
4313 | case $ac_cv_target in | |
4314 | *-*-*) ;; | |
4315 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4316 | esac | |
4317 | target=$ac_cv_target | |
4318 | ac_save_IFS=$IFS; IFS='-' | |
4319 | set x $ac_cv_target | |
4320 | shift | |
4321 | target_cpu=$1 | |
4322 | target_vendor=$2 | |
4323 | shift; shift | |
4324 | # Remember, the first character of IFS is used to create $*, | |
4325 | # except with old shells: | |
4326 | target_os=$* | |
4327 | IFS=$ac_save_IFS | |
4328 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4329 | ||
4330 | ||
4331 | # The aliases save the names the user supplied, while $host etc. | |
4332 | # will get canonicalized. | |
4333 | test -n "$target_alias" && | |
4334 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4335 | NONENONEs,x,x, && | |
4336 | program_prefix=${target_alias}- | |
4337 | ||
4338 | # The tests for host and target for $enable_largefile require | |
4339 | # canonical names. | |
4340 | ||
4341 | ||
81ecdfbb | 4342 | |
da2f07f1 JK |
4343 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4344 | # even in directories otherwise not depending on the $plugins option. | |
4345 | ||
4346 | ||
4347 | # Check whether --enable-plugins was given. | |
4348 | if test "${enable_plugins+set}" = set; then : | |
4349 | enableval=$enable_plugins; case "${enableval}" in | |
4350 | yes | "") plugins=yes ;; | |
4351 | no) plugins=no ;; | |
4352 | *) plugins=yes ;; | |
4353 | esac | |
4354 | else | |
4355 | plugins=no | |
4356 | fi | |
4357 | ||
4358 | ||
4359 | ||
4360 | case "${host}" in | |
4361 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4362 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4363 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4364 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4365 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4366 | # large-file support through the --enable-largefile switch, disable | |
4367 | # large-file support in favor of procfs support. | |
4368 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4369 | && : ${enable_largefile="no"} | |
4370 | ;; | |
4371 | esac | |
4372 | ||
4373 | # Check whether --enable-largefile was given. | |
4374 | if test "${enable_largefile+set}" = set; then : | |
4375 | enableval=$enable_largefile; | |
4376 | fi | |
4377 | ||
4378 | if test "$enable_largefile" != no; then | |
4379 | ||
4380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4381 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4382 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4383 | $as_echo_n "(cached) " >&6 | |
4384 | else | |
4385 | ac_cv_sys_largefile_CC=no | |
4386 | if test "$GCC" != yes; then | |
4387 | ac_save_CC=$CC | |
4388 | while :; do | |
4389 | # IRIX 6.2 and later do not support large files by default, | |
4390 | # so use the C compiler's -n32 option if that helps. | |
4391 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4392 | /* end confdefs.h. */ | |
4393 | #include <sys/types.h> | |
4394 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4395 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4396 | since some C++ compilers masquerading as C compilers | |
4397 | incorrectly reject 9223372036854775807. */ | |
4398 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4399 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4400 | && LARGE_OFF_T % 2147483647 == 1) | |
4401 | ? 1 : -1]; | |
4402 | int | |
4403 | main () | |
4404 | { | |
4405 | ||
4406 | ; | |
4407 | return 0; | |
4408 | } | |
4409 | _ACEOF | |
4410 | if ac_fn_c_try_compile "$LINENO"; then : | |
4411 | break | |
4412 | fi | |
4413 | rm -f core conftest.err conftest.$ac_objext | |
4414 | CC="$CC -n32" | |
4415 | if ac_fn_c_try_compile "$LINENO"; then : | |
4416 | ac_cv_sys_largefile_CC=' -n32'; break | |
4417 | fi | |
4418 | rm -f core conftest.err conftest.$ac_objext | |
4419 | break | |
4420 | done | |
4421 | CC=$ac_save_CC | |
4422 | rm -f conftest.$ac_ext | |
4423 | fi | |
4424 | fi | |
4425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4426 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4427 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4428 | CC=$CC$ac_cv_sys_largefile_CC | |
4429 | fi | |
4430 | ||
4431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4432 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4433 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4434 | $as_echo_n "(cached) " >&6 | |
4435 | else | |
4436 | while :; do | |
4437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4438 | /* end confdefs.h. */ | |
4439 | #include <sys/types.h> | |
4440 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4441 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4442 | since some C++ compilers masquerading as C compilers | |
4443 | incorrectly reject 9223372036854775807. */ | |
4444 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4445 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4446 | && LARGE_OFF_T % 2147483647 == 1) | |
4447 | ? 1 : -1]; | |
4448 | int | |
4449 | main () | |
4450 | { | |
4451 | ||
4452 | ; | |
4453 | return 0; | |
4454 | } | |
4455 | _ACEOF | |
4456 | if ac_fn_c_try_compile "$LINENO"; then : | |
4457 | ac_cv_sys_file_offset_bits=no; break | |
4458 | fi | |
4459 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4460 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4461 | /* end confdefs.h. */ | |
4462 | #define _FILE_OFFSET_BITS 64 | |
4463 | #include <sys/types.h> | |
4464 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4465 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4466 | since some C++ compilers masquerading as C compilers | |
4467 | incorrectly reject 9223372036854775807. */ | |
4468 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4469 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4470 | && LARGE_OFF_T % 2147483647 == 1) | |
4471 | ? 1 : -1]; | |
4472 | int | |
4473 | main () | |
4474 | { | |
4475 | ||
4476 | ; | |
4477 | return 0; | |
4478 | } | |
4479 | _ACEOF | |
4480 | if ac_fn_c_try_compile "$LINENO"; then : | |
4481 | ac_cv_sys_file_offset_bits=64; break | |
4482 | fi | |
4483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4484 | ac_cv_sys_file_offset_bits=unknown | |
4485 | break | |
4486 | done | |
4487 | fi | |
4488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4489 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4490 | case $ac_cv_sys_file_offset_bits in #( | |
4491 | no | unknown) ;; | |
4492 | *) | |
4493 | cat >>confdefs.h <<_ACEOF | |
4494 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4495 | _ACEOF | |
4496 | ;; | |
4497 | esac | |
4498 | rm -rf conftest* | |
4499 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4501 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4502 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4503 | $as_echo_n "(cached) " >&6 | |
4504 | else | |
4505 | while :; do | |
4506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4507 | /* end confdefs.h. */ | |
4508 | #include <sys/types.h> | |
4509 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4510 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4511 | since some C++ compilers masquerading as C compilers | |
4512 | incorrectly reject 9223372036854775807. */ | |
4513 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4514 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4515 | && LARGE_OFF_T % 2147483647 == 1) | |
4516 | ? 1 : -1]; | |
4517 | int | |
4518 | main () | |
4519 | { | |
4520 | ||
4521 | ; | |
4522 | return 0; | |
4523 | } | |
4524 | _ACEOF | |
4525 | if ac_fn_c_try_compile "$LINENO"; then : | |
4526 | ac_cv_sys_large_files=no; break | |
4527 | fi | |
4528 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4530 | /* end confdefs.h. */ | |
4531 | #define _LARGE_FILES 1 | |
4532 | #include <sys/types.h> | |
4533 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4534 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4535 | since some C++ compilers masquerading as C compilers | |
4536 | incorrectly reject 9223372036854775807. */ | |
4537 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4538 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4539 | && LARGE_OFF_T % 2147483647 == 1) | |
4540 | ? 1 : -1]; | |
4541 | int | |
4542 | main () | |
4543 | { | |
4544 | ||
4545 | ; | |
4546 | return 0; | |
4547 | } | |
4548 | _ACEOF | |
4549 | if ac_fn_c_try_compile "$LINENO"; then : | |
4550 | ac_cv_sys_large_files=1; break | |
4551 | fi | |
4552 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4553 | ac_cv_sys_large_files=unknown | |
4554 | break | |
4555 | done | |
4556 | fi | |
4557 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4558 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4559 | case $ac_cv_sys_large_files in #( | |
4560 | no | unknown) ;; | |
4561 | *) | |
4562 | cat >>confdefs.h <<_ACEOF | |
4563 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4564 | _ACEOF | |
4565 | ;; | |
4566 | esac | |
4567 | rm -rf conftest* | |
4568 | fi | |
4569 | fi | |
4570 | ||
4571 | ||
4572 | ||
81ecdfbb RW |
4573 | |
4574 | ||
4575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4576 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4577 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4578 | $as_echo_n "(cached) " >&6 | |
4579 | else | |
4580 | am_cv_prog_cc_stdc=no | |
4581 | ac_save_CC="$CC" | |
4582 | # Don't try gcc -ansi; that turns off useful extensions and | |
4583 | # breaks some systems' header files. | |
4584 | # AIX -qlanglvl=ansi | |
4585 | # Ultrix and OSF/1 -std1 | |
4586 | # HP-UX 10.20 and later -Ae | |
4587 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4588 | # SVR4 -Xc -D__EXTENSIONS__ | |
4589 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4590 | do | |
783e057b | 4591 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4593 | /* end confdefs.h. */ |
4594 | #include <stdarg.h> | |
4595 | #include <stdio.h> | |
4596 | #include <sys/types.h> | |
4597 | #include <sys/stat.h> | |
4598 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4599 | struct buf { int x; }; | |
4600 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4601 | static char *e (p, i) | |
4602 | char **p; | |
4603 | int i; | |
4604 | { | |
4605 | return p[i]; | |
4606 | } | |
4607 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4608 | { | |
4609 | char *s; | |
4610 | va_list v; | |
4611 | va_start (v,p); | |
4612 | s = g (p, va_arg (v,int)); | |
4613 | va_end (v); | |
4614 | return s; | |
4615 | } | |
4616 | int test (int i, double x); | |
4617 | struct s1 {int (*f) (int a);}; | |
4618 | struct s2 {int (*f) (double a);}; | |
4619 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4620 | int argc; | |
4621 | char **argv; | |
4622 | ||
4623 | int | |
4624 | main () | |
4625 | { | |
4626 | ||
4627 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4628 | ||
4629 | ; | |
4630 | return 0; | |
4631 | } | |
4632 | _ACEOF | |
81ecdfbb | 4633 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4634 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4635 | fi |
81ecdfbb | 4636 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4637 | done |
4638 | CC="$ac_save_CC" | |
4639 | ||
4640 | fi | |
4641 | ||
4642 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4644 | $as_echo "none needed" >&6; } | |
783e057b | 4645 | else |
81ecdfbb RW |
4646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4647 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4648 | fi |
4649 | case "x$am_cv_prog_cc_stdc" in | |
4650 | x|xno) ;; | |
4651 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4652 | esac | |
4653 | ||
4654 | ||
4655 | ac_aux_dir= | |
81ecdfbb RW |
4656 | for ac_dir in .. "$srcdir"/..; do |
4657 | for ac_t in install-sh install.sh shtool; do | |
4658 | if test -f "$ac_dir/$ac_t"; then | |
4659 | ac_aux_dir=$ac_dir | |
4660 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4661 | break 2 | |
4662 | fi | |
4663 | done | |
783e057b DJ |
4664 | done |
4665 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4666 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4667 | fi |
81ecdfbb RW |
4668 | |
4669 | # These three variables are undocumented and unsupported, | |
4670 | # and are intended to be withdrawn in a future Autoconf release. | |
4671 | # They can cause serious problems if a builder's source tree is in a directory | |
4672 | # whose full name contains unusual characters. | |
4673 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4674 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4675 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4676 | ||
783e057b | 4677 | |
783e057b | 4678 | |
81ecdfbb | 4679 | |
a417dc56 RW |
4680 | # Dependency checking. |
4681 | rm -rf .tst 2>/dev/null | |
4682 | mkdir .tst 2>/dev/null | |
4683 | if test -d .tst; then | |
4684 | am__leading_dot=. | |
4685 | else | |
4686 | am__leading_dot=_ | |
4687 | fi | |
4688 | rmdir .tst 2>/dev/null | |
4689 | ||
4690 | DEPDIR="${am__leading_dot}deps" | |
4691 | ||
81ecdfbb | 4692 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4693 | |
4694 | ||
4695 | depcc="$CC" am_compiler_list= | |
4696 | ||
4697 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4699 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4700 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4701 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4702 | else |
4703 | if test -f "$am_depcomp"; then | |
4704 | # We make a subdir and do the tests there. Otherwise we can end up | |
4705 | # making bogus files that we don't know about and never remove. For | |
4706 | # instance it was reported that on HP-UX the gcc test will end up | |
4707 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4708 | # in D'. | |
4709 | mkdir conftest.dir | |
4710 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4711 | # using a relative directory. | |
4712 | cp "$am_depcomp" conftest.dir | |
4713 | cd conftest.dir | |
4714 | # We will build objects and dependencies in a subdirectory because | |
4715 | # it helps to detect inapplicable dependency modes. For instance | |
4716 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4717 | # side effect of compilation, but ICC will put the dependencies in | |
4718 | # the current directory while Tru64 will put them in the object | |
4719 | # directory. | |
4720 | mkdir sub | |
4721 | ||
4722 | am_cv_CC_dependencies_compiler_type=none | |
4723 | if test "$am_compiler_list" = ""; then | |
4724 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4725 | fi | |
4726 | for depmode in $am_compiler_list; do | |
4727 | if test $depmode = none; then break; fi | |
4728 | ||
81ecdfbb | 4729 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4730 | # Setup a source with many dependencies, because some compilers |
4731 | # like to wrap large dependency lists on column 80 (with \), and | |
4732 | # we should not choose a depcomp mode which is confused by this. | |
4733 | # | |
4734 | # We need to recreate these files for each test, as the compiler may | |
4735 | # overwrite some of them when testing with obscure command lines. | |
4736 | # This happens at least with the AIX C compiler. | |
4737 | : > sub/conftest.c | |
4738 | for i in 1 2 3 4 5 6; do | |
4739 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4740 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4741 | # Solaris 8's {/usr,}/bin/sh. | |
4742 | touch sub/conftst$i.h | |
4743 | done | |
4744 | echo "include sub/conftest.Po" > confmf | |
4745 | ||
4746 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4747 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4748 | # handle `-M -o', and we need to detect this. | |
4749 | depcmd="depmode=$depmode \ | |
4750 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4751 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4752 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4753 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4754 | if env $depcmd > conftest.err 2>&1 && | |
4755 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4756 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4757 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4758 | # icc doesn't choke on unknown options, it will just issue warnings | |
4759 | # or remarks (even with -Werror). So we grep stderr for any message | |
4760 | # that says an option was ignored or not supported. | |
4761 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4762 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4763 | # The diagnosis changed in icc 8.0: | |
4764 | # icc: Command line remark: option '-MP' not supported | |
4765 | if (grep 'ignoring option' conftest.err || | |
4766 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4767 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4768 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4769 | break |
4770 | fi | |
4771 | fi | |
81ecdfbb | 4772 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4773 | sed -e 's/^/| /' < conftest.err >&5 |
4774 | done | |
4775 | ||
4776 | cd .. | |
4777 | rm -rf conftest.dir | |
4778 | else | |
4779 | am_cv_CC_dependencies_compiler_type=none | |
4780 | fi | |
4781 | ||
4782 | fi | |
81ecdfbb RW |
4783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4784 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4785 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4786 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4787 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4788 | ||
4789 | fi | |
4790 | ||
4791 | ||
4792 | # Check for the 'make' the user wants to use. | |
4793 | for ac_prog in make | |
4794 | do | |
4795 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4796 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4798 | $as_echo_n "checking for $ac_word... " >&6; } | |
4799 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4800 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4801 | else |
4802 | if test -n "$MAKE"; then | |
4803 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4804 | else | |
4805 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4806 | for as_dir in $PATH | |
4807 | do | |
4808 | IFS=$as_save_IFS | |
4809 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4810 | for ac_exec_ext in '' $ac_executable_extensions; do |
4811 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4812 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4813 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4814 | break 2 |
4815 | fi | |
4816 | done | |
81ecdfbb RW |
4817 | done |
4818 | IFS=$as_save_IFS | |
a417dc56 RW |
4819 | |
4820 | fi | |
4821 | fi | |
4822 | MAKE=$ac_cv_prog_MAKE | |
4823 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4825 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4826 | else |
81ecdfbb RW |
4827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4828 | $as_echo "no" >&6; } | |
a417dc56 RW |
4829 | fi |
4830 | ||
81ecdfbb | 4831 | |
a417dc56 RW |
4832 | test -n "$MAKE" && break |
4833 | done | |
4834 | ||
4835 | MAKE_IS_GNU= | |
4836 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4837 | *GNU*) | |
4838 | MAKE_IS_GNU=yes | |
4839 | ;; | |
4840 | esac | |
81ecdfbb | 4841 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4842 | GMAKE_TRUE= |
4843 | GMAKE_FALSE='#' | |
4844 | else | |
4845 | GMAKE_TRUE='#' | |
4846 | GMAKE_FALSE= | |
4847 | fi | |
4848 | ||
81ecdfbb RW |
4849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4850 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4851 | set x ${MAKE-make} | |
4852 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4853 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4854 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4855 | else |
4856 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4857 | SHELL = /bin/sh |
a417dc56 | 4858 | all: |
81ecdfbb | 4859 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4860 | _ACEOF |
4861 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4862 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4863 | *@@@%%%=?*=@@@%%%*) | |
4864 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4865 | *) | |
4866 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4867 | esac | |
a417dc56 RW |
4868 | rm -f conftest.make |
4869 | fi | |
81ecdfbb RW |
4870 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4872 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4873 | SET_MAKE= |
4874 | else | |
81ecdfbb RW |
4875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4876 | $as_echo "no" >&6; } | |
a417dc56 RW |
4877 | SET_MAKE="MAKE=${MAKE-make}" |
4878 | fi | |
4879 | ||
4880 | ||
783e057b DJ |
4881 | |
4882 | CONFIG_OBS= | |
4883 | CONFIG_DEPS= | |
4884 | CONFIG_SRCS= | |
4885 | ENABLE_CFLAGS= | |
4886 | ||
4887 | CONFIG_ALL= | |
4888 | CONFIG_CLEAN= | |
4889 | CONFIG_INSTALL= | |
4890 | CONFIG_UNINSTALL= | |
4891 | ||
4892 | # If we haven't got the data from the intl directory, | |
4893 | # assume NLS is disabled. | |
4894 | USE_NLS=no | |
4895 | LIBINTL= | |
4896 | LIBINTL_DEP= | |
4897 | INCINTL= | |
4898 | XGETTEXT= | |
4899 | GMSGFMT= | |
4900 | POSUB= | |
4901 | ||
4902 | if test -f ../intl/config.intl; then | |
4903 | . ../intl/config.intl | |
4904 | fi | |
81ecdfbb RW |
4905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4906 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4907 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4909 | $as_echo "no" >&6; } | |
783e057b | 4910 | else |
81ecdfbb RW |
4911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4912 | $as_echo "yes" >&6; } | |
783e057b | 4913 | |
81ecdfbb | 4914 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4915 | |
4916 | ||
81ecdfbb RW |
4917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4918 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4919 | # Look for .po and .gmo files in the source directory. |
4920 | CATALOGS= | |
4921 | XLINGUAS= | |
4922 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4923 | # If there aren't any .gmo files the shell will give us the | |
4924 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4925 | # weeded out. | |
4926 | case "$cat" in *\**) | |
4927 | continue;; | |
4928 | esac | |
4929 | # The quadruple backslash is collapsed to a double backslash | |
4930 | # by the backticks, then collapsed again by the double quotes, | |
4931 | # leaving us with one backslash in the sed expression (right | |
4932 | # before the dot that mustn't act as a wildcard). | |
4933 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
4934 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4935 | # The user is allowed to set LINGUAS to a list of languages to | |
4936 | # install catalogs for. If it's empty that means "all of them." | |
4937 | if test "x$LINGUAS" = x; then | |
4938 | CATALOGS="$CATALOGS $cat" | |
4939 | XLINGUAS="$XLINGUAS $lang" | |
4940 | else | |
4941 | case "$LINGUAS" in *$lang*) | |
4942 | CATALOGS="$CATALOGS $cat" | |
4943 | XLINGUAS="$XLINGUAS $lang" | |
4944 | ;; | |
4945 | esac | |
4946 | fi | |
4947 | done | |
4948 | LINGUAS="$XLINGUAS" | |
81ecdfbb RW |
4949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
4950 | $as_echo "$LINGUAS" >&6; } | |
783e057b DJ |
4951 | |
4952 | ||
4953 | DATADIRNAME=share | |
4954 | ||
4955 | INSTOBJEXT=.mo | |
4956 | ||
4957 | GENCAT=gencat | |
4958 | ||
4959 | CATOBJEXT=.gmo | |
4960 | ||
4961 | fi | |
4962 | ||
4963 | localedir='${datadir}/locale' | |
4964 | ||
4965 | ||
4966 | if test x"$USE_NLS" = xyes; then | |
4967 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4968 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4969 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4970 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
4971 | fi | |
4972 | ||
4973 | ||
f434ba03 PA |
4974 | |
4975 | ||
4976 | ||
4977 | LIBC_FATAL_STDERR_=1 | |
4978 | export LIBC_FATAL_STDERR_ | |
4979 | ||
4980 | ||
4981 | ||
4982 | ||
4983 | ||
4984 | for ac_header in $gl_header_list | |
4985 | do : | |
4986 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4987 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
4988 | eval as_val=\$$as_ac_Header | |
4989 | if test "x$as_val" = x""yes; then : | |
4990 | cat >>confdefs.h <<_ACEOF | |
4991 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4992 | _ACEOF | |
4993 | ||
4994 | fi | |
4995 | ||
4996 | done | |
4997 | ||
4998 | ||
4999 | ||
5000 | ||
5001 | ||
5002 | ||
5003 | ||
5004 | ||
5005 | ||
5006 | for ac_func in $gl_func_list | |
5007 | do : | |
5008 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5009 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5010 | eval as_val=\$$as_ac_var | |
5011 | if test "x$as_val" = x""yes; then : | |
5012 | cat >>confdefs.h <<_ACEOF | |
5013 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
5014 | _ACEOF | |
5015 | ||
5016 | fi | |
5017 | done | |
5018 | ||
5019 | ||
5020 | ||
5021 | ||
5022 | ||
5023 | ||
5024 | GNULIB_MEMCHR=0; | |
5025 | GNULIB_MEMMEM=0; | |
5026 | GNULIB_MEMPCPY=0; | |
5027 | GNULIB_MEMRCHR=0; | |
5028 | GNULIB_RAWMEMCHR=0; | |
5029 | GNULIB_STPCPY=0; | |
5030 | GNULIB_STPNCPY=0; | |
5031 | GNULIB_STRCHRNUL=0; | |
5032 | GNULIB_STRDUP=0; | |
5033 | GNULIB_STRNCAT=0; | |
5034 | GNULIB_STRNDUP=0; | |
5035 | GNULIB_STRNLEN=0; | |
5036 | GNULIB_STRPBRK=0; | |
5037 | GNULIB_STRSEP=0; | |
5038 | GNULIB_STRSTR=0; | |
5039 | GNULIB_STRCASESTR=0; | |
5040 | GNULIB_STRTOK_R=0; | |
5041 | GNULIB_MBSLEN=0; | |
5042 | GNULIB_MBSNLEN=0; | |
5043 | GNULIB_MBSCHR=0; | |
5044 | GNULIB_MBSRCHR=0; | |
5045 | GNULIB_MBSSTR=0; | |
5046 | GNULIB_MBSCASECMP=0; | |
5047 | GNULIB_MBSNCASECMP=0; | |
5048 | GNULIB_MBSPCASECMP=0; | |
5049 | GNULIB_MBSCASESTR=0; | |
5050 | GNULIB_MBSCSPN=0; | |
5051 | GNULIB_MBSPBRK=0; | |
5052 | GNULIB_MBSSPN=0; | |
5053 | GNULIB_MBSSEP=0; | |
5054 | GNULIB_MBSTOK_R=0; | |
5055 | GNULIB_STRERROR=0; | |
5056 | GNULIB_STRSIGNAL=0; | |
5057 | GNULIB_STRVERSCMP=0; | |
5058 | HAVE_MBSLEN=0; | |
5059 | HAVE_MEMCHR=1; | |
5060 | HAVE_DECL_MEMMEM=1; | |
5061 | HAVE_MEMPCPY=1; | |
5062 | HAVE_DECL_MEMRCHR=1; | |
5063 | HAVE_RAWMEMCHR=1; | |
5064 | HAVE_STPCPY=1; | |
5065 | HAVE_STPNCPY=1; | |
5066 | HAVE_STRCHRNUL=1; | |
5067 | HAVE_DECL_STRDUP=1; | |
5068 | HAVE_DECL_STRNDUP=1; | |
5069 | HAVE_DECL_STRNLEN=1; | |
5070 | HAVE_STRPBRK=1; | |
5071 | HAVE_STRSEP=1; | |
5072 | HAVE_STRCASESTR=1; | |
5073 | HAVE_DECL_STRTOK_R=1; | |
5074 | HAVE_DECL_STRSIGNAL=1; | |
5075 | HAVE_STRVERSCMP=1; | |
5076 | REPLACE_MEMCHR=0; | |
783e057b | 5077 | REPLACE_MEMMEM=0; |
f434ba03 PA |
5078 | REPLACE_STPNCPY=0; |
5079 | REPLACE_STRDUP=0; | |
783e057b | 5080 | REPLACE_STRSTR=0; |
f434ba03 PA |
5081 | REPLACE_STRCASESTR=0; |
5082 | REPLACE_STRERROR=0; | |
5083 | REPLACE_STRNCAT=0; | |
5084 | REPLACE_STRNDUP=0; | |
5085 | REPLACE_STRNLEN=0; | |
5086 | REPLACE_STRSIGNAL=0; | |
5087 | REPLACE_STRTOK_R=0; | |
5088 | UNDEFINE_STRTOK_R=0; | |
5089 | ||
5090 | ||
5091 | ||
5092 | ||
5093 | ||
5094 | ||
5095 | ||
5096 | ||
5097 | ||
5098 | ||
5099 | ||
5100 | ||
5101 | ||
5102 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it | |
5103 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | |
5104 | # irrelevant for anonymous mappings. | |
5105 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
5106 | if test "x$ac_cv_func_mmap" = x""yes; then : | |
5107 | gl_have_mmap=yes | |
5108 | else | |
5109 | gl_have_mmap=no | |
5110 | fi | |
5111 | ||
5112 | ||
5113 | # Try to allow MAP_ANONYMOUS. | |
5114 | gl_have_mmap_anonymous=no | |
5115 | if test $gl_have_mmap = yes; then | |
5116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 | |
5117 | $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } | |
5118 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5119 | /* end confdefs.h. */ | |
5120 | ||
5121 | #include <sys/mman.h> | |
5122 | #ifdef MAP_ANONYMOUS | |
5123 | I cant identify this map. | |
5124 | #endif | |
5125 | ||
5126 | _ACEOF | |
5127 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5128 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5129 | gl_have_mmap_anonymous=yes | |
5130 | fi | |
5131 | rm -f conftest* | |
5132 | ||
5133 | if test $gl_have_mmap_anonymous != yes; then | |
5134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5135 | /* end confdefs.h. */ | |
5136 | ||
5137 | #include <sys/mman.h> | |
5138 | #ifdef MAP_ANON | |
5139 | I cant identify this map. | |
5140 | #endif | |
5141 | ||
5142 | _ACEOF | |
5143 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5144 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5145 | ||
5146 | $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h | |
5147 | ||
5148 | gl_have_mmap_anonymous=yes | |
5149 | fi | |
5150 | rm -f conftest* | |
5151 | ||
5152 | fi | |
5153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 | |
5154 | $as_echo "$gl_have_mmap_anonymous" >&6; } | |
5155 | if test $gl_have_mmap_anonymous = yes; then | |
5156 | ||
5157 | $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h | |
5158 | ||
5159 | fi | |
5160 | fi | |
5161 | ||
5162 | ||
5163 | : | |
5164 | ||
5165 | ||
5166 | ||
5167 | ||
5168 | ||
5169 | ||
5170 | : | |
5171 | ||
5172 | ||
5173 | ||
5174 | ||
5175 | ||
5176 | ||
5177 | ||
5178 | ||
5179 | : | |
5180 | ||
5181 | ||
5182 | ||
5183 | ||
5184 | ||
5185 | if test $ac_cv_func_memchr = yes; then | |
5186 | # Detect platform-specific bugs in some versions of glibc: | |
5187 | # memchr should not dereference anything with length 0 | |
5188 | # http://bugzilla.redhat.com/499689 | |
5189 | # memchr should not dereference overestimated length after a match | |
5190 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | |
5191 | # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 | |
5192 | # Assume that memchr works on platforms that lack mprotect. | |
5193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 | |
5194 | $as_echo_n "checking whether memchr works... " >&6; } | |
5195 | if test "${gl_cv_func_memchr_works+set}" = set; then : | |
5196 | $as_echo_n "(cached) " >&6 | |
5197 | else | |
5198 | if test "$cross_compiling" = yes; then : | |
5199 | gl_cv_func_memchr_works="guessing no" | |
5200 | else | |
5201 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5202 | /* end confdefs.h. */ | |
5203 | ||
5204 | #include <string.h> | |
5205 | #if HAVE_SYS_MMAN_H | |
5206 | # include <fcntl.h> | |
5207 | # include <unistd.h> | |
5208 | # include <sys/types.h> | |
5209 | # include <sys/mman.h> | |
5210 | # ifndef MAP_FILE | |
5211 | # define MAP_FILE 0 | |
5212 | # endif | |
5213 | #endif | |
5214 | ||
5215 | int | |
5216 | main () | |
5217 | { | |
5218 | ||
5219 | char *fence = NULL; | |
5220 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | |
5221 | # if HAVE_MAP_ANONYMOUS | |
5222 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | |
5223 | const int fd = -1; | |
5224 | # else /* !HAVE_MAP_ANONYMOUS */ | |
5225 | const int flags = MAP_FILE | MAP_PRIVATE; | |
5226 | int fd = open ("/dev/zero", O_RDONLY, 0666); | |
5227 | if (fd >= 0) | |
5228 | # endif | |
5229 | { | |
5230 | int pagesize = getpagesize (); | |
5231 | char *two_pages = | |
5232 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | |
5233 | flags, fd, 0); | |
5234 | if (two_pages != (char *)(-1) | |
5235 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | |
5236 | fence = two_pages + pagesize; | |
5237 | } | |
5238 | #endif | |
5239 | if (fence) | |
5240 | { | |
5241 | if (memchr (fence, 0, 0)) | |
5242 | return 1; | |
5243 | strcpy (fence - 9, "12345678"); | |
5244 | if (memchr (fence - 9, 0, 79) != fence - 1) | |
5245 | return 2; | |
5246 | } | |
5247 | return 0; | |
5248 | ||
5249 | ; | |
5250 | return 0; | |
5251 | } | |
5252 | _ACEOF | |
5253 | if ac_fn_c_try_run "$LINENO"; then : | |
5254 | gl_cv_func_memchr_works=yes | |
5255 | else | |
5256 | gl_cv_func_memchr_works=no | |
5257 | fi | |
5258 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5259 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5260 | fi | |
5261 | ||
5262 | fi | |
5263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 | |
5264 | $as_echo "$gl_cv_func_memchr_works" >&6; } | |
5265 | if test "$gl_cv_func_memchr_works" != yes; then | |
5266 | REPLACE_MEMCHR=1 | |
5267 | fi | |
5268 | else | |
5269 | HAVE_MEMCHR=0 | |
5270 | fi | |
5271 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then | |
5272 | ||
5273 | ||
5274 | ||
5275 | ||
5276 | ||
5277 | ||
5278 | ||
5279 | ||
5280 | gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" | |
5281 | ||
5282 | ||
5283 | for ac_header in bp-sym.h | |
5284 | do : | |
5285 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
5286 | if test "x$ac_cv_header_bp_sym_h" = x""yes; then : | |
5287 | cat >>confdefs.h <<_ACEOF | |
5288 | #define HAVE_BP_SYM_H 1 | |
5289 | _ACEOF | |
5290 | ||
5291 | fi | |
5292 | ||
5293 | done | |
5294 | ||
5295 | ||
5296 | fi | |
783e057b DJ |
5297 | |
5298 | ||
81ecdfbb RW |
5299 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
5300 | if test "x$ac_cv_have_decl_memmem" = x""yes; then : | |
5301 | ac_have_decl=1 | |
783e057b | 5302 | else |
81ecdfbb | 5303 | ac_have_decl=0 |
783e057b | 5304 | fi |
783e057b DJ |
5305 | |
5306 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 5307 | #define HAVE_DECL_MEMMEM $ac_have_decl |
783e057b DJ |
5308 | _ACEOF |
5309 | ||
5310 | ||
783e057b DJ |
5311 | |
5312 | ||
5313 | ||
5314 | ||
5315 | ||
5316 | ||
5317 | ||
5318 | ||
783e057b | 5319 | |
783e057b | 5320 | |
783e057b | 5321 | |
f434ba03 | 5322 | |
81ecdfbb RW |
5323 | for ac_func in memmem |
5324 | do : | |
5325 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
5326 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 5327 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5328 | #define HAVE_MEMMEM 1 |
783e057b DJ |
5329 | _ACEOF |
5330 | ||
5331 | else | |
5332 | ||
5333 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
5334 | ||
5335 | fi | |
5336 | done | |
5337 | ||
5338 | ||
5339 | ||
5340 | : | |
5341 | ||
5342 | ||
5343 | ||
5344 | ||
5345 | ||
5346 | if test $ac_cv_have_decl_memmem = no; then | |
5347 | HAVE_DECL_MEMMEM=0 | |
5348 | fi | |
5349 | : | |
5350 | ||
5351 | ||
f434ba03 PA |
5352 | gl_cv_c_multiarch=no |
5353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5354 | /* end confdefs.h. */ | |
5355 | #ifndef __APPLE_CC__ | |
5356 | not a universal capable compiler | |
5357 | #endif | |
5358 | typedef int dummy; | |
5359 | ||
5360 | _ACEOF | |
5361 | if ac_fn_c_try_compile "$LINENO"; then : | |
5362 | ||
5363 | arch= | |
5364 | prev= | |
5365 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
5366 | if test -n "$prev"; then | |
5367 | case $word in | |
5368 | i?86 | x86_64 | ppc | ppc64) | |
5369 | if test -z "$arch" || test "$arch" = "$word"; then | |
5370 | arch="$word" | |
5371 | else | |
5372 | gl_cv_c_multiarch=yes | |
5373 | fi | |
5374 | ;; | |
5375 | esac | |
5376 | prev= | |
5377 | else | |
5378 | if test "x$word" = "x-arch"; then | |
5379 | prev=arch | |
5380 | fi | |
5381 | fi | |
5382 | done | |
5383 | ||
5384 | fi | |
5385 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5386 | if test $gl_cv_c_multiarch = yes; then | |
5387 | ||
5388 | $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
5389 | ||
5390 | APPLE_UNIVERSAL_BUILD=1 | |
5391 | else | |
5392 | APPLE_UNIVERSAL_BUILD=0 | |
5393 | fi | |
5394 | ||
5395 | ||
5396 | ||
5397 | REPLACE_NULL=0; | |
5398 | HAVE_WCHAR_T=1; | |
5399 | STDDEF_H=''; | |
5400 | ||
5401 | ||
5402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
5403 | $as_echo_n "checking for wchar_t... " >&6; } | |
5404 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
5405 | $as_echo_n "(cached) " >&6 | |
5406 | else | |
5407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5408 | /* end confdefs.h. */ | |
5409 | #include <stddef.h> | |
5410 | wchar_t foo = (wchar_t)'\0'; | |
5411 | int | |
5412 | main () | |
5413 | { | |
5414 | ||
5415 | ; | |
5416 | return 0; | |
5417 | } | |
5418 | _ACEOF | |
5419 | if ac_fn_c_try_compile "$LINENO"; then : | |
5420 | gt_cv_c_wchar_t=yes | |
5421 | else | |
5422 | gt_cv_c_wchar_t=no | |
5423 | fi | |
5424 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5425 | fi | |
5426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
5427 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
5428 | if test $gt_cv_c_wchar_t = yes; then | |
5429 | ||
5430 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
5431 | ||
5432 | fi | |
5433 | ||
5434 | ||
5435 | ||
5436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
5437 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
5438 | if test "${gl_cv_have_include_next+set}" = set; then : | |
5439 | $as_echo_n "(cached) " >&6 | |
5440 | else | |
5441 | rm -rf conftestd1a conftestd1b conftestd2 | |
5442 | mkdir conftestd1a conftestd1b conftestd2 | |
5443 | cat <<EOF > conftestd1a/conftest.h | |
5444 | #define DEFINED_IN_CONFTESTD1 | |
5445 | #include_next <conftest.h> | |
5446 | #ifdef DEFINED_IN_CONFTESTD2 | |
5447 | int foo; | |
5448 | #else | |
5449 | #error "include_next doesn't work" | |
5450 | #endif | |
5451 | EOF | |
5452 | cat <<EOF > conftestd1b/conftest.h | |
5453 | #define DEFINED_IN_CONFTESTD1 | |
5454 | #include <stdio.h> | |
5455 | #include_next <conftest.h> | |
5456 | #ifdef DEFINED_IN_CONFTESTD2 | |
5457 | int foo; | |
5458 | #else | |
5459 | #error "include_next doesn't work" | |
5460 | #endif | |
5461 | EOF | |
5462 | cat <<EOF > conftestd2/conftest.h | |
5463 | #ifndef DEFINED_IN_CONFTESTD1 | |
5464 | #error "include_next test doesn't work" | |
5465 | #endif | |
5466 | #define DEFINED_IN_CONFTESTD2 | |
5467 | EOF | |
5468 | gl_save_CPPFLAGS="$CPPFLAGS" | |
5469 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
5470 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5471 | /* end confdefs.h. */ | |
5472 | #include <conftest.h> | |
5473 | _ACEOF | |
5474 | if ac_fn_c_try_compile "$LINENO"; then : | |
5475 | gl_cv_have_include_next=yes | |
5476 | else | |
5477 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
5478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5479 | /* end confdefs.h. */ | |
5480 | #include <conftest.h> | |
5481 | _ACEOF | |
5482 | if ac_fn_c_try_compile "$LINENO"; then : | |
5483 | gl_cv_have_include_next=buggy | |
5484 | else | |
5485 | gl_cv_have_include_next=no | |
5486 | fi | |
5487 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5488 | ||
5489 | fi | |
5490 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5491 | CPPFLAGS="$gl_save_CPPFLAGS" | |
5492 | rm -rf conftestd1a conftestd1b conftestd2 | |
5493 | ||
5494 | fi | |
5495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
5496 | $as_echo "$gl_cv_have_include_next" >&6; } | |
5497 | PRAGMA_SYSTEM_HEADER= | |
5498 | if test $gl_cv_have_include_next = yes; then | |
5499 | INCLUDE_NEXT=include_next | |
5500 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5501 | if test -n "$GCC"; then | |
5502 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
5503 | fi | |
5504 | else | |
5505 | if test $gl_cv_have_include_next = buggy; then | |
5506 | INCLUDE_NEXT=include | |
5507 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5508 | else | |
5509 | INCLUDE_NEXT=include | |
5510 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
5511 | fi | |
5512 | fi | |
5513 | ||
5514 | ||
5515 | ||
5516 | ||
5517 | ||
5518 | ||
5519 | ||
5520 | ||
5521 | ||
5522 | ||
81ecdfbb RW |
5523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
5524 | $as_echo_n "checking for long long int... " >&6; } | |
5525 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
5526 | $as_echo_n "(cached) " >&6 | |
783e057b | 5527 | else |
81ecdfbb | 5528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5529 | /* end confdefs.h. */ |
81ecdfbb RW |
5530 | |
5531 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5532 | implementations with broken preprocessors. Perhaps this can |
5533 | be revisited in 2012. In the meantime, code should not expect | |
5534 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5535 | /* Test literals. */ |
5536 | long long int ll = 9223372036854775807ll; | |
5537 | long long int nll = -9223372036854775807LL; | |
5538 | unsigned long long int ull = 18446744073709551615ULL; | |
5539 | /* Test constant expressions. */ | |
5540 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5541 | ? 1 : -1)]; |
783e057b | 5542 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5543 | ? 1 : -1)]; |
783e057b DJ |
5544 | int i = 63; |
5545 | int | |
5546 | main () | |
5547 | { | |
5548 | /* Test availability of runtime routines for shift and division. */ | |
5549 | long long int llmax = 9223372036854775807ll; | |
5550 | unsigned long long int ullmax = 18446744073709551615ull; | |
5551 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5552 | | (llmax / ll) | (llmax % ll) |
5553 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5554 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5555 | ; |
5556 | return 0; | |
5557 | } | |
5558 | ||
5559 | _ACEOF | |
81ecdfbb | 5560 | if ac_fn_c_try_link "$LINENO"; then : |
f434ba03 | 5561 | if test "$cross_compiling" = yes; then : |
783e057b DJ |
5562 | ac_cv_type_long_long_int=yes |
5563 | else | |
81ecdfbb | 5564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5565 | /* end confdefs.h. */ |
5566 | #include <limits.h> | |
f434ba03 PA |
5567 | #ifndef LLONG_MAX |
5568 | # define HALF \ | |
5569 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
5570 | # define LLONG_MAX (HALF - 1 + HALF) | |
5571 | #endif | |
783e057b DJ |
5572 | int |
5573 | main () | |
5574 | { | |
5575 | long long int n = 1; | |
f434ba03 PA |
5576 | int i; |
5577 | for (i = 0; ; i++) | |
5578 | { | |
5579 | long long int m = n << i; | |
5580 | if (m >> i != n) | |
5581 | return 1; | |
5582 | if (LLONG_MAX / 2 < m) | |
5583 | break; | |
5584 | } | |
5585 | return 0; | |
783e057b DJ |
5586 | ; |
5587 | return 0; | |
5588 | } | |
5589 | _ACEOF | |
81ecdfbb | 5590 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
5591 | ac_cv_type_long_long_int=yes |
5592 | else | |
81ecdfbb | 5593 | ac_cv_type_long_long_int=no |
783e057b | 5594 | fi |
81ecdfbb RW |
5595 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5596 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 5597 | fi |
783e057b | 5598 | |
81ecdfbb RW |
5599 | else |
5600 | ac_cv_type_long_long_int=no | |
783e057b | 5601 | fi |
81ecdfbb RW |
5602 | rm -f core conftest.err conftest.$ac_objext \ |
5603 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5604 | fi |
81ecdfbb RW |
5605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
5606 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
783e057b DJ |
5607 | if test $ac_cv_type_long_long_int = yes; then |
5608 | ||
81ecdfbb | 5609 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5610 | |
5611 | fi | |
5612 | ||
5613 | ||
81ecdfbb RW |
5614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
5615 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
5616 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
5617 | $as_echo_n "(cached) " >&6 | |
783e057b | 5618 | else |
81ecdfbb | 5619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5620 | /* end confdefs.h. */ |
81ecdfbb RW |
5621 | |
5622 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5623 | implementations with broken preprocessors. Perhaps this can |
5624 | be revisited in 2012. In the meantime, code should not expect | |
5625 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5626 | /* Test literals. */ |
5627 | long long int ll = 9223372036854775807ll; | |
5628 | long long int nll = -9223372036854775807LL; | |
5629 | unsigned long long int ull = 18446744073709551615ULL; | |
5630 | /* Test constant expressions. */ | |
5631 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5632 | ? 1 : -1)]; |
783e057b | 5633 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5634 | ? 1 : -1)]; |
783e057b DJ |
5635 | int i = 63; |
5636 | int | |
5637 | main () | |
5638 | { | |
5639 | /* Test availability of runtime routines for shift and division. */ | |
5640 | long long int llmax = 9223372036854775807ll; | |
5641 | unsigned long long int ullmax = 18446744073709551615ull; | |
5642 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5643 | | (llmax / ll) | (llmax % ll) |
5644 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5645 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5646 | ; |
5647 | return 0; | |
5648 | } | |
5649 | ||
5650 | _ACEOF | |
81ecdfbb | 5651 | if ac_fn_c_try_link "$LINENO"; then : |
783e057b DJ |
5652 | ac_cv_type_unsigned_long_long_int=yes |
5653 | else | |
81ecdfbb | 5654 | ac_cv_type_unsigned_long_long_int=no |
783e057b | 5655 | fi |
81ecdfbb RW |
5656 | rm -f core conftest.err conftest.$ac_objext \ |
5657 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5658 | fi |
81ecdfbb RW |
5659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 |
5660 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
783e057b DJ |
5661 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
5662 | ||
81ecdfbb | 5663 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5664 | |
5665 | fi | |
5666 | ||
5667 | ||
5668 | ||
783e057b DJ |
5669 | |
5670 | ||
5671 | ||
5672 | ||
5673 | ||
5674 | ||
5675 | ||
5676 | ||
81ecdfbb RW |
5677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
5678 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
5679 | if test "${ac_cv_c_restrict+set}" = set; then : | |
5680 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
5681 | else |
5682 | ac_cv_c_restrict=no | |
5683 | # The order here caters to the fact that C++ does not require restrict. | |
5684 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
81ecdfbb | 5685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5686 | /* end confdefs.h. */ |
5687 | typedef int * int_ptr; | |
5688 | int foo (int_ptr $ac_kw ip) { | |
5689 | return ip[0]; | |
5690 | } | |
5691 | int | |
5692 | main () | |
5693 | { | |
5694 | int s[1]; | |
5695 | int * $ac_kw t = s; | |
5696 | t[0] = 0; | |
5697 | return foo(t) | |
5698 | ; | |
5699 | return 0; | |
5700 | } | |
5701 | _ACEOF | |
81ecdfbb | 5702 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5703 | ac_cv_c_restrict=$ac_kw |
783e057b | 5704 | fi |
81ecdfbb | 5705 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5706 | test "$ac_cv_c_restrict" != no && break |
5707 | done | |
5708 | ||
5709 | fi | |
81ecdfbb RW |
5710 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
5711 | $as_echo "$ac_cv_c_restrict" >&6; } | |
783e057b DJ |
5712 | |
5713 | case $ac_cv_c_restrict in | |
5714 | restrict) ;; | |
81ecdfbb | 5715 | no) $as_echo "#define restrict /**/" >>confdefs.h |
783e057b DJ |
5716 | ;; |
5717 | *) cat >>confdefs.h <<_ACEOF | |
5718 | #define restrict $ac_cv_c_restrict | |
5719 | _ACEOF | |
5720 | ;; | |
5721 | esac | |
5722 | ||
5723 | ||
5724 | ||
5725 | ||
5726 | ||
5727 | ||
5728 | ||
5729 | ||
5730 | ||
5731 | ||
5732 | ||
5733 | ||
f434ba03 | 5734 | |
783e057b DJ |
5735 | : |
5736 | ||
5737 | ||
5738 | ||
5739 | ||
5740 | ||
5741 | ||
5742 | ||
f434ba03 PA |
5743 | if test $gl_cv_have_include_next = yes; then |
5744 | gl_cv_next_string_h='<'string.h'>' | |
5745 | else | |
5746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 | |
5747 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
5748 | if test "${gl_cv_next_string_h+set}" = set; then : | |
5749 | $as_echo_n "(cached) " >&6 | |
5750 | else | |
5751 | ||
5752 | if test $ac_cv_header_string_h = yes; then | |
5753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5754 | /* end confdefs.h. */ | |
5755 | #include <string.h> | |
5756 | ||
5757 | _ACEOF | |
5758 | case "$host_os" in | |
5759 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
5760 | *) gl_absname_cpp="$ac_cpp" ;; | |
5761 | esac | |
5762 | gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
5763 | sed -n '\#/string.h#{ | |
5764 | s#.*"\(.*/string.h\)".*#\1# | |
5765 | s#^/[^/]#//&# | |
5766 | p | |
5767 | q | |
5768 | }'`'"' | |
5769 | else | |
5770 | gl_cv_next_string_h='<'string.h'>' | |
5771 | fi | |
5772 | ||
5773 | fi | |
5774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 | |
5775 | $as_echo "$gl_cv_next_string_h" >&6; } | |
5776 | fi | |
5777 | NEXT_STRING_H=$gl_cv_next_string_h | |
5778 | ||
5779 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
5780 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5781 | gl_next_as_first_directive='<'string.h'>' | |
5782 | else | |
5783 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5784 | gl_next_as_first_directive=$gl_cv_next_string_h | |
5785 | fi | |
5786 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive | |
5787 | ||
5788 | ||
5789 | ||
5790 | ||
5791 | ||
5792 | for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do | |
5793 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
5794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
5795 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
5796 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5797 | $as_echo_n "(cached) " >&6 | |
5798 | else | |
5799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5800 | /* end confdefs.h. */ | |
5801 | #include <string.h> | |
5802 | ||
5803 | int | |
5804 | main () | |
5805 | { | |
5806 | #undef $gl_func | |
5807 | (void) $gl_func; | |
5808 | ; | |
5809 | return 0; | |
5810 | } | |
5811 | _ACEOF | |
5812 | if ac_fn_c_try_compile "$LINENO"; then : | |
5813 | eval "$as_gl_Symbol=yes" | |
5814 | else | |
5815 | eval "$as_gl_Symbol=no" | |
5816 | fi | |
5817 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5818 | fi | |
5819 | eval ac_res=\$$as_gl_Symbol | |
5820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5821 | $as_echo "$ac_res" >&6; } | |
5822 | eval as_val=\$$as_gl_Symbol | |
5823 | if test "x$as_val" = x""yes; then : | |
5824 | cat >>confdefs.h <<_ACEOF | |
5825 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
5826 | _ACEOF | |
5827 | ||
5828 | eval ac_cv_have_decl_$gl_func=yes | |
5829 | fi | |
5830 | done | |
5831 | ||
5832 | ||
5833 | ||
5834 | GNULIB_BTOWC=0; | |
5835 | GNULIB_WCTOB=0; | |
5836 | GNULIB_MBSINIT=0; | |
5837 | GNULIB_MBRTOWC=0; | |
5838 | GNULIB_MBRLEN=0; | |
5839 | GNULIB_MBSRTOWCS=0; | |
5840 | GNULIB_MBSNRTOWCS=0; | |
5841 | GNULIB_WCRTOMB=0; | |
5842 | GNULIB_WCSRTOMBS=0; | |
5843 | GNULIB_WCSNRTOMBS=0; | |
5844 | GNULIB_WCWIDTH=0; | |
5845 | HAVE_BTOWC=1; | |
5846 | HAVE_MBSINIT=1; | |
5847 | HAVE_MBRTOWC=1; | |
5848 | HAVE_MBRLEN=1; | |
5849 | HAVE_MBSRTOWCS=1; | |
5850 | HAVE_MBSNRTOWCS=1; | |
5851 | HAVE_WCRTOMB=1; | |
5852 | HAVE_WCSRTOMBS=1; | |
5853 | HAVE_WCSNRTOMBS=1; | |
5854 | HAVE_DECL_WCTOB=1; | |
5855 | HAVE_DECL_WCWIDTH=1; | |
5856 | REPLACE_MBSTATE_T=0; | |
5857 | REPLACE_BTOWC=0; | |
5858 | REPLACE_WCTOB=0; | |
5859 | REPLACE_MBSINIT=0; | |
5860 | REPLACE_MBRTOWC=0; | |
5861 | REPLACE_MBRLEN=0; | |
5862 | REPLACE_MBSRTOWCS=0; | |
5863 | REPLACE_MBSNRTOWCS=0; | |
5864 | REPLACE_WCRTOMB=0; | |
5865 | REPLACE_WCSRTOMBS=0; | |
5866 | REPLACE_WCSNRTOMBS=0; | |
5867 | REPLACE_WCWIDTH=0; | |
5868 | ||
5869 | ||
5870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 | |
5871 | $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } | |
5872 | if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : | |
81ecdfbb | 5873 | $as_echo_n "(cached) " >&6 |
783e057b | 5874 | else |
f434ba03 PA |
5875 | gl_cv_header_wchar_h_correct_inline=yes |
5876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5877 | /* end confdefs.h. */ | |
783e057b | 5878 | |
f434ba03 PA |
5879 | #define wcstod renamed_wcstod |
5880 | #include <wchar.h> | |
5881 | extern int zero (void); | |
5882 | int main () { return zero(); } | |
5883 | ||
5884 | _ACEOF | |
5885 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
5886 | (eval $ac_compile) 2>&5 | |
5887 | ac_status=$? | |
5888 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5889 | test $ac_status = 0; }; then | |
5890 | mv conftest.$ac_objext conftest1.$ac_objext | |
5891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b | 5892 | /* end confdefs.h. */ |
f434ba03 PA |
5893 | |
5894 | #define wcstod renamed_wcstod | |
5895 | #include <wchar.h> | |
5896 | int zero (void) { return 0; } | |
783e057b DJ |
5897 | |
5898 | _ACEOF | |
f434ba03 PA |
5899 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
5900 | (eval $ac_compile) 2>&5 | |
5901 | ac_status=$? | |
5902 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5903 | test $ac_status = 0; }; then | |
5904 | mv conftest.$ac_objext conftest2.$ac_objext | |
5905 | if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then | |
5906 | : | |
5907 | else | |
5908 | gl_cv_header_wchar_h_correct_inline=no | |
5909 | fi | |
5910 | fi | |
5911 | fi | |
5912 | rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext | |
783e057b DJ |
5913 | |
5914 | fi | |
f434ba03 PA |
5915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 |
5916 | $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } | |
5917 | if test $gl_cv_header_wchar_h_correct_inline = no; then | |
5918 | as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). | |
5919 | This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in | |
5920 | C99 mode. You have four options: | |
5921 | - Add the flag -fgnu89-inline to CC and reconfigure, or | |
5922 | - Fix your include files, using parts of | |
5923 | <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or | |
5924 | - Use a gcc version older than 4.3, or | |
5925 | - Don't use the flags -std=c99 or -std=gnu99. | |
5926 | Configuration aborted." "$LINENO" 5 | |
5927 | fi | |
783e057b DJ |
5928 | |
5929 | ||
f434ba03 PA |
5930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 |
5931 | $as_echo_n "checking for wint_t... " >&6; } | |
5932 | if test "${gt_cv_c_wint_t+set}" = set; then : | |
5933 | $as_echo_n "(cached) " >&6 | |
5934 | else | |
5935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5936 | /* end confdefs.h. */ | |
783e057b | 5937 | |
f434ba03 PA |
5938 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
5939 | <wchar.h>. | |
5940 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | |
5941 | before <wchar.h>. */ | |
5942 | #include <stddef.h> | |
5943 | #include <stdio.h> | |
5944 | #include <time.h> | |
5945 | #include <wchar.h> | |
5946 | wint_t foo = (wchar_t)'\0'; | |
5947 | int | |
5948 | main () | |
5949 | { | |
783e057b | 5950 | |
f434ba03 PA |
5951 | ; |
5952 | return 0; | |
5953 | } | |
5954 | _ACEOF | |
5955 | if ac_fn_c_try_compile "$LINENO"; then : | |
5956 | gt_cv_c_wint_t=yes | |
5957 | else | |
5958 | gt_cv_c_wint_t=no | |
5959 | fi | |
5960 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5961 | fi | |
5962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 | |
5963 | $as_echo "$gt_cv_c_wint_t" >&6; } | |
5964 | if test $gt_cv_c_wint_t = yes; then | |
783e057b | 5965 | |
f434ba03 | 5966 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h |
783e057b | 5967 | |
f434ba03 | 5968 | fi |
783e057b DJ |
5969 | |
5970 | ||
81ecdfbb | 5971 | if false; then |
783e057b DJ |
5972 | GL_COND_LIBTOOL_TRUE= |
5973 | GL_COND_LIBTOOL_FALSE='#' | |
5974 | else | |
5975 | GL_COND_LIBTOOL_TRUE='#' | |
5976 | GL_COND_LIBTOOL_FALSE= | |
5977 | fi | |
5978 | ||
5979 | gl_cond_libtool=false | |
5980 | gl_libdeps= | |
5981 | gl_ltlibdeps= | |
f434ba03 | 5982 | gl_m4_base='gnulib/m4' |
783e057b DJ |
5983 | |
5984 | ||
5985 | ||
783e057b DJ |
5986 | |
5987 | ||
5988 | ||
5989 | ||
5990 | ||
5991 | ||
f434ba03 PA |
5992 | gl_source_base='gnulib' |
5993 | # Code from module arg-nonnull: | |
5994 | # Code from module c++defs: | |
5995 | # Code from module extensions: | |
5996 | # Code from module include_next: | |
5997 | # Code from module memchr: | |
783e057b | 5998 | |
783e057b | 5999 | |
783e057b | 6000 | |
783e057b | 6001 | |
f434ba03 | 6002 | GNULIB_MEMCHR=1 |
783e057b | 6003 | |
783e057b | 6004 | |
783e057b | 6005 | |
f434ba03 | 6006 | $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h |
783e057b | 6007 | |
783e057b DJ |
6008 | |
6009 | ||
f434ba03 | 6010 | # Code from module memmem: |
783e057b DJ |
6011 | |
6012 | ||
f434ba03 PA |
6013 | if test $ac_cv_have_decl_memmem = yes; then |
6014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 | |
6015 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
6016 | if test "${gl_cv_func_memmem_works+set}" = set; then : | |
81ecdfbb | 6017 | $as_echo_n "(cached) " >&6 |
783e057b | 6018 | else |
81ecdfbb | 6019 | if test "$cross_compiling" = yes; then : |
f434ba03 | 6020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 6021 | /* end confdefs.h. */ |
783e057b | 6022 | |
f434ba03 PA |
6023 | #include <features.h> |
6024 | #ifdef __GNU_LIBRARY__ | |
6025 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) | |
6026 | Lucky user | |
6027 | #endif | |
6028 | #endif | |
6029 | #ifdef __CYGWIN__ | |
6030 | #include <cygwin/version.h> | |
6031 | #if CYGWIN_VERSION_DLL_MAJOR >= 1007 | |
6032 | Lucky user | |
6033 | #endif | |
6034 | #endif | |
783e057b | 6035 | |
783e057b | 6036 | _ACEOF |
f434ba03 PA |
6037 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6038 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
6039 | gl_cv_func_memmem_works=yes | |
783e057b | 6040 | else |
f434ba03 | 6041 | gl_cv_func_memmem_works="guessing no" |
783e057b | 6042 | fi |
f434ba03 | 6043 | rm -f conftest* |
783e057b DJ |
6044 | |
6045 | ||
783e057b | 6046 | else |
81ecdfbb | 6047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6048 | /* end confdefs.h. */ |
6049 | ||
f434ba03 | 6050 | #include <signal.h> /* for signal */ |
783e057b DJ |
6051 | #include <string.h> /* for memmem */ |
6052 | #include <stdlib.h> /* for malloc */ | |
6053 | #include <unistd.h> /* for alarm */ | |
6054 | ||
6055 | int | |
6056 | main () | |
6057 | { | |
6058 | size_t m = 1000000; | |
6059 | char *haystack = (char *) malloc (2 * m + 1); | |
6060 | char *needle = (char *) malloc (m + 1); | |
6061 | void *result = 0; | |
6062 | /* Failure to compile this test due to missing alarm is okay, | |
6063 | since all such platforms (mingw) also lack memmem. */ | |
f434ba03 | 6064 | signal (SIGALRM, SIG_DFL); |
783e057b DJ |
6065 | alarm (5); |
6066 | /* Check for quadratic performance. */ | |
6067 | if (haystack && needle) | |
6068 | { | |
f434ba03 PA |
6069 | memset (haystack, 'A', 2 * m); |
6070 | haystack[2 * m] = 'B'; | |
6071 | memset (needle, 'A', m); | |
6072 | needle[m] = 'B'; | |
6073 | result = memmem (haystack, 2 * m + 1, needle, m + 1); | |
783e057b DJ |
6074 | } |
6075 | /* Check for empty needle behavior. */ | |
6076 | return !result || !memmem ("a", 1, 0, 0); | |
6077 | ; | |
6078 | return 0; | |
6079 | } | |
6080 | _ACEOF | |
81ecdfbb | 6081 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
6082 | gl_cv_func_memmem_works=yes |
6083 | else | |
81ecdfbb | 6084 | gl_cv_func_memmem_works=no |
783e057b | 6085 | fi |
81ecdfbb RW |
6086 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6087 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 6088 | fi |
81ecdfbb | 6089 | |
f434ba03 | 6090 | |
783e057b | 6091 | fi |
81ecdfbb RW |
6092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5 |
6093 | $as_echo "$gl_cv_func_memmem_works" >&6; } | |
783e057b DJ |
6094 | if test "$gl_cv_func_memmem_works" != yes; then |
6095 | REPLACE_MEMMEM=1 | |
6096 | ||
6097 | ||
6098 | ||
6099 | ||
6100 | ||
6101 | ||
6102 | ||
f434ba03 | 6103 | |
783e057b DJ |
6104 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" |
6105 | ||
6106 | fi | |
6107 | fi | |
6108 | ||
f434ba03 PA |
6109 | # Code from module memmem-simple: |
6110 | ||
783e057b DJ |
6111 | |
6112 | ||
6113 | ||
6114 | ||
6115 | ||
6116 | ||
6117 | ||
6118 | ||
6119 | ||
6120 | ||
6121 | ||
81ecdfbb RW |
6122 | for ac_func in memmem |
6123 | do : | |
6124 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
6125 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 6126 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6127 | #define HAVE_MEMMEM 1 |
783e057b DJ |
6128 | _ACEOF |
6129 | ||
6130 | else | |
6131 | ||
6132 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
6133 | ||
6134 | fi | |
6135 | done | |
6136 | ||
6137 | ||
6138 | ||
6139 | : | |
6140 | ||
6141 | ||
6142 | ||
6143 | ||
6144 | ||
6145 | if test $ac_cv_have_decl_memmem = no; then | |
6146 | HAVE_DECL_MEMMEM=0 | |
6147 | fi | |
6148 | : | |
6149 | ||
6150 | ||
6151 | ||
f434ba03 | 6152 | |
783e057b DJ |
6153 | GNULIB_MEMMEM=1 |
6154 | ||
6155 | ||
6156 | ||
f434ba03 PA |
6157 | $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h |
6158 | ||
6159 | ||
6160 | ||
6161 | # Code from module multiarch: | |
6162 | ||
6163 | # Code from module stddef: | |
6164 | ||
6165 | ||
6166 | ||
6167 | if test $gt_cv_c_wchar_t = no; then | |
6168 | HAVE_WCHAR_T=0 | |
6169 | STDDEF_H=stddef.h | |
6170 | fi | |
6171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
6172 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
6173 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
6174 | $as_echo_n "(cached) " >&6 | |
6175 | else | |
6176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6177 | /* end confdefs.h. */ | |
6178 | #include <stddef.h> | |
6179 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
6180 | ||
6181 | int | |
6182 | main () | |
6183 | { | |
6184 | ||
6185 | ; | |
6186 | return 0; | |
6187 | } | |
6188 | _ACEOF | |
6189 | if ac_fn_c_try_compile "$LINENO"; then : | |
6190 | gl_cv_decl_null_works=yes | |
6191 | else | |
6192 | gl_cv_decl_null_works=no | |
6193 | fi | |
6194 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6195 | fi | |
6196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
6197 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
6198 | if test $gl_cv_decl_null_works = no; then | |
6199 | REPLACE_NULL=1 | |
6200 | STDDEF_H=stddef.h | |
6201 | fi | |
6202 | if test -n "$STDDEF_H"; then | |
6203 | ||
6204 | ||
6205 | ||
6206 | ||
6207 | : | |
6208 | ||
6209 | ||
6210 | ||
6211 | ||
6212 | ||
6213 | ||
6214 | ||
6215 | if test $gl_cv_have_include_next = yes; then | |
6216 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6217 | else | |
6218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
6219 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
6220 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
6221 | $as_echo_n "(cached) " >&6 | |
6222 | else | |
6223 | ||
6224 | if test $ac_cv_header_stddef_h = yes; then | |
6225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6226 | /* end confdefs.h. */ | |
6227 | #include <stddef.h> | |
6228 | ||
6229 | _ACEOF | |
6230 | case "$host_os" in | |
6231 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6232 | *) gl_absname_cpp="$ac_cpp" ;; | |
6233 | esac | |
6234 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6235 | sed -n '\#/stddef.h#{ | |
6236 | s#.*"\(.*/stddef.h\)".*#\1# | |
6237 | s#^/[^/]#//&# | |
6238 | p | |
6239 | q | |
6240 | }'`'"' | |
6241 | else | |
6242 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6243 | fi | |
6244 | ||
6245 | fi | |
6246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
6247 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
6248 | fi | |
6249 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
6250 | ||
6251 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
6252 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6253 | gl_next_as_first_directive='<'stddef.h'>' | |
6254 | else | |
6255 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6256 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
6257 | fi | |
6258 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
6259 | ||
6260 | ||
6261 | ||
6262 | fi | |
6263 | ||
6264 | # Code from module stdint: | |
6265 | ||
6266 | ||
783e057b DJ |
6267 | |
6268 | if test $ac_cv_type_long_long_int = yes; then | |
6269 | HAVE_LONG_LONG_INT=1 | |
6270 | else | |
6271 | HAVE_LONG_LONG_INT=0 | |
6272 | fi | |
6273 | ||
6274 | ||
6275 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
6276 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
6277 | else | |
6278 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
6279 | fi | |
6280 | ||
6281 | ||
6282 | if test $ac_cv_header_inttypes_h = yes; then | |
6283 | HAVE_INTTYPES_H=1 | |
6284 | else | |
6285 | HAVE_INTTYPES_H=0 | |
6286 | fi | |
6287 | ||
6288 | ||
6289 | if test $ac_cv_header_sys_types_h = yes; then | |
6290 | HAVE_SYS_TYPES_H=1 | |
6291 | else | |
6292 | HAVE_SYS_TYPES_H=0 | |
6293 | fi | |
6294 | ||
6295 | ||
6296 | ||
6297 | ||
6298 | ||
f434ba03 | 6299 | |
783e057b DJ |
6300 | : |
6301 | ||
6302 | ||
6303 | ||
6304 | ||
6305 | ||
6306 | ||
6307 | ||
6308 | if test $gl_cv_have_include_next = yes; then | |
6309 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6310 | else | |
81ecdfbb RW |
6311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 |
6312 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
6313 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
6314 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6315 | else |
6316 | ||
f434ba03 PA |
6317 | if test $ac_cv_header_stdint_h = yes; then |
6318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
6319 | /* end confdefs.h. */ |
6320 | #include <stdint.h> | |
6321 | ||
6322 | _ACEOF | |
f434ba03 PA |
6323 | case "$host_os" in |
6324 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6325 | *) gl_absname_cpp="$ac_cpp" ;; | |
6326 | esac | |
6327 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6328 | sed -n '\#/stdint.h#{ | |
6329 | s#.*"\(.*/stdint.h\)".*#\1# | |
6330 | s#^/[^/]#//&# | |
6331 | p | |
6332 | q | |
6333 | }'`'"' | |
6334 | else | |
6335 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6336 | fi | |
783e057b DJ |
6337 | |
6338 | fi | |
81ecdfbb RW |
6339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
6340 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
783e057b DJ |
6341 | fi |
6342 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
6343 | ||
f434ba03 PA |
6344 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
6345 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6346 | gl_next_as_first_directive='<'stdint.h'>' | |
6347 | else | |
6348 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6349 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
6350 | fi | |
6351 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
6352 | ||
783e057b DJ |
6353 | |
6354 | ||
6355 | if test $ac_cv_header_stdint_h = yes; then | |
6356 | HAVE_STDINT_H=1 | |
6357 | else | |
6358 | HAVE_STDINT_H=0 | |
6359 | fi | |
6360 | ||
6361 | ||
6362 | if test $ac_cv_header_stdint_h = yes; then | |
81ecdfbb RW |
6363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 |
6364 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
6365 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
6366 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6367 | else |
6368 | gl_cv_header_working_stdint_h=no | |
81ecdfbb | 6369 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6370 | /* end confdefs.h. */ |
6371 | ||
81ecdfbb | 6372 | |
783e057b DJ |
6373 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
6374 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6375 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6376 | #include <stdint.h> | |
6377 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
6378 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
6379 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
6380 | #endif | |
6381 | ||
6382 | ||
6383 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6384 | included before <wchar.h>. */ | |
6385 | #include <stddef.h> | |
6386 | #include <signal.h> | |
6387 | #if HAVE_WCHAR_H | |
6388 | # include <stdio.h> | |
6389 | # include <time.h> | |
6390 | # include <wchar.h> | |
6391 | #endif | |
6392 | ||
6393 | ||
6394 | #ifdef INT8_MAX | |
6395 | int8_t a1 = INT8_MAX; | |
6396 | int8_t a1min = INT8_MIN; | |
6397 | #endif | |
6398 | #ifdef INT16_MAX | |
6399 | int16_t a2 = INT16_MAX; | |
6400 | int16_t a2min = INT16_MIN; | |
6401 | #endif | |
6402 | #ifdef INT32_MAX | |
6403 | int32_t a3 = INT32_MAX; | |
6404 | int32_t a3min = INT32_MIN; | |
6405 | #endif | |
6406 | #ifdef INT64_MAX | |
6407 | int64_t a4 = INT64_MAX; | |
6408 | int64_t a4min = INT64_MIN; | |
6409 | #endif | |
6410 | #ifdef UINT8_MAX | |
6411 | uint8_t b1 = UINT8_MAX; | |
6412 | #else | |
6413 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
6414 | #endif | |
6415 | #ifdef UINT16_MAX | |
6416 | uint16_t b2 = UINT16_MAX; | |
6417 | #endif | |
6418 | #ifdef UINT32_MAX | |
6419 | uint32_t b3 = UINT32_MAX; | |
6420 | #endif | |
6421 | #ifdef UINT64_MAX | |
6422 | uint64_t b4 = UINT64_MAX; | |
6423 | #endif | |
6424 | int_least8_t c1 = INT8_C (0x7f); | |
6425 | int_least8_t c1max = INT_LEAST8_MAX; | |
6426 | int_least8_t c1min = INT_LEAST8_MIN; | |
6427 | int_least16_t c2 = INT16_C (0x7fff); | |
6428 | int_least16_t c2max = INT_LEAST16_MAX; | |
6429 | int_least16_t c2min = INT_LEAST16_MIN; | |
6430 | int_least32_t c3 = INT32_C (0x7fffffff); | |
6431 | int_least32_t c3max = INT_LEAST32_MAX; | |
6432 | int_least32_t c3min = INT_LEAST32_MIN; | |
6433 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
6434 | int_least64_t c4max = INT_LEAST64_MAX; | |
6435 | int_least64_t c4min = INT_LEAST64_MIN; | |
6436 | uint_least8_t d1 = UINT8_C (0xff); | |
6437 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
6438 | uint_least16_t d2 = UINT16_C (0xffff); | |
6439 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
6440 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
6441 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
6442 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
6443 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
6444 | int_fast8_t e1 = INT_FAST8_MAX; | |
6445 | int_fast8_t e1min = INT_FAST8_MIN; | |
6446 | int_fast16_t e2 = INT_FAST16_MAX; | |
6447 | int_fast16_t e2min = INT_FAST16_MIN; | |
6448 | int_fast32_t e3 = INT_FAST32_MAX; | |
6449 | int_fast32_t e3min = INT_FAST32_MIN; | |
6450 | int_fast64_t e4 = INT_FAST64_MAX; | |
6451 | int_fast64_t e4min = INT_FAST64_MIN; | |
6452 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
6453 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
6454 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
6455 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
6456 | #ifdef INTPTR_MAX | |
6457 | intptr_t g = INTPTR_MAX; | |
6458 | intptr_t gmin = INTPTR_MIN; | |
6459 | #endif | |
6460 | #ifdef UINTPTR_MAX | |
6461 | uintptr_t h = UINTPTR_MAX; | |
6462 | #endif | |
6463 | intmax_t i = INTMAX_MAX; | |
6464 | uintmax_t j = UINTMAX_MAX; | |
6465 | ||
6466 | #include <limits.h> /* for CHAR_BIT */ | |
6467 | #define TYPE_MINIMUM(t) \ | |
6468 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
6469 | #define TYPE_MAXIMUM(t) \ | |
6470 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
6471 | struct s { | |
6472 | int check_PTRDIFF: | |
6473 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
6474 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
6475 | ? 1 : -1; | |
6476 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
6477 | int check_SIG_ATOMIC: | |
6478 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
6479 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
6480 | ? 1 : -1; | |
6481 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
6482 | int check_WCHAR: | |
6483 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
6484 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
6485 | ? 1 : -1; | |
6486 | /* Detect bug in mingw. */ | |
6487 | int check_WINT: | |
6488 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
6489 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
6490 | ? 1 : -1; | |
6491 | ||
f434ba03 PA |
6492 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
6493 | int check_UINT8_C: | |
6494 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
6495 | int check_UINT16_C: | |
6496 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
6497 | ||
6498 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
6499 | #ifdef UINT8_MAX | |
6500 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
6501 | #endif | |
6502 | #ifdef UINT16_MAX | |
6503 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
6504 | #endif | |
6505 | #ifdef UINT32_MAX | |
6506 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
6507 | #endif | |
6508 | #ifdef UINT64_MAX | |
6509 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
6510 | #endif | |
6511 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
6512 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
6513 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
6514 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
6515 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
6516 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
6517 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
6518 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
6519 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
6520 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
6521 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
6522 | }; | |
6523 | ||
6524 | int | |
6525 | main () | |
6526 | { | |
6527 | ||
6528 | ; | |
6529 | return 0; | |
6530 | } | |
6531 | _ACEOF | |
6532 | if ac_fn_c_try_compile "$LINENO"; then : | |
6533 | if test "$cross_compiling" = yes; then : | |
6534 | gl_cv_header_working_stdint_h=yes | |
6535 | ||
6536 | else | |
6537 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6538 | /* end confdefs.h. */ | |
6539 | ||
6540 | ||
6541 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
6542 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6543 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6544 | #include <stdint.h> | |
6545 | ||
783e057b | 6546 | |
f434ba03 PA |
6547 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
6548 | included before <wchar.h>. */ | |
6549 | #include <stddef.h> | |
6550 | #include <signal.h> | |
6551 | #if HAVE_WCHAR_H | |
6552 | # include <stdio.h> | |
6553 | # include <time.h> | |
6554 | # include <wchar.h> | |
6555 | #endif | |
6556 | ||
6557 | ||
6558 | #include <stdio.h> | |
6559 | #include <string.h> | |
6560 | #define MVAL(macro) MVAL1(macro) | |
6561 | #define MVAL1(expression) #expression | |
6562 | static const char *macro_values[] = | |
6563 | { | |
6564 | #ifdef INT8_MAX | |
6565 | MVAL (INT8_MAX), | |
6566 | #endif | |
6567 | #ifdef INT16_MAX | |
6568 | MVAL (INT16_MAX), | |
6569 | #endif | |
6570 | #ifdef INT32_MAX | |
6571 | MVAL (INT32_MAX), | |
6572 | #endif | |
6573 | #ifdef INT64_MAX | |
6574 | MVAL (INT64_MAX), | |
6575 | #endif | |
783e057b | 6576 | #ifdef UINT8_MAX |
f434ba03 | 6577 | MVAL (UINT8_MAX), |
783e057b DJ |
6578 | #endif |
6579 | #ifdef UINT16_MAX | |
f434ba03 | 6580 | MVAL (UINT16_MAX), |
783e057b DJ |
6581 | #endif |
6582 | #ifdef UINT32_MAX | |
f434ba03 | 6583 | MVAL (UINT32_MAX), |
783e057b DJ |
6584 | #endif |
6585 | #ifdef UINT64_MAX | |
f434ba03 | 6586 | MVAL (UINT64_MAX), |
783e057b | 6587 | #endif |
f434ba03 PA |
6588 | NULL |
6589 | }; | |
783e057b DJ |
6590 | |
6591 | int | |
6592 | main () | |
6593 | { | |
6594 | ||
f434ba03 PA |
6595 | const char **mv; |
6596 | for (mv = macro_values; *mv != NULL; mv++) | |
6597 | { | |
6598 | const char *value = *mv; | |
6599 | /* Test whether it looks like a cast expression. */ | |
6600 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
6601 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
6602 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
6603 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
6604 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
6605 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
6606 | return 1; | |
6607 | } | |
6608 | return 0; | |
6609 | ||
783e057b DJ |
6610 | ; |
6611 | return 0; | |
6612 | } | |
6613 | _ACEOF | |
f434ba03 | 6614 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 6615 | gl_cv_header_working_stdint_h=yes |
f434ba03 PA |
6616 | fi |
6617 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6618 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6619 | fi | |
6620 | ||
6621 | ||
783e057b | 6622 | fi |
81ecdfbb | 6623 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 | 6624 | |
783e057b | 6625 | fi |
81ecdfbb RW |
6626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 |
6627 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
783e057b DJ |
6628 | fi |
6629 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
6630 | STDINT_H= | |
6631 | else | |
81ecdfbb RW |
6632 | for ac_header in sys/inttypes.h sys/bitypes.h |
6633 | do : | |
6634 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6635 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
6636 | eval as_val=\$$as_ac_Header | |
6637 | if test "x$as_val" = x""yes; then : | |
783e057b | 6638 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6639 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
6640 | _ACEOF |
6641 | ||
6642 | fi | |
6643 | ||
6644 | done | |
6645 | ||
6646 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
6647 | HAVE_SYS_INTTYPES_H=1 | |
6648 | else | |
6649 | HAVE_SYS_INTTYPES_H=0 | |
6650 | fi | |
6651 | ||
6652 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
6653 | HAVE_SYS_BITYPES_H=1 | |
6654 | else | |
6655 | HAVE_SYS_BITYPES_H=0 | |
6656 | fi | |
6657 | ||
6658 | ||
6659 | ||
6660 | : | |
6661 | ||
6662 | ||
6663 | ||
6664 | ||
6665 | ||
6666 | ||
6667 | ||
6668 | ||
f434ba03 PA |
6669 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
6670 | ||
6671 | ||
6672 | for gltype in ptrdiff_t size_t ; do | |
6673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
6674 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6675 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6676 | $as_echo_n "(cached) " >&6 | |
6677 | else | |
6678 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6679 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6680 | included before <wchar.h>. */ | |
6681 | #include <stddef.h> | |
6682 | #include <signal.h> | |
6683 | #if HAVE_WCHAR_H | |
6684 | # include <stdio.h> | |
6685 | # include <time.h> | |
6686 | # include <wchar.h> | |
6687 | #endif | |
6688 | ||
6689 | #include <limits.h>"; then : | |
6690 | ||
6691 | else | |
6692 | result=unknown | |
6693 | fi | |
6694 | ||
6695 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6696 | ||
6697 | fi | |
6698 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6700 | $as_echo "$ac_res" >&6; } | |
6701 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6702 | if test $result = unknown; then | |
6703 | result=0 | |
6704 | fi | |
6705 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6706 | cat >>confdefs.h <<_ACEOF | |
6707 | #define BITSIZEOF_${GLTYPE} $result | |
6708 | _ACEOF | |
6709 | ||
6710 | eval BITSIZEOF_${GLTYPE}=\$result | |
6711 | done | |
6712 | ||
6713 | ||
6714 | fi | |
6715 | ||
783e057b | 6716 | |
f434ba03 | 6717 | for gltype in sig_atomic_t wchar_t wint_t ; do |
81ecdfbb RW |
6718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 |
6719 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6720 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6721 | $as_echo_n "(cached) " >&6 | |
6722 | else | |
6723 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6724 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6725 | included before <wchar.h>. */ | |
6726 | #include <stddef.h> | |
6727 | #include <signal.h> | |
6728 | #if HAVE_WCHAR_H | |
6729 | # include <stdio.h> | |
6730 | # include <time.h> | |
6731 | # include <wchar.h> | |
6732 | #endif | |
6733 | ||
6734 | #include <limits.h>"; then : | |
6735 | ||
6736 | else | |
6737 | result=unknown | |
6738 | fi | |
6739 | ||
6740 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6741 | ||
6742 | fi | |
6743 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6745 | $as_echo "$ac_res" >&6; } | |
6746 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6747 | if test $result = unknown; then | |
6748 | result=0 | |
6749 | fi | |
6750 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6751 | cat >>confdefs.h <<_ACEOF | |
6752 | #define BITSIZEOF_${GLTYPE} $result | |
6753 | _ACEOF | |
783e057b | 6754 | |
81ecdfbb RW |
6755 | eval BITSIZEOF_${GLTYPE}=\$result |
6756 | done | |
783e057b DJ |
6757 | |
6758 | ||
6759 | ||
6760 | ||
81ecdfbb RW |
6761 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
6763 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
6764 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6765 | $as_echo_n "(cached) " >&6 | |
783e057b | 6766 | else |
81ecdfbb | 6767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6768 | /* end confdefs.h. */ |
6769 | ||
6770 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6771 | included before <wchar.h>. */ | |
6772 | #include <stddef.h> | |
6773 | #include <signal.h> | |
6774 | #if HAVE_WCHAR_H | |
6775 | # include <stdio.h> | |
6776 | # include <time.h> | |
6777 | # include <wchar.h> | |
6778 | #endif | |
6779 | ||
6780 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
6781 | int | |
6782 | main () | |
6783 | { | |
6784 | ||
6785 | ; | |
6786 | return 0; | |
6787 | } | |
6788 | _ACEOF | |
81ecdfbb | 6789 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
6790 | result=yes |
6791 | else | |
81ecdfbb | 6792 | result=no |
20e95c23 | 6793 | fi |
81ecdfbb | 6794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6795 | eval gl_cv_type_${gltype}_signed=\$result |
6796 | ||
6797 | fi | |
81ecdfbb RW |
6798 | eval ac_res=\$gl_cv_type_${gltype}_signed |
6799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6800 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6801 | eval result=\$gl_cv_type_${gltype}_signed |
6802 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6803 | if test "$result" = yes; then | |
6804 | cat >>confdefs.h <<_ACEOF | |
6805 | #define HAVE_SIGNED_${GLTYPE} 1 | |
6806 | _ACEOF | |
6807 | ||
6808 | eval HAVE_SIGNED_${GLTYPE}=1 | |
6809 | else | |
6810 | eval HAVE_SIGNED_${GLTYPE}=0 | |
6811 | fi | |
6812 | done | |
6813 | ||
6814 | ||
6815 | gl_cv_type_ptrdiff_t_signed=yes | |
6816 | gl_cv_type_size_t_signed=no | |
f434ba03 | 6817 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
783e057b DJ |
6818 | |
6819 | ||
f434ba03 | 6820 | for gltype in ptrdiff_t size_t ; do |
81ecdfbb RW |
6821 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 |
6822 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6823 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6824 | $as_echo_n "(cached) " >&6 | |
c906108c | 6825 | else |
783e057b DJ |
6826 | eval gl_cv_type_${gltype}_suffix=no |
6827 | eval result=\$gl_cv_type_${gltype}_signed | |
6828 | if test "$result" = yes; then | |
6829 | glsufu= | |
6830 | else | |
6831 | glsufu=u | |
6832 | fi | |
6833 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6834 | case $glsuf in | |
6835 | '') gltype1='int';; | |
f434ba03 PA |
6836 | l) gltype1='long int';; |
6837 | ll) gltype1='long long int';; | |
6838 | i64) gltype1='__int64';; | |
6839 | u) gltype1='unsigned int';; | |
6840 | ul) gltype1='unsigned long int';; | |
6841 | ull) gltype1='unsigned long long int';; | |
783e057b DJ |
6842 | ui64)gltype1='unsigned __int64';; |
6843 | esac | |
81ecdfbb | 6844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6845 | /* end confdefs.h. */ |
6846 | ||
6847 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6848 | included before <wchar.h>. */ | |
6849 | #include <stddef.h> | |
6850 | #include <signal.h> | |
6851 | #if HAVE_WCHAR_H | |
6852 | # include <stdio.h> | |
6853 | # include <time.h> | |
6854 | # include <wchar.h> | |
6855 | #endif | |
6856 | ||
6857 | extern $gltype foo; | |
6858 | extern $gltype1 foo; | |
6859 | int | |
6860 | main () | |
6861 | { | |
6862 | ||
6863 | ; | |
6864 | return 0; | |
6865 | } | |
6866 | _ACEOF | |
81ecdfbb | 6867 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 6868 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6869 | fi |
81ecdfbb | 6870 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6871 | eval result=\$gl_cv_type_${gltype}_suffix |
6872 | test "$result" != no && break | |
6873 | done | |
6874 | fi | |
81ecdfbb RW |
6875 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6877 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6878 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
6879 | eval result=\$gl_cv_type_${gltype}_suffix | |
6880 | test "$result" = no && result= | |
6881 | eval ${GLTYPE}_SUFFIX=\$result | |
6882 | cat >>confdefs.h <<_ACEOF | |
6883 | #define ${GLTYPE}_SUFFIX $result | |
6884 | _ACEOF | |
6885 | ||
6886 | done | |
6887 | ||
6888 | ||
783e057b DJ |
6889 | fi |
6890 | ||
6891 | ||
f434ba03 PA |
6892 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
6894 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6895 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
81ecdfbb | 6896 | $as_echo_n "(cached) " >&6 |
783e057b | 6897 | else |
f434ba03 PA |
6898 | eval gl_cv_type_${gltype}_suffix=no |
6899 | eval result=\$gl_cv_type_${gltype}_signed | |
6900 | if test "$result" = yes; then | |
6901 | glsufu= | |
6902 | else | |
6903 | glsufu=u | |
6904 | fi | |
6905 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6906 | case $glsuf in | |
6907 | '') gltype1='int';; | |
6908 | l) gltype1='long int';; | |
6909 | ll) gltype1='long long int';; | |
6910 | i64) gltype1='__int64';; | |
6911 | u) gltype1='unsigned int';; | |
6912 | ul) gltype1='unsigned long int';; | |
6913 | ull) gltype1='unsigned long long int';; | |
6914 | ui64)gltype1='unsigned __int64';; | |
6915 | esac | |
6916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
81ecdfbb | 6917 | /* end confdefs.h. */ |
f434ba03 PA |
6918 | |
6919 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6920 | included before <wchar.h>. */ | |
6921 | #include <stddef.h> | |
6922 | #include <signal.h> | |
6923 | #if HAVE_WCHAR_H | |
6924 | # include <stdio.h> | |
6925 | # include <time.h> | |
6926 | # include <wchar.h> | |
6927 | #endif | |
6928 | ||
6929 | extern $gltype foo; | |
6930 | extern $gltype1 foo; | |
6931 | int | |
6932 | main () | |
6933 | { | |
6934 | ||
6935 | ; | |
6936 | return 0; | |
6937 | } | |
783e057b | 6938 | _ACEOF |
81ecdfbb | 6939 | if ac_fn_c_try_compile "$LINENO"; then : |
f434ba03 | 6940 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6941 | fi |
81ecdfbb | 6942 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 PA |
6943 | eval result=\$gl_cv_type_${gltype}_suffix |
6944 | test "$result" != no && break | |
6945 | done | |
783e057b | 6946 | fi |
f434ba03 PA |
6947 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6949 | $as_echo "$ac_res" >&6; } | |
6950 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6951 | eval result=\$gl_cv_type_${gltype}_suffix | |
6952 | test "$result" = no && result= | |
6953 | eval ${GLTYPE}_SUFFIX=\$result | |
6954 | cat >>confdefs.h <<_ACEOF | |
6955 | #define ${GLTYPE}_SUFFIX $result | |
6956 | _ACEOF | |
6957 | ||
6958 | done | |
6959 | ||
6960 | ||
6961 | ||
6962 | STDINT_H=stdint.h | |
783e057b DJ |
6963 | fi |
6964 | ||
6965 | ||
f434ba03 PA |
6966 | # Code from module string: |
6967 | ||
6968 | ||
6969 | ||
6970 | # Code from module warn-on-use: | |
6971 | # Code from module wchar: | |
6972 | ||
6973 | ||
6974 | ||
6975 | ||
783e057b DJ |
6976 | : |
6977 | ||
6978 | ||
6979 | ||
6980 | ||
6981 | ||
783e057b DJ |
6982 | |
6983 | ||
6984 | ||
6985 | ||
6986 | : | |
6987 | ||
6988 | ||
6989 | ||
6990 | ||
6991 | ||
6992 | ||
6993 | ||
6994 | if test $gl_cv_have_include_next = yes; then | |
6995 | gl_cv_next_wchar_h='<'wchar.h'>' | |
6996 | else | |
81ecdfbb RW |
6997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 |
6998 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
6999 | if test "${gl_cv_next_wchar_h+set}" = set; then : | |
7000 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
7001 | else |
7002 | ||
f434ba03 PA |
7003 | if test $ac_cv_header_wchar_h = yes; then |
7004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
7005 | /* end confdefs.h. */ |
7006 | #include <wchar.h> | |
7007 | ||
7008 | _ACEOF | |
f434ba03 PA |
7009 | case "$host_os" in |
7010 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
7011 | *) gl_absname_cpp="$ac_cpp" ;; | |
7012 | esac | |
7013 | gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
7014 | sed -n '\#/wchar.h#{ | |
7015 | s#.*"\(.*/wchar.h\)".*#\1# | |
7016 | s#^/[^/]#//&# | |
7017 | p | |
7018 | q | |
7019 | }'`'"' | |
7020 | else | |
7021 | gl_cv_next_wchar_h='<'wchar.h'>' | |
7022 | fi | |
783e057b DJ |
7023 | |
7024 | fi | |
81ecdfbb RW |
7025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 |
7026 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
783e057b DJ |
7027 | fi |
7028 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
7029 | ||
f434ba03 PA |
7030 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
7031 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
7032 | gl_next_as_first_directive='<'wchar.h'>' | |
7033 | else | |
7034 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
7035 | gl_next_as_first_directive=$gl_cv_next_wchar_h | |
7036 | fi | |
7037 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive | |
7038 | ||
7039 | ||
7040 | ||
7041 | if test $ac_cv_header_wchar_h = yes; then | |
7042 | HAVE_WCHAR_H=1 | |
7043 | else | |
7044 | HAVE_WCHAR_H=0 | |
7045 | fi | |
7046 | ||
7047 | ||
7048 | ||
7049 | if test $gt_cv_c_wint_t = yes; then | |
7050 | HAVE_WINT_T=1 | |
7051 | else | |
7052 | HAVE_WINT_T=0 | |
7053 | fi | |
7054 | ||
7055 | ||
7056 | ||
7057 | for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do | |
7058 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
7059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
7060 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
7061 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7062 | $as_echo_n "(cached) " >&6 | |
7063 | else | |
7064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7065 | /* end confdefs.h. */ | |
7066 | ||
7067 | /* Some systems require additional headers. */ | |
7068 | #ifndef __GLIBC__ | |
7069 | # include <stddef.h> | |
7070 | # include <stdio.h> | |
7071 | # include <time.h> | |
7072 | #endif | |
7073 | #include <wchar.h> | |
7074 | ||
7075 | int | |
7076 | main () | |
7077 | { | |
7078 | #undef $gl_func | |
7079 | (void) $gl_func; | |
7080 | ; | |
7081 | return 0; | |
7082 | } | |
7083 | _ACEOF | |
7084 | if ac_fn_c_try_compile "$LINENO"; then : | |
7085 | eval "$as_gl_Symbol=yes" | |
7086 | else | |
7087 | eval "$as_gl_Symbol=no" | |
7088 | fi | |
7089 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7090 | fi | |
7091 | eval ac_res=\$$as_gl_Symbol | |
7092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7093 | $as_echo "$ac_res" >&6; } | |
7094 | eval as_val=\$$as_gl_Symbol | |
7095 | if test "x$as_val" = x""yes; then : | |
7096 | cat >>confdefs.h <<_ACEOF | |
7097 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
7098 | _ACEOF | |
7099 | ||
7100 | eval ac_cv_have_decl_$gl_func=yes | |
7101 | fi | |
7102 | done | |
7103 | ||
7104 | ||
7105 | # Code from module dummy: | |
7106 | # End of code from modules | |
7107 | ||
7108 | ||
c906108c | 7109 | |
c906108c | 7110 | |
c906108c | 7111 | |
c906108c | 7112 | |
c906108c | 7113 | |
c906108c | 7114 | |
c906108c | 7115 | |
783e057b DJ |
7116 | gltests_libdeps= |
7117 | gltests_ltlibdeps= | |
20e95c23 | 7118 | |
20e95c23 | 7119 | |
20e95c23 | 7120 | |
f434ba03 PA |
7121 | |
7122 | ||
7123 | ||
7124 | ||
7125 | ||
7126 | ||
783e057b | 7127 | gl_source_base='tests' |
f434ba03 PA |
7128 | gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS |
7129 | ||
7130 | gl_module_indicator_condition=$gltests_WITNESS | |
7131 | ||
7132 | ||
7133 | ||
7134 | ||
7135 | ||
c906108c | 7136 | |
bec39cab | 7137 | |
bec39cab | 7138 | |
783e057b DJ |
7139 | |
7140 | LIBGNU_LIBDEPS="$gl_libdeps" | |
7141 | ||
7142 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
7143 | ||
7144 | ||
e28b3332 | 7145 | |
d5af19ba DJ |
7146 | # For Makefile dependencies. |
7147 | GNULIB_STDINT_H= | |
7148 | if test x"$STDINT_H" != x; then | |
7149 | GNULIB_STDINT_H=gnulib/$STDINT_H | |
7150 | fi | |
7151 | ||
7152 | ||
bec39cab AC |
7153 | PACKAGE=gdb |
7154 | ||
7155 | cat >>confdefs.h <<_ACEOF | |
7156 | #define PACKAGE "$PACKAGE" | |
7157 | _ACEOF | |
7158 | ||
7159 | ||
7160 | ||
5048e516 JK |
7161 | # Do we have a single-tree copy of texinfo? Even if we do, we can't |
7162 | # rely on it - libiberty is built before texinfo. | |
7163 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
7164 | set dummy makeinfo; ac_word=$2 | |
7165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7166 | $as_echo_n "checking for $ac_word... " >&6; } | |
7167 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then : | |
7168 | $as_echo_n "(cached) " >&6 | |
7169 | else | |
7170 | if test -n "$MAKEINFO"; then | |
7171 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7172 | else | |
7173 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7174 | for as_dir in $PATH | |
7175 | do | |
7176 | IFS=$as_save_IFS | |
7177 | test -z "$as_dir" && as_dir=. | |
7178 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7179 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7180 | ac_cv_prog_MAKEINFO="makeinfo" | |
7181 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7182 | break 2 | |
7183 | fi | |
7184 | done | |
7185 | done | |
7186 | IFS=$as_save_IFS | |
7187 | ||
7188 | fi | |
7189 | fi | |
7190 | MAKEINFO=$ac_cv_prog_MAKEINFO | |
7191 | if test -n "$MAKEINFO"; then | |
7192 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
7193 | $as_echo "$MAKEINFO" >&6; } | |
7194 | else | |
7195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7196 | $as_echo "no" >&6; } | |
7197 | fi | |
7198 | ||
7199 | ||
7200 | if test "x$MAKEINFO" = "x"; then | |
7201 | as_fn_error "makeinfo is required for compilation" "$LINENO" 5 | |
7202 | else | |
7203 | case "$MAKEINFO" in | |
7204 | */missing\ makeinfo*) | |
7205 | as_fn_error "makeinfo is required for compilation" "$LINENO" 5 | |
7206 | ;; | |
7207 | esac | |
7208 | fi | |
7209 | ||
7210 | ||
7211 | # --split-size=5000000 may be already in $MAKEINFO from parent configure. | |
7212 | # Re-running configure in gdb/ would lose it so ensure it stays present. | |
7213 | MAKEINFOFLAGS=${MAKEINFOFLAGS---split-size=5000000} | |
7214 | ||
7215 | ||
7216 | MAKEINFO_EXTRA_FLAGS="" | |
7217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
7218 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
7219 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
7220 | $as_echo_n "(cached) " >&6 | |
7221 | else | |
7222 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
7223 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
7224 | gdb_cv_have_makeinfo_click=yes | |
7225 | else | |
7226 | gdb_cv_have_makeinfo_click=no | |
7227 | fi | |
7228 | fi | |
7229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
7230 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
7231 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
7232 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
7233 | fi | |
7234 | ||
7235 | ||
e28b3332 DJ |
7236 | # GDB does not use automake, but gnulib does. This line lets us |
7237 | # generate its Makefile.in. | |
81ecdfbb RW |
7238 | am__api_version='1.11' |
7239 | ||
e28b3332 DJ |
7240 | # Find a good install program. We prefer a C program (faster), |
7241 | # so one script is as good as another. But avoid the broken or | |
7242 | # incompatible versions: | |
7243 | # SysV /etc/install, /usr/sbin/install | |
7244 | # SunOS /usr/etc/install | |
7245 | # IRIX /sbin/install | |
7246 | # AIX /bin/install | |
7247 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7248 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7249 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7250 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7251 | # OS/2's system install, which has a completely different semantic | |
7252 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 7253 | # Reject install programs that cannot install multiple files. |
81ecdfbb RW |
7254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
7255 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
e28b3332 | 7256 | if test -z "$INSTALL"; then |
81ecdfbb RW |
7257 | if test "${ac_cv_path_install+set}" = set; then : |
7258 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7259 | else |
7260 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7261 | for as_dir in $PATH | |
7262 | do | |
7263 | IFS=$as_save_IFS | |
7264 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7265 | # Account for people who put trailing slashes in PATH elements. |
7266 | case $as_dir/ in #(( | |
7267 | ./ | .// | /[cC]/* | \ | |
e28b3332 | 7268 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
81ecdfbb | 7269 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
e28b3332 DJ |
7270 | /usr/ucb/* ) ;; |
7271 | *) | |
7272 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7273 | # Don't use installbsd from OSF since it installs stuff as root | |
7274 | # by default. | |
7275 | for ac_prog in ginstall scoinst install; do | |
7276 | for ac_exec_ext in '' $ac_executable_extensions; do | |
81ecdfbb | 7277 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then |
e28b3332 DJ |
7278 | if test $ac_prog = install && |
7279 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7280 | # AIX install. It has an incompatible calling convention. | |
7281 | : | |
7282 | elif test $ac_prog = install && | |
7283 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7284 | # program-specific install script used by HP pwplus--don't use. | |
7285 | : | |
7286 | else | |
85541719 DE |
7287 | rm -rf conftest.one conftest.two conftest.dir |
7288 | echo one > conftest.one | |
7289 | echo two > conftest.two | |
7290 | mkdir conftest.dir | |
7291 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7292 | test -s conftest.one && test -s conftest.two && | |
7293 | test -s conftest.dir/conftest.one && | |
7294 | test -s conftest.dir/conftest.two | |
7295 | then | |
7296 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7297 | break 3 | |
7298 | fi | |
e28b3332 DJ |
7299 | fi |
7300 | fi | |
7301 | done | |
7302 | done | |
7303 | ;; | |
7304 | esac | |
81ecdfbb RW |
7305 | |
7306 | done | |
7307 | IFS=$as_save_IFS | |
e28b3332 | 7308 | |
85541719 | 7309 | rm -rf conftest.one conftest.two conftest.dir |
e28b3332 DJ |
7310 | |
7311 | fi | |
7312 | if test "${ac_cv_path_install+set}" = set; then | |
7313 | INSTALL=$ac_cv_path_install | |
7314 | else | |
85541719 DE |
7315 | # As a last resort, use the slow shell script. Don't cache a |
7316 | # value for INSTALL within a source directory, because that will | |
e28b3332 | 7317 | # break other packages using the cache if that directory is |
85541719 | 7318 | # removed, or if the value is a relative name. |
e28b3332 DJ |
7319 | INSTALL=$ac_install_sh |
7320 | fi | |
7321 | fi | |
81ecdfbb RW |
7322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
7323 | $as_echo "$INSTALL" >&6; } | |
e28b3332 DJ |
7324 | |
7325 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7326 | # It thinks the first close brace ends the variable substitution. | |
7327 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7328 | ||
7329 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7330 | ||
7331 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7332 | ||
81ecdfbb RW |
7333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
7334 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
e28b3332 DJ |
7335 | # Just in case |
7336 | sleep 1 | |
7337 | echo timestamp > conftest.file | |
81ecdfbb RW |
7338 | # Reject unsafe characters in $srcdir or the absolute working directory |
7339 | # name. Accept space and tab only in the latter. | |
7340 | am_lf=' | |
7341 | ' | |
7342 | case `pwd` in | |
7343 | *[\\\"\#\$\&\'\`$am_lf]*) | |
7344 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; | |
7345 | esac | |
7346 | case $srcdir in | |
7347 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
7348 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; | |
7349 | esac | |
7350 | ||
e28b3332 DJ |
7351 | # Do `set' in a subshell so we don't clobber the current shell's |
7352 | # arguments. Must try -L first in case configure is actually a | |
7353 | # symlink; some systems play weird games with the mod time of symlinks | |
7354 | # (eg FreeBSD returns the mod time of the symlink's containing | |
7355 | # directory). | |
7356 | if ( | |
81ecdfbb | 7357 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
e28b3332 DJ |
7358 | if test "$*" = "X"; then |
7359 | # -L didn't work. | |
81ecdfbb | 7360 | set X `ls -t "$srcdir/configure" conftest.file` |
e28b3332 DJ |
7361 | fi |
7362 | rm -f conftest.file | |
7363 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
7364 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
7365 | ||
7366 | # If neither matched, then we have a broken ls. This can happen | |
7367 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
7368 | # broken ls alias from the environment. This has actually | |
7369 | # happened. Such a system could not be considered "sane". | |
81ecdfbb RW |
7370 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
7371 | alias in your environment" "$LINENO" 5 | |
e28b3332 DJ |
7372 | fi |
7373 | ||
7374 | test "$2" = conftest.file | |
7375 | ) | |
7376 | then | |
7377 | # Ok. | |
7378 | : | |
7379 | else | |
81ecdfbb RW |
7380 | as_fn_error "newly created file is older than distributed files! |
7381 | Check your system clock" "$LINENO" 5 | |
e28b3332 | 7382 | fi |
81ecdfbb RW |
7383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7384 | $as_echo "yes" >&6; } | |
e28b3332 | 7385 | test "$program_prefix" != NONE && |
81ecdfbb | 7386 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
e28b3332 DJ |
7387 | # Use a double $ so make ignores it. |
7388 | test "$program_suffix" != NONE && | |
81ecdfbb RW |
7389 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
7390 | # Double any \ or $. | |
e28b3332 | 7391 | # By default was `s,x,x', remove it if useless. |
81ecdfbb RW |
7392 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
7393 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
e28b3332 DJ |
7394 | |
7395 | # expand $ac_aux_dir to an absolute path | |
7396 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
7397 | ||
81ecdfbb RW |
7398 | if test x"${MISSING+set}" != xset; then |
7399 | case $am_aux_dir in | |
7400 | *\ * | *\ *) | |
7401 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
7402 | *) | |
7403 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
7404 | esac | |
7405 | fi | |
e28b3332 DJ |
7406 | # Use eval to expand $SHELL |
7407 | if eval "$MISSING --run true"; then | |
7408 | am_missing_run="$MISSING --run " | |
7409 | else | |
7410 | am_missing_run= | |
81ecdfbb RW |
7411 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 |
7412 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
7413 | fi | |
7414 | ||
7415 | if test x"${install_sh}" != xset; then | |
7416 | case $am_aux_dir in | |
7417 | *\ * | *\ *) | |
7418 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
7419 | *) | |
7420 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
7421 | esac | |
7422 | fi | |
7423 | ||
7424 | # Installed binaries are usually stripped using `strip' when the user | |
7425 | # run `make install-strip'. However `strip' might not be the right | |
7426 | # tool to use in cross-compilation environments, therefore Automake | |
7427 | # will honor the `STRIP' environment variable to overrule this program. | |
7428 | if test "$cross_compiling" != no; then | |
7429 | if test -n "$ac_tool_prefix"; then | |
7430 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
7431 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
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_STRIP+set}" = set; then : | |
7435 | $as_echo_n "(cached) " >&6 | |
7436 | else | |
7437 | if test -n "$STRIP"; then | |
7438 | ac_cv_prog_STRIP="$STRIP" # 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=. | |
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 | |
7447 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
7448 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7449 | break 2 | |
7450 | fi | |
7451 | done | |
7452 | done | |
7453 | IFS=$as_save_IFS | |
7454 | ||
7455 | fi | |
7456 | fi | |
7457 | STRIP=$ac_cv_prog_STRIP | |
7458 | if test -n "$STRIP"; then | |
7459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
7460 | $as_echo "$STRIP" >&6; } | |
7461 | else | |
7462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7463 | $as_echo "no" >&6; } | |
7464 | fi | |
7465 | ||
7466 | ||
7467 | fi | |
7468 | if test -z "$ac_cv_prog_STRIP"; then | |
7469 | ac_ct_STRIP=$STRIP | |
7470 | # Extract the first word of "strip", so it can be a program name with args. | |
7471 | set dummy strip; ac_word=$2 | |
7472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7473 | $as_echo_n "checking for $ac_word... " >&6; } | |
7474 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
7475 | $as_echo_n "(cached) " >&6 | |
7476 | else | |
7477 | if test -n "$ac_ct_STRIP"; then | |
7478 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
7479 | else | |
7480 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7481 | for as_dir in $PATH | |
7482 | do | |
7483 | IFS=$as_save_IFS | |
7484 | test -z "$as_dir" && as_dir=. | |
7485 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7486 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7487 | ac_cv_prog_ac_ct_STRIP="strip" | |
7488 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7489 | break 2 | |
7490 | fi | |
7491 | done | |
7492 | done | |
7493 | IFS=$as_save_IFS | |
7494 | ||
7495 | fi | |
7496 | fi | |
7497 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
7498 | if test -n "$ac_ct_STRIP"; then | |
7499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
7500 | $as_echo "$ac_ct_STRIP" >&6; } | |
7501 | else | |
7502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7503 | $as_echo "no" >&6; } | |
7504 | fi | |
7505 | ||
7506 | if test "x$ac_ct_STRIP" = x; then | |
7507 | STRIP=":" | |
7508 | else | |
7509 | case $cross_compiling:$ac_tool_warned in | |
7510 | yes:) | |
7511 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7512 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7513 | ac_tool_warned=yes ;; | |
7514 | esac | |
7515 | STRIP=$ac_ct_STRIP | |
7516 | fi | |
7517 | else | |
7518 | STRIP="$ac_cv_prog_STRIP" | |
7519 | fi | |
7520 | ||
7521 | fi | |
7522 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
7523 | ||
7524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
7525 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
7526 | if test -z "$MKDIR_P"; then | |
7527 | if test "${ac_cv_path_mkdir+set}" = set; then : | |
7528 | $as_echo_n "(cached) " >&6 | |
7529 | else | |
7530 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7531 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
7532 | do | |
7533 | IFS=$as_save_IFS | |
7534 | test -z "$as_dir" && as_dir=. | |
7535 | for ac_prog in mkdir gmkdir; do | |
7536 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7537 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
7538 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
7539 | 'mkdir (GNU coreutils) '* | \ | |
7540 | 'mkdir (coreutils) '* | \ | |
7541 | 'mkdir (fileutils) '4.1*) | |
7542 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
7543 | break 3;; | |
7544 | esac | |
7545 | done | |
7546 | done | |
e28b3332 | 7547 | done |
81ecdfbb RW |
7548 | IFS=$as_save_IFS |
7549 | ||
7550 | fi | |
7551 | ||
7552 | if test "${ac_cv_path_mkdir+set}" = set; then | |
7553 | MKDIR_P="$ac_cv_path_mkdir -p" | |
e28b3332 | 7554 | else |
81ecdfbb RW |
7555 | # As a last resort, use the slow shell script. Don't cache a |
7556 | # value for MKDIR_P within a source directory, because that will | |
7557 | # break other packages using the cache if that directory is | |
7558 | # removed, or if the value is a relative name. | |
7559 | test -d ./--version && rmdir ./--version | |
7560 | MKDIR_P="$ac_install_sh -d" | |
e28b3332 DJ |
7561 | fi |
7562 | fi | |
81ecdfbb RW |
7563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
7564 | $as_echo "$MKDIR_P" >&6; } | |
7565 | ||
f434ba03 | 7566 | |
81ecdfbb RW |
7567 | mkdir_p="$MKDIR_P" |
7568 | case $mkdir_p in | |
7569 | [\\/$]* | ?:[\\/]*) ;; | |
7570 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
7571 | esac | |
e28b3332 DJ |
7572 | |
7573 | for ac_prog in gawk mawk nawk awk | |
7574 | do | |
7575 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7576 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7578 | $as_echo_n "checking for $ac_word... " >&6; } | |
7579 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7580 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7581 | else |
7582 | if test -n "$AWK"; then | |
7583 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7584 | else | |
7585 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7586 | for as_dir in $PATH | |
7587 | do | |
7588 | IFS=$as_save_IFS | |
7589 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7590 | for ac_exec_ext in '' $ac_executable_extensions; do |
7591 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e28b3332 | 7592 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7593 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
e28b3332 DJ |
7594 | break 2 |
7595 | fi | |
7596 | done | |
81ecdfbb RW |
7597 | done |
7598 | IFS=$as_save_IFS | |
e28b3332 DJ |
7599 | |
7600 | fi | |
7601 | fi | |
7602 | AWK=$ac_cv_prog_AWK | |
7603 | if test -n "$AWK"; then | |
81ecdfbb RW |
7604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7605 | $as_echo "$AWK" >&6; } | |
e28b3332 | 7606 | else |
81ecdfbb RW |
7607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7608 | $as_echo "no" >&6; } | |
e28b3332 DJ |
7609 | fi |
7610 | ||
81ecdfbb | 7611 | |
e28b3332 DJ |
7612 | test -n "$AWK" && break |
7613 | done | |
7614 | ||
81ecdfbb | 7615 | ac_config_commands="$ac_config_commands depfiles" |
e28b3332 DJ |
7616 | |
7617 | ||
7618 | am_make=${MAKE-make} | |
7619 | cat > confinc << 'END' | |
7620 | am__doit: | |
81ecdfbb | 7621 | @echo this is the am__doit target |
e28b3332 DJ |
7622 | .PHONY: am__doit |
7623 | END | |
7624 | # If we don't find an include directive, just comment out the code. | |
81ecdfbb RW |
7625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 |
7626 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
e28b3332 DJ |
7627 | am__include="#" |
7628 | am__quote= | |
7629 | _am_result=none | |
7630 | # First try GNU make style include. | |
7631 | echo "include confinc" > confmf | |
81ecdfbb RW |
7632 | # Ignore all kinds of additional output from `make'. |
7633 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
7634 | *the\ am__doit\ target*) | |
7635 | am__include=include | |
7636 | am__quote= | |
7637 | _am_result=GNU | |
7638 | ;; | |
7639 | esac | |
e28b3332 DJ |
7640 | # Now try BSD make style include. |
7641 | if test "$am__include" = "#"; then | |
7642 | echo '.include "confinc"' > confmf | |
81ecdfbb RW |
7643 | case `$am_make -s -f confmf 2> /dev/null` in #( |
7644 | *the\ am__doit\ target*) | |
7645 | am__include=.include | |
7646 | am__quote="\"" | |
7647 | _am_result=BSD | |
7648 | ;; | |
7649 | esac | |
e28b3332 DJ |
7650 | fi |
7651 | ||
7652 | ||
81ecdfbb RW |
7653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 |
7654 | $as_echo "$_am_result" >&6; } | |
e28b3332 DJ |
7655 | rm -f confinc confmf |
7656 | ||
81ecdfbb RW |
7657 | # Check whether --enable-dependency-tracking was given. |
7658 | if test "${enable_dependency_tracking+set}" = set; then : | |
7659 | enableval=$enable_dependency_tracking; | |
7660 | fi | |
e28b3332 | 7661 | |
e28b3332 DJ |
7662 | if test "x$enable_dependency_tracking" != xno; then |
7663 | am_depcomp="$ac_aux_dir/depcomp" | |
7664 | AMDEPBACKSLASH='\' | |
7665 | fi | |
81ecdfbb | 7666 | if test "x$enable_dependency_tracking" != xno; then |
e28b3332 DJ |
7667 | AMDEP_TRUE= |
7668 | AMDEP_FALSE='#' | |
7669 | else | |
7670 | AMDEP_TRUE='#' | |
7671 | AMDEP_FALSE= | |
7672 | fi | |
7673 | ||
7674 | ||
81ecdfbb RW |
7675 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
7676 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
7677 | # is not polluted with repeated "-I." | |
7678 | am__isrc=' -I$(srcdir)' | |
7679 | # test to see if srcdir already configured | |
7680 | if test -f $srcdir/config.status; then | |
7681 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
7682 | fi | |
e28b3332 DJ |
7683 | fi |
7684 | ||
7685 | # test whether we have cygpath | |
7686 | if test -z "$CYGPATH_W"; then | |
7687 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
7688 | CYGPATH_W='cygpath -w' | |
7689 | else | |
7690 | CYGPATH_W=echo | |
7691 | fi | |
7692 | fi | |
7693 | ||
7694 | ||
7695 | # Define the identity of the package. | |
7696 | PACKAGE=gdb | |
7697 | VERSION=UNUSED-VERSION | |
7698 | ||
7699 | ||
7700 | # Some tools Automake needs. | |
7701 | ||
7702 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
7703 | ||
7704 | ||
7705 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
7706 | ||
7707 | ||
7708 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
7709 | ||
7710 | ||
7711 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
7712 | ||
7713 | ||
7714 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
7715 | ||
e28b3332 DJ |
7716 | # We need awk for the "check" target. The system "awk" is bad on |
7717 | # some platforms. | |
7718 | # Always define AMTAR for backward compatibility. | |
7719 | ||
7720 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
7721 | ||
7722 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
7723 | ||
7724 | ||
7725 | ||
7726 | ||
7727 | depcc="$CC" am_compiler_list= | |
7728 | ||
81ecdfbb RW |
7729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
7730 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
7731 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
7732 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7733 | else |
7734 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
7735 | # We make a subdir and do the tests there. Otherwise we can end up | |
7736 | # making bogus files that we don't know about and never remove. For | |
7737 | # instance it was reported that on HP-UX the gcc test will end up | |
7738 | # making a dummy file named `D' -- because `-MD' means `put the output | |
7739 | # in D'. | |
7740 | mkdir conftest.dir | |
7741 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
7742 | # using a relative directory. | |
7743 | cp "$am_depcomp" conftest.dir | |
7744 | cd conftest.dir | |
7745 | # We will build objects and dependencies in a subdirectory because | |
7746 | # it helps to detect inapplicable dependency modes. For instance | |
7747 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
7748 | # side effect of compilation, but ICC will put the dependencies in | |
7749 | # the current directory while Tru64 will put them in the object | |
7750 | # directory. | |
7751 | mkdir sub | |
7752 | ||
7753 | am_cv_CC_dependencies_compiler_type=none | |
7754 | if test "$am_compiler_list" = ""; then | |
7755 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
7756 | fi | |
81ecdfbb RW |
7757 | am__universal=false |
7758 | case " $depcc " in #( | |
7759 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
7760 | esac | |
7761 | ||
e28b3332 DJ |
7762 | for depmode in $am_compiler_list; do |
7763 | # Setup a source with many dependencies, because some compilers | |
7764 | # like to wrap large dependency lists on column 80 (with \), and | |
7765 | # we should not choose a depcomp mode which is confused by this. | |
7766 | # | |
7767 | # We need to recreate these files for each test, as the compiler may | |
7768 | # overwrite some of them when testing with obscure command lines. | |
7769 | # This happens at least with the AIX C compiler. | |
7770 | : > sub/conftest.c | |
7771 | for i in 1 2 3 4 5 6; do | |
7772 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
7773 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
7774 | # Solaris 8's {/usr,}/bin/sh. | |
7775 | touch sub/conftst$i.h | |
7776 | done | |
7777 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
7778 | ||
81ecdfbb RW |
7779 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
7780 | # mode. It turns out that the SunPro C++ compiler does not properly | |
7781 | # handle `-M -o', and we need to detect this. Also, some Intel | |
7782 | # versions had trouble with output in subdirs | |
7783 | am__obj=sub/conftest.${OBJEXT-o} | |
7784 | am__minus_obj="-o $am__obj" | |
e28b3332 | 7785 | case $depmode in |
81ecdfbb RW |
7786 | gcc) |
7787 | # This depmode causes a compiler race in universal mode. | |
7788 | test "$am__universal" = false || continue | |
7789 | ;; | |
e28b3332 DJ |
7790 | nosideeffect) |
7791 | # after this tag, mechanisms are not by side-effect, so they'll | |
7792 | # only be used when explicitly requested | |
7793 | if test "x$enable_dependency_tracking" = xyes; then | |
7794 | continue | |
7795 | else | |
7796 | break | |
7797 | fi | |
7798 | ;; | |
81ecdfbb RW |
7799 | msvisualcpp | msvcmsys) |
7800 | # This compiler won't grok `-c -o', but also, the minuso test has | |
7801 | # not run yet. These depmodes are late enough in the game, and | |
7802 | # so weak that their functioning should not be impacted. | |
7803 | am__obj=conftest.${OBJEXT-o} | |
7804 | am__minus_obj= | |
7805 | ;; | |
e28b3332 DJ |
7806 | none) break ;; |
7807 | esac | |
e28b3332 | 7808 | if depmode=$depmode \ |
81ecdfbb | 7809 | source=sub/conftest.c object=$am__obj \ |
e28b3332 | 7810 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
81ecdfbb | 7811 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
e28b3332 | 7812 | >/dev/null 2>conftest.err && |
81ecdfbb | 7813 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 | 7814 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
81ecdfbb | 7815 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 DJ |
7816 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
7817 | # icc doesn't choke on unknown options, it will just issue warnings | |
7818 | # or remarks (even with -Werror). So we grep stderr for any message | |
7819 | # that says an option was ignored or not supported. | |
7820 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
7821 | # icc: Command line warning: ignoring option '-M'; no argument required | |
7822 | # The diagnosis changed in icc 8.0: | |
7823 | # icc: Command line remark: option '-MP' not supported | |
7824 | if (grep 'ignoring option' conftest.err || | |
7825 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
7826 | am_cv_CC_dependencies_compiler_type=$depmode | |
7827 | break | |
7828 | fi | |
7829 | fi | |
7830 | done | |
7831 | ||
7832 | cd .. | |
7833 | rm -rf conftest.dir | |
7834 | else | |
7835 | am_cv_CC_dependencies_compiler_type=none | |
7836 | fi | |
7837 | ||
7838 | fi | |
81ecdfbb RW |
7839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
7840 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
e28b3332 DJ |
7841 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
7842 | ||
81ecdfbb | 7843 | if |
e28b3332 DJ |
7844 | test "x$enable_dependency_tracking" != xno \ |
7845 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
7846 | am__fastdepCC_TRUE= | |
7847 | am__fastdepCC_FALSE='#' | |
7848 | else | |
7849 | am__fastdepCC_TRUE='#' | |
7850 | am__fastdepCC_FALSE= | |
7851 | fi | |
7852 | ||
7853 | ||
7854 | ||
7855 | ||
bec39cab AC |
7856 | |
7857 | ||
81ecdfbb RW |
7858 | # Check whether --with-separate-debug-dir was given. |
7859 | if test "${with_separate_debug_dir+set}" = set; then : | |
7860 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
7861 | DEBUGDIR=$withval |
7862 | else | |
7863 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
7864 | fi |
7865 | ||
20e95c23 | 7866 | |
783e057b DJ |
7867 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7868 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 7869 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 7870 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 7871 | |
783e057b DJ |
7872 | cat >>confdefs.h <<_ACEOF |
7873 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 7874 | _ACEOF |
20e95c23 | 7875 | |
20e95c23 | 7876 | |
20e95c23 | 7877 | |
0c4a4063 | 7878 | |
b14b1491 TT |
7879 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7880 | if test "x$prefix" = xNONE; then | |
7881 | test_prefix=/usr/local | |
7882 | else | |
7883 | test_prefix=$prefix | |
7884 | fi | |
783e057b | 7885 | else |
b14b1491 | 7886 | test_prefix=$exec_prefix |
783e057b | 7887 | fi |
b14b1491 TT |
7888 | value=0 |
7889 | case ${ac_define_dir} in | |
7890 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7891 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7892 | value=1 | |
7893 | ;; | |
7894 | esac | |
7895 | ||
7896 | cat >>confdefs.h <<_ACEOF | |
7897 | #define DEBUGDIR_RELOCATABLE $value | |
7898 | _ACEOF | |
7899 | ||
7900 | ||
7901 | ||
0c4a4063 | 7902 | |
b14b1491 TT |
7903 | # GDB's datadir relocation |
7904 | ||
7905 | ||
7906 | ||
81ecdfbb RW |
7907 | # Check whether --with-gdb-datadir was given. |
7908 | if test "${with_gdb_datadir+set}" = set; then : | |
7909 | withval=$with_gdb_datadir; | |
b14b1491 | 7910 | GDB_DATADIR=$withval |
20e95c23 | 7911 | else |
b14b1491 | 7912 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
7913 | fi |
7914 | ||
20e95c23 | 7915 | |
b14b1491 TT |
7916 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7917 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7918 | ac_define_dir=`eval echo $GDB_DATADIR` | |
7919 | ac_define_dir=`eval echo $ac_define_dir` | |
7920 | ||
7921 | cat >>confdefs.h <<_ACEOF | |
7922 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
7923 | _ACEOF |
7924 | ||
b14b1491 TT |
7925 | |
7926 | ||
0c4a4063 | 7927 | |
b14b1491 TT |
7928 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7929 | if test "x$prefix" = xNONE; then | |
7930 | test_prefix=/usr/local | |
7931 | else | |
7932 | test_prefix=$prefix | |
7933 | fi | |
7934 | else | |
7935 | test_prefix=$exec_prefix | |
7936 | fi | |
7937 | value=0 | |
7938 | case ${ac_define_dir} in | |
7939 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7940 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7941 | value=1 | |
7942 | ;; | |
7943 | esac | |
7944 | ||
7945 | cat >>confdefs.h <<_ACEOF | |
7946 | #define GDB_DATADIR_RELOCATABLE $value | |
7947 | _ACEOF | |
7948 | ||
7949 | ||
783e057b | 7950 | |
20e95c23 | 7951 | |
0c4a4063 | 7952 | |
81ecdfbb RW |
7953 | # Check whether --with-relocated-sources was given. |
7954 | if test "${with_relocated_sources+set}" = set; then : | |
7955 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
7956 | |
7957 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7958 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7959 | ac_define_dir=`eval echo $reloc_srcdir` | |
7960 | ac_define_dir=`eval echo $ac_define_dir` | |
7961 | ||
7962 | cat >>confdefs.h <<_ACEOF | |
7963 | #define RELOC_SRCDIR "$ac_define_dir" | |
7964 | _ACEOF | |
7965 | ||
7966 | ||
7967 | ||
81ecdfbb RW |
7968 | fi |
7969 | ||
29b0e8a2 JM |
7970 | |
7971 | ||
20e95c23 | 7972 | |
5ae98d25 | 7973 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
7974 | |
7975 | ||
783e057b | 7976 | # Check whether to support alternative target configurations |
81ecdfbb RW |
7977 | # Check whether --enable-targets was given. |
7978 | if test "${enable_targets+set}" = set; then : | |
7979 | enableval=$enable_targets; case "${enableval}" in | |
7980 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
7981 | ;; |
7982 | no) enable_targets= ;; | |
7983 | *) enable_targets=$enableval ;; | |
7984 | esac | |
81ecdfbb RW |
7985 | fi |
7986 | ||
20e95c23 | 7987 | |
783e057b | 7988 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
7989 | # Check whether --enable-64-bit-bfd was given. |
7990 | if test "${enable_64_bit_bfd+set}" = set; then : | |
7991 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
7992 | yes) want64=true ;; |
7993 | no) want64=false ;; | |
81ecdfbb | 7994 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
7995 | esac |
7996 | else | |
7997 | want64=false | |
81ecdfbb RW |
7998 | fi |
7999 | ||
783e057b DJ |
8000 | # Provide defaults for some variables set by the per-host and per-target |
8001 | # configuration. | |
8002 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 8003 | |
783e057b DJ |
8004 | if test "${target}" = "${host}"; then |
8005 | gdb_native=yes | |
8006 | else | |
8007 | gdb_native=no | |
8008 | fi | |
20e95c23 | 8009 | |
783e057b | 8010 | . $srcdir/configure.host |
20e95c23 | 8011 | |
783e057b | 8012 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 8013 | |
783e057b DJ |
8014 | TARGET_OBS= |
8015 | all_targets= | |
20e95c23 | 8016 | |
783e057b | 8017 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 8018 | do |
783e057b DJ |
8019 | if test "$targ_alias" = "all"; then |
8020 | all_targets=true | |
8021 | else | |
8022 | # Canonicalize the secondary target names. | |
8023 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
8024 | if test -n "$result"; then | |
8025 | targ=$result | |
8026 | else | |
8027 | targ=$targ_alias | |
8028 | fi | |
20e95c23 | 8029 | |
783e057b | 8030 | . ${srcdir}/configure.tgt |
20e95c23 | 8031 | |
bf307134 JB |
8032 | if test -z "${gdb_target_obs}"; then : |
8033 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
8034 | fi | |
8035 | ||
783e057b DJ |
8036 | # Target-specific object files |
8037 | for i in ${gdb_target_obs}; do | |
8038 | case " $TARGET_OBS " in | |
8039 | *" ${i} "*) ;; | |
8040 | *) | |
8041 | TARGET_OBS="$TARGET_OBS ${i}" | |
8042 | ;; | |
8043 | esac | |
8044 | done | |
20e95c23 | 8045 | |
783e057b DJ |
8046 | # Check whether this target needs 64-bit CORE_ADDR |
8047 | if test x${want64} = xfalse; then | |
8048 | . ${srcdir}/../bfd/config.bfd | |
8049 | fi | |
8050 | fi | |
20e95c23 DJ |
8051 | done |
8052 | ||
783e057b DJ |
8053 | if test x${all_targets} = xtrue; then |
8054 | ||
8055 | # We want all 64-bit targets if we either: | |
8056 | # - run on a 64-bit host or | |
8057 | # - already require 64-bit support for some other target or | |
8058 | # - the --enable-64-bit-bfd option was supplied | |
8059 | # Otherwise we only support all 32-bit targets. | |
8060 | # | |
8061 | # NOTE: This test must be in sync with the corresponding | |
8062 | # tests in BFD! | |
20e95c23 | 8063 | |
783e057b | 8064 | if test x${want64} = xfalse; then |
81ecdfbb RW |
8065 | # The cast to long int works around a bug in the HP C Compiler |
8066 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
8067 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
8068 | # This bug is HP SR number 8606223364. | |
8069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
8070 | $as_echo_n "checking size of long... " >&6; } | |
8071 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
8072 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 8073 | else |
81ecdfbb | 8074 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 8075 | |
81ecdfbb RW |
8076 | else |
8077 | if test "$ac_cv_type_long" = yes; then | |
8078 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8079 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8080 | { as_fn_set_status 77 | |
8081 | as_fn_error "cannot compute sizeof (long) | |
8082 | See \`config.log' for more details." "$LINENO" 5; }; } | |
8083 | else | |
8084 | ac_cv_sizeof_long=0 | |
8085 | fi | |
c0993dbe | 8086 | fi |
81ecdfbb | 8087 | |
c0993dbe | 8088 | fi |
81ecdfbb RW |
8089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
8090 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 8091 | |
c0993dbe | 8092 | |
c0993dbe | 8093 | |
c0993dbe UW |
8094 | cat >>confdefs.h <<_ACEOF |
8095 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
8096 | _ACEOF | |
8097 | ||
8098 | ||
8099 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
8100 | want64=true | |
8101 | fi | |
8102 | fi | |
8103 | if test x${want64} = xtrue; then | |
8104 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
8105 | else | |
8106 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
8107 | fi | |
8108 | fi | |
8109 | ||
8110 | ||
8111 | ||
8112 | # For other settings, only the main target counts. | |
8113 | gdb_sim= | |
8114 | gdb_osabi= | |
8115 | build_gdbserver= | |
8116 | targ=$target; . ${srcdir}/configure.tgt | |
8117 | ||
8118 | # Fetch the default architecture and default target vector from BFD. | |
8119 | targ=$target; . $srcdir/../bfd/config.bfd | |
8120 | ||
8121 | # We only want the first architecture, so strip off the others if | |
8122 | # there is more than one. | |
8123 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
8124 | ||
8125 | if test "x$targ_archs" != x; then | |
8126 | ||
8127 | cat >>confdefs.h <<_ACEOF | |
8128 | #define DEFAULT_BFD_ARCH $targ_archs | |
8129 | _ACEOF | |
8130 | ||
8131 | fi | |
8132 | if test "x$targ_defvec" != x; then | |
8133 | ||
8134 | cat >>confdefs.h <<_ACEOF | |
8135 | #define DEFAULT_BFD_VEC $targ_defvec | |
8136 | _ACEOF | |
8137 | ||
8138 | fi | |
8139 | ||
c0993dbe UW |
8140 | # The CLI cannot be disabled yet, but may be in the future. |
8141 | ||
8142 | # Enable CLI. | |
81ecdfbb RW |
8143 | # Check whether --enable-gdbcli was given. |
8144 | if test "${enable_gdbcli+set}" = set; then : | |
8145 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
8146 | yes) |
8147 | ;; | |
8148 | no) | |
81ecdfbb | 8149 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 8150 | *) |
81ecdfbb | 8151 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
8152 | esac |
8153 | else | |
8154 | enable_gdbcli=yes | |
81ecdfbb RW |
8155 | fi |
8156 | ||
c0993dbe UW |
8157 | if test x"$enable_gdbcli" = xyes; then |
8158 | if test -d $srcdir/cli; then | |
8159 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
8160 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
8161 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
8162 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
8163 | fi | |
8164 | fi | |
8165 | ||
8166 | # Enable MI. | |
81ecdfbb RW |
8167 | # Check whether --enable-gdbmi was given. |
8168 | if test "${enable_gdbmi+set}" = set; then : | |
8169 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
8170 | yes | no) |
8171 | ;; | |
8172 | *) | |
81ecdfbb | 8173 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
8174 | esac |
8175 | else | |
8176 | enable_gdbmi=yes | |
81ecdfbb RW |
8177 | fi |
8178 | ||
c0993dbe UW |
8179 | if test x"$enable_gdbmi" = xyes; then |
8180 | if test -d $srcdir/mi; then | |
8181 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
8182 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
8183 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
8184 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
8185 | fi | |
8186 | fi | |
8187 | ||
8188 | # Enable TUI. | |
81ecdfbb RW |
8189 | # Check whether --enable-tui was given. |
8190 | if test "${enable_tui+set}" = set; then : | |
8191 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 8192 | yes | no | auto) |
c0993dbe UW |
8193 | ;; |
8194 | *) | |
81ecdfbb | 8195 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
8196 | esac |
8197 | else | |
3ca64bd3 | 8198 | enable_tui=auto |
81ecdfbb RW |
8199 | fi |
8200 | ||
c0993dbe UW |
8201 | |
8202 | # Enable gdbtk. | |
81ecdfbb RW |
8203 | # Check whether --enable-gdbtk was given. |
8204 | if test "${enable_gdbtk+set}" = set; then : | |
8205 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
8206 | yes | no) |
8207 | ;; | |
8208 | *) | |
81ecdfbb | 8209 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
8210 | esac |
8211 | else | |
5062cc19 | 8212 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
8213 | enable_gdbtk=yes |
8214 | else | |
8215 | enable_gdbtk=no | |
8216 | fi | |
81ecdfbb RW |
8217 | fi |
8218 | ||
c0993dbe UW |
8219 | # We unconditionally disable gdbtk tests on selected platforms. |
8220 | case $host_os in | |
8221 | go32* | windows*) | |
81ecdfbb RW |
8222 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
8223 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
8224 | enable_gdbtk=no ;; |
8225 | esac | |
8226 | ||
8227 | # Libunwind support. | |
bec39cab | 8228 | |
81ecdfbb RW |
8229 | # Check whether --with-libunwind was given. |
8230 | if test "${with_libunwind+set}" = set; then : | |
8231 | withval=$with_libunwind; case "${withval}" in | |
bec39cab AC |
8232 | yes) enable_libunwind=yes ;; |
8233 | no) enable_libunwind=no ;; | |
81ecdfbb | 8234 | *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;; |
bec39cab | 8235 | esac |
bec39cab | 8236 | else |
bec39cab | 8237 | |
81ecdfbb RW |
8238 | for ac_header in libunwind.h libunwind-ia64.h |
8239 | do : | |
8240 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8241 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8242 | eval as_val=\$$as_ac_Header | |
8243 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8244 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8245 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8246 | _ACEOF |
8247 | ||
8248 | fi | |
8249 | ||
8250 | done | |
8251 | ||
a9322a30 TT |
8252 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then |
8253 | enable_libunwind=yes; | |
8254 | fi | |
8255 | ||
bec39cab | 8256 | fi |
bec39cab | 8257 | |
bec39cab | 8258 | |
81ecdfbb RW |
8259 | if test x"$enable_libunwind" = xyes; then |
8260 | for ac_header in libunwind.h libunwind-ia64.h | |
8261 | do : | |
8262 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8263 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8264 | eval as_val=\$$as_ac_Header | |
8265 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8266 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8267 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8268 | _ACEOF |
8269 | ||
8270 | fi | |
8271 | ||
8272 | done | |
8273 | ||
bec39cab | 8274 | |
81ecdfbb | 8275 | $as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h |
a9322a30 TT |
8276 | |
8277 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
8278 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
8279 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
8280 | fi | |
8281 | ||
cb01cfba JB |
8282 | opt_curses=no |
8283 | ||
81ecdfbb RW |
8284 | # Check whether --with-curses was given. |
8285 | if test "${with_curses+set}" = set; then : | |
8286 | withval=$with_curses; opt_curses=$withval | |
8287 | fi | |
8288 | ||
cb01cfba | 8289 | |
76a39ba7 | 8290 | prefer_curses=no |
cb01cfba | 8291 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 8292 | prefer_curses=yes |
cb01cfba JB |
8293 | fi |
8294 | ||
a9322a30 | 8295 | # Profiling support. |
81ecdfbb RW |
8296 | # Check whether --enable-profiling was given. |
8297 | if test "${enable_profiling+set}" = set; then : | |
8298 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
8299 | yes | no) |
8300 | ;; | |
8301 | *) | |
81ecdfbb | 8302 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
8303 | esac |
8304 | else | |
8305 | enable_profiling=no | |
81ecdfbb | 8306 | fi |
bec39cab | 8307 | |
a9322a30 TT |
8308 | |
8309 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
8310 | do : |
8311 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8312 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8313 | eval as_val=\$$as_ac_var | |
8314 | if test "x$as_val" = x""yes; then : | |
8315 | cat >>confdefs.h <<_ACEOF | |
8316 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 8317 | _ACEOF |
a9322a30 | 8318 | |
81ecdfbb RW |
8319 | fi |
8320 | done | |
a9322a30 | 8321 | |
81ecdfbb RW |
8322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
8323 | $as_echo_n "checking for _etext... " >&6; } | |
8324 | if test "${ac_cv_var__etext+set}" = set; then : | |
8325 | $as_echo_n "(cached) " >&6 | |
8326 | else | |
8327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8328 | /* end confdefs.h. */ | |
8329 | #include <stdlib.h> | |
8330 | extern char _etext; | |
a9322a30 TT |
8331 | |
8332 | int | |
8333 | main () | |
8334 | { | |
8335 | free (&_etext); | |
8336 | ; | |
8337 | return 0; | |
8338 | } | |
bec39cab | 8339 | _ACEOF |
81ecdfbb | 8340 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8341 | ac_cv_var__etext=yes |
bec39cab | 8342 | else |
81ecdfbb | 8343 | ac_cv_var__etext=no |
bec39cab | 8344 | fi |
81ecdfbb RW |
8345 | rm -f core conftest.err conftest.$ac_objext \ |
8346 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8347 | fi |
81ecdfbb RW |
8348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
8349 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 8350 | if test $ac_cv_var__etext = yes; then |
60ca704f | 8351 | |
81ecdfbb | 8352 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 8353 | |
bec39cab | 8354 | fi |
81ecdfbb RW |
8355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
8356 | $as_echo_n "checking for etext... " >&6; } | |
8357 | if test "${ac_cv_var_etext+set}" = set; then : | |
8358 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8359 | else |
81ecdfbb | 8360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8361 | /* end confdefs.h. */ |
a9322a30 TT |
8362 | #include <stdlib.h> |
8363 | extern char etext; | |
bec39cab AC |
8364 | |
8365 | int | |
8366 | main () | |
8367 | { | |
a9322a30 | 8368 | free (&etext); |
bec39cab AC |
8369 | ; |
8370 | return 0; | |
8371 | } | |
8372 | _ACEOF | |
81ecdfbb | 8373 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8374 | ac_cv_var_etext=yes |
bec39cab | 8375 | else |
81ecdfbb | 8376 | ac_cv_var_etext=no |
bec39cab | 8377 | fi |
81ecdfbb RW |
8378 | rm -f core conftest.err conftest.$ac_objext \ |
8379 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8380 | fi |
81ecdfbb RW |
8381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
8382 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
8383 | if test $ac_cv_var_etext = yes; then |
8384 | ||
81ecdfbb | 8385 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
8386 | |
8387 | fi | |
a9322a30 TT |
8388 | if test "$enable_profiling" = yes ; then |
8389 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 8390 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
8391 | fi |
8392 | PROFILE_CFLAGS=-pg | |
8393 | OLD_CFLAGS="$CFLAGS" | |
8394 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 8395 | |
81ecdfbb RW |
8396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
8397 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
8398 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
8399 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8400 | else |
81ecdfbb | 8401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8402 | /* end confdefs.h. */ |
bec39cab AC |
8403 | |
8404 | int | |
8405 | main () | |
8406 | { | |
a9322a30 | 8407 | int x; |
bec39cab AC |
8408 | ; |
8409 | return 0; | |
8410 | } | |
8411 | _ACEOF | |
81ecdfbb | 8412 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 8413 | ac_cv_cc_supports_pg=yes |
bec39cab | 8414 | else |
81ecdfbb | 8415 | ac_cv_cc_supports_pg=no |
bec39cab | 8416 | fi |
81ecdfbb | 8417 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8418 | fi |
81ecdfbb RW |
8419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
8420 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 8421 | |
a9322a30 | 8422 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 8423 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 8424 | fi |
bec39cab | 8425 | |
a9322a30 | 8426 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
8427 | fi |
8428 | ||
c16158bc JM |
8429 | |
8430 | ||
81ecdfbb RW |
8431 | # Check whether --with-pkgversion was given. |
8432 | if test "${with_pkgversion+set}" = set; then : | |
8433 | withval=$with_pkgversion; case "$withval" in | |
8434 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8435 | no) PKGVERSION= ;; |
8436 | *) PKGVERSION="($withval) " ;; | |
8437 | esac | |
8438 | else | |
8439 | PKGVERSION="(GDB) " | |
8440 | ||
81ecdfbb | 8441 | fi |
c16158bc JM |
8442 | |
8443 | ||
8444 | ||
8445 | ||
81ecdfbb RW |
8446 | |
8447 | # Check whether --with-bugurl was given. | |
8448 | if test "${with_bugurl+set}" = set; then : | |
8449 | withval=$with_bugurl; case "$withval" in | |
8450 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8451 | no) BUGURL= |
8452 | ;; | |
8453 | *) BUGURL="$withval" | |
8454 | ;; | |
8455 | esac | |
8456 | else | |
8457 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
8458 | ||
81ecdfbb RW |
8459 | fi |
8460 | ||
c16158bc JM |
8461 | case ${BUGURL} in |
8462 | "") | |
8463 | REPORT_BUGS_TO= | |
8464 | REPORT_BUGS_TEXI= | |
8465 | ;; | |
8466 | *) | |
8467 | REPORT_BUGS_TO="<$BUGURL>" | |
8468 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
8469 | ;; | |
8470 | esac; | |
8471 | ||
8472 | ||
8473 | ||
8474 | ||
8475 | cat >>confdefs.h <<_ACEOF | |
8476 | #define PKGVERSION "$PKGVERSION" | |
8477 | _ACEOF | |
8478 | ||
8479 | ||
8480 | cat >>confdefs.h <<_ACEOF | |
8481 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
8482 | _ACEOF | |
8483 | ||
8484 | ||
bec39cab AC |
8485 | # --------------------- # |
8486 | # Checks for programs. # | |
8487 | # --------------------- # | |
8488 | ||
8489 | for ac_prog in gawk mawk nawk awk | |
8490 | do | |
8491 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8492 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8494 | $as_echo_n "checking for $ac_word... " >&6; } | |
8495 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
8496 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8497 | else |
8498 | if test -n "$AWK"; then | |
8499 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
8500 | else | |
8501 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8502 | for as_dir in $PATH | |
8503 | do | |
8504 | IFS=$as_save_IFS | |
8505 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8506 | for ac_exec_ext in '' $ac_executable_extensions; do |
8507 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8508 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 8509 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8510 | break 2 |
8511 | fi | |
8512 | done | |
81ecdfbb RW |
8513 | done |
8514 | IFS=$as_save_IFS | |
bec39cab AC |
8515 | |
8516 | fi | |
8517 | fi | |
8518 | AWK=$ac_cv_prog_AWK | |
8519 | if test -n "$AWK"; then | |
81ecdfbb RW |
8520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
8521 | $as_echo "$AWK" >&6; } | |
bec39cab | 8522 | else |
81ecdfbb RW |
8523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8524 | $as_echo "no" >&6; } | |
bec39cab AC |
8525 | fi |
8526 | ||
bec39cab | 8527 | |
81ecdfbb | 8528 | test -n "$AWK" && break |
bec39cab AC |
8529 | done |
8530 | ||
bec39cab | 8531 | |
81ecdfbb RW |
8532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
8533 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
8534 | LN_S=$as_ln_s |
8535 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
8536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
8537 | $as_echo "yes" >&6; } | |
bec39cab | 8538 | else |
81ecdfbb RW |
8539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
8540 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
8541 | fi |
8542 | ||
8543 | if test -n "$ac_tool_prefix"; then | |
8544 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
8545 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
8546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8547 | $as_echo_n "checking for $ac_word... " >&6; } | |
8548 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
8549 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8550 | else |
8551 | if test -n "$RANLIB"; then | |
8552 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
8553 | else | |
8554 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8555 | for as_dir in $PATH | |
8556 | do | |
8557 | IFS=$as_save_IFS | |
8558 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8559 | for ac_exec_ext in '' $ac_executable_extensions; do |
8560 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8561 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 8562 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8563 | break 2 |
8564 | fi | |
8565 | done | |
81ecdfbb RW |
8566 | done |
8567 | IFS=$as_save_IFS | |
bec39cab AC |
8568 | |
8569 | fi | |
8570 | fi | |
8571 | RANLIB=$ac_cv_prog_RANLIB | |
8572 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
8573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
8574 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 8575 | else |
81ecdfbb RW |
8576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8577 | $as_echo "no" >&6; } | |
bec39cab AC |
8578 | fi |
8579 | ||
81ecdfbb | 8580 | |
bec39cab AC |
8581 | fi |
8582 | if test -z "$ac_cv_prog_RANLIB"; then | |
8583 | ac_ct_RANLIB=$RANLIB | |
8584 | # Extract the first word of "ranlib", so it can be a program name with args. | |
8585 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
8586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8587 | $as_echo_n "checking for $ac_word... " >&6; } | |
8588 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
8589 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8590 | else |
8591 | if test -n "$ac_ct_RANLIB"; then | |
8592 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
8593 | else | |
8594 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8595 | for as_dir in $PATH | |
8596 | do | |
8597 | IFS=$as_save_IFS | |
8598 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8599 | for ac_exec_ext in '' $ac_executable_extensions; do |
8600 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8601 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 8602 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8603 | break 2 |
8604 | fi | |
8605 | done | |
81ecdfbb RW |
8606 | done |
8607 | IFS=$as_save_IFS | |
bec39cab | 8608 | |
bec39cab AC |
8609 | fi |
8610 | fi | |
8611 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
8612 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
8613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
8614 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 8615 | else |
81ecdfbb RW |
8616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8617 | $as_echo "no" >&6; } | |
bec39cab AC |
8618 | fi |
8619 | ||
81ecdfbb RW |
8620 | if test "x$ac_ct_RANLIB" = x; then |
8621 | RANLIB=":" | |
8622 | else | |
8623 | case $cross_compiling:$ac_tool_warned in | |
8624 | yes:) | |
8625 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8626 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8627 | ac_tool_warned=yes ;; | |
8628 | esac | |
8629 | RANLIB=$ac_ct_RANLIB | |
8630 | fi | |
bec39cab AC |
8631 | else |
8632 | RANLIB="$ac_cv_prog_RANLIB" | |
8633 | fi | |
8634 | ||
8635 | for ac_prog in 'bison -y' byacc | |
8636 | do | |
8637 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8638 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8640 | $as_echo_n "checking for $ac_word... " >&6; } | |
8641 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
8642 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8643 | else |
8644 | if test -n "$YACC"; then | |
8645 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
8646 | else | |
8647 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8648 | for as_dir in $PATH | |
8649 | do | |
8650 | IFS=$as_save_IFS | |
8651 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8652 | for ac_exec_ext in '' $ac_executable_extensions; do |
8653 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8654 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 8655 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8656 | break 2 |
8657 | fi | |
8658 | done | |
81ecdfbb RW |
8659 | done |
8660 | IFS=$as_save_IFS | |
bec39cab AC |
8661 | |
8662 | fi | |
8663 | fi | |
8664 | YACC=$ac_cv_prog_YACC | |
8665 | if test -n "$YACC"; then | |
81ecdfbb RW |
8666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
8667 | $as_echo "$YACC" >&6; } | |
bec39cab | 8668 | else |
81ecdfbb RW |
8669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8670 | $as_echo "no" >&6; } | |
bec39cab AC |
8671 | fi |
8672 | ||
81ecdfbb | 8673 | |
bec39cab AC |
8674 | test -n "$YACC" && break |
8675 | done | |
8676 | test -n "$YACC" || YACC="yacc" | |
8677 | ||
8678 | ||
8679 | if test -n "$ac_tool_prefix"; then | |
8680 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
8681 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
8682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8683 | $as_echo_n "checking for $ac_word... " >&6; } | |
8684 | if test "${ac_cv_prog_AR+set}" = set; then : | |
8685 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8686 | else |
8687 | if test -n "$AR"; then | |
8688 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
8689 | else | |
8690 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8691 | for as_dir in $PATH | |
8692 | do | |
8693 | IFS=$as_save_IFS | |
8694 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8695 | for ac_exec_ext in '' $ac_executable_extensions; do |
8696 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8697 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 8698 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8699 | break 2 |
8700 | fi | |
8701 | done | |
81ecdfbb RW |
8702 | done |
8703 | IFS=$as_save_IFS | |
bec39cab AC |
8704 | |
8705 | fi | |
8706 | fi | |
8707 | AR=$ac_cv_prog_AR | |
8708 | if test -n "$AR"; then | |
81ecdfbb RW |
8709 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
8710 | $as_echo "$AR" >&6; } | |
bec39cab | 8711 | else |
81ecdfbb RW |
8712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8713 | $as_echo "no" >&6; } | |
bec39cab AC |
8714 | fi |
8715 | ||
81ecdfbb | 8716 | |
bec39cab AC |
8717 | fi |
8718 | if test -z "$ac_cv_prog_AR"; then | |
8719 | ac_ct_AR=$AR | |
8720 | # Extract the first word of "ar", so it can be a program name with args. | |
8721 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
8722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8723 | $as_echo_n "checking for $ac_word... " >&6; } | |
8724 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
8725 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8726 | else |
8727 | if test -n "$ac_ct_AR"; then | |
8728 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
8729 | else | |
8730 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8731 | for as_dir in $PATH | |
8732 | do | |
8733 | IFS=$as_save_IFS | |
8734 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8735 | for ac_exec_ext in '' $ac_executable_extensions; do |
8736 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8737 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 8738 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8739 | break 2 |
8740 | fi | |
8741 | done | |
81ecdfbb RW |
8742 | done |
8743 | IFS=$as_save_IFS | |
bec39cab AC |
8744 | |
8745 | fi | |
8746 | fi | |
8747 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
8748 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
8749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
8750 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 8751 | else |
81ecdfbb RW |
8752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8753 | $as_echo "no" >&6; } | |
bec39cab AC |
8754 | fi |
8755 | ||
81ecdfbb RW |
8756 | if test "x$ac_ct_AR" = x; then |
8757 | AR="" | |
8758 | else | |
8759 | case $cross_compiling:$ac_tool_warned in | |
8760 | yes:) | |
8761 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8762 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8763 | ac_tool_warned=yes ;; | |
8764 | esac | |
8765 | AR=$ac_ct_AR | |
8766 | fi | |
bec39cab AC |
8767 | else |
8768 | AR="$ac_cv_prog_AR" | |
8769 | fi | |
8770 | ||
8771 | if test -n "$ac_tool_prefix"; then | |
8772 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
8773 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
8774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8775 | $as_echo_n "checking for $ac_word... " >&6; } | |
8776 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
8777 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8778 | else |
8779 | if test -n "$DLLTOOL"; then | |
8780 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
8781 | else | |
8782 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8783 | for as_dir in $PATH | |
8784 | do | |
8785 | IFS=$as_save_IFS | |
8786 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8787 | for ac_exec_ext in '' $ac_executable_extensions; do |
8788 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8789 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 8790 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8791 | break 2 |
8792 | fi | |
8793 | done | |
81ecdfbb RW |
8794 | done |
8795 | IFS=$as_save_IFS | |
bec39cab AC |
8796 | |
8797 | fi | |
8798 | fi | |
8799 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
8800 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
8801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
8802 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 8803 | else |
81ecdfbb RW |
8804 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8805 | $as_echo "no" >&6; } | |
bec39cab AC |
8806 | fi |
8807 | ||
81ecdfbb | 8808 | |
bec39cab AC |
8809 | fi |
8810 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
8811 | ac_ct_DLLTOOL=$DLLTOOL | |
8812 | # Extract the first word of "dlltool", so it can be a program name with args. | |
8813 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
8814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8815 | $as_echo_n "checking for $ac_word... " >&6; } | |
8816 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
8817 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8818 | else |
8819 | if test -n "$ac_ct_DLLTOOL"; then | |
8820 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
8821 | else | |
8822 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8823 | for as_dir in $PATH | |
8824 | do | |
8825 | IFS=$as_save_IFS | |
8826 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8827 | for ac_exec_ext in '' $ac_executable_extensions; do |
8828 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8829 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 8830 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8831 | break 2 |
8832 | fi | |
8833 | done | |
81ecdfbb RW |
8834 | done |
8835 | IFS=$as_save_IFS | |
bec39cab AC |
8836 | |
8837 | fi | |
8838 | fi | |
8839 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
8840 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
8841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
8842 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 8843 | else |
81ecdfbb RW |
8844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8845 | $as_echo "no" >&6; } | |
bec39cab AC |
8846 | fi |
8847 | ||
81ecdfbb RW |
8848 | if test "x$ac_ct_DLLTOOL" = x; then |
8849 | DLLTOOL="" | |
8850 | else | |
8851 | case $cross_compiling:$ac_tool_warned in | |
8852 | yes:) | |
8853 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8854 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8855 | ac_tool_warned=yes ;; | |
8856 | esac | |
8857 | DLLTOOL=$ac_ct_DLLTOOL | |
8858 | fi | |
bec39cab AC |
8859 | else |
8860 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
8861 | fi | |
8862 | ||
8863 | if test -n "$ac_tool_prefix"; then | |
8864 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
8865 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
8866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8867 | $as_echo_n "checking for $ac_word... " >&6; } | |
8868 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
8869 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8870 | else |
8871 | if test -n "$WINDRES"; then | |
8872 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
8873 | else | |
8874 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8875 | for as_dir in $PATH | |
8876 | do | |
8877 | IFS=$as_save_IFS | |
8878 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8879 | for ac_exec_ext in '' $ac_executable_extensions; do |
8880 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8881 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 8882 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8883 | break 2 |
8884 | fi | |
8885 | done | |
81ecdfbb RW |
8886 | done |
8887 | IFS=$as_save_IFS | |
bec39cab AC |
8888 | |
8889 | fi | |
8890 | fi | |
8891 | WINDRES=$ac_cv_prog_WINDRES | |
8892 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
8893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
8894 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 8895 | else |
81ecdfbb RW |
8896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8897 | $as_echo "no" >&6; } | |
bec39cab AC |
8898 | fi |
8899 | ||
81ecdfbb | 8900 | |
bec39cab AC |
8901 | fi |
8902 | if test -z "$ac_cv_prog_WINDRES"; then | |
8903 | ac_ct_WINDRES=$WINDRES | |
8904 | # Extract the first word of "windres", so it can be a program name with args. | |
8905 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
8906 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8907 | $as_echo_n "checking for $ac_word... " >&6; } | |
8908 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
8909 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8910 | else |
8911 | if test -n "$ac_ct_WINDRES"; then | |
8912 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
8913 | else | |
8914 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8915 | for as_dir in $PATH | |
8916 | do | |
8917 | IFS=$as_save_IFS | |
8918 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8919 | for ac_exec_ext in '' $ac_executable_extensions; do |
8920 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8921 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 8922 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8923 | break 2 |
8924 | fi | |
8925 | done | |
81ecdfbb RW |
8926 | done |
8927 | IFS=$as_save_IFS | |
bec39cab AC |
8928 | |
8929 | fi | |
8930 | fi | |
8931 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
8932 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
8933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
8934 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 8935 | else |
81ecdfbb RW |
8936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8937 | $as_echo "no" >&6; } | |
c906108c | 8938 | fi |
bec39cab | 8939 | |
81ecdfbb RW |
8940 | if test "x$ac_ct_WINDRES" = x; then |
8941 | WINDRES="" | |
8942 | else | |
8943 | case $cross_compiling:$ac_tool_warned in | |
8944 | yes:) | |
8945 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8946 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8947 | ac_tool_warned=yes ;; | |
8948 | esac | |
8949 | WINDRES=$ac_ct_WINDRES | |
8950 | fi | |
c906108c | 8951 | else |
bec39cab | 8952 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
8953 | fi |
8954 | ||
bec39cab AC |
8955 | |
8956 | # Needed for GNU/Hurd. | |
8957 | if test -n "$ac_tool_prefix"; then | |
8958 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
8959 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
8960 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8961 | $as_echo_n "checking for $ac_word... " >&6; } | |
8962 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
8963 | $as_echo_n "(cached) " >&6 | |
c906108c | 8964 | else |
bec39cab AC |
8965 | if test -n "$MIG"; then |
8966 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
8967 | else | |
8968 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8969 | for as_dir in $PATH | |
8970 | do | |
8971 | IFS=$as_save_IFS | |
8972 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8973 | for ac_exec_ext in '' $ac_executable_extensions; do |
8974 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8975 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 8976 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8977 | break 2 |
8978 | fi | |
8979 | done | |
81ecdfbb RW |
8980 | done |
8981 | IFS=$as_save_IFS | |
bec39cab | 8982 | |
c906108c | 8983 | fi |
bec39cab AC |
8984 | fi |
8985 | MIG=$ac_cv_prog_MIG | |
8986 | if test -n "$MIG"; then | |
81ecdfbb RW |
8987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
8988 | $as_echo "$MIG" >&6; } | |
c906108c | 8989 | else |
81ecdfbb RW |
8990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8991 | $as_echo "no" >&6; } | |
c906108c SS |
8992 | fi |
8993 | ||
81ecdfbb | 8994 | |
bec39cab AC |
8995 | fi |
8996 | if test -z "$ac_cv_prog_MIG"; then | |
8997 | ac_ct_MIG=$MIG | |
8998 | # Extract the first word of "mig", so it can be a program name with args. | |
8999 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
9000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
9001 | $as_echo_n "checking for $ac_word... " >&6; } | |
9002 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
9003 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9004 | else |
9005 | if test -n "$ac_ct_MIG"; then | |
9006 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
9007 | else | |
9008 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9009 | for as_dir in $PATH | |
9010 | do | |
9011 | IFS=$as_save_IFS | |
9012 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
9013 | for ac_exec_ext in '' $ac_executable_extensions; do |
9014 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 9015 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 9016 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
9017 | break 2 |
9018 | fi | |
9019 | done | |
81ecdfbb RW |
9020 | done |
9021 | IFS=$as_save_IFS | |
c906108c | 9022 | |
bec39cab AC |
9023 | fi |
9024 | fi | |
9025 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
9026 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
9027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
9028 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 9029 | else |
81ecdfbb RW |
9030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9031 | $as_echo "no" >&6; } | |
bec39cab | 9032 | fi |
c906108c | 9033 | |
81ecdfbb RW |
9034 | if test "x$ac_ct_MIG" = x; then |
9035 | MIG="" | |
9036 | else | |
9037 | case $cross_compiling:$ac_tool_warned in | |
9038 | yes:) | |
9039 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
9040 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
9041 | ac_tool_warned=yes ;; | |
9042 | esac | |
9043 | MIG=$ac_ct_MIG | |
9044 | fi | |
bec39cab AC |
9045 | else |
9046 | MIG="$ac_cv_prog_MIG" | |
9047 | fi | |
c906108c | 9048 | |
c906108c | 9049 | |
bec39cab AC |
9050 | # ---------------------- # |
9051 | # Checks for libraries. # | |
9052 | # ---------------------- # | |
c906108c | 9053 | |
bec39cab | 9054 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
9055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
9056 | $as_echo_n "checking for main in -lm... " >&6; } | |
9057 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
9058 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9059 | else |
9060 | ac_check_lib_save_LIBS=$LIBS | |
9061 | LIBS="-lm $LIBS" | |
81ecdfbb | 9062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9063 | /* end confdefs.h. */ |
c906108c | 9064 | |
c906108c | 9065 | |
bec39cab AC |
9066 | int |
9067 | main () | |
9068 | { | |
81ecdfbb | 9069 | return main (); |
bec39cab AC |
9070 | ; |
9071 | return 0; | |
9072 | } | |
9073 | _ACEOF | |
81ecdfbb | 9074 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
9075 | ac_cv_lib_m_main=yes |
9076 | else | |
81ecdfbb | 9077 | ac_cv_lib_m_main=no |
bec39cab | 9078 | fi |
81ecdfbb RW |
9079 | rm -f core conftest.err conftest.$ac_objext \ |
9080 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
9081 | LIBS=$ac_check_lib_save_LIBS |
9082 | fi | |
81ecdfbb RW |
9083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
9084 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
9085 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
9086 | cat >>confdefs.h <<_ACEOF |
9087 | #define HAVE_LIBM 1 | |
9088 | _ACEOF | |
9089 | ||
9090 | LIBS="-lm $LIBS" | |
c906108c | 9091 | |
c906108c | 9092 | fi |
bec39cab AC |
9093 | |
9094 | ||
9095 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
9096 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
9097 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
9098 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
9099 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
9100 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 9101 | |
c906108c | 9102 | else |
81ecdfbb RW |
9103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
9104 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
9105 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
9106 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9107 | else |
9108 | ac_check_lib_save_LIBS=$LIBS | |
9109 | LIBS="-lw $LIBS" | |
81ecdfbb | 9110 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9111 | /* end confdefs.h. */ |
c906108c | 9112 | |
81ecdfbb RW |
9113 | /* Override any GCC internal prototype to avoid an error. |
9114 | Use char because int might match the return type of a GCC | |
9115 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9116 | #ifdef __cplusplus |
9117 | extern "C" | |
9118 | #endif | |
bec39cab AC |
9119 | char wctype (); |
9120 | int | |
9121 | main () | |
9122 | { | |
81ecdfbb | 9123 | return wctype (); |
bec39cab AC |
9124 | ; |
9125 | return 0; | |
9126 | } | |
9127 | _ACEOF | |
81ecdfbb | 9128 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
9129 | ac_cv_lib_w_wctype=yes |
9130 | else | |
81ecdfbb | 9131 | ac_cv_lib_w_wctype=no |
bec39cab | 9132 | fi |
81ecdfbb RW |
9133 | rm -f core conftest.err conftest.$ac_objext \ |
9134 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
9135 | LIBS=$ac_check_lib_save_LIBS |
9136 | fi | |
81ecdfbb RW |
9137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
9138 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
9139 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
9140 | cat >>confdefs.h <<_ACEOF |
9141 | #define HAVE_LIBW 1 | |
9142 | _ACEOF | |
c906108c | 9143 | |
bec39cab | 9144 | LIBS="-lw $LIBS" |
c906108c | 9145 | |
bec39cab | 9146 | fi |
c906108c | 9147 | |
bec39cab | 9148 | fi |
c906108c | 9149 | |
ddc9cd0f | 9150 | |
bec39cab | 9151 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
9152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
9153 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
9154 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9155 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9156 | else |
9157 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9158 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9159 | /* end confdefs.h. */ |
ddc9cd0f | 9160 | |
81ecdfbb RW |
9161 | /* Override any GCC internal prototype to avoid an error. |
9162 | Use char because int might match the return type of a GCC | |
9163 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9164 | #ifdef __cplusplus |
9165 | extern "C" | |
9166 | #endif | |
bec39cab AC |
9167 | char gethostbyname (); |
9168 | int | |
9169 | main () | |
9170 | { | |
81ecdfbb | 9171 | return gethostbyname (); |
bec39cab AC |
9172 | ; |
9173 | return 0; | |
9174 | } | |
9175 | _ACEOF | |
81ecdfbb RW |
9176 | for ac_lib in '' nsl; do |
9177 | if test -z "$ac_lib"; then | |
9178 | ac_res="none required" | |
9179 | else | |
9180 | ac_res=-l$ac_lib | |
b4e70030 | 9181 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9182 | fi |
9183 | if ac_fn_c_try_link "$LINENO"; then : | |
9184 | ac_cv_search_gethostbyname=$ac_res | |
9185 | fi | |
9186 | rm -f core conftest.err conftest.$ac_objext \ | |
9187 | conftest$ac_exeext | |
9188 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9189 | break | |
9190 | fi | |
9191 | done | |
9192 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 9193 | |
bec39cab | 9194 | else |
81ecdfbb | 9195 | ac_cv_search_gethostbyname=no |
bec39cab | 9196 | fi |
81ecdfbb | 9197 | rm conftest.$ac_ext |
bec39cab AC |
9198 | LIBS=$ac_func_search_save_LIBS |
9199 | fi | |
81ecdfbb RW |
9200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
9201 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
9202 | ac_res=$ac_cv_search_gethostbyname | |
9203 | if test "$ac_res" != no; then : | |
9204 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 9205 | |
bec39cab | 9206 | fi |
96baa820 | 9207 | |
c906108c | 9208 | |
b4e70030 | 9209 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
9210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
9211 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
9212 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9213 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
9214 | else |
9215 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9217 | /* end confdefs.h. */ |
9218 | ||
81ecdfbb RW |
9219 | /* Override any GCC internal prototype to avoid an error. |
9220 | Use char because int might match the return type of a GCC | |
9221 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
9222 | #ifdef __cplusplus |
9223 | extern "C" | |
9224 | #endif | |
b4e70030 JB |
9225 | char socketpair (); |
9226 | int | |
9227 | main () | |
9228 | { | |
81ecdfbb | 9229 | return socketpair (); |
b4e70030 JB |
9230 | ; |
9231 | return 0; | |
9232 | } | |
9233 | _ACEOF | |
81ecdfbb RW |
9234 | for ac_lib in '' socket; do |
9235 | if test -z "$ac_lib"; then | |
9236 | ac_res="none required" | |
9237 | else | |
9238 | ac_res=-l$ac_lib | |
b4e70030 | 9239 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9240 | fi |
9241 | if ac_fn_c_try_link "$LINENO"; then : | |
9242 | ac_cv_search_socketpair=$ac_res | |
9243 | fi | |
9244 | rm -f core conftest.err conftest.$ac_objext \ | |
9245 | conftest$ac_exeext | |
9246 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9247 | break | |
9248 | fi | |
9249 | done | |
9250 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 9251 | |
b4e70030 | 9252 | else |
81ecdfbb | 9253 | ac_cv_search_socketpair=no |
b4e70030 | 9254 | fi |
81ecdfbb | 9255 | rm conftest.$ac_ext |
b4e70030 JB |
9256 | LIBS=$ac_func_search_save_LIBS |
9257 | fi | |
81ecdfbb RW |
9258 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
9259 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
9260 | ac_res=$ac_cv_search_socketpair | |
9261 | if test "$ac_res" != no; then : | |
9262 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
9263 | |
9264 | fi | |
9265 | ||
9266 | ||
233a11ab | 9267 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
9268 | |
9269 | # See if the user specified whether he wants zlib support or not. | |
9270 | ||
9271 | # Check whether --with-zlib was given. | |
9272 | if test "${with_zlib+set}" = set; then : | |
9273 | withval=$with_zlib; | |
9274 | else | |
9275 | with_zlib=auto | |
9276 | fi | |
9277 | ||
9278 | ||
9279 | if test "$with_zlib" != "no"; then | |
9280 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
9281 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
9282 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9283 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
9284 | else |
9285 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
9287 | /* end confdefs.h. */ |
9288 | ||
81ecdfbb RW |
9289 | /* Override any GCC internal prototype to avoid an error. |
9290 | Use char because int might match the return type of a GCC | |
233a11ab | 9291 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
9292 | #ifdef __cplusplus |
9293 | extern "C" | |
9294 | #endif | |
233a11ab CS |
9295 | char zlibVersion (); |
9296 | int | |
9297 | main () | |
9298 | { | |
81ecdfbb | 9299 | return zlibVersion (); |
233a11ab CS |
9300 | ; |
9301 | return 0; | |
9302 | } | |
9303 | _ACEOF | |
81ecdfbb RW |
9304 | for ac_lib in '' z; do |
9305 | if test -z "$ac_lib"; then | |
9306 | ac_res="none required" | |
233a11ab | 9307 | else |
81ecdfbb RW |
9308 | ac_res=-l$ac_lib |
9309 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 9310 | fi |
81ecdfbb RW |
9311 | if ac_fn_c_try_link "$LINENO"; then : |
9312 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 9313 | fi |
81ecdfbb RW |
9314 | rm -f core conftest.err conftest.$ac_objext \ |
9315 | conftest$ac_exeext | |
9316 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9317 | break | |
233a11ab | 9318 | fi |
81ecdfbb RW |
9319 | done |
9320 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 9321 | |
233a11ab | 9322 | else |
81ecdfbb | 9323 | ac_cv_search_zlibVersion=no |
233a11ab | 9324 | fi |
81ecdfbb RW |
9325 | rm conftest.$ac_ext |
9326 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 9327 | fi |
81ecdfbb RW |
9328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
9329 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
9330 | ac_res=$ac_cv_search_zlibVersion | |
9331 | if test "$ac_res" != no; then : | |
9332 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9333 | for ac_header in zlib.h | |
9334 | do : | |
9335 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
9336 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 9337 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9338 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
9339 | _ACEOF |
9340 | ||
9341 | fi | |
9342 | ||
9343 | done | |
9344 | ||
9345 | fi | |
9346 | ||
b040ad30 JB |
9347 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
9348 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
9349 | fi | |
9350 | fi | |
9351 | ||
233a11ab | 9352 | |
77f120bf | 9353 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
9354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
9355 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
9356 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9357 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9358 | else |
9359 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9361 | /* end confdefs.h. */ |
c906108c | 9362 | |
81ecdfbb RW |
9363 | /* Override any GCC internal prototype to avoid an error. |
9364 | Use char because int might match the return type of a GCC | |
9365 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9366 | #ifdef __cplusplus |
9367 | extern "C" | |
9368 | #endif | |
77f120bf | 9369 | char dlgetmodinfo (); |
bec39cab AC |
9370 | int |
9371 | main () | |
9372 | { | |
81ecdfbb | 9373 | return dlgetmodinfo (); |
bec39cab AC |
9374 | ; |
9375 | return 0; | |
9376 | } | |
9377 | _ACEOF | |
81ecdfbb RW |
9378 | for ac_lib in '' dl xpdl; do |
9379 | if test -z "$ac_lib"; then | |
9380 | ac_res="none required" | |
9381 | else | |
9382 | ac_res=-l$ac_lib | |
b4e70030 | 9383 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9384 | fi |
9385 | if ac_fn_c_try_link "$LINENO"; then : | |
9386 | ac_cv_search_dlgetmodinfo=$ac_res | |
9387 | fi | |
9388 | rm -f core conftest.err conftest.$ac_objext \ | |
9389 | conftest$ac_exeext | |
9390 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9391 | break | |
9392 | fi | |
9393 | done | |
9394 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 9395 | |
4e8d927d | 9396 | else |
81ecdfbb | 9397 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 9398 | fi |
81ecdfbb | 9399 | rm conftest.$ac_ext |
bec39cab AC |
9400 | LIBS=$ac_func_search_save_LIBS |
9401 | fi | |
81ecdfbb RW |
9402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
9403 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
9404 | ac_res=$ac_cv_search_dlgetmodinfo | |
9405 | if test "$ac_res" != no; then : | |
9406 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 9407 | |
8bb2c122 | 9408 | fi |
8bb2c122 | 9409 | |
8bb2c122 | 9410 | |
77f120bf | 9411 | |
77f120bf | 9412 | |
6c7a06a3 | 9413 | |
81ecdfbb RW |
9414 | # Check whether --with-libiconv-prefix was given. |
9415 | if test "${with_libiconv_prefix+set}" = set; then : | |
9416 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 9417 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
9418 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
9419 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
9420 | done |
9421 | ||
81ecdfbb RW |
9422 | fi |
9423 | ||
6c7a06a3 | 9424 | |
f18c4681 | 9425 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
9426 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
9427 | ||
81ecdfbb RW |
9428 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
9429 | $as_echo_n "checking for iconv... " >&6; } | |
9430 | if test "${am_cv_func_iconv+set}" = set; then : | |
9431 | $as_echo_n "(cached) " >&6 | |
d542061a | 9432 | else |
6c7a06a3 TT |
9433 | |
9434 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
9435 | am_cv_lib_iconv=no | |
9436 | am_cv_use_build_libiconv=no | |
f0f20949 | 9437 | am_cv_build_libiconv_path= |
4edb1e84 JB |
9438 | |
9439 | # If libiconv is part of the build tree, then try using it over | |
9440 | # any system iconv. | |
9441 | if test -d ../libiconv; then | |
f18c4681 JB |
9442 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
9443 | am_save_LIBS="$LIBS" | |
9444 | am_save_CPPFLAGS="$CPPFLAGS" | |
9445 | LIBS="$LIBS $lib_dir/libiconv.a" | |
9446 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
9447 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 9448 | /* end confdefs.h. */ |
6c7a06a3 TT |
9449 | #include <stdlib.h> |
9450 | #include <iconv.h> | |
d542061a UW |
9451 | int |
9452 | main () | |
9453 | { | |
6c7a06a3 | 9454 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
9455 | iconv(cd,NULL,NULL,NULL,NULL); |
9456 | iconv_close(cd); | |
d542061a UW |
9457 | ; |
9458 | return 0; | |
9459 | } | |
9460 | _ACEOF | |
81ecdfbb | 9461 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9462 | am_cv_use_build_libiconv=yes |
f0f20949 | 9463 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
9464 | am_cv_lib_iconv=yes |
9465 | am_cv_func_iconv=yes | |
d542061a | 9466 | fi |
81ecdfbb RW |
9467 | rm -f core conftest.err conftest.$ac_objext \ |
9468 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
9469 | LIBS="$am_save_LIBS" |
9470 | CPPFLAGS="$am_save_CPPFLAGS" | |
9471 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
9472 | break |
9473 | fi | |
9474 | done | |
4edb1e84 | 9475 | fi |
94ae1714 | 9476 | |
4edb1e84 | 9477 | # Next, try to find iconv in libc. |
6c7a06a3 | 9478 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 9479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 9480 | /* end confdefs.h. */ |
6c7a06a3 TT |
9481 | #include <stdlib.h> |
9482 | #include <iconv.h> | |
d542061a UW |
9483 | int |
9484 | main () | |
9485 | { | |
6c7a06a3 TT |
9486 | iconv_t cd = iconv_open("",""); |
9487 | iconv(cd,NULL,NULL,NULL,NULL); | |
9488 | iconv_close(cd); | |
d542061a UW |
9489 | ; |
9490 | return 0; | |
9491 | } | |
9492 | _ACEOF | |
81ecdfbb | 9493 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9494 | am_cv_func_iconv=yes |
d542061a | 9495 | fi |
81ecdfbb RW |
9496 | rm -f core conftest.err conftest.$ac_objext \ |
9497 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 9498 | fi |
94ae1714 | 9499 | |
4edb1e84 JB |
9500 | # If iconv was not in libc, try -liconv. In this case, arrange to |
9501 | # look in the libiconv prefix, if it was specified by the user. | |
9502 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 9503 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
9504 | am_save_LIBS="$LIBS" |
9505 | if test -n "$LIBICONV_INCLUDE"; then | |
9506 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9507 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
9508 | fi | |
9509 | LIBS="$LIBS -liconv" | |
81ecdfbb | 9510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9511 | /* end confdefs.h. */ |
6c7a06a3 TT |
9512 | #include <stdlib.h> |
9513 | #include <iconv.h> | |
bec39cab AC |
9514 | int |
9515 | main () | |
9516 | { | |
6c7a06a3 TT |
9517 | iconv_t cd = iconv_open("",""); |
9518 | iconv(cd,NULL,NULL,NULL,NULL); | |
9519 | iconv_close(cd); | |
bec39cab AC |
9520 | ; |
9521 | return 0; | |
9522 | } | |
9523 | _ACEOF | |
81ecdfbb | 9524 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9525 | am_cv_lib_iconv=yes |
6c7a06a3 | 9526 | am_cv_func_iconv=yes |
627af7ea | 9527 | fi |
81ecdfbb RW |
9528 | rm -f core conftest.err conftest.$ac_objext \ |
9529 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 9530 | LIBS="$am_save_LIBS" |
fc3b640d | 9531 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
9532 | fi |
9533 | ||
9534 | fi | |
81ecdfbb RW |
9535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
9536 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
9537 | |
9538 | # Set the various flags based on the cache variables. We can't rely | |
9539 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
9540 | LIBICONV= |
9541 | if test "$am_cv_lib_iconv" = yes; then | |
9542 | LIBICONV="-liconv" | |
94ae1714 TT |
9543 | else |
9544 | LIBICONV_LIBDIR= | |
9545 | LIBICONV_INCLUDE= | |
fc3b640d TT |
9546 | fi |
9547 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 9548 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 9549 | LIBICONV_LIBDIR="" |
fc3b640d TT |
9550 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
9551 | fi | |
9552 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9553 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 9554 | |
6c7a06a3 TT |
9555 | if test "$am_cv_func_iconv" = yes; then |
9556 | ||
81ecdfbb | 9557 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 9558 | |
81ecdfbb RW |
9559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
9560 | $as_echo_n "checking for iconv declaration... " >&6; } | |
9561 | if test "${am_cv_proto_iconv+set}" = set; then : | |
9562 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9563 | else |
9564 | ||
81ecdfbb | 9565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9566 | /* end confdefs.h. */ |
9567 | ||
6c7a06a3 TT |
9568 | #include <stdlib.h> |
9569 | #include <iconv.h> | |
9570 | extern | |
b4e70030 | 9571 | #ifdef __cplusplus |
6c7a06a3 | 9572 | "C" |
b4e70030 | 9573 | #endif |
6c7a06a3 TT |
9574 | #if defined(__STDC__) || defined(__cplusplus) |
9575 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
9576 | #else | |
9577 | size_t iconv(); | |
9578 | #endif | |
9579 | ||
b4e70030 JB |
9580 | int |
9581 | main () | |
9582 | { | |
6c7a06a3 | 9583 | |
b4e70030 JB |
9584 | ; |
9585 | return 0; | |
9586 | } | |
9587 | _ACEOF | |
81ecdfbb | 9588 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 9589 | am_cv_proto_iconv_arg1="" |
4e8d927d | 9590 | else |
81ecdfbb | 9591 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 9592 | fi |
81ecdfbb | 9593 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
9594 | 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);" |
9595 | fi | |
9596 | ||
9597 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 9598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 9599 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
9600 | $as_echo "${ac_t:- |
9601 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
9602 | |
9603 | cat >>confdefs.h <<_ACEOF | |
9604 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
9605 | _ACEOF | |
9606 | ||
9607 | fi | |
6c7a06a3 TT |
9608 | |
9609 | ||
478aac75 DE |
9610 | # GDB may fork/exec the iconv program to get the list of supported character |
9611 | # sets. Allow the user to specify where to find it. | |
9612 | # There are several factors affecting the choice of option name: | |
9613 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
9614 | # the build-time location of libiconv files. | |
9615 | # - The program we need to find is iconv, which comes with glibc. The user | |
9616 | # doesn't necessarily have libiconv installed. Therefore naming this | |
9617 | # --with-libiconv-foo feels wrong. | |
9618 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
9619 | # defined to work on directories not files (though it really doesn't know | |
9620 | # the difference). | |
9621 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
9622 | # with --with-libiconv-prefix. | |
9623 | # Putting these together is why the option name is --with-iconv-bin. | |
9624 | ||
9625 | ||
9626 | # Check whether --with-iconv-bin was given. | |
9627 | if test "${with_iconv_bin+set}" = set; then : | |
9628 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
9629 | ||
9630 | cat >>confdefs.h <<_ACEOF | |
9631 | #define ICONV_BIN "${iconv_bin}" | |
9632 | _ACEOF | |
9633 | ||
9634 | ||
9635 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9636 | if test "x$prefix" = xNONE; then | |
9637 | test_prefix=/usr/local | |
9638 | else | |
9639 | test_prefix=$prefix | |
9640 | fi | |
9641 | else | |
9642 | test_prefix=$exec_prefix | |
9643 | fi | |
9644 | value=0 | |
9645 | case ${iconv_bin} in | |
9646 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9647 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9648 | value=1 | |
9649 | ;; | |
9650 | esac | |
9651 | ||
9652 | cat >>confdefs.h <<_ACEOF | |
9653 | #define ICONV_BIN_RELOCATABLE $value | |
9654 | _ACEOF | |
9655 | ||
9656 | ||
9657 | ||
9658 | fi | |
9659 | ||
9660 | ||
6c7a06a3 TT |
9661 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
9662 | # There is a very specific comment in /usr/include/curses.h explaining that | |
9663 | # termcap routines built into libcurses must not be used. | |
9664 | # | |
9665 | # The symptoms we observed so far is GDB unexpectedly changing | |
9666 | # the terminal settings when tgetent is called - this is particularly | |
9667 | # visible as the output is missing carriage returns, and so rapidly | |
9668 | # becomes very hard to read. | |
9669 | # | |
9670 | # The readline configure script has already decided that libtermcap | |
9671 | # was enough for its purposes, and so decided to build readline using | |
9672 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
9673 | # TUI enabled results in both libraries to be used at the same time, | |
9674 | # which is not allowed. This basically means that GDB with TUI is | |
9675 | # broken on alpha-osf. | |
9676 | ||
9677 | case $host_os in | |
6bcc772d RO |
9678 | osf* ) |
9679 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9680 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 9681 | fi |
6bcc772d | 9682 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
9683 | enable_tui=no |
9684 | fi | |
9685 | ;; | |
9686 | esac | |
9687 | ||
cb01cfba | 9688 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9689 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9690 | prefer_curses=yes |
9691 | fi | |
9692 | ||
9693 | curses_found=no | |
9694 | if test x"$prefer_curses" = xyes; then | |
9695 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9696 | # curses library because the latter might not provide all the | |
9697 | # functionality we need. However, this leads to problems on systems | |
9698 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9699 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9700 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9701 | # a situation. | |
81ecdfbb RW |
9702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9703 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
9704 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9705 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9706 | else |
9707 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9709 | /* end confdefs.h. */ |
9710 | ||
81ecdfbb RW |
9711 | /* Override any GCC internal prototype to avoid an error. |
9712 | Use char because int might match the return type of a GCC | |
9713 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9714 | #ifdef __cplusplus |
9715 | extern "C" | |
9716 | #endif | |
6c7a06a3 TT |
9717 | char waddstr (); |
9718 | int | |
9719 | main () | |
9720 | { | |
81ecdfbb | 9721 | return waddstr (); |
6c7a06a3 TT |
9722 | ; |
9723 | return 0; | |
9724 | } | |
9725 | _ACEOF | |
81ecdfbb RW |
9726 | for ac_lib in '' ncurses cursesX curses; do |
9727 | if test -z "$ac_lib"; then | |
9728 | ac_res="none required" | |
9729 | else | |
9730 | ac_res=-l$ac_lib | |
9731 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9732 | fi | |
9733 | if ac_fn_c_try_link "$LINENO"; then : | |
9734 | ac_cv_search_waddstr=$ac_res | |
9735 | fi | |
9736 | rm -f core conftest.err conftest.$ac_objext \ | |
9737 | conftest$ac_exeext | |
9738 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9739 | break | |
9740 | fi | |
9741 | done | |
9742 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9743 | ||
6c7a06a3 | 9744 | else |
81ecdfbb RW |
9745 | ac_cv_search_waddstr=no |
9746 | fi | |
9747 | rm conftest.$ac_ext | |
9748 | LIBS=$ac_func_search_save_LIBS | |
9749 | fi | |
9750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9751 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9752 | ac_res=$ac_cv_search_waddstr | |
9753 | if test "$ac_res" != no; then : | |
9754 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9755 | |
9756 | fi | |
9757 | ||
9758 | ||
cb01cfba JB |
9759 | if test "$ac_cv_search_waddstr" != no; then |
9760 | curses_found=yes | |
9761 | fi | |
9762 | fi | |
9763 | ||
9764 | # Check whether we should enable the TUI, but only do so if we really | |
9765 | # can. | |
9766 | if test x"$enable_tui" != xno; then | |
9767 | if test -d $srcdir/tui; then | |
9768 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
9769 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9770 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9771 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9772 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
9773 | CONFIG_ALL="${CONFIG_ALL} all-tui" | |
9774 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
9775 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
9776 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
9777 | else | |
9778 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9779 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9780 | else |
81ecdfbb RW |
9781 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9782 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9783 | fi |
9784 | fi | |
9785 | fi | |
9786 | fi | |
9787 | ||
9788 | # Since GDB uses Readline, we need termcap functionality. In many | |
9789 | # cases this will be provided by the curses library, but some systems | |
9790 | # have a seperate termcap library, or no curses library at all. | |
9791 | ||
9792 | case $host_os in | |
9793 | cygwin*) | |
9794 | if test -d $srcdir/libtermcap; then | |
9795 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
9796 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9797 | fi ;; | |
9798 | go32* | *djgpp*) | |
9799 | ac_cv_search_tgetent="none required" | |
9800 | ;; | |
9801 | *mingw32*) | |
9802 | ac_cv_search_tgetent="none required" | |
9803 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
9804 | ;; | |
9805 | esac | |
9806 | ||
9807 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9809 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
9810 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9811 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9812 | else |
9813 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9815 | /* end confdefs.h. */ |
9816 | ||
81ecdfbb RW |
9817 | /* Override any GCC internal prototype to avoid an error. |
9818 | Use char because int might match the return type of a GCC | |
9819 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9820 | #ifdef __cplusplus |
9821 | extern "C" | |
9822 | #endif | |
6c7a06a3 TT |
9823 | char tgetent (); |
9824 | int | |
9825 | main () | |
9826 | { | |
81ecdfbb | 9827 | return tgetent (); |
6c7a06a3 TT |
9828 | ; |
9829 | return 0; | |
9830 | } | |
9831 | _ACEOF | |
81ecdfbb RW |
9832 | for ac_lib in '' termcap tinfo curses ncurses; do |
9833 | if test -z "$ac_lib"; then | |
9834 | ac_res="none required" | |
9835 | else | |
9836 | ac_res=-l$ac_lib | |
6c7a06a3 | 9837 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9838 | fi |
9839 | if ac_fn_c_try_link "$LINENO"; then : | |
9840 | ac_cv_search_tgetent=$ac_res | |
9841 | fi | |
9842 | rm -f core conftest.err conftest.$ac_objext \ | |
9843 | conftest$ac_exeext | |
9844 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9845 | break | |
9846 | fi | |
9847 | done | |
9848 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 9849 | |
6c7a06a3 | 9850 | else |
81ecdfbb | 9851 | ac_cv_search_tgetent=no |
6c7a06a3 | 9852 | fi |
81ecdfbb | 9853 | rm conftest.$ac_ext |
6c7a06a3 TT |
9854 | LIBS=$ac_func_search_save_LIBS |
9855 | fi | |
81ecdfbb RW |
9856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9857 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9858 | ac_res=$ac_cv_search_tgetent | |
9859 | if test "$ac_res" != no; then : | |
9860 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9861 | |
06825bd1 MK |
9862 | fi |
9863 | ||
06825bd1 | 9864 | |
bec39cab | 9865 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 9866 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
9867 | fi |
9868 | ||
3841debe | 9869 | |
81ecdfbb RW |
9870 | # Check whether --with-system-readline was given. |
9871 | if test "${with_system_readline+set}" = set; then : | |
9872 | withval=$with_system_readline; | |
9873 | fi | |
6a30b0a5 | 9874 | |
6a30b0a5 AS |
9875 | |
9876 | if test "$with_system_readline" = yes; then | |
9877 | READLINE=-lreadline | |
9878 | READLINE_DEPS= | |
9879 | READLINE_CFLAGS= | |
39037522 | 9880 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9881 | else |
9882 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9883 | READLINE_DEPS='$(READLINE)' | |
9884 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9885 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9886 | fi |
9887 | ||
9888 | ||
9889 | ||
9890 | ||
9891 | ||
f997c383 SD |
9892 | # Generate jit-reader.h |
9893 | ||
9894 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9895 | TARGET_PTR= | |
9896 | ||
9897 | # The cast to long int works around a bug in the HP C Compiler | |
9898 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9899 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9900 | # This bug is HP SR number 8606223364. | |
9901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9902 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
9903 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
9904 | $as_echo_n "(cached) " >&6 | |
9905 | else | |
9906 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9907 | ||
9908 | else | |
9909 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9910 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9911 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9912 | { as_fn_set_status 77 | |
9913 | as_fn_error "cannot compute sizeof (unsigned long long) | |
9914 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9915 | else | |
9916 | ac_cv_sizeof_unsigned_long_long=0 | |
9917 | fi | |
9918 | fi | |
9919 | ||
9920 | fi | |
9921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9922 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9923 | ||
9924 | ||
9925 | ||
9926 | cat >>confdefs.h <<_ACEOF | |
9927 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9928 | _ACEOF | |
9929 | ||
9930 | ||
9931 | # The cast to long int works around a bug in the HP C Compiler | |
9932 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9933 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9934 | # This bug is HP SR number 8606223364. | |
9935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9936 | $as_echo_n "checking size of unsigned long... " >&6; } | |
9937 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
9938 | $as_echo_n "(cached) " >&6 | |
9939 | else | |
9940 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9941 | ||
9942 | else | |
9943 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9944 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9945 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9946 | { as_fn_set_status 77 | |
9947 | as_fn_error "cannot compute sizeof (unsigned long) | |
9948 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9949 | else | |
9950 | ac_cv_sizeof_unsigned_long=0 | |
9951 | fi | |
9952 | fi | |
9953 | ||
9954 | fi | |
9955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9956 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9957 | ||
9958 | ||
9959 | ||
9960 | cat >>confdefs.h <<_ACEOF | |
9961 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9962 | _ACEOF | |
9963 | ||
9964 | ||
9965 | # The cast to long int works around a bug in the HP C Compiler | |
9966 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9967 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9968 | # This bug is HP SR number 8606223364. | |
9969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9970 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
9971 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
9972 | $as_echo_n "(cached) " >&6 | |
9973 | else | |
9974 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9975 | ||
9976 | else | |
9977 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9978 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9979 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9980 | { as_fn_set_status 77 | |
9981 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
9982 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9983 | else | |
9984 | ac_cv_sizeof_unsigned___int128=0 | |
9985 | fi | |
9986 | fi | |
9987 | ||
9988 | fi | |
9989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9990 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9991 | ||
9992 | ||
9993 | ||
9994 | cat >>confdefs.h <<_ACEOF | |
9995 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9996 | _ACEOF | |
9997 | ||
9998 | ||
9999 | ||
10000 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
10001 | TARGET_PTR="unsigned long" | |
10002 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
10003 | TARGET_PTR="unsigned long long" | |
10004 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
10005 | TARGET_PTR="unsigned __int128" | |
10006 | else | |
10007 | TARGET_PTR="unsigned long" | |
10008 | fi | |
10009 | ||
10010 | ||
10011 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
10012 | ||
10013 | ||
a2d08b9e SD |
10014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
10015 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
10016 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
10017 | $as_echo_n "(cached) " >&6 | |
10018 | else | |
10019 | ac_func_search_save_LIBS=$LIBS | |
10020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10021 | /* end confdefs.h. */ | |
10022 | ||
10023 | /* Override any GCC internal prototype to avoid an error. | |
10024 | Use char because int might match the return type of a GCC | |
10025 | builtin and then its argument prototype would still apply. */ | |
10026 | #ifdef __cplusplus | |
10027 | extern "C" | |
10028 | #endif | |
10029 | char dlopen (); | |
10030 | int | |
10031 | main () | |
10032 | { | |
10033 | return dlopen (); | |
10034 | ; | |
10035 | return 0; | |
10036 | } | |
10037 | _ACEOF | |
10038 | for ac_lib in '' dl; do | |
10039 | if test -z "$ac_lib"; then | |
10040 | ac_res="none required" | |
10041 | else | |
10042 | ac_res=-l$ac_lib | |
10043 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
10044 | fi | |
10045 | if ac_fn_c_try_link "$LINENO"; then : | |
10046 | ac_cv_search_dlopen=$ac_res | |
10047 | fi | |
10048 | rm -f core conftest.err conftest.$ac_objext \ | |
10049 | conftest$ac_exeext | |
10050 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
10051 | break | |
10052 | fi | |
10053 | done | |
10054 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
10055 | ||
10056 | else | |
10057 | ac_cv_search_dlopen=no | |
10058 | fi | |
10059 | rm conftest.$ac_ext | |
10060 | LIBS=$ac_func_search_save_LIBS | |
10061 | fi | |
10062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
10063 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
10064 | ac_res=$ac_cv_search_dlopen | |
10065 | if test "$ac_res" != no; then : | |
10066 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
10067 | ||
10068 | fi | |
10069 | ||
10070 | ||
39037522 | 10071 | |
b8e0a31c SD |
10072 | |
10073 | # Check whether --with-jit-reader-dir was given. | |
10074 | if test "${with_jit_reader_dir+set}" = set; then : | |
10075 | withval=$with_jit_reader_dir; | |
10076 | JIT_READER_DIR=$withval | |
10077 | else | |
10078 | JIT_READER_DIR=${libdir}/gdb | |
10079 | fi | |
10080 | ||
10081 | ||
10082 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
10083 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10084 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
10085 | ac_define_dir=`eval echo $ac_define_dir` | |
10086 | ||
10087 | cat >>confdefs.h <<_ACEOF | |
10088 | #define JIT_READER_DIR "$ac_define_dir" | |
10089 | _ACEOF | |
10090 | ||
10091 | ||
10092 | ||
10093 | ||
10094 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10095 | if test "x$prefix" = xNONE; then | |
10096 | test_prefix=/usr/local | |
10097 | else | |
10098 | test_prefix=$prefix | |
10099 | fi | |
10100 | else | |
10101 | test_prefix=$exec_prefix | |
10102 | fi | |
10103 | value=0 | |
10104 | case ${ac_define_dir} in | |
10105 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10106 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10107 | value=1 | |
10108 | ;; | |
10109 | esac | |
10110 | ||
10111 | cat >>confdefs.h <<_ACEOF | |
10112 | #define JIT_READER_DIR_RELOCATABLE $value | |
10113 | _ACEOF | |
10114 | ||
10115 | ||
10116 | ||
10117 | ||
10118 | ||
81ecdfbb RW |
10119 | # Check whether --with-expat was given. |
10120 | if test "${with_expat+set}" = set; then : | |
10121 | withval=$with_expat; | |
5c39566f DJ |
10122 | else |
10123 | with_expat=auto | |
81ecdfbb RW |
10124 | fi |
10125 | ||
10126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
10127 | $as_echo_n "checking whether to use expat... " >&6; } | |
10128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
10129 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
10130 | |
10131 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
10132 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
10133 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
10134 | HAVE_LIBEXPAT=no |
10135 | else | |
10136 | ||
3841debe DJ |
10137 | if test "X$prefix" = "XNONE"; then |
10138 | acl_final_prefix="$ac_default_prefix" | |
10139 | else | |
10140 | acl_final_prefix="$prefix" | |
10141 | fi | |
10142 | if test "X$exec_prefix" = "XNONE"; then | |
10143 | acl_final_exec_prefix='${prefix}' | |
10144 | else | |
10145 | acl_final_exec_prefix="$exec_prefix" | |
10146 | fi | |
10147 | acl_save_prefix="$prefix" | |
10148 | prefix="$acl_final_prefix" | |
10149 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10150 | prefix="$acl_save_prefix" | |
10151 | ||
10152 | ||
81ecdfbb RW |
10153 | # Check whether --with-gnu-ld was given. |
10154 | if test "${with_gnu_ld+set}" = set; then : | |
10155 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
10156 | else |
10157 | with_gnu_ld=no | |
81ecdfbb RW |
10158 | fi |
10159 | ||
3841debe DJ |
10160 | # Prepare PATH_SEPARATOR. |
10161 | # The user is always right. | |
10162 | if test "${PATH_SEPARATOR+set}" != set; then | |
10163 | echo "#! /bin/sh" >conf$$.sh | |
10164 | echo "exit 0" >>conf$$.sh | |
10165 | chmod +x conf$$.sh | |
10166 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10167 | PATH_SEPARATOR=';' | |
10168 | else | |
10169 | PATH_SEPARATOR=: | |
10170 | fi | |
10171 | rm -f conf$$.sh | |
10172 | fi | |
10173 | ac_prog=ld | |
10174 | if test "$GCC" = yes; then | |
10175 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
10176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
10177 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
10178 | case $host in |
10179 | *-*-mingw*) | |
10180 | # gcc leaves a trailing carriage return which upsets mingw | |
10181 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10182 | *) | |
10183 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10184 | esac | |
10185 | case $ac_prog in | |
10186 | # Accept absolute paths. | |
10187 | [\\/]* | [A-Za-z]:[\\/]*) | |
10188 | re_direlt='/[^/][^/]*/\.\./' | |
10189 | # Canonicalize the path of ld | |
10190 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10191 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10192 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10193 | done | |
10194 | test -z "$LD" && LD="$ac_prog" | |
10195 | ;; | |
10196 | "") | |
10197 | # If it fails, then pretend we aren't using GCC. | |
10198 | ac_prog=ld | |
10199 | ;; | |
10200 | *) | |
10201 | # If it is relative, then search for the first ld in PATH. | |
10202 | with_gnu_ld=unknown | |
10203 | ;; | |
10204 | esac | |
10205 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
10206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
10207 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 10208 | else |
81ecdfbb RW |
10209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
10210 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 10211 | fi |
81ecdfbb RW |
10212 | if test "${acl_cv_path_LD+set}" = set; then : |
10213 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
10214 | else |
10215 | if test -z "$LD"; then | |
10216 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10217 | for ac_dir in $PATH; do | |
10218 | test -z "$ac_dir" && ac_dir=. | |
10219 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10220 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10221 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10222 | # but apparently some GNU ld's only accept -v. | |
10223 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
10224 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
10225 | test "$with_gnu_ld" != no && break | |
10226 | else | |
10227 | test "$with_gnu_ld" != yes && break | |
10228 | fi | |
10229 | fi | |
10230 | done | |
10231 | IFS="$ac_save_ifs" | |
10232 | else | |
10233 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10234 | fi | |
10235 | fi | |
10236 | ||
10237 | LD="$acl_cv_path_LD" | |
10238 | if test -n "$LD"; then | |
81ecdfbb RW |
10239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
10240 | $as_echo "$LD" >&6; } | |
3841debe | 10241 | else |
81ecdfbb RW |
10242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10243 | $as_echo "no" >&6; } | |
3841debe | 10244 | fi |
81ecdfbb RW |
10245 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
10246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
10247 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
10248 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
10249 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
10250 | else |
10251 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
10252 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
10253 | acl_cv_prog_gnu_ld=yes | |
10254 | else | |
10255 | acl_cv_prog_gnu_ld=no | |
10256 | fi | |
10257 | fi | |
81ecdfbb RW |
10258 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
10259 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
10260 | with_gnu_ld=$acl_cv_prog_gnu_ld |
10261 | ||
10262 | ||
10263 | ||
81ecdfbb RW |
10264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
10265 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
10266 | if test "${acl_cv_rpath+set}" = set; then : | |
10267 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
10268 | else |
10269 | ||
10270 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10271 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10272 | . ./conftest.sh | |
10273 | rm -f ./conftest.sh | |
10274 | acl_cv_rpath=done | |
10275 | ||
10276 | fi | |
81ecdfbb RW |
10277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
10278 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
10279 | wl="$acl_cv_wl" |
10280 | libext="$acl_cv_libext" | |
10281 | shlibext="$acl_cv_shlibext" | |
10282 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10283 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10284 | hardcode_direct="$acl_cv_hardcode_direct" | |
10285 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
10286 | # Check whether --enable-rpath was given. |
10287 | if test "${enable_rpath+set}" = set; then : | |
10288 | enableval=$enable_rpath; : | |
3841debe DJ |
10289 | else |
10290 | enable_rpath=yes | |
81ecdfbb RW |
10291 | fi |
10292 | ||
3841debe DJ |
10293 | |
10294 | ||
10295 | ||
10296 | ||
10297 | ||
10298 | ||
10299 | ||
10300 | ||
10301 | ||
10302 | use_additional=yes | |
10303 | ||
10304 | acl_save_prefix="$prefix" | |
10305 | prefix="$acl_final_prefix" | |
10306 | acl_save_exec_prefix="$exec_prefix" | |
10307 | exec_prefix="$acl_final_exec_prefix" | |
10308 | ||
10309 | eval additional_includedir=\"$includedir\" | |
10310 | eval additional_libdir=\"$libdir\" | |
10311 | ||
10312 | exec_prefix="$acl_save_exec_prefix" | |
10313 | prefix="$acl_save_prefix" | |
10314 | ||
10315 | ||
81ecdfbb RW |
10316 | # Check whether --with-libexpat-prefix was given. |
10317 | if test "${with_libexpat_prefix+set}" = set; then : | |
10318 | withval=$with_libexpat_prefix; | |
3841debe DJ |
10319 | if test "X$withval" = "Xno"; then |
10320 | use_additional=no | |
10321 | else | |
10322 | if test "X$withval" = "X"; then | |
10323 | ||
10324 | acl_save_prefix="$prefix" | |
10325 | prefix="$acl_final_prefix" | |
10326 | acl_save_exec_prefix="$exec_prefix" | |
10327 | exec_prefix="$acl_final_exec_prefix" | |
10328 | ||
10329 | eval additional_includedir=\"$includedir\" | |
10330 | eval additional_libdir=\"$libdir\" | |
10331 | ||
10332 | exec_prefix="$acl_save_exec_prefix" | |
10333 | prefix="$acl_save_prefix" | |
10334 | ||
10335 | else | |
10336 | additional_includedir="$withval/include" | |
10337 | additional_libdir="$withval/lib" | |
10338 | fi | |
10339 | fi | |
10340 | ||
81ecdfbb RW |
10341 | fi |
10342 | ||
3841debe DJ |
10343 | LIBEXPAT= |
10344 | LTLIBEXPAT= | |
10345 | INCEXPAT= | |
10346 | rpathdirs= | |
10347 | ltrpathdirs= | |
10348 | names_already_handled= | |
10349 | names_next_round='expat ' | |
10350 | while test -n "$names_next_round"; do | |
10351 | names_this_round="$names_next_round" | |
10352 | names_next_round= | |
10353 | for name in $names_this_round; do | |
10354 | already_handled= | |
10355 | for n in $names_already_handled; do | |
10356 | if test "$n" = "$name"; then | |
10357 | already_handled=yes | |
10358 | break | |
10359 | fi | |
10360 | done | |
10361 | if test -z "$already_handled"; then | |
10362 | names_already_handled="$names_already_handled $name" | |
10363 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10364 | eval value=\"\$HAVE_LIB$uppername\" | |
10365 | if test -n "$value"; then | |
10366 | if test "$value" = yes; then | |
10367 | eval value=\"\$LIB$uppername\" | |
10368 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
10369 | eval value=\"\$LTLIB$uppername\" | |
10370 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
10371 | else | |
10372 | : | |
10373 | fi | |
10374 | else | |
10375 | found_dir= | |
10376 | found_la= | |
10377 | found_so= | |
10378 | found_a= | |
10379 | if test $use_additional = yes; then | |
10380 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10381 | found_dir="$additional_libdir" | |
10382 | found_so="$additional_libdir/lib$name.$shlibext" | |
10383 | if test -f "$additional_libdir/lib$name.la"; then | |
10384 | found_la="$additional_libdir/lib$name.la" | |
10385 | fi | |
10386 | else | |
10387 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10388 | found_dir="$additional_libdir" | |
10389 | found_a="$additional_libdir/lib$name.$libext" | |
10390 | if test -f "$additional_libdir/lib$name.la"; then | |
10391 | found_la="$additional_libdir/lib$name.la" | |
10392 | fi | |
10393 | fi | |
10394 | fi | |
10395 | fi | |
10396 | if test "X$found_dir" = "X"; then | |
10397 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10398 | ||
10399 | acl_save_prefix="$prefix" | |
10400 | prefix="$acl_final_prefix" | |
10401 | acl_save_exec_prefix="$exec_prefix" | |
10402 | exec_prefix="$acl_final_exec_prefix" | |
10403 | eval x=\"$x\" | |
10404 | exec_prefix="$acl_save_exec_prefix" | |
10405 | prefix="$acl_save_prefix" | |
10406 | ||
10407 | case "$x" in | |
10408 | -L*) | |
10409 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10410 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10411 | found_dir="$dir" | |
10412 | found_so="$dir/lib$name.$shlibext" | |
10413 | if test -f "$dir/lib$name.la"; then | |
10414 | found_la="$dir/lib$name.la" | |
10415 | fi | |
10416 | else | |
10417 | if test -f "$dir/lib$name.$libext"; then | |
10418 | found_dir="$dir" | |
10419 | found_a="$dir/lib$name.$libext" | |
10420 | if test -f "$dir/lib$name.la"; then | |
10421 | found_la="$dir/lib$name.la" | |
10422 | fi | |
10423 | fi | |
10424 | fi | |
10425 | ;; | |
10426 | esac | |
10427 | if test "X$found_dir" != "X"; then | |
10428 | break | |
10429 | fi | |
10430 | done | |
10431 | fi | |
10432 | if test "X$found_dir" != "X"; then | |
10433 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
10434 | if test "X$found_so" != "X"; then | |
10435 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10436 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10437 | else | |
10438 | haveit= | |
10439 | for x in $ltrpathdirs; do | |
10440 | if test "X$x" = "X$found_dir"; then | |
10441 | haveit=yes | |
10442 | break | |
10443 | fi | |
10444 | done | |
10445 | if test -z "$haveit"; then | |
10446 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10447 | fi | |
10448 | if test "$hardcode_direct" = yes; then | |
10449 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10450 | else | |
10451 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10452 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10453 | haveit= | |
10454 | for x in $rpathdirs; do | |
10455 | if test "X$x" = "X$found_dir"; then | |
10456 | haveit=yes | |
10457 | break | |
10458 | fi | |
10459 | done | |
10460 | if test -z "$haveit"; then | |
10461 | rpathdirs="$rpathdirs $found_dir" | |
10462 | fi | |
10463 | else | |
10464 | haveit= | |
10465 | for x in $LDFLAGS $LIBEXPAT; do | |
10466 | ||
10467 | acl_save_prefix="$prefix" | |
10468 | prefix="$acl_final_prefix" | |
10469 | acl_save_exec_prefix="$exec_prefix" | |
10470 | exec_prefix="$acl_final_exec_prefix" | |
10471 | eval x=\"$x\" | |
10472 | exec_prefix="$acl_save_exec_prefix" | |
10473 | prefix="$acl_save_prefix" | |
10474 | ||
10475 | if test "X$x" = "X-L$found_dir"; then | |
10476 | haveit=yes | |
10477 | break | |
10478 | fi | |
10479 | done | |
10480 | if test -z "$haveit"; then | |
10481 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
10482 | fi | |
10483 | if test "$hardcode_minus_L" != no; then | |
10484 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10485 | else | |
10486 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10487 | fi | |
10488 | fi | |
10489 | fi | |
10490 | fi | |
10491 | else | |
10492 | if test "X$found_a" != "X"; then | |
10493 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
10494 | else | |
10495 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
10496 | fi | |
10497 | fi | |
10498 | additional_includedir= | |
10499 | case "$found_dir" in | |
10500 | */lib | */lib/) | |
10501 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10502 | additional_includedir="$basedir/include" | |
10503 | ;; | |
10504 | esac | |
10505 | if test "X$additional_includedir" != "X"; then | |
10506 | if test "X$additional_includedir" != "X/usr/include"; then | |
10507 | haveit= | |
10508 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10509 | if test -n "$GCC"; then | |
10510 | case $host_os in | |
10511 | linux*) haveit=yes;; | |
10512 | esac | |
10513 | fi | |
10514 | fi | |
10515 | if test -z "$haveit"; then | |
10516 | for x in $CPPFLAGS $INCEXPAT; do | |
10517 | ||
10518 | acl_save_prefix="$prefix" | |
10519 | prefix="$acl_final_prefix" | |
10520 | acl_save_exec_prefix="$exec_prefix" | |
10521 | exec_prefix="$acl_final_exec_prefix" | |
10522 | eval x=\"$x\" | |
10523 | exec_prefix="$acl_save_exec_prefix" | |
10524 | prefix="$acl_save_prefix" | |
10525 | ||
10526 | if test "X$x" = "X-I$additional_includedir"; then | |
10527 | haveit=yes | |
10528 | break | |
10529 | fi | |
10530 | done | |
10531 | if test -z "$haveit"; then | |
10532 | if test -d "$additional_includedir"; then | |
10533 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
10534 | fi | |
10535 | fi | |
10536 | fi | |
10537 | fi | |
10538 | fi | |
10539 | if test -n "$found_la"; then | |
10540 | save_libdir="$libdir" | |
10541 | case "$found_la" in | |
10542 | */* | *\\*) . "$found_la" ;; | |
10543 | *) . "./$found_la" ;; | |
10544 | esac | |
10545 | libdir="$save_libdir" | |
10546 | for dep in $dependency_libs; do | |
10547 | case "$dep" in | |
10548 | -L*) | |
10549 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10550 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10551 | haveit= | |
10552 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10553 | if test -n "$GCC"; then | |
10554 | case $host_os in | |
10555 | linux*) haveit=yes;; | |
10556 | esac | |
10557 | fi | |
10558 | fi | |
10559 | if test -z "$haveit"; then | |
10560 | haveit= | |
10561 | for x in $LDFLAGS $LIBEXPAT; do | |
10562 | ||
10563 | acl_save_prefix="$prefix" | |
10564 | prefix="$acl_final_prefix" | |
10565 | acl_save_exec_prefix="$exec_prefix" | |
10566 | exec_prefix="$acl_final_exec_prefix" | |
10567 | eval x=\"$x\" | |
10568 | exec_prefix="$acl_save_exec_prefix" | |
10569 | prefix="$acl_save_prefix" | |
10570 | ||
10571 | if test "X$x" = "X-L$additional_libdir"; then | |
10572 | haveit=yes | |
10573 | break | |
10574 | fi | |
10575 | done | |
10576 | if test -z "$haveit"; then | |
10577 | if test -d "$additional_libdir"; then | |
10578 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
10579 | fi | |
10580 | fi | |
10581 | haveit= | |
10582 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10583 | ||
10584 | acl_save_prefix="$prefix" | |
10585 | prefix="$acl_final_prefix" | |
10586 | acl_save_exec_prefix="$exec_prefix" | |
10587 | exec_prefix="$acl_final_exec_prefix" | |
10588 | eval x=\"$x\" | |
10589 | exec_prefix="$acl_save_exec_prefix" | |
10590 | prefix="$acl_save_prefix" | |
10591 | ||
10592 | if test "X$x" = "X-L$additional_libdir"; then | |
10593 | haveit=yes | |
10594 | break | |
10595 | fi | |
10596 | done | |
10597 | if test -z "$haveit"; then | |
10598 | if test -d "$additional_libdir"; then | |
10599 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
10600 | fi | |
10601 | fi | |
10602 | fi | |
10603 | fi | |
10604 | ;; | |
10605 | -R*) | |
10606 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10607 | if test "$enable_rpath" != no; then | |
10608 | haveit= | |
10609 | for x in $rpathdirs; do | |
10610 | if test "X$x" = "X$dir"; then | |
10611 | haveit=yes | |
10612 | break | |
10613 | fi | |
10614 | done | |
10615 | if test -z "$haveit"; then | |
10616 | rpathdirs="$rpathdirs $dir" | |
10617 | fi | |
10618 | haveit= | |
10619 | for x in $ltrpathdirs; do | |
10620 | if test "X$x" = "X$dir"; then | |
10621 | haveit=yes | |
10622 | break | |
10623 | fi | |
10624 | done | |
10625 | if test -z "$haveit"; then | |
10626 | ltrpathdirs="$ltrpathdirs $dir" | |
10627 | fi | |
10628 | fi | |
10629 | ;; | |
10630 | -l*) | |
10631 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10632 | ;; | |
10633 | *.la) | |
10634 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10635 | ;; | |
10636 | *) | |
10637 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
10638 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
10639 | ;; | |
81ecdfbb RW |
10640 | esac |
10641 | done | |
10642 | fi | |
10643 | else | |
10644 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10645 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
10646 | fi | |
10647 | fi | |
10648 | fi | |
10649 | done | |
10650 | done | |
10651 | if test "X$rpathdirs" != "X"; then | |
10652 | if test -n "$hardcode_libdir_separator"; then | |
10653 | alldirs= | |
10654 | for found_dir in $rpathdirs; do | |
10655 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10656 | done | |
10657 | acl_save_libdir="$libdir" | |
10658 | libdir="$alldirs" | |
10659 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10660 | libdir="$acl_save_libdir" | |
10661 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10662 | else | |
10663 | for found_dir in $rpathdirs; do | |
10664 | acl_save_libdir="$libdir" | |
10665 | libdir="$found_dir" | |
10666 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10667 | libdir="$acl_save_libdir" | |
10668 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10669 | done | |
10670 | fi | |
10671 | fi | |
10672 | if test "X$ltrpathdirs" != "X"; then | |
10673 | for found_dir in $ltrpathdirs; do | |
10674 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
10675 | done | |
10676 | fi | |
a9322a30 TT |
10677 | |
10678 | ||
81ecdfbb | 10679 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 10680 | |
81ecdfbb RW |
10681 | for element in $INCEXPAT; do |
10682 | haveit= | |
10683 | for x in $CPPFLAGS; do | |
a9322a30 | 10684 | |
81ecdfbb RW |
10685 | acl_save_prefix="$prefix" |
10686 | prefix="$acl_final_prefix" | |
10687 | acl_save_exec_prefix="$exec_prefix" | |
10688 | exec_prefix="$acl_final_exec_prefix" | |
10689 | eval x=\"$x\" | |
10690 | exec_prefix="$acl_save_exec_prefix" | |
10691 | prefix="$acl_save_prefix" | |
a8111142 | 10692 | |
81ecdfbb RW |
10693 | if test "X$x" = "X$element"; then |
10694 | haveit=yes | |
10695 | break | |
10696 | fi | |
10697 | done | |
10698 | if test -z "$haveit"; then | |
10699 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10700 | fi | |
10701 | done | |
a9322a30 TT |
10702 | |
10703 | ||
81ecdfbb RW |
10704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
10705 | $as_echo_n "checking for libexpat... " >&6; } | |
10706 | if test "${ac_cv_libexpat+set}" = set; then : | |
10707 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10708 | else |
bec39cab | 10709 | |
81ecdfbb RW |
10710 | ac_save_LIBS="$LIBS" |
10711 | LIBS="$LIBS $LIBEXPAT" | |
10712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10713 | /* end confdefs.h. */ |
81ecdfbb RW |
10714 | #include "expat.h" |
10715 | int | |
10716 | main () | |
10717 | { | |
10718 | XML_Parser p = XML_ParserCreate (0); | |
10719 | ; | |
10720 | return 0; | |
10721 | } | |
bec39cab | 10722 | _ACEOF |
81ecdfbb RW |
10723 | if ac_fn_c_try_link "$LINENO"; then : |
10724 | ac_cv_libexpat=yes | |
c906108c | 10725 | else |
81ecdfbb | 10726 | ac_cv_libexpat=no |
bec39cab | 10727 | fi |
81ecdfbb RW |
10728 | rm -f core conftest.err conftest.$ac_objext \ |
10729 | conftest$ac_exeext conftest.$ac_ext | |
10730 | LIBS="$ac_save_LIBS" | |
c906108c | 10731 | |
95ca63c4 | 10732 | fi |
81ecdfbb RW |
10733 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
10734 | $as_echo "$ac_cv_libexpat" >&6; } | |
10735 | if test "$ac_cv_libexpat" = yes; then | |
10736 | HAVE_LIBEXPAT=yes | |
bec39cab | 10737 | |
81ecdfbb | 10738 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 10739 | |
81ecdfbb RW |
10740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
10741 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
10742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
10743 | $as_echo "$LIBEXPAT" >&6; } | |
10744 | else | |
10745 | HAVE_LIBEXPAT=no | |
10746 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10747 | LIBEXPAT= | |
10748 | LTLIBEXPAT= | |
10749 | fi | |
95ca63c4 CF |
10750 | |
10751 | ||
10752 | ||
7cb9022a MK |
10753 | |
10754 | ||
bec39cab | 10755 | |
81ecdfbb RW |
10756 | if test "$HAVE_LIBEXPAT" != yes; then |
10757 | if test "$with_expat" = yes; then | |
10758 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
10759 | else | |
10760 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
10761 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10762 | fi | |
10763 | else | |
10764 | save_LIBS=$LIBS | |
10765 | LIBS="$LIBS $LIBEXPAT" | |
10766 | for ac_func in XML_StopParser | |
10767 | do : | |
10768 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
10769 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 10770 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10771 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10772 | _ACEOF |
95ca63c4 | 10773 | |
bec39cab | 10774 | fi |
bec39cab | 10775 | done |
95ca63c4 | 10776 | |
81ecdfbb RW |
10777 | LIBS=$save_LIBS |
10778 | fi | |
a9322a30 TT |
10779 | fi |
10780 | ||
a9322a30 | 10781 | |
a9322a30 TT |
10782 | |
10783 | ||
ec685c5e | 10784 | |
0c4a4063 | 10785 | |
81ecdfbb RW |
10786 | # Check whether --with-python was given. |
10787 | if test "${with_python+set}" = set; then : | |
10788 | withval=$with_python; | |
bec39cab | 10789 | else |
81ecdfbb | 10790 | with_python=auto |
bec39cab | 10791 | fi |
bec39cab | 10792 | |
81ecdfbb RW |
10793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10794 | $as_echo_n "checking whether to use python... " >&6; } | |
10795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10796 | $as_echo "$with_python" >&6; } | |
9a156167 | 10797 | |
81ecdfbb RW |
10798 | if test "${with_python}" = no; then |
10799 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10800 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10801 | have_libpython=no | |
bec39cab | 10802 | else |
81ecdfbb | 10803 | case "${with_python}" in |
81ecdfbb | 10804 | /*) |
ec685c5e DE |
10805 | if test -d ${with_python}; then |
10806 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 10807 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10808 | python_prefix= |
9c4ea6c5 JB |
10809 | # If python does not exit ${with_python}/bin, then try in |
10810 | # ${with_python}. On Windows/MinGW, this is where the Python | |
10811 | # executable is. | |
10812 | if test ! -x "${python_prog}"; then | |
10813 | python_prog="${with_python}/python" | |
10814 | python_prefix= | |
10815 | fi | |
e7a30f46 | 10816 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
10817 | # Fall back to gdb 7.0/7.1 behaviour. |
10818 | python_prog=missing | |
0c4a4063 | 10819 | python_prefix=${with_python} |
ec685c5e | 10820 | fi |
e7a30f46 | 10821 | elif test -x "${with_python}"; then |
ec685c5e DE |
10822 | # While we can't run python compiled for $host (unless host == build), |
10823 | # the user could write a script that provides the needed information, | |
10824 | # so we support that. | |
ec685c5e | 10825 | python_prog=${with_python} |
0c4a4063 | 10826 | python_prefix= |
ec685c5e DE |
10827 | else |
10828 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
10829 | fi | |
81ecdfbb | 10830 | ;; |
ec685c5e DE |
10831 | */*) |
10832 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
10833 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
10834 | ;; | |
ec685c5e DE |
10835 | *) |
10836 | # The user has either specified auto, yes, or the name of the python | |
10837 | # program assumed to be in $PATH. | |
10838 | python_prefix= | |
10839 | case "${with_python}" in | |
10840 | yes | auto) | |
10841 | if test ${build} = ${host}; then | |
10842 | # Extract the first word of "python", so it can be a program name with args. | |
10843 | set dummy python; ac_word=$2 | |
10844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10845 | $as_echo_n "checking for $ac_word... " >&6; } | |
10846 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10847 | $as_echo_n "(cached) " >&6 | |
10848 | else | |
10849 | case $python_prog_path in | |
10850 | [\\/]* | ?:[\\/]*) | |
10851 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10852 | ;; | |
10853 | *) | |
10854 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10855 | for as_dir in $PATH | |
10856 | do | |
10857 | IFS=$as_save_IFS | |
10858 | test -z "$as_dir" && as_dir=. | |
10859 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10860 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10861 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10862 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10863 | break 2 | |
10864 | fi | |
10865 | done | |
10866 | done | |
10867 | IFS=$as_save_IFS | |
10868 | ||
10869 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10870 | ;; | |
10871 | esac | |
10872 | fi | |
10873 | python_prog_path=$ac_cv_path_python_prog_path | |
10874 | if test -n "$python_prog_path"; then | |
10875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10876 | $as_echo "$python_prog_path" >&6; } | |
10877 | else | |
10878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10879 | $as_echo "no" >&6; } | |
10880 | fi | |
10881 | ||
10882 | ||
10883 | if test "${python_prog_path}" = missing; then | |
10884 | python_prog=missing | |
10885 | else | |
10886 | python_prog=${python_prog_path} | |
10887 | fi | |
10888 | else | |
10889 | # Not much we can do except assume the cross-compiler will find the | |
10890 | # right files. | |
10891 | python_prog=missing | |
10892 | fi | |
10893 | ;; | |
10894 | *) | |
10895 | # While we can't run python compiled for $host (unless host == build), | |
10896 | # the user could write a script that provides the needed information, | |
10897 | # so we support that. | |
10898 | python_prog="${with_python}" | |
10899 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10900 | set dummy ${python_prog}; ac_word=$2 | |
10901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10902 | $as_echo_n "checking for $ac_word... " >&6; } | |
10903 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10904 | $as_echo_n "(cached) " >&6 | |
10905 | else | |
10906 | case $python_prog_path in | |
10907 | [\\/]* | ?:[\\/]*) | |
10908 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10909 | ;; | |
10910 | *) | |
10911 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10912 | for as_dir in $PATH | |
10913 | do | |
10914 | IFS=$as_save_IFS | |
10915 | test -z "$as_dir" && as_dir=. | |
10916 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10917 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10918 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10919 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10920 | break 2 | |
10921 | fi | |
10922 | done | |
10923 | done | |
10924 | IFS=$as_save_IFS | |
10925 | ||
10926 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10927 | ;; | |
10928 | esac | |
10929 | fi | |
10930 | python_prog_path=$ac_cv_path_python_prog_path | |
10931 | if test -n "$python_prog_path"; then | |
10932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10933 | $as_echo "$python_prog_path" >&6; } | |
10934 | else | |
10935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10936 | $as_echo "no" >&6; } | |
10937 | fi | |
10938 | ||
10939 | ||
10940 | if test "${python_prog_path}" = missing; then | |
10941 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
10942 | fi | |
10943 | ;; | |
10944 | esac | |
81ecdfbb RW |
10945 | esac |
10946 | ||
ec685c5e | 10947 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
10948 | # We have a python program to use, but it may be too old. |
10949 | # Don't flag an error for --with-python=auto (the default). | |
10950 | have_python_config=yes | |
ec685c5e DE |
10951 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
10952 | if test $? != 0; then | |
e7a30f46 DE |
10953 | have_python_config=failed |
10954 | if test "${with_python}" != auto; then | |
10955 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
10956 | fi | |
ec685c5e DE |
10957 | fi |
10958 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10959 | if test $? != 0; then | |
e7a30f46 DE |
10960 | have_python_config=failed |
10961 | if test "${with_python}" != auto; then | |
10962 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
10963 | fi | |
ec685c5e | 10964 | fi |
0c4a4063 DE |
10965 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10966 | if test $? != 0; then | |
e7a30f46 DE |
10967 | have_python_config=failed |
10968 | if test "${with_python}" != auto; then | |
10969 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
10970 | fi | |
0c4a4063 | 10971 | fi |
ec685c5e | 10972 | else |
ac534cba JB |
10973 | # We do not have a python executable we can use to determine where |
10974 | # to find the Python headers and libs. We cannot guess the include | |
10975 | # path from the python_prefix either, because that include path | |
10976 | # depends on the Python version. So, there is nothing much we can | |
10977 | # do except assume that the compiler will be able to find those files. | |
10978 | python_includes= | |
10979 | python_libs= | |
0c4a4063 | 10980 | have_python_config=no |
ec685c5e | 10981 | fi |
bec39cab | 10982 | |
ec685c5e DE |
10983 | # If we have python-config, only try the configuration it provides. |
10984 | # Otherwise fallback on the old way of trying different versions of | |
10985 | # python in turn. | |
81ecdfbb | 10986 | |
ec685c5e DE |
10987 | have_libpython=no |
10988 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
10989 | # Determine the Python version by extracting "-lpython<version>" |
10990 | # part of the python_libs. <version> is usually X.Y with X and Y | |
10991 | # being decimal numbers, but can also be XY (seen on Windows). | |
10992 | # | |
10993 | # The extraction is performed using sed with a regular expression. | |
10994 | # Initially, the regexp used was using the '?' quantifier to make | |
10995 | # the dot in the version number optional. Unfortunately, this | |
10996 | # does not work with non-GNU versions of sed because, because of | |
10997 | # what looks like a limitation (the '?' quantifier does not work | |
10998 | # with back-references). We work around this limitation by using | |
10999 | # the '*' quantifier instead. It means that, in theory, we might | |
11000 | # match unexpected version strings such as "-lpython2..7", but | |
11001 | # this seems unlikely in practice. And even if that happens, | |
11002 | # an error will be triggered later on, when checking that version | |
11003 | # number. | |
ec685c5e | 11004 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 11005 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
11006 | case "${python_version}" in |
11007 | python*) | |
ec685c5e DE |
11008 | |
11009 | version=${python_version} | |
11010 | ||
11011 | new_CPPFLAGS=${python_includes} | |
11012 | new_LIBS=${python_libs} | |
81ecdfbb RW |
11013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
11014 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 11015 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 11016 | save_LIBS=$LIBS |
ec685c5e DE |
11017 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
11018 | LIBS="$LIBS $new_LIBS" | |
11019 | found_usable_python=no | |
81ecdfbb | 11020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11021 | /* end confdefs.h. */ |
ac534cba | 11022 | #include "Python.h" |
81ecdfbb RW |
11023 | int |
11024 | main () | |
11025 | { | |
11026 | Py_Initialize (); | |
11027 | ; | |
11028 | return 0; | |
11029 | } | |
bec39cab | 11030 | _ACEOF |
81ecdfbb | 11031 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
11032 | have_libpython=${version} |
11033 | found_usable_python=yes | |
ac534cba JB |
11034 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11035 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 11036 | fi |
81ecdfbb RW |
11037 | rm -f core conftest.err conftest.$ac_objext \ |
11038 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11039 | CPPFLAGS=$save_CPPFLAGS |
11040 | LIBS=$save_LIBS | |
ec685c5e DE |
11041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11042 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 11043 | |
0c4a4063 DE |
11044 | ;; |
11045 | *) | |
ec685c5e | 11046 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
11047 | ;; |
11048 | esac | |
e7a30f46 | 11049 | elif test "${have_python_config}" != failed; then |
ec685c5e | 11050 | if test "${have_libpython}" = no; then |
9a156167 | 11051 | |
420697bb TT |
11052 | version=python2.7 |
11053 | ||
11054 | new_CPPFLAGS=${python_includes} | |
11055 | new_LIBS="${python_libs} -lpython2.7" | |
11056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
11057 | $as_echo_n "checking for ${version}... " >&6; } | |
11058 | save_CPPFLAGS=$CPPFLAGS | |
11059 | save_LIBS=$LIBS | |
11060 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11061 | LIBS="$LIBS $new_LIBS" | |
11062 | found_usable_python=no | |
11063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11064 | /* end confdefs.h. */ | |
ac534cba | 11065 | #include "Python.h" |
420697bb TT |
11066 | int |
11067 | main () | |
11068 | { | |
11069 | Py_Initialize (); | |
11070 | ; | |
11071 | return 0; | |
11072 | } | |
11073 | _ACEOF | |
11074 | if ac_fn_c_try_link "$LINENO"; then : | |
11075 | have_libpython=${version} | |
11076 | found_usable_python=yes | |
ac534cba JB |
11077 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11078 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
11079 | fi |
11080 | rm -f core conftest.err conftest.$ac_objext \ | |
11081 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11082 | CPPFLAGS=$save_CPPFLAGS |
11083 | LIBS=$save_LIBS | |
420697bb TT |
11084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11085 | $as_echo "${found_usable_python}" >&6; } | |
11086 | ||
11087 | fi | |
11088 | if test "${have_libpython}" = no; then | |
11089 | ||
ec685c5e DE |
11090 | version=python2.6 |
11091 | ||
11092 | new_CPPFLAGS=${python_includes} | |
11093 | new_LIBS="${python_libs} -lpython2.6" | |
11094 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
11095 | $as_echo_n "checking for ${version}... " >&6; } | |
11096 | save_CPPFLAGS=$CPPFLAGS | |
11097 | save_LIBS=$LIBS | |
11098 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11099 | LIBS="$LIBS $new_LIBS" | |
11100 | found_usable_python=no | |
11101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11102 | /* end confdefs.h. */ | |
ac534cba | 11103 | #include "Python.h" |
ec685c5e DE |
11104 | int |
11105 | main () | |
11106 | { | |
11107 | Py_Initialize (); | |
11108 | ; | |
11109 | return 0; | |
11110 | } | |
11111 | _ACEOF | |
11112 | if ac_fn_c_try_link "$LINENO"; then : | |
11113 | have_libpython=${version} | |
11114 | found_usable_python=yes | |
ac534cba JB |
11115 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11116 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
11117 | fi |
11118 | rm -f core conftest.err conftest.$ac_objext \ | |
11119 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11120 | CPPFLAGS=$save_CPPFLAGS |
11121 | LIBS=$save_LIBS | |
ec685c5e DE |
11122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11123 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 11124 | |
81ecdfbb | 11125 | fi |
ec685c5e | 11126 | if test ${have_libpython} = no; then |
9a156167 | 11127 | |
81ecdfbb | 11128 | version=python2.5 |
9a156167 | 11129 | |
ec685c5e DE |
11130 | new_CPPFLAGS=${python_includes} |
11131 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
11132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
11133 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 11134 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 11135 | save_LIBS=$LIBS |
ec685c5e DE |
11136 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
11137 | LIBS="$LIBS $new_LIBS" | |
11138 | found_usable_python=no | |
81ecdfbb | 11139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 11140 | /* end confdefs.h. */ |
ac534cba | 11141 | #include "Python.h" |
81ecdfbb RW |
11142 | int |
11143 | main () | |
11144 | { | |
11145 | Py_Initialize (); | |
11146 | ; | |
11147 | return 0; | |
11148 | } | |
436868fb | 11149 | _ACEOF |
81ecdfbb | 11150 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
11151 | have_libpython=${version} |
11152 | found_usable_python=yes | |
ac534cba JB |
11153 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11154 | PYTHON_LIBS=$new_LIBS | |
436868fb | 11155 | fi |
81ecdfbb RW |
11156 | rm -f core conftest.err conftest.$ac_objext \ |
11157 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11158 | CPPFLAGS=$save_CPPFLAGS |
11159 | LIBS=$save_LIBS | |
ec685c5e DE |
11160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11161 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 11162 | |
81ecdfbb | 11163 | fi |
ec685c5e | 11164 | if test ${have_libpython} = no; then |
a9322a30 | 11165 | |
81ecdfbb | 11166 | version=python2.4 |
a9322a30 | 11167 | |
ec685c5e DE |
11168 | new_CPPFLAGS=${python_includes} |
11169 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
11170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
11171 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 11172 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 11173 | save_LIBS=$LIBS |
ec685c5e DE |
11174 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
11175 | LIBS="$LIBS $new_LIBS" | |
11176 | found_usable_python=no | |
81ecdfbb | 11177 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 11178 | /* end confdefs.h. */ |
ac534cba | 11179 | #include "Python.h" |
a9322a30 TT |
11180 | int |
11181 | main () | |
11182 | { | |
81ecdfbb | 11183 | Py_Initialize (); |
a9322a30 TT |
11184 | ; |
11185 | return 0; | |
11186 | } | |
436868fb | 11187 | _ACEOF |
81ecdfbb | 11188 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
11189 | have_libpython=${version} |
11190 | found_usable_python=yes | |
ac534cba JB |
11191 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11192 | PYTHON_LIBS=$new_LIBS | |
436868fb | 11193 | fi |
81ecdfbb RW |
11194 | rm -f core conftest.err conftest.$ac_objext \ |
11195 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11196 | CPPFLAGS=$save_CPPFLAGS |
11197 | LIBS=$save_LIBS | |
ec685c5e DE |
11198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11199 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 11200 | |
ec685c5e DE |
11201 | fi |
11202 | fi | |
9c4ea6c5 | 11203 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
11204 | |
11205 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
11206 | ||
9c4ea6c5 | 11207 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
11208 | |
11209 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
11210 | ||
9c4ea6c5 | 11211 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
11212 | |
11213 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
11214 | ||
9c4ea6c5 | 11215 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
11216 | |
11217 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
11218 | ||
81ecdfbb | 11219 | fi |
ec685c5e DE |
11220 | |
11221 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
11222 | case "${with_python}" in |
11223 | yes) | |
11224 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
11225 | ;; | |
11226 | auto) | |
11227 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
11228 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
11229 | ;; | |
11230 | *) | |
11231 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
11232 | ;; | |
11233 | esac | |
0c4a4063 DE |
11234 | else |
11235 | if test -n "${python_prefix}"; then | |
11236 | ||
11237 | cat >>confdefs.h <<_ACEOF | |
11238 | #define WITH_PYTHON_PATH "${python_prefix}" | |
11239 | _ACEOF | |
11240 | ||
11241 | ||
11242 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11243 | if test "x$prefix" = xNONE; then | |
11244 | test_prefix=/usr/local | |
11245 | else | |
11246 | test_prefix=$prefix | |
11247 | fi | |
11248 | else | |
11249 | test_prefix=$exec_prefix | |
11250 | fi | |
11251 | value=0 | |
11252 | case ${python_prefix} in | |
11253 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11254 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11255 | value=1 | |
11256 | ;; | |
11257 | esac | |
11258 | ||
11259 | cat >>confdefs.h <<_ACEOF | |
11260 | #define PYTHON_PATH_RELOCATABLE $value | |
11261 | _ACEOF | |
11262 | ||
11263 | ||
11264 | fi | |
81ecdfbb | 11265 | fi |
436868fb | 11266 | fi |
436868fb | 11267 | |
ec685c5e | 11268 | if test "${have_libpython}" != no; then |
436868fb | 11269 | |
81ecdfbb | 11270 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 11271 | |
81ecdfbb RW |
11272 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
11273 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
11274 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 11275 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 11276 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 11277 | |
81ecdfbb RW |
11278 | # Flags needed to compile Python code (taken from python-config --cflags). |
11279 | # We cannot call python-config directly because it will output whatever was | |
11280 | # used when compiling the Python interpreter itself, including flags which | |
11281 | # would make the python-related objects be compiled differently from the | |
11282 | # rest of GDB (e.g., -O2 and -fPIC). | |
11283 | if test "${GCC}" = yes; then | |
11284 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
11285 | fi | |
436868fb | 11286 | |
81ecdfbb RW |
11287 | if test "x${tentative_python_cflags}" != x; then |
11288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
11289 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
11290 | for flag in ${tentative_python_cflags}; do | |
11291 | # Check that the compiler accepts it | |
11292 | saved_CFLAGS="$CFLAGS" | |
11293 | CFLAGS="$CFLAGS $flag" | |
11294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11295 | /* end confdefs.h. */ |
81ecdfbb | 11296 | |
a9322a30 TT |
11297 | int |
11298 | main () | |
11299 | { | |
a9322a30 TT |
11300 | |
11301 | ; | |
11302 | return 0; | |
11303 | } | |
bec39cab | 11304 | _ACEOF |
81ecdfbb RW |
11305 | if ac_fn_c_try_compile "$LINENO"; then : |
11306 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 11307 | fi |
81ecdfbb RW |
11308 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11309 | CFLAGS="$saved_CFLAGS" | |
11310 | done | |
11311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
11312 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
11313 | fi | |
043b6510 JB |
11314 | |
11315 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
11316 | # #if _SGIAPI | |
11317 | # #define siginfo __siginfo | |
11318 | # #endif | |
11319 | # The problem is that including Python causes some XOPEN macros to be | |
11320 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
11321 | # to false. So, we work around this issue by defining siginfo ourself | |
11322 | # though the command-line. | |
11323 | case "$gdb_host" in | |
11324 | irix*) if test "${GCC}" = yes; then | |
11325 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
11326 | fi | |
11327 | ;; | |
11328 | esac | |
81ecdfbb RW |
11329 | else |
11330 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
11331 | # included. |
11332 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
11333 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
11334 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 11335 | fi |
9a156167 | 11336 | |
9a156167 | 11337 | |
ac534cba JB |
11338 | |
11339 | ||
81ecdfbb RW |
11340 | # ------------------------- # |
11341 | # Checks for header files. # | |
11342 | # ------------------------- # | |
c890192f | 11343 | |
81ecdfbb RW |
11344 | ac_header_dirent=no |
11345 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
11346 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
11347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
11348 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
11349 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
11350 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11351 | else |
81ecdfbb | 11352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11353 | /* end confdefs.h. */ |
81ecdfbb RW |
11354 | #include <sys/types.h> |
11355 | #include <$ac_hdr> | |
11356 | ||
a9322a30 TT |
11357 | int |
11358 | main () | |
11359 | { | |
81ecdfbb RW |
11360 | if ((DIR *) 0) |
11361 | return 0; | |
a9322a30 TT |
11362 | ; |
11363 | return 0; | |
11364 | } | |
bec39cab | 11365 | _ACEOF |
81ecdfbb RW |
11366 | if ac_fn_c_try_compile "$LINENO"; then : |
11367 | eval "$as_ac_Header=yes" | |
bec39cab | 11368 | else |
81ecdfbb | 11369 | eval "$as_ac_Header=no" |
bec39cab | 11370 | fi |
81ecdfbb | 11371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 11372 | fi |
81ecdfbb RW |
11373 | eval ac_res=\$$as_ac_Header |
11374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
11375 | $as_echo "$ac_res" >&6; } | |
11376 | eval as_val=\$$as_ac_Header | |
11377 | if test "x$as_val" = x""yes; then : | |
11378 | cat >>confdefs.h <<_ACEOF | |
11379 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 11380 | _ACEOF |
bec39cab | 11381 | |
81ecdfbb RW |
11382 | ac_header_dirent=$ac_hdr; break |
11383 | fi | |
bec39cab | 11384 | |
81ecdfbb RW |
11385 | done |
11386 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
11387 | if test $ac_header_dirent = dirent.h; then | |
11388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
11389 | $as_echo_n "checking for library containing opendir... " >&6; } | |
11390 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11391 | $as_echo_n "(cached) " >&6 | |
c890192f | 11392 | else |
81ecdfbb RW |
11393 | ac_func_search_save_LIBS=$LIBS |
11394 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11395 | /* end confdefs.h. */ | |
11396 | ||
11397 | /* Override any GCC internal prototype to avoid an error. | |
11398 | Use char because int might match the return type of a GCC | |
11399 | builtin and then its argument prototype would still apply. */ | |
11400 | #ifdef __cplusplus | |
11401 | extern "C" | |
11402 | #endif | |
11403 | char opendir (); | |
11404 | int | |
11405 | main () | |
11406 | { | |
11407 | return opendir (); | |
11408 | ; | |
11409 | return 0; | |
11410 | } | |
bec39cab | 11411 | _ACEOF |
81ecdfbb RW |
11412 | for ac_lib in '' dir; do |
11413 | if test -z "$ac_lib"; then | |
11414 | ac_res="none required" | |
11415 | else | |
11416 | ac_res=-l$ac_lib | |
11417 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11418 | fi | |
11419 | if ac_fn_c_try_link "$LINENO"; then : | |
11420 | ac_cv_search_opendir=$ac_res | |
11421 | fi | |
11422 | rm -f core conftest.err conftest.$ac_objext \ | |
11423 | conftest$ac_exeext | |
11424 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11425 | break | |
11426 | fi | |
11427 | done | |
11428 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 11429 | |
81ecdfbb RW |
11430 | else |
11431 | ac_cv_search_opendir=no | |
11432 | fi | |
11433 | rm conftest.$ac_ext | |
11434 | LIBS=$ac_func_search_save_LIBS | |
11435 | fi | |
11436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
11437 | $as_echo "$ac_cv_search_opendir" >&6; } | |
11438 | ac_res=$ac_cv_search_opendir | |
11439 | if test "$ac_res" != no; then : | |
11440 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 11441 | |
bec39cab | 11442 | fi |
81ecdfbb | 11443 | |
bec39cab | 11444 | else |
81ecdfbb RW |
11445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
11446 | $as_echo_n "checking for library containing opendir... " >&6; } | |
11447 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11448 | $as_echo_n "(cached) " >&6 | |
11449 | else | |
11450 | ac_func_search_save_LIBS=$LIBS | |
11451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11452 | /* end confdefs.h. */ |
81ecdfbb RW |
11453 | |
11454 | /* Override any GCC internal prototype to avoid an error. | |
11455 | Use char because int might match the return type of a GCC | |
11456 | builtin and then its argument prototype would still apply. */ | |
11457 | #ifdef __cplusplus | |
11458 | extern "C" | |
11459 | #endif | |
11460 | char opendir (); | |
a9322a30 TT |
11461 | int |
11462 | main () | |
11463 | { | |
81ecdfbb | 11464 | return opendir (); |
a9322a30 TT |
11465 | ; |
11466 | return 0; | |
11467 | } | |
bec39cab | 11468 | _ACEOF |
81ecdfbb RW |
11469 | for ac_lib in '' x; do |
11470 | if test -z "$ac_lib"; then | |
11471 | ac_res="none required" | |
11472 | else | |
11473 | ac_res=-l$ac_lib | |
11474 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11475 | fi | |
11476 | if ac_fn_c_try_link "$LINENO"; then : | |
11477 | ac_cv_search_opendir=$ac_res | |
11478 | fi | |
11479 | rm -f core conftest.err conftest.$ac_objext \ | |
11480 | conftest$ac_exeext | |
11481 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11482 | break | |
11483 | fi | |
11484 | done | |
11485 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 11486 | |
81ecdfbb RW |
11487 | else |
11488 | ac_cv_search_opendir=no | |
bec39cab | 11489 | fi |
81ecdfbb RW |
11490 | rm conftest.$ac_ext |
11491 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 11492 | fi |
81ecdfbb RW |
11493 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
11494 | $as_echo "$ac_cv_search_opendir" >&6; } | |
11495 | ac_res=$ac_cv_search_opendir | |
11496 | if test "$ac_res" != no; then : | |
11497 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 11498 | |
81ecdfbb | 11499 | fi |
bec39cab | 11500 | |
81ecdfbb | 11501 | fi |
bec39cab | 11502 | |
81ecdfbb RW |
11503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
11504 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
11505 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
11506 | $as_echo_n "(cached) " >&6 | |
9a156167 | 11507 | else |
81ecdfbb RW |
11508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11509 | /* end confdefs.h. */ | |
11510 | #include <sys/types.h> | |
11511 | #include <sys/stat.h> | |
11512 | ||
11513 | #if defined S_ISBLK && defined S_IFDIR | |
11514 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
11515 | #endif | |
11516 | ||
11517 | #if defined S_ISBLK && defined S_IFCHR | |
11518 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
11519 | #endif | |
11520 | ||
11521 | #if defined S_ISLNK && defined S_IFREG | |
11522 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
11523 | #endif | |
11524 | ||
11525 | #if defined S_ISSOCK && defined S_IFREG | |
11526 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
11527 | #endif | |
11528 | ||
bec39cab | 11529 | _ACEOF |
81ecdfbb RW |
11530 | if ac_fn_c_try_compile "$LINENO"; then : |
11531 | ac_cv_header_stat_broken=no | |
11532 | else | |
11533 | ac_cv_header_stat_broken=yes | |
11534 | fi | |
11535 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11536 | fi | |
11537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
11538 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
11539 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 11540 | |
81ecdfbb | 11541 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 11542 | |
bec39cab | 11543 | fi |
81ecdfbb RW |
11544 | |
11545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
11546 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11547 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11548 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11549 | else |
81ecdfbb | 11550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11551 | /* end confdefs.h. */ |
81ecdfbb RW |
11552 | #include <stdlib.h> |
11553 | #include <stdarg.h> | |
11554 | #include <string.h> | |
11555 | #include <float.h> | |
11556 | ||
a9322a30 TT |
11557 | int |
11558 | main () | |
11559 | { | |
a9322a30 TT |
11560 | |
11561 | ; | |
11562 | return 0; | |
11563 | } | |
bec39cab | 11564 | _ACEOF |
81ecdfbb RW |
11565 | if ac_fn_c_try_compile "$LINENO"; then : |
11566 | ac_cv_header_stdc=yes | |
bec39cab | 11567 | else |
81ecdfbb | 11568 | ac_cv_header_stdc=no |
a9322a30 | 11569 | fi |
81ecdfbb | 11570 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11571 | |
81ecdfbb RW |
11572 | if test $ac_cv_header_stdc = yes; then |
11573 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11575 | /* end confdefs.h. */ | |
11576 | #include <string.h> | |
bec39cab | 11577 | |
81ecdfbb RW |
11578 | _ACEOF |
11579 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11580 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 11581 | |
bec39cab | 11582 | else |
81ecdfbb RW |
11583 | ac_cv_header_stdc=no |
11584 | fi | |
11585 | rm -f conftest* | |
11586 | ||
11587 | fi | |
11588 | ||
11589 | if test $ac_cv_header_stdc = yes; then | |
11590 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11591 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11592 | /* end confdefs.h. */ | |
11593 | #include <stdlib.h> | |
11594 | ||
bec39cab | 11595 | _ACEOF |
81ecdfbb RW |
11596 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11597 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 11598 | |
81ecdfbb RW |
11599 | else |
11600 | ac_cv_header_stdc=no | |
11601 | fi | |
11602 | rm -f conftest* | |
bec39cab | 11603 | |
bec39cab | 11604 | fi |
81ecdfbb RW |
11605 | |
11606 | if test $ac_cv_header_stdc = yes; then | |
11607 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11608 | if test "$cross_compiling" = yes; then : | |
11609 | : | |
bec39cab | 11610 | else |
81ecdfbb | 11611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11612 | /* end confdefs.h. */ |
81ecdfbb RW |
11613 | #include <ctype.h> |
11614 | #include <stdlib.h> | |
11615 | #if ((' ' & 0x0FF) == 0x020) | |
11616 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11617 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11618 | #else | |
11619 | # define ISLOWER(c) \ | |
11620 | (('a' <= (c) && (c) <= 'i') \ | |
11621 | || ('j' <= (c) && (c) <= 'r') \ | |
11622 | || ('s' <= (c) && (c) <= 'z')) | |
11623 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11624 | #endif | |
11625 | ||
11626 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
11627 | int |
11628 | main () | |
11629 | { | |
81ecdfbb RW |
11630 | int i; |
11631 | for (i = 0; i < 256; i++) | |
11632 | if (XOR (islower (i), ISLOWER (i)) | |
11633 | || toupper (i) != TOUPPER (i)) | |
11634 | return 2; | |
a9322a30 TT |
11635 | return 0; |
11636 | } | |
bec39cab | 11637 | _ACEOF |
81ecdfbb RW |
11638 | if ac_fn_c_try_run "$LINENO"; then : |
11639 | ||
bec39cab | 11640 | else |
81ecdfbb RW |
11641 | ac_cv_header_stdc=no |
11642 | fi | |
11643 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11644 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11645 | fi | |
bec39cab | 11646 | |
bec39cab | 11647 | fi |
a9322a30 | 11648 | fi |
81ecdfbb RW |
11649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
11650 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11651 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 11652 | |
81ecdfbb | 11653 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 11654 | |
81ecdfbb | 11655 | fi |
bec39cab | 11656 | |
81ecdfbb RW |
11657 | # elf_hp.h is for HP/UX 64-bit shared library support. |
11658 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
11659 | # unconditionally, so what's the point in checking these? | |
11660 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
11661 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
11662 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
11663 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
11664 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
11665 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
11666 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
a2d08b9e SD |
11667 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \ |
11668 | dlfcn.h | |
81ecdfbb RW |
11669 | do : |
11670 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11671 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11672 | eval as_val=\$$as_ac_Header | |
11673 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11674 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11675 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11676 | _ACEOF |
c906108c | 11677 | |
bec39cab | 11678 | fi |
81ecdfbb RW |
11679 | |
11680 | done | |
11681 | ||
11682 | for ac_header in link.h | |
11683 | do : | |
11684 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
11685 | # include <sys/types.h> | |
11686 | #endif | |
11687 | #if HAVE_NLIST_H | |
11688 | # include <nlist.h> | |
a9322a30 TT |
11689 | #endif |
11690 | ||
81ecdfbb RW |
11691 | " |
11692 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
11693 | cat >>confdefs.h <<_ACEOF | |
11694 | #define HAVE_LINK_H 1 | |
bec39cab | 11695 | _ACEOF |
bec39cab | 11696 | |
a9322a30 | 11697 | fi |
bec39cab | 11698 | |
81ecdfbb | 11699 | done |
c906108c | 11700 | |
81ecdfbb RW |
11701 | for ac_header in sys/proc.h |
11702 | do : | |
11703 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
11704 | # include <sys/param.h> | |
11705 | #endif | |
c906108c | 11706 | |
81ecdfbb RW |
11707 | " |
11708 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 11709 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11710 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 11711 | _ACEOF |
5ee754fc | 11712 | |
bec39cab | 11713 | fi |
81ecdfbb RW |
11714 | |
11715 | done | |
11716 | ||
11717 | for ac_header in sys/user.h | |
11718 | do : | |
11719 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
11720 | # include <sys/param.h> | |
a9322a30 TT |
11721 | #endif |
11722 | ||
81ecdfbb RW |
11723 | " |
11724 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
11725 | cat >>confdefs.h <<_ACEOF | |
11726 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 11727 | _ACEOF |
bec39cab | 11728 | |
a9322a30 | 11729 | fi |
bec39cab | 11730 | |
81ecdfbb | 11731 | done |
5ee754fc | 11732 | |
5ee754fc | 11733 | |
81ecdfbb RW |
11734 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
11735 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
11736 | # think that we don't have <curses.h> if we're using GCC. | |
11737 | case $host_os in | |
11738 | solaris2.[789]) | |
11739 | if test "$GCC" = yes; then | |
11740 | ||
11741 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
11742 | ||
11743 | fi ;; | |
11744 | esac | |
11745 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
11746 | do : | |
11747 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11748 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11749 | eval as_val=\$$as_ac_Header | |
11750 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11751 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11752 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11753 | _ACEOF |
5ee754fc MK |
11754 | |
11755 | fi | |
11756 | ||
81ecdfbb | 11757 | done |
bec39cab | 11758 | |
81ecdfbb RW |
11759 | for ac_header in term.h |
11760 | do : | |
11761 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
11762 | # include <curses.h> | |
11763 | #endif | |
bec39cab | 11764 | |
81ecdfbb RW |
11765 | " |
11766 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
11767 | cat >>confdefs.h <<_ACEOF | |
11768 | #define HAVE_TERM_H 1 | |
a8111142 | 11769 | _ACEOF |
a8111142 | 11770 | |
a8111142 | 11771 | fi |
a8111142 | 11772 | |
81ecdfbb | 11773 | done |
a8111142 TT |
11774 | |
11775 | ||
81ecdfbb RW |
11776 | # ------------------------- # |
11777 | # Checks for declarations. # | |
11778 | # ------------------------- # | |
a9322a30 | 11779 | |
81ecdfbb RW |
11780 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
11781 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
11782 | ac_have_decl=1 | |
bec39cab | 11783 | else |
81ecdfbb RW |
11784 | ac_have_decl=0 |
11785 | fi | |
11786 | ||
11787 | cat >>confdefs.h <<_ACEOF | |
11788 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 11789 | _ACEOF |
81ecdfbb RW |
11790 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
11791 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
11792 | ac_have_decl=1 | |
11793 | else | |
11794 | ac_have_decl=0 | |
11795 | fi | |
11796 | ||
11797 | cat >>confdefs.h <<_ACEOF | |
11798 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 11799 | _ACEOF |
81ecdfbb RW |
11800 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
11801 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
11802 | ac_have_decl=1 | |
bec39cab | 11803 | else |
81ecdfbb RW |
11804 | ac_have_decl=0 |
11805 | fi | |
bec39cab | 11806 | |
81ecdfbb RW |
11807 | cat >>confdefs.h <<_ACEOF |
11808 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 11809 | _ACEOF |
81ecdfbb RW |
11810 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
11811 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
11812 | ac_have_decl=1 | |
11813 | else | |
11814 | ac_have_decl=0 | |
11815 | fi | |
11816 | ||
11817 | cat >>confdefs.h <<_ACEOF | |
11818 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 11819 | _ACEOF |
81ecdfbb RW |
11820 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
11821 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
11822 | ac_have_decl=1 | |
bec39cab | 11823 | else |
81ecdfbb RW |
11824 | ac_have_decl=0 |
11825 | fi | |
5ee754fc | 11826 | |
81ecdfbb RW |
11827 | cat >>confdefs.h <<_ACEOF |
11828 | #define HAVE_DECL_STRSTR $ac_have_decl | |
11829 | _ACEOF | |
11830 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
11831 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
11832 | ac_have_decl=1 | |
11833 | else | |
11834 | ac_have_decl=0 | |
5ee754fc | 11835 | fi |
81ecdfbb RW |
11836 | |
11837 | cat >>confdefs.h <<_ACEOF | |
11838 | #define HAVE_DECL_GETOPT $ac_have_decl | |
11839 | _ACEOF | |
11840 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
11841 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
11842 | ac_have_decl=1 | |
11843 | else | |
11844 | ac_have_decl=0 | |
5ee754fc | 11845 | fi |
81ecdfbb RW |
11846 | |
11847 | cat >>confdefs.h <<_ACEOF | |
11848 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11849 | _ACEOF | |
11850 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
11851 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
11852 | ac_have_decl=1 | |
11853 | else | |
11854 | ac_have_decl=0 | |
5ee754fc MK |
11855 | fi |
11856 | ||
a9322a30 | 11857 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11858 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 11859 | _ACEOF |
5ee754fc | 11860 | |
5ee754fc | 11861 | |
81ecdfbb RW |
11862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
11863 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
11864 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
11865 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11866 | else |
81ecdfbb | 11867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11868 | /* end confdefs.h. */ |
81ecdfbb | 11869 | #include <locale.h> |
a9322a30 TT |
11870 | int |
11871 | main () | |
11872 | { | |
81ecdfbb | 11873 | return LC_MESSAGES |
a9322a30 TT |
11874 | ; |
11875 | return 0; | |
11876 | } | |
bec39cab | 11877 | _ACEOF |
81ecdfbb RW |
11878 | if ac_fn_c_try_link "$LINENO"; then : |
11879 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 11880 | else |
81ecdfbb RW |
11881 | am_cv_val_LC_MESSAGES=no |
11882 | fi | |
11883 | rm -f core conftest.err conftest.$ac_objext \ | |
11884 | conftest$ac_exeext conftest.$ac_ext | |
11885 | fi | |
11886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
11887 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
11888 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 11889 | |
81ecdfbb RW |
11890 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
11891 | ||
11892 | fi | |
11893 | ||
11894 | ||
11895 | # ----------------------- # | |
11896 | # Checks for structures. # | |
11897 | # ----------------------- # | |
11898 | ||
11899 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
11900 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
11901 | ||
11902 | cat >>confdefs.h <<_ACEOF | |
11903 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 11904 | _ACEOF |
7eb368b3 | 11905 | |
81ecdfbb | 11906 | |
7eb368b3 | 11907 | fi |
81ecdfbb RW |
11908 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
11909 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 11910 | |
a9322a30 TT |
11911 | cat >>confdefs.h <<_ACEOF |
11912 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
11913 | _ACEOF |
11914 | ||
a9322a30 | 11915 | |
7eb368b3 NR |
11916 | fi |
11917 | ||
7eb368b3 | 11918 | |
a9322a30 TT |
11919 | # ------------------ # |
11920 | # Checks for types. # | |
11921 | # ------------------ # | |
7eb368b3 | 11922 | |
81ecdfbb RW |
11923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
11924 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
11925 | if test "${ac_cv_type_signal+set}" = set; then : | |
11926 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11927 | else |
81ecdfbb | 11928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11929 | /* end confdefs.h. */ |
a9322a30 TT |
11930 | #include <sys/types.h> |
11931 | #include <signal.h> | |
7cb9022a | 11932 | |
a9322a30 TT |
11933 | int |
11934 | main () | |
11935 | { | |
81ecdfbb | 11936 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
11937 | ; |
11938 | return 0; | |
11939 | } | |
bec39cab | 11940 | _ACEOF |
81ecdfbb RW |
11941 | if ac_fn_c_try_compile "$LINENO"; then : |
11942 | ac_cv_type_signal=int | |
bec39cab | 11943 | else |
81ecdfbb | 11944 | ac_cv_type_signal=void |
bec39cab | 11945 | fi |
81ecdfbb | 11946 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11947 | fi |
81ecdfbb RW |
11948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
11949 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 11950 | |
a9322a30 TT |
11951 | cat >>confdefs.h <<_ACEOF |
11952 | #define RETSIGTYPE $ac_cv_type_signal | |
11953 | _ACEOF | |
5ee754fc | 11954 | |
bec39cab | 11955 | |
81ecdfbb | 11956 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
11957 | #include <sys/socket.h> |
11958 | ||
81ecdfbb RW |
11959 | " |
11960 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 11961 | |
a9322a30 TT |
11962 | cat >>confdefs.h <<_ACEOF |
11963 | #define HAVE_SOCKLEN_T 1 | |
11964 | _ACEOF | |
11965 | ||
11966 | ||
11967 | fi | |
11968 | ||
11969 | ||
11970 | # ------------------------------------- # | |
11971 | # Checks for compiler characteristics. # | |
11972 | # ------------------------------------- # | |
11973 | ||
81ecdfbb RW |
11974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
11975 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
11976 | if test "${ac_cv_c_const+set}" = set; then : | |
11977 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11978 | else |
81ecdfbb | 11979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11980 | /* end confdefs.h. */ |
a9322a30 TT |
11981 | |
11982 | int | |
11983 | main () | |
11984 | { | |
11985 | /* FIXME: Include the comments suggested by Paul. */ | |
11986 | #ifndef __cplusplus | |
11987 | /* Ultrix mips cc rejects this. */ | |
11988 | typedef int charset[2]; | |
81ecdfbb | 11989 | const charset cs; |
a9322a30 | 11990 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
11991 | char const *const *pcpcc; |
11992 | char **ppc; | |
a9322a30 TT |
11993 | /* NEC SVR4.0.2 mips cc rejects this. */ |
11994 | struct point {int x, y;}; | |
11995 | static struct point const zero = {0,0}; | |
11996 | /* AIX XL C 1.02.0.0 rejects this. | |
11997 | It does not let you subtract one const X* pointer from another in | |
11998 | an arm of an if-expression whose if-part is not a constant | |
11999 | expression */ | |
12000 | const char *g = "string"; | |
81ecdfbb | 12001 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 12002 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
12003 | ++pcpcc; |
12004 | ppc = (char**) pcpcc; | |
12005 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
12006 | { /* SCO 3.2v4 cc rejects this. */ |
12007 | char *t; | |
12008 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
12009 | ||
12010 | *t++ = 0; | |
81ecdfbb | 12011 | if (s) return 0; |
a9322a30 TT |
12012 | } |
12013 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12014 | int x[] = {25, 17}; | |
12015 | const int *foo = &x[0]; | |
12016 | ++foo; | |
12017 | } | |
12018 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12019 | typedef const int *iptr; | |
12020 | iptr p = 0; | |
12021 | ++p; | |
12022 | } | |
12023 | { /* AIX XL C 1.02.0.0 rejects this saying | |
12024 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12025 | struct s { int j; const int *ap[3]; }; | |
12026 | struct s *b; b->j = 5; | |
12027 | } | |
12028 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12029 | const int foo = 10; | |
81ecdfbb | 12030 | if (!foo) return 0; |
a9322a30 | 12031 | } |
81ecdfbb | 12032 | return !cs[0] && !zero.x; |
a9322a30 TT |
12033 | #endif |
12034 | ||
12035 | ; | |
12036 | return 0; | |
12037 | } | |
bec39cab | 12038 | _ACEOF |
81ecdfbb | 12039 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12040 | ac_cv_c_const=yes |
5ee754fc | 12041 | else |
81ecdfbb | 12042 | ac_cv_c_const=no |
5ee754fc | 12043 | fi |
81ecdfbb | 12044 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 12045 | fi |
81ecdfbb RW |
12046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12047 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 12048 | if test $ac_cv_c_const = no; then |
bec39cab | 12049 | |
81ecdfbb | 12050 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12051 | |
5ee754fc | 12052 | fi |
bec39cab | 12053 | |
81ecdfbb RW |
12054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
12055 | $as_echo_n "checking for inline... " >&6; } | |
12056 | if test "${ac_cv_c_inline+set}" = set; then : | |
12057 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12058 | else |
a9322a30 TT |
12059 | ac_cv_c_inline=no |
12060 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 12061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12062 | /* end confdefs.h. */ |
a9322a30 TT |
12063 | #ifndef __cplusplus |
12064 | typedef int foo_t; | |
12065 | static $ac_kw foo_t static_foo () {return 0; } | |
12066 | $ac_kw foo_t foo () {return 0; } | |
12067 | #endif | |
12068 | ||
bec39cab | 12069 | _ACEOF |
81ecdfbb RW |
12070 | if ac_fn_c_try_compile "$LINENO"; then : |
12071 | ac_cv_c_inline=$ac_kw | |
bec39cab | 12072 | fi |
81ecdfbb RW |
12073 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12074 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 12075 | done |
bec39cab | 12076 | |
5ee754fc | 12077 | fi |
81ecdfbb RW |
12078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
12079 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 12080 | |
a9322a30 TT |
12081 | case $ac_cv_c_inline in |
12082 | inline | yes) ;; | |
12083 | *) | |
12084 | case $ac_cv_c_inline in | |
12085 | no) ac_val=;; | |
12086 | *) ac_val=$ac_cv_c_inline;; | |
12087 | esac | |
12088 | cat >>confdefs.h <<_ACEOF | |
12089 | #ifndef __cplusplus | |
12090 | #define inline $ac_val | |
12091 | #endif | |
12092 | _ACEOF | |
bec39cab AC |
12093 | ;; |
12094 | esac | |
bec39cab | 12095 | |
81ecdfbb RW |
12096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12097 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12098 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
12099 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12100 | else |
81ecdfbb RW |
12101 | ac_cv_c_bigendian=unknown |
12102 | # See if we're dealing with a universal compiler. | |
12103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12104 | /* end confdefs.h. */ | |
12105 | #ifndef __APPLE_CC__ | |
12106 | not a universal capable compiler | |
12107 | #endif | |
12108 | typedef int dummy; | |
12109 | ||
12110 | _ACEOF | |
12111 | if ac_fn_c_try_compile "$LINENO"; then : | |
12112 | ||
12113 | # Check for potential -arch flags. It is not universal unless | |
12114 | # there are at least two -arch flags with different values. | |
12115 | ac_arch= | |
12116 | ac_prev= | |
12117 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12118 | if test -n "$ac_prev"; then | |
12119 | case $ac_word in | |
12120 | i?86 | x86_64 | ppc | ppc64) | |
12121 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12122 | ac_arch=$ac_word | |
12123 | else | |
12124 | ac_cv_c_bigendian=universal | |
12125 | break | |
12126 | fi | |
12127 | ;; | |
12128 | esac | |
12129 | ac_prev= | |
12130 | elif test "x$ac_word" = "x-arch"; then | |
12131 | ac_prev=arch | |
12132 | fi | |
12133 | done | |
12134 | fi | |
12135 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12136 | if test $ac_cv_c_bigendian = unknown; then | |
12137 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12139 | /* end confdefs.h. */ |
a9322a30 | 12140 | #include <sys/types.h> |
81ecdfbb | 12141 | #include <sys/param.h> |
a9322a30 TT |
12142 | |
12143 | int | |
12144 | main () | |
12145 | { | |
81ecdfbb RW |
12146 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
12147 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12148 | && LITTLE_ENDIAN) | |
12149 | bogus endian macros | |
12150 | #endif | |
a9322a30 TT |
12151 | |
12152 | ; | |
12153 | return 0; | |
12154 | } | |
bec39cab | 12155 | _ACEOF |
81ecdfbb | 12156 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12157 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 12158 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12159 | /* end confdefs.h. */ |
a9322a30 | 12160 | #include <sys/types.h> |
81ecdfbb | 12161 | #include <sys/param.h> |
a9322a30 TT |
12162 | |
12163 | int | |
12164 | main () | |
12165 | { | |
12166 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
12167 | not big endian |
12168 | #endif | |
a9322a30 TT |
12169 | |
12170 | ; | |
12171 | return 0; | |
12172 | } | |
bec39cab | 12173 | _ACEOF |
81ecdfbb | 12174 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12175 | ac_cv_c_bigendian=yes |
5ee754fc | 12176 | else |
81ecdfbb | 12177 | ac_cv_c_bigendian=no |
5ee754fc | 12178 | fi |
81ecdfbb RW |
12179 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12180 | fi | |
12181 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12182 | fi | |
12183 | if test $ac_cv_c_bigendian = unknown; then | |
12184 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12186 | /* end confdefs.h. */ | |
12187 | #include <limits.h> | |
bec39cab | 12188 | |
81ecdfbb RW |
12189 | int |
12190 | main () | |
12191 | { | |
12192 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12193 | bogus endian macros | |
12194 | #endif | |
12195 | ||
12196 | ; | |
12197 | return 0; | |
12198 | } | |
7eb368b3 | 12199 | _ACEOF |
81ecdfbb RW |
12200 | if ac_fn_c_try_compile "$LINENO"; then : |
12201 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 12203 | /* end confdefs.h. */ |
81ecdfbb RW |
12204 | #include <limits.h> |
12205 | ||
7eb368b3 NR |
12206 | int |
12207 | main () | |
12208 | { | |
81ecdfbb RW |
12209 | #ifndef _BIG_ENDIAN |
12210 | not big endian | |
12211 | #endif | |
12212 | ||
7eb368b3 NR |
12213 | ; |
12214 | return 0; | |
12215 | } | |
12216 | _ACEOF | |
81ecdfbb | 12217 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12218 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
12219 | else |
12220 | ac_cv_c_bigendian=no | |
a9322a30 | 12221 | fi |
81ecdfbb | 12222 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 12223 | fi |
81ecdfbb RW |
12224 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12225 | fi | |
12226 | if test $ac_cv_c_bigendian = unknown; then | |
12227 | # Compile a test program. | |
12228 | if test "$cross_compiling" = yes; then : | |
12229 | # Try to guess by grepping values from an object file. | |
12230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12231 | /* end confdefs.h. */ | |
12232 | short int ascii_mm[] = | |
12233 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12234 | short int ascii_ii[] = | |
12235 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12236 | int use_ascii (int i) { | |
12237 | return ascii_mm[i] + ascii_ii[i]; | |
12238 | } | |
12239 | short int ebcdic_ii[] = | |
12240 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12241 | short int ebcdic_mm[] = | |
12242 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12243 | int use_ebcdic (int i) { | |
12244 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12245 | } | |
12246 | extern int foo; | |
7eb368b3 | 12247 | |
81ecdfbb RW |
12248 | int |
12249 | main () | |
12250 | { | |
12251 | return use_ascii (foo) == use_ebcdic (foo); | |
12252 | ; | |
12253 | return 0; | |
12254 | } | |
12255 | _ACEOF | |
12256 | if ac_fn_c_try_compile "$LINENO"; then : | |
12257 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12258 | ac_cv_c_bigendian=yes | |
12259 | fi | |
12260 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12261 | if test "$ac_cv_c_bigendian" = unknown; then | |
12262 | ac_cv_c_bigendian=no | |
12263 | else | |
12264 | # finding both strings is unlikely to happen, but who knows? | |
12265 | ac_cv_c_bigendian=unknown | |
12266 | fi | |
12267 | fi | |
7eb368b3 | 12268 | fi |
81ecdfbb | 12269 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12270 | else |
81ecdfbb | 12271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12272 | /* end confdefs.h. */ |
81ecdfbb | 12273 | $ac_includes_default |
d3ea6809 MM |
12274 | int |
12275 | main () | |
12276 | { | |
81ecdfbb RW |
12277 | |
12278 | /* Are we little or big endian? From Harbison&Steele. */ | |
12279 | union | |
12280 | { | |
12281 | long int l; | |
12282 | char c[sizeof (long int)]; | |
12283 | } u; | |
12284 | u.l = 1; | |
12285 | return u.c[sizeof (long int) - 1] == 1; | |
12286 | ||
12287 | ; | |
12288 | return 0; | |
d3ea6809 MM |
12289 | } |
12290 | _ACEOF | |
81ecdfbb | 12291 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12292 | ac_cv_c_bigendian=no |
d3ea6809 | 12293 | else |
81ecdfbb | 12294 | ac_cv_c_bigendian=yes |
d3ea6809 | 12295 | fi |
81ecdfbb RW |
12296 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12297 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12298 | fi |
a9322a30 | 12299 | |
81ecdfbb RW |
12300 | fi |
12301 | fi | |
12302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
12303 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12304 | case $ac_cv_c_bigendian in #( | |
12305 | yes) | |
12306 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12307 | ;; #( | |
12308 | no) | |
12309 | ;; #( | |
12310 | universal) | |
12311 | ||
12312 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
12313 | ||
12314 | ;; #( | |
12315 | *) | |
12316 | as_fn_error "unknown endianness | |
12317 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12318 | esac | |
d3ea6809 MM |
12319 | |
12320 | ||
a9322a30 TT |
12321 | # ------------------------------ # |
12322 | # Checks for library functions. # | |
12323 | # ------------------------------ # | |
d3ea6809 | 12324 | |
a9322a30 TT |
12325 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
12326 | # for constant arguments. Useless! | |
81ecdfbb RW |
12327 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
12328 | $as_echo_n "checking for working alloca.h... " >&6; } | |
12329 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
12330 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 12331 | else |
81ecdfbb | 12332 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 12333 | /* end confdefs.h. */ |
a9322a30 | 12334 | #include <alloca.h> |
bec39cab AC |
12335 | int |
12336 | main () | |
12337 | { | |
a9322a30 | 12338 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 12339 | if (p) return 0; |
bec39cab AC |
12340 | ; |
12341 | return 0; | |
12342 | } | |
12343 | _ACEOF | |
81ecdfbb | 12344 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 12345 | ac_cv_working_alloca_h=yes |
bec39cab | 12346 | else |
81ecdfbb | 12347 | ac_cv_working_alloca_h=no |
bec39cab | 12348 | fi |
81ecdfbb RW |
12349 | rm -f core conftest.err conftest.$ac_objext \ |
12350 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 12351 | fi |
81ecdfbb RW |
12352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
12353 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
12354 | if test $ac_cv_working_alloca_h = yes; then |
12355 | ||
81ecdfbb | 12356 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 12357 | |
c906108c | 12358 | fi |
bec39cab | 12359 | |
81ecdfbb RW |
12360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
12361 | $as_echo_n "checking for alloca... " >&6; } | |
12362 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
12363 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12364 | else |
81ecdfbb | 12365 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12366 | /* end confdefs.h. */ |
a9322a30 TT |
12367 | #ifdef __GNUC__ |
12368 | # define alloca __builtin_alloca | |
b4e70030 | 12369 | #else |
a9322a30 TT |
12370 | # ifdef _MSC_VER |
12371 | # include <malloc.h> | |
12372 | # define alloca _alloca | |
12373 | # else | |
81ecdfbb | 12374 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
12375 | # include <alloca.h> |
12376 | # else | |
12377 | # ifdef _AIX | |
12378 | #pragma alloca | |
12379 | # else | |
12380 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
12381 | char *alloca (); | |
12382 | # endif | |
12383 | # endif | |
12384 | # endif | |
12385 | # endif | |
c906108c | 12386 | #endif |
97bf5e38 | 12387 | |
bec39cab AC |
12388 | int |
12389 | main () | |
12390 | { | |
a9322a30 | 12391 | char *p = (char *) alloca (1); |
81ecdfbb | 12392 | if (p) return 0; |
bec39cab AC |
12393 | ; |
12394 | return 0; | |
12395 | } | |
12396 | _ACEOF | |
81ecdfbb | 12397 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 12398 | ac_cv_func_alloca_works=yes |
bec39cab | 12399 | else |
81ecdfbb | 12400 | ac_cv_func_alloca_works=no |
bec39cab | 12401 | fi |
81ecdfbb RW |
12402 | rm -f core conftest.err conftest.$ac_objext \ |
12403 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 12404 | fi |
81ecdfbb RW |
12405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
12406 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
12407 | |
12408 | if test $ac_cv_func_alloca_works = yes; then | |
12409 | ||
81ecdfbb | 12410 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 12411 | |
a9322a30 TT |
12412 | else |
12413 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
12414 | # that cause trouble. Some versions do not even contain alloca or | |
12415 | # contain a buggy version. If you still want to use their alloca, | |
12416 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
12417 | ||
81ecdfbb | 12418 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 12419 | |
81ecdfbb | 12420 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 12421 | |
bec39cab | 12422 | |
81ecdfbb RW |
12423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
12424 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
12425 | if test "${ac_cv_os_cray+set}" = set; then : | |
12426 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12427 | else |
81ecdfbb | 12428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 12429 | /* end confdefs.h. */ |
81ecdfbb | 12430 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
12431 | webecray |
12432 | #else | |
12433 | wenotbecray | |
12434 | #endif | |
12435 | ||
12436 | _ACEOF | |
12437 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 12438 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
12439 | ac_cv_os_cray=yes |
12440 | else | |
81ecdfbb | 12441 | ac_cv_os_cray=no |
bec39cab | 12442 | fi |
81ecdfbb RW |
12443 | rm -f conftest* |
12444 | ||
bec39cab | 12445 | fi |
81ecdfbb RW |
12446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
12447 | $as_echo "$ac_cv_os_cray" >&6; } | |
12448 | if test $ac_cv_os_cray = yes; then | |
12449 | for ac_func in _getb67 GETB67 getb67; do | |
12450 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12451 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12452 | eval as_val=\$$as_ac_var | |
12453 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
12454 | |
12455 | cat >>confdefs.h <<_ACEOF | |
12456 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 12457 | _ACEOF |
c906108c | 12458 | |
a9322a30 | 12459 | break |
c906108c SS |
12460 | fi |
12461 | ||
a9322a30 TT |
12462 | done |
12463 | fi | |
bec39cab | 12464 | |
81ecdfbb RW |
12465 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
12466 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
12467 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
12468 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12469 | else |
81ecdfbb | 12470 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12471 | ac_cv_c_stack_direction=0 |
bec39cab | 12472 | else |
81ecdfbb | 12473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12474 | /* end confdefs.h. */ |
81ecdfbb | 12475 | $ac_includes_default |
a9322a30 TT |
12476 | int |
12477 | find_stack_direction () | |
b4e70030 | 12478 | { |
a9322a30 TT |
12479 | static char *addr = 0; |
12480 | auto char dummy; | |
12481 | if (addr == 0) | |
12482 | { | |
12483 | addr = &dummy; | |
12484 | return find_stack_direction (); | |
12485 | } | |
12486 | else | |
12487 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 12488 | } |
b757528f | 12489 | |
bec39cab AC |
12490 | int |
12491 | main () | |
12492 | { | |
81ecdfbb | 12493 | return find_stack_direction () < 0; |
bec39cab AC |
12494 | } |
12495 | _ACEOF | |
81ecdfbb | 12496 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12497 | ac_cv_c_stack_direction=1 |
12498 | else | |
81ecdfbb | 12499 | ac_cv_c_stack_direction=-1 |
a9322a30 | 12500 | fi |
81ecdfbb RW |
12501 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12502 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12503 | fi |
a9322a30 | 12504 | |
81ecdfbb RW |
12505 | fi |
12506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12507 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
12508 | cat >>confdefs.h <<_ACEOF |
12509 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12510 | _ACEOF | |
12511 | ||
12512 | ||
12513 | fi | |
12514 | ||
a9322a30 | 12515 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
12516 | do : |
12517 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12518 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12519 | eval as_val=\$$as_ac_Header | |
12520 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12521 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12522 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12523 | _ACEOF |
b757528f | 12524 | |
b757528f | 12525 | fi |
bec39cab | 12526 | |
a9322a30 | 12527 | done |
a3828db0 | 12528 | |
a9322a30 | 12529 | for ac_func in getpagesize |
81ecdfbb RW |
12530 | do : |
12531 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
12532 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 12533 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12534 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12535 | _ACEOF |
bcb3dc3d | 12536 | |
bcb3dc3d MK |
12537 | fi |
12538 | done | |
12539 | ||
81ecdfbb RW |
12540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12541 | $as_echo_n "checking for working mmap... " >&6; } | |
12542 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
12543 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12544 | else |
81ecdfbb | 12545 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12546 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12547 | else |
81ecdfbb | 12548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12549 | /* end confdefs.h. */ |
a9322a30 TT |
12550 | $ac_includes_default |
12551 | /* malloc might have been renamed as rpl_malloc. */ | |
12552 | #undef malloc | |
bec39cab | 12553 | |
a9322a30 TT |
12554 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12555 | Here is a matrix of mmap possibilities: | |
12556 | mmap private not fixed | |
12557 | mmap private fixed at somewhere currently unmapped | |
12558 | mmap private fixed at somewhere already mapped | |
12559 | mmap shared not fixed | |
12560 | mmap shared fixed at somewhere currently unmapped | |
12561 | mmap shared fixed at somewhere already mapped | |
12562 | For private mappings, we should verify that changes cannot be read() | |
12563 | back from the file, nor mmap's back from the file at a different | |
12564 | address. (There have been systems where private was not correctly | |
12565 | implemented like the infamous i386 svr4.0, and systems where the | |
12566 | VM page cache was not coherent with the file system buffer cache | |
12567 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12568 | For shared mappings, we should conversely verify that changes get | |
12569 | propagated back to all the places they're supposed to be. | |
bec39cab | 12570 | |
a9322a30 TT |
12571 | Grep wants private fixed already mapped. |
12572 | The main things grep needs to know about mmap are: | |
12573 | * does it exist and is it safe to write into the mmap'd area | |
12574 | * how to use it (BSD variants) */ | |
8b9cf735 | 12575 | |
a9322a30 TT |
12576 | #include <fcntl.h> |
12577 | #include <sys/mman.h> | |
8b9cf735 | 12578 | |
81ecdfbb | 12579 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12580 | char *malloc (); |
a3828db0 MK |
12581 | #endif |
12582 | ||
a9322a30 | 12583 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12584 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 12585 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 12586 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
12587 | # define HAVE_SYS_PARAM_H 1 |
12588 | # endif | |
12589 | ||
12590 | # ifdef _SC_PAGESIZE | |
12591 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12592 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12593 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12594 | # include <sys/param.h> |
12595 | # ifdef EXEC_PAGESIZE | |
12596 | # define getpagesize() EXEC_PAGESIZE | |
12597 | # else /* no EXEC_PAGESIZE */ | |
12598 | # ifdef NBPG | |
12599 | # define getpagesize() NBPG * CLSIZE | |
12600 | # ifndef CLSIZE | |
12601 | # define CLSIZE 1 | |
12602 | # endif /* no CLSIZE */ | |
12603 | # else /* no NBPG */ | |
12604 | # ifdef NBPC | |
12605 | # define getpagesize() NBPC | |
12606 | # else /* no NBPC */ | |
12607 | # ifdef PAGESIZE | |
12608 | # define getpagesize() PAGESIZE | |
12609 | # endif /* PAGESIZE */ | |
12610 | # endif /* no NBPC */ | |
12611 | # endif /* no NBPG */ | |
12612 | # endif /* no EXEC_PAGESIZE */ | |
12613 | # else /* no HAVE_SYS_PARAM_H */ | |
12614 | # define getpagesize() 8192 /* punt totally */ | |
12615 | # endif /* no HAVE_SYS_PARAM_H */ | |
12616 | # endif /* no _SC_PAGESIZE */ | |
12617 | ||
12618 | #endif /* no HAVE_GETPAGESIZE */ | |
12619 | ||
bec39cab AC |
12620 | int |
12621 | main () | |
12622 | { | |
a9322a30 TT |
12623 | char *data, *data2, *data3; |
12624 | int i, pagesize; | |
12625 | int fd; | |
12626 | ||
12627 | pagesize = getpagesize (); | |
12628 | ||
12629 | /* First, make a file with some known garbage in it. */ | |
12630 | data = (char *) malloc (pagesize); | |
12631 | if (!data) | |
81ecdfbb | 12632 | return 1; |
a9322a30 TT |
12633 | for (i = 0; i < pagesize; ++i) |
12634 | *(data + i) = rand (); | |
12635 | umask (0); | |
12636 | fd = creat ("conftest.mmap", 0600); | |
12637 | if (fd < 0) | |
81ecdfbb | 12638 | return 1; |
a9322a30 | 12639 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 12640 | return 1; |
a9322a30 TT |
12641 | close (fd); |
12642 | ||
12643 | /* Next, try to mmap the file at a fixed address which already has | |
12644 | something else allocated at it. If we can, also make sure that | |
12645 | we see the same garbage. */ | |
12646 | fd = open ("conftest.mmap", O_RDWR); | |
12647 | if (fd < 0) | |
81ecdfbb | 12648 | return 1; |
a9322a30 TT |
12649 | data2 = (char *) malloc (2 * pagesize); |
12650 | if (!data2) | |
81ecdfbb RW |
12651 | return 1; |
12652 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
12653 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12654 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 12655 | return 1; |
a9322a30 TT |
12656 | for (i = 0; i < pagesize; ++i) |
12657 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 12658 | return 1; |
a9322a30 TT |
12659 | |
12660 | /* Finally, make sure that changes to the mapped area do not | |
12661 | percolate back to the file as seen by read(). (This is a bug on | |
12662 | some variants of i386 svr4.0.) */ | |
12663 | for (i = 0; i < pagesize; ++i) | |
12664 | *(data2 + i) = *(data2 + i) + 1; | |
12665 | data3 = (char *) malloc (pagesize); | |
12666 | if (!data3) | |
81ecdfbb | 12667 | return 1; |
a9322a30 | 12668 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 12669 | return 1; |
a9322a30 TT |
12670 | for (i = 0; i < pagesize; ++i) |
12671 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 12672 | return 1; |
a9322a30 | 12673 | close (fd); |
81ecdfbb | 12674 | return 0; |
bec39cab AC |
12675 | } |
12676 | _ACEOF | |
81ecdfbb | 12677 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12678 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12679 | else |
81ecdfbb | 12680 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12681 | fi |
81ecdfbb RW |
12682 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12683 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12684 | fi |
81ecdfbb | 12685 | |
a9322a30 | 12686 | fi |
81ecdfbb RW |
12687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12688 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12689 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12690 | ||
81ecdfbb | 12691 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12692 | |
086ec9eb | 12693 | fi |
a9322a30 | 12694 | rm -f conftest.mmap |
a3828db0 | 12695 | |
81ecdfbb RW |
12696 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
12697 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 12698 | |
a9322a30 TT |
12699 | else |
12700 | ||
12701 | cat >>confdefs.h <<_ACEOF | |
12702 | #define pid_t int | |
bec39cab | 12703 | _ACEOF |
086ec9eb MK |
12704 | |
12705 | fi | |
12706 | ||
81ecdfbb RW |
12707 | for ac_header in vfork.h |
12708 | do : | |
12709 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
12710 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 12711 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12712 | #define HAVE_VFORK_H 1 |
bec39cab | 12713 | _ACEOF |
c906108c SS |
12714 | |
12715 | fi | |
a9322a30 | 12716 | |
a3828db0 | 12717 | done |
c906108c | 12718 | |
a9322a30 | 12719 | for ac_func in fork vfork |
81ecdfbb RW |
12720 | do : |
12721 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12722 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12723 | eval as_val=\$$as_ac_var | |
12724 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 12725 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12726 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 12727 | _ACEOF |
b83266a0 | 12728 | |
97bf5e38 | 12729 | fi |
a3828db0 | 12730 | done |
b83266a0 | 12731 | |
a9322a30 | 12732 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
12733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
12734 | $as_echo_n "checking for working fork... " >&6; } | |
12735 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
12736 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12737 | else |
81ecdfbb | 12738 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12739 | ac_cv_func_fork_works=cross |
12740 | else | |
81ecdfbb RW |
12741 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12742 | /* end confdefs.h. */ | |
12743 | $ac_includes_default | |
12744 | int | |
12745 | main () | |
12746 | { | |
12747 | ||
12748 | /* By Ruediger Kuhlmann. */ | |
12749 | return fork () < 0; | |
12750 | ||
12751 | ; | |
12752 | return 0; | |
12753 | } | |
a9322a30 | 12754 | _ACEOF |
81ecdfbb | 12755 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12756 | ac_cv_func_fork_works=yes |
12757 | else | |
81ecdfbb | 12758 | ac_cv_func_fork_works=no |
a9322a30 | 12759 | fi |
81ecdfbb RW |
12760 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12761 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12762 | fi |
81ecdfbb | 12763 | |
a9322a30 | 12764 | fi |
81ecdfbb RW |
12765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
12766 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
12767 | |
12768 | else | |
12769 | ac_cv_func_fork_works=$ac_cv_func_fork | |
12770 | fi | |
12771 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12772 | case $host in | |
12773 | *-*-amigaos* | *-*-msdosdjgpp*) | |
12774 | # Override, as these systems have only a dummy fork() stub | |
12775 | ac_cv_func_fork_works=no | |
12776 | ;; | |
12777 | *) | |
12778 | ac_cv_func_fork_works=yes | |
12779 | ;; | |
12780 | esac | |
81ecdfbb RW |
12781 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
12782 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12783 | fi |
12784 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
12785 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
12786 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
12787 | $as_echo_n "checking for working vfork... " >&6; } | |
12788 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
12789 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12790 | else |
81ecdfbb | 12791 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12792 | ac_cv_func_vfork_works=cross |
12793 | else | |
81ecdfbb | 12794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
12795 | /* end confdefs.h. */ |
12796 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 12797 | $ac_includes_default |
a9322a30 | 12798 | #include <sys/wait.h> |
81ecdfbb | 12799 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
12800 | # include <vfork.h> |
12801 | #endif | |
12802 | /* On some sparc systems, changes by the child to local and incoming | |
12803 | argument registers are propagated back to the parent. The compiler | |
12804 | is told about this with #include <vfork.h>, but some compilers | |
12805 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
12806 | static variable whose address is put into a register that is | |
12807 | clobbered by the vfork. */ | |
12808 | static void | |
12809 | #ifdef __cplusplus | |
12810 | sparc_address_test (int arg) | |
12811 | # else | |
12812 | sparc_address_test (arg) int arg; | |
12813 | #endif | |
12814 | { | |
12815 | static pid_t child; | |
12816 | if (!child) { | |
12817 | child = vfork (); | |
12818 | if (child < 0) { | |
12819 | perror ("vfork"); | |
12820 | _exit(2); | |
12821 | } | |
12822 | if (!child) { | |
12823 | arg = getpid(); | |
12824 | write(-1, "", 0); | |
12825 | _exit (arg); | |
12826 | } | |
12827 | } | |
12828 | } | |
12829 | ||
12830 | int | |
12831 | main () | |
12832 | { | |
12833 | pid_t parent = getpid (); | |
12834 | pid_t child; | |
12835 | ||
12836 | sparc_address_test (0); | |
12837 | ||
12838 | child = vfork (); | |
12839 | ||
12840 | if (child == 0) { | |
12841 | /* Here is another test for sparc vfork register problems. This | |
12842 | test uses lots of local variables, at least as many local | |
12843 | variables as main has allocated so far including compiler | |
12844 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
12845 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
12846 | reuse the register of parent for one of the local variables, | |
12847 | since it will think that parent can't possibly be used any more | |
12848 | in this routine. Assigning to the local variable will thus | |
12849 | munge parent in the parent process. */ | |
12850 | pid_t | |
12851 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
12852 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
12853 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
12854 | use the same hardware register for all 8 local variables. */ | |
12855 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
12856 | || p != p5 || p != p6 || p != p7) | |
12857 | _exit(1); | |
12858 | ||
12859 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
12860 | from child file descriptors. If the child closes a descriptor | |
12861 | before it execs or exits, this munges the parent's descriptor | |
12862 | as well. Test for this by closing stdout in the child. */ | |
12863 | _exit(close(fileno(stdout)) != 0); | |
12864 | } else { | |
12865 | int status; | |
12866 | struct stat st; | |
12867 | ||
12868 | while (wait(&status) != child) | |
12869 | ; | |
81ecdfbb | 12870 | return ( |
a9322a30 TT |
12871 | /* Was there some problem with vforking? */ |
12872 | child < 0 | |
12873 | ||
12874 | /* Did the child fail? (This shouldn't happen.) */ | |
12875 | || status | |
12876 | ||
12877 | /* Did the vfork/compiler bug occur? */ | |
12878 | || parent != getpid() | |
12879 | ||
12880 | /* Did the file descriptor bug occur? */ | |
12881 | || fstat(fileno(stdout), &st) != 0 | |
12882 | ); | |
12883 | } | |
12884 | } | |
12885 | _ACEOF | |
81ecdfbb | 12886 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12887 | ac_cv_func_vfork_works=yes |
12888 | else | |
81ecdfbb | 12889 | ac_cv_func_vfork_works=no |
a9322a30 | 12890 | fi |
81ecdfbb RW |
12891 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12892 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12893 | fi |
81ecdfbb | 12894 | |
a9322a30 | 12895 | fi |
81ecdfbb RW |
12896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
12897 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
12898 | |
12899 | fi; | |
12900 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12901 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
12902 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
12903 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12904 | fi |
12905 | ||
12906 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
12907 | ||
81ecdfbb | 12908 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
12909 | |
12910 | else | |
12911 | ||
81ecdfbb | 12912 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
12913 | |
12914 | fi | |
12915 | if test "x$ac_cv_func_fork_works" = xyes; then | |
12916 | ||
81ecdfbb | 12917 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
12918 | |
12919 | fi | |
12920 | ||
a9322a30 | 12921 | for ac_func in canonicalize_file_name realpath getrusage getuid \ |
db5e03ae | 12922 | getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \ |
a9322a30 | 12923 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 12924 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
0a4f61e3 | 12925 | setrlimit getrlimit posix_madvise waitpid |
81ecdfbb RW |
12926 | do : |
12927 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12928 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12929 | eval as_val=\$$as_ac_var | |
12930 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 12931 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12932 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
12933 | _ACEOF |
12934 | ||
12935 | fi | |
12936 | done | |
12937 | ||
12938 | ||
81ecdfbb RW |
12939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
12940 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12941 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
12942 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 12943 | else |
81ecdfbb | 12944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
12945 | /* end confdefs.h. */ |
12946 | #include <langinfo.h> | |
12947 | int | |
12948 | main () | |
12949 | { | |
12950 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
12951 | ; |
12952 | return 0; | |
12953 | } | |
12954 | _ACEOF | |
81ecdfbb | 12955 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 12956 | am_cv_langinfo_codeset=yes |
a4db0f07 | 12957 | else |
81ecdfbb | 12958 | am_cv_langinfo_codeset=no |
a4db0f07 | 12959 | fi |
81ecdfbb RW |
12960 | rm -f core conftest.err conftest.$ac_objext \ |
12961 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 12962 | |
a4db0f07 | 12963 | fi |
81ecdfbb RW |
12964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12965 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
12966 | if test $am_cv_langinfo_codeset = yes; then |
12967 | ||
81ecdfbb | 12968 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 12969 | |
6c7a06a3 | 12970 | fi |
c906108c | 12971 | |
06825bd1 | 12972 | |
a3828db0 MK |
12973 | # Check the return and argument types of ptrace. No canned test for |
12974 | # this, so roll our own. | |
12975 | gdb_ptrace_headers=' | |
12976 | #if HAVE_SYS_TYPES_H | |
12977 | # include <sys/types.h> | |
12978 | #endif | |
12979 | #if HAVE_SYS_PTRACE_H | |
12980 | # include <sys/ptrace.h> | |
12981 | #endif | |
12982 | #if HAVE_UNISTD_H | |
12983 | # include <unistd.h> | |
12984 | #endif | |
12985 | ' | |
12986 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
12987 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
12988 | " | |
12989 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
12990 | ac_have_decl=1 | |
06825bd1 | 12991 | else |
81ecdfbb | 12992 | ac_have_decl=0 |
06825bd1 | 12993 | fi |
06825bd1 | 12994 | |
a3828db0 | 12995 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12996 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 12997 | _ACEOF |
81ecdfbb | 12998 | if test $ac_have_decl = 1; then : |
bec39cab | 12999 | |
a3828db0 | 13000 | else |
a3828db0 MK |
13001 | |
13002 | : ${gdb_cv_func_ptrace_ret='int'} | |
13003 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13004 | ||
06825bd1 MK |
13005 | fi |
13006 | ||
064ef605 DJ |
13007 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
13008 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
13009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
13010 | $as_echo_n "checking return type of ptrace... " >&6; } | |
13011 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
13012 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13013 | else |
81ecdfbb | 13014 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13015 | /* end confdefs.h. */ |
a3828db0 | 13016 | $gdb_ptrace_headers |
bec39cab AC |
13017 | int |
13018 | main () | |
13019 | { | |
064ef605 DJ |
13020 | extern long ptrace (enum __ptrace_request, ...); |
13021 | ; | |
13022 | return 0; | |
13023 | } | |
13024 | _ACEOF | |
81ecdfbb | 13025 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
13026 | gdb_cv_func_ptrace_ret='long' |
13027 | else | |
81ecdfbb | 13028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13029 | /* end confdefs.h. */ |
13030 | $gdb_ptrace_headers | |
13031 | int | |
13032 | main () | |
13033 | { | |
a3828db0 | 13034 | extern int ptrace (); |
bec39cab AC |
13035 | ; |
13036 | return 0; | |
13037 | } | |
13038 | _ACEOF | |
81ecdfbb | 13039 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13040 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 13041 | else |
81ecdfbb | 13042 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 13043 | fi |
81ecdfbb | 13044 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 13045 | fi |
81ecdfbb | 13046 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 13047 | fi |
81ecdfbb RW |
13048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
13049 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 13050 | |
a3828db0 MK |
13051 | cat >>confdefs.h <<_ACEOF |
13052 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 13053 | _ACEOF |
70f9f479 | 13054 | |
a3828db0 | 13055 | # Check argument types. |
81ecdfbb RW |
13056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
13057 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
13058 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
13059 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13060 | else |
a3828db0 | 13061 | |
81ecdfbb | 13062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13063 | /* end confdefs.h. */ |
13064 | $gdb_ptrace_headers | |
13065 | int | |
13066 | main () | |
13067 | { | |
13068 | extern long ptrace (enum __ptrace_request, ...); | |
13069 | ; | |
13070 | return 0; | |
13071 | } | |
13072 | _ACEOF | |
81ecdfbb | 13073 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
13074 | gdb_cv_func_ptrace_args='int,int,long,long' |
13075 | else | |
064ef605 | 13076 | |
a3828db0 MK |
13077 | for gdb_arg1 in 'int' 'long'; do |
13078 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 13079 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 13080 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 13081 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13082 | /* end confdefs.h. */ |
a3828db0 | 13083 | $gdb_ptrace_headers |
bec39cab AC |
13084 | int |
13085 | main () | |
13086 | { | |
a3828db0 MK |
13087 | |
13088 | extern $gdb_cv_func_ptrace_ret | |
13089 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
13090 | ||
bec39cab AC |
13091 | ; |
13092 | return 0; | |
13093 | } | |
13094 | _ACEOF | |
81ecdfbb | 13095 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13096 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
13097 | break 4; | |
5c7f2947 | 13098 | fi |
81ecdfbb | 13099 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 13100 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 13101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13102 | /* end confdefs.h. */ |
a3828db0 | 13103 | $gdb_ptrace_headers |
bec39cab AC |
13104 | int |
13105 | main () | |
13106 | { | |
a3828db0 MK |
13107 | |
13108 | extern $gdb_cv_func_ptrace_ret | |
13109 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
13110 | ||
bec39cab AC |
13111 | ; |
13112 | return 0; | |
13113 | } | |
13114 | _ACEOF | |
81ecdfbb | 13115 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13116 | |
13117 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
13118 | break 5; | |
78434e59 | 13119 | fi |
81ecdfbb | 13120 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
13121 | done |
13122 | done | |
13123 | done | |
13124 | done | |
13125 | done | |
13126 | # Provide a safe default value. | |
13127 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13128 | ||
064ef605 | 13129 | fi |
81ecdfbb | 13130 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 13131 | fi |
81ecdfbb RW |
13132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
13133 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
13134 | ac_save_IFS=$IFS; IFS=',' |
13135 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
13136 | IFS=$ac_save_IFS | |
13137 | shift | |
bec39cab | 13138 | |
a3828db0 MK |
13139 | cat >>confdefs.h <<_ACEOF |
13140 | #define PTRACE_TYPE_ARG3 $3 | |
13141 | _ACEOF | |
13142 | ||
13143 | if test -n "$5"; then | |
13144 | ||
13145 | cat >>confdefs.h <<_ACEOF | |
13146 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 13147 | _ACEOF |
78434e59 MK |
13148 | |
13149 | fi | |
13150 | ||
a3828db0 | 13151 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
13152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13153 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13154 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13155 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 13156 | else |
81ecdfbb RW |
13157 | if test "$cross_compiling" = yes; then : |
13158 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 13159 | else |
81ecdfbb | 13160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13161 | /* end confdefs.h. */ |
81ecdfbb | 13162 | $ac_includes_default |
bec39cab AC |
13163 | int |
13164 | main () | |
13165 | { | |
a3828db0 MK |
13166 | /* If this system has a BSD-style setpgrp which takes arguments, |
13167 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
13168 | exit successfully. */ | |
81ecdfbb | 13169 | return setpgrp (1,1) != -1; |
bec39cab AC |
13170 | ; |
13171 | return 0; | |
13172 | } | |
13173 | _ACEOF | |
81ecdfbb | 13174 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 13175 | ac_cv_func_setpgrp_void=no |
c906108c | 13176 | else |
81ecdfbb | 13177 | ac_cv_func_setpgrp_void=yes |
c906108c | 13178 | fi |
81ecdfbb RW |
13179 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13180 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13181 | fi |
81ecdfbb | 13182 | |
a3828db0 | 13183 | fi |
81ecdfbb RW |
13184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13185 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
13186 | if test $ac_cv_func_setpgrp_void = yes; then |
13187 | ||
81ecdfbb | 13188 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
13189 | |
13190 | fi | |
a3828db0 MK |
13191 | |
13192 | else | |
81ecdfbb RW |
13193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13194 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
13195 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
13196 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13197 | else |
81ecdfbb | 13198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13199 | /* end confdefs.h. */ |
a3828db0 MK |
13200 | |
13201 | #include <unistd.h> | |
13202 | ||
bec39cab AC |
13203 | int |
13204 | main () | |
13205 | { | |
a3828db0 MK |
13206 | |
13207 | if (setpgrp(1,1) == -1) | |
13208 | exit (0); | |
13209 | else | |
13210 | exit (1); | |
13211 | ||
bec39cab AC |
13212 | ; |
13213 | return 0; | |
13214 | } | |
13215 | _ACEOF | |
81ecdfbb | 13216 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13217 | ac_cv_func_setpgrp_void=no |
c906108c | 13218 | else |
81ecdfbb | 13219 | ac_cv_func_setpgrp_void=yes |
c906108c | 13220 | fi |
81ecdfbb | 13221 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13222 | fi |
81ecdfbb RW |
13223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13224 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 13225 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 13226 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 13227 | |
a3828db0 | 13228 | fi |
c906108c SS |
13229 | fi |
13230 | ||
a3828db0 MK |
13231 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
13232 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
13233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
13234 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
13235 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
13236 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13237 | else |
81ecdfbb | 13238 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13239 | /* end confdefs.h. */ |
a3828db0 MK |
13240 | |
13241 | #include <setjmp.h> | |
13242 | ||
bec39cab AC |
13243 | int |
13244 | main () | |
13245 | { | |
a3828db0 | 13246 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
13247 | ; |
13248 | return 0; | |
13249 | } | |
13250 | _ACEOF | |
81ecdfbb | 13251 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13252 | gdb_cv_func_sigsetjmp=yes |
c906108c | 13253 | else |
81ecdfbb | 13254 | gdb_cv_func_sigsetjmp=no |
c906108c | 13255 | fi |
81ecdfbb | 13256 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13257 | fi |
81ecdfbb RW |
13258 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
13259 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 13260 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 13261 | |
81ecdfbb | 13262 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 13263 | |
97bf5e38 | 13264 | fi |
c906108c | 13265 | |
a3828db0 MK |
13266 | # Assume we'll default to using the included libiberty regex. |
13267 | gdb_use_included_regex=yes | |
13268 | ||
13269 | # However, if the system regex is GNU regex, then default to *not* | |
13270 | # using the included regex. | |
81ecdfbb RW |
13271 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
13272 | $as_echo_n "checking for GNU regex... " >&6; } | |
13273 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
13274 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13275 | else |
81ecdfbb | 13276 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13277 | /* end confdefs.h. */ |
a3828db0 | 13278 | #include <gnu-versions.h> |
bec39cab AC |
13279 | int |
13280 | main () | |
13281 | { | |
81ecdfbb RW |
13282 | #define REGEX_INTERFACE_VERSION 1 |
13283 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
13284 | # error "Version mismatch" | |
13285 | #endif | |
5c45e068 MK |
13286 | ; |
13287 | return 0; | |
13288 | } | |
13289 | _ACEOF | |
81ecdfbb RW |
13290 | if ac_fn_c_try_compile "$LINENO"; then : |
13291 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 13292 | else |
81ecdfbb RW |
13293 | gdb_cv_have_gnu_regex=no |
13294 | fi | |
13295 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13296 | fi | |
13297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
13298 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
13299 | if test $gdb_cv_have_gnu_regex = yes; then | |
13300 | gdb_use_included_regex=no | |
5c45e068 | 13301 | fi |
81ecdfbb RW |
13302 | |
13303 | ||
13304 | # Check whether --with-included-regex was given. | |
13305 | if test "${with_included_regex+set}" = set; then : | |
13306 | withval=$with_included_regex; gdb_with_regex=$withval | |
13307 | else | |
13308 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 13309 | fi |
81ecdfbb RW |
13310 | |
13311 | if test "$gdb_with_regex" = yes; then | |
13312 | ||
13313 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
13314 | ||
c906108c | 13315 | fi |
81ecdfbb RW |
13316 | |
13317 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
13318 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
13319 | #include <sys/proc.h> | |
13320 | ||
13321 | " | |
13322 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 13323 | |
5c45e068 | 13324 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 13325 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 13326 | _ACEOF |
c906108c | 13327 | |
5c45e068 | 13328 | |
97bf5e38 | 13329 | fi |
c906108c | 13330 | |
5c45e068 | 13331 | |
a3828db0 | 13332 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
13333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
13334 | $as_echo_n "checking for struct lwp... " >&6; } | |
13335 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
13336 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13337 | else |
81ecdfbb | 13338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13339 | /* end confdefs.h. */ |
a3828db0 MK |
13340 | #include <sys/param.h> |
13341 | #include <sys/lwp.h> | |
bec39cab AC |
13342 | int |
13343 | main () | |
13344 | { | |
a3828db0 | 13345 | struct lwp l; |
bec39cab AC |
13346 | ; |
13347 | return 0; | |
13348 | } | |
13349 | _ACEOF | |
81ecdfbb | 13350 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13351 | gdb_cv_struct_lwp=yes |
c906108c | 13352 | else |
81ecdfbb | 13353 | gdb_cv_struct_lwp=no |
c906108c | 13354 | fi |
81ecdfbb | 13355 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13356 | fi |
81ecdfbb RW |
13357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
13358 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 13359 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 13360 | |
81ecdfbb | 13361 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 13362 | |
97bf5e38 | 13363 | fi |
c906108c | 13364 | |
a3828db0 | 13365 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
13366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
13367 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
13368 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
13369 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13370 | else |
81ecdfbb | 13371 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13372 | /* end confdefs.h. */ |
a3828db0 MK |
13373 | #include <sys/types.h> |
13374 | #include <machine/reg.h> | |
bec39cab AC |
13375 | int |
13376 | main () | |
13377 | { | |
a3828db0 | 13378 | struct reg r; |
bec39cab AC |
13379 | ; |
13380 | return 0; | |
13381 | } | |
13382 | _ACEOF | |
81ecdfbb | 13383 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13384 | gdb_cv_struct_reg=yes |
27ca5dad | 13385 | else |
81ecdfbb | 13386 | gdb_cv_struct_reg=no |
27ca5dad | 13387 | fi |
81ecdfbb | 13388 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 13389 | fi |
81ecdfbb RW |
13390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
13391 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 13392 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 13393 | |
81ecdfbb | 13394 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
13395 | |
13396 | fi | |
97bf5e38 | 13397 | |
a3828db0 MK |
13398 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
13399 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
13400 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
13401 | " | |
13402 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
13403 | |
13404 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 13405 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 13406 | _ACEOF |
3862412b | 13407 | |
5c45e068 | 13408 | |
97bf5e38 | 13409 | fi |
81ecdfbb RW |
13410 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
13411 | " | |
13412 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
13413 | |
13414 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 13415 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 13416 | _ACEOF |
3862412b | 13417 | |
5c45e068 | 13418 | |
97bf5e38 | 13419 | fi |
3862412b | 13420 | |
5c45e068 | 13421 | |
a3828db0 | 13422 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
13423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
13424 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
13425 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
13426 | $as_echo_n "(cached) " >&6 | |
451928c5 | 13427 | else |
81ecdfbb | 13428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13429 | /* end confdefs.h. */ |
a3828db0 | 13430 | #include <sys/ptrace.h> |
bec39cab AC |
13431 | int |
13432 | main () | |
13433 | { | |
a3828db0 | 13434 | PTRACE_GETREGS; |
bec39cab AC |
13435 | ; |
13436 | return 0; | |
13437 | } | |
13438 | _ACEOF | |
81ecdfbb | 13439 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13440 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 13441 | else |
81ecdfbb | 13442 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 13443 | fi |
81ecdfbb | 13444 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13445 | fi |
13446 | ||
81ecdfbb RW |
13447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
13448 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 13449 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 13450 | |
81ecdfbb | 13451 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 13452 | |
97bf5e38 | 13453 | fi |
451928c5 | 13454 | |
a3828db0 | 13455 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
13456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
13457 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
13458 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
13459 | $as_echo_n "(cached) " >&6 | |
451928c5 | 13460 | else |
81ecdfbb | 13461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13462 | /* end confdefs.h. */ |
a3828db0 | 13463 | #include <sys/ptrace.h> |
bec39cab AC |
13464 | int |
13465 | main () | |
13466 | { | |
a3828db0 | 13467 | PTRACE_GETFPXREGS; |
bec39cab AC |
13468 | ; |
13469 | return 0; | |
13470 | } | |
13471 | _ACEOF | |
81ecdfbb | 13472 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13473 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 13474 | else |
81ecdfbb | 13475 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 13476 | fi |
81ecdfbb | 13477 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13478 | fi |
13479 | ||
81ecdfbb RW |
13480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
13481 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 13482 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 13483 | |
81ecdfbb | 13484 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 13485 | |
97bf5e38 | 13486 | fi |
451928c5 | 13487 | |
a3828db0 | 13488 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
13489 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
13490 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
13491 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
13492 | $as_echo_n "(cached) " >&6 | |
3862412b | 13493 | else |
81ecdfbb | 13494 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13495 | /* end confdefs.h. */ |
a3828db0 MK |
13496 | #include <sys/types.h> |
13497 | #include <sys/ptrace.h> | |
bec39cab AC |
13498 | int |
13499 | main () | |
13500 | { | |
a3828db0 | 13501 | PT_GETDBREGS; |
bec39cab AC |
13502 | ; |
13503 | return 0; | |
13504 | } | |
13505 | _ACEOF | |
81ecdfbb | 13506 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13507 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 13508 | else |
81ecdfbb | 13509 | gdb_cv_have_pt_getdbregs=no |
3862412b | 13510 | fi |
81ecdfbb | 13511 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13512 | fi |
13513 | ||
81ecdfbb RW |
13514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
13515 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 13516 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 13517 | |
81ecdfbb | 13518 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 13519 | |
97bf5e38 | 13520 | fi |
3862412b | 13521 | |
a3828db0 | 13522 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
13523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
13524 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
13525 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
13526 | $as_echo_n "(cached) " >&6 | |
3862412b | 13527 | else |
81ecdfbb | 13528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13529 | /* end confdefs.h. */ |
a3828db0 MK |
13530 | #include <sys/types.h> |
13531 | #include <sys/ptrace.h> | |
bec39cab AC |
13532 | int |
13533 | main () | |
13534 | { | |
a3828db0 | 13535 | PT_GETXMMREGS; |
bec39cab AC |
13536 | ; |
13537 | return 0; | |
13538 | } | |
13539 | _ACEOF | |
81ecdfbb | 13540 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13541 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 13542 | else |
81ecdfbb | 13543 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 13544 | fi |
81ecdfbb | 13545 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13546 | fi |
13547 | ||
81ecdfbb RW |
13548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
13549 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 13550 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 13551 | |
81ecdfbb | 13552 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 13553 | |
97bf5e38 | 13554 | fi |
3862412b | 13555 | |
eb368090 | 13556 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
13557 | |
13558 | if test "${target}" = "${host}"; then | |
13559 | case "${host}" in | |
97bf5e38 | 13560 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 13561 | |
81ecdfbb | 13562 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
13563 | |
13564 | ;; | |
c162e8c9 | 13565 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 13566 | |
81ecdfbb | 13567 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
13568 | |
13569 | ;; | |
13570 | mips-sgi-irix5*) | |
13571 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 13572 | |
81ecdfbb | 13573 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
13574 | |
13575 | ;; | |
13576 | esac | |
13577 | fi | |
13578 | ||
13579 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
13580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
13581 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
13582 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
13583 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13584 | else |
81ecdfbb | 13585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13586 | /* end confdefs.h. */ |
596c9d4b KB |
13587 | |
13588 | #define _SYSCALL32 | |
d30c5336 JK |
13589 | /* Needed for new procfs interface on sparc-solaris. */ |
13590 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13591 | #include <sys/procfs.h> |
bec39cab AC |
13592 | int |
13593 | main () | |
13594 | { | |
97bf5e38 | 13595 | pstatus_t avar |
bec39cab AC |
13596 | ; |
13597 | return 0; | |
13598 | } | |
13599 | _ACEOF | |
81ecdfbb | 13600 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13601 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 13602 | else |
81ecdfbb | 13603 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 13604 | |
596c9d4b | 13605 | fi |
81ecdfbb | 13606 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13607 | fi |
13608 | ||
97bf5e38 | 13609 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 13610 | |
81ecdfbb | 13611 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
13612 | |
13613 | fi | |
81ecdfbb RW |
13614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
13615 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 13616 | |
81ecdfbb RW |
13617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
13618 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
13619 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
13620 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13621 | else |
81ecdfbb | 13622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13623 | /* end confdefs.h. */ |
596c9d4b KB |
13624 | |
13625 | #define _SYSCALL32 | |
d30c5336 JK |
13626 | /* Needed for new procfs interface on sparc-solaris. */ |
13627 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13628 | #include <sys/procfs.h> |
bec39cab AC |
13629 | int |
13630 | main () | |
13631 | { | |
97bf5e38 | 13632 | prrun_t avar |
bec39cab AC |
13633 | ; |
13634 | return 0; | |
13635 | } | |
13636 | _ACEOF | |
81ecdfbb | 13637 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13638 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 13639 | else |
81ecdfbb | 13640 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 13641 | |
596c9d4b | 13642 | fi |
81ecdfbb | 13643 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13644 | fi |
13645 | ||
97bf5e38 | 13646 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 13647 | |
81ecdfbb | 13648 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
13649 | |
13650 | fi | |
81ecdfbb RW |
13651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
13652 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 13653 | |
81ecdfbb RW |
13654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
13655 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
13656 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
13657 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13658 | else |
81ecdfbb | 13659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13660 | /* end confdefs.h. */ |
596c9d4b KB |
13661 | |
13662 | #define _SYSCALL32 | |
d30c5336 JK |
13663 | /* Needed for new procfs interface on sparc-solaris. */ |
13664 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13665 | #include <sys/procfs.h> |
bec39cab AC |
13666 | int |
13667 | main () | |
13668 | { | |
97bf5e38 | 13669 | gregset_t avar |
bec39cab AC |
13670 | ; |
13671 | return 0; | |
13672 | } | |
13673 | _ACEOF | |
81ecdfbb | 13674 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13675 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 13676 | else |
81ecdfbb | 13677 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 13678 | |
596c9d4b | 13679 | fi |
81ecdfbb | 13680 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13681 | fi |
13682 | ||
97bf5e38 | 13683 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 13684 | |
81ecdfbb | 13685 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
13686 | |
13687 | fi | |
81ecdfbb RW |
13688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
13689 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 13690 | |
81ecdfbb RW |
13691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
13692 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
13693 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
13694 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 13695 | else |
81ecdfbb | 13696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13697 | /* end confdefs.h. */ |
97bf5e38 MK |
13698 | |
13699 | #define _SYSCALL32 | |
d30c5336 JK |
13700 | /* Needed for new procfs interface on sparc-solaris. */ |
13701 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 13702 | #include <sys/procfs.h> |
bec39cab AC |
13703 | int |
13704 | main () | |
13705 | { | |
97bf5e38 | 13706 | fpregset_t avar |
bec39cab AC |
13707 | ; |
13708 | return 0; | |
13709 | } | |
13710 | _ACEOF | |
81ecdfbb | 13711 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13712 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 13713 | else |
81ecdfbb | 13714 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 13715 | |
d84dd0c5 | 13716 | fi |
81ecdfbb | 13717 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
13718 | fi |
13719 | ||
97bf5e38 | 13720 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 13721 | |
81ecdfbb | 13722 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 13723 | |
97bf5e38 | 13724 | fi |
81ecdfbb RW |
13725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
13726 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 13727 | |
81ecdfbb RW |
13728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
13729 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
13730 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
13731 | $as_echo_n "(cached) " >&6 | |
c906108c | 13732 | else |
81ecdfbb | 13733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13734 | /* end confdefs.h. */ |
c906108c | 13735 | |
97bf5e38 | 13736 | #define _SYSCALL32 |
d30c5336 JK |
13737 | /* Needed for new procfs interface on sparc-solaris. */ |
13738 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13739 | #include <sys/procfs.h> |
bec39cab AC |
13740 | int |
13741 | main () | |
13742 | { | |
97bf5e38 | 13743 | prgregset_t avar |
bec39cab AC |
13744 | ; |
13745 | return 0; | |
13746 | } | |
13747 | _ACEOF | |
81ecdfbb | 13748 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13749 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 13750 | else |
81ecdfbb | 13751 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 13752 | |
c906108c | 13753 | fi |
81ecdfbb | 13754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13755 | fi |
13756 | ||
97bf5e38 | 13757 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 13758 | |
81ecdfbb | 13759 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 13760 | |
97bf5e38 | 13761 | fi |
81ecdfbb RW |
13762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
13763 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 13764 | |
81ecdfbb RW |
13765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
13766 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
13767 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
13768 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13769 | else |
81ecdfbb | 13770 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13771 | /* end confdefs.h. */ |
97bf5e38 MK |
13772 | |
13773 | #define _SYSCALL32 | |
d30c5336 JK |
13774 | /* Needed for new procfs interface on sparc-solaris. */ |
13775 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13776 | #include <sys/procfs.h> |
bec39cab AC |
13777 | int |
13778 | main () | |
13779 | { | |
97bf5e38 | 13780 | prfpregset_t avar |
bec39cab AC |
13781 | ; |
13782 | return 0; | |
13783 | } | |
13784 | _ACEOF | |
81ecdfbb | 13785 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13786 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 13787 | else |
81ecdfbb | 13788 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 13789 | |
d45fe813 | 13790 | fi |
81ecdfbb | 13791 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13792 | fi |
13793 | ||
97bf5e38 | 13794 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 13795 | |
81ecdfbb | 13796 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 13797 | |
97bf5e38 | 13798 | fi |
81ecdfbb RW |
13799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
13800 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 13801 | |
81ecdfbb RW |
13802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
13803 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
13804 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
13805 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13806 | else |
81ecdfbb | 13807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13808 | /* end confdefs.h. */ |
97bf5e38 MK |
13809 | |
13810 | #define _SYSCALL32 | |
d30c5336 JK |
13811 | /* Needed for new procfs interface on sparc-solaris. */ |
13812 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13813 | #include <sys/procfs.h> |
bec39cab AC |
13814 | int |
13815 | main () | |
13816 | { | |
97bf5e38 | 13817 | prgregset32_t avar |
bec39cab AC |
13818 | ; |
13819 | return 0; | |
13820 | } | |
13821 | _ACEOF | |
81ecdfbb | 13822 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13823 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 13824 | else |
81ecdfbb | 13825 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 13826 | |
d45fe813 | 13827 | fi |
81ecdfbb | 13828 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13829 | fi |
13830 | ||
97bf5e38 | 13831 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 13832 | |
81ecdfbb | 13833 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 13834 | |
97bf5e38 | 13835 | fi |
81ecdfbb RW |
13836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
13837 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 13838 | |
81ecdfbb RW |
13839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
13840 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
13841 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
13842 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13843 | else |
81ecdfbb | 13844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13845 | /* end confdefs.h. */ |
97bf5e38 MK |
13846 | |
13847 | #define _SYSCALL32 | |
d30c5336 JK |
13848 | /* Needed for new procfs interface on sparc-solaris. */ |
13849 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13850 | #include <sys/procfs.h> |
bec39cab AC |
13851 | int |
13852 | main () | |
13853 | { | |
97bf5e38 | 13854 | prfpregset32_t avar |
bec39cab AC |
13855 | ; |
13856 | return 0; | |
13857 | } | |
13858 | _ACEOF | |
81ecdfbb | 13859 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13860 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 13861 | else |
81ecdfbb | 13862 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 13863 | |
d45fe813 | 13864 | fi |
81ecdfbb | 13865 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13866 | fi |
13867 | ||
97bf5e38 | 13868 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 13869 | |
81ecdfbb | 13870 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 13871 | |
97bf5e38 | 13872 | fi |
81ecdfbb RW |
13873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
13874 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 13875 | |
81ecdfbb RW |
13876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
13877 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
13878 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
13879 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13880 | else |
81ecdfbb | 13881 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13882 | /* end confdefs.h. */ |
97bf5e38 | 13883 | |
d45fe813 | 13884 | #define _SYSCALL32 |
d30c5336 JK |
13885 | /* Needed for new procfs interface on sparc-solaris. */ |
13886 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13887 | #include <sys/procfs.h> |
bec39cab AC |
13888 | int |
13889 | main () | |
13890 | { | |
97bf5e38 | 13891 | lwpid_t avar |
bec39cab AC |
13892 | ; |
13893 | return 0; | |
13894 | } | |
13895 | _ACEOF | |
81ecdfbb | 13896 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13897 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 13898 | else |
81ecdfbb | 13899 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 13900 | |
d45fe813 | 13901 | fi |
81ecdfbb | 13902 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13903 | fi |
13904 | ||
97bf5e38 | 13905 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 13906 | |
81ecdfbb | 13907 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 13908 | |
97bf5e38 | 13909 | fi |
81ecdfbb RW |
13910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
13911 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 13912 | |
81ecdfbb RW |
13913 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
13914 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
13915 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
13916 | $as_echo_n "(cached) " >&6 | |
c906108c | 13917 | else |
81ecdfbb | 13918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13919 | /* end confdefs.h. */ |
c906108c | 13920 | |
97bf5e38 | 13921 | #define _SYSCALL32 |
d30c5336 JK |
13922 | /* Needed for new procfs interface on sparc-solaris. */ |
13923 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13924 | #include <sys/procfs.h> |
bec39cab AC |
13925 | int |
13926 | main () | |
13927 | { | |
97bf5e38 | 13928 | psaddr_t avar |
bec39cab AC |
13929 | ; |
13930 | return 0; | |
13931 | } | |
13932 | _ACEOF | |
81ecdfbb | 13933 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13934 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 13935 | else |
81ecdfbb | 13936 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 13937 | |
c906108c | 13938 | fi |
81ecdfbb | 13939 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13940 | fi |
13941 | ||
97bf5e38 | 13942 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 13943 | |
81ecdfbb | 13944 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 13945 | |
97bf5e38 | 13946 | fi |
81ecdfbb RW |
13947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
13948 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 13949 | |
81ecdfbb RW |
13950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
13951 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
13952 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
13953 | $as_echo_n "(cached) " >&6 | |
c906108c | 13954 | else |
81ecdfbb | 13955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13956 | /* end confdefs.h. */ |
c906108c | 13957 | |
97bf5e38 | 13958 | #define _SYSCALL32 |
d30c5336 JK |
13959 | /* Needed for new procfs interface on sparc-solaris. */ |
13960 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13961 | #include <sys/procfs.h> |
bec39cab AC |
13962 | int |
13963 | main () | |
13964 | { | |
97bf5e38 | 13965 | prsysent_t avar |
bec39cab AC |
13966 | ; |
13967 | return 0; | |
13968 | } | |
13969 | _ACEOF | |
81ecdfbb | 13970 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13971 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 13972 | else |
81ecdfbb | 13973 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 13974 | |
c906108c | 13975 | fi |
81ecdfbb | 13976 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13977 | fi |
13978 | ||
97bf5e38 | 13979 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 13980 | |
81ecdfbb | 13981 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 13982 | |
97bf5e38 | 13983 | fi |
81ecdfbb RW |
13984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
13985 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 13986 | |
81ecdfbb RW |
13987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
13988 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
13989 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
13990 | $as_echo_n "(cached) " >&6 | |
c906108c | 13991 | else |
81ecdfbb | 13992 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13993 | /* end confdefs.h. */ |
c906108c | 13994 | |
97bf5e38 | 13995 | #define _SYSCALL32 |
d30c5336 JK |
13996 | /* Needed for new procfs interface on sparc-solaris. */ |
13997 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13998 | #include <sys/procfs.h> |
bec39cab AC |
13999 | int |
14000 | main () | |
14001 | { | |
97bf5e38 | 14002 | pr_sigset_t avar |
bec39cab AC |
14003 | ; |
14004 | return 0; | |
14005 | } | |
14006 | _ACEOF | |
81ecdfbb | 14007 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14008 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 14009 | else |
81ecdfbb | 14010 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 14011 | |
c906108c | 14012 | fi |
81ecdfbb | 14013 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14014 | fi |
14015 | ||
97bf5e38 | 14016 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 14017 | |
81ecdfbb | 14018 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 14019 | |
97bf5e38 | 14020 | fi |
81ecdfbb RW |
14021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
14022 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 14023 | |
81ecdfbb RW |
14024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
14025 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
14026 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
14027 | $as_echo_n "(cached) " >&6 | |
c906108c | 14028 | else |
81ecdfbb | 14029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14030 | /* end confdefs.h. */ |
c906108c | 14031 | |
97bf5e38 | 14032 | #define _SYSCALL32 |
d30c5336 JK |
14033 | /* Needed for new procfs interface on sparc-solaris. */ |
14034 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14035 | #include <sys/procfs.h> |
bec39cab AC |
14036 | int |
14037 | main () | |
14038 | { | |
97bf5e38 | 14039 | pr_sigaction64_t avar |
bec39cab AC |
14040 | ; |
14041 | return 0; | |
14042 | } | |
14043 | _ACEOF | |
81ecdfbb | 14044 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14045 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 14046 | else |
81ecdfbb | 14047 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 14048 | |
c906108c | 14049 | fi |
81ecdfbb | 14050 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14051 | fi |
14052 | ||
97bf5e38 | 14053 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 14054 | |
81ecdfbb | 14055 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 14056 | |
97bf5e38 | 14057 | fi |
81ecdfbb RW |
14058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
14059 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 14060 | |
81ecdfbb RW |
14061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
14062 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
14063 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
14064 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14065 | else |
81ecdfbb | 14066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14067 | /* end confdefs.h. */ |
97bf5e38 MK |
14068 | |
14069 | #define _SYSCALL32 | |
d30c5336 JK |
14070 | /* Needed for new procfs interface on sparc-solaris. */ |
14071 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14072 | #include <sys/procfs.h> |
bec39cab AC |
14073 | int |
14074 | main () | |
14075 | { | |
97bf5e38 | 14076 | pr_siginfo64_t avar |
bec39cab AC |
14077 | ; |
14078 | return 0; | |
14079 | } | |
14080 | _ACEOF | |
81ecdfbb | 14081 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14082 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
14083 | else | |
81ecdfbb | 14084 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 14085 | |
97bf5e38 | 14086 | fi |
81ecdfbb | 14087 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14088 | fi |
c906108c | 14089 | |
97bf5e38 | 14090 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 14091 | |
81ecdfbb | 14092 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 14093 | |
97bf5e38 | 14094 | fi |
81ecdfbb RW |
14095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
14096 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
14097 | |
14098 | ||
97bf5e38 MK |
14099 | |
14100 | ||
14101 | ||
97bf5e38 | 14102 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
14103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
14104 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
14105 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
14106 | $as_echo_n "(cached) " >&6 | |
c906108c | 14107 | else |
81ecdfbb | 14108 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 14109 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 14110 | else |
81ecdfbb | 14111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14112 | /* end confdefs.h. */ |
97bf5e38 MK |
14113 | #include <sys/procfs.h> |
14114 | int main () | |
14115 | { | |
14116 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
14117 | return 1; | |
14118 | return 0; | |
14119 | } | |
bec39cab | 14120 | _ACEOF |
81ecdfbb | 14121 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14122 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
14123 | else |
14124 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 14125 | fi |
81ecdfbb RW |
14126 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14127 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14128 | fi |
81ecdfbb | 14129 | |
c906108c SS |
14130 | fi |
14131 | ||
81ecdfbb RW |
14132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
14133 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 14134 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 14135 | |
81ecdfbb | 14136 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 14137 | |
97bf5e38 MK |
14138 | fi |
14139 | fi | |
c906108c | 14140 | |
bec39cab | 14141 | |
81ecdfbb RW |
14142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
14143 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
14144 | if test "${gdb_cv_have_procfs_piocset+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. */ |
97bf5e38 MK |
14149 | #include <unistd.h> |
14150 | #include <sys/types.h> | |
14151 | #include <sys/procfs.h> | |
14152 | ||
bec39cab AC |
14153 | int |
14154 | main () | |
14155 | { | |
97bf5e38 MK |
14156 | |
14157 | int dummy;; | |
14158 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
14159 | |
14160 | ; | |
14161 | return 0; | |
14162 | } | |
14163 | _ACEOF | |
81ecdfbb | 14164 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14165 | gdb_cv_have_procfs_piocset=yes |
c906108c | 14166 | else |
81ecdfbb | 14167 | gdb_cv_have_procfs_piocset=no |
c906108c | 14168 | fi |
81ecdfbb | 14169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14170 | fi |
97bf5e38 | 14171 | |
81ecdfbb RW |
14172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
14173 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 14174 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 14175 | |
81ecdfbb | 14176 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
14177 | |
14178 | fi | |
c906108c | 14179 | fi |
c906108c | 14180 | |
97bf5e38 | 14181 | if test ${host} = ${target} ; then |
bec39cab | 14182 | |
81ecdfbb RW |
14183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
14184 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
14185 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
14186 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14187 | else |
81ecdfbb | 14188 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14189 | /* end confdefs.h. */ |
97bf5e38 | 14190 | #include <link.h> |
bec39cab AC |
14191 | int |
14192 | main () | |
14193 | { | |
97bf5e38 | 14194 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
14195 | ; |
14196 | return 0; | |
14197 | } | |
14198 | _ACEOF | |
81ecdfbb | 14199 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14200 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 14201 | else |
81ecdfbb | 14202 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 14203 | fi |
81ecdfbb | 14204 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14205 | fi |
14206 | ||
81ecdfbb RW |
14207 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
14208 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 14209 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 14210 | |
81ecdfbb | 14211 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
14212 | |
14213 | fi | |
14214 | ||
bec39cab | 14215 | |
81ecdfbb RW |
14216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
14217 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
14218 | if test "${gdb_cv_have_struct_link_map_with_lm_members+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. */ |
97bf5e38 MK |
14223 | #include <sys/types.h> |
14224 | #include <link.h> | |
bec39cab AC |
14225 | int |
14226 | main () | |
14227 | { | |
97bf5e38 | 14228 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
14229 | ; |
14230 | return 0; | |
14231 | } | |
14232 | _ACEOF | |
81ecdfbb | 14233 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14234 | gdb_cv_have_struct_link_map_with_lm_members=yes |
14235 | else | |
81ecdfbb | 14236 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 14237 | fi |
81ecdfbb | 14238 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14239 | fi |
c906108c | 14240 | |
81ecdfbb RW |
14241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
14242 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 14243 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 14244 | |
81ecdfbb | 14245 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
14246 | |
14247 | fi | |
14248 | ||
bec39cab | 14249 | |
81ecdfbb RW |
14250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
14251 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
14252 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
14253 | $as_echo_n "(cached) " >&6 | |
c906108c | 14254 | else |
81ecdfbb | 14255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14256 | /* end confdefs.h. */ |
97bf5e38 MK |
14257 | #include <sys/types.h> |
14258 | #ifdef HAVE_NLIST_H | |
14259 | #include <nlist.h> | |
14260 | #endif | |
14261 | #include <link.h> | |
bec39cab AC |
14262 | int |
14263 | main () | |
14264 | { | |
97bf5e38 | 14265 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
14266 | ; |
14267 | return 0; | |
14268 | } | |
14269 | _ACEOF | |
81ecdfbb | 14270 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14271 | gdb_cv_have_struct_so_map_with_som_members=yes |
14272 | else | |
81ecdfbb | 14273 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 14274 | fi |
81ecdfbb | 14275 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14276 | fi |
c906108c | 14277 | |
81ecdfbb RW |
14278 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
14279 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 14280 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 14281 | |
81ecdfbb | 14282 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 14283 | |
97bf5e38 | 14284 | fi |
c906108c | 14285 | |
bec39cab | 14286 | |
81ecdfbb RW |
14287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
14288 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
14289 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
14290 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14291 | else |
81ecdfbb | 14292 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14293 | /* end confdefs.h. */ |
97bf5e38 MK |
14294 | #define _SYSCALL32 |
14295 | #include <sys/link.h> | |
bec39cab AC |
14296 | int |
14297 | main () | |
14298 | { | |
97bf5e38 | 14299 | struct link_map32 l; |
bec39cab AC |
14300 | ; |
14301 | return 0; | |
14302 | } | |
14303 | _ACEOF | |
81ecdfbb | 14304 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14305 | gdb_cv_have_struct_link_map32=yes |
14306 | else | |
81ecdfbb | 14307 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 14308 | fi |
81ecdfbb | 14309 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14310 | fi |
c906108c | 14311 | |
81ecdfbb RW |
14312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
14313 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 14314 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 14315 | |
81ecdfbb | 14316 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 14317 | |
60ca704f | 14318 | |
81ecdfbb | 14319 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 14320 | |
97bf5e38 MK |
14321 | fi |
14322 | fi | |
c906108c | 14323 | |
bc8bcb4b | 14324 | # Check if the compiler supports the `long long' type. |
c906108c | 14325 | |
81ecdfbb RW |
14326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
14327 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
14328 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
14329 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14330 | else |
81ecdfbb | 14331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14332 | /* end confdefs.h. */ |
bc8bcb4b | 14333 | extern long long foo; |
bec39cab AC |
14334 | int |
14335 | main () | |
14336 | { | |
bc8bcb4b | 14337 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
14338 | ; |
14339 | return 0; | |
14340 | } | |
14341 | _ACEOF | |
81ecdfbb | 14342 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14343 | gdb_cv_c_long_long=yes |
14344 | else | |
81ecdfbb | 14345 | gdb_cv_c_long_long=no |
97bf5e38 | 14346 | fi |
81ecdfbb | 14347 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14348 | fi |
81ecdfbb RW |
14349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
14350 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 14351 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 14352 | |
81ecdfbb | 14353 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14354 | |
14355 | fi | |
14356 | ||
bc8bcb4b | 14357 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 14358 | |
81ecdfbb RW |
14359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
14360 | $as_echo_n "checking for long long support in printf... " >&6; } | |
14361 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
14362 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14363 | else |
81ecdfbb | 14364 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14365 | gdb_cv_printf_has_long_long=no |
14366 | else | |
81ecdfbb | 14367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14368 | /* end confdefs.h. */ |
bc8bcb4b MK |
14369 | $ac_includes_default |
14370 | int | |
14371 | main () | |
14372 | { | |
14373 | char buf[32]; | |
97bf5e38 MK |
14374 | long long l = 0; |
14375 | l = (l << 16) + 0x0123; | |
14376 | l = (l << 16) + 0x4567; | |
14377 | l = (l << 16) + 0x89ab; | |
14378 | l = (l << 16) + 0xcdef; | |
14379 | sprintf (buf, "0x%016llx", l); | |
14380 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
14381 | ; |
14382 | return 0; | |
c906108c | 14383 | } |
bec39cab | 14384 | _ACEOF |
81ecdfbb | 14385 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14386 | gdb_cv_printf_has_long_long=yes |
14387 | else | |
81ecdfbb | 14388 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 14389 | fi |
81ecdfbb RW |
14390 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14391 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14392 | fi |
81ecdfbb | 14393 | |
97bf5e38 | 14394 | fi |
81ecdfbb RW |
14395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
14396 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 14397 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 14398 | |
81ecdfbb | 14399 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14400 | |
14401 | fi | |
97bf5e38 | 14402 | |
1a619819 LM |
14403 | # Check if the compiler and runtime support printing decfloats. |
14404 | ||
81ecdfbb RW |
14405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
14406 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
14407 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
14408 | $as_echo_n "(cached) " >&6 | |
1a619819 | 14409 | else |
81ecdfbb | 14410 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
14411 | gdb_cv_printf_has_decfloat=no |
14412 | else | |
81ecdfbb | 14413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
14414 | /* end confdefs.h. */ |
14415 | $ac_includes_default | |
14416 | int | |
14417 | main () | |
14418 | { | |
14419 | char buf[64]; | |
14420 | _Decimal32 d32 = 1.2345df; | |
14421 | _Decimal64 d64 = 1.2345dd; | |
14422 | _Decimal128 d128 = 1.2345dl; | |
14423 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
14424 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
14425 | ; | |
14426 | return 0; | |
14427 | } | |
14428 | _ACEOF | |
81ecdfbb | 14429 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
14430 | gdb_cv_printf_has_decfloat=yes |
14431 | else | |
81ecdfbb | 14432 | gdb_cv_printf_has_decfloat=no |
1a619819 | 14433 | fi |
81ecdfbb RW |
14434 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14435 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 14436 | fi |
81ecdfbb | 14437 | |
1a619819 | 14438 | fi |
81ecdfbb RW |
14439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
14440 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
14441 | if test $gdb_cv_printf_has_decfloat = yes; then |
14442 | ||
81ecdfbb | 14443 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
14444 | |
14445 | fi | |
14446 | ||
bc8bcb4b MK |
14447 | # Check if the compiler supports the `long double' type. We can't use |
14448 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
14449 | # constants defined in <float.h> that fail on some systems, | |
14450 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 14451 | |
81ecdfbb RW |
14452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
14453 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
14454 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
14455 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14456 | else |
81ecdfbb | 14457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14458 | /* end confdefs.h. */ |
97bf5e38 | 14459 | long double foo; |
bec39cab | 14460 | _ACEOF |
81ecdfbb | 14461 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 14462 | gdb_cv_c_long_double=yes |
97bf5e38 | 14463 | else |
81ecdfbb | 14464 | gdb_cv_c_long_double=no |
97bf5e38 | 14465 | fi |
81ecdfbb | 14466 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14467 | fi |
81ecdfbb RW |
14468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
14469 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 14470 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 14471 | |
81ecdfbb | 14472 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14473 | |
14474 | fi | |
14475 | ||
bc8bcb4b | 14476 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14477 | |
81ecdfbb RW |
14478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14479 | $as_echo_n "checking for long double support in printf... " >&6; } | |
14480 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
14481 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14482 | else |
81ecdfbb | 14483 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14484 | gdb_cv_printf_has_long_double=no |
14485 | else | |
81ecdfbb | 14486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14487 | /* end confdefs.h. */ |
bc8bcb4b MK |
14488 | $ac_includes_default |
14489 | int | |
14490 | main () | |
14491 | { | |
14492 | char buf[16]; | |
97bf5e38 MK |
14493 | long double f = 3.141592653; |
14494 | sprintf (buf, "%Lg", f); | |
14495 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14496 | ; |
14497 | return 0; | |
97bf5e38 | 14498 | } |
bec39cab | 14499 | _ACEOF |
81ecdfbb | 14500 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14501 | gdb_cv_printf_has_long_double=yes |
c906108c | 14502 | else |
81ecdfbb | 14503 | gdb_cv_printf_has_long_double=no |
c906108c | 14504 | fi |
81ecdfbb RW |
14505 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14506 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14507 | fi |
81ecdfbb | 14508 | |
c906108c | 14509 | fi |
81ecdfbb RW |
14510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14511 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14512 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14513 | |
81ecdfbb | 14514 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14515 | |
14516 | fi | |
97bf5e38 | 14517 | |
bc8bcb4b | 14518 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14519 | |
81ecdfbb RW |
14520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14521 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
14522 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
14523 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14524 | else |
81ecdfbb | 14525 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14526 | gdb_cv_scanf_has_long_double=no |
14527 | else | |
81ecdfbb | 14528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14529 | /* end confdefs.h. */ |
bc8bcb4b MK |
14530 | #include <stdio.h> |
14531 | int | |
14532 | main () | |
14533 | { | |
14534 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14535 | long double f = 0; |
14536 | sscanf (buf, "%Lg", &f); | |
14537 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14538 | ; |
14539 | return 0; | |
97bf5e38 | 14540 | } |
bec39cab | 14541 | _ACEOF |
81ecdfbb | 14542 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14543 | gdb_cv_scanf_has_long_double=yes |
14544 | else | |
81ecdfbb | 14545 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14546 | fi |
81ecdfbb RW |
14547 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14548 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14549 | fi |
81ecdfbb | 14550 | |
c906108c | 14551 | fi |
81ecdfbb RW |
14552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14553 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14554 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14555 | |
81ecdfbb | 14556 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14557 | |
14558 | fi | |
c906108c | 14559 | |
438013df AO |
14560 | case ${host_os} in |
14561 | aix*) | |
81ecdfbb RW |
14562 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14563 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
14564 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
14565 | $as_echo_n "(cached) " >&6 | |
438013df | 14566 | else |
bec39cab | 14567 | |
438013df AO |
14568 | SAVE_LDFLAGS=$LDFLAGS |
14569 | ||
14570 | case $GCC in | |
14571 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14572 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14573 | esac | |
14574 | ||
14575 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14576 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14577 | /* end confdefs.h. */ |
438013df | 14578 | |
bec39cab AC |
14579 | int |
14580 | main () | |
14581 | { | |
438013df | 14582 | int i; |
bec39cab AC |
14583 | ; |
14584 | return 0; | |
14585 | } | |
14586 | _ACEOF | |
81ecdfbb | 14587 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14588 | |
81ecdfbb RW |
14589 | else |
14590 | gdb_cv_bigtoc= | |
438013df | 14591 | fi |
81ecdfbb RW |
14592 | rm -f core conftest.err conftest.$ac_objext \ |
14593 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 14594 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 14595 | |
bec39cab | 14596 | fi |
81ecdfbb RW |
14597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
14598 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
14599 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
14600 | ;; | |
14601 | esac | |
14602 | ||
38f6b338 | 14603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 14604 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
14605 | dynamic_list=false |
14606 | if test "${gdb_native}" = yes; then | |
14607 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
14608 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
14609 | # may not be supported there. | |
14610 | old_LDFLAGS="$LDFLAGS" | |
14611 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
14612 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
14613 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
14614 | if test "${have_libpython}" = no; then | |
14615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
14616 | /* end confdefs.h. */ |
14617 | ||
14618 | int | |
14619 | main () | |
14620 | { | |
14621 | ||
14622 | ; | |
14623 | return 0; | |
14624 | } | |
14625 | _ACEOF | |
14626 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
14627 | dynamic_list=true |
14628 | fi | |
14629 | rm -f core conftest.err conftest.$ac_objext \ | |
14630 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
14631 | else |
14632 | # Workaround http://bugs.python.org/issue4434 where static | |
14633 | # libpythonX.Y.a would get its symbols required for | |
14634 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
14635 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
14636 | old_CFLAGS="$CFLAGS" | |
14637 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
14638 | if test "$cross_compiling" = yes; then : | |
3bebe2f2 | 14639 | true |
f6528abd | 14640 | else |
3bebe2f2 JK |
14641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14642 | /* end confdefs.h. */ | |
14643 | #include "${have_libpython}/Python.h" | |
14644 | int | |
14645 | main () | |
14646 | { | |
14647 | int err; | |
38f6b338 JK |
14648 | Py_Initialize (); |
14649 | err = PyRun_SimpleString ("import itertools\n"); | |
14650 | Py_Finalize (); | |
14651 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
14652 | ; |
14653 | return 0; | |
14654 | } | |
14655 | _ACEOF | |
14656 | if ac_fn_c_try_run "$LINENO"; then : | |
14657 | dynamic_list=true | |
14658 | fi | |
14659 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14660 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14661 | fi | |
14662 | ||
38f6b338 JK |
14663 | CFLAGS="$old_CFLAGS" |
14664 | fi | |
14665 | LDFLAGS="$old_LDFLAGS" | |
14666 | fi | |
14667 | if $dynamic_list; then | |
14668 | found="-Wl,--dynamic-list" | |
14669 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 14670 | else |
38f6b338 JK |
14671 | found="-rdynamic" |
14672 | RDYNAMIC="-rdynamic" | |
f6528abd | 14673 | fi |
f6528abd | 14674 | |
38f6b338 | 14675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 14676 | $as_echo "$found" >&6; } |
0407b3f1 | 14677 | |
f6528abd | 14678 | |
0407b3f1 | 14679 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 14680 | case ${host_os} in |
c906108c | 14681 | solaris*) |
d92419e5 JB |
14682 | # See if thread_db library is around for Solaris thread debugging. |
14683 | # Note that we must explicitly test for version 1 of the library | |
14684 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
14685 | # the same API. | |
81ecdfbb RW |
14686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
14687 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 14688 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
14689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14690 | $as_echo "yes" >&6; } | |
60ca704f | 14691 | |
81ecdfbb | 14692 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 14693 | |
3483b318 | 14694 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 14695 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
14696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
14697 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
14698 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
14699 | $as_echo_n "(cached) " >&6 | |
c906108c | 14700 | else |
bec39cab | 14701 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 14702 | LIBS="-ldl $LIBS" |
81ecdfbb | 14703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
14704 | /* end confdefs.h. */ |
14705 | ||
81ecdfbb RW |
14706 | /* Override any GCC internal prototype to avoid an error. |
14707 | Use char because int might match the return type of a GCC | |
14708 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
14709 | #ifdef __cplusplus |
14710 | extern "C" | |
14711 | #endif | |
bec39cab AC |
14712 | char dlopen (); |
14713 | int | |
14714 | main () | |
14715 | { | |
81ecdfbb | 14716 | return dlopen (); |
bec39cab AC |
14717 | ; |
14718 | return 0; | |
14719 | } | |
14720 | _ACEOF | |
81ecdfbb | 14721 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
14722 | ac_cv_lib_dl_dlopen=yes |
14723 | else | |
81ecdfbb | 14724 | ac_cv_lib_dl_dlopen=no |
bec39cab | 14725 | fi |
81ecdfbb RW |
14726 | rm -f core conftest.err conftest.$ac_objext \ |
14727 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
14728 | LIBS=$ac_check_lib_save_LIBS |
14729 | fi | |
81ecdfbb RW |
14730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
14731 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
14732 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
14733 | cat >>confdefs.h <<_ACEOF |
14734 | #define HAVE_LIBDL 1 | |
14735 | _ACEOF | |
c906108c SS |
14736 | |
14737 | LIBS="-ldl $LIBS" | |
14738 | ||
c906108c SS |
14739 | fi |
14740 | ||
f6528abd | 14741 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
14742 | # Sun randomly tweaked the prototypes in <proc_service.h> |
14743 | # at one point. | |
81ecdfbb RW |
14744 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
14745 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
14746 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
14747 | $as_echo_n "(cached) " >&6 | |
c906108c | 14748 | else |
bec39cab | 14749 | |
81ecdfbb | 14750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14751 | /* end confdefs.h. */ |
c906108c SS |
14752 | |
14753 | #include <proc_service.h> | |
14754 | ps_err_e ps_pdwrite | |
14755 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 14756 | |
bec39cab AC |
14757 | int |
14758 | main () | |
14759 | { | |
14760 | ||
14761 | ; | |
14762 | return 0; | |
14763 | } | |
14764 | _ACEOF | |
81ecdfbb | 14765 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
14766 | gdb_cv_proc_service_is_old=no |
14767 | else | |
81ecdfbb | 14768 | gdb_cv_proc_service_is_old=yes |
c906108c | 14769 | fi |
81ecdfbb | 14770 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 14771 | |
c906108c SS |
14772 | fi |
14773 | ||
81ecdfbb RW |
14774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
14775 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 14776 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 14777 | |
81ecdfbb | 14778 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
14779 | |
14780 | fi | |
14781 | else | |
81ecdfbb RW |
14782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14783 | $as_echo "no" >&6; } | |
c906108c SS |
14784 | fi |
14785 | ;; | |
d92419e5 | 14786 | aix*) |
81ecdfbb RW |
14787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
14788 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
14789 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
14790 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14791 | else |
81ecdfbb | 14792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14793 | /* end confdefs.h. */ |
d92419e5 | 14794 | #include <sys/pthdebug.h> |
bec39cab AC |
14795 | int |
14796 | main () | |
14797 | { | |
d92419e5 JB |
14798 | #ifndef PTHDB_VERSION_3 |
14799 | #error | |
14800 | #endif | |
bec39cab AC |
14801 | ; |
14802 | return 0; | |
14803 | } | |
14804 | _ACEOF | |
81ecdfbb | 14805 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
14806 | gdb_cv_have_aix_thread_debug=yes |
14807 | else | |
81ecdfbb | 14808 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 14809 | fi |
81ecdfbb | 14810 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
14811 | fi |
14812 | ||
81ecdfbb RW |
14813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
14814 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
14815 | if test $gdb_cv_have_aix_thread_debug = yes; then |
14816 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 14817 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 | 14818 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
d645e32e JB |
14819 | |
14820 | # Older versions of AIX do not provide the declaration for | |
14821 | # the getthrds function (it appears that it was introduced | |
14822 | # with AIX 6.x). | |
14823 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
14824 | " | |
14825 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
14826 | ac_have_decl=1 | |
14827 | else | |
14828 | ac_have_decl=0 | |
14829 | fi | |
14830 | ||
14831 | cat >>confdefs.h <<_ACEOF | |
14832 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
14833 | _ACEOF | |
14834 | ||
d92419e5 JB |
14835 | fi |
14836 | ;; | |
c906108c | 14837 | esac |
bec39cab | 14838 | |
c906108c SS |
14839 | fi |
14840 | ||
3f47be5c | 14841 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
14842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
14843 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
14844 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
14845 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14846 | else |
81ecdfbb | 14847 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14848 | /* end confdefs.h. */ |
3f47be5c | 14849 | #include <thread_db.h> |
bec39cab AC |
14850 | int |
14851 | main () | |
14852 | { | |
3f47be5c | 14853 | int i = TD_NOTALLOC; |
bec39cab AC |
14854 | ; |
14855 | return 0; | |
14856 | } | |
14857 | _ACEOF | |
81ecdfbb | 14858 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
14859 | gdb_cv_thread_db_h_has_td_notalloc=yes |
14860 | else | |
81ecdfbb | 14861 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 14862 | |
3f47be5c | 14863 | fi |
81ecdfbb | 14864 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 14865 | |
bec39cab | 14866 | fi |
81ecdfbb RW |
14867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
14868 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
14869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
14870 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
14871 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
14872 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14873 | else |
81ecdfbb | 14874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14875 | /* end confdefs.h. */ |
14876 | #include <thread_db.h> | |
14877 | int | |
14878 | main () | |
14879 | { | |
14880 | int i = TD_VERSION; | |
14881 | ; | |
14882 | return 0; | |
14883 | } | |
14884 | _ACEOF | |
81ecdfbb | 14885 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14886 | gdb_cv_thread_db_h_has_td_version=yes |
14887 | else | |
81ecdfbb | 14888 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
14889 | |
14890 | fi | |
81ecdfbb | 14891 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14892 | |
14893 | fi | |
81ecdfbb RW |
14894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
14895 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
14896 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
14897 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
14898 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
14899 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14900 | else |
81ecdfbb | 14901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14902 | /* end confdefs.h. */ |
14903 | #include <thread_db.h> | |
14904 | int | |
14905 | main () | |
14906 | { | |
14907 | int i = TD_NOTLS; | |
14908 | ; | |
14909 | return 0; | |
14910 | } | |
14911 | _ACEOF | |
81ecdfbb | 14912 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14913 | gdb_cv_thread_db_h_has_td_notls=yes |
14914 | else | |
81ecdfbb | 14915 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
14916 | |
14917 | fi | |
81ecdfbb | 14918 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14919 | |
14920 | fi | |
81ecdfbb RW |
14921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
14922 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
14923 | fi |
14924 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 14925 | |
81ecdfbb | 14926 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 14927 | |
59f80f10 DJ |
14928 | fi |
14929 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
14930 | ||
81ecdfbb | 14931 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
14932 | |
14933 | fi | |
14934 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
14935 | ||
81ecdfbb | 14936 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 14937 | |
3f47be5c EZ |
14938 | fi |
14939 | ||
b757528f | 14940 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
14941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
14942 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
14943 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
14944 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14945 | else |
81ecdfbb | 14946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14947 | /* end confdefs.h. */ |
b757528f | 14948 | #include <sys/syscall.h> |
bec39cab AC |
14949 | int |
14950 | main () | |
14951 | { | |
b757528f | 14952 | int i = __NR_tkill; |
bec39cab AC |
14953 | ; |
14954 | return 0; | |
14955 | } | |
14956 | _ACEOF | |
81ecdfbb | 14957 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
14958 | gdb_cv_sys_syscall_h_has_tkill=yes |
14959 | else | |
81ecdfbb | 14960 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 14961 | |
b757528f | 14962 | fi |
81ecdfbb | 14963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 14964 | |
bec39cab | 14965 | fi |
81ecdfbb RW |
14966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
14967 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
14968 | fi |
14969 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 14970 | |
81ecdfbb | 14971 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
14972 | |
14973 | fi | |
14974 | ||
81ecdfbb RW |
14975 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
14976 | " | |
14977 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
14978 | ac_have_decl=1 | |
10568435 | 14979 | else |
81ecdfbb | 14980 | ac_have_decl=0 |
10568435 | 14981 | fi |
10568435 JK |
14982 | |
14983 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 14984 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
14985 | _ACEOF |
14986 | ||
14987 | ||
81ecdfbb RW |
14988 | if test "$cross_compiling" = yes; then : |
14989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
14990 | /* end confdefs.h. */ |
14991 | #include <sys/personality.h> | |
14992 | int | |
14993 | main () | |
14994 | { | |
14995 | ||
14996 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14997 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14998 | # endif | |
14999 | /* Test the flag could be set and stays set. */ | |
15000 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15001 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15002 | return 1 | |
15003 | ; | |
15004 | return 0; | |
15005 | } | |
15006 | _ACEOF | |
81ecdfbb | 15007 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
15008 | have_personality=true |
15009 | else | |
81ecdfbb | 15010 | have_personality=false |
10568435 | 15011 | fi |
81ecdfbb RW |
15012 | rm -f core conftest.err conftest.$ac_objext \ |
15013 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 15014 | else |
81ecdfbb | 15015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
15016 | /* end confdefs.h. */ |
15017 | #include <sys/personality.h> | |
15018 | int | |
15019 | main () | |
15020 | { | |
15021 | ||
15022 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15023 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15024 | # endif | |
15025 | /* Test the flag could be set and stays set. */ | |
15026 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15027 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15028 | return 1 | |
15029 | ; | |
15030 | return 0; | |
15031 | } | |
15032 | _ACEOF | |
81ecdfbb | 15033 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
15034 | have_personality=true |
15035 | else | |
81ecdfbb | 15036 | have_personality=false |
10568435 | 15037 | fi |
81ecdfbb RW |
15038 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15039 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 15040 | fi |
81ecdfbb | 15041 | |
10568435 JK |
15042 | if $have_personality |
15043 | then | |
15044 | ||
81ecdfbb | 15045 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
15046 | |
15047 | fi | |
15048 | ||
fb40c209 | 15049 | |
b14b1491 | 15050 | target_sysroot_reloc=0 |
bec39cab | 15051 | |
81ecdfbb RW |
15052 | # Check whether --with-sysroot was given. |
15053 | if test "${with_sysroot+set}" = set; then : | |
15054 | withval=$with_sysroot; | |
030292b7 | 15055 | case ${with_sysroot} in |
715d1656 | 15056 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
15057 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
15058 | esac | |
15059 | ||
15060 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
15061 | ||
07abfebf RS |
15062 | if test "x$prefix" = xNONE; then |
15063 | test_prefix=/usr/local | |
15064 | else | |
15065 | test_prefix=$prefix | |
15066 | fi | |
aa28a74e | 15067 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
07abfebf | 15068 | test_exec_prefix=$test_prefix |
030292b7 | 15069 | else |
07abfebf | 15070 | test_exec_prefix=$exec_prefix |
030292b7 DJ |
15071 | fi |
15072 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 | 15073 | "${test_prefix}"|"${test_prefix}/"*|\ |
07abfebf RS |
15074 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
15075 | '${prefix}'|'${prefix}/'*|\ | |
715d1656 | 15076 | '${exec_prefix}'|'${exec_prefix}/'*) |
b14b1491 | 15077 | target_sysroot_reloc=1 |
030292b7 DJ |
15078 | ;; |
15079 | esac | |
15080 | ||
15081 | else | |
bec39cab | 15082 | |
030292b7 DJ |
15083 | TARGET_SYSTEM_ROOT= |
15084 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
15085 | ||
81ecdfbb | 15086 | fi |
b14b1491 | 15087 | |
81ecdfbb | 15088 | TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc" |
030292b7 DJ |
15089 | |
15090 | ||
15091 | ||
16e7150e | 15092 | |
16e7150e | 15093 | |
81ecdfbb RW |
15094 | # Check whether --with-system-gdbinit was given. |
15095 | if test "${with_system_gdbinit+set}" = set; then : | |
15096 | withval=$with_system_gdbinit; | |
b14b1491 TT |
15097 | SYSTEM_GDBINIT=$withval |
15098 | else | |
15099 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
15100 | fi |
15101 | ||
16e7150e JG |
15102 | |
15103 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
15104 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 15105 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
15106 | ac_define_dir=`eval echo $ac_define_dir` |
15107 | ||
15108 | cat >>confdefs.h <<_ACEOF | |
15109 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
15110 | _ACEOF | |
15111 | ||
15112 | ||
15113 | ||
0c4a4063 | 15114 | |
b14b1491 TT |
15115 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
15116 | if test "x$prefix" = xNONE; then | |
15117 | test_prefix=/usr/local | |
15118 | else | |
15119 | test_prefix=$prefix | |
15120 | fi | |
15121 | else | |
15122 | test_prefix=$exec_prefix | |
15123 | fi | |
15124 | value=0 | |
15125 | case ${ac_define_dir} in | |
15126 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15127 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15128 | value=1 | |
15129 | ;; | |
15130 | esac | |
16e7150e | 15131 | |
b14b1491 TT |
15132 | cat >>confdefs.h <<_ACEOF |
15133 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
15134 | _ACEOF |
15135 | ||
b14b1491 | 15136 | |
16e7150e | 15137 | |
0c4a4063 | 15138 | |
81ecdfbb RW |
15139 | # Check whether --enable-werror was given. |
15140 | if test "${enable_werror+set}" = set; then : | |
15141 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
15142 | yes | y) ERROR_ON_WARNING="yes" ;; |
15143 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 15144 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 15145 | esac |
81ecdfbb RW |
15146 | fi |
15147 | ||
094a342e MK |
15148 | |
15149 | # Enable -Werror by default when using gcc | |
15150 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
15151 | ERROR_ON_WARNING=yes | |
15152 | fi | |
15153 | ||
15154 | WERROR_CFLAGS="" | |
15155 | if test "${ERROR_ON_WARNING}" = yes ; then | |
15156 | WERROR_CFLAGS="-Werror" | |
15157 | fi | |
15158 | ||
aa79a185 DJ |
15159 | # The entries after -Wno-pointer-sign are disabled warnings which may |
15160 | # be enabled in the future, which can not currently be used to build | |
15161 | # GDB. | |
15162 | # NOTE: If you change this list, remember to update | |
3b851bce | 15163 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
15164 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
15165 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 JB |
15166 | -Wno-unused -Wunused-value -Wunused-function \ |
15167 | -Wno-switch -Wno-char-subscripts" | |
a3b362c4 | 15168 | |
3526781e DJ |
15169 | # Enable -Wno-format by default when using gcc on mingw since many |
15170 | # GCC versions complain about %I64. | |
15171 | case "${host}" in | |
15172 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
15173 | esac | |
15174 | ||
81ecdfbb RW |
15175 | # Check whether --enable-build-warnings was given. |
15176 | if test "${enable_build_warnings+set}" = set; then : | |
15177 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
15178 | yes) ;; |
15179 | no) build_warnings="-w";; | |
15180 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15181 | build_warnings="${build_warnings} ${t}";; | |
15182 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15183 | build_warnings="${t} ${build_warnings}";; | |
15184 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15185 | esac | |
d4f3574e | 15186 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 15187 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 15188 | fi |
81ecdfbb RW |
15189 | fi |
15190 | # Check whether --enable-gdb-build-warnings was given. | |
15191 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
15192 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
15193 | yes) ;; |
15194 | no) build_warnings="-w";; | |
15195 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15196 | build_warnings="${build_warnings} ${t}";; | |
15197 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15198 | build_warnings="${t} ${build_warnings}";; | |
15199 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15200 | esac | |
15201 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
15202 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
15203 | fi | |
81ecdfbb RW |
15204 | fi |
15205 | WARN_CFLAGS="" | |
c906108c SS |
15206 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
15207 | then | |
81ecdfbb RW |
15208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
15209 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
15210 | # Separate out the -Werror flag as some files just cannot be |
15211 | # compiled with it enabled. | |
15212 | for w in ${build_warnings}; do | |
15213 | case $w in | |
15214 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
15215 | *) # Check that GCC accepts it | |
4536bbc6 AC |
15216 | saved_CFLAGS="$CFLAGS" |
15217 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 15218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15219 | /* end confdefs.h. */ |
4536bbc6 | 15220 | |
bec39cab AC |
15221 | int |
15222 | main () | |
15223 | { | |
4536bbc6 | 15224 | |
bec39cab AC |
15225 | ; |
15226 | return 0; | |
15227 | } | |
15228 | _ACEOF | |
81ecdfbb | 15229 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 15230 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 15231 | fi |
81ecdfbb | 15232 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 15233 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
15234 | esac |
15235 | done | |
81ecdfbb RW |
15236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
15237 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
15238 | fi |
15239 | ||
15240 | ||
104c1213 | 15241 | |
7a292a7a | 15242 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
15243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
15244 | $as_echo_n "checking for cygwin... " >&6; } | |
15245 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
15246 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15247 | else |
81ecdfbb | 15248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15249 | /* end confdefs.h. */ |
7a292a7a SS |
15250 | |
15251 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
15252 | lose | |
15253 | #endif | |
bec39cab | 15254 | _ACEOF |
7a292a7a | 15255 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 15256 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
15257 | gdb_cv_os_cygwin=yes |
15258 | else | |
7a292a7a SS |
15259 | gdb_cv_os_cygwin=no |
15260 | fi | |
15261 | rm -f conftest* | |
15262 | ||
15263 | fi | |
81ecdfbb RW |
15264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
15265 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 15266 | |
aff38e61 | 15267 | |
3eb25fda | 15268 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 15269 | case ${host} in |
95cbc983 AC |
15270 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
15271 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 15272 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
15273 | esac |
15274 | ||
15275 | ||
cd0fc7c3 SS |
15276 | # libreadline needs libuser32.a in a cygwin environment |
15277 | WIN32LIBS= | |
15278 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
15279 | WIN32LIBS="-luser32" |
15280 | case "${target}" in | |
15281 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
15282 | ;; | |
15283 | esac | |
cd0fc7c3 | 15284 | fi |
c906108c | 15285 | |
b4505029 MM |
15286 | # The ser-tcp.c module requires sockets. |
15287 | case ${host} in | |
15288 | *mingw32*) | |
15289 | ||
81ecdfbb | 15290 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
15291 | |
15292 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
15293 | ;; | |
15294 | esac | |
15295 | ||
7a292a7a | 15296 | |
31d99776 DJ |
15297 | # Add ELF support to GDB, but only if BFD includes ELF support. |
15298 | OLD_CFLAGS=$CFLAGS | |
15299 | OLD_LDFLAGS=$LDFLAGS | |
15300 | OLD_LIBS=$LIBS | |
cab58a69 | 15301 | CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" |
31d99776 | 15302 | LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" |
7b3200f9 | 15303 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
075ff26d JK |
15304 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
15305 | if test "$plugins" = "yes"; then | |
15306 | LIBS="-ldl $LIBS" | |
15307 | fi | |
0f72fb1c | 15308 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
15309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
15310 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
15311 | if test "${gdb_cv_var_elf+set}" = set; then : | |
15312 | $as_echo_n "(cached) " >&6 | |
31d99776 | 15313 | else |
81ecdfbb | 15314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
15315 | /* end confdefs.h. */ |
15316 | #include <stdlib.h> | |
15317 | #include "bfd.h" | |
15318 | #include "elf-bfd.h" | |
15319 | ||
15320 | int | |
15321 | main () | |
15322 | { | |
15323 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
15324 | ; | |
15325 | return 0; | |
15326 | } | |
15327 | _ACEOF | |
81ecdfbb | 15328 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
15329 | gdb_cv_var_elf=yes |
15330 | else | |
81ecdfbb | 15331 | gdb_cv_var_elf=no |
31d99776 | 15332 | fi |
81ecdfbb RW |
15333 | rm -f core conftest.err conftest.$ac_objext \ |
15334 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 15335 | fi |
81ecdfbb RW |
15336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
15337 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 DJ |
15338 | if test $gdb_cv_var_elf = yes; then |
15339 | CONFIG_OBS="$CONFIG_OBS elfread.o" | |
15340 | ||
81ecdfbb | 15341 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 15342 | |
075ff26d JK |
15343 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
15344 | if test "$plugins" = "yes"; then | |
15345 | OLD_LIBS="-ldl $OLD_LIBS" | |
15346 | fi | |
31d99776 DJ |
15347 | fi |
15348 | CFLAGS=$OLD_CFLAGS | |
15349 | LDFLAGS=$OLD_LDFLAGS | |
15350 | LIBS=$OLD_LIBS | |
15351 | ||
121ce6e5 DJ |
15352 | # Add any host-specific objects to GDB. |
15353 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
15354 | ||
3fc11d3e JM |
15355 | LIBGUI="../libgui/src/libgui.a" |
15356 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
15357 | ||
15358 | ||
7a292a7a | 15359 | |
3fc11d3e JM |
15360 | WIN32LDAPP= |
15361 | ||
15362 | ||
15363 | ||
d91670b9 | 15364 | case "${host}" in |
686a5eed | 15365 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
15366 | configdir="win" |
15367 | ;; | |
15368 | *) | |
15369 | configdir="unix" | |
15370 | ;; | |
15371 | esac | |
3fc11d3e JM |
15372 | |
15373 | GDBTKLIBS= | |
15374 | if test "${enable_gdbtk}" = "yes"; then | |
15375 | ||
d1c3b63a KS |
15376 | # Gdbtk must have an absolute path to srcdir in order to run |
15377 | # properly when not installed. | |
15378 | here=`pwd` | |
15379 | cd ${srcdir} | |
15380 | GDBTK_SRC_DIR=`pwd` | |
15381 | cd $here | |
15382 | ||
bec39cab | 15383 | |
5062cc19 KS |
15384 | # |
15385 | # Ok, lets find the tcl configuration | |
15386 | # First, look for one uninstalled. | |
15387 | # the alternative search directory is invoked by --with-tcl | |
15388 | # | |
3fc11d3e | 15389 | |
5062cc19 KS |
15390 | if test x"${no_tcl}" = x ; then |
15391 | # we reset no_tcl in case something fails here | |
15392 | no_tcl=true | |
bec39cab | 15393 | |
81ecdfbb RW |
15394 | # Check whether --with-tcl was given. |
15395 | if test "${with_tcl+set}" = set; then : | |
15396 | withval=$with_tcl; with_tclconfig=${withval} | |
15397 | fi | |
15398 | ||
15399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
15400 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
15401 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
15402 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 15403 | else |
bec39cab | 15404 | |
3fc11d3e | 15405 | |
5062cc19 KS |
15406 | # First check to see if --with-tcl was specified. |
15407 | case "${host}" in | |
15408 | *-*-cygwin*) platDir="win" ;; | |
15409 | *) platDir="unix" ;; | |
15410 | esac | |
15411 | if test x"${with_tclconfig}" != x ; then | |
15412 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
15413 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
15414 | else | |
81ecdfbb | 15415 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15416 | fi |
15417 | fi | |
15418 | ||
15419 | # then check for a private Tcl installation | |
15420 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15421 | for i in \ | |
15422 | ../tcl \ | |
15423 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15424 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
15425 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
15426 | ../../tcl \ | |
15427 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15428 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
15429 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
15430 | ../../../tcl \ | |
15431 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15432 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
15433 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
15434 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
15435 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
15436 | break | |
15437 | fi | |
15438 | done | |
15439 | fi | |
15440 | ||
15441 | # on Darwin, check in Framework installation locations | |
15442 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
15443 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15444 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15445 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15446 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15447 | ; do | |
15448 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
15449 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
15450 | break | |
15451 | fi | |
15452 | done | |
15453 | fi | |
15454 | ||
15455 | # check in a few common install locations | |
15456 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15457 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15458 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15459 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15460 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15461 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15462 | `ls -d /usr/lib 2>/dev/null` \ | |
15463 | ; do | |
15464 | if test -f "$i/tclConfig.sh" ; then | |
15465 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
15466 | break | |
15467 | fi | |
15468 | done | |
15469 | fi | |
3fc11d3e | 15470 | |
5062cc19 KS |
15471 | # check in a few other private locations |
15472 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15473 | for i in \ | |
15474 | ${srcdir}/../tcl \ | |
15475 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15476 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
15477 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
15478 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
15479 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
15480 | break | |
15481 | fi | |
15482 | done | |
15483 | fi | |
bec39cab | 15484 | |
3fc11d3e JM |
15485 | fi |
15486 | ||
5062cc19 KS |
15487 | |
15488 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15489 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
15490 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
15491 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
15492 | else |
15493 | no_tcl= | |
15494 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
15495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15496 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
15497 | fi |
15498 | fi | |
3fc11d3e | 15499 | |
bec39cab | 15500 | |
85541719 DE |
15501 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
15502 | # point to doing Tcl. | |
bec39cab | 15503 | |
5062cc19 KS |
15504 | # |
15505 | # Ok, lets find the tk configuration | |
15506 | # First, look for one uninstalled. | |
15507 | # the alternative search directory is invoked by --with-tk | |
15508 | # | |
3fc11d3e | 15509 | |
5062cc19 KS |
15510 | if test x"${no_tk}" = x ; then |
15511 | # we reset no_tk in case something fails here | |
15512 | no_tk=true | |
bec39cab | 15513 | |
81ecdfbb RW |
15514 | # Check whether --with-tk was given. |
15515 | if test "${with_tk+set}" = set; then : | |
15516 | withval=$with_tk; with_tkconfig=${withval} | |
15517 | fi | |
15518 | ||
15519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
15520 | $as_echo_n "checking for Tk configuration... " >&6; } | |
15521 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
15522 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15523 | else |
3fc11d3e JM |
15524 | |
15525 | ||
5062cc19 KS |
15526 | # First check to see if --with-tkconfig was specified. |
15527 | if test x"${with_tkconfig}" != x ; then | |
15528 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
15529 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
15530 | else | |
81ecdfbb | 15531 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15532 | fi |
15533 | fi | |
3fc11d3e | 15534 | |
5062cc19 KS |
15535 | # then check for a private Tk library |
15536 | case "${host}" in | |
15537 | *-*-cygwin*) platDir="win" ;; | |
15538 | *) platDir="unix" ;; | |
15539 | esac | |
15540 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15541 | for i in \ | |
15542 | ../tk \ | |
15543 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15544 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
15545 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
15546 | ../../tk \ | |
15547 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15548 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
15549 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
15550 | ../../../tk \ | |
15551 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15552 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
15553 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15554 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15555 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15556 | break | |
15557 | fi | |
15558 | done | |
15559 | fi | |
15560 | ||
15561 | # on Darwin, check in Framework installation locations | |
15562 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
15563 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15564 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15565 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15566 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15567 | ; do | |
15568 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
15569 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
15570 | break | |
15571 | fi | |
15572 | done | |
15573 | fi | |
15574 | ||
15575 | # check in a few common install locations | |
15576 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15577 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15578 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15579 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15580 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15581 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15582 | `ls -d /usr/lib 2>/dev/null` \ | |
15583 | ; do | |
15584 | if test -f "$i/tkConfig.sh" ; then | |
15585 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
15586 | break | |
15587 | fi | |
15588 | done | |
15589 | fi | |
15590 | # check in a few other private locations | |
15591 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15592 | for i in \ | |
15593 | ${srcdir}/../tk \ | |
15594 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15595 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
15596 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15597 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15598 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15599 | break | |
15600 | fi | |
15601 | done | |
15602 | fi | |
3fc11d3e | 15603 | |
3fc11d3e JM |
15604 | fi |
15605 | ||
15606 | ||
5062cc19 KS |
15607 | if test x"${ac_cv_c_tkconfig}" = x ; then |
15608 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
15609 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
15610 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
15611 | else |
15612 | no_tk= | |
15613 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
15614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15615 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 15616 | fi |
3fc11d3e | 15617 | fi |
dd2504ab | 15618 | |
dd2504ab | 15619 | |
85541719 DE |
15620 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
15621 | ||
81ecdfbb RW |
15622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15623 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
15624 | |
15625 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
15626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15627 | $as_echo "loading" >&6; } | |
85541719 DE |
15628 | . ${TCL_BIN_DIR}/tclConfig.sh |
15629 | else | |
81ecdfbb RW |
15630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15631 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
15632 | fi |
15633 | ||
15634 | # eval is required to do the TCL_DBGX substitution | |
15635 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
15636 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
15637 | ||
15638 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
15639 | # then set the common variable name to the value of the build variables. | |
15640 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
15641 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
15642 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
15643 | # installed and uninstalled version of Tcl. | |
15644 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
15645 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
15646 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
15647 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
15648 | elif test "`uname -s`" = "Darwin"; then | |
15649 | # If Tcl was built as a framework, attempt to use the libraries | |
15650 | # from the framework at the given location so that linking works | |
15651 | # against Tcl.framework installed in an arbitary location. | |
15652 | case ${TCL_DEFS} in | |
15653 | *TCL_FRAMEWORK*) | |
15654 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
15655 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
15656 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
15657 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
15658 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
15659 | break | |
15660 | fi | |
15661 | done | |
15662 | fi | |
15663 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
15664 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
15665 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
15666 | fi | |
15667 | ;; | |
15668 | esac | |
15669 | fi | |
15670 | ||
15671 | # eval is required to do the TCL_DBGX substitution | |
15672 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
15673 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
15674 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
15675 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
15676 | ||
15677 | ||
15678 | ||
15679 | ||
15680 | ||
15681 | ||
15682 | ||
15683 | ||
15684 | ||
15685 | ||
15686 | ||
15687 | ||
15688 | ||
15689 | ||
15690 | ||
15691 | # Check for in-tree tcl | |
15692 | here=`pwd` | |
15693 | cd ${srcdir}/.. | |
15694 | topdir=`pwd` | |
15695 | cd ${here} | |
15696 | ||
15697 | intree="no" | |
15698 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
15699 | intree="yes" | |
15700 | fi | |
15701 | ||
15702 | # Find Tcl private headers | |
15703 | if test x"${intree}" = xno; then | |
15704 | ||
81ecdfbb RW |
15705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
15706 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
15707 | private_dir="" |
15708 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
15709 | if test -f ${dir}/tclInt.h ; then | |
15710 | private_dir=${dir} | |
15711 | fi | |
15712 | ||
15713 | if test x"${private_dir}" = x; then | |
81ecdfbb | 15714 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
15715 | else |
15716 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
15717 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15718 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
15719 | fi |
15720 | ||
15721 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
15722 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
15723 | TCL_DEPS="" | |
15724 | else | |
15725 | # If building tcl in the same src tree, private headers | |
15726 | # are not needed, but we need to be sure to use the right | |
15727 | # headers library | |
15728 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
15729 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
15730 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
15731 | fi | |
15732 | ||
15733 | ||
15734 | ||
15735 | ||
15736 | ||
81ecdfbb RW |
15737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15738 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 15739 | |
5062cc19 | 15740 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
15741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15742 | $as_echo "loading" >&6; } | |
5062cc19 | 15743 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 15744 | else |
81ecdfbb RW |
15745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15746 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 15747 | fi |
bec39cab | 15748 | |
5062cc19 KS |
15749 | # eval is required to do the TK_DBGX substitution |
15750 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
15751 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
15752 | ||
15753 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
15754 | # then set the common variable name to the value of the build variables. | |
15755 | # For example, the variable TK_LIB_SPEC will be set to the value | |
15756 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
15757 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
15758 | # installed and uninstalled version of Tcl. | |
85541719 | 15759 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
15760 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
15761 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
15762 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
15763 | elif test "`uname -s`" = "Darwin"; then | |
15764 | # If Tk was built as a framework, attempt to use the libraries | |
15765 | # from the framework at the given location so that linking works | |
15766 | # against Tk.framework installed in an arbitary location. | |
15767 | case ${TK_DEFS} in | |
15768 | *TK_FRAMEWORK*) | |
85541719 | 15769 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
15770 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
15771 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
15772 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
15773 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
15774 | break | |
15775 | fi | |
15776 | done | |
15777 | fi | |
85541719 | 15778 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
15779 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
15780 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
15781 | fi | |
15782 | ;; | |
15783 | esac | |
3fc11d3e JM |
15784 | fi |
15785 | ||
5062cc19 KS |
15786 | # eval is required to do the TK_DBGX substitution |
15787 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
15788 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
15789 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
15790 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 15791 | |
3fc11d3e JM |
15792 | |
15793 | ||
bec39cab AC |
15794 | |
15795 | ||
15796 | ||
15797 | ||
15798 | ||
15799 | ||
15800 | ||
3fc11d3e | 15801 | |
3fc11d3e | 15802 | |
bec39cab | 15803 | |
bec39cab | 15804 | |
85541719 DE |
15805 | # Check for in-tree Tk |
15806 | intree="no" | |
15807 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
15808 | intree="yes" | |
15809 | fi | |
3fc11d3e | 15810 | |
85541719 DE |
15811 | # Find Tk private headers |
15812 | if test x"${intree}" = xno; then | |
3fc11d3e | 15813 | |
81ecdfbb RW |
15814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
15815 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
15816 | private_dir="" |
15817 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
15818 | if test -f ${dir}/tkInt.h; then | |
15819 | private_dir=${dir} | |
3fc11d3e | 15820 | fi |
bec39cab | 15821 | |
5062cc19 | 15822 | if test x"${private_dir}" = x; then |
81ecdfbb | 15823 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 15824 | else |
5062cc19 | 15825 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
15826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15827 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 15828 | fi |
3fc11d3e | 15829 | |
85541719 DE |
15830 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
15831 | TK_LIBRARY=${TK_LIB_SPEC} | |
15832 | TK_DEPS="" | |
15833 | else | |
15834 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
15835 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
15836 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
15837 | fi | |
3fc11d3e JM |
15838 | |
15839 | ||
3fc11d3e JM |
15840 | |
15841 | ||
3fc11d3e | 15842 | |
85541719 | 15843 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 15844 | |
85541719 DE |
15845 | # Include some libraries that Tcl and Tk want. |
15846 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
15847 | # Yes, the ordering seems wrong here. But it isn't. | |
15848 | # TK_LIBS is the list of libraries that need to be linked | |
15849 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
15850 | # were in LIBS then any link tests after this point would | |
15851 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
15852 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 15853 | |
85541719 DE |
15854 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
15855 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
15856 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
15857 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
15858 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
15859 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
15860 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 15861 | |
85541719 DE |
15862 | if test x$gdb_cv_os_cygwin = xyes; then |
15863 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
15864 | WIN32LDAPP="-Wl,--subsystem,console" | |
15865 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 15866 | fi |
ffc6a242 | 15867 | |
81ecdfbb | 15868 | subdirs="$subdirs gdbtk" |
3ace7edb | 15869 | |
85541719 | 15870 | fi |
3fc11d3e JM |
15871 | fi |
15872 | ||
15873 | ||
15874 | ||
15875 | ||
15876 | ||
15877 | ||
15878 | ||
15879 | ||
81ecdfbb RW |
15880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
15881 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 15882 | |
c906108c | 15883 | |
81ecdfbb RW |
15884 | # Check whether --with-x was given. |
15885 | if test "${with_x+set}" = set; then : | |
15886 | withval=$with_x; | |
15887 | fi | |
c906108c SS |
15888 | |
15889 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
15890 | if test "x$with_x" = xno; then | |
15891 | # The user explicitly disabled X. | |
15892 | have_x=disabled | |
15893 | else | |
81ecdfbb RW |
15894 | case $x_includes,$x_libraries in #( |
15895 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
15896 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
15897 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
15898 | else |
15899 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 15900 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 15901 | rm -f -r conftest.dir |
bec39cab AC |
15902 | if mkdir conftest.dir; then |
15903 | cd conftest.dir | |
bec39cab | 15904 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
15905 | incroot: |
15906 | @echo incroot='${INCROOT}' | |
15907 | usrlibdir: | |
15908 | @echo usrlibdir='${USRLIBDIR}' | |
15909 | libdir: | |
15910 | @echo libdir='${LIBDIR}' | |
15911 | _ACEOF | |
15912 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 15913 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
15914 | for ac_var in incroot usrlibdir libdir; do |
15915 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
15916 | done | |
c906108c | 15917 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
15918 | for ac_extension in a so sl dylib la dll; do |
15919 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
15920 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 15921 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
15922 | fi |
15923 | done | |
15924 | # Screen out bogus values from the imake configuration. They are | |
15925 | # bogus both because they are the default anyway, and because | |
15926 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 15927 | case $ac_im_incroot in |
81ecdfbb | 15928 | /usr/include) ac_x_includes= ;; |
bec39cab | 15929 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 15930 | esac |
bec39cab | 15931 | case $ac_im_usrlibdir in |
81ecdfbb | 15932 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 15933 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
15934 | esac |
15935 | fi | |
15936 | cd .. | |
81ecdfbb | 15937 | rm -f -r conftest.dir |
c906108c SS |
15938 | fi |
15939 | ||
bec39cab AC |
15940 | # Standard set of common directories for X headers. |
15941 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
15942 | ac_x_header_dirs=' | |
15943 | /usr/X11/include | |
81ecdfbb | 15944 | /usr/X11R7/include |
bec39cab AC |
15945 | /usr/X11R6/include |
15946 | /usr/X11R5/include | |
15947 | /usr/X11R4/include | |
15948 | ||
15949 | /usr/include/X11 | |
81ecdfbb | 15950 | /usr/include/X11R7 |
bec39cab AC |
15951 | /usr/include/X11R6 |
15952 | /usr/include/X11R5 | |
15953 | /usr/include/X11R4 | |
15954 | ||
15955 | /usr/local/X11/include | |
81ecdfbb | 15956 | /usr/local/X11R7/include |
bec39cab AC |
15957 | /usr/local/X11R6/include |
15958 | /usr/local/X11R5/include | |
15959 | /usr/local/X11R4/include | |
15960 | ||
15961 | /usr/local/include/X11 | |
81ecdfbb | 15962 | /usr/local/include/X11R7 |
bec39cab AC |
15963 | /usr/local/include/X11R6 |
15964 | /usr/local/include/X11R5 | |
15965 | /usr/local/include/X11R4 | |
15966 | ||
15967 | /usr/X386/include | |
15968 | /usr/x386/include | |
15969 | /usr/XFree86/include/X11 | |
15970 | ||
15971 | /usr/include | |
15972 | /usr/local/include | |
15973 | /usr/unsupported/include | |
15974 | /usr/athena/include | |
15975 | /usr/local/x11r5/include | |
15976 | /usr/lpp/Xamples/include | |
15977 | ||
15978 | /usr/openwin/include | |
15979 | /usr/openwin/share/include' | |
15980 | ||
15981 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 15982 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 15983 | # First, try using that file with no special directory specified. |
81ecdfbb | 15984 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15985 | /* end confdefs.h. */ |
81ecdfbb | 15986 | #include <X11/Xlib.h> |
bec39cab | 15987 | _ACEOF |
81ecdfbb | 15988 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
15989 | # We can compile using X headers with no special include directory. |
15990 | ac_x_includes= | |
15991 | else | |
bec39cab | 15992 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 15993 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
15994 | ac_x_includes=$ac_dir |
15995 | break | |
15996 | fi | |
15997 | done | |
c906108c | 15998 | fi |
bec39cab AC |
15999 | rm -f conftest.err conftest.$ac_ext |
16000 | fi # $ac_x_includes = no | |
c906108c | 16001 | |
bec39cab | 16002 | if test "$ac_x_libraries" = no; then |
c906108c | 16003 | # Check for the libraries. |
c906108c SS |
16004 | # See if we find them without any special options. |
16005 | # Don't add to $LIBS permanently. | |
bec39cab | 16006 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
16007 | LIBS="-lX11 $LIBS" |
16008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16009 | /* end confdefs.h. */ |
81ecdfbb | 16010 | #include <X11/Xlib.h> |
bec39cab AC |
16011 | int |
16012 | main () | |
16013 | { | |
81ecdfbb | 16014 | XrmInitialize () |
bec39cab AC |
16015 | ; |
16016 | return 0; | |
16017 | } | |
16018 | _ACEOF | |
81ecdfbb | 16019 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16020 | LIBS=$ac_save_LIBS |
c906108c SS |
16021 | # We can link X programs with no special library path. |
16022 | ac_x_libraries= | |
16023 | else | |
81ecdfbb RW |
16024 | LIBS=$ac_save_LIBS |
16025 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 16026 | do |
bec39cab | 16027 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
16028 | for ac_extension in a so sl dylib la dll; do |
16029 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
16030 | ac_x_libraries=$ac_dir |
16031 | break 2 | |
16032 | fi | |
16033 | done | |
16034 | done | |
16035 | fi | |
81ecdfbb RW |
16036 | rm -f core conftest.err conftest.$ac_objext \ |
16037 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 16038 | fi # $ac_x_libraries = no |
c906108c | 16039 | |
81ecdfbb RW |
16040 | case $ac_x_includes,$ac_x_libraries in #( |
16041 | no,* | *,no | *\'*) | |
16042 | # Didn't find X, or a directory has "'" in its name. | |
16043 | ac_cv_have_x="have_x=no";; #( | |
16044 | *) | |
16045 | # Record where we found X for the cache. | |
16046 | ac_cv_have_x="have_x=yes\ | |
16047 | ac_x_includes='$ac_x_includes'\ | |
16048 | ac_x_libraries='$ac_x_libraries'" | |
16049 | esac | |
c906108c | 16050 | fi |
81ecdfbb RW |
16051 | ;; #( |
16052 | *) have_x=yes;; | |
16053 | esac | |
c906108c SS |
16054 | eval "$ac_cv_have_x" |
16055 | fi # $with_x != no | |
16056 | ||
16057 | if test "$have_x" != yes; then | |
81ecdfbb RW |
16058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
16059 | $as_echo "$have_x" >&6; } | |
c906108c SS |
16060 | no_x=yes |
16061 | else | |
16062 | # If each of the values was on the command line, it overrides each guess. | |
16063 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
16064 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
16065 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
16066 | ac_cv_have_x="have_x=yes\ |
16067 | ac_x_includes='$x_includes'\ | |
16068 | ac_x_libraries='$x_libraries'" | |
16069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
16070 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
16071 | fi |
16072 | ||
16073 | ||
bec39cab | 16074 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 16075 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
16076 | # This code just checks for a few cases where we'd like to ignore those |
16077 | # definitions, even when they're present in the '.mt' file. These cases | |
16078 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 16079 | # not part of the source tree. |
7a292a7a | 16080 | # |
81ecdfbb RW |
16081 | # Check whether --enable-sim was given. |
16082 | if test "${enable_sim+set}" = set; then : | |
16083 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
16084 | echo "enableval = ${enableval}"; |
16085 | case "${enableval}" in | |
16086 | yes) ignore_sim=false ;; | |
16087 | no) ignore_sim=true ;; | |
16088 | *) ignore_sim=false ;; | |
16089 | esac | |
16090 | else | |
16091 | ignore_sim=false | |
81ecdfbb RW |
16092 | fi |
16093 | ||
7a292a7a SS |
16094 | |
16095 | if test ! -d "${srcdir}/../sim"; then | |
16096 | ignore_sim=true | |
16097 | fi | |
16098 | ||
9b624dbe UW |
16099 | SIM= |
16100 | SIM_OBS= | |
16101 | if test "${ignore_sim}" = "false"; then | |
16102 | if test x"${gdb_sim}" != x ; then | |
16103 | SIM="${gdb_sim}" | |
16104 | SIM_OBS="remote-sim.o" | |
60ca704f | 16105 | |
81ecdfbb | 16106 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 16107 | |
9b624dbe | 16108 | fi |
7a292a7a SS |
16109 | fi |
16110 | ||
16111 | ||
16112 | ||
c906108c SS |
16113 | |
16114 | ||
16115 | ||
16116 | ||
16117 | ||
16118 | ||
dfcd3bfb | 16119 | |
e56ac5c3 AC |
16120 | |
16121 | ||
b3a90332 AC |
16122 | |
16123 | ||
c35f4ffc | 16124 | # List of host floatformats. |
bec39cab AC |
16125 | |
16126 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 16127 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 16128 | _ACEOF |
c35f4ffc | 16129 | |
bec39cab AC |
16130 | |
16131 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 16132 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
16133 | _ACEOF |
16134 | ||
c35f4ffc | 16135 | |
bec39cab | 16136 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 16137 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 16138 | _ACEOF |
c35f4ffc AC |
16139 | |
16140 | ||
c906108c SS |
16141 | # target_subdir is used by the testsuite to find the target libraries. |
16142 | target_subdir= | |
16143 | if test "${host}" != "${target}"; then | |
16144 | target_subdir="${target_alias}/" | |
16145 | fi | |
16146 | ||
16147 | ||
16148 | frags= | |
771b4502 | 16149 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
16150 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
16151 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 16152 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
16153 | fi |
16154 | frags="$frags $host_makefile_frag" | |
16155 | else | |
16156 | host_makefile_frag=/dev/null | |
c906108c | 16157 | fi |
c906108c | 16158 | |
c906108c SS |
16159 | |
16160 | ||
16161 | ||
771b4502 | 16162 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
16163 | # We pick this up from the host configuration file (.mh) because we |
16164 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
16165 | nativefile=`sed -n ' |
16166 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
16167 | ' ${host_makefile_frag}` | |
c906108c SS |
16168 | fi |
16169 | ||
16170 | ||
b00a8037 | 16171 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
16172 | |
16173 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 16174 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 16175 | _ACEOF |
b00a8037 DJ |
16176 | |
16177 | fi | |
16178 | ||
8dcde887 | 16179 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
16180 | # Check whether --enable-multi-ice was given. |
16181 | if test "${enable_multi_ice+set}" = set; then : | |
16182 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
16183 | yes | no) |
16184 | ;; | |
81ecdfbb | 16185 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 16186 | esac |
81ecdfbb | 16187 | fi |
b4e70030 | 16188 | |
81ecdfbb RW |
16189 | if test "x$enable_multi_ice" = xyes; then |
16190 | subdirs="$subdirs multi-ice" | |
3ace7edb | 16191 | |
a85f51e7 DJ |
16192 | fi |
16193 | ||
496c0e1b JB |
16194 | # Check whether --enable-gdbserver was given. |
16195 | if test "${enable_gdbserver+set}" = set; then : | |
16196 | enableval=$enable_gdbserver; case "${enableval}" in | |
16197 | yes| no|auto) ;; | |
16198 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
16199 | esac | |
16200 | else | |
16201 | enable_gdbserver=auto | |
16202 | fi | |
16203 | ||
16204 | ||
16205 | # We only build gdbserver automatically in a native configuration, and | |
16206 | # only if the user did not explicitly disable its build. | |
16207 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
16208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
16209 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 16210 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
16211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
16212 | $as_echo "yes" >&6; } | |
16213 | subdirs="$subdirs gdbserver" | |
3ace7edb | 16214 | |
496c0e1b | 16215 | gdbserver_build_enabled=yes |
8dcde887 | 16216 | else |
81ecdfbb RW |
16217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
16218 | $as_echo "no" >&6; } | |
8dcde887 MK |
16219 | fi |
16220 | fi | |
16221 | ||
496c0e1b JB |
16222 | # If the user explicitly request the gdbserver to be built, verify that |
16223 | # we were in fact able to enable it. | |
16224 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
16225 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
16226 | fi | |
16227 | ||
db985757 | 16228 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 16229 | # to an empty version. |
c906108c SS |
16230 | |
16231 | files= | |
16232 | links= | |
5a2402b8 | 16233 | |
c906108c SS |
16234 | rm -f nm.h |
16235 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
16236 | case "${nativefile}" in |
16237 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
16238 | * ) GDB_NM_FILE="${nativefile}" | |
16239 | esac | |
5a2402b8 AC |
16240 | files="${files} ${GDB_NM_FILE}" |
16241 | links="${links} nm.h" | |
60ca704f SE |
16242 | |
16243 | cat >>confdefs.h <<_ACEOF | |
b78960be | 16244 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 16245 | _ACEOF |
5a2402b8 | 16246 | |
c906108c | 16247 | fi |
5a2402b8 AC |
16248 | |
16249 | ||
bec39cab AC |
16250 | ac_sources="$files" |
16251 | ac_dests="$links" | |
16252 | while test -n "$ac_sources"; do | |
16253 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
16254 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
16255 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
16256 | done | |
81ecdfbb | 16257 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
16258 | |
16259 | ||
c906108c SS |
16260 | |
16261 | ||
c906108c | 16262 | |
81ecdfbb | 16263 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 16264 | |
bec39cab | 16265 | |
5ae98d25 | 16266 | ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile" |
81ecdfbb RW |
16267 | |
16268 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 16269 | |
bec39cab AC |
16270 | cat >confcache <<\_ACEOF |
16271 | # This file is a shell script that caches the results of configure | |
16272 | # tests run on this system so they can be shared between configure | |
16273 | # scripts and configure runs, see configure's option --config-cache. | |
16274 | # It is not useful on other systems. If it contains results you don't | |
16275 | # want to keep, you may remove or edit it. | |
16276 | # | |
16277 | # config.status only pays attention to the cache file if you give it | |
16278 | # the --recheck option to rerun configure. | |
16279 | # | |
16280 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
16281 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16282 | # following values. | |
16283 | ||
16284 | _ACEOF | |
16285 | ||
16286 | # The following way of writing the cache mishandles newlines in values, | |
16287 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 16288 | # So, we kill variables containing newlines. |
bec39cab AC |
16289 | # Ultrix sh set writes to stderr and can't be redirected directly, |
16290 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
16291 | ( |
16292 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
16293 | eval ac_val=\$$ac_var | |
16294 | case $ac_val in #( | |
16295 | *${as_nl}*) | |
16296 | case $ac_var in #( | |
16297 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
16298 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
16299 | esac | |
16300 | case $ac_var in #( | |
16301 | _ | IFS | as_nl) ;; #( | |
16302 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
16303 | *) { eval $ac_var=; unset $ac_var;} ;; | |
16304 | esac ;; | |
16305 | esac | |
16306 | done | |
16307 | ||
bec39cab | 16308 | (set) 2>&1 | |
81ecdfbb RW |
16309 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
16310 | *${as_nl}ac_space=\ *) | |
16311 | # `set' does not quote correctly, so add quotes: double-quote | |
16312 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
16313 | sed -n \ |
16314 | "s/'/'\\\\''/g; | |
16315 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 16316 | ;; #( |
bec39cab AC |
16317 | *) |
16318 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 16319 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 16320 | ;; |
81ecdfbb RW |
16321 | esac | |
16322 | sort | |
16323 | ) | | |
bec39cab | 16324 | sed ' |
81ecdfbb | 16325 | /^ac_cv_env_/b end |
bec39cab | 16326 | t clear |
81ecdfbb | 16327 | :clear |
bec39cab AC |
16328 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
16329 | t end | |
81ecdfbb RW |
16330 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
16331 | :end' >>confcache | |
16332 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
16333 | if test -w "$cache_file"; then | |
16334 | test "x$cache_file" != "x/dev/null" && | |
16335 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
16336 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
16337 | cat confcache >$cache_file |
16338 | else | |
81ecdfbb RW |
16339 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
16340 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
16341 | fi |
16342 | fi | |
16343 | rm -f confcache | |
16344 | ||
16345 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16346 | # Let make expand exec_prefix. | |
16347 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16348 | ||
bec39cab AC |
16349 | DEFS=-DHAVE_CONFIG_H |
16350 | ||
16351 | ac_libobjs= | |
16352 | ac_ltlibobjs= | |
16353 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16354 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
16355 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
16356 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
16357 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
16358 | # will be set to the directory where LIBOBJS objects are built. | |
16359 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
16360 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
16361 | done |
16362 | LIBOBJS=$ac_libobjs | |
16363 | ||
16364 | LTLIBOBJS=$ac_ltlibobjs | |
16365 | ||
16366 | ||
85981d60 | 16367 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
16368 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
16369 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 16370 | fi |
a417dc56 | 16371 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
16372 | as_fn_error "conditional \"GMAKE\" was never defined. |
16373 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 16374 | fi |
783e057b | 16375 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
81ecdfbb RW |
16376 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
16377 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
783e057b DJ |
16378 | fi |
16379 | ||
16380 | gl_libobjs= | |
16381 | gl_ltlibobjs= | |
16382 | if test -n "$gl_LIBOBJS"; then | |
16383 | # Remove the extension. | |
16384 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 16385 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
16386 | gl_libobjs="$gl_libobjs $i.$ac_objext" |
16387 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
16388 | done | |
16389 | fi | |
16390 | gl_LIBOBJS=$gl_libobjs | |
16391 | ||
16392 | gl_LTLIBOBJS=$gl_ltlibobjs | |
16393 | ||
16394 | ||
16395 | ||
16396 | gltests_libobjs= | |
16397 | gltests_ltlibobjs= | |
16398 | if test -n "$gltests_LIBOBJS"; then | |
16399 | # Remove the extension. | |
16400 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 16401 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
16402 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" |
16403 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
16404 | done | |
16405 | fi | |
16406 | gltests_LIBOBJS=$gltests_libobjs | |
16407 | ||
16408 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
16409 | ||
16410 | ||
e28b3332 | 16411 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
81ecdfbb RW |
16412 | as_fn_error "conditional \"AMDEP\" was never defined. |
16413 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
e28b3332 DJ |
16414 | fi |
16415 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
81ecdfbb RW |
16416 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
16417 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
16418 | fi | |
16419 | if test -n "$EXEEXT"; then | |
16420 | am__EXEEXT_TRUE= | |
16421 | am__EXEEXT_FALSE='#' | |
16422 | else | |
16423 | am__EXEEXT_TRUE='#' | |
16424 | am__EXEEXT_FALSE= | |
e28b3332 | 16425 | fi |
bec39cab | 16426 | |
81ecdfbb RW |
16427 | |
16428 | ||
bec39cab | 16429 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 16430 | ac_write_fail=0 |
bec39cab AC |
16431 | ac_clean_files_save=$ac_clean_files |
16432 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
16433 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
16434 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16435 | as_write_fail=0 | |
16436 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
16437 | #! $SHELL |
16438 | # Generated by $as_me. | |
16439 | # Run this file to recreate the current configuration. | |
16440 | # Compiler output produced by configure, useful for debugging | |
16441 | # configure, is in config.log if it exists. | |
16442 | ||
16443 | debug=false | |
16444 | ac_cs_recheck=false | |
16445 | ac_cs_silent=false | |
bec39cab | 16446 | |
81ecdfbb RW |
16447 | SHELL=\${CONFIG_SHELL-$SHELL} |
16448 | export SHELL | |
16449 | _ASEOF | |
16450 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
16451 | ## -------------------- ## | |
16452 | ## M4sh Initialization. ## | |
16453 | ## -------------------- ## | |
16454 | ||
16455 | # Be more Bourne compatible | |
16456 | DUALCASE=1; export DUALCASE # for MKS sh | |
16457 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
16458 | emulate sh |
16459 | NULLCMD=: | |
81ecdfbb | 16460 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
16461 | # is contrary to our usage. Disable this feature. |
16462 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
16463 | setopt NO_GLOB_SUBST |
16464 | else | |
16465 | case `(set -o) 2>/dev/null` in #( | |
16466 | *posix*) : | |
16467 | set -o posix ;; #( | |
16468 | *) : | |
16469 | ;; | |
16470 | esac | |
bec39cab | 16471 | fi |
bec39cab | 16472 | |
81ecdfbb RW |
16473 | |
16474 | as_nl=' | |
16475 | ' | |
16476 | export as_nl | |
16477 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
16478 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
16479 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
16480 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
16481 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
16482 | # but without wasting forks for bash or zsh. | |
16483 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
16484 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16485 | as_echo='print -r --' | |
16486 | as_echo_n='print -rn --' | |
16487 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16488 | as_echo='printf %s\n' | |
16489 | as_echo_n='printf %s' | |
16490 | else | |
16491 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
16492 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
16493 | as_echo_n='/usr/ucb/echo -n' | |
16494 | else | |
16495 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
16496 | as_echo_n_body='eval | |
16497 | arg=$1; | |
16498 | case $arg in #( | |
16499 | *"$as_nl"*) | |
16500 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
16501 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
16502 | esac; | |
16503 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
16504 | ' | |
16505 | export as_echo_n_body | |
16506 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
16507 | fi | |
16508 | export as_echo_body | |
16509 | as_echo='sh -c $as_echo_body as_echo' | |
16510 | fi | |
16511 | ||
16512 | # The user is always right. | |
16513 | if test "${PATH_SEPARATOR+set}" != set; then | |
16514 | PATH_SEPARATOR=: | |
16515 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
16516 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
16517 | PATH_SEPARATOR=';' | |
16518 | } | |
bec39cab AC |
16519 | fi |
16520 | ||
16521 | ||
81ecdfbb RW |
16522 | # IFS |
16523 | # We need space, tab and new line, in precisely that order. Quoting is | |
16524 | # there to prevent editors from complaining about space-tab. | |
16525 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
16526 | # splitting by setting IFS to empty value.) | |
16527 | IFS=" "" $as_nl" | |
16528 | ||
16529 | # Find who we are. Look in the path if we contain no directory separator. | |
16530 | case $0 in #(( | |
16531 | *[\\/]* ) as_myself=$0 ;; | |
16532 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16533 | for as_dir in $PATH | |
16534 | do | |
16535 | IFS=$as_save_IFS | |
16536 | test -z "$as_dir" && as_dir=. | |
16537 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16538 | done | |
16539 | IFS=$as_save_IFS | |
16540 | ||
16541 | ;; | |
16542 | esac | |
16543 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16544 | # in which case we are not to be found in the path. | |
16545 | if test "x$as_myself" = x; then | |
16546 | as_myself=$0 | |
16547 | fi | |
16548 | if test ! -f "$as_myself"; then | |
16549 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
16550 | exit 1 | |
16551 | fi | |
16552 | ||
16553 | # Unset variables that we do not need and which cause bugs (e.g. in | |
16554 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
16555 | # suppresses any "Segmentation fault" message there. '((' could | |
16556 | # trigger a bug in pdksh 5.2.14. | |
16557 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
16558 | do eval test x\${$as_var+set} = xset \ | |
16559 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
16560 | done | |
bec39cab AC |
16561 | PS1='$ ' |
16562 | PS2='> ' | |
16563 | PS4='+ ' | |
16564 | ||
16565 | # NLS nuisances. | |
81ecdfbb RW |
16566 | LC_ALL=C |
16567 | export LC_ALL | |
16568 | LANGUAGE=C | |
16569 | export LANGUAGE | |
16570 | ||
16571 | # CDPATH. | |
16572 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
16573 | ||
16574 | ||
16575 | # as_fn_error ERROR [LINENO LOG_FD] | |
16576 | # --------------------------------- | |
16577 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
16578 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
16579 | # script with status $?, using 1 if that was 0. | |
16580 | as_fn_error () | |
16581 | { | |
16582 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
16583 | if test "$3"; then | |
16584 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
16585 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
16586 | fi | |
16587 | $as_echo "$as_me: error: $1" >&2 | |
16588 | as_fn_exit $as_status | |
16589 | } # as_fn_error | |
16590 | ||
16591 | ||
16592 | # as_fn_set_status STATUS | |
16593 | # ----------------------- | |
16594 | # Set $? to STATUS, without forking. | |
16595 | as_fn_set_status () | |
16596 | { | |
16597 | return $1 | |
16598 | } # as_fn_set_status | |
16599 | ||
16600 | # as_fn_exit STATUS | |
16601 | # ----------------- | |
16602 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
16603 | as_fn_exit () | |
16604 | { | |
16605 | set +e | |
16606 | as_fn_set_status $1 | |
16607 | exit $1 | |
16608 | } # as_fn_exit | |
16609 | ||
16610 | # as_fn_unset VAR | |
16611 | # --------------- | |
16612 | # Portably unset VAR. | |
16613 | as_fn_unset () | |
16614 | { | |
16615 | { eval $1=; unset $1;} | |
16616 | } | |
16617 | as_unset=as_fn_unset | |
16618 | # as_fn_append VAR VALUE | |
16619 | # ---------------------- | |
16620 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
16621 | # advantage of any shell optimizations that allow amortized linear growth over | |
16622 | # repeated appends, instead of the typical quadratic growth present in naive | |
16623 | # implementations. | |
16624 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
16625 | eval 'as_fn_append () | |
16626 | { | |
16627 | eval $1+=\$2 | |
16628 | }' | |
16629 | else | |
16630 | as_fn_append () | |
16631 | { | |
16632 | eval $1=\$$1\$2 | |
16633 | } | |
16634 | fi # as_fn_append | |
16635 | ||
16636 | # as_fn_arith ARG... | |
16637 | # ------------------ | |
16638 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
16639 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
16640 | # must be portable across $(()) and expr. | |
16641 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
16642 | eval 'as_fn_arith () | |
16643 | { | |
16644 | as_val=$(( $* )) | |
16645 | }' | |
16646 | else | |
16647 | as_fn_arith () | |
16648 | { | |
16649 | as_val=`expr "$@" || test $? -eq 1` | |
16650 | } | |
16651 | fi # as_fn_arith | |
bec39cab | 16652 | |
81ecdfbb RW |
16653 | |
16654 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
16655 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
16656 | as_expr=expr |
16657 | else | |
16658 | as_expr=false | |
16659 | fi | |
16660 | ||
81ecdfbb | 16661 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
16662 | as_basename=basename |
16663 | else | |
16664 | as_basename=false | |
16665 | fi | |
16666 | ||
81ecdfbb RW |
16667 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
16668 | as_dirname=dirname | |
16669 | else | |
16670 | as_dirname=false | |
16671 | fi | |
bec39cab | 16672 | |
81ecdfbb | 16673 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
16674 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
16675 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16676 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
16677 | $as_echo X/"$0" | | |
16678 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
16679 | s//\1/ | |
16680 | q | |
16681 | } | |
16682 | /^X\/\(\/\/\)$/{ | |
16683 | s//\1/ | |
16684 | q | |
16685 | } | |
16686 | /^X\/\(\/\).*/{ | |
16687 | s//\1/ | |
16688 | q | |
16689 | } | |
16690 | s/.*/./; q'` | |
b4e70030 | 16691 | |
b4e70030 JB |
16692 | # Avoid depending upon Character Ranges. |
16693 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16694 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16695 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16696 | as_cr_digits='0123456789' | |
16697 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16698 | ||
81ecdfbb RW |
16699 | ECHO_C= ECHO_N= ECHO_T= |
16700 | case `echo -n x` in #((((( | |
16701 | -n*) | |
16702 | case `echo 'xy\c'` in | |
16703 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
16704 | xy) ECHO_C='\c';; | |
16705 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
16706 | ECHO_T=' ';; | |
16707 | esac;; | |
16708 | *) | |
16709 | ECHO_N='-n';; | |
bec39cab AC |
16710 | esac |
16711 | ||
81ecdfbb RW |
16712 | rm -f conf$$ conf$$.exe conf$$.file |
16713 | if test -d conf$$.dir; then | |
16714 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 16715 | else |
81ecdfbb RW |
16716 | rm -f conf$$.dir |
16717 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 16718 | fi |
81ecdfbb RW |
16719 | if (echo >conf$$.file) 2>/dev/null; then |
16720 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 16721 | as_ln_s='ln -s' |
81ecdfbb RW |
16722 | # ... but there are two gotchas: |
16723 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
16724 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
16725 | # In both cases, we have to default to `cp -p'. | |
16726 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
16727 | as_ln_s='cp -p' | |
16728 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
16729 | as_ln_s=ln | |
16730 | else | |
16731 | as_ln_s='cp -p' | |
b4e70030 | 16732 | fi |
bec39cab AC |
16733 | else |
16734 | as_ln_s='cp -p' | |
16735 | fi | |
81ecdfbb RW |
16736 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
16737 | rmdir conf$$.dir 2>/dev/null | |
16738 | ||
16739 | ||
16740 | # as_fn_mkdir_p | |
16741 | # ------------- | |
16742 | # Create "$as_dir" as a directory, including parents if necessary. | |
16743 | as_fn_mkdir_p () | |
16744 | { | |
16745 | ||
16746 | case $as_dir in #( | |
16747 | -*) as_dir=./$as_dir;; | |
16748 | esac | |
16749 | test -d "$as_dir" || eval $as_mkdir_p || { | |
16750 | as_dirs= | |
16751 | while :; do | |
16752 | case $as_dir in #( | |
16753 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
16754 | *) as_qdir=$as_dir;; | |
16755 | esac | |
16756 | as_dirs="'$as_qdir' $as_dirs" | |
16757 | as_dir=`$as_dirname -- "$as_dir" || | |
16758 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16759 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
16760 | X"$as_dir" : 'X\(//\)$' \| \ | |
16761 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
16762 | $as_echo X"$as_dir" | | |
16763 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16764 | s//\1/ | |
16765 | q | |
16766 | } | |
16767 | /^X\(\/\/\)[^/].*/{ | |
16768 | s//\1/ | |
16769 | q | |
16770 | } | |
16771 | /^X\(\/\/\)$/{ | |
16772 | s//\1/ | |
16773 | q | |
16774 | } | |
16775 | /^X\(\/\).*/{ | |
16776 | s//\1/ | |
16777 | q | |
16778 | } | |
16779 | s/.*/./; q'` | |
16780 | test -d "$as_dir" && break | |
16781 | done | |
16782 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
16783 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
16784 | ||
bec39cab | 16785 | |
81ecdfbb | 16786 | } # as_fn_mkdir_p |
bec39cab | 16787 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 16788 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
16789 | else |
16790 | test -d ./-p && rmdir ./-p | |
16791 | as_mkdir_p=false | |
16792 | fi | |
16793 | ||
81ecdfbb RW |
16794 | if test -x / >/dev/null 2>&1; then |
16795 | as_test_x='test -x' | |
16796 | else | |
16797 | if ls -dL / >/dev/null 2>&1; then | |
16798 | as_ls_L_option=L | |
16799 | else | |
16800 | as_ls_L_option= | |
16801 | fi | |
16802 | as_test_x=' | |
16803 | eval sh -c '\'' | |
16804 | if test -d "$1"; then | |
16805 | test -d "$1/."; | |
16806 | else | |
16807 | case $1 in #( | |
16808 | -*)set "./$1";; | |
16809 | esac; | |
16810 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
16811 | ???[sx]*):;;*)false;;esac;fi | |
16812 | '\'' sh | |
16813 | ' | |
16814 | fi | |
16815 | as_executable_p=$as_test_x | |
bec39cab AC |
16816 | |
16817 | # Sed expression to map a string onto a valid CPP name. | |
16818 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
16819 | ||
16820 | # Sed expression to map a string onto a valid variable name. | |
16821 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
16822 | ||
16823 | ||
bec39cab | 16824 | exec 6>&1 |
81ecdfbb RW |
16825 | ## ----------------------------------- ## |
16826 | ## Main body of $CONFIG_STATUS script. ## | |
16827 | ## ----------------------------------- ## | |
16828 | _ASEOF | |
16829 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
16830 | ||
16831 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16832 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 16833 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
16834 | # values after options handling. |
16835 | ac_log=" | |
bec39cab | 16836 | This file was extended by $as_me, which was |
81ecdfbb | 16837 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
16838 | |
16839 | CONFIG_FILES = $CONFIG_FILES | |
16840 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16841 | CONFIG_LINKS = $CONFIG_LINKS | |
16842 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16843 | $ $0 $@ | |
16844 | ||
81ecdfbb RW |
16845 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
16846 | " | |
16847 | ||
bec39cab AC |
16848 | _ACEOF |
16849 | ||
81ecdfbb RW |
16850 | case $ac_config_files in *" |
16851 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
16852 | esac | |
234b45d4 | 16853 | |
81ecdfbb RW |
16854 | case $ac_config_headers in *" |
16855 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
16856 | esac | |
b4e70030 | 16857 | |
b4e70030 | 16858 | |
81ecdfbb RW |
16859 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
16860 | # Files that config.status was made for. | |
16861 | config_files="$ac_config_files" | |
16862 | config_headers="$ac_config_headers" | |
16863 | config_links="$ac_config_links" | |
16864 | config_commands="$ac_config_commands" | |
234b45d4 | 16865 | |
81ecdfbb | 16866 | _ACEOF |
b4e70030 | 16867 | |
81ecdfbb | 16868 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 16869 | ac_cs_usage="\ |
81ecdfbb RW |
16870 | \`$as_me' instantiates files and other configuration actions |
16871 | from templates according to the current configuration. Unless the files | |
16872 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 16873 | |
81ecdfbb | 16874 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 16875 | |
bec39cab | 16876 | -h, --help print this help, then exit |
81ecdfbb RW |
16877 | -V, --version print version number and configuration settings, then exit |
16878 | -q, --quiet, --silent | |
16879 | do not print progress messages | |
bec39cab AC |
16880 | -d, --debug don't remove temporary files |
16881 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
16882 | --file=FILE[:TEMPLATE] |
16883 | instantiate the configuration file FILE | |
16884 | --header=FILE[:TEMPLATE] | |
16885 | instantiate the configuration header FILE | |
234b45d4 | 16886 | |
bec39cab AC |
16887 | Configuration files: |
16888 | $config_files | |
234b45d4 | 16889 | |
bec39cab AC |
16890 | Configuration headers: |
16891 | $config_headers | |
234b45d4 | 16892 | |
bec39cab AC |
16893 | Configuration links: |
16894 | $config_links | |
234b45d4 | 16895 | |
bec39cab AC |
16896 | Configuration commands: |
16897 | $config_commands | |
16898 | ||
81ecdfbb | 16899 | Report bugs to the package provider." |
b4e70030 | 16900 | |
81ecdfbb RW |
16901 | _ACEOF |
16902 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
16903 | ac_cs_version="\\ |
16904 | config.status | |
81ecdfbb RW |
16905 | configured by $0, generated by GNU Autoconf 2.64, |
16906 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 16907 | |
81ecdfbb | 16908 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
16909 | This config.status script is free software; the Free Software Foundation |
16910 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
16911 | |
16912 | ac_pwd='$ac_pwd' | |
16913 | srcdir='$srcdir' | |
16914 | INSTALL='$INSTALL' | |
16915 | MKDIR_P='$MKDIR_P' | |
16916 | AWK='$AWK' | |
16917 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
16918 | _ACEOF |
16919 | ||
81ecdfbb RW |
16920 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16921 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
16922 | ac_need_defaults=: |
16923 | while test $# != 0 | |
16924 | do | |
16925 | case $1 in | |
16926 | --*=*) | |
81ecdfbb RW |
16927 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
16928 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 16929 | ac_shift=: |
c906108c | 16930 | ;; |
81ecdfbb | 16931 | *) |
bec39cab AC |
16932 | ac_option=$1 |
16933 | ac_optarg=$2 | |
16934 | ac_shift=shift | |
c906108c | 16935 | ;; |
bec39cab | 16936 | esac |
c906108c | 16937 | |
bec39cab AC |
16938 | case $ac_option in |
16939 | # Handling of the options. | |
bec39cab AC |
16940 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
16941 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
16942 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
16943 | $as_echo "$ac_cs_version"; exit ;; | |
16944 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
16945 | debug=: ;; |
16946 | --file | --fil | --fi | --f ) | |
16947 | $ac_shift | |
81ecdfbb RW |
16948 | case $ac_optarg in |
16949 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16950 | esac | |
16951 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
16952 | ac_need_defaults=false;; |
16953 | --header | --heade | --head | --hea ) | |
16954 | $ac_shift | |
81ecdfbb RW |
16955 | case $ac_optarg in |
16956 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16957 | esac | |
16958 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 16959 | ac_need_defaults=false;; |
81ecdfbb RW |
16960 | --he | --h) |
16961 | # Conflict between --help and --header | |
16962 | as_fn_error "ambiguous option: \`$1' | |
16963 | Try \`$0 --help' for more information.";; | |
16964 | --help | --hel | -h ) | |
16965 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
16966 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
16967 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16968 | ac_cs_silent=: ;; | |
c906108c | 16969 | |
bec39cab | 16970 | # This is an error. |
81ecdfbb RW |
16971 | -*) as_fn_error "unrecognized option: \`$1' |
16972 | Try \`$0 --help' for more information." ;; | |
c906108c | 16973 | |
81ecdfbb RW |
16974 | *) as_fn_append ac_config_targets " $1" |
16975 | ac_need_defaults=false ;; | |
c906108c | 16976 | |
bec39cab AC |
16977 | esac |
16978 | shift | |
16979 | done | |
c906108c | 16980 | |
bec39cab | 16981 | ac_configure_extra_args= |
c906108c | 16982 | |
bec39cab AC |
16983 | if $ac_cs_silent; then |
16984 | exec 6>/dev/null | |
16985 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
16986 | fi | |
c906108c | 16987 | |
bec39cab | 16988 | _ACEOF |
81ecdfbb | 16989 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 16990 | if \$ac_cs_recheck; then |
81ecdfbb RW |
16991 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
16992 | shift | |
16993 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
16994 | CONFIG_SHELL='$SHELL' | |
16995 | export CONFIG_SHELL | |
16996 | exec "\$@" | |
bec39cab AC |
16997 | fi |
16998 | ||
16999 | _ACEOF | |
81ecdfbb RW |
17000 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17001 | exec 5>>config.log | |
17002 | { | |
17003 | echo | |
17004 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
17005 | ## Running $as_me. ## | |
17006 | _ASBOX | |
17007 | $as_echo "$ac_log" | |
17008 | } >&5 | |
bec39cab | 17009 | |
81ecdfbb RW |
17010 | _ACEOF |
17011 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 17012 | # |
81ecdfbb | 17013 | # INIT-COMMANDS |
c906108c | 17014 | # |
a417dc56 | 17015 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
e28b3332 | 17016 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
b4e70030 | 17017 | |
bec39cab AC |
17018 | _ACEOF |
17019 | ||
81ecdfbb | 17020 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 17021 | |
81ecdfbb | 17022 | # Handling of arguments. |
bec39cab | 17023 | for ac_config_target in $ac_config_targets |
c906108c | 17024 | do |
81ecdfbb RW |
17025 | case $ac_config_target in |
17026 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
17027 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
17028 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
f997c383 | 17029 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb RW |
17030 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
17031 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
17032 | ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;; | |
5ae98d25 | 17033 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
81ecdfbb | 17034 | "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; |
aa2e2d8d | 17035 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
17036 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
17037 | ||
17038 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
17039 | esac |
17040 | done | |
17041 | ||
81ecdfbb | 17042 | |
bec39cab AC |
17043 | # If the user did not use the arguments to specify the items to instantiate, |
17044 | # then the envvar interface is used. Set only those that are not. | |
17045 | # We use the long form for the default assignment because of an extremely | |
17046 | # bizarre bug on SunOS 4.1.3. | |
17047 | if $ac_need_defaults; then | |
17048 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
17049 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
17050 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
17051 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
17052 | fi | |
17053 | ||
b4e70030 | 17054 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 17055 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 17056 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
17057 | # Hook for its removal unless debugging. |
17058 | # Note that there is a small window in which the directory will not be cleaned: | |
17059 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
17060 | $debug || |
17061 | { | |
81ecdfbb RW |
17062 | tmp= |
17063 | trap 'exit_status=$? | |
17064 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
17065 | ' 0 | |
17066 | trap 'as_fn_exit 1' 1 2 13 15 | |
17067 | } | |
17068 | # Create a (secure) tmp directory for tmp files. | |
17069 | ||
17070 | { | |
17071 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
17072 | test -n "$tmp" && test -d "$tmp" | |
17073 | } || | |
17074 | { | |
17075 | tmp=./conf$$-$RANDOM | |
17076 | (umask 077 && mkdir "$tmp") | |
17077 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
17078 | ||
17079 | # Set up the scripts for CONFIG_FILES section. | |
17080 | # No need to generate them if there are no CONFIG_FILES. | |
17081 | # This happens for instance with `./config.status config.h'. | |
17082 | if test -n "$CONFIG_FILES"; then | |
17083 | ||
17084 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
17085 | ac_cs_awk_getline=: | |
17086 | ac_cs_awk_pipe_init= | |
17087 | ac_cs_awk_read_file=' | |
17088 | while ((getline aline < (F[key])) > 0) | |
17089 | print(aline) | |
17090 | close(F[key])' | |
17091 | ac_cs_awk_pipe_fini= | |
17092 | else | |
17093 | ac_cs_awk_getline=false | |
17094 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
17095 | ac_cs_awk_read_file=' | |
17096 | print "|#_!!_#|" | |
17097 | print "cat " F[key] " &&" | |
17098 | '$ac_cs_awk_pipe_init | |
17099 | # The final `:' finishes the AND list. | |
17100 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
17101 | fi | |
17102 | ac_cr=`echo X | tr X '\015'` | |
17103 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
17104 | # But we know of no other shell where ac_cr would be empty at this | |
17105 | # point, so we can use a bashism as a fallback. | |
17106 | if test "x$ac_cr" = x; then | |
17107 | eval ac_cr=\$\'\\r\' | |
17108 | fi | |
17109 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
17110 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
17111 | ac_cs_awk_cr='\r' | |
17112 | else | |
17113 | ac_cs_awk_cr=$ac_cr | |
17114 | fi | |
17115 | ||
17116 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
17117 | _ACEOF | |
17118 | ||
17119 | # Create commands to substitute file output variables. | |
17120 | { | |
17121 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
17122 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
17123 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
17124 | echo "_ACAWK" && | |
17125 | echo "_ACEOF" | |
17126 | } >conf$$files.sh && | |
17127 | . ./conf$$files.sh || | |
17128 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17129 | rm -f conf$$files.sh | |
17130 | ||
17131 | { | |
17132 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
17133 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
17134 | echo "_ACEOF" | |
17135 | } >conf$$subs.sh || | |
17136 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17137 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
17138 | ac_delim='%!_!# ' | |
17139 | for ac_last_try in false false false false false :; do | |
17140 | . ./conf$$subs.sh || | |
17141 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17142 | ||
17143 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
17144 | if test $ac_delim_n = $ac_delim_num; then | |
17145 | break | |
17146 | elif $ac_last_try; then | |
17147 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
17148 | else | |
17149 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
17150 | fi | |
17151 | done | |
17152 | rm -f conf$$subs.sh | |
17153 | ||
17154 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17155 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
17156 | _ACEOF | |
17157 | sed -n ' | |
17158 | h | |
17159 | s/^/S["/; s/!.*/"]=/ | |
17160 | p | |
17161 | g | |
17162 | s/^[^!]*!// | |
17163 | :repl | |
17164 | t repl | |
17165 | s/'"$ac_delim"'$// | |
17166 | t delim | |
17167 | :nl | |
17168 | h | |
17169 | s/\(.\{148\}\).*/\1/ | |
17170 | t more1 | |
17171 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
17172 | p | |
17173 | n | |
17174 | b repl | |
17175 | :more1 | |
17176 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
17177 | p | |
17178 | g | |
17179 | s/.\{148\}// | |
17180 | t nl | |
17181 | :delim | |
17182 | h | |
17183 | s/\(.\{148\}\).*/\1/ | |
17184 | t more2 | |
17185 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
17186 | p | |
17187 | b | |
17188 | :more2 | |
17189 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
17190 | p | |
17191 | g | |
17192 | s/.\{148\}// | |
17193 | t delim | |
17194 | ' <conf$$subs.awk | sed ' | |
17195 | /^[^""]/{ | |
17196 | N | |
17197 | s/\n// | |
17198 | } | |
17199 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
17200 | rm -f conf$$subs.awk | |
17201 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17202 | _ACAWK | |
17203 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
17204 | for (key in S) S_is_set[key] = 1 | |
17205 | FS = "\a" | |
17206 | \$ac_cs_awk_pipe_init | |
17207 | } | |
17208 | { | |
17209 | line = $ 0 | |
17210 | nfields = split(line, field, "@") | |
17211 | substed = 0 | |
17212 | len = length(field[1]) | |
17213 | for (i = 2; i < nfields; i++) { | |
17214 | key = field[i] | |
17215 | keylen = length(key) | |
17216 | if (S_is_set[key]) { | |
17217 | value = S[key] | |
17218 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
17219 | len += length(value) + length(field[++i]) | |
17220 | substed = 1 | |
17221 | } else | |
17222 | len += 1 + keylen | |
17223 | } | |
17224 | if (nfields == 3 && !substed) { | |
17225 | key = field[2] | |
17226 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
17227 | \$ac_cs_awk_read_file | |
17228 | next | |
17229 | } | |
17230 | } | |
17231 | print line | |
b4e70030 | 17232 | } |
81ecdfbb RW |
17233 | \$ac_cs_awk_pipe_fini |
17234 | _ACAWK | |
17235 | _ACEOF | |
17236 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17237 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
17238 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
17239 | else | |
17240 | cat | |
17241 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
17242 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
17243 | _ACEOF | |
17244 | ||
17245 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
17246 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
17247 | # trailing colons and then remove the whole line if VPATH becomes empty | |
17248 | # (actually we leave an empty line to preserve line numbers). | |
17249 | if test "x$srcdir" = x.; then | |
17250 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
17251 | s/:*\$(srcdir):*/:/ | |
17252 | s/:*\${srcdir}:*/:/ | |
17253 | s/:*@srcdir@:*/:/ | |
17254 | s/^\([^=]*=[ ]*\):*/\1/ | |
17255 | s/:*$// | |
17256 | s/^[^=]*=[ ]*$// | |
17257 | }' | |
17258 | fi | |
17259 | ||
17260 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17261 | fi # test -n "$CONFIG_FILES" | |
17262 | ||
17263 | # Set up the scripts for CONFIG_HEADERS section. | |
17264 | # No need to generate them if there are no CONFIG_HEADERS. | |
17265 | # This happens for instance with `./config.status Makefile'. | |
17266 | if test -n "$CONFIG_HEADERS"; then | |
17267 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
17268 | BEGIN { | |
17269 | _ACEOF | |
17270 | ||
17271 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
17272 | # here-document in config.status, that substitutes the proper values into | |
17273 | # config.h.in to produce config.h. | |
4e8d927d | 17274 | |
81ecdfbb RW |
17275 | # Create a delimiter string that does not exist in confdefs.h, to ease |
17276 | # handling of long lines. | |
17277 | ac_delim='%!_!# ' | |
17278 | for ac_last_try in false false :; do | |
17279 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
17280 | if test -z "$ac_t"; then | |
17281 | break | |
17282 | elif $ac_last_try; then | |
17283 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
17284 | else | |
17285 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
17286 | fi | |
17287 | done | |
4e8d927d | 17288 | |
81ecdfbb RW |
17289 | # For the awk script, D is an array of macro values keyed by name, |
17290 | # likewise P contains macro parameters if any. Preserve backslash | |
17291 | # newline sequences. | |
17292 | ||
17293 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
17294 | sed -n ' | |
17295 | s/.\{148\}/&'"$ac_delim"'/g | |
17296 | t rset | |
17297 | :rset | |
17298 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
17299 | t def | |
17300 | d | |
17301 | :def | |
17302 | s/\\$// | |
17303 | t bsnl | |
17304 | s/["\\]/\\&/g | |
17305 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
17306 | D["\1"]=" \3"/p | |
17307 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
17308 | d | |
17309 | :bsnl | |
17310 | s/["\\]/\\&/g | |
17311 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
17312 | D["\1"]=" \3\\\\\\n"\\/p | |
17313 | t cont | |
17314 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
17315 | t cont | |
17316 | d | |
17317 | :cont | |
17318 | n | |
17319 | s/.\{148\}/&'"$ac_delim"'/g | |
17320 | t clear | |
17321 | :clear | |
17322 | s/\\$// | |
17323 | t bsnlc | |
17324 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
17325 | d | |
17326 | :bsnlc | |
17327 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
17328 | b cont | |
17329 | ' <confdefs.h | sed ' | |
17330 | s/'"$ac_delim"'/"\\\ | |
17331 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
17332 | ||
17333 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17334 | for (key in D) D_is_set[key] = 1 | |
17335 | FS = "\a" | |
17336 | } | |
17337 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
17338 | line = \$ 0 | |
17339 | split(line, arg, " ") | |
17340 | if (arg[1] == "#") { | |
17341 | defundef = arg[2] | |
17342 | mac1 = arg[3] | |
17343 | } else { | |
17344 | defundef = substr(arg[1], 2) | |
17345 | mac1 = arg[2] | |
17346 | } | |
17347 | split(mac1, mac2, "(") #) | |
17348 | macro = mac2[1] | |
17349 | prefix = substr(line, 1, index(line, defundef) - 1) | |
17350 | if (D_is_set[macro]) { | |
17351 | # Preserve the white space surrounding the "#". | |
17352 | print prefix "define", macro P[macro] D[macro] | |
17353 | next | |
17354 | } else { | |
17355 | # Replace #undef with comments. This is necessary, for example, | |
17356 | # in the case of _POSIX_SOURCE, which is predefined and required | |
17357 | # on some systems where configure will not decide to define it. | |
17358 | if (defundef == "undef") { | |
17359 | print "/*", prefix defundef, macro, "*/" | |
17360 | next | |
17361 | } | |
17362 | } | |
b4e70030 | 17363 | } |
81ecdfbb RW |
17364 | { print } |
17365 | _ACAWK | |
b4e70030 | 17366 | _ACEOF |
81ecdfbb RW |
17367 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17368 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
17369 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 17370 | |
4e8d927d | 17371 | |
81ecdfbb RW |
17372 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
17373 | shift | |
17374 | for ac_tag | |
17375 | do | |
17376 | case $ac_tag in | |
17377 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
17378 | esac | |
17379 | case $ac_mode$ac_tag in | |
17380 | :[FHL]*:*);; | |
17381 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
17382 | :[FH]-) ac_tag=-:-;; | |
17383 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
17384 | esac | |
17385 | ac_save_IFS=$IFS | |
17386 | IFS=: | |
17387 | set x $ac_tag | |
17388 | IFS=$ac_save_IFS | |
17389 | shift | |
17390 | ac_file=$1 | |
17391 | shift | |
4e8d927d | 17392 | |
81ecdfbb RW |
17393 | case $ac_mode in |
17394 | :L) ac_source=$1;; | |
17395 | :[FH]) | |
17396 | ac_file_inputs= | |
17397 | for ac_f | |
17398 | do | |
17399 | case $ac_f in | |
17400 | -) ac_f="$tmp/stdin";; | |
17401 | *) # Look for the file first in the build tree, then in the source tree | |
17402 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
17403 | # because $ac_f cannot contain `:'. | |
17404 | test -f "$ac_f" || | |
17405 | case $ac_f in | |
17406 | [\\/$]*) false;; | |
17407 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
17408 | esac || | |
17409 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
17410 | esac | |
17411 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
17412 | as_fn_append ac_file_inputs " '$ac_f'" | |
17413 | done | |
17414 | ||
17415 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17416 | # use $as_me), people would be surprised to read: | |
17417 | # /* config.h. Generated by config.status. */ | |
17418 | configure_input='Generated from '` | |
17419 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
17420 | `' by configure.' | |
17421 | if test x"$ac_file" != x-; then | |
17422 | configure_input="$ac_file. $configure_input" | |
17423 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
17424 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 17425 | fi |
81ecdfbb RW |
17426 | # Neutralize special characters interpreted by sed in replacement strings. |
17427 | case $configure_input in #( | |
17428 | *\&* | *\|* | *\\* ) | |
17429 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
17430 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
17431 | *) ac_sed_conf_input=$configure_input;; | |
17432 | esac | |
4e8d927d | 17433 | |
81ecdfbb RW |
17434 | case $ac_tag in |
17435 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
17436 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
17437 | esac | |
17438 | ;; | |
c906108c SS |
17439 | esac |
17440 | ||
81ecdfbb | 17441 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
17442 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17443 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
17444 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17445 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
17446 | $as_echo X"$ac_file" | | |
17447 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17448 | s//\1/ | |
17449 | q | |
17450 | } | |
17451 | /^X\(\/\/\)[^/].*/{ | |
17452 | s//\1/ | |
17453 | q | |
17454 | } | |
17455 | /^X\(\/\/\)$/{ | |
17456 | s//\1/ | |
17457 | q | |
17458 | } | |
17459 | /^X\(\/\).*/{ | |
17460 | s//\1/ | |
17461 | q | |
17462 | } | |
17463 | s/.*/./; q'` | |
17464 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17465 | ac_builddir=. |
17466 | ||
81ecdfbb RW |
17467 | case "$ac_dir" in |
17468 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17469 | *) | |
17470 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17471 | # A ".." for each directory in $ac_dir_suffix. | |
17472 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17473 | case $ac_top_builddir_sub in | |
17474 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17475 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17476 | esac ;; | |
17477 | esac | |
17478 | ac_abs_top_builddir=$ac_pwd | |
17479 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17480 | # for backward compatibility: | |
17481 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17482 | |
17483 | case $srcdir in | |
81ecdfbb | 17484 | .) # We are building in place. |
bec39cab | 17485 | ac_srcdir=. |
81ecdfbb RW |
17486 | ac_top_srcdir=$ac_top_builddir_sub |
17487 | ac_abs_top_srcdir=$ac_pwd ;; | |
17488 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17489 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17490 | ac_top_srcdir=$srcdir |
17491 | ac_abs_top_srcdir=$srcdir ;; | |
17492 | *) # Relative name. | |
17493 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17494 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17495 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17496 | esac |
81ecdfbb | 17497 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 17498 | |
c906108c | 17499 | |
81ecdfbb RW |
17500 | case $ac_mode in |
17501 | :F) | |
17502 | # | |
17503 | # CONFIG_FILE | |
17504 | # | |
c906108c | 17505 | |
bec39cab AC |
17506 | case $INSTALL in |
17507 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 17508 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 17509 | esac |
81ecdfbb RW |
17510 | ac_MKDIR_P=$MKDIR_P |
17511 | case $MKDIR_P in | |
17512 | [\\/$]* | ?:[\\/]* ) ;; | |
17513 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
17514 | esac | |
17515 | _ACEOF | |
121ce6e5 | 17516 | |
81ecdfbb RW |
17517 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17518 | # If the template does not know about datarootdir, expand it. | |
17519 | # FIXME: This hack should be removed a few years after 2.60. | |
17520 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
17521 | ac_sed_dataroot=' | |
17522 | /datarootdir/ { | |
17523 | p | |
17524 | q | |
17525 | } | |
17526 | /@datadir@/p | |
17527 | /@docdir@/p | |
17528 | /@infodir@/p | |
17529 | /@localedir@/p | |
17530 | /@mandir@/p' | |
17531 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
17532 | *datarootdir*) ac_datarootdir_seen=yes;; | |
17533 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
17534 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
17535 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
17536 | _ACEOF | |
17537 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17538 | ac_datarootdir_hack=' | |
17539 | s&@datadir@&$datadir&g | |
17540 | s&@docdir@&$docdir&g | |
17541 | s&@infodir@&$infodir&g | |
17542 | s&@localedir@&$localedir&g | |
17543 | s&@mandir@&$mandir&g | |
17544 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
17545 | esac | |
4e8d927d | 17546 | _ACEOF |
81ecdfbb RW |
17547 | |
17548 | # Neutralize VPATH when `$srcdir' = `.'. | |
17549 | # Shell code in configure.ac might set extrasub. | |
17550 | # FIXME: do we really want to maintain this feature? | |
17551 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17552 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
17553 | $extrasub |
17554 | _ACEOF | |
81ecdfbb | 17555 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
17556 | :t |
17557 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
17558 | s|@configure_input@|$ac_sed_conf_input|;t t |
17559 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
17560 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
17561 | s&@srcdir@&$ac_srcdir&;t t | |
17562 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
17563 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
17564 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
17565 | s&@builddir@&$ac_builddir&;t t | |
17566 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
17567 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
17568 | s&@INSTALL@&$ac_INSTALL&;t t | |
17569 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
17570 | $ac_datarootdir_hack | |
17571 | " | |
17572 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
17573 | if $ac_cs_awk_getline; then | |
17574 | $AWK -f "$tmp/subs.awk" | |
17575 | else | |
17576 | $AWK -f "$tmp/subs.awk" | $SHELL | |
17577 | fi >$tmp/out \ | |
17578 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17579 | ||
17580 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
17581 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
17582 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
17583 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17584 | which seems to be undefined. Please make sure it is defined." >&5 | |
17585 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17586 | which seems to be undefined. Please make sure it is defined." >&2;} | |
17587 | ||
17588 | rm -f "$tmp/stdin" | |
bec39cab | 17589 | case $ac_file in |
81ecdfbb RW |
17590 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
17591 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
17592 | esac \ | |
17593 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17594 | ;; | |
17595 | :H) | |
17596 | # | |
17597 | # CONFIG_HEADER | |
17598 | # | |
bec39cab | 17599 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
17600 | { |
17601 | $as_echo "/* $configure_input */" \ | |
17602 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
17603 | } >"$tmp/config.h" \ | |
17604 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17605 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
17606 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
17607 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 17608 | else |
81ecdfbb RW |
17609 | rm -f "$ac_file" |
17610 | mv "$tmp/config.h" "$ac_file" \ | |
17611 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
17612 | fi |
17613 | else | |
81ecdfbb RW |
17614 | $as_echo "/* $configure_input */" \ |
17615 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
17616 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 17617 | fi |
81ecdfbb RW |
17618 | # Compute "$ac_file"'s index in $config_headers. |
17619 | _am_arg="$ac_file" | |
e28b3332 DJ |
17620 | _am_stamp_count=1 |
17621 | for _am_header in $config_headers :; do | |
17622 | case $_am_header in | |
81ecdfbb | 17623 | $_am_arg | $_am_arg:* ) |
e28b3332 DJ |
17624 | break ;; |
17625 | * ) | |
17626 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
17627 | esac | |
17628 | done | |
81ecdfbb RW |
17629 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || |
17630 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17631 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
17632 | X"$_am_arg" : 'X\(//\)$' \| \ | |
17633 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
17634 | $as_echo X"$_am_arg" | | |
17635 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17636 | s//\1/ | |
17637 | q | |
17638 | } | |
17639 | /^X\(\/\/\)[^/].*/{ | |
17640 | s//\1/ | |
17641 | q | |
17642 | } | |
17643 | /^X\(\/\/\)$/{ | |
17644 | s//\1/ | |
17645 | q | |
17646 | } | |
17647 | /^X\(\/\).*/{ | |
17648 | s//\1/ | |
17649 | q | |
17650 | } | |
17651 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
17652 | ;; | |
17653 | :L) | |
17654 | # | |
17655 | # CONFIG_LINK | |
17656 | # | |
c906108c | 17657 | |
81ecdfbb RW |
17658 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
17659 | : | |
b4e70030 | 17660 | else |
81ecdfbb RW |
17661 | # Prefer the file from the source tree if names are identical. |
17662 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
17663 | ac_source=$srcdir/$ac_source | |
17664 | fi | |
b4e70030 | 17665 | |
81ecdfbb RW |
17666 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
17667 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 17668 | |
81ecdfbb RW |
17669 | if test ! -r "$ac_source"; then |
17670 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
17671 | fi | |
17672 | rm -f "$ac_file" | |
bec39cab | 17673 | |
81ecdfbb RW |
17674 | # Try a relative symlink, then a hard link, then a copy. |
17675 | case $srcdir in | |
17676 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
17677 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
17678 | esac | |
17679 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
17680 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
17681 | cp -p "$ac_source" "$ac_file" || | |
17682 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
17683 | fi | |
17684 | ;; | |
17685 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
17686 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
17687 | ;; | |
c906108c | 17688 | esac |
b4e70030 | 17689 | |
bec39cab | 17690 | |
81ecdfbb RW |
17691 | case $ac_file$ac_mode in |
17692 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
17693 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
17694 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
17695 | # are listed without --file. Let's play safe and only enable the eval | |
17696 | # if we detect the quoting. | |
17697 | case $CONFIG_FILES in | |
17698 | *\'*) eval set x "$CONFIG_FILES" ;; | |
17699 | *) set x $CONFIG_FILES ;; | |
17700 | esac | |
17701 | shift | |
17702 | for mf | |
17703 | do | |
17704 | # Strip MF so we end up with the name of the file. | |
17705 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
17706 | # Check whether this is an Automake generated Makefile or not. | |
17707 | # We used to match only the files named `Makefile.in', but | |
17708 | # some people rename them; so instead we look at the file content. | |
17709 | # Grep'ing the first line is not enough: some people post-process | |
17710 | # each Makefile.in and add a new line on top of each file to say so. | |
17711 | # Grep'ing the whole file is not good either: AIX grep has a line | |
17712 | # limit of 2048, but all sed's we know have understand at least 4000. | |
17713 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
17714 | dirpart=`$as_dirname -- "$mf" || | |
e28b3332 DJ |
17715 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17716 | X"$mf" : 'X\(//\)[^/]' \| \ | |
17717 | X"$mf" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17718 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || |
17719 | $as_echo X"$mf" | | |
17720 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17721 | s//\1/ | |
17722 | q | |
17723 | } | |
17724 | /^X\(\/\/\)[^/].*/{ | |
17725 | s//\1/ | |
17726 | q | |
17727 | } | |
17728 | /^X\(\/\/\)$/{ | |
17729 | s//\1/ | |
17730 | q | |
17731 | } | |
17732 | /^X\(\/\).*/{ | |
17733 | s//\1/ | |
17734 | q | |
17735 | } | |
17736 | s/.*/./; q'` | |
17737 | else | |
17738 | continue | |
17739 | fi | |
17740 | # Extract the definition of DEPDIR, am__include, and am__quote | |
17741 | # from the Makefile without running `make'. | |
17742 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
17743 | test -z "$DEPDIR" && continue | |
17744 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
17745 | test -z "am__include" && continue | |
17746 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
17747 | # When using ansi2knr, U may be empty or an underscore; expand it | |
17748 | U=`sed -n 's/^U = //p' < "$mf"` | |
17749 | # Find all dependency output files, they are included files with | |
17750 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
17751 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
17752 | # expansion. | |
17753 | for file in `sed -n " | |
17754 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
17755 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
17756 | # Make sure the directory exists. | |
17757 | test -f "$dirpart/$file" && continue | |
17758 | fdir=`$as_dirname -- "$file" || | |
e28b3332 DJ |
17759 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17760 | X"$file" : 'X\(//\)[^/]' \| \ | |
17761 | X"$file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17762 | X"$file" : 'X\(/\)' \| . 2>/dev/null || |
17763 | $as_echo X"$file" | | |
17764 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17765 | s//\1/ | |
17766 | q | |
17767 | } | |
17768 | /^X\(\/\/\)[^/].*/{ | |
17769 | s//\1/ | |
17770 | q | |
17771 | } | |
17772 | /^X\(\/\/\)$/{ | |
17773 | s//\1/ | |
17774 | q | |
17775 | } | |
17776 | /^X\(\/\).*/{ | |
17777 | s//\1/ | |
17778 | q | |
17779 | } | |
17780 | s/.*/./; q'` | |
17781 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
17782 | # echo "creating $dirpart/$file" | |
17783 | echo '# dummy' > "$dirpart/$file" | |
e28b3332 | 17784 | done |
e28b3332 | 17785 | done |
81ecdfbb | 17786 | } |
4e8d927d | 17787 | ;; |
81ecdfbb | 17788 | "default":C) |
c906108c SS |
17789 | case x$CONFIG_HEADERS in |
17790 | xconfig.h:config.in) | |
17791 | echo > stamp-h ;; | |
17792 | esac | |
bec39cab | 17793 | ;; |
81ecdfbb | 17794 | |
bec39cab | 17795 | esac |
81ecdfbb | 17796 | done # for ac_tag |
c906108c | 17797 | |
bec39cab | 17798 | |
81ecdfbb | 17799 | as_fn_exit 0 |
bec39cab | 17800 | _ACEOF |
bec39cab AC |
17801 | ac_clean_files=$ac_clean_files_save |
17802 | ||
81ecdfbb RW |
17803 | test $ac_write_fail = 0 || |
17804 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
17805 | ||
bec39cab AC |
17806 | |
17807 | # configure is writing to config.log, and then calls config.status. | |
17808 | # config.status does its own redirection, appending to config.log. | |
17809 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17810 | # by configure, so config.status won't be able to write to it; its | |
17811 | # output is simply discarded. So we exec the FD to /dev/null, | |
17812 | # effectively closing config.log, so it can be properly (re)opened and | |
17813 | # appended to by config.status. When coming back to configure, we | |
17814 | # need to make the FD available again. | |
17815 | if test "$no_create" != yes; then | |
17816 | ac_cs_success=: | |
17817 | ac_config_status_args= | |
17818 | test "$silent" = yes && | |
17819 | ac_config_status_args="$ac_config_status_args --quiet" | |
17820 | exec 5>/dev/null | |
17821 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17822 | exec 5>>config.log | |
17823 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17824 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 17825 | $ac_cs_success || as_fn_exit $? |
bec39cab | 17826 | fi |
c906108c | 17827 | |
bec39cab | 17828 | # |
81ecdfbb | 17829 | # CONFIG_SUBDIRS section. |
bec39cab | 17830 | # |
c906108c SS |
17831 | if test "$no_recursion" != yes; then |
17832 | ||
81ecdfbb RW |
17833 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
17834 | # so they do not pile up. | |
c906108c SS |
17835 | ac_sub_configure_args= |
17836 | ac_prev= | |
fdc59709 PB |
17837 | eval "set x $ac_configure_args" |
17838 | shift | |
17839 | for ac_arg | |
17840 | do | |
c906108c SS |
17841 | if test -n "$ac_prev"; then |
17842 | ac_prev= | |
17843 | continue | |
17844 | fi | |
bec39cab | 17845 | case $ac_arg in |
c906108c SS |
17846 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
17847 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
17848 | ac_prev=cache_file ;; | |
17849 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
17850 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
17851 | | --c=*) | |
17852 | ;; | |
17853 | --config-cache | -C) | |
c906108c SS |
17854 | ;; |
17855 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
17856 | ac_prev=srcdir ;; | |
17857 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
17858 | ;; | |
bec39cab AC |
17859 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
17860 | ac_prev=prefix ;; | |
17861 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
17862 | ;; | |
81ecdfbb RW |
17863 | --disable-option-checking) |
17864 | ;; | |
fdc59709 PB |
17865 | *) |
17866 | case $ac_arg in | |
81ecdfbb | 17867 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17868 | esac |
81ecdfbb | 17869 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
17870 | esac |
17871 | done | |
17872 | ||
bec39cab AC |
17873 | # Always prepend --prefix to ensure using the same prefix |
17874 | # in subdir configurations. | |
fdc59709 PB |
17875 | ac_arg="--prefix=$prefix" |
17876 | case $ac_arg in | |
81ecdfbb | 17877 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17878 | esac |
81ecdfbb RW |
17879 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
17880 | ||
17881 | # Pass --silent | |
17882 | if test "$silent" = yes; then | |
17883 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
17884 | fi | |
17885 | ||
17886 | # Always prepend --disable-option-checking to silence warnings, since | |
17887 | # different subdirs can have different --enable and --with options. | |
17888 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 17889 | |
b4e70030 | 17890 | ac_popdir=`pwd` |
bec39cab | 17891 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
17892 | |
17893 | # Do not complain, so a configure script can configure whichever | |
17894 | # parts of a large source tree are present. | |
fdc59709 | 17895 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 17896 | |
81ecdfbb RW |
17897 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
17898 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
17899 | $as_echo "$ac_msg" >&6 | |
17900 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17901 | ac_builddir=. |
17902 | ||
81ecdfbb RW |
17903 | case "$ac_dir" in |
17904 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17905 | *) | |
17906 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17907 | # A ".." for each directory in $ac_dir_suffix. | |
17908 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17909 | case $ac_top_builddir_sub in | |
17910 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17911 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17912 | esac ;; | |
17913 | esac | |
17914 | ac_abs_top_builddir=$ac_pwd | |
17915 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17916 | # for backward compatibility: | |
17917 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17918 | |
17919 | case $srcdir in | |
81ecdfbb | 17920 | .) # We are building in place. |
bec39cab | 17921 | ac_srcdir=. |
81ecdfbb RW |
17922 | ac_top_srcdir=$ac_top_builddir_sub |
17923 | ac_abs_top_srcdir=$ac_pwd ;; | |
17924 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17925 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17926 | ac_top_srcdir=$srcdir |
17927 | ac_abs_top_srcdir=$srcdir ;; | |
17928 | *) # Relative name. | |
17929 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17930 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17931 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17932 | esac |
81ecdfbb | 17933 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 17934 | |
c906108c | 17935 | |
fdc59709 | 17936 | cd "$ac_dir" |
c906108c SS |
17937 | |
17938 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
17939 | if test -f "$ac_srcdir/configure.gnu"; then |
17940 | ac_sub_configure=$ac_srcdir/configure.gnu | |
17941 | elif test -f "$ac_srcdir/configure"; then | |
17942 | ac_sub_configure=$ac_srcdir/configure | |
17943 | elif test -f "$ac_srcdir/configure.in"; then | |
17944 | # This should be Cygnus configure. | |
17945 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 17946 | else |
81ecdfbb RW |
17947 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
17948 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
17949 | ac_sub_configure= |
17950 | fi | |
17951 | ||
17952 | # The recursion is here. | |
17953 | if test -n "$ac_sub_configure"; then | |
c906108c | 17954 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
17955 | case $cache_file in |
17956 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
17957 | *) # Relative name. |
17958 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 17959 | esac |
c906108c | 17960 | |
81ecdfbb RW |
17961 | { $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 |
17962 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 17963 | # The eval makes quoting arguments work. |
fdc59709 PB |
17964 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
17965 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 17966 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
17967 | fi |
17968 | ||
fdc59709 | 17969 | cd "$ac_popdir" |
c906108c SS |
17970 | done |
17971 | fi | |
81ecdfbb RW |
17972 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
17973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
17974 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
17975 | fi | |
c906108c SS |
17976 | |
17977 | ||
17978 | exit 0 |