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 | |
660 | ALLOCA | |
661 | PYTHON_CFLAGS | |
ec685c5e | 662 | python_prog_path |
81ecdfbb RW |
663 | LTLIBEXPAT |
664 | LIBEXPAT | |
665 | HAVE_LIBEXPAT | |
666 | READLINE_CFLAGS | |
667 | READLINE_DEPS | |
668 | READLINE | |
669 | MIG | |
670 | WINDRES | |
671 | DLLTOOL | |
672 | AR | |
673 | YFLAGS | |
674 | YACC | |
675 | LN_S | |
676 | REPORT_BUGS_TEXI | |
677 | REPORT_BUGS_TO | |
678 | PKGVERSION | |
679 | TARGET_OBS | |
680 | subdirs | |
681 | GDB_DATADIR | |
682 | DEBUGDIR | |
683 | am__fastdepCC_FALSE | |
684 | am__fastdepCC_TRUE | |
685 | AMDEPBACKSLASH | |
686 | AMDEP_FALSE | |
687 | AMDEP_TRUE | |
688 | am__quote | |
689 | am__include | |
690 | am__untar | |
691 | am__tar | |
692 | AMTAR | |
693 | AWK | |
694 | mkdir_p | |
695 | MKDIR_P | |
696 | INSTALL_STRIP_PROGRAM | |
697 | STRIP | |
698 | install_sh | |
699 | MAKEINFO | |
700 | AUTOHEADER | |
701 | AUTOMAKE | |
702 | AUTOCONF | |
703 | ACLOCAL | |
704 | VERSION | |
705 | CYGPATH_W | |
706 | am__isrc | |
707 | INSTALL_DATA | |
708 | INSTALL_SCRIPT | |
709 | INSTALL_PROGRAM | |
710 | PACKAGE | |
711 | GNULIB_STDINT_H | |
712 | LIBGNU_LTLIBDEPS | |
713 | LIBGNU_LIBDEPS | |
f434ba03 PA |
714 | gltests_WITNESS |
715 | HAVE_WINT_T | |
81ecdfbb | 716 | HAVE_WCHAR_H |
f434ba03 PA |
717 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H |
718 | NEXT_WCHAR_H | |
81ecdfbb | 719 | REPLACE_WCWIDTH |
f434ba03 PA |
720 | REPLACE_WCSNRTOMBS |
721 | REPLACE_WCSRTOMBS | |
722 | REPLACE_WCRTOMB | |
723 | REPLACE_MBSNRTOWCS | |
724 | REPLACE_MBSRTOWCS | |
725 | REPLACE_MBRLEN | |
726 | REPLACE_MBRTOWC | |
727 | REPLACE_MBSINIT | |
728 | REPLACE_WCTOB | |
729 | REPLACE_BTOWC | |
730 | REPLACE_MBSTATE_T | |
81ecdfbb | 731 | HAVE_DECL_WCWIDTH |
f434ba03 PA |
732 | HAVE_DECL_WCTOB |
733 | HAVE_WCSNRTOMBS | |
734 | HAVE_WCSRTOMBS | |
735 | HAVE_WCRTOMB | |
736 | HAVE_MBSNRTOWCS | |
737 | HAVE_MBSRTOWCS | |
738 | HAVE_MBRLEN | |
739 | HAVE_MBRTOWC | |
740 | HAVE_MBSINIT | |
741 | HAVE_BTOWC | |
81ecdfbb | 742 | GNULIB_WCWIDTH |
f434ba03 PA |
743 | GNULIB_WCSNRTOMBS |
744 | GNULIB_WCSRTOMBS | |
745 | GNULIB_WCRTOMB | |
746 | GNULIB_MBSNRTOWCS | |
747 | GNULIB_MBSRTOWCS | |
748 | GNULIB_MBRLEN | |
749 | GNULIB_MBRTOWC | |
750 | GNULIB_MBSINIT | |
751 | GNULIB_WCTOB | |
752 | GNULIB_BTOWC | |
753 | NEXT_AS_FIRST_DIRECTIVE_STRING_H | |
81ecdfbb RW |
754 | NEXT_STRING_H |
755 | STDINT_H | |
756 | WINT_T_SUFFIX | |
757 | WCHAR_T_SUFFIX | |
81ecdfbb | 758 | SIG_ATOMIC_T_SUFFIX |
f434ba03 | 759 | SIZE_T_SUFFIX |
81ecdfbb RW |
760 | PTRDIFF_T_SUFFIX |
761 | HAVE_SIGNED_WINT_T | |
762 | HAVE_SIGNED_WCHAR_T | |
763 | HAVE_SIGNED_SIG_ATOMIC_T | |
764 | BITSIZEOF_WINT_T | |
765 | BITSIZEOF_WCHAR_T | |
81ecdfbb | 766 | BITSIZEOF_SIG_ATOMIC_T |
f434ba03 | 767 | BITSIZEOF_SIZE_T |
81ecdfbb RW |
768 | BITSIZEOF_PTRDIFF_T |
769 | HAVE_SYS_BITYPES_H | |
770 | HAVE_SYS_INTTYPES_H | |
771 | HAVE_STDINT_H | |
f434ba03 | 772 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H |
81ecdfbb | 773 | NEXT_STDINT_H |
81ecdfbb RW |
774 | HAVE_SYS_TYPES_H |
775 | HAVE_INTTYPES_H | |
776 | HAVE_UNSIGNED_LONG_LONG_INT | |
777 | HAVE_LONG_LONG_INT | |
f434ba03 PA |
778 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
779 | NEXT_STDDEF_H | |
780 | PRAGMA_SYSTEM_HEADER | |
781 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
782 | INCLUDE_NEXT | |
783 | STDDEF_H | |
784 | HAVE_WCHAR_T | |
785 | REPLACE_NULL | |
786 | APPLE_UNIVERSAL_BUILD | |
787 | UNDEFINE_STRTOK_R | |
788 | REPLACE_STRTOK_R | |
81ecdfbb | 789 | REPLACE_STRSIGNAL |
f434ba03 PA |
790 | REPLACE_STRNLEN |
791 | REPLACE_STRNDUP | |
792 | REPLACE_STRNCAT | |
81ecdfbb | 793 | REPLACE_STRERROR |
f434ba03 PA |
794 | REPLACE_STRCASESTR |
795 | REPLACE_STRSTR | |
796 | REPLACE_STRDUP | |
797 | REPLACE_STPNCPY | |
798 | REPLACE_MEMMEM | |
799 | REPLACE_MEMCHR | |
800 | HAVE_STRVERSCMP | |
81ecdfbb | 801 | HAVE_DECL_STRSIGNAL |
81ecdfbb RW |
802 | HAVE_DECL_STRTOK_R |
803 | HAVE_STRCASESTR | |
804 | HAVE_STRSEP | |
805 | HAVE_STRPBRK | |
806 | HAVE_DECL_STRNLEN | |
807 | HAVE_DECL_STRNDUP | |
81ecdfbb RW |
808 | HAVE_DECL_STRDUP |
809 | HAVE_STRCHRNUL | |
810 | HAVE_STPNCPY | |
811 | HAVE_STPCPY | |
f434ba03 | 812 | HAVE_RAWMEMCHR |
81ecdfbb RW |
813 | HAVE_DECL_MEMRCHR |
814 | HAVE_MEMPCPY | |
815 | HAVE_DECL_MEMMEM | |
f434ba03 PA |
816 | HAVE_MEMCHR |
817 | HAVE_MBSLEN | |
818 | GNULIB_STRVERSCMP | |
81ecdfbb RW |
819 | GNULIB_STRSIGNAL |
820 | GNULIB_STRERROR | |
821 | GNULIB_MBSTOK_R | |
822 | GNULIB_MBSSEP | |
823 | GNULIB_MBSSPN | |
824 | GNULIB_MBSPBRK | |
825 | GNULIB_MBSCSPN | |
826 | GNULIB_MBSCASESTR | |
827 | GNULIB_MBSPCASECMP | |
828 | GNULIB_MBSNCASECMP | |
829 | GNULIB_MBSCASECMP | |
830 | GNULIB_MBSSTR | |
831 | GNULIB_MBSRCHR | |
832 | GNULIB_MBSCHR | |
833 | GNULIB_MBSNLEN | |
834 | GNULIB_MBSLEN | |
835 | GNULIB_STRTOK_R | |
836 | GNULIB_STRCASESTR | |
837 | GNULIB_STRSTR | |
838 | GNULIB_STRSEP | |
839 | GNULIB_STRPBRK | |
840 | GNULIB_STRNLEN | |
841 | GNULIB_STRNDUP | |
f434ba03 | 842 | GNULIB_STRNCAT |
81ecdfbb RW |
843 | GNULIB_STRDUP |
844 | GNULIB_STRCHRNUL | |
845 | GNULIB_STPNCPY | |
846 | GNULIB_STPCPY | |
f434ba03 | 847 | GNULIB_RAWMEMCHR |
81ecdfbb RW |
848 | GNULIB_MEMRCHR |
849 | GNULIB_MEMPCPY | |
850 | GNULIB_MEMMEM | |
f434ba03 | 851 | GNULIB_MEMCHR |
81ecdfbb RW |
852 | GL_COND_LIBTOOL_FALSE |
853 | GL_COND_LIBTOOL_TRUE | |
854 | CATOBJEXT | |
855 | GENCAT | |
856 | INSTOBJEXT | |
857 | DATADIRNAME | |
858 | CATALOGS | |
859 | POSUB | |
860 | GMSGFMT | |
861 | XGETTEXT | |
862 | INCINTL | |
863 | LIBINTL_DEP | |
864 | LIBINTL | |
865 | USE_NLS | |
866 | SET_MAKE | |
867 | GMAKE_FALSE | |
868 | GMAKE_TRUE | |
869 | MAKE | |
870 | CCDEPMODE | |
871 | DEPDIR | |
872 | am__leading_dot | |
873 | target_os | |
874 | target_vendor | |
875 | target_cpu | |
876 | target | |
f434ba03 PA |
877 | RANLIB |
878 | EGREP | |
879 | GREP | |
880 | CPP | |
81ecdfbb RW |
881 | host_os |
882 | host_vendor | |
883 | host_cpu | |
884 | host | |
885 | build_os | |
886 | build_vendor | |
887 | build_cpu | |
888 | build | |
81ecdfbb RW |
889 | OBJEXT |
890 | EXEEXT | |
891 | ac_ct_CC | |
892 | CPPFLAGS | |
893 | LDFLAGS | |
894 | CFLAGS | |
895 | CC | |
896 | MAINT | |
897 | MAINTAINER_MODE_FALSE | |
898 | MAINTAINER_MODE_TRUE | |
899 | target_alias | |
900 | host_alias | |
901 | build_alias | |
902 | LIBS | |
903 | ECHO_T | |
904 | ECHO_N | |
905 | ECHO_C | |
906 | DEFS | |
907 | mandir | |
908 | localedir | |
909 | libdir | |
910 | psdir | |
911 | pdfdir | |
912 | dvidir | |
913 | htmldir | |
914 | infodir | |
915 | docdir | |
916 | oldincludedir | |
917 | includedir | |
918 | localstatedir | |
919 | sharedstatedir | |
920 | sysconfdir | |
921 | datadir | |
922 | datarootdir | |
923 | libexecdir | |
924 | sbindir | |
925 | bindir | |
926 | program_transform_name | |
927 | prefix | |
928 | exec_prefix | |
929 | PACKAGE_URL | |
930 | PACKAGE_BUGREPORT | |
931 | PACKAGE_STRING | |
932 | PACKAGE_VERSION | |
933 | PACKAGE_TARNAME | |
934 | PACKAGE_NAME | |
935 | PATH_SEPARATOR | |
936 | SHELL' | |
a4ce5b0d | 937 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
938 | ac_user_opts=' |
939 | enable_option_checking | |
940 | enable_maintainer_mode | |
da2f07f1 JK |
941 | enable_plugins |
942 | enable_largefile | |
81ecdfbb RW |
943 | enable_dependency_tracking |
944 | with_separate_debug_dir | |
945 | with_gdb_datadir | |
946 | with_relocated_sources | |
947 | enable_targets | |
948 | enable_64_bit_bfd | |
949 | enable_gdbcli | |
950 | enable_gdbmi | |
951 | enable_tui | |
952 | enable_gdbtk | |
953 | with_libunwind | |
954 | with_curses | |
955 | enable_profiling | |
956 | with_pkgversion | |
957 | with_bugurl | |
b040ad30 | 958 | with_zlib |
81ecdfbb RW |
959 | with_libiconv_prefix |
960 | with_system_readline | |
961 | with_expat | |
962 | with_gnu_ld | |
963 | enable_rpath | |
964 | with_libexpat_prefix | |
965 | with_python | |
966 | with_included_regex | |
967 | with_sysroot | |
968 | with_system_gdbinit | |
969 | enable_werror | |
970 | enable_build_warnings | |
971 | enable_gdb_build_warnings | |
972 | with_tcl | |
973 | with_tk | |
974 | with_x | |
975 | enable_sim | |
976 | enable_multi_ice | |
81ecdfbb RW |
977 | ' |
978 | ac_precious_vars='build_alias | |
979 | host_alias | |
980 | target_alias | |
981 | CC | |
982 | CFLAGS | |
983 | LDFLAGS | |
984 | LIBS | |
985 | CPPFLAGS | |
986 | CPP | |
987 | YACC | |
988 | YFLAGS | |
989 | XMKMF' | |
990 | ac_subdirs_all='doc testsuite | |
991 | gdbtk | |
992 | multi-ice | |
993 | gdbserver' | |
c906108c SS |
994 | |
995 | # Initialize some variables set by options. | |
bec39cab AC |
996 | ac_init_help= |
997 | ac_init_version=false | |
81ecdfbb RW |
998 | ac_unrecognized_opts= |
999 | ac_unrecognized_sep= | |
c906108c SS |
1000 | # The variables have the same names as the options, with |
1001 | # dashes changed to underlines. | |
bec39cab | 1002 | cache_file=/dev/null |
c906108c | 1003 | exec_prefix=NONE |
c906108c | 1004 | no_create= |
c906108c SS |
1005 | no_recursion= |
1006 | prefix=NONE | |
1007 | program_prefix=NONE | |
1008 | program_suffix=NONE | |
1009 | program_transform_name=s,x,x, | |
1010 | silent= | |
1011 | site= | |
1012 | srcdir= | |
c906108c SS |
1013 | verbose= |
1014 | x_includes=NONE | |
1015 | x_libraries=NONE | |
bec39cab AC |
1016 | |
1017 | # Installation directory options. | |
1018 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1019 | # and all the variables that are supposed to be based on exec_prefix | |
1020 | # by default will actually change. | |
1021 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 1022 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
1023 | bindir='${exec_prefix}/bin' |
1024 | sbindir='${exec_prefix}/sbin' | |
1025 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
1026 | datarootdir='${prefix}/share' |
1027 | datadir='${datarootdir}' | |
c906108c SS |
1028 | sysconfdir='${prefix}/etc' |
1029 | sharedstatedir='${prefix}/com' | |
1030 | localstatedir='${prefix}/var' | |
c906108c SS |
1031 | includedir='${prefix}/include' |
1032 | oldincludedir='/usr/include' | |
81ecdfbb RW |
1033 | docdir='${datarootdir}/doc/${PACKAGE}' |
1034 | infodir='${datarootdir}/info' | |
1035 | htmldir='${docdir}' | |
1036 | dvidir='${docdir}' | |
1037 | pdfdir='${docdir}' | |
1038 | psdir='${docdir}' | |
1039 | libdir='${exec_prefix}/lib' | |
1040 | localedir='${datarootdir}/locale' | |
1041 | mandir='${datarootdir}/man' | |
c906108c | 1042 | |
c906108c | 1043 | ac_prev= |
81ecdfbb | 1044 | ac_dashdash= |
c906108c SS |
1045 | for ac_option |
1046 | do | |
c906108c SS |
1047 | # If the previous option needs an argument, assign it. |
1048 | if test -n "$ac_prev"; then | |
81ecdfbb | 1049 | eval $ac_prev=\$ac_option |
c906108c SS |
1050 | ac_prev= |
1051 | continue | |
1052 | fi | |
1053 | ||
81ecdfbb RW |
1054 | case $ac_option in |
1055 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
1056 | *) ac_optarg=yes ;; | |
1057 | esac | |
c906108c SS |
1058 | |
1059 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1060 | ||
81ecdfbb RW |
1061 | case $ac_dashdash$ac_option in |
1062 | --) | |
1063 | ac_dashdash=yes ;; | |
c906108c SS |
1064 | |
1065 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1066 | ac_prev=bindir ;; | |
1067 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1068 | bindir=$ac_optarg ;; |
c906108c SS |
1069 | |
1070 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1071 | ac_prev=build_alias ;; |
c906108c | 1072 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1073 | build_alias=$ac_optarg ;; |
c906108c SS |
1074 | |
1075 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1076 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1077 | ac_prev=cache_file ;; | |
1078 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1079 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1080 | cache_file=$ac_optarg ;; |
1081 | ||
1082 | --config-cache | -C) | |
1083 | cache_file=config.cache ;; | |
c906108c | 1084 | |
81ecdfbb | 1085 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1086 | ac_prev=datadir ;; |
81ecdfbb | 1087 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1088 | datadir=$ac_optarg ;; |
c906108c | 1089 | |
81ecdfbb RW |
1090 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1091 | | --dataroo | --dataro | --datar) | |
1092 | ac_prev=datarootdir ;; | |
1093 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1094 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1095 | datarootdir=$ac_optarg ;; | |
1096 | ||
c906108c | 1097 | -disable-* | --disable-*) |
81ecdfbb | 1098 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1099 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1100 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1101 | as_fn_error "invalid feature name: $ac_useropt" | |
1102 | ac_useropt_orig=$ac_useropt | |
1103 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1104 | case $ac_user_opts in | |
1105 | *" | |
1106 | "enable_$ac_useropt" | |
1107 | "*) ;; | |
1108 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1109 | ac_unrecognized_sep=', ';; | |
1110 | esac | |
1111 | eval enable_$ac_useropt=no ;; | |
1112 | ||
1113 | -docdir | --docdir | --docdi | --doc | --do) | |
1114 | ac_prev=docdir ;; | |
1115 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1116 | docdir=$ac_optarg ;; | |
1117 | ||
1118 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1119 | ac_prev=dvidir ;; | |
1120 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1121 | dvidir=$ac_optarg ;; | |
c906108c SS |
1122 | |
1123 | -enable-* | --enable-*) | |
81ecdfbb | 1124 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1125 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1126 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1127 | as_fn_error "invalid feature name: $ac_useropt" | |
1128 | ac_useropt_orig=$ac_useropt | |
1129 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1130 | case $ac_user_opts in | |
1131 | *" | |
1132 | "enable_$ac_useropt" | |
1133 | "*) ;; | |
1134 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1135 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1136 | esac |
81ecdfbb | 1137 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1138 | |
1139 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1140 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1141 | | --exec | --exe | --ex) | |
1142 | ac_prev=exec_prefix ;; | |
1143 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1144 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1145 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1146 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1147 | |
1148 | -gas | --gas | --ga | --g) | |
1149 | # Obsolete; use --with-gas. | |
1150 | with_gas=yes ;; | |
1151 | ||
bec39cab AC |
1152 | -help | --help | --hel | --he | -h) |
1153 | ac_init_help=long ;; | |
1154 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1155 | ac_init_help=recursive ;; | |
1156 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1157 | ac_init_help=short ;; | |
c906108c SS |
1158 | |
1159 | -host | --host | --hos | --ho) | |
bec39cab | 1160 | ac_prev=host_alias ;; |
c906108c | 1161 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1162 | host_alias=$ac_optarg ;; |
c906108c | 1163 | |
81ecdfbb RW |
1164 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1165 | ac_prev=htmldir ;; | |
1166 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1167 | | --ht=*) | |
1168 | htmldir=$ac_optarg ;; | |
1169 | ||
c906108c SS |
1170 | -includedir | --includedir | --includedi | --included | --include \ |
1171 | | --includ | --inclu | --incl | --inc) | |
1172 | ac_prev=includedir ;; | |
1173 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1174 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1175 | includedir=$ac_optarg ;; |
c906108c SS |
1176 | |
1177 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1178 | ac_prev=infodir ;; | |
1179 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1180 | infodir=$ac_optarg ;; |
c906108c SS |
1181 | |
1182 | -libdir | --libdir | --libdi | --libd) | |
1183 | ac_prev=libdir ;; | |
1184 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1185 | libdir=$ac_optarg ;; |
c906108c SS |
1186 | |
1187 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1188 | | --libexe | --libex | --libe) | |
1189 | ac_prev=libexecdir ;; | |
1190 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1191 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1192 | libexecdir=$ac_optarg ;; |
c906108c | 1193 | |
81ecdfbb RW |
1194 | -localedir | --localedir | --localedi | --localed | --locale) |
1195 | ac_prev=localedir ;; | |
1196 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1197 | localedir=$ac_optarg ;; | |
1198 | ||
c906108c | 1199 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1200 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1201 | ac_prev=localstatedir ;; |
1202 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1203 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1204 | localstatedir=$ac_optarg ;; |
c906108c SS |
1205 | |
1206 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1207 | ac_prev=mandir ;; | |
1208 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1209 | mandir=$ac_optarg ;; |
c906108c SS |
1210 | |
1211 | -nfp | --nfp | --nf) | |
1212 | # Obsolete; use --without-fp. | |
1213 | with_fp=no ;; | |
1214 | ||
1215 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1216 | | --no-cr | --no-c | -n) |
c906108c SS |
1217 | no_create=yes ;; |
1218 | ||
1219 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1220 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1221 | no_recursion=yes ;; | |
1222 | ||
1223 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1224 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1225 | | --oldin | --oldi | --old | --ol | --o) | |
1226 | ac_prev=oldincludedir ;; | |
1227 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1228 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1229 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1230 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1231 | |
1232 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1233 | ac_prev=prefix ;; | |
1234 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1235 | prefix=$ac_optarg ;; |
c906108c SS |
1236 | |
1237 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1238 | | --program-pre | --program-pr | --program-p) | |
1239 | ac_prev=program_prefix ;; | |
1240 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1241 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1242 | program_prefix=$ac_optarg ;; |
c906108c SS |
1243 | |
1244 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1245 | | --program-suf | --program-su | --program-s) | |
1246 | ac_prev=program_suffix ;; | |
1247 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1248 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1249 | program_suffix=$ac_optarg ;; |
c906108c SS |
1250 | |
1251 | -program-transform-name | --program-transform-name \ | |
1252 | | --program-transform-nam | --program-transform-na \ | |
1253 | | --program-transform-n | --program-transform- \ | |
1254 | | --program-transform | --program-transfor \ | |
1255 | | --program-transfo | --program-transf \ | |
1256 | | --program-trans | --program-tran \ | |
1257 | | --progr-tra | --program-tr | --program-t) | |
1258 | ac_prev=program_transform_name ;; | |
1259 | -program-transform-name=* | --program-transform-name=* \ | |
1260 | | --program-transform-nam=* | --program-transform-na=* \ | |
1261 | | --program-transform-n=* | --program-transform-=* \ | |
1262 | | --program-transform=* | --program-transfor=* \ | |
1263 | | --program-transfo=* | --program-transf=* \ | |
1264 | | --program-trans=* | --program-tran=* \ | |
1265 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1266 | program_transform_name=$ac_optarg ;; |
c906108c | 1267 | |
81ecdfbb RW |
1268 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1269 | ac_prev=pdfdir ;; | |
1270 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1271 | pdfdir=$ac_optarg ;; | |
1272 | ||
1273 | -psdir | --psdir | --psdi | --psd | --ps) | |
1274 | ac_prev=psdir ;; | |
1275 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1276 | psdir=$ac_optarg ;; | |
1277 | ||
c906108c SS |
1278 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1279 | | -silent | --silent | --silen | --sile | --sil) | |
1280 | silent=yes ;; | |
1281 | ||
1282 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1283 | ac_prev=sbindir ;; | |
1284 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1285 | | --sbi=* | --sb=*) | |
bec39cab | 1286 | sbindir=$ac_optarg ;; |
c906108c SS |
1287 | |
1288 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1289 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1290 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1291 | | --sha | --sh) | |
1292 | ac_prev=sharedstatedir ;; | |
1293 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1294 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1295 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1296 | | --sha=* | --sh=*) | |
bec39cab | 1297 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1298 | |
1299 | -site | --site | --sit) | |
1300 | ac_prev=site ;; | |
1301 | -site=* | --site=* | --sit=*) | |
bec39cab | 1302 | site=$ac_optarg ;; |
3ace7edb | 1303 | |
c906108c SS |
1304 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1305 | ac_prev=srcdir ;; | |
1306 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1307 | srcdir=$ac_optarg ;; |
c906108c SS |
1308 | |
1309 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1310 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1311 | ac_prev=sysconfdir ;; | |
1312 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1313 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1314 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1315 | |
1316 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1317 | ac_prev=target_alias ;; |
c906108c | 1318 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1319 | target_alias=$ac_optarg ;; |
c906108c SS |
1320 | |
1321 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1322 | verbose=yes ;; | |
1323 | ||
bec39cab AC |
1324 | -version | --version | --versio | --versi | --vers | -V) |
1325 | ac_init_version=: ;; | |
c906108c SS |
1326 | |
1327 | -with-* | --with-*) | |
81ecdfbb | 1328 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1329 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1330 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1331 | as_fn_error "invalid package name: $ac_useropt" | |
1332 | ac_useropt_orig=$ac_useropt | |
1333 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1334 | case $ac_user_opts in | |
1335 | *" | |
1336 | "with_$ac_useropt" | |
1337 | "*) ;; | |
1338 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1339 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1340 | esac |
81ecdfbb | 1341 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1342 | |
1343 | -without-* | --without-*) | |
81ecdfbb | 1344 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1345 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1346 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1347 | as_fn_error "invalid package name: $ac_useropt" | |
1348 | ac_useropt_orig=$ac_useropt | |
1349 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1350 | case $ac_user_opts in | |
1351 | *" | |
1352 | "with_$ac_useropt" | |
1353 | "*) ;; | |
1354 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1355 | ac_unrecognized_sep=', ';; | |
1356 | esac | |
1357 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1358 | |
1359 | --x) | |
1360 | # Obsolete; use --with-x. | |
1361 | with_x=yes ;; | |
1362 | ||
1363 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1364 | | --x-incl | --x-inc | --x-in | --x-i) | |
1365 | ac_prev=x_includes ;; | |
1366 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1367 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1368 | x_includes=$ac_optarg ;; |
c906108c SS |
1369 | |
1370 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1371 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1372 | ac_prev=x_libraries ;; | |
1373 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1374 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1375 | x_libraries=$ac_optarg ;; |
c906108c | 1376 | |
81ecdfbb RW |
1377 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1378 | Try \`$0 --help' for more information." | |
c906108c SS |
1379 | ;; |
1380 | ||
bec39cab AC |
1381 | *=*) |
1382 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1383 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1384 | case $ac_envvar in #( |
1385 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1386 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1387 | esac | |
1388 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1389 | export $ac_envvar ;; |
1390 | ||
c906108c | 1391 | *) |
bec39cab | 1392 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1393 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1394 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1395 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1396 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1397 | ;; |
1398 | ||
1399 | esac | |
1400 | done | |
1401 | ||
1402 | if test -n "$ac_prev"; then | |
bec39cab | 1403 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1404 | as_fn_error "missing argument to $ac_option" |
c906108c | 1405 | fi |
c906108c | 1406 | |
81ecdfbb RW |
1407 | if test -n "$ac_unrecognized_opts"; then |
1408 | case $enable_option_checking in | |
1409 | no) ;; | |
1410 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1411 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1412 | esac |
81ecdfbb | 1413 | fi |
b4e70030 | 1414 | |
81ecdfbb RW |
1415 | # Check all directory arguments for consistency. |
1416 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1417 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1418 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1419 | libdir localedir mandir | |
b4e70030 | 1420 | do |
81ecdfbb RW |
1421 | eval ac_val=\$$ac_var |
1422 | # Remove trailing slashes. | |
1423 | case $ac_val in | |
1424 | */ ) | |
1425 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1426 | eval $ac_var=\$ac_val;; | |
1427 | esac | |
1428 | # Be sure to have absolute directory names. | |
b4e70030 | 1429 | case $ac_val in |
81ecdfbb RW |
1430 | [\\/$]* | ?:[\\/]* ) continue;; |
1431 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1432 | esac |
81ecdfbb | 1433 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1434 | done |
1435 | ||
bec39cab AC |
1436 | # There might be people who depend on the old broken behavior: `$host' |
1437 | # used to hold the argument of --host etc. | |
1438 | # FIXME: To remove some day. | |
1439 | build=$build_alias | |
1440 | host=$host_alias | |
1441 | target=$target_alias | |
1442 | ||
1443 | # FIXME: To remove some day. | |
1444 | if test "x$host_alias" != x; then | |
1445 | if test "x$build_alias" = x; then | |
1446 | cross_compiling=maybe | |
81ecdfbb | 1447 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1448 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1449 | elif test "x$build_alias" != "x$host_alias"; then | |
1450 | cross_compiling=yes | |
1451 | fi | |
1452 | fi | |
c906108c | 1453 | |
bec39cab AC |
1454 | ac_tool_prefix= |
1455 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1456 | ||
1457 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1458 | |
c906108c | 1459 | |
81ecdfbb RW |
1460 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1461 | ac_ls_di=`ls -di .` && | |
1462 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1463 | as_fn_error "working directory cannot be determined" | |
1464 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1465 | as_fn_error "pwd does not report name of working directory" | |
1466 | ||
1467 | ||
c906108c SS |
1468 | # Find the source files, if location was not specified. |
1469 | if test -z "$srcdir"; then | |
1470 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1471 | # Try the directory containing this script, then the parent directory. |
1472 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1473 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1474 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1475 | X"$as_myself" : 'X\(//\)$' \| \ | |
1476 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1477 | $as_echo X"$as_myself" | | |
1478 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1479 | s//\1/ | |
1480 | q | |
1481 | } | |
1482 | /^X\(\/\/\)[^/].*/{ | |
1483 | s//\1/ | |
1484 | q | |
1485 | } | |
1486 | /^X\(\/\/\)$/{ | |
1487 | s//\1/ | |
1488 | q | |
1489 | } | |
1490 | /^X\(\/\).*/{ | |
1491 | s//\1/ | |
1492 | q | |
1493 | } | |
1494 | s/.*/./; q'` | |
c906108c | 1495 | srcdir=$ac_confdir |
81ecdfbb | 1496 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1497 | srcdir=.. |
1498 | fi | |
1499 | else | |
1500 | ac_srcdir_defaulted=no | |
1501 | fi | |
81ecdfbb RW |
1502 | if test ! -r "$srcdir/$ac_unique_file"; then |
1503 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1504 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1505 | fi | |
1506 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1507 | ac_abs_confdir=`( | |
1508 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1509 | pwd)` | |
1510 | # When building in place, set srcdir=. | |
1511 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1512 | srcdir=. | |
1513 | fi | |
1514 | # Remove unnecessary trailing slashes from srcdir. | |
1515 | # Double slashes in file names in object file debugging info | |
1516 | # mess up M-x gdb in Emacs. | |
1517 | case $srcdir in | |
1518 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1519 | esac | |
1520 | for ac_var in $ac_precious_vars; do | |
1521 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1522 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1523 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1524 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1525 | done | |
c906108c | 1526 | |
bec39cab AC |
1527 | # |
1528 | # Report the --help message. | |
1529 | # | |
1530 | if test "$ac_init_help" = "long"; then | |
1531 | # Omit some internal or obsolete options to make the list less imposing. | |
1532 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1533 | cat <<_ACEOF | |
1534 | \`configure' configures this package to adapt to many kinds of systems. | |
1535 | ||
1536 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1537 | ||
1538 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1539 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1540 | ||
1541 | Defaults for the options are specified in brackets. | |
1542 | ||
1543 | Configuration: | |
1544 | -h, --help display this help and exit | |
1545 | --help=short display options specific to this package | |
1546 | --help=recursive display the short help of all the included packages | |
1547 | -V, --version display version information and exit | |
1548 | -q, --quiet, --silent do not print \`checking...' messages | |
1549 | --cache-file=FILE cache test results in FILE [disabled] | |
1550 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1551 | -n, --no-create do not create output files | |
1552 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1553 | ||
bec39cab AC |
1554 | Installation directories: |
1555 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1556 | [$ac_default_prefix] |
bec39cab | 1557 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1558 | [PREFIX] |
bec39cab AC |
1559 | |
1560 | By default, \`make install' will install all the files in | |
1561 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1562 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1563 | for instance \`--prefix=\$HOME'. | |
1564 | ||
1565 | For better control, use the options below. | |
1566 | ||
1567 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1568 | --bindir=DIR user executables [EPREFIX/bin] |
1569 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1570 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1571 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1572 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1573 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1574 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1575 | --includedir=DIR C header files [PREFIX/include] | |
1576 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1577 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1578 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1579 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1580 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1581 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1582 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1583 | --htmldir=DIR html documentation [DOCDIR] | |
1584 | --dvidir=DIR dvi documentation [DOCDIR] | |
1585 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1586 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1587 | _ACEOF |
1588 | ||
1589 | cat <<\_ACEOF | |
1590 | ||
1591 | Program names: | |
1592 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1593 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1594 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1595 | ||
1596 | X features: | |
1597 | --x-includes=DIR X include files are in DIR | |
1598 | --x-libraries=DIR X library files are in DIR | |
1599 | ||
1600 | System types: | |
1601 | --build=BUILD configure for building on BUILD [guessed] | |
1602 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1603 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1604 | _ACEOF | |
1605 | fi | |
1606 | ||
1607 | if test -n "$ac_init_help"; then | |
1608 | ||
1609 | cat <<\_ACEOF | |
1610 | ||
1611 | Optional Features: | |
81ecdfbb | 1612 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1613 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1614 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1615 | --enable-maintainer-mode enable make rules and dependencies not useful |
1616 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1617 | --enable-plugins Enable support for plugins (defaults no) |
1618 | --disable-largefile omit support for large files | |
e28b3332 DJ |
1619 | --disable-dependency-tracking speeds up one-time build |
1620 | --enable-dependency-tracking do not reject slow dependency extractors | |
a1220294 TT |
1621 | --enable-targets=TARGETS |
1622 | alternative target configurations | |
c0993dbe | 1623 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1624 | --disable-gdbcli disable command-line interface (CLI) |
1625 | --disable-gdbmi disable machine-interface (MI) | |
1626 | --enable-tui enable full-screen terminal user interface (TUI) | |
1627 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1628 | --enable-profiling enable profiling of GDB | |
3841debe | 1629 | --disable-rpath do not hardcode runtime library paths |
a1220294 | 1630 | --enable-werror treat compile warnings as errors |
32c1c914 | 1631 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1632 | --enable-gdb-build-warnings |
32c1c914 | 1633 | enable GDB specific build-time compiler warnings if |
a1220294 | 1634 | gcc is used |
32c1c914 | 1635 | --enable-sim link gdb with simulator |
bec39cab AC |
1636 | --enable-multi-ice build the multi-ice-gdb-server |
1637 | ||
1638 | Optional Packages: | |
1639 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1640 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1641 | --with-separate-debug-dir=PATH |
32c1c914 | 1642 | look for global separate debug info in this path |
62e4f60c | 1643 | [LIBDIR/debug] |
b14b1491 TT |
1644 | --with-gdb-datadir=PATH look for global separate data files in this path |
1645 | [DATADIR/gdb] | |
29b0e8a2 | 1646 | --with-relocated-sources=PATH |
32c1c914 TT |
1647 | automatically relocate this path for source files |
1648 | --with-libunwind use libunwind frame unwinding support | |
cb01cfba JB |
1649 | --with-curses use the curses library instead of the termcap |
1650 | library | |
c16158bc JM |
1651 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1652 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1653 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1654 | --with-libiconv-prefix=DIR |
1655 | search for libiconv in DIR/include and DIR/lib | |
6a30b0a5 | 1656 | --with-system-readline use installed readline library |
5c39566f | 1657 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1658 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1659 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1660 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1661 | --with-python[=PYTHON] include python support |
1662 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1663 | --without-included-regex |
1664 | don't use included regex; this is the default on | |
1665 | systems with version 2 of the GNU C library (use | |
1666 | with caution on other system) | |
81ecdfbb | 1667 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1668 | --with-system-gdbinit=PATH |
32c1c914 | 1669 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1670 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1671 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1672 | --with-x use the X Window System |
bec39cab AC |
1673 | |
1674 | Some influential environment variables: | |
1675 | CC C compiler command | |
1676 | CFLAGS C compiler flags | |
1677 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1678 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1679 | LIBS libraries to pass to the linker, e.g. -l<library> |
1680 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1681 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1682 | CPP C preprocessor |
81ecdfbb RW |
1683 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1684 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1685 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1686 | This script will default YFLAGS to the empty string to avoid a | |
1687 | default value of `-d' given by some make applications. | |
1688 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1689 | |
1690 | Use these variables to override the choices made by `configure' or to help | |
1691 | it to find libraries and programs with nonstandard names/locations. | |
1692 | ||
81ecdfbb | 1693 | Report bugs to the package provider. |
bec39cab | 1694 | _ACEOF |
81ecdfbb | 1695 | ac_status=$? |
bec39cab AC |
1696 | fi |
1697 | ||
1698 | if test "$ac_init_help" = "recursive"; then | |
1699 | # If there are subdirs, report their specific --help. | |
bec39cab | 1700 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1701 | test -d "$ac_dir" || |
1702 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1703 | continue | |
bec39cab AC |
1704 | ac_builddir=. |
1705 | ||
81ecdfbb RW |
1706 | case "$ac_dir" in |
1707 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1708 | *) | |
1709 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1710 | # A ".." for each directory in $ac_dir_suffix. | |
1711 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1712 | case $ac_top_builddir_sub in | |
1713 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1714 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1715 | esac ;; | |
1716 | esac | |
1717 | ac_abs_top_builddir=$ac_pwd | |
1718 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1719 | # for backward compatibility: | |
1720 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1721 | |
1722 | case $srcdir in | |
81ecdfbb | 1723 | .) # We are building in place. |
bec39cab | 1724 | ac_srcdir=. |
81ecdfbb RW |
1725 | ac_top_srcdir=$ac_top_builddir_sub |
1726 | ac_abs_top_srcdir=$ac_pwd ;; | |
1727 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1728 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1729 | ac_top_srcdir=$srcdir |
1730 | ac_abs_top_srcdir=$srcdir ;; | |
1731 | *) # Relative name. | |
1732 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1733 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1734 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1735 | esac |
81ecdfbb | 1736 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1737 | |
81ecdfbb RW |
1738 | cd "$ac_dir" || { ac_status=$?; continue; } |
1739 | # Check for guested configure. | |
1740 | if test -f "$ac_srcdir/configure.gnu"; then | |
1741 | echo && | |
1742 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1743 | elif test -f "$ac_srcdir/configure"; then | |
1744 | echo && | |
1745 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1746 | else |
81ecdfbb RW |
1747 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1748 | fi || ac_status=$? | |
1749 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1750 | done |
1751 | fi | |
1752 | ||
81ecdfbb | 1753 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1754 | if $ac_init_version; then |
1755 | cat <<\_ACEOF | |
81ecdfbb RW |
1756 | configure |
1757 | generated by GNU Autoconf 2.64 | |
bec39cab | 1758 | |
81ecdfbb | 1759 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1760 | This configure script is free software; the Free Software Foundation |
1761 | gives unlimited permission to copy, distribute and modify it. | |
1762 | _ACEOF | |
81ecdfbb | 1763 | exit |
bec39cab | 1764 | fi |
bec39cab | 1765 | |
81ecdfbb RW |
1766 | ## ------------------------ ## |
1767 | ## Autoconf initialization. ## | |
1768 | ## ------------------------ ## | |
bec39cab | 1769 | |
81ecdfbb RW |
1770 | # ac_fn_c_try_compile LINENO |
1771 | # -------------------------- | |
1772 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1773 | ac_fn_c_try_compile () | |
1774 | { | |
1775 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1776 | rm -f conftest.$ac_objext | |
1777 | if { { ac_try="$ac_compile" | |
1778 | case "(($ac_try" in | |
1779 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1780 | *) ac_try_echo=$ac_try;; | |
1781 | esac | |
1782 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1783 | $as_echo "$ac_try_echo"; } >&5 | |
1784 | (eval "$ac_compile") 2>conftest.err | |
1785 | ac_status=$? | |
1786 | if test -s conftest.err; then | |
1787 | grep -v '^ *+' conftest.err >conftest.er1 | |
1788 | cat conftest.er1 >&5 | |
1789 | mv -f conftest.er1 conftest.err | |
1790 | fi | |
1791 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1792 | test $ac_status = 0; } && { | |
1793 | test -z "$ac_c_werror_flag" || | |
1794 | test ! -s conftest.err | |
1795 | } && test -s conftest.$ac_objext; then : | |
1796 | ac_retval=0 | |
1797 | else | |
1798 | $as_echo "$as_me: failed program was:" >&5 | |
1799 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1800 | |
81ecdfbb RW |
1801 | ac_retval=1 |
1802 | fi | |
1803 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1804 | return $ac_retval | |
1805 | ||
1806 | } # ac_fn_c_try_compile | |
1807 | ||
1808 | # ac_fn_c_try_cpp LINENO | |
1809 | # ---------------------- | |
1810 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1811 | ac_fn_c_try_cpp () | |
bec39cab | 1812 | { |
81ecdfbb RW |
1813 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1814 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1815 | case "(($ac_try" in | |
1816 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1817 | *) ac_try_echo=$ac_try;; | |
1818 | esac | |
1819 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1820 | $as_echo "$ac_try_echo"; } >&5 | |
1821 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1822 | ac_status=$? | |
1823 | if test -s conftest.err; then | |
1824 | grep -v '^ *+' conftest.err >conftest.er1 | |
1825 | cat conftest.er1 >&5 | |
1826 | mv -f conftest.er1 conftest.err | |
1827 | fi | |
1828 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1829 | test $ac_status = 0; } >/dev/null && { | |
1830 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1831 | test ! -s conftest.err | |
1832 | }; then : | |
1833 | ac_retval=0 | |
1834 | else | |
1835 | $as_echo "$as_me: failed program was:" >&5 | |
1836 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1837 | |
81ecdfbb RW |
1838 | ac_retval=1 |
1839 | fi | |
1840 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1841 | return $ac_retval | |
bec39cab | 1842 | |
81ecdfbb | 1843 | } # ac_fn_c_try_cpp |
bec39cab | 1844 | |
81ecdfbb RW |
1845 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1846 | # ------------------------------------------------------- | |
1847 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1848 | # the include files in INCLUDES and setting the cache variable VAR | |
1849 | # accordingly. | |
1850 | ac_fn_c_check_header_mongrel () | |
1851 | { | |
1852 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1853 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1855 | $as_echo_n "checking for $2... " >&6; } | |
1856 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1857 | $as_echo_n "(cached) " >&6 | |
1858 | fi | |
1859 | eval ac_res=\$$3 | |
1860 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1861 | $as_echo "$ac_res" >&6; } | |
1862 | else | |
1863 | # Is the header compilable? | |
1864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1865 | $as_echo_n "checking $2 usability... " >&6; } | |
1866 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1867 | /* end confdefs.h. */ | |
1868 | $4 | |
1869 | #include <$2> | |
1870 | _ACEOF | |
1871 | if ac_fn_c_try_compile "$LINENO"; then : | |
1872 | ac_header_compiler=yes | |
1873 | else | |
1874 | ac_header_compiler=no | |
1875 | fi | |
1876 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1878 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1879 | |
81ecdfbb RW |
1880 | # Is the header present? |
1881 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1882 | $as_echo_n "checking $2 presence... " >&6; } | |
1883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1884 | /* end confdefs.h. */ | |
1885 | #include <$2> | |
1886 | _ACEOF | |
1887 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1888 | ac_header_preproc=yes | |
1889 | else | |
1890 | ac_header_preproc=no | |
1891 | fi | |
1892 | rm -f conftest.err conftest.$ac_ext | |
1893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1894 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1895 | |
81ecdfbb RW |
1896 | # So? What about this header? |
1897 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1898 | yes:no: ) | |
1899 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1900 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1901 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1902 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1903 | ;; | |
1904 | no:yes:* ) | |
1905 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1906 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1907 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1908 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1909 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1910 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1911 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1912 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1913 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1914 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1915 | ;; | |
1916 | esac | |
1917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1918 | $as_echo_n "checking for $2... " >&6; } | |
1919 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1920 | $as_echo_n "(cached) " >&6 | |
1921 | else | |
1922 | eval "$3=\$ac_header_compiler" | |
1923 | fi | |
1924 | eval ac_res=\$$3 | |
1925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1926 | $as_echo "$ac_res" >&6; } | |
1927 | fi | |
1928 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1929 | |
81ecdfbb | 1930 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1931 | |
81ecdfbb RW |
1932 | # ac_fn_c_try_run LINENO |
1933 | # ---------------------- | |
1934 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1935 | # that executables *can* be run. | |
1936 | ac_fn_c_try_run () | |
1937 | { | |
1938 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1939 | if { { ac_try="$ac_link" | |
1940 | case "(($ac_try" in | |
1941 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1942 | *) ac_try_echo=$ac_try;; | |
1943 | esac | |
1944 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1945 | $as_echo "$ac_try_echo"; } >&5 | |
1946 | (eval "$ac_link") 2>&5 | |
1947 | ac_status=$? | |
1948 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1949 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1950 | { { case "(($ac_try" in | |
1951 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1952 | *) ac_try_echo=$ac_try;; | |
1953 | esac | |
1954 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1955 | $as_echo "$ac_try_echo"; } >&5 | |
1956 | (eval "$ac_try") 2>&5 | |
1957 | ac_status=$? | |
1958 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1959 | test $ac_status = 0; }; }; then : | |
1960 | ac_retval=0 | |
1961 | else | |
1962 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1963 | $as_echo "$as_me: failed program was:" >&5 | |
1964 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1965 | |
81ecdfbb RW |
1966 | ac_retval=$ac_status |
1967 | fi | |
1968 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1969 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1970 | return $ac_retval | |
bec39cab | 1971 | |
81ecdfbb | 1972 | } # ac_fn_c_try_run |
bec39cab | 1973 | |
81ecdfbb RW |
1974 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1975 | # ------------------------------------------------------- | |
1976 | # Tests whether HEADER exists and can be compiled using the include files in | |
1977 | # INCLUDES, setting the cache variable VAR accordingly. | |
1978 | ac_fn_c_check_header_compile () | |
1979 | { | |
1980 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1982 | $as_echo_n "checking for $2... " >&6; } | |
1983 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1984 | $as_echo_n "(cached) " >&6 | |
1985 | else | |
1986 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1987 | /* end confdefs.h. */ | |
1988 | $4 | |
1989 | #include <$2> | |
bec39cab | 1990 | _ACEOF |
81ecdfbb RW |
1991 | if ac_fn_c_try_compile "$LINENO"; then : |
1992 | eval "$3=yes" | |
1993 | else | |
1994 | eval "$3=no" | |
1995 | fi | |
1996 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1997 | fi | |
1998 | eval ac_res=\$$3 | |
1999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2000 | $as_echo "$ac_res" >&6; } | |
2001 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2002 | |
81ecdfbb | 2003 | } # ac_fn_c_check_header_compile |
bec39cab | 2004 | |
81ecdfbb RW |
2005 | # ac_fn_c_try_link LINENO |
2006 | # ----------------------- | |
2007 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2008 | ac_fn_c_try_link () | |
b4e70030 | 2009 | { |
81ecdfbb RW |
2010 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
2011 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2012 | if { { ac_try="$ac_link" | |
2013 | case "(($ac_try" in | |
2014 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2015 | *) ac_try_echo=$ac_try;; | |
2016 | esac | |
2017 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2018 | $as_echo "$ac_try_echo"; } >&5 | |
2019 | (eval "$ac_link") 2>conftest.err | |
2020 | ac_status=$? | |
2021 | if test -s conftest.err; then | |
2022 | grep -v '^ *+' conftest.err >conftest.er1 | |
2023 | cat conftest.er1 >&5 | |
2024 | mv -f conftest.er1 conftest.err | |
2025 | fi | |
2026 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2027 | test $ac_status = 0; } && { | |
2028 | test -z "$ac_c_werror_flag" || | |
2029 | test ! -s conftest.err | |
2030 | } && test -s conftest$ac_exeext && { | |
2031 | test "$cross_compiling" = yes || | |
2032 | $as_test_x conftest$ac_exeext | |
2033 | }; then : | |
2034 | ac_retval=0 | |
2035 | else | |
2036 | $as_echo "$as_me: failed program was:" >&5 | |
2037 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2038 | |
81ecdfbb RW |
2039 | ac_retval=1 |
2040 | fi | |
2041 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2042 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2043 | # interfere with the next link command; also delete a directory that is | |
2044 | # left behind by Apple's compiler. We do this before executing the actions. | |
2045 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2046 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2047 | return $ac_retval | |
bec39cab | 2048 | |
81ecdfbb | 2049 | } # ac_fn_c_try_link |
bec39cab | 2050 | |
81ecdfbb RW |
2051 | # ac_fn_c_check_func LINENO FUNC VAR |
2052 | # ---------------------------------- | |
2053 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2054 | ac_fn_c_check_func () | |
2055 | { | |
2056 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2058 | $as_echo_n "checking for $2... " >&6; } | |
2059 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2060 | $as_echo_n "(cached) " >&6 | |
2061 | else | |
2062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2063 | /* end confdefs.h. */ | |
2064 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2065 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2066 | #define $2 innocuous_$2 | |
bec39cab | 2067 | |
81ecdfbb RW |
2068 | /* System header to define __stub macros and hopefully few prototypes, |
2069 | which can conflict with char $2 (); below. | |
2070 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2071 | <limits.h> exists even on freestanding compilers. */ | |
bec39cab | 2072 | |
81ecdfbb RW |
2073 | #ifdef __STDC__ |
2074 | # include <limits.h> | |
2075 | #else | |
2076 | # include <assert.h> | |
2077 | #endif | |
bec39cab | 2078 | |
81ecdfbb | 2079 | #undef $2 |
bec39cab | 2080 | |
81ecdfbb RW |
2081 | /* Override any GCC internal prototype to avoid an error. |
2082 | Use char because int might match the return type of a GCC | |
2083 | builtin and then its argument prototype would still apply. */ | |
2084 | #ifdef __cplusplus | |
2085 | extern "C" | |
2086 | #endif | |
2087 | char $2 (); | |
2088 | /* The GNU C library defines this for functions which it implements | |
2089 | to always fail with ENOSYS. Some functions are actually named | |
2090 | something starting with __ and the normal name is an alias. */ | |
2091 | #if defined __stub_$2 || defined __stub___$2 | |
2092 | choke me | |
2093 | #endif | |
bec39cab | 2094 | |
81ecdfbb RW |
2095 | int |
2096 | main () | |
2097 | { | |
2098 | return $2 (); | |
2099 | ; | |
2100 | return 0; | |
2101 | } | |
bec39cab | 2102 | _ACEOF |
81ecdfbb RW |
2103 | if ac_fn_c_try_link "$LINENO"; then : |
2104 | eval "$3=yes" | |
2105 | else | |
2106 | eval "$3=no" | |
2107 | fi | |
2108 | rm -f core conftest.err conftest.$ac_objext \ | |
2109 | conftest$ac_exeext conftest.$ac_ext | |
2110 | fi | |
2111 | eval ac_res=\$$3 | |
2112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2113 | $as_echo "$ac_res" >&6; } | |
2114 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2115 | |
81ecdfbb | 2116 | } # ac_fn_c_check_func |
bec39cab | 2117 | |
81ecdfbb RW |
2118 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2119 | # ------------------------------------ | |
2120 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2121 | ac_fn_c_check_decl () | |
2122 | { | |
2123 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 | |
2125 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2126 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2127 | $as_echo_n "(cached) " >&6 | |
2128 | else | |
2129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2130 | /* end confdefs.h. */ | |
2131 | $4 | |
2132 | int | |
2133 | main () | |
2134 | { | |
2135 | #ifndef $2 | |
2136 | (void) $2; | |
2137 | #endif | |
bec39cab | 2138 | |
81ecdfbb RW |
2139 | ; |
2140 | return 0; | |
2141 | } | |
bec39cab | 2142 | _ACEOF |
81ecdfbb RW |
2143 | if ac_fn_c_try_compile "$LINENO"; then : |
2144 | eval "$3=yes" | |
2145 | else | |
2146 | eval "$3=no" | |
2147 | fi | |
2148 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2149 | fi | |
2150 | eval ac_res=\$$3 | |
2151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2152 | $as_echo "$ac_res" >&6; } | |
2153 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2154 | |
81ecdfbb | 2155 | } # ac_fn_c_check_decl |
bec39cab | 2156 | |
81ecdfbb RW |
2157 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2158 | # -------------------------------------------- | |
2159 | # Tries to find the compile-time value of EXPR in a program that includes | |
2160 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2161 | # computed | |
2162 | ac_fn_c_compute_int () | |
2163 | { | |
2164 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2165 | if test "$cross_compiling" = yes; then | |
2166 | # Depending upon the size, compute the lo and hi bounds. | |
2167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2168 | /* end confdefs.h. */ | |
2169 | $4 | |
2170 | int | |
2171 | main () | |
2172 | { | |
2173 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2174 | test_array [0] = 0 | |
bec39cab | 2175 | |
81ecdfbb RW |
2176 | ; |
2177 | return 0; | |
2178 | } | |
2179 | _ACEOF | |
2180 | if ac_fn_c_try_compile "$LINENO"; then : | |
2181 | ac_lo=0 ac_mid=0 | |
2182 | while :; do | |
2183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2184 | /* end confdefs.h. */ | |
2185 | $4 | |
2186 | int | |
2187 | main () | |
2188 | { | |
2189 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2190 | test_array [0] = 0 | |
bec39cab | 2191 | |
81ecdfbb RW |
2192 | ; |
2193 | return 0; | |
2194 | } | |
2195 | _ACEOF | |
2196 | if ac_fn_c_try_compile "$LINENO"; then : | |
2197 | ac_hi=$ac_mid; break | |
2198 | else | |
2199 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2200 | if test $ac_lo -le $ac_mid; then | |
2201 | ac_lo= ac_hi= | |
2202 | break | |
2203 | fi | |
2204 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2205 | fi |
81ecdfbb RW |
2206 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2207 | done | |
c906108c | 2208 | else |
81ecdfbb RW |
2209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2210 | /* end confdefs.h. */ | |
2211 | $4 | |
2212 | int | |
2213 | main () | |
2214 | { | |
2215 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2216 | test_array [0] = 0 | |
bec39cab | 2217 | |
81ecdfbb RW |
2218 | ; |
2219 | return 0; | |
2220 | } | |
2221 | _ACEOF | |
2222 | if ac_fn_c_try_compile "$LINENO"; then : | |
2223 | ac_hi=-1 ac_mid=-1 | |
2224 | while :; do | |
2225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2226 | /* end confdefs.h. */ | |
2227 | $4 | |
2228 | int | |
2229 | main () | |
2230 | { | |
2231 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2232 | test_array [0] = 0 | |
bec39cab | 2233 | |
81ecdfbb RW |
2234 | ; |
2235 | return 0; | |
2236 | } | |
2237 | _ACEOF | |
2238 | if ac_fn_c_try_compile "$LINENO"; then : | |
2239 | ac_lo=$ac_mid; break | |
2240 | else | |
2241 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2242 | if test $ac_mid -le $ac_hi; then | |
2243 | ac_lo= ac_hi= | |
2244 | break | |
2245 | fi | |
2246 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2247 | fi | |
2248 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2249 | done | |
2250 | else | |
2251 | ac_lo= ac_hi= | |
2252 | fi | |
2253 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2254 | fi | |
2255 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2256 | # Binary search between lo and hi bounds. | |
2257 | while test "x$ac_lo" != "x$ac_hi"; do | |
2258 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2260 | /* end confdefs.h. */ | |
2261 | $4 | |
2262 | int | |
2263 | main () | |
2264 | { | |
2265 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2266 | test_array [0] = 0 | |
bec39cab | 2267 | |
81ecdfbb RW |
2268 | ; |
2269 | return 0; | |
2270 | } | |
2271 | _ACEOF | |
2272 | if ac_fn_c_try_compile "$LINENO"; then : | |
2273 | ac_hi=$ac_mid | |
2274 | else | |
2275 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2276 | fi | |
2277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2278 | done | |
2279 | case $ac_lo in #(( | |
2280 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2281 | '') ac_retval=1 ;; | |
2282 | esac | |
2283 | else | |
2284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2285 | /* end confdefs.h. */ | |
2286 | $4 | |
2287 | static long int longval () { return $2; } | |
2288 | static unsigned long int ulongval () { return $2; } | |
2289 | #include <stdio.h> | |
2290 | #include <stdlib.h> | |
2291 | int | |
2292 | main () | |
2293 | { | |
bec39cab | 2294 | |
81ecdfbb RW |
2295 | FILE *f = fopen ("conftest.val", "w"); |
2296 | if (! f) | |
2297 | return 1; | |
2298 | if (($2) < 0) | |
2299 | { | |
2300 | long int i = longval (); | |
2301 | if (i != ($2)) | |
2302 | return 1; | |
2303 | fprintf (f, "%ld", i); | |
2304 | } | |
2305 | else | |
2306 | { | |
2307 | unsigned long int i = ulongval (); | |
2308 | if (i != ($2)) | |
2309 | return 1; | |
2310 | fprintf (f, "%lu", i); | |
2311 | } | |
2312 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2313 | on some platforms. */ | |
2314 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2315 | |
81ecdfbb RW |
2316 | ; |
2317 | return 0; | |
2318 | } | |
2319 | _ACEOF | |
2320 | if ac_fn_c_try_run "$LINENO"; then : | |
2321 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2322 | else | |
2323 | ac_retval=1 | |
2324 | fi | |
2325 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2326 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2327 | rm -f conftest.val | |
bec39cab | 2328 | |
81ecdfbb RW |
2329 | fi |
2330 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2331 | return $ac_retval | |
bec39cab | 2332 | |
81ecdfbb | 2333 | } # ac_fn_c_compute_int |
bec39cab | 2334 | |
81ecdfbb RW |
2335 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2336 | # ---------------------------------------------------- | |
2337 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2338 | # INCLUDES, setting cache variable VAR accordingly. | |
2339 | ac_fn_c_check_member () | |
2340 | { | |
2341 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2343 | $as_echo_n "checking for $2.$3... " >&6; } | |
2344 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2345 | $as_echo_n "(cached) " >&6 | |
2346 | else | |
2347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2348 | /* end confdefs.h. */ | |
2349 | $5 | |
2350 | int | |
2351 | main () | |
2352 | { | |
2353 | static $2 ac_aggr; | |
2354 | if (ac_aggr.$3) | |
2355 | return 0; | |
2356 | ; | |
2357 | return 0; | |
2358 | } | |
2359 | _ACEOF | |
2360 | if ac_fn_c_try_compile "$LINENO"; then : | |
2361 | eval "$4=yes" | |
2362 | else | |
2363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2364 | /* end confdefs.h. */ | |
2365 | $5 | |
2366 | int | |
2367 | main () | |
2368 | { | |
2369 | static $2 ac_aggr; | |
2370 | if (sizeof ac_aggr.$3) | |
2371 | return 0; | |
2372 | ; | |
2373 | return 0; | |
2374 | } | |
2375 | _ACEOF | |
2376 | if ac_fn_c_try_compile "$LINENO"; then : | |
2377 | eval "$4=yes" | |
2378 | else | |
2379 | eval "$4=no" | |
2380 | fi | |
2381 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2382 | fi | |
2383 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2384 | fi | |
2385 | eval ac_res=\$$4 | |
2386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2387 | $as_echo "$ac_res" >&6; } | |
2388 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2389 | |
81ecdfbb | 2390 | } # ac_fn_c_check_member |
bec39cab | 2391 | |
81ecdfbb RW |
2392 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2393 | # ------------------------------------------- | |
2394 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2395 | # variable VAR accordingly. | |
2396 | ac_fn_c_check_type () | |
2397 | { | |
2398 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2400 | $as_echo_n "checking for $2... " >&6; } | |
2401 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2402 | $as_echo_n "(cached) " >&6 | |
2403 | else | |
2404 | eval "$3=no" | |
2405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2406 | /* end confdefs.h. */ | |
2407 | $4 | |
2408 | int | |
2409 | main () | |
2410 | { | |
2411 | if (sizeof ($2)) | |
2412 | return 0; | |
2413 | ; | |
2414 | return 0; | |
2415 | } | |
2416 | _ACEOF | |
2417 | if ac_fn_c_try_compile "$LINENO"; then : | |
2418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2419 | /* end confdefs.h. */ | |
2420 | $4 | |
2421 | int | |
2422 | main () | |
2423 | { | |
2424 | if (sizeof (($2))) | |
2425 | return 0; | |
2426 | ; | |
2427 | return 0; | |
2428 | } | |
2429 | _ACEOF | |
2430 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2431 | |
81ecdfbb RW |
2432 | else |
2433 | eval "$3=yes" | |
2434 | fi | |
2435 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2436 | fi | |
2437 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2438 | fi | |
2439 | eval ac_res=\$$3 | |
2440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2441 | $as_echo "$ac_res" >&6; } | |
2442 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2443 | |
81ecdfbb RW |
2444 | } # ac_fn_c_check_type |
2445 | cat >config.log <<_ACEOF | |
2446 | This file contains any messages produced by compilers while | |
2447 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2448 | |
81ecdfbb RW |
2449 | It was created by $as_me, which was |
2450 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2451 | |
81ecdfbb | 2452 | $ $0 $@ |
413ccac7 | 2453 | |
81ecdfbb RW |
2454 | _ACEOF |
2455 | exec 5>>config.log | |
2456 | { | |
2457 | cat <<_ASUNAME | |
2458 | ## --------- ## | |
2459 | ## Platform. ## | |
2460 | ## --------- ## | |
413ccac7 | 2461 | |
81ecdfbb RW |
2462 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2463 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2464 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2465 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2466 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2467 | |
81ecdfbb RW |
2468 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2469 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2470 | |
81ecdfbb RW |
2471 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2472 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2473 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2474 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2475 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2476 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2477 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2478 | |
81ecdfbb | 2479 | _ASUNAME |
bec39cab | 2480 | |
bec39cab AC |
2481 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2482 | for as_dir in $PATH | |
2483 | do | |
2484 | IFS=$as_save_IFS | |
2485 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2486 | $as_echo "PATH: $as_dir" |
2487 | done | |
2488 | IFS=$as_save_IFS | |
bec39cab | 2489 | |
81ecdfbb | 2490 | } >&5 |
bec39cab | 2491 | |
81ecdfbb | 2492 | cat >&5 <<_ACEOF |
bec39cab | 2493 | |
bec39cab | 2494 | |
81ecdfbb RW |
2495 | ## ----------- ## |
2496 | ## Core tests. ## | |
2497 | ## ----------- ## | |
2498 | ||
2499 | _ACEOF | |
2500 | ||
2501 | ||
2502 | # Keep a trace of the command line. | |
2503 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2504 | # Strip out --silent because we don't want to record it for future runs. | |
2505 | # Also quote any args containing shell meta-characters. | |
2506 | # Make two passes to allow for proper duplicate-argument suppression. | |
2507 | ac_configure_args= | |
2508 | ac_configure_args0= | |
2509 | ac_configure_args1= | |
2510 | ac_must_keep_next=false | |
2511 | for ac_pass in 1 2 | |
2512 | do | |
2513 | for ac_arg | |
2514 | do | |
2515 | case $ac_arg in | |
2516 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2517 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2518 | | -silent | --silent | --silen | --sile | --sil) | |
2519 | continue ;; | |
2520 | *\'*) | |
2521 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2522 | esac | |
2523 | case $ac_pass in | |
2524 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2525 | 2) | |
2526 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2527 | if test $ac_must_keep_next = true; then | |
2528 | ac_must_keep_next=false # Got value, back to normal. | |
2529 | else | |
2530 | case $ac_arg in | |
2531 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2532 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2533 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2534 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2535 | case "$ac_configure_args0 " in | |
2536 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2537 | esac | |
2538 | ;; | |
2539 | -* ) ac_must_keep_next=true ;; | |
2540 | esac | |
2541 | fi | |
2542 | as_fn_append ac_configure_args " '$ac_arg'" | |
2543 | ;; | |
2544 | esac | |
2545 | done | |
2546 | done | |
2547 | { ac_configure_args0=; unset ac_configure_args0;} | |
2548 | { ac_configure_args1=; unset ac_configure_args1;} | |
2549 | ||
2550 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2551 | # config.log. We remove comments because anyway the quotes in there | |
2552 | # would cause problems or look ugly. | |
2553 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2554 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2555 | trap 'exit_status=$? | |
2556 | # Save into config.log some information that might help in debugging. | |
2557 | { | |
2558 | echo | |
2559 | ||
2560 | cat <<\_ASBOX | |
2561 | ## ---------------- ## | |
2562 | ## Cache variables. ## | |
2563 | ## ---------------- ## | |
2564 | _ASBOX | |
2565 | echo | |
2566 | # The following way of writing the cache mishandles newlines in values, | |
2567 | ( | |
2568 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2569 | eval ac_val=\$$ac_var | |
2570 | case $ac_val in #( | |
2571 | *${as_nl}*) | |
2572 | case $ac_var in #( | |
2573 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2574 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2575 | esac | |
2576 | case $ac_var in #( | |
2577 | _ | IFS | as_nl) ;; #( | |
2578 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2579 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2580 | esac ;; | |
2581 | esac | |
2582 | done | |
2583 | (set) 2>&1 | | |
2584 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2585 | *${as_nl}ac_space=\ *) | |
2586 | sed -n \ | |
2587 | "s/'\''/'\''\\\\'\'''\''/g; | |
2588 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2589 | ;; #( | |
2590 | *) | |
2591 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2592 | ;; | |
2593 | esac | | |
2594 | sort | |
2595 | ) | |
2596 | echo | |
2597 | ||
2598 | cat <<\_ASBOX | |
2599 | ## ----------------- ## | |
2600 | ## Output variables. ## | |
2601 | ## ----------------- ## | |
2602 | _ASBOX | |
2603 | echo | |
2604 | for ac_var in $ac_subst_vars | |
2605 | do | |
2606 | eval ac_val=\$$ac_var | |
2607 | case $ac_val in | |
2608 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2609 | esac | |
2610 | $as_echo "$ac_var='\''$ac_val'\''" | |
2611 | done | sort | |
2612 | echo | |
2613 | ||
2614 | if test -n "$ac_subst_files"; then | |
2615 | cat <<\_ASBOX | |
2616 | ## ------------------- ## | |
2617 | ## File substitutions. ## | |
2618 | ## ------------------- ## | |
2619 | _ASBOX | |
2620 | echo | |
2621 | for ac_var in $ac_subst_files | |
2622 | do | |
2623 | eval ac_val=\$$ac_var | |
2624 | case $ac_val in | |
2625 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2626 | esac | |
2627 | $as_echo "$ac_var='\''$ac_val'\''" | |
2628 | done | sort | |
2629 | echo | |
2630 | fi | |
2631 | ||
2632 | if test -s confdefs.h; then | |
2633 | cat <<\_ASBOX | |
2634 | ## ----------- ## | |
2635 | ## confdefs.h. ## | |
2636 | ## ----------- ## | |
2637 | _ASBOX | |
2638 | echo | |
2639 | cat confdefs.h | |
2640 | echo | |
2641 | fi | |
2642 | test "$ac_signal" != 0 && | |
2643 | $as_echo "$as_me: caught signal $ac_signal" | |
2644 | $as_echo "$as_me: exit $exit_status" | |
2645 | } >&5 | |
2646 | rm -f core *.core core.conftest.* && | |
2647 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2648 | exit $exit_status | |
2649 | ' 0 | |
2650 | for ac_signal in 1 2 13 15; do | |
2651 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2652 | done | |
2653 | ac_signal=0 | |
2654 | ||
2655 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2656 | rm -f -r conftest* confdefs.h | |
2657 | ||
2658 | $as_echo "/* confdefs.h */" > confdefs.h | |
2659 | ||
2660 | # Predefined preprocessor variables. | |
2661 | ||
2662 | cat >>confdefs.h <<_ACEOF | |
2663 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2664 | _ACEOF | |
2665 | ||
2666 | cat >>confdefs.h <<_ACEOF | |
2667 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2668 | _ACEOF | |
2669 | ||
2670 | cat >>confdefs.h <<_ACEOF | |
2671 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2672 | _ACEOF | |
2673 | ||
2674 | cat >>confdefs.h <<_ACEOF | |
2675 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2676 | _ACEOF | |
2677 | ||
2678 | cat >>confdefs.h <<_ACEOF | |
2679 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2680 | _ACEOF | |
2681 | ||
2682 | cat >>confdefs.h <<_ACEOF | |
2683 | #define PACKAGE_URL "$PACKAGE_URL" | |
2684 | _ACEOF | |
2685 | ||
2686 | ||
2687 | # Let the site file select an alternate cache file if it wants to. | |
2688 | # Prefer an explicitly selected file to automatically selected ones. | |
2689 | ac_site_file1=NONE | |
2690 | ac_site_file2=NONE | |
2691 | if test -n "$CONFIG_SITE"; then | |
2692 | ac_site_file1=$CONFIG_SITE | |
2693 | elif test "x$prefix" != xNONE; then | |
2694 | ac_site_file1=$prefix/share/config.site | |
2695 | ac_site_file2=$prefix/etc/config.site | |
2696 | else | |
2697 | ac_site_file1=$ac_default_prefix/share/config.site | |
2698 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2699 | fi | |
2700 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2701 | do | |
2702 | test "x$ac_site_file" = xNONE && continue | |
2703 | if test -r "$ac_site_file"; then | |
2704 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2705 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2706 | sed 's/^/| /' "$ac_site_file" >&5 | |
2707 | . "$ac_site_file" | |
2708 | fi | |
2709 | done | |
2710 | ||
2711 | if test -r "$cache_file"; then | |
2712 | # Some versions of bash will fail to source /dev/null (special | |
2713 | # files actually), so we avoid doing that. | |
2714 | if test -f "$cache_file"; then | |
2715 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2716 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2717 | case $cache_file in | |
2718 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2719 | *) . "./$cache_file";; | |
2720 | esac | |
2721 | fi | |
2722 | else | |
2723 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2724 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2725 | >$cache_file | |
bec39cab AC |
2726 | fi |
2727 | ||
f434ba03 PA |
2728 | gl_header_list="$gl_header_list sys/mman.h" |
2729 | gl_func_list="$gl_func_list mprotect" | |
2730 | gl_func_list="$gl_func_list memchr" | |
2731 | gl_header_list="$gl_header_list stddef.h" | |
81ecdfbb RW |
2732 | gl_header_list="$gl_header_list stdint.h" |
2733 | gl_header_list="$gl_header_list wchar.h" | |
2734 | gl_header_list="$gl_header_list string.h" | |
2735 | # Check that the precious variables saved in the cache have kept the same | |
2736 | # value. | |
2737 | ac_cache_corrupted=false | |
2738 | for ac_var in $ac_precious_vars; do | |
2739 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2740 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2741 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2742 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2743 | case $ac_old_set,$ac_new_set in | |
2744 | set,) | |
2745 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2746 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2747 | ac_cache_corrupted=: ;; | |
2748 | ,set) | |
2749 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2750 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2751 | ac_cache_corrupted=: ;; | |
2752 | ,);; | |
2753 | *) | |
2754 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2755 | # differences in whitespace do not lead to failure. | |
2756 | ac_old_val_w=`echo x $ac_old_val` | |
2757 | ac_new_val_w=`echo x $ac_new_val` | |
2758 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2759 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2760 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2761 | ac_cache_corrupted=: | |
2762 | else | |
2763 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2764 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2765 | eval $ac_var=\$ac_old_val | |
2766 | fi | |
2767 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2768 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2769 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2770 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2771 | fi;; | |
2772 | esac | |
2773 | # Pass precious variables to config.status. | |
2774 | if test "$ac_new_set" = set; then | |
2775 | case $ac_new_val in | |
2776 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2777 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2778 | esac | |
2779 | case " $ac_configure_args " in | |
2780 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2781 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2782 | esac | |
2783 | fi | |
2784 | done | |
2785 | if $ac_cache_corrupted; then | |
2786 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2787 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2788 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2789 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2790 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2791 | fi | |
2792 | ## -------------------- ## | |
2793 | ## Main body of script. ## | |
2794 | ## -------------------- ## | |
2795 | ||
2796 | ac_ext=c | |
2797 | ac_cpp='$CPP $CPPFLAGS' | |
2798 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2799 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2800 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2801 | ||
2802 | ||
2803 | ||
2804 | ||
2805 | ||
2806 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2807 | ||
2808 | ||
2809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2810 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2811 | # Check whether --enable-maintainer-mode was given. | |
2812 | if test "${enable_maintainer_mode+set}" = set; then : | |
2813 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2814 | else | |
2815 | USE_MAINTAINER_MODE=no | |
2816 | fi | |
2817 | ||
2818 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2819 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2820 | if test $USE_MAINTAINER_MODE = yes; then | |
2821 | MAINTAINER_MODE_TRUE= | |
2822 | MAINTAINER_MODE_FALSE='#' | |
2823 | else | |
2824 | MAINTAINER_MODE_TRUE='#' | |
2825 | MAINTAINER_MODE_FALSE= | |
2826 | fi | |
2827 | ||
2828 | MAINT=$MAINTAINER_MODE_TRUE | |
2829 | ||
2830 | ||
2831 | ||
2832 | ac_ext=c | |
2833 | ac_cpp='$CPP $CPPFLAGS' | |
2834 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2835 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2836 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2837 | if test -n "$ac_tool_prefix"; then | |
2838 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2839 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2841 | $as_echo_n "checking for $ac_word... " >&6; } | |
2842 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2843 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2844 | else |
2845 | if test -n "$CC"; then | |
2846 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2847 | else | |
bec39cab AC |
2848 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2849 | for as_dir in $PATH | |
2850 | do | |
2851 | IFS=$as_save_IFS | |
2852 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2853 | for ac_exec_ext in '' $ac_executable_extensions; do |
2854 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2855 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2856 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2857 | break 2 |
2858 | fi | |
2859 | done | |
81ecdfbb RW |
2860 | done |
2861 | IFS=$as_save_IFS | |
bec39cab | 2862 | |
c906108c SS |
2863 | fi |
2864 | fi | |
bec39cab | 2865 | CC=$ac_cv_prog_CC |
c906108c | 2866 | if test -n "$CC"; then |
81ecdfbb RW |
2867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2868 | $as_echo "$CC" >&6; } | |
c906108c | 2869 | else |
81ecdfbb RW |
2870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2871 | $as_echo "no" >&6; } | |
c906108c SS |
2872 | fi |
2873 | ||
81ecdfbb | 2874 | |
b4e70030 JB |
2875 | fi |
2876 | if test -z "$ac_cv_prog_CC"; then | |
2877 | ac_ct_CC=$CC | |
81ecdfbb RW |
2878 | # Extract the first word of "gcc", so it can be a program name with args. |
2879 | set dummy gcc; ac_word=$2 | |
2880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2881 | $as_echo_n "checking for $ac_word... " >&6; } | |
2882 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2883 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2884 | else |
2885 | if test -n "$ac_ct_CC"; then | |
2886 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2887 | else | |
2888 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2889 | for as_dir in $PATH | |
2890 | do | |
2891 | IFS=$as_save_IFS | |
2892 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2893 | for ac_exec_ext in '' $ac_executable_extensions; do |
2894 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2895 | ac_cv_prog_ac_ct_CC="gcc" | |
2896 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2897 | break 2 |
4e8d927d | 2898 | fi |
b4e70030 | 2899 | done |
81ecdfbb RW |
2900 | done |
2901 | IFS=$as_save_IFS | |
b4e70030 JB |
2902 | |
2903 | fi | |
2904 | fi | |
2905 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2906 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2908 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2909 | else |
81ecdfbb RW |
2910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2911 | $as_echo "no" >&6; } | |
b4e70030 JB |
2912 | fi |
2913 | ||
81ecdfbb RW |
2914 | if test "x$ac_ct_CC" = x; then |
2915 | CC="" | |
2916 | else | |
2917 | case $cross_compiling:$ac_tool_warned in | |
2918 | yes:) | |
2919 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2920 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2921 | ac_tool_warned=yes ;; | |
2922 | esac | |
2923 | CC=$ac_ct_CC | |
2924 | fi | |
b4e70030 JB |
2925 | else |
2926 | CC="$ac_cv_prog_CC" | |
2927 | fi | |
2928 | ||
c906108c | 2929 | if test -z "$CC"; then |
81ecdfbb RW |
2930 | if test -n "$ac_tool_prefix"; then |
2931 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2932 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2934 | $as_echo_n "checking for $ac_word... " >&6; } | |
2935 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2936 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2937 | else |
2938 | if test -n "$CC"; then | |
2939 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2940 | else | |
bec39cab AC |
2941 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2942 | for as_dir in $PATH | |
2943 | do | |
2944 | IFS=$as_save_IFS | |
2945 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2946 | for ac_exec_ext in '' $ac_executable_extensions; do |
2947 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2948 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2949 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2950 | break 2 |
2951 | fi | |
2952 | done | |
81ecdfbb RW |
2953 | done |
2954 | IFS=$as_save_IFS | |
2955 | ||
2956 | fi | |
2957 | fi | |
2958 | CC=$ac_cv_prog_CC | |
2959 | if test -n "$CC"; then | |
2960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2961 | $as_echo "$CC" >&6; } | |
2962 | else | |
2963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2964 | $as_echo "no" >&6; } | |
2965 | fi | |
2966 | ||
2967 | ||
2968 | fi | |
2969 | fi | |
2970 | if test -z "$CC"; then | |
2971 | # Extract the first word of "cc", so it can be a program name with args. | |
2972 | set dummy cc; ac_word=$2 | |
2973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2974 | $as_echo_n "checking for $ac_word... " >&6; } | |
2975 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2976 | $as_echo_n "(cached) " >&6 | |
2977 | else | |
2978 | if test -n "$CC"; then | |
2979 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2980 | else | |
2981 | ac_prog_rejected=no | |
2982 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2983 | for as_dir in $PATH | |
2984 | do | |
2985 | IFS=$as_save_IFS | |
2986 | test -z "$as_dir" && as_dir=. | |
2987 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2988 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2989 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2990 | ac_prog_rejected=yes | |
2991 | continue | |
2992 | fi | |
2993 | ac_cv_prog_CC="cc" | |
2994 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2995 | break 2 | |
2996 | fi | |
2997 | done | |
2998 | done | |
2999 | IFS=$as_save_IFS | |
bec39cab | 3000 | |
c906108c SS |
3001 | if test $ac_prog_rejected = yes; then |
3002 | # We found a bogon in the path, so make sure we never use it. | |
3003 | set dummy $ac_cv_prog_CC | |
3004 | shift | |
bec39cab | 3005 | if test $# != 0; then |
c906108c SS |
3006 | # We chose a different compiler from the bogus one. |
3007 | # However, it has the same basename, so the bogon will be chosen | |
3008 | # first if we set CC to just the basename; use the full file name. | |
3009 | shift | |
bec39cab | 3010 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3011 | fi |
3012 | fi | |
3013 | fi | |
3014 | fi | |
bec39cab | 3015 | CC=$ac_cv_prog_CC |
c906108c | 3016 | if test -n "$CC"; then |
81ecdfbb RW |
3017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3018 | $as_echo "$CC" >&6; } | |
c906108c | 3019 | else |
81ecdfbb RW |
3020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3021 | $as_echo "no" >&6; } | |
c906108c SS |
3022 | fi |
3023 | ||
81ecdfbb | 3024 | |
bec39cab AC |
3025 | fi |
3026 | if test -z "$CC"; then | |
3027 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3028 | for ac_prog in cl.exe |
bec39cab AC |
3029 | do |
3030 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3031 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3033 | $as_echo_n "checking for $ac_word... " >&6; } | |
3034 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3035 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
3036 | else |
3037 | if test -n "$CC"; then | |
3038 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3039 | else | |
bec39cab AC |
3040 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3041 | for as_dir in $PATH | |
3042 | do | |
3043 | IFS=$as_save_IFS | |
3044 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3045 | for ac_exec_ext in '' $ac_executable_extensions; do |
3046 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3047 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3048 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3049 | break 2 |
3050 | fi | |
3051 | done | |
81ecdfbb RW |
3052 | done |
3053 | IFS=$as_save_IFS | |
bec39cab | 3054 | |
c906108c SS |
3055 | fi |
3056 | fi | |
bec39cab | 3057 | CC=$ac_cv_prog_CC |
c906108c | 3058 | if test -n "$CC"; then |
81ecdfbb RW |
3059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3060 | $as_echo "$CC" >&6; } | |
c906108c | 3061 | else |
81ecdfbb RW |
3062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3063 | $as_echo "no" >&6; } | |
c906108c | 3064 | fi |
bec39cab | 3065 | |
81ecdfbb | 3066 | |
bec39cab AC |
3067 | test -n "$CC" && break |
3068 | done | |
3069 | fi | |
3070 | if test -z "$CC"; then | |
3071 | ac_ct_CC=$CC | |
81ecdfbb | 3072 | for ac_prog in cl.exe |
bec39cab AC |
3073 | do |
3074 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3075 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3077 | $as_echo_n "checking for $ac_word... " >&6; } | |
3078 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3079 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3080 | else |
3081 | if test -n "$ac_ct_CC"; then | |
3082 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3083 | else | |
3084 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3085 | for as_dir in $PATH | |
3086 | do | |
3087 | IFS=$as_save_IFS | |
3088 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3089 | for ac_exec_ext in '' $ac_executable_extensions; do |
3090 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3091 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3092 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3093 | break 2 |
c906108c | 3094 | fi |
bec39cab | 3095 | done |
81ecdfbb RW |
3096 | done |
3097 | IFS=$as_save_IFS | |
bec39cab AC |
3098 | |
3099 | fi | |
3100 | fi | |
3101 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3102 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3104 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3105 | else |
81ecdfbb RW |
3106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3107 | $as_echo "no" >&6; } | |
c906108c SS |
3108 | fi |
3109 | ||
81ecdfbb | 3110 | |
bec39cab AC |
3111 | test -n "$ac_ct_CC" && break |
3112 | done | |
c906108c | 3113 | |
81ecdfbb RW |
3114 | if test "x$ac_ct_CC" = x; then |
3115 | CC="" | |
3116 | else | |
3117 | case $cross_compiling:$ac_tool_warned in | |
3118 | yes:) | |
3119 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3120 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3121 | ac_tool_warned=yes ;; | |
3122 | esac | |
3123 | CC=$ac_ct_CC | |
3124 | fi | |
bec39cab AC |
3125 | fi |
3126 | ||
3127 | fi | |
3128 | ||
3129 | ||
81ecdfbb RW |
3130 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3131 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3132 | as_fn_error "no acceptable C compiler found in \$PATH | |
3133 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3134 | |
3135 | # Provide some information about the compiler. | |
81ecdfbb RW |
3136 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3137 | set X $ac_compile | |
3138 | ac_compiler=$2 | |
3139 | for ac_option in --version -v -V -qversion; do | |
3140 | { { ac_try="$ac_compiler $ac_option >&5" | |
3141 | case "(($ac_try" in | |
3142 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3143 | *) ac_try_echo=$ac_try;; | |
3144 | esac | |
3145 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3146 | $as_echo "$ac_try_echo"; } >&5 | |
3147 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3148 | ac_status=$? |
81ecdfbb RW |
3149 | if test -s conftest.err; then |
3150 | sed '10a\ | |
3151 | ... rest of stderr output deleted ... | |
3152 | 10q' conftest.err >conftest.er1 | |
3153 | cat conftest.er1 >&5 | |
3154 | rm -f conftest.er1 conftest.err | |
3155 | fi | |
3156 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3157 | test $ac_status = 0; } | |
3158 | done | |
bec39cab | 3159 | |
81ecdfbb | 3160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3161 | /* end confdefs.h. */ |
3162 | ||
3163 | int | |
3164 | main () | |
3165 | { | |
3166 | ||
3167 | ; | |
3168 | return 0; | |
3169 | } | |
3170 | _ACEOF | |
3171 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3172 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3173 | # Try to create an executable without -o first, disregard a.out. |
3174 | # It will help us diagnose broken compilers, and finding out an intuition | |
3175 | # of exeext. | |
81ecdfbb RW |
3176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3177 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3178 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3179 | ||
3180 | # The possible output files: | |
3181 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3182 | ||
3183 | ac_rmfiles= | |
3184 | for ac_file in $ac_files | |
3185 | do | |
3186 | case $ac_file in | |
3187 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3188 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3189 | esac | |
3190 | done | |
3191 | rm -f $ac_rmfiles | |
3192 | ||
3193 | if { { ac_try="$ac_link_default" | |
3194 | case "(($ac_try" in | |
3195 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3196 | *) ac_try_echo=$ac_try;; | |
3197 | esac | |
3198 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3199 | $as_echo "$ac_try_echo"; } >&5 | |
3200 | (eval "$ac_link_default") 2>&5 | |
3201 | ac_status=$? | |
3202 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3203 | test $ac_status = 0; }; then : | |
3204 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3205 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3206 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3207 | # so that the user can short-circuit this test for compilers unknown to | |
3208 | # Autoconf. | |
3209 | for ac_file in $ac_files '' | |
bec39cab AC |
3210 | do |
3211 | test -f "$ac_file" || continue | |
3212 | case $ac_file in | |
81ecdfbb | 3213 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3214 | ;; |
3215 | [ab].out ) | |
3216 | # We found the default executable, but exeext='' is most | |
3217 | # certainly right. | |
3218 | break;; | |
3219 | *.* ) | |
81ecdfbb RW |
3220 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3221 | then :; else | |
3222 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3223 | fi | |
3224 | # We set ac_cv_exeext here because the later test for it is not | |
3225 | # safe: cross compilers may not add the suffix if given an `-o' | |
3226 | # argument, so we may need to know it at that point already. | |
3227 | # Even if this section looks crufty: it has the advantage of | |
3228 | # actually working. | |
b4e70030 JB |
3229 | break;; |
3230 | * ) | |
3231 | break;; | |
bec39cab AC |
3232 | esac |
3233 | done | |
81ecdfbb RW |
3234 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3235 | ||
bec39cab | 3236 | else |
81ecdfbb RW |
3237 | ac_file='' |
3238 | fi | |
3239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3240 | $as_echo "$ac_file" >&6; } | |
3241 | if test -z "$ac_file"; then : | |
3242 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3243 | sed 's/^/| /' conftest.$ac_ext >&5 |
3244 | ||
81ecdfbb RW |
3245 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3246 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3247 | { as_fn_set_status 77 | |
3248 | as_fn_error "C compiler cannot create executables | |
3249 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3250 | fi |
b4e70030 | 3251 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3252 | |
81ecdfbb | 3253 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3254 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3256 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3257 | # If not cross compiling, check that we can run a simple program. |
3258 | if test "$cross_compiling" != yes; then | |
3259 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3260 | { { case "(($ac_try" in |
3261 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3262 | *) ac_try_echo=$ac_try;; | |
3263 | esac | |
3264 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3265 | $as_echo "$ac_try_echo"; } >&5 | |
3266 | (eval "$ac_try") 2>&5 | |
bec39cab | 3267 | ac_status=$? |
81ecdfbb RW |
3268 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3269 | test $ac_status = 0; }; }; then | |
bec39cab | 3270 | cross_compiling=no |
c906108c | 3271 | else |
bec39cab AC |
3272 | if test "$cross_compiling" = maybe; then |
3273 | cross_compiling=yes | |
3274 | else | |
81ecdfbb RW |
3275 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3276 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3277 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3278 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3279 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3280 | fi |
c906108c | 3281 | fi |
bec39cab | 3282 | fi |
81ecdfbb RW |
3283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3284 | $as_echo "yes" >&6; } | |
bec39cab | 3285 | |
81ecdfbb | 3286 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3287 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3288 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3289 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3291 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3293 | $as_echo "$cross_compiling" >&6; } | |
3294 | ||
3295 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3296 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3297 | if { { ac_try="$ac_link" | |
3298 | case "(($ac_try" in | |
3299 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3300 | *) ac_try_echo=$ac_try;; | |
3301 | esac | |
3302 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3303 | $as_echo "$ac_try_echo"; } >&5 | |
3304 | (eval "$ac_link") 2>&5 | |
bec39cab | 3305 | ac_status=$? |
81ecdfbb RW |
3306 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3307 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3308 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3309 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3310 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3311 | # `rm'. | |
3312 | for ac_file in conftest.exe conftest conftest.*; do | |
3313 | test -f "$ac_file" || continue | |
3314 | case $ac_file in | |
81ecdfbb | 3315 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3316 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3317 | break;; |
3318 | * ) break;; | |
3319 | esac | |
3320 | done | |
c906108c | 3321 | else |
81ecdfbb RW |
3322 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3323 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3324 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3325 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3326 | fi |
b4e70030 | 3327 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3329 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3330 | |
b4e70030 | 3331 | rm -f conftest.$ac_ext |
bec39cab AC |
3332 | EXEEXT=$ac_cv_exeext |
3333 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3335 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3336 | if test "${ac_cv_objext+set}" = set; then : | |
3337 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3338 | else |
81ecdfbb | 3339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3340 | /* end confdefs.h. */ |
3341 | ||
3342 | int | |
3343 | main () | |
3344 | { | |
3345 | ||
3346 | ; | |
3347 | return 0; | |
3348 | } | |
3349 | _ACEOF | |
3350 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3351 | if { { ac_try="$ac_compile" |
3352 | case "(($ac_try" in | |
3353 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3354 | *) ac_try_echo=$ac_try;; | |
3355 | esac | |
3356 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3357 | $as_echo "$ac_try_echo"; } >&5 | |
3358 | (eval "$ac_compile") 2>&5 | |
3359 | ac_status=$? | |
3360 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3361 | test $ac_status = 0; }; then : | |
3362 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3363 | test -f "$ac_file" || continue; | |
bec39cab | 3364 | case $ac_file in |
81ecdfbb | 3365 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3366 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3367 | break;; | |
3368 | esac | |
3369 | done | |
c906108c | 3370 | else |
81ecdfbb | 3371 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3372 | sed 's/^/| /' conftest.$ac_ext >&5 |
3373 | ||
81ecdfbb RW |
3374 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3375 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3376 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3377 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3378 | fi |
b4e70030 | 3379 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3380 | fi |
81ecdfbb RW |
3381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3382 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3383 | OBJEXT=$ac_cv_objext |
3384 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3386 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3387 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3388 | $as_echo_n "(cached) " >&6 | |
c906108c | 3389 | else |
81ecdfbb | 3390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3391 | /* end confdefs.h. */ |
3392 | ||
3393 | int | |
3394 | main () | |
3395 | { | |
3396 | #ifndef __GNUC__ | |
3397 | choke me | |
3398 | #endif | |
3399 | ||
3400 | ; | |
3401 | return 0; | |
3402 | } | |
3403 | _ACEOF | |
81ecdfbb | 3404 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3405 | ac_compiler_gnu=yes |
3406 | else | |
81ecdfbb | 3407 | ac_compiler_gnu=no |
bec39cab | 3408 | fi |
81ecdfbb | 3409 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3410 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3411 | ||
3412 | fi | |
81ecdfbb RW |
3413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3414 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3415 | if test $ac_compiler_gnu = yes; then | |
3416 | GCC=yes | |
3417 | else | |
3418 | GCC= | |
3419 | fi | |
bec39cab AC |
3420 | ac_test_CFLAGS=${CFLAGS+set} |
3421 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3422 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3423 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3424 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3425 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3426 | else |
81ecdfbb RW |
3427 | ac_save_c_werror_flag=$ac_c_werror_flag |
3428 | ac_c_werror_flag=yes | |
3429 | ac_cv_prog_cc_g=no | |
3430 | CFLAGS="-g" | |
3431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3432 | /* end confdefs.h. */ |
3433 | ||
3434 | int | |
3435 | main () | |
3436 | { | |
3437 | ||
3438 | ; | |
3439 | return 0; | |
3440 | } | |
3441 | _ACEOF | |
81ecdfbb | 3442 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3443 | ac_cv_prog_cc_g=yes |
3444 | else | |
81ecdfbb RW |
3445 | CFLAGS="" |
3446 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3447 | /* end confdefs.h. */ | |
3448 | ||
3449 | int | |
3450 | main () | |
3451 | { | |
3452 | ||
3453 | ; | |
3454 | return 0; | |
3455 | } | |
3456 | _ACEOF | |
3457 | if ac_fn_c_try_compile "$LINENO"; then : | |
3458 | ||
3459 | else | |
3460 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3461 | CFLAGS="-g" | |
3462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3463 | /* end confdefs.h. */ | |
3464 | ||
3465 | int | |
3466 | main () | |
3467 | { | |
c906108c | 3468 | |
81ecdfbb RW |
3469 | ; |
3470 | return 0; | |
3471 | } | |
3472 | _ACEOF | |
3473 | if ac_fn_c_try_compile "$LINENO"; then : | |
3474 | ac_cv_prog_cc_g=yes | |
3475 | fi | |
3476 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3477 | fi | |
3478 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3479 | fi |
81ecdfbb RW |
3480 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3481 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3482 | fi |
81ecdfbb RW |
3483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3484 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3485 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3486 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3487 | elif test $ac_cv_prog_cc_g = yes; then |
3488 | if test "$GCC" = yes; then | |
3489 | CFLAGS="-g -O2" | |
3490 | else | |
3491 | CFLAGS="-g" | |
3492 | fi | |
3493 | else | |
3494 | if test "$GCC" = yes; then | |
3495 | CFLAGS="-O2" | |
3496 | else | |
3497 | CFLAGS= | |
3498 | fi | |
3499 | fi | |
81ecdfbb RW |
3500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3501 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3502 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3503 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3504 | else |
81ecdfbb | 3505 | ac_cv_prog_cc_c89=no |
bec39cab | 3506 | ac_save_CC=$CC |
81ecdfbb | 3507 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3508 | /* end confdefs.h. */ |
c906108c SS |
3509 | #include <stdarg.h> |
3510 | #include <stdio.h> | |
3511 | #include <sys/types.h> | |
3512 | #include <sys/stat.h> | |
3513 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3514 | struct buf { int x; }; | |
3515 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3516 | static char *e (p, i) | |
3517 | char **p; | |
3518 | int i; | |
3519 | { | |
3520 | return p[i]; | |
3521 | } | |
3522 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3523 | { | |
3524 | char *s; | |
3525 | va_list v; | |
3526 | va_start (v,p); | |
3527 | s = g (p, va_arg (v,int)); | |
3528 | va_end (v); | |
3529 | return s; | |
3530 | } | |
bec39cab AC |
3531 | |
3532 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3533 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3534 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3535 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3536 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3537 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3538 | that's true only with -std. */ |
bec39cab AC |
3539 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3540 | ||
81ecdfbb RW |
3541 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3542 | inside strings and character constants. */ | |
3543 | #define FOO(x) 'x' | |
3544 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3545 | ||
c906108c SS |
3546 | int test (int i, double x); |
3547 | struct s1 {int (*f) (int a);}; | |
3548 | struct s2 {int (*f) (double a);}; | |
3549 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3550 | int argc; | |
3551 | char **argv; | |
bec39cab AC |
3552 | int |
3553 | main () | |
3554 | { | |
c906108c | 3555 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3556 | ; |
3557 | return 0; | |
3558 | } | |
3559 | _ACEOF | |
81ecdfbb RW |
3560 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3561 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3562 | do |
3563 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3564 | if ac_fn_c_try_compile "$LINENO"; then : |
3565 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3566 | fi |
81ecdfbb RW |
3567 | rm -f core conftest.err conftest.$ac_objext |
3568 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3569 | done |
81ecdfbb | 3570 | rm -f conftest.$ac_ext |
bec39cab | 3571 | CC=$ac_save_CC |
c906108c SS |
3572 | |
3573 | fi | |
81ecdfbb RW |
3574 | # AC_CACHE_VAL |
3575 | case "x$ac_cv_prog_cc_c89" in | |
3576 | x) | |
3577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3578 | $as_echo "none needed" >&6; } ;; | |
3579 | xno) | |
3580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3581 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3582 | *) |
81ecdfbb RW |
3583 | CC="$CC $ac_cv_prog_cc_c89" |
3584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3585 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3586 | esac |
81ecdfbb | 3587 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3588 | |
b4e70030 JB |
3589 | fi |
3590 | ||
bec39cab AC |
3591 | ac_ext=c |
3592 | ac_cpp='$CPP $CPPFLAGS' | |
3593 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3594 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3595 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3596 | |
f434ba03 PA |
3597 | ac_aux_dir= |
3598 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3599 | for ac_t in install-sh install.sh shtool; do | |
3600 | if test -f "$ac_dir/$ac_t"; then | |
3601 | ac_aux_dir=$ac_dir | |
3602 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3603 | break 2 | |
3604 | fi | |
3605 | done | |
3606 | done | |
3607 | if test -z "$ac_aux_dir"; then | |
3608 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3609 | fi | |
3610 | ||
3611 | # These three variables are undocumented and unsupported, | |
3612 | # and are intended to be withdrawn in a future Autoconf release. | |
3613 | # They can cause serious problems if a builder's source tree is in a directory | |
3614 | # whose full name contains unusual characters. | |
3615 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3616 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3617 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3618 | ||
3619 | ||
3620 | # Make sure we can run config.sub. | |
3621 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3622 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3623 | ||
3624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3625 | $as_echo_n "checking build system type... " >&6; } | |
3626 | if test "${ac_cv_build+set}" = set; then : | |
3627 | $as_echo_n "(cached) " >&6 | |
3628 | else | |
3629 | ac_build_alias=$build_alias | |
3630 | test "x$ac_build_alias" = x && | |
3631 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3632 | test "x$ac_build_alias" = x && | |
3633 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3634 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3635 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3636 | ||
3637 | fi | |
3638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3639 | $as_echo "$ac_cv_build" >&6; } | |
3640 | case $ac_cv_build in | |
3641 | *-*-*) ;; | |
3642 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
3643 | esac | |
3644 | build=$ac_cv_build | |
3645 | ac_save_IFS=$IFS; IFS='-' | |
3646 | set x $ac_cv_build | |
3647 | shift | |
3648 | build_cpu=$1 | |
3649 | build_vendor=$2 | |
3650 | shift; shift | |
3651 | # Remember, the first character of IFS is used to create $*, | |
3652 | # except with old shells: | |
3653 | build_os=$* | |
3654 | IFS=$ac_save_IFS | |
3655 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3656 | ||
3657 | ||
3658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3659 | $as_echo_n "checking host system type... " >&6; } | |
3660 | if test "${ac_cv_host+set}" = set; then : | |
3661 | $as_echo_n "(cached) " >&6 | |
3662 | else | |
3663 | if test "x$host_alias" = x; then | |
3664 | ac_cv_host=$ac_cv_build | |
3665 | else | |
3666 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3667 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
3668 | fi | |
3669 | ||
3670 | fi | |
3671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3672 | $as_echo "$ac_cv_host" >&6; } | |
3673 | case $ac_cv_host in | |
3674 | *-*-*) ;; | |
3675 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
3676 | esac | |
3677 | host=$ac_cv_host | |
3678 | ac_save_IFS=$IFS; IFS='-' | |
3679 | set x $ac_cv_host | |
3680 | shift | |
3681 | host_cpu=$1 | |
3682 | host_vendor=$2 | |
3683 | shift; shift | |
3684 | # Remember, the first character of IFS is used to create $*, | |
3685 | # except with old shells: | |
3686 | host_os=$* | |
3687 | IFS=$ac_save_IFS | |
3688 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3689 | ||
3690 | ||
60ca704f | 3691 | |
bec39cab AC |
3692 | ac_ext=c |
3693 | ac_cpp='$CPP $CPPFLAGS' | |
3694 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3695 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3696 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3698 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3699 | # On Suns, sometimes $CPP names a directory. |
3700 | if test -n "$CPP" && test -d "$CPP"; then | |
3701 | CPP= | |
8bb2c122 | 3702 | fi |
bec39cab | 3703 | if test -z "$CPP"; then |
81ecdfbb RW |
3704 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3705 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3706 | else |
3707 | # Double quotes because CPP needs to be expanded | |
3708 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3709 | do | |
3710 | ac_preproc_ok=false | |
3711 | for ac_c_preproc_warn_flag in '' yes | |
3712 | do | |
3713 | # Use a header file that comes with gcc, so configuring glibc | |
3714 | # with a fresh cross-compiler works. | |
3715 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3716 | # <limits.h> exists even on freestanding compilers. | |
3717 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3718 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3719 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3720 | /* end confdefs.h. */ |
3721 | #ifdef __STDC__ | |
3722 | # include <limits.h> | |
3723 | #else | |
3724 | # include <assert.h> | |
3725 | #endif | |
3726 | Syntax error | |
3727 | _ACEOF | |
81ecdfbb | 3728 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3729 | |
81ecdfbb | 3730 | else |
bec39cab AC |
3731 | # Broken: fails on valid input. |
3732 | continue | |
3733 | fi | |
3734 | rm -f conftest.err conftest.$ac_ext | |
3735 | ||
81ecdfbb | 3736 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3737 | # can be detected and how. |
81ecdfbb | 3738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3739 | /* end confdefs.h. */ |
3740 | #include <ac_nonexistent.h> | |
3741 | _ACEOF | |
81ecdfbb | 3742 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3743 | # Broken: success on invalid input. |
3744 | continue | |
8bb2c122 | 3745 | else |
bec39cab AC |
3746 | # Passes both tests. |
3747 | ac_preproc_ok=: | |
3748 | break | |
8bb2c122 | 3749 | fi |
bec39cab | 3750 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3751 | |
bec39cab AC |
3752 | done |
3753 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3754 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3755 | if $ac_preproc_ok; then : |
bec39cab AC |
3756 | break |
3757 | fi | |
8bb2c122 | 3758 | |
bec39cab AC |
3759 | done |
3760 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3761 | |
c906108c | 3762 | fi |
bec39cab AC |
3763 | CPP=$ac_cv_prog_CPP |
3764 | else | |
3765 | ac_cv_prog_CPP=$CPP | |
c906108c | 3766 | fi |
81ecdfbb RW |
3767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3768 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3769 | ac_preproc_ok=false |
3770 | for ac_c_preproc_warn_flag in '' yes | |
3771 | do | |
3772 | # Use a header file that comes with gcc, so configuring glibc | |
3773 | # with a fresh cross-compiler works. | |
3774 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3775 | # <limits.h> exists even on freestanding compilers. | |
3776 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3777 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3779 | /* end confdefs.h. */ |
3780 | #ifdef __STDC__ | |
3781 | # include <limits.h> | |
3782 | #else | |
3783 | # include <assert.h> | |
3784 | #endif | |
3785 | Syntax error | |
3786 | _ACEOF | |
81ecdfbb | 3787 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3788 | |
81ecdfbb | 3789 | else |
bec39cab AC |
3790 | # Broken: fails on valid input. |
3791 | continue | |
3792 | fi | |
3793 | rm -f conftest.err conftest.$ac_ext | |
3794 | ||
81ecdfbb | 3795 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3796 | # can be detected and how. |
81ecdfbb | 3797 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3798 | /* end confdefs.h. */ |
3799 | #include <ac_nonexistent.h> | |
3800 | _ACEOF | |
81ecdfbb | 3801 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3802 | # Broken: success on invalid input. |
3803 | continue | |
c906108c | 3804 | else |
bec39cab AC |
3805 | # Passes both tests. |
3806 | ac_preproc_ok=: | |
3807 | break | |
c906108c | 3808 | fi |
bec39cab | 3809 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3810 | |
bec39cab AC |
3811 | done |
3812 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3813 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3814 | if $ac_preproc_ok; then : |
3815 | ||
c906108c | 3816 | else |
81ecdfbb RW |
3817 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3818 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3819 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3820 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3821 | fi |
c906108c | 3822 | |
bec39cab AC |
3823 | ac_ext=c |
3824 | ac_cpp='$CPP $CPPFLAGS' | |
3825 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3826 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3827 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3828 | ||
3829 | ||
81ecdfbb RW |
3830 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3831 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3832 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3833 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3834 | else |
81ecdfbb RW |
3835 | if test -z "$GREP"; then |
3836 | ac_path_GREP_found=false | |
3837 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3838 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3839 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3840 | do | |
3841 | IFS=$as_save_IFS | |
3842 | test -z "$as_dir" && as_dir=. | |
3843 | for ac_prog in grep ggrep; do | |
3844 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3845 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3846 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3847 | # Check for GNU ac_path_GREP and select it if it is found. | |
3848 | # Check for GNU $ac_path_GREP | |
3849 | case `"$ac_path_GREP" --version 2>&1` in | |
3850 | *GNU*) | |
3851 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3852 | *) | |
3853 | ac_count=0 | |
3854 | $as_echo_n 0123456789 >"conftest.in" | |
3855 | while : | |
3856 | do | |
3857 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3858 | mv "conftest.tmp" "conftest.in" | |
3859 | cp "conftest.in" "conftest.nl" | |
3860 | $as_echo 'GREP' >> "conftest.nl" | |
3861 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3862 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3863 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3864 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3865 | # Best one so far, save it but keep looking for a better one | |
3866 | ac_cv_path_GREP="$ac_path_GREP" | |
3867 | ac_path_GREP_max=$ac_count | |
bec39cab | 3868 | fi |
81ecdfbb RW |
3869 | # 10*(2^10) chars as input seems more than enough |
3870 | test $ac_count -gt 10 && break | |
3871 | done | |
3872 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3873 | esac | |
bec39cab | 3874 | |
81ecdfbb RW |
3875 | $ac_path_GREP_found && break 3 |
3876 | done | |
3877 | done | |
3878 | done | |
3879 | IFS=$as_save_IFS | |
3880 | if test -z "$ac_cv_path_GREP"; then | |
3881 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3882 | fi | |
c906108c | 3883 | else |
81ecdfbb | 3884 | ac_cv_path_GREP=$GREP |
c906108c | 3885 | fi |
c906108c | 3886 | |
81ecdfbb RW |
3887 | fi |
3888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3889 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3890 | GREP="$ac_cv_path_GREP" | |
c906108c | 3891 | |
c906108c | 3892 | |
81ecdfbb RW |
3893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3894 | $as_echo_n "checking for egrep... " >&6; } | |
3895 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3896 | $as_echo_n "(cached) " >&6 | |
783e057b | 3897 | else |
81ecdfbb RW |
3898 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3899 | then ac_cv_path_EGREP="$GREP -E" | |
3900 | else | |
3901 | if test -z "$EGREP"; then | |
3902 | ac_path_EGREP_found=false | |
3903 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3904 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3905 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3906 | do |
3907 | IFS=$as_save_IFS | |
3908 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3909 | for ac_prog in egrep; do |
3910 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3911 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3912 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3913 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3914 | # Check for GNU $ac_path_EGREP | |
3915 | case `"$ac_path_EGREP" --version 2>&1` in | |
3916 | *GNU*) | |
3917 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3918 | *) | |
3919 | ac_count=0 | |
3920 | $as_echo_n 0123456789 >"conftest.in" | |
3921 | while : | |
3922 | do | |
3923 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3924 | mv "conftest.tmp" "conftest.in" | |
3925 | cp "conftest.in" "conftest.nl" | |
3926 | $as_echo 'EGREP' >> "conftest.nl" | |
3927 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3928 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3929 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3930 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3931 | # Best one so far, save it but keep looking for a better one | |
3932 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3933 | ac_path_EGREP_max=$ac_count | |
3934 | fi | |
3935 | # 10*(2^10) chars as input seems more than enough | |
3936 | test $ac_count -gt 10 && break | |
3937 | done | |
3938 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3939 | esac | |
bec39cab | 3940 | |
81ecdfbb RW |
3941 | $ac_path_EGREP_found && break 3 |
3942 | done | |
3943 | done | |
3944 | done | |
3945 | IFS=$as_save_IFS | |
3946 | if test -z "$ac_cv_path_EGREP"; then | |
3947 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3948 | fi |
783e057b | 3949 | else |
81ecdfbb | 3950 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3951 | fi |
3952 | ||
81ecdfbb | 3953 | fi |
783e057b | 3954 | fi |
81ecdfbb RW |
3955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3956 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3957 | EGREP="$ac_cv_path_EGREP" | |
3958 | ||
783e057b | 3959 | |
81ecdfbb RW |
3960 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3961 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3962 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3963 | $as_echo_n "(cached) " >&6 | |
783e057b | 3964 | else |
81ecdfbb | 3965 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3966 | /* end confdefs.h. */ |
783e057b | 3967 | #include <stdlib.h> |
bec39cab | 3968 | #include <stdarg.h> |
783e057b DJ |
3969 | #include <string.h> |
3970 | #include <float.h> | |
c906108c | 3971 | |
bec39cab AC |
3972 | int |
3973 | main () | |
3974 | { | |
c906108c | 3975 | |
bec39cab AC |
3976 | ; |
3977 | return 0; | |
3978 | } | |
3979 | _ACEOF | |
81ecdfbb | 3980 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3981 | ac_cv_header_stdc=yes |
c906108c | 3982 | else |
81ecdfbb | 3983 | ac_cv_header_stdc=no |
c906108c | 3984 | fi |
81ecdfbb | 3985 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3986 | |
783e057b DJ |
3987 | if test $ac_cv_header_stdc = yes; then |
3988 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3990 | /* end confdefs.h. */ |
3991 | #include <string.h> | |
c906108c | 3992 | |
783e057b DJ |
3993 | _ACEOF |
3994 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3995 | $EGREP "memchr" >/dev/null 2>&1; then : |
3996 | ||
c906108c | 3997 | else |
783e057b | 3998 | ac_cv_header_stdc=no |
c906108c | 3999 | fi |
783e057b | 4000 | rm -f conftest* |
c906108c SS |
4001 | |
4002 | fi | |
4003 | ||
783e057b DJ |
4004 | if test $ac_cv_header_stdc = yes; then |
4005 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4007 | /* end confdefs.h. */ |
4008 | #include <stdlib.h> | |
bec39cab | 4009 | |
783e057b DJ |
4010 | _ACEOF |
4011 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4012 | $EGREP "free" >/dev/null 2>&1; then : |
4013 | ||
bec39cab | 4014 | else |
783e057b | 4015 | ac_cv_header_stdc=no |
bec39cab | 4016 | fi |
783e057b | 4017 | rm -f conftest* |
bec39cab AC |
4018 | |
4019 | fi | |
bec39cab | 4020 | |
783e057b DJ |
4021 | if test $ac_cv_header_stdc = yes; then |
4022 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4023 | if test "$cross_compiling" = yes; then : |
783e057b | 4024 | : |
bec39cab | 4025 | else |
81ecdfbb | 4026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4027 | /* end confdefs.h. */ |
4028 | #include <ctype.h> | |
81ecdfbb | 4029 | #include <stdlib.h> |
783e057b DJ |
4030 | #if ((' ' & 0x0FF) == 0x020) |
4031 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4032 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4033 | #else | |
4034 | # define ISLOWER(c) \ | |
4035 | (('a' <= (c) && (c) <= 'i') \ | |
4036 | || ('j' <= (c) && (c) <= 'r') \ | |
4037 | || ('s' <= (c) && (c) <= 'z')) | |
4038 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4039 | #endif | |
4040 | ||
4041 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4042 | int | |
4043 | main () | |
4044 | { | |
4045 | int i; | |
4046 | for (i = 0; i < 256; i++) | |
4047 | if (XOR (islower (i), ISLOWER (i)) | |
4048 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4049 | return 2; |
4050 | return 0; | |
783e057b DJ |
4051 | } |
4052 | _ACEOF | |
81ecdfbb | 4053 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4054 | |
81ecdfbb RW |
4055 | else |
4056 | ac_cv_header_stdc=no | |
783e057b | 4057 | fi |
81ecdfbb RW |
4058 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4059 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4060 | fi |
81ecdfbb | 4061 | |
783e057b DJ |
4062 | fi |
4063 | fi | |
81ecdfbb RW |
4064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4065 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4066 | if test $ac_cv_header_stdc = yes; then |
4067 | ||
81ecdfbb | 4068 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4069 | |
4070 | fi | |
4071 | ||
4072 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4073 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4074 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4075 | do : |
4076 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4077 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4078 | " | |
4079 | eval as_val=\$$as_ac_Header | |
4080 | if test "x$as_val" = x""yes; then : | |
783e057b | 4081 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4082 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4083 | _ACEOF |
4084 | ||
4085 | fi | |
4086 | ||
4087 | done | |
4088 | ||
4089 | ||
4090 | ||
f434ba03 PA |
4091 | |
4092 | ||
81ecdfbb RW |
4093 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4094 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4095 | MINIX=yes |
4096 | else | |
4097 | MINIX= | |
4098 | fi | |
4099 | ||
4100 | ||
4101 | if test "$MINIX" = yes; then | |
4102 | ||
81ecdfbb | 4103 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4104 | |
4105 | ||
81ecdfbb | 4106 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4107 | |
4108 | ||
81ecdfbb | 4109 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4110 | |
4111 | fi | |
4112 | ||
f434ba03 PA |
4113 | case "$host_os" in |
4114 | hpux*) | |
4115 | ||
4116 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
4117 | ||
4118 | ;; | |
4119 | esac | |
4120 | ||
783e057b | 4121 | |
81ecdfbb RW |
4122 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4123 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4124 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4125 | $as_echo_n "(cached) " >&6 | |
783e057b | 4126 | else |
81ecdfbb | 4127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4128 | /* end confdefs.h. */ |
4129 | ||
f434ba03 PA |
4130 | # define __EXTENSIONS__ 1 |
4131 | $ac_includes_default | |
783e057b DJ |
4132 | int |
4133 | main () | |
4134 | { | |
4135 | ||
4136 | ; | |
4137 | return 0; | |
4138 | } | |
4139 | _ACEOF | |
81ecdfbb | 4140 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4141 | ac_cv_safe_to_define___extensions__=yes |
4142 | else | |
81ecdfbb | 4143 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4144 | fi |
81ecdfbb | 4145 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4146 | fi |
81ecdfbb RW |
4147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4148 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4149 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4150 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4151 | |
81ecdfbb | 4152 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4153 | |
81ecdfbb | 4154 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4155 | |
81ecdfbb | 4156 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4157 | |
81ecdfbb | 4158 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4159 | |
4160 | ||
81ecdfbb RW |
4161 | if test -n "$ac_tool_prefix"; then |
4162 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4163 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4165 | $as_echo_n "checking for $ac_word... " >&6; } | |
4166 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
4167 | $as_echo_n "(cached) " >&6 | |
4168 | else | |
4169 | if test -n "$RANLIB"; then | |
4170 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4171 | else | |
4172 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4173 | for as_dir in $PATH | |
4174 | do | |
4175 | IFS=$as_save_IFS | |
4176 | test -z "$as_dir" && as_dir=. | |
4177 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4178 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4179 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4180 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4181 | break 2 | |
4182 | fi | |
4183 | done | |
4184 | done | |
4185 | IFS=$as_save_IFS | |
783e057b | 4186 | |
81ecdfbb RW |
4187 | fi |
4188 | fi | |
4189 | RANLIB=$ac_cv_prog_RANLIB | |
4190 | if test -n "$RANLIB"; then | |
4191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4192 | $as_echo "$RANLIB" >&6; } | |
4193 | else | |
4194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4195 | $as_echo "no" >&6; } | |
4196 | fi | |
783e057b DJ |
4197 | |
4198 | ||
81ecdfbb RW |
4199 | fi |
4200 | if test -z "$ac_cv_prog_RANLIB"; then | |
4201 | ac_ct_RANLIB=$RANLIB | |
4202 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4203 | set dummy ranlib; ac_word=$2 | |
4204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4205 | $as_echo_n "checking for $ac_word... " >&6; } | |
4206 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
4207 | $as_echo_n "(cached) " >&6 | |
783e057b | 4208 | else |
81ecdfbb RW |
4209 | if test -n "$ac_ct_RANLIB"; then |
4210 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4211 | else | |
4212 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4213 | for as_dir in $PATH | |
4214 | do | |
4215 | IFS=$as_save_IFS | |
4216 | test -z "$as_dir" && as_dir=. | |
4217 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4218 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4219 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
4220 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4221 | break 2 | |
4222 | fi | |
4223 | done | |
4224 | done | |
4225 | IFS=$as_save_IFS | |
4226 | ||
4227 | fi | |
4228 | fi | |
4229 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4230 | if test -n "$ac_ct_RANLIB"; then | |
4231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4232 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4233 | else | |
4234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4235 | $as_echo "no" >&6; } | |
4236 | fi | |
4237 | ||
4238 | if test "x$ac_ct_RANLIB" = x; then | |
4239 | RANLIB=":" | |
4240 | else | |
4241 | case $cross_compiling:$ac_tool_warned in | |
4242 | yes:) | |
4243 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4244 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4245 | ac_tool_warned=yes ;; | |
4246 | esac | |
4247 | RANLIB=$ac_ct_RANLIB | |
4248 | fi | |
4249 | else | |
4250 | RANLIB="$ac_cv_prog_RANLIB" | |
4251 | fi | |
4252 | ||
4253 | ||
4254 | ||
4255 | ||
4256 | ||
4257 | ||
3388710e JM |
4258 | |
4259 | ||
3388710e | 4260 | |
f434ba03 PA |
4261 | # Code from module arg-nonnull: |
4262 | # Code from module c++defs: | |
4263 | # Code from module extensions: | |
3388710e | 4264 | |
f434ba03 PA |
4265 | # Code from module include_next: |
4266 | # Code from module memchr: | |
4267 | # Code from module memmem: | |
4268 | # Code from module memmem-simple: | |
4269 | # Code from module multiarch: | |
4270 | # Code from module stddef: | |
4271 | # Code from module stdint: | |
4272 | # Code from module string: | |
4273 | # Code from module warn-on-use: | |
4274 | # Code from module wchar: | |
3388710e JM |
4275 | |
4276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4277 | $as_echo_n "checking target system type... " >&6; } | |
4278 | if test "${ac_cv_target+set}" = set; then : | |
4279 | $as_echo_n "(cached) " >&6 | |
4280 | else | |
4281 | if test "x$target_alias" = x; then | |
4282 | ac_cv_target=$ac_cv_host | |
4283 | else | |
4284 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4285 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4286 | fi | |
4287 | ||
4288 | fi | |
4289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4290 | $as_echo "$ac_cv_target" >&6; } | |
4291 | case $ac_cv_target in | |
4292 | *-*-*) ;; | |
4293 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4294 | esac | |
4295 | target=$ac_cv_target | |
4296 | ac_save_IFS=$IFS; IFS='-' | |
4297 | set x $ac_cv_target | |
4298 | shift | |
4299 | target_cpu=$1 | |
4300 | target_vendor=$2 | |
4301 | shift; shift | |
4302 | # Remember, the first character of IFS is used to create $*, | |
4303 | # except with old shells: | |
4304 | target_os=$* | |
4305 | IFS=$ac_save_IFS | |
4306 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4307 | ||
4308 | ||
4309 | # The aliases save the names the user supplied, while $host etc. | |
4310 | # will get canonicalized. | |
4311 | test -n "$target_alias" && | |
4312 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4313 | NONENONEs,x,x, && | |
4314 | program_prefix=${target_alias}- | |
4315 | ||
4316 | # The tests for host and target for $enable_largefile require | |
4317 | # canonical names. | |
4318 | ||
4319 | ||
81ecdfbb | 4320 | |
da2f07f1 JK |
4321 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4322 | # even in directories otherwise not depending on the $plugins option. | |
4323 | ||
4324 | ||
4325 | # Check whether --enable-plugins was given. | |
4326 | if test "${enable_plugins+set}" = set; then : | |
4327 | enableval=$enable_plugins; case "${enableval}" in | |
4328 | yes | "") plugins=yes ;; | |
4329 | no) plugins=no ;; | |
4330 | *) plugins=yes ;; | |
4331 | esac | |
4332 | else | |
4333 | plugins=no | |
4334 | fi | |
4335 | ||
4336 | ||
4337 | ||
4338 | case "${host}" in | |
4339 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4340 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4341 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4342 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4343 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4344 | # large-file support through the --enable-largefile switch, disable | |
4345 | # large-file support in favor of procfs support. | |
4346 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4347 | && : ${enable_largefile="no"} | |
4348 | ;; | |
4349 | esac | |
4350 | ||
4351 | # Check whether --enable-largefile was given. | |
4352 | if test "${enable_largefile+set}" = set; then : | |
4353 | enableval=$enable_largefile; | |
4354 | fi | |
4355 | ||
4356 | if test "$enable_largefile" != no; then | |
4357 | ||
4358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4359 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4360 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4361 | $as_echo_n "(cached) " >&6 | |
4362 | else | |
4363 | ac_cv_sys_largefile_CC=no | |
4364 | if test "$GCC" != yes; then | |
4365 | ac_save_CC=$CC | |
4366 | while :; do | |
4367 | # IRIX 6.2 and later do not support large files by default, | |
4368 | # so use the C compiler's -n32 option if that helps. | |
4369 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4370 | /* end confdefs.h. */ | |
4371 | #include <sys/types.h> | |
4372 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4373 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4374 | since some C++ compilers masquerading as C compilers | |
4375 | incorrectly reject 9223372036854775807. */ | |
4376 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4377 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4378 | && LARGE_OFF_T % 2147483647 == 1) | |
4379 | ? 1 : -1]; | |
4380 | int | |
4381 | main () | |
4382 | { | |
4383 | ||
4384 | ; | |
4385 | return 0; | |
4386 | } | |
4387 | _ACEOF | |
4388 | if ac_fn_c_try_compile "$LINENO"; then : | |
4389 | break | |
4390 | fi | |
4391 | rm -f core conftest.err conftest.$ac_objext | |
4392 | CC="$CC -n32" | |
4393 | if ac_fn_c_try_compile "$LINENO"; then : | |
4394 | ac_cv_sys_largefile_CC=' -n32'; break | |
4395 | fi | |
4396 | rm -f core conftest.err conftest.$ac_objext | |
4397 | break | |
4398 | done | |
4399 | CC=$ac_save_CC | |
4400 | rm -f conftest.$ac_ext | |
4401 | fi | |
4402 | fi | |
4403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4404 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4405 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4406 | CC=$CC$ac_cv_sys_largefile_CC | |
4407 | fi | |
4408 | ||
4409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4410 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4411 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4412 | $as_echo_n "(cached) " >&6 | |
4413 | else | |
4414 | while :; do | |
4415 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4416 | /* end confdefs.h. */ | |
4417 | #include <sys/types.h> | |
4418 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4419 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4420 | since some C++ compilers masquerading as C compilers | |
4421 | incorrectly reject 9223372036854775807. */ | |
4422 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4423 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4424 | && LARGE_OFF_T % 2147483647 == 1) | |
4425 | ? 1 : -1]; | |
4426 | int | |
4427 | main () | |
4428 | { | |
4429 | ||
4430 | ; | |
4431 | return 0; | |
4432 | } | |
4433 | _ACEOF | |
4434 | if ac_fn_c_try_compile "$LINENO"; then : | |
4435 | ac_cv_sys_file_offset_bits=no; break | |
4436 | fi | |
4437 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4439 | /* end confdefs.h. */ | |
4440 | #define _FILE_OFFSET_BITS 64 | |
4441 | #include <sys/types.h> | |
4442 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4443 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4444 | since some C++ compilers masquerading as C compilers | |
4445 | incorrectly reject 9223372036854775807. */ | |
4446 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4447 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4448 | && LARGE_OFF_T % 2147483647 == 1) | |
4449 | ? 1 : -1]; | |
4450 | int | |
4451 | main () | |
4452 | { | |
4453 | ||
4454 | ; | |
4455 | return 0; | |
4456 | } | |
4457 | _ACEOF | |
4458 | if ac_fn_c_try_compile "$LINENO"; then : | |
4459 | ac_cv_sys_file_offset_bits=64; break | |
4460 | fi | |
4461 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4462 | ac_cv_sys_file_offset_bits=unknown | |
4463 | break | |
4464 | done | |
4465 | fi | |
4466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4467 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4468 | case $ac_cv_sys_file_offset_bits in #( | |
4469 | no | unknown) ;; | |
4470 | *) | |
4471 | cat >>confdefs.h <<_ACEOF | |
4472 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4473 | _ACEOF | |
4474 | ;; | |
4475 | esac | |
4476 | rm -rf conftest* | |
4477 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4479 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4480 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4481 | $as_echo_n "(cached) " >&6 | |
4482 | else | |
4483 | while :; do | |
4484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4485 | /* end confdefs.h. */ | |
4486 | #include <sys/types.h> | |
4487 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4488 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4489 | since some C++ compilers masquerading as C compilers | |
4490 | incorrectly reject 9223372036854775807. */ | |
4491 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4492 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4493 | && LARGE_OFF_T % 2147483647 == 1) | |
4494 | ? 1 : -1]; | |
4495 | int | |
4496 | main () | |
4497 | { | |
4498 | ||
4499 | ; | |
4500 | return 0; | |
4501 | } | |
4502 | _ACEOF | |
4503 | if ac_fn_c_try_compile "$LINENO"; then : | |
4504 | ac_cv_sys_large_files=no; break | |
4505 | fi | |
4506 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4507 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4508 | /* end confdefs.h. */ | |
4509 | #define _LARGE_FILES 1 | |
4510 | #include <sys/types.h> | |
4511 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4512 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4513 | since some C++ compilers masquerading as C compilers | |
4514 | incorrectly reject 9223372036854775807. */ | |
4515 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4516 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4517 | && LARGE_OFF_T % 2147483647 == 1) | |
4518 | ? 1 : -1]; | |
4519 | int | |
4520 | main () | |
4521 | { | |
4522 | ||
4523 | ; | |
4524 | return 0; | |
4525 | } | |
4526 | _ACEOF | |
4527 | if ac_fn_c_try_compile "$LINENO"; then : | |
4528 | ac_cv_sys_large_files=1; break | |
4529 | fi | |
4530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4531 | ac_cv_sys_large_files=unknown | |
4532 | break | |
4533 | done | |
4534 | fi | |
4535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4536 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4537 | case $ac_cv_sys_large_files in #( | |
4538 | no | unknown) ;; | |
4539 | *) | |
4540 | cat >>confdefs.h <<_ACEOF | |
4541 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4542 | _ACEOF | |
4543 | ;; | |
4544 | esac | |
4545 | rm -rf conftest* | |
4546 | fi | |
4547 | fi | |
4548 | ||
4549 | ||
4550 | ||
81ecdfbb RW |
4551 | |
4552 | ||
4553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4554 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4555 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4556 | $as_echo_n "(cached) " >&6 | |
4557 | else | |
4558 | am_cv_prog_cc_stdc=no | |
4559 | ac_save_CC="$CC" | |
4560 | # Don't try gcc -ansi; that turns off useful extensions and | |
4561 | # breaks some systems' header files. | |
4562 | # AIX -qlanglvl=ansi | |
4563 | # Ultrix and OSF/1 -std1 | |
4564 | # HP-UX 10.20 and later -Ae | |
4565 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4566 | # SVR4 -Xc -D__EXTENSIONS__ | |
4567 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4568 | do | |
783e057b | 4569 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4570 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4571 | /* end confdefs.h. */ |
4572 | #include <stdarg.h> | |
4573 | #include <stdio.h> | |
4574 | #include <sys/types.h> | |
4575 | #include <sys/stat.h> | |
4576 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4577 | struct buf { int x; }; | |
4578 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4579 | static char *e (p, i) | |
4580 | char **p; | |
4581 | int i; | |
4582 | { | |
4583 | return p[i]; | |
4584 | } | |
4585 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4586 | { | |
4587 | char *s; | |
4588 | va_list v; | |
4589 | va_start (v,p); | |
4590 | s = g (p, va_arg (v,int)); | |
4591 | va_end (v); | |
4592 | return s; | |
4593 | } | |
4594 | int test (int i, double x); | |
4595 | struct s1 {int (*f) (int a);}; | |
4596 | struct s2 {int (*f) (double a);}; | |
4597 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4598 | int argc; | |
4599 | char **argv; | |
4600 | ||
4601 | int | |
4602 | main () | |
4603 | { | |
4604 | ||
4605 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4606 | ||
4607 | ; | |
4608 | return 0; | |
4609 | } | |
4610 | _ACEOF | |
81ecdfbb | 4611 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4612 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4613 | fi |
81ecdfbb | 4614 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4615 | done |
4616 | CC="$ac_save_CC" | |
4617 | ||
4618 | fi | |
4619 | ||
4620 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4622 | $as_echo "none needed" >&6; } | |
783e057b | 4623 | else |
81ecdfbb RW |
4624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4625 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4626 | fi |
4627 | case "x$am_cv_prog_cc_stdc" in | |
4628 | x|xno) ;; | |
4629 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4630 | esac | |
4631 | ||
4632 | ||
4633 | ac_aux_dir= | |
81ecdfbb RW |
4634 | for ac_dir in .. "$srcdir"/..; do |
4635 | for ac_t in install-sh install.sh shtool; do | |
4636 | if test -f "$ac_dir/$ac_t"; then | |
4637 | ac_aux_dir=$ac_dir | |
4638 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4639 | break 2 | |
4640 | fi | |
4641 | done | |
783e057b DJ |
4642 | done |
4643 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4644 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4645 | fi |
81ecdfbb RW |
4646 | |
4647 | # These three variables are undocumented and unsupported, | |
4648 | # and are intended to be withdrawn in a future Autoconf release. | |
4649 | # They can cause serious problems if a builder's source tree is in a directory | |
4650 | # whose full name contains unusual characters. | |
4651 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4652 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4653 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4654 | ||
783e057b | 4655 | |
783e057b | 4656 | |
81ecdfbb | 4657 | |
a417dc56 RW |
4658 | # Dependency checking. |
4659 | rm -rf .tst 2>/dev/null | |
4660 | mkdir .tst 2>/dev/null | |
4661 | if test -d .tst; then | |
4662 | am__leading_dot=. | |
4663 | else | |
4664 | am__leading_dot=_ | |
4665 | fi | |
4666 | rmdir .tst 2>/dev/null | |
4667 | ||
4668 | DEPDIR="${am__leading_dot}deps" | |
4669 | ||
81ecdfbb | 4670 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4671 | |
4672 | ||
4673 | depcc="$CC" am_compiler_list= | |
4674 | ||
4675 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4677 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4678 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4679 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4680 | else |
4681 | if test -f "$am_depcomp"; then | |
4682 | # We make a subdir and do the tests there. Otherwise we can end up | |
4683 | # making bogus files that we don't know about and never remove. For | |
4684 | # instance it was reported that on HP-UX the gcc test will end up | |
4685 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4686 | # in D'. | |
4687 | mkdir conftest.dir | |
4688 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4689 | # using a relative directory. | |
4690 | cp "$am_depcomp" conftest.dir | |
4691 | cd conftest.dir | |
4692 | # We will build objects and dependencies in a subdirectory because | |
4693 | # it helps to detect inapplicable dependency modes. For instance | |
4694 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4695 | # side effect of compilation, but ICC will put the dependencies in | |
4696 | # the current directory while Tru64 will put them in the object | |
4697 | # directory. | |
4698 | mkdir sub | |
4699 | ||
4700 | am_cv_CC_dependencies_compiler_type=none | |
4701 | if test "$am_compiler_list" = ""; then | |
4702 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4703 | fi | |
4704 | for depmode in $am_compiler_list; do | |
4705 | if test $depmode = none; then break; fi | |
4706 | ||
81ecdfbb | 4707 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4708 | # Setup a source with many dependencies, because some compilers |
4709 | # like to wrap large dependency lists on column 80 (with \), and | |
4710 | # we should not choose a depcomp mode which is confused by this. | |
4711 | # | |
4712 | # We need to recreate these files for each test, as the compiler may | |
4713 | # overwrite some of them when testing with obscure command lines. | |
4714 | # This happens at least with the AIX C compiler. | |
4715 | : > sub/conftest.c | |
4716 | for i in 1 2 3 4 5 6; do | |
4717 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4718 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4719 | # Solaris 8's {/usr,}/bin/sh. | |
4720 | touch sub/conftst$i.h | |
4721 | done | |
4722 | echo "include sub/conftest.Po" > confmf | |
4723 | ||
4724 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4725 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4726 | # handle `-M -o', and we need to detect this. | |
4727 | depcmd="depmode=$depmode \ | |
4728 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4729 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4730 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4731 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4732 | if env $depcmd > conftest.err 2>&1 && | |
4733 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4734 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4735 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4736 | # icc doesn't choke on unknown options, it will just issue warnings | |
4737 | # or remarks (even with -Werror). So we grep stderr for any message | |
4738 | # that says an option was ignored or not supported. | |
4739 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4740 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4741 | # The diagnosis changed in icc 8.0: | |
4742 | # icc: Command line remark: option '-MP' not supported | |
4743 | if (grep 'ignoring option' conftest.err || | |
4744 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4745 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4746 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4747 | break |
4748 | fi | |
4749 | fi | |
81ecdfbb | 4750 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4751 | sed -e 's/^/| /' < conftest.err >&5 |
4752 | done | |
4753 | ||
4754 | cd .. | |
4755 | rm -rf conftest.dir | |
4756 | else | |
4757 | am_cv_CC_dependencies_compiler_type=none | |
4758 | fi | |
4759 | ||
4760 | fi | |
81ecdfbb RW |
4761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4762 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4763 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4764 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4765 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4766 | ||
4767 | fi | |
4768 | ||
4769 | ||
4770 | # Check for the 'make' the user wants to use. | |
4771 | for ac_prog in make | |
4772 | do | |
4773 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4774 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4776 | $as_echo_n "checking for $ac_word... " >&6; } | |
4777 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4778 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4779 | else |
4780 | if test -n "$MAKE"; then | |
4781 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4782 | else | |
4783 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4784 | for as_dir in $PATH | |
4785 | do | |
4786 | IFS=$as_save_IFS | |
4787 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4788 | for ac_exec_ext in '' $ac_executable_extensions; do |
4789 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4790 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4791 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4792 | break 2 |
4793 | fi | |
4794 | done | |
81ecdfbb RW |
4795 | done |
4796 | IFS=$as_save_IFS | |
a417dc56 RW |
4797 | |
4798 | fi | |
4799 | fi | |
4800 | MAKE=$ac_cv_prog_MAKE | |
4801 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4803 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4804 | else |
81ecdfbb RW |
4805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4806 | $as_echo "no" >&6; } | |
a417dc56 RW |
4807 | fi |
4808 | ||
81ecdfbb | 4809 | |
a417dc56 RW |
4810 | test -n "$MAKE" && break |
4811 | done | |
4812 | ||
4813 | MAKE_IS_GNU= | |
4814 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4815 | *GNU*) | |
4816 | MAKE_IS_GNU=yes | |
4817 | ;; | |
4818 | esac | |
81ecdfbb | 4819 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4820 | GMAKE_TRUE= |
4821 | GMAKE_FALSE='#' | |
4822 | else | |
4823 | GMAKE_TRUE='#' | |
4824 | GMAKE_FALSE= | |
4825 | fi | |
4826 | ||
81ecdfbb RW |
4827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4828 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4829 | set x ${MAKE-make} | |
4830 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4831 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4832 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4833 | else |
4834 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4835 | SHELL = /bin/sh |
a417dc56 | 4836 | all: |
81ecdfbb | 4837 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4838 | _ACEOF |
4839 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4840 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4841 | *@@@%%%=?*=@@@%%%*) | |
4842 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4843 | *) | |
4844 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4845 | esac | |
a417dc56 RW |
4846 | rm -f conftest.make |
4847 | fi | |
81ecdfbb RW |
4848 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4849 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4850 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4851 | SET_MAKE= |
4852 | else | |
81ecdfbb RW |
4853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4854 | $as_echo "no" >&6; } | |
a417dc56 RW |
4855 | SET_MAKE="MAKE=${MAKE-make}" |
4856 | fi | |
4857 | ||
4858 | ||
783e057b DJ |
4859 | |
4860 | CONFIG_OBS= | |
4861 | CONFIG_DEPS= | |
4862 | CONFIG_SRCS= | |
4863 | ENABLE_CFLAGS= | |
4864 | ||
4865 | CONFIG_ALL= | |
4866 | CONFIG_CLEAN= | |
4867 | CONFIG_INSTALL= | |
4868 | CONFIG_UNINSTALL= | |
4869 | ||
4870 | # If we haven't got the data from the intl directory, | |
4871 | # assume NLS is disabled. | |
4872 | USE_NLS=no | |
4873 | LIBINTL= | |
4874 | LIBINTL_DEP= | |
4875 | INCINTL= | |
4876 | XGETTEXT= | |
4877 | GMSGFMT= | |
4878 | POSUB= | |
4879 | ||
4880 | if test -f ../intl/config.intl; then | |
4881 | . ../intl/config.intl | |
4882 | fi | |
81ecdfbb RW |
4883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4884 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4885 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4887 | $as_echo "no" >&6; } | |
783e057b | 4888 | else |
81ecdfbb RW |
4889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4890 | $as_echo "yes" >&6; } | |
783e057b | 4891 | |
81ecdfbb | 4892 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4893 | |
4894 | ||
81ecdfbb RW |
4895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4896 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4897 | # Look for .po and .gmo files in the source directory. |
4898 | CATALOGS= | |
4899 | XLINGUAS= | |
4900 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4901 | # If there aren't any .gmo files the shell will give us the | |
4902 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4903 | # weeded out. | |
4904 | case "$cat" in *\**) | |
4905 | continue;; | |
4906 | esac | |
4907 | # The quadruple backslash is collapsed to a double backslash | |
4908 | # by the backticks, then collapsed again by the double quotes, | |
4909 | # leaving us with one backslash in the sed expression (right | |
4910 | # before the dot that mustn't act as a wildcard). | |
4911 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
4912 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4913 | # The user is allowed to set LINGUAS to a list of languages to | |
4914 | # install catalogs for. If it's empty that means "all of them." | |
4915 | if test "x$LINGUAS" = x; then | |
4916 | CATALOGS="$CATALOGS $cat" | |
4917 | XLINGUAS="$XLINGUAS $lang" | |
4918 | else | |
4919 | case "$LINGUAS" in *$lang*) | |
4920 | CATALOGS="$CATALOGS $cat" | |
4921 | XLINGUAS="$XLINGUAS $lang" | |
4922 | ;; | |
4923 | esac | |
4924 | fi | |
4925 | done | |
4926 | LINGUAS="$XLINGUAS" | |
81ecdfbb RW |
4927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
4928 | $as_echo "$LINGUAS" >&6; } | |
783e057b DJ |
4929 | |
4930 | ||
4931 | DATADIRNAME=share | |
4932 | ||
4933 | INSTOBJEXT=.mo | |
4934 | ||
4935 | GENCAT=gencat | |
4936 | ||
4937 | CATOBJEXT=.gmo | |
4938 | ||
4939 | fi | |
4940 | ||
4941 | localedir='${datadir}/locale' | |
4942 | ||
4943 | ||
4944 | if test x"$USE_NLS" = xyes; then | |
4945 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4946 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4947 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4948 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
4949 | fi | |
4950 | ||
4951 | ||
f434ba03 PA |
4952 | |
4953 | ||
4954 | ||
4955 | LIBC_FATAL_STDERR_=1 | |
4956 | export LIBC_FATAL_STDERR_ | |
4957 | ||
4958 | ||
4959 | ||
4960 | ||
4961 | ||
4962 | for ac_header in $gl_header_list | |
4963 | do : | |
4964 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4965 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
4966 | eval as_val=\$$as_ac_Header | |
4967 | if test "x$as_val" = x""yes; then : | |
4968 | cat >>confdefs.h <<_ACEOF | |
4969 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4970 | _ACEOF | |
4971 | ||
4972 | fi | |
4973 | ||
4974 | done | |
4975 | ||
4976 | ||
4977 | ||
4978 | ||
4979 | ||
4980 | ||
4981 | ||
4982 | ||
4983 | ||
4984 | for ac_func in $gl_func_list | |
4985 | do : | |
4986 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
4987 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
4988 | eval as_val=\$$as_ac_var | |
4989 | if test "x$as_val" = x""yes; then : | |
4990 | cat >>confdefs.h <<_ACEOF | |
4991 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
4992 | _ACEOF | |
4993 | ||
4994 | fi | |
4995 | done | |
4996 | ||
4997 | ||
4998 | ||
4999 | ||
5000 | ||
5001 | ||
5002 | GNULIB_MEMCHR=0; | |
5003 | GNULIB_MEMMEM=0; | |
5004 | GNULIB_MEMPCPY=0; | |
5005 | GNULIB_MEMRCHR=0; | |
5006 | GNULIB_RAWMEMCHR=0; | |
5007 | GNULIB_STPCPY=0; | |
5008 | GNULIB_STPNCPY=0; | |
5009 | GNULIB_STRCHRNUL=0; | |
5010 | GNULIB_STRDUP=0; | |
5011 | GNULIB_STRNCAT=0; | |
5012 | GNULIB_STRNDUP=0; | |
5013 | GNULIB_STRNLEN=0; | |
5014 | GNULIB_STRPBRK=0; | |
5015 | GNULIB_STRSEP=0; | |
5016 | GNULIB_STRSTR=0; | |
5017 | GNULIB_STRCASESTR=0; | |
5018 | GNULIB_STRTOK_R=0; | |
5019 | GNULIB_MBSLEN=0; | |
5020 | GNULIB_MBSNLEN=0; | |
5021 | GNULIB_MBSCHR=0; | |
5022 | GNULIB_MBSRCHR=0; | |
5023 | GNULIB_MBSSTR=0; | |
5024 | GNULIB_MBSCASECMP=0; | |
5025 | GNULIB_MBSNCASECMP=0; | |
5026 | GNULIB_MBSPCASECMP=0; | |
5027 | GNULIB_MBSCASESTR=0; | |
5028 | GNULIB_MBSCSPN=0; | |
5029 | GNULIB_MBSPBRK=0; | |
5030 | GNULIB_MBSSPN=0; | |
5031 | GNULIB_MBSSEP=0; | |
5032 | GNULIB_MBSTOK_R=0; | |
5033 | GNULIB_STRERROR=0; | |
5034 | GNULIB_STRSIGNAL=0; | |
5035 | GNULIB_STRVERSCMP=0; | |
5036 | HAVE_MBSLEN=0; | |
5037 | HAVE_MEMCHR=1; | |
5038 | HAVE_DECL_MEMMEM=1; | |
5039 | HAVE_MEMPCPY=1; | |
5040 | HAVE_DECL_MEMRCHR=1; | |
5041 | HAVE_RAWMEMCHR=1; | |
5042 | HAVE_STPCPY=1; | |
5043 | HAVE_STPNCPY=1; | |
5044 | HAVE_STRCHRNUL=1; | |
5045 | HAVE_DECL_STRDUP=1; | |
5046 | HAVE_DECL_STRNDUP=1; | |
5047 | HAVE_DECL_STRNLEN=1; | |
5048 | HAVE_STRPBRK=1; | |
5049 | HAVE_STRSEP=1; | |
5050 | HAVE_STRCASESTR=1; | |
5051 | HAVE_DECL_STRTOK_R=1; | |
5052 | HAVE_DECL_STRSIGNAL=1; | |
5053 | HAVE_STRVERSCMP=1; | |
5054 | REPLACE_MEMCHR=0; | |
783e057b | 5055 | REPLACE_MEMMEM=0; |
f434ba03 PA |
5056 | REPLACE_STPNCPY=0; |
5057 | REPLACE_STRDUP=0; | |
783e057b | 5058 | REPLACE_STRSTR=0; |
f434ba03 PA |
5059 | REPLACE_STRCASESTR=0; |
5060 | REPLACE_STRERROR=0; | |
5061 | REPLACE_STRNCAT=0; | |
5062 | REPLACE_STRNDUP=0; | |
5063 | REPLACE_STRNLEN=0; | |
5064 | REPLACE_STRSIGNAL=0; | |
5065 | REPLACE_STRTOK_R=0; | |
5066 | UNDEFINE_STRTOK_R=0; | |
5067 | ||
5068 | ||
5069 | ||
5070 | ||
5071 | ||
5072 | ||
5073 | ||
5074 | ||
5075 | ||
5076 | ||
5077 | ||
5078 | ||
5079 | ||
5080 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it | |
5081 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | |
5082 | # irrelevant for anonymous mappings. | |
5083 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
5084 | if test "x$ac_cv_func_mmap" = x""yes; then : | |
5085 | gl_have_mmap=yes | |
5086 | else | |
5087 | gl_have_mmap=no | |
5088 | fi | |
5089 | ||
5090 | ||
5091 | # Try to allow MAP_ANONYMOUS. | |
5092 | gl_have_mmap_anonymous=no | |
5093 | if test $gl_have_mmap = yes; then | |
5094 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 | |
5095 | $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } | |
5096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5097 | /* end confdefs.h. */ | |
5098 | ||
5099 | #include <sys/mman.h> | |
5100 | #ifdef MAP_ANONYMOUS | |
5101 | I cant identify this map. | |
5102 | #endif | |
5103 | ||
5104 | _ACEOF | |
5105 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5106 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5107 | gl_have_mmap_anonymous=yes | |
5108 | fi | |
5109 | rm -f conftest* | |
5110 | ||
5111 | if test $gl_have_mmap_anonymous != yes; then | |
5112 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5113 | /* end confdefs.h. */ | |
5114 | ||
5115 | #include <sys/mman.h> | |
5116 | #ifdef MAP_ANON | |
5117 | I cant identify this map. | |
5118 | #endif | |
5119 | ||
5120 | _ACEOF | |
5121 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5122 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5123 | ||
5124 | $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h | |
5125 | ||
5126 | gl_have_mmap_anonymous=yes | |
5127 | fi | |
5128 | rm -f conftest* | |
5129 | ||
5130 | fi | |
5131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 | |
5132 | $as_echo "$gl_have_mmap_anonymous" >&6; } | |
5133 | if test $gl_have_mmap_anonymous = yes; then | |
5134 | ||
5135 | $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h | |
5136 | ||
5137 | fi | |
5138 | fi | |
5139 | ||
5140 | ||
5141 | : | |
5142 | ||
5143 | ||
5144 | ||
5145 | ||
5146 | ||
5147 | ||
5148 | : | |
5149 | ||
5150 | ||
5151 | ||
5152 | ||
5153 | ||
5154 | ||
5155 | ||
5156 | ||
5157 | : | |
5158 | ||
5159 | ||
5160 | ||
5161 | ||
5162 | ||
5163 | if test $ac_cv_func_memchr = yes; then | |
5164 | # Detect platform-specific bugs in some versions of glibc: | |
5165 | # memchr should not dereference anything with length 0 | |
5166 | # http://bugzilla.redhat.com/499689 | |
5167 | # memchr should not dereference overestimated length after a match | |
5168 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | |
5169 | # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 | |
5170 | # Assume that memchr works on platforms that lack mprotect. | |
5171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 | |
5172 | $as_echo_n "checking whether memchr works... " >&6; } | |
5173 | if test "${gl_cv_func_memchr_works+set}" = set; then : | |
5174 | $as_echo_n "(cached) " >&6 | |
5175 | else | |
5176 | if test "$cross_compiling" = yes; then : | |
5177 | gl_cv_func_memchr_works="guessing no" | |
5178 | else | |
5179 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5180 | /* end confdefs.h. */ | |
5181 | ||
5182 | #include <string.h> | |
5183 | #if HAVE_SYS_MMAN_H | |
5184 | # include <fcntl.h> | |
5185 | # include <unistd.h> | |
5186 | # include <sys/types.h> | |
5187 | # include <sys/mman.h> | |
5188 | # ifndef MAP_FILE | |
5189 | # define MAP_FILE 0 | |
5190 | # endif | |
5191 | #endif | |
5192 | ||
5193 | int | |
5194 | main () | |
5195 | { | |
5196 | ||
5197 | char *fence = NULL; | |
5198 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | |
5199 | # if HAVE_MAP_ANONYMOUS | |
5200 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | |
5201 | const int fd = -1; | |
5202 | # else /* !HAVE_MAP_ANONYMOUS */ | |
5203 | const int flags = MAP_FILE | MAP_PRIVATE; | |
5204 | int fd = open ("/dev/zero", O_RDONLY, 0666); | |
5205 | if (fd >= 0) | |
5206 | # endif | |
5207 | { | |
5208 | int pagesize = getpagesize (); | |
5209 | char *two_pages = | |
5210 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | |
5211 | flags, fd, 0); | |
5212 | if (two_pages != (char *)(-1) | |
5213 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | |
5214 | fence = two_pages + pagesize; | |
5215 | } | |
5216 | #endif | |
5217 | if (fence) | |
5218 | { | |
5219 | if (memchr (fence, 0, 0)) | |
5220 | return 1; | |
5221 | strcpy (fence - 9, "12345678"); | |
5222 | if (memchr (fence - 9, 0, 79) != fence - 1) | |
5223 | return 2; | |
5224 | } | |
5225 | return 0; | |
5226 | ||
5227 | ; | |
5228 | return 0; | |
5229 | } | |
5230 | _ACEOF | |
5231 | if ac_fn_c_try_run "$LINENO"; then : | |
5232 | gl_cv_func_memchr_works=yes | |
5233 | else | |
5234 | gl_cv_func_memchr_works=no | |
5235 | fi | |
5236 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5237 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5238 | fi | |
5239 | ||
5240 | fi | |
5241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 | |
5242 | $as_echo "$gl_cv_func_memchr_works" >&6; } | |
5243 | if test "$gl_cv_func_memchr_works" != yes; then | |
5244 | REPLACE_MEMCHR=1 | |
5245 | fi | |
5246 | else | |
5247 | HAVE_MEMCHR=0 | |
5248 | fi | |
5249 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then | |
5250 | ||
5251 | ||
5252 | ||
5253 | ||
5254 | ||
5255 | ||
5256 | ||
5257 | ||
5258 | gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" | |
5259 | ||
5260 | ||
5261 | for ac_header in bp-sym.h | |
5262 | do : | |
5263 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
5264 | if test "x$ac_cv_header_bp_sym_h" = x""yes; then : | |
5265 | cat >>confdefs.h <<_ACEOF | |
5266 | #define HAVE_BP_SYM_H 1 | |
5267 | _ACEOF | |
5268 | ||
5269 | fi | |
5270 | ||
5271 | done | |
5272 | ||
5273 | ||
5274 | fi | |
783e057b DJ |
5275 | |
5276 | ||
81ecdfbb RW |
5277 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
5278 | if test "x$ac_cv_have_decl_memmem" = x""yes; then : | |
5279 | ac_have_decl=1 | |
783e057b | 5280 | else |
81ecdfbb | 5281 | ac_have_decl=0 |
783e057b | 5282 | fi |
783e057b DJ |
5283 | |
5284 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 5285 | #define HAVE_DECL_MEMMEM $ac_have_decl |
783e057b DJ |
5286 | _ACEOF |
5287 | ||
5288 | ||
783e057b DJ |
5289 | |
5290 | ||
5291 | ||
5292 | ||
5293 | ||
5294 | ||
5295 | ||
5296 | ||
783e057b | 5297 | |
783e057b | 5298 | |
783e057b | 5299 | |
f434ba03 | 5300 | |
81ecdfbb RW |
5301 | for ac_func in memmem |
5302 | do : | |
5303 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
5304 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 5305 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5306 | #define HAVE_MEMMEM 1 |
783e057b DJ |
5307 | _ACEOF |
5308 | ||
5309 | else | |
5310 | ||
5311 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
5312 | ||
5313 | fi | |
5314 | done | |
5315 | ||
5316 | ||
5317 | ||
5318 | : | |
5319 | ||
5320 | ||
5321 | ||
5322 | ||
5323 | ||
5324 | if test $ac_cv_have_decl_memmem = no; then | |
5325 | HAVE_DECL_MEMMEM=0 | |
5326 | fi | |
5327 | : | |
5328 | ||
5329 | ||
f434ba03 PA |
5330 | gl_cv_c_multiarch=no |
5331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5332 | /* end confdefs.h. */ | |
5333 | #ifndef __APPLE_CC__ | |
5334 | not a universal capable compiler | |
5335 | #endif | |
5336 | typedef int dummy; | |
5337 | ||
5338 | _ACEOF | |
5339 | if ac_fn_c_try_compile "$LINENO"; then : | |
5340 | ||
5341 | arch= | |
5342 | prev= | |
5343 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
5344 | if test -n "$prev"; then | |
5345 | case $word in | |
5346 | i?86 | x86_64 | ppc | ppc64) | |
5347 | if test -z "$arch" || test "$arch" = "$word"; then | |
5348 | arch="$word" | |
5349 | else | |
5350 | gl_cv_c_multiarch=yes | |
5351 | fi | |
5352 | ;; | |
5353 | esac | |
5354 | prev= | |
5355 | else | |
5356 | if test "x$word" = "x-arch"; then | |
5357 | prev=arch | |
5358 | fi | |
5359 | fi | |
5360 | done | |
5361 | ||
5362 | fi | |
5363 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5364 | if test $gl_cv_c_multiarch = yes; then | |
5365 | ||
5366 | $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
5367 | ||
5368 | APPLE_UNIVERSAL_BUILD=1 | |
5369 | else | |
5370 | APPLE_UNIVERSAL_BUILD=0 | |
5371 | fi | |
5372 | ||
5373 | ||
5374 | ||
5375 | REPLACE_NULL=0; | |
5376 | HAVE_WCHAR_T=1; | |
5377 | STDDEF_H=''; | |
5378 | ||
5379 | ||
5380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
5381 | $as_echo_n "checking for wchar_t... " >&6; } | |
5382 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
5383 | $as_echo_n "(cached) " >&6 | |
5384 | else | |
5385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5386 | /* end confdefs.h. */ | |
5387 | #include <stddef.h> | |
5388 | wchar_t foo = (wchar_t)'\0'; | |
5389 | int | |
5390 | main () | |
5391 | { | |
5392 | ||
5393 | ; | |
5394 | return 0; | |
5395 | } | |
5396 | _ACEOF | |
5397 | if ac_fn_c_try_compile "$LINENO"; then : | |
5398 | gt_cv_c_wchar_t=yes | |
5399 | else | |
5400 | gt_cv_c_wchar_t=no | |
5401 | fi | |
5402 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5403 | fi | |
5404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
5405 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
5406 | if test $gt_cv_c_wchar_t = yes; then | |
5407 | ||
5408 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
5409 | ||
5410 | fi | |
5411 | ||
5412 | ||
5413 | ||
5414 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
5415 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
5416 | if test "${gl_cv_have_include_next+set}" = set; then : | |
5417 | $as_echo_n "(cached) " >&6 | |
5418 | else | |
5419 | rm -rf conftestd1a conftestd1b conftestd2 | |
5420 | mkdir conftestd1a conftestd1b conftestd2 | |
5421 | cat <<EOF > conftestd1a/conftest.h | |
5422 | #define DEFINED_IN_CONFTESTD1 | |
5423 | #include_next <conftest.h> | |
5424 | #ifdef DEFINED_IN_CONFTESTD2 | |
5425 | int foo; | |
5426 | #else | |
5427 | #error "include_next doesn't work" | |
5428 | #endif | |
5429 | EOF | |
5430 | cat <<EOF > conftestd1b/conftest.h | |
5431 | #define DEFINED_IN_CONFTESTD1 | |
5432 | #include <stdio.h> | |
5433 | #include_next <conftest.h> | |
5434 | #ifdef DEFINED_IN_CONFTESTD2 | |
5435 | int foo; | |
5436 | #else | |
5437 | #error "include_next doesn't work" | |
5438 | #endif | |
5439 | EOF | |
5440 | cat <<EOF > conftestd2/conftest.h | |
5441 | #ifndef DEFINED_IN_CONFTESTD1 | |
5442 | #error "include_next test doesn't work" | |
5443 | #endif | |
5444 | #define DEFINED_IN_CONFTESTD2 | |
5445 | EOF | |
5446 | gl_save_CPPFLAGS="$CPPFLAGS" | |
5447 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
5448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5449 | /* end confdefs.h. */ | |
5450 | #include <conftest.h> | |
5451 | _ACEOF | |
5452 | if ac_fn_c_try_compile "$LINENO"; then : | |
5453 | gl_cv_have_include_next=yes | |
5454 | else | |
5455 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
5456 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5457 | /* end confdefs.h. */ | |
5458 | #include <conftest.h> | |
5459 | _ACEOF | |
5460 | if ac_fn_c_try_compile "$LINENO"; then : | |
5461 | gl_cv_have_include_next=buggy | |
5462 | else | |
5463 | gl_cv_have_include_next=no | |
5464 | fi | |
5465 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5466 | ||
5467 | fi | |
5468 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5469 | CPPFLAGS="$gl_save_CPPFLAGS" | |
5470 | rm -rf conftestd1a conftestd1b conftestd2 | |
5471 | ||
5472 | fi | |
5473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
5474 | $as_echo "$gl_cv_have_include_next" >&6; } | |
5475 | PRAGMA_SYSTEM_HEADER= | |
5476 | if test $gl_cv_have_include_next = yes; then | |
5477 | INCLUDE_NEXT=include_next | |
5478 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5479 | if test -n "$GCC"; then | |
5480 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
5481 | fi | |
5482 | else | |
5483 | if test $gl_cv_have_include_next = buggy; then | |
5484 | INCLUDE_NEXT=include | |
5485 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5486 | else | |
5487 | INCLUDE_NEXT=include | |
5488 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
5489 | fi | |
5490 | fi | |
5491 | ||
5492 | ||
5493 | ||
5494 | ||
5495 | ||
5496 | ||
5497 | ||
5498 | ||
5499 | ||
5500 | ||
81ecdfbb RW |
5501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
5502 | $as_echo_n "checking for long long int... " >&6; } | |
5503 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
5504 | $as_echo_n "(cached) " >&6 | |
783e057b | 5505 | else |
81ecdfbb | 5506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5507 | /* end confdefs.h. */ |
81ecdfbb RW |
5508 | |
5509 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5510 | implementations with broken preprocessors. Perhaps this can |
5511 | be revisited in 2012. In the meantime, code should not expect | |
5512 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5513 | /* Test literals. */ |
5514 | long long int ll = 9223372036854775807ll; | |
5515 | long long int nll = -9223372036854775807LL; | |
5516 | unsigned long long int ull = 18446744073709551615ULL; | |
5517 | /* Test constant expressions. */ | |
5518 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5519 | ? 1 : -1)]; |
783e057b | 5520 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5521 | ? 1 : -1)]; |
783e057b DJ |
5522 | int i = 63; |
5523 | int | |
5524 | main () | |
5525 | { | |
5526 | /* Test availability of runtime routines for shift and division. */ | |
5527 | long long int llmax = 9223372036854775807ll; | |
5528 | unsigned long long int ullmax = 18446744073709551615ull; | |
5529 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5530 | | (llmax / ll) | (llmax % ll) |
5531 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5532 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5533 | ; |
5534 | return 0; | |
5535 | } | |
5536 | ||
5537 | _ACEOF | |
81ecdfbb | 5538 | if ac_fn_c_try_link "$LINENO"; then : |
f434ba03 | 5539 | if test "$cross_compiling" = yes; then : |
783e057b DJ |
5540 | ac_cv_type_long_long_int=yes |
5541 | else | |
81ecdfbb | 5542 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5543 | /* end confdefs.h. */ |
5544 | #include <limits.h> | |
f434ba03 PA |
5545 | #ifndef LLONG_MAX |
5546 | # define HALF \ | |
5547 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
5548 | # define LLONG_MAX (HALF - 1 + HALF) | |
5549 | #endif | |
783e057b DJ |
5550 | int |
5551 | main () | |
5552 | { | |
5553 | long long int n = 1; | |
f434ba03 PA |
5554 | int i; |
5555 | for (i = 0; ; i++) | |
5556 | { | |
5557 | long long int m = n << i; | |
5558 | if (m >> i != n) | |
5559 | return 1; | |
5560 | if (LLONG_MAX / 2 < m) | |
5561 | break; | |
5562 | } | |
5563 | return 0; | |
783e057b DJ |
5564 | ; |
5565 | return 0; | |
5566 | } | |
5567 | _ACEOF | |
81ecdfbb | 5568 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
5569 | ac_cv_type_long_long_int=yes |
5570 | else | |
81ecdfbb | 5571 | ac_cv_type_long_long_int=no |
783e057b | 5572 | fi |
81ecdfbb RW |
5573 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5574 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 5575 | fi |
783e057b | 5576 | |
81ecdfbb RW |
5577 | else |
5578 | ac_cv_type_long_long_int=no | |
783e057b | 5579 | fi |
81ecdfbb RW |
5580 | rm -f core conftest.err conftest.$ac_objext \ |
5581 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5582 | fi |
81ecdfbb RW |
5583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
5584 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
783e057b DJ |
5585 | if test $ac_cv_type_long_long_int = yes; then |
5586 | ||
81ecdfbb | 5587 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5588 | |
5589 | fi | |
5590 | ||
5591 | ||
81ecdfbb RW |
5592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
5593 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
5594 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
5595 | $as_echo_n "(cached) " >&6 | |
783e057b | 5596 | else |
81ecdfbb | 5597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5598 | /* end confdefs.h. */ |
81ecdfbb RW |
5599 | |
5600 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5601 | implementations with broken preprocessors. Perhaps this can |
5602 | be revisited in 2012. In the meantime, code should not expect | |
5603 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5604 | /* Test literals. */ |
5605 | long long int ll = 9223372036854775807ll; | |
5606 | long long int nll = -9223372036854775807LL; | |
5607 | unsigned long long int ull = 18446744073709551615ULL; | |
5608 | /* Test constant expressions. */ | |
5609 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5610 | ? 1 : -1)]; |
783e057b | 5611 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5612 | ? 1 : -1)]; |
783e057b DJ |
5613 | int i = 63; |
5614 | int | |
5615 | main () | |
5616 | { | |
5617 | /* Test availability of runtime routines for shift and division. */ | |
5618 | long long int llmax = 9223372036854775807ll; | |
5619 | unsigned long long int ullmax = 18446744073709551615ull; | |
5620 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5621 | | (llmax / ll) | (llmax % ll) |
5622 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5623 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5624 | ; |
5625 | return 0; | |
5626 | } | |
5627 | ||
5628 | _ACEOF | |
81ecdfbb | 5629 | if ac_fn_c_try_link "$LINENO"; then : |
783e057b DJ |
5630 | ac_cv_type_unsigned_long_long_int=yes |
5631 | else | |
81ecdfbb | 5632 | ac_cv_type_unsigned_long_long_int=no |
783e057b | 5633 | fi |
81ecdfbb RW |
5634 | rm -f core conftest.err conftest.$ac_objext \ |
5635 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5636 | fi |
81ecdfbb RW |
5637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 |
5638 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
783e057b DJ |
5639 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
5640 | ||
81ecdfbb | 5641 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5642 | |
5643 | fi | |
5644 | ||
5645 | ||
5646 | ||
783e057b DJ |
5647 | |
5648 | ||
5649 | ||
5650 | ||
5651 | ||
5652 | ||
5653 | ||
5654 | ||
81ecdfbb RW |
5655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
5656 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
5657 | if test "${ac_cv_c_restrict+set}" = set; then : | |
5658 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
5659 | else |
5660 | ac_cv_c_restrict=no | |
5661 | # The order here caters to the fact that C++ does not require restrict. | |
5662 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
81ecdfbb | 5663 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5664 | /* end confdefs.h. */ |
5665 | typedef int * int_ptr; | |
5666 | int foo (int_ptr $ac_kw ip) { | |
5667 | return ip[0]; | |
5668 | } | |
5669 | int | |
5670 | main () | |
5671 | { | |
5672 | int s[1]; | |
5673 | int * $ac_kw t = s; | |
5674 | t[0] = 0; | |
5675 | return foo(t) | |
5676 | ; | |
5677 | return 0; | |
5678 | } | |
5679 | _ACEOF | |
81ecdfbb | 5680 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5681 | ac_cv_c_restrict=$ac_kw |
783e057b | 5682 | fi |
81ecdfbb | 5683 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5684 | test "$ac_cv_c_restrict" != no && break |
5685 | done | |
5686 | ||
5687 | fi | |
81ecdfbb RW |
5688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
5689 | $as_echo "$ac_cv_c_restrict" >&6; } | |
783e057b DJ |
5690 | |
5691 | case $ac_cv_c_restrict in | |
5692 | restrict) ;; | |
81ecdfbb | 5693 | no) $as_echo "#define restrict /**/" >>confdefs.h |
783e057b DJ |
5694 | ;; |
5695 | *) cat >>confdefs.h <<_ACEOF | |
5696 | #define restrict $ac_cv_c_restrict | |
5697 | _ACEOF | |
5698 | ;; | |
5699 | esac | |
5700 | ||
5701 | ||
5702 | ||
5703 | ||
5704 | ||
5705 | ||
5706 | ||
5707 | ||
5708 | ||
5709 | ||
5710 | ||
5711 | ||
f434ba03 | 5712 | |
783e057b DJ |
5713 | : |
5714 | ||
5715 | ||
5716 | ||
5717 | ||
5718 | ||
5719 | ||
5720 | ||
f434ba03 PA |
5721 | if test $gl_cv_have_include_next = yes; then |
5722 | gl_cv_next_string_h='<'string.h'>' | |
5723 | else | |
5724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 | |
5725 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
5726 | if test "${gl_cv_next_string_h+set}" = set; then : | |
5727 | $as_echo_n "(cached) " >&6 | |
5728 | else | |
5729 | ||
5730 | if test $ac_cv_header_string_h = yes; then | |
5731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5732 | /* end confdefs.h. */ | |
5733 | #include <string.h> | |
5734 | ||
5735 | _ACEOF | |
5736 | case "$host_os" in | |
5737 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
5738 | *) gl_absname_cpp="$ac_cpp" ;; | |
5739 | esac | |
5740 | gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
5741 | sed -n '\#/string.h#{ | |
5742 | s#.*"\(.*/string.h\)".*#\1# | |
5743 | s#^/[^/]#//&# | |
5744 | p | |
5745 | q | |
5746 | }'`'"' | |
5747 | else | |
5748 | gl_cv_next_string_h='<'string.h'>' | |
5749 | fi | |
5750 | ||
5751 | fi | |
5752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 | |
5753 | $as_echo "$gl_cv_next_string_h" >&6; } | |
5754 | fi | |
5755 | NEXT_STRING_H=$gl_cv_next_string_h | |
5756 | ||
5757 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
5758 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5759 | gl_next_as_first_directive='<'string.h'>' | |
5760 | else | |
5761 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5762 | gl_next_as_first_directive=$gl_cv_next_string_h | |
5763 | fi | |
5764 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive | |
5765 | ||
5766 | ||
5767 | ||
5768 | ||
5769 | ||
5770 | for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do | |
5771 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
5772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
5773 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
5774 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5775 | $as_echo_n "(cached) " >&6 | |
5776 | else | |
5777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5778 | /* end confdefs.h. */ | |
5779 | #include <string.h> | |
5780 | ||
5781 | int | |
5782 | main () | |
5783 | { | |
5784 | #undef $gl_func | |
5785 | (void) $gl_func; | |
5786 | ; | |
5787 | return 0; | |
5788 | } | |
5789 | _ACEOF | |
5790 | if ac_fn_c_try_compile "$LINENO"; then : | |
5791 | eval "$as_gl_Symbol=yes" | |
5792 | else | |
5793 | eval "$as_gl_Symbol=no" | |
5794 | fi | |
5795 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5796 | fi | |
5797 | eval ac_res=\$$as_gl_Symbol | |
5798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5799 | $as_echo "$ac_res" >&6; } | |
5800 | eval as_val=\$$as_gl_Symbol | |
5801 | if test "x$as_val" = x""yes; then : | |
5802 | cat >>confdefs.h <<_ACEOF | |
5803 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
5804 | _ACEOF | |
5805 | ||
5806 | eval ac_cv_have_decl_$gl_func=yes | |
5807 | fi | |
5808 | done | |
5809 | ||
5810 | ||
5811 | ||
5812 | GNULIB_BTOWC=0; | |
5813 | GNULIB_WCTOB=0; | |
5814 | GNULIB_MBSINIT=0; | |
5815 | GNULIB_MBRTOWC=0; | |
5816 | GNULIB_MBRLEN=0; | |
5817 | GNULIB_MBSRTOWCS=0; | |
5818 | GNULIB_MBSNRTOWCS=0; | |
5819 | GNULIB_WCRTOMB=0; | |
5820 | GNULIB_WCSRTOMBS=0; | |
5821 | GNULIB_WCSNRTOMBS=0; | |
5822 | GNULIB_WCWIDTH=0; | |
5823 | HAVE_BTOWC=1; | |
5824 | HAVE_MBSINIT=1; | |
5825 | HAVE_MBRTOWC=1; | |
5826 | HAVE_MBRLEN=1; | |
5827 | HAVE_MBSRTOWCS=1; | |
5828 | HAVE_MBSNRTOWCS=1; | |
5829 | HAVE_WCRTOMB=1; | |
5830 | HAVE_WCSRTOMBS=1; | |
5831 | HAVE_WCSNRTOMBS=1; | |
5832 | HAVE_DECL_WCTOB=1; | |
5833 | HAVE_DECL_WCWIDTH=1; | |
5834 | REPLACE_MBSTATE_T=0; | |
5835 | REPLACE_BTOWC=0; | |
5836 | REPLACE_WCTOB=0; | |
5837 | REPLACE_MBSINIT=0; | |
5838 | REPLACE_MBRTOWC=0; | |
5839 | REPLACE_MBRLEN=0; | |
5840 | REPLACE_MBSRTOWCS=0; | |
5841 | REPLACE_MBSNRTOWCS=0; | |
5842 | REPLACE_WCRTOMB=0; | |
5843 | REPLACE_WCSRTOMBS=0; | |
5844 | REPLACE_WCSNRTOMBS=0; | |
5845 | REPLACE_WCWIDTH=0; | |
5846 | ||
5847 | ||
5848 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 | |
5849 | $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } | |
5850 | if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : | |
81ecdfbb | 5851 | $as_echo_n "(cached) " >&6 |
783e057b | 5852 | else |
f434ba03 PA |
5853 | gl_cv_header_wchar_h_correct_inline=yes |
5854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5855 | /* end confdefs.h. */ | |
783e057b | 5856 | |
f434ba03 PA |
5857 | #define wcstod renamed_wcstod |
5858 | #include <wchar.h> | |
5859 | extern int zero (void); | |
5860 | int main () { return zero(); } | |
5861 | ||
5862 | _ACEOF | |
5863 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
5864 | (eval $ac_compile) 2>&5 | |
5865 | ac_status=$? | |
5866 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5867 | test $ac_status = 0; }; then | |
5868 | mv conftest.$ac_objext conftest1.$ac_objext | |
5869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b | 5870 | /* end confdefs.h. */ |
f434ba03 PA |
5871 | |
5872 | #define wcstod renamed_wcstod | |
5873 | #include <wchar.h> | |
5874 | int zero (void) { return 0; } | |
783e057b DJ |
5875 | |
5876 | _ACEOF | |
f434ba03 PA |
5877 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
5878 | (eval $ac_compile) 2>&5 | |
5879 | ac_status=$? | |
5880 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5881 | test $ac_status = 0; }; then | |
5882 | mv conftest.$ac_objext conftest2.$ac_objext | |
5883 | if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then | |
5884 | : | |
5885 | else | |
5886 | gl_cv_header_wchar_h_correct_inline=no | |
5887 | fi | |
5888 | fi | |
5889 | fi | |
5890 | rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext | |
783e057b DJ |
5891 | |
5892 | fi | |
f434ba03 PA |
5893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 |
5894 | $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } | |
5895 | if test $gl_cv_header_wchar_h_correct_inline = no; then | |
5896 | as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). | |
5897 | This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in | |
5898 | C99 mode. You have four options: | |
5899 | - Add the flag -fgnu89-inline to CC and reconfigure, or | |
5900 | - Fix your include files, using parts of | |
5901 | <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or | |
5902 | - Use a gcc version older than 4.3, or | |
5903 | - Don't use the flags -std=c99 or -std=gnu99. | |
5904 | Configuration aborted." "$LINENO" 5 | |
5905 | fi | |
783e057b DJ |
5906 | |
5907 | ||
f434ba03 PA |
5908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 |
5909 | $as_echo_n "checking for wint_t... " >&6; } | |
5910 | if test "${gt_cv_c_wint_t+set}" = set; then : | |
5911 | $as_echo_n "(cached) " >&6 | |
5912 | else | |
5913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5914 | /* end confdefs.h. */ | |
783e057b | 5915 | |
f434ba03 PA |
5916 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
5917 | <wchar.h>. | |
5918 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | |
5919 | before <wchar.h>. */ | |
5920 | #include <stddef.h> | |
5921 | #include <stdio.h> | |
5922 | #include <time.h> | |
5923 | #include <wchar.h> | |
5924 | wint_t foo = (wchar_t)'\0'; | |
5925 | int | |
5926 | main () | |
5927 | { | |
783e057b | 5928 | |
f434ba03 PA |
5929 | ; |
5930 | return 0; | |
5931 | } | |
5932 | _ACEOF | |
5933 | if ac_fn_c_try_compile "$LINENO"; then : | |
5934 | gt_cv_c_wint_t=yes | |
5935 | else | |
5936 | gt_cv_c_wint_t=no | |
5937 | fi | |
5938 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5939 | fi | |
5940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 | |
5941 | $as_echo "$gt_cv_c_wint_t" >&6; } | |
5942 | if test $gt_cv_c_wint_t = yes; then | |
783e057b | 5943 | |
f434ba03 | 5944 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h |
783e057b | 5945 | |
f434ba03 | 5946 | fi |
783e057b DJ |
5947 | |
5948 | ||
81ecdfbb | 5949 | if false; then |
783e057b DJ |
5950 | GL_COND_LIBTOOL_TRUE= |
5951 | GL_COND_LIBTOOL_FALSE='#' | |
5952 | else | |
5953 | GL_COND_LIBTOOL_TRUE='#' | |
5954 | GL_COND_LIBTOOL_FALSE= | |
5955 | fi | |
5956 | ||
5957 | gl_cond_libtool=false | |
5958 | gl_libdeps= | |
5959 | gl_ltlibdeps= | |
f434ba03 | 5960 | gl_m4_base='gnulib/m4' |
783e057b DJ |
5961 | |
5962 | ||
5963 | ||
783e057b DJ |
5964 | |
5965 | ||
5966 | ||
5967 | ||
5968 | ||
5969 | ||
f434ba03 PA |
5970 | gl_source_base='gnulib' |
5971 | # Code from module arg-nonnull: | |
5972 | # Code from module c++defs: | |
5973 | # Code from module extensions: | |
5974 | # Code from module include_next: | |
5975 | # Code from module memchr: | |
783e057b | 5976 | |
783e057b | 5977 | |
783e057b | 5978 | |
783e057b | 5979 | |
f434ba03 | 5980 | GNULIB_MEMCHR=1 |
783e057b | 5981 | |
783e057b | 5982 | |
783e057b | 5983 | |
f434ba03 | 5984 | $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h |
783e057b | 5985 | |
783e057b DJ |
5986 | |
5987 | ||
f434ba03 | 5988 | # Code from module memmem: |
783e057b DJ |
5989 | |
5990 | ||
f434ba03 PA |
5991 | if test $ac_cv_have_decl_memmem = yes; then |
5992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 | |
5993 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
5994 | if test "${gl_cv_func_memmem_works+set}" = set; then : | |
81ecdfbb | 5995 | $as_echo_n "(cached) " >&6 |
783e057b | 5996 | else |
81ecdfbb | 5997 | if test "$cross_compiling" = yes; then : |
f434ba03 | 5998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5999 | /* end confdefs.h. */ |
783e057b | 6000 | |
f434ba03 PA |
6001 | #include <features.h> |
6002 | #ifdef __GNU_LIBRARY__ | |
6003 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) | |
6004 | Lucky user | |
6005 | #endif | |
6006 | #endif | |
6007 | #ifdef __CYGWIN__ | |
6008 | #include <cygwin/version.h> | |
6009 | #if CYGWIN_VERSION_DLL_MAJOR >= 1007 | |
6010 | Lucky user | |
6011 | #endif | |
6012 | #endif | |
783e057b | 6013 | |
783e057b | 6014 | _ACEOF |
f434ba03 PA |
6015 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6016 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
6017 | gl_cv_func_memmem_works=yes | |
783e057b | 6018 | else |
f434ba03 | 6019 | gl_cv_func_memmem_works="guessing no" |
783e057b | 6020 | fi |
f434ba03 | 6021 | rm -f conftest* |
783e057b DJ |
6022 | |
6023 | ||
783e057b | 6024 | else |
81ecdfbb | 6025 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6026 | /* end confdefs.h. */ |
6027 | ||
f434ba03 | 6028 | #include <signal.h> /* for signal */ |
783e057b DJ |
6029 | #include <string.h> /* for memmem */ |
6030 | #include <stdlib.h> /* for malloc */ | |
6031 | #include <unistd.h> /* for alarm */ | |
6032 | ||
6033 | int | |
6034 | main () | |
6035 | { | |
6036 | size_t m = 1000000; | |
6037 | char *haystack = (char *) malloc (2 * m + 1); | |
6038 | char *needle = (char *) malloc (m + 1); | |
6039 | void *result = 0; | |
6040 | /* Failure to compile this test due to missing alarm is okay, | |
6041 | since all such platforms (mingw) also lack memmem. */ | |
f434ba03 | 6042 | signal (SIGALRM, SIG_DFL); |
783e057b DJ |
6043 | alarm (5); |
6044 | /* Check for quadratic performance. */ | |
6045 | if (haystack && needle) | |
6046 | { | |
f434ba03 PA |
6047 | memset (haystack, 'A', 2 * m); |
6048 | haystack[2 * m] = 'B'; | |
6049 | memset (needle, 'A', m); | |
6050 | needle[m] = 'B'; | |
6051 | result = memmem (haystack, 2 * m + 1, needle, m + 1); | |
783e057b DJ |
6052 | } |
6053 | /* Check for empty needle behavior. */ | |
6054 | return !result || !memmem ("a", 1, 0, 0); | |
6055 | ; | |
6056 | return 0; | |
6057 | } | |
6058 | _ACEOF | |
81ecdfbb | 6059 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
6060 | gl_cv_func_memmem_works=yes |
6061 | else | |
81ecdfbb | 6062 | gl_cv_func_memmem_works=no |
783e057b | 6063 | fi |
81ecdfbb RW |
6064 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6065 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 6066 | fi |
81ecdfbb | 6067 | |
f434ba03 | 6068 | |
783e057b | 6069 | fi |
81ecdfbb RW |
6070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5 |
6071 | $as_echo "$gl_cv_func_memmem_works" >&6; } | |
783e057b DJ |
6072 | if test "$gl_cv_func_memmem_works" != yes; then |
6073 | REPLACE_MEMMEM=1 | |
6074 | ||
6075 | ||
6076 | ||
6077 | ||
6078 | ||
6079 | ||
6080 | ||
f434ba03 | 6081 | |
783e057b DJ |
6082 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" |
6083 | ||
6084 | fi | |
6085 | fi | |
6086 | ||
f434ba03 PA |
6087 | # Code from module memmem-simple: |
6088 | ||
783e057b DJ |
6089 | |
6090 | ||
6091 | ||
6092 | ||
6093 | ||
6094 | ||
6095 | ||
6096 | ||
6097 | ||
6098 | ||
6099 | ||
81ecdfbb RW |
6100 | for ac_func in memmem |
6101 | do : | |
6102 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
6103 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 6104 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6105 | #define HAVE_MEMMEM 1 |
783e057b DJ |
6106 | _ACEOF |
6107 | ||
6108 | else | |
6109 | ||
6110 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
6111 | ||
6112 | fi | |
6113 | done | |
6114 | ||
6115 | ||
6116 | ||
6117 | : | |
6118 | ||
6119 | ||
6120 | ||
6121 | ||
6122 | ||
6123 | if test $ac_cv_have_decl_memmem = no; then | |
6124 | HAVE_DECL_MEMMEM=0 | |
6125 | fi | |
6126 | : | |
6127 | ||
6128 | ||
6129 | ||
f434ba03 | 6130 | |
783e057b DJ |
6131 | GNULIB_MEMMEM=1 |
6132 | ||
6133 | ||
6134 | ||
f434ba03 PA |
6135 | $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h |
6136 | ||
6137 | ||
6138 | ||
6139 | # Code from module multiarch: | |
6140 | ||
6141 | # Code from module stddef: | |
6142 | ||
6143 | ||
6144 | ||
6145 | if test $gt_cv_c_wchar_t = no; then | |
6146 | HAVE_WCHAR_T=0 | |
6147 | STDDEF_H=stddef.h | |
6148 | fi | |
6149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
6150 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
6151 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
6152 | $as_echo_n "(cached) " >&6 | |
6153 | else | |
6154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6155 | /* end confdefs.h. */ | |
6156 | #include <stddef.h> | |
6157 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
6158 | ||
6159 | int | |
6160 | main () | |
6161 | { | |
6162 | ||
6163 | ; | |
6164 | return 0; | |
6165 | } | |
6166 | _ACEOF | |
6167 | if ac_fn_c_try_compile "$LINENO"; then : | |
6168 | gl_cv_decl_null_works=yes | |
6169 | else | |
6170 | gl_cv_decl_null_works=no | |
6171 | fi | |
6172 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6173 | fi | |
6174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
6175 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
6176 | if test $gl_cv_decl_null_works = no; then | |
6177 | REPLACE_NULL=1 | |
6178 | STDDEF_H=stddef.h | |
6179 | fi | |
6180 | if test -n "$STDDEF_H"; then | |
6181 | ||
6182 | ||
6183 | ||
6184 | ||
6185 | : | |
6186 | ||
6187 | ||
6188 | ||
6189 | ||
6190 | ||
6191 | ||
6192 | ||
6193 | if test $gl_cv_have_include_next = yes; then | |
6194 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6195 | else | |
6196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
6197 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
6198 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
6199 | $as_echo_n "(cached) " >&6 | |
6200 | else | |
6201 | ||
6202 | if test $ac_cv_header_stddef_h = yes; then | |
6203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6204 | /* end confdefs.h. */ | |
6205 | #include <stddef.h> | |
6206 | ||
6207 | _ACEOF | |
6208 | case "$host_os" in | |
6209 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6210 | *) gl_absname_cpp="$ac_cpp" ;; | |
6211 | esac | |
6212 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6213 | sed -n '\#/stddef.h#{ | |
6214 | s#.*"\(.*/stddef.h\)".*#\1# | |
6215 | s#^/[^/]#//&# | |
6216 | p | |
6217 | q | |
6218 | }'`'"' | |
6219 | else | |
6220 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6221 | fi | |
6222 | ||
6223 | fi | |
6224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
6225 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
6226 | fi | |
6227 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
6228 | ||
6229 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
6230 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6231 | gl_next_as_first_directive='<'stddef.h'>' | |
6232 | else | |
6233 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6234 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
6235 | fi | |
6236 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
6237 | ||
6238 | ||
6239 | ||
6240 | fi | |
6241 | ||
6242 | # Code from module stdint: | |
6243 | ||
6244 | ||
783e057b DJ |
6245 | |
6246 | if test $ac_cv_type_long_long_int = yes; then | |
6247 | HAVE_LONG_LONG_INT=1 | |
6248 | else | |
6249 | HAVE_LONG_LONG_INT=0 | |
6250 | fi | |
6251 | ||
6252 | ||
6253 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
6254 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
6255 | else | |
6256 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
6257 | fi | |
6258 | ||
6259 | ||
6260 | if test $ac_cv_header_inttypes_h = yes; then | |
6261 | HAVE_INTTYPES_H=1 | |
6262 | else | |
6263 | HAVE_INTTYPES_H=0 | |
6264 | fi | |
6265 | ||
6266 | ||
6267 | if test $ac_cv_header_sys_types_h = yes; then | |
6268 | HAVE_SYS_TYPES_H=1 | |
6269 | else | |
6270 | HAVE_SYS_TYPES_H=0 | |
6271 | fi | |
6272 | ||
6273 | ||
6274 | ||
6275 | ||
6276 | ||
f434ba03 | 6277 | |
783e057b DJ |
6278 | : |
6279 | ||
6280 | ||
6281 | ||
6282 | ||
6283 | ||
6284 | ||
6285 | ||
6286 | if test $gl_cv_have_include_next = yes; then | |
6287 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6288 | else | |
81ecdfbb RW |
6289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 |
6290 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
6291 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
6292 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6293 | else |
6294 | ||
f434ba03 PA |
6295 | if test $ac_cv_header_stdint_h = yes; then |
6296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
6297 | /* end confdefs.h. */ |
6298 | #include <stdint.h> | |
6299 | ||
6300 | _ACEOF | |
f434ba03 PA |
6301 | case "$host_os" in |
6302 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6303 | *) gl_absname_cpp="$ac_cpp" ;; | |
6304 | esac | |
6305 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6306 | sed -n '\#/stdint.h#{ | |
6307 | s#.*"\(.*/stdint.h\)".*#\1# | |
6308 | s#^/[^/]#//&# | |
6309 | p | |
6310 | q | |
6311 | }'`'"' | |
6312 | else | |
6313 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6314 | fi | |
783e057b DJ |
6315 | |
6316 | fi | |
81ecdfbb RW |
6317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
6318 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
783e057b DJ |
6319 | fi |
6320 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
6321 | ||
f434ba03 PA |
6322 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
6323 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6324 | gl_next_as_first_directive='<'stdint.h'>' | |
6325 | else | |
6326 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6327 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
6328 | fi | |
6329 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
6330 | ||
783e057b DJ |
6331 | |
6332 | ||
6333 | if test $ac_cv_header_stdint_h = yes; then | |
6334 | HAVE_STDINT_H=1 | |
6335 | else | |
6336 | HAVE_STDINT_H=0 | |
6337 | fi | |
6338 | ||
6339 | ||
6340 | if test $ac_cv_header_stdint_h = yes; then | |
81ecdfbb RW |
6341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 |
6342 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
6343 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
6344 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6345 | else |
6346 | gl_cv_header_working_stdint_h=no | |
81ecdfbb | 6347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6348 | /* end confdefs.h. */ |
6349 | ||
81ecdfbb | 6350 | |
783e057b DJ |
6351 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
6352 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6353 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6354 | #include <stdint.h> | |
6355 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
6356 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
6357 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
6358 | #endif | |
6359 | ||
6360 | ||
6361 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6362 | included before <wchar.h>. */ | |
6363 | #include <stddef.h> | |
6364 | #include <signal.h> | |
6365 | #if HAVE_WCHAR_H | |
6366 | # include <stdio.h> | |
6367 | # include <time.h> | |
6368 | # include <wchar.h> | |
6369 | #endif | |
6370 | ||
6371 | ||
6372 | #ifdef INT8_MAX | |
6373 | int8_t a1 = INT8_MAX; | |
6374 | int8_t a1min = INT8_MIN; | |
6375 | #endif | |
6376 | #ifdef INT16_MAX | |
6377 | int16_t a2 = INT16_MAX; | |
6378 | int16_t a2min = INT16_MIN; | |
6379 | #endif | |
6380 | #ifdef INT32_MAX | |
6381 | int32_t a3 = INT32_MAX; | |
6382 | int32_t a3min = INT32_MIN; | |
6383 | #endif | |
6384 | #ifdef INT64_MAX | |
6385 | int64_t a4 = INT64_MAX; | |
6386 | int64_t a4min = INT64_MIN; | |
6387 | #endif | |
6388 | #ifdef UINT8_MAX | |
6389 | uint8_t b1 = UINT8_MAX; | |
6390 | #else | |
6391 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
6392 | #endif | |
6393 | #ifdef UINT16_MAX | |
6394 | uint16_t b2 = UINT16_MAX; | |
6395 | #endif | |
6396 | #ifdef UINT32_MAX | |
6397 | uint32_t b3 = UINT32_MAX; | |
6398 | #endif | |
6399 | #ifdef UINT64_MAX | |
6400 | uint64_t b4 = UINT64_MAX; | |
6401 | #endif | |
6402 | int_least8_t c1 = INT8_C (0x7f); | |
6403 | int_least8_t c1max = INT_LEAST8_MAX; | |
6404 | int_least8_t c1min = INT_LEAST8_MIN; | |
6405 | int_least16_t c2 = INT16_C (0x7fff); | |
6406 | int_least16_t c2max = INT_LEAST16_MAX; | |
6407 | int_least16_t c2min = INT_LEAST16_MIN; | |
6408 | int_least32_t c3 = INT32_C (0x7fffffff); | |
6409 | int_least32_t c3max = INT_LEAST32_MAX; | |
6410 | int_least32_t c3min = INT_LEAST32_MIN; | |
6411 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
6412 | int_least64_t c4max = INT_LEAST64_MAX; | |
6413 | int_least64_t c4min = INT_LEAST64_MIN; | |
6414 | uint_least8_t d1 = UINT8_C (0xff); | |
6415 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
6416 | uint_least16_t d2 = UINT16_C (0xffff); | |
6417 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
6418 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
6419 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
6420 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
6421 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
6422 | int_fast8_t e1 = INT_FAST8_MAX; | |
6423 | int_fast8_t e1min = INT_FAST8_MIN; | |
6424 | int_fast16_t e2 = INT_FAST16_MAX; | |
6425 | int_fast16_t e2min = INT_FAST16_MIN; | |
6426 | int_fast32_t e3 = INT_FAST32_MAX; | |
6427 | int_fast32_t e3min = INT_FAST32_MIN; | |
6428 | int_fast64_t e4 = INT_FAST64_MAX; | |
6429 | int_fast64_t e4min = INT_FAST64_MIN; | |
6430 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
6431 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
6432 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
6433 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
6434 | #ifdef INTPTR_MAX | |
6435 | intptr_t g = INTPTR_MAX; | |
6436 | intptr_t gmin = INTPTR_MIN; | |
6437 | #endif | |
6438 | #ifdef UINTPTR_MAX | |
6439 | uintptr_t h = UINTPTR_MAX; | |
6440 | #endif | |
6441 | intmax_t i = INTMAX_MAX; | |
6442 | uintmax_t j = UINTMAX_MAX; | |
6443 | ||
6444 | #include <limits.h> /* for CHAR_BIT */ | |
6445 | #define TYPE_MINIMUM(t) \ | |
6446 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
6447 | #define TYPE_MAXIMUM(t) \ | |
6448 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
6449 | struct s { | |
6450 | int check_PTRDIFF: | |
6451 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
6452 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
6453 | ? 1 : -1; | |
6454 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
6455 | int check_SIG_ATOMIC: | |
6456 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
6457 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
6458 | ? 1 : -1; | |
6459 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
6460 | int check_WCHAR: | |
6461 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
6462 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
6463 | ? 1 : -1; | |
6464 | /* Detect bug in mingw. */ | |
6465 | int check_WINT: | |
6466 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
6467 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
6468 | ? 1 : -1; | |
6469 | ||
f434ba03 PA |
6470 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
6471 | int check_UINT8_C: | |
6472 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
6473 | int check_UINT16_C: | |
6474 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
6475 | ||
6476 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
6477 | #ifdef UINT8_MAX | |
6478 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
6479 | #endif | |
6480 | #ifdef UINT16_MAX | |
6481 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
6482 | #endif | |
6483 | #ifdef UINT32_MAX | |
6484 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
6485 | #endif | |
6486 | #ifdef UINT64_MAX | |
6487 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
6488 | #endif | |
6489 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
6490 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
6491 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
6492 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
6493 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
6494 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
6495 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
6496 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
6497 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
6498 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
6499 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
6500 | }; | |
6501 | ||
6502 | int | |
6503 | main () | |
6504 | { | |
6505 | ||
6506 | ; | |
6507 | return 0; | |
6508 | } | |
6509 | _ACEOF | |
6510 | if ac_fn_c_try_compile "$LINENO"; then : | |
6511 | if test "$cross_compiling" = yes; then : | |
6512 | gl_cv_header_working_stdint_h=yes | |
6513 | ||
6514 | else | |
6515 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6516 | /* end confdefs.h. */ | |
6517 | ||
6518 | ||
6519 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
6520 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6521 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6522 | #include <stdint.h> | |
6523 | ||
783e057b | 6524 | |
f434ba03 PA |
6525 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
6526 | included before <wchar.h>. */ | |
6527 | #include <stddef.h> | |
6528 | #include <signal.h> | |
6529 | #if HAVE_WCHAR_H | |
6530 | # include <stdio.h> | |
6531 | # include <time.h> | |
6532 | # include <wchar.h> | |
6533 | #endif | |
6534 | ||
6535 | ||
6536 | #include <stdio.h> | |
6537 | #include <string.h> | |
6538 | #define MVAL(macro) MVAL1(macro) | |
6539 | #define MVAL1(expression) #expression | |
6540 | static const char *macro_values[] = | |
6541 | { | |
6542 | #ifdef INT8_MAX | |
6543 | MVAL (INT8_MAX), | |
6544 | #endif | |
6545 | #ifdef INT16_MAX | |
6546 | MVAL (INT16_MAX), | |
6547 | #endif | |
6548 | #ifdef INT32_MAX | |
6549 | MVAL (INT32_MAX), | |
6550 | #endif | |
6551 | #ifdef INT64_MAX | |
6552 | MVAL (INT64_MAX), | |
6553 | #endif | |
783e057b | 6554 | #ifdef UINT8_MAX |
f434ba03 | 6555 | MVAL (UINT8_MAX), |
783e057b DJ |
6556 | #endif |
6557 | #ifdef UINT16_MAX | |
f434ba03 | 6558 | MVAL (UINT16_MAX), |
783e057b DJ |
6559 | #endif |
6560 | #ifdef UINT32_MAX | |
f434ba03 | 6561 | MVAL (UINT32_MAX), |
783e057b DJ |
6562 | #endif |
6563 | #ifdef UINT64_MAX | |
f434ba03 | 6564 | MVAL (UINT64_MAX), |
783e057b | 6565 | #endif |
f434ba03 PA |
6566 | NULL |
6567 | }; | |
783e057b DJ |
6568 | |
6569 | int | |
6570 | main () | |
6571 | { | |
6572 | ||
f434ba03 PA |
6573 | const char **mv; |
6574 | for (mv = macro_values; *mv != NULL; mv++) | |
6575 | { | |
6576 | const char *value = *mv; | |
6577 | /* Test whether it looks like a cast expression. */ | |
6578 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
6579 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
6580 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
6581 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
6582 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
6583 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
6584 | return 1; | |
6585 | } | |
6586 | return 0; | |
6587 | ||
783e057b DJ |
6588 | ; |
6589 | return 0; | |
6590 | } | |
6591 | _ACEOF | |
f434ba03 | 6592 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 6593 | gl_cv_header_working_stdint_h=yes |
f434ba03 PA |
6594 | fi |
6595 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6596 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6597 | fi | |
6598 | ||
6599 | ||
783e057b | 6600 | fi |
81ecdfbb | 6601 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 | 6602 | |
783e057b | 6603 | fi |
81ecdfbb RW |
6604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 |
6605 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
783e057b DJ |
6606 | fi |
6607 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
6608 | STDINT_H= | |
6609 | else | |
81ecdfbb RW |
6610 | for ac_header in sys/inttypes.h sys/bitypes.h |
6611 | do : | |
6612 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6613 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
6614 | eval as_val=\$$as_ac_Header | |
6615 | if test "x$as_val" = x""yes; then : | |
783e057b | 6616 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6617 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
6618 | _ACEOF |
6619 | ||
6620 | fi | |
6621 | ||
6622 | done | |
6623 | ||
6624 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
6625 | HAVE_SYS_INTTYPES_H=1 | |
6626 | else | |
6627 | HAVE_SYS_INTTYPES_H=0 | |
6628 | fi | |
6629 | ||
6630 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
6631 | HAVE_SYS_BITYPES_H=1 | |
6632 | else | |
6633 | HAVE_SYS_BITYPES_H=0 | |
6634 | fi | |
6635 | ||
6636 | ||
6637 | ||
6638 | : | |
6639 | ||
6640 | ||
6641 | ||
6642 | ||
6643 | ||
6644 | ||
6645 | ||
6646 | ||
f434ba03 PA |
6647 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
6648 | ||
6649 | ||
6650 | for gltype in ptrdiff_t size_t ; do | |
6651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
6652 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6653 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6654 | $as_echo_n "(cached) " >&6 | |
6655 | else | |
6656 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6657 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6658 | included before <wchar.h>. */ | |
6659 | #include <stddef.h> | |
6660 | #include <signal.h> | |
6661 | #if HAVE_WCHAR_H | |
6662 | # include <stdio.h> | |
6663 | # include <time.h> | |
6664 | # include <wchar.h> | |
6665 | #endif | |
6666 | ||
6667 | #include <limits.h>"; then : | |
6668 | ||
6669 | else | |
6670 | result=unknown | |
6671 | fi | |
6672 | ||
6673 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6674 | ||
6675 | fi | |
6676 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6678 | $as_echo "$ac_res" >&6; } | |
6679 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6680 | if test $result = unknown; then | |
6681 | result=0 | |
6682 | fi | |
6683 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6684 | cat >>confdefs.h <<_ACEOF | |
6685 | #define BITSIZEOF_${GLTYPE} $result | |
6686 | _ACEOF | |
6687 | ||
6688 | eval BITSIZEOF_${GLTYPE}=\$result | |
6689 | done | |
6690 | ||
6691 | ||
6692 | fi | |
6693 | ||
783e057b | 6694 | |
f434ba03 | 6695 | for gltype in sig_atomic_t wchar_t wint_t ; do |
81ecdfbb RW |
6696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 |
6697 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6698 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6699 | $as_echo_n "(cached) " >&6 | |
6700 | else | |
6701 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6702 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6703 | included before <wchar.h>. */ | |
6704 | #include <stddef.h> | |
6705 | #include <signal.h> | |
6706 | #if HAVE_WCHAR_H | |
6707 | # include <stdio.h> | |
6708 | # include <time.h> | |
6709 | # include <wchar.h> | |
6710 | #endif | |
6711 | ||
6712 | #include <limits.h>"; then : | |
6713 | ||
6714 | else | |
6715 | result=unknown | |
6716 | fi | |
6717 | ||
6718 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6719 | ||
6720 | fi | |
6721 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6723 | $as_echo "$ac_res" >&6; } | |
6724 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6725 | if test $result = unknown; then | |
6726 | result=0 | |
6727 | fi | |
6728 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6729 | cat >>confdefs.h <<_ACEOF | |
6730 | #define BITSIZEOF_${GLTYPE} $result | |
6731 | _ACEOF | |
783e057b | 6732 | |
81ecdfbb RW |
6733 | eval BITSIZEOF_${GLTYPE}=\$result |
6734 | done | |
783e057b DJ |
6735 | |
6736 | ||
6737 | ||
6738 | ||
81ecdfbb RW |
6739 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
6741 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
6742 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6743 | $as_echo_n "(cached) " >&6 | |
783e057b | 6744 | else |
81ecdfbb | 6745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6746 | /* end confdefs.h. */ |
6747 | ||
6748 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6749 | included before <wchar.h>. */ | |
6750 | #include <stddef.h> | |
6751 | #include <signal.h> | |
6752 | #if HAVE_WCHAR_H | |
6753 | # include <stdio.h> | |
6754 | # include <time.h> | |
6755 | # include <wchar.h> | |
6756 | #endif | |
6757 | ||
6758 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
6759 | int | |
6760 | main () | |
6761 | { | |
6762 | ||
6763 | ; | |
6764 | return 0; | |
6765 | } | |
6766 | _ACEOF | |
81ecdfbb | 6767 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
6768 | result=yes |
6769 | else | |
81ecdfbb | 6770 | result=no |
20e95c23 | 6771 | fi |
81ecdfbb | 6772 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6773 | eval gl_cv_type_${gltype}_signed=\$result |
6774 | ||
6775 | fi | |
81ecdfbb RW |
6776 | eval ac_res=\$gl_cv_type_${gltype}_signed |
6777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6778 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6779 | eval result=\$gl_cv_type_${gltype}_signed |
6780 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6781 | if test "$result" = yes; then | |
6782 | cat >>confdefs.h <<_ACEOF | |
6783 | #define HAVE_SIGNED_${GLTYPE} 1 | |
6784 | _ACEOF | |
6785 | ||
6786 | eval HAVE_SIGNED_${GLTYPE}=1 | |
6787 | else | |
6788 | eval HAVE_SIGNED_${GLTYPE}=0 | |
6789 | fi | |
6790 | done | |
6791 | ||
6792 | ||
6793 | gl_cv_type_ptrdiff_t_signed=yes | |
6794 | gl_cv_type_size_t_signed=no | |
f434ba03 | 6795 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
783e057b DJ |
6796 | |
6797 | ||
f434ba03 | 6798 | for gltype in ptrdiff_t size_t ; do |
81ecdfbb RW |
6799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 |
6800 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6801 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6802 | $as_echo_n "(cached) " >&6 | |
c906108c | 6803 | else |
783e057b DJ |
6804 | eval gl_cv_type_${gltype}_suffix=no |
6805 | eval result=\$gl_cv_type_${gltype}_signed | |
6806 | if test "$result" = yes; then | |
6807 | glsufu= | |
6808 | else | |
6809 | glsufu=u | |
6810 | fi | |
6811 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6812 | case $glsuf in | |
6813 | '') gltype1='int';; | |
f434ba03 PA |
6814 | l) gltype1='long int';; |
6815 | ll) gltype1='long long int';; | |
6816 | i64) gltype1='__int64';; | |
6817 | u) gltype1='unsigned int';; | |
6818 | ul) gltype1='unsigned long int';; | |
6819 | ull) gltype1='unsigned long long int';; | |
783e057b DJ |
6820 | ui64)gltype1='unsigned __int64';; |
6821 | esac | |
81ecdfbb | 6822 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6823 | /* end confdefs.h. */ |
6824 | ||
6825 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6826 | included before <wchar.h>. */ | |
6827 | #include <stddef.h> | |
6828 | #include <signal.h> | |
6829 | #if HAVE_WCHAR_H | |
6830 | # include <stdio.h> | |
6831 | # include <time.h> | |
6832 | # include <wchar.h> | |
6833 | #endif | |
6834 | ||
6835 | extern $gltype foo; | |
6836 | extern $gltype1 foo; | |
6837 | int | |
6838 | main () | |
6839 | { | |
6840 | ||
6841 | ; | |
6842 | return 0; | |
6843 | } | |
6844 | _ACEOF | |
81ecdfbb | 6845 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 6846 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6847 | fi |
81ecdfbb | 6848 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6849 | eval result=\$gl_cv_type_${gltype}_suffix |
6850 | test "$result" != no && break | |
6851 | done | |
6852 | fi | |
81ecdfbb RW |
6853 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6855 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6856 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
6857 | eval result=\$gl_cv_type_${gltype}_suffix | |
6858 | test "$result" = no && result= | |
6859 | eval ${GLTYPE}_SUFFIX=\$result | |
6860 | cat >>confdefs.h <<_ACEOF | |
6861 | #define ${GLTYPE}_SUFFIX $result | |
6862 | _ACEOF | |
6863 | ||
6864 | done | |
6865 | ||
6866 | ||
783e057b DJ |
6867 | fi |
6868 | ||
6869 | ||
f434ba03 PA |
6870 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
6872 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6873 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
81ecdfbb | 6874 | $as_echo_n "(cached) " >&6 |
783e057b | 6875 | else |
f434ba03 PA |
6876 | eval gl_cv_type_${gltype}_suffix=no |
6877 | eval result=\$gl_cv_type_${gltype}_signed | |
6878 | if test "$result" = yes; then | |
6879 | glsufu= | |
6880 | else | |
6881 | glsufu=u | |
6882 | fi | |
6883 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6884 | case $glsuf in | |
6885 | '') gltype1='int';; | |
6886 | l) gltype1='long int';; | |
6887 | ll) gltype1='long long int';; | |
6888 | i64) gltype1='__int64';; | |
6889 | u) gltype1='unsigned int';; | |
6890 | ul) gltype1='unsigned long int';; | |
6891 | ull) gltype1='unsigned long long int';; | |
6892 | ui64)gltype1='unsigned __int64';; | |
6893 | esac | |
6894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
81ecdfbb | 6895 | /* end confdefs.h. */ |
f434ba03 PA |
6896 | |
6897 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6898 | included before <wchar.h>. */ | |
6899 | #include <stddef.h> | |
6900 | #include <signal.h> | |
6901 | #if HAVE_WCHAR_H | |
6902 | # include <stdio.h> | |
6903 | # include <time.h> | |
6904 | # include <wchar.h> | |
6905 | #endif | |
6906 | ||
6907 | extern $gltype foo; | |
6908 | extern $gltype1 foo; | |
6909 | int | |
6910 | main () | |
6911 | { | |
6912 | ||
6913 | ; | |
6914 | return 0; | |
6915 | } | |
783e057b | 6916 | _ACEOF |
81ecdfbb | 6917 | if ac_fn_c_try_compile "$LINENO"; then : |
f434ba03 | 6918 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6919 | fi |
81ecdfbb | 6920 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 PA |
6921 | eval result=\$gl_cv_type_${gltype}_suffix |
6922 | test "$result" != no && break | |
6923 | done | |
783e057b | 6924 | fi |
f434ba03 PA |
6925 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6927 | $as_echo "$ac_res" >&6; } | |
6928 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6929 | eval result=\$gl_cv_type_${gltype}_suffix | |
6930 | test "$result" = no && result= | |
6931 | eval ${GLTYPE}_SUFFIX=\$result | |
6932 | cat >>confdefs.h <<_ACEOF | |
6933 | #define ${GLTYPE}_SUFFIX $result | |
6934 | _ACEOF | |
6935 | ||
6936 | done | |
6937 | ||
6938 | ||
6939 | ||
6940 | STDINT_H=stdint.h | |
783e057b DJ |
6941 | fi |
6942 | ||
6943 | ||
f434ba03 PA |
6944 | # Code from module string: |
6945 | ||
6946 | ||
6947 | ||
6948 | # Code from module warn-on-use: | |
6949 | # Code from module wchar: | |
6950 | ||
6951 | ||
6952 | ||
6953 | ||
783e057b DJ |
6954 | : |
6955 | ||
6956 | ||
6957 | ||
6958 | ||
6959 | ||
783e057b DJ |
6960 | |
6961 | ||
6962 | ||
6963 | ||
6964 | : | |
6965 | ||
6966 | ||
6967 | ||
6968 | ||
6969 | ||
6970 | ||
6971 | ||
6972 | if test $gl_cv_have_include_next = yes; then | |
6973 | gl_cv_next_wchar_h='<'wchar.h'>' | |
6974 | else | |
81ecdfbb RW |
6975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 |
6976 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
6977 | if test "${gl_cv_next_wchar_h+set}" = set; then : | |
6978 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6979 | else |
6980 | ||
f434ba03 PA |
6981 | if test $ac_cv_header_wchar_h = yes; then |
6982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
6983 | /* end confdefs.h. */ |
6984 | #include <wchar.h> | |
6985 | ||
6986 | _ACEOF | |
f434ba03 PA |
6987 | case "$host_os" in |
6988 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6989 | *) gl_absname_cpp="$ac_cpp" ;; | |
6990 | esac | |
6991 | gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6992 | sed -n '\#/wchar.h#{ | |
6993 | s#.*"\(.*/wchar.h\)".*#\1# | |
6994 | s#^/[^/]#//&# | |
6995 | p | |
6996 | q | |
6997 | }'`'"' | |
6998 | else | |
6999 | gl_cv_next_wchar_h='<'wchar.h'>' | |
7000 | fi | |
783e057b DJ |
7001 | |
7002 | fi | |
81ecdfbb RW |
7003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 |
7004 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
783e057b DJ |
7005 | fi |
7006 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
7007 | ||
f434ba03 PA |
7008 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
7009 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
7010 | gl_next_as_first_directive='<'wchar.h'>' | |
7011 | else | |
7012 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
7013 | gl_next_as_first_directive=$gl_cv_next_wchar_h | |
7014 | fi | |
7015 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive | |
7016 | ||
7017 | ||
7018 | ||
7019 | if test $ac_cv_header_wchar_h = yes; then | |
7020 | HAVE_WCHAR_H=1 | |
7021 | else | |
7022 | HAVE_WCHAR_H=0 | |
7023 | fi | |
7024 | ||
7025 | ||
7026 | ||
7027 | if test $gt_cv_c_wint_t = yes; then | |
7028 | HAVE_WINT_T=1 | |
7029 | else | |
7030 | HAVE_WINT_T=0 | |
7031 | fi | |
7032 | ||
7033 | ||
7034 | ||
7035 | for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do | |
7036 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
7037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
7038 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
7039 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7040 | $as_echo_n "(cached) " >&6 | |
7041 | else | |
7042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7043 | /* end confdefs.h. */ | |
7044 | ||
7045 | /* Some systems require additional headers. */ | |
7046 | #ifndef __GLIBC__ | |
7047 | # include <stddef.h> | |
7048 | # include <stdio.h> | |
7049 | # include <time.h> | |
7050 | #endif | |
7051 | #include <wchar.h> | |
7052 | ||
7053 | int | |
7054 | main () | |
7055 | { | |
7056 | #undef $gl_func | |
7057 | (void) $gl_func; | |
7058 | ; | |
7059 | return 0; | |
7060 | } | |
7061 | _ACEOF | |
7062 | if ac_fn_c_try_compile "$LINENO"; then : | |
7063 | eval "$as_gl_Symbol=yes" | |
7064 | else | |
7065 | eval "$as_gl_Symbol=no" | |
7066 | fi | |
7067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7068 | fi | |
7069 | eval ac_res=\$$as_gl_Symbol | |
7070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7071 | $as_echo "$ac_res" >&6; } | |
7072 | eval as_val=\$$as_gl_Symbol | |
7073 | if test "x$as_val" = x""yes; then : | |
7074 | cat >>confdefs.h <<_ACEOF | |
7075 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
7076 | _ACEOF | |
7077 | ||
7078 | eval ac_cv_have_decl_$gl_func=yes | |
7079 | fi | |
7080 | done | |
7081 | ||
7082 | ||
7083 | # Code from module dummy: | |
7084 | # End of code from modules | |
7085 | ||
7086 | ||
c906108c | 7087 | |
c906108c | 7088 | |
c906108c | 7089 | |
c906108c | 7090 | |
c906108c | 7091 | |
c906108c | 7092 | |
c906108c | 7093 | |
783e057b DJ |
7094 | gltests_libdeps= |
7095 | gltests_ltlibdeps= | |
20e95c23 | 7096 | |
20e95c23 | 7097 | |
20e95c23 | 7098 | |
f434ba03 PA |
7099 | |
7100 | ||
7101 | ||
7102 | ||
7103 | ||
7104 | ||
783e057b | 7105 | gl_source_base='tests' |
f434ba03 PA |
7106 | 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 |
7107 | ||
7108 | gl_module_indicator_condition=$gltests_WITNESS | |
7109 | ||
7110 | ||
7111 | ||
7112 | ||
7113 | ||
c906108c | 7114 | |
bec39cab | 7115 | |
bec39cab | 7116 | |
783e057b DJ |
7117 | |
7118 | LIBGNU_LIBDEPS="$gl_libdeps" | |
7119 | ||
7120 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
7121 | ||
7122 | ||
e28b3332 | 7123 | |
d5af19ba DJ |
7124 | # For Makefile dependencies. |
7125 | GNULIB_STDINT_H= | |
7126 | if test x"$STDINT_H" != x; then | |
7127 | GNULIB_STDINT_H=gnulib/$STDINT_H | |
7128 | fi | |
7129 | ||
7130 | ||
bec39cab AC |
7131 | PACKAGE=gdb |
7132 | ||
7133 | cat >>confdefs.h <<_ACEOF | |
7134 | #define PACKAGE "$PACKAGE" | |
7135 | _ACEOF | |
7136 | ||
7137 | ||
7138 | ||
e28b3332 DJ |
7139 | # GDB does not use automake, but gnulib does. This line lets us |
7140 | # generate its Makefile.in. | |
81ecdfbb RW |
7141 | am__api_version='1.11' |
7142 | ||
e28b3332 DJ |
7143 | # Find a good install program. We prefer a C program (faster), |
7144 | # so one script is as good as another. But avoid the broken or | |
7145 | # incompatible versions: | |
7146 | # SysV /etc/install, /usr/sbin/install | |
7147 | # SunOS /usr/etc/install | |
7148 | # IRIX /sbin/install | |
7149 | # AIX /bin/install | |
7150 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7151 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7152 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7153 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7154 | # OS/2's system install, which has a completely different semantic | |
7155 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 7156 | # Reject install programs that cannot install multiple files. |
81ecdfbb RW |
7157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
7158 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
e28b3332 | 7159 | if test -z "$INSTALL"; then |
81ecdfbb RW |
7160 | if test "${ac_cv_path_install+set}" = set; then : |
7161 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7162 | else |
7163 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7164 | for as_dir in $PATH | |
7165 | do | |
7166 | IFS=$as_save_IFS | |
7167 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7168 | # Account for people who put trailing slashes in PATH elements. |
7169 | case $as_dir/ in #(( | |
7170 | ./ | .// | /[cC]/* | \ | |
e28b3332 | 7171 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
81ecdfbb | 7172 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
e28b3332 DJ |
7173 | /usr/ucb/* ) ;; |
7174 | *) | |
7175 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7176 | # Don't use installbsd from OSF since it installs stuff as root | |
7177 | # by default. | |
7178 | for ac_prog in ginstall scoinst install; do | |
7179 | for ac_exec_ext in '' $ac_executable_extensions; do | |
81ecdfbb | 7180 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then |
e28b3332 DJ |
7181 | if test $ac_prog = install && |
7182 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7183 | # AIX install. It has an incompatible calling convention. | |
7184 | : | |
7185 | elif test $ac_prog = install && | |
7186 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7187 | # program-specific install script used by HP pwplus--don't use. | |
7188 | : | |
7189 | else | |
85541719 DE |
7190 | rm -rf conftest.one conftest.two conftest.dir |
7191 | echo one > conftest.one | |
7192 | echo two > conftest.two | |
7193 | mkdir conftest.dir | |
7194 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7195 | test -s conftest.one && test -s conftest.two && | |
7196 | test -s conftest.dir/conftest.one && | |
7197 | test -s conftest.dir/conftest.two | |
7198 | then | |
7199 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7200 | break 3 | |
7201 | fi | |
e28b3332 DJ |
7202 | fi |
7203 | fi | |
7204 | done | |
7205 | done | |
7206 | ;; | |
7207 | esac | |
81ecdfbb RW |
7208 | |
7209 | done | |
7210 | IFS=$as_save_IFS | |
e28b3332 | 7211 | |
85541719 | 7212 | rm -rf conftest.one conftest.two conftest.dir |
e28b3332 DJ |
7213 | |
7214 | fi | |
7215 | if test "${ac_cv_path_install+set}" = set; then | |
7216 | INSTALL=$ac_cv_path_install | |
7217 | else | |
85541719 DE |
7218 | # As a last resort, use the slow shell script. Don't cache a |
7219 | # value for INSTALL within a source directory, because that will | |
e28b3332 | 7220 | # break other packages using the cache if that directory is |
85541719 | 7221 | # removed, or if the value is a relative name. |
e28b3332 DJ |
7222 | INSTALL=$ac_install_sh |
7223 | fi | |
7224 | fi | |
81ecdfbb RW |
7225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
7226 | $as_echo "$INSTALL" >&6; } | |
e28b3332 DJ |
7227 | |
7228 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7229 | # It thinks the first close brace ends the variable substitution. | |
7230 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7231 | ||
7232 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7233 | ||
7234 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7235 | ||
81ecdfbb RW |
7236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
7237 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
e28b3332 DJ |
7238 | # Just in case |
7239 | sleep 1 | |
7240 | echo timestamp > conftest.file | |
81ecdfbb RW |
7241 | # Reject unsafe characters in $srcdir or the absolute working directory |
7242 | # name. Accept space and tab only in the latter. | |
7243 | am_lf=' | |
7244 | ' | |
7245 | case `pwd` in | |
7246 | *[\\\"\#\$\&\'\`$am_lf]*) | |
7247 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; | |
7248 | esac | |
7249 | case $srcdir in | |
7250 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
7251 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; | |
7252 | esac | |
7253 | ||
e28b3332 DJ |
7254 | # Do `set' in a subshell so we don't clobber the current shell's |
7255 | # arguments. Must try -L first in case configure is actually a | |
7256 | # symlink; some systems play weird games with the mod time of symlinks | |
7257 | # (eg FreeBSD returns the mod time of the symlink's containing | |
7258 | # directory). | |
7259 | if ( | |
81ecdfbb | 7260 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
e28b3332 DJ |
7261 | if test "$*" = "X"; then |
7262 | # -L didn't work. | |
81ecdfbb | 7263 | set X `ls -t "$srcdir/configure" conftest.file` |
e28b3332 DJ |
7264 | fi |
7265 | rm -f conftest.file | |
7266 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
7267 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
7268 | ||
7269 | # If neither matched, then we have a broken ls. This can happen | |
7270 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
7271 | # broken ls alias from the environment. This has actually | |
7272 | # happened. Such a system could not be considered "sane". | |
81ecdfbb RW |
7273 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
7274 | alias in your environment" "$LINENO" 5 | |
e28b3332 DJ |
7275 | fi |
7276 | ||
7277 | test "$2" = conftest.file | |
7278 | ) | |
7279 | then | |
7280 | # Ok. | |
7281 | : | |
7282 | else | |
81ecdfbb RW |
7283 | as_fn_error "newly created file is older than distributed files! |
7284 | Check your system clock" "$LINENO" 5 | |
e28b3332 | 7285 | fi |
81ecdfbb RW |
7286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7287 | $as_echo "yes" >&6; } | |
e28b3332 | 7288 | test "$program_prefix" != NONE && |
81ecdfbb | 7289 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
e28b3332 DJ |
7290 | # Use a double $ so make ignores it. |
7291 | test "$program_suffix" != NONE && | |
81ecdfbb RW |
7292 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
7293 | # Double any \ or $. | |
e28b3332 | 7294 | # By default was `s,x,x', remove it if useless. |
81ecdfbb RW |
7295 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
7296 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
e28b3332 DJ |
7297 | |
7298 | # expand $ac_aux_dir to an absolute path | |
7299 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
7300 | ||
81ecdfbb RW |
7301 | if test x"${MISSING+set}" != xset; then |
7302 | case $am_aux_dir in | |
7303 | *\ * | *\ *) | |
7304 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
7305 | *) | |
7306 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
7307 | esac | |
7308 | fi | |
e28b3332 DJ |
7309 | # Use eval to expand $SHELL |
7310 | if eval "$MISSING --run true"; then | |
7311 | am_missing_run="$MISSING --run " | |
7312 | else | |
7313 | am_missing_run= | |
81ecdfbb RW |
7314 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 |
7315 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
7316 | fi | |
7317 | ||
7318 | if test x"${install_sh}" != xset; then | |
7319 | case $am_aux_dir in | |
7320 | *\ * | *\ *) | |
7321 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
7322 | *) | |
7323 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
7324 | esac | |
7325 | fi | |
7326 | ||
7327 | # Installed binaries are usually stripped using `strip' when the user | |
7328 | # run `make install-strip'. However `strip' might not be the right | |
7329 | # tool to use in cross-compilation environments, therefore Automake | |
7330 | # will honor the `STRIP' environment variable to overrule this program. | |
7331 | if test "$cross_compiling" != no; then | |
7332 | if test -n "$ac_tool_prefix"; then | |
7333 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
7334 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
7335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7336 | $as_echo_n "checking for $ac_word... " >&6; } | |
7337 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
7338 | $as_echo_n "(cached) " >&6 | |
7339 | else | |
7340 | if test -n "$STRIP"; then | |
7341 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
7342 | else | |
7343 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7344 | for as_dir in $PATH | |
7345 | do | |
7346 | IFS=$as_save_IFS | |
7347 | test -z "$as_dir" && as_dir=. | |
7348 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7349 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7350 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
7351 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7352 | break 2 | |
7353 | fi | |
7354 | done | |
7355 | done | |
7356 | IFS=$as_save_IFS | |
7357 | ||
7358 | fi | |
7359 | fi | |
7360 | STRIP=$ac_cv_prog_STRIP | |
7361 | if test -n "$STRIP"; then | |
7362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
7363 | $as_echo "$STRIP" >&6; } | |
7364 | else | |
7365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7366 | $as_echo "no" >&6; } | |
7367 | fi | |
7368 | ||
7369 | ||
7370 | fi | |
7371 | if test -z "$ac_cv_prog_STRIP"; then | |
7372 | ac_ct_STRIP=$STRIP | |
7373 | # Extract the first word of "strip", so it can be a program name with args. | |
7374 | set dummy strip; ac_word=$2 | |
7375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7376 | $as_echo_n "checking for $ac_word... " >&6; } | |
7377 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
7378 | $as_echo_n "(cached) " >&6 | |
7379 | else | |
7380 | if test -n "$ac_ct_STRIP"; then | |
7381 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
7382 | else | |
7383 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7384 | for as_dir in $PATH | |
7385 | do | |
7386 | IFS=$as_save_IFS | |
7387 | test -z "$as_dir" && as_dir=. | |
7388 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7389 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7390 | ac_cv_prog_ac_ct_STRIP="strip" | |
7391 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7392 | break 2 | |
7393 | fi | |
7394 | done | |
7395 | done | |
7396 | IFS=$as_save_IFS | |
7397 | ||
7398 | fi | |
7399 | fi | |
7400 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
7401 | if test -n "$ac_ct_STRIP"; then | |
7402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
7403 | $as_echo "$ac_ct_STRIP" >&6; } | |
7404 | else | |
7405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7406 | $as_echo "no" >&6; } | |
7407 | fi | |
7408 | ||
7409 | if test "x$ac_ct_STRIP" = x; then | |
7410 | STRIP=":" | |
7411 | else | |
7412 | case $cross_compiling:$ac_tool_warned in | |
7413 | yes:) | |
7414 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7415 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7416 | ac_tool_warned=yes ;; | |
7417 | esac | |
7418 | STRIP=$ac_ct_STRIP | |
7419 | fi | |
7420 | else | |
7421 | STRIP="$ac_cv_prog_STRIP" | |
7422 | fi | |
7423 | ||
7424 | fi | |
7425 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
7426 | ||
7427 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
7428 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
7429 | if test -z "$MKDIR_P"; then | |
7430 | if test "${ac_cv_path_mkdir+set}" = set; then : | |
7431 | $as_echo_n "(cached) " >&6 | |
7432 | else | |
7433 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7434 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
7435 | do | |
7436 | IFS=$as_save_IFS | |
7437 | test -z "$as_dir" && as_dir=. | |
7438 | for ac_prog in mkdir gmkdir; do | |
7439 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7440 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
7441 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
7442 | 'mkdir (GNU coreutils) '* | \ | |
7443 | 'mkdir (coreutils) '* | \ | |
7444 | 'mkdir (fileutils) '4.1*) | |
7445 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
7446 | break 3;; | |
7447 | esac | |
7448 | done | |
7449 | done | |
e28b3332 | 7450 | done |
81ecdfbb RW |
7451 | IFS=$as_save_IFS |
7452 | ||
7453 | fi | |
7454 | ||
7455 | if test "${ac_cv_path_mkdir+set}" = set; then | |
7456 | MKDIR_P="$ac_cv_path_mkdir -p" | |
e28b3332 | 7457 | else |
81ecdfbb RW |
7458 | # As a last resort, use the slow shell script. Don't cache a |
7459 | # value for MKDIR_P within a source directory, because that will | |
7460 | # break other packages using the cache if that directory is | |
7461 | # removed, or if the value is a relative name. | |
7462 | test -d ./--version && rmdir ./--version | |
7463 | MKDIR_P="$ac_install_sh -d" | |
e28b3332 DJ |
7464 | fi |
7465 | fi | |
81ecdfbb RW |
7466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
7467 | $as_echo "$MKDIR_P" >&6; } | |
7468 | ||
f434ba03 | 7469 | |
81ecdfbb RW |
7470 | mkdir_p="$MKDIR_P" |
7471 | case $mkdir_p in | |
7472 | [\\/$]* | ?:[\\/]*) ;; | |
7473 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
7474 | esac | |
e28b3332 DJ |
7475 | |
7476 | for ac_prog in gawk mawk nawk awk | |
7477 | do | |
7478 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7479 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7481 | $as_echo_n "checking for $ac_word... " >&6; } | |
7482 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7483 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7484 | else |
7485 | if test -n "$AWK"; then | |
7486 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7487 | else | |
7488 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7489 | for as_dir in $PATH | |
7490 | do | |
7491 | IFS=$as_save_IFS | |
7492 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7493 | for ac_exec_ext in '' $ac_executable_extensions; do |
7494 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e28b3332 | 7495 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7496 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
e28b3332 DJ |
7497 | break 2 |
7498 | fi | |
7499 | done | |
81ecdfbb RW |
7500 | done |
7501 | IFS=$as_save_IFS | |
e28b3332 DJ |
7502 | |
7503 | fi | |
7504 | fi | |
7505 | AWK=$ac_cv_prog_AWK | |
7506 | if test -n "$AWK"; then | |
81ecdfbb RW |
7507 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7508 | $as_echo "$AWK" >&6; } | |
e28b3332 | 7509 | else |
81ecdfbb RW |
7510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7511 | $as_echo "no" >&6; } | |
e28b3332 DJ |
7512 | fi |
7513 | ||
81ecdfbb | 7514 | |
e28b3332 DJ |
7515 | test -n "$AWK" && break |
7516 | done | |
7517 | ||
81ecdfbb | 7518 | ac_config_commands="$ac_config_commands depfiles" |
e28b3332 DJ |
7519 | |
7520 | ||
7521 | am_make=${MAKE-make} | |
7522 | cat > confinc << 'END' | |
7523 | am__doit: | |
81ecdfbb | 7524 | @echo this is the am__doit target |
e28b3332 DJ |
7525 | .PHONY: am__doit |
7526 | END | |
7527 | # If we don't find an include directive, just comment out the code. | |
81ecdfbb RW |
7528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 |
7529 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
e28b3332 DJ |
7530 | am__include="#" |
7531 | am__quote= | |
7532 | _am_result=none | |
7533 | # First try GNU make style include. | |
7534 | echo "include confinc" > confmf | |
81ecdfbb RW |
7535 | # Ignore all kinds of additional output from `make'. |
7536 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
7537 | *the\ am__doit\ target*) | |
7538 | am__include=include | |
7539 | am__quote= | |
7540 | _am_result=GNU | |
7541 | ;; | |
7542 | esac | |
e28b3332 DJ |
7543 | # Now try BSD make style include. |
7544 | if test "$am__include" = "#"; then | |
7545 | echo '.include "confinc"' > confmf | |
81ecdfbb RW |
7546 | case `$am_make -s -f confmf 2> /dev/null` in #( |
7547 | *the\ am__doit\ target*) | |
7548 | am__include=.include | |
7549 | am__quote="\"" | |
7550 | _am_result=BSD | |
7551 | ;; | |
7552 | esac | |
e28b3332 DJ |
7553 | fi |
7554 | ||
7555 | ||
81ecdfbb RW |
7556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 |
7557 | $as_echo "$_am_result" >&6; } | |
e28b3332 DJ |
7558 | rm -f confinc confmf |
7559 | ||
81ecdfbb RW |
7560 | # Check whether --enable-dependency-tracking was given. |
7561 | if test "${enable_dependency_tracking+set}" = set; then : | |
7562 | enableval=$enable_dependency_tracking; | |
7563 | fi | |
e28b3332 | 7564 | |
e28b3332 DJ |
7565 | if test "x$enable_dependency_tracking" != xno; then |
7566 | am_depcomp="$ac_aux_dir/depcomp" | |
7567 | AMDEPBACKSLASH='\' | |
7568 | fi | |
81ecdfbb | 7569 | if test "x$enable_dependency_tracking" != xno; then |
e28b3332 DJ |
7570 | AMDEP_TRUE= |
7571 | AMDEP_FALSE='#' | |
7572 | else | |
7573 | AMDEP_TRUE='#' | |
7574 | AMDEP_FALSE= | |
7575 | fi | |
7576 | ||
7577 | ||
81ecdfbb RW |
7578 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
7579 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
7580 | # is not polluted with repeated "-I." | |
7581 | am__isrc=' -I$(srcdir)' | |
7582 | # test to see if srcdir already configured | |
7583 | if test -f $srcdir/config.status; then | |
7584 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
7585 | fi | |
e28b3332 DJ |
7586 | fi |
7587 | ||
7588 | # test whether we have cygpath | |
7589 | if test -z "$CYGPATH_W"; then | |
7590 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
7591 | CYGPATH_W='cygpath -w' | |
7592 | else | |
7593 | CYGPATH_W=echo | |
7594 | fi | |
7595 | fi | |
7596 | ||
7597 | ||
7598 | # Define the identity of the package. | |
7599 | PACKAGE=gdb | |
7600 | VERSION=UNUSED-VERSION | |
7601 | ||
7602 | ||
7603 | # Some tools Automake needs. | |
7604 | ||
7605 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
7606 | ||
7607 | ||
7608 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
7609 | ||
7610 | ||
7611 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
7612 | ||
7613 | ||
7614 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
7615 | ||
7616 | ||
7617 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
7618 | ||
e28b3332 DJ |
7619 | # We need awk for the "check" target. The system "awk" is bad on |
7620 | # some platforms. | |
7621 | # Always define AMTAR for backward compatibility. | |
7622 | ||
7623 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
7624 | ||
7625 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
7626 | ||
7627 | ||
7628 | ||
7629 | ||
7630 | depcc="$CC" am_compiler_list= | |
7631 | ||
81ecdfbb RW |
7632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
7633 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
7634 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
7635 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7636 | else |
7637 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
7638 | # We make a subdir and do the tests there. Otherwise we can end up | |
7639 | # making bogus files that we don't know about and never remove. For | |
7640 | # instance it was reported that on HP-UX the gcc test will end up | |
7641 | # making a dummy file named `D' -- because `-MD' means `put the output | |
7642 | # in D'. | |
7643 | mkdir conftest.dir | |
7644 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
7645 | # using a relative directory. | |
7646 | cp "$am_depcomp" conftest.dir | |
7647 | cd conftest.dir | |
7648 | # We will build objects and dependencies in a subdirectory because | |
7649 | # it helps to detect inapplicable dependency modes. For instance | |
7650 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
7651 | # side effect of compilation, but ICC will put the dependencies in | |
7652 | # the current directory while Tru64 will put them in the object | |
7653 | # directory. | |
7654 | mkdir sub | |
7655 | ||
7656 | am_cv_CC_dependencies_compiler_type=none | |
7657 | if test "$am_compiler_list" = ""; then | |
7658 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
7659 | fi | |
81ecdfbb RW |
7660 | am__universal=false |
7661 | case " $depcc " in #( | |
7662 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
7663 | esac | |
7664 | ||
e28b3332 DJ |
7665 | for depmode in $am_compiler_list; do |
7666 | # Setup a source with many dependencies, because some compilers | |
7667 | # like to wrap large dependency lists on column 80 (with \), and | |
7668 | # we should not choose a depcomp mode which is confused by this. | |
7669 | # | |
7670 | # We need to recreate these files for each test, as the compiler may | |
7671 | # overwrite some of them when testing with obscure command lines. | |
7672 | # This happens at least with the AIX C compiler. | |
7673 | : > sub/conftest.c | |
7674 | for i in 1 2 3 4 5 6; do | |
7675 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
7676 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
7677 | # Solaris 8's {/usr,}/bin/sh. | |
7678 | touch sub/conftst$i.h | |
7679 | done | |
7680 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
7681 | ||
81ecdfbb RW |
7682 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
7683 | # mode. It turns out that the SunPro C++ compiler does not properly | |
7684 | # handle `-M -o', and we need to detect this. Also, some Intel | |
7685 | # versions had trouble with output in subdirs | |
7686 | am__obj=sub/conftest.${OBJEXT-o} | |
7687 | am__minus_obj="-o $am__obj" | |
e28b3332 | 7688 | case $depmode in |
81ecdfbb RW |
7689 | gcc) |
7690 | # This depmode causes a compiler race in universal mode. | |
7691 | test "$am__universal" = false || continue | |
7692 | ;; | |
e28b3332 DJ |
7693 | nosideeffect) |
7694 | # after this tag, mechanisms are not by side-effect, so they'll | |
7695 | # only be used when explicitly requested | |
7696 | if test "x$enable_dependency_tracking" = xyes; then | |
7697 | continue | |
7698 | else | |
7699 | break | |
7700 | fi | |
7701 | ;; | |
81ecdfbb RW |
7702 | msvisualcpp | msvcmsys) |
7703 | # This compiler won't grok `-c -o', but also, the minuso test has | |
7704 | # not run yet. These depmodes are late enough in the game, and | |
7705 | # so weak that their functioning should not be impacted. | |
7706 | am__obj=conftest.${OBJEXT-o} | |
7707 | am__minus_obj= | |
7708 | ;; | |
e28b3332 DJ |
7709 | none) break ;; |
7710 | esac | |
e28b3332 | 7711 | if depmode=$depmode \ |
81ecdfbb | 7712 | source=sub/conftest.c object=$am__obj \ |
e28b3332 | 7713 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
81ecdfbb | 7714 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
e28b3332 | 7715 | >/dev/null 2>conftest.err && |
81ecdfbb | 7716 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 | 7717 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
81ecdfbb | 7718 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 DJ |
7719 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
7720 | # icc doesn't choke on unknown options, it will just issue warnings | |
7721 | # or remarks (even with -Werror). So we grep stderr for any message | |
7722 | # that says an option was ignored or not supported. | |
7723 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
7724 | # icc: Command line warning: ignoring option '-M'; no argument required | |
7725 | # The diagnosis changed in icc 8.0: | |
7726 | # icc: Command line remark: option '-MP' not supported | |
7727 | if (grep 'ignoring option' conftest.err || | |
7728 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
7729 | am_cv_CC_dependencies_compiler_type=$depmode | |
7730 | break | |
7731 | fi | |
7732 | fi | |
7733 | done | |
7734 | ||
7735 | cd .. | |
7736 | rm -rf conftest.dir | |
7737 | else | |
7738 | am_cv_CC_dependencies_compiler_type=none | |
7739 | fi | |
7740 | ||
7741 | fi | |
81ecdfbb RW |
7742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
7743 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
e28b3332 DJ |
7744 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
7745 | ||
81ecdfbb | 7746 | if |
e28b3332 DJ |
7747 | test "x$enable_dependency_tracking" != xno \ |
7748 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
7749 | am__fastdepCC_TRUE= | |
7750 | am__fastdepCC_FALSE='#' | |
7751 | else | |
7752 | am__fastdepCC_TRUE='#' | |
7753 | am__fastdepCC_FALSE= | |
7754 | fi | |
7755 | ||
7756 | ||
7757 | ||
7758 | ||
bec39cab AC |
7759 | |
7760 | ||
81ecdfbb RW |
7761 | # Check whether --with-separate-debug-dir was given. |
7762 | if test "${with_separate_debug_dir+set}" = set; then : | |
7763 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
7764 | DEBUGDIR=$withval |
7765 | else | |
7766 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
7767 | fi |
7768 | ||
20e95c23 | 7769 | |
783e057b DJ |
7770 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7771 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 7772 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 7773 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 7774 | |
783e057b DJ |
7775 | cat >>confdefs.h <<_ACEOF |
7776 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 7777 | _ACEOF |
20e95c23 | 7778 | |
20e95c23 | 7779 | |
20e95c23 | 7780 | |
0c4a4063 | 7781 | |
b14b1491 TT |
7782 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7783 | if test "x$prefix" = xNONE; then | |
7784 | test_prefix=/usr/local | |
7785 | else | |
7786 | test_prefix=$prefix | |
7787 | fi | |
783e057b | 7788 | else |
b14b1491 | 7789 | test_prefix=$exec_prefix |
783e057b | 7790 | fi |
b14b1491 TT |
7791 | value=0 |
7792 | case ${ac_define_dir} in | |
7793 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7794 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7795 | value=1 | |
7796 | ;; | |
7797 | esac | |
7798 | ||
7799 | cat >>confdefs.h <<_ACEOF | |
7800 | #define DEBUGDIR_RELOCATABLE $value | |
7801 | _ACEOF | |
7802 | ||
7803 | ||
7804 | ||
0c4a4063 | 7805 | |
b14b1491 TT |
7806 | # GDB's datadir relocation |
7807 | ||
7808 | ||
7809 | ||
81ecdfbb RW |
7810 | # Check whether --with-gdb-datadir was given. |
7811 | if test "${with_gdb_datadir+set}" = set; then : | |
7812 | withval=$with_gdb_datadir; | |
b14b1491 | 7813 | GDB_DATADIR=$withval |
20e95c23 | 7814 | else |
b14b1491 | 7815 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
7816 | fi |
7817 | ||
20e95c23 | 7818 | |
b14b1491 TT |
7819 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7820 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7821 | ac_define_dir=`eval echo $GDB_DATADIR` | |
7822 | ac_define_dir=`eval echo $ac_define_dir` | |
7823 | ||
7824 | cat >>confdefs.h <<_ACEOF | |
7825 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
7826 | _ACEOF |
7827 | ||
b14b1491 TT |
7828 | |
7829 | ||
0c4a4063 | 7830 | |
b14b1491 TT |
7831 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7832 | if test "x$prefix" = xNONE; then | |
7833 | test_prefix=/usr/local | |
7834 | else | |
7835 | test_prefix=$prefix | |
7836 | fi | |
7837 | else | |
7838 | test_prefix=$exec_prefix | |
7839 | fi | |
7840 | value=0 | |
7841 | case ${ac_define_dir} in | |
7842 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7843 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7844 | value=1 | |
7845 | ;; | |
7846 | esac | |
7847 | ||
7848 | cat >>confdefs.h <<_ACEOF | |
7849 | #define GDB_DATADIR_RELOCATABLE $value | |
7850 | _ACEOF | |
7851 | ||
7852 | ||
783e057b | 7853 | |
20e95c23 | 7854 | |
0c4a4063 | 7855 | |
81ecdfbb RW |
7856 | # Check whether --with-relocated-sources was given. |
7857 | if test "${with_relocated_sources+set}" = set; then : | |
7858 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
7859 | |
7860 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7861 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7862 | ac_define_dir=`eval echo $reloc_srcdir` | |
7863 | ac_define_dir=`eval echo $ac_define_dir` | |
7864 | ||
7865 | cat >>confdefs.h <<_ACEOF | |
7866 | #define RELOC_SRCDIR "$ac_define_dir" | |
7867 | _ACEOF | |
7868 | ||
7869 | ||
7870 | ||
81ecdfbb RW |
7871 | fi |
7872 | ||
29b0e8a2 JM |
7873 | |
7874 | ||
20e95c23 | 7875 | |
783e057b | 7876 | subdirs="$subdirs doc testsuite" |
20e95c23 DJ |
7877 | |
7878 | ||
783e057b | 7879 | # Check whether to support alternative target configurations |
81ecdfbb RW |
7880 | # Check whether --enable-targets was given. |
7881 | if test "${enable_targets+set}" = set; then : | |
7882 | enableval=$enable_targets; case "${enableval}" in | |
7883 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
7884 | ;; |
7885 | no) enable_targets= ;; | |
7886 | *) enable_targets=$enableval ;; | |
7887 | esac | |
81ecdfbb RW |
7888 | fi |
7889 | ||
20e95c23 | 7890 | |
783e057b | 7891 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
7892 | # Check whether --enable-64-bit-bfd was given. |
7893 | if test "${enable_64_bit_bfd+set}" = set; then : | |
7894 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
7895 | yes) want64=true ;; |
7896 | no) want64=false ;; | |
81ecdfbb | 7897 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
7898 | esac |
7899 | else | |
7900 | want64=false | |
81ecdfbb RW |
7901 | fi |
7902 | ||
783e057b DJ |
7903 | # Provide defaults for some variables set by the per-host and per-target |
7904 | # configuration. | |
7905 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 7906 | |
783e057b DJ |
7907 | if test "${target}" = "${host}"; then |
7908 | gdb_native=yes | |
7909 | else | |
7910 | gdb_native=no | |
7911 | fi | |
20e95c23 | 7912 | |
783e057b | 7913 | . $srcdir/configure.host |
20e95c23 | 7914 | |
783e057b | 7915 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 7916 | |
783e057b DJ |
7917 | TARGET_OBS= |
7918 | all_targets= | |
20e95c23 | 7919 | |
783e057b | 7920 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 7921 | do |
783e057b DJ |
7922 | if test "$targ_alias" = "all"; then |
7923 | all_targets=true | |
7924 | else | |
7925 | # Canonicalize the secondary target names. | |
7926 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
7927 | if test -n "$result"; then | |
7928 | targ=$result | |
7929 | else | |
7930 | targ=$targ_alias | |
7931 | fi | |
20e95c23 | 7932 | |
783e057b | 7933 | . ${srcdir}/configure.tgt |
20e95c23 | 7934 | |
bf307134 JB |
7935 | if test -z "${gdb_target_obs}"; then : |
7936 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
7937 | fi | |
7938 | ||
783e057b DJ |
7939 | # Target-specific object files |
7940 | for i in ${gdb_target_obs}; do | |
7941 | case " $TARGET_OBS " in | |
7942 | *" ${i} "*) ;; | |
7943 | *) | |
7944 | TARGET_OBS="$TARGET_OBS ${i}" | |
7945 | ;; | |
7946 | esac | |
7947 | done | |
20e95c23 | 7948 | |
783e057b DJ |
7949 | # Check whether this target needs 64-bit CORE_ADDR |
7950 | if test x${want64} = xfalse; then | |
7951 | . ${srcdir}/../bfd/config.bfd | |
7952 | fi | |
7953 | fi | |
20e95c23 DJ |
7954 | done |
7955 | ||
783e057b DJ |
7956 | if test x${all_targets} = xtrue; then |
7957 | ||
7958 | # We want all 64-bit targets if we either: | |
7959 | # - run on a 64-bit host or | |
7960 | # - already require 64-bit support for some other target or | |
7961 | # - the --enable-64-bit-bfd option was supplied | |
7962 | # Otherwise we only support all 32-bit targets. | |
7963 | # | |
7964 | # NOTE: This test must be in sync with the corresponding | |
7965 | # tests in BFD! | |
20e95c23 | 7966 | |
783e057b | 7967 | if test x${want64} = xfalse; then |
81ecdfbb RW |
7968 | # The cast to long int works around a bug in the HP C Compiler |
7969 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7970 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7971 | # This bug is HP SR number 8606223364. | |
7972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
7973 | $as_echo_n "checking size of long... " >&6; } | |
7974 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
7975 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 7976 | else |
81ecdfbb | 7977 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 7978 | |
81ecdfbb RW |
7979 | else |
7980 | if test "$ac_cv_type_long" = yes; then | |
7981 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7982 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7983 | { as_fn_set_status 77 | |
7984 | as_fn_error "cannot compute sizeof (long) | |
7985 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7986 | else | |
7987 | ac_cv_sizeof_long=0 | |
7988 | fi | |
c0993dbe | 7989 | fi |
81ecdfbb | 7990 | |
c0993dbe | 7991 | fi |
81ecdfbb RW |
7992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
7993 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 7994 | |
c0993dbe | 7995 | |
c0993dbe | 7996 | |
c0993dbe UW |
7997 | cat >>confdefs.h <<_ACEOF |
7998 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
7999 | _ACEOF | |
8000 | ||
8001 | ||
8002 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
8003 | want64=true | |
8004 | fi | |
8005 | fi | |
8006 | if test x${want64} = xtrue; then | |
8007 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
8008 | else | |
8009 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
8010 | fi | |
8011 | fi | |
8012 | ||
8013 | ||
8014 | ||
8015 | # For other settings, only the main target counts. | |
8016 | gdb_sim= | |
8017 | gdb_osabi= | |
8018 | build_gdbserver= | |
8019 | targ=$target; . ${srcdir}/configure.tgt | |
8020 | ||
8021 | # Fetch the default architecture and default target vector from BFD. | |
8022 | targ=$target; . $srcdir/../bfd/config.bfd | |
8023 | ||
8024 | # We only want the first architecture, so strip off the others if | |
8025 | # there is more than one. | |
8026 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
8027 | ||
8028 | if test "x$targ_archs" != x; then | |
8029 | ||
8030 | cat >>confdefs.h <<_ACEOF | |
8031 | #define DEFAULT_BFD_ARCH $targ_archs | |
8032 | _ACEOF | |
8033 | ||
8034 | fi | |
8035 | if test "x$targ_defvec" != x; then | |
8036 | ||
8037 | cat >>confdefs.h <<_ACEOF | |
8038 | #define DEFAULT_BFD_VEC $targ_defvec | |
8039 | _ACEOF | |
8040 | ||
8041 | fi | |
8042 | ||
c0993dbe UW |
8043 | # The CLI cannot be disabled yet, but may be in the future. |
8044 | ||
8045 | # Enable CLI. | |
81ecdfbb RW |
8046 | # Check whether --enable-gdbcli was given. |
8047 | if test "${enable_gdbcli+set}" = set; then : | |
8048 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
8049 | yes) |
8050 | ;; | |
8051 | no) | |
81ecdfbb | 8052 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 8053 | *) |
81ecdfbb | 8054 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
8055 | esac |
8056 | else | |
8057 | enable_gdbcli=yes | |
81ecdfbb RW |
8058 | fi |
8059 | ||
c0993dbe UW |
8060 | if test x"$enable_gdbcli" = xyes; then |
8061 | if test -d $srcdir/cli; then | |
8062 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
8063 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
8064 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
8065 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
8066 | fi | |
8067 | fi | |
8068 | ||
8069 | # Enable MI. | |
81ecdfbb RW |
8070 | # Check whether --enable-gdbmi was given. |
8071 | if test "${enable_gdbmi+set}" = set; then : | |
8072 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
8073 | yes | no) |
8074 | ;; | |
8075 | *) | |
81ecdfbb | 8076 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
8077 | esac |
8078 | else | |
8079 | enable_gdbmi=yes | |
81ecdfbb RW |
8080 | fi |
8081 | ||
c0993dbe UW |
8082 | if test x"$enable_gdbmi" = xyes; then |
8083 | if test -d $srcdir/mi; then | |
8084 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
8085 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
8086 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
8087 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
8088 | fi | |
8089 | fi | |
8090 | ||
8091 | # Enable TUI. | |
81ecdfbb RW |
8092 | # Check whether --enable-tui was given. |
8093 | if test "${enable_tui+set}" = set; then : | |
8094 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 8095 | yes | no | auto) |
c0993dbe UW |
8096 | ;; |
8097 | *) | |
81ecdfbb | 8098 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
8099 | esac |
8100 | else | |
3ca64bd3 | 8101 | enable_tui=auto |
81ecdfbb RW |
8102 | fi |
8103 | ||
c0993dbe UW |
8104 | |
8105 | # Enable gdbtk. | |
81ecdfbb RW |
8106 | # Check whether --enable-gdbtk was given. |
8107 | if test "${enable_gdbtk+set}" = set; then : | |
8108 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
8109 | yes | no) |
8110 | ;; | |
8111 | *) | |
81ecdfbb | 8112 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
8113 | esac |
8114 | else | |
5062cc19 | 8115 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
8116 | enable_gdbtk=yes |
8117 | else | |
8118 | enable_gdbtk=no | |
8119 | fi | |
81ecdfbb RW |
8120 | fi |
8121 | ||
c0993dbe UW |
8122 | # We unconditionally disable gdbtk tests on selected platforms. |
8123 | case $host_os in | |
8124 | go32* | windows*) | |
81ecdfbb RW |
8125 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
8126 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
8127 | enable_gdbtk=no ;; |
8128 | esac | |
8129 | ||
8130 | # Libunwind support. | |
bec39cab | 8131 | |
81ecdfbb RW |
8132 | # Check whether --with-libunwind was given. |
8133 | if test "${with_libunwind+set}" = set; then : | |
8134 | withval=$with_libunwind; case "${withval}" in | |
bec39cab AC |
8135 | yes) enable_libunwind=yes ;; |
8136 | no) enable_libunwind=no ;; | |
81ecdfbb | 8137 | *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;; |
bec39cab | 8138 | esac |
bec39cab | 8139 | else |
bec39cab | 8140 | |
81ecdfbb RW |
8141 | for ac_header in libunwind.h libunwind-ia64.h |
8142 | do : | |
8143 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8144 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8145 | eval as_val=\$$as_ac_Header | |
8146 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8147 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8148 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8149 | _ACEOF |
8150 | ||
8151 | fi | |
8152 | ||
8153 | done | |
8154 | ||
a9322a30 TT |
8155 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then |
8156 | enable_libunwind=yes; | |
8157 | fi | |
8158 | ||
bec39cab | 8159 | fi |
bec39cab | 8160 | |
bec39cab | 8161 | |
81ecdfbb RW |
8162 | if test x"$enable_libunwind" = xyes; then |
8163 | for ac_header in libunwind.h libunwind-ia64.h | |
8164 | do : | |
8165 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8166 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8167 | eval as_val=\$$as_ac_Header | |
8168 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8169 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8170 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8171 | _ACEOF |
8172 | ||
8173 | fi | |
8174 | ||
8175 | done | |
8176 | ||
bec39cab | 8177 | |
81ecdfbb | 8178 | $as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h |
a9322a30 TT |
8179 | |
8180 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
8181 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
8182 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
8183 | fi | |
8184 | ||
cb01cfba JB |
8185 | opt_curses=no |
8186 | ||
81ecdfbb RW |
8187 | # Check whether --with-curses was given. |
8188 | if test "${with_curses+set}" = set; then : | |
8189 | withval=$with_curses; opt_curses=$withval | |
8190 | fi | |
8191 | ||
cb01cfba | 8192 | |
76a39ba7 | 8193 | prefer_curses=no |
cb01cfba | 8194 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 8195 | prefer_curses=yes |
cb01cfba JB |
8196 | fi |
8197 | ||
a9322a30 | 8198 | # Profiling support. |
81ecdfbb RW |
8199 | # Check whether --enable-profiling was given. |
8200 | if test "${enable_profiling+set}" = set; then : | |
8201 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
8202 | yes | no) |
8203 | ;; | |
8204 | *) | |
81ecdfbb | 8205 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
8206 | esac |
8207 | else | |
8208 | enable_profiling=no | |
81ecdfbb | 8209 | fi |
bec39cab | 8210 | |
a9322a30 TT |
8211 | |
8212 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
8213 | do : |
8214 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8215 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8216 | eval as_val=\$$as_ac_var | |
8217 | if test "x$as_val" = x""yes; then : | |
8218 | cat >>confdefs.h <<_ACEOF | |
8219 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 8220 | _ACEOF |
a9322a30 | 8221 | |
81ecdfbb RW |
8222 | fi |
8223 | done | |
a9322a30 | 8224 | |
81ecdfbb RW |
8225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
8226 | $as_echo_n "checking for _etext... " >&6; } | |
8227 | if test "${ac_cv_var__etext+set}" = set; then : | |
8228 | $as_echo_n "(cached) " >&6 | |
8229 | else | |
8230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8231 | /* end confdefs.h. */ | |
8232 | #include <stdlib.h> | |
8233 | extern char _etext; | |
a9322a30 TT |
8234 | |
8235 | int | |
8236 | main () | |
8237 | { | |
8238 | free (&_etext); | |
8239 | ; | |
8240 | return 0; | |
8241 | } | |
bec39cab | 8242 | _ACEOF |
81ecdfbb | 8243 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8244 | ac_cv_var__etext=yes |
bec39cab | 8245 | else |
81ecdfbb | 8246 | ac_cv_var__etext=no |
bec39cab | 8247 | fi |
81ecdfbb RW |
8248 | rm -f core conftest.err conftest.$ac_objext \ |
8249 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8250 | fi |
81ecdfbb RW |
8251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
8252 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 8253 | if test $ac_cv_var__etext = yes; then |
60ca704f | 8254 | |
81ecdfbb | 8255 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 8256 | |
bec39cab | 8257 | fi |
81ecdfbb RW |
8258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
8259 | $as_echo_n "checking for etext... " >&6; } | |
8260 | if test "${ac_cv_var_etext+set}" = set; then : | |
8261 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8262 | else |
81ecdfbb | 8263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8264 | /* end confdefs.h. */ |
a9322a30 TT |
8265 | #include <stdlib.h> |
8266 | extern char etext; | |
bec39cab AC |
8267 | |
8268 | int | |
8269 | main () | |
8270 | { | |
a9322a30 | 8271 | free (&etext); |
bec39cab AC |
8272 | ; |
8273 | return 0; | |
8274 | } | |
8275 | _ACEOF | |
81ecdfbb | 8276 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8277 | ac_cv_var_etext=yes |
bec39cab | 8278 | else |
81ecdfbb | 8279 | ac_cv_var_etext=no |
bec39cab | 8280 | fi |
81ecdfbb RW |
8281 | rm -f core conftest.err conftest.$ac_objext \ |
8282 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8283 | fi |
81ecdfbb RW |
8284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
8285 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
8286 | if test $ac_cv_var_etext = yes; then |
8287 | ||
81ecdfbb | 8288 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
8289 | |
8290 | fi | |
a9322a30 TT |
8291 | if test "$enable_profiling" = yes ; then |
8292 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 8293 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
8294 | fi |
8295 | PROFILE_CFLAGS=-pg | |
8296 | OLD_CFLAGS="$CFLAGS" | |
8297 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 8298 | |
81ecdfbb RW |
8299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
8300 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
8301 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
8302 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8303 | else |
81ecdfbb | 8304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8305 | /* end confdefs.h. */ |
bec39cab AC |
8306 | |
8307 | int | |
8308 | main () | |
8309 | { | |
a9322a30 | 8310 | int x; |
bec39cab AC |
8311 | ; |
8312 | return 0; | |
8313 | } | |
8314 | _ACEOF | |
81ecdfbb | 8315 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 8316 | ac_cv_cc_supports_pg=yes |
bec39cab | 8317 | else |
81ecdfbb | 8318 | ac_cv_cc_supports_pg=no |
bec39cab | 8319 | fi |
81ecdfbb | 8320 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8321 | fi |
81ecdfbb RW |
8322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
8323 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 8324 | |
a9322a30 | 8325 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 8326 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 8327 | fi |
bec39cab | 8328 | |
a9322a30 | 8329 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
8330 | fi |
8331 | ||
c16158bc JM |
8332 | |
8333 | ||
81ecdfbb RW |
8334 | # Check whether --with-pkgversion was given. |
8335 | if test "${with_pkgversion+set}" = set; then : | |
8336 | withval=$with_pkgversion; case "$withval" in | |
8337 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8338 | no) PKGVERSION= ;; |
8339 | *) PKGVERSION="($withval) " ;; | |
8340 | esac | |
8341 | else | |
8342 | PKGVERSION="(GDB) " | |
8343 | ||
81ecdfbb | 8344 | fi |
c16158bc JM |
8345 | |
8346 | ||
8347 | ||
8348 | ||
81ecdfbb RW |
8349 | |
8350 | # Check whether --with-bugurl was given. | |
8351 | if test "${with_bugurl+set}" = set; then : | |
8352 | withval=$with_bugurl; case "$withval" in | |
8353 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8354 | no) BUGURL= |
8355 | ;; | |
8356 | *) BUGURL="$withval" | |
8357 | ;; | |
8358 | esac | |
8359 | else | |
8360 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
8361 | ||
81ecdfbb RW |
8362 | fi |
8363 | ||
c16158bc JM |
8364 | case ${BUGURL} in |
8365 | "") | |
8366 | REPORT_BUGS_TO= | |
8367 | REPORT_BUGS_TEXI= | |
8368 | ;; | |
8369 | *) | |
8370 | REPORT_BUGS_TO="<$BUGURL>" | |
8371 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
8372 | ;; | |
8373 | esac; | |
8374 | ||
8375 | ||
8376 | ||
8377 | ||
8378 | cat >>confdefs.h <<_ACEOF | |
8379 | #define PKGVERSION "$PKGVERSION" | |
8380 | _ACEOF | |
8381 | ||
8382 | ||
8383 | cat >>confdefs.h <<_ACEOF | |
8384 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
8385 | _ACEOF | |
8386 | ||
8387 | ||
bec39cab AC |
8388 | # --------------------- # |
8389 | # Checks for programs. # | |
8390 | # --------------------- # | |
8391 | ||
8392 | for ac_prog in gawk mawk nawk awk | |
8393 | do | |
8394 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8395 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8397 | $as_echo_n "checking for $ac_word... " >&6; } | |
8398 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
8399 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8400 | else |
8401 | if test -n "$AWK"; then | |
8402 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
8403 | else | |
8404 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8405 | for as_dir in $PATH | |
8406 | do | |
8407 | IFS=$as_save_IFS | |
8408 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8409 | for ac_exec_ext in '' $ac_executable_extensions; do |
8410 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8411 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 8412 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8413 | break 2 |
8414 | fi | |
8415 | done | |
81ecdfbb RW |
8416 | done |
8417 | IFS=$as_save_IFS | |
bec39cab AC |
8418 | |
8419 | fi | |
8420 | fi | |
8421 | AWK=$ac_cv_prog_AWK | |
8422 | if test -n "$AWK"; then | |
81ecdfbb RW |
8423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
8424 | $as_echo "$AWK" >&6; } | |
bec39cab | 8425 | else |
81ecdfbb RW |
8426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8427 | $as_echo "no" >&6; } | |
bec39cab AC |
8428 | fi |
8429 | ||
bec39cab | 8430 | |
81ecdfbb | 8431 | test -n "$AWK" && break |
bec39cab AC |
8432 | done |
8433 | ||
bec39cab | 8434 | |
81ecdfbb RW |
8435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
8436 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
8437 | LN_S=$as_ln_s |
8438 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
8439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
8440 | $as_echo "yes" >&6; } | |
bec39cab | 8441 | else |
81ecdfbb RW |
8442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
8443 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
8444 | fi |
8445 | ||
8446 | if test -n "$ac_tool_prefix"; then | |
8447 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
8448 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
8449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8450 | $as_echo_n "checking for $ac_word... " >&6; } | |
8451 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
8452 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8453 | else |
8454 | if test -n "$RANLIB"; then | |
8455 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
8456 | else | |
8457 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8458 | for as_dir in $PATH | |
8459 | do | |
8460 | IFS=$as_save_IFS | |
8461 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8462 | for ac_exec_ext in '' $ac_executable_extensions; do |
8463 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8464 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 8465 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8466 | break 2 |
8467 | fi | |
8468 | done | |
81ecdfbb RW |
8469 | done |
8470 | IFS=$as_save_IFS | |
bec39cab AC |
8471 | |
8472 | fi | |
8473 | fi | |
8474 | RANLIB=$ac_cv_prog_RANLIB | |
8475 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
8476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
8477 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 8478 | else |
81ecdfbb RW |
8479 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8480 | $as_echo "no" >&6; } | |
bec39cab AC |
8481 | fi |
8482 | ||
81ecdfbb | 8483 | |
bec39cab AC |
8484 | fi |
8485 | if test -z "$ac_cv_prog_RANLIB"; then | |
8486 | ac_ct_RANLIB=$RANLIB | |
8487 | # Extract the first word of "ranlib", so it can be a program name with args. | |
8488 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
8489 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8490 | $as_echo_n "checking for $ac_word... " >&6; } | |
8491 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
8492 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8493 | else |
8494 | if test -n "$ac_ct_RANLIB"; then | |
8495 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
8496 | else | |
8497 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8498 | for as_dir in $PATH | |
8499 | do | |
8500 | IFS=$as_save_IFS | |
8501 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8502 | for ac_exec_ext in '' $ac_executable_extensions; do |
8503 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8504 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 8505 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8506 | break 2 |
8507 | fi | |
8508 | done | |
81ecdfbb RW |
8509 | done |
8510 | IFS=$as_save_IFS | |
bec39cab | 8511 | |
bec39cab AC |
8512 | fi |
8513 | fi | |
8514 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
8515 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
8516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
8517 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 8518 | else |
81ecdfbb RW |
8519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8520 | $as_echo "no" >&6; } | |
bec39cab AC |
8521 | fi |
8522 | ||
81ecdfbb RW |
8523 | if test "x$ac_ct_RANLIB" = x; then |
8524 | RANLIB=":" | |
8525 | else | |
8526 | case $cross_compiling:$ac_tool_warned in | |
8527 | yes:) | |
8528 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8529 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8530 | ac_tool_warned=yes ;; | |
8531 | esac | |
8532 | RANLIB=$ac_ct_RANLIB | |
8533 | fi | |
bec39cab AC |
8534 | else |
8535 | RANLIB="$ac_cv_prog_RANLIB" | |
8536 | fi | |
8537 | ||
8538 | for ac_prog in 'bison -y' byacc | |
8539 | do | |
8540 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8541 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8543 | $as_echo_n "checking for $ac_word... " >&6; } | |
8544 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
8545 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8546 | else |
8547 | if test -n "$YACC"; then | |
8548 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
8549 | else | |
8550 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8551 | for as_dir in $PATH | |
8552 | do | |
8553 | IFS=$as_save_IFS | |
8554 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8555 | for ac_exec_ext in '' $ac_executable_extensions; do |
8556 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8557 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 8558 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8559 | break 2 |
8560 | fi | |
8561 | done | |
81ecdfbb RW |
8562 | done |
8563 | IFS=$as_save_IFS | |
bec39cab AC |
8564 | |
8565 | fi | |
8566 | fi | |
8567 | YACC=$ac_cv_prog_YACC | |
8568 | if test -n "$YACC"; then | |
81ecdfbb RW |
8569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
8570 | $as_echo "$YACC" >&6; } | |
bec39cab | 8571 | else |
81ecdfbb RW |
8572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8573 | $as_echo "no" >&6; } | |
bec39cab AC |
8574 | fi |
8575 | ||
81ecdfbb | 8576 | |
bec39cab AC |
8577 | test -n "$YACC" && break |
8578 | done | |
8579 | test -n "$YACC" || YACC="yacc" | |
8580 | ||
8581 | ||
8582 | if test -n "$ac_tool_prefix"; then | |
8583 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
8584 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
8585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8586 | $as_echo_n "checking for $ac_word... " >&6; } | |
8587 | if test "${ac_cv_prog_AR+set}" = set; then : | |
8588 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8589 | else |
8590 | if test -n "$AR"; then | |
8591 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
8592 | else | |
8593 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8594 | for as_dir in $PATH | |
8595 | do | |
8596 | IFS=$as_save_IFS | |
8597 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8598 | for ac_exec_ext in '' $ac_executable_extensions; do |
8599 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8600 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 8601 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8602 | break 2 |
8603 | fi | |
8604 | done | |
81ecdfbb RW |
8605 | done |
8606 | IFS=$as_save_IFS | |
bec39cab AC |
8607 | |
8608 | fi | |
8609 | fi | |
8610 | AR=$ac_cv_prog_AR | |
8611 | if test -n "$AR"; then | |
81ecdfbb RW |
8612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
8613 | $as_echo "$AR" >&6; } | |
bec39cab | 8614 | else |
81ecdfbb RW |
8615 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8616 | $as_echo "no" >&6; } | |
bec39cab AC |
8617 | fi |
8618 | ||
81ecdfbb | 8619 | |
bec39cab AC |
8620 | fi |
8621 | if test -z "$ac_cv_prog_AR"; then | |
8622 | ac_ct_AR=$AR | |
8623 | # Extract the first word of "ar", so it can be a program name with args. | |
8624 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
8625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8626 | $as_echo_n "checking for $ac_word... " >&6; } | |
8627 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
8628 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8629 | else |
8630 | if test -n "$ac_ct_AR"; then | |
8631 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
8632 | else | |
8633 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8634 | for as_dir in $PATH | |
8635 | do | |
8636 | IFS=$as_save_IFS | |
8637 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8638 | for ac_exec_ext in '' $ac_executable_extensions; do |
8639 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8640 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 8641 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8642 | break 2 |
8643 | fi | |
8644 | done | |
81ecdfbb RW |
8645 | done |
8646 | IFS=$as_save_IFS | |
bec39cab AC |
8647 | |
8648 | fi | |
8649 | fi | |
8650 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
8651 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
8652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
8653 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 8654 | else |
81ecdfbb RW |
8655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8656 | $as_echo "no" >&6; } | |
bec39cab AC |
8657 | fi |
8658 | ||
81ecdfbb RW |
8659 | if test "x$ac_ct_AR" = x; then |
8660 | AR="" | |
8661 | else | |
8662 | case $cross_compiling:$ac_tool_warned in | |
8663 | yes:) | |
8664 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8665 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8666 | ac_tool_warned=yes ;; | |
8667 | esac | |
8668 | AR=$ac_ct_AR | |
8669 | fi | |
bec39cab AC |
8670 | else |
8671 | AR="$ac_cv_prog_AR" | |
8672 | fi | |
8673 | ||
8674 | if test -n "$ac_tool_prefix"; then | |
8675 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
8676 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
8677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8678 | $as_echo_n "checking for $ac_word... " >&6; } | |
8679 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
8680 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8681 | else |
8682 | if test -n "$DLLTOOL"; then | |
8683 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
8684 | else | |
8685 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8686 | for as_dir in $PATH | |
8687 | do | |
8688 | IFS=$as_save_IFS | |
8689 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8690 | for ac_exec_ext in '' $ac_executable_extensions; do |
8691 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8692 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 8693 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8694 | break 2 |
8695 | fi | |
8696 | done | |
81ecdfbb RW |
8697 | done |
8698 | IFS=$as_save_IFS | |
bec39cab AC |
8699 | |
8700 | fi | |
8701 | fi | |
8702 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
8703 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
8704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
8705 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 8706 | else |
81ecdfbb RW |
8707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8708 | $as_echo "no" >&6; } | |
bec39cab AC |
8709 | fi |
8710 | ||
81ecdfbb | 8711 | |
bec39cab AC |
8712 | fi |
8713 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
8714 | ac_ct_DLLTOOL=$DLLTOOL | |
8715 | # Extract the first word of "dlltool", so it can be a program name with args. | |
8716 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
8717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8718 | $as_echo_n "checking for $ac_word... " >&6; } | |
8719 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
8720 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8721 | else |
8722 | if test -n "$ac_ct_DLLTOOL"; then | |
8723 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
8724 | else | |
8725 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8726 | for as_dir in $PATH | |
8727 | do | |
8728 | IFS=$as_save_IFS | |
8729 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8730 | for ac_exec_ext in '' $ac_executable_extensions; do |
8731 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8732 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 8733 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8734 | break 2 |
8735 | fi | |
8736 | done | |
81ecdfbb RW |
8737 | done |
8738 | IFS=$as_save_IFS | |
bec39cab AC |
8739 | |
8740 | fi | |
8741 | fi | |
8742 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
8743 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
8744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
8745 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 8746 | else |
81ecdfbb RW |
8747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8748 | $as_echo "no" >&6; } | |
bec39cab AC |
8749 | fi |
8750 | ||
81ecdfbb RW |
8751 | if test "x$ac_ct_DLLTOOL" = x; then |
8752 | DLLTOOL="" | |
8753 | else | |
8754 | case $cross_compiling:$ac_tool_warned in | |
8755 | yes:) | |
8756 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8757 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8758 | ac_tool_warned=yes ;; | |
8759 | esac | |
8760 | DLLTOOL=$ac_ct_DLLTOOL | |
8761 | fi | |
bec39cab AC |
8762 | else |
8763 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
8764 | fi | |
8765 | ||
8766 | if test -n "$ac_tool_prefix"; then | |
8767 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
8768 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
8769 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8770 | $as_echo_n "checking for $ac_word... " >&6; } | |
8771 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
8772 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8773 | else |
8774 | if test -n "$WINDRES"; then | |
8775 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
8776 | else | |
8777 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8778 | for as_dir in $PATH | |
8779 | do | |
8780 | IFS=$as_save_IFS | |
8781 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8782 | for ac_exec_ext in '' $ac_executable_extensions; do |
8783 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8784 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 8785 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8786 | break 2 |
8787 | fi | |
8788 | done | |
81ecdfbb RW |
8789 | done |
8790 | IFS=$as_save_IFS | |
bec39cab AC |
8791 | |
8792 | fi | |
8793 | fi | |
8794 | WINDRES=$ac_cv_prog_WINDRES | |
8795 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
8796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
8797 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 8798 | else |
81ecdfbb RW |
8799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8800 | $as_echo "no" >&6; } | |
bec39cab AC |
8801 | fi |
8802 | ||
81ecdfbb | 8803 | |
bec39cab AC |
8804 | fi |
8805 | if test -z "$ac_cv_prog_WINDRES"; then | |
8806 | ac_ct_WINDRES=$WINDRES | |
8807 | # Extract the first word of "windres", so it can be a program name with args. | |
8808 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
8809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8810 | $as_echo_n "checking for $ac_word... " >&6; } | |
8811 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
8812 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8813 | else |
8814 | if test -n "$ac_ct_WINDRES"; then | |
8815 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
8816 | else | |
8817 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8818 | for as_dir in $PATH | |
8819 | do | |
8820 | IFS=$as_save_IFS | |
8821 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8822 | for ac_exec_ext in '' $ac_executable_extensions; do |
8823 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8824 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 8825 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8826 | break 2 |
8827 | fi | |
8828 | done | |
81ecdfbb RW |
8829 | done |
8830 | IFS=$as_save_IFS | |
bec39cab AC |
8831 | |
8832 | fi | |
8833 | fi | |
8834 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
8835 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
8836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
8837 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 8838 | else |
81ecdfbb RW |
8839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8840 | $as_echo "no" >&6; } | |
c906108c | 8841 | fi |
bec39cab | 8842 | |
81ecdfbb RW |
8843 | if test "x$ac_ct_WINDRES" = x; then |
8844 | WINDRES="" | |
8845 | else | |
8846 | case $cross_compiling:$ac_tool_warned in | |
8847 | yes:) | |
8848 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8849 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8850 | ac_tool_warned=yes ;; | |
8851 | esac | |
8852 | WINDRES=$ac_ct_WINDRES | |
8853 | fi | |
c906108c | 8854 | else |
bec39cab | 8855 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
8856 | fi |
8857 | ||
bec39cab AC |
8858 | |
8859 | # Needed for GNU/Hurd. | |
8860 | if test -n "$ac_tool_prefix"; then | |
8861 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
8862 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
8863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8864 | $as_echo_n "checking for $ac_word... " >&6; } | |
8865 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
8866 | $as_echo_n "(cached) " >&6 | |
c906108c | 8867 | else |
bec39cab AC |
8868 | if test -n "$MIG"; then |
8869 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
8870 | else | |
8871 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8872 | for as_dir in $PATH | |
8873 | do | |
8874 | IFS=$as_save_IFS | |
8875 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8876 | for ac_exec_ext in '' $ac_executable_extensions; do |
8877 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8878 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 8879 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8880 | break 2 |
8881 | fi | |
8882 | done | |
81ecdfbb RW |
8883 | done |
8884 | IFS=$as_save_IFS | |
bec39cab | 8885 | |
c906108c | 8886 | fi |
bec39cab AC |
8887 | fi |
8888 | MIG=$ac_cv_prog_MIG | |
8889 | if test -n "$MIG"; then | |
81ecdfbb RW |
8890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
8891 | $as_echo "$MIG" >&6; } | |
c906108c | 8892 | else |
81ecdfbb RW |
8893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8894 | $as_echo "no" >&6; } | |
c906108c SS |
8895 | fi |
8896 | ||
81ecdfbb | 8897 | |
bec39cab AC |
8898 | fi |
8899 | if test -z "$ac_cv_prog_MIG"; then | |
8900 | ac_ct_MIG=$MIG | |
8901 | # Extract the first word of "mig", so it can be a program name with args. | |
8902 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
8903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8904 | $as_echo_n "checking for $ac_word... " >&6; } | |
8905 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
8906 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8907 | else |
8908 | if test -n "$ac_ct_MIG"; then | |
8909 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8910 | else | |
8911 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8912 | for as_dir in $PATH | |
8913 | do | |
8914 | IFS=$as_save_IFS | |
8915 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8916 | for ac_exec_ext in '' $ac_executable_extensions; do |
8917 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8918 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8919 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8920 | break 2 |
8921 | fi | |
8922 | done | |
81ecdfbb RW |
8923 | done |
8924 | IFS=$as_save_IFS | |
c906108c | 8925 | |
bec39cab AC |
8926 | fi |
8927 | fi | |
8928 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8929 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8931 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8932 | else |
81ecdfbb RW |
8933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8934 | $as_echo "no" >&6; } | |
bec39cab | 8935 | fi |
c906108c | 8936 | |
81ecdfbb RW |
8937 | if test "x$ac_ct_MIG" = x; then |
8938 | MIG="" | |
8939 | else | |
8940 | case $cross_compiling:$ac_tool_warned in | |
8941 | yes:) | |
8942 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8943 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8944 | ac_tool_warned=yes ;; | |
8945 | esac | |
8946 | MIG=$ac_ct_MIG | |
8947 | fi | |
bec39cab AC |
8948 | else |
8949 | MIG="$ac_cv_prog_MIG" | |
8950 | fi | |
c906108c | 8951 | |
c906108c | 8952 | |
bec39cab AC |
8953 | # ---------------------- # |
8954 | # Checks for libraries. # | |
8955 | # ---------------------- # | |
c906108c | 8956 | |
bec39cab | 8957 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8959 | $as_echo_n "checking for main in -lm... " >&6; } | |
8960 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
8961 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8962 | else |
8963 | ac_check_lib_save_LIBS=$LIBS | |
8964 | LIBS="-lm $LIBS" | |
81ecdfbb | 8965 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8966 | /* end confdefs.h. */ |
c906108c | 8967 | |
c906108c | 8968 | |
bec39cab AC |
8969 | int |
8970 | main () | |
8971 | { | |
81ecdfbb | 8972 | return main (); |
bec39cab AC |
8973 | ; |
8974 | return 0; | |
8975 | } | |
8976 | _ACEOF | |
81ecdfbb | 8977 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8978 | ac_cv_lib_m_main=yes |
8979 | else | |
81ecdfbb | 8980 | ac_cv_lib_m_main=no |
bec39cab | 8981 | fi |
81ecdfbb RW |
8982 | rm -f core conftest.err conftest.$ac_objext \ |
8983 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
8984 | LIBS=$ac_check_lib_save_LIBS |
8985 | fi | |
81ecdfbb RW |
8986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
8987 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
8988 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
8989 | cat >>confdefs.h <<_ACEOF |
8990 | #define HAVE_LIBM 1 | |
8991 | _ACEOF | |
8992 | ||
8993 | LIBS="-lm $LIBS" | |
c906108c | 8994 | |
c906108c | 8995 | fi |
bec39cab AC |
8996 | |
8997 | ||
8998 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
8999 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
9000 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
9001 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
9002 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
9003 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 9004 | |
c906108c | 9005 | else |
81ecdfbb RW |
9006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
9007 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
9008 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
9009 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9010 | else |
9011 | ac_check_lib_save_LIBS=$LIBS | |
9012 | LIBS="-lw $LIBS" | |
81ecdfbb | 9013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9014 | /* end confdefs.h. */ |
c906108c | 9015 | |
81ecdfbb RW |
9016 | /* Override any GCC internal prototype to avoid an error. |
9017 | Use char because int might match the return type of a GCC | |
9018 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9019 | #ifdef __cplusplus |
9020 | extern "C" | |
9021 | #endif | |
bec39cab AC |
9022 | char wctype (); |
9023 | int | |
9024 | main () | |
9025 | { | |
81ecdfbb | 9026 | return wctype (); |
bec39cab AC |
9027 | ; |
9028 | return 0; | |
9029 | } | |
9030 | _ACEOF | |
81ecdfbb | 9031 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
9032 | ac_cv_lib_w_wctype=yes |
9033 | else | |
81ecdfbb | 9034 | ac_cv_lib_w_wctype=no |
bec39cab | 9035 | fi |
81ecdfbb RW |
9036 | rm -f core conftest.err conftest.$ac_objext \ |
9037 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
9038 | LIBS=$ac_check_lib_save_LIBS |
9039 | fi | |
81ecdfbb RW |
9040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
9041 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
9042 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
9043 | cat >>confdefs.h <<_ACEOF |
9044 | #define HAVE_LIBW 1 | |
9045 | _ACEOF | |
c906108c | 9046 | |
bec39cab | 9047 | LIBS="-lw $LIBS" |
c906108c | 9048 | |
bec39cab | 9049 | fi |
c906108c | 9050 | |
bec39cab | 9051 | fi |
c906108c | 9052 | |
ddc9cd0f | 9053 | |
bec39cab | 9054 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
9055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
9056 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
9057 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9058 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9059 | else |
9060 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9062 | /* end confdefs.h. */ |
ddc9cd0f | 9063 | |
81ecdfbb RW |
9064 | /* Override any GCC internal prototype to avoid an error. |
9065 | Use char because int might match the return type of a GCC | |
9066 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9067 | #ifdef __cplusplus |
9068 | extern "C" | |
9069 | #endif | |
bec39cab AC |
9070 | char gethostbyname (); |
9071 | int | |
9072 | main () | |
9073 | { | |
81ecdfbb | 9074 | return gethostbyname (); |
bec39cab AC |
9075 | ; |
9076 | return 0; | |
9077 | } | |
9078 | _ACEOF | |
81ecdfbb RW |
9079 | for ac_lib in '' nsl; do |
9080 | if test -z "$ac_lib"; then | |
9081 | ac_res="none required" | |
9082 | else | |
9083 | ac_res=-l$ac_lib | |
b4e70030 | 9084 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9085 | fi |
9086 | if ac_fn_c_try_link "$LINENO"; then : | |
9087 | ac_cv_search_gethostbyname=$ac_res | |
9088 | fi | |
9089 | rm -f core conftest.err conftest.$ac_objext \ | |
9090 | conftest$ac_exeext | |
9091 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9092 | break | |
9093 | fi | |
9094 | done | |
9095 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 9096 | |
bec39cab | 9097 | else |
81ecdfbb | 9098 | ac_cv_search_gethostbyname=no |
bec39cab | 9099 | fi |
81ecdfbb | 9100 | rm conftest.$ac_ext |
bec39cab AC |
9101 | LIBS=$ac_func_search_save_LIBS |
9102 | fi | |
81ecdfbb RW |
9103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
9104 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
9105 | ac_res=$ac_cv_search_gethostbyname | |
9106 | if test "$ac_res" != no; then : | |
9107 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 9108 | |
bec39cab | 9109 | fi |
96baa820 | 9110 | |
c906108c | 9111 | |
b4e70030 | 9112 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
9113 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
9114 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
9115 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9116 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
9117 | else |
9118 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9120 | /* end confdefs.h. */ |
9121 | ||
81ecdfbb RW |
9122 | /* Override any GCC internal prototype to avoid an error. |
9123 | Use char because int might match the return type of a GCC | |
9124 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
9125 | #ifdef __cplusplus |
9126 | extern "C" | |
9127 | #endif | |
b4e70030 JB |
9128 | char socketpair (); |
9129 | int | |
9130 | main () | |
9131 | { | |
81ecdfbb | 9132 | return socketpair (); |
b4e70030 JB |
9133 | ; |
9134 | return 0; | |
9135 | } | |
9136 | _ACEOF | |
81ecdfbb RW |
9137 | for ac_lib in '' socket; do |
9138 | if test -z "$ac_lib"; then | |
9139 | ac_res="none required" | |
9140 | else | |
9141 | ac_res=-l$ac_lib | |
b4e70030 | 9142 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9143 | fi |
9144 | if ac_fn_c_try_link "$LINENO"; then : | |
9145 | ac_cv_search_socketpair=$ac_res | |
9146 | fi | |
9147 | rm -f core conftest.err conftest.$ac_objext \ | |
9148 | conftest$ac_exeext | |
9149 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9150 | break | |
9151 | fi | |
9152 | done | |
9153 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 9154 | |
b4e70030 | 9155 | else |
81ecdfbb | 9156 | ac_cv_search_socketpair=no |
b4e70030 | 9157 | fi |
81ecdfbb | 9158 | rm conftest.$ac_ext |
b4e70030 JB |
9159 | LIBS=$ac_func_search_save_LIBS |
9160 | fi | |
81ecdfbb RW |
9161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
9162 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
9163 | ac_res=$ac_cv_search_socketpair | |
9164 | if test "$ac_res" != no; then : | |
9165 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
9166 | |
9167 | fi | |
9168 | ||
9169 | ||
233a11ab | 9170 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
9171 | |
9172 | # See if the user specified whether he wants zlib support or not. | |
9173 | ||
9174 | # Check whether --with-zlib was given. | |
9175 | if test "${with_zlib+set}" = set; then : | |
9176 | withval=$with_zlib; | |
9177 | else | |
9178 | with_zlib=auto | |
9179 | fi | |
9180 | ||
9181 | ||
9182 | if test "$with_zlib" != "no"; then | |
9183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
9184 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
9185 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9186 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
9187 | else |
9188 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
9190 | /* end confdefs.h. */ |
9191 | ||
81ecdfbb RW |
9192 | /* Override any GCC internal prototype to avoid an error. |
9193 | Use char because int might match the return type of a GCC | |
233a11ab | 9194 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
9195 | #ifdef __cplusplus |
9196 | extern "C" | |
9197 | #endif | |
233a11ab CS |
9198 | char zlibVersion (); |
9199 | int | |
9200 | main () | |
9201 | { | |
81ecdfbb | 9202 | return zlibVersion (); |
233a11ab CS |
9203 | ; |
9204 | return 0; | |
9205 | } | |
9206 | _ACEOF | |
81ecdfbb RW |
9207 | for ac_lib in '' z; do |
9208 | if test -z "$ac_lib"; then | |
9209 | ac_res="none required" | |
233a11ab | 9210 | else |
81ecdfbb RW |
9211 | ac_res=-l$ac_lib |
9212 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 9213 | fi |
81ecdfbb RW |
9214 | if ac_fn_c_try_link "$LINENO"; then : |
9215 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 9216 | fi |
81ecdfbb RW |
9217 | rm -f core conftest.err conftest.$ac_objext \ |
9218 | conftest$ac_exeext | |
9219 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9220 | break | |
233a11ab | 9221 | fi |
81ecdfbb RW |
9222 | done |
9223 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 9224 | |
233a11ab | 9225 | else |
81ecdfbb | 9226 | ac_cv_search_zlibVersion=no |
233a11ab | 9227 | fi |
81ecdfbb RW |
9228 | rm conftest.$ac_ext |
9229 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 9230 | fi |
81ecdfbb RW |
9231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
9232 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
9233 | ac_res=$ac_cv_search_zlibVersion | |
9234 | if test "$ac_res" != no; then : | |
9235 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9236 | for ac_header in zlib.h | |
9237 | do : | |
9238 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
9239 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 9240 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9241 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
9242 | _ACEOF |
9243 | ||
9244 | fi | |
9245 | ||
9246 | done | |
9247 | ||
9248 | fi | |
9249 | ||
b040ad30 JB |
9250 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
9251 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
9252 | fi | |
9253 | fi | |
9254 | ||
233a11ab | 9255 | |
77f120bf | 9256 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
9257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
9258 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
9259 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9260 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9261 | else |
9262 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9264 | /* end confdefs.h. */ |
c906108c | 9265 | |
81ecdfbb RW |
9266 | /* Override any GCC internal prototype to avoid an error. |
9267 | Use char because int might match the return type of a GCC | |
9268 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9269 | #ifdef __cplusplus |
9270 | extern "C" | |
9271 | #endif | |
77f120bf | 9272 | char dlgetmodinfo (); |
bec39cab AC |
9273 | int |
9274 | main () | |
9275 | { | |
81ecdfbb | 9276 | return dlgetmodinfo (); |
bec39cab AC |
9277 | ; |
9278 | return 0; | |
9279 | } | |
9280 | _ACEOF | |
81ecdfbb RW |
9281 | for ac_lib in '' dl xpdl; do |
9282 | if test -z "$ac_lib"; then | |
9283 | ac_res="none required" | |
9284 | else | |
9285 | ac_res=-l$ac_lib | |
b4e70030 | 9286 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9287 | fi |
9288 | if ac_fn_c_try_link "$LINENO"; then : | |
9289 | ac_cv_search_dlgetmodinfo=$ac_res | |
9290 | fi | |
9291 | rm -f core conftest.err conftest.$ac_objext \ | |
9292 | conftest$ac_exeext | |
9293 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9294 | break | |
9295 | fi | |
9296 | done | |
9297 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 9298 | |
4e8d927d | 9299 | else |
81ecdfbb | 9300 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 9301 | fi |
81ecdfbb | 9302 | rm conftest.$ac_ext |
bec39cab AC |
9303 | LIBS=$ac_func_search_save_LIBS |
9304 | fi | |
81ecdfbb RW |
9305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
9306 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
9307 | ac_res=$ac_cv_search_dlgetmodinfo | |
9308 | if test "$ac_res" != no; then : | |
9309 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 9310 | |
8bb2c122 | 9311 | fi |
8bb2c122 | 9312 | |
8bb2c122 | 9313 | |
77f120bf | 9314 | |
77f120bf | 9315 | |
6c7a06a3 | 9316 | |
81ecdfbb RW |
9317 | # Check whether --with-libiconv-prefix was given. |
9318 | if test "${with_libiconv_prefix+set}" = set; then : | |
9319 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 9320 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
9321 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
9322 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
9323 | done |
9324 | ||
81ecdfbb RW |
9325 | fi |
9326 | ||
6c7a06a3 | 9327 | |
f18c4681 | 9328 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
9329 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
9330 | ||
81ecdfbb RW |
9331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
9332 | $as_echo_n "checking for iconv... " >&6; } | |
9333 | if test "${am_cv_func_iconv+set}" = set; then : | |
9334 | $as_echo_n "(cached) " >&6 | |
d542061a | 9335 | else |
6c7a06a3 TT |
9336 | |
9337 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
9338 | am_cv_lib_iconv=no | |
9339 | am_cv_use_build_libiconv=no | |
f0f20949 | 9340 | am_cv_build_libiconv_path= |
4edb1e84 JB |
9341 | |
9342 | # If libiconv is part of the build tree, then try using it over | |
9343 | # any system iconv. | |
9344 | if test -d ../libiconv; then | |
f18c4681 JB |
9345 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
9346 | am_save_LIBS="$LIBS" | |
9347 | am_save_CPPFLAGS="$CPPFLAGS" | |
9348 | LIBS="$LIBS $lib_dir/libiconv.a" | |
9349 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
9350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 9351 | /* end confdefs.h. */ |
6c7a06a3 TT |
9352 | #include <stdlib.h> |
9353 | #include <iconv.h> | |
d542061a UW |
9354 | int |
9355 | main () | |
9356 | { | |
6c7a06a3 | 9357 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
9358 | iconv(cd,NULL,NULL,NULL,NULL); |
9359 | iconv_close(cd); | |
d542061a UW |
9360 | ; |
9361 | return 0; | |
9362 | } | |
9363 | _ACEOF | |
81ecdfbb | 9364 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9365 | am_cv_use_build_libiconv=yes |
f0f20949 | 9366 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
9367 | am_cv_lib_iconv=yes |
9368 | am_cv_func_iconv=yes | |
d542061a | 9369 | fi |
81ecdfbb RW |
9370 | rm -f core conftest.err conftest.$ac_objext \ |
9371 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
9372 | LIBS="$am_save_LIBS" |
9373 | CPPFLAGS="$am_save_CPPFLAGS" | |
9374 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
9375 | break |
9376 | fi | |
9377 | done | |
4edb1e84 | 9378 | fi |
94ae1714 | 9379 | |
4edb1e84 | 9380 | # Next, try to find iconv in libc. |
6c7a06a3 | 9381 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 9382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 9383 | /* end confdefs.h. */ |
6c7a06a3 TT |
9384 | #include <stdlib.h> |
9385 | #include <iconv.h> | |
d542061a UW |
9386 | int |
9387 | main () | |
9388 | { | |
6c7a06a3 TT |
9389 | iconv_t cd = iconv_open("",""); |
9390 | iconv(cd,NULL,NULL,NULL,NULL); | |
9391 | iconv_close(cd); | |
d542061a UW |
9392 | ; |
9393 | return 0; | |
9394 | } | |
9395 | _ACEOF | |
81ecdfbb | 9396 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9397 | am_cv_func_iconv=yes |
d542061a | 9398 | fi |
81ecdfbb RW |
9399 | rm -f core conftest.err conftest.$ac_objext \ |
9400 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 9401 | fi |
94ae1714 | 9402 | |
4edb1e84 JB |
9403 | # If iconv was not in libc, try -liconv. In this case, arrange to |
9404 | # look in the libiconv prefix, if it was specified by the user. | |
9405 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 9406 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
9407 | am_save_LIBS="$LIBS" |
9408 | if test -n "$LIBICONV_INCLUDE"; then | |
9409 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9410 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
9411 | fi | |
9412 | LIBS="$LIBS -liconv" | |
81ecdfbb | 9413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9414 | /* end confdefs.h. */ |
6c7a06a3 TT |
9415 | #include <stdlib.h> |
9416 | #include <iconv.h> | |
bec39cab AC |
9417 | int |
9418 | main () | |
9419 | { | |
6c7a06a3 TT |
9420 | iconv_t cd = iconv_open("",""); |
9421 | iconv(cd,NULL,NULL,NULL,NULL); | |
9422 | iconv_close(cd); | |
bec39cab AC |
9423 | ; |
9424 | return 0; | |
9425 | } | |
9426 | _ACEOF | |
81ecdfbb | 9427 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9428 | am_cv_lib_iconv=yes |
6c7a06a3 | 9429 | am_cv_func_iconv=yes |
627af7ea | 9430 | fi |
81ecdfbb RW |
9431 | rm -f core conftest.err conftest.$ac_objext \ |
9432 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 9433 | LIBS="$am_save_LIBS" |
fc3b640d | 9434 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
9435 | fi |
9436 | ||
9437 | fi | |
81ecdfbb RW |
9438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
9439 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
9440 | |
9441 | # Set the various flags based on the cache variables. We can't rely | |
9442 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
9443 | LIBICONV= |
9444 | if test "$am_cv_lib_iconv" = yes; then | |
9445 | LIBICONV="-liconv" | |
94ae1714 TT |
9446 | else |
9447 | LIBICONV_LIBDIR= | |
9448 | LIBICONV_INCLUDE= | |
fc3b640d TT |
9449 | fi |
9450 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 9451 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 9452 | LIBICONV_LIBDIR="" |
fc3b640d TT |
9453 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
9454 | fi | |
9455 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9456 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 9457 | |
6c7a06a3 TT |
9458 | if test "$am_cv_func_iconv" = yes; then |
9459 | ||
81ecdfbb | 9460 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 9461 | |
81ecdfbb RW |
9462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
9463 | $as_echo_n "checking for iconv declaration... " >&6; } | |
9464 | if test "${am_cv_proto_iconv+set}" = set; then : | |
9465 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9466 | else |
9467 | ||
81ecdfbb | 9468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9469 | /* end confdefs.h. */ |
9470 | ||
6c7a06a3 TT |
9471 | #include <stdlib.h> |
9472 | #include <iconv.h> | |
9473 | extern | |
b4e70030 | 9474 | #ifdef __cplusplus |
6c7a06a3 | 9475 | "C" |
b4e70030 | 9476 | #endif |
6c7a06a3 TT |
9477 | #if defined(__STDC__) || defined(__cplusplus) |
9478 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
9479 | #else | |
9480 | size_t iconv(); | |
9481 | #endif | |
9482 | ||
b4e70030 JB |
9483 | int |
9484 | main () | |
9485 | { | |
6c7a06a3 | 9486 | |
b4e70030 JB |
9487 | ; |
9488 | return 0; | |
9489 | } | |
9490 | _ACEOF | |
81ecdfbb | 9491 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 9492 | am_cv_proto_iconv_arg1="" |
4e8d927d | 9493 | else |
81ecdfbb | 9494 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 9495 | fi |
81ecdfbb | 9496 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
9497 | 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);" |
9498 | fi | |
9499 | ||
9500 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 9501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 9502 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
9503 | $as_echo "${ac_t:- |
9504 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
9505 | |
9506 | cat >>confdefs.h <<_ACEOF | |
9507 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
9508 | _ACEOF | |
9509 | ||
9510 | fi | |
6c7a06a3 TT |
9511 | |
9512 | ||
9513 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. | |
9514 | # There is a very specific comment in /usr/include/curses.h explaining that | |
9515 | # termcap routines built into libcurses must not be used. | |
9516 | # | |
9517 | # The symptoms we observed so far is GDB unexpectedly changing | |
9518 | # the terminal settings when tgetent is called - this is particularly | |
9519 | # visible as the output is missing carriage returns, and so rapidly | |
9520 | # becomes very hard to read. | |
9521 | # | |
9522 | # The readline configure script has already decided that libtermcap | |
9523 | # was enough for its purposes, and so decided to build readline using | |
9524 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
9525 | # TUI enabled results in both libraries to be used at the same time, | |
9526 | # which is not allowed. This basically means that GDB with TUI is | |
9527 | # broken on alpha-osf. | |
9528 | ||
9529 | case $host_os in | |
6bcc772d RO |
9530 | osf* ) |
9531 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9532 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 9533 | fi |
6bcc772d | 9534 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
9535 | enable_tui=no |
9536 | fi | |
9537 | ;; | |
9538 | esac | |
9539 | ||
cb01cfba | 9540 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9541 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9542 | prefer_curses=yes |
9543 | fi | |
9544 | ||
9545 | curses_found=no | |
9546 | if test x"$prefer_curses" = xyes; then | |
9547 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9548 | # curses library because the latter might not provide all the | |
9549 | # functionality we need. However, this leads to problems on systems | |
9550 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9551 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9552 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9553 | # a situation. | |
81ecdfbb RW |
9554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9555 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
9556 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9557 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9558 | else |
9559 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9561 | /* end confdefs.h. */ |
9562 | ||
81ecdfbb RW |
9563 | /* Override any GCC internal prototype to avoid an error. |
9564 | Use char because int might match the return type of a GCC | |
9565 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9566 | #ifdef __cplusplus |
9567 | extern "C" | |
9568 | #endif | |
6c7a06a3 TT |
9569 | char waddstr (); |
9570 | int | |
9571 | main () | |
9572 | { | |
81ecdfbb | 9573 | return waddstr (); |
6c7a06a3 TT |
9574 | ; |
9575 | return 0; | |
9576 | } | |
9577 | _ACEOF | |
81ecdfbb RW |
9578 | for ac_lib in '' ncurses cursesX curses; do |
9579 | if test -z "$ac_lib"; then | |
9580 | ac_res="none required" | |
9581 | else | |
9582 | ac_res=-l$ac_lib | |
9583 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9584 | fi | |
9585 | if ac_fn_c_try_link "$LINENO"; then : | |
9586 | ac_cv_search_waddstr=$ac_res | |
9587 | fi | |
9588 | rm -f core conftest.err conftest.$ac_objext \ | |
9589 | conftest$ac_exeext | |
9590 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9591 | break | |
9592 | fi | |
9593 | done | |
9594 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9595 | ||
6c7a06a3 | 9596 | else |
81ecdfbb RW |
9597 | ac_cv_search_waddstr=no |
9598 | fi | |
9599 | rm conftest.$ac_ext | |
9600 | LIBS=$ac_func_search_save_LIBS | |
9601 | fi | |
9602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9603 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9604 | ac_res=$ac_cv_search_waddstr | |
9605 | if test "$ac_res" != no; then : | |
9606 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9607 | |
9608 | fi | |
9609 | ||
9610 | ||
cb01cfba JB |
9611 | if test "$ac_cv_search_waddstr" != no; then |
9612 | curses_found=yes | |
9613 | fi | |
9614 | fi | |
9615 | ||
9616 | # Check whether we should enable the TUI, but only do so if we really | |
9617 | # can. | |
9618 | if test x"$enable_tui" != xno; then | |
9619 | if test -d $srcdir/tui; then | |
9620 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
9621 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9622 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9623 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9624 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
9625 | CONFIG_ALL="${CONFIG_ALL} all-tui" | |
9626 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
9627 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
9628 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
9629 | else | |
9630 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9631 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9632 | else |
81ecdfbb RW |
9633 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9634 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9635 | fi |
9636 | fi | |
9637 | fi | |
9638 | fi | |
9639 | ||
9640 | # Since GDB uses Readline, we need termcap functionality. In many | |
9641 | # cases this will be provided by the curses library, but some systems | |
9642 | # have a seperate termcap library, or no curses library at all. | |
9643 | ||
9644 | case $host_os in | |
9645 | cygwin*) | |
9646 | if test -d $srcdir/libtermcap; then | |
9647 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
9648 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9649 | fi ;; | |
9650 | go32* | *djgpp*) | |
9651 | ac_cv_search_tgetent="none required" | |
9652 | ;; | |
9653 | *mingw32*) | |
9654 | ac_cv_search_tgetent="none required" | |
9655 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
9656 | ;; | |
9657 | esac | |
9658 | ||
9659 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9661 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
9662 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9663 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9664 | else |
9665 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9667 | /* end confdefs.h. */ |
9668 | ||
81ecdfbb RW |
9669 | /* Override any GCC internal prototype to avoid an error. |
9670 | Use char because int might match the return type of a GCC | |
9671 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9672 | #ifdef __cplusplus |
9673 | extern "C" | |
9674 | #endif | |
6c7a06a3 TT |
9675 | char tgetent (); |
9676 | int | |
9677 | main () | |
9678 | { | |
81ecdfbb | 9679 | return tgetent (); |
6c7a06a3 TT |
9680 | ; |
9681 | return 0; | |
9682 | } | |
9683 | _ACEOF | |
81ecdfbb RW |
9684 | for ac_lib in '' termcap tinfo curses ncurses; do |
9685 | if test -z "$ac_lib"; then | |
9686 | ac_res="none required" | |
9687 | else | |
9688 | ac_res=-l$ac_lib | |
6c7a06a3 | 9689 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9690 | fi |
9691 | if ac_fn_c_try_link "$LINENO"; then : | |
9692 | ac_cv_search_tgetent=$ac_res | |
9693 | fi | |
9694 | rm -f core conftest.err conftest.$ac_objext \ | |
9695 | conftest$ac_exeext | |
9696 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9697 | break | |
9698 | fi | |
9699 | done | |
9700 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 9701 | |
6c7a06a3 | 9702 | else |
81ecdfbb | 9703 | ac_cv_search_tgetent=no |
6c7a06a3 | 9704 | fi |
81ecdfbb | 9705 | rm conftest.$ac_ext |
6c7a06a3 TT |
9706 | LIBS=$ac_func_search_save_LIBS |
9707 | fi | |
81ecdfbb RW |
9708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9709 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9710 | ac_res=$ac_cv_search_tgetent | |
9711 | if test "$ac_res" != no; then : | |
9712 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9713 | |
06825bd1 MK |
9714 | fi |
9715 | ||
06825bd1 | 9716 | |
bec39cab | 9717 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 9718 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
9719 | fi |
9720 | ||
3841debe | 9721 | |
81ecdfbb RW |
9722 | # Check whether --with-system-readline was given. |
9723 | if test "${with_system_readline+set}" = set; then : | |
9724 | withval=$with_system_readline; | |
9725 | fi | |
6a30b0a5 | 9726 | |
6a30b0a5 AS |
9727 | |
9728 | if test "$with_system_readline" = yes; then | |
9729 | READLINE=-lreadline | |
9730 | READLINE_DEPS= | |
9731 | READLINE_CFLAGS= | |
a71e0887 JK |
9732 | |
9733 | # readline-6.0 started to use the name `_rl_echoing_p'. | |
9734 | # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. | |
9735 | ||
9736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5 | |
9737 | $as_echo_n "checking for readline_echoing_p... " >&6; } | |
9738 | save_LIBS=$LIBS | |
9739 | LIBS="$LIBS $READLINE" | |
9740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9741 | /* end confdefs.h. */ | |
9742 | ||
9743 | int | |
9744 | main () | |
9745 | { | |
9746 | extern int readline_echoing_p; | |
9747 | return readline_echoing_p; | |
9748 | ; | |
9749 | return 0; | |
9750 | } | |
9751 | _ACEOF | |
9752 | if ac_fn_c_try_link "$LINENO"; then : | |
9753 | READLINE_ECHOING_P=yes | |
9754 | else | |
9755 | READLINE_ECHOING_P=no | |
9756 | ||
9757 | $as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h | |
9758 | ||
9759 | fi | |
9760 | rm -f core conftest.err conftest.$ac_objext \ | |
9761 | conftest$ac_exeext conftest.$ac_ext | |
9762 | LIBS="$save_LIBS" | |
9763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5 | |
9764 | $as_echo "$READLINE_ECHOING_P" >&6; } | |
6a30b0a5 AS |
9765 | else |
9766 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9767 | READLINE_DEPS='$(READLINE)' | |
9768 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
9769 | fi | |
9770 | ||
9771 | ||
9772 | ||
9773 | ||
9774 | ||
81ecdfbb RW |
9775 | # Check whether --with-expat was given. |
9776 | if test "${with_expat+set}" = set; then : | |
9777 | withval=$with_expat; | |
5c39566f DJ |
9778 | else |
9779 | with_expat=auto | |
81ecdfbb RW |
9780 | fi |
9781 | ||
9782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9783 | $as_echo_n "checking whether to use expat... " >&6; } | |
9784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9785 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9786 | |
9787 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9788 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9789 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9790 | HAVE_LIBEXPAT=no |
9791 | else | |
9792 | ||
3841debe DJ |
9793 | if test "X$prefix" = "XNONE"; then |
9794 | acl_final_prefix="$ac_default_prefix" | |
9795 | else | |
9796 | acl_final_prefix="$prefix" | |
9797 | fi | |
9798 | if test "X$exec_prefix" = "XNONE"; then | |
9799 | acl_final_exec_prefix='${prefix}' | |
9800 | else | |
9801 | acl_final_exec_prefix="$exec_prefix" | |
9802 | fi | |
9803 | acl_save_prefix="$prefix" | |
9804 | prefix="$acl_final_prefix" | |
9805 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
9806 | prefix="$acl_save_prefix" | |
9807 | ||
9808 | ||
81ecdfbb RW |
9809 | # Check whether --with-gnu-ld was given. |
9810 | if test "${with_gnu_ld+set}" = set; then : | |
9811 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
9812 | else |
9813 | with_gnu_ld=no | |
81ecdfbb RW |
9814 | fi |
9815 | ||
3841debe DJ |
9816 | # Prepare PATH_SEPARATOR. |
9817 | # The user is always right. | |
9818 | if test "${PATH_SEPARATOR+set}" != set; then | |
9819 | echo "#! /bin/sh" >conf$$.sh | |
9820 | echo "exit 0" >>conf$$.sh | |
9821 | chmod +x conf$$.sh | |
9822 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
9823 | PATH_SEPARATOR=';' | |
9824 | else | |
9825 | PATH_SEPARATOR=: | |
9826 | fi | |
9827 | rm -f conf$$.sh | |
9828 | fi | |
9829 | ac_prog=ld | |
9830 | if test "$GCC" = yes; then | |
9831 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
9832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
9833 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
9834 | case $host in |
9835 | *-*-mingw*) | |
9836 | # gcc leaves a trailing carriage return which upsets mingw | |
9837 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
9838 | *) | |
9839 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
9840 | esac | |
9841 | case $ac_prog in | |
9842 | # Accept absolute paths. | |
9843 | [\\/]* | [A-Za-z]:[\\/]*) | |
9844 | re_direlt='/[^/][^/]*/\.\./' | |
9845 | # Canonicalize the path of ld | |
9846 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
9847 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
9848 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
9849 | done | |
9850 | test -z "$LD" && LD="$ac_prog" | |
9851 | ;; | |
9852 | "") | |
9853 | # If it fails, then pretend we aren't using GCC. | |
9854 | ac_prog=ld | |
9855 | ;; | |
9856 | *) | |
9857 | # If it is relative, then search for the first ld in PATH. | |
9858 | with_gnu_ld=unknown | |
9859 | ;; | |
9860 | esac | |
9861 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
9862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
9863 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 9864 | else |
81ecdfbb RW |
9865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
9866 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 9867 | fi |
81ecdfbb RW |
9868 | if test "${acl_cv_path_LD+set}" = set; then : |
9869 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9870 | else |
9871 | if test -z "$LD"; then | |
9872 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
9873 | for ac_dir in $PATH; do | |
9874 | test -z "$ac_dir" && ac_dir=. | |
9875 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
9876 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
9877 | # Check to see if the program is GNU ld. I'd rather use --version, | |
9878 | # but apparently some GNU ld's only accept -v. | |
9879 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
9880 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
9881 | test "$with_gnu_ld" != no && break | |
9882 | else | |
9883 | test "$with_gnu_ld" != yes && break | |
9884 | fi | |
9885 | fi | |
9886 | done | |
9887 | IFS="$ac_save_ifs" | |
9888 | else | |
9889 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
9890 | fi | |
9891 | fi | |
9892 | ||
9893 | LD="$acl_cv_path_LD" | |
9894 | if test -n "$LD"; then | |
81ecdfbb RW |
9895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
9896 | $as_echo "$LD" >&6; } | |
3841debe | 9897 | else |
81ecdfbb RW |
9898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9899 | $as_echo "no" >&6; } | |
3841debe | 9900 | fi |
81ecdfbb RW |
9901 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
9902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
9903 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
9904 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
9905 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9906 | else |
9907 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
9908 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
9909 | acl_cv_prog_gnu_ld=yes | |
9910 | else | |
9911 | acl_cv_prog_gnu_ld=no | |
9912 | fi | |
9913 | fi | |
81ecdfbb RW |
9914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
9915 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
9916 | with_gnu_ld=$acl_cv_prog_gnu_ld |
9917 | ||
9918 | ||
9919 | ||
81ecdfbb RW |
9920 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
9921 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
9922 | if test "${acl_cv_rpath+set}" = set; then : | |
9923 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9924 | else |
9925 | ||
9926 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
9927 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
9928 | . ./conftest.sh | |
9929 | rm -f ./conftest.sh | |
9930 | acl_cv_rpath=done | |
9931 | ||
9932 | fi | |
81ecdfbb RW |
9933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
9934 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
9935 | wl="$acl_cv_wl" |
9936 | libext="$acl_cv_libext" | |
9937 | shlibext="$acl_cv_shlibext" | |
9938 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
9939 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
9940 | hardcode_direct="$acl_cv_hardcode_direct" | |
9941 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
9942 | # Check whether --enable-rpath was given. |
9943 | if test "${enable_rpath+set}" = set; then : | |
9944 | enableval=$enable_rpath; : | |
3841debe DJ |
9945 | else |
9946 | enable_rpath=yes | |
81ecdfbb RW |
9947 | fi |
9948 | ||
3841debe DJ |
9949 | |
9950 | ||
9951 | ||
9952 | ||
9953 | ||
9954 | ||
9955 | ||
9956 | ||
9957 | ||
9958 | use_additional=yes | |
9959 | ||
9960 | acl_save_prefix="$prefix" | |
9961 | prefix="$acl_final_prefix" | |
9962 | acl_save_exec_prefix="$exec_prefix" | |
9963 | exec_prefix="$acl_final_exec_prefix" | |
9964 | ||
9965 | eval additional_includedir=\"$includedir\" | |
9966 | eval additional_libdir=\"$libdir\" | |
9967 | ||
9968 | exec_prefix="$acl_save_exec_prefix" | |
9969 | prefix="$acl_save_prefix" | |
9970 | ||
9971 | ||
81ecdfbb RW |
9972 | # Check whether --with-libexpat-prefix was given. |
9973 | if test "${with_libexpat_prefix+set}" = set; then : | |
9974 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9975 | if test "X$withval" = "Xno"; then |
9976 | use_additional=no | |
9977 | else | |
9978 | if test "X$withval" = "X"; then | |
9979 | ||
9980 | acl_save_prefix="$prefix" | |
9981 | prefix="$acl_final_prefix" | |
9982 | acl_save_exec_prefix="$exec_prefix" | |
9983 | exec_prefix="$acl_final_exec_prefix" | |
9984 | ||
9985 | eval additional_includedir=\"$includedir\" | |
9986 | eval additional_libdir=\"$libdir\" | |
9987 | ||
9988 | exec_prefix="$acl_save_exec_prefix" | |
9989 | prefix="$acl_save_prefix" | |
9990 | ||
9991 | else | |
9992 | additional_includedir="$withval/include" | |
9993 | additional_libdir="$withval/lib" | |
9994 | fi | |
9995 | fi | |
9996 | ||
81ecdfbb RW |
9997 | fi |
9998 | ||
3841debe DJ |
9999 | LIBEXPAT= |
10000 | LTLIBEXPAT= | |
10001 | INCEXPAT= | |
10002 | rpathdirs= | |
10003 | ltrpathdirs= | |
10004 | names_already_handled= | |
10005 | names_next_round='expat ' | |
10006 | while test -n "$names_next_round"; do | |
10007 | names_this_round="$names_next_round" | |
10008 | names_next_round= | |
10009 | for name in $names_this_round; do | |
10010 | already_handled= | |
10011 | for n in $names_already_handled; do | |
10012 | if test "$n" = "$name"; then | |
10013 | already_handled=yes | |
10014 | break | |
10015 | fi | |
10016 | done | |
10017 | if test -z "$already_handled"; then | |
10018 | names_already_handled="$names_already_handled $name" | |
10019 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10020 | eval value=\"\$HAVE_LIB$uppername\" | |
10021 | if test -n "$value"; then | |
10022 | if test "$value" = yes; then | |
10023 | eval value=\"\$LIB$uppername\" | |
10024 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
10025 | eval value=\"\$LTLIB$uppername\" | |
10026 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
10027 | else | |
10028 | : | |
10029 | fi | |
10030 | else | |
10031 | found_dir= | |
10032 | found_la= | |
10033 | found_so= | |
10034 | found_a= | |
10035 | if test $use_additional = yes; then | |
10036 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10037 | found_dir="$additional_libdir" | |
10038 | found_so="$additional_libdir/lib$name.$shlibext" | |
10039 | if test -f "$additional_libdir/lib$name.la"; then | |
10040 | found_la="$additional_libdir/lib$name.la" | |
10041 | fi | |
10042 | else | |
10043 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10044 | found_dir="$additional_libdir" | |
10045 | found_a="$additional_libdir/lib$name.$libext" | |
10046 | if test -f "$additional_libdir/lib$name.la"; then | |
10047 | found_la="$additional_libdir/lib$name.la" | |
10048 | fi | |
10049 | fi | |
10050 | fi | |
10051 | fi | |
10052 | if test "X$found_dir" = "X"; then | |
10053 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10054 | ||
10055 | acl_save_prefix="$prefix" | |
10056 | prefix="$acl_final_prefix" | |
10057 | acl_save_exec_prefix="$exec_prefix" | |
10058 | exec_prefix="$acl_final_exec_prefix" | |
10059 | eval x=\"$x\" | |
10060 | exec_prefix="$acl_save_exec_prefix" | |
10061 | prefix="$acl_save_prefix" | |
10062 | ||
10063 | case "$x" in | |
10064 | -L*) | |
10065 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10066 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10067 | found_dir="$dir" | |
10068 | found_so="$dir/lib$name.$shlibext" | |
10069 | if test -f "$dir/lib$name.la"; then | |
10070 | found_la="$dir/lib$name.la" | |
10071 | fi | |
10072 | else | |
10073 | if test -f "$dir/lib$name.$libext"; then | |
10074 | found_dir="$dir" | |
10075 | found_a="$dir/lib$name.$libext" | |
10076 | if test -f "$dir/lib$name.la"; then | |
10077 | found_la="$dir/lib$name.la" | |
10078 | fi | |
10079 | fi | |
10080 | fi | |
10081 | ;; | |
10082 | esac | |
10083 | if test "X$found_dir" != "X"; then | |
10084 | break | |
10085 | fi | |
10086 | done | |
10087 | fi | |
10088 | if test "X$found_dir" != "X"; then | |
10089 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
10090 | if test "X$found_so" != "X"; then | |
10091 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10092 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10093 | else | |
10094 | haveit= | |
10095 | for x in $ltrpathdirs; do | |
10096 | if test "X$x" = "X$found_dir"; then | |
10097 | haveit=yes | |
10098 | break | |
10099 | fi | |
10100 | done | |
10101 | if test -z "$haveit"; then | |
10102 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10103 | fi | |
10104 | if test "$hardcode_direct" = yes; then | |
10105 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10106 | else | |
10107 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10108 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10109 | haveit= | |
10110 | for x in $rpathdirs; do | |
10111 | if test "X$x" = "X$found_dir"; then | |
10112 | haveit=yes | |
10113 | break | |
10114 | fi | |
10115 | done | |
10116 | if test -z "$haveit"; then | |
10117 | rpathdirs="$rpathdirs $found_dir" | |
10118 | fi | |
10119 | else | |
10120 | haveit= | |
10121 | for x in $LDFLAGS $LIBEXPAT; do | |
10122 | ||
10123 | acl_save_prefix="$prefix" | |
10124 | prefix="$acl_final_prefix" | |
10125 | acl_save_exec_prefix="$exec_prefix" | |
10126 | exec_prefix="$acl_final_exec_prefix" | |
10127 | eval x=\"$x\" | |
10128 | exec_prefix="$acl_save_exec_prefix" | |
10129 | prefix="$acl_save_prefix" | |
10130 | ||
10131 | if test "X$x" = "X-L$found_dir"; then | |
10132 | haveit=yes | |
10133 | break | |
10134 | fi | |
10135 | done | |
10136 | if test -z "$haveit"; then | |
10137 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
10138 | fi | |
10139 | if test "$hardcode_minus_L" != no; then | |
10140 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10141 | else | |
10142 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10143 | fi | |
10144 | fi | |
10145 | fi | |
10146 | fi | |
10147 | else | |
10148 | if test "X$found_a" != "X"; then | |
10149 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
10150 | else | |
10151 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
10152 | fi | |
10153 | fi | |
10154 | additional_includedir= | |
10155 | case "$found_dir" in | |
10156 | */lib | */lib/) | |
10157 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10158 | additional_includedir="$basedir/include" | |
10159 | ;; | |
10160 | esac | |
10161 | if test "X$additional_includedir" != "X"; then | |
10162 | if test "X$additional_includedir" != "X/usr/include"; then | |
10163 | haveit= | |
10164 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10165 | if test -n "$GCC"; then | |
10166 | case $host_os in | |
10167 | linux*) haveit=yes;; | |
10168 | esac | |
10169 | fi | |
10170 | fi | |
10171 | if test -z "$haveit"; then | |
10172 | for x in $CPPFLAGS $INCEXPAT; do | |
10173 | ||
10174 | acl_save_prefix="$prefix" | |
10175 | prefix="$acl_final_prefix" | |
10176 | acl_save_exec_prefix="$exec_prefix" | |
10177 | exec_prefix="$acl_final_exec_prefix" | |
10178 | eval x=\"$x\" | |
10179 | exec_prefix="$acl_save_exec_prefix" | |
10180 | prefix="$acl_save_prefix" | |
10181 | ||
10182 | if test "X$x" = "X-I$additional_includedir"; then | |
10183 | haveit=yes | |
10184 | break | |
10185 | fi | |
10186 | done | |
10187 | if test -z "$haveit"; then | |
10188 | if test -d "$additional_includedir"; then | |
10189 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
10190 | fi | |
10191 | fi | |
10192 | fi | |
10193 | fi | |
10194 | fi | |
10195 | if test -n "$found_la"; then | |
10196 | save_libdir="$libdir" | |
10197 | case "$found_la" in | |
10198 | */* | *\\*) . "$found_la" ;; | |
10199 | *) . "./$found_la" ;; | |
10200 | esac | |
10201 | libdir="$save_libdir" | |
10202 | for dep in $dependency_libs; do | |
10203 | case "$dep" in | |
10204 | -L*) | |
10205 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10206 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10207 | haveit= | |
10208 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10209 | if test -n "$GCC"; then | |
10210 | case $host_os in | |
10211 | linux*) haveit=yes;; | |
10212 | esac | |
10213 | fi | |
10214 | fi | |
10215 | if test -z "$haveit"; then | |
10216 | haveit= | |
10217 | for x in $LDFLAGS $LIBEXPAT; do | |
10218 | ||
10219 | acl_save_prefix="$prefix" | |
10220 | prefix="$acl_final_prefix" | |
10221 | acl_save_exec_prefix="$exec_prefix" | |
10222 | exec_prefix="$acl_final_exec_prefix" | |
10223 | eval x=\"$x\" | |
10224 | exec_prefix="$acl_save_exec_prefix" | |
10225 | prefix="$acl_save_prefix" | |
10226 | ||
10227 | if test "X$x" = "X-L$additional_libdir"; then | |
10228 | haveit=yes | |
10229 | break | |
10230 | fi | |
10231 | done | |
10232 | if test -z "$haveit"; then | |
10233 | if test -d "$additional_libdir"; then | |
10234 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
10235 | fi | |
10236 | fi | |
10237 | haveit= | |
10238 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10239 | ||
10240 | acl_save_prefix="$prefix" | |
10241 | prefix="$acl_final_prefix" | |
10242 | acl_save_exec_prefix="$exec_prefix" | |
10243 | exec_prefix="$acl_final_exec_prefix" | |
10244 | eval x=\"$x\" | |
10245 | exec_prefix="$acl_save_exec_prefix" | |
10246 | prefix="$acl_save_prefix" | |
10247 | ||
10248 | if test "X$x" = "X-L$additional_libdir"; then | |
10249 | haveit=yes | |
10250 | break | |
10251 | fi | |
10252 | done | |
10253 | if test -z "$haveit"; then | |
10254 | if test -d "$additional_libdir"; then | |
10255 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
10256 | fi | |
10257 | fi | |
10258 | fi | |
10259 | fi | |
10260 | ;; | |
10261 | -R*) | |
10262 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10263 | if test "$enable_rpath" != no; then | |
10264 | haveit= | |
10265 | for x in $rpathdirs; do | |
10266 | if test "X$x" = "X$dir"; then | |
10267 | haveit=yes | |
10268 | break | |
10269 | fi | |
10270 | done | |
10271 | if test -z "$haveit"; then | |
10272 | rpathdirs="$rpathdirs $dir" | |
10273 | fi | |
10274 | haveit= | |
10275 | for x in $ltrpathdirs; do | |
10276 | if test "X$x" = "X$dir"; then | |
10277 | haveit=yes | |
10278 | break | |
10279 | fi | |
10280 | done | |
10281 | if test -z "$haveit"; then | |
10282 | ltrpathdirs="$ltrpathdirs $dir" | |
10283 | fi | |
10284 | fi | |
10285 | ;; | |
10286 | -l*) | |
10287 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10288 | ;; | |
10289 | *.la) | |
10290 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10291 | ;; | |
10292 | *) | |
10293 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
10294 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
10295 | ;; | |
81ecdfbb RW |
10296 | esac |
10297 | done | |
10298 | fi | |
10299 | else | |
10300 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10301 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
10302 | fi | |
10303 | fi | |
10304 | fi | |
10305 | done | |
10306 | done | |
10307 | if test "X$rpathdirs" != "X"; then | |
10308 | if test -n "$hardcode_libdir_separator"; then | |
10309 | alldirs= | |
10310 | for found_dir in $rpathdirs; do | |
10311 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10312 | done | |
10313 | acl_save_libdir="$libdir" | |
10314 | libdir="$alldirs" | |
10315 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10316 | libdir="$acl_save_libdir" | |
10317 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10318 | else | |
10319 | for found_dir in $rpathdirs; do | |
10320 | acl_save_libdir="$libdir" | |
10321 | libdir="$found_dir" | |
10322 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10323 | libdir="$acl_save_libdir" | |
10324 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10325 | done | |
10326 | fi | |
10327 | fi | |
10328 | if test "X$ltrpathdirs" != "X"; then | |
10329 | for found_dir in $ltrpathdirs; do | |
10330 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
10331 | done | |
10332 | fi | |
a9322a30 TT |
10333 | |
10334 | ||
81ecdfbb | 10335 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 10336 | |
81ecdfbb RW |
10337 | for element in $INCEXPAT; do |
10338 | haveit= | |
10339 | for x in $CPPFLAGS; do | |
a9322a30 | 10340 | |
81ecdfbb RW |
10341 | acl_save_prefix="$prefix" |
10342 | prefix="$acl_final_prefix" | |
10343 | acl_save_exec_prefix="$exec_prefix" | |
10344 | exec_prefix="$acl_final_exec_prefix" | |
10345 | eval x=\"$x\" | |
10346 | exec_prefix="$acl_save_exec_prefix" | |
10347 | prefix="$acl_save_prefix" | |
a8111142 | 10348 | |
81ecdfbb RW |
10349 | if test "X$x" = "X$element"; then |
10350 | haveit=yes | |
10351 | break | |
10352 | fi | |
10353 | done | |
10354 | if test -z "$haveit"; then | |
10355 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10356 | fi | |
10357 | done | |
a9322a30 TT |
10358 | |
10359 | ||
81ecdfbb RW |
10360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
10361 | $as_echo_n "checking for libexpat... " >&6; } | |
10362 | if test "${ac_cv_libexpat+set}" = set; then : | |
10363 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10364 | else |
bec39cab | 10365 | |
81ecdfbb RW |
10366 | ac_save_LIBS="$LIBS" |
10367 | LIBS="$LIBS $LIBEXPAT" | |
10368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10369 | /* end confdefs.h. */ |
81ecdfbb RW |
10370 | #include "expat.h" |
10371 | int | |
10372 | main () | |
10373 | { | |
10374 | XML_Parser p = XML_ParserCreate (0); | |
10375 | ; | |
10376 | return 0; | |
10377 | } | |
bec39cab | 10378 | _ACEOF |
81ecdfbb RW |
10379 | if ac_fn_c_try_link "$LINENO"; then : |
10380 | ac_cv_libexpat=yes | |
c906108c | 10381 | else |
81ecdfbb | 10382 | ac_cv_libexpat=no |
bec39cab | 10383 | fi |
81ecdfbb RW |
10384 | rm -f core conftest.err conftest.$ac_objext \ |
10385 | conftest$ac_exeext conftest.$ac_ext | |
10386 | LIBS="$ac_save_LIBS" | |
c906108c | 10387 | |
95ca63c4 | 10388 | fi |
81ecdfbb RW |
10389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
10390 | $as_echo "$ac_cv_libexpat" >&6; } | |
10391 | if test "$ac_cv_libexpat" = yes; then | |
10392 | HAVE_LIBEXPAT=yes | |
bec39cab | 10393 | |
81ecdfbb | 10394 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 10395 | |
81ecdfbb RW |
10396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
10397 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
10398 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
10399 | $as_echo "$LIBEXPAT" >&6; } | |
10400 | else | |
10401 | HAVE_LIBEXPAT=no | |
10402 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10403 | LIBEXPAT= | |
10404 | LTLIBEXPAT= | |
10405 | fi | |
95ca63c4 CF |
10406 | |
10407 | ||
10408 | ||
7cb9022a MK |
10409 | |
10410 | ||
bec39cab | 10411 | |
81ecdfbb RW |
10412 | if test "$HAVE_LIBEXPAT" != yes; then |
10413 | if test "$with_expat" = yes; then | |
10414 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
10415 | else | |
10416 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
10417 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10418 | fi | |
10419 | else | |
10420 | save_LIBS=$LIBS | |
10421 | LIBS="$LIBS $LIBEXPAT" | |
10422 | for ac_func in XML_StopParser | |
10423 | do : | |
10424 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
10425 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 10426 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10427 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10428 | _ACEOF |
95ca63c4 | 10429 | |
bec39cab | 10430 | fi |
bec39cab | 10431 | done |
95ca63c4 | 10432 | |
81ecdfbb RW |
10433 | LIBS=$save_LIBS |
10434 | fi | |
a9322a30 TT |
10435 | fi |
10436 | ||
a9322a30 | 10437 | |
a9322a30 TT |
10438 | |
10439 | ||
ec685c5e | 10440 | |
0c4a4063 | 10441 | |
81ecdfbb RW |
10442 | # Check whether --with-python was given. |
10443 | if test "${with_python+set}" = set; then : | |
10444 | withval=$with_python; | |
bec39cab | 10445 | else |
81ecdfbb | 10446 | with_python=auto |
bec39cab | 10447 | fi |
bec39cab | 10448 | |
81ecdfbb RW |
10449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10450 | $as_echo_n "checking whether to use python... " >&6; } | |
10451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10452 | $as_echo "$with_python" >&6; } | |
9a156167 | 10453 | |
81ecdfbb RW |
10454 | if test "${with_python}" = no; then |
10455 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10456 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10457 | have_libpython=no | |
bec39cab | 10458 | else |
81ecdfbb | 10459 | case "${with_python}" in |
81ecdfbb | 10460 | /*) |
ec685c5e DE |
10461 | if test -d ${with_python}; then |
10462 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 10463 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10464 | python_prefix= |
ec685c5e DE |
10465 | if test ! -x ${python_prog}; then |
10466 | # Fall back to gdb 7.0/7.1 behaviour. | |
10467 | python_prog=missing | |
0c4a4063 | 10468 | python_prefix=${with_python} |
ec685c5e DE |
10469 | fi |
10470 | elif test -x ${with_python}; then | |
10471 | # While we can't run python compiled for $host (unless host == build), | |
10472 | # the user could write a script that provides the needed information, | |
10473 | # so we support that. | |
ec685c5e | 10474 | python_prog=${with_python} |
0c4a4063 | 10475 | python_prefix= |
ec685c5e DE |
10476 | else |
10477 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
10478 | fi | |
81ecdfbb | 10479 | ;; |
ec685c5e DE |
10480 | */*) |
10481 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
10482 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
10483 | ;; | |
ec685c5e DE |
10484 | *) |
10485 | # The user has either specified auto, yes, or the name of the python | |
10486 | # program assumed to be in $PATH. | |
10487 | python_prefix= | |
10488 | case "${with_python}" in | |
10489 | yes | auto) | |
10490 | if test ${build} = ${host}; then | |
10491 | # Extract the first word of "python", so it can be a program name with args. | |
10492 | set dummy python; ac_word=$2 | |
10493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10494 | $as_echo_n "checking for $ac_word... " >&6; } | |
10495 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10496 | $as_echo_n "(cached) " >&6 | |
10497 | else | |
10498 | case $python_prog_path in | |
10499 | [\\/]* | ?:[\\/]*) | |
10500 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10501 | ;; | |
10502 | *) | |
10503 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10504 | for as_dir in $PATH | |
10505 | do | |
10506 | IFS=$as_save_IFS | |
10507 | test -z "$as_dir" && as_dir=. | |
10508 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10509 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10510 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10511 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10512 | break 2 | |
10513 | fi | |
10514 | done | |
10515 | done | |
10516 | IFS=$as_save_IFS | |
10517 | ||
10518 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10519 | ;; | |
10520 | esac | |
10521 | fi | |
10522 | python_prog_path=$ac_cv_path_python_prog_path | |
10523 | if test -n "$python_prog_path"; then | |
10524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10525 | $as_echo "$python_prog_path" >&6; } | |
10526 | else | |
10527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10528 | $as_echo "no" >&6; } | |
10529 | fi | |
10530 | ||
10531 | ||
10532 | if test "${python_prog_path}" = missing; then | |
10533 | python_prog=missing | |
10534 | else | |
10535 | python_prog=${python_prog_path} | |
10536 | fi | |
10537 | else | |
10538 | # Not much we can do except assume the cross-compiler will find the | |
10539 | # right files. | |
10540 | python_prog=missing | |
10541 | fi | |
10542 | ;; | |
10543 | *) | |
10544 | # While we can't run python compiled for $host (unless host == build), | |
10545 | # the user could write a script that provides the needed information, | |
10546 | # so we support that. | |
10547 | python_prog="${with_python}" | |
10548 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10549 | set dummy ${python_prog}; ac_word=$2 | |
10550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10551 | $as_echo_n "checking for $ac_word... " >&6; } | |
10552 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10553 | $as_echo_n "(cached) " >&6 | |
10554 | else | |
10555 | case $python_prog_path in | |
10556 | [\\/]* | ?:[\\/]*) | |
10557 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10558 | ;; | |
10559 | *) | |
10560 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10561 | for as_dir in $PATH | |
10562 | do | |
10563 | IFS=$as_save_IFS | |
10564 | test -z "$as_dir" && as_dir=. | |
10565 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10566 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10567 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10568 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10569 | break 2 | |
10570 | fi | |
10571 | done | |
10572 | done | |
10573 | IFS=$as_save_IFS | |
10574 | ||
10575 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10576 | ;; | |
10577 | esac | |
10578 | fi | |
10579 | python_prog_path=$ac_cv_path_python_prog_path | |
10580 | if test -n "$python_prog_path"; then | |
10581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10582 | $as_echo "$python_prog_path" >&6; } | |
10583 | else | |
10584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10585 | $as_echo "no" >&6; } | |
10586 | fi | |
10587 | ||
10588 | ||
10589 | if test "${python_prog_path}" = missing; then | |
10590 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
10591 | fi | |
10592 | ;; | |
10593 | esac | |
81ecdfbb RW |
10594 | esac |
10595 | ||
ec685c5e DE |
10596 | if test "${python_prog}" != missing; then |
10597 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` | |
10598 | if test $? != 0; then | |
10599 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
10600 | fi | |
10601 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10602 | if test $? != 0; then | |
10603 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
10604 | fi | |
0c4a4063 DE |
10605 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10606 | if test $? != 0; then | |
10607 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
10608 | fi | |
ec685c5e DE |
10609 | have_python_config=yes |
10610 | else | |
10611 | # Fall back to gdb 7.0/7.1 behaviour. | |
10612 | if test -z ${python_prefix}; then | |
10613 | python_includes= | |
10614 | python_libs= | |
10615 | else | |
10616 | python_includes="-I${python_prefix}/include" | |
10617 | python_libs="-L${python_prefix}/lib" | |
10618 | fi | |
0c4a4063 | 10619 | have_python_config=no |
ec685c5e | 10620 | fi |
bec39cab | 10621 | |
ec685c5e DE |
10622 | # Having "/pythonX.Y" in the include path is awkward. |
10623 | # All those python headers get bubbled up to the top inviting lots | |
10624 | # of random collisions. GDB originally didn't use python-config to | |
10625 | # find the compilation parameters and includes "pythonX.Y/" in the | |
10626 | # path of the, umm, include file. So strip away this part of the | |
10627 | # output of python-config --includes. | |
10628 | python_includes=`echo "${python_includes} " \ | |
0c4a4063 | 10629 | | sed -e 's,/python[0-9]*[.][0-9]* , ,g'` |
bec39cab | 10630 | |
ec685c5e DE |
10631 | # If we have python-config, only try the configuration it provides. |
10632 | # Otherwise fallback on the old way of trying different versions of | |
10633 | # python in turn. | |
81ecdfbb | 10634 | |
ec685c5e DE |
10635 | have_libpython=no |
10636 | if test "${have_python_config}" = yes; then | |
10637 | python_version=`echo " ${python_libs} " \ | |
0c4a4063 DE |
10638 | | sed -e 's,^.* -l\(python[0-9]*[.][0-9]*\) .*$,\1,'` |
10639 | case "${python_version}" in | |
10640 | python*) | |
ec685c5e DE |
10641 | |
10642 | version=${python_version} | |
10643 | ||
10644 | new_CPPFLAGS=${python_includes} | |
10645 | new_LIBS=${python_libs} | |
81ecdfbb RW |
10646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10647 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10648 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10649 | save_LIBS=$LIBS |
ec685c5e DE |
10650 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10651 | LIBS="$LIBS $new_LIBS" | |
10652 | found_usable_python=no | |
81ecdfbb | 10653 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10654 | /* end confdefs.h. */ |
81ecdfbb RW |
10655 | #include "${version}/Python.h" |
10656 | int | |
10657 | main () | |
10658 | { | |
10659 | Py_Initialize (); | |
10660 | ; | |
10661 | return 0; | |
10662 | } | |
bec39cab | 10663 | _ACEOF |
81ecdfbb | 10664 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10665 | have_libpython=${version} |
10666 | found_usable_python=yes | |
bec39cab | 10667 | else |
ec685c5e DE |
10668 | CPPFLAGS=$save_CPPFLAGS |
10669 | LIBS=$save_LIBS | |
9a156167 | 10670 | fi |
81ecdfbb RW |
10671 | rm -f core conftest.err conftest.$ac_objext \ |
10672 | conftest$ac_exeext conftest.$ac_ext | |
ec685c5e DE |
10673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10674 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10675 | |
0c4a4063 DE |
10676 | ;; |
10677 | *) | |
ec685c5e | 10678 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
10679 | ;; |
10680 | esac | |
ec685c5e DE |
10681 | else |
10682 | if test "${have_libpython}" = no; then | |
9a156167 | 10683 | |
ec685c5e DE |
10684 | version=python2.6 |
10685 | ||
10686 | new_CPPFLAGS=${python_includes} | |
10687 | new_LIBS="${python_libs} -lpython2.6" | |
10688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10689 | $as_echo_n "checking for ${version}... " >&6; } | |
10690 | save_CPPFLAGS=$CPPFLAGS | |
10691 | save_LIBS=$LIBS | |
10692 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10693 | LIBS="$LIBS $new_LIBS" | |
10694 | found_usable_python=no | |
10695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10696 | /* end confdefs.h. */ | |
10697 | #include "${version}/Python.h" | |
10698 | int | |
10699 | main () | |
10700 | { | |
10701 | Py_Initialize (); | |
10702 | ; | |
10703 | return 0; | |
10704 | } | |
10705 | _ACEOF | |
10706 | if ac_fn_c_try_link "$LINENO"; then : | |
10707 | have_libpython=${version} | |
10708 | found_usable_python=yes | |
10709 | else | |
10710 | CPPFLAGS=$save_CPPFLAGS | |
10711 | LIBS=$save_LIBS | |
10712 | fi | |
10713 | rm -f core conftest.err conftest.$ac_objext \ | |
10714 | conftest$ac_exeext conftest.$ac_ext | |
10715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 | |
10716 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10717 | |
81ecdfbb | 10718 | fi |
ec685c5e | 10719 | if test ${have_libpython} = no; then |
9a156167 | 10720 | |
81ecdfbb | 10721 | version=python2.5 |
9a156167 | 10722 | |
ec685c5e DE |
10723 | new_CPPFLAGS=${python_includes} |
10724 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
10725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10726 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10727 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10728 | save_LIBS=$LIBS |
ec685c5e DE |
10729 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10730 | LIBS="$LIBS $new_LIBS" | |
10731 | found_usable_python=no | |
81ecdfbb | 10732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10733 | /* end confdefs.h. */ |
81ecdfbb RW |
10734 | #include "${version}/Python.h" |
10735 | int | |
10736 | main () | |
10737 | { | |
10738 | Py_Initialize (); | |
10739 | ; | |
10740 | return 0; | |
10741 | } | |
436868fb | 10742 | _ACEOF |
81ecdfbb | 10743 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10744 | have_libpython=${version} |
10745 | found_usable_python=yes | |
436868fb | 10746 | else |
ec685c5e DE |
10747 | CPPFLAGS=$save_CPPFLAGS |
10748 | LIBS=$save_LIBS | |
436868fb | 10749 | fi |
81ecdfbb RW |
10750 | rm -f core conftest.err conftest.$ac_objext \ |
10751 | conftest$ac_exeext conftest.$ac_ext | |
ec685c5e DE |
10752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10753 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 10754 | |
81ecdfbb | 10755 | fi |
ec685c5e | 10756 | if test ${have_libpython} = no; then |
a9322a30 | 10757 | |
81ecdfbb | 10758 | version=python2.4 |
a9322a30 | 10759 | |
ec685c5e DE |
10760 | new_CPPFLAGS=${python_includes} |
10761 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
10762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10763 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10764 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10765 | save_LIBS=$LIBS |
ec685c5e DE |
10766 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10767 | LIBS="$LIBS $new_LIBS" | |
10768 | found_usable_python=no | |
81ecdfbb | 10769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10770 | /* end confdefs.h. */ |
81ecdfbb | 10771 | #include "${version}/Python.h" |
a9322a30 TT |
10772 | int |
10773 | main () | |
10774 | { | |
81ecdfbb | 10775 | Py_Initialize (); |
a9322a30 TT |
10776 | ; |
10777 | return 0; | |
10778 | } | |
436868fb | 10779 | _ACEOF |
81ecdfbb | 10780 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10781 | have_libpython=${version} |
10782 | found_usable_python=yes | |
436868fb | 10783 | else |
ec685c5e DE |
10784 | CPPFLAGS=$save_CPPFLAGS |
10785 | LIBS=$save_LIBS | |
436868fb | 10786 | fi |
81ecdfbb RW |
10787 | rm -f core conftest.err conftest.$ac_objext \ |
10788 | conftest$ac_exeext conftest.$ac_ext | |
ec685c5e DE |
10789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10790 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10791 | |
ec685c5e DE |
10792 | fi |
10793 | fi | |
10794 | if test "${have_libpython}" = python2.6; then | |
10795 | ||
10796 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
10797 | ||
10798 | elif test "${have_libpython}" = python2.5; then | |
10799 | ||
10800 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
10801 | ||
10802 | elif test "${have_libpython}" = python2.4; then | |
81ecdfbb RW |
10803 | |
10804 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
10805 | ||
81ecdfbb | 10806 | fi |
ec685c5e DE |
10807 | |
10808 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10809 | case "${with_python}" in |
10810 | yes) | |
10811 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
10812 | ;; | |
10813 | auto) | |
10814 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10815 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10816 | ;; | |
10817 | *) | |
10818 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
10819 | ;; | |
10820 | esac | |
0c4a4063 DE |
10821 | else |
10822 | if test -n "${python_prefix}"; then | |
10823 | ||
10824 | cat >>confdefs.h <<_ACEOF | |
10825 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10826 | _ACEOF | |
10827 | ||
10828 | ||
10829 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10830 | if test "x$prefix" = xNONE; then | |
10831 | test_prefix=/usr/local | |
10832 | else | |
10833 | test_prefix=$prefix | |
10834 | fi | |
10835 | else | |
10836 | test_prefix=$exec_prefix | |
10837 | fi | |
10838 | value=0 | |
10839 | case ${python_prefix} in | |
10840 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10841 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10842 | value=1 | |
10843 | ;; | |
10844 | esac | |
10845 | ||
10846 | cat >>confdefs.h <<_ACEOF | |
10847 | #define PYTHON_PATH_RELOCATABLE $value | |
10848 | _ACEOF | |
10849 | ||
10850 | ||
10851 | fi | |
81ecdfbb | 10852 | fi |
436868fb | 10853 | fi |
436868fb | 10854 | |
ec685c5e | 10855 | if test "${have_libpython}" != no; then |
436868fb | 10856 | |
81ecdfbb | 10857 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10858 | |
81ecdfbb RW |
10859 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10860 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10861 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
10862 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" | |
436868fb | 10863 | |
81ecdfbb RW |
10864 | # Flags needed to compile Python code (taken from python-config --cflags). |
10865 | # We cannot call python-config directly because it will output whatever was | |
10866 | # used when compiling the Python interpreter itself, including flags which | |
10867 | # would make the python-related objects be compiled differently from the | |
10868 | # rest of GDB (e.g., -O2 and -fPIC). | |
10869 | if test "${GCC}" = yes; then | |
10870 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
10871 | fi | |
436868fb | 10872 | |
81ecdfbb RW |
10873 | if test "x${tentative_python_cflags}" != x; then |
10874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10875 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10876 | for flag in ${tentative_python_cflags}; do | |
10877 | # Check that the compiler accepts it | |
10878 | saved_CFLAGS="$CFLAGS" | |
10879 | CFLAGS="$CFLAGS $flag" | |
10880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10881 | /* end confdefs.h. */ |
81ecdfbb | 10882 | |
a9322a30 TT |
10883 | int |
10884 | main () | |
10885 | { | |
a9322a30 TT |
10886 | |
10887 | ; | |
10888 | return 0; | |
10889 | } | |
bec39cab | 10890 | _ACEOF |
81ecdfbb RW |
10891 | if ac_fn_c_try_compile "$LINENO"; then : |
10892 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10893 | fi |
81ecdfbb RW |
10894 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10895 | CFLAGS="$saved_CFLAGS" | |
10896 | done | |
10897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10898 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10899 | fi | |
10900 | else | |
10901 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
10902 | # included. |
10903 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
10904 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
10905 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 10906 | fi |
9a156167 | 10907 | |
9a156167 | 10908 | |
81ecdfbb RW |
10909 | # ------------------------- # |
10910 | # Checks for header files. # | |
10911 | # ------------------------- # | |
c890192f | 10912 | |
81ecdfbb RW |
10913 | ac_header_dirent=no |
10914 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
10915 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
10916 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
10917 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
10918 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
10919 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10920 | else |
81ecdfbb | 10921 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10922 | /* end confdefs.h. */ |
81ecdfbb RW |
10923 | #include <sys/types.h> |
10924 | #include <$ac_hdr> | |
10925 | ||
a9322a30 TT |
10926 | int |
10927 | main () | |
10928 | { | |
81ecdfbb RW |
10929 | if ((DIR *) 0) |
10930 | return 0; | |
a9322a30 TT |
10931 | ; |
10932 | return 0; | |
10933 | } | |
bec39cab | 10934 | _ACEOF |
81ecdfbb RW |
10935 | if ac_fn_c_try_compile "$LINENO"; then : |
10936 | eval "$as_ac_Header=yes" | |
bec39cab | 10937 | else |
81ecdfbb | 10938 | eval "$as_ac_Header=no" |
bec39cab | 10939 | fi |
81ecdfbb | 10940 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 10941 | fi |
81ecdfbb RW |
10942 | eval ac_res=\$$as_ac_Header |
10943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
10944 | $as_echo "$ac_res" >&6; } | |
10945 | eval as_val=\$$as_ac_Header | |
10946 | if test "x$as_val" = x""yes; then : | |
10947 | cat >>confdefs.h <<_ACEOF | |
10948 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 10949 | _ACEOF |
bec39cab | 10950 | |
81ecdfbb RW |
10951 | ac_header_dirent=$ac_hdr; break |
10952 | fi | |
bec39cab | 10953 | |
81ecdfbb RW |
10954 | done |
10955 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
10956 | if test $ac_header_dirent = dirent.h; then | |
10957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
10958 | $as_echo_n "checking for library containing opendir... " >&6; } | |
10959 | if test "${ac_cv_search_opendir+set}" = set; then : | |
10960 | $as_echo_n "(cached) " >&6 | |
c890192f | 10961 | else |
81ecdfbb RW |
10962 | ac_func_search_save_LIBS=$LIBS |
10963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10964 | /* end confdefs.h. */ | |
10965 | ||
10966 | /* Override any GCC internal prototype to avoid an error. | |
10967 | Use char because int might match the return type of a GCC | |
10968 | builtin and then its argument prototype would still apply. */ | |
10969 | #ifdef __cplusplus | |
10970 | extern "C" | |
10971 | #endif | |
10972 | char opendir (); | |
10973 | int | |
10974 | main () | |
10975 | { | |
10976 | return opendir (); | |
10977 | ; | |
10978 | return 0; | |
10979 | } | |
bec39cab | 10980 | _ACEOF |
81ecdfbb RW |
10981 | for ac_lib in '' dir; do |
10982 | if test -z "$ac_lib"; then | |
10983 | ac_res="none required" | |
10984 | else | |
10985 | ac_res=-l$ac_lib | |
10986 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
10987 | fi | |
10988 | if ac_fn_c_try_link "$LINENO"; then : | |
10989 | ac_cv_search_opendir=$ac_res | |
10990 | fi | |
10991 | rm -f core conftest.err conftest.$ac_objext \ | |
10992 | conftest$ac_exeext | |
10993 | if test "${ac_cv_search_opendir+set}" = set; then : | |
10994 | break | |
10995 | fi | |
10996 | done | |
10997 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 10998 | |
81ecdfbb RW |
10999 | else |
11000 | ac_cv_search_opendir=no | |
11001 | fi | |
11002 | rm conftest.$ac_ext | |
11003 | LIBS=$ac_func_search_save_LIBS | |
11004 | fi | |
11005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
11006 | $as_echo "$ac_cv_search_opendir" >&6; } | |
11007 | ac_res=$ac_cv_search_opendir | |
11008 | if test "$ac_res" != no; then : | |
11009 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 11010 | |
bec39cab | 11011 | fi |
81ecdfbb | 11012 | |
bec39cab | 11013 | else |
81ecdfbb RW |
11014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
11015 | $as_echo_n "checking for library containing opendir... " >&6; } | |
11016 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11017 | $as_echo_n "(cached) " >&6 | |
11018 | else | |
11019 | ac_func_search_save_LIBS=$LIBS | |
11020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11021 | /* end confdefs.h. */ |
81ecdfbb RW |
11022 | |
11023 | /* Override any GCC internal prototype to avoid an error. | |
11024 | Use char because int might match the return type of a GCC | |
11025 | builtin and then its argument prototype would still apply. */ | |
11026 | #ifdef __cplusplus | |
11027 | extern "C" | |
11028 | #endif | |
11029 | char opendir (); | |
a9322a30 TT |
11030 | int |
11031 | main () | |
11032 | { | |
81ecdfbb | 11033 | return opendir (); |
a9322a30 TT |
11034 | ; |
11035 | return 0; | |
11036 | } | |
bec39cab | 11037 | _ACEOF |
81ecdfbb RW |
11038 | for ac_lib in '' x; do |
11039 | if test -z "$ac_lib"; then | |
11040 | ac_res="none required" | |
11041 | else | |
11042 | ac_res=-l$ac_lib | |
11043 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11044 | fi | |
11045 | if ac_fn_c_try_link "$LINENO"; then : | |
11046 | ac_cv_search_opendir=$ac_res | |
11047 | fi | |
11048 | rm -f core conftest.err conftest.$ac_objext \ | |
11049 | conftest$ac_exeext | |
11050 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11051 | break | |
11052 | fi | |
11053 | done | |
11054 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 11055 | |
81ecdfbb RW |
11056 | else |
11057 | ac_cv_search_opendir=no | |
bec39cab | 11058 | fi |
81ecdfbb RW |
11059 | rm conftest.$ac_ext |
11060 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 11061 | fi |
81ecdfbb RW |
11062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
11063 | $as_echo "$ac_cv_search_opendir" >&6; } | |
11064 | ac_res=$ac_cv_search_opendir | |
11065 | if test "$ac_res" != no; then : | |
11066 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 11067 | |
81ecdfbb | 11068 | fi |
bec39cab | 11069 | |
81ecdfbb | 11070 | fi |
bec39cab | 11071 | |
81ecdfbb RW |
11072 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
11073 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
11074 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
11075 | $as_echo_n "(cached) " >&6 | |
9a156167 | 11076 | else |
81ecdfbb RW |
11077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11078 | /* end confdefs.h. */ | |
11079 | #include <sys/types.h> | |
11080 | #include <sys/stat.h> | |
11081 | ||
11082 | #if defined S_ISBLK && defined S_IFDIR | |
11083 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
11084 | #endif | |
11085 | ||
11086 | #if defined S_ISBLK && defined S_IFCHR | |
11087 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
11088 | #endif | |
11089 | ||
11090 | #if defined S_ISLNK && defined S_IFREG | |
11091 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
11092 | #endif | |
11093 | ||
11094 | #if defined S_ISSOCK && defined S_IFREG | |
11095 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
11096 | #endif | |
11097 | ||
bec39cab | 11098 | _ACEOF |
81ecdfbb RW |
11099 | if ac_fn_c_try_compile "$LINENO"; then : |
11100 | ac_cv_header_stat_broken=no | |
11101 | else | |
11102 | ac_cv_header_stat_broken=yes | |
11103 | fi | |
11104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11105 | fi | |
11106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
11107 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
11108 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 11109 | |
81ecdfbb | 11110 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 11111 | |
bec39cab | 11112 | fi |
81ecdfbb RW |
11113 | |
11114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
11115 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11116 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11117 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11118 | else |
81ecdfbb | 11119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11120 | /* end confdefs.h. */ |
81ecdfbb RW |
11121 | #include <stdlib.h> |
11122 | #include <stdarg.h> | |
11123 | #include <string.h> | |
11124 | #include <float.h> | |
11125 | ||
a9322a30 TT |
11126 | int |
11127 | main () | |
11128 | { | |
a9322a30 TT |
11129 | |
11130 | ; | |
11131 | return 0; | |
11132 | } | |
bec39cab | 11133 | _ACEOF |
81ecdfbb RW |
11134 | if ac_fn_c_try_compile "$LINENO"; then : |
11135 | ac_cv_header_stdc=yes | |
bec39cab | 11136 | else |
81ecdfbb | 11137 | ac_cv_header_stdc=no |
a9322a30 | 11138 | fi |
81ecdfbb | 11139 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11140 | |
81ecdfbb RW |
11141 | if test $ac_cv_header_stdc = yes; then |
11142 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11143 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11144 | /* end confdefs.h. */ | |
11145 | #include <string.h> | |
bec39cab | 11146 | |
81ecdfbb RW |
11147 | _ACEOF |
11148 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11149 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 11150 | |
bec39cab | 11151 | else |
81ecdfbb RW |
11152 | ac_cv_header_stdc=no |
11153 | fi | |
11154 | rm -f conftest* | |
11155 | ||
11156 | fi | |
11157 | ||
11158 | if test $ac_cv_header_stdc = yes; then | |
11159 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11161 | /* end confdefs.h. */ | |
11162 | #include <stdlib.h> | |
11163 | ||
bec39cab | 11164 | _ACEOF |
81ecdfbb RW |
11165 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11166 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 11167 | |
81ecdfbb RW |
11168 | else |
11169 | ac_cv_header_stdc=no | |
11170 | fi | |
11171 | rm -f conftest* | |
bec39cab | 11172 | |
bec39cab | 11173 | fi |
81ecdfbb RW |
11174 | |
11175 | if test $ac_cv_header_stdc = yes; then | |
11176 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11177 | if test "$cross_compiling" = yes; then : | |
11178 | : | |
bec39cab | 11179 | else |
81ecdfbb | 11180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11181 | /* end confdefs.h. */ |
81ecdfbb RW |
11182 | #include <ctype.h> |
11183 | #include <stdlib.h> | |
11184 | #if ((' ' & 0x0FF) == 0x020) | |
11185 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11186 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11187 | #else | |
11188 | # define ISLOWER(c) \ | |
11189 | (('a' <= (c) && (c) <= 'i') \ | |
11190 | || ('j' <= (c) && (c) <= 'r') \ | |
11191 | || ('s' <= (c) && (c) <= 'z')) | |
11192 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11193 | #endif | |
11194 | ||
11195 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
11196 | int |
11197 | main () | |
11198 | { | |
81ecdfbb RW |
11199 | int i; |
11200 | for (i = 0; i < 256; i++) | |
11201 | if (XOR (islower (i), ISLOWER (i)) | |
11202 | || toupper (i) != TOUPPER (i)) | |
11203 | return 2; | |
a9322a30 TT |
11204 | return 0; |
11205 | } | |
bec39cab | 11206 | _ACEOF |
81ecdfbb RW |
11207 | if ac_fn_c_try_run "$LINENO"; then : |
11208 | ||
bec39cab | 11209 | else |
81ecdfbb RW |
11210 | ac_cv_header_stdc=no |
11211 | fi | |
11212 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11213 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11214 | fi | |
bec39cab | 11215 | |
bec39cab | 11216 | fi |
a9322a30 | 11217 | fi |
81ecdfbb RW |
11218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
11219 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11220 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 11221 | |
81ecdfbb | 11222 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 11223 | |
81ecdfbb | 11224 | fi |
bec39cab | 11225 | |
81ecdfbb RW |
11226 | # elf_hp.h is for HP/UX 64-bit shared library support. |
11227 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
11228 | # unconditionally, so what's the point in checking these? | |
11229 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
11230 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
11231 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
11232 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
11233 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
11234 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
11235 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
11236 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h | |
11237 | do : | |
11238 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11239 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11240 | eval as_val=\$$as_ac_Header | |
11241 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11242 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11243 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11244 | _ACEOF |
c906108c | 11245 | |
bec39cab | 11246 | fi |
81ecdfbb RW |
11247 | |
11248 | done | |
11249 | ||
11250 | for ac_header in link.h | |
11251 | do : | |
11252 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
11253 | # include <sys/types.h> | |
11254 | #endif | |
11255 | #if HAVE_NLIST_H | |
11256 | # include <nlist.h> | |
a9322a30 TT |
11257 | #endif |
11258 | ||
81ecdfbb RW |
11259 | " |
11260 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
11261 | cat >>confdefs.h <<_ACEOF | |
11262 | #define HAVE_LINK_H 1 | |
bec39cab | 11263 | _ACEOF |
bec39cab | 11264 | |
a9322a30 | 11265 | fi |
bec39cab | 11266 | |
81ecdfbb | 11267 | done |
c906108c | 11268 | |
81ecdfbb RW |
11269 | for ac_header in sys/proc.h |
11270 | do : | |
11271 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
11272 | # include <sys/param.h> | |
11273 | #endif | |
c906108c | 11274 | |
81ecdfbb RW |
11275 | " |
11276 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 11277 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11278 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 11279 | _ACEOF |
5ee754fc | 11280 | |
bec39cab | 11281 | fi |
81ecdfbb RW |
11282 | |
11283 | done | |
11284 | ||
11285 | for ac_header in sys/user.h | |
11286 | do : | |
11287 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
11288 | # include <sys/param.h> | |
a9322a30 TT |
11289 | #endif |
11290 | ||
81ecdfbb RW |
11291 | " |
11292 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
11293 | cat >>confdefs.h <<_ACEOF | |
11294 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 11295 | _ACEOF |
bec39cab | 11296 | |
a9322a30 | 11297 | fi |
bec39cab | 11298 | |
81ecdfbb | 11299 | done |
5ee754fc | 11300 | |
5ee754fc | 11301 | |
81ecdfbb RW |
11302 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
11303 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
11304 | # think that we don't have <curses.h> if we're using GCC. | |
11305 | case $host_os in | |
11306 | solaris2.[789]) | |
11307 | if test "$GCC" = yes; then | |
11308 | ||
11309 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
11310 | ||
11311 | fi ;; | |
11312 | esac | |
11313 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
11314 | do : | |
11315 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11316 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11317 | eval as_val=\$$as_ac_Header | |
11318 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11319 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11320 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11321 | _ACEOF |
5ee754fc MK |
11322 | |
11323 | fi | |
11324 | ||
81ecdfbb | 11325 | done |
bec39cab | 11326 | |
81ecdfbb RW |
11327 | for ac_header in term.h |
11328 | do : | |
11329 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
11330 | # include <curses.h> | |
11331 | #endif | |
bec39cab | 11332 | |
81ecdfbb RW |
11333 | " |
11334 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
11335 | cat >>confdefs.h <<_ACEOF | |
11336 | #define HAVE_TERM_H 1 | |
a8111142 | 11337 | _ACEOF |
a8111142 | 11338 | |
a8111142 | 11339 | fi |
a8111142 | 11340 | |
81ecdfbb | 11341 | done |
a8111142 TT |
11342 | |
11343 | ||
81ecdfbb RW |
11344 | # ------------------------- # |
11345 | # Checks for declarations. # | |
11346 | # ------------------------- # | |
a9322a30 | 11347 | |
81ecdfbb RW |
11348 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
11349 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
11350 | ac_have_decl=1 | |
bec39cab | 11351 | else |
81ecdfbb RW |
11352 | ac_have_decl=0 |
11353 | fi | |
11354 | ||
11355 | cat >>confdefs.h <<_ACEOF | |
11356 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 11357 | _ACEOF |
81ecdfbb RW |
11358 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
11359 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
11360 | ac_have_decl=1 | |
11361 | else | |
11362 | ac_have_decl=0 | |
11363 | fi | |
11364 | ||
11365 | cat >>confdefs.h <<_ACEOF | |
11366 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 11367 | _ACEOF |
81ecdfbb RW |
11368 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
11369 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
11370 | ac_have_decl=1 | |
bec39cab | 11371 | else |
81ecdfbb RW |
11372 | ac_have_decl=0 |
11373 | fi | |
bec39cab | 11374 | |
81ecdfbb RW |
11375 | cat >>confdefs.h <<_ACEOF |
11376 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 11377 | _ACEOF |
81ecdfbb RW |
11378 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
11379 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
11380 | ac_have_decl=1 | |
11381 | else | |
11382 | ac_have_decl=0 | |
11383 | fi | |
11384 | ||
11385 | cat >>confdefs.h <<_ACEOF | |
11386 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 11387 | _ACEOF |
81ecdfbb RW |
11388 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
11389 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
11390 | ac_have_decl=1 | |
bec39cab | 11391 | else |
81ecdfbb RW |
11392 | ac_have_decl=0 |
11393 | fi | |
5ee754fc | 11394 | |
81ecdfbb RW |
11395 | cat >>confdefs.h <<_ACEOF |
11396 | #define HAVE_DECL_STRSTR $ac_have_decl | |
11397 | _ACEOF | |
11398 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
11399 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
11400 | ac_have_decl=1 | |
11401 | else | |
11402 | ac_have_decl=0 | |
5ee754fc | 11403 | fi |
81ecdfbb RW |
11404 | |
11405 | cat >>confdefs.h <<_ACEOF | |
11406 | #define HAVE_DECL_GETOPT $ac_have_decl | |
11407 | _ACEOF | |
11408 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
11409 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
11410 | ac_have_decl=1 | |
11411 | else | |
11412 | ac_have_decl=0 | |
5ee754fc | 11413 | fi |
81ecdfbb RW |
11414 | |
11415 | cat >>confdefs.h <<_ACEOF | |
11416 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11417 | _ACEOF | |
11418 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
11419 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
11420 | ac_have_decl=1 | |
11421 | else | |
11422 | ac_have_decl=0 | |
5ee754fc MK |
11423 | fi |
11424 | ||
a9322a30 | 11425 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11426 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 11427 | _ACEOF |
5ee754fc | 11428 | |
5ee754fc | 11429 | |
81ecdfbb RW |
11430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
11431 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
11432 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
11433 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11434 | else |
81ecdfbb | 11435 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11436 | /* end confdefs.h. */ |
81ecdfbb | 11437 | #include <locale.h> |
a9322a30 TT |
11438 | int |
11439 | main () | |
11440 | { | |
81ecdfbb | 11441 | return LC_MESSAGES |
a9322a30 TT |
11442 | ; |
11443 | return 0; | |
11444 | } | |
bec39cab | 11445 | _ACEOF |
81ecdfbb RW |
11446 | if ac_fn_c_try_link "$LINENO"; then : |
11447 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 11448 | else |
81ecdfbb RW |
11449 | am_cv_val_LC_MESSAGES=no |
11450 | fi | |
11451 | rm -f core conftest.err conftest.$ac_objext \ | |
11452 | conftest$ac_exeext conftest.$ac_ext | |
11453 | fi | |
11454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
11455 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
11456 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 11457 | |
81ecdfbb RW |
11458 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
11459 | ||
11460 | fi | |
11461 | ||
11462 | ||
11463 | # ----------------------- # | |
11464 | # Checks for structures. # | |
11465 | # ----------------------- # | |
11466 | ||
11467 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
11468 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
11469 | ||
11470 | cat >>confdefs.h <<_ACEOF | |
11471 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 11472 | _ACEOF |
7eb368b3 | 11473 | |
81ecdfbb | 11474 | |
7eb368b3 | 11475 | fi |
81ecdfbb RW |
11476 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
11477 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 11478 | |
a9322a30 TT |
11479 | cat >>confdefs.h <<_ACEOF |
11480 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
11481 | _ACEOF |
11482 | ||
a9322a30 | 11483 | |
7eb368b3 NR |
11484 | fi |
11485 | ||
7eb368b3 | 11486 | |
a9322a30 TT |
11487 | # ------------------ # |
11488 | # Checks for types. # | |
11489 | # ------------------ # | |
7eb368b3 | 11490 | |
81ecdfbb RW |
11491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
11492 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
11493 | if test "${ac_cv_type_signal+set}" = set; then : | |
11494 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11495 | else |
81ecdfbb | 11496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11497 | /* end confdefs.h. */ |
a9322a30 TT |
11498 | #include <sys/types.h> |
11499 | #include <signal.h> | |
7cb9022a | 11500 | |
a9322a30 TT |
11501 | int |
11502 | main () | |
11503 | { | |
81ecdfbb | 11504 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
11505 | ; |
11506 | return 0; | |
11507 | } | |
bec39cab | 11508 | _ACEOF |
81ecdfbb RW |
11509 | if ac_fn_c_try_compile "$LINENO"; then : |
11510 | ac_cv_type_signal=int | |
bec39cab | 11511 | else |
81ecdfbb | 11512 | ac_cv_type_signal=void |
bec39cab | 11513 | fi |
81ecdfbb | 11514 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11515 | fi |
81ecdfbb RW |
11516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
11517 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 11518 | |
a9322a30 TT |
11519 | cat >>confdefs.h <<_ACEOF |
11520 | #define RETSIGTYPE $ac_cv_type_signal | |
11521 | _ACEOF | |
5ee754fc | 11522 | |
bec39cab | 11523 | |
81ecdfbb | 11524 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
11525 | #include <sys/socket.h> |
11526 | ||
81ecdfbb RW |
11527 | " |
11528 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 11529 | |
a9322a30 TT |
11530 | cat >>confdefs.h <<_ACEOF |
11531 | #define HAVE_SOCKLEN_T 1 | |
11532 | _ACEOF | |
11533 | ||
11534 | ||
11535 | fi | |
11536 | ||
11537 | ||
11538 | # ------------------------------------- # | |
11539 | # Checks for compiler characteristics. # | |
11540 | # ------------------------------------- # | |
11541 | ||
81ecdfbb RW |
11542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
11543 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
11544 | if test "${ac_cv_c_const+set}" = set; then : | |
11545 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11546 | else |
81ecdfbb | 11547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11548 | /* end confdefs.h. */ |
a9322a30 TT |
11549 | |
11550 | int | |
11551 | main () | |
11552 | { | |
11553 | /* FIXME: Include the comments suggested by Paul. */ | |
11554 | #ifndef __cplusplus | |
11555 | /* Ultrix mips cc rejects this. */ | |
11556 | typedef int charset[2]; | |
81ecdfbb | 11557 | const charset cs; |
a9322a30 | 11558 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
11559 | char const *const *pcpcc; |
11560 | char **ppc; | |
a9322a30 TT |
11561 | /* NEC SVR4.0.2 mips cc rejects this. */ |
11562 | struct point {int x, y;}; | |
11563 | static struct point const zero = {0,0}; | |
11564 | /* AIX XL C 1.02.0.0 rejects this. | |
11565 | It does not let you subtract one const X* pointer from another in | |
11566 | an arm of an if-expression whose if-part is not a constant | |
11567 | expression */ | |
11568 | const char *g = "string"; | |
81ecdfbb | 11569 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 11570 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
11571 | ++pcpcc; |
11572 | ppc = (char**) pcpcc; | |
11573 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
11574 | { /* SCO 3.2v4 cc rejects this. */ |
11575 | char *t; | |
11576 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
11577 | ||
11578 | *t++ = 0; | |
81ecdfbb | 11579 | if (s) return 0; |
a9322a30 TT |
11580 | } |
11581 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
11582 | int x[] = {25, 17}; | |
11583 | const int *foo = &x[0]; | |
11584 | ++foo; | |
11585 | } | |
11586 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
11587 | typedef const int *iptr; | |
11588 | iptr p = 0; | |
11589 | ++p; | |
11590 | } | |
11591 | { /* AIX XL C 1.02.0.0 rejects this saying | |
11592 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
11593 | struct s { int j; const int *ap[3]; }; | |
11594 | struct s *b; b->j = 5; | |
11595 | } | |
11596 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
11597 | const int foo = 10; | |
81ecdfbb | 11598 | if (!foo) return 0; |
a9322a30 | 11599 | } |
81ecdfbb | 11600 | return !cs[0] && !zero.x; |
a9322a30 TT |
11601 | #endif |
11602 | ||
11603 | ; | |
11604 | return 0; | |
11605 | } | |
bec39cab | 11606 | _ACEOF |
81ecdfbb | 11607 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11608 | ac_cv_c_const=yes |
5ee754fc | 11609 | else |
81ecdfbb | 11610 | ac_cv_c_const=no |
5ee754fc | 11611 | fi |
81ecdfbb | 11612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11613 | fi |
81ecdfbb RW |
11614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
11615 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 11616 | if test $ac_cv_c_const = no; then |
bec39cab | 11617 | |
81ecdfbb | 11618 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 11619 | |
5ee754fc | 11620 | fi |
bec39cab | 11621 | |
81ecdfbb RW |
11622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
11623 | $as_echo_n "checking for inline... " >&6; } | |
11624 | if test "${ac_cv_c_inline+set}" = set; then : | |
11625 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11626 | else |
a9322a30 TT |
11627 | ac_cv_c_inline=no |
11628 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 11629 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11630 | /* end confdefs.h. */ |
a9322a30 TT |
11631 | #ifndef __cplusplus |
11632 | typedef int foo_t; | |
11633 | static $ac_kw foo_t static_foo () {return 0; } | |
11634 | $ac_kw foo_t foo () {return 0; } | |
11635 | #endif | |
11636 | ||
bec39cab | 11637 | _ACEOF |
81ecdfbb RW |
11638 | if ac_fn_c_try_compile "$LINENO"; then : |
11639 | ac_cv_c_inline=$ac_kw | |
bec39cab | 11640 | fi |
81ecdfbb RW |
11641 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11642 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 11643 | done |
bec39cab | 11644 | |
5ee754fc | 11645 | fi |
81ecdfbb RW |
11646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
11647 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 11648 | |
a9322a30 TT |
11649 | case $ac_cv_c_inline in |
11650 | inline | yes) ;; | |
11651 | *) | |
11652 | case $ac_cv_c_inline in | |
11653 | no) ac_val=;; | |
11654 | *) ac_val=$ac_cv_c_inline;; | |
11655 | esac | |
11656 | cat >>confdefs.h <<_ACEOF | |
11657 | #ifndef __cplusplus | |
11658 | #define inline $ac_val | |
11659 | #endif | |
11660 | _ACEOF | |
bec39cab AC |
11661 | ;; |
11662 | esac | |
bec39cab | 11663 | |
81ecdfbb RW |
11664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
11665 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
11666 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
11667 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11668 | else |
81ecdfbb RW |
11669 | ac_cv_c_bigendian=unknown |
11670 | # See if we're dealing with a universal compiler. | |
11671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11672 | /* end confdefs.h. */ | |
11673 | #ifndef __APPLE_CC__ | |
11674 | not a universal capable compiler | |
11675 | #endif | |
11676 | typedef int dummy; | |
11677 | ||
11678 | _ACEOF | |
11679 | if ac_fn_c_try_compile "$LINENO"; then : | |
11680 | ||
11681 | # Check for potential -arch flags. It is not universal unless | |
11682 | # there are at least two -arch flags with different values. | |
11683 | ac_arch= | |
11684 | ac_prev= | |
11685 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
11686 | if test -n "$ac_prev"; then | |
11687 | case $ac_word in | |
11688 | i?86 | x86_64 | ppc | ppc64) | |
11689 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
11690 | ac_arch=$ac_word | |
11691 | else | |
11692 | ac_cv_c_bigendian=universal | |
11693 | break | |
11694 | fi | |
11695 | ;; | |
11696 | esac | |
11697 | ac_prev= | |
11698 | elif test "x$ac_word" = "x-arch"; then | |
11699 | ac_prev=arch | |
11700 | fi | |
11701 | done | |
11702 | fi | |
11703 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11704 | if test $ac_cv_c_bigendian = unknown; then | |
11705 | # See if sys/param.h defines the BYTE_ORDER macro. | |
11706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11707 | /* end confdefs.h. */ |
a9322a30 | 11708 | #include <sys/types.h> |
81ecdfbb | 11709 | #include <sys/param.h> |
a9322a30 TT |
11710 | |
11711 | int | |
11712 | main () | |
11713 | { | |
81ecdfbb RW |
11714 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
11715 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
11716 | && LITTLE_ENDIAN) | |
11717 | bogus endian macros | |
11718 | #endif | |
a9322a30 TT |
11719 | |
11720 | ; | |
11721 | return 0; | |
11722 | } | |
bec39cab | 11723 | _ACEOF |
81ecdfbb | 11724 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11725 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 11726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11727 | /* end confdefs.h. */ |
a9322a30 | 11728 | #include <sys/types.h> |
81ecdfbb | 11729 | #include <sys/param.h> |
a9322a30 TT |
11730 | |
11731 | int | |
11732 | main () | |
11733 | { | |
11734 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
11735 | not big endian |
11736 | #endif | |
a9322a30 TT |
11737 | |
11738 | ; | |
11739 | return 0; | |
11740 | } | |
bec39cab | 11741 | _ACEOF |
81ecdfbb | 11742 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11743 | ac_cv_c_bigendian=yes |
5ee754fc | 11744 | else |
81ecdfbb | 11745 | ac_cv_c_bigendian=no |
5ee754fc | 11746 | fi |
81ecdfbb RW |
11747 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11748 | fi | |
11749 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11750 | fi | |
11751 | if test $ac_cv_c_bigendian = unknown; then | |
11752 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
11753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11754 | /* end confdefs.h. */ | |
11755 | #include <limits.h> | |
bec39cab | 11756 | |
81ecdfbb RW |
11757 | int |
11758 | main () | |
11759 | { | |
11760 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
11761 | bogus endian macros | |
11762 | #endif | |
11763 | ||
11764 | ; | |
11765 | return 0; | |
11766 | } | |
7eb368b3 | 11767 | _ACEOF |
81ecdfbb RW |
11768 | if ac_fn_c_try_compile "$LINENO"; then : |
11769 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
11770 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 11771 | /* end confdefs.h. */ |
81ecdfbb RW |
11772 | #include <limits.h> |
11773 | ||
7eb368b3 NR |
11774 | int |
11775 | main () | |
11776 | { | |
81ecdfbb RW |
11777 | #ifndef _BIG_ENDIAN |
11778 | not big endian | |
11779 | #endif | |
11780 | ||
7eb368b3 NR |
11781 | ; |
11782 | return 0; | |
11783 | } | |
11784 | _ACEOF | |
81ecdfbb | 11785 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11786 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
11787 | else |
11788 | ac_cv_c_bigendian=no | |
a9322a30 | 11789 | fi |
81ecdfbb | 11790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 11791 | fi |
81ecdfbb RW |
11792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11793 | fi | |
11794 | if test $ac_cv_c_bigendian = unknown; then | |
11795 | # Compile a test program. | |
11796 | if test "$cross_compiling" = yes; then : | |
11797 | # Try to guess by grepping values from an object file. | |
11798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11799 | /* end confdefs.h. */ | |
11800 | short int ascii_mm[] = | |
11801 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
11802 | short int ascii_ii[] = | |
11803 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
11804 | int use_ascii (int i) { | |
11805 | return ascii_mm[i] + ascii_ii[i]; | |
11806 | } | |
11807 | short int ebcdic_ii[] = | |
11808 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
11809 | short int ebcdic_mm[] = | |
11810 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
11811 | int use_ebcdic (int i) { | |
11812 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
11813 | } | |
11814 | extern int foo; | |
7eb368b3 | 11815 | |
81ecdfbb RW |
11816 | int |
11817 | main () | |
11818 | { | |
11819 | return use_ascii (foo) == use_ebcdic (foo); | |
11820 | ; | |
11821 | return 0; | |
11822 | } | |
11823 | _ACEOF | |
11824 | if ac_fn_c_try_compile "$LINENO"; then : | |
11825 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
11826 | ac_cv_c_bigendian=yes | |
11827 | fi | |
11828 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
11829 | if test "$ac_cv_c_bigendian" = unknown; then | |
11830 | ac_cv_c_bigendian=no | |
11831 | else | |
11832 | # finding both strings is unlikely to happen, but who knows? | |
11833 | ac_cv_c_bigendian=unknown | |
11834 | fi | |
11835 | fi | |
7eb368b3 | 11836 | fi |
81ecdfbb | 11837 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11838 | else |
81ecdfbb | 11839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11840 | /* end confdefs.h. */ |
81ecdfbb | 11841 | $ac_includes_default |
d3ea6809 MM |
11842 | int |
11843 | main () | |
11844 | { | |
81ecdfbb RW |
11845 | |
11846 | /* Are we little or big endian? From Harbison&Steele. */ | |
11847 | union | |
11848 | { | |
11849 | long int l; | |
11850 | char c[sizeof (long int)]; | |
11851 | } u; | |
11852 | u.l = 1; | |
11853 | return u.c[sizeof (long int) - 1] == 1; | |
11854 | ||
11855 | ; | |
11856 | return 0; | |
d3ea6809 MM |
11857 | } |
11858 | _ACEOF | |
81ecdfbb | 11859 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 11860 | ac_cv_c_bigendian=no |
d3ea6809 | 11861 | else |
81ecdfbb | 11862 | ac_cv_c_bigendian=yes |
d3ea6809 | 11863 | fi |
81ecdfbb RW |
11864 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11865 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11866 | fi |
a9322a30 | 11867 | |
81ecdfbb RW |
11868 | fi |
11869 | fi | |
11870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
11871 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
11872 | case $ac_cv_c_bigendian in #( | |
11873 | yes) | |
11874 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
11875 | ;; #( | |
11876 | no) | |
11877 | ;; #( | |
11878 | universal) | |
11879 | ||
11880 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
11881 | ||
11882 | ;; #( | |
11883 | *) | |
11884 | as_fn_error "unknown endianness | |
11885 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
11886 | esac | |
d3ea6809 MM |
11887 | |
11888 | ||
a9322a30 TT |
11889 | # ------------------------------ # |
11890 | # Checks for library functions. # | |
11891 | # ------------------------------ # | |
d3ea6809 | 11892 | |
a9322a30 TT |
11893 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
11894 | # for constant arguments. Useless! | |
81ecdfbb RW |
11895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
11896 | $as_echo_n "checking for working alloca.h... " >&6; } | |
11897 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
11898 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 11899 | else |
81ecdfbb | 11900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 11901 | /* end confdefs.h. */ |
a9322a30 | 11902 | #include <alloca.h> |
bec39cab AC |
11903 | int |
11904 | main () | |
11905 | { | |
a9322a30 | 11906 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 11907 | if (p) return 0; |
bec39cab AC |
11908 | ; |
11909 | return 0; | |
11910 | } | |
11911 | _ACEOF | |
81ecdfbb | 11912 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 11913 | ac_cv_working_alloca_h=yes |
bec39cab | 11914 | else |
81ecdfbb | 11915 | ac_cv_working_alloca_h=no |
bec39cab | 11916 | fi |
81ecdfbb RW |
11917 | rm -f core conftest.err conftest.$ac_objext \ |
11918 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 11919 | fi |
81ecdfbb RW |
11920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
11921 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
11922 | if test $ac_cv_working_alloca_h = yes; then |
11923 | ||
81ecdfbb | 11924 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 11925 | |
c906108c | 11926 | fi |
bec39cab | 11927 | |
81ecdfbb RW |
11928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
11929 | $as_echo_n "checking for alloca... " >&6; } | |
11930 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
11931 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11932 | else |
81ecdfbb | 11933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11934 | /* end confdefs.h. */ |
a9322a30 TT |
11935 | #ifdef __GNUC__ |
11936 | # define alloca __builtin_alloca | |
b4e70030 | 11937 | #else |
a9322a30 TT |
11938 | # ifdef _MSC_VER |
11939 | # include <malloc.h> | |
11940 | # define alloca _alloca | |
11941 | # else | |
81ecdfbb | 11942 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
11943 | # include <alloca.h> |
11944 | # else | |
11945 | # ifdef _AIX | |
11946 | #pragma alloca | |
11947 | # else | |
11948 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
11949 | char *alloca (); | |
11950 | # endif | |
11951 | # endif | |
11952 | # endif | |
11953 | # endif | |
c906108c | 11954 | #endif |
97bf5e38 | 11955 | |
bec39cab AC |
11956 | int |
11957 | main () | |
11958 | { | |
a9322a30 | 11959 | char *p = (char *) alloca (1); |
81ecdfbb | 11960 | if (p) return 0; |
bec39cab AC |
11961 | ; |
11962 | return 0; | |
11963 | } | |
11964 | _ACEOF | |
81ecdfbb | 11965 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 11966 | ac_cv_func_alloca_works=yes |
bec39cab | 11967 | else |
81ecdfbb | 11968 | ac_cv_func_alloca_works=no |
bec39cab | 11969 | fi |
81ecdfbb RW |
11970 | rm -f core conftest.err conftest.$ac_objext \ |
11971 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 11972 | fi |
81ecdfbb RW |
11973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
11974 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
11975 | |
11976 | if test $ac_cv_func_alloca_works = yes; then | |
11977 | ||
81ecdfbb | 11978 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 11979 | |
a9322a30 TT |
11980 | else |
11981 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
11982 | # that cause trouble. Some versions do not even contain alloca or | |
11983 | # contain a buggy version. If you still want to use their alloca, | |
11984 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
11985 | ||
81ecdfbb | 11986 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 11987 | |
81ecdfbb | 11988 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 11989 | |
bec39cab | 11990 | |
81ecdfbb RW |
11991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
11992 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
11993 | if test "${ac_cv_os_cray+set}" = set; then : | |
11994 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11995 | else |
81ecdfbb | 11996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 11997 | /* end confdefs.h. */ |
81ecdfbb | 11998 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
11999 | webecray |
12000 | #else | |
12001 | wenotbecray | |
12002 | #endif | |
12003 | ||
12004 | _ACEOF | |
12005 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 12006 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
12007 | ac_cv_os_cray=yes |
12008 | else | |
81ecdfbb | 12009 | ac_cv_os_cray=no |
bec39cab | 12010 | fi |
81ecdfbb RW |
12011 | rm -f conftest* |
12012 | ||
bec39cab | 12013 | fi |
81ecdfbb RW |
12014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
12015 | $as_echo "$ac_cv_os_cray" >&6; } | |
12016 | if test $ac_cv_os_cray = yes; then | |
12017 | for ac_func in _getb67 GETB67 getb67; do | |
12018 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12019 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12020 | eval as_val=\$$as_ac_var | |
12021 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
12022 | |
12023 | cat >>confdefs.h <<_ACEOF | |
12024 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 12025 | _ACEOF |
c906108c | 12026 | |
a9322a30 | 12027 | break |
c906108c SS |
12028 | fi |
12029 | ||
a9322a30 TT |
12030 | done |
12031 | fi | |
bec39cab | 12032 | |
81ecdfbb RW |
12033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
12034 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
12035 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
12036 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12037 | else |
81ecdfbb | 12038 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12039 | ac_cv_c_stack_direction=0 |
bec39cab | 12040 | else |
81ecdfbb | 12041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12042 | /* end confdefs.h. */ |
81ecdfbb | 12043 | $ac_includes_default |
a9322a30 TT |
12044 | int |
12045 | find_stack_direction () | |
b4e70030 | 12046 | { |
a9322a30 TT |
12047 | static char *addr = 0; |
12048 | auto char dummy; | |
12049 | if (addr == 0) | |
12050 | { | |
12051 | addr = &dummy; | |
12052 | return find_stack_direction (); | |
12053 | } | |
12054 | else | |
12055 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 12056 | } |
b757528f | 12057 | |
bec39cab AC |
12058 | int |
12059 | main () | |
12060 | { | |
81ecdfbb | 12061 | return find_stack_direction () < 0; |
bec39cab AC |
12062 | } |
12063 | _ACEOF | |
81ecdfbb | 12064 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12065 | ac_cv_c_stack_direction=1 |
12066 | else | |
81ecdfbb | 12067 | ac_cv_c_stack_direction=-1 |
a9322a30 | 12068 | fi |
81ecdfbb RW |
12069 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12070 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12071 | fi |
a9322a30 | 12072 | |
81ecdfbb RW |
12073 | fi |
12074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12075 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
12076 | cat >>confdefs.h <<_ACEOF |
12077 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12078 | _ACEOF | |
12079 | ||
12080 | ||
12081 | fi | |
12082 | ||
a9322a30 | 12083 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
12084 | do : |
12085 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12086 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12087 | eval as_val=\$$as_ac_Header | |
12088 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12089 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12090 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12091 | _ACEOF |
b757528f | 12092 | |
b757528f | 12093 | fi |
bec39cab | 12094 | |
a9322a30 | 12095 | done |
a3828db0 | 12096 | |
a9322a30 | 12097 | for ac_func in getpagesize |
81ecdfbb RW |
12098 | do : |
12099 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
12100 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 12101 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12102 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12103 | _ACEOF |
bcb3dc3d | 12104 | |
bcb3dc3d MK |
12105 | fi |
12106 | done | |
12107 | ||
81ecdfbb RW |
12108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12109 | $as_echo_n "checking for working mmap... " >&6; } | |
12110 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
12111 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12112 | else |
81ecdfbb | 12113 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12114 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12115 | else |
81ecdfbb | 12116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12117 | /* end confdefs.h. */ |
a9322a30 TT |
12118 | $ac_includes_default |
12119 | /* malloc might have been renamed as rpl_malloc. */ | |
12120 | #undef malloc | |
bec39cab | 12121 | |
a9322a30 TT |
12122 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12123 | Here is a matrix of mmap possibilities: | |
12124 | mmap private not fixed | |
12125 | mmap private fixed at somewhere currently unmapped | |
12126 | mmap private fixed at somewhere already mapped | |
12127 | mmap shared not fixed | |
12128 | mmap shared fixed at somewhere currently unmapped | |
12129 | mmap shared fixed at somewhere already mapped | |
12130 | For private mappings, we should verify that changes cannot be read() | |
12131 | back from the file, nor mmap's back from the file at a different | |
12132 | address. (There have been systems where private was not correctly | |
12133 | implemented like the infamous i386 svr4.0, and systems where the | |
12134 | VM page cache was not coherent with the file system buffer cache | |
12135 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12136 | For shared mappings, we should conversely verify that changes get | |
12137 | propagated back to all the places they're supposed to be. | |
bec39cab | 12138 | |
a9322a30 TT |
12139 | Grep wants private fixed already mapped. |
12140 | The main things grep needs to know about mmap are: | |
12141 | * does it exist and is it safe to write into the mmap'd area | |
12142 | * how to use it (BSD variants) */ | |
8b9cf735 | 12143 | |
a9322a30 TT |
12144 | #include <fcntl.h> |
12145 | #include <sys/mman.h> | |
8b9cf735 | 12146 | |
81ecdfbb | 12147 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12148 | char *malloc (); |
a3828db0 MK |
12149 | #endif |
12150 | ||
a9322a30 | 12151 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12152 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 12153 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 12154 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
12155 | # define HAVE_SYS_PARAM_H 1 |
12156 | # endif | |
12157 | ||
12158 | # ifdef _SC_PAGESIZE | |
12159 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12160 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12161 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12162 | # include <sys/param.h> |
12163 | # ifdef EXEC_PAGESIZE | |
12164 | # define getpagesize() EXEC_PAGESIZE | |
12165 | # else /* no EXEC_PAGESIZE */ | |
12166 | # ifdef NBPG | |
12167 | # define getpagesize() NBPG * CLSIZE | |
12168 | # ifndef CLSIZE | |
12169 | # define CLSIZE 1 | |
12170 | # endif /* no CLSIZE */ | |
12171 | # else /* no NBPG */ | |
12172 | # ifdef NBPC | |
12173 | # define getpagesize() NBPC | |
12174 | # else /* no NBPC */ | |
12175 | # ifdef PAGESIZE | |
12176 | # define getpagesize() PAGESIZE | |
12177 | # endif /* PAGESIZE */ | |
12178 | # endif /* no NBPC */ | |
12179 | # endif /* no NBPG */ | |
12180 | # endif /* no EXEC_PAGESIZE */ | |
12181 | # else /* no HAVE_SYS_PARAM_H */ | |
12182 | # define getpagesize() 8192 /* punt totally */ | |
12183 | # endif /* no HAVE_SYS_PARAM_H */ | |
12184 | # endif /* no _SC_PAGESIZE */ | |
12185 | ||
12186 | #endif /* no HAVE_GETPAGESIZE */ | |
12187 | ||
bec39cab AC |
12188 | int |
12189 | main () | |
12190 | { | |
a9322a30 TT |
12191 | char *data, *data2, *data3; |
12192 | int i, pagesize; | |
12193 | int fd; | |
12194 | ||
12195 | pagesize = getpagesize (); | |
12196 | ||
12197 | /* First, make a file with some known garbage in it. */ | |
12198 | data = (char *) malloc (pagesize); | |
12199 | if (!data) | |
81ecdfbb | 12200 | return 1; |
a9322a30 TT |
12201 | for (i = 0; i < pagesize; ++i) |
12202 | *(data + i) = rand (); | |
12203 | umask (0); | |
12204 | fd = creat ("conftest.mmap", 0600); | |
12205 | if (fd < 0) | |
81ecdfbb | 12206 | return 1; |
a9322a30 | 12207 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 12208 | return 1; |
a9322a30 TT |
12209 | close (fd); |
12210 | ||
12211 | /* Next, try to mmap the file at a fixed address which already has | |
12212 | something else allocated at it. If we can, also make sure that | |
12213 | we see the same garbage. */ | |
12214 | fd = open ("conftest.mmap", O_RDWR); | |
12215 | if (fd < 0) | |
81ecdfbb | 12216 | return 1; |
a9322a30 TT |
12217 | data2 = (char *) malloc (2 * pagesize); |
12218 | if (!data2) | |
81ecdfbb RW |
12219 | return 1; |
12220 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
12221 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12222 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 12223 | return 1; |
a9322a30 TT |
12224 | for (i = 0; i < pagesize; ++i) |
12225 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 12226 | return 1; |
a9322a30 TT |
12227 | |
12228 | /* Finally, make sure that changes to the mapped area do not | |
12229 | percolate back to the file as seen by read(). (This is a bug on | |
12230 | some variants of i386 svr4.0.) */ | |
12231 | for (i = 0; i < pagesize; ++i) | |
12232 | *(data2 + i) = *(data2 + i) + 1; | |
12233 | data3 = (char *) malloc (pagesize); | |
12234 | if (!data3) | |
81ecdfbb | 12235 | return 1; |
a9322a30 | 12236 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 12237 | return 1; |
a9322a30 TT |
12238 | for (i = 0; i < pagesize; ++i) |
12239 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 12240 | return 1; |
a9322a30 | 12241 | close (fd); |
81ecdfbb | 12242 | return 0; |
bec39cab AC |
12243 | } |
12244 | _ACEOF | |
81ecdfbb | 12245 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12246 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12247 | else |
81ecdfbb | 12248 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12249 | fi |
81ecdfbb RW |
12250 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12251 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12252 | fi |
81ecdfbb | 12253 | |
a9322a30 | 12254 | fi |
81ecdfbb RW |
12255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12256 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12257 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12258 | ||
81ecdfbb | 12259 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12260 | |
086ec9eb | 12261 | fi |
a9322a30 | 12262 | rm -f conftest.mmap |
a3828db0 | 12263 | |
81ecdfbb RW |
12264 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
12265 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 12266 | |
a9322a30 TT |
12267 | else |
12268 | ||
12269 | cat >>confdefs.h <<_ACEOF | |
12270 | #define pid_t int | |
bec39cab | 12271 | _ACEOF |
086ec9eb MK |
12272 | |
12273 | fi | |
12274 | ||
81ecdfbb RW |
12275 | for ac_header in vfork.h |
12276 | do : | |
12277 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
12278 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 12279 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12280 | #define HAVE_VFORK_H 1 |
bec39cab | 12281 | _ACEOF |
c906108c SS |
12282 | |
12283 | fi | |
a9322a30 | 12284 | |
a3828db0 | 12285 | done |
c906108c | 12286 | |
a9322a30 | 12287 | for ac_func in fork vfork |
81ecdfbb RW |
12288 | do : |
12289 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12290 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12291 | eval as_val=\$$as_ac_var | |
12292 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 12293 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12294 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 12295 | _ACEOF |
b83266a0 | 12296 | |
97bf5e38 | 12297 | fi |
a3828db0 | 12298 | done |
b83266a0 | 12299 | |
a9322a30 | 12300 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
12301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
12302 | $as_echo_n "checking for working fork... " >&6; } | |
12303 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
12304 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12305 | else |
81ecdfbb | 12306 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12307 | ac_cv_func_fork_works=cross |
12308 | else | |
81ecdfbb RW |
12309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12310 | /* end confdefs.h. */ | |
12311 | $ac_includes_default | |
12312 | int | |
12313 | main () | |
12314 | { | |
12315 | ||
12316 | /* By Ruediger Kuhlmann. */ | |
12317 | return fork () < 0; | |
12318 | ||
12319 | ; | |
12320 | return 0; | |
12321 | } | |
a9322a30 | 12322 | _ACEOF |
81ecdfbb | 12323 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12324 | ac_cv_func_fork_works=yes |
12325 | else | |
81ecdfbb | 12326 | ac_cv_func_fork_works=no |
a9322a30 | 12327 | fi |
81ecdfbb RW |
12328 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12329 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12330 | fi |
81ecdfbb | 12331 | |
a9322a30 | 12332 | fi |
81ecdfbb RW |
12333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
12334 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
12335 | |
12336 | else | |
12337 | ac_cv_func_fork_works=$ac_cv_func_fork | |
12338 | fi | |
12339 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12340 | case $host in | |
12341 | *-*-amigaos* | *-*-msdosdjgpp*) | |
12342 | # Override, as these systems have only a dummy fork() stub | |
12343 | ac_cv_func_fork_works=no | |
12344 | ;; | |
12345 | *) | |
12346 | ac_cv_func_fork_works=yes | |
12347 | ;; | |
12348 | esac | |
81ecdfbb RW |
12349 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
12350 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12351 | fi |
12352 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
12353 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
12354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
12355 | $as_echo_n "checking for working vfork... " >&6; } | |
12356 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
12357 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12358 | else |
81ecdfbb | 12359 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12360 | ac_cv_func_vfork_works=cross |
12361 | else | |
81ecdfbb | 12362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
12363 | /* end confdefs.h. */ |
12364 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 12365 | $ac_includes_default |
a9322a30 | 12366 | #include <sys/wait.h> |
81ecdfbb | 12367 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
12368 | # include <vfork.h> |
12369 | #endif | |
12370 | /* On some sparc systems, changes by the child to local and incoming | |
12371 | argument registers are propagated back to the parent. The compiler | |
12372 | is told about this with #include <vfork.h>, but some compilers | |
12373 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
12374 | static variable whose address is put into a register that is | |
12375 | clobbered by the vfork. */ | |
12376 | static void | |
12377 | #ifdef __cplusplus | |
12378 | sparc_address_test (int arg) | |
12379 | # else | |
12380 | sparc_address_test (arg) int arg; | |
12381 | #endif | |
12382 | { | |
12383 | static pid_t child; | |
12384 | if (!child) { | |
12385 | child = vfork (); | |
12386 | if (child < 0) { | |
12387 | perror ("vfork"); | |
12388 | _exit(2); | |
12389 | } | |
12390 | if (!child) { | |
12391 | arg = getpid(); | |
12392 | write(-1, "", 0); | |
12393 | _exit (arg); | |
12394 | } | |
12395 | } | |
12396 | } | |
12397 | ||
12398 | int | |
12399 | main () | |
12400 | { | |
12401 | pid_t parent = getpid (); | |
12402 | pid_t child; | |
12403 | ||
12404 | sparc_address_test (0); | |
12405 | ||
12406 | child = vfork (); | |
12407 | ||
12408 | if (child == 0) { | |
12409 | /* Here is another test for sparc vfork register problems. This | |
12410 | test uses lots of local variables, at least as many local | |
12411 | variables as main has allocated so far including compiler | |
12412 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
12413 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
12414 | reuse the register of parent for one of the local variables, | |
12415 | since it will think that parent can't possibly be used any more | |
12416 | in this routine. Assigning to the local variable will thus | |
12417 | munge parent in the parent process. */ | |
12418 | pid_t | |
12419 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
12420 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
12421 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
12422 | use the same hardware register for all 8 local variables. */ | |
12423 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
12424 | || p != p5 || p != p6 || p != p7) | |
12425 | _exit(1); | |
12426 | ||
12427 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
12428 | from child file descriptors. If the child closes a descriptor | |
12429 | before it execs or exits, this munges the parent's descriptor | |
12430 | as well. Test for this by closing stdout in the child. */ | |
12431 | _exit(close(fileno(stdout)) != 0); | |
12432 | } else { | |
12433 | int status; | |
12434 | struct stat st; | |
12435 | ||
12436 | while (wait(&status) != child) | |
12437 | ; | |
81ecdfbb | 12438 | return ( |
a9322a30 TT |
12439 | /* Was there some problem with vforking? */ |
12440 | child < 0 | |
12441 | ||
12442 | /* Did the child fail? (This shouldn't happen.) */ | |
12443 | || status | |
12444 | ||
12445 | /* Did the vfork/compiler bug occur? */ | |
12446 | || parent != getpid() | |
12447 | ||
12448 | /* Did the file descriptor bug occur? */ | |
12449 | || fstat(fileno(stdout), &st) != 0 | |
12450 | ); | |
12451 | } | |
12452 | } | |
12453 | _ACEOF | |
81ecdfbb | 12454 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12455 | ac_cv_func_vfork_works=yes |
12456 | else | |
81ecdfbb | 12457 | ac_cv_func_vfork_works=no |
a9322a30 | 12458 | fi |
81ecdfbb RW |
12459 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12460 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12461 | fi |
81ecdfbb | 12462 | |
a9322a30 | 12463 | fi |
81ecdfbb RW |
12464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
12465 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
12466 | |
12467 | fi; | |
12468 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12469 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
12470 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
12471 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12472 | fi |
12473 | ||
12474 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
12475 | ||
81ecdfbb | 12476 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
12477 | |
12478 | else | |
12479 | ||
81ecdfbb | 12480 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
12481 | |
12482 | fi | |
12483 | if test "x$ac_cv_func_fork_works" = xyes; then | |
12484 | ||
81ecdfbb | 12485 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
12486 | |
12487 | fi | |
12488 | ||
a9322a30 | 12489 | for ac_func in canonicalize_file_name realpath getrusage getuid \ |
a156a290 | 12490 | getgid pipe poll pread64 sbrk setpgid setpgrp setsid \ |
a9322a30 | 12491 | sigaction sigprocmask sigsetmask socketpair syscall \ |
7991dee7 | 12492 | ttrace wborder setlocale iconvlist libiconvlist btowc \ |
be391dca | 12493 | setrlimit getrlimit posix_madvise |
81ecdfbb RW |
12494 | do : |
12495 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12496 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12497 | eval as_val=\$$as_ac_var | |
12498 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 12499 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12500 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
12501 | _ACEOF |
12502 | ||
12503 | fi | |
12504 | done | |
12505 | ||
12506 | ||
81ecdfbb RW |
12507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
12508 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12509 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
12510 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 12511 | else |
81ecdfbb | 12512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
12513 | /* end confdefs.h. */ |
12514 | #include <langinfo.h> | |
12515 | int | |
12516 | main () | |
12517 | { | |
12518 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
12519 | ; |
12520 | return 0; | |
12521 | } | |
12522 | _ACEOF | |
81ecdfbb | 12523 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 12524 | am_cv_langinfo_codeset=yes |
a4db0f07 | 12525 | else |
81ecdfbb | 12526 | am_cv_langinfo_codeset=no |
a4db0f07 | 12527 | fi |
81ecdfbb RW |
12528 | rm -f core conftest.err conftest.$ac_objext \ |
12529 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 12530 | |
a4db0f07 | 12531 | fi |
81ecdfbb RW |
12532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12533 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
12534 | if test $am_cv_langinfo_codeset = yes; then |
12535 | ||
81ecdfbb | 12536 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 12537 | |
6c7a06a3 | 12538 | fi |
c906108c | 12539 | |
06825bd1 | 12540 | |
a3828db0 MK |
12541 | # Check the return and argument types of ptrace. No canned test for |
12542 | # this, so roll our own. | |
12543 | gdb_ptrace_headers=' | |
12544 | #if HAVE_SYS_TYPES_H | |
12545 | # include <sys/types.h> | |
12546 | #endif | |
12547 | #if HAVE_SYS_PTRACE_H | |
12548 | # include <sys/ptrace.h> | |
12549 | #endif | |
12550 | #if HAVE_UNISTD_H | |
12551 | # include <unistd.h> | |
12552 | #endif | |
12553 | ' | |
12554 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
12555 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
12556 | " | |
12557 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
12558 | ac_have_decl=1 | |
06825bd1 | 12559 | else |
81ecdfbb | 12560 | ac_have_decl=0 |
06825bd1 | 12561 | fi |
06825bd1 | 12562 | |
a3828db0 | 12563 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12564 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 12565 | _ACEOF |
81ecdfbb | 12566 | if test $ac_have_decl = 1; then : |
bec39cab | 12567 | |
a3828db0 | 12568 | else |
a3828db0 MK |
12569 | |
12570 | : ${gdb_cv_func_ptrace_ret='int'} | |
12571 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12572 | ||
06825bd1 MK |
12573 | fi |
12574 | ||
064ef605 DJ |
12575 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
12576 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
12577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
12578 | $as_echo_n "checking return type of ptrace... " >&6; } | |
12579 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
12580 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12581 | else |
81ecdfbb | 12582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12583 | /* end confdefs.h. */ |
a3828db0 | 12584 | $gdb_ptrace_headers |
bec39cab AC |
12585 | int |
12586 | main () | |
12587 | { | |
064ef605 DJ |
12588 | extern long ptrace (enum __ptrace_request, ...); |
12589 | ; | |
12590 | return 0; | |
12591 | } | |
12592 | _ACEOF | |
81ecdfbb | 12593 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
12594 | gdb_cv_func_ptrace_ret='long' |
12595 | else | |
81ecdfbb | 12596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12597 | /* end confdefs.h. */ |
12598 | $gdb_ptrace_headers | |
12599 | int | |
12600 | main () | |
12601 | { | |
a3828db0 | 12602 | extern int ptrace (); |
bec39cab AC |
12603 | ; |
12604 | return 0; | |
12605 | } | |
12606 | _ACEOF | |
81ecdfbb | 12607 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12608 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 12609 | else |
81ecdfbb | 12610 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 12611 | fi |
81ecdfbb | 12612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 12613 | fi |
81ecdfbb | 12614 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 12615 | fi |
81ecdfbb RW |
12616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
12617 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 12618 | |
a3828db0 MK |
12619 | cat >>confdefs.h <<_ACEOF |
12620 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 12621 | _ACEOF |
70f9f479 | 12622 | |
a3828db0 | 12623 | # Check argument types. |
81ecdfbb RW |
12624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
12625 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
12626 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
12627 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12628 | else |
a3828db0 | 12629 | |
81ecdfbb | 12630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12631 | /* end confdefs.h. */ |
12632 | $gdb_ptrace_headers | |
12633 | int | |
12634 | main () | |
12635 | { | |
12636 | extern long ptrace (enum __ptrace_request, ...); | |
12637 | ; | |
12638 | return 0; | |
12639 | } | |
12640 | _ACEOF | |
81ecdfbb | 12641 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
12642 | gdb_cv_func_ptrace_args='int,int,long,long' |
12643 | else | |
064ef605 | 12644 | |
a3828db0 MK |
12645 | for gdb_arg1 in 'int' 'long'; do |
12646 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 12647 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 12648 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 12649 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12650 | /* end confdefs.h. */ |
a3828db0 | 12651 | $gdb_ptrace_headers |
bec39cab AC |
12652 | int |
12653 | main () | |
12654 | { | |
a3828db0 MK |
12655 | |
12656 | extern $gdb_cv_func_ptrace_ret | |
12657 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
12658 | ||
bec39cab AC |
12659 | ; |
12660 | return 0; | |
12661 | } | |
12662 | _ACEOF | |
81ecdfbb | 12663 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12664 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
12665 | break 4; | |
5c7f2947 | 12666 | fi |
81ecdfbb | 12667 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 12668 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 12669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12670 | /* end confdefs.h. */ |
a3828db0 | 12671 | $gdb_ptrace_headers |
bec39cab AC |
12672 | int |
12673 | main () | |
12674 | { | |
a3828db0 MK |
12675 | |
12676 | extern $gdb_cv_func_ptrace_ret | |
12677 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
12678 | ||
bec39cab AC |
12679 | ; |
12680 | return 0; | |
12681 | } | |
12682 | _ACEOF | |
81ecdfbb | 12683 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12684 | |
12685 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
12686 | break 5; | |
78434e59 | 12687 | fi |
81ecdfbb | 12688 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
12689 | done |
12690 | done | |
12691 | done | |
12692 | done | |
12693 | done | |
12694 | # Provide a safe default value. | |
12695 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12696 | ||
064ef605 | 12697 | fi |
81ecdfbb | 12698 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 12699 | fi |
81ecdfbb RW |
12700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
12701 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
12702 | ac_save_IFS=$IFS; IFS=',' |
12703 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
12704 | IFS=$ac_save_IFS | |
12705 | shift | |
bec39cab | 12706 | |
a3828db0 MK |
12707 | cat >>confdefs.h <<_ACEOF |
12708 | #define PTRACE_TYPE_ARG3 $3 | |
12709 | _ACEOF | |
12710 | ||
12711 | if test -n "$5"; then | |
12712 | ||
12713 | cat >>confdefs.h <<_ACEOF | |
12714 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 12715 | _ACEOF |
78434e59 MK |
12716 | |
12717 | fi | |
12718 | ||
a3828db0 | 12719 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
12720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12721 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12722 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12723 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 12724 | else |
81ecdfbb RW |
12725 | if test "$cross_compiling" = yes; then : |
12726 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 12727 | else |
81ecdfbb | 12728 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12729 | /* end confdefs.h. */ |
81ecdfbb | 12730 | $ac_includes_default |
bec39cab AC |
12731 | int |
12732 | main () | |
12733 | { | |
a3828db0 MK |
12734 | /* If this system has a BSD-style setpgrp which takes arguments, |
12735 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
12736 | exit successfully. */ | |
81ecdfbb | 12737 | return setpgrp (1,1) != -1; |
bec39cab AC |
12738 | ; |
12739 | return 0; | |
12740 | } | |
12741 | _ACEOF | |
81ecdfbb | 12742 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 12743 | ac_cv_func_setpgrp_void=no |
c906108c | 12744 | else |
81ecdfbb | 12745 | ac_cv_func_setpgrp_void=yes |
c906108c | 12746 | fi |
81ecdfbb RW |
12747 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12748 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12749 | fi |
81ecdfbb | 12750 | |
a3828db0 | 12751 | fi |
81ecdfbb RW |
12752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12753 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
12754 | if test $ac_cv_func_setpgrp_void = yes; then |
12755 | ||
81ecdfbb | 12756 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
12757 | |
12758 | fi | |
a3828db0 MK |
12759 | |
12760 | else | |
81ecdfbb RW |
12761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12762 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12763 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12764 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12765 | else |
81ecdfbb | 12766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12767 | /* end confdefs.h. */ |
a3828db0 MK |
12768 | |
12769 | #include <unistd.h> | |
12770 | ||
bec39cab AC |
12771 | int |
12772 | main () | |
12773 | { | |
a3828db0 MK |
12774 | |
12775 | if (setpgrp(1,1) == -1) | |
12776 | exit (0); | |
12777 | else | |
12778 | exit (1); | |
12779 | ||
bec39cab AC |
12780 | ; |
12781 | return 0; | |
12782 | } | |
12783 | _ACEOF | |
81ecdfbb | 12784 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12785 | ac_cv_func_setpgrp_void=no |
c906108c | 12786 | else |
81ecdfbb | 12787 | ac_cv_func_setpgrp_void=yes |
c906108c | 12788 | fi |
81ecdfbb | 12789 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12790 | fi |
81ecdfbb RW |
12791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12792 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 12793 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 12794 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 12795 | |
a3828db0 | 12796 | fi |
c906108c SS |
12797 | fi |
12798 | ||
a3828db0 MK |
12799 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
12800 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
12801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
12802 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
12803 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
12804 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12805 | else |
81ecdfbb | 12806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12807 | /* end confdefs.h. */ |
a3828db0 MK |
12808 | |
12809 | #include <setjmp.h> | |
12810 | ||
bec39cab AC |
12811 | int |
12812 | main () | |
12813 | { | |
a3828db0 | 12814 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
12815 | ; |
12816 | return 0; | |
12817 | } | |
12818 | _ACEOF | |
81ecdfbb | 12819 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12820 | gdb_cv_func_sigsetjmp=yes |
c906108c | 12821 | else |
81ecdfbb | 12822 | gdb_cv_func_sigsetjmp=no |
c906108c | 12823 | fi |
81ecdfbb | 12824 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12825 | fi |
81ecdfbb RW |
12826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
12827 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 12828 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 12829 | |
81ecdfbb | 12830 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 12831 | |
97bf5e38 | 12832 | fi |
c906108c | 12833 | |
a3828db0 MK |
12834 | # Assume we'll default to using the included libiberty regex. |
12835 | gdb_use_included_regex=yes | |
12836 | ||
12837 | # However, if the system regex is GNU regex, then default to *not* | |
12838 | # using the included regex. | |
81ecdfbb RW |
12839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
12840 | $as_echo_n "checking for GNU regex... " >&6; } | |
12841 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
12842 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12843 | else |
81ecdfbb | 12844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12845 | /* end confdefs.h. */ |
a3828db0 | 12846 | #include <gnu-versions.h> |
bec39cab AC |
12847 | int |
12848 | main () | |
12849 | { | |
81ecdfbb RW |
12850 | #define REGEX_INTERFACE_VERSION 1 |
12851 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
12852 | # error "Version mismatch" | |
12853 | #endif | |
5c45e068 MK |
12854 | ; |
12855 | return 0; | |
12856 | } | |
12857 | _ACEOF | |
81ecdfbb RW |
12858 | if ac_fn_c_try_compile "$LINENO"; then : |
12859 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 12860 | else |
81ecdfbb RW |
12861 | gdb_cv_have_gnu_regex=no |
12862 | fi | |
12863 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12864 | fi | |
12865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
12866 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
12867 | if test $gdb_cv_have_gnu_regex = yes; then | |
12868 | gdb_use_included_regex=no | |
5c45e068 | 12869 | fi |
81ecdfbb RW |
12870 | |
12871 | ||
12872 | # Check whether --with-included-regex was given. | |
12873 | if test "${with_included_regex+set}" = set; then : | |
12874 | withval=$with_included_regex; gdb_with_regex=$withval | |
12875 | else | |
12876 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 12877 | fi |
81ecdfbb RW |
12878 | |
12879 | if test "$gdb_with_regex" = yes; then | |
12880 | ||
12881 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
12882 | ||
c906108c | 12883 | fi |
81ecdfbb RW |
12884 | |
12885 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
12886 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
12887 | #include <sys/proc.h> | |
12888 | ||
12889 | " | |
12890 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 12891 | |
5c45e068 | 12892 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 12893 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 12894 | _ACEOF |
c906108c | 12895 | |
5c45e068 | 12896 | |
97bf5e38 | 12897 | fi |
c906108c | 12898 | |
5c45e068 | 12899 | |
a3828db0 | 12900 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
12901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
12902 | $as_echo_n "checking for struct lwp... " >&6; } | |
12903 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
12904 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12905 | else |
81ecdfbb | 12906 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12907 | /* end confdefs.h. */ |
a3828db0 MK |
12908 | #include <sys/param.h> |
12909 | #include <sys/lwp.h> | |
bec39cab AC |
12910 | int |
12911 | main () | |
12912 | { | |
a3828db0 | 12913 | struct lwp l; |
bec39cab AC |
12914 | ; |
12915 | return 0; | |
12916 | } | |
12917 | _ACEOF | |
81ecdfbb | 12918 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12919 | gdb_cv_struct_lwp=yes |
c906108c | 12920 | else |
81ecdfbb | 12921 | gdb_cv_struct_lwp=no |
c906108c | 12922 | fi |
81ecdfbb | 12923 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12924 | fi |
81ecdfbb RW |
12925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
12926 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 12927 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 12928 | |
81ecdfbb | 12929 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 12930 | |
97bf5e38 | 12931 | fi |
c906108c | 12932 | |
a3828db0 | 12933 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
12934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
12935 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
12936 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
12937 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12938 | else |
81ecdfbb | 12939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12940 | /* end confdefs.h. */ |
a3828db0 MK |
12941 | #include <sys/types.h> |
12942 | #include <machine/reg.h> | |
bec39cab AC |
12943 | int |
12944 | main () | |
12945 | { | |
a3828db0 | 12946 | struct reg r; |
bec39cab AC |
12947 | ; |
12948 | return 0; | |
12949 | } | |
12950 | _ACEOF | |
81ecdfbb | 12951 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12952 | gdb_cv_struct_reg=yes |
27ca5dad | 12953 | else |
81ecdfbb | 12954 | gdb_cv_struct_reg=no |
27ca5dad | 12955 | fi |
81ecdfbb | 12956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 12957 | fi |
81ecdfbb RW |
12958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
12959 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 12960 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 12961 | |
81ecdfbb | 12962 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
12963 | |
12964 | fi | |
97bf5e38 | 12965 | |
a3828db0 MK |
12966 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
12967 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
12968 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
12969 | " | |
12970 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
12971 | |
12972 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12973 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 12974 | _ACEOF |
3862412b | 12975 | |
5c45e068 | 12976 | |
97bf5e38 | 12977 | fi |
81ecdfbb RW |
12978 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
12979 | " | |
12980 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
12981 | |
12982 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12983 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 12984 | _ACEOF |
3862412b | 12985 | |
5c45e068 | 12986 | |
97bf5e38 | 12987 | fi |
3862412b | 12988 | |
5c45e068 | 12989 | |
a3828db0 | 12990 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
12991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
12992 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
12993 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
12994 | $as_echo_n "(cached) " >&6 | |
451928c5 | 12995 | else |
81ecdfbb | 12996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12997 | /* end confdefs.h. */ |
a3828db0 | 12998 | #include <sys/ptrace.h> |
bec39cab AC |
12999 | int |
13000 | main () | |
13001 | { | |
a3828db0 | 13002 | PTRACE_GETREGS; |
bec39cab AC |
13003 | ; |
13004 | return 0; | |
13005 | } | |
13006 | _ACEOF | |
81ecdfbb | 13007 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13008 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 13009 | else |
81ecdfbb | 13010 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 13011 | fi |
81ecdfbb | 13012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13013 | fi |
13014 | ||
81ecdfbb RW |
13015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
13016 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 13017 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 13018 | |
81ecdfbb | 13019 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 13020 | |
97bf5e38 | 13021 | fi |
451928c5 | 13022 | |
a3828db0 | 13023 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
13024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
13025 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
13026 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
13027 | $as_echo_n "(cached) " >&6 | |
451928c5 | 13028 | else |
81ecdfbb | 13029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13030 | /* end confdefs.h. */ |
a3828db0 | 13031 | #include <sys/ptrace.h> |
bec39cab AC |
13032 | int |
13033 | main () | |
13034 | { | |
a3828db0 | 13035 | PTRACE_GETFPXREGS; |
bec39cab AC |
13036 | ; |
13037 | return 0; | |
13038 | } | |
13039 | _ACEOF | |
81ecdfbb | 13040 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13041 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 13042 | else |
81ecdfbb | 13043 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 13044 | fi |
81ecdfbb | 13045 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13046 | fi |
13047 | ||
81ecdfbb RW |
13048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
13049 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 13050 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 13051 | |
81ecdfbb | 13052 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 13053 | |
97bf5e38 | 13054 | fi |
451928c5 | 13055 | |
a3828db0 | 13056 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
13057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
13058 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
13059 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
13060 | $as_echo_n "(cached) " >&6 | |
3862412b | 13061 | else |
81ecdfbb | 13062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13063 | /* end confdefs.h. */ |
a3828db0 MK |
13064 | #include <sys/types.h> |
13065 | #include <sys/ptrace.h> | |
bec39cab AC |
13066 | int |
13067 | main () | |
13068 | { | |
a3828db0 | 13069 | PT_GETDBREGS; |
bec39cab AC |
13070 | ; |
13071 | return 0; | |
13072 | } | |
13073 | _ACEOF | |
81ecdfbb | 13074 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13075 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 13076 | else |
81ecdfbb | 13077 | gdb_cv_have_pt_getdbregs=no |
3862412b | 13078 | fi |
81ecdfbb | 13079 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13080 | fi |
13081 | ||
81ecdfbb RW |
13082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
13083 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 13084 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 13085 | |
81ecdfbb | 13086 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 13087 | |
97bf5e38 | 13088 | fi |
3862412b | 13089 | |
a3828db0 | 13090 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
13091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
13092 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
13093 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
13094 | $as_echo_n "(cached) " >&6 | |
3862412b | 13095 | else |
81ecdfbb | 13096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13097 | /* end confdefs.h. */ |
a3828db0 MK |
13098 | #include <sys/types.h> |
13099 | #include <sys/ptrace.h> | |
bec39cab AC |
13100 | int |
13101 | main () | |
13102 | { | |
a3828db0 | 13103 | PT_GETXMMREGS; |
bec39cab AC |
13104 | ; |
13105 | return 0; | |
13106 | } | |
13107 | _ACEOF | |
81ecdfbb | 13108 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13109 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 13110 | else |
81ecdfbb | 13111 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 13112 | fi |
81ecdfbb | 13113 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13114 | fi |
13115 | ||
81ecdfbb RW |
13116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
13117 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 13118 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 13119 | |
81ecdfbb | 13120 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 13121 | |
97bf5e38 | 13122 | fi |
3862412b | 13123 | |
eb368090 | 13124 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
13125 | |
13126 | if test "${target}" = "${host}"; then | |
13127 | case "${host}" in | |
97bf5e38 | 13128 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 13129 | |
81ecdfbb | 13130 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
13131 | |
13132 | ;; | |
c162e8c9 | 13133 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 13134 | |
81ecdfbb | 13135 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
13136 | |
13137 | ;; | |
13138 | mips-sgi-irix5*) | |
13139 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 13140 | |
81ecdfbb | 13141 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
13142 | |
13143 | ;; | |
13144 | esac | |
13145 | fi | |
13146 | ||
13147 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
13148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
13149 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
13150 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
13151 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13152 | else |
81ecdfbb | 13153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13154 | /* end confdefs.h. */ |
596c9d4b KB |
13155 | |
13156 | #define _SYSCALL32 | |
d30c5336 JK |
13157 | /* Needed for new procfs interface on sparc-solaris. */ |
13158 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13159 | #include <sys/procfs.h> |
bec39cab AC |
13160 | int |
13161 | main () | |
13162 | { | |
97bf5e38 | 13163 | pstatus_t avar |
bec39cab AC |
13164 | ; |
13165 | return 0; | |
13166 | } | |
13167 | _ACEOF | |
81ecdfbb | 13168 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13169 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 13170 | else |
81ecdfbb | 13171 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 13172 | |
596c9d4b | 13173 | fi |
81ecdfbb | 13174 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13175 | fi |
13176 | ||
97bf5e38 | 13177 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 13178 | |
81ecdfbb | 13179 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
13180 | |
13181 | fi | |
81ecdfbb RW |
13182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
13183 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 13184 | |
81ecdfbb RW |
13185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
13186 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
13187 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
13188 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13189 | else |
81ecdfbb | 13190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13191 | /* end confdefs.h. */ |
596c9d4b KB |
13192 | |
13193 | #define _SYSCALL32 | |
d30c5336 JK |
13194 | /* Needed for new procfs interface on sparc-solaris. */ |
13195 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13196 | #include <sys/procfs.h> |
bec39cab AC |
13197 | int |
13198 | main () | |
13199 | { | |
97bf5e38 | 13200 | prrun_t avar |
bec39cab AC |
13201 | ; |
13202 | return 0; | |
13203 | } | |
13204 | _ACEOF | |
81ecdfbb | 13205 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13206 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 13207 | else |
81ecdfbb | 13208 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 13209 | |
596c9d4b | 13210 | fi |
81ecdfbb | 13211 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13212 | fi |
13213 | ||
97bf5e38 | 13214 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 13215 | |
81ecdfbb | 13216 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
13217 | |
13218 | fi | |
81ecdfbb RW |
13219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
13220 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 13221 | |
81ecdfbb RW |
13222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
13223 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
13224 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
13225 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13226 | else |
81ecdfbb | 13227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13228 | /* end confdefs.h. */ |
596c9d4b KB |
13229 | |
13230 | #define _SYSCALL32 | |
d30c5336 JK |
13231 | /* Needed for new procfs interface on sparc-solaris. */ |
13232 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13233 | #include <sys/procfs.h> |
bec39cab AC |
13234 | int |
13235 | main () | |
13236 | { | |
97bf5e38 | 13237 | gregset_t avar |
bec39cab AC |
13238 | ; |
13239 | return 0; | |
13240 | } | |
13241 | _ACEOF | |
81ecdfbb | 13242 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13243 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 13244 | else |
81ecdfbb | 13245 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 13246 | |
596c9d4b | 13247 | fi |
81ecdfbb | 13248 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13249 | fi |
13250 | ||
97bf5e38 | 13251 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 13252 | |
81ecdfbb | 13253 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
13254 | |
13255 | fi | |
81ecdfbb RW |
13256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
13257 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 13258 | |
81ecdfbb RW |
13259 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
13260 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
13261 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
13262 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 13263 | else |
81ecdfbb | 13264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13265 | /* end confdefs.h. */ |
97bf5e38 MK |
13266 | |
13267 | #define _SYSCALL32 | |
d30c5336 JK |
13268 | /* Needed for new procfs interface on sparc-solaris. */ |
13269 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 13270 | #include <sys/procfs.h> |
bec39cab AC |
13271 | int |
13272 | main () | |
13273 | { | |
97bf5e38 | 13274 | fpregset_t avar |
bec39cab AC |
13275 | ; |
13276 | return 0; | |
13277 | } | |
13278 | _ACEOF | |
81ecdfbb | 13279 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13280 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 13281 | else |
81ecdfbb | 13282 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 13283 | |
d84dd0c5 | 13284 | fi |
81ecdfbb | 13285 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
13286 | fi |
13287 | ||
97bf5e38 | 13288 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 13289 | |
81ecdfbb | 13290 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 13291 | |
97bf5e38 | 13292 | fi |
81ecdfbb RW |
13293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
13294 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 13295 | |
81ecdfbb RW |
13296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
13297 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
13298 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
13299 | $as_echo_n "(cached) " >&6 | |
c906108c | 13300 | else |
81ecdfbb | 13301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13302 | /* end confdefs.h. */ |
c906108c | 13303 | |
97bf5e38 | 13304 | #define _SYSCALL32 |
d30c5336 JK |
13305 | /* Needed for new procfs interface on sparc-solaris. */ |
13306 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13307 | #include <sys/procfs.h> |
bec39cab AC |
13308 | int |
13309 | main () | |
13310 | { | |
97bf5e38 | 13311 | prgregset_t avar |
bec39cab AC |
13312 | ; |
13313 | return 0; | |
13314 | } | |
13315 | _ACEOF | |
81ecdfbb | 13316 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13317 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 13318 | else |
81ecdfbb | 13319 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 13320 | |
c906108c | 13321 | fi |
81ecdfbb | 13322 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13323 | fi |
13324 | ||
97bf5e38 | 13325 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 13326 | |
81ecdfbb | 13327 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 13328 | |
97bf5e38 | 13329 | fi |
81ecdfbb RW |
13330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
13331 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 13332 | |
81ecdfbb RW |
13333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
13334 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
13335 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
13336 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13337 | else |
81ecdfbb | 13338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13339 | /* end confdefs.h. */ |
97bf5e38 MK |
13340 | |
13341 | #define _SYSCALL32 | |
d30c5336 JK |
13342 | /* Needed for new procfs interface on sparc-solaris. */ |
13343 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13344 | #include <sys/procfs.h> |
bec39cab AC |
13345 | int |
13346 | main () | |
13347 | { | |
97bf5e38 | 13348 | prfpregset_t avar |
bec39cab AC |
13349 | ; |
13350 | return 0; | |
13351 | } | |
13352 | _ACEOF | |
81ecdfbb | 13353 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13354 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 13355 | else |
81ecdfbb | 13356 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 13357 | |
d45fe813 | 13358 | fi |
81ecdfbb | 13359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13360 | fi |
13361 | ||
97bf5e38 | 13362 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 13363 | |
81ecdfbb | 13364 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 13365 | |
97bf5e38 | 13366 | fi |
81ecdfbb RW |
13367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
13368 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 13369 | |
81ecdfbb RW |
13370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
13371 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
13372 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
13373 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13374 | else |
81ecdfbb | 13375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13376 | /* end confdefs.h. */ |
97bf5e38 MK |
13377 | |
13378 | #define _SYSCALL32 | |
d30c5336 JK |
13379 | /* Needed for new procfs interface on sparc-solaris. */ |
13380 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13381 | #include <sys/procfs.h> |
bec39cab AC |
13382 | int |
13383 | main () | |
13384 | { | |
97bf5e38 | 13385 | prgregset32_t avar |
bec39cab AC |
13386 | ; |
13387 | return 0; | |
13388 | } | |
13389 | _ACEOF | |
81ecdfbb | 13390 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13391 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 13392 | else |
81ecdfbb | 13393 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 13394 | |
d45fe813 | 13395 | fi |
81ecdfbb | 13396 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13397 | fi |
13398 | ||
97bf5e38 | 13399 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 13400 | |
81ecdfbb | 13401 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 13402 | |
97bf5e38 | 13403 | fi |
81ecdfbb RW |
13404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
13405 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 13406 | |
81ecdfbb RW |
13407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
13408 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
13409 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
13410 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13411 | else |
81ecdfbb | 13412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13413 | /* end confdefs.h. */ |
97bf5e38 MK |
13414 | |
13415 | #define _SYSCALL32 | |
d30c5336 JK |
13416 | /* Needed for new procfs interface on sparc-solaris. */ |
13417 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13418 | #include <sys/procfs.h> |
bec39cab AC |
13419 | int |
13420 | main () | |
13421 | { | |
97bf5e38 | 13422 | prfpregset32_t avar |
bec39cab AC |
13423 | ; |
13424 | return 0; | |
13425 | } | |
13426 | _ACEOF | |
81ecdfbb | 13427 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13428 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 13429 | else |
81ecdfbb | 13430 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 13431 | |
d45fe813 | 13432 | fi |
81ecdfbb | 13433 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13434 | fi |
13435 | ||
97bf5e38 | 13436 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 13437 | |
81ecdfbb | 13438 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 13439 | |
97bf5e38 | 13440 | fi |
81ecdfbb RW |
13441 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
13442 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 13443 | |
81ecdfbb RW |
13444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
13445 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
13446 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
13447 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13448 | else |
81ecdfbb | 13449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13450 | /* end confdefs.h. */ |
97bf5e38 | 13451 | |
d45fe813 | 13452 | #define _SYSCALL32 |
d30c5336 JK |
13453 | /* Needed for new procfs interface on sparc-solaris. */ |
13454 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13455 | #include <sys/procfs.h> |
bec39cab AC |
13456 | int |
13457 | main () | |
13458 | { | |
97bf5e38 | 13459 | lwpid_t avar |
bec39cab AC |
13460 | ; |
13461 | return 0; | |
13462 | } | |
13463 | _ACEOF | |
81ecdfbb | 13464 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13465 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 13466 | else |
81ecdfbb | 13467 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 13468 | |
d45fe813 | 13469 | fi |
81ecdfbb | 13470 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13471 | fi |
13472 | ||
97bf5e38 | 13473 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 13474 | |
81ecdfbb | 13475 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 13476 | |
97bf5e38 | 13477 | fi |
81ecdfbb RW |
13478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
13479 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 13480 | |
81ecdfbb RW |
13481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
13482 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
13483 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
13484 | $as_echo_n "(cached) " >&6 | |
c906108c | 13485 | else |
81ecdfbb | 13486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13487 | /* end confdefs.h. */ |
c906108c | 13488 | |
97bf5e38 | 13489 | #define _SYSCALL32 |
d30c5336 JK |
13490 | /* Needed for new procfs interface on sparc-solaris. */ |
13491 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13492 | #include <sys/procfs.h> |
bec39cab AC |
13493 | int |
13494 | main () | |
13495 | { | |
97bf5e38 | 13496 | psaddr_t avar |
bec39cab AC |
13497 | ; |
13498 | return 0; | |
13499 | } | |
13500 | _ACEOF | |
81ecdfbb | 13501 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13502 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 13503 | else |
81ecdfbb | 13504 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 13505 | |
c906108c | 13506 | fi |
81ecdfbb | 13507 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13508 | fi |
13509 | ||
97bf5e38 | 13510 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 13511 | |
81ecdfbb | 13512 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 13513 | |
97bf5e38 | 13514 | fi |
81ecdfbb RW |
13515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
13516 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 13517 | |
81ecdfbb RW |
13518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
13519 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
13520 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
13521 | $as_echo_n "(cached) " >&6 | |
c906108c | 13522 | else |
81ecdfbb | 13523 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13524 | /* end confdefs.h. */ |
c906108c | 13525 | |
97bf5e38 | 13526 | #define _SYSCALL32 |
d30c5336 JK |
13527 | /* Needed for new procfs interface on sparc-solaris. */ |
13528 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13529 | #include <sys/procfs.h> |
bec39cab AC |
13530 | int |
13531 | main () | |
13532 | { | |
97bf5e38 | 13533 | prsysent_t avar |
bec39cab AC |
13534 | ; |
13535 | return 0; | |
13536 | } | |
13537 | _ACEOF | |
81ecdfbb | 13538 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13539 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 13540 | else |
81ecdfbb | 13541 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 13542 | |
c906108c | 13543 | fi |
81ecdfbb | 13544 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13545 | fi |
13546 | ||
97bf5e38 | 13547 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 13548 | |
81ecdfbb | 13549 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 13550 | |
97bf5e38 | 13551 | fi |
81ecdfbb RW |
13552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
13553 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 13554 | |
81ecdfbb RW |
13555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
13556 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
13557 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
13558 | $as_echo_n "(cached) " >&6 | |
c906108c | 13559 | else |
81ecdfbb | 13560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13561 | /* end confdefs.h. */ |
c906108c | 13562 | |
97bf5e38 | 13563 | #define _SYSCALL32 |
d30c5336 JK |
13564 | /* Needed for new procfs interface on sparc-solaris. */ |
13565 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13566 | #include <sys/procfs.h> |
bec39cab AC |
13567 | int |
13568 | main () | |
13569 | { | |
97bf5e38 | 13570 | pr_sigset_t avar |
bec39cab AC |
13571 | ; |
13572 | return 0; | |
13573 | } | |
13574 | _ACEOF | |
81ecdfbb | 13575 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13576 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 13577 | else |
81ecdfbb | 13578 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 13579 | |
c906108c | 13580 | fi |
81ecdfbb | 13581 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13582 | fi |
13583 | ||
97bf5e38 | 13584 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 13585 | |
81ecdfbb | 13586 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 13587 | |
97bf5e38 | 13588 | fi |
81ecdfbb RW |
13589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
13590 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 13591 | |
81ecdfbb RW |
13592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
13593 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
13594 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
13595 | $as_echo_n "(cached) " >&6 | |
c906108c | 13596 | else |
81ecdfbb | 13597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13598 | /* end confdefs.h. */ |
c906108c | 13599 | |
97bf5e38 | 13600 | #define _SYSCALL32 |
d30c5336 JK |
13601 | /* Needed for new procfs interface on sparc-solaris. */ |
13602 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13603 | #include <sys/procfs.h> |
bec39cab AC |
13604 | int |
13605 | main () | |
13606 | { | |
97bf5e38 | 13607 | pr_sigaction64_t avar |
bec39cab AC |
13608 | ; |
13609 | return 0; | |
13610 | } | |
13611 | _ACEOF | |
81ecdfbb | 13612 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13613 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 13614 | else |
81ecdfbb | 13615 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 13616 | |
c906108c | 13617 | fi |
81ecdfbb | 13618 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13619 | fi |
13620 | ||
97bf5e38 | 13621 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 13622 | |
81ecdfbb | 13623 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 13624 | |
97bf5e38 | 13625 | fi |
81ecdfbb RW |
13626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
13627 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 13628 | |
81ecdfbb RW |
13629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
13630 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
13631 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
13632 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13633 | else |
81ecdfbb | 13634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13635 | /* end confdefs.h. */ |
97bf5e38 MK |
13636 | |
13637 | #define _SYSCALL32 | |
d30c5336 JK |
13638 | /* Needed for new procfs interface on sparc-solaris. */ |
13639 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13640 | #include <sys/procfs.h> |
bec39cab AC |
13641 | int |
13642 | main () | |
13643 | { | |
97bf5e38 | 13644 | pr_siginfo64_t avar |
bec39cab AC |
13645 | ; |
13646 | return 0; | |
13647 | } | |
13648 | _ACEOF | |
81ecdfbb | 13649 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13650 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
13651 | else | |
81ecdfbb | 13652 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 13653 | |
97bf5e38 | 13654 | fi |
81ecdfbb | 13655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13656 | fi |
c906108c | 13657 | |
97bf5e38 | 13658 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 13659 | |
81ecdfbb | 13660 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 13661 | |
97bf5e38 | 13662 | fi |
81ecdfbb RW |
13663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
13664 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
13665 | |
13666 | ||
97bf5e38 MK |
13667 | |
13668 | ||
13669 | ||
97bf5e38 | 13670 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
13671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
13672 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
13673 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
13674 | $as_echo_n "(cached) " >&6 | |
c906108c | 13675 | else |
81ecdfbb | 13676 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 13677 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 13678 | else |
81ecdfbb | 13679 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13680 | /* end confdefs.h. */ |
97bf5e38 MK |
13681 | #include <sys/procfs.h> |
13682 | int main () | |
13683 | { | |
13684 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
13685 | return 1; | |
13686 | return 0; | |
13687 | } | |
bec39cab | 13688 | _ACEOF |
81ecdfbb | 13689 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 13690 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
13691 | else |
13692 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 13693 | fi |
81ecdfbb RW |
13694 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13695 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 13696 | fi |
81ecdfbb | 13697 | |
c906108c SS |
13698 | fi |
13699 | ||
81ecdfbb RW |
13700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
13701 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 13702 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 13703 | |
81ecdfbb | 13704 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 13705 | |
97bf5e38 MK |
13706 | fi |
13707 | fi | |
c906108c | 13708 | |
bec39cab | 13709 | |
81ecdfbb RW |
13710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
13711 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
13712 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
13713 | $as_echo_n "(cached) " >&6 | |
c906108c | 13714 | else |
81ecdfbb | 13715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13716 | /* end confdefs.h. */ |
97bf5e38 MK |
13717 | #include <unistd.h> |
13718 | #include <sys/types.h> | |
13719 | #include <sys/procfs.h> | |
13720 | ||
bec39cab AC |
13721 | int |
13722 | main () | |
13723 | { | |
97bf5e38 MK |
13724 | |
13725 | int dummy;; | |
13726 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
13727 | |
13728 | ; | |
13729 | return 0; | |
13730 | } | |
13731 | _ACEOF | |
81ecdfbb | 13732 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13733 | gdb_cv_have_procfs_piocset=yes |
c906108c | 13734 | else |
81ecdfbb | 13735 | gdb_cv_have_procfs_piocset=no |
c906108c | 13736 | fi |
81ecdfbb | 13737 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13738 | fi |
97bf5e38 | 13739 | |
81ecdfbb RW |
13740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
13741 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 13742 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 13743 | |
81ecdfbb | 13744 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
13745 | |
13746 | fi | |
c906108c | 13747 | fi |
c906108c | 13748 | |
97bf5e38 | 13749 | if test ${host} = ${target} ; then |
bec39cab | 13750 | |
81ecdfbb RW |
13751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
13752 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
13753 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
13754 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13755 | else |
81ecdfbb | 13756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13757 | /* end confdefs.h. */ |
97bf5e38 | 13758 | #include <link.h> |
bec39cab AC |
13759 | int |
13760 | main () | |
13761 | { | |
97bf5e38 | 13762 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
13763 | ; |
13764 | return 0; | |
13765 | } | |
13766 | _ACEOF | |
81ecdfbb | 13767 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13768 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 13769 | else |
81ecdfbb | 13770 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 13771 | fi |
81ecdfbb | 13772 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13773 | fi |
13774 | ||
81ecdfbb RW |
13775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
13776 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 13777 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 13778 | |
81ecdfbb | 13779 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
13780 | |
13781 | fi | |
13782 | ||
bec39cab | 13783 | |
81ecdfbb RW |
13784 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
13785 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
13786 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
13787 | $as_echo_n "(cached) " >&6 | |
c906108c | 13788 | else |
81ecdfbb | 13789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13790 | /* end confdefs.h. */ |
97bf5e38 MK |
13791 | #include <sys/types.h> |
13792 | #include <link.h> | |
bec39cab AC |
13793 | int |
13794 | main () | |
13795 | { | |
97bf5e38 | 13796 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
13797 | ; |
13798 | return 0; | |
13799 | } | |
13800 | _ACEOF | |
81ecdfbb | 13801 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13802 | gdb_cv_have_struct_link_map_with_lm_members=yes |
13803 | else | |
81ecdfbb | 13804 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 13805 | fi |
81ecdfbb | 13806 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13807 | fi |
c906108c | 13808 | |
81ecdfbb RW |
13809 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
13810 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 13811 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 13812 | |
81ecdfbb | 13813 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
13814 | |
13815 | fi | |
13816 | ||
bec39cab | 13817 | |
81ecdfbb RW |
13818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
13819 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
13820 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
13821 | $as_echo_n "(cached) " >&6 | |
c906108c | 13822 | else |
81ecdfbb | 13823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13824 | /* end confdefs.h. */ |
97bf5e38 MK |
13825 | #include <sys/types.h> |
13826 | #ifdef HAVE_NLIST_H | |
13827 | #include <nlist.h> | |
13828 | #endif | |
13829 | #include <link.h> | |
bec39cab AC |
13830 | int |
13831 | main () | |
13832 | { | |
97bf5e38 | 13833 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
13834 | ; |
13835 | return 0; | |
13836 | } | |
13837 | _ACEOF | |
81ecdfbb | 13838 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13839 | gdb_cv_have_struct_so_map_with_som_members=yes |
13840 | else | |
81ecdfbb | 13841 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 13842 | fi |
81ecdfbb | 13843 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13844 | fi |
c906108c | 13845 | |
81ecdfbb RW |
13846 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
13847 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 13848 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 13849 | |
81ecdfbb | 13850 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 13851 | |
97bf5e38 | 13852 | fi |
c906108c | 13853 | |
bec39cab | 13854 | |
81ecdfbb RW |
13855 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
13856 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
13857 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
13858 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13859 | else |
81ecdfbb | 13860 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13861 | /* end confdefs.h. */ |
97bf5e38 MK |
13862 | #define _SYSCALL32 |
13863 | #include <sys/link.h> | |
bec39cab AC |
13864 | int |
13865 | main () | |
13866 | { | |
97bf5e38 | 13867 | struct link_map32 l; |
bec39cab AC |
13868 | ; |
13869 | return 0; | |
13870 | } | |
13871 | _ACEOF | |
81ecdfbb | 13872 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13873 | gdb_cv_have_struct_link_map32=yes |
13874 | else | |
81ecdfbb | 13875 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 13876 | fi |
81ecdfbb | 13877 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13878 | fi |
c906108c | 13879 | |
81ecdfbb RW |
13880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
13881 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 13882 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 13883 | |
81ecdfbb | 13884 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 13885 | |
60ca704f | 13886 | |
81ecdfbb | 13887 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 13888 | |
97bf5e38 MK |
13889 | fi |
13890 | fi | |
c906108c | 13891 | |
bc8bcb4b | 13892 | # Check if the compiler supports the `long long' type. |
c906108c | 13893 | |
81ecdfbb RW |
13894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
13895 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
13896 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
13897 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13898 | else |
81ecdfbb | 13899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13900 | /* end confdefs.h. */ |
bc8bcb4b | 13901 | extern long long foo; |
bec39cab AC |
13902 | int |
13903 | main () | |
13904 | { | |
bc8bcb4b | 13905 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
13906 | ; |
13907 | return 0; | |
13908 | } | |
13909 | _ACEOF | |
81ecdfbb | 13910 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13911 | gdb_cv_c_long_long=yes |
13912 | else | |
81ecdfbb | 13913 | gdb_cv_c_long_long=no |
97bf5e38 | 13914 | fi |
81ecdfbb | 13915 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13916 | fi |
81ecdfbb RW |
13917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
13918 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 13919 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 13920 | |
81ecdfbb | 13921 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
13922 | |
13923 | fi | |
13924 | ||
bc8bcb4b | 13925 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 13926 | |
81ecdfbb RW |
13927 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
13928 | $as_echo_n "checking for long long support in printf... " >&6; } | |
13929 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
13930 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13931 | else |
81ecdfbb | 13932 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13933 | gdb_cv_printf_has_long_long=no |
13934 | else | |
81ecdfbb | 13935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13936 | /* end confdefs.h. */ |
bc8bcb4b MK |
13937 | $ac_includes_default |
13938 | int | |
13939 | main () | |
13940 | { | |
13941 | char buf[32]; | |
97bf5e38 MK |
13942 | long long l = 0; |
13943 | l = (l << 16) + 0x0123; | |
13944 | l = (l << 16) + 0x4567; | |
13945 | l = (l << 16) + 0x89ab; | |
13946 | l = (l << 16) + 0xcdef; | |
13947 | sprintf (buf, "0x%016llx", l); | |
13948 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
13949 | ; |
13950 | return 0; | |
c906108c | 13951 | } |
bec39cab | 13952 | _ACEOF |
81ecdfbb | 13953 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
13954 | gdb_cv_printf_has_long_long=yes |
13955 | else | |
81ecdfbb | 13956 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 13957 | fi |
81ecdfbb RW |
13958 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13959 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13960 | fi |
81ecdfbb | 13961 | |
97bf5e38 | 13962 | fi |
81ecdfbb RW |
13963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
13964 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 13965 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 13966 | |
81ecdfbb | 13967 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
13968 | |
13969 | fi | |
97bf5e38 | 13970 | |
1a619819 LM |
13971 | # Check if the compiler and runtime support printing decfloats. |
13972 | ||
81ecdfbb RW |
13973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
13974 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
13975 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
13976 | $as_echo_n "(cached) " >&6 | |
1a619819 | 13977 | else |
81ecdfbb | 13978 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
13979 | gdb_cv_printf_has_decfloat=no |
13980 | else | |
81ecdfbb | 13981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
13982 | /* end confdefs.h. */ |
13983 | $ac_includes_default | |
13984 | int | |
13985 | main () | |
13986 | { | |
13987 | char buf[64]; | |
13988 | _Decimal32 d32 = 1.2345df; | |
13989 | _Decimal64 d64 = 1.2345dd; | |
13990 | _Decimal128 d128 = 1.2345dl; | |
13991 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
13992 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
13993 | ; | |
13994 | return 0; | |
13995 | } | |
13996 | _ACEOF | |
81ecdfbb | 13997 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
13998 | gdb_cv_printf_has_decfloat=yes |
13999 | else | |
81ecdfbb | 14000 | gdb_cv_printf_has_decfloat=no |
1a619819 | 14001 | fi |
81ecdfbb RW |
14002 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14003 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 14004 | fi |
81ecdfbb | 14005 | |
1a619819 | 14006 | fi |
81ecdfbb RW |
14007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
14008 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
14009 | if test $gdb_cv_printf_has_decfloat = yes; then |
14010 | ||
81ecdfbb | 14011 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
14012 | |
14013 | fi | |
14014 | ||
bc8bcb4b MK |
14015 | # Check if the compiler supports the `long double' type. We can't use |
14016 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
14017 | # constants defined in <float.h> that fail on some systems, | |
14018 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 14019 | |
81ecdfbb RW |
14020 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
14021 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
14022 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
14023 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14024 | else |
81ecdfbb | 14025 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14026 | /* end confdefs.h. */ |
97bf5e38 | 14027 | long double foo; |
bec39cab | 14028 | _ACEOF |
81ecdfbb | 14029 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 14030 | gdb_cv_c_long_double=yes |
97bf5e38 | 14031 | else |
81ecdfbb | 14032 | gdb_cv_c_long_double=no |
97bf5e38 | 14033 | fi |
81ecdfbb | 14034 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14035 | fi |
81ecdfbb RW |
14036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
14037 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 14038 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 14039 | |
81ecdfbb | 14040 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14041 | |
14042 | fi | |
14043 | ||
bc8bcb4b | 14044 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14045 | |
81ecdfbb RW |
14046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14047 | $as_echo_n "checking for long double support in printf... " >&6; } | |
14048 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
14049 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14050 | else |
81ecdfbb | 14051 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14052 | gdb_cv_printf_has_long_double=no |
14053 | else | |
81ecdfbb | 14054 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14055 | /* end confdefs.h. */ |
bc8bcb4b MK |
14056 | $ac_includes_default |
14057 | int | |
14058 | main () | |
14059 | { | |
14060 | char buf[16]; | |
97bf5e38 MK |
14061 | long double f = 3.141592653; |
14062 | sprintf (buf, "%Lg", f); | |
14063 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14064 | ; |
14065 | return 0; | |
97bf5e38 | 14066 | } |
bec39cab | 14067 | _ACEOF |
81ecdfbb | 14068 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14069 | gdb_cv_printf_has_long_double=yes |
c906108c | 14070 | else |
81ecdfbb | 14071 | gdb_cv_printf_has_long_double=no |
c906108c | 14072 | fi |
81ecdfbb RW |
14073 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14074 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14075 | fi |
81ecdfbb | 14076 | |
c906108c | 14077 | fi |
81ecdfbb RW |
14078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14079 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14080 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14081 | |
81ecdfbb | 14082 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14083 | |
14084 | fi | |
97bf5e38 | 14085 | |
bc8bcb4b | 14086 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14087 | |
81ecdfbb RW |
14088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14089 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
14090 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
14091 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14092 | else |
81ecdfbb | 14093 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14094 | gdb_cv_scanf_has_long_double=no |
14095 | else | |
81ecdfbb | 14096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14097 | /* end confdefs.h. */ |
bc8bcb4b MK |
14098 | #include <stdio.h> |
14099 | int | |
14100 | main () | |
14101 | { | |
14102 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14103 | long double f = 0; |
14104 | sscanf (buf, "%Lg", &f); | |
14105 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14106 | ; |
14107 | return 0; | |
97bf5e38 | 14108 | } |
bec39cab | 14109 | _ACEOF |
81ecdfbb | 14110 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14111 | gdb_cv_scanf_has_long_double=yes |
14112 | else | |
81ecdfbb | 14113 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14114 | fi |
81ecdfbb RW |
14115 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14116 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14117 | fi |
81ecdfbb | 14118 | |
c906108c | 14119 | fi |
81ecdfbb RW |
14120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14121 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14122 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14123 | |
81ecdfbb | 14124 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14125 | |
14126 | fi | |
c906108c | 14127 | |
438013df AO |
14128 | case ${host_os} in |
14129 | aix*) | |
81ecdfbb RW |
14130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14131 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
14132 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
14133 | $as_echo_n "(cached) " >&6 | |
438013df | 14134 | else |
bec39cab | 14135 | |
438013df AO |
14136 | SAVE_LDFLAGS=$LDFLAGS |
14137 | ||
14138 | case $GCC in | |
14139 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14140 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14141 | esac | |
14142 | ||
14143 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14145 | /* end confdefs.h. */ |
438013df | 14146 | |
bec39cab AC |
14147 | int |
14148 | main () | |
14149 | { | |
438013df | 14150 | int i; |
bec39cab AC |
14151 | ; |
14152 | return 0; | |
14153 | } | |
14154 | _ACEOF | |
81ecdfbb | 14155 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14156 | |
81ecdfbb RW |
14157 | else |
14158 | gdb_cv_bigtoc= | |
438013df | 14159 | fi |
81ecdfbb RW |
14160 | rm -f core conftest.err conftest.$ac_objext \ |
14161 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 14162 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 14163 | |
bec39cab | 14164 | fi |
81ecdfbb RW |
14165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
14166 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
14167 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
14168 | ;; | |
14169 | esac | |
14170 | ||
c906108c SS |
14171 | |
14172 | ||
14173 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
14174 | case ${host_os} in | |
14175 | hpux*) | |
81ecdfbb RW |
14176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5 |
14177 | $as_echo_n "checking for HPUX/OSF thread support... " >&6; } | |
c906108c SS |
14178 | if test -f /usr/include/dce/cma_config.h ; then |
14179 | if test "$GCC" = "yes" ; then | |
81ecdfbb RW |
14180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14181 | $as_echo "yes" >&6; } | |
60ca704f | 14182 | |
81ecdfbb | 14183 | $as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h |
c906108c | 14184 | |
3483b318 | 14185 | CONFIG_OBS="${CONFIG_OBS} hpux-thread.o" |
c906108c SS |
14186 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
14187 | else | |
81ecdfbb RW |
14188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5 |
14189 | $as_echo "no (suppressed because you are not using GCC)" >&6; } | |
c906108c SS |
14190 | fi |
14191 | else | |
81ecdfbb RW |
14192 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14193 | $as_echo "no" >&6; } | |
c906108c SS |
14194 | fi |
14195 | ;; | |
14196 | solaris*) | |
d92419e5 JB |
14197 | # See if thread_db library is around for Solaris thread debugging. |
14198 | # Note that we must explicitly test for version 1 of the library | |
14199 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
14200 | # the same API. | |
81ecdfbb RW |
14201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
14202 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 14203 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
14204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14205 | $as_echo "yes" >&6; } | |
60ca704f | 14206 | |
81ecdfbb | 14207 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 14208 | |
3483b318 | 14209 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 14210 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
14211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
14212 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
14213 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
14214 | $as_echo_n "(cached) " >&6 | |
c906108c | 14215 | else |
bec39cab | 14216 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 14217 | LIBS="-ldl $LIBS" |
81ecdfbb | 14218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
14219 | /* end confdefs.h. */ |
14220 | ||
81ecdfbb RW |
14221 | /* Override any GCC internal prototype to avoid an error. |
14222 | Use char because int might match the return type of a GCC | |
14223 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
14224 | #ifdef __cplusplus |
14225 | extern "C" | |
14226 | #endif | |
bec39cab AC |
14227 | char dlopen (); |
14228 | int | |
14229 | main () | |
14230 | { | |
81ecdfbb | 14231 | return dlopen (); |
bec39cab AC |
14232 | ; |
14233 | return 0; | |
14234 | } | |
14235 | _ACEOF | |
81ecdfbb | 14236 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
14237 | ac_cv_lib_dl_dlopen=yes |
14238 | else | |
81ecdfbb | 14239 | ac_cv_lib_dl_dlopen=no |
bec39cab | 14240 | fi |
81ecdfbb RW |
14241 | rm -f core conftest.err conftest.$ac_objext \ |
14242 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
14243 | LIBS=$ac_check_lib_save_LIBS |
14244 | fi | |
81ecdfbb RW |
14245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
14246 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
14247 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
14248 | cat >>confdefs.h <<_ACEOF |
14249 | #define HAVE_LIBDL 1 | |
14250 | _ACEOF | |
c906108c SS |
14251 | |
14252 | LIBS="-ldl $LIBS" | |
14253 | ||
c906108c SS |
14254 | fi |
14255 | ||
14256 | if test "$GCC" = "yes" ; then | |
14257 | # The GNU linker requires the -export-dynamic option to make | |
14258 | # all symbols visible in the dynamic symbol table. | |
14259 | hold_ldflags=$LDFLAGS | |
81ecdfbb RW |
14260 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5 |
14261 | $as_echo_n "checking for the ld -export-dynamic flag... " >&6; } | |
c906108c | 14262 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
81ecdfbb | 14263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14264 | /* end confdefs.h. */ |
c906108c | 14265 | |
bec39cab AC |
14266 | int |
14267 | main () | |
14268 | { | |
c906108c | 14269 | int i; |
bec39cab AC |
14270 | ; |
14271 | return 0; | |
14272 | } | |
14273 | _ACEOF | |
81ecdfbb | 14274 | if ac_fn_c_try_link "$LINENO"; then : |
c906108c SS |
14275 | found=yes |
14276 | else | |
81ecdfbb | 14277 | found=no |
c906108c | 14278 | fi |
81ecdfbb RW |
14279 | rm -f core conftest.err conftest.$ac_objext \ |
14280 | conftest$ac_exeext conftest.$ac_ext | |
c906108c | 14281 | LDFLAGS=$hold_ldflags |
81ecdfbb RW |
14282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
14283 | $as_echo "$found" >&6; } | |
c906108c SS |
14284 | if test $found = yes; then |
14285 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
14286 | fi | |
14287 | fi | |
14288 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
14289 | # at one point. | |
81ecdfbb RW |
14290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
14291 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
14292 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
14293 | $as_echo_n "(cached) " >&6 | |
c906108c | 14294 | else |
bec39cab | 14295 | |
81ecdfbb | 14296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14297 | /* end confdefs.h. */ |
c906108c SS |
14298 | |
14299 | #include <proc_service.h> | |
14300 | ps_err_e ps_pdwrite | |
14301 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 14302 | |
bec39cab AC |
14303 | int |
14304 | main () | |
14305 | { | |
14306 | ||
14307 | ; | |
14308 | return 0; | |
14309 | } | |
14310 | _ACEOF | |
81ecdfbb | 14311 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
14312 | gdb_cv_proc_service_is_old=no |
14313 | else | |
81ecdfbb | 14314 | gdb_cv_proc_service_is_old=yes |
c906108c | 14315 | fi |
81ecdfbb | 14316 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 14317 | |
c906108c SS |
14318 | fi |
14319 | ||
81ecdfbb RW |
14320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
14321 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 14322 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 14323 | |
81ecdfbb | 14324 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
14325 | |
14326 | fi | |
14327 | else | |
81ecdfbb RW |
14328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14329 | $as_echo "no" >&6; } | |
c906108c SS |
14330 | fi |
14331 | ;; | |
d92419e5 | 14332 | aix*) |
81ecdfbb RW |
14333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
14334 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
14335 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
14336 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14337 | else |
81ecdfbb | 14338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14339 | /* end confdefs.h. */ |
d92419e5 | 14340 | #include <sys/pthdebug.h> |
bec39cab AC |
14341 | int |
14342 | main () | |
14343 | { | |
d92419e5 JB |
14344 | #ifndef PTHDB_VERSION_3 |
14345 | #error | |
14346 | #endif | |
bec39cab AC |
14347 | ; |
14348 | return 0; | |
14349 | } | |
14350 | _ACEOF | |
81ecdfbb | 14351 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
14352 | gdb_cv_have_aix_thread_debug=yes |
14353 | else | |
81ecdfbb | 14354 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 14355 | fi |
81ecdfbb | 14356 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
14357 | fi |
14358 | ||
81ecdfbb RW |
14359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
14360 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
14361 | if test $gdb_cv_have_aix_thread_debug = yes; then |
14362 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 14363 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
14364 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
14365 | fi | |
14366 | ;; | |
c906108c | 14367 | esac |
bec39cab | 14368 | |
c906108c SS |
14369 | fi |
14370 | ||
3f47be5c | 14371 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
14372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
14373 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
14374 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
14375 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14376 | else |
81ecdfbb | 14377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14378 | /* end confdefs.h. */ |
3f47be5c | 14379 | #include <thread_db.h> |
bec39cab AC |
14380 | int |
14381 | main () | |
14382 | { | |
3f47be5c | 14383 | int i = TD_NOTALLOC; |
bec39cab AC |
14384 | ; |
14385 | return 0; | |
14386 | } | |
14387 | _ACEOF | |
81ecdfbb | 14388 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
14389 | gdb_cv_thread_db_h_has_td_notalloc=yes |
14390 | else | |
81ecdfbb | 14391 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 14392 | |
3f47be5c | 14393 | fi |
81ecdfbb | 14394 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 14395 | |
bec39cab | 14396 | fi |
81ecdfbb RW |
14397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
14398 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
14399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
14400 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
14401 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
14402 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14403 | else |
81ecdfbb | 14404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14405 | /* end confdefs.h. */ |
14406 | #include <thread_db.h> | |
14407 | int | |
14408 | main () | |
14409 | { | |
14410 | int i = TD_VERSION; | |
14411 | ; | |
14412 | return 0; | |
14413 | } | |
14414 | _ACEOF | |
81ecdfbb | 14415 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14416 | gdb_cv_thread_db_h_has_td_version=yes |
14417 | else | |
81ecdfbb | 14418 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
14419 | |
14420 | fi | |
81ecdfbb | 14421 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14422 | |
14423 | fi | |
81ecdfbb RW |
14424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
14425 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
14426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
14427 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
14428 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
14429 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14430 | else |
81ecdfbb | 14431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14432 | /* end confdefs.h. */ |
14433 | #include <thread_db.h> | |
14434 | int | |
14435 | main () | |
14436 | { | |
14437 | int i = TD_NOTLS; | |
14438 | ; | |
14439 | return 0; | |
14440 | } | |
14441 | _ACEOF | |
81ecdfbb | 14442 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14443 | gdb_cv_thread_db_h_has_td_notls=yes |
14444 | else | |
81ecdfbb | 14445 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
14446 | |
14447 | fi | |
81ecdfbb | 14448 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14449 | |
14450 | fi | |
81ecdfbb RW |
14451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
14452 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
14453 | fi |
14454 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 14455 | |
81ecdfbb | 14456 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 14457 | |
59f80f10 DJ |
14458 | fi |
14459 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
14460 | ||
81ecdfbb | 14461 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
14462 | |
14463 | fi | |
14464 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
14465 | ||
81ecdfbb | 14466 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 14467 | |
3f47be5c EZ |
14468 | fi |
14469 | ||
b757528f | 14470 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
14471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
14472 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
14473 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
14474 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14475 | else |
81ecdfbb | 14476 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14477 | /* end confdefs.h. */ |
b757528f | 14478 | #include <sys/syscall.h> |
bec39cab AC |
14479 | int |
14480 | main () | |
14481 | { | |
b757528f | 14482 | int i = __NR_tkill; |
bec39cab AC |
14483 | ; |
14484 | return 0; | |
14485 | } | |
14486 | _ACEOF | |
81ecdfbb | 14487 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
14488 | gdb_cv_sys_syscall_h_has_tkill=yes |
14489 | else | |
81ecdfbb | 14490 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 14491 | |
b757528f | 14492 | fi |
81ecdfbb | 14493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 14494 | |
bec39cab | 14495 | fi |
81ecdfbb RW |
14496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
14497 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
14498 | fi |
14499 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 14500 | |
81ecdfbb | 14501 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
14502 | |
14503 | fi | |
14504 | ||
81ecdfbb RW |
14505 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
14506 | " | |
14507 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
14508 | ac_have_decl=1 | |
10568435 | 14509 | else |
81ecdfbb | 14510 | ac_have_decl=0 |
10568435 | 14511 | fi |
10568435 JK |
14512 | |
14513 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 14514 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
14515 | _ACEOF |
14516 | ||
14517 | ||
81ecdfbb RW |
14518 | if test "$cross_compiling" = yes; then : |
14519 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
14520 | /* end confdefs.h. */ |
14521 | #include <sys/personality.h> | |
14522 | int | |
14523 | main () | |
14524 | { | |
14525 | ||
14526 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14527 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14528 | # endif | |
14529 | /* Test the flag could be set and stays set. */ | |
14530 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14531 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14532 | return 1 | |
14533 | ; | |
14534 | return 0; | |
14535 | } | |
14536 | _ACEOF | |
81ecdfbb | 14537 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
14538 | have_personality=true |
14539 | else | |
81ecdfbb | 14540 | have_personality=false |
10568435 | 14541 | fi |
81ecdfbb RW |
14542 | rm -f core conftest.err conftest.$ac_objext \ |
14543 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 14544 | else |
81ecdfbb | 14545 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
14546 | /* end confdefs.h. */ |
14547 | #include <sys/personality.h> | |
14548 | int | |
14549 | main () | |
14550 | { | |
14551 | ||
14552 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14553 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14554 | # endif | |
14555 | /* Test the flag could be set and stays set. */ | |
14556 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14557 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14558 | return 1 | |
14559 | ; | |
14560 | return 0; | |
14561 | } | |
14562 | _ACEOF | |
81ecdfbb | 14563 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
14564 | have_personality=true |
14565 | else | |
81ecdfbb | 14566 | have_personality=false |
10568435 | 14567 | fi |
81ecdfbb RW |
14568 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14569 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 14570 | fi |
81ecdfbb | 14571 | |
10568435 JK |
14572 | if $have_personality |
14573 | then | |
14574 | ||
81ecdfbb | 14575 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
14576 | |
14577 | fi | |
14578 | ||
fb40c209 | 14579 | |
b14b1491 | 14580 | target_sysroot_reloc=0 |
bec39cab | 14581 | |
81ecdfbb RW |
14582 | # Check whether --with-sysroot was given. |
14583 | if test "${with_sysroot+set}" = set; then : | |
14584 | withval=$with_sysroot; | |
030292b7 | 14585 | case ${with_sysroot} in |
715d1656 | 14586 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
14587 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
14588 | esac | |
14589 | ||
14590 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
14591 | ||
07abfebf RS |
14592 | if test "x$prefix" = xNONE; then |
14593 | test_prefix=/usr/local | |
14594 | else | |
14595 | test_prefix=$prefix | |
14596 | fi | |
aa28a74e | 14597 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
07abfebf | 14598 | test_exec_prefix=$test_prefix |
030292b7 | 14599 | else |
07abfebf | 14600 | test_exec_prefix=$exec_prefix |
030292b7 DJ |
14601 | fi |
14602 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 | 14603 | "${test_prefix}"|"${test_prefix}/"*|\ |
07abfebf RS |
14604 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
14605 | '${prefix}'|'${prefix}/'*|\ | |
715d1656 | 14606 | '${exec_prefix}'|'${exec_prefix}/'*) |
b14b1491 | 14607 | target_sysroot_reloc=1 |
030292b7 DJ |
14608 | ;; |
14609 | esac | |
14610 | ||
14611 | else | |
bec39cab | 14612 | |
030292b7 DJ |
14613 | TARGET_SYSTEM_ROOT= |
14614 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
14615 | ||
81ecdfbb | 14616 | fi |
b14b1491 | 14617 | |
81ecdfbb | 14618 | TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc" |
030292b7 DJ |
14619 | |
14620 | ||
14621 | ||
16e7150e | 14622 | |
16e7150e | 14623 | |
81ecdfbb RW |
14624 | # Check whether --with-system-gdbinit was given. |
14625 | if test "${with_system_gdbinit+set}" = set; then : | |
14626 | withval=$with_system_gdbinit; | |
b14b1491 TT |
14627 | SYSTEM_GDBINIT=$withval |
14628 | else | |
14629 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
14630 | fi |
14631 | ||
16e7150e JG |
14632 | |
14633 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
14634 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 14635 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
14636 | ac_define_dir=`eval echo $ac_define_dir` |
14637 | ||
14638 | cat >>confdefs.h <<_ACEOF | |
14639 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
14640 | _ACEOF | |
14641 | ||
14642 | ||
14643 | ||
0c4a4063 | 14644 | |
b14b1491 TT |
14645 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
14646 | if test "x$prefix" = xNONE; then | |
14647 | test_prefix=/usr/local | |
14648 | else | |
14649 | test_prefix=$prefix | |
14650 | fi | |
14651 | else | |
14652 | test_prefix=$exec_prefix | |
14653 | fi | |
14654 | value=0 | |
14655 | case ${ac_define_dir} in | |
14656 | "${test_prefix}"|"${test_prefix}/"*|\ | |
14657 | '${exec_prefix}'|'${exec_prefix}/'*) | |
14658 | value=1 | |
14659 | ;; | |
14660 | esac | |
16e7150e | 14661 | |
b14b1491 TT |
14662 | cat >>confdefs.h <<_ACEOF |
14663 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
14664 | _ACEOF |
14665 | ||
b14b1491 | 14666 | |
16e7150e | 14667 | |
0c4a4063 | 14668 | |
81ecdfbb RW |
14669 | # Check whether --enable-werror was given. |
14670 | if test "${enable_werror+set}" = set; then : | |
14671 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
14672 | yes | y) ERROR_ON_WARNING="yes" ;; |
14673 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 14674 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 14675 | esac |
81ecdfbb RW |
14676 | fi |
14677 | ||
094a342e MK |
14678 | |
14679 | # Enable -Werror by default when using gcc | |
14680 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
14681 | ERROR_ON_WARNING=yes | |
14682 | fi | |
14683 | ||
14684 | WERROR_CFLAGS="" | |
14685 | if test "${ERROR_ON_WARNING}" = yes ; then | |
14686 | WERROR_CFLAGS="-Werror" | |
14687 | fi | |
14688 | ||
aa79a185 DJ |
14689 | # The entries after -Wno-pointer-sign are disabled warnings which may |
14690 | # be enabled in the future, which can not currently be used to build | |
14691 | # GDB. | |
14692 | # NOTE: If you change this list, remember to update | |
3b851bce | 14693 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
14694 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
14695 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 JB |
14696 | -Wno-unused -Wunused-value -Wunused-function \ |
14697 | -Wno-switch -Wno-char-subscripts" | |
a3b362c4 | 14698 | |
3526781e DJ |
14699 | # Enable -Wno-format by default when using gcc on mingw since many |
14700 | # GCC versions complain about %I64. | |
14701 | case "${host}" in | |
14702 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
14703 | esac | |
14704 | ||
81ecdfbb RW |
14705 | # Check whether --enable-build-warnings was given. |
14706 | if test "${enable_build_warnings+set}" = set; then : | |
14707 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
14708 | yes) ;; |
14709 | no) build_warnings="-w";; | |
14710 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14711 | build_warnings="${build_warnings} ${t}";; | |
14712 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14713 | build_warnings="${t} ${build_warnings}";; | |
14714 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14715 | esac | |
d4f3574e | 14716 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 14717 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 14718 | fi |
81ecdfbb RW |
14719 | fi |
14720 | # Check whether --enable-gdb-build-warnings was given. | |
14721 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
14722 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
14723 | yes) ;; |
14724 | no) build_warnings="-w";; | |
14725 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14726 | build_warnings="${build_warnings} ${t}";; | |
14727 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14728 | build_warnings="${t} ${build_warnings}";; | |
14729 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14730 | esac | |
14731 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
14732 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
14733 | fi | |
81ecdfbb RW |
14734 | fi |
14735 | WARN_CFLAGS="" | |
c906108c SS |
14736 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
14737 | then | |
81ecdfbb RW |
14738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
14739 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
14740 | # Separate out the -Werror flag as some files just cannot be |
14741 | # compiled with it enabled. | |
14742 | for w in ${build_warnings}; do | |
14743 | case $w in | |
14744 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
14745 | *) # Check that GCC accepts it | |
4536bbc6 AC |
14746 | saved_CFLAGS="$CFLAGS" |
14747 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 14748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14749 | /* end confdefs.h. */ |
4536bbc6 | 14750 | |
bec39cab AC |
14751 | int |
14752 | main () | |
14753 | { | |
4536bbc6 | 14754 | |
bec39cab AC |
14755 | ; |
14756 | return 0; | |
14757 | } | |
14758 | _ACEOF | |
81ecdfbb | 14759 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 14760 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 14761 | fi |
81ecdfbb | 14762 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 14763 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
14764 | esac |
14765 | done | |
81ecdfbb RW |
14766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
14767 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
14768 | fi |
14769 | ||
14770 | ||
104c1213 | 14771 | |
7a292a7a | 14772 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
14773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
14774 | $as_echo_n "checking for cygwin... " >&6; } | |
14775 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
14776 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14777 | else |
81ecdfbb | 14778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14779 | /* end confdefs.h. */ |
7a292a7a SS |
14780 | |
14781 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
14782 | lose | |
14783 | #endif | |
bec39cab | 14784 | _ACEOF |
7a292a7a | 14785 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 14786 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
14787 | gdb_cv_os_cygwin=yes |
14788 | else | |
7a292a7a SS |
14789 | gdb_cv_os_cygwin=no |
14790 | fi | |
14791 | rm -f conftest* | |
14792 | ||
14793 | fi | |
81ecdfbb RW |
14794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
14795 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 14796 | |
aff38e61 | 14797 | |
3eb25fda | 14798 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 14799 | case ${host} in |
95cbc983 AC |
14800 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
14801 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 14802 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
14803 | esac |
14804 | ||
14805 | ||
cd0fc7c3 SS |
14806 | # libreadline needs libuser32.a in a cygwin environment |
14807 | WIN32LIBS= | |
14808 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
14809 | WIN32LIBS="-luser32" |
14810 | case "${target}" in | |
14811 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
14812 | ;; | |
14813 | esac | |
cd0fc7c3 | 14814 | fi |
c906108c | 14815 | |
b4505029 MM |
14816 | # The ser-tcp.c module requires sockets. |
14817 | case ${host} in | |
14818 | *mingw32*) | |
14819 | ||
81ecdfbb | 14820 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
14821 | |
14822 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
14823 | ;; | |
14824 | esac | |
14825 | ||
7a292a7a | 14826 | |
31d99776 DJ |
14827 | # Add ELF support to GDB, but only if BFD includes ELF support. |
14828 | OLD_CFLAGS=$CFLAGS | |
14829 | OLD_LDFLAGS=$LDFLAGS | |
14830 | OLD_LIBS=$LIBS | |
cab58a69 | 14831 | CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" |
31d99776 | 14832 | LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" |
7b3200f9 | 14833 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
0f72fb1c | 14834 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
14835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
14836 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
14837 | if test "${gdb_cv_var_elf+set}" = set; then : | |
14838 | $as_echo_n "(cached) " >&6 | |
31d99776 | 14839 | else |
81ecdfbb | 14840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
14841 | /* end confdefs.h. */ |
14842 | #include <stdlib.h> | |
14843 | #include "bfd.h" | |
14844 | #include "elf-bfd.h" | |
14845 | ||
14846 | int | |
14847 | main () | |
14848 | { | |
14849 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
14850 | ; | |
14851 | return 0; | |
14852 | } | |
14853 | _ACEOF | |
81ecdfbb | 14854 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
14855 | gdb_cv_var_elf=yes |
14856 | else | |
81ecdfbb | 14857 | gdb_cv_var_elf=no |
31d99776 | 14858 | fi |
81ecdfbb RW |
14859 | rm -f core conftest.err conftest.$ac_objext \ |
14860 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 14861 | fi |
81ecdfbb RW |
14862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
14863 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 DJ |
14864 | if test $gdb_cv_var_elf = yes; then |
14865 | CONFIG_OBS="$CONFIG_OBS elfread.o" | |
14866 | ||
81ecdfbb | 14867 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 DJ |
14868 | |
14869 | fi | |
14870 | CFLAGS=$OLD_CFLAGS | |
14871 | LDFLAGS=$OLD_LDFLAGS | |
14872 | LIBS=$OLD_LIBS | |
14873 | ||
121ce6e5 DJ |
14874 | # Add any host-specific objects to GDB. |
14875 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
14876 | ||
3fc11d3e JM |
14877 | LIBGUI="../libgui/src/libgui.a" |
14878 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
14879 | ||
14880 | ||
7a292a7a | 14881 | |
3fc11d3e JM |
14882 | WIN32LDAPP= |
14883 | ||
14884 | ||
14885 | ||
d91670b9 | 14886 | case "${host}" in |
686a5eed | 14887 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
14888 | configdir="win" |
14889 | ;; | |
14890 | *) | |
14891 | configdir="unix" | |
14892 | ;; | |
14893 | esac | |
3fc11d3e JM |
14894 | |
14895 | GDBTKLIBS= | |
14896 | if test "${enable_gdbtk}" = "yes"; then | |
14897 | ||
d1c3b63a KS |
14898 | # Gdbtk must have an absolute path to srcdir in order to run |
14899 | # properly when not installed. | |
14900 | here=`pwd` | |
14901 | cd ${srcdir} | |
14902 | GDBTK_SRC_DIR=`pwd` | |
14903 | cd $here | |
14904 | ||
bec39cab | 14905 | |
5062cc19 KS |
14906 | # |
14907 | # Ok, lets find the tcl configuration | |
14908 | # First, look for one uninstalled. | |
14909 | # the alternative search directory is invoked by --with-tcl | |
14910 | # | |
3fc11d3e | 14911 | |
5062cc19 KS |
14912 | if test x"${no_tcl}" = x ; then |
14913 | # we reset no_tcl in case something fails here | |
14914 | no_tcl=true | |
bec39cab | 14915 | |
81ecdfbb RW |
14916 | # Check whether --with-tcl was given. |
14917 | if test "${with_tcl+set}" = set; then : | |
14918 | withval=$with_tcl; with_tclconfig=${withval} | |
14919 | fi | |
14920 | ||
14921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
14922 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
14923 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
14924 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 14925 | else |
bec39cab | 14926 | |
3fc11d3e | 14927 | |
5062cc19 KS |
14928 | # First check to see if --with-tcl was specified. |
14929 | case "${host}" in | |
14930 | *-*-cygwin*) platDir="win" ;; | |
14931 | *) platDir="unix" ;; | |
14932 | esac | |
14933 | if test x"${with_tclconfig}" != x ; then | |
14934 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
14935 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
14936 | else | |
81ecdfbb | 14937 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
14938 | fi |
14939 | fi | |
14940 | ||
14941 | # then check for a private Tcl installation | |
14942 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14943 | for i in \ | |
14944 | ../tcl \ | |
14945 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14946 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
14947 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14948 | ../../tcl \ | |
14949 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14950 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14951 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14952 | ../../../tcl \ | |
14953 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14954 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14955 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
14956 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
14957 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
14958 | break | |
14959 | fi | |
14960 | done | |
14961 | fi | |
14962 | ||
14963 | # on Darwin, check in Framework installation locations | |
14964 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
14965 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
14966 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
14967 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
14968 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
14969 | ; do | |
14970 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
14971 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
14972 | break | |
14973 | fi | |
14974 | done | |
14975 | fi | |
14976 | ||
14977 | # check in a few common install locations | |
14978 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14979 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
14980 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
14981 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
14982 | `ls -d /usr/local/lib 2>/dev/null` \ | |
14983 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
14984 | `ls -d /usr/lib 2>/dev/null` \ | |
14985 | ; do | |
14986 | if test -f "$i/tclConfig.sh" ; then | |
14987 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
14988 | break | |
14989 | fi | |
14990 | done | |
14991 | fi | |
3fc11d3e | 14992 | |
5062cc19 KS |
14993 | # check in a few other private locations |
14994 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14995 | for i in \ | |
14996 | ${srcdir}/../tcl \ | |
14997 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14998 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
14999 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
15000 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
15001 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
15002 | break | |
15003 | fi | |
15004 | done | |
15005 | fi | |
bec39cab | 15006 | |
3fc11d3e JM |
15007 | fi |
15008 | ||
5062cc19 KS |
15009 | |
15010 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15011 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
15012 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
15013 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
15014 | else |
15015 | no_tcl= | |
15016 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
15017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15018 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
15019 | fi |
15020 | fi | |
3fc11d3e | 15021 | |
bec39cab | 15022 | |
85541719 DE |
15023 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
15024 | # point to doing Tcl. | |
bec39cab | 15025 | |
5062cc19 KS |
15026 | # |
15027 | # Ok, lets find the tk configuration | |
15028 | # First, look for one uninstalled. | |
15029 | # the alternative search directory is invoked by --with-tk | |
15030 | # | |
3fc11d3e | 15031 | |
5062cc19 KS |
15032 | if test x"${no_tk}" = x ; then |
15033 | # we reset no_tk in case something fails here | |
15034 | no_tk=true | |
bec39cab | 15035 | |
81ecdfbb RW |
15036 | # Check whether --with-tk was given. |
15037 | if test "${with_tk+set}" = set; then : | |
15038 | withval=$with_tk; with_tkconfig=${withval} | |
15039 | fi | |
15040 | ||
15041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
15042 | $as_echo_n "checking for Tk configuration... " >&6; } | |
15043 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
15044 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15045 | else |
3fc11d3e JM |
15046 | |
15047 | ||
5062cc19 KS |
15048 | # First check to see if --with-tkconfig was specified. |
15049 | if test x"${with_tkconfig}" != x ; then | |
15050 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
15051 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
15052 | else | |
81ecdfbb | 15053 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15054 | fi |
15055 | fi | |
3fc11d3e | 15056 | |
5062cc19 KS |
15057 | # then check for a private Tk library |
15058 | case "${host}" in | |
15059 | *-*-cygwin*) platDir="win" ;; | |
15060 | *) platDir="unix" ;; | |
15061 | esac | |
15062 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15063 | for i in \ | |
15064 | ../tk \ | |
15065 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15066 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
15067 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
15068 | ../../tk \ | |
15069 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15070 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
15071 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
15072 | ../../../tk \ | |
15073 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15074 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
15075 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15076 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15077 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15078 | break | |
15079 | fi | |
15080 | done | |
15081 | fi | |
15082 | ||
15083 | # on Darwin, check in Framework installation locations | |
15084 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
15085 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15086 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15087 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15088 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15089 | ; do | |
15090 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
15091 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
15092 | break | |
15093 | fi | |
15094 | done | |
15095 | fi | |
15096 | ||
15097 | # check in a few common install locations | |
15098 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15099 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15100 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15101 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15102 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15103 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15104 | `ls -d /usr/lib 2>/dev/null` \ | |
15105 | ; do | |
15106 | if test -f "$i/tkConfig.sh" ; then | |
15107 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
15108 | break | |
15109 | fi | |
15110 | done | |
15111 | fi | |
15112 | # check in a few other private locations | |
15113 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15114 | for i in \ | |
15115 | ${srcdir}/../tk \ | |
15116 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15117 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
15118 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15119 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15120 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15121 | break | |
15122 | fi | |
15123 | done | |
15124 | fi | |
3fc11d3e | 15125 | |
3fc11d3e JM |
15126 | fi |
15127 | ||
15128 | ||
5062cc19 KS |
15129 | if test x"${ac_cv_c_tkconfig}" = x ; then |
15130 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
15131 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
15132 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
15133 | else |
15134 | no_tk= | |
15135 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
15136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15137 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 15138 | fi |
3fc11d3e | 15139 | fi |
dd2504ab | 15140 | |
dd2504ab | 15141 | |
85541719 DE |
15142 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
15143 | ||
81ecdfbb RW |
15144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15145 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
15146 | |
15147 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
15148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15149 | $as_echo "loading" >&6; } | |
85541719 DE |
15150 | . ${TCL_BIN_DIR}/tclConfig.sh |
15151 | else | |
81ecdfbb RW |
15152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15153 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
15154 | fi |
15155 | ||
15156 | # eval is required to do the TCL_DBGX substitution | |
15157 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
15158 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
15159 | ||
15160 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
15161 | # then set the common variable name to the value of the build variables. | |
15162 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
15163 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
15164 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
15165 | # installed and uninstalled version of Tcl. | |
15166 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
15167 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
15168 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
15169 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
15170 | elif test "`uname -s`" = "Darwin"; then | |
15171 | # If Tcl was built as a framework, attempt to use the libraries | |
15172 | # from the framework at the given location so that linking works | |
15173 | # against Tcl.framework installed in an arbitary location. | |
15174 | case ${TCL_DEFS} in | |
15175 | *TCL_FRAMEWORK*) | |
15176 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
15177 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
15178 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
15179 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
15180 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
15181 | break | |
15182 | fi | |
15183 | done | |
15184 | fi | |
15185 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
15186 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
15187 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
15188 | fi | |
15189 | ;; | |
15190 | esac | |
15191 | fi | |
15192 | ||
15193 | # eval is required to do the TCL_DBGX substitution | |
15194 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
15195 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
15196 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
15197 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
15198 | ||
15199 | ||
15200 | ||
15201 | ||
15202 | ||
15203 | ||
15204 | ||
15205 | ||
15206 | ||
15207 | ||
15208 | ||
15209 | ||
15210 | ||
15211 | ||
15212 | ||
15213 | # Check for in-tree tcl | |
15214 | here=`pwd` | |
15215 | cd ${srcdir}/.. | |
15216 | topdir=`pwd` | |
15217 | cd ${here} | |
15218 | ||
15219 | intree="no" | |
15220 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
15221 | intree="yes" | |
15222 | fi | |
15223 | ||
15224 | # Find Tcl private headers | |
15225 | if test x"${intree}" = xno; then | |
15226 | ||
81ecdfbb RW |
15227 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
15228 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
15229 | private_dir="" |
15230 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
15231 | if test -f ${dir}/tclInt.h ; then | |
15232 | private_dir=${dir} | |
15233 | fi | |
15234 | ||
15235 | if test x"${private_dir}" = x; then | |
81ecdfbb | 15236 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
15237 | else |
15238 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
15239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15240 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
15241 | fi |
15242 | ||
15243 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
15244 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
15245 | TCL_DEPS="" | |
15246 | else | |
15247 | # If building tcl in the same src tree, private headers | |
15248 | # are not needed, but we need to be sure to use the right | |
15249 | # headers library | |
15250 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
15251 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
15252 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
15253 | fi | |
15254 | ||
15255 | ||
15256 | ||
15257 | ||
15258 | ||
81ecdfbb RW |
15259 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15260 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 15261 | |
5062cc19 | 15262 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
15263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15264 | $as_echo "loading" >&6; } | |
5062cc19 | 15265 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 15266 | else |
81ecdfbb RW |
15267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15268 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 15269 | fi |
bec39cab | 15270 | |
5062cc19 KS |
15271 | # eval is required to do the TK_DBGX substitution |
15272 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
15273 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
15274 | ||
15275 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
15276 | # then set the common variable name to the value of the build variables. | |
15277 | # For example, the variable TK_LIB_SPEC will be set to the value | |
15278 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
15279 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
15280 | # installed and uninstalled version of Tcl. | |
85541719 | 15281 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
15282 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
15283 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
15284 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
15285 | elif test "`uname -s`" = "Darwin"; then | |
15286 | # If Tk was built as a framework, attempt to use the libraries | |
15287 | # from the framework at the given location so that linking works | |
15288 | # against Tk.framework installed in an arbitary location. | |
15289 | case ${TK_DEFS} in | |
15290 | *TK_FRAMEWORK*) | |
85541719 | 15291 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
15292 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
15293 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
15294 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
15295 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
15296 | break | |
15297 | fi | |
15298 | done | |
15299 | fi | |
85541719 | 15300 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
15301 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
15302 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
15303 | fi | |
15304 | ;; | |
15305 | esac | |
3fc11d3e JM |
15306 | fi |
15307 | ||
5062cc19 KS |
15308 | # eval is required to do the TK_DBGX substitution |
15309 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
15310 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
15311 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
15312 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 15313 | |
3fc11d3e JM |
15314 | |
15315 | ||
bec39cab AC |
15316 | |
15317 | ||
15318 | ||
15319 | ||
15320 | ||
15321 | ||
15322 | ||
3fc11d3e | 15323 | |
3fc11d3e | 15324 | |
bec39cab | 15325 | |
bec39cab | 15326 | |
85541719 DE |
15327 | # Check for in-tree Tk |
15328 | intree="no" | |
15329 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
15330 | intree="yes" | |
15331 | fi | |
3fc11d3e | 15332 | |
85541719 DE |
15333 | # Find Tk private headers |
15334 | if test x"${intree}" = xno; then | |
3fc11d3e | 15335 | |
81ecdfbb RW |
15336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
15337 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
15338 | private_dir="" |
15339 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
15340 | if test -f ${dir}/tkInt.h; then | |
15341 | private_dir=${dir} | |
3fc11d3e | 15342 | fi |
bec39cab | 15343 | |
5062cc19 | 15344 | if test x"${private_dir}" = x; then |
81ecdfbb | 15345 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 15346 | else |
5062cc19 | 15347 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
15348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15349 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 15350 | fi |
3fc11d3e | 15351 | |
85541719 DE |
15352 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
15353 | TK_LIBRARY=${TK_LIB_SPEC} | |
15354 | TK_DEPS="" | |
15355 | else | |
15356 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
15357 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
15358 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
15359 | fi | |
3fc11d3e JM |
15360 | |
15361 | ||
3fc11d3e JM |
15362 | |
15363 | ||
3fc11d3e | 15364 | |
85541719 | 15365 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 15366 | |
85541719 DE |
15367 | # Include some libraries that Tcl and Tk want. |
15368 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
15369 | # Yes, the ordering seems wrong here. But it isn't. | |
15370 | # TK_LIBS is the list of libraries that need to be linked | |
15371 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
15372 | # were in LIBS then any link tests after this point would | |
15373 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
15374 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 15375 | |
85541719 DE |
15376 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
15377 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
15378 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
15379 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
15380 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
15381 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
15382 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 15383 | |
85541719 DE |
15384 | if test x$gdb_cv_os_cygwin = xyes; then |
15385 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
15386 | WIN32LDAPP="-Wl,--subsystem,console" | |
15387 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 15388 | fi |
ffc6a242 | 15389 | |
81ecdfbb | 15390 | subdirs="$subdirs gdbtk" |
3ace7edb | 15391 | |
85541719 | 15392 | fi |
3fc11d3e JM |
15393 | fi |
15394 | ||
15395 | ||
15396 | ||
15397 | ||
15398 | ||
15399 | ||
15400 | ||
15401 | ||
81ecdfbb RW |
15402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
15403 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 15404 | |
c906108c | 15405 | |
81ecdfbb RW |
15406 | # Check whether --with-x was given. |
15407 | if test "${with_x+set}" = set; then : | |
15408 | withval=$with_x; | |
15409 | fi | |
c906108c SS |
15410 | |
15411 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
15412 | if test "x$with_x" = xno; then | |
15413 | # The user explicitly disabled X. | |
15414 | have_x=disabled | |
15415 | else | |
81ecdfbb RW |
15416 | case $x_includes,$x_libraries in #( |
15417 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
15418 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
15419 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
15420 | else |
15421 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 15422 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 15423 | rm -f -r conftest.dir |
bec39cab AC |
15424 | if mkdir conftest.dir; then |
15425 | cd conftest.dir | |
bec39cab | 15426 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
15427 | incroot: |
15428 | @echo incroot='${INCROOT}' | |
15429 | usrlibdir: | |
15430 | @echo usrlibdir='${USRLIBDIR}' | |
15431 | libdir: | |
15432 | @echo libdir='${LIBDIR}' | |
15433 | _ACEOF | |
15434 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 15435 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
15436 | for ac_var in incroot usrlibdir libdir; do |
15437 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
15438 | done | |
c906108c | 15439 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
15440 | for ac_extension in a so sl dylib la dll; do |
15441 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
15442 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 15443 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
15444 | fi |
15445 | done | |
15446 | # Screen out bogus values from the imake configuration. They are | |
15447 | # bogus both because they are the default anyway, and because | |
15448 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 15449 | case $ac_im_incroot in |
81ecdfbb | 15450 | /usr/include) ac_x_includes= ;; |
bec39cab | 15451 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 15452 | esac |
bec39cab | 15453 | case $ac_im_usrlibdir in |
81ecdfbb | 15454 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 15455 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
15456 | esac |
15457 | fi | |
15458 | cd .. | |
81ecdfbb | 15459 | rm -f -r conftest.dir |
c906108c SS |
15460 | fi |
15461 | ||
bec39cab AC |
15462 | # Standard set of common directories for X headers. |
15463 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
15464 | ac_x_header_dirs=' | |
15465 | /usr/X11/include | |
81ecdfbb | 15466 | /usr/X11R7/include |
bec39cab AC |
15467 | /usr/X11R6/include |
15468 | /usr/X11R5/include | |
15469 | /usr/X11R4/include | |
15470 | ||
15471 | /usr/include/X11 | |
81ecdfbb | 15472 | /usr/include/X11R7 |
bec39cab AC |
15473 | /usr/include/X11R6 |
15474 | /usr/include/X11R5 | |
15475 | /usr/include/X11R4 | |
15476 | ||
15477 | /usr/local/X11/include | |
81ecdfbb | 15478 | /usr/local/X11R7/include |
bec39cab AC |
15479 | /usr/local/X11R6/include |
15480 | /usr/local/X11R5/include | |
15481 | /usr/local/X11R4/include | |
15482 | ||
15483 | /usr/local/include/X11 | |
81ecdfbb | 15484 | /usr/local/include/X11R7 |
bec39cab AC |
15485 | /usr/local/include/X11R6 |
15486 | /usr/local/include/X11R5 | |
15487 | /usr/local/include/X11R4 | |
15488 | ||
15489 | /usr/X386/include | |
15490 | /usr/x386/include | |
15491 | /usr/XFree86/include/X11 | |
15492 | ||
15493 | /usr/include | |
15494 | /usr/local/include | |
15495 | /usr/unsupported/include | |
15496 | /usr/athena/include | |
15497 | /usr/local/x11r5/include | |
15498 | /usr/lpp/Xamples/include | |
15499 | ||
15500 | /usr/openwin/include | |
15501 | /usr/openwin/share/include' | |
15502 | ||
15503 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 15504 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 15505 | # First, try using that file with no special directory specified. |
81ecdfbb | 15506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15507 | /* end confdefs.h. */ |
81ecdfbb | 15508 | #include <X11/Xlib.h> |
bec39cab | 15509 | _ACEOF |
81ecdfbb | 15510 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
15511 | # We can compile using X headers with no special include directory. |
15512 | ac_x_includes= | |
15513 | else | |
bec39cab | 15514 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 15515 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
15516 | ac_x_includes=$ac_dir |
15517 | break | |
15518 | fi | |
15519 | done | |
c906108c | 15520 | fi |
bec39cab AC |
15521 | rm -f conftest.err conftest.$ac_ext |
15522 | fi # $ac_x_includes = no | |
c906108c | 15523 | |
bec39cab | 15524 | if test "$ac_x_libraries" = no; then |
c906108c | 15525 | # Check for the libraries. |
c906108c SS |
15526 | # See if we find them without any special options. |
15527 | # Don't add to $LIBS permanently. | |
bec39cab | 15528 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
15529 | LIBS="-lX11 $LIBS" |
15530 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15531 | /* end confdefs.h. */ |
81ecdfbb | 15532 | #include <X11/Xlib.h> |
bec39cab AC |
15533 | int |
15534 | main () | |
15535 | { | |
81ecdfbb | 15536 | XrmInitialize () |
bec39cab AC |
15537 | ; |
15538 | return 0; | |
15539 | } | |
15540 | _ACEOF | |
81ecdfbb | 15541 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15542 | LIBS=$ac_save_LIBS |
c906108c SS |
15543 | # We can link X programs with no special library path. |
15544 | ac_x_libraries= | |
15545 | else | |
81ecdfbb RW |
15546 | LIBS=$ac_save_LIBS |
15547 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 15548 | do |
bec39cab | 15549 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
15550 | for ac_extension in a so sl dylib la dll; do |
15551 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
15552 | ac_x_libraries=$ac_dir |
15553 | break 2 | |
15554 | fi | |
15555 | done | |
15556 | done | |
15557 | fi | |
81ecdfbb RW |
15558 | rm -f core conftest.err conftest.$ac_objext \ |
15559 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 15560 | fi # $ac_x_libraries = no |
c906108c | 15561 | |
81ecdfbb RW |
15562 | case $ac_x_includes,$ac_x_libraries in #( |
15563 | no,* | *,no | *\'*) | |
15564 | # Didn't find X, or a directory has "'" in its name. | |
15565 | ac_cv_have_x="have_x=no";; #( | |
15566 | *) | |
15567 | # Record where we found X for the cache. | |
15568 | ac_cv_have_x="have_x=yes\ | |
15569 | ac_x_includes='$ac_x_includes'\ | |
15570 | ac_x_libraries='$ac_x_libraries'" | |
15571 | esac | |
c906108c | 15572 | fi |
81ecdfbb RW |
15573 | ;; #( |
15574 | *) have_x=yes;; | |
15575 | esac | |
c906108c SS |
15576 | eval "$ac_cv_have_x" |
15577 | fi # $with_x != no | |
15578 | ||
15579 | if test "$have_x" != yes; then | |
81ecdfbb RW |
15580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
15581 | $as_echo "$have_x" >&6; } | |
c906108c SS |
15582 | no_x=yes |
15583 | else | |
15584 | # If each of the values was on the command line, it overrides each guess. | |
15585 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
15586 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
15587 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
15588 | ac_cv_have_x="have_x=yes\ |
15589 | ac_x_includes='$x_includes'\ | |
15590 | ac_x_libraries='$x_libraries'" | |
15591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
15592 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
15593 | fi |
15594 | ||
15595 | ||
bec39cab | 15596 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 15597 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
15598 | # This code just checks for a few cases where we'd like to ignore those |
15599 | # definitions, even when they're present in the '.mt' file. These cases | |
15600 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 15601 | # not part of the source tree. |
7a292a7a | 15602 | # |
81ecdfbb RW |
15603 | # Check whether --enable-sim was given. |
15604 | if test "${enable_sim+set}" = set; then : | |
15605 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
15606 | echo "enableval = ${enableval}"; |
15607 | case "${enableval}" in | |
15608 | yes) ignore_sim=false ;; | |
15609 | no) ignore_sim=true ;; | |
15610 | *) ignore_sim=false ;; | |
15611 | esac | |
15612 | else | |
15613 | ignore_sim=false | |
81ecdfbb RW |
15614 | fi |
15615 | ||
7a292a7a SS |
15616 | |
15617 | if test ! -d "${srcdir}/../sim"; then | |
15618 | ignore_sim=true | |
15619 | fi | |
15620 | ||
9b624dbe UW |
15621 | SIM= |
15622 | SIM_OBS= | |
15623 | if test "${ignore_sim}" = "false"; then | |
15624 | if test x"${gdb_sim}" != x ; then | |
15625 | SIM="${gdb_sim}" | |
15626 | SIM_OBS="remote-sim.o" | |
60ca704f | 15627 | |
81ecdfbb | 15628 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 15629 | |
9b624dbe | 15630 | fi |
7a292a7a SS |
15631 | fi |
15632 | ||
15633 | ||
15634 | ||
c906108c SS |
15635 | |
15636 | ||
15637 | ||
15638 | ||
15639 | ||
15640 | ||
dfcd3bfb | 15641 | |
e56ac5c3 AC |
15642 | |
15643 | ||
b3a90332 AC |
15644 | |
15645 | ||
c35f4ffc | 15646 | # List of host floatformats. |
bec39cab AC |
15647 | |
15648 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15649 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 15650 | _ACEOF |
c35f4ffc | 15651 | |
bec39cab AC |
15652 | |
15653 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15654 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
15655 | _ACEOF |
15656 | ||
c35f4ffc | 15657 | |
bec39cab | 15658 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 15659 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 15660 | _ACEOF |
c35f4ffc AC |
15661 | |
15662 | ||
c906108c SS |
15663 | # target_subdir is used by the testsuite to find the target libraries. |
15664 | target_subdir= | |
15665 | if test "${host}" != "${target}"; then | |
15666 | target_subdir="${target_alias}/" | |
15667 | fi | |
15668 | ||
15669 | ||
15670 | frags= | |
771b4502 | 15671 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
15672 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
15673 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 15674 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
15675 | fi |
15676 | frags="$frags $host_makefile_frag" | |
15677 | else | |
15678 | host_makefile_frag=/dev/null | |
c906108c | 15679 | fi |
c906108c | 15680 | |
c906108c SS |
15681 | |
15682 | ||
15683 | ||
771b4502 | 15684 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
15685 | # We pick this up from the host configuration file (.mh) because we |
15686 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
15687 | nativefile=`sed -n ' |
15688 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
15689 | ' ${host_makefile_frag}` | |
c906108c SS |
15690 | fi |
15691 | ||
15692 | ||
b00a8037 | 15693 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
15694 | |
15695 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 15696 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 15697 | _ACEOF |
b00a8037 DJ |
15698 | |
15699 | fi | |
15700 | ||
8dcde887 | 15701 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
15702 | # Check whether --enable-multi-ice was given. |
15703 | if test "${enable_multi_ice+set}" = set; then : | |
15704 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
15705 | yes | no) |
15706 | ;; | |
81ecdfbb | 15707 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 15708 | esac |
81ecdfbb | 15709 | fi |
b4e70030 | 15710 | |
81ecdfbb RW |
15711 | if test "x$enable_multi_ice" = xyes; then |
15712 | subdirs="$subdirs multi-ice" | |
3ace7edb | 15713 | |
a85f51e7 DJ |
15714 | fi |
15715 | ||
a13e2c95 UW |
15716 | # We only build gdbserver automatically in a native configuration. |
15717 | if test "$gdb_native" = "yes"; then | |
81ecdfbb RW |
15718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
15719 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 15720 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
15721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
15722 | $as_echo "yes" >&6; } | |
15723 | subdirs="$subdirs gdbserver" | |
3ace7edb | 15724 | |
8dcde887 | 15725 | else |
81ecdfbb RW |
15726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
15727 | $as_echo "no" >&6; } | |
8dcde887 MK |
15728 | fi |
15729 | fi | |
15730 | ||
db985757 | 15731 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 15732 | # to an empty version. |
c906108c SS |
15733 | |
15734 | files= | |
15735 | links= | |
5a2402b8 | 15736 | |
c906108c SS |
15737 | rm -f nm.h |
15738 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
15739 | case "${nativefile}" in |
15740 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
15741 | * ) GDB_NM_FILE="${nativefile}" | |
15742 | esac | |
5a2402b8 AC |
15743 | files="${files} ${GDB_NM_FILE}" |
15744 | links="${links} nm.h" | |
60ca704f SE |
15745 | |
15746 | cat >>confdefs.h <<_ACEOF | |
b78960be | 15747 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 15748 | _ACEOF |
5a2402b8 | 15749 | |
c906108c | 15750 | fi |
5a2402b8 AC |
15751 | |
15752 | ||
bec39cab AC |
15753 | ac_sources="$files" |
15754 | ac_dests="$links" | |
15755 | while test -n "$ac_sources"; do | |
15756 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
15757 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
15758 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
15759 | done | |
81ecdfbb | 15760 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
15761 | |
15762 | ||
c906108c SS |
15763 | |
15764 | ||
c906108c | 15765 | |
81ecdfbb | 15766 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 15767 | |
bec39cab | 15768 | |
81ecdfbb RW |
15769 | ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile" |
15770 | ||
15771 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 15772 | |
bec39cab AC |
15773 | cat >confcache <<\_ACEOF |
15774 | # This file is a shell script that caches the results of configure | |
15775 | # tests run on this system so they can be shared between configure | |
15776 | # scripts and configure runs, see configure's option --config-cache. | |
15777 | # It is not useful on other systems. If it contains results you don't | |
15778 | # want to keep, you may remove or edit it. | |
15779 | # | |
15780 | # config.status only pays attention to the cache file if you give it | |
15781 | # the --recheck option to rerun configure. | |
15782 | # | |
15783 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
15784 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15785 | # following values. | |
15786 | ||
15787 | _ACEOF | |
15788 | ||
15789 | # The following way of writing the cache mishandles newlines in values, | |
15790 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 15791 | # So, we kill variables containing newlines. |
bec39cab AC |
15792 | # Ultrix sh set writes to stderr and can't be redirected directly, |
15793 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
15794 | ( |
15795 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
15796 | eval ac_val=\$$ac_var | |
15797 | case $ac_val in #( | |
15798 | *${as_nl}*) | |
15799 | case $ac_var in #( | |
15800 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
15801 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
15802 | esac | |
15803 | case $ac_var in #( | |
15804 | _ | IFS | as_nl) ;; #( | |
15805 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
15806 | *) { eval $ac_var=; unset $ac_var;} ;; | |
15807 | esac ;; | |
15808 | esac | |
15809 | done | |
15810 | ||
bec39cab | 15811 | (set) 2>&1 | |
81ecdfbb RW |
15812 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
15813 | *${as_nl}ac_space=\ *) | |
15814 | # `set' does not quote correctly, so add quotes: double-quote | |
15815 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
15816 | sed -n \ |
15817 | "s/'/'\\\\''/g; | |
15818 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 15819 | ;; #( |
bec39cab AC |
15820 | *) |
15821 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 15822 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 15823 | ;; |
81ecdfbb RW |
15824 | esac | |
15825 | sort | |
15826 | ) | | |
bec39cab | 15827 | sed ' |
81ecdfbb | 15828 | /^ac_cv_env_/b end |
bec39cab | 15829 | t clear |
81ecdfbb | 15830 | :clear |
bec39cab AC |
15831 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
15832 | t end | |
81ecdfbb RW |
15833 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
15834 | :end' >>confcache | |
15835 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
15836 | if test -w "$cache_file"; then | |
15837 | test "x$cache_file" != "x/dev/null" && | |
15838 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
15839 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
15840 | cat confcache >$cache_file |
15841 | else | |
81ecdfbb RW |
15842 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
15843 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
15844 | fi |
15845 | fi | |
15846 | rm -f confcache | |
15847 | ||
15848 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15849 | # Let make expand exec_prefix. | |
15850 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15851 | ||
bec39cab AC |
15852 | DEFS=-DHAVE_CONFIG_H |
15853 | ||
15854 | ac_libobjs= | |
15855 | ac_ltlibobjs= | |
15856 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
15857 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
15858 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
15859 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
15860 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
15861 | # will be set to the directory where LIBOBJS objects are built. | |
15862 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
15863 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
15864 | done |
15865 | LIBOBJS=$ac_libobjs | |
15866 | ||
15867 | LTLIBOBJS=$ac_ltlibobjs | |
15868 | ||
15869 | ||
85981d60 | 15870 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
15871 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
15872 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 15873 | fi |
a417dc56 | 15874 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
15875 | as_fn_error "conditional \"GMAKE\" was never defined. |
15876 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 15877 | fi |
783e057b | 15878 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
81ecdfbb RW |
15879 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
15880 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
783e057b DJ |
15881 | fi |
15882 | ||
15883 | gl_libobjs= | |
15884 | gl_ltlibobjs= | |
15885 | if test -n "$gl_LIBOBJS"; then | |
15886 | # Remove the extension. | |
15887 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 15888 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
15889 | gl_libobjs="$gl_libobjs $i.$ac_objext" |
15890 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
15891 | done | |
15892 | fi | |
15893 | gl_LIBOBJS=$gl_libobjs | |
15894 | ||
15895 | gl_LTLIBOBJS=$gl_ltlibobjs | |
15896 | ||
15897 | ||
15898 | ||
15899 | gltests_libobjs= | |
15900 | gltests_ltlibobjs= | |
15901 | if test -n "$gltests_LIBOBJS"; then | |
15902 | # Remove the extension. | |
15903 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 15904 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
15905 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" |
15906 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
15907 | done | |
15908 | fi | |
15909 | gltests_LIBOBJS=$gltests_libobjs | |
15910 | ||
15911 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
15912 | ||
15913 | ||
e28b3332 | 15914 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
81ecdfbb RW |
15915 | as_fn_error "conditional \"AMDEP\" was never defined. |
15916 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
e28b3332 DJ |
15917 | fi |
15918 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
81ecdfbb RW |
15919 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
15920 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
15921 | fi | |
15922 | if test -n "$EXEEXT"; then | |
15923 | am__EXEEXT_TRUE= | |
15924 | am__EXEEXT_FALSE='#' | |
15925 | else | |
15926 | am__EXEEXT_TRUE='#' | |
15927 | am__EXEEXT_FALSE= | |
e28b3332 | 15928 | fi |
bec39cab | 15929 | |
81ecdfbb RW |
15930 | |
15931 | ||
bec39cab | 15932 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 15933 | ac_write_fail=0 |
bec39cab AC |
15934 | ac_clean_files_save=$ac_clean_files |
15935 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
15936 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
15937 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
15938 | as_write_fail=0 | |
15939 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
15940 | #! $SHELL |
15941 | # Generated by $as_me. | |
15942 | # Run this file to recreate the current configuration. | |
15943 | # Compiler output produced by configure, useful for debugging | |
15944 | # configure, is in config.log if it exists. | |
15945 | ||
15946 | debug=false | |
15947 | ac_cs_recheck=false | |
15948 | ac_cs_silent=false | |
bec39cab | 15949 | |
81ecdfbb RW |
15950 | SHELL=\${CONFIG_SHELL-$SHELL} |
15951 | export SHELL | |
15952 | _ASEOF | |
15953 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
15954 | ## -------------------- ## | |
15955 | ## M4sh Initialization. ## | |
15956 | ## -------------------- ## | |
15957 | ||
15958 | # Be more Bourne compatible | |
15959 | DUALCASE=1; export DUALCASE # for MKS sh | |
15960 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
15961 | emulate sh |
15962 | NULLCMD=: | |
81ecdfbb | 15963 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
15964 | # is contrary to our usage. Disable this feature. |
15965 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
15966 | setopt NO_GLOB_SUBST |
15967 | else | |
15968 | case `(set -o) 2>/dev/null` in #( | |
15969 | *posix*) : | |
15970 | set -o posix ;; #( | |
15971 | *) : | |
15972 | ;; | |
15973 | esac | |
bec39cab | 15974 | fi |
bec39cab | 15975 | |
81ecdfbb RW |
15976 | |
15977 | as_nl=' | |
15978 | ' | |
15979 | export as_nl | |
15980 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
15981 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
15982 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
15983 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
15984 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
15985 | # but without wasting forks for bash or zsh. | |
15986 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
15987 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15988 | as_echo='print -r --' | |
15989 | as_echo_n='print -rn --' | |
15990 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15991 | as_echo='printf %s\n' | |
15992 | as_echo_n='printf %s' | |
15993 | else | |
15994 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
15995 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
15996 | as_echo_n='/usr/ucb/echo -n' | |
15997 | else | |
15998 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
15999 | as_echo_n_body='eval | |
16000 | arg=$1; | |
16001 | case $arg in #( | |
16002 | *"$as_nl"*) | |
16003 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
16004 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
16005 | esac; | |
16006 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
16007 | ' | |
16008 | export as_echo_n_body | |
16009 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
16010 | fi | |
16011 | export as_echo_body | |
16012 | as_echo='sh -c $as_echo_body as_echo' | |
16013 | fi | |
16014 | ||
16015 | # The user is always right. | |
16016 | if test "${PATH_SEPARATOR+set}" != set; then | |
16017 | PATH_SEPARATOR=: | |
16018 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
16019 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
16020 | PATH_SEPARATOR=';' | |
16021 | } | |
bec39cab AC |
16022 | fi |
16023 | ||
16024 | ||
81ecdfbb RW |
16025 | # IFS |
16026 | # We need space, tab and new line, in precisely that order. Quoting is | |
16027 | # there to prevent editors from complaining about space-tab. | |
16028 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
16029 | # splitting by setting IFS to empty value.) | |
16030 | IFS=" "" $as_nl" | |
16031 | ||
16032 | # Find who we are. Look in the path if we contain no directory separator. | |
16033 | case $0 in #(( | |
16034 | *[\\/]* ) as_myself=$0 ;; | |
16035 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16036 | for as_dir in $PATH | |
16037 | do | |
16038 | IFS=$as_save_IFS | |
16039 | test -z "$as_dir" && as_dir=. | |
16040 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16041 | done | |
16042 | IFS=$as_save_IFS | |
16043 | ||
16044 | ;; | |
16045 | esac | |
16046 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16047 | # in which case we are not to be found in the path. | |
16048 | if test "x$as_myself" = x; then | |
16049 | as_myself=$0 | |
16050 | fi | |
16051 | if test ! -f "$as_myself"; then | |
16052 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
16053 | exit 1 | |
16054 | fi | |
16055 | ||
16056 | # Unset variables that we do not need and which cause bugs (e.g. in | |
16057 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
16058 | # suppresses any "Segmentation fault" message there. '((' could | |
16059 | # trigger a bug in pdksh 5.2.14. | |
16060 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
16061 | do eval test x\${$as_var+set} = xset \ | |
16062 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
16063 | done | |
bec39cab AC |
16064 | PS1='$ ' |
16065 | PS2='> ' | |
16066 | PS4='+ ' | |
16067 | ||
16068 | # NLS nuisances. | |
81ecdfbb RW |
16069 | LC_ALL=C |
16070 | export LC_ALL | |
16071 | LANGUAGE=C | |
16072 | export LANGUAGE | |
16073 | ||
16074 | # CDPATH. | |
16075 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
16076 | ||
16077 | ||
16078 | # as_fn_error ERROR [LINENO LOG_FD] | |
16079 | # --------------------------------- | |
16080 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
16081 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
16082 | # script with status $?, using 1 if that was 0. | |
16083 | as_fn_error () | |
16084 | { | |
16085 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
16086 | if test "$3"; then | |
16087 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
16088 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
16089 | fi | |
16090 | $as_echo "$as_me: error: $1" >&2 | |
16091 | as_fn_exit $as_status | |
16092 | } # as_fn_error | |
16093 | ||
16094 | ||
16095 | # as_fn_set_status STATUS | |
16096 | # ----------------------- | |
16097 | # Set $? to STATUS, without forking. | |
16098 | as_fn_set_status () | |
16099 | { | |
16100 | return $1 | |
16101 | } # as_fn_set_status | |
16102 | ||
16103 | # as_fn_exit STATUS | |
16104 | # ----------------- | |
16105 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
16106 | as_fn_exit () | |
16107 | { | |
16108 | set +e | |
16109 | as_fn_set_status $1 | |
16110 | exit $1 | |
16111 | } # as_fn_exit | |
16112 | ||
16113 | # as_fn_unset VAR | |
16114 | # --------------- | |
16115 | # Portably unset VAR. | |
16116 | as_fn_unset () | |
16117 | { | |
16118 | { eval $1=; unset $1;} | |
16119 | } | |
16120 | as_unset=as_fn_unset | |
16121 | # as_fn_append VAR VALUE | |
16122 | # ---------------------- | |
16123 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
16124 | # advantage of any shell optimizations that allow amortized linear growth over | |
16125 | # repeated appends, instead of the typical quadratic growth present in naive | |
16126 | # implementations. | |
16127 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
16128 | eval 'as_fn_append () | |
16129 | { | |
16130 | eval $1+=\$2 | |
16131 | }' | |
16132 | else | |
16133 | as_fn_append () | |
16134 | { | |
16135 | eval $1=\$$1\$2 | |
16136 | } | |
16137 | fi # as_fn_append | |
16138 | ||
16139 | # as_fn_arith ARG... | |
16140 | # ------------------ | |
16141 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
16142 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
16143 | # must be portable across $(()) and expr. | |
16144 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
16145 | eval 'as_fn_arith () | |
16146 | { | |
16147 | as_val=$(( $* )) | |
16148 | }' | |
16149 | else | |
16150 | as_fn_arith () | |
16151 | { | |
16152 | as_val=`expr "$@" || test $? -eq 1` | |
16153 | } | |
16154 | fi # as_fn_arith | |
bec39cab | 16155 | |
81ecdfbb RW |
16156 | |
16157 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
16158 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
16159 | as_expr=expr |
16160 | else | |
16161 | as_expr=false | |
16162 | fi | |
16163 | ||
81ecdfbb | 16164 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
16165 | as_basename=basename |
16166 | else | |
16167 | as_basename=false | |
16168 | fi | |
16169 | ||
81ecdfbb RW |
16170 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
16171 | as_dirname=dirname | |
16172 | else | |
16173 | as_dirname=false | |
16174 | fi | |
bec39cab | 16175 | |
81ecdfbb | 16176 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
16177 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
16178 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16179 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
16180 | $as_echo X/"$0" | | |
16181 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
16182 | s//\1/ | |
16183 | q | |
16184 | } | |
16185 | /^X\/\(\/\/\)$/{ | |
16186 | s//\1/ | |
16187 | q | |
16188 | } | |
16189 | /^X\/\(\/\).*/{ | |
16190 | s//\1/ | |
16191 | q | |
16192 | } | |
16193 | s/.*/./; q'` | |
b4e70030 | 16194 | |
b4e70030 JB |
16195 | # Avoid depending upon Character Ranges. |
16196 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16197 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16198 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16199 | as_cr_digits='0123456789' | |
16200 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16201 | ||
81ecdfbb RW |
16202 | ECHO_C= ECHO_N= ECHO_T= |
16203 | case `echo -n x` in #((((( | |
16204 | -n*) | |
16205 | case `echo 'xy\c'` in | |
16206 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
16207 | xy) ECHO_C='\c';; | |
16208 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
16209 | ECHO_T=' ';; | |
16210 | esac;; | |
16211 | *) | |
16212 | ECHO_N='-n';; | |
bec39cab AC |
16213 | esac |
16214 | ||
81ecdfbb RW |
16215 | rm -f conf$$ conf$$.exe conf$$.file |
16216 | if test -d conf$$.dir; then | |
16217 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 16218 | else |
81ecdfbb RW |
16219 | rm -f conf$$.dir |
16220 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 16221 | fi |
81ecdfbb RW |
16222 | if (echo >conf$$.file) 2>/dev/null; then |
16223 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 16224 | as_ln_s='ln -s' |
81ecdfbb RW |
16225 | # ... but there are two gotchas: |
16226 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
16227 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
16228 | # In both cases, we have to default to `cp -p'. | |
16229 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
16230 | as_ln_s='cp -p' | |
16231 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
16232 | as_ln_s=ln | |
16233 | else | |
16234 | as_ln_s='cp -p' | |
b4e70030 | 16235 | fi |
bec39cab AC |
16236 | else |
16237 | as_ln_s='cp -p' | |
16238 | fi | |
81ecdfbb RW |
16239 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
16240 | rmdir conf$$.dir 2>/dev/null | |
16241 | ||
16242 | ||
16243 | # as_fn_mkdir_p | |
16244 | # ------------- | |
16245 | # Create "$as_dir" as a directory, including parents if necessary. | |
16246 | as_fn_mkdir_p () | |
16247 | { | |
16248 | ||
16249 | case $as_dir in #( | |
16250 | -*) as_dir=./$as_dir;; | |
16251 | esac | |
16252 | test -d "$as_dir" || eval $as_mkdir_p || { | |
16253 | as_dirs= | |
16254 | while :; do | |
16255 | case $as_dir in #( | |
16256 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
16257 | *) as_qdir=$as_dir;; | |
16258 | esac | |
16259 | as_dirs="'$as_qdir' $as_dirs" | |
16260 | as_dir=`$as_dirname -- "$as_dir" || | |
16261 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16262 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
16263 | X"$as_dir" : 'X\(//\)$' \| \ | |
16264 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
16265 | $as_echo X"$as_dir" | | |
16266 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16267 | s//\1/ | |
16268 | q | |
16269 | } | |
16270 | /^X\(\/\/\)[^/].*/{ | |
16271 | s//\1/ | |
16272 | q | |
16273 | } | |
16274 | /^X\(\/\/\)$/{ | |
16275 | s//\1/ | |
16276 | q | |
16277 | } | |
16278 | /^X\(\/\).*/{ | |
16279 | s//\1/ | |
16280 | q | |
16281 | } | |
16282 | s/.*/./; q'` | |
16283 | test -d "$as_dir" && break | |
16284 | done | |
16285 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
16286 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
16287 | ||
bec39cab | 16288 | |
81ecdfbb | 16289 | } # as_fn_mkdir_p |
bec39cab | 16290 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 16291 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
16292 | else |
16293 | test -d ./-p && rmdir ./-p | |
16294 | as_mkdir_p=false | |
16295 | fi | |
16296 | ||
81ecdfbb RW |
16297 | if test -x / >/dev/null 2>&1; then |
16298 | as_test_x='test -x' | |
16299 | else | |
16300 | if ls -dL / >/dev/null 2>&1; then | |
16301 | as_ls_L_option=L | |
16302 | else | |
16303 | as_ls_L_option= | |
16304 | fi | |
16305 | as_test_x=' | |
16306 | eval sh -c '\'' | |
16307 | if test -d "$1"; then | |
16308 | test -d "$1/."; | |
16309 | else | |
16310 | case $1 in #( | |
16311 | -*)set "./$1";; | |
16312 | esac; | |
16313 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
16314 | ???[sx]*):;;*)false;;esac;fi | |
16315 | '\'' sh | |
16316 | ' | |
16317 | fi | |
16318 | as_executable_p=$as_test_x | |
bec39cab AC |
16319 | |
16320 | # Sed expression to map a string onto a valid CPP name. | |
16321 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
16322 | ||
16323 | # Sed expression to map a string onto a valid variable name. | |
16324 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
16325 | ||
16326 | ||
bec39cab | 16327 | exec 6>&1 |
81ecdfbb RW |
16328 | ## ----------------------------------- ## |
16329 | ## Main body of $CONFIG_STATUS script. ## | |
16330 | ## ----------------------------------- ## | |
16331 | _ASEOF | |
16332 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
16333 | ||
16334 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16335 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 16336 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
16337 | # values after options handling. |
16338 | ac_log=" | |
bec39cab | 16339 | This file was extended by $as_me, which was |
81ecdfbb | 16340 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
16341 | |
16342 | CONFIG_FILES = $CONFIG_FILES | |
16343 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16344 | CONFIG_LINKS = $CONFIG_LINKS | |
16345 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16346 | $ $0 $@ | |
16347 | ||
81ecdfbb RW |
16348 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
16349 | " | |
16350 | ||
bec39cab AC |
16351 | _ACEOF |
16352 | ||
81ecdfbb RW |
16353 | case $ac_config_files in *" |
16354 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
16355 | esac | |
234b45d4 | 16356 | |
81ecdfbb RW |
16357 | case $ac_config_headers in *" |
16358 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
16359 | esac | |
b4e70030 | 16360 | |
b4e70030 | 16361 | |
81ecdfbb RW |
16362 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
16363 | # Files that config.status was made for. | |
16364 | config_files="$ac_config_files" | |
16365 | config_headers="$ac_config_headers" | |
16366 | config_links="$ac_config_links" | |
16367 | config_commands="$ac_config_commands" | |
234b45d4 | 16368 | |
81ecdfbb | 16369 | _ACEOF |
b4e70030 | 16370 | |
81ecdfbb | 16371 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 16372 | ac_cs_usage="\ |
81ecdfbb RW |
16373 | \`$as_me' instantiates files and other configuration actions |
16374 | from templates according to the current configuration. Unless the files | |
16375 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 16376 | |
81ecdfbb | 16377 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 16378 | |
bec39cab | 16379 | -h, --help print this help, then exit |
81ecdfbb RW |
16380 | -V, --version print version number and configuration settings, then exit |
16381 | -q, --quiet, --silent | |
16382 | do not print progress messages | |
bec39cab AC |
16383 | -d, --debug don't remove temporary files |
16384 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
16385 | --file=FILE[:TEMPLATE] |
16386 | instantiate the configuration file FILE | |
16387 | --header=FILE[:TEMPLATE] | |
16388 | instantiate the configuration header FILE | |
234b45d4 | 16389 | |
bec39cab AC |
16390 | Configuration files: |
16391 | $config_files | |
234b45d4 | 16392 | |
bec39cab AC |
16393 | Configuration headers: |
16394 | $config_headers | |
234b45d4 | 16395 | |
bec39cab AC |
16396 | Configuration links: |
16397 | $config_links | |
234b45d4 | 16398 | |
bec39cab AC |
16399 | Configuration commands: |
16400 | $config_commands | |
16401 | ||
81ecdfbb | 16402 | Report bugs to the package provider." |
b4e70030 | 16403 | |
81ecdfbb RW |
16404 | _ACEOF |
16405 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
16406 | ac_cs_version="\\ |
16407 | config.status | |
81ecdfbb RW |
16408 | configured by $0, generated by GNU Autoconf 2.64, |
16409 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 16410 | |
81ecdfbb | 16411 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
16412 | This config.status script is free software; the Free Software Foundation |
16413 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
16414 | |
16415 | ac_pwd='$ac_pwd' | |
16416 | srcdir='$srcdir' | |
16417 | INSTALL='$INSTALL' | |
16418 | MKDIR_P='$MKDIR_P' | |
16419 | AWK='$AWK' | |
16420 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
16421 | _ACEOF |
16422 | ||
81ecdfbb RW |
16423 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16424 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
16425 | ac_need_defaults=: |
16426 | while test $# != 0 | |
16427 | do | |
16428 | case $1 in | |
16429 | --*=*) | |
81ecdfbb RW |
16430 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
16431 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 16432 | ac_shift=: |
c906108c | 16433 | ;; |
81ecdfbb | 16434 | *) |
bec39cab AC |
16435 | ac_option=$1 |
16436 | ac_optarg=$2 | |
16437 | ac_shift=shift | |
c906108c | 16438 | ;; |
bec39cab | 16439 | esac |
c906108c | 16440 | |
bec39cab AC |
16441 | case $ac_option in |
16442 | # Handling of the options. | |
bec39cab AC |
16443 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
16444 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
16445 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
16446 | $as_echo "$ac_cs_version"; exit ;; | |
16447 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
16448 | debug=: ;; |
16449 | --file | --fil | --fi | --f ) | |
16450 | $ac_shift | |
81ecdfbb RW |
16451 | case $ac_optarg in |
16452 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16453 | esac | |
16454 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
16455 | ac_need_defaults=false;; |
16456 | --header | --heade | --head | --hea ) | |
16457 | $ac_shift | |
81ecdfbb RW |
16458 | case $ac_optarg in |
16459 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16460 | esac | |
16461 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 16462 | ac_need_defaults=false;; |
81ecdfbb RW |
16463 | --he | --h) |
16464 | # Conflict between --help and --header | |
16465 | as_fn_error "ambiguous option: \`$1' | |
16466 | Try \`$0 --help' for more information.";; | |
16467 | --help | --hel | -h ) | |
16468 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
16469 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
16470 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16471 | ac_cs_silent=: ;; | |
c906108c | 16472 | |
bec39cab | 16473 | # This is an error. |
81ecdfbb RW |
16474 | -*) as_fn_error "unrecognized option: \`$1' |
16475 | Try \`$0 --help' for more information." ;; | |
c906108c | 16476 | |
81ecdfbb RW |
16477 | *) as_fn_append ac_config_targets " $1" |
16478 | ac_need_defaults=false ;; | |
c906108c | 16479 | |
bec39cab AC |
16480 | esac |
16481 | shift | |
16482 | done | |
c906108c | 16483 | |
bec39cab | 16484 | ac_configure_extra_args= |
c906108c | 16485 | |
bec39cab AC |
16486 | if $ac_cs_silent; then |
16487 | exec 6>/dev/null | |
16488 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
16489 | fi | |
c906108c | 16490 | |
bec39cab | 16491 | _ACEOF |
81ecdfbb | 16492 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 16493 | if \$ac_cs_recheck; then |
81ecdfbb RW |
16494 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
16495 | shift | |
16496 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
16497 | CONFIG_SHELL='$SHELL' | |
16498 | export CONFIG_SHELL | |
16499 | exec "\$@" | |
bec39cab AC |
16500 | fi |
16501 | ||
16502 | _ACEOF | |
81ecdfbb RW |
16503 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16504 | exec 5>>config.log | |
16505 | { | |
16506 | echo | |
16507 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16508 | ## Running $as_me. ## | |
16509 | _ASBOX | |
16510 | $as_echo "$ac_log" | |
16511 | } >&5 | |
bec39cab | 16512 | |
81ecdfbb RW |
16513 | _ACEOF |
16514 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 16515 | # |
81ecdfbb | 16516 | # INIT-COMMANDS |
c906108c | 16517 | # |
a417dc56 | 16518 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
e28b3332 | 16519 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
b4e70030 | 16520 | |
bec39cab AC |
16521 | _ACEOF |
16522 | ||
81ecdfbb | 16523 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 16524 | |
81ecdfbb | 16525 | # Handling of arguments. |
bec39cab | 16526 | for ac_config_target in $ac_config_targets |
c906108c | 16527 | do |
81ecdfbb RW |
16528 | case $ac_config_target in |
16529 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
16530 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
16531 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
16532 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; | |
16533 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
16534 | ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;; | |
16535 | "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; | |
16536 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16537 | ||
16538 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
16539 | esac |
16540 | done | |
16541 | ||
81ecdfbb | 16542 | |
bec39cab AC |
16543 | # If the user did not use the arguments to specify the items to instantiate, |
16544 | # then the envvar interface is used. Set only those that are not. | |
16545 | # We use the long form for the default assignment because of an extremely | |
16546 | # bizarre bug on SunOS 4.1.3. | |
16547 | if $ac_need_defaults; then | |
16548 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16549 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16550 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
16551 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16552 | fi | |
16553 | ||
b4e70030 | 16554 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 16555 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 16556 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
16557 | # Hook for its removal unless debugging. |
16558 | # Note that there is a small window in which the directory will not be cleaned: | |
16559 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
16560 | $debug || |
16561 | { | |
81ecdfbb RW |
16562 | tmp= |
16563 | trap 'exit_status=$? | |
16564 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
16565 | ' 0 | |
16566 | trap 'as_fn_exit 1' 1 2 13 15 | |
16567 | } | |
16568 | # Create a (secure) tmp directory for tmp files. | |
16569 | ||
16570 | { | |
16571 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
16572 | test -n "$tmp" && test -d "$tmp" | |
16573 | } || | |
16574 | { | |
16575 | tmp=./conf$$-$RANDOM | |
16576 | (umask 077 && mkdir "$tmp") | |
16577 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
16578 | ||
16579 | # Set up the scripts for CONFIG_FILES section. | |
16580 | # No need to generate them if there are no CONFIG_FILES. | |
16581 | # This happens for instance with `./config.status config.h'. | |
16582 | if test -n "$CONFIG_FILES"; then | |
16583 | ||
16584 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
16585 | ac_cs_awk_getline=: | |
16586 | ac_cs_awk_pipe_init= | |
16587 | ac_cs_awk_read_file=' | |
16588 | while ((getline aline < (F[key])) > 0) | |
16589 | print(aline) | |
16590 | close(F[key])' | |
16591 | ac_cs_awk_pipe_fini= | |
16592 | else | |
16593 | ac_cs_awk_getline=false | |
16594 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
16595 | ac_cs_awk_read_file=' | |
16596 | print "|#_!!_#|" | |
16597 | print "cat " F[key] " &&" | |
16598 | '$ac_cs_awk_pipe_init | |
16599 | # The final `:' finishes the AND list. | |
16600 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
16601 | fi | |
16602 | ac_cr=`echo X | tr X '\015'` | |
16603 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
16604 | # But we know of no other shell where ac_cr would be empty at this | |
16605 | # point, so we can use a bashism as a fallback. | |
16606 | if test "x$ac_cr" = x; then | |
16607 | eval ac_cr=\$\'\\r\' | |
16608 | fi | |
16609 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
16610 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
16611 | ac_cs_awk_cr='\r' | |
16612 | else | |
16613 | ac_cs_awk_cr=$ac_cr | |
16614 | fi | |
16615 | ||
16616 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
16617 | _ACEOF | |
16618 | ||
16619 | # Create commands to substitute file output variables. | |
16620 | { | |
16621 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
16622 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
16623 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
16624 | echo "_ACAWK" && | |
16625 | echo "_ACEOF" | |
16626 | } >conf$$files.sh && | |
16627 | . ./conf$$files.sh || | |
16628 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16629 | rm -f conf$$files.sh | |
16630 | ||
16631 | { | |
16632 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
16633 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
16634 | echo "_ACEOF" | |
16635 | } >conf$$subs.sh || | |
16636 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16637 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
16638 | ac_delim='%!_!# ' | |
16639 | for ac_last_try in false false false false false :; do | |
16640 | . ./conf$$subs.sh || | |
16641 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16642 | ||
16643 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
16644 | if test $ac_delim_n = $ac_delim_num; then | |
16645 | break | |
16646 | elif $ac_last_try; then | |
16647 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16648 | else | |
16649 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16650 | fi | |
16651 | done | |
16652 | rm -f conf$$subs.sh | |
16653 | ||
16654 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16655 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
16656 | _ACEOF | |
16657 | sed -n ' | |
16658 | h | |
16659 | s/^/S["/; s/!.*/"]=/ | |
16660 | p | |
16661 | g | |
16662 | s/^[^!]*!// | |
16663 | :repl | |
16664 | t repl | |
16665 | s/'"$ac_delim"'$// | |
16666 | t delim | |
16667 | :nl | |
16668 | h | |
16669 | s/\(.\{148\}\).*/\1/ | |
16670 | t more1 | |
16671 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
16672 | p | |
16673 | n | |
16674 | b repl | |
16675 | :more1 | |
16676 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16677 | p | |
16678 | g | |
16679 | s/.\{148\}// | |
16680 | t nl | |
16681 | :delim | |
16682 | h | |
16683 | s/\(.\{148\}\).*/\1/ | |
16684 | t more2 | |
16685 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
16686 | p | |
16687 | b | |
16688 | :more2 | |
16689 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16690 | p | |
16691 | g | |
16692 | s/.\{148\}// | |
16693 | t delim | |
16694 | ' <conf$$subs.awk | sed ' | |
16695 | /^[^""]/{ | |
16696 | N | |
16697 | s/\n// | |
16698 | } | |
16699 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
16700 | rm -f conf$$subs.awk | |
16701 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16702 | _ACAWK | |
16703 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
16704 | for (key in S) S_is_set[key] = 1 | |
16705 | FS = "\a" | |
16706 | \$ac_cs_awk_pipe_init | |
16707 | } | |
16708 | { | |
16709 | line = $ 0 | |
16710 | nfields = split(line, field, "@") | |
16711 | substed = 0 | |
16712 | len = length(field[1]) | |
16713 | for (i = 2; i < nfields; i++) { | |
16714 | key = field[i] | |
16715 | keylen = length(key) | |
16716 | if (S_is_set[key]) { | |
16717 | value = S[key] | |
16718 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
16719 | len += length(value) + length(field[++i]) | |
16720 | substed = 1 | |
16721 | } else | |
16722 | len += 1 + keylen | |
16723 | } | |
16724 | if (nfields == 3 && !substed) { | |
16725 | key = field[2] | |
16726 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
16727 | \$ac_cs_awk_read_file | |
16728 | next | |
16729 | } | |
16730 | } | |
16731 | print line | |
b4e70030 | 16732 | } |
81ecdfbb RW |
16733 | \$ac_cs_awk_pipe_fini |
16734 | _ACAWK | |
16735 | _ACEOF | |
16736 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16737 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
16738 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
16739 | else | |
16740 | cat | |
16741 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
16742 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
16743 | _ACEOF | |
16744 | ||
16745 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
16746 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16747 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16748 | # (actually we leave an empty line to preserve line numbers). | |
16749 | if test "x$srcdir" = x.; then | |
16750 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
16751 | s/:*\$(srcdir):*/:/ | |
16752 | s/:*\${srcdir}:*/:/ | |
16753 | s/:*@srcdir@:*/:/ | |
16754 | s/^\([^=]*=[ ]*\):*/\1/ | |
16755 | s/:*$// | |
16756 | s/^[^=]*=[ ]*$// | |
16757 | }' | |
16758 | fi | |
16759 | ||
16760 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16761 | fi # test -n "$CONFIG_FILES" | |
16762 | ||
16763 | # Set up the scripts for CONFIG_HEADERS section. | |
16764 | # No need to generate them if there are no CONFIG_HEADERS. | |
16765 | # This happens for instance with `./config.status Makefile'. | |
16766 | if test -n "$CONFIG_HEADERS"; then | |
16767 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
16768 | BEGIN { | |
16769 | _ACEOF | |
16770 | ||
16771 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
16772 | # here-document in config.status, that substitutes the proper values into | |
16773 | # config.h.in to produce config.h. | |
4e8d927d | 16774 | |
81ecdfbb RW |
16775 | # Create a delimiter string that does not exist in confdefs.h, to ease |
16776 | # handling of long lines. | |
16777 | ac_delim='%!_!# ' | |
16778 | for ac_last_try in false false :; do | |
16779 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
16780 | if test -z "$ac_t"; then | |
16781 | break | |
16782 | elif $ac_last_try; then | |
16783 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
16784 | else | |
16785 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16786 | fi | |
16787 | done | |
4e8d927d | 16788 | |
81ecdfbb RW |
16789 | # For the awk script, D is an array of macro values keyed by name, |
16790 | # likewise P contains macro parameters if any. Preserve backslash | |
16791 | # newline sequences. | |
16792 | ||
16793 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
16794 | sed -n ' | |
16795 | s/.\{148\}/&'"$ac_delim"'/g | |
16796 | t rset | |
16797 | :rset | |
16798 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
16799 | t def | |
16800 | d | |
16801 | :def | |
16802 | s/\\$// | |
16803 | t bsnl | |
16804 | s/["\\]/\\&/g | |
16805 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16806 | D["\1"]=" \3"/p | |
16807 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
16808 | d | |
16809 | :bsnl | |
16810 | s/["\\]/\\&/g | |
16811 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16812 | D["\1"]=" \3\\\\\\n"\\/p | |
16813 | t cont | |
16814 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
16815 | t cont | |
16816 | d | |
16817 | :cont | |
16818 | n | |
16819 | s/.\{148\}/&'"$ac_delim"'/g | |
16820 | t clear | |
16821 | :clear | |
16822 | s/\\$// | |
16823 | t bsnlc | |
16824 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
16825 | d | |
16826 | :bsnlc | |
16827 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
16828 | b cont | |
16829 | ' <confdefs.h | sed ' | |
16830 | s/'"$ac_delim"'/"\\\ | |
16831 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
16832 | ||
16833 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16834 | for (key in D) D_is_set[key] = 1 | |
16835 | FS = "\a" | |
16836 | } | |
16837 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
16838 | line = \$ 0 | |
16839 | split(line, arg, " ") | |
16840 | if (arg[1] == "#") { | |
16841 | defundef = arg[2] | |
16842 | mac1 = arg[3] | |
16843 | } else { | |
16844 | defundef = substr(arg[1], 2) | |
16845 | mac1 = arg[2] | |
16846 | } | |
16847 | split(mac1, mac2, "(") #) | |
16848 | macro = mac2[1] | |
16849 | prefix = substr(line, 1, index(line, defundef) - 1) | |
16850 | if (D_is_set[macro]) { | |
16851 | # Preserve the white space surrounding the "#". | |
16852 | print prefix "define", macro P[macro] D[macro] | |
16853 | next | |
16854 | } else { | |
16855 | # Replace #undef with comments. This is necessary, for example, | |
16856 | # in the case of _POSIX_SOURCE, which is predefined and required | |
16857 | # on some systems where configure will not decide to define it. | |
16858 | if (defundef == "undef") { | |
16859 | print "/*", prefix defundef, macro, "*/" | |
16860 | next | |
16861 | } | |
16862 | } | |
b4e70030 | 16863 | } |
81ecdfbb RW |
16864 | { print } |
16865 | _ACAWK | |
b4e70030 | 16866 | _ACEOF |
81ecdfbb RW |
16867 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16868 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
16869 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 16870 | |
4e8d927d | 16871 | |
81ecdfbb RW |
16872 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
16873 | shift | |
16874 | for ac_tag | |
16875 | do | |
16876 | case $ac_tag in | |
16877 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
16878 | esac | |
16879 | case $ac_mode$ac_tag in | |
16880 | :[FHL]*:*);; | |
16881 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
16882 | :[FH]-) ac_tag=-:-;; | |
16883 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
16884 | esac | |
16885 | ac_save_IFS=$IFS | |
16886 | IFS=: | |
16887 | set x $ac_tag | |
16888 | IFS=$ac_save_IFS | |
16889 | shift | |
16890 | ac_file=$1 | |
16891 | shift | |
4e8d927d | 16892 | |
81ecdfbb RW |
16893 | case $ac_mode in |
16894 | :L) ac_source=$1;; | |
16895 | :[FH]) | |
16896 | ac_file_inputs= | |
16897 | for ac_f | |
16898 | do | |
16899 | case $ac_f in | |
16900 | -) ac_f="$tmp/stdin";; | |
16901 | *) # Look for the file first in the build tree, then in the source tree | |
16902 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
16903 | # because $ac_f cannot contain `:'. | |
16904 | test -f "$ac_f" || | |
16905 | case $ac_f in | |
16906 | [\\/$]*) false;; | |
16907 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
16908 | esac || | |
16909 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
16910 | esac | |
16911 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
16912 | as_fn_append ac_file_inputs " '$ac_f'" | |
16913 | done | |
16914 | ||
16915 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
16916 | # use $as_me), people would be surprised to read: | |
16917 | # /* config.h. Generated by config.status. */ | |
16918 | configure_input='Generated from '` | |
16919 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
16920 | `' by configure.' | |
16921 | if test x"$ac_file" != x-; then | |
16922 | configure_input="$ac_file. $configure_input" | |
16923 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
16924 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 16925 | fi |
81ecdfbb RW |
16926 | # Neutralize special characters interpreted by sed in replacement strings. |
16927 | case $configure_input in #( | |
16928 | *\&* | *\|* | *\\* ) | |
16929 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
16930 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
16931 | *) ac_sed_conf_input=$configure_input;; | |
16932 | esac | |
4e8d927d | 16933 | |
81ecdfbb RW |
16934 | case $ac_tag in |
16935 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
16936 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
16937 | esac | |
16938 | ;; | |
c906108c SS |
16939 | esac |
16940 | ||
81ecdfbb | 16941 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
16942 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
16943 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
16944 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16945 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
16946 | $as_echo X"$ac_file" | | |
16947 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16948 | s//\1/ | |
16949 | q | |
16950 | } | |
16951 | /^X\(\/\/\)[^/].*/{ | |
16952 | s//\1/ | |
16953 | q | |
16954 | } | |
16955 | /^X\(\/\/\)$/{ | |
16956 | s//\1/ | |
16957 | q | |
16958 | } | |
16959 | /^X\(\/\).*/{ | |
16960 | s//\1/ | |
16961 | q | |
16962 | } | |
16963 | s/.*/./; q'` | |
16964 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16965 | ac_builddir=. |
16966 | ||
81ecdfbb RW |
16967 | case "$ac_dir" in |
16968 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16969 | *) | |
16970 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16971 | # A ".." for each directory in $ac_dir_suffix. | |
16972 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16973 | case $ac_top_builddir_sub in | |
16974 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16975 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16976 | esac ;; | |
16977 | esac | |
16978 | ac_abs_top_builddir=$ac_pwd | |
16979 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16980 | # for backward compatibility: | |
16981 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16982 | |
16983 | case $srcdir in | |
81ecdfbb | 16984 | .) # We are building in place. |
bec39cab | 16985 | ac_srcdir=. |
81ecdfbb RW |
16986 | ac_top_srcdir=$ac_top_builddir_sub |
16987 | ac_abs_top_srcdir=$ac_pwd ;; | |
16988 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16989 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16990 | ac_top_srcdir=$srcdir |
16991 | ac_abs_top_srcdir=$srcdir ;; | |
16992 | *) # Relative name. | |
16993 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16994 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16995 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16996 | esac |
81ecdfbb | 16997 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 16998 | |
c906108c | 16999 | |
81ecdfbb RW |
17000 | case $ac_mode in |
17001 | :F) | |
17002 | # | |
17003 | # CONFIG_FILE | |
17004 | # | |
c906108c | 17005 | |
bec39cab AC |
17006 | case $INSTALL in |
17007 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 17008 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 17009 | esac |
81ecdfbb RW |
17010 | ac_MKDIR_P=$MKDIR_P |
17011 | case $MKDIR_P in | |
17012 | [\\/$]* | ?:[\\/]* ) ;; | |
17013 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
17014 | esac | |
17015 | _ACEOF | |
121ce6e5 | 17016 | |
81ecdfbb RW |
17017 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17018 | # If the template does not know about datarootdir, expand it. | |
17019 | # FIXME: This hack should be removed a few years after 2.60. | |
17020 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
17021 | ac_sed_dataroot=' | |
17022 | /datarootdir/ { | |
17023 | p | |
17024 | q | |
17025 | } | |
17026 | /@datadir@/p | |
17027 | /@docdir@/p | |
17028 | /@infodir@/p | |
17029 | /@localedir@/p | |
17030 | /@mandir@/p' | |
17031 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
17032 | *datarootdir*) ac_datarootdir_seen=yes;; | |
17033 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
17034 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
17035 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
17036 | _ACEOF | |
17037 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17038 | ac_datarootdir_hack=' | |
17039 | s&@datadir@&$datadir&g | |
17040 | s&@docdir@&$docdir&g | |
17041 | s&@infodir@&$infodir&g | |
17042 | s&@localedir@&$localedir&g | |
17043 | s&@mandir@&$mandir&g | |
17044 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
17045 | esac | |
4e8d927d | 17046 | _ACEOF |
81ecdfbb RW |
17047 | |
17048 | # Neutralize VPATH when `$srcdir' = `.'. | |
17049 | # Shell code in configure.ac might set extrasub. | |
17050 | # FIXME: do we really want to maintain this feature? | |
17051 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17052 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
17053 | $extrasub |
17054 | _ACEOF | |
81ecdfbb | 17055 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
17056 | :t |
17057 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
17058 | s|@configure_input@|$ac_sed_conf_input|;t t |
17059 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
17060 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
17061 | s&@srcdir@&$ac_srcdir&;t t | |
17062 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
17063 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
17064 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
17065 | s&@builddir@&$ac_builddir&;t t | |
17066 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
17067 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
17068 | s&@INSTALL@&$ac_INSTALL&;t t | |
17069 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
17070 | $ac_datarootdir_hack | |
17071 | " | |
17072 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
17073 | if $ac_cs_awk_getline; then | |
17074 | $AWK -f "$tmp/subs.awk" | |
17075 | else | |
17076 | $AWK -f "$tmp/subs.awk" | $SHELL | |
17077 | fi >$tmp/out \ | |
17078 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17079 | ||
17080 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
17081 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
17082 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
17083 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17084 | which seems to be undefined. Please make sure it is defined." >&5 | |
17085 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17086 | which seems to be undefined. Please make sure it is defined." >&2;} | |
17087 | ||
17088 | rm -f "$tmp/stdin" | |
bec39cab | 17089 | case $ac_file in |
81ecdfbb RW |
17090 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
17091 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
17092 | esac \ | |
17093 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17094 | ;; | |
17095 | :H) | |
17096 | # | |
17097 | # CONFIG_HEADER | |
17098 | # | |
bec39cab | 17099 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
17100 | { |
17101 | $as_echo "/* $configure_input */" \ | |
17102 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
17103 | } >"$tmp/config.h" \ | |
17104 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17105 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
17106 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
17107 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 17108 | else |
81ecdfbb RW |
17109 | rm -f "$ac_file" |
17110 | mv "$tmp/config.h" "$ac_file" \ | |
17111 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
17112 | fi |
17113 | else | |
81ecdfbb RW |
17114 | $as_echo "/* $configure_input */" \ |
17115 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
17116 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 17117 | fi |
81ecdfbb RW |
17118 | # Compute "$ac_file"'s index in $config_headers. |
17119 | _am_arg="$ac_file" | |
e28b3332 DJ |
17120 | _am_stamp_count=1 |
17121 | for _am_header in $config_headers :; do | |
17122 | case $_am_header in | |
81ecdfbb | 17123 | $_am_arg | $_am_arg:* ) |
e28b3332 DJ |
17124 | break ;; |
17125 | * ) | |
17126 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
17127 | esac | |
17128 | done | |
81ecdfbb RW |
17129 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || |
17130 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17131 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
17132 | X"$_am_arg" : 'X\(//\)$' \| \ | |
17133 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
17134 | $as_echo X"$_am_arg" | | |
17135 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17136 | s//\1/ | |
17137 | q | |
17138 | } | |
17139 | /^X\(\/\/\)[^/].*/{ | |
17140 | s//\1/ | |
17141 | q | |
17142 | } | |
17143 | /^X\(\/\/\)$/{ | |
17144 | s//\1/ | |
17145 | q | |
17146 | } | |
17147 | /^X\(\/\).*/{ | |
17148 | s//\1/ | |
17149 | q | |
17150 | } | |
17151 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
17152 | ;; | |
17153 | :L) | |
17154 | # | |
17155 | # CONFIG_LINK | |
17156 | # | |
c906108c | 17157 | |
81ecdfbb RW |
17158 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
17159 | : | |
b4e70030 | 17160 | else |
81ecdfbb RW |
17161 | # Prefer the file from the source tree if names are identical. |
17162 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
17163 | ac_source=$srcdir/$ac_source | |
17164 | fi | |
b4e70030 | 17165 | |
81ecdfbb RW |
17166 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
17167 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 17168 | |
81ecdfbb RW |
17169 | if test ! -r "$ac_source"; then |
17170 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
17171 | fi | |
17172 | rm -f "$ac_file" | |
bec39cab | 17173 | |
81ecdfbb RW |
17174 | # Try a relative symlink, then a hard link, then a copy. |
17175 | case $srcdir in | |
17176 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
17177 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
17178 | esac | |
17179 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
17180 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
17181 | cp -p "$ac_source" "$ac_file" || | |
17182 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
17183 | fi | |
17184 | ;; | |
17185 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
17186 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
17187 | ;; | |
c906108c | 17188 | esac |
b4e70030 | 17189 | |
bec39cab | 17190 | |
81ecdfbb RW |
17191 | case $ac_file$ac_mode in |
17192 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
17193 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
17194 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
17195 | # are listed without --file. Let's play safe and only enable the eval | |
17196 | # if we detect the quoting. | |
17197 | case $CONFIG_FILES in | |
17198 | *\'*) eval set x "$CONFIG_FILES" ;; | |
17199 | *) set x $CONFIG_FILES ;; | |
17200 | esac | |
17201 | shift | |
17202 | for mf | |
17203 | do | |
17204 | # Strip MF so we end up with the name of the file. | |
17205 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
17206 | # Check whether this is an Automake generated Makefile or not. | |
17207 | # We used to match only the files named `Makefile.in', but | |
17208 | # some people rename them; so instead we look at the file content. | |
17209 | # Grep'ing the first line is not enough: some people post-process | |
17210 | # each Makefile.in and add a new line on top of each file to say so. | |
17211 | # Grep'ing the whole file is not good either: AIX grep has a line | |
17212 | # limit of 2048, but all sed's we know have understand at least 4000. | |
17213 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
17214 | dirpart=`$as_dirname -- "$mf" || | |
e28b3332 DJ |
17215 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17216 | X"$mf" : 'X\(//\)[^/]' \| \ | |
17217 | X"$mf" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17218 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || |
17219 | $as_echo X"$mf" | | |
17220 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17221 | s//\1/ | |
17222 | q | |
17223 | } | |
17224 | /^X\(\/\/\)[^/].*/{ | |
17225 | s//\1/ | |
17226 | q | |
17227 | } | |
17228 | /^X\(\/\/\)$/{ | |
17229 | s//\1/ | |
17230 | q | |
17231 | } | |
17232 | /^X\(\/\).*/{ | |
17233 | s//\1/ | |
17234 | q | |
17235 | } | |
17236 | s/.*/./; q'` | |
17237 | else | |
17238 | continue | |
17239 | fi | |
17240 | # Extract the definition of DEPDIR, am__include, and am__quote | |
17241 | # from the Makefile without running `make'. | |
17242 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
17243 | test -z "$DEPDIR" && continue | |
17244 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
17245 | test -z "am__include" && continue | |
17246 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
17247 | # When using ansi2knr, U may be empty or an underscore; expand it | |
17248 | U=`sed -n 's/^U = //p' < "$mf"` | |
17249 | # Find all dependency output files, they are included files with | |
17250 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
17251 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
17252 | # expansion. | |
17253 | for file in `sed -n " | |
17254 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
17255 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
17256 | # Make sure the directory exists. | |
17257 | test -f "$dirpart/$file" && continue | |
17258 | fdir=`$as_dirname -- "$file" || | |
e28b3332 DJ |
17259 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17260 | X"$file" : 'X\(//\)[^/]' \| \ | |
17261 | X"$file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17262 | X"$file" : 'X\(/\)' \| . 2>/dev/null || |
17263 | $as_echo X"$file" | | |
17264 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17265 | s//\1/ | |
17266 | q | |
17267 | } | |
17268 | /^X\(\/\/\)[^/].*/{ | |
17269 | s//\1/ | |
17270 | q | |
17271 | } | |
17272 | /^X\(\/\/\)$/{ | |
17273 | s//\1/ | |
17274 | q | |
17275 | } | |
17276 | /^X\(\/\).*/{ | |
17277 | s//\1/ | |
17278 | q | |
17279 | } | |
17280 | s/.*/./; q'` | |
17281 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
17282 | # echo "creating $dirpart/$file" | |
17283 | echo '# dummy' > "$dirpart/$file" | |
e28b3332 | 17284 | done |
e28b3332 | 17285 | done |
81ecdfbb | 17286 | } |
4e8d927d | 17287 | ;; |
81ecdfbb | 17288 | "default":C) |
c906108c SS |
17289 | case x$CONFIG_HEADERS in |
17290 | xconfig.h:config.in) | |
17291 | echo > stamp-h ;; | |
17292 | esac | |
bec39cab | 17293 | ;; |
81ecdfbb | 17294 | |
bec39cab | 17295 | esac |
81ecdfbb | 17296 | done # for ac_tag |
c906108c | 17297 | |
bec39cab | 17298 | |
81ecdfbb | 17299 | as_fn_exit 0 |
bec39cab | 17300 | _ACEOF |
bec39cab AC |
17301 | ac_clean_files=$ac_clean_files_save |
17302 | ||
81ecdfbb RW |
17303 | test $ac_write_fail = 0 || |
17304 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
17305 | ||
bec39cab AC |
17306 | |
17307 | # configure is writing to config.log, and then calls config.status. | |
17308 | # config.status does its own redirection, appending to config.log. | |
17309 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17310 | # by configure, so config.status won't be able to write to it; its | |
17311 | # output is simply discarded. So we exec the FD to /dev/null, | |
17312 | # effectively closing config.log, so it can be properly (re)opened and | |
17313 | # appended to by config.status. When coming back to configure, we | |
17314 | # need to make the FD available again. | |
17315 | if test "$no_create" != yes; then | |
17316 | ac_cs_success=: | |
17317 | ac_config_status_args= | |
17318 | test "$silent" = yes && | |
17319 | ac_config_status_args="$ac_config_status_args --quiet" | |
17320 | exec 5>/dev/null | |
17321 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17322 | exec 5>>config.log | |
17323 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17324 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 17325 | $ac_cs_success || as_fn_exit $? |
bec39cab | 17326 | fi |
c906108c | 17327 | |
bec39cab | 17328 | # |
81ecdfbb | 17329 | # CONFIG_SUBDIRS section. |
bec39cab | 17330 | # |
c906108c SS |
17331 | if test "$no_recursion" != yes; then |
17332 | ||
81ecdfbb RW |
17333 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
17334 | # so they do not pile up. | |
c906108c SS |
17335 | ac_sub_configure_args= |
17336 | ac_prev= | |
fdc59709 PB |
17337 | eval "set x $ac_configure_args" |
17338 | shift | |
17339 | for ac_arg | |
17340 | do | |
c906108c SS |
17341 | if test -n "$ac_prev"; then |
17342 | ac_prev= | |
17343 | continue | |
17344 | fi | |
bec39cab | 17345 | case $ac_arg in |
c906108c SS |
17346 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
17347 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
17348 | ac_prev=cache_file ;; | |
17349 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
17350 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
17351 | | --c=*) | |
17352 | ;; | |
17353 | --config-cache | -C) | |
c906108c SS |
17354 | ;; |
17355 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
17356 | ac_prev=srcdir ;; | |
17357 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
17358 | ;; | |
bec39cab AC |
17359 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
17360 | ac_prev=prefix ;; | |
17361 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
17362 | ;; | |
81ecdfbb RW |
17363 | --disable-option-checking) |
17364 | ;; | |
fdc59709 PB |
17365 | *) |
17366 | case $ac_arg in | |
81ecdfbb | 17367 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17368 | esac |
81ecdfbb | 17369 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
17370 | esac |
17371 | done | |
17372 | ||
bec39cab AC |
17373 | # Always prepend --prefix to ensure using the same prefix |
17374 | # in subdir configurations. | |
fdc59709 PB |
17375 | ac_arg="--prefix=$prefix" |
17376 | case $ac_arg in | |
81ecdfbb | 17377 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17378 | esac |
81ecdfbb RW |
17379 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
17380 | ||
17381 | # Pass --silent | |
17382 | if test "$silent" = yes; then | |
17383 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
17384 | fi | |
17385 | ||
17386 | # Always prepend --disable-option-checking to silence warnings, since | |
17387 | # different subdirs can have different --enable and --with options. | |
17388 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 17389 | |
b4e70030 | 17390 | ac_popdir=`pwd` |
bec39cab | 17391 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
17392 | |
17393 | # Do not complain, so a configure script can configure whichever | |
17394 | # parts of a large source tree are present. | |
fdc59709 | 17395 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 17396 | |
81ecdfbb RW |
17397 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
17398 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
17399 | $as_echo "$ac_msg" >&6 | |
17400 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17401 | ac_builddir=. |
17402 | ||
81ecdfbb RW |
17403 | case "$ac_dir" in |
17404 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17405 | *) | |
17406 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17407 | # A ".." for each directory in $ac_dir_suffix. | |
17408 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17409 | case $ac_top_builddir_sub in | |
17410 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17411 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17412 | esac ;; | |
17413 | esac | |
17414 | ac_abs_top_builddir=$ac_pwd | |
17415 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17416 | # for backward compatibility: | |
17417 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17418 | |
17419 | case $srcdir in | |
81ecdfbb | 17420 | .) # We are building in place. |
bec39cab | 17421 | ac_srcdir=. |
81ecdfbb RW |
17422 | ac_top_srcdir=$ac_top_builddir_sub |
17423 | ac_abs_top_srcdir=$ac_pwd ;; | |
17424 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17425 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17426 | ac_top_srcdir=$srcdir |
17427 | ac_abs_top_srcdir=$srcdir ;; | |
17428 | *) # Relative name. | |
17429 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17430 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17431 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17432 | esac |
81ecdfbb | 17433 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 17434 | |
c906108c | 17435 | |
fdc59709 | 17436 | cd "$ac_dir" |
c906108c SS |
17437 | |
17438 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
17439 | if test -f "$ac_srcdir/configure.gnu"; then |
17440 | ac_sub_configure=$ac_srcdir/configure.gnu | |
17441 | elif test -f "$ac_srcdir/configure"; then | |
17442 | ac_sub_configure=$ac_srcdir/configure | |
17443 | elif test -f "$ac_srcdir/configure.in"; then | |
17444 | # This should be Cygnus configure. | |
17445 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 17446 | else |
81ecdfbb RW |
17447 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
17448 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
17449 | ac_sub_configure= |
17450 | fi | |
17451 | ||
17452 | # The recursion is here. | |
17453 | if test -n "$ac_sub_configure"; then | |
c906108c | 17454 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
17455 | case $cache_file in |
17456 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
17457 | *) # Relative name. |
17458 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 17459 | esac |
c906108c | 17460 | |
81ecdfbb RW |
17461 | { $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 |
17462 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 17463 | # The eval makes quoting arguments work. |
fdc59709 PB |
17464 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
17465 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 17466 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
17467 | fi |
17468 | ||
fdc59709 | 17469 | cd "$ac_popdir" |
c906108c SS |
17470 | done |
17471 | fi | |
81ecdfbb RW |
17472 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
17473 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
17474 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
17475 | fi | |
c906108c SS |
17476 | |
17477 | ||
17478 | exit 0 |