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 | |
d57a3c85 | 1661 | --with-python include python support (auto/yes/no/<path>) |
a1220294 TT |
1662 | --without-included-regex |
1663 | don't use included regex; this is the default on | |
1664 | systems with version 2 of the GNU C library (use | |
1665 | with caution on other system) | |
81ecdfbb | 1666 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1667 | --with-system-gdbinit=PATH |
32c1c914 | 1668 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1669 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1670 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1671 | --with-x use the X Window System |
bec39cab AC |
1672 | |
1673 | Some influential environment variables: | |
1674 | CC C compiler command | |
1675 | CFLAGS C compiler flags | |
1676 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1677 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1678 | LIBS libraries to pass to the linker, e.g. -l<library> |
1679 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1680 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1681 | CPP C preprocessor |
81ecdfbb RW |
1682 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1683 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1684 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1685 | This script will default YFLAGS to the empty string to avoid a | |
1686 | default value of `-d' given by some make applications. | |
1687 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1688 | |
1689 | Use these variables to override the choices made by `configure' or to help | |
1690 | it to find libraries and programs with nonstandard names/locations. | |
1691 | ||
81ecdfbb | 1692 | Report bugs to the package provider. |
bec39cab | 1693 | _ACEOF |
81ecdfbb | 1694 | ac_status=$? |
bec39cab AC |
1695 | fi |
1696 | ||
1697 | if test "$ac_init_help" = "recursive"; then | |
1698 | # If there are subdirs, report their specific --help. | |
bec39cab | 1699 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1700 | test -d "$ac_dir" || |
1701 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1702 | continue | |
bec39cab AC |
1703 | ac_builddir=. |
1704 | ||
81ecdfbb RW |
1705 | case "$ac_dir" in |
1706 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1707 | *) | |
1708 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1709 | # A ".." for each directory in $ac_dir_suffix. | |
1710 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1711 | case $ac_top_builddir_sub in | |
1712 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1713 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1714 | esac ;; | |
1715 | esac | |
1716 | ac_abs_top_builddir=$ac_pwd | |
1717 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1718 | # for backward compatibility: | |
1719 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1720 | |
1721 | case $srcdir in | |
81ecdfbb | 1722 | .) # We are building in place. |
bec39cab | 1723 | ac_srcdir=. |
81ecdfbb RW |
1724 | ac_top_srcdir=$ac_top_builddir_sub |
1725 | ac_abs_top_srcdir=$ac_pwd ;; | |
1726 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1727 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1728 | ac_top_srcdir=$srcdir |
1729 | ac_abs_top_srcdir=$srcdir ;; | |
1730 | *) # Relative name. | |
1731 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1732 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1733 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1734 | esac |
81ecdfbb | 1735 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1736 | |
81ecdfbb RW |
1737 | cd "$ac_dir" || { ac_status=$?; continue; } |
1738 | # Check for guested configure. | |
1739 | if test -f "$ac_srcdir/configure.gnu"; then | |
1740 | echo && | |
1741 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1742 | elif test -f "$ac_srcdir/configure"; then | |
1743 | echo && | |
1744 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1745 | else |
81ecdfbb RW |
1746 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1747 | fi || ac_status=$? | |
1748 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1749 | done |
1750 | fi | |
1751 | ||
81ecdfbb | 1752 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1753 | if $ac_init_version; then |
1754 | cat <<\_ACEOF | |
81ecdfbb RW |
1755 | configure |
1756 | generated by GNU Autoconf 2.64 | |
bec39cab | 1757 | |
81ecdfbb | 1758 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1759 | This configure script is free software; the Free Software Foundation |
1760 | gives unlimited permission to copy, distribute and modify it. | |
1761 | _ACEOF | |
81ecdfbb | 1762 | exit |
bec39cab | 1763 | fi |
bec39cab | 1764 | |
81ecdfbb RW |
1765 | ## ------------------------ ## |
1766 | ## Autoconf initialization. ## | |
1767 | ## ------------------------ ## | |
bec39cab | 1768 | |
81ecdfbb RW |
1769 | # ac_fn_c_try_compile LINENO |
1770 | # -------------------------- | |
1771 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1772 | ac_fn_c_try_compile () | |
1773 | { | |
1774 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1775 | rm -f conftest.$ac_objext | |
1776 | if { { ac_try="$ac_compile" | |
1777 | case "(($ac_try" in | |
1778 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1779 | *) ac_try_echo=$ac_try;; | |
1780 | esac | |
1781 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1782 | $as_echo "$ac_try_echo"; } >&5 | |
1783 | (eval "$ac_compile") 2>conftest.err | |
1784 | ac_status=$? | |
1785 | if test -s conftest.err; then | |
1786 | grep -v '^ *+' conftest.err >conftest.er1 | |
1787 | cat conftest.er1 >&5 | |
1788 | mv -f conftest.er1 conftest.err | |
1789 | fi | |
1790 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1791 | test $ac_status = 0; } && { | |
1792 | test -z "$ac_c_werror_flag" || | |
1793 | test ! -s conftest.err | |
1794 | } && test -s conftest.$ac_objext; then : | |
1795 | ac_retval=0 | |
1796 | else | |
1797 | $as_echo "$as_me: failed program was:" >&5 | |
1798 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1799 | |
81ecdfbb RW |
1800 | ac_retval=1 |
1801 | fi | |
1802 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1803 | return $ac_retval | |
1804 | ||
1805 | } # ac_fn_c_try_compile | |
1806 | ||
1807 | # ac_fn_c_try_cpp LINENO | |
1808 | # ---------------------- | |
1809 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1810 | ac_fn_c_try_cpp () | |
bec39cab | 1811 | { |
81ecdfbb RW |
1812 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1813 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1814 | case "(($ac_try" in | |
1815 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1816 | *) ac_try_echo=$ac_try;; | |
1817 | esac | |
1818 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1819 | $as_echo "$ac_try_echo"; } >&5 | |
1820 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1821 | ac_status=$? | |
1822 | if test -s conftest.err; then | |
1823 | grep -v '^ *+' conftest.err >conftest.er1 | |
1824 | cat conftest.er1 >&5 | |
1825 | mv -f conftest.er1 conftest.err | |
1826 | fi | |
1827 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1828 | test $ac_status = 0; } >/dev/null && { | |
1829 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1830 | test ! -s conftest.err | |
1831 | }; then : | |
1832 | ac_retval=0 | |
1833 | else | |
1834 | $as_echo "$as_me: failed program was:" >&5 | |
1835 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1836 | |
81ecdfbb RW |
1837 | ac_retval=1 |
1838 | fi | |
1839 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1840 | return $ac_retval | |
bec39cab | 1841 | |
81ecdfbb | 1842 | } # ac_fn_c_try_cpp |
bec39cab | 1843 | |
81ecdfbb RW |
1844 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1845 | # ------------------------------------------------------- | |
1846 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1847 | # the include files in INCLUDES and setting the cache variable VAR | |
1848 | # accordingly. | |
1849 | ac_fn_c_check_header_mongrel () | |
1850 | { | |
1851 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1852 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1853 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1854 | $as_echo_n "checking for $2... " >&6; } | |
1855 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1856 | $as_echo_n "(cached) " >&6 | |
1857 | fi | |
1858 | eval ac_res=\$$3 | |
1859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1860 | $as_echo "$ac_res" >&6; } | |
1861 | else | |
1862 | # Is the header compilable? | |
1863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1864 | $as_echo_n "checking $2 usability... " >&6; } | |
1865 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1866 | /* end confdefs.h. */ | |
1867 | $4 | |
1868 | #include <$2> | |
1869 | _ACEOF | |
1870 | if ac_fn_c_try_compile "$LINENO"; then : | |
1871 | ac_header_compiler=yes | |
1872 | else | |
1873 | ac_header_compiler=no | |
1874 | fi | |
1875 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1877 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1878 | |
81ecdfbb RW |
1879 | # Is the header present? |
1880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1881 | $as_echo_n "checking $2 presence... " >&6; } | |
1882 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1883 | /* end confdefs.h. */ | |
1884 | #include <$2> | |
1885 | _ACEOF | |
1886 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1887 | ac_header_preproc=yes | |
1888 | else | |
1889 | ac_header_preproc=no | |
1890 | fi | |
1891 | rm -f conftest.err conftest.$ac_ext | |
1892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1893 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1894 | |
81ecdfbb RW |
1895 | # So? What about this header? |
1896 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1897 | yes:no: ) | |
1898 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1899 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1900 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1901 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1902 | ;; | |
1903 | no:yes:* ) | |
1904 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1905 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1906 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1907 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1908 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1909 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1910 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1911 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1912 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1913 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1914 | ;; | |
1915 | esac | |
1916 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1917 | $as_echo_n "checking for $2... " >&6; } | |
1918 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1919 | $as_echo_n "(cached) " >&6 | |
1920 | else | |
1921 | eval "$3=\$ac_header_compiler" | |
1922 | fi | |
1923 | eval ac_res=\$$3 | |
1924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1925 | $as_echo "$ac_res" >&6; } | |
1926 | fi | |
1927 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1928 | |
81ecdfbb | 1929 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1930 | |
81ecdfbb RW |
1931 | # ac_fn_c_try_run LINENO |
1932 | # ---------------------- | |
1933 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1934 | # that executables *can* be run. | |
1935 | ac_fn_c_try_run () | |
1936 | { | |
1937 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1938 | if { { ac_try="$ac_link" | |
1939 | case "(($ac_try" in | |
1940 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1941 | *) ac_try_echo=$ac_try;; | |
1942 | esac | |
1943 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1944 | $as_echo "$ac_try_echo"; } >&5 | |
1945 | (eval "$ac_link") 2>&5 | |
1946 | ac_status=$? | |
1947 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1948 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1949 | { { case "(($ac_try" in | |
1950 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1951 | *) ac_try_echo=$ac_try;; | |
1952 | esac | |
1953 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1954 | $as_echo "$ac_try_echo"; } >&5 | |
1955 | (eval "$ac_try") 2>&5 | |
1956 | ac_status=$? | |
1957 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1958 | test $ac_status = 0; }; }; then : | |
1959 | ac_retval=0 | |
1960 | else | |
1961 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1962 | $as_echo "$as_me: failed program was:" >&5 | |
1963 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1964 | |
81ecdfbb RW |
1965 | ac_retval=$ac_status |
1966 | fi | |
1967 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1968 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1969 | return $ac_retval | |
bec39cab | 1970 | |
81ecdfbb | 1971 | } # ac_fn_c_try_run |
bec39cab | 1972 | |
81ecdfbb RW |
1973 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1974 | # ------------------------------------------------------- | |
1975 | # Tests whether HEADER exists and can be compiled using the include files in | |
1976 | # INCLUDES, setting the cache variable VAR accordingly. | |
1977 | ac_fn_c_check_header_compile () | |
1978 | { | |
1979 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1981 | $as_echo_n "checking for $2... " >&6; } | |
1982 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1983 | $as_echo_n "(cached) " >&6 | |
1984 | else | |
1985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1986 | /* end confdefs.h. */ | |
1987 | $4 | |
1988 | #include <$2> | |
bec39cab | 1989 | _ACEOF |
81ecdfbb RW |
1990 | if ac_fn_c_try_compile "$LINENO"; then : |
1991 | eval "$3=yes" | |
1992 | else | |
1993 | eval "$3=no" | |
1994 | fi | |
1995 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1996 | fi | |
1997 | eval ac_res=\$$3 | |
1998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1999 | $as_echo "$ac_res" >&6; } | |
2000 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2001 | |
81ecdfbb | 2002 | } # ac_fn_c_check_header_compile |
bec39cab | 2003 | |
81ecdfbb RW |
2004 | # ac_fn_c_try_link LINENO |
2005 | # ----------------------- | |
2006 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2007 | ac_fn_c_try_link () | |
b4e70030 | 2008 | { |
81ecdfbb RW |
2009 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
2010 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2011 | if { { ac_try="$ac_link" | |
2012 | case "(($ac_try" in | |
2013 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2014 | *) ac_try_echo=$ac_try;; | |
2015 | esac | |
2016 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2017 | $as_echo "$ac_try_echo"; } >&5 | |
2018 | (eval "$ac_link") 2>conftest.err | |
2019 | ac_status=$? | |
2020 | if test -s conftest.err; then | |
2021 | grep -v '^ *+' conftest.err >conftest.er1 | |
2022 | cat conftest.er1 >&5 | |
2023 | mv -f conftest.er1 conftest.err | |
2024 | fi | |
2025 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2026 | test $ac_status = 0; } && { | |
2027 | test -z "$ac_c_werror_flag" || | |
2028 | test ! -s conftest.err | |
2029 | } && test -s conftest$ac_exeext && { | |
2030 | test "$cross_compiling" = yes || | |
2031 | $as_test_x conftest$ac_exeext | |
2032 | }; then : | |
2033 | ac_retval=0 | |
2034 | else | |
2035 | $as_echo "$as_me: failed program was:" >&5 | |
2036 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2037 | |
81ecdfbb RW |
2038 | ac_retval=1 |
2039 | fi | |
2040 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2041 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2042 | # interfere with the next link command; also delete a directory that is | |
2043 | # left behind by Apple's compiler. We do this before executing the actions. | |
2044 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2045 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2046 | return $ac_retval | |
bec39cab | 2047 | |
81ecdfbb | 2048 | } # ac_fn_c_try_link |
bec39cab | 2049 | |
81ecdfbb RW |
2050 | # ac_fn_c_check_func LINENO FUNC VAR |
2051 | # ---------------------------------- | |
2052 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2053 | ac_fn_c_check_func () | |
2054 | { | |
2055 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2057 | $as_echo_n "checking for $2... " >&6; } | |
2058 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2059 | $as_echo_n "(cached) " >&6 | |
2060 | else | |
2061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2062 | /* end confdefs.h. */ | |
2063 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2064 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2065 | #define $2 innocuous_$2 | |
bec39cab | 2066 | |
81ecdfbb RW |
2067 | /* System header to define __stub macros and hopefully few prototypes, |
2068 | which can conflict with char $2 (); below. | |
2069 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2070 | <limits.h> exists even on freestanding compilers. */ | |
bec39cab | 2071 | |
81ecdfbb RW |
2072 | #ifdef __STDC__ |
2073 | # include <limits.h> | |
2074 | #else | |
2075 | # include <assert.h> | |
2076 | #endif | |
bec39cab | 2077 | |
81ecdfbb | 2078 | #undef $2 |
bec39cab | 2079 | |
81ecdfbb RW |
2080 | /* Override any GCC internal prototype to avoid an error. |
2081 | Use char because int might match the return type of a GCC | |
2082 | builtin and then its argument prototype would still apply. */ | |
2083 | #ifdef __cplusplus | |
2084 | extern "C" | |
2085 | #endif | |
2086 | char $2 (); | |
2087 | /* The GNU C library defines this for functions which it implements | |
2088 | to always fail with ENOSYS. Some functions are actually named | |
2089 | something starting with __ and the normal name is an alias. */ | |
2090 | #if defined __stub_$2 || defined __stub___$2 | |
2091 | choke me | |
2092 | #endif | |
bec39cab | 2093 | |
81ecdfbb RW |
2094 | int |
2095 | main () | |
2096 | { | |
2097 | return $2 (); | |
2098 | ; | |
2099 | return 0; | |
2100 | } | |
bec39cab | 2101 | _ACEOF |
81ecdfbb RW |
2102 | if ac_fn_c_try_link "$LINENO"; then : |
2103 | eval "$3=yes" | |
2104 | else | |
2105 | eval "$3=no" | |
2106 | fi | |
2107 | rm -f core conftest.err conftest.$ac_objext \ | |
2108 | conftest$ac_exeext conftest.$ac_ext | |
2109 | fi | |
2110 | eval ac_res=\$$3 | |
2111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2112 | $as_echo "$ac_res" >&6; } | |
2113 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2114 | |
81ecdfbb | 2115 | } # ac_fn_c_check_func |
bec39cab | 2116 | |
81ecdfbb RW |
2117 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2118 | # ------------------------------------ | |
2119 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2120 | ac_fn_c_check_decl () | |
2121 | { | |
2122 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 | |
2124 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2125 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2126 | $as_echo_n "(cached) " >&6 | |
2127 | else | |
2128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2129 | /* end confdefs.h. */ | |
2130 | $4 | |
2131 | int | |
2132 | main () | |
2133 | { | |
2134 | #ifndef $2 | |
2135 | (void) $2; | |
2136 | #endif | |
bec39cab | 2137 | |
81ecdfbb RW |
2138 | ; |
2139 | return 0; | |
2140 | } | |
bec39cab | 2141 | _ACEOF |
81ecdfbb RW |
2142 | if ac_fn_c_try_compile "$LINENO"; then : |
2143 | eval "$3=yes" | |
2144 | else | |
2145 | eval "$3=no" | |
2146 | fi | |
2147 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2148 | fi | |
2149 | eval ac_res=\$$3 | |
2150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2151 | $as_echo "$ac_res" >&6; } | |
2152 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2153 | |
81ecdfbb | 2154 | } # ac_fn_c_check_decl |
bec39cab | 2155 | |
81ecdfbb RW |
2156 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2157 | # -------------------------------------------- | |
2158 | # Tries to find the compile-time value of EXPR in a program that includes | |
2159 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2160 | # computed | |
2161 | ac_fn_c_compute_int () | |
2162 | { | |
2163 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2164 | if test "$cross_compiling" = yes; then | |
2165 | # Depending upon the size, compute the lo and hi bounds. | |
2166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2167 | /* end confdefs.h. */ | |
2168 | $4 | |
2169 | int | |
2170 | main () | |
2171 | { | |
2172 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2173 | test_array [0] = 0 | |
bec39cab | 2174 | |
81ecdfbb RW |
2175 | ; |
2176 | return 0; | |
2177 | } | |
2178 | _ACEOF | |
2179 | if ac_fn_c_try_compile "$LINENO"; then : | |
2180 | ac_lo=0 ac_mid=0 | |
2181 | while :; do | |
2182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2183 | /* end confdefs.h. */ | |
2184 | $4 | |
2185 | int | |
2186 | main () | |
2187 | { | |
2188 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2189 | test_array [0] = 0 | |
bec39cab | 2190 | |
81ecdfbb RW |
2191 | ; |
2192 | return 0; | |
2193 | } | |
2194 | _ACEOF | |
2195 | if ac_fn_c_try_compile "$LINENO"; then : | |
2196 | ac_hi=$ac_mid; break | |
2197 | else | |
2198 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2199 | if test $ac_lo -le $ac_mid; then | |
2200 | ac_lo= ac_hi= | |
2201 | break | |
2202 | fi | |
2203 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2204 | fi |
81ecdfbb RW |
2205 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2206 | done | |
c906108c | 2207 | else |
81ecdfbb RW |
2208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2209 | /* end confdefs.h. */ | |
2210 | $4 | |
2211 | int | |
2212 | main () | |
2213 | { | |
2214 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2215 | test_array [0] = 0 | |
bec39cab | 2216 | |
81ecdfbb RW |
2217 | ; |
2218 | return 0; | |
2219 | } | |
2220 | _ACEOF | |
2221 | if ac_fn_c_try_compile "$LINENO"; then : | |
2222 | ac_hi=-1 ac_mid=-1 | |
2223 | while :; do | |
2224 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2225 | /* end confdefs.h. */ | |
2226 | $4 | |
2227 | int | |
2228 | main () | |
2229 | { | |
2230 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2231 | test_array [0] = 0 | |
bec39cab | 2232 | |
81ecdfbb RW |
2233 | ; |
2234 | return 0; | |
2235 | } | |
2236 | _ACEOF | |
2237 | if ac_fn_c_try_compile "$LINENO"; then : | |
2238 | ac_lo=$ac_mid; break | |
2239 | else | |
2240 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2241 | if test $ac_mid -le $ac_hi; then | |
2242 | ac_lo= ac_hi= | |
2243 | break | |
2244 | fi | |
2245 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2246 | fi | |
2247 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2248 | done | |
2249 | else | |
2250 | ac_lo= ac_hi= | |
2251 | fi | |
2252 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2253 | fi | |
2254 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2255 | # Binary search between lo and hi bounds. | |
2256 | while test "x$ac_lo" != "x$ac_hi"; do | |
2257 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2259 | /* end confdefs.h. */ | |
2260 | $4 | |
2261 | int | |
2262 | main () | |
2263 | { | |
2264 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2265 | test_array [0] = 0 | |
bec39cab | 2266 | |
81ecdfbb RW |
2267 | ; |
2268 | return 0; | |
2269 | } | |
2270 | _ACEOF | |
2271 | if ac_fn_c_try_compile "$LINENO"; then : | |
2272 | ac_hi=$ac_mid | |
2273 | else | |
2274 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2275 | fi | |
2276 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2277 | done | |
2278 | case $ac_lo in #(( | |
2279 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2280 | '') ac_retval=1 ;; | |
2281 | esac | |
2282 | else | |
2283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2284 | /* end confdefs.h. */ | |
2285 | $4 | |
2286 | static long int longval () { return $2; } | |
2287 | static unsigned long int ulongval () { return $2; } | |
2288 | #include <stdio.h> | |
2289 | #include <stdlib.h> | |
2290 | int | |
2291 | main () | |
2292 | { | |
bec39cab | 2293 | |
81ecdfbb RW |
2294 | FILE *f = fopen ("conftest.val", "w"); |
2295 | if (! f) | |
2296 | return 1; | |
2297 | if (($2) < 0) | |
2298 | { | |
2299 | long int i = longval (); | |
2300 | if (i != ($2)) | |
2301 | return 1; | |
2302 | fprintf (f, "%ld", i); | |
2303 | } | |
2304 | else | |
2305 | { | |
2306 | unsigned long int i = ulongval (); | |
2307 | if (i != ($2)) | |
2308 | return 1; | |
2309 | fprintf (f, "%lu", i); | |
2310 | } | |
2311 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2312 | on some platforms. */ | |
2313 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2314 | |
81ecdfbb RW |
2315 | ; |
2316 | return 0; | |
2317 | } | |
2318 | _ACEOF | |
2319 | if ac_fn_c_try_run "$LINENO"; then : | |
2320 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2321 | else | |
2322 | ac_retval=1 | |
2323 | fi | |
2324 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2325 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2326 | rm -f conftest.val | |
bec39cab | 2327 | |
81ecdfbb RW |
2328 | fi |
2329 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2330 | return $ac_retval | |
bec39cab | 2331 | |
81ecdfbb | 2332 | } # ac_fn_c_compute_int |
bec39cab | 2333 | |
81ecdfbb RW |
2334 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2335 | # ---------------------------------------------------- | |
2336 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2337 | # INCLUDES, setting cache variable VAR accordingly. | |
2338 | ac_fn_c_check_member () | |
2339 | { | |
2340 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2342 | $as_echo_n "checking for $2.$3... " >&6; } | |
2343 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2344 | $as_echo_n "(cached) " >&6 | |
2345 | else | |
2346 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2347 | /* end confdefs.h. */ | |
2348 | $5 | |
2349 | int | |
2350 | main () | |
2351 | { | |
2352 | static $2 ac_aggr; | |
2353 | if (ac_aggr.$3) | |
2354 | return 0; | |
2355 | ; | |
2356 | return 0; | |
2357 | } | |
2358 | _ACEOF | |
2359 | if ac_fn_c_try_compile "$LINENO"; then : | |
2360 | eval "$4=yes" | |
2361 | else | |
2362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2363 | /* end confdefs.h. */ | |
2364 | $5 | |
2365 | int | |
2366 | main () | |
2367 | { | |
2368 | static $2 ac_aggr; | |
2369 | if (sizeof ac_aggr.$3) | |
2370 | return 0; | |
2371 | ; | |
2372 | return 0; | |
2373 | } | |
2374 | _ACEOF | |
2375 | if ac_fn_c_try_compile "$LINENO"; then : | |
2376 | eval "$4=yes" | |
2377 | else | |
2378 | eval "$4=no" | |
2379 | fi | |
2380 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2381 | fi | |
2382 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2383 | fi | |
2384 | eval ac_res=\$$4 | |
2385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2386 | $as_echo "$ac_res" >&6; } | |
2387 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2388 | |
81ecdfbb | 2389 | } # ac_fn_c_check_member |
bec39cab | 2390 | |
81ecdfbb RW |
2391 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2392 | # ------------------------------------------- | |
2393 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2394 | # variable VAR accordingly. | |
2395 | ac_fn_c_check_type () | |
2396 | { | |
2397 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2399 | $as_echo_n "checking for $2... " >&6; } | |
2400 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2401 | $as_echo_n "(cached) " >&6 | |
2402 | else | |
2403 | eval "$3=no" | |
2404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2405 | /* end confdefs.h. */ | |
2406 | $4 | |
2407 | int | |
2408 | main () | |
2409 | { | |
2410 | if (sizeof ($2)) | |
2411 | return 0; | |
2412 | ; | |
2413 | return 0; | |
2414 | } | |
2415 | _ACEOF | |
2416 | if ac_fn_c_try_compile "$LINENO"; then : | |
2417 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2418 | /* end confdefs.h. */ | |
2419 | $4 | |
2420 | int | |
2421 | main () | |
2422 | { | |
2423 | if (sizeof (($2))) | |
2424 | return 0; | |
2425 | ; | |
2426 | return 0; | |
2427 | } | |
2428 | _ACEOF | |
2429 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2430 | |
81ecdfbb RW |
2431 | else |
2432 | eval "$3=yes" | |
2433 | fi | |
2434 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2435 | fi | |
2436 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2437 | fi | |
2438 | eval ac_res=\$$3 | |
2439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2440 | $as_echo "$ac_res" >&6; } | |
2441 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2442 | |
81ecdfbb RW |
2443 | } # ac_fn_c_check_type |
2444 | cat >config.log <<_ACEOF | |
2445 | This file contains any messages produced by compilers while | |
2446 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2447 | |
81ecdfbb RW |
2448 | It was created by $as_me, which was |
2449 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2450 | |
81ecdfbb | 2451 | $ $0 $@ |
413ccac7 | 2452 | |
81ecdfbb RW |
2453 | _ACEOF |
2454 | exec 5>>config.log | |
2455 | { | |
2456 | cat <<_ASUNAME | |
2457 | ## --------- ## | |
2458 | ## Platform. ## | |
2459 | ## --------- ## | |
413ccac7 | 2460 | |
81ecdfbb RW |
2461 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2462 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2463 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2464 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2465 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2466 | |
81ecdfbb RW |
2467 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2468 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2469 | |
81ecdfbb RW |
2470 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2471 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2472 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2473 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2474 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2475 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2476 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2477 | |
81ecdfbb | 2478 | _ASUNAME |
bec39cab | 2479 | |
bec39cab AC |
2480 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2481 | for as_dir in $PATH | |
2482 | do | |
2483 | IFS=$as_save_IFS | |
2484 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2485 | $as_echo "PATH: $as_dir" |
2486 | done | |
2487 | IFS=$as_save_IFS | |
bec39cab | 2488 | |
81ecdfbb | 2489 | } >&5 |
bec39cab | 2490 | |
81ecdfbb | 2491 | cat >&5 <<_ACEOF |
bec39cab | 2492 | |
bec39cab | 2493 | |
81ecdfbb RW |
2494 | ## ----------- ## |
2495 | ## Core tests. ## | |
2496 | ## ----------- ## | |
2497 | ||
2498 | _ACEOF | |
2499 | ||
2500 | ||
2501 | # Keep a trace of the command line. | |
2502 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2503 | # Strip out --silent because we don't want to record it for future runs. | |
2504 | # Also quote any args containing shell meta-characters. | |
2505 | # Make two passes to allow for proper duplicate-argument suppression. | |
2506 | ac_configure_args= | |
2507 | ac_configure_args0= | |
2508 | ac_configure_args1= | |
2509 | ac_must_keep_next=false | |
2510 | for ac_pass in 1 2 | |
2511 | do | |
2512 | for ac_arg | |
2513 | do | |
2514 | case $ac_arg in | |
2515 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2516 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2517 | | -silent | --silent | --silen | --sile | --sil) | |
2518 | continue ;; | |
2519 | *\'*) | |
2520 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2521 | esac | |
2522 | case $ac_pass in | |
2523 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2524 | 2) | |
2525 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2526 | if test $ac_must_keep_next = true; then | |
2527 | ac_must_keep_next=false # Got value, back to normal. | |
2528 | else | |
2529 | case $ac_arg in | |
2530 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2531 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2532 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2533 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2534 | case "$ac_configure_args0 " in | |
2535 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2536 | esac | |
2537 | ;; | |
2538 | -* ) ac_must_keep_next=true ;; | |
2539 | esac | |
2540 | fi | |
2541 | as_fn_append ac_configure_args " '$ac_arg'" | |
2542 | ;; | |
2543 | esac | |
2544 | done | |
2545 | done | |
2546 | { ac_configure_args0=; unset ac_configure_args0;} | |
2547 | { ac_configure_args1=; unset ac_configure_args1;} | |
2548 | ||
2549 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2550 | # config.log. We remove comments because anyway the quotes in there | |
2551 | # would cause problems or look ugly. | |
2552 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2553 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2554 | trap 'exit_status=$? | |
2555 | # Save into config.log some information that might help in debugging. | |
2556 | { | |
2557 | echo | |
2558 | ||
2559 | cat <<\_ASBOX | |
2560 | ## ---------------- ## | |
2561 | ## Cache variables. ## | |
2562 | ## ---------------- ## | |
2563 | _ASBOX | |
2564 | echo | |
2565 | # The following way of writing the cache mishandles newlines in values, | |
2566 | ( | |
2567 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2568 | eval ac_val=\$$ac_var | |
2569 | case $ac_val in #( | |
2570 | *${as_nl}*) | |
2571 | case $ac_var in #( | |
2572 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2573 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2574 | esac | |
2575 | case $ac_var in #( | |
2576 | _ | IFS | as_nl) ;; #( | |
2577 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2578 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2579 | esac ;; | |
2580 | esac | |
2581 | done | |
2582 | (set) 2>&1 | | |
2583 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2584 | *${as_nl}ac_space=\ *) | |
2585 | sed -n \ | |
2586 | "s/'\''/'\''\\\\'\'''\''/g; | |
2587 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2588 | ;; #( | |
2589 | *) | |
2590 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2591 | ;; | |
2592 | esac | | |
2593 | sort | |
2594 | ) | |
2595 | echo | |
2596 | ||
2597 | cat <<\_ASBOX | |
2598 | ## ----------------- ## | |
2599 | ## Output variables. ## | |
2600 | ## ----------------- ## | |
2601 | _ASBOX | |
2602 | echo | |
2603 | for ac_var in $ac_subst_vars | |
2604 | do | |
2605 | eval ac_val=\$$ac_var | |
2606 | case $ac_val in | |
2607 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2608 | esac | |
2609 | $as_echo "$ac_var='\''$ac_val'\''" | |
2610 | done | sort | |
2611 | echo | |
2612 | ||
2613 | if test -n "$ac_subst_files"; then | |
2614 | cat <<\_ASBOX | |
2615 | ## ------------------- ## | |
2616 | ## File substitutions. ## | |
2617 | ## ------------------- ## | |
2618 | _ASBOX | |
2619 | echo | |
2620 | for ac_var in $ac_subst_files | |
2621 | do | |
2622 | eval ac_val=\$$ac_var | |
2623 | case $ac_val in | |
2624 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2625 | esac | |
2626 | $as_echo "$ac_var='\''$ac_val'\''" | |
2627 | done | sort | |
2628 | echo | |
2629 | fi | |
2630 | ||
2631 | if test -s confdefs.h; then | |
2632 | cat <<\_ASBOX | |
2633 | ## ----------- ## | |
2634 | ## confdefs.h. ## | |
2635 | ## ----------- ## | |
2636 | _ASBOX | |
2637 | echo | |
2638 | cat confdefs.h | |
2639 | echo | |
2640 | fi | |
2641 | test "$ac_signal" != 0 && | |
2642 | $as_echo "$as_me: caught signal $ac_signal" | |
2643 | $as_echo "$as_me: exit $exit_status" | |
2644 | } >&5 | |
2645 | rm -f core *.core core.conftest.* && | |
2646 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2647 | exit $exit_status | |
2648 | ' 0 | |
2649 | for ac_signal in 1 2 13 15; do | |
2650 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2651 | done | |
2652 | ac_signal=0 | |
2653 | ||
2654 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2655 | rm -f -r conftest* confdefs.h | |
2656 | ||
2657 | $as_echo "/* confdefs.h */" > confdefs.h | |
2658 | ||
2659 | # Predefined preprocessor variables. | |
2660 | ||
2661 | cat >>confdefs.h <<_ACEOF | |
2662 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2663 | _ACEOF | |
2664 | ||
2665 | cat >>confdefs.h <<_ACEOF | |
2666 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2667 | _ACEOF | |
2668 | ||
2669 | cat >>confdefs.h <<_ACEOF | |
2670 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2671 | _ACEOF | |
2672 | ||
2673 | cat >>confdefs.h <<_ACEOF | |
2674 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2675 | _ACEOF | |
2676 | ||
2677 | cat >>confdefs.h <<_ACEOF | |
2678 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2679 | _ACEOF | |
2680 | ||
2681 | cat >>confdefs.h <<_ACEOF | |
2682 | #define PACKAGE_URL "$PACKAGE_URL" | |
2683 | _ACEOF | |
2684 | ||
2685 | ||
2686 | # Let the site file select an alternate cache file if it wants to. | |
2687 | # Prefer an explicitly selected file to automatically selected ones. | |
2688 | ac_site_file1=NONE | |
2689 | ac_site_file2=NONE | |
2690 | if test -n "$CONFIG_SITE"; then | |
2691 | ac_site_file1=$CONFIG_SITE | |
2692 | elif test "x$prefix" != xNONE; then | |
2693 | ac_site_file1=$prefix/share/config.site | |
2694 | ac_site_file2=$prefix/etc/config.site | |
2695 | else | |
2696 | ac_site_file1=$ac_default_prefix/share/config.site | |
2697 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2698 | fi | |
2699 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2700 | do | |
2701 | test "x$ac_site_file" = xNONE && continue | |
2702 | if test -r "$ac_site_file"; then | |
2703 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2704 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2705 | sed 's/^/| /' "$ac_site_file" >&5 | |
2706 | . "$ac_site_file" | |
2707 | fi | |
2708 | done | |
2709 | ||
2710 | if test -r "$cache_file"; then | |
2711 | # Some versions of bash will fail to source /dev/null (special | |
2712 | # files actually), so we avoid doing that. | |
2713 | if test -f "$cache_file"; then | |
2714 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2715 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2716 | case $cache_file in | |
2717 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2718 | *) . "./$cache_file";; | |
2719 | esac | |
2720 | fi | |
2721 | else | |
2722 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2723 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2724 | >$cache_file | |
bec39cab AC |
2725 | fi |
2726 | ||
f434ba03 PA |
2727 | gl_header_list="$gl_header_list sys/mman.h" |
2728 | gl_func_list="$gl_func_list mprotect" | |
2729 | gl_func_list="$gl_func_list memchr" | |
2730 | gl_header_list="$gl_header_list stddef.h" | |
81ecdfbb RW |
2731 | gl_header_list="$gl_header_list stdint.h" |
2732 | gl_header_list="$gl_header_list wchar.h" | |
2733 | gl_header_list="$gl_header_list string.h" | |
2734 | # Check that the precious variables saved in the cache have kept the same | |
2735 | # value. | |
2736 | ac_cache_corrupted=false | |
2737 | for ac_var in $ac_precious_vars; do | |
2738 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2739 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2740 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2741 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2742 | case $ac_old_set,$ac_new_set in | |
2743 | set,) | |
2744 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2745 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2746 | ac_cache_corrupted=: ;; | |
2747 | ,set) | |
2748 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2749 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2750 | ac_cache_corrupted=: ;; | |
2751 | ,);; | |
2752 | *) | |
2753 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2754 | # differences in whitespace do not lead to failure. | |
2755 | ac_old_val_w=`echo x $ac_old_val` | |
2756 | ac_new_val_w=`echo x $ac_new_val` | |
2757 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2758 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2759 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2760 | ac_cache_corrupted=: | |
2761 | else | |
2762 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2763 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2764 | eval $ac_var=\$ac_old_val | |
2765 | fi | |
2766 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2767 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2768 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2769 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2770 | fi;; | |
2771 | esac | |
2772 | # Pass precious variables to config.status. | |
2773 | if test "$ac_new_set" = set; then | |
2774 | case $ac_new_val in | |
2775 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2776 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2777 | esac | |
2778 | case " $ac_configure_args " in | |
2779 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2780 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2781 | esac | |
2782 | fi | |
2783 | done | |
2784 | if $ac_cache_corrupted; then | |
2785 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2786 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2787 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2788 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2789 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2790 | fi | |
2791 | ## -------------------- ## | |
2792 | ## Main body of script. ## | |
2793 | ## -------------------- ## | |
2794 | ||
2795 | ac_ext=c | |
2796 | ac_cpp='$CPP $CPPFLAGS' | |
2797 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2798 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2799 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2800 | ||
2801 | ||
2802 | ||
2803 | ||
2804 | ||
2805 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2806 | ||
2807 | ||
2808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2809 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2810 | # Check whether --enable-maintainer-mode was given. | |
2811 | if test "${enable_maintainer_mode+set}" = set; then : | |
2812 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2813 | else | |
2814 | USE_MAINTAINER_MODE=no | |
2815 | fi | |
2816 | ||
2817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2818 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2819 | if test $USE_MAINTAINER_MODE = yes; then | |
2820 | MAINTAINER_MODE_TRUE= | |
2821 | MAINTAINER_MODE_FALSE='#' | |
2822 | else | |
2823 | MAINTAINER_MODE_TRUE='#' | |
2824 | MAINTAINER_MODE_FALSE= | |
2825 | fi | |
2826 | ||
2827 | MAINT=$MAINTAINER_MODE_TRUE | |
2828 | ||
2829 | ||
2830 | ||
2831 | ac_ext=c | |
2832 | ac_cpp='$CPP $CPPFLAGS' | |
2833 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2834 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2835 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2836 | if test -n "$ac_tool_prefix"; then | |
2837 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2838 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2840 | $as_echo_n "checking for $ac_word... " >&6; } | |
2841 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2842 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2843 | else |
2844 | if test -n "$CC"; then | |
2845 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2846 | else | |
bec39cab AC |
2847 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2848 | for as_dir in $PATH | |
2849 | do | |
2850 | IFS=$as_save_IFS | |
2851 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2852 | for ac_exec_ext in '' $ac_executable_extensions; do |
2853 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2854 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2855 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2856 | break 2 |
2857 | fi | |
2858 | done | |
81ecdfbb RW |
2859 | done |
2860 | IFS=$as_save_IFS | |
bec39cab | 2861 | |
c906108c SS |
2862 | fi |
2863 | fi | |
bec39cab | 2864 | CC=$ac_cv_prog_CC |
c906108c | 2865 | if test -n "$CC"; then |
81ecdfbb RW |
2866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2867 | $as_echo "$CC" >&6; } | |
c906108c | 2868 | else |
81ecdfbb RW |
2869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2870 | $as_echo "no" >&6; } | |
c906108c SS |
2871 | fi |
2872 | ||
81ecdfbb | 2873 | |
b4e70030 JB |
2874 | fi |
2875 | if test -z "$ac_cv_prog_CC"; then | |
2876 | ac_ct_CC=$CC | |
81ecdfbb RW |
2877 | # Extract the first word of "gcc", so it can be a program name with args. |
2878 | set dummy gcc; ac_word=$2 | |
2879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2880 | $as_echo_n "checking for $ac_word... " >&6; } | |
2881 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2882 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2883 | else |
2884 | if test -n "$ac_ct_CC"; then | |
2885 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2886 | else | |
2887 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2888 | for as_dir in $PATH | |
2889 | do | |
2890 | IFS=$as_save_IFS | |
2891 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2892 | for ac_exec_ext in '' $ac_executable_extensions; do |
2893 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2894 | ac_cv_prog_ac_ct_CC="gcc" | |
2895 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2896 | break 2 |
4e8d927d | 2897 | fi |
b4e70030 | 2898 | done |
81ecdfbb RW |
2899 | done |
2900 | IFS=$as_save_IFS | |
b4e70030 JB |
2901 | |
2902 | fi | |
2903 | fi | |
2904 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2905 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2907 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2908 | else |
81ecdfbb RW |
2909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2910 | $as_echo "no" >&6; } | |
b4e70030 JB |
2911 | fi |
2912 | ||
81ecdfbb RW |
2913 | if test "x$ac_ct_CC" = x; then |
2914 | CC="" | |
2915 | else | |
2916 | case $cross_compiling:$ac_tool_warned in | |
2917 | yes:) | |
2918 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2919 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2920 | ac_tool_warned=yes ;; | |
2921 | esac | |
2922 | CC=$ac_ct_CC | |
2923 | fi | |
b4e70030 JB |
2924 | else |
2925 | CC="$ac_cv_prog_CC" | |
2926 | fi | |
2927 | ||
c906108c | 2928 | if test -z "$CC"; then |
81ecdfbb RW |
2929 | if test -n "$ac_tool_prefix"; then |
2930 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2931 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2933 | $as_echo_n "checking for $ac_word... " >&6; } | |
2934 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2935 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2936 | else |
2937 | if test -n "$CC"; then | |
2938 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2939 | else | |
bec39cab AC |
2940 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2941 | for as_dir in $PATH | |
2942 | do | |
2943 | IFS=$as_save_IFS | |
2944 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2945 | for ac_exec_ext in '' $ac_executable_extensions; do |
2946 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2947 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2948 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2949 | break 2 |
2950 | fi | |
2951 | done | |
81ecdfbb RW |
2952 | done |
2953 | IFS=$as_save_IFS | |
2954 | ||
2955 | fi | |
2956 | fi | |
2957 | CC=$ac_cv_prog_CC | |
2958 | if test -n "$CC"; then | |
2959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2960 | $as_echo "$CC" >&6; } | |
2961 | else | |
2962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2963 | $as_echo "no" >&6; } | |
2964 | fi | |
2965 | ||
2966 | ||
2967 | fi | |
2968 | fi | |
2969 | if test -z "$CC"; then | |
2970 | # Extract the first word of "cc", so it can be a program name with args. | |
2971 | set dummy cc; ac_word=$2 | |
2972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2973 | $as_echo_n "checking for $ac_word... " >&6; } | |
2974 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2975 | $as_echo_n "(cached) " >&6 | |
2976 | else | |
2977 | if test -n "$CC"; then | |
2978 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2979 | else | |
2980 | ac_prog_rejected=no | |
2981 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2982 | for as_dir in $PATH | |
2983 | do | |
2984 | IFS=$as_save_IFS | |
2985 | test -z "$as_dir" && as_dir=. | |
2986 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2987 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2988 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2989 | ac_prog_rejected=yes | |
2990 | continue | |
2991 | fi | |
2992 | ac_cv_prog_CC="cc" | |
2993 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2994 | break 2 | |
2995 | fi | |
2996 | done | |
2997 | done | |
2998 | IFS=$as_save_IFS | |
bec39cab | 2999 | |
c906108c SS |
3000 | if test $ac_prog_rejected = yes; then |
3001 | # We found a bogon in the path, so make sure we never use it. | |
3002 | set dummy $ac_cv_prog_CC | |
3003 | shift | |
bec39cab | 3004 | if test $# != 0; then |
c906108c SS |
3005 | # We chose a different compiler from the bogus one. |
3006 | # However, it has the same basename, so the bogon will be chosen | |
3007 | # first if we set CC to just the basename; use the full file name. | |
3008 | shift | |
bec39cab | 3009 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3010 | fi |
3011 | fi | |
3012 | fi | |
3013 | fi | |
bec39cab | 3014 | CC=$ac_cv_prog_CC |
c906108c | 3015 | if test -n "$CC"; then |
81ecdfbb RW |
3016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3017 | $as_echo "$CC" >&6; } | |
c906108c | 3018 | else |
81ecdfbb RW |
3019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3020 | $as_echo "no" >&6; } | |
c906108c SS |
3021 | fi |
3022 | ||
81ecdfbb | 3023 | |
bec39cab AC |
3024 | fi |
3025 | if test -z "$CC"; then | |
3026 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3027 | for ac_prog in cl.exe |
bec39cab AC |
3028 | do |
3029 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3030 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3032 | $as_echo_n "checking for $ac_word... " >&6; } | |
3033 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3034 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
3035 | else |
3036 | if test -n "$CC"; then | |
3037 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3038 | else | |
bec39cab AC |
3039 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3040 | for as_dir in $PATH | |
3041 | do | |
3042 | IFS=$as_save_IFS | |
3043 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3044 | for ac_exec_ext in '' $ac_executable_extensions; do |
3045 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3046 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3047 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3048 | break 2 |
3049 | fi | |
3050 | done | |
81ecdfbb RW |
3051 | done |
3052 | IFS=$as_save_IFS | |
bec39cab | 3053 | |
c906108c SS |
3054 | fi |
3055 | fi | |
bec39cab | 3056 | CC=$ac_cv_prog_CC |
c906108c | 3057 | if test -n "$CC"; then |
81ecdfbb RW |
3058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3059 | $as_echo "$CC" >&6; } | |
c906108c | 3060 | else |
81ecdfbb RW |
3061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3062 | $as_echo "no" >&6; } | |
c906108c | 3063 | fi |
bec39cab | 3064 | |
81ecdfbb | 3065 | |
bec39cab AC |
3066 | test -n "$CC" && break |
3067 | done | |
3068 | fi | |
3069 | if test -z "$CC"; then | |
3070 | ac_ct_CC=$CC | |
81ecdfbb | 3071 | for ac_prog in cl.exe |
bec39cab AC |
3072 | do |
3073 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3074 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3076 | $as_echo_n "checking for $ac_word... " >&6; } | |
3077 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3078 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3079 | else |
3080 | if test -n "$ac_ct_CC"; then | |
3081 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3082 | else | |
3083 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3084 | for as_dir in $PATH | |
3085 | do | |
3086 | IFS=$as_save_IFS | |
3087 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3088 | for ac_exec_ext in '' $ac_executable_extensions; do |
3089 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3090 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3091 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3092 | break 2 |
c906108c | 3093 | fi |
bec39cab | 3094 | done |
81ecdfbb RW |
3095 | done |
3096 | IFS=$as_save_IFS | |
bec39cab AC |
3097 | |
3098 | fi | |
3099 | fi | |
3100 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3101 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3102 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3103 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3104 | else |
81ecdfbb RW |
3105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3106 | $as_echo "no" >&6; } | |
c906108c SS |
3107 | fi |
3108 | ||
81ecdfbb | 3109 | |
bec39cab AC |
3110 | test -n "$ac_ct_CC" && break |
3111 | done | |
c906108c | 3112 | |
81ecdfbb RW |
3113 | if test "x$ac_ct_CC" = x; then |
3114 | CC="" | |
3115 | else | |
3116 | case $cross_compiling:$ac_tool_warned in | |
3117 | yes:) | |
3118 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3119 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3120 | ac_tool_warned=yes ;; | |
3121 | esac | |
3122 | CC=$ac_ct_CC | |
3123 | fi | |
bec39cab AC |
3124 | fi |
3125 | ||
3126 | fi | |
3127 | ||
3128 | ||
81ecdfbb RW |
3129 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3130 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3131 | as_fn_error "no acceptable C compiler found in \$PATH | |
3132 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3133 | |
3134 | # Provide some information about the compiler. | |
81ecdfbb RW |
3135 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3136 | set X $ac_compile | |
3137 | ac_compiler=$2 | |
3138 | for ac_option in --version -v -V -qversion; do | |
3139 | { { ac_try="$ac_compiler $ac_option >&5" | |
3140 | case "(($ac_try" in | |
3141 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3142 | *) ac_try_echo=$ac_try;; | |
3143 | esac | |
3144 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3145 | $as_echo "$ac_try_echo"; } >&5 | |
3146 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3147 | ac_status=$? |
81ecdfbb RW |
3148 | if test -s conftest.err; then |
3149 | sed '10a\ | |
3150 | ... rest of stderr output deleted ... | |
3151 | 10q' conftest.err >conftest.er1 | |
3152 | cat conftest.er1 >&5 | |
3153 | rm -f conftest.er1 conftest.err | |
3154 | fi | |
3155 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3156 | test $ac_status = 0; } | |
3157 | done | |
bec39cab | 3158 | |
81ecdfbb | 3159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3160 | /* end confdefs.h. */ |
3161 | ||
3162 | int | |
3163 | main () | |
3164 | { | |
3165 | ||
3166 | ; | |
3167 | return 0; | |
3168 | } | |
3169 | _ACEOF | |
3170 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3171 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3172 | # Try to create an executable without -o first, disregard a.out. |
3173 | # It will help us diagnose broken compilers, and finding out an intuition | |
3174 | # of exeext. | |
81ecdfbb RW |
3175 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3176 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3177 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3178 | ||
3179 | # The possible output files: | |
3180 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3181 | ||
3182 | ac_rmfiles= | |
3183 | for ac_file in $ac_files | |
3184 | do | |
3185 | case $ac_file in | |
3186 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3187 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3188 | esac | |
3189 | done | |
3190 | rm -f $ac_rmfiles | |
3191 | ||
3192 | if { { ac_try="$ac_link_default" | |
3193 | case "(($ac_try" in | |
3194 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3195 | *) ac_try_echo=$ac_try;; | |
3196 | esac | |
3197 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3198 | $as_echo "$ac_try_echo"; } >&5 | |
3199 | (eval "$ac_link_default") 2>&5 | |
3200 | ac_status=$? | |
3201 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3202 | test $ac_status = 0; }; then : | |
3203 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3204 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3205 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3206 | # so that the user can short-circuit this test for compilers unknown to | |
3207 | # Autoconf. | |
3208 | for ac_file in $ac_files '' | |
bec39cab AC |
3209 | do |
3210 | test -f "$ac_file" || continue | |
3211 | case $ac_file in | |
81ecdfbb | 3212 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3213 | ;; |
3214 | [ab].out ) | |
3215 | # We found the default executable, but exeext='' is most | |
3216 | # certainly right. | |
3217 | break;; | |
3218 | *.* ) | |
81ecdfbb RW |
3219 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3220 | then :; else | |
3221 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3222 | fi | |
3223 | # We set ac_cv_exeext here because the later test for it is not | |
3224 | # safe: cross compilers may not add the suffix if given an `-o' | |
3225 | # argument, so we may need to know it at that point already. | |
3226 | # Even if this section looks crufty: it has the advantage of | |
3227 | # actually working. | |
b4e70030 JB |
3228 | break;; |
3229 | * ) | |
3230 | break;; | |
bec39cab AC |
3231 | esac |
3232 | done | |
81ecdfbb RW |
3233 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3234 | ||
bec39cab | 3235 | else |
81ecdfbb RW |
3236 | ac_file='' |
3237 | fi | |
3238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3239 | $as_echo "$ac_file" >&6; } | |
3240 | if test -z "$ac_file"; then : | |
3241 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3242 | sed 's/^/| /' conftest.$ac_ext >&5 |
3243 | ||
81ecdfbb RW |
3244 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3245 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3246 | { as_fn_set_status 77 | |
3247 | as_fn_error "C compiler cannot create executables | |
3248 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3249 | fi |
b4e70030 | 3250 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3251 | |
81ecdfbb | 3252 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3253 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3255 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3256 | # If not cross compiling, check that we can run a simple program. |
3257 | if test "$cross_compiling" != yes; then | |
3258 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3259 | { { case "(($ac_try" in |
3260 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3261 | *) ac_try_echo=$ac_try;; | |
3262 | esac | |
3263 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3264 | $as_echo "$ac_try_echo"; } >&5 | |
3265 | (eval "$ac_try") 2>&5 | |
bec39cab | 3266 | ac_status=$? |
81ecdfbb RW |
3267 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3268 | test $ac_status = 0; }; }; then | |
bec39cab | 3269 | cross_compiling=no |
c906108c | 3270 | else |
bec39cab AC |
3271 | if test "$cross_compiling" = maybe; then |
3272 | cross_compiling=yes | |
3273 | else | |
81ecdfbb RW |
3274 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3275 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3276 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3277 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3278 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3279 | fi |
c906108c | 3280 | fi |
bec39cab | 3281 | fi |
81ecdfbb RW |
3282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3283 | $as_echo "yes" >&6; } | |
bec39cab | 3284 | |
81ecdfbb | 3285 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3286 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3287 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3288 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3290 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3292 | $as_echo "$cross_compiling" >&6; } | |
3293 | ||
3294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3295 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3296 | if { { ac_try="$ac_link" | |
3297 | case "(($ac_try" in | |
3298 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3299 | *) ac_try_echo=$ac_try;; | |
3300 | esac | |
3301 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3302 | $as_echo "$ac_try_echo"; } >&5 | |
3303 | (eval "$ac_link") 2>&5 | |
bec39cab | 3304 | ac_status=$? |
81ecdfbb RW |
3305 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3306 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3307 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3308 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3309 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3310 | # `rm'. | |
3311 | for ac_file in conftest.exe conftest conftest.*; do | |
3312 | test -f "$ac_file" || continue | |
3313 | case $ac_file in | |
81ecdfbb | 3314 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3315 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3316 | break;; |
3317 | * ) break;; | |
3318 | esac | |
3319 | done | |
c906108c | 3320 | else |
81ecdfbb RW |
3321 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3322 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3323 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3324 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3325 | fi |
b4e70030 | 3326 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3328 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3329 | |
b4e70030 | 3330 | rm -f conftest.$ac_ext |
bec39cab AC |
3331 | EXEEXT=$ac_cv_exeext |
3332 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3334 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3335 | if test "${ac_cv_objext+set}" = set; then : | |
3336 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3337 | else |
81ecdfbb | 3338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3339 | /* end confdefs.h. */ |
3340 | ||
3341 | int | |
3342 | main () | |
3343 | { | |
3344 | ||
3345 | ; | |
3346 | return 0; | |
3347 | } | |
3348 | _ACEOF | |
3349 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3350 | if { { ac_try="$ac_compile" |
3351 | case "(($ac_try" in | |
3352 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3353 | *) ac_try_echo=$ac_try;; | |
3354 | esac | |
3355 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3356 | $as_echo "$ac_try_echo"; } >&5 | |
3357 | (eval "$ac_compile") 2>&5 | |
3358 | ac_status=$? | |
3359 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3360 | test $ac_status = 0; }; then : | |
3361 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3362 | test -f "$ac_file" || continue; | |
bec39cab | 3363 | case $ac_file in |
81ecdfbb | 3364 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3365 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3366 | break;; | |
3367 | esac | |
3368 | done | |
c906108c | 3369 | else |
81ecdfbb | 3370 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3371 | sed 's/^/| /' conftest.$ac_ext >&5 |
3372 | ||
81ecdfbb RW |
3373 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3374 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3375 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3376 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3377 | fi |
b4e70030 | 3378 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3379 | fi |
81ecdfbb RW |
3380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3381 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3382 | OBJEXT=$ac_cv_objext |
3383 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3384 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3385 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3386 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3387 | $as_echo_n "(cached) " >&6 | |
c906108c | 3388 | else |
81ecdfbb | 3389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3390 | /* end confdefs.h. */ |
3391 | ||
3392 | int | |
3393 | main () | |
3394 | { | |
3395 | #ifndef __GNUC__ | |
3396 | choke me | |
3397 | #endif | |
3398 | ||
3399 | ; | |
3400 | return 0; | |
3401 | } | |
3402 | _ACEOF | |
81ecdfbb | 3403 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3404 | ac_compiler_gnu=yes |
3405 | else | |
81ecdfbb | 3406 | ac_compiler_gnu=no |
bec39cab | 3407 | fi |
81ecdfbb | 3408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3409 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3410 | ||
3411 | fi | |
81ecdfbb RW |
3412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3413 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3414 | if test $ac_compiler_gnu = yes; then | |
3415 | GCC=yes | |
3416 | else | |
3417 | GCC= | |
3418 | fi | |
bec39cab AC |
3419 | ac_test_CFLAGS=${CFLAGS+set} |
3420 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3422 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3423 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3424 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3425 | else |
81ecdfbb RW |
3426 | ac_save_c_werror_flag=$ac_c_werror_flag |
3427 | ac_c_werror_flag=yes | |
3428 | ac_cv_prog_cc_g=no | |
3429 | CFLAGS="-g" | |
3430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3431 | /* end confdefs.h. */ |
3432 | ||
3433 | int | |
3434 | main () | |
3435 | { | |
3436 | ||
3437 | ; | |
3438 | return 0; | |
3439 | } | |
3440 | _ACEOF | |
81ecdfbb | 3441 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3442 | ac_cv_prog_cc_g=yes |
3443 | else | |
81ecdfbb RW |
3444 | CFLAGS="" |
3445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3446 | /* end confdefs.h. */ | |
3447 | ||
3448 | int | |
3449 | main () | |
3450 | { | |
3451 | ||
3452 | ; | |
3453 | return 0; | |
3454 | } | |
3455 | _ACEOF | |
3456 | if ac_fn_c_try_compile "$LINENO"; then : | |
3457 | ||
3458 | else | |
3459 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3460 | CFLAGS="-g" | |
3461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3462 | /* end confdefs.h. */ | |
3463 | ||
3464 | int | |
3465 | main () | |
3466 | { | |
c906108c | 3467 | |
81ecdfbb RW |
3468 | ; |
3469 | return 0; | |
3470 | } | |
3471 | _ACEOF | |
3472 | if ac_fn_c_try_compile "$LINENO"; then : | |
3473 | ac_cv_prog_cc_g=yes | |
3474 | fi | |
3475 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3476 | fi | |
3477 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3478 | fi |
81ecdfbb RW |
3479 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3480 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3481 | fi |
81ecdfbb RW |
3482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3483 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3484 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3485 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3486 | elif test $ac_cv_prog_cc_g = yes; then |
3487 | if test "$GCC" = yes; then | |
3488 | CFLAGS="-g -O2" | |
3489 | else | |
3490 | CFLAGS="-g" | |
3491 | fi | |
3492 | else | |
3493 | if test "$GCC" = yes; then | |
3494 | CFLAGS="-O2" | |
3495 | else | |
3496 | CFLAGS= | |
3497 | fi | |
3498 | fi | |
81ecdfbb RW |
3499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3500 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3501 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3502 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3503 | else |
81ecdfbb | 3504 | ac_cv_prog_cc_c89=no |
bec39cab | 3505 | ac_save_CC=$CC |
81ecdfbb | 3506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3507 | /* end confdefs.h. */ |
c906108c SS |
3508 | #include <stdarg.h> |
3509 | #include <stdio.h> | |
3510 | #include <sys/types.h> | |
3511 | #include <sys/stat.h> | |
3512 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3513 | struct buf { int x; }; | |
3514 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3515 | static char *e (p, i) | |
3516 | char **p; | |
3517 | int i; | |
3518 | { | |
3519 | return p[i]; | |
3520 | } | |
3521 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3522 | { | |
3523 | char *s; | |
3524 | va_list v; | |
3525 | va_start (v,p); | |
3526 | s = g (p, va_arg (v,int)); | |
3527 | va_end (v); | |
3528 | return s; | |
3529 | } | |
bec39cab AC |
3530 | |
3531 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3532 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3533 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3534 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3535 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3536 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3537 | that's true only with -std. */ |
bec39cab AC |
3538 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3539 | ||
81ecdfbb RW |
3540 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3541 | inside strings and character constants. */ | |
3542 | #define FOO(x) 'x' | |
3543 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3544 | ||
c906108c SS |
3545 | int test (int i, double x); |
3546 | struct s1 {int (*f) (int a);}; | |
3547 | struct s2 {int (*f) (double a);}; | |
3548 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3549 | int argc; | |
3550 | char **argv; | |
bec39cab AC |
3551 | int |
3552 | main () | |
3553 | { | |
c906108c | 3554 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3555 | ; |
3556 | return 0; | |
3557 | } | |
3558 | _ACEOF | |
81ecdfbb RW |
3559 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3560 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3561 | do |
3562 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3563 | if ac_fn_c_try_compile "$LINENO"; then : |
3564 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3565 | fi |
81ecdfbb RW |
3566 | rm -f core conftest.err conftest.$ac_objext |
3567 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3568 | done |
81ecdfbb | 3569 | rm -f conftest.$ac_ext |
bec39cab | 3570 | CC=$ac_save_CC |
c906108c SS |
3571 | |
3572 | fi | |
81ecdfbb RW |
3573 | # AC_CACHE_VAL |
3574 | case "x$ac_cv_prog_cc_c89" in | |
3575 | x) | |
3576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3577 | $as_echo "none needed" >&6; } ;; | |
3578 | xno) | |
3579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3580 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3581 | *) |
81ecdfbb RW |
3582 | CC="$CC $ac_cv_prog_cc_c89" |
3583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3584 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3585 | esac |
81ecdfbb | 3586 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3587 | |
b4e70030 JB |
3588 | fi |
3589 | ||
bec39cab AC |
3590 | ac_ext=c |
3591 | ac_cpp='$CPP $CPPFLAGS' | |
3592 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3593 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3594 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3595 | |
f434ba03 PA |
3596 | ac_aux_dir= |
3597 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3598 | for ac_t in install-sh install.sh shtool; do | |
3599 | if test -f "$ac_dir/$ac_t"; then | |
3600 | ac_aux_dir=$ac_dir | |
3601 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3602 | break 2 | |
3603 | fi | |
3604 | done | |
3605 | done | |
3606 | if test -z "$ac_aux_dir"; then | |
3607 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3608 | fi | |
3609 | ||
3610 | # These three variables are undocumented and unsupported, | |
3611 | # and are intended to be withdrawn in a future Autoconf release. | |
3612 | # They can cause serious problems if a builder's source tree is in a directory | |
3613 | # whose full name contains unusual characters. | |
3614 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3615 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3616 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3617 | ||
3618 | ||
3619 | # Make sure we can run config.sub. | |
3620 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3621 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3622 | ||
3623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3624 | $as_echo_n "checking build system type... " >&6; } | |
3625 | if test "${ac_cv_build+set}" = set; then : | |
3626 | $as_echo_n "(cached) " >&6 | |
3627 | else | |
3628 | ac_build_alias=$build_alias | |
3629 | test "x$ac_build_alias" = x && | |
3630 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3631 | test "x$ac_build_alias" = x && | |
3632 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3633 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3634 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3635 | ||
3636 | fi | |
3637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3638 | $as_echo "$ac_cv_build" >&6; } | |
3639 | case $ac_cv_build in | |
3640 | *-*-*) ;; | |
3641 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
3642 | esac | |
3643 | build=$ac_cv_build | |
3644 | ac_save_IFS=$IFS; IFS='-' | |
3645 | set x $ac_cv_build | |
3646 | shift | |
3647 | build_cpu=$1 | |
3648 | build_vendor=$2 | |
3649 | shift; shift | |
3650 | # Remember, the first character of IFS is used to create $*, | |
3651 | # except with old shells: | |
3652 | build_os=$* | |
3653 | IFS=$ac_save_IFS | |
3654 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3655 | ||
3656 | ||
3657 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3658 | $as_echo_n "checking host system type... " >&6; } | |
3659 | if test "${ac_cv_host+set}" = set; then : | |
3660 | $as_echo_n "(cached) " >&6 | |
3661 | else | |
3662 | if test "x$host_alias" = x; then | |
3663 | ac_cv_host=$ac_cv_build | |
3664 | else | |
3665 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3666 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
3667 | fi | |
3668 | ||
3669 | fi | |
3670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3671 | $as_echo "$ac_cv_host" >&6; } | |
3672 | case $ac_cv_host in | |
3673 | *-*-*) ;; | |
3674 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
3675 | esac | |
3676 | host=$ac_cv_host | |
3677 | ac_save_IFS=$IFS; IFS='-' | |
3678 | set x $ac_cv_host | |
3679 | shift | |
3680 | host_cpu=$1 | |
3681 | host_vendor=$2 | |
3682 | shift; shift | |
3683 | # Remember, the first character of IFS is used to create $*, | |
3684 | # except with old shells: | |
3685 | host_os=$* | |
3686 | IFS=$ac_save_IFS | |
3687 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3688 | ||
3689 | ||
60ca704f | 3690 | |
bec39cab AC |
3691 | ac_ext=c |
3692 | ac_cpp='$CPP $CPPFLAGS' | |
3693 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3694 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3695 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3697 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3698 | # On Suns, sometimes $CPP names a directory. |
3699 | if test -n "$CPP" && test -d "$CPP"; then | |
3700 | CPP= | |
8bb2c122 | 3701 | fi |
bec39cab | 3702 | if test -z "$CPP"; then |
81ecdfbb RW |
3703 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3704 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3705 | else |
3706 | # Double quotes because CPP needs to be expanded | |
3707 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3708 | do | |
3709 | ac_preproc_ok=false | |
3710 | for ac_c_preproc_warn_flag in '' yes | |
3711 | do | |
3712 | # Use a header file that comes with gcc, so configuring glibc | |
3713 | # with a fresh cross-compiler works. | |
3714 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3715 | # <limits.h> exists even on freestanding compilers. | |
3716 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3717 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3718 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3719 | /* end confdefs.h. */ |
3720 | #ifdef __STDC__ | |
3721 | # include <limits.h> | |
3722 | #else | |
3723 | # include <assert.h> | |
3724 | #endif | |
3725 | Syntax error | |
3726 | _ACEOF | |
81ecdfbb | 3727 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3728 | |
81ecdfbb | 3729 | else |
bec39cab AC |
3730 | # Broken: fails on valid input. |
3731 | continue | |
3732 | fi | |
3733 | rm -f conftest.err conftest.$ac_ext | |
3734 | ||
81ecdfbb | 3735 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3736 | # can be detected and how. |
81ecdfbb | 3737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3738 | /* end confdefs.h. */ |
3739 | #include <ac_nonexistent.h> | |
3740 | _ACEOF | |
81ecdfbb | 3741 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3742 | # Broken: success on invalid input. |
3743 | continue | |
8bb2c122 | 3744 | else |
bec39cab AC |
3745 | # Passes both tests. |
3746 | ac_preproc_ok=: | |
3747 | break | |
8bb2c122 | 3748 | fi |
bec39cab | 3749 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3750 | |
bec39cab AC |
3751 | done |
3752 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3753 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3754 | if $ac_preproc_ok; then : |
bec39cab AC |
3755 | break |
3756 | fi | |
8bb2c122 | 3757 | |
bec39cab AC |
3758 | done |
3759 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3760 | |
c906108c | 3761 | fi |
bec39cab AC |
3762 | CPP=$ac_cv_prog_CPP |
3763 | else | |
3764 | ac_cv_prog_CPP=$CPP | |
c906108c | 3765 | fi |
81ecdfbb RW |
3766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3767 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3768 | ac_preproc_ok=false |
3769 | for ac_c_preproc_warn_flag in '' yes | |
3770 | do | |
3771 | # Use a header file that comes with gcc, so configuring glibc | |
3772 | # with a fresh cross-compiler works. | |
3773 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3774 | # <limits.h> exists even on freestanding compilers. | |
3775 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3776 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3778 | /* end confdefs.h. */ |
3779 | #ifdef __STDC__ | |
3780 | # include <limits.h> | |
3781 | #else | |
3782 | # include <assert.h> | |
3783 | #endif | |
3784 | Syntax error | |
3785 | _ACEOF | |
81ecdfbb | 3786 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3787 | |
81ecdfbb | 3788 | else |
bec39cab AC |
3789 | # Broken: fails on valid input. |
3790 | continue | |
3791 | fi | |
3792 | rm -f conftest.err conftest.$ac_ext | |
3793 | ||
81ecdfbb | 3794 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3795 | # can be detected and how. |
81ecdfbb | 3796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3797 | /* end confdefs.h. */ |
3798 | #include <ac_nonexistent.h> | |
3799 | _ACEOF | |
81ecdfbb | 3800 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3801 | # Broken: success on invalid input. |
3802 | continue | |
c906108c | 3803 | else |
bec39cab AC |
3804 | # Passes both tests. |
3805 | ac_preproc_ok=: | |
3806 | break | |
c906108c | 3807 | fi |
bec39cab | 3808 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3809 | |
bec39cab AC |
3810 | done |
3811 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3812 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3813 | if $ac_preproc_ok; then : |
3814 | ||
c906108c | 3815 | else |
81ecdfbb RW |
3816 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3817 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3818 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3819 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3820 | fi |
c906108c | 3821 | |
bec39cab AC |
3822 | ac_ext=c |
3823 | ac_cpp='$CPP $CPPFLAGS' | |
3824 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3825 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3826 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3827 | ||
3828 | ||
81ecdfbb RW |
3829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3830 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3831 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3832 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3833 | else |
81ecdfbb RW |
3834 | if test -z "$GREP"; then |
3835 | ac_path_GREP_found=false | |
3836 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3837 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3838 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3839 | do | |
3840 | IFS=$as_save_IFS | |
3841 | test -z "$as_dir" && as_dir=. | |
3842 | for ac_prog in grep ggrep; do | |
3843 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3844 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3845 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3846 | # Check for GNU ac_path_GREP and select it if it is found. | |
3847 | # Check for GNU $ac_path_GREP | |
3848 | case `"$ac_path_GREP" --version 2>&1` in | |
3849 | *GNU*) | |
3850 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3851 | *) | |
3852 | ac_count=0 | |
3853 | $as_echo_n 0123456789 >"conftest.in" | |
3854 | while : | |
3855 | do | |
3856 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3857 | mv "conftest.tmp" "conftest.in" | |
3858 | cp "conftest.in" "conftest.nl" | |
3859 | $as_echo 'GREP' >> "conftest.nl" | |
3860 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3861 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3862 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3863 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3864 | # Best one so far, save it but keep looking for a better one | |
3865 | ac_cv_path_GREP="$ac_path_GREP" | |
3866 | ac_path_GREP_max=$ac_count | |
bec39cab | 3867 | fi |
81ecdfbb RW |
3868 | # 10*(2^10) chars as input seems more than enough |
3869 | test $ac_count -gt 10 && break | |
3870 | done | |
3871 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3872 | esac | |
bec39cab | 3873 | |
81ecdfbb RW |
3874 | $ac_path_GREP_found && break 3 |
3875 | done | |
3876 | done | |
3877 | done | |
3878 | IFS=$as_save_IFS | |
3879 | if test -z "$ac_cv_path_GREP"; then | |
3880 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3881 | fi | |
c906108c | 3882 | else |
81ecdfbb | 3883 | ac_cv_path_GREP=$GREP |
c906108c | 3884 | fi |
c906108c | 3885 | |
81ecdfbb RW |
3886 | fi |
3887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3888 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3889 | GREP="$ac_cv_path_GREP" | |
c906108c | 3890 | |
c906108c | 3891 | |
81ecdfbb RW |
3892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3893 | $as_echo_n "checking for egrep... " >&6; } | |
3894 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3895 | $as_echo_n "(cached) " >&6 | |
783e057b | 3896 | else |
81ecdfbb RW |
3897 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3898 | then ac_cv_path_EGREP="$GREP -E" | |
3899 | else | |
3900 | if test -z "$EGREP"; then | |
3901 | ac_path_EGREP_found=false | |
3902 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3903 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3904 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3905 | do |
3906 | IFS=$as_save_IFS | |
3907 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3908 | for ac_prog in egrep; do |
3909 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3910 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3911 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3912 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3913 | # Check for GNU $ac_path_EGREP | |
3914 | case `"$ac_path_EGREP" --version 2>&1` in | |
3915 | *GNU*) | |
3916 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3917 | *) | |
3918 | ac_count=0 | |
3919 | $as_echo_n 0123456789 >"conftest.in" | |
3920 | while : | |
3921 | do | |
3922 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3923 | mv "conftest.tmp" "conftest.in" | |
3924 | cp "conftest.in" "conftest.nl" | |
3925 | $as_echo 'EGREP' >> "conftest.nl" | |
3926 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3927 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3928 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3929 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3930 | # Best one so far, save it but keep looking for a better one | |
3931 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3932 | ac_path_EGREP_max=$ac_count | |
3933 | fi | |
3934 | # 10*(2^10) chars as input seems more than enough | |
3935 | test $ac_count -gt 10 && break | |
3936 | done | |
3937 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3938 | esac | |
bec39cab | 3939 | |
81ecdfbb RW |
3940 | $ac_path_EGREP_found && break 3 |
3941 | done | |
3942 | done | |
3943 | done | |
3944 | IFS=$as_save_IFS | |
3945 | if test -z "$ac_cv_path_EGREP"; then | |
3946 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3947 | fi |
783e057b | 3948 | else |
81ecdfbb | 3949 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3950 | fi |
3951 | ||
81ecdfbb | 3952 | fi |
783e057b | 3953 | fi |
81ecdfbb RW |
3954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3955 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3956 | EGREP="$ac_cv_path_EGREP" | |
3957 | ||
783e057b | 3958 | |
81ecdfbb RW |
3959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3960 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3961 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3962 | $as_echo_n "(cached) " >&6 | |
783e057b | 3963 | else |
81ecdfbb | 3964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3965 | /* end confdefs.h. */ |
783e057b | 3966 | #include <stdlib.h> |
bec39cab | 3967 | #include <stdarg.h> |
783e057b DJ |
3968 | #include <string.h> |
3969 | #include <float.h> | |
c906108c | 3970 | |
bec39cab AC |
3971 | int |
3972 | main () | |
3973 | { | |
c906108c | 3974 | |
bec39cab AC |
3975 | ; |
3976 | return 0; | |
3977 | } | |
3978 | _ACEOF | |
81ecdfbb | 3979 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3980 | ac_cv_header_stdc=yes |
c906108c | 3981 | else |
81ecdfbb | 3982 | ac_cv_header_stdc=no |
c906108c | 3983 | fi |
81ecdfbb | 3984 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3985 | |
783e057b DJ |
3986 | if test $ac_cv_header_stdc = yes; then |
3987 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3988 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3989 | /* end confdefs.h. */ |
3990 | #include <string.h> | |
c906108c | 3991 | |
783e057b DJ |
3992 | _ACEOF |
3993 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3994 | $EGREP "memchr" >/dev/null 2>&1; then : |
3995 | ||
c906108c | 3996 | else |
783e057b | 3997 | ac_cv_header_stdc=no |
c906108c | 3998 | fi |
783e057b | 3999 | rm -f conftest* |
c906108c SS |
4000 | |
4001 | fi | |
4002 | ||
783e057b DJ |
4003 | if test $ac_cv_header_stdc = yes; then |
4004 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4006 | /* end confdefs.h. */ |
4007 | #include <stdlib.h> | |
bec39cab | 4008 | |
783e057b DJ |
4009 | _ACEOF |
4010 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4011 | $EGREP "free" >/dev/null 2>&1; then : |
4012 | ||
bec39cab | 4013 | else |
783e057b | 4014 | ac_cv_header_stdc=no |
bec39cab | 4015 | fi |
783e057b | 4016 | rm -f conftest* |
bec39cab AC |
4017 | |
4018 | fi | |
bec39cab | 4019 | |
783e057b DJ |
4020 | if test $ac_cv_header_stdc = yes; then |
4021 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4022 | if test "$cross_compiling" = yes; then : |
783e057b | 4023 | : |
bec39cab | 4024 | else |
81ecdfbb | 4025 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4026 | /* end confdefs.h. */ |
4027 | #include <ctype.h> | |
81ecdfbb | 4028 | #include <stdlib.h> |
783e057b DJ |
4029 | #if ((' ' & 0x0FF) == 0x020) |
4030 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4031 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4032 | #else | |
4033 | # define ISLOWER(c) \ | |
4034 | (('a' <= (c) && (c) <= 'i') \ | |
4035 | || ('j' <= (c) && (c) <= 'r') \ | |
4036 | || ('s' <= (c) && (c) <= 'z')) | |
4037 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4038 | #endif | |
4039 | ||
4040 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4041 | int | |
4042 | main () | |
4043 | { | |
4044 | int i; | |
4045 | for (i = 0; i < 256; i++) | |
4046 | if (XOR (islower (i), ISLOWER (i)) | |
4047 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4048 | return 2; |
4049 | return 0; | |
783e057b DJ |
4050 | } |
4051 | _ACEOF | |
81ecdfbb | 4052 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4053 | |
81ecdfbb RW |
4054 | else |
4055 | ac_cv_header_stdc=no | |
783e057b | 4056 | fi |
81ecdfbb RW |
4057 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4058 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4059 | fi |
81ecdfbb | 4060 | |
783e057b DJ |
4061 | fi |
4062 | fi | |
81ecdfbb RW |
4063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4064 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4065 | if test $ac_cv_header_stdc = yes; then |
4066 | ||
81ecdfbb | 4067 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4068 | |
4069 | fi | |
4070 | ||
4071 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4072 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4073 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4074 | do : |
4075 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4076 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4077 | " | |
4078 | eval as_val=\$$as_ac_Header | |
4079 | if test "x$as_val" = x""yes; then : | |
783e057b | 4080 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4081 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4082 | _ACEOF |
4083 | ||
4084 | fi | |
4085 | ||
4086 | done | |
4087 | ||
4088 | ||
4089 | ||
f434ba03 PA |
4090 | |
4091 | ||
81ecdfbb RW |
4092 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4093 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4094 | MINIX=yes |
4095 | else | |
4096 | MINIX= | |
4097 | fi | |
4098 | ||
4099 | ||
4100 | if test "$MINIX" = yes; then | |
4101 | ||
81ecdfbb | 4102 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4103 | |
4104 | ||
81ecdfbb | 4105 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4106 | |
4107 | ||
81ecdfbb | 4108 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4109 | |
4110 | fi | |
4111 | ||
f434ba03 PA |
4112 | case "$host_os" in |
4113 | hpux*) | |
4114 | ||
4115 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
4116 | ||
4117 | ;; | |
4118 | esac | |
4119 | ||
783e057b | 4120 | |
81ecdfbb RW |
4121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4122 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4123 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4124 | $as_echo_n "(cached) " >&6 | |
783e057b | 4125 | else |
81ecdfbb | 4126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4127 | /* end confdefs.h. */ |
4128 | ||
f434ba03 PA |
4129 | # define __EXTENSIONS__ 1 |
4130 | $ac_includes_default | |
783e057b DJ |
4131 | int |
4132 | main () | |
4133 | { | |
4134 | ||
4135 | ; | |
4136 | return 0; | |
4137 | } | |
4138 | _ACEOF | |
81ecdfbb | 4139 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4140 | ac_cv_safe_to_define___extensions__=yes |
4141 | else | |
81ecdfbb | 4142 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4143 | fi |
81ecdfbb | 4144 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4145 | fi |
81ecdfbb RW |
4146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4147 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4148 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4149 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4150 | |
81ecdfbb | 4151 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4152 | |
81ecdfbb | 4153 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4154 | |
81ecdfbb | 4155 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4156 | |
81ecdfbb | 4157 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4158 | |
4159 | ||
81ecdfbb RW |
4160 | if test -n "$ac_tool_prefix"; then |
4161 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4162 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4164 | $as_echo_n "checking for $ac_word... " >&6; } | |
4165 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
4166 | $as_echo_n "(cached) " >&6 | |
4167 | else | |
4168 | if test -n "$RANLIB"; then | |
4169 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4170 | else | |
4171 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4172 | for as_dir in $PATH | |
4173 | do | |
4174 | IFS=$as_save_IFS | |
4175 | test -z "$as_dir" && as_dir=. | |
4176 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4177 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4178 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4179 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4180 | break 2 | |
4181 | fi | |
4182 | done | |
4183 | done | |
4184 | IFS=$as_save_IFS | |
783e057b | 4185 | |
81ecdfbb RW |
4186 | fi |
4187 | fi | |
4188 | RANLIB=$ac_cv_prog_RANLIB | |
4189 | if test -n "$RANLIB"; then | |
4190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4191 | $as_echo "$RANLIB" >&6; } | |
4192 | else | |
4193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4194 | $as_echo "no" >&6; } | |
4195 | fi | |
783e057b DJ |
4196 | |
4197 | ||
81ecdfbb RW |
4198 | fi |
4199 | if test -z "$ac_cv_prog_RANLIB"; then | |
4200 | ac_ct_RANLIB=$RANLIB | |
4201 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4202 | set dummy ranlib; ac_word=$2 | |
4203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4204 | $as_echo_n "checking for $ac_word... " >&6; } | |
4205 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
4206 | $as_echo_n "(cached) " >&6 | |
783e057b | 4207 | else |
81ecdfbb RW |
4208 | if test -n "$ac_ct_RANLIB"; then |
4209 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4210 | else | |
4211 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4212 | for as_dir in $PATH | |
4213 | do | |
4214 | IFS=$as_save_IFS | |
4215 | test -z "$as_dir" && as_dir=. | |
4216 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4217 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4218 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
4219 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4220 | break 2 | |
4221 | fi | |
4222 | done | |
4223 | done | |
4224 | IFS=$as_save_IFS | |
4225 | ||
4226 | fi | |
4227 | fi | |
4228 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4229 | if test -n "$ac_ct_RANLIB"; then | |
4230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4231 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4232 | else | |
4233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4234 | $as_echo "no" >&6; } | |
4235 | fi | |
4236 | ||
4237 | if test "x$ac_ct_RANLIB" = x; then | |
4238 | RANLIB=":" | |
4239 | else | |
4240 | case $cross_compiling:$ac_tool_warned in | |
4241 | yes:) | |
4242 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4243 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4244 | ac_tool_warned=yes ;; | |
4245 | esac | |
4246 | RANLIB=$ac_ct_RANLIB | |
4247 | fi | |
4248 | else | |
4249 | RANLIB="$ac_cv_prog_RANLIB" | |
4250 | fi | |
4251 | ||
4252 | ||
4253 | ||
4254 | ||
4255 | ||
4256 | ||
3388710e JM |
4257 | |
4258 | ||
3388710e | 4259 | |
f434ba03 PA |
4260 | # Code from module arg-nonnull: |
4261 | # Code from module c++defs: | |
4262 | # Code from module extensions: | |
3388710e | 4263 | |
f434ba03 PA |
4264 | # Code from module include_next: |
4265 | # Code from module memchr: | |
4266 | # Code from module memmem: | |
4267 | # Code from module memmem-simple: | |
4268 | # Code from module multiarch: | |
4269 | # Code from module stddef: | |
4270 | # Code from module stdint: | |
4271 | # Code from module string: | |
4272 | # Code from module warn-on-use: | |
4273 | # Code from module wchar: | |
3388710e JM |
4274 | |
4275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4276 | $as_echo_n "checking target system type... " >&6; } | |
4277 | if test "${ac_cv_target+set}" = set; then : | |
4278 | $as_echo_n "(cached) " >&6 | |
4279 | else | |
4280 | if test "x$target_alias" = x; then | |
4281 | ac_cv_target=$ac_cv_host | |
4282 | else | |
4283 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4284 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4285 | fi | |
4286 | ||
4287 | fi | |
4288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4289 | $as_echo "$ac_cv_target" >&6; } | |
4290 | case $ac_cv_target in | |
4291 | *-*-*) ;; | |
4292 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4293 | esac | |
4294 | target=$ac_cv_target | |
4295 | ac_save_IFS=$IFS; IFS='-' | |
4296 | set x $ac_cv_target | |
4297 | shift | |
4298 | target_cpu=$1 | |
4299 | target_vendor=$2 | |
4300 | shift; shift | |
4301 | # Remember, the first character of IFS is used to create $*, | |
4302 | # except with old shells: | |
4303 | target_os=$* | |
4304 | IFS=$ac_save_IFS | |
4305 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4306 | ||
4307 | ||
4308 | # The aliases save the names the user supplied, while $host etc. | |
4309 | # will get canonicalized. | |
4310 | test -n "$target_alias" && | |
4311 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4312 | NONENONEs,x,x, && | |
4313 | program_prefix=${target_alias}- | |
4314 | ||
4315 | # The tests for host and target for $enable_largefile require | |
4316 | # canonical names. | |
4317 | ||
4318 | ||
81ecdfbb | 4319 | |
da2f07f1 JK |
4320 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4321 | # even in directories otherwise not depending on the $plugins option. | |
4322 | ||
4323 | ||
4324 | # Check whether --enable-plugins was given. | |
4325 | if test "${enable_plugins+set}" = set; then : | |
4326 | enableval=$enable_plugins; case "${enableval}" in | |
4327 | yes | "") plugins=yes ;; | |
4328 | no) plugins=no ;; | |
4329 | *) plugins=yes ;; | |
4330 | esac | |
4331 | else | |
4332 | plugins=no | |
4333 | fi | |
4334 | ||
4335 | ||
4336 | ||
4337 | case "${host}" in | |
4338 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4339 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4340 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4341 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4342 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4343 | # large-file support through the --enable-largefile switch, disable | |
4344 | # large-file support in favor of procfs support. | |
4345 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4346 | && : ${enable_largefile="no"} | |
4347 | ;; | |
4348 | esac | |
4349 | ||
4350 | # Check whether --enable-largefile was given. | |
4351 | if test "${enable_largefile+set}" = set; then : | |
4352 | enableval=$enable_largefile; | |
4353 | fi | |
4354 | ||
4355 | if test "$enable_largefile" != no; then | |
4356 | ||
4357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4358 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4359 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4360 | $as_echo_n "(cached) " >&6 | |
4361 | else | |
4362 | ac_cv_sys_largefile_CC=no | |
4363 | if test "$GCC" != yes; then | |
4364 | ac_save_CC=$CC | |
4365 | while :; do | |
4366 | # IRIX 6.2 and later do not support large files by default, | |
4367 | # so use the C compiler's -n32 option if that helps. | |
4368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4369 | /* end confdefs.h. */ | |
4370 | #include <sys/types.h> | |
4371 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4372 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4373 | since some C++ compilers masquerading as C compilers | |
4374 | incorrectly reject 9223372036854775807. */ | |
4375 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4376 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4377 | && LARGE_OFF_T % 2147483647 == 1) | |
4378 | ? 1 : -1]; | |
4379 | int | |
4380 | main () | |
4381 | { | |
4382 | ||
4383 | ; | |
4384 | return 0; | |
4385 | } | |
4386 | _ACEOF | |
4387 | if ac_fn_c_try_compile "$LINENO"; then : | |
4388 | break | |
4389 | fi | |
4390 | rm -f core conftest.err conftest.$ac_objext | |
4391 | CC="$CC -n32" | |
4392 | if ac_fn_c_try_compile "$LINENO"; then : | |
4393 | ac_cv_sys_largefile_CC=' -n32'; break | |
4394 | fi | |
4395 | rm -f core conftest.err conftest.$ac_objext | |
4396 | break | |
4397 | done | |
4398 | CC=$ac_save_CC | |
4399 | rm -f conftest.$ac_ext | |
4400 | fi | |
4401 | fi | |
4402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4403 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4404 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4405 | CC=$CC$ac_cv_sys_largefile_CC | |
4406 | fi | |
4407 | ||
4408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4409 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4410 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4411 | $as_echo_n "(cached) " >&6 | |
4412 | else | |
4413 | while :; do | |
4414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4415 | /* end confdefs.h. */ | |
4416 | #include <sys/types.h> | |
4417 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4418 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4419 | since some C++ compilers masquerading as C compilers | |
4420 | incorrectly reject 9223372036854775807. */ | |
4421 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4422 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4423 | && LARGE_OFF_T % 2147483647 == 1) | |
4424 | ? 1 : -1]; | |
4425 | int | |
4426 | main () | |
4427 | { | |
4428 | ||
4429 | ; | |
4430 | return 0; | |
4431 | } | |
4432 | _ACEOF | |
4433 | if ac_fn_c_try_compile "$LINENO"; then : | |
4434 | ac_cv_sys_file_offset_bits=no; break | |
4435 | fi | |
4436 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4438 | /* end confdefs.h. */ | |
4439 | #define _FILE_OFFSET_BITS 64 | |
4440 | #include <sys/types.h> | |
4441 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4442 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4443 | since some C++ compilers masquerading as C compilers | |
4444 | incorrectly reject 9223372036854775807. */ | |
4445 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4446 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4447 | && LARGE_OFF_T % 2147483647 == 1) | |
4448 | ? 1 : -1]; | |
4449 | int | |
4450 | main () | |
4451 | { | |
4452 | ||
4453 | ; | |
4454 | return 0; | |
4455 | } | |
4456 | _ACEOF | |
4457 | if ac_fn_c_try_compile "$LINENO"; then : | |
4458 | ac_cv_sys_file_offset_bits=64; break | |
4459 | fi | |
4460 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4461 | ac_cv_sys_file_offset_bits=unknown | |
4462 | break | |
4463 | done | |
4464 | fi | |
4465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4466 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4467 | case $ac_cv_sys_file_offset_bits in #( | |
4468 | no | unknown) ;; | |
4469 | *) | |
4470 | cat >>confdefs.h <<_ACEOF | |
4471 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4472 | _ACEOF | |
4473 | ;; | |
4474 | esac | |
4475 | rm -rf conftest* | |
4476 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4478 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4479 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4480 | $as_echo_n "(cached) " >&6 | |
4481 | else | |
4482 | while :; do | |
4483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4484 | /* end confdefs.h. */ | |
4485 | #include <sys/types.h> | |
4486 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4487 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4488 | since some C++ compilers masquerading as C compilers | |
4489 | incorrectly reject 9223372036854775807. */ | |
4490 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4491 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4492 | && LARGE_OFF_T % 2147483647 == 1) | |
4493 | ? 1 : -1]; | |
4494 | int | |
4495 | main () | |
4496 | { | |
4497 | ||
4498 | ; | |
4499 | return 0; | |
4500 | } | |
4501 | _ACEOF | |
4502 | if ac_fn_c_try_compile "$LINENO"; then : | |
4503 | ac_cv_sys_large_files=no; break | |
4504 | fi | |
4505 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4507 | /* end confdefs.h. */ | |
4508 | #define _LARGE_FILES 1 | |
4509 | #include <sys/types.h> | |
4510 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4511 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4512 | since some C++ compilers masquerading as C compilers | |
4513 | incorrectly reject 9223372036854775807. */ | |
4514 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4515 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4516 | && LARGE_OFF_T % 2147483647 == 1) | |
4517 | ? 1 : -1]; | |
4518 | int | |
4519 | main () | |
4520 | { | |
4521 | ||
4522 | ; | |
4523 | return 0; | |
4524 | } | |
4525 | _ACEOF | |
4526 | if ac_fn_c_try_compile "$LINENO"; then : | |
4527 | ac_cv_sys_large_files=1; break | |
4528 | fi | |
4529 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4530 | ac_cv_sys_large_files=unknown | |
4531 | break | |
4532 | done | |
4533 | fi | |
4534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4535 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4536 | case $ac_cv_sys_large_files in #( | |
4537 | no | unknown) ;; | |
4538 | *) | |
4539 | cat >>confdefs.h <<_ACEOF | |
4540 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4541 | _ACEOF | |
4542 | ;; | |
4543 | esac | |
4544 | rm -rf conftest* | |
4545 | fi | |
4546 | fi | |
4547 | ||
4548 | ||
4549 | ||
81ecdfbb RW |
4550 | |
4551 | ||
4552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4553 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4554 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4555 | $as_echo_n "(cached) " >&6 | |
4556 | else | |
4557 | am_cv_prog_cc_stdc=no | |
4558 | ac_save_CC="$CC" | |
4559 | # Don't try gcc -ansi; that turns off useful extensions and | |
4560 | # breaks some systems' header files. | |
4561 | # AIX -qlanglvl=ansi | |
4562 | # Ultrix and OSF/1 -std1 | |
4563 | # HP-UX 10.20 and later -Ae | |
4564 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4565 | # SVR4 -Xc -D__EXTENSIONS__ | |
4566 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4567 | do | |
783e057b | 4568 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4569 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4570 | /* end confdefs.h. */ |
4571 | #include <stdarg.h> | |
4572 | #include <stdio.h> | |
4573 | #include <sys/types.h> | |
4574 | #include <sys/stat.h> | |
4575 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4576 | struct buf { int x; }; | |
4577 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4578 | static char *e (p, i) | |
4579 | char **p; | |
4580 | int i; | |
4581 | { | |
4582 | return p[i]; | |
4583 | } | |
4584 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4585 | { | |
4586 | char *s; | |
4587 | va_list v; | |
4588 | va_start (v,p); | |
4589 | s = g (p, va_arg (v,int)); | |
4590 | va_end (v); | |
4591 | return s; | |
4592 | } | |
4593 | int test (int i, double x); | |
4594 | struct s1 {int (*f) (int a);}; | |
4595 | struct s2 {int (*f) (double a);}; | |
4596 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4597 | int argc; | |
4598 | char **argv; | |
4599 | ||
4600 | int | |
4601 | main () | |
4602 | { | |
4603 | ||
4604 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4605 | ||
4606 | ; | |
4607 | return 0; | |
4608 | } | |
4609 | _ACEOF | |
81ecdfbb | 4610 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4611 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4612 | fi |
81ecdfbb | 4613 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4614 | done |
4615 | CC="$ac_save_CC" | |
4616 | ||
4617 | fi | |
4618 | ||
4619 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4621 | $as_echo "none needed" >&6; } | |
783e057b | 4622 | else |
81ecdfbb RW |
4623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4624 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4625 | fi |
4626 | case "x$am_cv_prog_cc_stdc" in | |
4627 | x|xno) ;; | |
4628 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4629 | esac | |
4630 | ||
4631 | ||
4632 | ac_aux_dir= | |
81ecdfbb RW |
4633 | for ac_dir in .. "$srcdir"/..; do |
4634 | for ac_t in install-sh install.sh shtool; do | |
4635 | if test -f "$ac_dir/$ac_t"; then | |
4636 | ac_aux_dir=$ac_dir | |
4637 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4638 | break 2 | |
4639 | fi | |
4640 | done | |
783e057b DJ |
4641 | done |
4642 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4643 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4644 | fi |
81ecdfbb RW |
4645 | |
4646 | # These three variables are undocumented and unsupported, | |
4647 | # and are intended to be withdrawn in a future Autoconf release. | |
4648 | # They can cause serious problems if a builder's source tree is in a directory | |
4649 | # whose full name contains unusual characters. | |
4650 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4651 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4652 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4653 | ||
783e057b | 4654 | |
783e057b | 4655 | |
81ecdfbb | 4656 | |
a417dc56 RW |
4657 | # Dependency checking. |
4658 | rm -rf .tst 2>/dev/null | |
4659 | mkdir .tst 2>/dev/null | |
4660 | if test -d .tst; then | |
4661 | am__leading_dot=. | |
4662 | else | |
4663 | am__leading_dot=_ | |
4664 | fi | |
4665 | rmdir .tst 2>/dev/null | |
4666 | ||
4667 | DEPDIR="${am__leading_dot}deps" | |
4668 | ||
81ecdfbb | 4669 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4670 | |
4671 | ||
4672 | depcc="$CC" am_compiler_list= | |
4673 | ||
4674 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4676 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4677 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4678 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4679 | else |
4680 | if test -f "$am_depcomp"; then | |
4681 | # We make a subdir and do the tests there. Otherwise we can end up | |
4682 | # making bogus files that we don't know about and never remove. For | |
4683 | # instance it was reported that on HP-UX the gcc test will end up | |
4684 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4685 | # in D'. | |
4686 | mkdir conftest.dir | |
4687 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4688 | # using a relative directory. | |
4689 | cp "$am_depcomp" conftest.dir | |
4690 | cd conftest.dir | |
4691 | # We will build objects and dependencies in a subdirectory because | |
4692 | # it helps to detect inapplicable dependency modes. For instance | |
4693 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4694 | # side effect of compilation, but ICC will put the dependencies in | |
4695 | # the current directory while Tru64 will put them in the object | |
4696 | # directory. | |
4697 | mkdir sub | |
4698 | ||
4699 | am_cv_CC_dependencies_compiler_type=none | |
4700 | if test "$am_compiler_list" = ""; then | |
4701 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4702 | fi | |
4703 | for depmode in $am_compiler_list; do | |
4704 | if test $depmode = none; then break; fi | |
4705 | ||
81ecdfbb | 4706 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4707 | # Setup a source with many dependencies, because some compilers |
4708 | # like to wrap large dependency lists on column 80 (with \), and | |
4709 | # we should not choose a depcomp mode which is confused by this. | |
4710 | # | |
4711 | # We need to recreate these files for each test, as the compiler may | |
4712 | # overwrite some of them when testing with obscure command lines. | |
4713 | # This happens at least with the AIX C compiler. | |
4714 | : > sub/conftest.c | |
4715 | for i in 1 2 3 4 5 6; do | |
4716 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4717 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4718 | # Solaris 8's {/usr,}/bin/sh. | |
4719 | touch sub/conftst$i.h | |
4720 | done | |
4721 | echo "include sub/conftest.Po" > confmf | |
4722 | ||
4723 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4724 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4725 | # handle `-M -o', and we need to detect this. | |
4726 | depcmd="depmode=$depmode \ | |
4727 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4728 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4729 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4730 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4731 | if env $depcmd > conftest.err 2>&1 && | |
4732 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4733 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4734 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4735 | # icc doesn't choke on unknown options, it will just issue warnings | |
4736 | # or remarks (even with -Werror). So we grep stderr for any message | |
4737 | # that says an option was ignored or not supported. | |
4738 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4739 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4740 | # The diagnosis changed in icc 8.0: | |
4741 | # icc: Command line remark: option '-MP' not supported | |
4742 | if (grep 'ignoring option' conftest.err || | |
4743 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4744 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4745 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4746 | break |
4747 | fi | |
4748 | fi | |
81ecdfbb | 4749 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4750 | sed -e 's/^/| /' < conftest.err >&5 |
4751 | done | |
4752 | ||
4753 | cd .. | |
4754 | rm -rf conftest.dir | |
4755 | else | |
4756 | am_cv_CC_dependencies_compiler_type=none | |
4757 | fi | |
4758 | ||
4759 | fi | |
81ecdfbb RW |
4760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4761 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4762 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4763 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4764 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4765 | ||
4766 | fi | |
4767 | ||
4768 | ||
4769 | # Check for the 'make' the user wants to use. | |
4770 | for ac_prog in make | |
4771 | do | |
4772 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4773 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4775 | $as_echo_n "checking for $ac_word... " >&6; } | |
4776 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4777 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4778 | else |
4779 | if test -n "$MAKE"; then | |
4780 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4781 | else | |
4782 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4783 | for as_dir in $PATH | |
4784 | do | |
4785 | IFS=$as_save_IFS | |
4786 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4787 | for ac_exec_ext in '' $ac_executable_extensions; do |
4788 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4789 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4790 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4791 | break 2 |
4792 | fi | |
4793 | done | |
81ecdfbb RW |
4794 | done |
4795 | IFS=$as_save_IFS | |
a417dc56 RW |
4796 | |
4797 | fi | |
4798 | fi | |
4799 | MAKE=$ac_cv_prog_MAKE | |
4800 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4802 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4803 | else |
81ecdfbb RW |
4804 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4805 | $as_echo "no" >&6; } | |
a417dc56 RW |
4806 | fi |
4807 | ||
81ecdfbb | 4808 | |
a417dc56 RW |
4809 | test -n "$MAKE" && break |
4810 | done | |
4811 | ||
4812 | MAKE_IS_GNU= | |
4813 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4814 | *GNU*) | |
4815 | MAKE_IS_GNU=yes | |
4816 | ;; | |
4817 | esac | |
81ecdfbb | 4818 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4819 | GMAKE_TRUE= |
4820 | GMAKE_FALSE='#' | |
4821 | else | |
4822 | GMAKE_TRUE='#' | |
4823 | GMAKE_FALSE= | |
4824 | fi | |
4825 | ||
81ecdfbb RW |
4826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4827 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4828 | set x ${MAKE-make} | |
4829 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4830 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4831 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4832 | else |
4833 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4834 | SHELL = /bin/sh |
a417dc56 | 4835 | all: |
81ecdfbb | 4836 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4837 | _ACEOF |
4838 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4839 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4840 | *@@@%%%=?*=@@@%%%*) | |
4841 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4842 | *) | |
4843 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4844 | esac | |
a417dc56 RW |
4845 | rm -f conftest.make |
4846 | fi | |
81ecdfbb RW |
4847 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4849 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4850 | SET_MAKE= |
4851 | else | |
81ecdfbb RW |
4852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4853 | $as_echo "no" >&6; } | |
a417dc56 RW |
4854 | SET_MAKE="MAKE=${MAKE-make}" |
4855 | fi | |
4856 | ||
4857 | ||
783e057b DJ |
4858 | |
4859 | CONFIG_OBS= | |
4860 | CONFIG_DEPS= | |
4861 | CONFIG_SRCS= | |
4862 | ENABLE_CFLAGS= | |
4863 | ||
4864 | CONFIG_ALL= | |
4865 | CONFIG_CLEAN= | |
4866 | CONFIG_INSTALL= | |
4867 | CONFIG_UNINSTALL= | |
4868 | ||
4869 | # If we haven't got the data from the intl directory, | |
4870 | # assume NLS is disabled. | |
4871 | USE_NLS=no | |
4872 | LIBINTL= | |
4873 | LIBINTL_DEP= | |
4874 | INCINTL= | |
4875 | XGETTEXT= | |
4876 | GMSGFMT= | |
4877 | POSUB= | |
4878 | ||
4879 | if test -f ../intl/config.intl; then | |
4880 | . ../intl/config.intl | |
4881 | fi | |
81ecdfbb RW |
4882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4883 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4884 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4886 | $as_echo "no" >&6; } | |
783e057b | 4887 | else |
81ecdfbb RW |
4888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4889 | $as_echo "yes" >&6; } | |
783e057b | 4890 | |
81ecdfbb | 4891 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4892 | |
4893 | ||
81ecdfbb RW |
4894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4895 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4896 | # Look for .po and .gmo files in the source directory. |
4897 | CATALOGS= | |
4898 | XLINGUAS= | |
4899 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4900 | # If there aren't any .gmo files the shell will give us the | |
4901 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4902 | # weeded out. | |
4903 | case "$cat" in *\**) | |
4904 | continue;; | |
4905 | esac | |
4906 | # The quadruple backslash is collapsed to a double backslash | |
4907 | # by the backticks, then collapsed again by the double quotes, | |
4908 | # leaving us with one backslash in the sed expression (right | |
4909 | # before the dot that mustn't act as a wildcard). | |
4910 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
4911 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4912 | # The user is allowed to set LINGUAS to a list of languages to | |
4913 | # install catalogs for. If it's empty that means "all of them." | |
4914 | if test "x$LINGUAS" = x; then | |
4915 | CATALOGS="$CATALOGS $cat" | |
4916 | XLINGUAS="$XLINGUAS $lang" | |
4917 | else | |
4918 | case "$LINGUAS" in *$lang*) | |
4919 | CATALOGS="$CATALOGS $cat" | |
4920 | XLINGUAS="$XLINGUAS $lang" | |
4921 | ;; | |
4922 | esac | |
4923 | fi | |
4924 | done | |
4925 | LINGUAS="$XLINGUAS" | |
81ecdfbb RW |
4926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
4927 | $as_echo "$LINGUAS" >&6; } | |
783e057b DJ |
4928 | |
4929 | ||
4930 | DATADIRNAME=share | |
4931 | ||
4932 | INSTOBJEXT=.mo | |
4933 | ||
4934 | GENCAT=gencat | |
4935 | ||
4936 | CATOBJEXT=.gmo | |
4937 | ||
4938 | fi | |
4939 | ||
4940 | localedir='${datadir}/locale' | |
4941 | ||
4942 | ||
4943 | if test x"$USE_NLS" = xyes; then | |
4944 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4945 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4946 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4947 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
4948 | fi | |
4949 | ||
4950 | ||
f434ba03 PA |
4951 | |
4952 | ||
4953 | ||
4954 | LIBC_FATAL_STDERR_=1 | |
4955 | export LIBC_FATAL_STDERR_ | |
4956 | ||
4957 | ||
4958 | ||
4959 | ||
4960 | ||
4961 | for ac_header in $gl_header_list | |
4962 | do : | |
4963 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4964 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
4965 | eval as_val=\$$as_ac_Header | |
4966 | if test "x$as_val" = x""yes; then : | |
4967 | cat >>confdefs.h <<_ACEOF | |
4968 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4969 | _ACEOF | |
4970 | ||
4971 | fi | |
4972 | ||
4973 | done | |
4974 | ||
4975 | ||
4976 | ||
4977 | ||
4978 | ||
4979 | ||
4980 | ||
4981 | ||
4982 | ||
4983 | for ac_func in $gl_func_list | |
4984 | do : | |
4985 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
4986 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
4987 | eval as_val=\$$as_ac_var | |
4988 | if test "x$as_val" = x""yes; then : | |
4989 | cat >>confdefs.h <<_ACEOF | |
4990 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
4991 | _ACEOF | |
4992 | ||
4993 | fi | |
4994 | done | |
4995 | ||
4996 | ||
4997 | ||
4998 | ||
4999 | ||
5000 | ||
5001 | GNULIB_MEMCHR=0; | |
5002 | GNULIB_MEMMEM=0; | |
5003 | GNULIB_MEMPCPY=0; | |
5004 | GNULIB_MEMRCHR=0; | |
5005 | GNULIB_RAWMEMCHR=0; | |
5006 | GNULIB_STPCPY=0; | |
5007 | GNULIB_STPNCPY=0; | |
5008 | GNULIB_STRCHRNUL=0; | |
5009 | GNULIB_STRDUP=0; | |
5010 | GNULIB_STRNCAT=0; | |
5011 | GNULIB_STRNDUP=0; | |
5012 | GNULIB_STRNLEN=0; | |
5013 | GNULIB_STRPBRK=0; | |
5014 | GNULIB_STRSEP=0; | |
5015 | GNULIB_STRSTR=0; | |
5016 | GNULIB_STRCASESTR=0; | |
5017 | GNULIB_STRTOK_R=0; | |
5018 | GNULIB_MBSLEN=0; | |
5019 | GNULIB_MBSNLEN=0; | |
5020 | GNULIB_MBSCHR=0; | |
5021 | GNULIB_MBSRCHR=0; | |
5022 | GNULIB_MBSSTR=0; | |
5023 | GNULIB_MBSCASECMP=0; | |
5024 | GNULIB_MBSNCASECMP=0; | |
5025 | GNULIB_MBSPCASECMP=0; | |
5026 | GNULIB_MBSCASESTR=0; | |
5027 | GNULIB_MBSCSPN=0; | |
5028 | GNULIB_MBSPBRK=0; | |
5029 | GNULIB_MBSSPN=0; | |
5030 | GNULIB_MBSSEP=0; | |
5031 | GNULIB_MBSTOK_R=0; | |
5032 | GNULIB_STRERROR=0; | |
5033 | GNULIB_STRSIGNAL=0; | |
5034 | GNULIB_STRVERSCMP=0; | |
5035 | HAVE_MBSLEN=0; | |
5036 | HAVE_MEMCHR=1; | |
5037 | HAVE_DECL_MEMMEM=1; | |
5038 | HAVE_MEMPCPY=1; | |
5039 | HAVE_DECL_MEMRCHR=1; | |
5040 | HAVE_RAWMEMCHR=1; | |
5041 | HAVE_STPCPY=1; | |
5042 | HAVE_STPNCPY=1; | |
5043 | HAVE_STRCHRNUL=1; | |
5044 | HAVE_DECL_STRDUP=1; | |
5045 | HAVE_DECL_STRNDUP=1; | |
5046 | HAVE_DECL_STRNLEN=1; | |
5047 | HAVE_STRPBRK=1; | |
5048 | HAVE_STRSEP=1; | |
5049 | HAVE_STRCASESTR=1; | |
5050 | HAVE_DECL_STRTOK_R=1; | |
5051 | HAVE_DECL_STRSIGNAL=1; | |
5052 | HAVE_STRVERSCMP=1; | |
5053 | REPLACE_MEMCHR=0; | |
783e057b | 5054 | REPLACE_MEMMEM=0; |
f434ba03 PA |
5055 | REPLACE_STPNCPY=0; |
5056 | REPLACE_STRDUP=0; | |
783e057b | 5057 | REPLACE_STRSTR=0; |
f434ba03 PA |
5058 | REPLACE_STRCASESTR=0; |
5059 | REPLACE_STRERROR=0; | |
5060 | REPLACE_STRNCAT=0; | |
5061 | REPLACE_STRNDUP=0; | |
5062 | REPLACE_STRNLEN=0; | |
5063 | REPLACE_STRSIGNAL=0; | |
5064 | REPLACE_STRTOK_R=0; | |
5065 | UNDEFINE_STRTOK_R=0; | |
5066 | ||
5067 | ||
5068 | ||
5069 | ||
5070 | ||
5071 | ||
5072 | ||
5073 | ||
5074 | ||
5075 | ||
5076 | ||
5077 | ||
5078 | ||
5079 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it | |
5080 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | |
5081 | # irrelevant for anonymous mappings. | |
5082 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
5083 | if test "x$ac_cv_func_mmap" = x""yes; then : | |
5084 | gl_have_mmap=yes | |
5085 | else | |
5086 | gl_have_mmap=no | |
5087 | fi | |
5088 | ||
5089 | ||
5090 | # Try to allow MAP_ANONYMOUS. | |
5091 | gl_have_mmap_anonymous=no | |
5092 | if test $gl_have_mmap = yes; then | |
5093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 | |
5094 | $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } | |
5095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5096 | /* end confdefs.h. */ | |
5097 | ||
5098 | #include <sys/mman.h> | |
5099 | #ifdef MAP_ANONYMOUS | |
5100 | I cant identify this map. | |
5101 | #endif | |
5102 | ||
5103 | _ACEOF | |
5104 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5105 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5106 | gl_have_mmap_anonymous=yes | |
5107 | fi | |
5108 | rm -f conftest* | |
5109 | ||
5110 | if test $gl_have_mmap_anonymous != yes; then | |
5111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5112 | /* end confdefs.h. */ | |
5113 | ||
5114 | #include <sys/mman.h> | |
5115 | #ifdef MAP_ANON | |
5116 | I cant identify this map. | |
5117 | #endif | |
5118 | ||
5119 | _ACEOF | |
5120 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5121 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5122 | ||
5123 | $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h | |
5124 | ||
5125 | gl_have_mmap_anonymous=yes | |
5126 | fi | |
5127 | rm -f conftest* | |
5128 | ||
5129 | fi | |
5130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 | |
5131 | $as_echo "$gl_have_mmap_anonymous" >&6; } | |
5132 | if test $gl_have_mmap_anonymous = yes; then | |
5133 | ||
5134 | $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h | |
5135 | ||
5136 | fi | |
5137 | fi | |
5138 | ||
5139 | ||
5140 | : | |
5141 | ||
5142 | ||
5143 | ||
5144 | ||
5145 | ||
5146 | ||
5147 | : | |
5148 | ||
5149 | ||
5150 | ||
5151 | ||
5152 | ||
5153 | ||
5154 | ||
5155 | ||
5156 | : | |
5157 | ||
5158 | ||
5159 | ||
5160 | ||
5161 | ||
5162 | if test $ac_cv_func_memchr = yes; then | |
5163 | # Detect platform-specific bugs in some versions of glibc: | |
5164 | # memchr should not dereference anything with length 0 | |
5165 | # http://bugzilla.redhat.com/499689 | |
5166 | # memchr should not dereference overestimated length after a match | |
5167 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | |
5168 | # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 | |
5169 | # Assume that memchr works on platforms that lack mprotect. | |
5170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 | |
5171 | $as_echo_n "checking whether memchr works... " >&6; } | |
5172 | if test "${gl_cv_func_memchr_works+set}" = set; then : | |
5173 | $as_echo_n "(cached) " >&6 | |
5174 | else | |
5175 | if test "$cross_compiling" = yes; then : | |
5176 | gl_cv_func_memchr_works="guessing no" | |
5177 | else | |
5178 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5179 | /* end confdefs.h. */ | |
5180 | ||
5181 | #include <string.h> | |
5182 | #if HAVE_SYS_MMAN_H | |
5183 | # include <fcntl.h> | |
5184 | # include <unistd.h> | |
5185 | # include <sys/types.h> | |
5186 | # include <sys/mman.h> | |
5187 | # ifndef MAP_FILE | |
5188 | # define MAP_FILE 0 | |
5189 | # endif | |
5190 | #endif | |
5191 | ||
5192 | int | |
5193 | main () | |
5194 | { | |
5195 | ||
5196 | char *fence = NULL; | |
5197 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | |
5198 | # if HAVE_MAP_ANONYMOUS | |
5199 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | |
5200 | const int fd = -1; | |
5201 | # else /* !HAVE_MAP_ANONYMOUS */ | |
5202 | const int flags = MAP_FILE | MAP_PRIVATE; | |
5203 | int fd = open ("/dev/zero", O_RDONLY, 0666); | |
5204 | if (fd >= 0) | |
5205 | # endif | |
5206 | { | |
5207 | int pagesize = getpagesize (); | |
5208 | char *two_pages = | |
5209 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | |
5210 | flags, fd, 0); | |
5211 | if (two_pages != (char *)(-1) | |
5212 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | |
5213 | fence = two_pages + pagesize; | |
5214 | } | |
5215 | #endif | |
5216 | if (fence) | |
5217 | { | |
5218 | if (memchr (fence, 0, 0)) | |
5219 | return 1; | |
5220 | strcpy (fence - 9, "12345678"); | |
5221 | if (memchr (fence - 9, 0, 79) != fence - 1) | |
5222 | return 2; | |
5223 | } | |
5224 | return 0; | |
5225 | ||
5226 | ; | |
5227 | return 0; | |
5228 | } | |
5229 | _ACEOF | |
5230 | if ac_fn_c_try_run "$LINENO"; then : | |
5231 | gl_cv_func_memchr_works=yes | |
5232 | else | |
5233 | gl_cv_func_memchr_works=no | |
5234 | fi | |
5235 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5236 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5237 | fi | |
5238 | ||
5239 | fi | |
5240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 | |
5241 | $as_echo "$gl_cv_func_memchr_works" >&6; } | |
5242 | if test "$gl_cv_func_memchr_works" != yes; then | |
5243 | REPLACE_MEMCHR=1 | |
5244 | fi | |
5245 | else | |
5246 | HAVE_MEMCHR=0 | |
5247 | fi | |
5248 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then | |
5249 | ||
5250 | ||
5251 | ||
5252 | ||
5253 | ||
5254 | ||
5255 | ||
5256 | ||
5257 | gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" | |
5258 | ||
5259 | ||
5260 | for ac_header in bp-sym.h | |
5261 | do : | |
5262 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
5263 | if test "x$ac_cv_header_bp_sym_h" = x""yes; then : | |
5264 | cat >>confdefs.h <<_ACEOF | |
5265 | #define HAVE_BP_SYM_H 1 | |
5266 | _ACEOF | |
5267 | ||
5268 | fi | |
5269 | ||
5270 | done | |
5271 | ||
5272 | ||
5273 | fi | |
783e057b DJ |
5274 | |
5275 | ||
81ecdfbb RW |
5276 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
5277 | if test "x$ac_cv_have_decl_memmem" = x""yes; then : | |
5278 | ac_have_decl=1 | |
783e057b | 5279 | else |
81ecdfbb | 5280 | ac_have_decl=0 |
783e057b | 5281 | fi |
783e057b DJ |
5282 | |
5283 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 5284 | #define HAVE_DECL_MEMMEM $ac_have_decl |
783e057b DJ |
5285 | _ACEOF |
5286 | ||
5287 | ||
783e057b DJ |
5288 | |
5289 | ||
5290 | ||
5291 | ||
5292 | ||
5293 | ||
5294 | ||
5295 | ||
783e057b | 5296 | |
783e057b | 5297 | |
783e057b | 5298 | |
f434ba03 | 5299 | |
81ecdfbb RW |
5300 | for ac_func in memmem |
5301 | do : | |
5302 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
5303 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 5304 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5305 | #define HAVE_MEMMEM 1 |
783e057b DJ |
5306 | _ACEOF |
5307 | ||
5308 | else | |
5309 | ||
5310 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
5311 | ||
5312 | fi | |
5313 | done | |
5314 | ||
5315 | ||
5316 | ||
5317 | : | |
5318 | ||
5319 | ||
5320 | ||
5321 | ||
5322 | ||
5323 | if test $ac_cv_have_decl_memmem = no; then | |
5324 | HAVE_DECL_MEMMEM=0 | |
5325 | fi | |
5326 | : | |
5327 | ||
5328 | ||
f434ba03 PA |
5329 | gl_cv_c_multiarch=no |
5330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5331 | /* end confdefs.h. */ | |
5332 | #ifndef __APPLE_CC__ | |
5333 | not a universal capable compiler | |
5334 | #endif | |
5335 | typedef int dummy; | |
5336 | ||
5337 | _ACEOF | |
5338 | if ac_fn_c_try_compile "$LINENO"; then : | |
5339 | ||
5340 | arch= | |
5341 | prev= | |
5342 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
5343 | if test -n "$prev"; then | |
5344 | case $word in | |
5345 | i?86 | x86_64 | ppc | ppc64) | |
5346 | if test -z "$arch" || test "$arch" = "$word"; then | |
5347 | arch="$word" | |
5348 | else | |
5349 | gl_cv_c_multiarch=yes | |
5350 | fi | |
5351 | ;; | |
5352 | esac | |
5353 | prev= | |
5354 | else | |
5355 | if test "x$word" = "x-arch"; then | |
5356 | prev=arch | |
5357 | fi | |
5358 | fi | |
5359 | done | |
5360 | ||
5361 | fi | |
5362 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5363 | if test $gl_cv_c_multiarch = yes; then | |
5364 | ||
5365 | $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
5366 | ||
5367 | APPLE_UNIVERSAL_BUILD=1 | |
5368 | else | |
5369 | APPLE_UNIVERSAL_BUILD=0 | |
5370 | fi | |
5371 | ||
5372 | ||
5373 | ||
5374 | REPLACE_NULL=0; | |
5375 | HAVE_WCHAR_T=1; | |
5376 | STDDEF_H=''; | |
5377 | ||
5378 | ||
5379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
5380 | $as_echo_n "checking for wchar_t... " >&6; } | |
5381 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
5382 | $as_echo_n "(cached) " >&6 | |
5383 | else | |
5384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5385 | /* end confdefs.h. */ | |
5386 | #include <stddef.h> | |
5387 | wchar_t foo = (wchar_t)'\0'; | |
5388 | int | |
5389 | main () | |
5390 | { | |
5391 | ||
5392 | ; | |
5393 | return 0; | |
5394 | } | |
5395 | _ACEOF | |
5396 | if ac_fn_c_try_compile "$LINENO"; then : | |
5397 | gt_cv_c_wchar_t=yes | |
5398 | else | |
5399 | gt_cv_c_wchar_t=no | |
5400 | fi | |
5401 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5402 | fi | |
5403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
5404 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
5405 | if test $gt_cv_c_wchar_t = yes; then | |
5406 | ||
5407 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
5408 | ||
5409 | fi | |
5410 | ||
5411 | ||
5412 | ||
5413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
5414 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
5415 | if test "${gl_cv_have_include_next+set}" = set; then : | |
5416 | $as_echo_n "(cached) " >&6 | |
5417 | else | |
5418 | rm -rf conftestd1a conftestd1b conftestd2 | |
5419 | mkdir conftestd1a conftestd1b conftestd2 | |
5420 | cat <<EOF > conftestd1a/conftest.h | |
5421 | #define DEFINED_IN_CONFTESTD1 | |
5422 | #include_next <conftest.h> | |
5423 | #ifdef DEFINED_IN_CONFTESTD2 | |
5424 | int foo; | |
5425 | #else | |
5426 | #error "include_next doesn't work" | |
5427 | #endif | |
5428 | EOF | |
5429 | cat <<EOF > conftestd1b/conftest.h | |
5430 | #define DEFINED_IN_CONFTESTD1 | |
5431 | #include <stdio.h> | |
5432 | #include_next <conftest.h> | |
5433 | #ifdef DEFINED_IN_CONFTESTD2 | |
5434 | int foo; | |
5435 | #else | |
5436 | #error "include_next doesn't work" | |
5437 | #endif | |
5438 | EOF | |
5439 | cat <<EOF > conftestd2/conftest.h | |
5440 | #ifndef DEFINED_IN_CONFTESTD1 | |
5441 | #error "include_next test doesn't work" | |
5442 | #endif | |
5443 | #define DEFINED_IN_CONFTESTD2 | |
5444 | EOF | |
5445 | gl_save_CPPFLAGS="$CPPFLAGS" | |
5446 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
5447 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5448 | /* end confdefs.h. */ | |
5449 | #include <conftest.h> | |
5450 | _ACEOF | |
5451 | if ac_fn_c_try_compile "$LINENO"; then : | |
5452 | gl_cv_have_include_next=yes | |
5453 | else | |
5454 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
5455 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5456 | /* end confdefs.h. */ | |
5457 | #include <conftest.h> | |
5458 | _ACEOF | |
5459 | if ac_fn_c_try_compile "$LINENO"; then : | |
5460 | gl_cv_have_include_next=buggy | |
5461 | else | |
5462 | gl_cv_have_include_next=no | |
5463 | fi | |
5464 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5465 | ||
5466 | fi | |
5467 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5468 | CPPFLAGS="$gl_save_CPPFLAGS" | |
5469 | rm -rf conftestd1a conftestd1b conftestd2 | |
5470 | ||
5471 | fi | |
5472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
5473 | $as_echo "$gl_cv_have_include_next" >&6; } | |
5474 | PRAGMA_SYSTEM_HEADER= | |
5475 | if test $gl_cv_have_include_next = yes; then | |
5476 | INCLUDE_NEXT=include_next | |
5477 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5478 | if test -n "$GCC"; then | |
5479 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
5480 | fi | |
5481 | else | |
5482 | if test $gl_cv_have_include_next = buggy; then | |
5483 | INCLUDE_NEXT=include | |
5484 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5485 | else | |
5486 | INCLUDE_NEXT=include | |
5487 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
5488 | fi | |
5489 | fi | |
5490 | ||
5491 | ||
5492 | ||
5493 | ||
5494 | ||
5495 | ||
5496 | ||
5497 | ||
5498 | ||
5499 | ||
81ecdfbb RW |
5500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
5501 | $as_echo_n "checking for long long int... " >&6; } | |
5502 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
5503 | $as_echo_n "(cached) " >&6 | |
783e057b | 5504 | else |
81ecdfbb | 5505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5506 | /* end confdefs.h. */ |
81ecdfbb RW |
5507 | |
5508 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5509 | implementations with broken preprocessors. Perhaps this can |
5510 | be revisited in 2012. In the meantime, code should not expect | |
5511 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5512 | /* Test literals. */ |
5513 | long long int ll = 9223372036854775807ll; | |
5514 | long long int nll = -9223372036854775807LL; | |
5515 | unsigned long long int ull = 18446744073709551615ULL; | |
5516 | /* Test constant expressions. */ | |
5517 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5518 | ? 1 : -1)]; |
783e057b | 5519 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5520 | ? 1 : -1)]; |
783e057b DJ |
5521 | int i = 63; |
5522 | int | |
5523 | main () | |
5524 | { | |
5525 | /* Test availability of runtime routines for shift and division. */ | |
5526 | long long int llmax = 9223372036854775807ll; | |
5527 | unsigned long long int ullmax = 18446744073709551615ull; | |
5528 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5529 | | (llmax / ll) | (llmax % ll) |
5530 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5531 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5532 | ; |
5533 | return 0; | |
5534 | } | |
5535 | ||
5536 | _ACEOF | |
81ecdfbb | 5537 | if ac_fn_c_try_link "$LINENO"; then : |
f434ba03 | 5538 | if test "$cross_compiling" = yes; then : |
783e057b DJ |
5539 | ac_cv_type_long_long_int=yes |
5540 | else | |
81ecdfbb | 5541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5542 | /* end confdefs.h. */ |
5543 | #include <limits.h> | |
f434ba03 PA |
5544 | #ifndef LLONG_MAX |
5545 | # define HALF \ | |
5546 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
5547 | # define LLONG_MAX (HALF - 1 + HALF) | |
5548 | #endif | |
783e057b DJ |
5549 | int |
5550 | main () | |
5551 | { | |
5552 | long long int n = 1; | |
f434ba03 PA |
5553 | int i; |
5554 | for (i = 0; ; i++) | |
5555 | { | |
5556 | long long int m = n << i; | |
5557 | if (m >> i != n) | |
5558 | return 1; | |
5559 | if (LLONG_MAX / 2 < m) | |
5560 | break; | |
5561 | } | |
5562 | return 0; | |
783e057b DJ |
5563 | ; |
5564 | return 0; | |
5565 | } | |
5566 | _ACEOF | |
81ecdfbb | 5567 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
5568 | ac_cv_type_long_long_int=yes |
5569 | else | |
81ecdfbb | 5570 | ac_cv_type_long_long_int=no |
783e057b | 5571 | fi |
81ecdfbb RW |
5572 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5573 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 5574 | fi |
783e057b | 5575 | |
81ecdfbb RW |
5576 | else |
5577 | ac_cv_type_long_long_int=no | |
783e057b | 5578 | fi |
81ecdfbb RW |
5579 | rm -f core conftest.err conftest.$ac_objext \ |
5580 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5581 | fi |
81ecdfbb RW |
5582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
5583 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
783e057b DJ |
5584 | if test $ac_cv_type_long_long_int = yes; then |
5585 | ||
81ecdfbb | 5586 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5587 | |
5588 | fi | |
5589 | ||
5590 | ||
81ecdfbb RW |
5591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
5592 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
5593 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
5594 | $as_echo_n "(cached) " >&6 | |
783e057b | 5595 | else |
81ecdfbb | 5596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5597 | /* end confdefs.h. */ |
81ecdfbb RW |
5598 | |
5599 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5600 | implementations with broken preprocessors. Perhaps this can |
5601 | be revisited in 2012. In the meantime, code should not expect | |
5602 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5603 | /* Test literals. */ |
5604 | long long int ll = 9223372036854775807ll; | |
5605 | long long int nll = -9223372036854775807LL; | |
5606 | unsigned long long int ull = 18446744073709551615ULL; | |
5607 | /* Test constant expressions. */ | |
5608 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5609 | ? 1 : -1)]; |
783e057b | 5610 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5611 | ? 1 : -1)]; |
783e057b DJ |
5612 | int i = 63; |
5613 | int | |
5614 | main () | |
5615 | { | |
5616 | /* Test availability of runtime routines for shift and division. */ | |
5617 | long long int llmax = 9223372036854775807ll; | |
5618 | unsigned long long int ullmax = 18446744073709551615ull; | |
5619 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5620 | | (llmax / ll) | (llmax % ll) |
5621 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5622 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5623 | ; |
5624 | return 0; | |
5625 | } | |
5626 | ||
5627 | _ACEOF | |
81ecdfbb | 5628 | if ac_fn_c_try_link "$LINENO"; then : |
783e057b DJ |
5629 | ac_cv_type_unsigned_long_long_int=yes |
5630 | else | |
81ecdfbb | 5631 | ac_cv_type_unsigned_long_long_int=no |
783e057b | 5632 | fi |
81ecdfbb RW |
5633 | rm -f core conftest.err conftest.$ac_objext \ |
5634 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5635 | fi |
81ecdfbb RW |
5636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 |
5637 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
783e057b DJ |
5638 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
5639 | ||
81ecdfbb | 5640 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5641 | |
5642 | fi | |
5643 | ||
5644 | ||
5645 | ||
783e057b DJ |
5646 | |
5647 | ||
5648 | ||
5649 | ||
5650 | ||
5651 | ||
5652 | ||
5653 | ||
81ecdfbb RW |
5654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
5655 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
5656 | if test "${ac_cv_c_restrict+set}" = set; then : | |
5657 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
5658 | else |
5659 | ac_cv_c_restrict=no | |
5660 | # The order here caters to the fact that C++ does not require restrict. | |
5661 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
81ecdfbb | 5662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5663 | /* end confdefs.h. */ |
5664 | typedef int * int_ptr; | |
5665 | int foo (int_ptr $ac_kw ip) { | |
5666 | return ip[0]; | |
5667 | } | |
5668 | int | |
5669 | main () | |
5670 | { | |
5671 | int s[1]; | |
5672 | int * $ac_kw t = s; | |
5673 | t[0] = 0; | |
5674 | return foo(t) | |
5675 | ; | |
5676 | return 0; | |
5677 | } | |
5678 | _ACEOF | |
81ecdfbb | 5679 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5680 | ac_cv_c_restrict=$ac_kw |
783e057b | 5681 | fi |
81ecdfbb | 5682 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5683 | test "$ac_cv_c_restrict" != no && break |
5684 | done | |
5685 | ||
5686 | fi | |
81ecdfbb RW |
5687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
5688 | $as_echo "$ac_cv_c_restrict" >&6; } | |
783e057b DJ |
5689 | |
5690 | case $ac_cv_c_restrict in | |
5691 | restrict) ;; | |
81ecdfbb | 5692 | no) $as_echo "#define restrict /**/" >>confdefs.h |
783e057b DJ |
5693 | ;; |
5694 | *) cat >>confdefs.h <<_ACEOF | |
5695 | #define restrict $ac_cv_c_restrict | |
5696 | _ACEOF | |
5697 | ;; | |
5698 | esac | |
5699 | ||
5700 | ||
5701 | ||
5702 | ||
5703 | ||
5704 | ||
5705 | ||
5706 | ||
5707 | ||
5708 | ||
5709 | ||
5710 | ||
f434ba03 | 5711 | |
783e057b DJ |
5712 | : |
5713 | ||
5714 | ||
5715 | ||
5716 | ||
5717 | ||
5718 | ||
5719 | ||
f434ba03 PA |
5720 | if test $gl_cv_have_include_next = yes; then |
5721 | gl_cv_next_string_h='<'string.h'>' | |
5722 | else | |
5723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 | |
5724 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
5725 | if test "${gl_cv_next_string_h+set}" = set; then : | |
5726 | $as_echo_n "(cached) " >&6 | |
5727 | else | |
5728 | ||
5729 | if test $ac_cv_header_string_h = yes; then | |
5730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5731 | /* end confdefs.h. */ | |
5732 | #include <string.h> | |
5733 | ||
5734 | _ACEOF | |
5735 | case "$host_os" in | |
5736 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
5737 | *) gl_absname_cpp="$ac_cpp" ;; | |
5738 | esac | |
5739 | gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
5740 | sed -n '\#/string.h#{ | |
5741 | s#.*"\(.*/string.h\)".*#\1# | |
5742 | s#^/[^/]#//&# | |
5743 | p | |
5744 | q | |
5745 | }'`'"' | |
5746 | else | |
5747 | gl_cv_next_string_h='<'string.h'>' | |
5748 | fi | |
5749 | ||
5750 | fi | |
5751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 | |
5752 | $as_echo "$gl_cv_next_string_h" >&6; } | |
5753 | fi | |
5754 | NEXT_STRING_H=$gl_cv_next_string_h | |
5755 | ||
5756 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
5757 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5758 | gl_next_as_first_directive='<'string.h'>' | |
5759 | else | |
5760 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5761 | gl_next_as_first_directive=$gl_cv_next_string_h | |
5762 | fi | |
5763 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive | |
5764 | ||
5765 | ||
5766 | ||
5767 | ||
5768 | ||
5769 | for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do | |
5770 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
5771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
5772 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
5773 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5774 | $as_echo_n "(cached) " >&6 | |
5775 | else | |
5776 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5777 | /* end confdefs.h. */ | |
5778 | #include <string.h> | |
5779 | ||
5780 | int | |
5781 | main () | |
5782 | { | |
5783 | #undef $gl_func | |
5784 | (void) $gl_func; | |
5785 | ; | |
5786 | return 0; | |
5787 | } | |
5788 | _ACEOF | |
5789 | if ac_fn_c_try_compile "$LINENO"; then : | |
5790 | eval "$as_gl_Symbol=yes" | |
5791 | else | |
5792 | eval "$as_gl_Symbol=no" | |
5793 | fi | |
5794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5795 | fi | |
5796 | eval ac_res=\$$as_gl_Symbol | |
5797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5798 | $as_echo "$ac_res" >&6; } | |
5799 | eval as_val=\$$as_gl_Symbol | |
5800 | if test "x$as_val" = x""yes; then : | |
5801 | cat >>confdefs.h <<_ACEOF | |
5802 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
5803 | _ACEOF | |
5804 | ||
5805 | eval ac_cv_have_decl_$gl_func=yes | |
5806 | fi | |
5807 | done | |
5808 | ||
5809 | ||
5810 | ||
5811 | GNULIB_BTOWC=0; | |
5812 | GNULIB_WCTOB=0; | |
5813 | GNULIB_MBSINIT=0; | |
5814 | GNULIB_MBRTOWC=0; | |
5815 | GNULIB_MBRLEN=0; | |
5816 | GNULIB_MBSRTOWCS=0; | |
5817 | GNULIB_MBSNRTOWCS=0; | |
5818 | GNULIB_WCRTOMB=0; | |
5819 | GNULIB_WCSRTOMBS=0; | |
5820 | GNULIB_WCSNRTOMBS=0; | |
5821 | GNULIB_WCWIDTH=0; | |
5822 | HAVE_BTOWC=1; | |
5823 | HAVE_MBSINIT=1; | |
5824 | HAVE_MBRTOWC=1; | |
5825 | HAVE_MBRLEN=1; | |
5826 | HAVE_MBSRTOWCS=1; | |
5827 | HAVE_MBSNRTOWCS=1; | |
5828 | HAVE_WCRTOMB=1; | |
5829 | HAVE_WCSRTOMBS=1; | |
5830 | HAVE_WCSNRTOMBS=1; | |
5831 | HAVE_DECL_WCTOB=1; | |
5832 | HAVE_DECL_WCWIDTH=1; | |
5833 | REPLACE_MBSTATE_T=0; | |
5834 | REPLACE_BTOWC=0; | |
5835 | REPLACE_WCTOB=0; | |
5836 | REPLACE_MBSINIT=0; | |
5837 | REPLACE_MBRTOWC=0; | |
5838 | REPLACE_MBRLEN=0; | |
5839 | REPLACE_MBSRTOWCS=0; | |
5840 | REPLACE_MBSNRTOWCS=0; | |
5841 | REPLACE_WCRTOMB=0; | |
5842 | REPLACE_WCSRTOMBS=0; | |
5843 | REPLACE_WCSNRTOMBS=0; | |
5844 | REPLACE_WCWIDTH=0; | |
5845 | ||
5846 | ||
5847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 | |
5848 | $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } | |
5849 | if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : | |
81ecdfbb | 5850 | $as_echo_n "(cached) " >&6 |
783e057b | 5851 | else |
f434ba03 PA |
5852 | gl_cv_header_wchar_h_correct_inline=yes |
5853 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5854 | /* end confdefs.h. */ | |
783e057b | 5855 | |
f434ba03 PA |
5856 | #define wcstod renamed_wcstod |
5857 | #include <wchar.h> | |
5858 | extern int zero (void); | |
5859 | int main () { return zero(); } | |
5860 | ||
5861 | _ACEOF | |
5862 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
5863 | (eval $ac_compile) 2>&5 | |
5864 | ac_status=$? | |
5865 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5866 | test $ac_status = 0; }; then | |
5867 | mv conftest.$ac_objext conftest1.$ac_objext | |
5868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b | 5869 | /* end confdefs.h. */ |
f434ba03 PA |
5870 | |
5871 | #define wcstod renamed_wcstod | |
5872 | #include <wchar.h> | |
5873 | int zero (void) { return 0; } | |
783e057b DJ |
5874 | |
5875 | _ACEOF | |
f434ba03 PA |
5876 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
5877 | (eval $ac_compile) 2>&5 | |
5878 | ac_status=$? | |
5879 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5880 | test $ac_status = 0; }; then | |
5881 | mv conftest.$ac_objext conftest2.$ac_objext | |
5882 | if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then | |
5883 | : | |
5884 | else | |
5885 | gl_cv_header_wchar_h_correct_inline=no | |
5886 | fi | |
5887 | fi | |
5888 | fi | |
5889 | rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext | |
783e057b DJ |
5890 | |
5891 | fi | |
f434ba03 PA |
5892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 |
5893 | $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } | |
5894 | if test $gl_cv_header_wchar_h_correct_inline = no; then | |
5895 | as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). | |
5896 | This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in | |
5897 | C99 mode. You have four options: | |
5898 | - Add the flag -fgnu89-inline to CC and reconfigure, or | |
5899 | - Fix your include files, using parts of | |
5900 | <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or | |
5901 | - Use a gcc version older than 4.3, or | |
5902 | - Don't use the flags -std=c99 or -std=gnu99. | |
5903 | Configuration aborted." "$LINENO" 5 | |
5904 | fi | |
783e057b DJ |
5905 | |
5906 | ||
f434ba03 PA |
5907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 |
5908 | $as_echo_n "checking for wint_t... " >&6; } | |
5909 | if test "${gt_cv_c_wint_t+set}" = set; then : | |
5910 | $as_echo_n "(cached) " >&6 | |
5911 | else | |
5912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5913 | /* end confdefs.h. */ | |
783e057b | 5914 | |
f434ba03 PA |
5915 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
5916 | <wchar.h>. | |
5917 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | |
5918 | before <wchar.h>. */ | |
5919 | #include <stddef.h> | |
5920 | #include <stdio.h> | |
5921 | #include <time.h> | |
5922 | #include <wchar.h> | |
5923 | wint_t foo = (wchar_t)'\0'; | |
5924 | int | |
5925 | main () | |
5926 | { | |
783e057b | 5927 | |
f434ba03 PA |
5928 | ; |
5929 | return 0; | |
5930 | } | |
5931 | _ACEOF | |
5932 | if ac_fn_c_try_compile "$LINENO"; then : | |
5933 | gt_cv_c_wint_t=yes | |
5934 | else | |
5935 | gt_cv_c_wint_t=no | |
5936 | fi | |
5937 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5938 | fi | |
5939 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 | |
5940 | $as_echo "$gt_cv_c_wint_t" >&6; } | |
5941 | if test $gt_cv_c_wint_t = yes; then | |
783e057b | 5942 | |
f434ba03 | 5943 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h |
783e057b | 5944 | |
f434ba03 | 5945 | fi |
783e057b DJ |
5946 | |
5947 | ||
81ecdfbb | 5948 | if false; then |
783e057b DJ |
5949 | GL_COND_LIBTOOL_TRUE= |
5950 | GL_COND_LIBTOOL_FALSE='#' | |
5951 | else | |
5952 | GL_COND_LIBTOOL_TRUE='#' | |
5953 | GL_COND_LIBTOOL_FALSE= | |
5954 | fi | |
5955 | ||
5956 | gl_cond_libtool=false | |
5957 | gl_libdeps= | |
5958 | gl_ltlibdeps= | |
f434ba03 | 5959 | gl_m4_base='gnulib/m4' |
783e057b DJ |
5960 | |
5961 | ||
5962 | ||
783e057b DJ |
5963 | |
5964 | ||
5965 | ||
5966 | ||
5967 | ||
5968 | ||
f434ba03 PA |
5969 | gl_source_base='gnulib' |
5970 | # Code from module arg-nonnull: | |
5971 | # Code from module c++defs: | |
5972 | # Code from module extensions: | |
5973 | # Code from module include_next: | |
5974 | # Code from module memchr: | |
783e057b | 5975 | |
783e057b | 5976 | |
783e057b | 5977 | |
783e057b | 5978 | |
f434ba03 | 5979 | GNULIB_MEMCHR=1 |
783e057b | 5980 | |
783e057b | 5981 | |
783e057b | 5982 | |
f434ba03 | 5983 | $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h |
783e057b | 5984 | |
783e057b DJ |
5985 | |
5986 | ||
f434ba03 | 5987 | # Code from module memmem: |
783e057b DJ |
5988 | |
5989 | ||
f434ba03 PA |
5990 | if test $ac_cv_have_decl_memmem = yes; then |
5991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 | |
5992 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
5993 | if test "${gl_cv_func_memmem_works+set}" = set; then : | |
81ecdfbb | 5994 | $as_echo_n "(cached) " >&6 |
783e057b | 5995 | else |
81ecdfbb | 5996 | if test "$cross_compiling" = yes; then : |
f434ba03 | 5997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5998 | /* end confdefs.h. */ |
783e057b | 5999 | |
f434ba03 PA |
6000 | #include <features.h> |
6001 | #ifdef __GNU_LIBRARY__ | |
6002 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) | |
6003 | Lucky user | |
6004 | #endif | |
6005 | #endif | |
6006 | #ifdef __CYGWIN__ | |
6007 | #include <cygwin/version.h> | |
6008 | #if CYGWIN_VERSION_DLL_MAJOR >= 1007 | |
6009 | Lucky user | |
6010 | #endif | |
6011 | #endif | |
783e057b | 6012 | |
783e057b | 6013 | _ACEOF |
f434ba03 PA |
6014 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6015 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
6016 | gl_cv_func_memmem_works=yes | |
783e057b | 6017 | else |
f434ba03 | 6018 | gl_cv_func_memmem_works="guessing no" |
783e057b | 6019 | fi |
f434ba03 | 6020 | rm -f conftest* |
783e057b DJ |
6021 | |
6022 | ||
783e057b | 6023 | else |
81ecdfbb | 6024 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6025 | /* end confdefs.h. */ |
6026 | ||
f434ba03 | 6027 | #include <signal.h> /* for signal */ |
783e057b DJ |
6028 | #include <string.h> /* for memmem */ |
6029 | #include <stdlib.h> /* for malloc */ | |
6030 | #include <unistd.h> /* for alarm */ | |
6031 | ||
6032 | int | |
6033 | main () | |
6034 | { | |
6035 | size_t m = 1000000; | |
6036 | char *haystack = (char *) malloc (2 * m + 1); | |
6037 | char *needle = (char *) malloc (m + 1); | |
6038 | void *result = 0; | |
6039 | /* Failure to compile this test due to missing alarm is okay, | |
6040 | since all such platforms (mingw) also lack memmem. */ | |
f434ba03 | 6041 | signal (SIGALRM, SIG_DFL); |
783e057b DJ |
6042 | alarm (5); |
6043 | /* Check for quadratic performance. */ | |
6044 | if (haystack && needle) | |
6045 | { | |
f434ba03 PA |
6046 | memset (haystack, 'A', 2 * m); |
6047 | haystack[2 * m] = 'B'; | |
6048 | memset (needle, 'A', m); | |
6049 | needle[m] = 'B'; | |
6050 | result = memmem (haystack, 2 * m + 1, needle, m + 1); | |
783e057b DJ |
6051 | } |
6052 | /* Check for empty needle behavior. */ | |
6053 | return !result || !memmem ("a", 1, 0, 0); | |
6054 | ; | |
6055 | return 0; | |
6056 | } | |
6057 | _ACEOF | |
81ecdfbb | 6058 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
6059 | gl_cv_func_memmem_works=yes |
6060 | else | |
81ecdfbb | 6061 | gl_cv_func_memmem_works=no |
783e057b | 6062 | fi |
81ecdfbb RW |
6063 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6064 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 6065 | fi |
81ecdfbb | 6066 | |
f434ba03 | 6067 | |
783e057b | 6068 | fi |
81ecdfbb RW |
6069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5 |
6070 | $as_echo "$gl_cv_func_memmem_works" >&6; } | |
783e057b DJ |
6071 | if test "$gl_cv_func_memmem_works" != yes; then |
6072 | REPLACE_MEMMEM=1 | |
6073 | ||
6074 | ||
6075 | ||
6076 | ||
6077 | ||
6078 | ||
6079 | ||
f434ba03 | 6080 | |
783e057b DJ |
6081 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" |
6082 | ||
6083 | fi | |
6084 | fi | |
6085 | ||
f434ba03 PA |
6086 | # Code from module memmem-simple: |
6087 | ||
783e057b DJ |
6088 | |
6089 | ||
6090 | ||
6091 | ||
6092 | ||
6093 | ||
6094 | ||
6095 | ||
6096 | ||
6097 | ||
6098 | ||
81ecdfbb RW |
6099 | for ac_func in memmem |
6100 | do : | |
6101 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
6102 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 6103 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6104 | #define HAVE_MEMMEM 1 |
783e057b DJ |
6105 | _ACEOF |
6106 | ||
6107 | else | |
6108 | ||
6109 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
6110 | ||
6111 | fi | |
6112 | done | |
6113 | ||
6114 | ||
6115 | ||
6116 | : | |
6117 | ||
6118 | ||
6119 | ||
6120 | ||
6121 | ||
6122 | if test $ac_cv_have_decl_memmem = no; then | |
6123 | HAVE_DECL_MEMMEM=0 | |
6124 | fi | |
6125 | : | |
6126 | ||
6127 | ||
6128 | ||
f434ba03 | 6129 | |
783e057b DJ |
6130 | GNULIB_MEMMEM=1 |
6131 | ||
6132 | ||
6133 | ||
f434ba03 PA |
6134 | $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h |
6135 | ||
6136 | ||
6137 | ||
6138 | # Code from module multiarch: | |
6139 | ||
6140 | # Code from module stddef: | |
6141 | ||
6142 | ||
6143 | ||
6144 | if test $gt_cv_c_wchar_t = no; then | |
6145 | HAVE_WCHAR_T=0 | |
6146 | STDDEF_H=stddef.h | |
6147 | fi | |
6148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
6149 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
6150 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
6151 | $as_echo_n "(cached) " >&6 | |
6152 | else | |
6153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6154 | /* end confdefs.h. */ | |
6155 | #include <stddef.h> | |
6156 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
6157 | ||
6158 | int | |
6159 | main () | |
6160 | { | |
6161 | ||
6162 | ; | |
6163 | return 0; | |
6164 | } | |
6165 | _ACEOF | |
6166 | if ac_fn_c_try_compile "$LINENO"; then : | |
6167 | gl_cv_decl_null_works=yes | |
6168 | else | |
6169 | gl_cv_decl_null_works=no | |
6170 | fi | |
6171 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6172 | fi | |
6173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
6174 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
6175 | if test $gl_cv_decl_null_works = no; then | |
6176 | REPLACE_NULL=1 | |
6177 | STDDEF_H=stddef.h | |
6178 | fi | |
6179 | if test -n "$STDDEF_H"; then | |
6180 | ||
6181 | ||
6182 | ||
6183 | ||
6184 | : | |
6185 | ||
6186 | ||
6187 | ||
6188 | ||
6189 | ||
6190 | ||
6191 | ||
6192 | if test $gl_cv_have_include_next = yes; then | |
6193 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6194 | else | |
6195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
6196 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
6197 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
6198 | $as_echo_n "(cached) " >&6 | |
6199 | else | |
6200 | ||
6201 | if test $ac_cv_header_stddef_h = yes; then | |
6202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6203 | /* end confdefs.h. */ | |
6204 | #include <stddef.h> | |
6205 | ||
6206 | _ACEOF | |
6207 | case "$host_os" in | |
6208 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6209 | *) gl_absname_cpp="$ac_cpp" ;; | |
6210 | esac | |
6211 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6212 | sed -n '\#/stddef.h#{ | |
6213 | s#.*"\(.*/stddef.h\)".*#\1# | |
6214 | s#^/[^/]#//&# | |
6215 | p | |
6216 | q | |
6217 | }'`'"' | |
6218 | else | |
6219 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6220 | fi | |
6221 | ||
6222 | fi | |
6223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
6224 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
6225 | fi | |
6226 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
6227 | ||
6228 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
6229 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6230 | gl_next_as_first_directive='<'stddef.h'>' | |
6231 | else | |
6232 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6233 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
6234 | fi | |
6235 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
6236 | ||
6237 | ||
6238 | ||
6239 | fi | |
6240 | ||
6241 | # Code from module stdint: | |
6242 | ||
6243 | ||
783e057b DJ |
6244 | |
6245 | if test $ac_cv_type_long_long_int = yes; then | |
6246 | HAVE_LONG_LONG_INT=1 | |
6247 | else | |
6248 | HAVE_LONG_LONG_INT=0 | |
6249 | fi | |
6250 | ||
6251 | ||
6252 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
6253 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
6254 | else | |
6255 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
6256 | fi | |
6257 | ||
6258 | ||
6259 | if test $ac_cv_header_inttypes_h = yes; then | |
6260 | HAVE_INTTYPES_H=1 | |
6261 | else | |
6262 | HAVE_INTTYPES_H=0 | |
6263 | fi | |
6264 | ||
6265 | ||
6266 | if test $ac_cv_header_sys_types_h = yes; then | |
6267 | HAVE_SYS_TYPES_H=1 | |
6268 | else | |
6269 | HAVE_SYS_TYPES_H=0 | |
6270 | fi | |
6271 | ||
6272 | ||
6273 | ||
6274 | ||
6275 | ||
f434ba03 | 6276 | |
783e057b DJ |
6277 | : |
6278 | ||
6279 | ||
6280 | ||
6281 | ||
6282 | ||
6283 | ||
6284 | ||
6285 | if test $gl_cv_have_include_next = yes; then | |
6286 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6287 | else | |
81ecdfbb RW |
6288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 |
6289 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
6290 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
6291 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6292 | else |
6293 | ||
f434ba03 PA |
6294 | if test $ac_cv_header_stdint_h = yes; then |
6295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
6296 | /* end confdefs.h. */ |
6297 | #include <stdint.h> | |
6298 | ||
6299 | _ACEOF | |
f434ba03 PA |
6300 | case "$host_os" in |
6301 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6302 | *) gl_absname_cpp="$ac_cpp" ;; | |
6303 | esac | |
6304 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6305 | sed -n '\#/stdint.h#{ | |
6306 | s#.*"\(.*/stdint.h\)".*#\1# | |
6307 | s#^/[^/]#//&# | |
6308 | p | |
6309 | q | |
6310 | }'`'"' | |
6311 | else | |
6312 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6313 | fi | |
783e057b DJ |
6314 | |
6315 | fi | |
81ecdfbb RW |
6316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
6317 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
783e057b DJ |
6318 | fi |
6319 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
6320 | ||
f434ba03 PA |
6321 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
6322 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6323 | gl_next_as_first_directive='<'stdint.h'>' | |
6324 | else | |
6325 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6326 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
6327 | fi | |
6328 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
6329 | ||
783e057b DJ |
6330 | |
6331 | ||
6332 | if test $ac_cv_header_stdint_h = yes; then | |
6333 | HAVE_STDINT_H=1 | |
6334 | else | |
6335 | HAVE_STDINT_H=0 | |
6336 | fi | |
6337 | ||
6338 | ||
6339 | if test $ac_cv_header_stdint_h = yes; then | |
81ecdfbb RW |
6340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 |
6341 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
6342 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
6343 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6344 | else |
6345 | gl_cv_header_working_stdint_h=no | |
81ecdfbb | 6346 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6347 | /* end confdefs.h. */ |
6348 | ||
81ecdfbb | 6349 | |
783e057b DJ |
6350 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
6351 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6352 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6353 | #include <stdint.h> | |
6354 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
6355 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
6356 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
6357 | #endif | |
6358 | ||
6359 | ||
6360 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6361 | included before <wchar.h>. */ | |
6362 | #include <stddef.h> | |
6363 | #include <signal.h> | |
6364 | #if HAVE_WCHAR_H | |
6365 | # include <stdio.h> | |
6366 | # include <time.h> | |
6367 | # include <wchar.h> | |
6368 | #endif | |
6369 | ||
6370 | ||
6371 | #ifdef INT8_MAX | |
6372 | int8_t a1 = INT8_MAX; | |
6373 | int8_t a1min = INT8_MIN; | |
6374 | #endif | |
6375 | #ifdef INT16_MAX | |
6376 | int16_t a2 = INT16_MAX; | |
6377 | int16_t a2min = INT16_MIN; | |
6378 | #endif | |
6379 | #ifdef INT32_MAX | |
6380 | int32_t a3 = INT32_MAX; | |
6381 | int32_t a3min = INT32_MIN; | |
6382 | #endif | |
6383 | #ifdef INT64_MAX | |
6384 | int64_t a4 = INT64_MAX; | |
6385 | int64_t a4min = INT64_MIN; | |
6386 | #endif | |
6387 | #ifdef UINT8_MAX | |
6388 | uint8_t b1 = UINT8_MAX; | |
6389 | #else | |
6390 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
6391 | #endif | |
6392 | #ifdef UINT16_MAX | |
6393 | uint16_t b2 = UINT16_MAX; | |
6394 | #endif | |
6395 | #ifdef UINT32_MAX | |
6396 | uint32_t b3 = UINT32_MAX; | |
6397 | #endif | |
6398 | #ifdef UINT64_MAX | |
6399 | uint64_t b4 = UINT64_MAX; | |
6400 | #endif | |
6401 | int_least8_t c1 = INT8_C (0x7f); | |
6402 | int_least8_t c1max = INT_LEAST8_MAX; | |
6403 | int_least8_t c1min = INT_LEAST8_MIN; | |
6404 | int_least16_t c2 = INT16_C (0x7fff); | |
6405 | int_least16_t c2max = INT_LEAST16_MAX; | |
6406 | int_least16_t c2min = INT_LEAST16_MIN; | |
6407 | int_least32_t c3 = INT32_C (0x7fffffff); | |
6408 | int_least32_t c3max = INT_LEAST32_MAX; | |
6409 | int_least32_t c3min = INT_LEAST32_MIN; | |
6410 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
6411 | int_least64_t c4max = INT_LEAST64_MAX; | |
6412 | int_least64_t c4min = INT_LEAST64_MIN; | |
6413 | uint_least8_t d1 = UINT8_C (0xff); | |
6414 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
6415 | uint_least16_t d2 = UINT16_C (0xffff); | |
6416 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
6417 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
6418 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
6419 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
6420 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
6421 | int_fast8_t e1 = INT_FAST8_MAX; | |
6422 | int_fast8_t e1min = INT_FAST8_MIN; | |
6423 | int_fast16_t e2 = INT_FAST16_MAX; | |
6424 | int_fast16_t e2min = INT_FAST16_MIN; | |
6425 | int_fast32_t e3 = INT_FAST32_MAX; | |
6426 | int_fast32_t e3min = INT_FAST32_MIN; | |
6427 | int_fast64_t e4 = INT_FAST64_MAX; | |
6428 | int_fast64_t e4min = INT_FAST64_MIN; | |
6429 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
6430 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
6431 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
6432 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
6433 | #ifdef INTPTR_MAX | |
6434 | intptr_t g = INTPTR_MAX; | |
6435 | intptr_t gmin = INTPTR_MIN; | |
6436 | #endif | |
6437 | #ifdef UINTPTR_MAX | |
6438 | uintptr_t h = UINTPTR_MAX; | |
6439 | #endif | |
6440 | intmax_t i = INTMAX_MAX; | |
6441 | uintmax_t j = UINTMAX_MAX; | |
6442 | ||
6443 | #include <limits.h> /* for CHAR_BIT */ | |
6444 | #define TYPE_MINIMUM(t) \ | |
6445 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
6446 | #define TYPE_MAXIMUM(t) \ | |
6447 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
6448 | struct s { | |
6449 | int check_PTRDIFF: | |
6450 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
6451 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
6452 | ? 1 : -1; | |
6453 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
6454 | int check_SIG_ATOMIC: | |
6455 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
6456 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
6457 | ? 1 : -1; | |
6458 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
6459 | int check_WCHAR: | |
6460 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
6461 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
6462 | ? 1 : -1; | |
6463 | /* Detect bug in mingw. */ | |
6464 | int check_WINT: | |
6465 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
6466 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
6467 | ? 1 : -1; | |
6468 | ||
f434ba03 PA |
6469 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
6470 | int check_UINT8_C: | |
6471 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
6472 | int check_UINT16_C: | |
6473 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
6474 | ||
6475 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
6476 | #ifdef UINT8_MAX | |
6477 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
6478 | #endif | |
6479 | #ifdef UINT16_MAX | |
6480 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
6481 | #endif | |
6482 | #ifdef UINT32_MAX | |
6483 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
6484 | #endif | |
6485 | #ifdef UINT64_MAX | |
6486 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
6487 | #endif | |
6488 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
6489 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
6490 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
6491 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
6492 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
6493 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
6494 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
6495 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
6496 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
6497 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
6498 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
6499 | }; | |
6500 | ||
6501 | int | |
6502 | main () | |
6503 | { | |
6504 | ||
6505 | ; | |
6506 | return 0; | |
6507 | } | |
6508 | _ACEOF | |
6509 | if ac_fn_c_try_compile "$LINENO"; then : | |
6510 | if test "$cross_compiling" = yes; then : | |
6511 | gl_cv_header_working_stdint_h=yes | |
6512 | ||
6513 | else | |
6514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6515 | /* end confdefs.h. */ | |
6516 | ||
6517 | ||
6518 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
6519 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6520 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6521 | #include <stdint.h> | |
6522 | ||
783e057b | 6523 | |
f434ba03 PA |
6524 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
6525 | included before <wchar.h>. */ | |
6526 | #include <stddef.h> | |
6527 | #include <signal.h> | |
6528 | #if HAVE_WCHAR_H | |
6529 | # include <stdio.h> | |
6530 | # include <time.h> | |
6531 | # include <wchar.h> | |
6532 | #endif | |
6533 | ||
6534 | ||
6535 | #include <stdio.h> | |
6536 | #include <string.h> | |
6537 | #define MVAL(macro) MVAL1(macro) | |
6538 | #define MVAL1(expression) #expression | |
6539 | static const char *macro_values[] = | |
6540 | { | |
6541 | #ifdef INT8_MAX | |
6542 | MVAL (INT8_MAX), | |
6543 | #endif | |
6544 | #ifdef INT16_MAX | |
6545 | MVAL (INT16_MAX), | |
6546 | #endif | |
6547 | #ifdef INT32_MAX | |
6548 | MVAL (INT32_MAX), | |
6549 | #endif | |
6550 | #ifdef INT64_MAX | |
6551 | MVAL (INT64_MAX), | |
6552 | #endif | |
783e057b | 6553 | #ifdef UINT8_MAX |
f434ba03 | 6554 | MVAL (UINT8_MAX), |
783e057b DJ |
6555 | #endif |
6556 | #ifdef UINT16_MAX | |
f434ba03 | 6557 | MVAL (UINT16_MAX), |
783e057b DJ |
6558 | #endif |
6559 | #ifdef UINT32_MAX | |
f434ba03 | 6560 | MVAL (UINT32_MAX), |
783e057b DJ |
6561 | #endif |
6562 | #ifdef UINT64_MAX | |
f434ba03 | 6563 | MVAL (UINT64_MAX), |
783e057b | 6564 | #endif |
f434ba03 PA |
6565 | NULL |
6566 | }; | |
783e057b DJ |
6567 | |
6568 | int | |
6569 | main () | |
6570 | { | |
6571 | ||
f434ba03 PA |
6572 | const char **mv; |
6573 | for (mv = macro_values; *mv != NULL; mv++) | |
6574 | { | |
6575 | const char *value = *mv; | |
6576 | /* Test whether it looks like a cast expression. */ | |
6577 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
6578 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
6579 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
6580 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
6581 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
6582 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
6583 | return 1; | |
6584 | } | |
6585 | return 0; | |
6586 | ||
783e057b DJ |
6587 | ; |
6588 | return 0; | |
6589 | } | |
6590 | _ACEOF | |
f434ba03 | 6591 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 6592 | gl_cv_header_working_stdint_h=yes |
f434ba03 PA |
6593 | fi |
6594 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6595 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6596 | fi | |
6597 | ||
6598 | ||
783e057b | 6599 | fi |
81ecdfbb | 6600 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 | 6601 | |
783e057b | 6602 | fi |
81ecdfbb RW |
6603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 |
6604 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
783e057b DJ |
6605 | fi |
6606 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
6607 | STDINT_H= | |
6608 | else | |
81ecdfbb RW |
6609 | for ac_header in sys/inttypes.h sys/bitypes.h |
6610 | do : | |
6611 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6612 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
6613 | eval as_val=\$$as_ac_Header | |
6614 | if test "x$as_val" = x""yes; then : | |
783e057b | 6615 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6616 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
6617 | _ACEOF |
6618 | ||
6619 | fi | |
6620 | ||
6621 | done | |
6622 | ||
6623 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
6624 | HAVE_SYS_INTTYPES_H=1 | |
6625 | else | |
6626 | HAVE_SYS_INTTYPES_H=0 | |
6627 | fi | |
6628 | ||
6629 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
6630 | HAVE_SYS_BITYPES_H=1 | |
6631 | else | |
6632 | HAVE_SYS_BITYPES_H=0 | |
6633 | fi | |
6634 | ||
6635 | ||
6636 | ||
6637 | : | |
6638 | ||
6639 | ||
6640 | ||
6641 | ||
6642 | ||
6643 | ||
6644 | ||
6645 | ||
f434ba03 PA |
6646 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
6647 | ||
6648 | ||
6649 | for gltype in ptrdiff_t size_t ; do | |
6650 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
6651 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6652 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6653 | $as_echo_n "(cached) " >&6 | |
6654 | else | |
6655 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6656 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6657 | included before <wchar.h>. */ | |
6658 | #include <stddef.h> | |
6659 | #include <signal.h> | |
6660 | #if HAVE_WCHAR_H | |
6661 | # include <stdio.h> | |
6662 | # include <time.h> | |
6663 | # include <wchar.h> | |
6664 | #endif | |
6665 | ||
6666 | #include <limits.h>"; then : | |
6667 | ||
6668 | else | |
6669 | result=unknown | |
6670 | fi | |
6671 | ||
6672 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6673 | ||
6674 | fi | |
6675 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6677 | $as_echo "$ac_res" >&6; } | |
6678 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6679 | if test $result = unknown; then | |
6680 | result=0 | |
6681 | fi | |
6682 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6683 | cat >>confdefs.h <<_ACEOF | |
6684 | #define BITSIZEOF_${GLTYPE} $result | |
6685 | _ACEOF | |
6686 | ||
6687 | eval BITSIZEOF_${GLTYPE}=\$result | |
6688 | done | |
6689 | ||
6690 | ||
6691 | fi | |
6692 | ||
783e057b | 6693 | |
f434ba03 | 6694 | for gltype in sig_atomic_t wchar_t wint_t ; do |
81ecdfbb RW |
6695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 |
6696 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6697 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6698 | $as_echo_n "(cached) " >&6 | |
6699 | else | |
6700 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6701 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6702 | included before <wchar.h>. */ | |
6703 | #include <stddef.h> | |
6704 | #include <signal.h> | |
6705 | #if HAVE_WCHAR_H | |
6706 | # include <stdio.h> | |
6707 | # include <time.h> | |
6708 | # include <wchar.h> | |
6709 | #endif | |
6710 | ||
6711 | #include <limits.h>"; then : | |
6712 | ||
6713 | else | |
6714 | result=unknown | |
6715 | fi | |
6716 | ||
6717 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6718 | ||
6719 | fi | |
6720 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6722 | $as_echo "$ac_res" >&6; } | |
6723 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6724 | if test $result = unknown; then | |
6725 | result=0 | |
6726 | fi | |
6727 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6728 | cat >>confdefs.h <<_ACEOF | |
6729 | #define BITSIZEOF_${GLTYPE} $result | |
6730 | _ACEOF | |
783e057b | 6731 | |
81ecdfbb RW |
6732 | eval BITSIZEOF_${GLTYPE}=\$result |
6733 | done | |
783e057b DJ |
6734 | |
6735 | ||
6736 | ||
6737 | ||
81ecdfbb RW |
6738 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
6740 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
6741 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6742 | $as_echo_n "(cached) " >&6 | |
783e057b | 6743 | else |
81ecdfbb | 6744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6745 | /* end confdefs.h. */ |
6746 | ||
6747 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6748 | included before <wchar.h>. */ | |
6749 | #include <stddef.h> | |
6750 | #include <signal.h> | |
6751 | #if HAVE_WCHAR_H | |
6752 | # include <stdio.h> | |
6753 | # include <time.h> | |
6754 | # include <wchar.h> | |
6755 | #endif | |
6756 | ||
6757 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
6758 | int | |
6759 | main () | |
6760 | { | |
6761 | ||
6762 | ; | |
6763 | return 0; | |
6764 | } | |
6765 | _ACEOF | |
81ecdfbb | 6766 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
6767 | result=yes |
6768 | else | |
81ecdfbb | 6769 | result=no |
20e95c23 | 6770 | fi |
81ecdfbb | 6771 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6772 | eval gl_cv_type_${gltype}_signed=\$result |
6773 | ||
6774 | fi | |
81ecdfbb RW |
6775 | eval ac_res=\$gl_cv_type_${gltype}_signed |
6776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6777 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6778 | eval result=\$gl_cv_type_${gltype}_signed |
6779 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6780 | if test "$result" = yes; then | |
6781 | cat >>confdefs.h <<_ACEOF | |
6782 | #define HAVE_SIGNED_${GLTYPE} 1 | |
6783 | _ACEOF | |
6784 | ||
6785 | eval HAVE_SIGNED_${GLTYPE}=1 | |
6786 | else | |
6787 | eval HAVE_SIGNED_${GLTYPE}=0 | |
6788 | fi | |
6789 | done | |
6790 | ||
6791 | ||
6792 | gl_cv_type_ptrdiff_t_signed=yes | |
6793 | gl_cv_type_size_t_signed=no | |
f434ba03 | 6794 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
783e057b DJ |
6795 | |
6796 | ||
f434ba03 | 6797 | for gltype in ptrdiff_t size_t ; do |
81ecdfbb RW |
6798 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 |
6799 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6800 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6801 | $as_echo_n "(cached) " >&6 | |
c906108c | 6802 | else |
783e057b DJ |
6803 | eval gl_cv_type_${gltype}_suffix=no |
6804 | eval result=\$gl_cv_type_${gltype}_signed | |
6805 | if test "$result" = yes; then | |
6806 | glsufu= | |
6807 | else | |
6808 | glsufu=u | |
6809 | fi | |
6810 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6811 | case $glsuf in | |
6812 | '') gltype1='int';; | |
f434ba03 PA |
6813 | l) gltype1='long int';; |
6814 | ll) gltype1='long long int';; | |
6815 | i64) gltype1='__int64';; | |
6816 | u) gltype1='unsigned int';; | |
6817 | ul) gltype1='unsigned long int';; | |
6818 | ull) gltype1='unsigned long long int';; | |
783e057b DJ |
6819 | ui64)gltype1='unsigned __int64';; |
6820 | esac | |
81ecdfbb | 6821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6822 | /* end confdefs.h. */ |
6823 | ||
6824 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6825 | included before <wchar.h>. */ | |
6826 | #include <stddef.h> | |
6827 | #include <signal.h> | |
6828 | #if HAVE_WCHAR_H | |
6829 | # include <stdio.h> | |
6830 | # include <time.h> | |
6831 | # include <wchar.h> | |
6832 | #endif | |
6833 | ||
6834 | extern $gltype foo; | |
6835 | extern $gltype1 foo; | |
6836 | int | |
6837 | main () | |
6838 | { | |
6839 | ||
6840 | ; | |
6841 | return 0; | |
6842 | } | |
6843 | _ACEOF | |
81ecdfbb | 6844 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 6845 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6846 | fi |
81ecdfbb | 6847 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6848 | eval result=\$gl_cv_type_${gltype}_suffix |
6849 | test "$result" != no && break | |
6850 | done | |
6851 | fi | |
81ecdfbb RW |
6852 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6854 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6855 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
6856 | eval result=\$gl_cv_type_${gltype}_suffix | |
6857 | test "$result" = no && result= | |
6858 | eval ${GLTYPE}_SUFFIX=\$result | |
6859 | cat >>confdefs.h <<_ACEOF | |
6860 | #define ${GLTYPE}_SUFFIX $result | |
6861 | _ACEOF | |
6862 | ||
6863 | done | |
6864 | ||
6865 | ||
783e057b DJ |
6866 | fi |
6867 | ||
6868 | ||
f434ba03 PA |
6869 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
6871 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6872 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
81ecdfbb | 6873 | $as_echo_n "(cached) " >&6 |
783e057b | 6874 | else |
f434ba03 PA |
6875 | eval gl_cv_type_${gltype}_suffix=no |
6876 | eval result=\$gl_cv_type_${gltype}_signed | |
6877 | if test "$result" = yes; then | |
6878 | glsufu= | |
6879 | else | |
6880 | glsufu=u | |
6881 | fi | |
6882 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6883 | case $glsuf in | |
6884 | '') gltype1='int';; | |
6885 | l) gltype1='long int';; | |
6886 | ll) gltype1='long long int';; | |
6887 | i64) gltype1='__int64';; | |
6888 | u) gltype1='unsigned int';; | |
6889 | ul) gltype1='unsigned long int';; | |
6890 | ull) gltype1='unsigned long long int';; | |
6891 | ui64)gltype1='unsigned __int64';; | |
6892 | esac | |
6893 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
81ecdfbb | 6894 | /* end confdefs.h. */ |
f434ba03 PA |
6895 | |
6896 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6897 | included before <wchar.h>. */ | |
6898 | #include <stddef.h> | |
6899 | #include <signal.h> | |
6900 | #if HAVE_WCHAR_H | |
6901 | # include <stdio.h> | |
6902 | # include <time.h> | |
6903 | # include <wchar.h> | |
6904 | #endif | |
6905 | ||
6906 | extern $gltype foo; | |
6907 | extern $gltype1 foo; | |
6908 | int | |
6909 | main () | |
6910 | { | |
6911 | ||
6912 | ; | |
6913 | return 0; | |
6914 | } | |
783e057b | 6915 | _ACEOF |
81ecdfbb | 6916 | if ac_fn_c_try_compile "$LINENO"; then : |
f434ba03 | 6917 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6918 | fi |
81ecdfbb | 6919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 PA |
6920 | eval result=\$gl_cv_type_${gltype}_suffix |
6921 | test "$result" != no && break | |
6922 | done | |
783e057b | 6923 | fi |
f434ba03 PA |
6924 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6926 | $as_echo "$ac_res" >&6; } | |
6927 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6928 | eval result=\$gl_cv_type_${gltype}_suffix | |
6929 | test "$result" = no && result= | |
6930 | eval ${GLTYPE}_SUFFIX=\$result | |
6931 | cat >>confdefs.h <<_ACEOF | |
6932 | #define ${GLTYPE}_SUFFIX $result | |
6933 | _ACEOF | |
6934 | ||
6935 | done | |
6936 | ||
6937 | ||
6938 | ||
6939 | STDINT_H=stdint.h | |
783e057b DJ |
6940 | fi |
6941 | ||
6942 | ||
f434ba03 PA |
6943 | # Code from module string: |
6944 | ||
6945 | ||
6946 | ||
6947 | # Code from module warn-on-use: | |
6948 | # Code from module wchar: | |
6949 | ||
6950 | ||
6951 | ||
6952 | ||
783e057b DJ |
6953 | : |
6954 | ||
6955 | ||
6956 | ||
6957 | ||
6958 | ||
783e057b DJ |
6959 | |
6960 | ||
6961 | ||
6962 | ||
6963 | : | |
6964 | ||
6965 | ||
6966 | ||
6967 | ||
6968 | ||
6969 | ||
6970 | ||
6971 | if test $gl_cv_have_include_next = yes; then | |
6972 | gl_cv_next_wchar_h='<'wchar.h'>' | |
6973 | else | |
81ecdfbb RW |
6974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 |
6975 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
6976 | if test "${gl_cv_next_wchar_h+set}" = set; then : | |
6977 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6978 | else |
6979 | ||
f434ba03 PA |
6980 | if test $ac_cv_header_wchar_h = yes; then |
6981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
6982 | /* end confdefs.h. */ |
6983 | #include <wchar.h> | |
6984 | ||
6985 | _ACEOF | |
f434ba03 PA |
6986 | case "$host_os" in |
6987 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6988 | *) gl_absname_cpp="$ac_cpp" ;; | |
6989 | esac | |
6990 | gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6991 | sed -n '\#/wchar.h#{ | |
6992 | s#.*"\(.*/wchar.h\)".*#\1# | |
6993 | s#^/[^/]#//&# | |
6994 | p | |
6995 | q | |
6996 | }'`'"' | |
6997 | else | |
6998 | gl_cv_next_wchar_h='<'wchar.h'>' | |
6999 | fi | |
783e057b DJ |
7000 | |
7001 | fi | |
81ecdfbb RW |
7002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 |
7003 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
783e057b DJ |
7004 | fi |
7005 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
7006 | ||
f434ba03 PA |
7007 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
7008 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
7009 | gl_next_as_first_directive='<'wchar.h'>' | |
7010 | else | |
7011 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
7012 | gl_next_as_first_directive=$gl_cv_next_wchar_h | |
7013 | fi | |
7014 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive | |
7015 | ||
7016 | ||
7017 | ||
7018 | if test $ac_cv_header_wchar_h = yes; then | |
7019 | HAVE_WCHAR_H=1 | |
7020 | else | |
7021 | HAVE_WCHAR_H=0 | |
7022 | fi | |
7023 | ||
7024 | ||
7025 | ||
7026 | if test $gt_cv_c_wint_t = yes; then | |
7027 | HAVE_WINT_T=1 | |
7028 | else | |
7029 | HAVE_WINT_T=0 | |
7030 | fi | |
7031 | ||
7032 | ||
7033 | ||
7034 | for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do | |
7035 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
7036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
7037 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
7038 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7039 | $as_echo_n "(cached) " >&6 | |
7040 | else | |
7041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7042 | /* end confdefs.h. */ | |
7043 | ||
7044 | /* Some systems require additional headers. */ | |
7045 | #ifndef __GLIBC__ | |
7046 | # include <stddef.h> | |
7047 | # include <stdio.h> | |
7048 | # include <time.h> | |
7049 | #endif | |
7050 | #include <wchar.h> | |
7051 | ||
7052 | int | |
7053 | main () | |
7054 | { | |
7055 | #undef $gl_func | |
7056 | (void) $gl_func; | |
7057 | ; | |
7058 | return 0; | |
7059 | } | |
7060 | _ACEOF | |
7061 | if ac_fn_c_try_compile "$LINENO"; then : | |
7062 | eval "$as_gl_Symbol=yes" | |
7063 | else | |
7064 | eval "$as_gl_Symbol=no" | |
7065 | fi | |
7066 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7067 | fi | |
7068 | eval ac_res=\$$as_gl_Symbol | |
7069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7070 | $as_echo "$ac_res" >&6; } | |
7071 | eval as_val=\$$as_gl_Symbol | |
7072 | if test "x$as_val" = x""yes; then : | |
7073 | cat >>confdefs.h <<_ACEOF | |
7074 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
7075 | _ACEOF | |
7076 | ||
7077 | eval ac_cv_have_decl_$gl_func=yes | |
7078 | fi | |
7079 | done | |
7080 | ||
7081 | ||
7082 | # Code from module dummy: | |
7083 | # End of code from modules | |
7084 | ||
7085 | ||
c906108c | 7086 | |
c906108c | 7087 | |
c906108c | 7088 | |
c906108c | 7089 | |
c906108c | 7090 | |
c906108c | 7091 | |
c906108c | 7092 | |
783e057b DJ |
7093 | gltests_libdeps= |
7094 | gltests_ltlibdeps= | |
20e95c23 | 7095 | |
20e95c23 | 7096 | |
20e95c23 | 7097 | |
f434ba03 PA |
7098 | |
7099 | ||
7100 | ||
7101 | ||
7102 | ||
7103 | ||
783e057b | 7104 | gl_source_base='tests' |
f434ba03 PA |
7105 | 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 |
7106 | ||
7107 | gl_module_indicator_condition=$gltests_WITNESS | |
7108 | ||
7109 | ||
7110 | ||
7111 | ||
7112 | ||
c906108c | 7113 | |
bec39cab | 7114 | |
bec39cab | 7115 | |
783e057b DJ |
7116 | |
7117 | LIBGNU_LIBDEPS="$gl_libdeps" | |
7118 | ||
7119 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
7120 | ||
7121 | ||
e28b3332 | 7122 | |
d5af19ba DJ |
7123 | # For Makefile dependencies. |
7124 | GNULIB_STDINT_H= | |
7125 | if test x"$STDINT_H" != x; then | |
7126 | GNULIB_STDINT_H=gnulib/$STDINT_H | |
7127 | fi | |
7128 | ||
7129 | ||
bec39cab AC |
7130 | PACKAGE=gdb |
7131 | ||
7132 | cat >>confdefs.h <<_ACEOF | |
7133 | #define PACKAGE "$PACKAGE" | |
7134 | _ACEOF | |
7135 | ||
7136 | ||
7137 | ||
e28b3332 DJ |
7138 | # GDB does not use automake, but gnulib does. This line lets us |
7139 | # generate its Makefile.in. | |
81ecdfbb RW |
7140 | am__api_version='1.11' |
7141 | ||
e28b3332 DJ |
7142 | # Find a good install program. We prefer a C program (faster), |
7143 | # so one script is as good as another. But avoid the broken or | |
7144 | # incompatible versions: | |
7145 | # SysV /etc/install, /usr/sbin/install | |
7146 | # SunOS /usr/etc/install | |
7147 | # IRIX /sbin/install | |
7148 | # AIX /bin/install | |
7149 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7150 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7151 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7152 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7153 | # OS/2's system install, which has a completely different semantic | |
7154 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 7155 | # Reject install programs that cannot install multiple files. |
81ecdfbb RW |
7156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
7157 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
e28b3332 | 7158 | if test -z "$INSTALL"; then |
81ecdfbb RW |
7159 | if test "${ac_cv_path_install+set}" = set; then : |
7160 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7161 | else |
7162 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7163 | for as_dir in $PATH | |
7164 | do | |
7165 | IFS=$as_save_IFS | |
7166 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7167 | # Account for people who put trailing slashes in PATH elements. |
7168 | case $as_dir/ in #(( | |
7169 | ./ | .// | /[cC]/* | \ | |
e28b3332 | 7170 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
81ecdfbb | 7171 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
e28b3332 DJ |
7172 | /usr/ucb/* ) ;; |
7173 | *) | |
7174 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7175 | # Don't use installbsd from OSF since it installs stuff as root | |
7176 | # by default. | |
7177 | for ac_prog in ginstall scoinst install; do | |
7178 | for ac_exec_ext in '' $ac_executable_extensions; do | |
81ecdfbb | 7179 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then |
e28b3332 DJ |
7180 | if test $ac_prog = install && |
7181 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7182 | # AIX install. It has an incompatible calling convention. | |
7183 | : | |
7184 | elif test $ac_prog = install && | |
7185 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7186 | # program-specific install script used by HP pwplus--don't use. | |
7187 | : | |
7188 | else | |
85541719 DE |
7189 | rm -rf conftest.one conftest.two conftest.dir |
7190 | echo one > conftest.one | |
7191 | echo two > conftest.two | |
7192 | mkdir conftest.dir | |
7193 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7194 | test -s conftest.one && test -s conftest.two && | |
7195 | test -s conftest.dir/conftest.one && | |
7196 | test -s conftest.dir/conftest.two | |
7197 | then | |
7198 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7199 | break 3 | |
7200 | fi | |
e28b3332 DJ |
7201 | fi |
7202 | fi | |
7203 | done | |
7204 | done | |
7205 | ;; | |
7206 | esac | |
81ecdfbb RW |
7207 | |
7208 | done | |
7209 | IFS=$as_save_IFS | |
e28b3332 | 7210 | |
85541719 | 7211 | rm -rf conftest.one conftest.two conftest.dir |
e28b3332 DJ |
7212 | |
7213 | fi | |
7214 | if test "${ac_cv_path_install+set}" = set; then | |
7215 | INSTALL=$ac_cv_path_install | |
7216 | else | |
85541719 DE |
7217 | # As a last resort, use the slow shell script. Don't cache a |
7218 | # value for INSTALL within a source directory, because that will | |
e28b3332 | 7219 | # break other packages using the cache if that directory is |
85541719 | 7220 | # removed, or if the value is a relative name. |
e28b3332 DJ |
7221 | INSTALL=$ac_install_sh |
7222 | fi | |
7223 | fi | |
81ecdfbb RW |
7224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
7225 | $as_echo "$INSTALL" >&6; } | |
e28b3332 DJ |
7226 | |
7227 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7228 | # It thinks the first close brace ends the variable substitution. | |
7229 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7230 | ||
7231 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7232 | ||
7233 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7234 | ||
81ecdfbb RW |
7235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
7236 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
e28b3332 DJ |
7237 | # Just in case |
7238 | sleep 1 | |
7239 | echo timestamp > conftest.file | |
81ecdfbb RW |
7240 | # Reject unsafe characters in $srcdir or the absolute working directory |
7241 | # name. Accept space and tab only in the latter. | |
7242 | am_lf=' | |
7243 | ' | |
7244 | case `pwd` in | |
7245 | *[\\\"\#\$\&\'\`$am_lf]*) | |
7246 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; | |
7247 | esac | |
7248 | case $srcdir in | |
7249 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
7250 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; | |
7251 | esac | |
7252 | ||
e28b3332 DJ |
7253 | # Do `set' in a subshell so we don't clobber the current shell's |
7254 | # arguments. Must try -L first in case configure is actually a | |
7255 | # symlink; some systems play weird games with the mod time of symlinks | |
7256 | # (eg FreeBSD returns the mod time of the symlink's containing | |
7257 | # directory). | |
7258 | if ( | |
81ecdfbb | 7259 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
e28b3332 DJ |
7260 | if test "$*" = "X"; then |
7261 | # -L didn't work. | |
81ecdfbb | 7262 | set X `ls -t "$srcdir/configure" conftest.file` |
e28b3332 DJ |
7263 | fi |
7264 | rm -f conftest.file | |
7265 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
7266 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
7267 | ||
7268 | # If neither matched, then we have a broken ls. This can happen | |
7269 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
7270 | # broken ls alias from the environment. This has actually | |
7271 | # happened. Such a system could not be considered "sane". | |
81ecdfbb RW |
7272 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
7273 | alias in your environment" "$LINENO" 5 | |
e28b3332 DJ |
7274 | fi |
7275 | ||
7276 | test "$2" = conftest.file | |
7277 | ) | |
7278 | then | |
7279 | # Ok. | |
7280 | : | |
7281 | else | |
81ecdfbb RW |
7282 | as_fn_error "newly created file is older than distributed files! |
7283 | Check your system clock" "$LINENO" 5 | |
e28b3332 | 7284 | fi |
81ecdfbb RW |
7285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7286 | $as_echo "yes" >&6; } | |
e28b3332 | 7287 | test "$program_prefix" != NONE && |
81ecdfbb | 7288 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
e28b3332 DJ |
7289 | # Use a double $ so make ignores it. |
7290 | test "$program_suffix" != NONE && | |
81ecdfbb RW |
7291 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
7292 | # Double any \ or $. | |
e28b3332 | 7293 | # By default was `s,x,x', remove it if useless. |
81ecdfbb RW |
7294 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
7295 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
e28b3332 DJ |
7296 | |
7297 | # expand $ac_aux_dir to an absolute path | |
7298 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
7299 | ||
81ecdfbb RW |
7300 | if test x"${MISSING+set}" != xset; then |
7301 | case $am_aux_dir in | |
7302 | *\ * | *\ *) | |
7303 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
7304 | *) | |
7305 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
7306 | esac | |
7307 | fi | |
e28b3332 DJ |
7308 | # Use eval to expand $SHELL |
7309 | if eval "$MISSING --run true"; then | |
7310 | am_missing_run="$MISSING --run " | |
7311 | else | |
7312 | am_missing_run= | |
81ecdfbb RW |
7313 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 |
7314 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
7315 | fi | |
7316 | ||
7317 | if test x"${install_sh}" != xset; then | |
7318 | case $am_aux_dir in | |
7319 | *\ * | *\ *) | |
7320 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
7321 | *) | |
7322 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
7323 | esac | |
7324 | fi | |
7325 | ||
7326 | # Installed binaries are usually stripped using `strip' when the user | |
7327 | # run `make install-strip'. However `strip' might not be the right | |
7328 | # tool to use in cross-compilation environments, therefore Automake | |
7329 | # will honor the `STRIP' environment variable to overrule this program. | |
7330 | if test "$cross_compiling" != no; then | |
7331 | if test -n "$ac_tool_prefix"; then | |
7332 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
7333 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
7334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7335 | $as_echo_n "checking for $ac_word... " >&6; } | |
7336 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
7337 | $as_echo_n "(cached) " >&6 | |
7338 | else | |
7339 | if test -n "$STRIP"; then | |
7340 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
7341 | else | |
7342 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7343 | for as_dir in $PATH | |
7344 | do | |
7345 | IFS=$as_save_IFS | |
7346 | test -z "$as_dir" && as_dir=. | |
7347 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7348 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7349 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
7350 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7351 | break 2 | |
7352 | fi | |
7353 | done | |
7354 | done | |
7355 | IFS=$as_save_IFS | |
7356 | ||
7357 | fi | |
7358 | fi | |
7359 | STRIP=$ac_cv_prog_STRIP | |
7360 | if test -n "$STRIP"; then | |
7361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
7362 | $as_echo "$STRIP" >&6; } | |
7363 | else | |
7364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7365 | $as_echo "no" >&6; } | |
7366 | fi | |
7367 | ||
7368 | ||
7369 | fi | |
7370 | if test -z "$ac_cv_prog_STRIP"; then | |
7371 | ac_ct_STRIP=$STRIP | |
7372 | # Extract the first word of "strip", so it can be a program name with args. | |
7373 | set dummy strip; ac_word=$2 | |
7374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7375 | $as_echo_n "checking for $ac_word... " >&6; } | |
7376 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
7377 | $as_echo_n "(cached) " >&6 | |
7378 | else | |
7379 | if test -n "$ac_ct_STRIP"; then | |
7380 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
7381 | else | |
7382 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7383 | for as_dir in $PATH | |
7384 | do | |
7385 | IFS=$as_save_IFS | |
7386 | test -z "$as_dir" && as_dir=. | |
7387 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7388 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7389 | ac_cv_prog_ac_ct_STRIP="strip" | |
7390 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7391 | break 2 | |
7392 | fi | |
7393 | done | |
7394 | done | |
7395 | IFS=$as_save_IFS | |
7396 | ||
7397 | fi | |
7398 | fi | |
7399 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
7400 | if test -n "$ac_ct_STRIP"; then | |
7401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
7402 | $as_echo "$ac_ct_STRIP" >&6; } | |
7403 | else | |
7404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7405 | $as_echo "no" >&6; } | |
7406 | fi | |
7407 | ||
7408 | if test "x$ac_ct_STRIP" = x; then | |
7409 | STRIP=":" | |
7410 | else | |
7411 | case $cross_compiling:$ac_tool_warned in | |
7412 | yes:) | |
7413 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7414 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7415 | ac_tool_warned=yes ;; | |
7416 | esac | |
7417 | STRIP=$ac_ct_STRIP | |
7418 | fi | |
7419 | else | |
7420 | STRIP="$ac_cv_prog_STRIP" | |
7421 | fi | |
7422 | ||
7423 | fi | |
7424 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
7425 | ||
7426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
7427 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
7428 | if test -z "$MKDIR_P"; then | |
7429 | if test "${ac_cv_path_mkdir+set}" = set; then : | |
7430 | $as_echo_n "(cached) " >&6 | |
7431 | else | |
7432 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7433 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
7434 | do | |
7435 | IFS=$as_save_IFS | |
7436 | test -z "$as_dir" && as_dir=. | |
7437 | for ac_prog in mkdir gmkdir; do | |
7438 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7439 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
7440 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
7441 | 'mkdir (GNU coreutils) '* | \ | |
7442 | 'mkdir (coreutils) '* | \ | |
7443 | 'mkdir (fileutils) '4.1*) | |
7444 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
7445 | break 3;; | |
7446 | esac | |
7447 | done | |
7448 | done | |
e28b3332 | 7449 | done |
81ecdfbb RW |
7450 | IFS=$as_save_IFS |
7451 | ||
7452 | fi | |
7453 | ||
7454 | if test "${ac_cv_path_mkdir+set}" = set; then | |
7455 | MKDIR_P="$ac_cv_path_mkdir -p" | |
e28b3332 | 7456 | else |
81ecdfbb RW |
7457 | # As a last resort, use the slow shell script. Don't cache a |
7458 | # value for MKDIR_P within a source directory, because that will | |
7459 | # break other packages using the cache if that directory is | |
7460 | # removed, or if the value is a relative name. | |
7461 | test -d ./--version && rmdir ./--version | |
7462 | MKDIR_P="$ac_install_sh -d" | |
e28b3332 DJ |
7463 | fi |
7464 | fi | |
81ecdfbb RW |
7465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
7466 | $as_echo "$MKDIR_P" >&6; } | |
7467 | ||
f434ba03 | 7468 | |
81ecdfbb RW |
7469 | mkdir_p="$MKDIR_P" |
7470 | case $mkdir_p in | |
7471 | [\\/$]* | ?:[\\/]*) ;; | |
7472 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
7473 | esac | |
e28b3332 DJ |
7474 | |
7475 | for ac_prog in gawk mawk nawk awk | |
7476 | do | |
7477 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7478 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7480 | $as_echo_n "checking for $ac_word... " >&6; } | |
7481 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7482 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7483 | else |
7484 | if test -n "$AWK"; then | |
7485 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7486 | else | |
7487 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7488 | for as_dir in $PATH | |
7489 | do | |
7490 | IFS=$as_save_IFS | |
7491 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7492 | for ac_exec_ext in '' $ac_executable_extensions; do |
7493 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e28b3332 | 7494 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7495 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
e28b3332 DJ |
7496 | break 2 |
7497 | fi | |
7498 | done | |
81ecdfbb RW |
7499 | done |
7500 | IFS=$as_save_IFS | |
e28b3332 DJ |
7501 | |
7502 | fi | |
7503 | fi | |
7504 | AWK=$ac_cv_prog_AWK | |
7505 | if test -n "$AWK"; then | |
81ecdfbb RW |
7506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7507 | $as_echo "$AWK" >&6; } | |
e28b3332 | 7508 | else |
81ecdfbb RW |
7509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7510 | $as_echo "no" >&6; } | |
e28b3332 DJ |
7511 | fi |
7512 | ||
81ecdfbb | 7513 | |
e28b3332 DJ |
7514 | test -n "$AWK" && break |
7515 | done | |
7516 | ||
81ecdfbb | 7517 | ac_config_commands="$ac_config_commands depfiles" |
e28b3332 DJ |
7518 | |
7519 | ||
7520 | am_make=${MAKE-make} | |
7521 | cat > confinc << 'END' | |
7522 | am__doit: | |
81ecdfbb | 7523 | @echo this is the am__doit target |
e28b3332 DJ |
7524 | .PHONY: am__doit |
7525 | END | |
7526 | # If we don't find an include directive, just comment out the code. | |
81ecdfbb RW |
7527 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 |
7528 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
e28b3332 DJ |
7529 | am__include="#" |
7530 | am__quote= | |
7531 | _am_result=none | |
7532 | # First try GNU make style include. | |
7533 | echo "include confinc" > confmf | |
81ecdfbb RW |
7534 | # Ignore all kinds of additional output from `make'. |
7535 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
7536 | *the\ am__doit\ target*) | |
7537 | am__include=include | |
7538 | am__quote= | |
7539 | _am_result=GNU | |
7540 | ;; | |
7541 | esac | |
e28b3332 DJ |
7542 | # Now try BSD make style include. |
7543 | if test "$am__include" = "#"; then | |
7544 | echo '.include "confinc"' > confmf | |
81ecdfbb RW |
7545 | case `$am_make -s -f confmf 2> /dev/null` in #( |
7546 | *the\ am__doit\ target*) | |
7547 | am__include=.include | |
7548 | am__quote="\"" | |
7549 | _am_result=BSD | |
7550 | ;; | |
7551 | esac | |
e28b3332 DJ |
7552 | fi |
7553 | ||
7554 | ||
81ecdfbb RW |
7555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 |
7556 | $as_echo "$_am_result" >&6; } | |
e28b3332 DJ |
7557 | rm -f confinc confmf |
7558 | ||
81ecdfbb RW |
7559 | # Check whether --enable-dependency-tracking was given. |
7560 | if test "${enable_dependency_tracking+set}" = set; then : | |
7561 | enableval=$enable_dependency_tracking; | |
7562 | fi | |
e28b3332 | 7563 | |
e28b3332 DJ |
7564 | if test "x$enable_dependency_tracking" != xno; then |
7565 | am_depcomp="$ac_aux_dir/depcomp" | |
7566 | AMDEPBACKSLASH='\' | |
7567 | fi | |
81ecdfbb | 7568 | if test "x$enable_dependency_tracking" != xno; then |
e28b3332 DJ |
7569 | AMDEP_TRUE= |
7570 | AMDEP_FALSE='#' | |
7571 | else | |
7572 | AMDEP_TRUE='#' | |
7573 | AMDEP_FALSE= | |
7574 | fi | |
7575 | ||
7576 | ||
81ecdfbb RW |
7577 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
7578 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
7579 | # is not polluted with repeated "-I." | |
7580 | am__isrc=' -I$(srcdir)' | |
7581 | # test to see if srcdir already configured | |
7582 | if test -f $srcdir/config.status; then | |
7583 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
7584 | fi | |
e28b3332 DJ |
7585 | fi |
7586 | ||
7587 | # test whether we have cygpath | |
7588 | if test -z "$CYGPATH_W"; then | |
7589 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
7590 | CYGPATH_W='cygpath -w' | |
7591 | else | |
7592 | CYGPATH_W=echo | |
7593 | fi | |
7594 | fi | |
7595 | ||
7596 | ||
7597 | # Define the identity of the package. | |
7598 | PACKAGE=gdb | |
7599 | VERSION=UNUSED-VERSION | |
7600 | ||
7601 | ||
7602 | # Some tools Automake needs. | |
7603 | ||
7604 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
7605 | ||
7606 | ||
7607 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
7608 | ||
7609 | ||
7610 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
7611 | ||
7612 | ||
7613 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
7614 | ||
7615 | ||
7616 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
7617 | ||
e28b3332 DJ |
7618 | # We need awk for the "check" target. The system "awk" is bad on |
7619 | # some platforms. | |
7620 | # Always define AMTAR for backward compatibility. | |
7621 | ||
7622 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
7623 | ||
7624 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
7625 | ||
7626 | ||
7627 | ||
7628 | ||
7629 | depcc="$CC" am_compiler_list= | |
7630 | ||
81ecdfbb RW |
7631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
7632 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
7633 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
7634 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7635 | else |
7636 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
7637 | # We make a subdir and do the tests there. Otherwise we can end up | |
7638 | # making bogus files that we don't know about and never remove. For | |
7639 | # instance it was reported that on HP-UX the gcc test will end up | |
7640 | # making a dummy file named `D' -- because `-MD' means `put the output | |
7641 | # in D'. | |
7642 | mkdir conftest.dir | |
7643 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
7644 | # using a relative directory. | |
7645 | cp "$am_depcomp" conftest.dir | |
7646 | cd conftest.dir | |
7647 | # We will build objects and dependencies in a subdirectory because | |
7648 | # it helps to detect inapplicable dependency modes. For instance | |
7649 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
7650 | # side effect of compilation, but ICC will put the dependencies in | |
7651 | # the current directory while Tru64 will put them in the object | |
7652 | # directory. | |
7653 | mkdir sub | |
7654 | ||
7655 | am_cv_CC_dependencies_compiler_type=none | |
7656 | if test "$am_compiler_list" = ""; then | |
7657 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
7658 | fi | |
81ecdfbb RW |
7659 | am__universal=false |
7660 | case " $depcc " in #( | |
7661 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
7662 | esac | |
7663 | ||
e28b3332 DJ |
7664 | for depmode in $am_compiler_list; do |
7665 | # Setup a source with many dependencies, because some compilers | |
7666 | # like to wrap large dependency lists on column 80 (with \), and | |
7667 | # we should not choose a depcomp mode which is confused by this. | |
7668 | # | |
7669 | # We need to recreate these files for each test, as the compiler may | |
7670 | # overwrite some of them when testing with obscure command lines. | |
7671 | # This happens at least with the AIX C compiler. | |
7672 | : > sub/conftest.c | |
7673 | for i in 1 2 3 4 5 6; do | |
7674 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
7675 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
7676 | # Solaris 8's {/usr,}/bin/sh. | |
7677 | touch sub/conftst$i.h | |
7678 | done | |
7679 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
7680 | ||
81ecdfbb RW |
7681 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
7682 | # mode. It turns out that the SunPro C++ compiler does not properly | |
7683 | # handle `-M -o', and we need to detect this. Also, some Intel | |
7684 | # versions had trouble with output in subdirs | |
7685 | am__obj=sub/conftest.${OBJEXT-o} | |
7686 | am__minus_obj="-o $am__obj" | |
e28b3332 | 7687 | case $depmode in |
81ecdfbb RW |
7688 | gcc) |
7689 | # This depmode causes a compiler race in universal mode. | |
7690 | test "$am__universal" = false || continue | |
7691 | ;; | |
e28b3332 DJ |
7692 | nosideeffect) |
7693 | # after this tag, mechanisms are not by side-effect, so they'll | |
7694 | # only be used when explicitly requested | |
7695 | if test "x$enable_dependency_tracking" = xyes; then | |
7696 | continue | |
7697 | else | |
7698 | break | |
7699 | fi | |
7700 | ;; | |
81ecdfbb RW |
7701 | msvisualcpp | msvcmsys) |
7702 | # This compiler won't grok `-c -o', but also, the minuso test has | |
7703 | # not run yet. These depmodes are late enough in the game, and | |
7704 | # so weak that their functioning should not be impacted. | |
7705 | am__obj=conftest.${OBJEXT-o} | |
7706 | am__minus_obj= | |
7707 | ;; | |
e28b3332 DJ |
7708 | none) break ;; |
7709 | esac | |
e28b3332 | 7710 | if depmode=$depmode \ |
81ecdfbb | 7711 | source=sub/conftest.c object=$am__obj \ |
e28b3332 | 7712 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
81ecdfbb | 7713 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
e28b3332 | 7714 | >/dev/null 2>conftest.err && |
81ecdfbb | 7715 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 | 7716 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
81ecdfbb | 7717 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 DJ |
7718 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
7719 | # icc doesn't choke on unknown options, it will just issue warnings | |
7720 | # or remarks (even with -Werror). So we grep stderr for any message | |
7721 | # that says an option was ignored or not supported. | |
7722 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
7723 | # icc: Command line warning: ignoring option '-M'; no argument required | |
7724 | # The diagnosis changed in icc 8.0: | |
7725 | # icc: Command line remark: option '-MP' not supported | |
7726 | if (grep 'ignoring option' conftest.err || | |
7727 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
7728 | am_cv_CC_dependencies_compiler_type=$depmode | |
7729 | break | |
7730 | fi | |
7731 | fi | |
7732 | done | |
7733 | ||
7734 | cd .. | |
7735 | rm -rf conftest.dir | |
7736 | else | |
7737 | am_cv_CC_dependencies_compiler_type=none | |
7738 | fi | |
7739 | ||
7740 | fi | |
81ecdfbb RW |
7741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
7742 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
e28b3332 DJ |
7743 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
7744 | ||
81ecdfbb | 7745 | if |
e28b3332 DJ |
7746 | test "x$enable_dependency_tracking" != xno \ |
7747 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
7748 | am__fastdepCC_TRUE= | |
7749 | am__fastdepCC_FALSE='#' | |
7750 | else | |
7751 | am__fastdepCC_TRUE='#' | |
7752 | am__fastdepCC_FALSE= | |
7753 | fi | |
7754 | ||
7755 | ||
7756 | ||
7757 | ||
bec39cab AC |
7758 | |
7759 | ||
81ecdfbb RW |
7760 | # Check whether --with-separate-debug-dir was given. |
7761 | if test "${with_separate_debug_dir+set}" = set; then : | |
7762 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
7763 | DEBUGDIR=$withval |
7764 | else | |
7765 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
7766 | fi |
7767 | ||
20e95c23 | 7768 | |
783e057b DJ |
7769 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7770 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 7771 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 7772 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 7773 | |
783e057b DJ |
7774 | cat >>confdefs.h <<_ACEOF |
7775 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 7776 | _ACEOF |
20e95c23 | 7777 | |
20e95c23 | 7778 | |
20e95c23 | 7779 | |
b14b1491 TT |
7780 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7781 | if test "x$prefix" = xNONE; then | |
7782 | test_prefix=/usr/local | |
7783 | else | |
7784 | test_prefix=$prefix | |
7785 | fi | |
783e057b | 7786 | else |
b14b1491 | 7787 | test_prefix=$exec_prefix |
783e057b | 7788 | fi |
b14b1491 TT |
7789 | value=0 |
7790 | case ${ac_define_dir} in | |
7791 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7792 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7793 | value=1 | |
7794 | ;; | |
7795 | esac | |
7796 | ||
7797 | cat >>confdefs.h <<_ACEOF | |
7798 | #define DEBUGDIR_RELOCATABLE $value | |
7799 | _ACEOF | |
7800 | ||
7801 | ||
7802 | ||
7803 | # GDB's datadir relocation | |
7804 | ||
7805 | ||
7806 | ||
81ecdfbb RW |
7807 | # Check whether --with-gdb-datadir was given. |
7808 | if test "${with_gdb_datadir+set}" = set; then : | |
7809 | withval=$with_gdb_datadir; | |
b14b1491 | 7810 | GDB_DATADIR=$withval |
20e95c23 | 7811 | else |
b14b1491 | 7812 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
7813 | fi |
7814 | ||
20e95c23 | 7815 | |
b14b1491 TT |
7816 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7817 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7818 | ac_define_dir=`eval echo $GDB_DATADIR` | |
7819 | ac_define_dir=`eval echo $ac_define_dir` | |
7820 | ||
7821 | cat >>confdefs.h <<_ACEOF | |
7822 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
7823 | _ACEOF |
7824 | ||
b14b1491 TT |
7825 | |
7826 | ||
7827 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7828 | if test "x$prefix" = xNONE; then | |
7829 | test_prefix=/usr/local | |
7830 | else | |
7831 | test_prefix=$prefix | |
7832 | fi | |
7833 | else | |
7834 | test_prefix=$exec_prefix | |
7835 | fi | |
7836 | value=0 | |
7837 | case ${ac_define_dir} in | |
7838 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7839 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7840 | value=1 | |
7841 | ;; | |
7842 | esac | |
7843 | ||
7844 | cat >>confdefs.h <<_ACEOF | |
7845 | #define GDB_DATADIR_RELOCATABLE $value | |
7846 | _ACEOF | |
7847 | ||
7848 | ||
783e057b | 7849 | |
20e95c23 | 7850 | |
81ecdfbb RW |
7851 | # Check whether --with-relocated-sources was given. |
7852 | if test "${with_relocated_sources+set}" = set; then : | |
7853 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
7854 | |
7855 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7856 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7857 | ac_define_dir=`eval echo $reloc_srcdir` | |
7858 | ac_define_dir=`eval echo $ac_define_dir` | |
7859 | ||
7860 | cat >>confdefs.h <<_ACEOF | |
7861 | #define RELOC_SRCDIR "$ac_define_dir" | |
7862 | _ACEOF | |
7863 | ||
7864 | ||
7865 | ||
81ecdfbb RW |
7866 | fi |
7867 | ||
29b0e8a2 JM |
7868 | |
7869 | ||
20e95c23 | 7870 | |
783e057b | 7871 | subdirs="$subdirs doc testsuite" |
20e95c23 DJ |
7872 | |
7873 | ||
783e057b | 7874 | # Check whether to support alternative target configurations |
81ecdfbb RW |
7875 | # Check whether --enable-targets was given. |
7876 | if test "${enable_targets+set}" = set; then : | |
7877 | enableval=$enable_targets; case "${enableval}" in | |
7878 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
7879 | ;; |
7880 | no) enable_targets= ;; | |
7881 | *) enable_targets=$enableval ;; | |
7882 | esac | |
81ecdfbb RW |
7883 | fi |
7884 | ||
20e95c23 | 7885 | |
783e057b | 7886 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
7887 | # Check whether --enable-64-bit-bfd was given. |
7888 | if test "${enable_64_bit_bfd+set}" = set; then : | |
7889 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
7890 | yes) want64=true ;; |
7891 | no) want64=false ;; | |
81ecdfbb | 7892 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
7893 | esac |
7894 | else | |
7895 | want64=false | |
81ecdfbb RW |
7896 | fi |
7897 | ||
783e057b DJ |
7898 | # Provide defaults for some variables set by the per-host and per-target |
7899 | # configuration. | |
7900 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 7901 | |
783e057b DJ |
7902 | if test "${target}" = "${host}"; then |
7903 | gdb_native=yes | |
7904 | else | |
7905 | gdb_native=no | |
7906 | fi | |
20e95c23 | 7907 | |
783e057b | 7908 | . $srcdir/configure.host |
20e95c23 | 7909 | |
783e057b | 7910 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 7911 | |
783e057b DJ |
7912 | TARGET_OBS= |
7913 | all_targets= | |
20e95c23 | 7914 | |
783e057b | 7915 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 7916 | do |
783e057b DJ |
7917 | if test "$targ_alias" = "all"; then |
7918 | all_targets=true | |
7919 | else | |
7920 | # Canonicalize the secondary target names. | |
7921 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
7922 | if test -n "$result"; then | |
7923 | targ=$result | |
7924 | else | |
7925 | targ=$targ_alias | |
7926 | fi | |
20e95c23 | 7927 | |
783e057b | 7928 | . ${srcdir}/configure.tgt |
20e95c23 | 7929 | |
bf307134 JB |
7930 | if test -z "${gdb_target_obs}"; then : |
7931 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
7932 | fi | |
7933 | ||
783e057b DJ |
7934 | # Target-specific object files |
7935 | for i in ${gdb_target_obs}; do | |
7936 | case " $TARGET_OBS " in | |
7937 | *" ${i} "*) ;; | |
7938 | *) | |
7939 | TARGET_OBS="$TARGET_OBS ${i}" | |
7940 | ;; | |
7941 | esac | |
7942 | done | |
20e95c23 | 7943 | |
783e057b DJ |
7944 | # Check whether this target needs 64-bit CORE_ADDR |
7945 | if test x${want64} = xfalse; then | |
7946 | . ${srcdir}/../bfd/config.bfd | |
7947 | fi | |
7948 | fi | |
20e95c23 DJ |
7949 | done |
7950 | ||
783e057b DJ |
7951 | if test x${all_targets} = xtrue; then |
7952 | ||
7953 | # We want all 64-bit targets if we either: | |
7954 | # - run on a 64-bit host or | |
7955 | # - already require 64-bit support for some other target or | |
7956 | # - the --enable-64-bit-bfd option was supplied | |
7957 | # Otherwise we only support all 32-bit targets. | |
7958 | # | |
7959 | # NOTE: This test must be in sync with the corresponding | |
7960 | # tests in BFD! | |
20e95c23 | 7961 | |
783e057b | 7962 | if test x${want64} = xfalse; then |
81ecdfbb RW |
7963 | # The cast to long int works around a bug in the HP C Compiler |
7964 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7965 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7966 | # This bug is HP SR number 8606223364. | |
7967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
7968 | $as_echo_n "checking size of long... " >&6; } | |
7969 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
7970 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 7971 | else |
81ecdfbb | 7972 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 7973 | |
81ecdfbb RW |
7974 | else |
7975 | if test "$ac_cv_type_long" = yes; then | |
7976 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7977 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7978 | { as_fn_set_status 77 | |
7979 | as_fn_error "cannot compute sizeof (long) | |
7980 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7981 | else | |
7982 | ac_cv_sizeof_long=0 | |
7983 | fi | |
c0993dbe | 7984 | fi |
81ecdfbb | 7985 | |
c0993dbe | 7986 | fi |
81ecdfbb RW |
7987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
7988 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 7989 | |
c0993dbe | 7990 | |
c0993dbe | 7991 | |
c0993dbe UW |
7992 | cat >>confdefs.h <<_ACEOF |
7993 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
7994 | _ACEOF | |
7995 | ||
7996 | ||
7997 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
7998 | want64=true | |
7999 | fi | |
8000 | fi | |
8001 | if test x${want64} = xtrue; then | |
8002 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
8003 | else | |
8004 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
8005 | fi | |
8006 | fi | |
8007 | ||
8008 | ||
8009 | ||
8010 | # For other settings, only the main target counts. | |
8011 | gdb_sim= | |
8012 | gdb_osabi= | |
8013 | build_gdbserver= | |
8014 | targ=$target; . ${srcdir}/configure.tgt | |
8015 | ||
8016 | # Fetch the default architecture and default target vector from BFD. | |
8017 | targ=$target; . $srcdir/../bfd/config.bfd | |
8018 | ||
8019 | # We only want the first architecture, so strip off the others if | |
8020 | # there is more than one. | |
8021 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
8022 | ||
8023 | if test "x$targ_archs" != x; then | |
8024 | ||
8025 | cat >>confdefs.h <<_ACEOF | |
8026 | #define DEFAULT_BFD_ARCH $targ_archs | |
8027 | _ACEOF | |
8028 | ||
8029 | fi | |
8030 | if test "x$targ_defvec" != x; then | |
8031 | ||
8032 | cat >>confdefs.h <<_ACEOF | |
8033 | #define DEFAULT_BFD_VEC $targ_defvec | |
8034 | _ACEOF | |
8035 | ||
8036 | fi | |
8037 | ||
c0993dbe UW |
8038 | # The CLI cannot be disabled yet, but may be in the future. |
8039 | ||
8040 | # Enable CLI. | |
81ecdfbb RW |
8041 | # Check whether --enable-gdbcli was given. |
8042 | if test "${enable_gdbcli+set}" = set; then : | |
8043 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
8044 | yes) |
8045 | ;; | |
8046 | no) | |
81ecdfbb | 8047 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 8048 | *) |
81ecdfbb | 8049 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
8050 | esac |
8051 | else | |
8052 | enable_gdbcli=yes | |
81ecdfbb RW |
8053 | fi |
8054 | ||
c0993dbe UW |
8055 | if test x"$enable_gdbcli" = xyes; then |
8056 | if test -d $srcdir/cli; then | |
8057 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
8058 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
8059 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
8060 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
8061 | fi | |
8062 | fi | |
8063 | ||
8064 | # Enable MI. | |
81ecdfbb RW |
8065 | # Check whether --enable-gdbmi was given. |
8066 | if test "${enable_gdbmi+set}" = set; then : | |
8067 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
8068 | yes | no) |
8069 | ;; | |
8070 | *) | |
81ecdfbb | 8071 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
8072 | esac |
8073 | else | |
8074 | enable_gdbmi=yes | |
81ecdfbb RW |
8075 | fi |
8076 | ||
c0993dbe UW |
8077 | if test x"$enable_gdbmi" = xyes; then |
8078 | if test -d $srcdir/mi; then | |
8079 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
8080 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
8081 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
8082 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
8083 | fi | |
8084 | fi | |
8085 | ||
8086 | # Enable TUI. | |
81ecdfbb RW |
8087 | # Check whether --enable-tui was given. |
8088 | if test "${enable_tui+set}" = set; then : | |
8089 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 8090 | yes | no | auto) |
c0993dbe UW |
8091 | ;; |
8092 | *) | |
81ecdfbb | 8093 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
8094 | esac |
8095 | else | |
3ca64bd3 | 8096 | enable_tui=auto |
81ecdfbb RW |
8097 | fi |
8098 | ||
c0993dbe UW |
8099 | |
8100 | # Enable gdbtk. | |
81ecdfbb RW |
8101 | # Check whether --enable-gdbtk was given. |
8102 | if test "${enable_gdbtk+set}" = set; then : | |
8103 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
8104 | yes | no) |
8105 | ;; | |
8106 | *) | |
81ecdfbb | 8107 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
8108 | esac |
8109 | else | |
5062cc19 | 8110 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
8111 | enable_gdbtk=yes |
8112 | else | |
8113 | enable_gdbtk=no | |
8114 | fi | |
81ecdfbb RW |
8115 | fi |
8116 | ||
c0993dbe UW |
8117 | # We unconditionally disable gdbtk tests on selected platforms. |
8118 | case $host_os in | |
8119 | go32* | windows*) | |
81ecdfbb RW |
8120 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
8121 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
8122 | enable_gdbtk=no ;; |
8123 | esac | |
8124 | ||
8125 | # Libunwind support. | |
bec39cab | 8126 | |
81ecdfbb RW |
8127 | # Check whether --with-libunwind was given. |
8128 | if test "${with_libunwind+set}" = set; then : | |
8129 | withval=$with_libunwind; case "${withval}" in | |
bec39cab AC |
8130 | yes) enable_libunwind=yes ;; |
8131 | no) enable_libunwind=no ;; | |
81ecdfbb | 8132 | *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;; |
bec39cab | 8133 | esac |
bec39cab | 8134 | else |
bec39cab | 8135 | |
81ecdfbb RW |
8136 | for ac_header in libunwind.h libunwind-ia64.h |
8137 | do : | |
8138 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8139 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8140 | eval as_val=\$$as_ac_Header | |
8141 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8142 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8143 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8144 | _ACEOF |
8145 | ||
8146 | fi | |
8147 | ||
8148 | done | |
8149 | ||
a9322a30 TT |
8150 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then |
8151 | enable_libunwind=yes; | |
8152 | fi | |
8153 | ||
bec39cab | 8154 | fi |
bec39cab | 8155 | |
bec39cab | 8156 | |
81ecdfbb RW |
8157 | if test x"$enable_libunwind" = xyes; then |
8158 | for ac_header in libunwind.h libunwind-ia64.h | |
8159 | do : | |
8160 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8161 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8162 | eval as_val=\$$as_ac_Header | |
8163 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8164 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8165 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8166 | _ACEOF |
8167 | ||
8168 | fi | |
8169 | ||
8170 | done | |
8171 | ||
bec39cab | 8172 | |
81ecdfbb | 8173 | $as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h |
a9322a30 TT |
8174 | |
8175 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
8176 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
8177 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
8178 | fi | |
8179 | ||
cb01cfba JB |
8180 | opt_curses=no |
8181 | ||
81ecdfbb RW |
8182 | # Check whether --with-curses was given. |
8183 | if test "${with_curses+set}" = set; then : | |
8184 | withval=$with_curses; opt_curses=$withval | |
8185 | fi | |
8186 | ||
cb01cfba | 8187 | |
76a39ba7 | 8188 | prefer_curses=no |
cb01cfba | 8189 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 8190 | prefer_curses=yes |
cb01cfba JB |
8191 | fi |
8192 | ||
a9322a30 | 8193 | # Profiling support. |
81ecdfbb RW |
8194 | # Check whether --enable-profiling was given. |
8195 | if test "${enable_profiling+set}" = set; then : | |
8196 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
8197 | yes | no) |
8198 | ;; | |
8199 | *) | |
81ecdfbb | 8200 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
8201 | esac |
8202 | else | |
8203 | enable_profiling=no | |
81ecdfbb | 8204 | fi |
bec39cab | 8205 | |
a9322a30 TT |
8206 | |
8207 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
8208 | do : |
8209 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8210 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8211 | eval as_val=\$$as_ac_var | |
8212 | if test "x$as_val" = x""yes; then : | |
8213 | cat >>confdefs.h <<_ACEOF | |
8214 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 8215 | _ACEOF |
a9322a30 | 8216 | |
81ecdfbb RW |
8217 | fi |
8218 | done | |
a9322a30 | 8219 | |
81ecdfbb RW |
8220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
8221 | $as_echo_n "checking for _etext... " >&6; } | |
8222 | if test "${ac_cv_var__etext+set}" = set; then : | |
8223 | $as_echo_n "(cached) " >&6 | |
8224 | else | |
8225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8226 | /* end confdefs.h. */ | |
8227 | #include <stdlib.h> | |
8228 | extern char _etext; | |
a9322a30 TT |
8229 | |
8230 | int | |
8231 | main () | |
8232 | { | |
8233 | free (&_etext); | |
8234 | ; | |
8235 | return 0; | |
8236 | } | |
bec39cab | 8237 | _ACEOF |
81ecdfbb | 8238 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8239 | ac_cv_var__etext=yes |
bec39cab | 8240 | else |
81ecdfbb | 8241 | ac_cv_var__etext=no |
bec39cab | 8242 | fi |
81ecdfbb RW |
8243 | rm -f core conftest.err conftest.$ac_objext \ |
8244 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8245 | fi |
81ecdfbb RW |
8246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
8247 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 8248 | if test $ac_cv_var__etext = yes; then |
60ca704f | 8249 | |
81ecdfbb | 8250 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 8251 | |
bec39cab | 8252 | fi |
81ecdfbb RW |
8253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
8254 | $as_echo_n "checking for etext... " >&6; } | |
8255 | if test "${ac_cv_var_etext+set}" = set; then : | |
8256 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8257 | else |
81ecdfbb | 8258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8259 | /* end confdefs.h. */ |
a9322a30 TT |
8260 | #include <stdlib.h> |
8261 | extern char etext; | |
bec39cab AC |
8262 | |
8263 | int | |
8264 | main () | |
8265 | { | |
a9322a30 | 8266 | free (&etext); |
bec39cab AC |
8267 | ; |
8268 | return 0; | |
8269 | } | |
8270 | _ACEOF | |
81ecdfbb | 8271 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8272 | ac_cv_var_etext=yes |
bec39cab | 8273 | else |
81ecdfbb | 8274 | ac_cv_var_etext=no |
bec39cab | 8275 | fi |
81ecdfbb RW |
8276 | rm -f core conftest.err conftest.$ac_objext \ |
8277 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8278 | fi |
81ecdfbb RW |
8279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
8280 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
8281 | if test $ac_cv_var_etext = yes; then |
8282 | ||
81ecdfbb | 8283 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
8284 | |
8285 | fi | |
a9322a30 TT |
8286 | if test "$enable_profiling" = yes ; then |
8287 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 8288 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
8289 | fi |
8290 | PROFILE_CFLAGS=-pg | |
8291 | OLD_CFLAGS="$CFLAGS" | |
8292 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 8293 | |
81ecdfbb RW |
8294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
8295 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
8296 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
8297 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8298 | else |
81ecdfbb | 8299 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8300 | /* end confdefs.h. */ |
bec39cab AC |
8301 | |
8302 | int | |
8303 | main () | |
8304 | { | |
a9322a30 | 8305 | int x; |
bec39cab AC |
8306 | ; |
8307 | return 0; | |
8308 | } | |
8309 | _ACEOF | |
81ecdfbb | 8310 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 8311 | ac_cv_cc_supports_pg=yes |
bec39cab | 8312 | else |
81ecdfbb | 8313 | ac_cv_cc_supports_pg=no |
bec39cab | 8314 | fi |
81ecdfbb | 8315 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8316 | fi |
81ecdfbb RW |
8317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
8318 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 8319 | |
a9322a30 | 8320 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 8321 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 8322 | fi |
bec39cab | 8323 | |
a9322a30 | 8324 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
8325 | fi |
8326 | ||
c16158bc JM |
8327 | |
8328 | ||
81ecdfbb RW |
8329 | # Check whether --with-pkgversion was given. |
8330 | if test "${with_pkgversion+set}" = set; then : | |
8331 | withval=$with_pkgversion; case "$withval" in | |
8332 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8333 | no) PKGVERSION= ;; |
8334 | *) PKGVERSION="($withval) " ;; | |
8335 | esac | |
8336 | else | |
8337 | PKGVERSION="(GDB) " | |
8338 | ||
81ecdfbb | 8339 | fi |
c16158bc JM |
8340 | |
8341 | ||
8342 | ||
8343 | ||
81ecdfbb RW |
8344 | |
8345 | # Check whether --with-bugurl was given. | |
8346 | if test "${with_bugurl+set}" = set; then : | |
8347 | withval=$with_bugurl; case "$withval" in | |
8348 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8349 | no) BUGURL= |
8350 | ;; | |
8351 | *) BUGURL="$withval" | |
8352 | ;; | |
8353 | esac | |
8354 | else | |
8355 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
8356 | ||
81ecdfbb RW |
8357 | fi |
8358 | ||
c16158bc JM |
8359 | case ${BUGURL} in |
8360 | "") | |
8361 | REPORT_BUGS_TO= | |
8362 | REPORT_BUGS_TEXI= | |
8363 | ;; | |
8364 | *) | |
8365 | REPORT_BUGS_TO="<$BUGURL>" | |
8366 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
8367 | ;; | |
8368 | esac; | |
8369 | ||
8370 | ||
8371 | ||
8372 | ||
8373 | cat >>confdefs.h <<_ACEOF | |
8374 | #define PKGVERSION "$PKGVERSION" | |
8375 | _ACEOF | |
8376 | ||
8377 | ||
8378 | cat >>confdefs.h <<_ACEOF | |
8379 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
8380 | _ACEOF | |
8381 | ||
8382 | ||
bec39cab AC |
8383 | # --------------------- # |
8384 | # Checks for programs. # | |
8385 | # --------------------- # | |
8386 | ||
8387 | for ac_prog in gawk mawk nawk awk | |
8388 | do | |
8389 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8390 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8392 | $as_echo_n "checking for $ac_word... " >&6; } | |
8393 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
8394 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8395 | else |
8396 | if test -n "$AWK"; then | |
8397 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
8398 | else | |
8399 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8400 | for as_dir in $PATH | |
8401 | do | |
8402 | IFS=$as_save_IFS | |
8403 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8404 | for ac_exec_ext in '' $ac_executable_extensions; do |
8405 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8406 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 8407 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8408 | break 2 |
8409 | fi | |
8410 | done | |
81ecdfbb RW |
8411 | done |
8412 | IFS=$as_save_IFS | |
bec39cab AC |
8413 | |
8414 | fi | |
8415 | fi | |
8416 | AWK=$ac_cv_prog_AWK | |
8417 | if test -n "$AWK"; then | |
81ecdfbb RW |
8418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
8419 | $as_echo "$AWK" >&6; } | |
bec39cab | 8420 | else |
81ecdfbb RW |
8421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8422 | $as_echo "no" >&6; } | |
bec39cab AC |
8423 | fi |
8424 | ||
bec39cab | 8425 | |
81ecdfbb | 8426 | test -n "$AWK" && break |
bec39cab AC |
8427 | done |
8428 | ||
bec39cab | 8429 | |
81ecdfbb RW |
8430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
8431 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
8432 | LN_S=$as_ln_s |
8433 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
8434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
8435 | $as_echo "yes" >&6; } | |
bec39cab | 8436 | else |
81ecdfbb RW |
8437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
8438 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
8439 | fi |
8440 | ||
8441 | if test -n "$ac_tool_prefix"; then | |
8442 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
8443 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
8444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8445 | $as_echo_n "checking for $ac_word... " >&6; } | |
8446 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
8447 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8448 | else |
8449 | if test -n "$RANLIB"; then | |
8450 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
8451 | else | |
8452 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8453 | for as_dir in $PATH | |
8454 | do | |
8455 | IFS=$as_save_IFS | |
8456 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8457 | for ac_exec_ext in '' $ac_executable_extensions; do |
8458 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8459 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 8460 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8461 | break 2 |
8462 | fi | |
8463 | done | |
81ecdfbb RW |
8464 | done |
8465 | IFS=$as_save_IFS | |
bec39cab AC |
8466 | |
8467 | fi | |
8468 | fi | |
8469 | RANLIB=$ac_cv_prog_RANLIB | |
8470 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
8471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
8472 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 8473 | else |
81ecdfbb RW |
8474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8475 | $as_echo "no" >&6; } | |
bec39cab AC |
8476 | fi |
8477 | ||
81ecdfbb | 8478 | |
bec39cab AC |
8479 | fi |
8480 | if test -z "$ac_cv_prog_RANLIB"; then | |
8481 | ac_ct_RANLIB=$RANLIB | |
8482 | # Extract the first word of "ranlib", so it can be a program name with args. | |
8483 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
8484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8485 | $as_echo_n "checking for $ac_word... " >&6; } | |
8486 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
8487 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8488 | else |
8489 | if test -n "$ac_ct_RANLIB"; then | |
8490 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
8491 | else | |
8492 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8493 | for as_dir in $PATH | |
8494 | do | |
8495 | IFS=$as_save_IFS | |
8496 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8497 | for ac_exec_ext in '' $ac_executable_extensions; do |
8498 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8499 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 8500 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8501 | break 2 |
8502 | fi | |
8503 | done | |
81ecdfbb RW |
8504 | done |
8505 | IFS=$as_save_IFS | |
bec39cab | 8506 | |
bec39cab AC |
8507 | fi |
8508 | fi | |
8509 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
8510 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
8511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
8512 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 8513 | else |
81ecdfbb RW |
8514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8515 | $as_echo "no" >&6; } | |
bec39cab AC |
8516 | fi |
8517 | ||
81ecdfbb RW |
8518 | if test "x$ac_ct_RANLIB" = x; then |
8519 | RANLIB=":" | |
8520 | else | |
8521 | case $cross_compiling:$ac_tool_warned in | |
8522 | yes:) | |
8523 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8524 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8525 | ac_tool_warned=yes ;; | |
8526 | esac | |
8527 | RANLIB=$ac_ct_RANLIB | |
8528 | fi | |
bec39cab AC |
8529 | else |
8530 | RANLIB="$ac_cv_prog_RANLIB" | |
8531 | fi | |
8532 | ||
8533 | for ac_prog in 'bison -y' byacc | |
8534 | do | |
8535 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8536 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8537 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8538 | $as_echo_n "checking for $ac_word... " >&6; } | |
8539 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
8540 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8541 | else |
8542 | if test -n "$YACC"; then | |
8543 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
8544 | else | |
8545 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8546 | for as_dir in $PATH | |
8547 | do | |
8548 | IFS=$as_save_IFS | |
8549 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8550 | for ac_exec_ext in '' $ac_executable_extensions; do |
8551 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8552 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 8553 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8554 | break 2 |
8555 | fi | |
8556 | done | |
81ecdfbb RW |
8557 | done |
8558 | IFS=$as_save_IFS | |
bec39cab AC |
8559 | |
8560 | fi | |
8561 | fi | |
8562 | YACC=$ac_cv_prog_YACC | |
8563 | if test -n "$YACC"; then | |
81ecdfbb RW |
8564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
8565 | $as_echo "$YACC" >&6; } | |
bec39cab | 8566 | else |
81ecdfbb RW |
8567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8568 | $as_echo "no" >&6; } | |
bec39cab AC |
8569 | fi |
8570 | ||
81ecdfbb | 8571 | |
bec39cab AC |
8572 | test -n "$YACC" && break |
8573 | done | |
8574 | test -n "$YACC" || YACC="yacc" | |
8575 | ||
8576 | ||
8577 | if test -n "$ac_tool_prefix"; then | |
8578 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
8579 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
8580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8581 | $as_echo_n "checking for $ac_word... " >&6; } | |
8582 | if test "${ac_cv_prog_AR+set}" = set; then : | |
8583 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8584 | else |
8585 | if test -n "$AR"; then | |
8586 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
8587 | else | |
8588 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8589 | for as_dir in $PATH | |
8590 | do | |
8591 | IFS=$as_save_IFS | |
8592 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8593 | for ac_exec_ext in '' $ac_executable_extensions; do |
8594 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8595 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 8596 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8597 | break 2 |
8598 | fi | |
8599 | done | |
81ecdfbb RW |
8600 | done |
8601 | IFS=$as_save_IFS | |
bec39cab AC |
8602 | |
8603 | fi | |
8604 | fi | |
8605 | AR=$ac_cv_prog_AR | |
8606 | if test -n "$AR"; then | |
81ecdfbb RW |
8607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
8608 | $as_echo "$AR" >&6; } | |
bec39cab | 8609 | else |
81ecdfbb RW |
8610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8611 | $as_echo "no" >&6; } | |
bec39cab AC |
8612 | fi |
8613 | ||
81ecdfbb | 8614 | |
bec39cab AC |
8615 | fi |
8616 | if test -z "$ac_cv_prog_AR"; then | |
8617 | ac_ct_AR=$AR | |
8618 | # Extract the first word of "ar", so it can be a program name with args. | |
8619 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
8620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8621 | $as_echo_n "checking for $ac_word... " >&6; } | |
8622 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
8623 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8624 | else |
8625 | if test -n "$ac_ct_AR"; then | |
8626 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
8627 | else | |
8628 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8629 | for as_dir in $PATH | |
8630 | do | |
8631 | IFS=$as_save_IFS | |
8632 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8633 | for ac_exec_ext in '' $ac_executable_extensions; do |
8634 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8635 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 8636 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8637 | break 2 |
8638 | fi | |
8639 | done | |
81ecdfbb RW |
8640 | done |
8641 | IFS=$as_save_IFS | |
bec39cab AC |
8642 | |
8643 | fi | |
8644 | fi | |
8645 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
8646 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
8647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
8648 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 8649 | else |
81ecdfbb RW |
8650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8651 | $as_echo "no" >&6; } | |
bec39cab AC |
8652 | fi |
8653 | ||
81ecdfbb RW |
8654 | if test "x$ac_ct_AR" = x; then |
8655 | AR="" | |
8656 | else | |
8657 | case $cross_compiling:$ac_tool_warned in | |
8658 | yes:) | |
8659 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8660 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8661 | ac_tool_warned=yes ;; | |
8662 | esac | |
8663 | AR=$ac_ct_AR | |
8664 | fi | |
bec39cab AC |
8665 | else |
8666 | AR="$ac_cv_prog_AR" | |
8667 | fi | |
8668 | ||
8669 | if test -n "$ac_tool_prefix"; then | |
8670 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
8671 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
8672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8673 | $as_echo_n "checking for $ac_word... " >&6; } | |
8674 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
8675 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8676 | else |
8677 | if test -n "$DLLTOOL"; then | |
8678 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
8679 | else | |
8680 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8681 | for as_dir in $PATH | |
8682 | do | |
8683 | IFS=$as_save_IFS | |
8684 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8685 | for ac_exec_ext in '' $ac_executable_extensions; do |
8686 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8687 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 8688 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8689 | break 2 |
8690 | fi | |
8691 | done | |
81ecdfbb RW |
8692 | done |
8693 | IFS=$as_save_IFS | |
bec39cab AC |
8694 | |
8695 | fi | |
8696 | fi | |
8697 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
8698 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
8699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
8700 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 8701 | else |
81ecdfbb RW |
8702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8703 | $as_echo "no" >&6; } | |
bec39cab AC |
8704 | fi |
8705 | ||
81ecdfbb | 8706 | |
bec39cab AC |
8707 | fi |
8708 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
8709 | ac_ct_DLLTOOL=$DLLTOOL | |
8710 | # Extract the first word of "dlltool", so it can be a program name with args. | |
8711 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
8712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8713 | $as_echo_n "checking for $ac_word... " >&6; } | |
8714 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
8715 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8716 | else |
8717 | if test -n "$ac_ct_DLLTOOL"; then | |
8718 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
8719 | else | |
8720 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8721 | for as_dir in $PATH | |
8722 | do | |
8723 | IFS=$as_save_IFS | |
8724 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8725 | for ac_exec_ext in '' $ac_executable_extensions; do |
8726 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8727 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 8728 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8729 | break 2 |
8730 | fi | |
8731 | done | |
81ecdfbb RW |
8732 | done |
8733 | IFS=$as_save_IFS | |
bec39cab AC |
8734 | |
8735 | fi | |
8736 | fi | |
8737 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
8738 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
8739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
8740 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 8741 | else |
81ecdfbb RW |
8742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8743 | $as_echo "no" >&6; } | |
bec39cab AC |
8744 | fi |
8745 | ||
81ecdfbb RW |
8746 | if test "x$ac_ct_DLLTOOL" = x; then |
8747 | DLLTOOL="" | |
8748 | else | |
8749 | case $cross_compiling:$ac_tool_warned in | |
8750 | yes:) | |
8751 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8752 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8753 | ac_tool_warned=yes ;; | |
8754 | esac | |
8755 | DLLTOOL=$ac_ct_DLLTOOL | |
8756 | fi | |
bec39cab AC |
8757 | else |
8758 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
8759 | fi | |
8760 | ||
8761 | if test -n "$ac_tool_prefix"; then | |
8762 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
8763 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
8764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8765 | $as_echo_n "checking for $ac_word... " >&6; } | |
8766 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
8767 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8768 | else |
8769 | if test -n "$WINDRES"; then | |
8770 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
8771 | else | |
8772 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8773 | for as_dir in $PATH | |
8774 | do | |
8775 | IFS=$as_save_IFS | |
8776 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8777 | for ac_exec_ext in '' $ac_executable_extensions; do |
8778 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8779 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 8780 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8781 | break 2 |
8782 | fi | |
8783 | done | |
81ecdfbb RW |
8784 | done |
8785 | IFS=$as_save_IFS | |
bec39cab AC |
8786 | |
8787 | fi | |
8788 | fi | |
8789 | WINDRES=$ac_cv_prog_WINDRES | |
8790 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
8791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
8792 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 8793 | else |
81ecdfbb RW |
8794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8795 | $as_echo "no" >&6; } | |
bec39cab AC |
8796 | fi |
8797 | ||
81ecdfbb | 8798 | |
bec39cab AC |
8799 | fi |
8800 | if test -z "$ac_cv_prog_WINDRES"; then | |
8801 | ac_ct_WINDRES=$WINDRES | |
8802 | # Extract the first word of "windres", so it can be a program name with args. | |
8803 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
8804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8805 | $as_echo_n "checking for $ac_word... " >&6; } | |
8806 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
8807 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8808 | else |
8809 | if test -n "$ac_ct_WINDRES"; then | |
8810 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
8811 | else | |
8812 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8813 | for as_dir in $PATH | |
8814 | do | |
8815 | IFS=$as_save_IFS | |
8816 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8817 | for ac_exec_ext in '' $ac_executable_extensions; do |
8818 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8819 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 8820 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8821 | break 2 |
8822 | fi | |
8823 | done | |
81ecdfbb RW |
8824 | done |
8825 | IFS=$as_save_IFS | |
bec39cab AC |
8826 | |
8827 | fi | |
8828 | fi | |
8829 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
8830 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
8831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
8832 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 8833 | else |
81ecdfbb RW |
8834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8835 | $as_echo "no" >&6; } | |
c906108c | 8836 | fi |
bec39cab | 8837 | |
81ecdfbb RW |
8838 | if test "x$ac_ct_WINDRES" = x; then |
8839 | WINDRES="" | |
8840 | else | |
8841 | case $cross_compiling:$ac_tool_warned in | |
8842 | yes:) | |
8843 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8844 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8845 | ac_tool_warned=yes ;; | |
8846 | esac | |
8847 | WINDRES=$ac_ct_WINDRES | |
8848 | fi | |
c906108c | 8849 | else |
bec39cab | 8850 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
8851 | fi |
8852 | ||
bec39cab AC |
8853 | |
8854 | # Needed for GNU/Hurd. | |
8855 | if test -n "$ac_tool_prefix"; then | |
8856 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
8857 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
8858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8859 | $as_echo_n "checking for $ac_word... " >&6; } | |
8860 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
8861 | $as_echo_n "(cached) " >&6 | |
c906108c | 8862 | else |
bec39cab AC |
8863 | if test -n "$MIG"; then |
8864 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
8865 | else | |
8866 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8867 | for as_dir in $PATH | |
8868 | do | |
8869 | IFS=$as_save_IFS | |
8870 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8871 | for ac_exec_ext in '' $ac_executable_extensions; do |
8872 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8873 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 8874 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8875 | break 2 |
8876 | fi | |
8877 | done | |
81ecdfbb RW |
8878 | done |
8879 | IFS=$as_save_IFS | |
bec39cab | 8880 | |
c906108c | 8881 | fi |
bec39cab AC |
8882 | fi |
8883 | MIG=$ac_cv_prog_MIG | |
8884 | if test -n "$MIG"; then | |
81ecdfbb RW |
8885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
8886 | $as_echo "$MIG" >&6; } | |
c906108c | 8887 | else |
81ecdfbb RW |
8888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8889 | $as_echo "no" >&6; } | |
c906108c SS |
8890 | fi |
8891 | ||
81ecdfbb | 8892 | |
bec39cab AC |
8893 | fi |
8894 | if test -z "$ac_cv_prog_MIG"; then | |
8895 | ac_ct_MIG=$MIG | |
8896 | # Extract the first word of "mig", so it can be a program name with args. | |
8897 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
8898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8899 | $as_echo_n "checking for $ac_word... " >&6; } | |
8900 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
8901 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8902 | else |
8903 | if test -n "$ac_ct_MIG"; then | |
8904 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8905 | else | |
8906 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8907 | for as_dir in $PATH | |
8908 | do | |
8909 | IFS=$as_save_IFS | |
8910 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8911 | for ac_exec_ext in '' $ac_executable_extensions; do |
8912 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8913 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8914 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8915 | break 2 |
8916 | fi | |
8917 | done | |
81ecdfbb RW |
8918 | done |
8919 | IFS=$as_save_IFS | |
c906108c | 8920 | |
bec39cab AC |
8921 | fi |
8922 | fi | |
8923 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8924 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8926 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8927 | else |
81ecdfbb RW |
8928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8929 | $as_echo "no" >&6; } | |
bec39cab | 8930 | fi |
c906108c | 8931 | |
81ecdfbb RW |
8932 | if test "x$ac_ct_MIG" = x; then |
8933 | MIG="" | |
8934 | else | |
8935 | case $cross_compiling:$ac_tool_warned in | |
8936 | yes:) | |
8937 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8938 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8939 | ac_tool_warned=yes ;; | |
8940 | esac | |
8941 | MIG=$ac_ct_MIG | |
8942 | fi | |
bec39cab AC |
8943 | else |
8944 | MIG="$ac_cv_prog_MIG" | |
8945 | fi | |
c906108c | 8946 | |
c906108c | 8947 | |
bec39cab AC |
8948 | # ---------------------- # |
8949 | # Checks for libraries. # | |
8950 | # ---------------------- # | |
c906108c | 8951 | |
bec39cab | 8952 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8954 | $as_echo_n "checking for main in -lm... " >&6; } | |
8955 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
8956 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8957 | else |
8958 | ac_check_lib_save_LIBS=$LIBS | |
8959 | LIBS="-lm $LIBS" | |
81ecdfbb | 8960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8961 | /* end confdefs.h. */ |
c906108c | 8962 | |
c906108c | 8963 | |
bec39cab AC |
8964 | int |
8965 | main () | |
8966 | { | |
81ecdfbb | 8967 | return main (); |
bec39cab AC |
8968 | ; |
8969 | return 0; | |
8970 | } | |
8971 | _ACEOF | |
81ecdfbb | 8972 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8973 | ac_cv_lib_m_main=yes |
8974 | else | |
81ecdfbb | 8975 | ac_cv_lib_m_main=no |
bec39cab | 8976 | fi |
81ecdfbb RW |
8977 | rm -f core conftest.err conftest.$ac_objext \ |
8978 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
8979 | LIBS=$ac_check_lib_save_LIBS |
8980 | fi | |
81ecdfbb RW |
8981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
8982 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
8983 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
8984 | cat >>confdefs.h <<_ACEOF |
8985 | #define HAVE_LIBM 1 | |
8986 | _ACEOF | |
8987 | ||
8988 | LIBS="-lm $LIBS" | |
c906108c | 8989 | |
c906108c | 8990 | fi |
bec39cab AC |
8991 | |
8992 | ||
8993 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
8994 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
8995 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
8996 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
8997 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
8998 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 8999 | |
c906108c | 9000 | else |
81ecdfbb RW |
9001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
9002 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
9003 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
9004 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9005 | else |
9006 | ac_check_lib_save_LIBS=$LIBS | |
9007 | LIBS="-lw $LIBS" | |
81ecdfbb | 9008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9009 | /* end confdefs.h. */ |
c906108c | 9010 | |
81ecdfbb RW |
9011 | /* Override any GCC internal prototype to avoid an error. |
9012 | Use char because int might match the return type of a GCC | |
9013 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9014 | #ifdef __cplusplus |
9015 | extern "C" | |
9016 | #endif | |
bec39cab AC |
9017 | char wctype (); |
9018 | int | |
9019 | main () | |
9020 | { | |
81ecdfbb | 9021 | return wctype (); |
bec39cab AC |
9022 | ; |
9023 | return 0; | |
9024 | } | |
9025 | _ACEOF | |
81ecdfbb | 9026 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
9027 | ac_cv_lib_w_wctype=yes |
9028 | else | |
81ecdfbb | 9029 | ac_cv_lib_w_wctype=no |
bec39cab | 9030 | fi |
81ecdfbb RW |
9031 | rm -f core conftest.err conftest.$ac_objext \ |
9032 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
9033 | LIBS=$ac_check_lib_save_LIBS |
9034 | fi | |
81ecdfbb RW |
9035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
9036 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
9037 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
9038 | cat >>confdefs.h <<_ACEOF |
9039 | #define HAVE_LIBW 1 | |
9040 | _ACEOF | |
c906108c | 9041 | |
bec39cab | 9042 | LIBS="-lw $LIBS" |
c906108c | 9043 | |
bec39cab | 9044 | fi |
c906108c | 9045 | |
bec39cab | 9046 | fi |
c906108c | 9047 | |
ddc9cd0f | 9048 | |
bec39cab | 9049 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
9050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
9051 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
9052 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9053 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9054 | else |
9055 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9056 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9057 | /* end confdefs.h. */ |
ddc9cd0f | 9058 | |
81ecdfbb RW |
9059 | /* Override any GCC internal prototype to avoid an error. |
9060 | Use char because int might match the return type of a GCC | |
9061 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9062 | #ifdef __cplusplus |
9063 | extern "C" | |
9064 | #endif | |
bec39cab AC |
9065 | char gethostbyname (); |
9066 | int | |
9067 | main () | |
9068 | { | |
81ecdfbb | 9069 | return gethostbyname (); |
bec39cab AC |
9070 | ; |
9071 | return 0; | |
9072 | } | |
9073 | _ACEOF | |
81ecdfbb RW |
9074 | for ac_lib in '' nsl; do |
9075 | if test -z "$ac_lib"; then | |
9076 | ac_res="none required" | |
9077 | else | |
9078 | ac_res=-l$ac_lib | |
b4e70030 | 9079 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9080 | fi |
9081 | if ac_fn_c_try_link "$LINENO"; then : | |
9082 | ac_cv_search_gethostbyname=$ac_res | |
9083 | fi | |
9084 | rm -f core conftest.err conftest.$ac_objext \ | |
9085 | conftest$ac_exeext | |
9086 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9087 | break | |
9088 | fi | |
9089 | done | |
9090 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 9091 | |
bec39cab | 9092 | else |
81ecdfbb | 9093 | ac_cv_search_gethostbyname=no |
bec39cab | 9094 | fi |
81ecdfbb | 9095 | rm conftest.$ac_ext |
bec39cab AC |
9096 | LIBS=$ac_func_search_save_LIBS |
9097 | fi | |
81ecdfbb RW |
9098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
9099 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
9100 | ac_res=$ac_cv_search_gethostbyname | |
9101 | if test "$ac_res" != no; then : | |
9102 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 9103 | |
bec39cab | 9104 | fi |
96baa820 | 9105 | |
c906108c | 9106 | |
b4e70030 | 9107 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
9108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
9109 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
9110 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9111 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
9112 | else |
9113 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9115 | /* end confdefs.h. */ |
9116 | ||
81ecdfbb RW |
9117 | /* Override any GCC internal prototype to avoid an error. |
9118 | Use char because int might match the return type of a GCC | |
9119 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
9120 | #ifdef __cplusplus |
9121 | extern "C" | |
9122 | #endif | |
b4e70030 JB |
9123 | char socketpair (); |
9124 | int | |
9125 | main () | |
9126 | { | |
81ecdfbb | 9127 | return socketpair (); |
b4e70030 JB |
9128 | ; |
9129 | return 0; | |
9130 | } | |
9131 | _ACEOF | |
81ecdfbb RW |
9132 | for ac_lib in '' socket; do |
9133 | if test -z "$ac_lib"; then | |
9134 | ac_res="none required" | |
9135 | else | |
9136 | ac_res=-l$ac_lib | |
b4e70030 | 9137 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9138 | fi |
9139 | if ac_fn_c_try_link "$LINENO"; then : | |
9140 | ac_cv_search_socketpair=$ac_res | |
9141 | fi | |
9142 | rm -f core conftest.err conftest.$ac_objext \ | |
9143 | conftest$ac_exeext | |
9144 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9145 | break | |
9146 | fi | |
9147 | done | |
9148 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 9149 | |
b4e70030 | 9150 | else |
81ecdfbb | 9151 | ac_cv_search_socketpair=no |
b4e70030 | 9152 | fi |
81ecdfbb | 9153 | rm conftest.$ac_ext |
b4e70030 JB |
9154 | LIBS=$ac_func_search_save_LIBS |
9155 | fi | |
81ecdfbb RW |
9156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
9157 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
9158 | ac_res=$ac_cv_search_socketpair | |
9159 | if test "$ac_res" != no; then : | |
9160 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
9161 | |
9162 | fi | |
9163 | ||
9164 | ||
233a11ab | 9165 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
9166 | |
9167 | # See if the user specified whether he wants zlib support or not. | |
9168 | ||
9169 | # Check whether --with-zlib was given. | |
9170 | if test "${with_zlib+set}" = set; then : | |
9171 | withval=$with_zlib; | |
9172 | else | |
9173 | with_zlib=auto | |
9174 | fi | |
9175 | ||
9176 | ||
9177 | if test "$with_zlib" != "no"; then | |
9178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
9179 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
9180 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9181 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
9182 | else |
9183 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
9185 | /* end confdefs.h. */ |
9186 | ||
81ecdfbb RW |
9187 | /* Override any GCC internal prototype to avoid an error. |
9188 | Use char because int might match the return type of a GCC | |
233a11ab | 9189 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
9190 | #ifdef __cplusplus |
9191 | extern "C" | |
9192 | #endif | |
233a11ab CS |
9193 | char zlibVersion (); |
9194 | int | |
9195 | main () | |
9196 | { | |
81ecdfbb | 9197 | return zlibVersion (); |
233a11ab CS |
9198 | ; |
9199 | return 0; | |
9200 | } | |
9201 | _ACEOF | |
81ecdfbb RW |
9202 | for ac_lib in '' z; do |
9203 | if test -z "$ac_lib"; then | |
9204 | ac_res="none required" | |
233a11ab | 9205 | else |
81ecdfbb RW |
9206 | ac_res=-l$ac_lib |
9207 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 9208 | fi |
81ecdfbb RW |
9209 | if ac_fn_c_try_link "$LINENO"; then : |
9210 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 9211 | fi |
81ecdfbb RW |
9212 | rm -f core conftest.err conftest.$ac_objext \ |
9213 | conftest$ac_exeext | |
9214 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9215 | break | |
233a11ab | 9216 | fi |
81ecdfbb RW |
9217 | done |
9218 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 9219 | |
233a11ab | 9220 | else |
81ecdfbb | 9221 | ac_cv_search_zlibVersion=no |
233a11ab | 9222 | fi |
81ecdfbb RW |
9223 | rm conftest.$ac_ext |
9224 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 9225 | fi |
81ecdfbb RW |
9226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
9227 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
9228 | ac_res=$ac_cv_search_zlibVersion | |
9229 | if test "$ac_res" != no; then : | |
9230 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9231 | for ac_header in zlib.h | |
9232 | do : | |
9233 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
9234 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 9235 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9236 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
9237 | _ACEOF |
9238 | ||
9239 | fi | |
9240 | ||
9241 | done | |
9242 | ||
9243 | fi | |
9244 | ||
b040ad30 JB |
9245 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
9246 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
9247 | fi | |
9248 | fi | |
9249 | ||
233a11ab | 9250 | |
77f120bf | 9251 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
9252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
9253 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
9254 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9255 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9256 | else |
9257 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9259 | /* end confdefs.h. */ |
c906108c | 9260 | |
81ecdfbb RW |
9261 | /* Override any GCC internal prototype to avoid an error. |
9262 | Use char because int might match the return type of a GCC | |
9263 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9264 | #ifdef __cplusplus |
9265 | extern "C" | |
9266 | #endif | |
77f120bf | 9267 | char dlgetmodinfo (); |
bec39cab AC |
9268 | int |
9269 | main () | |
9270 | { | |
81ecdfbb | 9271 | return dlgetmodinfo (); |
bec39cab AC |
9272 | ; |
9273 | return 0; | |
9274 | } | |
9275 | _ACEOF | |
81ecdfbb RW |
9276 | for ac_lib in '' dl xpdl; do |
9277 | if test -z "$ac_lib"; then | |
9278 | ac_res="none required" | |
9279 | else | |
9280 | ac_res=-l$ac_lib | |
b4e70030 | 9281 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9282 | fi |
9283 | if ac_fn_c_try_link "$LINENO"; then : | |
9284 | ac_cv_search_dlgetmodinfo=$ac_res | |
9285 | fi | |
9286 | rm -f core conftest.err conftest.$ac_objext \ | |
9287 | conftest$ac_exeext | |
9288 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9289 | break | |
9290 | fi | |
9291 | done | |
9292 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 9293 | |
4e8d927d | 9294 | else |
81ecdfbb | 9295 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 9296 | fi |
81ecdfbb | 9297 | rm conftest.$ac_ext |
bec39cab AC |
9298 | LIBS=$ac_func_search_save_LIBS |
9299 | fi | |
81ecdfbb RW |
9300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
9301 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
9302 | ac_res=$ac_cv_search_dlgetmodinfo | |
9303 | if test "$ac_res" != no; then : | |
9304 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 9305 | |
8bb2c122 | 9306 | fi |
8bb2c122 | 9307 | |
8bb2c122 | 9308 | |
77f120bf | 9309 | |
77f120bf | 9310 | |
6c7a06a3 | 9311 | |
81ecdfbb RW |
9312 | # Check whether --with-libiconv-prefix was given. |
9313 | if test "${with_libiconv_prefix+set}" = set; then : | |
9314 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 9315 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
9316 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
9317 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
9318 | done |
9319 | ||
81ecdfbb RW |
9320 | fi |
9321 | ||
6c7a06a3 | 9322 | |
f18c4681 | 9323 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
9324 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
9325 | ||
81ecdfbb RW |
9326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
9327 | $as_echo_n "checking for iconv... " >&6; } | |
9328 | if test "${am_cv_func_iconv+set}" = set; then : | |
9329 | $as_echo_n "(cached) " >&6 | |
d542061a | 9330 | else |
6c7a06a3 TT |
9331 | |
9332 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
9333 | am_cv_lib_iconv=no | |
9334 | am_cv_use_build_libiconv=no | |
f0f20949 | 9335 | am_cv_build_libiconv_path= |
4edb1e84 JB |
9336 | |
9337 | # If libiconv is part of the build tree, then try using it over | |
9338 | # any system iconv. | |
9339 | if test -d ../libiconv; then | |
f18c4681 JB |
9340 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
9341 | am_save_LIBS="$LIBS" | |
9342 | am_save_CPPFLAGS="$CPPFLAGS" | |
9343 | LIBS="$LIBS $lib_dir/libiconv.a" | |
9344 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
9345 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 9346 | /* end confdefs.h. */ |
6c7a06a3 TT |
9347 | #include <stdlib.h> |
9348 | #include <iconv.h> | |
d542061a UW |
9349 | int |
9350 | main () | |
9351 | { | |
6c7a06a3 | 9352 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
9353 | iconv(cd,NULL,NULL,NULL,NULL); |
9354 | iconv_close(cd); | |
d542061a UW |
9355 | ; |
9356 | return 0; | |
9357 | } | |
9358 | _ACEOF | |
81ecdfbb | 9359 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9360 | am_cv_use_build_libiconv=yes |
f0f20949 | 9361 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
9362 | am_cv_lib_iconv=yes |
9363 | am_cv_func_iconv=yes | |
d542061a | 9364 | fi |
81ecdfbb RW |
9365 | rm -f core conftest.err conftest.$ac_objext \ |
9366 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
9367 | LIBS="$am_save_LIBS" |
9368 | CPPFLAGS="$am_save_CPPFLAGS" | |
9369 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
9370 | break |
9371 | fi | |
9372 | done | |
4edb1e84 | 9373 | fi |
94ae1714 | 9374 | |
4edb1e84 | 9375 | # Next, try to find iconv in libc. |
6c7a06a3 | 9376 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 9377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 9378 | /* end confdefs.h. */ |
6c7a06a3 TT |
9379 | #include <stdlib.h> |
9380 | #include <iconv.h> | |
d542061a UW |
9381 | int |
9382 | main () | |
9383 | { | |
6c7a06a3 TT |
9384 | iconv_t cd = iconv_open("",""); |
9385 | iconv(cd,NULL,NULL,NULL,NULL); | |
9386 | iconv_close(cd); | |
d542061a UW |
9387 | ; |
9388 | return 0; | |
9389 | } | |
9390 | _ACEOF | |
81ecdfbb | 9391 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9392 | am_cv_func_iconv=yes |
d542061a | 9393 | fi |
81ecdfbb RW |
9394 | rm -f core conftest.err conftest.$ac_objext \ |
9395 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 9396 | fi |
94ae1714 | 9397 | |
4edb1e84 JB |
9398 | # If iconv was not in libc, try -liconv. In this case, arrange to |
9399 | # look in the libiconv prefix, if it was specified by the user. | |
9400 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 9401 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
9402 | am_save_LIBS="$LIBS" |
9403 | if test -n "$LIBICONV_INCLUDE"; then | |
9404 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9405 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
9406 | fi | |
9407 | LIBS="$LIBS -liconv" | |
81ecdfbb | 9408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9409 | /* end confdefs.h. */ |
6c7a06a3 TT |
9410 | #include <stdlib.h> |
9411 | #include <iconv.h> | |
bec39cab AC |
9412 | int |
9413 | main () | |
9414 | { | |
6c7a06a3 TT |
9415 | iconv_t cd = iconv_open("",""); |
9416 | iconv(cd,NULL,NULL,NULL,NULL); | |
9417 | iconv_close(cd); | |
bec39cab AC |
9418 | ; |
9419 | return 0; | |
9420 | } | |
9421 | _ACEOF | |
81ecdfbb | 9422 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9423 | am_cv_lib_iconv=yes |
6c7a06a3 | 9424 | am_cv_func_iconv=yes |
627af7ea | 9425 | fi |
81ecdfbb RW |
9426 | rm -f core conftest.err conftest.$ac_objext \ |
9427 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 9428 | LIBS="$am_save_LIBS" |
fc3b640d | 9429 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
9430 | fi |
9431 | ||
9432 | fi | |
81ecdfbb RW |
9433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
9434 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
9435 | |
9436 | # Set the various flags based on the cache variables. We can't rely | |
9437 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
9438 | LIBICONV= |
9439 | if test "$am_cv_lib_iconv" = yes; then | |
9440 | LIBICONV="-liconv" | |
94ae1714 TT |
9441 | else |
9442 | LIBICONV_LIBDIR= | |
9443 | LIBICONV_INCLUDE= | |
fc3b640d TT |
9444 | fi |
9445 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 9446 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 9447 | LIBICONV_LIBDIR="" |
fc3b640d TT |
9448 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
9449 | fi | |
9450 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9451 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 9452 | |
6c7a06a3 TT |
9453 | if test "$am_cv_func_iconv" = yes; then |
9454 | ||
81ecdfbb | 9455 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 9456 | |
81ecdfbb RW |
9457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
9458 | $as_echo_n "checking for iconv declaration... " >&6; } | |
9459 | if test "${am_cv_proto_iconv+set}" = set; then : | |
9460 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9461 | else |
9462 | ||
81ecdfbb | 9463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9464 | /* end confdefs.h. */ |
9465 | ||
6c7a06a3 TT |
9466 | #include <stdlib.h> |
9467 | #include <iconv.h> | |
9468 | extern | |
b4e70030 | 9469 | #ifdef __cplusplus |
6c7a06a3 | 9470 | "C" |
b4e70030 | 9471 | #endif |
6c7a06a3 TT |
9472 | #if defined(__STDC__) || defined(__cplusplus) |
9473 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
9474 | #else | |
9475 | size_t iconv(); | |
9476 | #endif | |
9477 | ||
b4e70030 JB |
9478 | int |
9479 | main () | |
9480 | { | |
6c7a06a3 | 9481 | |
b4e70030 JB |
9482 | ; |
9483 | return 0; | |
9484 | } | |
9485 | _ACEOF | |
81ecdfbb | 9486 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 9487 | am_cv_proto_iconv_arg1="" |
4e8d927d | 9488 | else |
81ecdfbb | 9489 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 9490 | fi |
81ecdfbb | 9491 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
9492 | 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);" |
9493 | fi | |
9494 | ||
9495 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 9496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 9497 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
9498 | $as_echo "${ac_t:- |
9499 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
9500 | |
9501 | cat >>confdefs.h <<_ACEOF | |
9502 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
9503 | _ACEOF | |
9504 | ||
9505 | fi | |
6c7a06a3 TT |
9506 | |
9507 | ||
9508 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. | |
9509 | # There is a very specific comment in /usr/include/curses.h explaining that | |
9510 | # termcap routines built into libcurses must not be used. | |
9511 | # | |
9512 | # The symptoms we observed so far is GDB unexpectedly changing | |
9513 | # the terminal settings when tgetent is called - this is particularly | |
9514 | # visible as the output is missing carriage returns, and so rapidly | |
9515 | # becomes very hard to read. | |
9516 | # | |
9517 | # The readline configure script has already decided that libtermcap | |
9518 | # was enough for its purposes, and so decided to build readline using | |
9519 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
9520 | # TUI enabled results in both libraries to be used at the same time, | |
9521 | # which is not allowed. This basically means that GDB with TUI is | |
9522 | # broken on alpha-osf. | |
9523 | ||
9524 | case $host_os in | |
6bcc772d RO |
9525 | osf* ) |
9526 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9527 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 9528 | fi |
6bcc772d | 9529 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
9530 | enable_tui=no |
9531 | fi | |
9532 | ;; | |
9533 | esac | |
9534 | ||
cb01cfba | 9535 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9536 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9537 | prefer_curses=yes |
9538 | fi | |
9539 | ||
9540 | curses_found=no | |
9541 | if test x"$prefer_curses" = xyes; then | |
9542 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9543 | # curses library because the latter might not provide all the | |
9544 | # functionality we need. However, this leads to problems on systems | |
9545 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9546 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9547 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9548 | # a situation. | |
81ecdfbb RW |
9549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9550 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
9551 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9552 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9553 | else |
9554 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9555 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9556 | /* end confdefs.h. */ |
9557 | ||
81ecdfbb RW |
9558 | /* Override any GCC internal prototype to avoid an error. |
9559 | Use char because int might match the return type of a GCC | |
9560 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9561 | #ifdef __cplusplus |
9562 | extern "C" | |
9563 | #endif | |
6c7a06a3 TT |
9564 | char waddstr (); |
9565 | int | |
9566 | main () | |
9567 | { | |
81ecdfbb | 9568 | return waddstr (); |
6c7a06a3 TT |
9569 | ; |
9570 | return 0; | |
9571 | } | |
9572 | _ACEOF | |
81ecdfbb RW |
9573 | for ac_lib in '' ncurses cursesX curses; do |
9574 | if test -z "$ac_lib"; then | |
9575 | ac_res="none required" | |
9576 | else | |
9577 | ac_res=-l$ac_lib | |
9578 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9579 | fi | |
9580 | if ac_fn_c_try_link "$LINENO"; then : | |
9581 | ac_cv_search_waddstr=$ac_res | |
9582 | fi | |
9583 | rm -f core conftest.err conftest.$ac_objext \ | |
9584 | conftest$ac_exeext | |
9585 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9586 | break | |
9587 | fi | |
9588 | done | |
9589 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9590 | ||
6c7a06a3 | 9591 | else |
81ecdfbb RW |
9592 | ac_cv_search_waddstr=no |
9593 | fi | |
9594 | rm conftest.$ac_ext | |
9595 | LIBS=$ac_func_search_save_LIBS | |
9596 | fi | |
9597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9598 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9599 | ac_res=$ac_cv_search_waddstr | |
9600 | if test "$ac_res" != no; then : | |
9601 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9602 | |
9603 | fi | |
9604 | ||
9605 | ||
cb01cfba JB |
9606 | if test "$ac_cv_search_waddstr" != no; then |
9607 | curses_found=yes | |
9608 | fi | |
9609 | fi | |
9610 | ||
9611 | # Check whether we should enable the TUI, but only do so if we really | |
9612 | # can. | |
9613 | if test x"$enable_tui" != xno; then | |
9614 | if test -d $srcdir/tui; then | |
9615 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
9616 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9617 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9618 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9619 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
9620 | CONFIG_ALL="${CONFIG_ALL} all-tui" | |
9621 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
9622 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
9623 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
9624 | else | |
9625 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9626 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9627 | else |
81ecdfbb RW |
9628 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9629 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9630 | fi |
9631 | fi | |
9632 | fi | |
9633 | fi | |
9634 | ||
9635 | # Since GDB uses Readline, we need termcap functionality. In many | |
9636 | # cases this will be provided by the curses library, but some systems | |
9637 | # have a seperate termcap library, or no curses library at all. | |
9638 | ||
9639 | case $host_os in | |
9640 | cygwin*) | |
9641 | if test -d $srcdir/libtermcap; then | |
9642 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
9643 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9644 | fi ;; | |
9645 | go32* | *djgpp*) | |
9646 | ac_cv_search_tgetent="none required" | |
9647 | ;; | |
9648 | *mingw32*) | |
9649 | ac_cv_search_tgetent="none required" | |
9650 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
9651 | ;; | |
9652 | esac | |
9653 | ||
9654 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9656 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
9657 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9658 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9659 | else |
9660 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9662 | /* end confdefs.h. */ |
9663 | ||
81ecdfbb RW |
9664 | /* Override any GCC internal prototype to avoid an error. |
9665 | Use char because int might match the return type of a GCC | |
9666 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9667 | #ifdef __cplusplus |
9668 | extern "C" | |
9669 | #endif | |
6c7a06a3 TT |
9670 | char tgetent (); |
9671 | int | |
9672 | main () | |
9673 | { | |
81ecdfbb | 9674 | return tgetent (); |
6c7a06a3 TT |
9675 | ; |
9676 | return 0; | |
9677 | } | |
9678 | _ACEOF | |
81ecdfbb RW |
9679 | for ac_lib in '' termcap tinfo curses ncurses; do |
9680 | if test -z "$ac_lib"; then | |
9681 | ac_res="none required" | |
9682 | else | |
9683 | ac_res=-l$ac_lib | |
6c7a06a3 | 9684 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9685 | fi |
9686 | if ac_fn_c_try_link "$LINENO"; then : | |
9687 | ac_cv_search_tgetent=$ac_res | |
9688 | fi | |
9689 | rm -f core conftest.err conftest.$ac_objext \ | |
9690 | conftest$ac_exeext | |
9691 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9692 | break | |
9693 | fi | |
9694 | done | |
9695 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 9696 | |
6c7a06a3 | 9697 | else |
81ecdfbb | 9698 | ac_cv_search_tgetent=no |
6c7a06a3 | 9699 | fi |
81ecdfbb | 9700 | rm conftest.$ac_ext |
6c7a06a3 TT |
9701 | LIBS=$ac_func_search_save_LIBS |
9702 | fi | |
81ecdfbb RW |
9703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9704 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9705 | ac_res=$ac_cv_search_tgetent | |
9706 | if test "$ac_res" != no; then : | |
9707 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9708 | |
06825bd1 MK |
9709 | fi |
9710 | ||
06825bd1 | 9711 | |
bec39cab | 9712 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 9713 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
9714 | fi |
9715 | ||
3841debe | 9716 | |
81ecdfbb RW |
9717 | # Check whether --with-system-readline was given. |
9718 | if test "${with_system_readline+set}" = set; then : | |
9719 | withval=$with_system_readline; | |
9720 | fi | |
6a30b0a5 | 9721 | |
6a30b0a5 AS |
9722 | |
9723 | if test "$with_system_readline" = yes; then | |
9724 | READLINE=-lreadline | |
9725 | READLINE_DEPS= | |
9726 | READLINE_CFLAGS= | |
a71e0887 JK |
9727 | |
9728 | # readline-6.0 started to use the name `_rl_echoing_p'. | |
9729 | # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. | |
9730 | ||
9731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5 | |
9732 | $as_echo_n "checking for readline_echoing_p... " >&6; } | |
9733 | save_LIBS=$LIBS | |
9734 | LIBS="$LIBS $READLINE" | |
9735 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9736 | /* end confdefs.h. */ | |
9737 | ||
9738 | int | |
9739 | main () | |
9740 | { | |
9741 | extern int readline_echoing_p; | |
9742 | return readline_echoing_p; | |
9743 | ; | |
9744 | return 0; | |
9745 | } | |
9746 | _ACEOF | |
9747 | if ac_fn_c_try_link "$LINENO"; then : | |
9748 | READLINE_ECHOING_P=yes | |
9749 | else | |
9750 | READLINE_ECHOING_P=no | |
9751 | ||
9752 | $as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h | |
9753 | ||
9754 | fi | |
9755 | rm -f core conftest.err conftest.$ac_objext \ | |
9756 | conftest$ac_exeext conftest.$ac_ext | |
9757 | LIBS="$save_LIBS" | |
9758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5 | |
9759 | $as_echo "$READLINE_ECHOING_P" >&6; } | |
6a30b0a5 AS |
9760 | else |
9761 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9762 | READLINE_DEPS='$(READLINE)' | |
9763 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
9764 | fi | |
9765 | ||
9766 | ||
9767 | ||
9768 | ||
9769 | ||
81ecdfbb RW |
9770 | # Check whether --with-expat was given. |
9771 | if test "${with_expat+set}" = set; then : | |
9772 | withval=$with_expat; | |
5c39566f DJ |
9773 | else |
9774 | with_expat=auto | |
81ecdfbb RW |
9775 | fi |
9776 | ||
9777 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9778 | $as_echo_n "checking whether to use expat... " >&6; } | |
9779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9780 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9781 | |
9782 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9783 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9784 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9785 | HAVE_LIBEXPAT=no |
9786 | else | |
9787 | ||
3841debe DJ |
9788 | if test "X$prefix" = "XNONE"; then |
9789 | acl_final_prefix="$ac_default_prefix" | |
9790 | else | |
9791 | acl_final_prefix="$prefix" | |
9792 | fi | |
9793 | if test "X$exec_prefix" = "XNONE"; then | |
9794 | acl_final_exec_prefix='${prefix}' | |
9795 | else | |
9796 | acl_final_exec_prefix="$exec_prefix" | |
9797 | fi | |
9798 | acl_save_prefix="$prefix" | |
9799 | prefix="$acl_final_prefix" | |
9800 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
9801 | prefix="$acl_save_prefix" | |
9802 | ||
9803 | ||
81ecdfbb RW |
9804 | # Check whether --with-gnu-ld was given. |
9805 | if test "${with_gnu_ld+set}" = set; then : | |
9806 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
9807 | else |
9808 | with_gnu_ld=no | |
81ecdfbb RW |
9809 | fi |
9810 | ||
3841debe DJ |
9811 | # Prepare PATH_SEPARATOR. |
9812 | # The user is always right. | |
9813 | if test "${PATH_SEPARATOR+set}" != set; then | |
9814 | echo "#! /bin/sh" >conf$$.sh | |
9815 | echo "exit 0" >>conf$$.sh | |
9816 | chmod +x conf$$.sh | |
9817 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
9818 | PATH_SEPARATOR=';' | |
9819 | else | |
9820 | PATH_SEPARATOR=: | |
9821 | fi | |
9822 | rm -f conf$$.sh | |
9823 | fi | |
9824 | ac_prog=ld | |
9825 | if test "$GCC" = yes; then | |
9826 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
9827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
9828 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
9829 | case $host in |
9830 | *-*-mingw*) | |
9831 | # gcc leaves a trailing carriage return which upsets mingw | |
9832 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
9833 | *) | |
9834 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
9835 | esac | |
9836 | case $ac_prog in | |
9837 | # Accept absolute paths. | |
9838 | [\\/]* | [A-Za-z]:[\\/]*) | |
9839 | re_direlt='/[^/][^/]*/\.\./' | |
9840 | # Canonicalize the path of ld | |
9841 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
9842 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
9843 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
9844 | done | |
9845 | test -z "$LD" && LD="$ac_prog" | |
9846 | ;; | |
9847 | "") | |
9848 | # If it fails, then pretend we aren't using GCC. | |
9849 | ac_prog=ld | |
9850 | ;; | |
9851 | *) | |
9852 | # If it is relative, then search for the first ld in PATH. | |
9853 | with_gnu_ld=unknown | |
9854 | ;; | |
9855 | esac | |
9856 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
9857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
9858 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 9859 | else |
81ecdfbb RW |
9860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
9861 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 9862 | fi |
81ecdfbb RW |
9863 | if test "${acl_cv_path_LD+set}" = set; then : |
9864 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9865 | else |
9866 | if test -z "$LD"; then | |
9867 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
9868 | for ac_dir in $PATH; do | |
9869 | test -z "$ac_dir" && ac_dir=. | |
9870 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
9871 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
9872 | # Check to see if the program is GNU ld. I'd rather use --version, | |
9873 | # but apparently some GNU ld's only accept -v. | |
9874 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
9875 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
9876 | test "$with_gnu_ld" != no && break | |
9877 | else | |
9878 | test "$with_gnu_ld" != yes && break | |
9879 | fi | |
9880 | fi | |
9881 | done | |
9882 | IFS="$ac_save_ifs" | |
9883 | else | |
9884 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
9885 | fi | |
9886 | fi | |
9887 | ||
9888 | LD="$acl_cv_path_LD" | |
9889 | if test -n "$LD"; then | |
81ecdfbb RW |
9890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
9891 | $as_echo "$LD" >&6; } | |
3841debe | 9892 | else |
81ecdfbb RW |
9893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9894 | $as_echo "no" >&6; } | |
3841debe | 9895 | fi |
81ecdfbb RW |
9896 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
9897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
9898 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
9899 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
9900 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9901 | else |
9902 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
9903 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
9904 | acl_cv_prog_gnu_ld=yes | |
9905 | else | |
9906 | acl_cv_prog_gnu_ld=no | |
9907 | fi | |
9908 | fi | |
81ecdfbb RW |
9909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
9910 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
9911 | with_gnu_ld=$acl_cv_prog_gnu_ld |
9912 | ||
9913 | ||
9914 | ||
81ecdfbb RW |
9915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
9916 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
9917 | if test "${acl_cv_rpath+set}" = set; then : | |
9918 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9919 | else |
9920 | ||
9921 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
9922 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
9923 | . ./conftest.sh | |
9924 | rm -f ./conftest.sh | |
9925 | acl_cv_rpath=done | |
9926 | ||
9927 | fi | |
81ecdfbb RW |
9928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
9929 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
9930 | wl="$acl_cv_wl" |
9931 | libext="$acl_cv_libext" | |
9932 | shlibext="$acl_cv_shlibext" | |
9933 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
9934 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
9935 | hardcode_direct="$acl_cv_hardcode_direct" | |
9936 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
9937 | # Check whether --enable-rpath was given. |
9938 | if test "${enable_rpath+set}" = set; then : | |
9939 | enableval=$enable_rpath; : | |
3841debe DJ |
9940 | else |
9941 | enable_rpath=yes | |
81ecdfbb RW |
9942 | fi |
9943 | ||
3841debe DJ |
9944 | |
9945 | ||
9946 | ||
9947 | ||
9948 | ||
9949 | ||
9950 | ||
9951 | ||
9952 | ||
9953 | use_additional=yes | |
9954 | ||
9955 | acl_save_prefix="$prefix" | |
9956 | prefix="$acl_final_prefix" | |
9957 | acl_save_exec_prefix="$exec_prefix" | |
9958 | exec_prefix="$acl_final_exec_prefix" | |
9959 | ||
9960 | eval additional_includedir=\"$includedir\" | |
9961 | eval additional_libdir=\"$libdir\" | |
9962 | ||
9963 | exec_prefix="$acl_save_exec_prefix" | |
9964 | prefix="$acl_save_prefix" | |
9965 | ||
9966 | ||
81ecdfbb RW |
9967 | # Check whether --with-libexpat-prefix was given. |
9968 | if test "${with_libexpat_prefix+set}" = set; then : | |
9969 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9970 | if test "X$withval" = "Xno"; then |
9971 | use_additional=no | |
9972 | else | |
9973 | if test "X$withval" = "X"; then | |
9974 | ||
9975 | acl_save_prefix="$prefix" | |
9976 | prefix="$acl_final_prefix" | |
9977 | acl_save_exec_prefix="$exec_prefix" | |
9978 | exec_prefix="$acl_final_exec_prefix" | |
9979 | ||
9980 | eval additional_includedir=\"$includedir\" | |
9981 | eval additional_libdir=\"$libdir\" | |
9982 | ||
9983 | exec_prefix="$acl_save_exec_prefix" | |
9984 | prefix="$acl_save_prefix" | |
9985 | ||
9986 | else | |
9987 | additional_includedir="$withval/include" | |
9988 | additional_libdir="$withval/lib" | |
9989 | fi | |
9990 | fi | |
9991 | ||
81ecdfbb RW |
9992 | fi |
9993 | ||
3841debe DJ |
9994 | LIBEXPAT= |
9995 | LTLIBEXPAT= | |
9996 | INCEXPAT= | |
9997 | rpathdirs= | |
9998 | ltrpathdirs= | |
9999 | names_already_handled= | |
10000 | names_next_round='expat ' | |
10001 | while test -n "$names_next_round"; do | |
10002 | names_this_round="$names_next_round" | |
10003 | names_next_round= | |
10004 | for name in $names_this_round; do | |
10005 | already_handled= | |
10006 | for n in $names_already_handled; do | |
10007 | if test "$n" = "$name"; then | |
10008 | already_handled=yes | |
10009 | break | |
10010 | fi | |
10011 | done | |
10012 | if test -z "$already_handled"; then | |
10013 | names_already_handled="$names_already_handled $name" | |
10014 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10015 | eval value=\"\$HAVE_LIB$uppername\" | |
10016 | if test -n "$value"; then | |
10017 | if test "$value" = yes; then | |
10018 | eval value=\"\$LIB$uppername\" | |
10019 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
10020 | eval value=\"\$LTLIB$uppername\" | |
10021 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
10022 | else | |
10023 | : | |
10024 | fi | |
10025 | else | |
10026 | found_dir= | |
10027 | found_la= | |
10028 | found_so= | |
10029 | found_a= | |
10030 | if test $use_additional = yes; then | |
10031 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10032 | found_dir="$additional_libdir" | |
10033 | found_so="$additional_libdir/lib$name.$shlibext" | |
10034 | if test -f "$additional_libdir/lib$name.la"; then | |
10035 | found_la="$additional_libdir/lib$name.la" | |
10036 | fi | |
10037 | else | |
10038 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10039 | found_dir="$additional_libdir" | |
10040 | found_a="$additional_libdir/lib$name.$libext" | |
10041 | if test -f "$additional_libdir/lib$name.la"; then | |
10042 | found_la="$additional_libdir/lib$name.la" | |
10043 | fi | |
10044 | fi | |
10045 | fi | |
10046 | fi | |
10047 | if test "X$found_dir" = "X"; then | |
10048 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10049 | ||
10050 | acl_save_prefix="$prefix" | |
10051 | prefix="$acl_final_prefix" | |
10052 | acl_save_exec_prefix="$exec_prefix" | |
10053 | exec_prefix="$acl_final_exec_prefix" | |
10054 | eval x=\"$x\" | |
10055 | exec_prefix="$acl_save_exec_prefix" | |
10056 | prefix="$acl_save_prefix" | |
10057 | ||
10058 | case "$x" in | |
10059 | -L*) | |
10060 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10061 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10062 | found_dir="$dir" | |
10063 | found_so="$dir/lib$name.$shlibext" | |
10064 | if test -f "$dir/lib$name.la"; then | |
10065 | found_la="$dir/lib$name.la" | |
10066 | fi | |
10067 | else | |
10068 | if test -f "$dir/lib$name.$libext"; then | |
10069 | found_dir="$dir" | |
10070 | found_a="$dir/lib$name.$libext" | |
10071 | if test -f "$dir/lib$name.la"; then | |
10072 | found_la="$dir/lib$name.la" | |
10073 | fi | |
10074 | fi | |
10075 | fi | |
10076 | ;; | |
10077 | esac | |
10078 | if test "X$found_dir" != "X"; then | |
10079 | break | |
10080 | fi | |
10081 | done | |
10082 | fi | |
10083 | if test "X$found_dir" != "X"; then | |
10084 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
10085 | if test "X$found_so" != "X"; then | |
10086 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10087 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10088 | else | |
10089 | haveit= | |
10090 | for x in $ltrpathdirs; do | |
10091 | if test "X$x" = "X$found_dir"; then | |
10092 | haveit=yes | |
10093 | break | |
10094 | fi | |
10095 | done | |
10096 | if test -z "$haveit"; then | |
10097 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10098 | fi | |
10099 | if test "$hardcode_direct" = yes; then | |
10100 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10101 | else | |
10102 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10103 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10104 | haveit= | |
10105 | for x in $rpathdirs; do | |
10106 | if test "X$x" = "X$found_dir"; then | |
10107 | haveit=yes | |
10108 | break | |
10109 | fi | |
10110 | done | |
10111 | if test -z "$haveit"; then | |
10112 | rpathdirs="$rpathdirs $found_dir" | |
10113 | fi | |
10114 | else | |
10115 | haveit= | |
10116 | for x in $LDFLAGS $LIBEXPAT; do | |
10117 | ||
10118 | acl_save_prefix="$prefix" | |
10119 | prefix="$acl_final_prefix" | |
10120 | acl_save_exec_prefix="$exec_prefix" | |
10121 | exec_prefix="$acl_final_exec_prefix" | |
10122 | eval x=\"$x\" | |
10123 | exec_prefix="$acl_save_exec_prefix" | |
10124 | prefix="$acl_save_prefix" | |
10125 | ||
10126 | if test "X$x" = "X-L$found_dir"; then | |
10127 | haveit=yes | |
10128 | break | |
10129 | fi | |
10130 | done | |
10131 | if test -z "$haveit"; then | |
10132 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
10133 | fi | |
10134 | if test "$hardcode_minus_L" != no; then | |
10135 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10136 | else | |
10137 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10138 | fi | |
10139 | fi | |
10140 | fi | |
10141 | fi | |
10142 | else | |
10143 | if test "X$found_a" != "X"; then | |
10144 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
10145 | else | |
10146 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
10147 | fi | |
10148 | fi | |
10149 | additional_includedir= | |
10150 | case "$found_dir" in | |
10151 | */lib | */lib/) | |
10152 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10153 | additional_includedir="$basedir/include" | |
10154 | ;; | |
10155 | esac | |
10156 | if test "X$additional_includedir" != "X"; then | |
10157 | if test "X$additional_includedir" != "X/usr/include"; then | |
10158 | haveit= | |
10159 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10160 | if test -n "$GCC"; then | |
10161 | case $host_os in | |
10162 | linux*) haveit=yes;; | |
10163 | esac | |
10164 | fi | |
10165 | fi | |
10166 | if test -z "$haveit"; then | |
10167 | for x in $CPPFLAGS $INCEXPAT; do | |
10168 | ||
10169 | acl_save_prefix="$prefix" | |
10170 | prefix="$acl_final_prefix" | |
10171 | acl_save_exec_prefix="$exec_prefix" | |
10172 | exec_prefix="$acl_final_exec_prefix" | |
10173 | eval x=\"$x\" | |
10174 | exec_prefix="$acl_save_exec_prefix" | |
10175 | prefix="$acl_save_prefix" | |
10176 | ||
10177 | if test "X$x" = "X-I$additional_includedir"; then | |
10178 | haveit=yes | |
10179 | break | |
10180 | fi | |
10181 | done | |
10182 | if test -z "$haveit"; then | |
10183 | if test -d "$additional_includedir"; then | |
10184 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
10185 | fi | |
10186 | fi | |
10187 | fi | |
10188 | fi | |
10189 | fi | |
10190 | if test -n "$found_la"; then | |
10191 | save_libdir="$libdir" | |
10192 | case "$found_la" in | |
10193 | */* | *\\*) . "$found_la" ;; | |
10194 | *) . "./$found_la" ;; | |
10195 | esac | |
10196 | libdir="$save_libdir" | |
10197 | for dep in $dependency_libs; do | |
10198 | case "$dep" in | |
10199 | -L*) | |
10200 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10201 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10202 | haveit= | |
10203 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10204 | if test -n "$GCC"; then | |
10205 | case $host_os in | |
10206 | linux*) haveit=yes;; | |
10207 | esac | |
10208 | fi | |
10209 | fi | |
10210 | if test -z "$haveit"; then | |
10211 | haveit= | |
10212 | for x in $LDFLAGS $LIBEXPAT; do | |
10213 | ||
10214 | acl_save_prefix="$prefix" | |
10215 | prefix="$acl_final_prefix" | |
10216 | acl_save_exec_prefix="$exec_prefix" | |
10217 | exec_prefix="$acl_final_exec_prefix" | |
10218 | eval x=\"$x\" | |
10219 | exec_prefix="$acl_save_exec_prefix" | |
10220 | prefix="$acl_save_prefix" | |
10221 | ||
10222 | if test "X$x" = "X-L$additional_libdir"; then | |
10223 | haveit=yes | |
10224 | break | |
10225 | fi | |
10226 | done | |
10227 | if test -z "$haveit"; then | |
10228 | if test -d "$additional_libdir"; then | |
10229 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
10230 | fi | |
10231 | fi | |
10232 | haveit= | |
10233 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10234 | ||
10235 | acl_save_prefix="$prefix" | |
10236 | prefix="$acl_final_prefix" | |
10237 | acl_save_exec_prefix="$exec_prefix" | |
10238 | exec_prefix="$acl_final_exec_prefix" | |
10239 | eval x=\"$x\" | |
10240 | exec_prefix="$acl_save_exec_prefix" | |
10241 | prefix="$acl_save_prefix" | |
10242 | ||
10243 | if test "X$x" = "X-L$additional_libdir"; then | |
10244 | haveit=yes | |
10245 | break | |
10246 | fi | |
10247 | done | |
10248 | if test -z "$haveit"; then | |
10249 | if test -d "$additional_libdir"; then | |
10250 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
10251 | fi | |
10252 | fi | |
10253 | fi | |
10254 | fi | |
10255 | ;; | |
10256 | -R*) | |
10257 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10258 | if test "$enable_rpath" != no; then | |
10259 | haveit= | |
10260 | for x in $rpathdirs; do | |
10261 | if test "X$x" = "X$dir"; then | |
10262 | haveit=yes | |
10263 | break | |
10264 | fi | |
10265 | done | |
10266 | if test -z "$haveit"; then | |
10267 | rpathdirs="$rpathdirs $dir" | |
10268 | fi | |
10269 | haveit= | |
10270 | for x in $ltrpathdirs; do | |
10271 | if test "X$x" = "X$dir"; then | |
10272 | haveit=yes | |
10273 | break | |
10274 | fi | |
10275 | done | |
10276 | if test -z "$haveit"; then | |
10277 | ltrpathdirs="$ltrpathdirs $dir" | |
10278 | fi | |
10279 | fi | |
10280 | ;; | |
10281 | -l*) | |
10282 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10283 | ;; | |
10284 | *.la) | |
10285 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10286 | ;; | |
10287 | *) | |
10288 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
10289 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
10290 | ;; | |
81ecdfbb RW |
10291 | esac |
10292 | done | |
10293 | fi | |
10294 | else | |
10295 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10296 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
10297 | fi | |
10298 | fi | |
10299 | fi | |
10300 | done | |
10301 | done | |
10302 | if test "X$rpathdirs" != "X"; then | |
10303 | if test -n "$hardcode_libdir_separator"; then | |
10304 | alldirs= | |
10305 | for found_dir in $rpathdirs; do | |
10306 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10307 | done | |
10308 | acl_save_libdir="$libdir" | |
10309 | libdir="$alldirs" | |
10310 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10311 | libdir="$acl_save_libdir" | |
10312 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10313 | else | |
10314 | for found_dir in $rpathdirs; do | |
10315 | acl_save_libdir="$libdir" | |
10316 | libdir="$found_dir" | |
10317 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10318 | libdir="$acl_save_libdir" | |
10319 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10320 | done | |
10321 | fi | |
10322 | fi | |
10323 | if test "X$ltrpathdirs" != "X"; then | |
10324 | for found_dir in $ltrpathdirs; do | |
10325 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
10326 | done | |
10327 | fi | |
a9322a30 TT |
10328 | |
10329 | ||
81ecdfbb | 10330 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 10331 | |
81ecdfbb RW |
10332 | for element in $INCEXPAT; do |
10333 | haveit= | |
10334 | for x in $CPPFLAGS; do | |
a9322a30 | 10335 | |
81ecdfbb RW |
10336 | acl_save_prefix="$prefix" |
10337 | prefix="$acl_final_prefix" | |
10338 | acl_save_exec_prefix="$exec_prefix" | |
10339 | exec_prefix="$acl_final_exec_prefix" | |
10340 | eval x=\"$x\" | |
10341 | exec_prefix="$acl_save_exec_prefix" | |
10342 | prefix="$acl_save_prefix" | |
a8111142 | 10343 | |
81ecdfbb RW |
10344 | if test "X$x" = "X$element"; then |
10345 | haveit=yes | |
10346 | break | |
10347 | fi | |
10348 | done | |
10349 | if test -z "$haveit"; then | |
10350 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10351 | fi | |
10352 | done | |
a9322a30 TT |
10353 | |
10354 | ||
81ecdfbb RW |
10355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
10356 | $as_echo_n "checking for libexpat... " >&6; } | |
10357 | if test "${ac_cv_libexpat+set}" = set; then : | |
10358 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10359 | else |
bec39cab | 10360 | |
81ecdfbb RW |
10361 | ac_save_LIBS="$LIBS" |
10362 | LIBS="$LIBS $LIBEXPAT" | |
10363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10364 | /* end confdefs.h. */ |
81ecdfbb RW |
10365 | #include "expat.h" |
10366 | int | |
10367 | main () | |
10368 | { | |
10369 | XML_Parser p = XML_ParserCreate (0); | |
10370 | ; | |
10371 | return 0; | |
10372 | } | |
bec39cab | 10373 | _ACEOF |
81ecdfbb RW |
10374 | if ac_fn_c_try_link "$LINENO"; then : |
10375 | ac_cv_libexpat=yes | |
c906108c | 10376 | else |
81ecdfbb | 10377 | ac_cv_libexpat=no |
bec39cab | 10378 | fi |
81ecdfbb RW |
10379 | rm -f core conftest.err conftest.$ac_objext \ |
10380 | conftest$ac_exeext conftest.$ac_ext | |
10381 | LIBS="$ac_save_LIBS" | |
c906108c | 10382 | |
95ca63c4 | 10383 | fi |
81ecdfbb RW |
10384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
10385 | $as_echo "$ac_cv_libexpat" >&6; } | |
10386 | if test "$ac_cv_libexpat" = yes; then | |
10387 | HAVE_LIBEXPAT=yes | |
bec39cab | 10388 | |
81ecdfbb | 10389 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 10390 | |
81ecdfbb RW |
10391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
10392 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
10393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
10394 | $as_echo "$LIBEXPAT" >&6; } | |
10395 | else | |
10396 | HAVE_LIBEXPAT=no | |
10397 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10398 | LIBEXPAT= | |
10399 | LTLIBEXPAT= | |
10400 | fi | |
95ca63c4 CF |
10401 | |
10402 | ||
10403 | ||
7cb9022a MK |
10404 | |
10405 | ||
bec39cab | 10406 | |
81ecdfbb RW |
10407 | if test "$HAVE_LIBEXPAT" != yes; then |
10408 | if test "$with_expat" = yes; then | |
10409 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
10410 | else | |
10411 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
10412 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10413 | fi | |
10414 | else | |
10415 | save_LIBS=$LIBS | |
10416 | LIBS="$LIBS $LIBEXPAT" | |
10417 | for ac_func in XML_StopParser | |
10418 | do : | |
10419 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
10420 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 10421 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10422 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10423 | _ACEOF |
95ca63c4 | 10424 | |
bec39cab | 10425 | fi |
bec39cab | 10426 | done |
95ca63c4 | 10427 | |
81ecdfbb RW |
10428 | LIBS=$save_LIBS |
10429 | fi | |
a9322a30 TT |
10430 | fi |
10431 | ||
a9322a30 | 10432 | |
a9322a30 TT |
10433 | |
10434 | ||
ec685c5e | 10435 | |
81ecdfbb RW |
10436 | # Check whether --with-python was given. |
10437 | if test "${with_python+set}" = set; then : | |
10438 | withval=$with_python; | |
bec39cab | 10439 | else |
81ecdfbb | 10440 | with_python=auto |
bec39cab | 10441 | fi |
bec39cab | 10442 | |
81ecdfbb RW |
10443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10444 | $as_echo_n "checking whether to use python... " >&6; } | |
10445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10446 | $as_echo "$with_python" >&6; } | |
9a156167 | 10447 | |
81ecdfbb RW |
10448 | if test "${with_python}" = no; then |
10449 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10450 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10451 | have_libpython=no | |
bec39cab | 10452 | else |
ec685c5e | 10453 | have_python_config=no |
81ecdfbb | 10454 | case "${with_python}" in |
81ecdfbb | 10455 | /*) |
ec685c5e DE |
10456 | if test -d ${with_python}; then |
10457 | # Assume the python binary is ${with_python}/bin/python. | |
10458 | python_prefix=${with_python} | |
10459 | python_prog="${with_python}/bin/python" | |
10460 | if test ! -x ${python_prog}; then | |
10461 | # Fall back to gdb 7.0/7.1 behaviour. | |
10462 | python_prog=missing | |
10463 | fi | |
10464 | elif test -x ${with_python}; then | |
10465 | # While we can't run python compiled for $host (unless host == build), | |
10466 | # the user could write a script that provides the needed information, | |
10467 | # so we support that. | |
10468 | python_prefix= | |
10469 | python_prog=${with_python} | |
10470 | else | |
10471 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
10472 | fi | |
81ecdfbb | 10473 | ;; |
ec685c5e DE |
10474 | */*) |
10475 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
10476 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
10477 | ;; | |
ec685c5e DE |
10478 | *) |
10479 | # The user has either specified auto, yes, or the name of the python | |
10480 | # program assumed to be in $PATH. | |
10481 | python_prefix= | |
10482 | case "${with_python}" in | |
10483 | yes | auto) | |
10484 | if test ${build} = ${host}; then | |
10485 | # Extract the first word of "python", so it can be a program name with args. | |
10486 | set dummy python; ac_word=$2 | |
10487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10488 | $as_echo_n "checking for $ac_word... " >&6; } | |
10489 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10490 | $as_echo_n "(cached) " >&6 | |
10491 | else | |
10492 | case $python_prog_path in | |
10493 | [\\/]* | ?:[\\/]*) | |
10494 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10495 | ;; | |
10496 | *) | |
10497 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10498 | for as_dir in $PATH | |
10499 | do | |
10500 | IFS=$as_save_IFS | |
10501 | test -z "$as_dir" && as_dir=. | |
10502 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10503 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10504 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10505 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10506 | break 2 | |
10507 | fi | |
10508 | done | |
10509 | done | |
10510 | IFS=$as_save_IFS | |
10511 | ||
10512 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10513 | ;; | |
10514 | esac | |
10515 | fi | |
10516 | python_prog_path=$ac_cv_path_python_prog_path | |
10517 | if test -n "$python_prog_path"; then | |
10518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10519 | $as_echo "$python_prog_path" >&6; } | |
10520 | else | |
10521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10522 | $as_echo "no" >&6; } | |
10523 | fi | |
10524 | ||
10525 | ||
10526 | if test "${python_prog_path}" = missing; then | |
10527 | python_prog=missing | |
10528 | else | |
10529 | python_prog=${python_prog_path} | |
10530 | fi | |
10531 | else | |
10532 | # Not much we can do except assume the cross-compiler will find the | |
10533 | # right files. | |
10534 | python_prog=missing | |
10535 | fi | |
10536 | ;; | |
10537 | *) | |
10538 | # While we can't run python compiled for $host (unless host == build), | |
10539 | # the user could write a script that provides the needed information, | |
10540 | # so we support that. | |
10541 | python_prog="${with_python}" | |
10542 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10543 | set dummy ${python_prog}; ac_word=$2 | |
10544 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10545 | $as_echo_n "checking for $ac_word... " >&6; } | |
10546 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10547 | $as_echo_n "(cached) " >&6 | |
10548 | else | |
10549 | case $python_prog_path in | |
10550 | [\\/]* | ?:[\\/]*) | |
10551 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10552 | ;; | |
10553 | *) | |
10554 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10555 | for as_dir in $PATH | |
10556 | do | |
10557 | IFS=$as_save_IFS | |
10558 | test -z "$as_dir" && as_dir=. | |
10559 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10560 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10561 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10562 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10563 | break 2 | |
10564 | fi | |
10565 | done | |
10566 | done | |
10567 | IFS=$as_save_IFS | |
10568 | ||
10569 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10570 | ;; | |
10571 | esac | |
10572 | fi | |
10573 | python_prog_path=$ac_cv_path_python_prog_path | |
10574 | if test -n "$python_prog_path"; then | |
10575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10576 | $as_echo "$python_prog_path" >&6; } | |
10577 | else | |
10578 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10579 | $as_echo "no" >&6; } | |
10580 | fi | |
10581 | ||
10582 | ||
10583 | if test "${python_prog_path}" = missing; then | |
10584 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
10585 | fi | |
10586 | ;; | |
10587 | esac | |
81ecdfbb RW |
10588 | esac |
10589 | ||
ec685c5e DE |
10590 | if test "${python_prog}" != missing; then |
10591 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` | |
10592 | if test $? != 0; then | |
10593 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
10594 | fi | |
10595 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10596 | if test $? != 0; then | |
10597 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
10598 | fi | |
10599 | have_python_config=yes | |
10600 | else | |
10601 | # Fall back to gdb 7.0/7.1 behaviour. | |
10602 | if test -z ${python_prefix}; then | |
10603 | python_includes= | |
10604 | python_libs= | |
10605 | else | |
10606 | python_includes="-I${python_prefix}/include" | |
10607 | python_libs="-L${python_prefix}/lib" | |
10608 | fi | |
10609 | fi | |
bec39cab | 10610 | |
ec685c5e DE |
10611 | # Having "/pythonX.Y" in the include path is awkward. |
10612 | # All those python headers get bubbled up to the top inviting lots | |
10613 | # of random collisions. GDB originally didn't use python-config to | |
10614 | # find the compilation parameters and includes "pythonX.Y/" in the | |
10615 | # path of the, umm, include file. So strip away this part of the | |
10616 | # output of python-config --includes. | |
10617 | python_includes=`echo "${python_includes} " \ | |
10618 | | sed -e 's,/python[0-9]*[.][0-9]* , ,g'` | |
bec39cab | 10619 | |
ec685c5e DE |
10620 | # If we have python-config, only try the configuration it provides. |
10621 | # Otherwise fallback on the old way of trying different versions of | |
10622 | # python in turn. | |
81ecdfbb | 10623 | |
ec685c5e DE |
10624 | have_libpython=no |
10625 | if test "${have_python_config}" = yes; then | |
10626 | python_version=`echo " ${python_libs} " \ | |
10627 | | sed -e 's,^.* -l\(python[0-9]*[.][0-9]*\) .*$,\1,'` | |
10628 | if test "${python_version}" != ""; then | |
10629 | ||
10630 | version=${python_version} | |
10631 | ||
10632 | new_CPPFLAGS=${python_includes} | |
10633 | new_LIBS=${python_libs} | |
81ecdfbb RW |
10634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10635 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10636 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10637 | save_LIBS=$LIBS |
ec685c5e DE |
10638 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10639 | LIBS="$LIBS $new_LIBS" | |
10640 | found_usable_python=no | |
81ecdfbb | 10641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10642 | /* end confdefs.h. */ |
81ecdfbb RW |
10643 | #include "${version}/Python.h" |
10644 | int | |
10645 | main () | |
10646 | { | |
10647 | Py_Initialize (); | |
10648 | ; | |
10649 | return 0; | |
10650 | } | |
bec39cab | 10651 | _ACEOF |
81ecdfbb | 10652 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10653 | have_libpython=${version} |
10654 | found_usable_python=yes | |
bec39cab | 10655 | else |
ec685c5e DE |
10656 | CPPFLAGS=$save_CPPFLAGS |
10657 | LIBS=$save_LIBS | |
9a156167 | 10658 | fi |
81ecdfbb RW |
10659 | rm -f core conftest.err conftest.$ac_objext \ |
10660 | conftest$ac_exeext conftest.$ac_ext | |
ec685c5e DE |
10661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10662 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10663 | |
ec685c5e DE |
10664 | else |
10665 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 | |
10666 | fi | |
10667 | else | |
10668 | if test "${have_libpython}" = no; then | |
9a156167 | 10669 | |
ec685c5e DE |
10670 | version=python2.6 |
10671 | ||
10672 | new_CPPFLAGS=${python_includes} | |
10673 | new_LIBS="${python_libs} -lpython2.6" | |
10674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10675 | $as_echo_n "checking for ${version}... " >&6; } | |
10676 | save_CPPFLAGS=$CPPFLAGS | |
10677 | save_LIBS=$LIBS | |
10678 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10679 | LIBS="$LIBS $new_LIBS" | |
10680 | found_usable_python=no | |
10681 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10682 | /* end confdefs.h. */ | |
10683 | #include "${version}/Python.h" | |
10684 | int | |
10685 | main () | |
10686 | { | |
10687 | Py_Initialize (); | |
10688 | ; | |
10689 | return 0; | |
10690 | } | |
10691 | _ACEOF | |
10692 | if ac_fn_c_try_link "$LINENO"; then : | |
10693 | have_libpython=${version} | |
10694 | found_usable_python=yes | |
10695 | else | |
10696 | CPPFLAGS=$save_CPPFLAGS | |
10697 | LIBS=$save_LIBS | |
10698 | fi | |
10699 | rm -f core conftest.err conftest.$ac_objext \ | |
10700 | conftest$ac_exeext conftest.$ac_ext | |
10701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 | |
10702 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10703 | |
81ecdfbb | 10704 | fi |
ec685c5e | 10705 | if test ${have_libpython} = no; then |
9a156167 | 10706 | |
81ecdfbb | 10707 | version=python2.5 |
9a156167 | 10708 | |
ec685c5e DE |
10709 | new_CPPFLAGS=${python_includes} |
10710 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
10711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10712 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10713 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10714 | save_LIBS=$LIBS |
ec685c5e DE |
10715 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10716 | LIBS="$LIBS $new_LIBS" | |
10717 | found_usable_python=no | |
81ecdfbb | 10718 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10719 | /* end confdefs.h. */ |
81ecdfbb RW |
10720 | #include "${version}/Python.h" |
10721 | int | |
10722 | main () | |
10723 | { | |
10724 | Py_Initialize (); | |
10725 | ; | |
10726 | return 0; | |
10727 | } | |
436868fb | 10728 | _ACEOF |
81ecdfbb | 10729 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10730 | have_libpython=${version} |
10731 | found_usable_python=yes | |
436868fb | 10732 | else |
ec685c5e DE |
10733 | CPPFLAGS=$save_CPPFLAGS |
10734 | LIBS=$save_LIBS | |
436868fb | 10735 | fi |
81ecdfbb RW |
10736 | rm -f core conftest.err conftest.$ac_objext \ |
10737 | conftest$ac_exeext conftest.$ac_ext | |
ec685c5e DE |
10738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10739 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 10740 | |
81ecdfbb | 10741 | fi |
ec685c5e | 10742 | if test ${have_libpython} = no; then |
a9322a30 | 10743 | |
81ecdfbb | 10744 | version=python2.4 |
a9322a30 | 10745 | |
ec685c5e DE |
10746 | new_CPPFLAGS=${python_includes} |
10747 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
10748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10749 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10750 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10751 | save_LIBS=$LIBS |
ec685c5e DE |
10752 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10753 | LIBS="$LIBS $new_LIBS" | |
10754 | found_usable_python=no | |
81ecdfbb | 10755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10756 | /* end confdefs.h. */ |
81ecdfbb | 10757 | #include "${version}/Python.h" |
a9322a30 TT |
10758 | int |
10759 | main () | |
10760 | { | |
81ecdfbb | 10761 | Py_Initialize (); |
a9322a30 TT |
10762 | ; |
10763 | return 0; | |
10764 | } | |
436868fb | 10765 | _ACEOF |
81ecdfbb | 10766 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10767 | have_libpython=${version} |
10768 | found_usable_python=yes | |
436868fb | 10769 | else |
ec685c5e DE |
10770 | CPPFLAGS=$save_CPPFLAGS |
10771 | LIBS=$save_LIBS | |
436868fb | 10772 | fi |
81ecdfbb RW |
10773 | rm -f core conftest.err conftest.$ac_objext \ |
10774 | conftest$ac_exeext conftest.$ac_ext | |
ec685c5e DE |
10775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10776 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10777 | |
ec685c5e DE |
10778 | fi |
10779 | fi | |
10780 | if test "${have_libpython}" = python2.6; then | |
10781 | ||
10782 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
10783 | ||
10784 | elif test "${have_libpython}" = python2.5; then | |
10785 | ||
10786 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
10787 | ||
10788 | elif test "${have_libpython}" = python2.4; then | |
81ecdfbb RW |
10789 | |
10790 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
10791 | ||
81ecdfbb | 10792 | fi |
ec685c5e DE |
10793 | |
10794 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10795 | case "${with_python}" in |
10796 | yes) | |
10797 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
10798 | ;; | |
10799 | auto) | |
10800 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10801 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10802 | ;; | |
10803 | *) | |
10804 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
10805 | ;; | |
10806 | esac | |
81ecdfbb | 10807 | fi |
436868fb | 10808 | fi |
436868fb | 10809 | |
ec685c5e | 10810 | if test "${have_libpython}" != no; then |
436868fb | 10811 | |
81ecdfbb | 10812 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10813 | |
81ecdfbb RW |
10814 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10815 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10816 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
10817 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" | |
436868fb | 10818 | |
81ecdfbb RW |
10819 | # Flags needed to compile Python code (taken from python-config --cflags). |
10820 | # We cannot call python-config directly because it will output whatever was | |
10821 | # used when compiling the Python interpreter itself, including flags which | |
10822 | # would make the python-related objects be compiled differently from the | |
10823 | # rest of GDB (e.g., -O2 and -fPIC). | |
10824 | if test "${GCC}" = yes; then | |
10825 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
10826 | fi | |
436868fb | 10827 | |
81ecdfbb RW |
10828 | if test "x${tentative_python_cflags}" != x; then |
10829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10830 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10831 | for flag in ${tentative_python_cflags}; do | |
10832 | # Check that the compiler accepts it | |
10833 | saved_CFLAGS="$CFLAGS" | |
10834 | CFLAGS="$CFLAGS $flag" | |
10835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10836 | /* end confdefs.h. */ |
81ecdfbb | 10837 | |
a9322a30 TT |
10838 | int |
10839 | main () | |
10840 | { | |
a9322a30 TT |
10841 | |
10842 | ; | |
10843 | return 0; | |
10844 | } | |
bec39cab | 10845 | _ACEOF |
81ecdfbb RW |
10846 | if ac_fn_c_try_compile "$LINENO"; then : |
10847 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10848 | fi |
81ecdfbb RW |
10849 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10850 | CFLAGS="$saved_CFLAGS" | |
10851 | done | |
10852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10853 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10854 | fi | |
10855 | else | |
10856 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
10857 | # included. |
10858 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
10859 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
10860 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 10861 | fi |
9a156167 | 10862 | |
9a156167 | 10863 | |
81ecdfbb RW |
10864 | # ------------------------- # |
10865 | # Checks for header files. # | |
10866 | # ------------------------- # | |
c890192f | 10867 | |
81ecdfbb RW |
10868 | ac_header_dirent=no |
10869 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
10870 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
10871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
10872 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
10873 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
10874 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10875 | else |
81ecdfbb | 10876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10877 | /* end confdefs.h. */ |
81ecdfbb RW |
10878 | #include <sys/types.h> |
10879 | #include <$ac_hdr> | |
10880 | ||
a9322a30 TT |
10881 | int |
10882 | main () | |
10883 | { | |
81ecdfbb RW |
10884 | if ((DIR *) 0) |
10885 | return 0; | |
a9322a30 TT |
10886 | ; |
10887 | return 0; | |
10888 | } | |
bec39cab | 10889 | _ACEOF |
81ecdfbb RW |
10890 | if ac_fn_c_try_compile "$LINENO"; then : |
10891 | eval "$as_ac_Header=yes" | |
bec39cab | 10892 | else |
81ecdfbb | 10893 | eval "$as_ac_Header=no" |
bec39cab | 10894 | fi |
81ecdfbb | 10895 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 10896 | fi |
81ecdfbb RW |
10897 | eval ac_res=\$$as_ac_Header |
10898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
10899 | $as_echo "$ac_res" >&6; } | |
10900 | eval as_val=\$$as_ac_Header | |
10901 | if test "x$as_val" = x""yes; then : | |
10902 | cat >>confdefs.h <<_ACEOF | |
10903 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 10904 | _ACEOF |
bec39cab | 10905 | |
81ecdfbb RW |
10906 | ac_header_dirent=$ac_hdr; break |
10907 | fi | |
bec39cab | 10908 | |
81ecdfbb RW |
10909 | done |
10910 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
10911 | if test $ac_header_dirent = dirent.h; then | |
10912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
10913 | $as_echo_n "checking for library containing opendir... " >&6; } | |
10914 | if test "${ac_cv_search_opendir+set}" = set; then : | |
10915 | $as_echo_n "(cached) " >&6 | |
c890192f | 10916 | else |
81ecdfbb RW |
10917 | ac_func_search_save_LIBS=$LIBS |
10918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10919 | /* end confdefs.h. */ | |
10920 | ||
10921 | /* Override any GCC internal prototype to avoid an error. | |
10922 | Use char because int might match the return type of a GCC | |
10923 | builtin and then its argument prototype would still apply. */ | |
10924 | #ifdef __cplusplus | |
10925 | extern "C" | |
10926 | #endif | |
10927 | char opendir (); | |
10928 | int | |
10929 | main () | |
10930 | { | |
10931 | return opendir (); | |
10932 | ; | |
10933 | return 0; | |
10934 | } | |
bec39cab | 10935 | _ACEOF |
81ecdfbb RW |
10936 | for ac_lib in '' dir; do |
10937 | if test -z "$ac_lib"; then | |
10938 | ac_res="none required" | |
10939 | else | |
10940 | ac_res=-l$ac_lib | |
10941 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
10942 | fi | |
10943 | if ac_fn_c_try_link "$LINENO"; then : | |
10944 | ac_cv_search_opendir=$ac_res | |
10945 | fi | |
10946 | rm -f core conftest.err conftest.$ac_objext \ | |
10947 | conftest$ac_exeext | |
10948 | if test "${ac_cv_search_opendir+set}" = set; then : | |
10949 | break | |
10950 | fi | |
10951 | done | |
10952 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 10953 | |
81ecdfbb RW |
10954 | else |
10955 | ac_cv_search_opendir=no | |
10956 | fi | |
10957 | rm conftest.$ac_ext | |
10958 | LIBS=$ac_func_search_save_LIBS | |
10959 | fi | |
10960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
10961 | $as_echo "$ac_cv_search_opendir" >&6; } | |
10962 | ac_res=$ac_cv_search_opendir | |
10963 | if test "$ac_res" != no; then : | |
10964 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 10965 | |
bec39cab | 10966 | fi |
81ecdfbb | 10967 | |
bec39cab | 10968 | else |
81ecdfbb RW |
10969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
10970 | $as_echo_n "checking for library containing opendir... " >&6; } | |
10971 | if test "${ac_cv_search_opendir+set}" = set; then : | |
10972 | $as_echo_n "(cached) " >&6 | |
10973 | else | |
10974 | ac_func_search_save_LIBS=$LIBS | |
10975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10976 | /* end confdefs.h. */ |
81ecdfbb RW |
10977 | |
10978 | /* Override any GCC internal prototype to avoid an error. | |
10979 | Use char because int might match the return type of a GCC | |
10980 | builtin and then its argument prototype would still apply. */ | |
10981 | #ifdef __cplusplus | |
10982 | extern "C" | |
10983 | #endif | |
10984 | char opendir (); | |
a9322a30 TT |
10985 | int |
10986 | main () | |
10987 | { | |
81ecdfbb | 10988 | return opendir (); |
a9322a30 TT |
10989 | ; |
10990 | return 0; | |
10991 | } | |
bec39cab | 10992 | _ACEOF |
81ecdfbb RW |
10993 | for ac_lib in '' x; do |
10994 | if test -z "$ac_lib"; then | |
10995 | ac_res="none required" | |
10996 | else | |
10997 | ac_res=-l$ac_lib | |
10998 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
10999 | fi | |
11000 | if ac_fn_c_try_link "$LINENO"; then : | |
11001 | ac_cv_search_opendir=$ac_res | |
11002 | fi | |
11003 | rm -f core conftest.err conftest.$ac_objext \ | |
11004 | conftest$ac_exeext | |
11005 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11006 | break | |
11007 | fi | |
11008 | done | |
11009 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 11010 | |
81ecdfbb RW |
11011 | else |
11012 | ac_cv_search_opendir=no | |
bec39cab | 11013 | fi |
81ecdfbb RW |
11014 | rm conftest.$ac_ext |
11015 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 11016 | fi |
81ecdfbb RW |
11017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
11018 | $as_echo "$ac_cv_search_opendir" >&6; } | |
11019 | ac_res=$ac_cv_search_opendir | |
11020 | if test "$ac_res" != no; then : | |
11021 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 11022 | |
81ecdfbb | 11023 | fi |
bec39cab | 11024 | |
81ecdfbb | 11025 | fi |
bec39cab | 11026 | |
81ecdfbb RW |
11027 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
11028 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
11029 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
11030 | $as_echo_n "(cached) " >&6 | |
9a156167 | 11031 | else |
81ecdfbb RW |
11032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11033 | /* end confdefs.h. */ | |
11034 | #include <sys/types.h> | |
11035 | #include <sys/stat.h> | |
11036 | ||
11037 | #if defined S_ISBLK && defined S_IFDIR | |
11038 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
11039 | #endif | |
11040 | ||
11041 | #if defined S_ISBLK && defined S_IFCHR | |
11042 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
11043 | #endif | |
11044 | ||
11045 | #if defined S_ISLNK && defined S_IFREG | |
11046 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
11047 | #endif | |
11048 | ||
11049 | #if defined S_ISSOCK && defined S_IFREG | |
11050 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
11051 | #endif | |
11052 | ||
bec39cab | 11053 | _ACEOF |
81ecdfbb RW |
11054 | if ac_fn_c_try_compile "$LINENO"; then : |
11055 | ac_cv_header_stat_broken=no | |
11056 | else | |
11057 | ac_cv_header_stat_broken=yes | |
11058 | fi | |
11059 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11060 | fi | |
11061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
11062 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
11063 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 11064 | |
81ecdfbb | 11065 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 11066 | |
bec39cab | 11067 | fi |
81ecdfbb RW |
11068 | |
11069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
11070 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11071 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11072 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11073 | else |
81ecdfbb | 11074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11075 | /* end confdefs.h. */ |
81ecdfbb RW |
11076 | #include <stdlib.h> |
11077 | #include <stdarg.h> | |
11078 | #include <string.h> | |
11079 | #include <float.h> | |
11080 | ||
a9322a30 TT |
11081 | int |
11082 | main () | |
11083 | { | |
a9322a30 TT |
11084 | |
11085 | ; | |
11086 | return 0; | |
11087 | } | |
bec39cab | 11088 | _ACEOF |
81ecdfbb RW |
11089 | if ac_fn_c_try_compile "$LINENO"; then : |
11090 | ac_cv_header_stdc=yes | |
bec39cab | 11091 | else |
81ecdfbb | 11092 | ac_cv_header_stdc=no |
a9322a30 | 11093 | fi |
81ecdfbb | 11094 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11095 | |
81ecdfbb RW |
11096 | if test $ac_cv_header_stdc = yes; then |
11097 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11099 | /* end confdefs.h. */ | |
11100 | #include <string.h> | |
bec39cab | 11101 | |
81ecdfbb RW |
11102 | _ACEOF |
11103 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11104 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 11105 | |
bec39cab | 11106 | else |
81ecdfbb RW |
11107 | ac_cv_header_stdc=no |
11108 | fi | |
11109 | rm -f conftest* | |
11110 | ||
11111 | fi | |
11112 | ||
11113 | if test $ac_cv_header_stdc = yes; then | |
11114 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11115 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11116 | /* end confdefs.h. */ | |
11117 | #include <stdlib.h> | |
11118 | ||
bec39cab | 11119 | _ACEOF |
81ecdfbb RW |
11120 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11121 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 11122 | |
81ecdfbb RW |
11123 | else |
11124 | ac_cv_header_stdc=no | |
11125 | fi | |
11126 | rm -f conftest* | |
bec39cab | 11127 | |
bec39cab | 11128 | fi |
81ecdfbb RW |
11129 | |
11130 | if test $ac_cv_header_stdc = yes; then | |
11131 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11132 | if test "$cross_compiling" = yes; then : | |
11133 | : | |
bec39cab | 11134 | else |
81ecdfbb | 11135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11136 | /* end confdefs.h. */ |
81ecdfbb RW |
11137 | #include <ctype.h> |
11138 | #include <stdlib.h> | |
11139 | #if ((' ' & 0x0FF) == 0x020) | |
11140 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11141 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11142 | #else | |
11143 | # define ISLOWER(c) \ | |
11144 | (('a' <= (c) && (c) <= 'i') \ | |
11145 | || ('j' <= (c) && (c) <= 'r') \ | |
11146 | || ('s' <= (c) && (c) <= 'z')) | |
11147 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11148 | #endif | |
11149 | ||
11150 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
11151 | int |
11152 | main () | |
11153 | { | |
81ecdfbb RW |
11154 | int i; |
11155 | for (i = 0; i < 256; i++) | |
11156 | if (XOR (islower (i), ISLOWER (i)) | |
11157 | || toupper (i) != TOUPPER (i)) | |
11158 | return 2; | |
a9322a30 TT |
11159 | return 0; |
11160 | } | |
bec39cab | 11161 | _ACEOF |
81ecdfbb RW |
11162 | if ac_fn_c_try_run "$LINENO"; then : |
11163 | ||
bec39cab | 11164 | else |
81ecdfbb RW |
11165 | ac_cv_header_stdc=no |
11166 | fi | |
11167 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11168 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11169 | fi | |
bec39cab | 11170 | |
bec39cab | 11171 | fi |
a9322a30 | 11172 | fi |
81ecdfbb RW |
11173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
11174 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11175 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 11176 | |
81ecdfbb | 11177 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 11178 | |
81ecdfbb | 11179 | fi |
bec39cab | 11180 | |
81ecdfbb RW |
11181 | # elf_hp.h is for HP/UX 64-bit shared library support. |
11182 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
11183 | # unconditionally, so what's the point in checking these? | |
11184 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
11185 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
11186 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
11187 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
11188 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
11189 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
11190 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
11191 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h | |
11192 | do : | |
11193 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11194 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11195 | eval as_val=\$$as_ac_Header | |
11196 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11197 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11198 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11199 | _ACEOF |
c906108c | 11200 | |
bec39cab | 11201 | fi |
81ecdfbb RW |
11202 | |
11203 | done | |
11204 | ||
11205 | for ac_header in link.h | |
11206 | do : | |
11207 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
11208 | # include <sys/types.h> | |
11209 | #endif | |
11210 | #if HAVE_NLIST_H | |
11211 | # include <nlist.h> | |
a9322a30 TT |
11212 | #endif |
11213 | ||
81ecdfbb RW |
11214 | " |
11215 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
11216 | cat >>confdefs.h <<_ACEOF | |
11217 | #define HAVE_LINK_H 1 | |
bec39cab | 11218 | _ACEOF |
bec39cab | 11219 | |
a9322a30 | 11220 | fi |
bec39cab | 11221 | |
81ecdfbb | 11222 | done |
c906108c | 11223 | |
81ecdfbb RW |
11224 | for ac_header in sys/proc.h |
11225 | do : | |
11226 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
11227 | # include <sys/param.h> | |
11228 | #endif | |
c906108c | 11229 | |
81ecdfbb RW |
11230 | " |
11231 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 11232 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11233 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 11234 | _ACEOF |
5ee754fc | 11235 | |
bec39cab | 11236 | fi |
81ecdfbb RW |
11237 | |
11238 | done | |
11239 | ||
11240 | for ac_header in sys/user.h | |
11241 | do : | |
11242 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
11243 | # include <sys/param.h> | |
a9322a30 TT |
11244 | #endif |
11245 | ||
81ecdfbb RW |
11246 | " |
11247 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
11248 | cat >>confdefs.h <<_ACEOF | |
11249 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 11250 | _ACEOF |
bec39cab | 11251 | |
a9322a30 | 11252 | fi |
bec39cab | 11253 | |
81ecdfbb | 11254 | done |
5ee754fc | 11255 | |
5ee754fc | 11256 | |
81ecdfbb RW |
11257 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
11258 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
11259 | # think that we don't have <curses.h> if we're using GCC. | |
11260 | case $host_os in | |
11261 | solaris2.[789]) | |
11262 | if test "$GCC" = yes; then | |
11263 | ||
11264 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
11265 | ||
11266 | fi ;; | |
11267 | esac | |
11268 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
11269 | do : | |
11270 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11271 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11272 | eval as_val=\$$as_ac_Header | |
11273 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11274 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11275 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11276 | _ACEOF |
5ee754fc MK |
11277 | |
11278 | fi | |
11279 | ||
81ecdfbb | 11280 | done |
bec39cab | 11281 | |
81ecdfbb RW |
11282 | for ac_header in term.h |
11283 | do : | |
11284 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
11285 | # include <curses.h> | |
11286 | #endif | |
bec39cab | 11287 | |
81ecdfbb RW |
11288 | " |
11289 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
11290 | cat >>confdefs.h <<_ACEOF | |
11291 | #define HAVE_TERM_H 1 | |
a8111142 | 11292 | _ACEOF |
a8111142 | 11293 | |
a8111142 | 11294 | fi |
a8111142 | 11295 | |
81ecdfbb | 11296 | done |
a8111142 TT |
11297 | |
11298 | ||
81ecdfbb RW |
11299 | # ------------------------- # |
11300 | # Checks for declarations. # | |
11301 | # ------------------------- # | |
a9322a30 | 11302 | |
81ecdfbb RW |
11303 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
11304 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
11305 | ac_have_decl=1 | |
bec39cab | 11306 | else |
81ecdfbb RW |
11307 | ac_have_decl=0 |
11308 | fi | |
11309 | ||
11310 | cat >>confdefs.h <<_ACEOF | |
11311 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 11312 | _ACEOF |
81ecdfbb RW |
11313 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
11314 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
11315 | ac_have_decl=1 | |
11316 | else | |
11317 | ac_have_decl=0 | |
11318 | fi | |
11319 | ||
11320 | cat >>confdefs.h <<_ACEOF | |
11321 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 11322 | _ACEOF |
81ecdfbb RW |
11323 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
11324 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
11325 | ac_have_decl=1 | |
bec39cab | 11326 | else |
81ecdfbb RW |
11327 | ac_have_decl=0 |
11328 | fi | |
bec39cab | 11329 | |
81ecdfbb RW |
11330 | cat >>confdefs.h <<_ACEOF |
11331 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 11332 | _ACEOF |
81ecdfbb RW |
11333 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
11334 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
11335 | ac_have_decl=1 | |
11336 | else | |
11337 | ac_have_decl=0 | |
11338 | fi | |
11339 | ||
11340 | cat >>confdefs.h <<_ACEOF | |
11341 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 11342 | _ACEOF |
81ecdfbb RW |
11343 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
11344 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
11345 | ac_have_decl=1 | |
bec39cab | 11346 | else |
81ecdfbb RW |
11347 | ac_have_decl=0 |
11348 | fi | |
5ee754fc | 11349 | |
81ecdfbb RW |
11350 | cat >>confdefs.h <<_ACEOF |
11351 | #define HAVE_DECL_STRSTR $ac_have_decl | |
11352 | _ACEOF | |
11353 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
11354 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
11355 | ac_have_decl=1 | |
11356 | else | |
11357 | ac_have_decl=0 | |
5ee754fc | 11358 | fi |
81ecdfbb RW |
11359 | |
11360 | cat >>confdefs.h <<_ACEOF | |
11361 | #define HAVE_DECL_GETOPT $ac_have_decl | |
11362 | _ACEOF | |
11363 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
11364 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
11365 | ac_have_decl=1 | |
11366 | else | |
11367 | ac_have_decl=0 | |
5ee754fc | 11368 | fi |
81ecdfbb RW |
11369 | |
11370 | cat >>confdefs.h <<_ACEOF | |
11371 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11372 | _ACEOF | |
11373 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
11374 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
11375 | ac_have_decl=1 | |
11376 | else | |
11377 | ac_have_decl=0 | |
5ee754fc MK |
11378 | fi |
11379 | ||
a9322a30 | 11380 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11381 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 11382 | _ACEOF |
5ee754fc | 11383 | |
5ee754fc | 11384 | |
81ecdfbb RW |
11385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
11386 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
11387 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
11388 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11389 | else |
81ecdfbb | 11390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11391 | /* end confdefs.h. */ |
81ecdfbb | 11392 | #include <locale.h> |
a9322a30 TT |
11393 | int |
11394 | main () | |
11395 | { | |
81ecdfbb | 11396 | return LC_MESSAGES |
a9322a30 TT |
11397 | ; |
11398 | return 0; | |
11399 | } | |
bec39cab | 11400 | _ACEOF |
81ecdfbb RW |
11401 | if ac_fn_c_try_link "$LINENO"; then : |
11402 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 11403 | else |
81ecdfbb RW |
11404 | am_cv_val_LC_MESSAGES=no |
11405 | fi | |
11406 | rm -f core conftest.err conftest.$ac_objext \ | |
11407 | conftest$ac_exeext conftest.$ac_ext | |
11408 | fi | |
11409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
11410 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
11411 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 11412 | |
81ecdfbb RW |
11413 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
11414 | ||
11415 | fi | |
11416 | ||
11417 | ||
11418 | # ----------------------- # | |
11419 | # Checks for structures. # | |
11420 | # ----------------------- # | |
11421 | ||
11422 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
11423 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
11424 | ||
11425 | cat >>confdefs.h <<_ACEOF | |
11426 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 11427 | _ACEOF |
7eb368b3 | 11428 | |
81ecdfbb | 11429 | |
7eb368b3 | 11430 | fi |
81ecdfbb RW |
11431 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
11432 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 11433 | |
a9322a30 TT |
11434 | cat >>confdefs.h <<_ACEOF |
11435 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
11436 | _ACEOF |
11437 | ||
a9322a30 | 11438 | |
7eb368b3 NR |
11439 | fi |
11440 | ||
7eb368b3 | 11441 | |
a9322a30 TT |
11442 | # ------------------ # |
11443 | # Checks for types. # | |
11444 | # ------------------ # | |
7eb368b3 | 11445 | |
81ecdfbb RW |
11446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
11447 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
11448 | if test "${ac_cv_type_signal+set}" = set; then : | |
11449 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11450 | else |
81ecdfbb | 11451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11452 | /* end confdefs.h. */ |
a9322a30 TT |
11453 | #include <sys/types.h> |
11454 | #include <signal.h> | |
7cb9022a | 11455 | |
a9322a30 TT |
11456 | int |
11457 | main () | |
11458 | { | |
81ecdfbb | 11459 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
11460 | ; |
11461 | return 0; | |
11462 | } | |
bec39cab | 11463 | _ACEOF |
81ecdfbb RW |
11464 | if ac_fn_c_try_compile "$LINENO"; then : |
11465 | ac_cv_type_signal=int | |
bec39cab | 11466 | else |
81ecdfbb | 11467 | ac_cv_type_signal=void |
bec39cab | 11468 | fi |
81ecdfbb | 11469 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11470 | fi |
81ecdfbb RW |
11471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
11472 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 11473 | |
a9322a30 TT |
11474 | cat >>confdefs.h <<_ACEOF |
11475 | #define RETSIGTYPE $ac_cv_type_signal | |
11476 | _ACEOF | |
5ee754fc | 11477 | |
bec39cab | 11478 | |
81ecdfbb | 11479 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
11480 | #include <sys/socket.h> |
11481 | ||
81ecdfbb RW |
11482 | " |
11483 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 11484 | |
a9322a30 TT |
11485 | cat >>confdefs.h <<_ACEOF |
11486 | #define HAVE_SOCKLEN_T 1 | |
11487 | _ACEOF | |
11488 | ||
11489 | ||
11490 | fi | |
11491 | ||
11492 | ||
11493 | # ------------------------------------- # | |
11494 | # Checks for compiler characteristics. # | |
11495 | # ------------------------------------- # | |
11496 | ||
81ecdfbb RW |
11497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
11498 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
11499 | if test "${ac_cv_c_const+set}" = set; then : | |
11500 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11501 | else |
81ecdfbb | 11502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11503 | /* end confdefs.h. */ |
a9322a30 TT |
11504 | |
11505 | int | |
11506 | main () | |
11507 | { | |
11508 | /* FIXME: Include the comments suggested by Paul. */ | |
11509 | #ifndef __cplusplus | |
11510 | /* Ultrix mips cc rejects this. */ | |
11511 | typedef int charset[2]; | |
81ecdfbb | 11512 | const charset cs; |
a9322a30 | 11513 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
11514 | char const *const *pcpcc; |
11515 | char **ppc; | |
a9322a30 TT |
11516 | /* NEC SVR4.0.2 mips cc rejects this. */ |
11517 | struct point {int x, y;}; | |
11518 | static struct point const zero = {0,0}; | |
11519 | /* AIX XL C 1.02.0.0 rejects this. | |
11520 | It does not let you subtract one const X* pointer from another in | |
11521 | an arm of an if-expression whose if-part is not a constant | |
11522 | expression */ | |
11523 | const char *g = "string"; | |
81ecdfbb | 11524 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 11525 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
11526 | ++pcpcc; |
11527 | ppc = (char**) pcpcc; | |
11528 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
11529 | { /* SCO 3.2v4 cc rejects this. */ |
11530 | char *t; | |
11531 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
11532 | ||
11533 | *t++ = 0; | |
81ecdfbb | 11534 | if (s) return 0; |
a9322a30 TT |
11535 | } |
11536 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
11537 | int x[] = {25, 17}; | |
11538 | const int *foo = &x[0]; | |
11539 | ++foo; | |
11540 | } | |
11541 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
11542 | typedef const int *iptr; | |
11543 | iptr p = 0; | |
11544 | ++p; | |
11545 | } | |
11546 | { /* AIX XL C 1.02.0.0 rejects this saying | |
11547 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
11548 | struct s { int j; const int *ap[3]; }; | |
11549 | struct s *b; b->j = 5; | |
11550 | } | |
11551 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
11552 | const int foo = 10; | |
81ecdfbb | 11553 | if (!foo) return 0; |
a9322a30 | 11554 | } |
81ecdfbb | 11555 | return !cs[0] && !zero.x; |
a9322a30 TT |
11556 | #endif |
11557 | ||
11558 | ; | |
11559 | return 0; | |
11560 | } | |
bec39cab | 11561 | _ACEOF |
81ecdfbb | 11562 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11563 | ac_cv_c_const=yes |
5ee754fc | 11564 | else |
81ecdfbb | 11565 | ac_cv_c_const=no |
5ee754fc | 11566 | fi |
81ecdfbb | 11567 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11568 | fi |
81ecdfbb RW |
11569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
11570 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 11571 | if test $ac_cv_c_const = no; then |
bec39cab | 11572 | |
81ecdfbb | 11573 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 11574 | |
5ee754fc | 11575 | fi |
bec39cab | 11576 | |
81ecdfbb RW |
11577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
11578 | $as_echo_n "checking for inline... " >&6; } | |
11579 | if test "${ac_cv_c_inline+set}" = set; then : | |
11580 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11581 | else |
a9322a30 TT |
11582 | ac_cv_c_inline=no |
11583 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 11584 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11585 | /* end confdefs.h. */ |
a9322a30 TT |
11586 | #ifndef __cplusplus |
11587 | typedef int foo_t; | |
11588 | static $ac_kw foo_t static_foo () {return 0; } | |
11589 | $ac_kw foo_t foo () {return 0; } | |
11590 | #endif | |
11591 | ||
bec39cab | 11592 | _ACEOF |
81ecdfbb RW |
11593 | if ac_fn_c_try_compile "$LINENO"; then : |
11594 | ac_cv_c_inline=$ac_kw | |
bec39cab | 11595 | fi |
81ecdfbb RW |
11596 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11597 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 11598 | done |
bec39cab | 11599 | |
5ee754fc | 11600 | fi |
81ecdfbb RW |
11601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
11602 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 11603 | |
a9322a30 TT |
11604 | case $ac_cv_c_inline in |
11605 | inline | yes) ;; | |
11606 | *) | |
11607 | case $ac_cv_c_inline in | |
11608 | no) ac_val=;; | |
11609 | *) ac_val=$ac_cv_c_inline;; | |
11610 | esac | |
11611 | cat >>confdefs.h <<_ACEOF | |
11612 | #ifndef __cplusplus | |
11613 | #define inline $ac_val | |
11614 | #endif | |
11615 | _ACEOF | |
bec39cab AC |
11616 | ;; |
11617 | esac | |
bec39cab | 11618 | |
81ecdfbb RW |
11619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
11620 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
11621 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
11622 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11623 | else |
81ecdfbb RW |
11624 | ac_cv_c_bigendian=unknown |
11625 | # See if we're dealing with a universal compiler. | |
11626 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11627 | /* end confdefs.h. */ | |
11628 | #ifndef __APPLE_CC__ | |
11629 | not a universal capable compiler | |
11630 | #endif | |
11631 | typedef int dummy; | |
11632 | ||
11633 | _ACEOF | |
11634 | if ac_fn_c_try_compile "$LINENO"; then : | |
11635 | ||
11636 | # Check for potential -arch flags. It is not universal unless | |
11637 | # there are at least two -arch flags with different values. | |
11638 | ac_arch= | |
11639 | ac_prev= | |
11640 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
11641 | if test -n "$ac_prev"; then | |
11642 | case $ac_word in | |
11643 | i?86 | x86_64 | ppc | ppc64) | |
11644 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
11645 | ac_arch=$ac_word | |
11646 | else | |
11647 | ac_cv_c_bigendian=universal | |
11648 | break | |
11649 | fi | |
11650 | ;; | |
11651 | esac | |
11652 | ac_prev= | |
11653 | elif test "x$ac_word" = "x-arch"; then | |
11654 | ac_prev=arch | |
11655 | fi | |
11656 | done | |
11657 | fi | |
11658 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11659 | if test $ac_cv_c_bigendian = unknown; then | |
11660 | # See if sys/param.h defines the BYTE_ORDER macro. | |
11661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11662 | /* end confdefs.h. */ |
a9322a30 | 11663 | #include <sys/types.h> |
81ecdfbb | 11664 | #include <sys/param.h> |
a9322a30 TT |
11665 | |
11666 | int | |
11667 | main () | |
11668 | { | |
81ecdfbb RW |
11669 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
11670 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
11671 | && LITTLE_ENDIAN) | |
11672 | bogus endian macros | |
11673 | #endif | |
a9322a30 TT |
11674 | |
11675 | ; | |
11676 | return 0; | |
11677 | } | |
bec39cab | 11678 | _ACEOF |
81ecdfbb | 11679 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11680 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 11681 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11682 | /* end confdefs.h. */ |
a9322a30 | 11683 | #include <sys/types.h> |
81ecdfbb | 11684 | #include <sys/param.h> |
a9322a30 TT |
11685 | |
11686 | int | |
11687 | main () | |
11688 | { | |
11689 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
11690 | not big endian |
11691 | #endif | |
a9322a30 TT |
11692 | |
11693 | ; | |
11694 | return 0; | |
11695 | } | |
bec39cab | 11696 | _ACEOF |
81ecdfbb | 11697 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11698 | ac_cv_c_bigendian=yes |
5ee754fc | 11699 | else |
81ecdfbb | 11700 | ac_cv_c_bigendian=no |
5ee754fc | 11701 | fi |
81ecdfbb RW |
11702 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11703 | fi | |
11704 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11705 | fi | |
11706 | if test $ac_cv_c_bigendian = unknown; then | |
11707 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
11708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11709 | /* end confdefs.h. */ | |
11710 | #include <limits.h> | |
bec39cab | 11711 | |
81ecdfbb RW |
11712 | int |
11713 | main () | |
11714 | { | |
11715 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
11716 | bogus endian macros | |
11717 | #endif | |
11718 | ||
11719 | ; | |
11720 | return 0; | |
11721 | } | |
7eb368b3 | 11722 | _ACEOF |
81ecdfbb RW |
11723 | if ac_fn_c_try_compile "$LINENO"; then : |
11724 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
11725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 11726 | /* end confdefs.h. */ |
81ecdfbb RW |
11727 | #include <limits.h> |
11728 | ||
7eb368b3 NR |
11729 | int |
11730 | main () | |
11731 | { | |
81ecdfbb RW |
11732 | #ifndef _BIG_ENDIAN |
11733 | not big endian | |
11734 | #endif | |
11735 | ||
7eb368b3 NR |
11736 | ; |
11737 | return 0; | |
11738 | } | |
11739 | _ACEOF | |
81ecdfbb | 11740 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11741 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
11742 | else |
11743 | ac_cv_c_bigendian=no | |
a9322a30 | 11744 | fi |
81ecdfbb | 11745 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 11746 | fi |
81ecdfbb RW |
11747 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11748 | fi | |
11749 | if test $ac_cv_c_bigendian = unknown; then | |
11750 | # Compile a test program. | |
11751 | if test "$cross_compiling" = yes; then : | |
11752 | # Try to guess by grepping values from an object file. | |
11753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11754 | /* end confdefs.h. */ | |
11755 | short int ascii_mm[] = | |
11756 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
11757 | short int ascii_ii[] = | |
11758 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
11759 | int use_ascii (int i) { | |
11760 | return ascii_mm[i] + ascii_ii[i]; | |
11761 | } | |
11762 | short int ebcdic_ii[] = | |
11763 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
11764 | short int ebcdic_mm[] = | |
11765 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
11766 | int use_ebcdic (int i) { | |
11767 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
11768 | } | |
11769 | extern int foo; | |
7eb368b3 | 11770 | |
81ecdfbb RW |
11771 | int |
11772 | main () | |
11773 | { | |
11774 | return use_ascii (foo) == use_ebcdic (foo); | |
11775 | ; | |
11776 | return 0; | |
11777 | } | |
11778 | _ACEOF | |
11779 | if ac_fn_c_try_compile "$LINENO"; then : | |
11780 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
11781 | ac_cv_c_bigendian=yes | |
11782 | fi | |
11783 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
11784 | if test "$ac_cv_c_bigendian" = unknown; then | |
11785 | ac_cv_c_bigendian=no | |
11786 | else | |
11787 | # finding both strings is unlikely to happen, but who knows? | |
11788 | ac_cv_c_bigendian=unknown | |
11789 | fi | |
11790 | fi | |
7eb368b3 | 11791 | fi |
81ecdfbb | 11792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11793 | else |
81ecdfbb | 11794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11795 | /* end confdefs.h. */ |
81ecdfbb | 11796 | $ac_includes_default |
d3ea6809 MM |
11797 | int |
11798 | main () | |
11799 | { | |
81ecdfbb RW |
11800 | |
11801 | /* Are we little or big endian? From Harbison&Steele. */ | |
11802 | union | |
11803 | { | |
11804 | long int l; | |
11805 | char c[sizeof (long int)]; | |
11806 | } u; | |
11807 | u.l = 1; | |
11808 | return u.c[sizeof (long int) - 1] == 1; | |
11809 | ||
11810 | ; | |
11811 | return 0; | |
d3ea6809 MM |
11812 | } |
11813 | _ACEOF | |
81ecdfbb | 11814 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 11815 | ac_cv_c_bigendian=no |
d3ea6809 | 11816 | else |
81ecdfbb | 11817 | ac_cv_c_bigendian=yes |
d3ea6809 | 11818 | fi |
81ecdfbb RW |
11819 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11820 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11821 | fi |
a9322a30 | 11822 | |
81ecdfbb RW |
11823 | fi |
11824 | fi | |
11825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
11826 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
11827 | case $ac_cv_c_bigendian in #( | |
11828 | yes) | |
11829 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
11830 | ;; #( | |
11831 | no) | |
11832 | ;; #( | |
11833 | universal) | |
11834 | ||
11835 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
11836 | ||
11837 | ;; #( | |
11838 | *) | |
11839 | as_fn_error "unknown endianness | |
11840 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
11841 | esac | |
d3ea6809 MM |
11842 | |
11843 | ||
a9322a30 TT |
11844 | # ------------------------------ # |
11845 | # Checks for library functions. # | |
11846 | # ------------------------------ # | |
d3ea6809 | 11847 | |
a9322a30 TT |
11848 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
11849 | # for constant arguments. Useless! | |
81ecdfbb RW |
11850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
11851 | $as_echo_n "checking for working alloca.h... " >&6; } | |
11852 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
11853 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 11854 | else |
81ecdfbb | 11855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 11856 | /* end confdefs.h. */ |
a9322a30 | 11857 | #include <alloca.h> |
bec39cab AC |
11858 | int |
11859 | main () | |
11860 | { | |
a9322a30 | 11861 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 11862 | if (p) return 0; |
bec39cab AC |
11863 | ; |
11864 | return 0; | |
11865 | } | |
11866 | _ACEOF | |
81ecdfbb | 11867 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 11868 | ac_cv_working_alloca_h=yes |
bec39cab | 11869 | else |
81ecdfbb | 11870 | ac_cv_working_alloca_h=no |
bec39cab | 11871 | fi |
81ecdfbb RW |
11872 | rm -f core conftest.err conftest.$ac_objext \ |
11873 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 11874 | fi |
81ecdfbb RW |
11875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
11876 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
11877 | if test $ac_cv_working_alloca_h = yes; then |
11878 | ||
81ecdfbb | 11879 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 11880 | |
c906108c | 11881 | fi |
bec39cab | 11882 | |
81ecdfbb RW |
11883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
11884 | $as_echo_n "checking for alloca... " >&6; } | |
11885 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
11886 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11887 | else |
81ecdfbb | 11888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11889 | /* end confdefs.h. */ |
a9322a30 TT |
11890 | #ifdef __GNUC__ |
11891 | # define alloca __builtin_alloca | |
b4e70030 | 11892 | #else |
a9322a30 TT |
11893 | # ifdef _MSC_VER |
11894 | # include <malloc.h> | |
11895 | # define alloca _alloca | |
11896 | # else | |
81ecdfbb | 11897 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
11898 | # include <alloca.h> |
11899 | # else | |
11900 | # ifdef _AIX | |
11901 | #pragma alloca | |
11902 | # else | |
11903 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
11904 | char *alloca (); | |
11905 | # endif | |
11906 | # endif | |
11907 | # endif | |
11908 | # endif | |
c906108c | 11909 | #endif |
97bf5e38 | 11910 | |
bec39cab AC |
11911 | int |
11912 | main () | |
11913 | { | |
a9322a30 | 11914 | char *p = (char *) alloca (1); |
81ecdfbb | 11915 | if (p) return 0; |
bec39cab AC |
11916 | ; |
11917 | return 0; | |
11918 | } | |
11919 | _ACEOF | |
81ecdfbb | 11920 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 11921 | ac_cv_func_alloca_works=yes |
bec39cab | 11922 | else |
81ecdfbb | 11923 | ac_cv_func_alloca_works=no |
bec39cab | 11924 | fi |
81ecdfbb RW |
11925 | rm -f core conftest.err conftest.$ac_objext \ |
11926 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 11927 | fi |
81ecdfbb RW |
11928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
11929 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
11930 | |
11931 | if test $ac_cv_func_alloca_works = yes; then | |
11932 | ||
81ecdfbb | 11933 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 11934 | |
a9322a30 TT |
11935 | else |
11936 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
11937 | # that cause trouble. Some versions do not even contain alloca or | |
11938 | # contain a buggy version. If you still want to use their alloca, | |
11939 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
11940 | ||
81ecdfbb | 11941 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 11942 | |
81ecdfbb | 11943 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 11944 | |
bec39cab | 11945 | |
81ecdfbb RW |
11946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
11947 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
11948 | if test "${ac_cv_os_cray+set}" = set; then : | |
11949 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11950 | else |
81ecdfbb | 11951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 11952 | /* end confdefs.h. */ |
81ecdfbb | 11953 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
11954 | webecray |
11955 | #else | |
11956 | wenotbecray | |
11957 | #endif | |
11958 | ||
11959 | _ACEOF | |
11960 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 11961 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
11962 | ac_cv_os_cray=yes |
11963 | else | |
81ecdfbb | 11964 | ac_cv_os_cray=no |
bec39cab | 11965 | fi |
81ecdfbb RW |
11966 | rm -f conftest* |
11967 | ||
bec39cab | 11968 | fi |
81ecdfbb RW |
11969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
11970 | $as_echo "$ac_cv_os_cray" >&6; } | |
11971 | if test $ac_cv_os_cray = yes; then | |
11972 | for ac_func in _getb67 GETB67 getb67; do | |
11973 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11974 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11975 | eval as_val=\$$as_ac_var | |
11976 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
11977 | |
11978 | cat >>confdefs.h <<_ACEOF | |
11979 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 11980 | _ACEOF |
c906108c | 11981 | |
a9322a30 | 11982 | break |
c906108c SS |
11983 | fi |
11984 | ||
a9322a30 TT |
11985 | done |
11986 | fi | |
bec39cab | 11987 | |
81ecdfbb RW |
11988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
11989 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
11990 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
11991 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11992 | else |
81ecdfbb | 11993 | if test "$cross_compiling" = yes; then : |
a9322a30 | 11994 | ac_cv_c_stack_direction=0 |
bec39cab | 11995 | else |
81ecdfbb | 11996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11997 | /* end confdefs.h. */ |
81ecdfbb | 11998 | $ac_includes_default |
a9322a30 TT |
11999 | int |
12000 | find_stack_direction () | |
b4e70030 | 12001 | { |
a9322a30 TT |
12002 | static char *addr = 0; |
12003 | auto char dummy; | |
12004 | if (addr == 0) | |
12005 | { | |
12006 | addr = &dummy; | |
12007 | return find_stack_direction (); | |
12008 | } | |
12009 | else | |
12010 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 12011 | } |
b757528f | 12012 | |
bec39cab AC |
12013 | int |
12014 | main () | |
12015 | { | |
81ecdfbb | 12016 | return find_stack_direction () < 0; |
bec39cab AC |
12017 | } |
12018 | _ACEOF | |
81ecdfbb | 12019 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12020 | ac_cv_c_stack_direction=1 |
12021 | else | |
81ecdfbb | 12022 | ac_cv_c_stack_direction=-1 |
a9322a30 | 12023 | fi |
81ecdfbb RW |
12024 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12025 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12026 | fi |
a9322a30 | 12027 | |
81ecdfbb RW |
12028 | fi |
12029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12030 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
12031 | cat >>confdefs.h <<_ACEOF |
12032 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12033 | _ACEOF | |
12034 | ||
12035 | ||
12036 | fi | |
12037 | ||
a9322a30 | 12038 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
12039 | do : |
12040 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12041 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12042 | eval as_val=\$$as_ac_Header | |
12043 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12044 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12045 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12046 | _ACEOF |
b757528f | 12047 | |
b757528f | 12048 | fi |
bec39cab | 12049 | |
a9322a30 | 12050 | done |
a3828db0 | 12051 | |
a9322a30 | 12052 | for ac_func in getpagesize |
81ecdfbb RW |
12053 | do : |
12054 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
12055 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 12056 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12057 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12058 | _ACEOF |
bcb3dc3d | 12059 | |
bcb3dc3d MK |
12060 | fi |
12061 | done | |
12062 | ||
81ecdfbb RW |
12063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12064 | $as_echo_n "checking for working mmap... " >&6; } | |
12065 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
12066 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12067 | else |
81ecdfbb | 12068 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12069 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12070 | else |
81ecdfbb | 12071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12072 | /* end confdefs.h. */ |
a9322a30 TT |
12073 | $ac_includes_default |
12074 | /* malloc might have been renamed as rpl_malloc. */ | |
12075 | #undef malloc | |
bec39cab | 12076 | |
a9322a30 TT |
12077 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12078 | Here is a matrix of mmap possibilities: | |
12079 | mmap private not fixed | |
12080 | mmap private fixed at somewhere currently unmapped | |
12081 | mmap private fixed at somewhere already mapped | |
12082 | mmap shared not fixed | |
12083 | mmap shared fixed at somewhere currently unmapped | |
12084 | mmap shared fixed at somewhere already mapped | |
12085 | For private mappings, we should verify that changes cannot be read() | |
12086 | back from the file, nor mmap's back from the file at a different | |
12087 | address. (There have been systems where private was not correctly | |
12088 | implemented like the infamous i386 svr4.0, and systems where the | |
12089 | VM page cache was not coherent with the file system buffer cache | |
12090 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12091 | For shared mappings, we should conversely verify that changes get | |
12092 | propagated back to all the places they're supposed to be. | |
bec39cab | 12093 | |
a9322a30 TT |
12094 | Grep wants private fixed already mapped. |
12095 | The main things grep needs to know about mmap are: | |
12096 | * does it exist and is it safe to write into the mmap'd area | |
12097 | * how to use it (BSD variants) */ | |
8b9cf735 | 12098 | |
a9322a30 TT |
12099 | #include <fcntl.h> |
12100 | #include <sys/mman.h> | |
8b9cf735 | 12101 | |
81ecdfbb | 12102 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12103 | char *malloc (); |
a3828db0 MK |
12104 | #endif |
12105 | ||
a9322a30 | 12106 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12107 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 12108 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 12109 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
12110 | # define HAVE_SYS_PARAM_H 1 |
12111 | # endif | |
12112 | ||
12113 | # ifdef _SC_PAGESIZE | |
12114 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12115 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12116 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12117 | # include <sys/param.h> |
12118 | # ifdef EXEC_PAGESIZE | |
12119 | # define getpagesize() EXEC_PAGESIZE | |
12120 | # else /* no EXEC_PAGESIZE */ | |
12121 | # ifdef NBPG | |
12122 | # define getpagesize() NBPG * CLSIZE | |
12123 | # ifndef CLSIZE | |
12124 | # define CLSIZE 1 | |
12125 | # endif /* no CLSIZE */ | |
12126 | # else /* no NBPG */ | |
12127 | # ifdef NBPC | |
12128 | # define getpagesize() NBPC | |
12129 | # else /* no NBPC */ | |
12130 | # ifdef PAGESIZE | |
12131 | # define getpagesize() PAGESIZE | |
12132 | # endif /* PAGESIZE */ | |
12133 | # endif /* no NBPC */ | |
12134 | # endif /* no NBPG */ | |
12135 | # endif /* no EXEC_PAGESIZE */ | |
12136 | # else /* no HAVE_SYS_PARAM_H */ | |
12137 | # define getpagesize() 8192 /* punt totally */ | |
12138 | # endif /* no HAVE_SYS_PARAM_H */ | |
12139 | # endif /* no _SC_PAGESIZE */ | |
12140 | ||
12141 | #endif /* no HAVE_GETPAGESIZE */ | |
12142 | ||
bec39cab AC |
12143 | int |
12144 | main () | |
12145 | { | |
a9322a30 TT |
12146 | char *data, *data2, *data3; |
12147 | int i, pagesize; | |
12148 | int fd; | |
12149 | ||
12150 | pagesize = getpagesize (); | |
12151 | ||
12152 | /* First, make a file with some known garbage in it. */ | |
12153 | data = (char *) malloc (pagesize); | |
12154 | if (!data) | |
81ecdfbb | 12155 | return 1; |
a9322a30 TT |
12156 | for (i = 0; i < pagesize; ++i) |
12157 | *(data + i) = rand (); | |
12158 | umask (0); | |
12159 | fd = creat ("conftest.mmap", 0600); | |
12160 | if (fd < 0) | |
81ecdfbb | 12161 | return 1; |
a9322a30 | 12162 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 12163 | return 1; |
a9322a30 TT |
12164 | close (fd); |
12165 | ||
12166 | /* Next, try to mmap the file at a fixed address which already has | |
12167 | something else allocated at it. If we can, also make sure that | |
12168 | we see the same garbage. */ | |
12169 | fd = open ("conftest.mmap", O_RDWR); | |
12170 | if (fd < 0) | |
81ecdfbb | 12171 | return 1; |
a9322a30 TT |
12172 | data2 = (char *) malloc (2 * pagesize); |
12173 | if (!data2) | |
81ecdfbb RW |
12174 | return 1; |
12175 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
12176 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12177 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 12178 | return 1; |
a9322a30 TT |
12179 | for (i = 0; i < pagesize; ++i) |
12180 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 12181 | return 1; |
a9322a30 TT |
12182 | |
12183 | /* Finally, make sure that changes to the mapped area do not | |
12184 | percolate back to the file as seen by read(). (This is a bug on | |
12185 | some variants of i386 svr4.0.) */ | |
12186 | for (i = 0; i < pagesize; ++i) | |
12187 | *(data2 + i) = *(data2 + i) + 1; | |
12188 | data3 = (char *) malloc (pagesize); | |
12189 | if (!data3) | |
81ecdfbb | 12190 | return 1; |
a9322a30 | 12191 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 12192 | return 1; |
a9322a30 TT |
12193 | for (i = 0; i < pagesize; ++i) |
12194 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 12195 | return 1; |
a9322a30 | 12196 | close (fd); |
81ecdfbb | 12197 | return 0; |
bec39cab AC |
12198 | } |
12199 | _ACEOF | |
81ecdfbb | 12200 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12201 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12202 | else |
81ecdfbb | 12203 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12204 | fi |
81ecdfbb RW |
12205 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12206 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12207 | fi |
81ecdfbb | 12208 | |
a9322a30 | 12209 | fi |
81ecdfbb RW |
12210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12211 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12212 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12213 | ||
81ecdfbb | 12214 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12215 | |
086ec9eb | 12216 | fi |
a9322a30 | 12217 | rm -f conftest.mmap |
a3828db0 | 12218 | |
81ecdfbb RW |
12219 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
12220 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 12221 | |
a9322a30 TT |
12222 | else |
12223 | ||
12224 | cat >>confdefs.h <<_ACEOF | |
12225 | #define pid_t int | |
bec39cab | 12226 | _ACEOF |
086ec9eb MK |
12227 | |
12228 | fi | |
12229 | ||
81ecdfbb RW |
12230 | for ac_header in vfork.h |
12231 | do : | |
12232 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
12233 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 12234 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12235 | #define HAVE_VFORK_H 1 |
bec39cab | 12236 | _ACEOF |
c906108c SS |
12237 | |
12238 | fi | |
a9322a30 | 12239 | |
a3828db0 | 12240 | done |
c906108c | 12241 | |
a9322a30 | 12242 | for ac_func in fork vfork |
81ecdfbb RW |
12243 | do : |
12244 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12245 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12246 | eval as_val=\$$as_ac_var | |
12247 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 12248 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12249 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 12250 | _ACEOF |
b83266a0 | 12251 | |
97bf5e38 | 12252 | fi |
a3828db0 | 12253 | done |
b83266a0 | 12254 | |
a9322a30 | 12255 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
12256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
12257 | $as_echo_n "checking for working fork... " >&6; } | |
12258 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
12259 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12260 | else |
81ecdfbb | 12261 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12262 | ac_cv_func_fork_works=cross |
12263 | else | |
81ecdfbb RW |
12264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12265 | /* end confdefs.h. */ | |
12266 | $ac_includes_default | |
12267 | int | |
12268 | main () | |
12269 | { | |
12270 | ||
12271 | /* By Ruediger Kuhlmann. */ | |
12272 | return fork () < 0; | |
12273 | ||
12274 | ; | |
12275 | return 0; | |
12276 | } | |
a9322a30 | 12277 | _ACEOF |
81ecdfbb | 12278 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12279 | ac_cv_func_fork_works=yes |
12280 | else | |
81ecdfbb | 12281 | ac_cv_func_fork_works=no |
a9322a30 | 12282 | fi |
81ecdfbb RW |
12283 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12284 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12285 | fi |
81ecdfbb | 12286 | |
a9322a30 | 12287 | fi |
81ecdfbb RW |
12288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
12289 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
12290 | |
12291 | else | |
12292 | ac_cv_func_fork_works=$ac_cv_func_fork | |
12293 | fi | |
12294 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12295 | case $host in | |
12296 | *-*-amigaos* | *-*-msdosdjgpp*) | |
12297 | # Override, as these systems have only a dummy fork() stub | |
12298 | ac_cv_func_fork_works=no | |
12299 | ;; | |
12300 | *) | |
12301 | ac_cv_func_fork_works=yes | |
12302 | ;; | |
12303 | esac | |
81ecdfbb RW |
12304 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
12305 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12306 | fi |
12307 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
12308 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
12309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
12310 | $as_echo_n "checking for working vfork... " >&6; } | |
12311 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
12312 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12313 | else |
81ecdfbb | 12314 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12315 | ac_cv_func_vfork_works=cross |
12316 | else | |
81ecdfbb | 12317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
12318 | /* end confdefs.h. */ |
12319 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 12320 | $ac_includes_default |
a9322a30 | 12321 | #include <sys/wait.h> |
81ecdfbb | 12322 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
12323 | # include <vfork.h> |
12324 | #endif | |
12325 | /* On some sparc systems, changes by the child to local and incoming | |
12326 | argument registers are propagated back to the parent. The compiler | |
12327 | is told about this with #include <vfork.h>, but some compilers | |
12328 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
12329 | static variable whose address is put into a register that is | |
12330 | clobbered by the vfork. */ | |
12331 | static void | |
12332 | #ifdef __cplusplus | |
12333 | sparc_address_test (int arg) | |
12334 | # else | |
12335 | sparc_address_test (arg) int arg; | |
12336 | #endif | |
12337 | { | |
12338 | static pid_t child; | |
12339 | if (!child) { | |
12340 | child = vfork (); | |
12341 | if (child < 0) { | |
12342 | perror ("vfork"); | |
12343 | _exit(2); | |
12344 | } | |
12345 | if (!child) { | |
12346 | arg = getpid(); | |
12347 | write(-1, "", 0); | |
12348 | _exit (arg); | |
12349 | } | |
12350 | } | |
12351 | } | |
12352 | ||
12353 | int | |
12354 | main () | |
12355 | { | |
12356 | pid_t parent = getpid (); | |
12357 | pid_t child; | |
12358 | ||
12359 | sparc_address_test (0); | |
12360 | ||
12361 | child = vfork (); | |
12362 | ||
12363 | if (child == 0) { | |
12364 | /* Here is another test for sparc vfork register problems. This | |
12365 | test uses lots of local variables, at least as many local | |
12366 | variables as main has allocated so far including compiler | |
12367 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
12368 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
12369 | reuse the register of parent for one of the local variables, | |
12370 | since it will think that parent can't possibly be used any more | |
12371 | in this routine. Assigning to the local variable will thus | |
12372 | munge parent in the parent process. */ | |
12373 | pid_t | |
12374 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
12375 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
12376 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
12377 | use the same hardware register for all 8 local variables. */ | |
12378 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
12379 | || p != p5 || p != p6 || p != p7) | |
12380 | _exit(1); | |
12381 | ||
12382 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
12383 | from child file descriptors. If the child closes a descriptor | |
12384 | before it execs or exits, this munges the parent's descriptor | |
12385 | as well. Test for this by closing stdout in the child. */ | |
12386 | _exit(close(fileno(stdout)) != 0); | |
12387 | } else { | |
12388 | int status; | |
12389 | struct stat st; | |
12390 | ||
12391 | while (wait(&status) != child) | |
12392 | ; | |
81ecdfbb | 12393 | return ( |
a9322a30 TT |
12394 | /* Was there some problem with vforking? */ |
12395 | child < 0 | |
12396 | ||
12397 | /* Did the child fail? (This shouldn't happen.) */ | |
12398 | || status | |
12399 | ||
12400 | /* Did the vfork/compiler bug occur? */ | |
12401 | || parent != getpid() | |
12402 | ||
12403 | /* Did the file descriptor bug occur? */ | |
12404 | || fstat(fileno(stdout), &st) != 0 | |
12405 | ); | |
12406 | } | |
12407 | } | |
12408 | _ACEOF | |
81ecdfbb | 12409 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12410 | ac_cv_func_vfork_works=yes |
12411 | else | |
81ecdfbb | 12412 | ac_cv_func_vfork_works=no |
a9322a30 | 12413 | fi |
81ecdfbb RW |
12414 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12415 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12416 | fi |
81ecdfbb | 12417 | |
a9322a30 | 12418 | fi |
81ecdfbb RW |
12419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
12420 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
12421 | |
12422 | fi; | |
12423 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12424 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
12425 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
12426 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12427 | fi |
12428 | ||
12429 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
12430 | ||
81ecdfbb | 12431 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
12432 | |
12433 | else | |
12434 | ||
81ecdfbb | 12435 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
12436 | |
12437 | fi | |
12438 | if test "x$ac_cv_func_fork_works" = xyes; then | |
12439 | ||
81ecdfbb | 12440 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
12441 | |
12442 | fi | |
12443 | ||
a9322a30 | 12444 | for ac_func in canonicalize_file_name realpath getrusage getuid \ |
a156a290 | 12445 | getgid pipe poll pread64 sbrk setpgid setpgrp setsid \ |
a9322a30 | 12446 | sigaction sigprocmask sigsetmask socketpair syscall \ |
7991dee7 | 12447 | ttrace wborder setlocale iconvlist libiconvlist btowc \ |
be391dca | 12448 | setrlimit getrlimit posix_madvise |
81ecdfbb RW |
12449 | do : |
12450 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12451 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12452 | eval as_val=\$$as_ac_var | |
12453 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 12454 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12455 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
12456 | _ACEOF |
12457 | ||
12458 | fi | |
12459 | done | |
12460 | ||
12461 | ||
81ecdfbb RW |
12462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
12463 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12464 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
12465 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 12466 | else |
81ecdfbb | 12467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
12468 | /* end confdefs.h. */ |
12469 | #include <langinfo.h> | |
12470 | int | |
12471 | main () | |
12472 | { | |
12473 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
12474 | ; |
12475 | return 0; | |
12476 | } | |
12477 | _ACEOF | |
81ecdfbb | 12478 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 12479 | am_cv_langinfo_codeset=yes |
a4db0f07 | 12480 | else |
81ecdfbb | 12481 | am_cv_langinfo_codeset=no |
a4db0f07 | 12482 | fi |
81ecdfbb RW |
12483 | rm -f core conftest.err conftest.$ac_objext \ |
12484 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 12485 | |
a4db0f07 | 12486 | fi |
81ecdfbb RW |
12487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12488 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
12489 | if test $am_cv_langinfo_codeset = yes; then |
12490 | ||
81ecdfbb | 12491 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 12492 | |
6c7a06a3 | 12493 | fi |
c906108c | 12494 | |
06825bd1 | 12495 | |
a3828db0 MK |
12496 | # Check the return and argument types of ptrace. No canned test for |
12497 | # this, so roll our own. | |
12498 | gdb_ptrace_headers=' | |
12499 | #if HAVE_SYS_TYPES_H | |
12500 | # include <sys/types.h> | |
12501 | #endif | |
12502 | #if HAVE_SYS_PTRACE_H | |
12503 | # include <sys/ptrace.h> | |
12504 | #endif | |
12505 | #if HAVE_UNISTD_H | |
12506 | # include <unistd.h> | |
12507 | #endif | |
12508 | ' | |
12509 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
12510 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
12511 | " | |
12512 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
12513 | ac_have_decl=1 | |
06825bd1 | 12514 | else |
81ecdfbb | 12515 | ac_have_decl=0 |
06825bd1 | 12516 | fi |
06825bd1 | 12517 | |
a3828db0 | 12518 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12519 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 12520 | _ACEOF |
81ecdfbb | 12521 | if test $ac_have_decl = 1; then : |
bec39cab | 12522 | |
a3828db0 | 12523 | else |
a3828db0 MK |
12524 | |
12525 | : ${gdb_cv_func_ptrace_ret='int'} | |
12526 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12527 | ||
06825bd1 MK |
12528 | fi |
12529 | ||
064ef605 DJ |
12530 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
12531 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
12532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
12533 | $as_echo_n "checking return type of ptrace... " >&6; } | |
12534 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
12535 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12536 | else |
81ecdfbb | 12537 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12538 | /* end confdefs.h. */ |
a3828db0 | 12539 | $gdb_ptrace_headers |
bec39cab AC |
12540 | int |
12541 | main () | |
12542 | { | |
064ef605 DJ |
12543 | extern long ptrace (enum __ptrace_request, ...); |
12544 | ; | |
12545 | return 0; | |
12546 | } | |
12547 | _ACEOF | |
81ecdfbb | 12548 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
12549 | gdb_cv_func_ptrace_ret='long' |
12550 | else | |
81ecdfbb | 12551 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12552 | /* end confdefs.h. */ |
12553 | $gdb_ptrace_headers | |
12554 | int | |
12555 | main () | |
12556 | { | |
a3828db0 | 12557 | extern int ptrace (); |
bec39cab AC |
12558 | ; |
12559 | return 0; | |
12560 | } | |
12561 | _ACEOF | |
81ecdfbb | 12562 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12563 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 12564 | else |
81ecdfbb | 12565 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 12566 | fi |
81ecdfbb | 12567 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 12568 | fi |
81ecdfbb | 12569 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 12570 | fi |
81ecdfbb RW |
12571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
12572 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 12573 | |
a3828db0 MK |
12574 | cat >>confdefs.h <<_ACEOF |
12575 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 12576 | _ACEOF |
70f9f479 | 12577 | |
a3828db0 | 12578 | # Check argument types. |
81ecdfbb RW |
12579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
12580 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
12581 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
12582 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12583 | else |
a3828db0 | 12584 | |
81ecdfbb | 12585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12586 | /* end confdefs.h. */ |
12587 | $gdb_ptrace_headers | |
12588 | int | |
12589 | main () | |
12590 | { | |
12591 | extern long ptrace (enum __ptrace_request, ...); | |
12592 | ; | |
12593 | return 0; | |
12594 | } | |
12595 | _ACEOF | |
81ecdfbb | 12596 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
12597 | gdb_cv_func_ptrace_args='int,int,long,long' |
12598 | else | |
064ef605 | 12599 | |
a3828db0 MK |
12600 | for gdb_arg1 in 'int' 'long'; do |
12601 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 12602 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 12603 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 12604 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12605 | /* end confdefs.h. */ |
a3828db0 | 12606 | $gdb_ptrace_headers |
bec39cab AC |
12607 | int |
12608 | main () | |
12609 | { | |
a3828db0 MK |
12610 | |
12611 | extern $gdb_cv_func_ptrace_ret | |
12612 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
12613 | ||
bec39cab AC |
12614 | ; |
12615 | return 0; | |
12616 | } | |
12617 | _ACEOF | |
81ecdfbb | 12618 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12619 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
12620 | break 4; | |
5c7f2947 | 12621 | fi |
81ecdfbb | 12622 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 12623 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 12624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12625 | /* end confdefs.h. */ |
a3828db0 | 12626 | $gdb_ptrace_headers |
bec39cab AC |
12627 | int |
12628 | main () | |
12629 | { | |
a3828db0 MK |
12630 | |
12631 | extern $gdb_cv_func_ptrace_ret | |
12632 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
12633 | ||
bec39cab AC |
12634 | ; |
12635 | return 0; | |
12636 | } | |
12637 | _ACEOF | |
81ecdfbb | 12638 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12639 | |
12640 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
12641 | break 5; | |
78434e59 | 12642 | fi |
81ecdfbb | 12643 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
12644 | done |
12645 | done | |
12646 | done | |
12647 | done | |
12648 | done | |
12649 | # Provide a safe default value. | |
12650 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12651 | ||
064ef605 | 12652 | fi |
81ecdfbb | 12653 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 12654 | fi |
81ecdfbb RW |
12655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
12656 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
12657 | ac_save_IFS=$IFS; IFS=',' |
12658 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
12659 | IFS=$ac_save_IFS | |
12660 | shift | |
bec39cab | 12661 | |
a3828db0 MK |
12662 | cat >>confdefs.h <<_ACEOF |
12663 | #define PTRACE_TYPE_ARG3 $3 | |
12664 | _ACEOF | |
12665 | ||
12666 | if test -n "$5"; then | |
12667 | ||
12668 | cat >>confdefs.h <<_ACEOF | |
12669 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 12670 | _ACEOF |
78434e59 MK |
12671 | |
12672 | fi | |
12673 | ||
a3828db0 | 12674 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
12675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12676 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12677 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12678 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 12679 | else |
81ecdfbb RW |
12680 | if test "$cross_compiling" = yes; then : |
12681 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 12682 | else |
81ecdfbb | 12683 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12684 | /* end confdefs.h. */ |
81ecdfbb | 12685 | $ac_includes_default |
bec39cab AC |
12686 | int |
12687 | main () | |
12688 | { | |
a3828db0 MK |
12689 | /* If this system has a BSD-style setpgrp which takes arguments, |
12690 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
12691 | exit successfully. */ | |
81ecdfbb | 12692 | return setpgrp (1,1) != -1; |
bec39cab AC |
12693 | ; |
12694 | return 0; | |
12695 | } | |
12696 | _ACEOF | |
81ecdfbb | 12697 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 12698 | ac_cv_func_setpgrp_void=no |
c906108c | 12699 | else |
81ecdfbb | 12700 | ac_cv_func_setpgrp_void=yes |
c906108c | 12701 | fi |
81ecdfbb RW |
12702 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12703 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12704 | fi |
81ecdfbb | 12705 | |
a3828db0 | 12706 | fi |
81ecdfbb RW |
12707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12708 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
12709 | if test $ac_cv_func_setpgrp_void = yes; then |
12710 | ||
81ecdfbb | 12711 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
12712 | |
12713 | fi | |
a3828db0 MK |
12714 | |
12715 | else | |
81ecdfbb RW |
12716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12717 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12718 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12719 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12720 | else |
81ecdfbb | 12721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12722 | /* end confdefs.h. */ |
a3828db0 MK |
12723 | |
12724 | #include <unistd.h> | |
12725 | ||
bec39cab AC |
12726 | int |
12727 | main () | |
12728 | { | |
a3828db0 MK |
12729 | |
12730 | if (setpgrp(1,1) == -1) | |
12731 | exit (0); | |
12732 | else | |
12733 | exit (1); | |
12734 | ||
bec39cab AC |
12735 | ; |
12736 | return 0; | |
12737 | } | |
12738 | _ACEOF | |
81ecdfbb | 12739 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12740 | ac_cv_func_setpgrp_void=no |
c906108c | 12741 | else |
81ecdfbb | 12742 | ac_cv_func_setpgrp_void=yes |
c906108c | 12743 | fi |
81ecdfbb | 12744 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12745 | fi |
81ecdfbb RW |
12746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12747 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 12748 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 12749 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 12750 | |
a3828db0 | 12751 | fi |
c906108c SS |
12752 | fi |
12753 | ||
a3828db0 MK |
12754 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
12755 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
12756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
12757 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
12758 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
12759 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12760 | else |
81ecdfbb | 12761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12762 | /* end confdefs.h. */ |
a3828db0 MK |
12763 | |
12764 | #include <setjmp.h> | |
12765 | ||
bec39cab AC |
12766 | int |
12767 | main () | |
12768 | { | |
a3828db0 | 12769 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
12770 | ; |
12771 | return 0; | |
12772 | } | |
12773 | _ACEOF | |
81ecdfbb | 12774 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12775 | gdb_cv_func_sigsetjmp=yes |
c906108c | 12776 | else |
81ecdfbb | 12777 | gdb_cv_func_sigsetjmp=no |
c906108c | 12778 | fi |
81ecdfbb | 12779 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12780 | fi |
81ecdfbb RW |
12781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
12782 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 12783 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 12784 | |
81ecdfbb | 12785 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 12786 | |
97bf5e38 | 12787 | fi |
c906108c | 12788 | |
a3828db0 MK |
12789 | # Assume we'll default to using the included libiberty regex. |
12790 | gdb_use_included_regex=yes | |
12791 | ||
12792 | # However, if the system regex is GNU regex, then default to *not* | |
12793 | # using the included regex. | |
81ecdfbb RW |
12794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
12795 | $as_echo_n "checking for GNU regex... " >&6; } | |
12796 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
12797 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12798 | else |
81ecdfbb | 12799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12800 | /* end confdefs.h. */ |
a3828db0 | 12801 | #include <gnu-versions.h> |
bec39cab AC |
12802 | int |
12803 | main () | |
12804 | { | |
81ecdfbb RW |
12805 | #define REGEX_INTERFACE_VERSION 1 |
12806 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
12807 | # error "Version mismatch" | |
12808 | #endif | |
5c45e068 MK |
12809 | ; |
12810 | return 0; | |
12811 | } | |
12812 | _ACEOF | |
81ecdfbb RW |
12813 | if ac_fn_c_try_compile "$LINENO"; then : |
12814 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 12815 | else |
81ecdfbb RW |
12816 | gdb_cv_have_gnu_regex=no |
12817 | fi | |
12818 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12819 | fi | |
12820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
12821 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
12822 | if test $gdb_cv_have_gnu_regex = yes; then | |
12823 | gdb_use_included_regex=no | |
5c45e068 | 12824 | fi |
81ecdfbb RW |
12825 | |
12826 | ||
12827 | # Check whether --with-included-regex was given. | |
12828 | if test "${with_included_regex+set}" = set; then : | |
12829 | withval=$with_included_regex; gdb_with_regex=$withval | |
12830 | else | |
12831 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 12832 | fi |
81ecdfbb RW |
12833 | |
12834 | if test "$gdb_with_regex" = yes; then | |
12835 | ||
12836 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
12837 | ||
c906108c | 12838 | fi |
81ecdfbb RW |
12839 | |
12840 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
12841 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
12842 | #include <sys/proc.h> | |
12843 | ||
12844 | " | |
12845 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 12846 | |
5c45e068 | 12847 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 12848 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 12849 | _ACEOF |
c906108c | 12850 | |
5c45e068 | 12851 | |
97bf5e38 | 12852 | fi |
c906108c | 12853 | |
5c45e068 | 12854 | |
a3828db0 | 12855 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
12856 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
12857 | $as_echo_n "checking for struct lwp... " >&6; } | |
12858 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
12859 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12860 | else |
81ecdfbb | 12861 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12862 | /* end confdefs.h. */ |
a3828db0 MK |
12863 | #include <sys/param.h> |
12864 | #include <sys/lwp.h> | |
bec39cab AC |
12865 | int |
12866 | main () | |
12867 | { | |
a3828db0 | 12868 | struct lwp l; |
bec39cab AC |
12869 | ; |
12870 | return 0; | |
12871 | } | |
12872 | _ACEOF | |
81ecdfbb | 12873 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12874 | gdb_cv_struct_lwp=yes |
c906108c | 12875 | else |
81ecdfbb | 12876 | gdb_cv_struct_lwp=no |
c906108c | 12877 | fi |
81ecdfbb | 12878 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12879 | fi |
81ecdfbb RW |
12880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
12881 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 12882 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 12883 | |
81ecdfbb | 12884 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 12885 | |
97bf5e38 | 12886 | fi |
c906108c | 12887 | |
a3828db0 | 12888 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
12889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
12890 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
12891 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
12892 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12893 | else |
81ecdfbb | 12894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12895 | /* end confdefs.h. */ |
a3828db0 MK |
12896 | #include <sys/types.h> |
12897 | #include <machine/reg.h> | |
bec39cab AC |
12898 | int |
12899 | main () | |
12900 | { | |
a3828db0 | 12901 | struct reg r; |
bec39cab AC |
12902 | ; |
12903 | return 0; | |
12904 | } | |
12905 | _ACEOF | |
81ecdfbb | 12906 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12907 | gdb_cv_struct_reg=yes |
27ca5dad | 12908 | else |
81ecdfbb | 12909 | gdb_cv_struct_reg=no |
27ca5dad | 12910 | fi |
81ecdfbb | 12911 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 12912 | fi |
81ecdfbb RW |
12913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
12914 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 12915 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 12916 | |
81ecdfbb | 12917 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
12918 | |
12919 | fi | |
97bf5e38 | 12920 | |
a3828db0 MK |
12921 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
12922 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
12923 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
12924 | " | |
12925 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
12926 | |
12927 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12928 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 12929 | _ACEOF |
3862412b | 12930 | |
5c45e068 | 12931 | |
97bf5e38 | 12932 | fi |
81ecdfbb RW |
12933 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
12934 | " | |
12935 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
12936 | |
12937 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 12938 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 12939 | _ACEOF |
3862412b | 12940 | |
5c45e068 | 12941 | |
97bf5e38 | 12942 | fi |
3862412b | 12943 | |
5c45e068 | 12944 | |
a3828db0 | 12945 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
12946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
12947 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
12948 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
12949 | $as_echo_n "(cached) " >&6 | |
451928c5 | 12950 | else |
81ecdfbb | 12951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12952 | /* end confdefs.h. */ |
a3828db0 | 12953 | #include <sys/ptrace.h> |
bec39cab AC |
12954 | int |
12955 | main () | |
12956 | { | |
a3828db0 | 12957 | PTRACE_GETREGS; |
bec39cab AC |
12958 | ; |
12959 | return 0; | |
12960 | } | |
12961 | _ACEOF | |
81ecdfbb | 12962 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12963 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 12964 | else |
81ecdfbb | 12965 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 12966 | fi |
81ecdfbb | 12967 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
12968 | fi |
12969 | ||
81ecdfbb RW |
12970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
12971 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 12972 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 12973 | |
81ecdfbb | 12974 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 12975 | |
97bf5e38 | 12976 | fi |
451928c5 | 12977 | |
a3828db0 | 12978 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
12979 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
12980 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
12981 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
12982 | $as_echo_n "(cached) " >&6 | |
451928c5 | 12983 | else |
81ecdfbb | 12984 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12985 | /* end confdefs.h. */ |
a3828db0 | 12986 | #include <sys/ptrace.h> |
bec39cab AC |
12987 | int |
12988 | main () | |
12989 | { | |
a3828db0 | 12990 | PTRACE_GETFPXREGS; |
bec39cab AC |
12991 | ; |
12992 | return 0; | |
12993 | } | |
12994 | _ACEOF | |
81ecdfbb | 12995 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12996 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 12997 | else |
81ecdfbb | 12998 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 12999 | fi |
81ecdfbb | 13000 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13001 | fi |
13002 | ||
81ecdfbb RW |
13003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
13004 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 13005 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 13006 | |
81ecdfbb | 13007 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 13008 | |
97bf5e38 | 13009 | fi |
451928c5 | 13010 | |
a3828db0 | 13011 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
13012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
13013 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
13014 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
13015 | $as_echo_n "(cached) " >&6 | |
3862412b | 13016 | else |
81ecdfbb | 13017 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13018 | /* end confdefs.h. */ |
a3828db0 MK |
13019 | #include <sys/types.h> |
13020 | #include <sys/ptrace.h> | |
bec39cab AC |
13021 | int |
13022 | main () | |
13023 | { | |
a3828db0 | 13024 | PT_GETDBREGS; |
bec39cab AC |
13025 | ; |
13026 | return 0; | |
13027 | } | |
13028 | _ACEOF | |
81ecdfbb | 13029 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13030 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 13031 | else |
81ecdfbb | 13032 | gdb_cv_have_pt_getdbregs=no |
3862412b | 13033 | fi |
81ecdfbb | 13034 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13035 | fi |
13036 | ||
81ecdfbb RW |
13037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
13038 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 13039 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 13040 | |
81ecdfbb | 13041 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 13042 | |
97bf5e38 | 13043 | fi |
3862412b | 13044 | |
a3828db0 | 13045 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
13046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
13047 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
13048 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
13049 | $as_echo_n "(cached) " >&6 | |
3862412b | 13050 | else |
81ecdfbb | 13051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13052 | /* end confdefs.h. */ |
a3828db0 MK |
13053 | #include <sys/types.h> |
13054 | #include <sys/ptrace.h> | |
bec39cab AC |
13055 | int |
13056 | main () | |
13057 | { | |
a3828db0 | 13058 | PT_GETXMMREGS; |
bec39cab AC |
13059 | ; |
13060 | return 0; | |
13061 | } | |
13062 | _ACEOF | |
81ecdfbb | 13063 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13064 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 13065 | else |
81ecdfbb | 13066 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 13067 | fi |
81ecdfbb | 13068 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13069 | fi |
13070 | ||
81ecdfbb RW |
13071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
13072 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 13073 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 13074 | |
81ecdfbb | 13075 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 13076 | |
97bf5e38 | 13077 | fi |
3862412b | 13078 | |
eb368090 | 13079 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
13080 | |
13081 | if test "${target}" = "${host}"; then | |
13082 | case "${host}" in | |
97bf5e38 | 13083 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 13084 | |
81ecdfbb | 13085 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
13086 | |
13087 | ;; | |
c162e8c9 | 13088 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 13089 | |
81ecdfbb | 13090 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
13091 | |
13092 | ;; | |
13093 | mips-sgi-irix5*) | |
13094 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 13095 | |
81ecdfbb | 13096 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
13097 | |
13098 | ;; | |
13099 | esac | |
13100 | fi | |
13101 | ||
13102 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
13103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
13104 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
13105 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
13106 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13107 | else |
81ecdfbb | 13108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13109 | /* end confdefs.h. */ |
596c9d4b KB |
13110 | |
13111 | #define _SYSCALL32 | |
d30c5336 JK |
13112 | /* Needed for new procfs interface on sparc-solaris. */ |
13113 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13114 | #include <sys/procfs.h> |
bec39cab AC |
13115 | int |
13116 | main () | |
13117 | { | |
97bf5e38 | 13118 | pstatus_t avar |
bec39cab AC |
13119 | ; |
13120 | return 0; | |
13121 | } | |
13122 | _ACEOF | |
81ecdfbb | 13123 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13124 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 13125 | else |
81ecdfbb | 13126 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 13127 | |
596c9d4b | 13128 | fi |
81ecdfbb | 13129 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13130 | fi |
13131 | ||
97bf5e38 | 13132 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 13133 | |
81ecdfbb | 13134 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
13135 | |
13136 | fi | |
81ecdfbb RW |
13137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
13138 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 13139 | |
81ecdfbb RW |
13140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
13141 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
13142 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
13143 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13144 | else |
81ecdfbb | 13145 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13146 | /* end confdefs.h. */ |
596c9d4b KB |
13147 | |
13148 | #define _SYSCALL32 | |
d30c5336 JK |
13149 | /* Needed for new procfs interface on sparc-solaris. */ |
13150 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13151 | #include <sys/procfs.h> |
bec39cab AC |
13152 | int |
13153 | main () | |
13154 | { | |
97bf5e38 | 13155 | prrun_t avar |
bec39cab AC |
13156 | ; |
13157 | return 0; | |
13158 | } | |
13159 | _ACEOF | |
81ecdfbb | 13160 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13161 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 13162 | else |
81ecdfbb | 13163 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 13164 | |
596c9d4b | 13165 | fi |
81ecdfbb | 13166 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13167 | fi |
13168 | ||
97bf5e38 | 13169 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 13170 | |
81ecdfbb | 13171 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
13172 | |
13173 | fi | |
81ecdfbb RW |
13174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
13175 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 13176 | |
81ecdfbb RW |
13177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
13178 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
13179 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
13180 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13181 | else |
81ecdfbb | 13182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13183 | /* end confdefs.h. */ |
596c9d4b KB |
13184 | |
13185 | #define _SYSCALL32 | |
d30c5336 JK |
13186 | /* Needed for new procfs interface on sparc-solaris. */ |
13187 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13188 | #include <sys/procfs.h> |
bec39cab AC |
13189 | int |
13190 | main () | |
13191 | { | |
97bf5e38 | 13192 | gregset_t avar |
bec39cab AC |
13193 | ; |
13194 | return 0; | |
13195 | } | |
13196 | _ACEOF | |
81ecdfbb | 13197 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13198 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 13199 | else |
81ecdfbb | 13200 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 13201 | |
596c9d4b | 13202 | fi |
81ecdfbb | 13203 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13204 | fi |
13205 | ||
97bf5e38 | 13206 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 13207 | |
81ecdfbb | 13208 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
13209 | |
13210 | fi | |
81ecdfbb RW |
13211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
13212 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 13213 | |
81ecdfbb RW |
13214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
13215 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
13216 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
13217 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 13218 | else |
81ecdfbb | 13219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13220 | /* end confdefs.h. */ |
97bf5e38 MK |
13221 | |
13222 | #define _SYSCALL32 | |
d30c5336 JK |
13223 | /* Needed for new procfs interface on sparc-solaris. */ |
13224 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 13225 | #include <sys/procfs.h> |
bec39cab AC |
13226 | int |
13227 | main () | |
13228 | { | |
97bf5e38 | 13229 | fpregset_t avar |
bec39cab AC |
13230 | ; |
13231 | return 0; | |
13232 | } | |
13233 | _ACEOF | |
81ecdfbb | 13234 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13235 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 13236 | else |
81ecdfbb | 13237 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 13238 | |
d84dd0c5 | 13239 | fi |
81ecdfbb | 13240 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
13241 | fi |
13242 | ||
97bf5e38 | 13243 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 13244 | |
81ecdfbb | 13245 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 13246 | |
97bf5e38 | 13247 | fi |
81ecdfbb RW |
13248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
13249 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 13250 | |
81ecdfbb RW |
13251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
13252 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
13253 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
13254 | $as_echo_n "(cached) " >&6 | |
c906108c | 13255 | else |
81ecdfbb | 13256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13257 | /* end confdefs.h. */ |
c906108c | 13258 | |
97bf5e38 | 13259 | #define _SYSCALL32 |
d30c5336 JK |
13260 | /* Needed for new procfs interface on sparc-solaris. */ |
13261 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13262 | #include <sys/procfs.h> |
bec39cab AC |
13263 | int |
13264 | main () | |
13265 | { | |
97bf5e38 | 13266 | prgregset_t avar |
bec39cab AC |
13267 | ; |
13268 | return 0; | |
13269 | } | |
13270 | _ACEOF | |
81ecdfbb | 13271 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13272 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 13273 | else |
81ecdfbb | 13274 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 13275 | |
c906108c | 13276 | fi |
81ecdfbb | 13277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13278 | fi |
13279 | ||
97bf5e38 | 13280 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 13281 | |
81ecdfbb | 13282 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 13283 | |
97bf5e38 | 13284 | fi |
81ecdfbb RW |
13285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
13286 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 13287 | |
81ecdfbb RW |
13288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
13289 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
13290 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
13291 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13292 | else |
81ecdfbb | 13293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13294 | /* end confdefs.h. */ |
97bf5e38 MK |
13295 | |
13296 | #define _SYSCALL32 | |
d30c5336 JK |
13297 | /* Needed for new procfs interface on sparc-solaris. */ |
13298 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13299 | #include <sys/procfs.h> |
bec39cab AC |
13300 | int |
13301 | main () | |
13302 | { | |
97bf5e38 | 13303 | prfpregset_t avar |
bec39cab AC |
13304 | ; |
13305 | return 0; | |
13306 | } | |
13307 | _ACEOF | |
81ecdfbb | 13308 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13309 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 13310 | else |
81ecdfbb | 13311 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 13312 | |
d45fe813 | 13313 | fi |
81ecdfbb | 13314 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13315 | fi |
13316 | ||
97bf5e38 | 13317 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 13318 | |
81ecdfbb | 13319 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 13320 | |
97bf5e38 | 13321 | fi |
81ecdfbb RW |
13322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
13323 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 13324 | |
81ecdfbb RW |
13325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
13326 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
13327 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
13328 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13329 | else |
81ecdfbb | 13330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13331 | /* end confdefs.h. */ |
97bf5e38 MK |
13332 | |
13333 | #define _SYSCALL32 | |
d30c5336 JK |
13334 | /* Needed for new procfs interface on sparc-solaris. */ |
13335 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13336 | #include <sys/procfs.h> |
bec39cab AC |
13337 | int |
13338 | main () | |
13339 | { | |
97bf5e38 | 13340 | prgregset32_t avar |
bec39cab AC |
13341 | ; |
13342 | return 0; | |
13343 | } | |
13344 | _ACEOF | |
81ecdfbb | 13345 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13346 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 13347 | else |
81ecdfbb | 13348 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 13349 | |
d45fe813 | 13350 | fi |
81ecdfbb | 13351 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13352 | fi |
13353 | ||
97bf5e38 | 13354 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 13355 | |
81ecdfbb | 13356 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 13357 | |
97bf5e38 | 13358 | fi |
81ecdfbb RW |
13359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
13360 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 13361 | |
81ecdfbb RW |
13362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
13363 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
13364 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
13365 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13366 | else |
81ecdfbb | 13367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13368 | /* end confdefs.h. */ |
97bf5e38 MK |
13369 | |
13370 | #define _SYSCALL32 | |
d30c5336 JK |
13371 | /* Needed for new procfs interface on sparc-solaris. */ |
13372 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13373 | #include <sys/procfs.h> |
bec39cab AC |
13374 | int |
13375 | main () | |
13376 | { | |
97bf5e38 | 13377 | prfpregset32_t avar |
bec39cab AC |
13378 | ; |
13379 | return 0; | |
13380 | } | |
13381 | _ACEOF | |
81ecdfbb | 13382 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13383 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 13384 | else |
81ecdfbb | 13385 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 13386 | |
d45fe813 | 13387 | fi |
81ecdfbb | 13388 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13389 | fi |
13390 | ||
97bf5e38 | 13391 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 13392 | |
81ecdfbb | 13393 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 13394 | |
97bf5e38 | 13395 | fi |
81ecdfbb RW |
13396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
13397 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 13398 | |
81ecdfbb RW |
13399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
13400 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
13401 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
13402 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13403 | else |
81ecdfbb | 13404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13405 | /* end confdefs.h. */ |
97bf5e38 | 13406 | |
d45fe813 | 13407 | #define _SYSCALL32 |
d30c5336 JK |
13408 | /* Needed for new procfs interface on sparc-solaris. */ |
13409 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13410 | #include <sys/procfs.h> |
bec39cab AC |
13411 | int |
13412 | main () | |
13413 | { | |
97bf5e38 | 13414 | lwpid_t avar |
bec39cab AC |
13415 | ; |
13416 | return 0; | |
13417 | } | |
13418 | _ACEOF | |
81ecdfbb | 13419 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13420 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 13421 | else |
81ecdfbb | 13422 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 13423 | |
d45fe813 | 13424 | fi |
81ecdfbb | 13425 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13426 | fi |
13427 | ||
97bf5e38 | 13428 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 13429 | |
81ecdfbb | 13430 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 13431 | |
97bf5e38 | 13432 | fi |
81ecdfbb RW |
13433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
13434 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 13435 | |
81ecdfbb RW |
13436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
13437 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
13438 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
13439 | $as_echo_n "(cached) " >&6 | |
c906108c | 13440 | else |
81ecdfbb | 13441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13442 | /* end confdefs.h. */ |
c906108c | 13443 | |
97bf5e38 | 13444 | #define _SYSCALL32 |
d30c5336 JK |
13445 | /* Needed for new procfs interface on sparc-solaris. */ |
13446 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13447 | #include <sys/procfs.h> |
bec39cab AC |
13448 | int |
13449 | main () | |
13450 | { | |
97bf5e38 | 13451 | psaddr_t avar |
bec39cab AC |
13452 | ; |
13453 | return 0; | |
13454 | } | |
13455 | _ACEOF | |
81ecdfbb | 13456 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13457 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 13458 | else |
81ecdfbb | 13459 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 13460 | |
c906108c | 13461 | fi |
81ecdfbb | 13462 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13463 | fi |
13464 | ||
97bf5e38 | 13465 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 13466 | |
81ecdfbb | 13467 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 13468 | |
97bf5e38 | 13469 | fi |
81ecdfbb RW |
13470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
13471 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 13472 | |
81ecdfbb RW |
13473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
13474 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
13475 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
13476 | $as_echo_n "(cached) " >&6 | |
c906108c | 13477 | else |
81ecdfbb | 13478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13479 | /* end confdefs.h. */ |
c906108c | 13480 | |
97bf5e38 | 13481 | #define _SYSCALL32 |
d30c5336 JK |
13482 | /* Needed for new procfs interface on sparc-solaris. */ |
13483 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13484 | #include <sys/procfs.h> |
bec39cab AC |
13485 | int |
13486 | main () | |
13487 | { | |
97bf5e38 | 13488 | prsysent_t avar |
bec39cab AC |
13489 | ; |
13490 | return 0; | |
13491 | } | |
13492 | _ACEOF | |
81ecdfbb | 13493 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13494 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 13495 | else |
81ecdfbb | 13496 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 13497 | |
c906108c | 13498 | fi |
81ecdfbb | 13499 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13500 | fi |
13501 | ||
97bf5e38 | 13502 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 13503 | |
81ecdfbb | 13504 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 13505 | |
97bf5e38 | 13506 | fi |
81ecdfbb RW |
13507 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
13508 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 13509 | |
81ecdfbb RW |
13510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
13511 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
13512 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
13513 | $as_echo_n "(cached) " >&6 | |
c906108c | 13514 | else |
81ecdfbb | 13515 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13516 | /* end confdefs.h. */ |
c906108c | 13517 | |
97bf5e38 | 13518 | #define _SYSCALL32 |
d30c5336 JK |
13519 | /* Needed for new procfs interface on sparc-solaris. */ |
13520 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13521 | #include <sys/procfs.h> |
bec39cab AC |
13522 | int |
13523 | main () | |
13524 | { | |
97bf5e38 | 13525 | pr_sigset_t avar |
bec39cab AC |
13526 | ; |
13527 | return 0; | |
13528 | } | |
13529 | _ACEOF | |
81ecdfbb | 13530 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13531 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 13532 | else |
81ecdfbb | 13533 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 13534 | |
c906108c | 13535 | fi |
81ecdfbb | 13536 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13537 | fi |
13538 | ||
97bf5e38 | 13539 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 13540 | |
81ecdfbb | 13541 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 13542 | |
97bf5e38 | 13543 | fi |
81ecdfbb RW |
13544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
13545 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 13546 | |
81ecdfbb RW |
13547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
13548 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
13549 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
13550 | $as_echo_n "(cached) " >&6 | |
c906108c | 13551 | else |
81ecdfbb | 13552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13553 | /* end confdefs.h. */ |
c906108c | 13554 | |
97bf5e38 | 13555 | #define _SYSCALL32 |
d30c5336 JK |
13556 | /* Needed for new procfs interface on sparc-solaris. */ |
13557 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13558 | #include <sys/procfs.h> |
bec39cab AC |
13559 | int |
13560 | main () | |
13561 | { | |
97bf5e38 | 13562 | pr_sigaction64_t avar |
bec39cab AC |
13563 | ; |
13564 | return 0; | |
13565 | } | |
13566 | _ACEOF | |
81ecdfbb | 13567 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13568 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 13569 | else |
81ecdfbb | 13570 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 13571 | |
c906108c | 13572 | fi |
81ecdfbb | 13573 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13574 | fi |
13575 | ||
97bf5e38 | 13576 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 13577 | |
81ecdfbb | 13578 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 13579 | |
97bf5e38 | 13580 | fi |
81ecdfbb RW |
13581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
13582 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 13583 | |
81ecdfbb RW |
13584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
13585 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
13586 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
13587 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13588 | else |
81ecdfbb | 13589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13590 | /* end confdefs.h. */ |
97bf5e38 MK |
13591 | |
13592 | #define _SYSCALL32 | |
d30c5336 JK |
13593 | /* Needed for new procfs interface on sparc-solaris. */ |
13594 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13595 | #include <sys/procfs.h> |
bec39cab AC |
13596 | int |
13597 | main () | |
13598 | { | |
97bf5e38 | 13599 | pr_siginfo64_t avar |
bec39cab AC |
13600 | ; |
13601 | return 0; | |
13602 | } | |
13603 | _ACEOF | |
81ecdfbb | 13604 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13605 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
13606 | else | |
81ecdfbb | 13607 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 13608 | |
97bf5e38 | 13609 | fi |
81ecdfbb | 13610 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13611 | fi |
c906108c | 13612 | |
97bf5e38 | 13613 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 13614 | |
81ecdfbb | 13615 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 13616 | |
97bf5e38 | 13617 | fi |
81ecdfbb RW |
13618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
13619 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
13620 | |
13621 | ||
97bf5e38 MK |
13622 | |
13623 | ||
13624 | ||
97bf5e38 | 13625 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
13626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
13627 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
13628 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
13629 | $as_echo_n "(cached) " >&6 | |
c906108c | 13630 | else |
81ecdfbb | 13631 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 13632 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 13633 | else |
81ecdfbb | 13634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13635 | /* end confdefs.h. */ |
97bf5e38 MK |
13636 | #include <sys/procfs.h> |
13637 | int main () | |
13638 | { | |
13639 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
13640 | return 1; | |
13641 | return 0; | |
13642 | } | |
bec39cab | 13643 | _ACEOF |
81ecdfbb | 13644 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 13645 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
13646 | else |
13647 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 13648 | fi |
81ecdfbb RW |
13649 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13650 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 13651 | fi |
81ecdfbb | 13652 | |
c906108c SS |
13653 | fi |
13654 | ||
81ecdfbb RW |
13655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
13656 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 13657 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 13658 | |
81ecdfbb | 13659 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 13660 | |
97bf5e38 MK |
13661 | fi |
13662 | fi | |
c906108c | 13663 | |
bec39cab | 13664 | |
81ecdfbb RW |
13665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
13666 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
13667 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
13668 | $as_echo_n "(cached) " >&6 | |
c906108c | 13669 | else |
81ecdfbb | 13670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13671 | /* end confdefs.h. */ |
97bf5e38 MK |
13672 | #include <unistd.h> |
13673 | #include <sys/types.h> | |
13674 | #include <sys/procfs.h> | |
13675 | ||
bec39cab AC |
13676 | int |
13677 | main () | |
13678 | { | |
97bf5e38 MK |
13679 | |
13680 | int dummy;; | |
13681 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
13682 | |
13683 | ; | |
13684 | return 0; | |
13685 | } | |
13686 | _ACEOF | |
81ecdfbb | 13687 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13688 | gdb_cv_have_procfs_piocset=yes |
c906108c | 13689 | else |
81ecdfbb | 13690 | gdb_cv_have_procfs_piocset=no |
c906108c | 13691 | fi |
81ecdfbb | 13692 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13693 | fi |
97bf5e38 | 13694 | |
81ecdfbb RW |
13695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
13696 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 13697 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 13698 | |
81ecdfbb | 13699 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
13700 | |
13701 | fi | |
c906108c | 13702 | fi |
c906108c | 13703 | |
97bf5e38 | 13704 | if test ${host} = ${target} ; then |
bec39cab | 13705 | |
81ecdfbb RW |
13706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
13707 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
13708 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
13709 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13710 | else |
81ecdfbb | 13711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13712 | /* end confdefs.h. */ |
97bf5e38 | 13713 | #include <link.h> |
bec39cab AC |
13714 | int |
13715 | main () | |
13716 | { | |
97bf5e38 | 13717 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
13718 | ; |
13719 | return 0; | |
13720 | } | |
13721 | _ACEOF | |
81ecdfbb | 13722 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13723 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 13724 | else |
81ecdfbb | 13725 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 13726 | fi |
81ecdfbb | 13727 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13728 | fi |
13729 | ||
81ecdfbb RW |
13730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
13731 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 13732 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 13733 | |
81ecdfbb | 13734 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
13735 | |
13736 | fi | |
13737 | ||
bec39cab | 13738 | |
81ecdfbb RW |
13739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
13740 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
13741 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
13742 | $as_echo_n "(cached) " >&6 | |
c906108c | 13743 | else |
81ecdfbb | 13744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13745 | /* end confdefs.h. */ |
97bf5e38 MK |
13746 | #include <sys/types.h> |
13747 | #include <link.h> | |
bec39cab AC |
13748 | int |
13749 | main () | |
13750 | { | |
97bf5e38 | 13751 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
13752 | ; |
13753 | return 0; | |
13754 | } | |
13755 | _ACEOF | |
81ecdfbb | 13756 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13757 | gdb_cv_have_struct_link_map_with_lm_members=yes |
13758 | else | |
81ecdfbb | 13759 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 13760 | fi |
81ecdfbb | 13761 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13762 | fi |
c906108c | 13763 | |
81ecdfbb RW |
13764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
13765 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 13766 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 13767 | |
81ecdfbb | 13768 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
13769 | |
13770 | fi | |
13771 | ||
bec39cab | 13772 | |
81ecdfbb RW |
13773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
13774 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
13775 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
13776 | $as_echo_n "(cached) " >&6 | |
c906108c | 13777 | else |
81ecdfbb | 13778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13779 | /* end confdefs.h. */ |
97bf5e38 MK |
13780 | #include <sys/types.h> |
13781 | #ifdef HAVE_NLIST_H | |
13782 | #include <nlist.h> | |
13783 | #endif | |
13784 | #include <link.h> | |
bec39cab AC |
13785 | int |
13786 | main () | |
13787 | { | |
97bf5e38 | 13788 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
13789 | ; |
13790 | return 0; | |
13791 | } | |
13792 | _ACEOF | |
81ecdfbb | 13793 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13794 | gdb_cv_have_struct_so_map_with_som_members=yes |
13795 | else | |
81ecdfbb | 13796 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 13797 | fi |
81ecdfbb | 13798 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13799 | fi |
c906108c | 13800 | |
81ecdfbb RW |
13801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
13802 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 13803 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 13804 | |
81ecdfbb | 13805 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 13806 | |
97bf5e38 | 13807 | fi |
c906108c | 13808 | |
bec39cab | 13809 | |
81ecdfbb RW |
13810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
13811 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
13812 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
13813 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13814 | else |
81ecdfbb | 13815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13816 | /* end confdefs.h. */ |
97bf5e38 MK |
13817 | #define _SYSCALL32 |
13818 | #include <sys/link.h> | |
bec39cab AC |
13819 | int |
13820 | main () | |
13821 | { | |
97bf5e38 | 13822 | struct link_map32 l; |
bec39cab AC |
13823 | ; |
13824 | return 0; | |
13825 | } | |
13826 | _ACEOF | |
81ecdfbb | 13827 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13828 | gdb_cv_have_struct_link_map32=yes |
13829 | else | |
81ecdfbb | 13830 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 13831 | fi |
81ecdfbb | 13832 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13833 | fi |
c906108c | 13834 | |
81ecdfbb RW |
13835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
13836 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 13837 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 13838 | |
81ecdfbb | 13839 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 13840 | |
60ca704f | 13841 | |
81ecdfbb | 13842 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 13843 | |
97bf5e38 MK |
13844 | fi |
13845 | fi | |
c906108c | 13846 | |
bc8bcb4b | 13847 | # Check if the compiler supports the `long long' type. |
c906108c | 13848 | |
81ecdfbb RW |
13849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
13850 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
13851 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
13852 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13853 | else |
81ecdfbb | 13854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13855 | /* end confdefs.h. */ |
bc8bcb4b | 13856 | extern long long foo; |
bec39cab AC |
13857 | int |
13858 | main () | |
13859 | { | |
bc8bcb4b | 13860 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
13861 | ; |
13862 | return 0; | |
13863 | } | |
13864 | _ACEOF | |
81ecdfbb | 13865 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13866 | gdb_cv_c_long_long=yes |
13867 | else | |
81ecdfbb | 13868 | gdb_cv_c_long_long=no |
97bf5e38 | 13869 | fi |
81ecdfbb | 13870 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13871 | fi |
81ecdfbb RW |
13872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
13873 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 13874 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 13875 | |
81ecdfbb | 13876 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
13877 | |
13878 | fi | |
13879 | ||
bc8bcb4b | 13880 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 13881 | |
81ecdfbb RW |
13882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
13883 | $as_echo_n "checking for long long support in printf... " >&6; } | |
13884 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
13885 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13886 | else |
81ecdfbb | 13887 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
13888 | gdb_cv_printf_has_long_long=no |
13889 | else | |
81ecdfbb | 13890 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13891 | /* end confdefs.h. */ |
bc8bcb4b MK |
13892 | $ac_includes_default |
13893 | int | |
13894 | main () | |
13895 | { | |
13896 | char buf[32]; | |
97bf5e38 MK |
13897 | long long l = 0; |
13898 | l = (l << 16) + 0x0123; | |
13899 | l = (l << 16) + 0x4567; | |
13900 | l = (l << 16) + 0x89ab; | |
13901 | l = (l << 16) + 0xcdef; | |
13902 | sprintf (buf, "0x%016llx", l); | |
13903 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
13904 | ; |
13905 | return 0; | |
c906108c | 13906 | } |
bec39cab | 13907 | _ACEOF |
81ecdfbb | 13908 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
13909 | gdb_cv_printf_has_long_long=yes |
13910 | else | |
81ecdfbb | 13911 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 13912 | fi |
81ecdfbb RW |
13913 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13914 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13915 | fi |
81ecdfbb | 13916 | |
97bf5e38 | 13917 | fi |
81ecdfbb RW |
13918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
13919 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 13920 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 13921 | |
81ecdfbb | 13922 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
13923 | |
13924 | fi | |
97bf5e38 | 13925 | |
1a619819 LM |
13926 | # Check if the compiler and runtime support printing decfloats. |
13927 | ||
81ecdfbb RW |
13928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
13929 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
13930 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
13931 | $as_echo_n "(cached) " >&6 | |
1a619819 | 13932 | else |
81ecdfbb | 13933 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
13934 | gdb_cv_printf_has_decfloat=no |
13935 | else | |
81ecdfbb | 13936 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
13937 | /* end confdefs.h. */ |
13938 | $ac_includes_default | |
13939 | int | |
13940 | main () | |
13941 | { | |
13942 | char buf[64]; | |
13943 | _Decimal32 d32 = 1.2345df; | |
13944 | _Decimal64 d64 = 1.2345dd; | |
13945 | _Decimal128 d128 = 1.2345dl; | |
13946 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
13947 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
13948 | ; | |
13949 | return 0; | |
13950 | } | |
13951 | _ACEOF | |
81ecdfbb | 13952 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
13953 | gdb_cv_printf_has_decfloat=yes |
13954 | else | |
81ecdfbb | 13955 | gdb_cv_printf_has_decfloat=no |
1a619819 | 13956 | fi |
81ecdfbb RW |
13957 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13958 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 13959 | fi |
81ecdfbb | 13960 | |
1a619819 | 13961 | fi |
81ecdfbb RW |
13962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
13963 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
13964 | if test $gdb_cv_printf_has_decfloat = yes; then |
13965 | ||
81ecdfbb | 13966 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
13967 | |
13968 | fi | |
13969 | ||
bc8bcb4b MK |
13970 | # Check if the compiler supports the `long double' type. We can't use |
13971 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
13972 | # constants defined in <float.h> that fail on some systems, | |
13973 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 13974 | |
81ecdfbb RW |
13975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
13976 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
13977 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
13978 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13979 | else |
81ecdfbb | 13980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13981 | /* end confdefs.h. */ |
97bf5e38 | 13982 | long double foo; |
bec39cab | 13983 | _ACEOF |
81ecdfbb | 13984 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 13985 | gdb_cv_c_long_double=yes |
97bf5e38 | 13986 | else |
81ecdfbb | 13987 | gdb_cv_c_long_double=no |
97bf5e38 | 13988 | fi |
81ecdfbb | 13989 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13990 | fi |
81ecdfbb RW |
13991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
13992 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 13993 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 13994 | |
81ecdfbb | 13995 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
13996 | |
13997 | fi | |
13998 | ||
bc8bcb4b | 13999 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14000 | |
81ecdfbb RW |
14001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14002 | $as_echo_n "checking for long double support in printf... " >&6; } | |
14003 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
14004 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14005 | else |
81ecdfbb | 14006 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14007 | gdb_cv_printf_has_long_double=no |
14008 | else | |
81ecdfbb | 14009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14010 | /* end confdefs.h. */ |
bc8bcb4b MK |
14011 | $ac_includes_default |
14012 | int | |
14013 | main () | |
14014 | { | |
14015 | char buf[16]; | |
97bf5e38 MK |
14016 | long double f = 3.141592653; |
14017 | sprintf (buf, "%Lg", f); | |
14018 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14019 | ; |
14020 | return 0; | |
97bf5e38 | 14021 | } |
bec39cab | 14022 | _ACEOF |
81ecdfbb | 14023 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14024 | gdb_cv_printf_has_long_double=yes |
c906108c | 14025 | else |
81ecdfbb | 14026 | gdb_cv_printf_has_long_double=no |
c906108c | 14027 | fi |
81ecdfbb RW |
14028 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14029 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14030 | fi |
81ecdfbb | 14031 | |
c906108c | 14032 | fi |
81ecdfbb RW |
14033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14034 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14035 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14036 | |
81ecdfbb | 14037 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14038 | |
14039 | fi | |
97bf5e38 | 14040 | |
bc8bcb4b | 14041 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14042 | |
81ecdfbb RW |
14043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14044 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
14045 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
14046 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14047 | else |
81ecdfbb | 14048 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14049 | gdb_cv_scanf_has_long_double=no |
14050 | else | |
81ecdfbb | 14051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14052 | /* end confdefs.h. */ |
bc8bcb4b MK |
14053 | #include <stdio.h> |
14054 | int | |
14055 | main () | |
14056 | { | |
14057 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14058 | long double f = 0; |
14059 | sscanf (buf, "%Lg", &f); | |
14060 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14061 | ; |
14062 | return 0; | |
97bf5e38 | 14063 | } |
bec39cab | 14064 | _ACEOF |
81ecdfbb | 14065 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14066 | gdb_cv_scanf_has_long_double=yes |
14067 | else | |
81ecdfbb | 14068 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14069 | fi |
81ecdfbb RW |
14070 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14071 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14072 | fi |
81ecdfbb | 14073 | |
c906108c | 14074 | fi |
81ecdfbb RW |
14075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14076 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14077 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14078 | |
81ecdfbb | 14079 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14080 | |
14081 | fi | |
c906108c | 14082 | |
438013df AO |
14083 | case ${host_os} in |
14084 | aix*) | |
81ecdfbb RW |
14085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14086 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
14087 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
14088 | $as_echo_n "(cached) " >&6 | |
438013df | 14089 | else |
bec39cab | 14090 | |
438013df AO |
14091 | SAVE_LDFLAGS=$LDFLAGS |
14092 | ||
14093 | case $GCC in | |
14094 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14095 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14096 | esac | |
14097 | ||
14098 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14100 | /* end confdefs.h. */ |
438013df | 14101 | |
bec39cab AC |
14102 | int |
14103 | main () | |
14104 | { | |
438013df | 14105 | int i; |
bec39cab AC |
14106 | ; |
14107 | return 0; | |
14108 | } | |
14109 | _ACEOF | |
81ecdfbb | 14110 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14111 | |
81ecdfbb RW |
14112 | else |
14113 | gdb_cv_bigtoc= | |
438013df | 14114 | fi |
81ecdfbb RW |
14115 | rm -f core conftest.err conftest.$ac_objext \ |
14116 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 14117 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 14118 | |
bec39cab | 14119 | fi |
81ecdfbb RW |
14120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
14121 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
14122 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
14123 | ;; | |
14124 | esac | |
14125 | ||
c906108c SS |
14126 | |
14127 | ||
14128 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
14129 | case ${host_os} in | |
14130 | hpux*) | |
81ecdfbb RW |
14131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5 |
14132 | $as_echo_n "checking for HPUX/OSF thread support... " >&6; } | |
c906108c SS |
14133 | if test -f /usr/include/dce/cma_config.h ; then |
14134 | if test "$GCC" = "yes" ; then | |
81ecdfbb RW |
14135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14136 | $as_echo "yes" >&6; } | |
60ca704f | 14137 | |
81ecdfbb | 14138 | $as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h |
c906108c | 14139 | |
3483b318 | 14140 | CONFIG_OBS="${CONFIG_OBS} hpux-thread.o" |
c906108c SS |
14141 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
14142 | else | |
81ecdfbb RW |
14143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5 |
14144 | $as_echo "no (suppressed because you are not using GCC)" >&6; } | |
c906108c SS |
14145 | fi |
14146 | else | |
81ecdfbb RW |
14147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14148 | $as_echo "no" >&6; } | |
c906108c SS |
14149 | fi |
14150 | ;; | |
14151 | solaris*) | |
d92419e5 JB |
14152 | # See if thread_db library is around for Solaris thread debugging. |
14153 | # Note that we must explicitly test for version 1 of the library | |
14154 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
14155 | # the same API. | |
81ecdfbb RW |
14156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
14157 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 14158 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
14159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14160 | $as_echo "yes" >&6; } | |
60ca704f | 14161 | |
81ecdfbb | 14162 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 14163 | |
3483b318 | 14164 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 14165 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
14166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
14167 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
14168 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
14169 | $as_echo_n "(cached) " >&6 | |
c906108c | 14170 | else |
bec39cab | 14171 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 14172 | LIBS="-ldl $LIBS" |
81ecdfbb | 14173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
14174 | /* end confdefs.h. */ |
14175 | ||
81ecdfbb RW |
14176 | /* Override any GCC internal prototype to avoid an error. |
14177 | Use char because int might match the return type of a GCC | |
14178 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
14179 | #ifdef __cplusplus |
14180 | extern "C" | |
14181 | #endif | |
bec39cab AC |
14182 | char dlopen (); |
14183 | int | |
14184 | main () | |
14185 | { | |
81ecdfbb | 14186 | return dlopen (); |
bec39cab AC |
14187 | ; |
14188 | return 0; | |
14189 | } | |
14190 | _ACEOF | |
81ecdfbb | 14191 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
14192 | ac_cv_lib_dl_dlopen=yes |
14193 | else | |
81ecdfbb | 14194 | ac_cv_lib_dl_dlopen=no |
bec39cab | 14195 | fi |
81ecdfbb RW |
14196 | rm -f core conftest.err conftest.$ac_objext \ |
14197 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
14198 | LIBS=$ac_check_lib_save_LIBS |
14199 | fi | |
81ecdfbb RW |
14200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
14201 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
14202 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
14203 | cat >>confdefs.h <<_ACEOF |
14204 | #define HAVE_LIBDL 1 | |
14205 | _ACEOF | |
c906108c SS |
14206 | |
14207 | LIBS="-ldl $LIBS" | |
14208 | ||
c906108c SS |
14209 | fi |
14210 | ||
14211 | if test "$GCC" = "yes" ; then | |
14212 | # The GNU linker requires the -export-dynamic option to make | |
14213 | # all symbols visible in the dynamic symbol table. | |
14214 | hold_ldflags=$LDFLAGS | |
81ecdfbb RW |
14215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5 |
14216 | $as_echo_n "checking for the ld -export-dynamic flag... " >&6; } | |
c906108c | 14217 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
81ecdfbb | 14218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14219 | /* end confdefs.h. */ |
c906108c | 14220 | |
bec39cab AC |
14221 | int |
14222 | main () | |
14223 | { | |
c906108c | 14224 | int i; |
bec39cab AC |
14225 | ; |
14226 | return 0; | |
14227 | } | |
14228 | _ACEOF | |
81ecdfbb | 14229 | if ac_fn_c_try_link "$LINENO"; then : |
c906108c SS |
14230 | found=yes |
14231 | else | |
81ecdfbb | 14232 | found=no |
c906108c | 14233 | fi |
81ecdfbb RW |
14234 | rm -f core conftest.err conftest.$ac_objext \ |
14235 | conftest$ac_exeext conftest.$ac_ext | |
c906108c | 14236 | LDFLAGS=$hold_ldflags |
81ecdfbb RW |
14237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
14238 | $as_echo "$found" >&6; } | |
c906108c SS |
14239 | if test $found = yes; then |
14240 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
14241 | fi | |
14242 | fi | |
14243 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
14244 | # at one point. | |
81ecdfbb RW |
14245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
14246 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
14247 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
14248 | $as_echo_n "(cached) " >&6 | |
c906108c | 14249 | else |
bec39cab | 14250 | |
81ecdfbb | 14251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14252 | /* end confdefs.h. */ |
c906108c SS |
14253 | |
14254 | #include <proc_service.h> | |
14255 | ps_err_e ps_pdwrite | |
14256 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 14257 | |
bec39cab AC |
14258 | int |
14259 | main () | |
14260 | { | |
14261 | ||
14262 | ; | |
14263 | return 0; | |
14264 | } | |
14265 | _ACEOF | |
81ecdfbb | 14266 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
14267 | gdb_cv_proc_service_is_old=no |
14268 | else | |
81ecdfbb | 14269 | gdb_cv_proc_service_is_old=yes |
c906108c | 14270 | fi |
81ecdfbb | 14271 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 14272 | |
c906108c SS |
14273 | fi |
14274 | ||
81ecdfbb RW |
14275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
14276 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 14277 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 14278 | |
81ecdfbb | 14279 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
14280 | |
14281 | fi | |
14282 | else | |
81ecdfbb RW |
14283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14284 | $as_echo "no" >&6; } | |
c906108c SS |
14285 | fi |
14286 | ;; | |
d92419e5 | 14287 | aix*) |
81ecdfbb RW |
14288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
14289 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
14290 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
14291 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14292 | else |
81ecdfbb | 14293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14294 | /* end confdefs.h. */ |
d92419e5 | 14295 | #include <sys/pthdebug.h> |
bec39cab AC |
14296 | int |
14297 | main () | |
14298 | { | |
d92419e5 JB |
14299 | #ifndef PTHDB_VERSION_3 |
14300 | #error | |
14301 | #endif | |
bec39cab AC |
14302 | ; |
14303 | return 0; | |
14304 | } | |
14305 | _ACEOF | |
81ecdfbb | 14306 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
14307 | gdb_cv_have_aix_thread_debug=yes |
14308 | else | |
81ecdfbb | 14309 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 14310 | fi |
81ecdfbb | 14311 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
14312 | fi |
14313 | ||
81ecdfbb RW |
14314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
14315 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
14316 | if test $gdb_cv_have_aix_thread_debug = yes; then |
14317 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 14318 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
14319 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
14320 | fi | |
14321 | ;; | |
c906108c | 14322 | esac |
bec39cab | 14323 | |
c906108c SS |
14324 | fi |
14325 | ||
3f47be5c | 14326 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
14327 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
14328 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
14329 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
14330 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14331 | else |
81ecdfbb | 14332 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14333 | /* end confdefs.h. */ |
3f47be5c | 14334 | #include <thread_db.h> |
bec39cab AC |
14335 | int |
14336 | main () | |
14337 | { | |
3f47be5c | 14338 | int i = TD_NOTALLOC; |
bec39cab AC |
14339 | ; |
14340 | return 0; | |
14341 | } | |
14342 | _ACEOF | |
81ecdfbb | 14343 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
14344 | gdb_cv_thread_db_h_has_td_notalloc=yes |
14345 | else | |
81ecdfbb | 14346 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 14347 | |
3f47be5c | 14348 | fi |
81ecdfbb | 14349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 14350 | |
bec39cab | 14351 | fi |
81ecdfbb RW |
14352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
14353 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
14354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
14355 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
14356 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
14357 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14358 | else |
81ecdfbb | 14359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14360 | /* end confdefs.h. */ |
14361 | #include <thread_db.h> | |
14362 | int | |
14363 | main () | |
14364 | { | |
14365 | int i = TD_VERSION; | |
14366 | ; | |
14367 | return 0; | |
14368 | } | |
14369 | _ACEOF | |
81ecdfbb | 14370 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14371 | gdb_cv_thread_db_h_has_td_version=yes |
14372 | else | |
81ecdfbb | 14373 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
14374 | |
14375 | fi | |
81ecdfbb | 14376 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14377 | |
14378 | fi | |
81ecdfbb RW |
14379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
14380 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
14381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
14382 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
14383 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
14384 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14385 | else |
81ecdfbb | 14386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14387 | /* end confdefs.h. */ |
14388 | #include <thread_db.h> | |
14389 | int | |
14390 | main () | |
14391 | { | |
14392 | int i = TD_NOTLS; | |
14393 | ; | |
14394 | return 0; | |
14395 | } | |
14396 | _ACEOF | |
81ecdfbb | 14397 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14398 | gdb_cv_thread_db_h_has_td_notls=yes |
14399 | else | |
81ecdfbb | 14400 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
14401 | |
14402 | fi | |
81ecdfbb | 14403 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14404 | |
14405 | fi | |
81ecdfbb RW |
14406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
14407 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
14408 | fi |
14409 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 14410 | |
81ecdfbb | 14411 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 14412 | |
59f80f10 DJ |
14413 | fi |
14414 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
14415 | ||
81ecdfbb | 14416 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
14417 | |
14418 | fi | |
14419 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
14420 | ||
81ecdfbb | 14421 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 14422 | |
3f47be5c EZ |
14423 | fi |
14424 | ||
b757528f | 14425 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
14426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
14427 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
14428 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
14429 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14430 | else |
81ecdfbb | 14431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14432 | /* end confdefs.h. */ |
b757528f | 14433 | #include <sys/syscall.h> |
bec39cab AC |
14434 | int |
14435 | main () | |
14436 | { | |
b757528f | 14437 | int i = __NR_tkill; |
bec39cab AC |
14438 | ; |
14439 | return 0; | |
14440 | } | |
14441 | _ACEOF | |
81ecdfbb | 14442 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
14443 | gdb_cv_sys_syscall_h_has_tkill=yes |
14444 | else | |
81ecdfbb | 14445 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 14446 | |
b757528f | 14447 | fi |
81ecdfbb | 14448 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 14449 | |
bec39cab | 14450 | fi |
81ecdfbb RW |
14451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
14452 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
14453 | fi |
14454 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 14455 | |
81ecdfbb | 14456 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
14457 | |
14458 | fi | |
14459 | ||
81ecdfbb RW |
14460 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
14461 | " | |
14462 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
14463 | ac_have_decl=1 | |
10568435 | 14464 | else |
81ecdfbb | 14465 | ac_have_decl=0 |
10568435 | 14466 | fi |
10568435 JK |
14467 | |
14468 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 14469 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
14470 | _ACEOF |
14471 | ||
14472 | ||
81ecdfbb RW |
14473 | if test "$cross_compiling" = yes; then : |
14474 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
14475 | /* end confdefs.h. */ |
14476 | #include <sys/personality.h> | |
14477 | int | |
14478 | main () | |
14479 | { | |
14480 | ||
14481 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14482 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14483 | # endif | |
14484 | /* Test the flag could be set and stays set. */ | |
14485 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14486 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14487 | return 1 | |
14488 | ; | |
14489 | return 0; | |
14490 | } | |
14491 | _ACEOF | |
81ecdfbb | 14492 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
14493 | have_personality=true |
14494 | else | |
81ecdfbb | 14495 | have_personality=false |
10568435 | 14496 | fi |
81ecdfbb RW |
14497 | rm -f core conftest.err conftest.$ac_objext \ |
14498 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 14499 | else |
81ecdfbb | 14500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
14501 | /* end confdefs.h. */ |
14502 | #include <sys/personality.h> | |
14503 | int | |
14504 | main () | |
14505 | { | |
14506 | ||
14507 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14508 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14509 | # endif | |
14510 | /* Test the flag could be set and stays set. */ | |
14511 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14512 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14513 | return 1 | |
14514 | ; | |
14515 | return 0; | |
14516 | } | |
14517 | _ACEOF | |
81ecdfbb | 14518 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
14519 | have_personality=true |
14520 | else | |
81ecdfbb | 14521 | have_personality=false |
10568435 | 14522 | fi |
81ecdfbb RW |
14523 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14524 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 14525 | fi |
81ecdfbb | 14526 | |
10568435 JK |
14527 | if $have_personality |
14528 | then | |
14529 | ||
81ecdfbb | 14530 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
14531 | |
14532 | fi | |
14533 | ||
fb40c209 | 14534 | |
b14b1491 | 14535 | target_sysroot_reloc=0 |
bec39cab | 14536 | |
81ecdfbb RW |
14537 | # Check whether --with-sysroot was given. |
14538 | if test "${with_sysroot+set}" = set; then : | |
14539 | withval=$with_sysroot; | |
030292b7 | 14540 | case ${with_sysroot} in |
715d1656 | 14541 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
14542 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
14543 | esac | |
14544 | ||
14545 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
14546 | ||
07abfebf RS |
14547 | if test "x$prefix" = xNONE; then |
14548 | test_prefix=/usr/local | |
14549 | else | |
14550 | test_prefix=$prefix | |
14551 | fi | |
aa28a74e | 14552 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
07abfebf | 14553 | test_exec_prefix=$test_prefix |
030292b7 | 14554 | else |
07abfebf | 14555 | test_exec_prefix=$exec_prefix |
030292b7 DJ |
14556 | fi |
14557 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 | 14558 | "${test_prefix}"|"${test_prefix}/"*|\ |
07abfebf RS |
14559 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
14560 | '${prefix}'|'${prefix}/'*|\ | |
715d1656 | 14561 | '${exec_prefix}'|'${exec_prefix}/'*) |
b14b1491 | 14562 | target_sysroot_reloc=1 |
030292b7 DJ |
14563 | ;; |
14564 | esac | |
14565 | ||
14566 | else | |
bec39cab | 14567 | |
030292b7 DJ |
14568 | TARGET_SYSTEM_ROOT= |
14569 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
14570 | ||
81ecdfbb | 14571 | fi |
b14b1491 | 14572 | |
81ecdfbb | 14573 | TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc" |
030292b7 DJ |
14574 | |
14575 | ||
14576 | ||
16e7150e | 14577 | |
16e7150e | 14578 | |
81ecdfbb RW |
14579 | # Check whether --with-system-gdbinit was given. |
14580 | if test "${with_system_gdbinit+set}" = set; then : | |
14581 | withval=$with_system_gdbinit; | |
b14b1491 TT |
14582 | SYSTEM_GDBINIT=$withval |
14583 | else | |
14584 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
14585 | fi |
14586 | ||
16e7150e JG |
14587 | |
14588 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
14589 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 14590 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
14591 | ac_define_dir=`eval echo $ac_define_dir` |
14592 | ||
14593 | cat >>confdefs.h <<_ACEOF | |
14594 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
14595 | _ACEOF | |
14596 | ||
14597 | ||
14598 | ||
b14b1491 TT |
14599 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
14600 | if test "x$prefix" = xNONE; then | |
14601 | test_prefix=/usr/local | |
14602 | else | |
14603 | test_prefix=$prefix | |
14604 | fi | |
14605 | else | |
14606 | test_prefix=$exec_prefix | |
14607 | fi | |
14608 | value=0 | |
14609 | case ${ac_define_dir} in | |
14610 | "${test_prefix}"|"${test_prefix}/"*|\ | |
14611 | '${exec_prefix}'|'${exec_prefix}/'*) | |
14612 | value=1 | |
14613 | ;; | |
14614 | esac | |
16e7150e | 14615 | |
b14b1491 TT |
14616 | cat >>confdefs.h <<_ACEOF |
14617 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
14618 | _ACEOF |
14619 | ||
b14b1491 | 14620 | |
16e7150e | 14621 | |
81ecdfbb RW |
14622 | # Check whether --enable-werror was given. |
14623 | if test "${enable_werror+set}" = set; then : | |
14624 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
14625 | yes | y) ERROR_ON_WARNING="yes" ;; |
14626 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 14627 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 14628 | esac |
81ecdfbb RW |
14629 | fi |
14630 | ||
094a342e MK |
14631 | |
14632 | # Enable -Werror by default when using gcc | |
14633 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
14634 | ERROR_ON_WARNING=yes | |
14635 | fi | |
14636 | ||
14637 | WERROR_CFLAGS="" | |
14638 | if test "${ERROR_ON_WARNING}" = yes ; then | |
14639 | WERROR_CFLAGS="-Werror" | |
14640 | fi | |
14641 | ||
aa79a185 DJ |
14642 | # The entries after -Wno-pointer-sign are disabled warnings which may |
14643 | # be enabled in the future, which can not currently be used to build | |
14644 | # GDB. | |
14645 | # NOTE: If you change this list, remember to update | |
3b851bce | 14646 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
14647 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
14648 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 JB |
14649 | -Wno-unused -Wunused-value -Wunused-function \ |
14650 | -Wno-switch -Wno-char-subscripts" | |
a3b362c4 | 14651 | |
3526781e DJ |
14652 | # Enable -Wno-format by default when using gcc on mingw since many |
14653 | # GCC versions complain about %I64. | |
14654 | case "${host}" in | |
14655 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
14656 | esac | |
14657 | ||
81ecdfbb RW |
14658 | # Check whether --enable-build-warnings was given. |
14659 | if test "${enable_build_warnings+set}" = set; then : | |
14660 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
14661 | yes) ;; |
14662 | no) build_warnings="-w";; | |
14663 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14664 | build_warnings="${build_warnings} ${t}";; | |
14665 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14666 | build_warnings="${t} ${build_warnings}";; | |
14667 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14668 | esac | |
d4f3574e | 14669 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 14670 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 14671 | fi |
81ecdfbb RW |
14672 | fi |
14673 | # Check whether --enable-gdb-build-warnings was given. | |
14674 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
14675 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
14676 | yes) ;; |
14677 | no) build_warnings="-w";; | |
14678 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14679 | build_warnings="${build_warnings} ${t}";; | |
14680 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14681 | build_warnings="${t} ${build_warnings}";; | |
14682 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14683 | esac | |
14684 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
14685 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
14686 | fi | |
81ecdfbb RW |
14687 | fi |
14688 | WARN_CFLAGS="" | |
c906108c SS |
14689 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
14690 | then | |
81ecdfbb RW |
14691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
14692 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
14693 | # Separate out the -Werror flag as some files just cannot be |
14694 | # compiled with it enabled. | |
14695 | for w in ${build_warnings}; do | |
14696 | case $w in | |
14697 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
14698 | *) # Check that GCC accepts it | |
4536bbc6 AC |
14699 | saved_CFLAGS="$CFLAGS" |
14700 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 14701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14702 | /* end confdefs.h. */ |
4536bbc6 | 14703 | |
bec39cab AC |
14704 | int |
14705 | main () | |
14706 | { | |
4536bbc6 | 14707 | |
bec39cab AC |
14708 | ; |
14709 | return 0; | |
14710 | } | |
14711 | _ACEOF | |
81ecdfbb | 14712 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 14713 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 14714 | fi |
81ecdfbb | 14715 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 14716 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
14717 | esac |
14718 | done | |
81ecdfbb RW |
14719 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
14720 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
14721 | fi |
14722 | ||
14723 | ||
104c1213 | 14724 | |
7a292a7a | 14725 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
14726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
14727 | $as_echo_n "checking for cygwin... " >&6; } | |
14728 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
14729 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14730 | else |
81ecdfbb | 14731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14732 | /* end confdefs.h. */ |
7a292a7a SS |
14733 | |
14734 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
14735 | lose | |
14736 | #endif | |
bec39cab | 14737 | _ACEOF |
7a292a7a | 14738 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 14739 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
14740 | gdb_cv_os_cygwin=yes |
14741 | else | |
7a292a7a SS |
14742 | gdb_cv_os_cygwin=no |
14743 | fi | |
14744 | rm -f conftest* | |
14745 | ||
14746 | fi | |
81ecdfbb RW |
14747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
14748 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 14749 | |
aff38e61 | 14750 | |
3eb25fda | 14751 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 14752 | case ${host} in |
95cbc983 AC |
14753 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
14754 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 14755 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
14756 | esac |
14757 | ||
14758 | ||
cd0fc7c3 SS |
14759 | # libreadline needs libuser32.a in a cygwin environment |
14760 | WIN32LIBS= | |
14761 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
14762 | WIN32LIBS="-luser32" |
14763 | case "${target}" in | |
14764 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
14765 | ;; | |
14766 | esac | |
cd0fc7c3 | 14767 | fi |
c906108c | 14768 | |
b4505029 MM |
14769 | # The ser-tcp.c module requires sockets. |
14770 | case ${host} in | |
14771 | *mingw32*) | |
14772 | ||
81ecdfbb | 14773 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
14774 | |
14775 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
14776 | ;; | |
14777 | esac | |
14778 | ||
7a292a7a | 14779 | |
31d99776 DJ |
14780 | # Add ELF support to GDB, but only if BFD includes ELF support. |
14781 | OLD_CFLAGS=$CFLAGS | |
14782 | OLD_LDFLAGS=$LDFLAGS | |
14783 | OLD_LIBS=$LIBS | |
cab58a69 | 14784 | CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" |
31d99776 | 14785 | LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" |
7b3200f9 | 14786 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
0f72fb1c | 14787 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
14788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
14789 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
14790 | if test "${gdb_cv_var_elf+set}" = set; then : | |
14791 | $as_echo_n "(cached) " >&6 | |
31d99776 | 14792 | else |
81ecdfbb | 14793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
14794 | /* end confdefs.h. */ |
14795 | #include <stdlib.h> | |
14796 | #include "bfd.h" | |
14797 | #include "elf-bfd.h" | |
14798 | ||
14799 | int | |
14800 | main () | |
14801 | { | |
14802 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
14803 | ; | |
14804 | return 0; | |
14805 | } | |
14806 | _ACEOF | |
81ecdfbb | 14807 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
14808 | gdb_cv_var_elf=yes |
14809 | else | |
81ecdfbb | 14810 | gdb_cv_var_elf=no |
31d99776 | 14811 | fi |
81ecdfbb RW |
14812 | rm -f core conftest.err conftest.$ac_objext \ |
14813 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 14814 | fi |
81ecdfbb RW |
14815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
14816 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 DJ |
14817 | if test $gdb_cv_var_elf = yes; then |
14818 | CONFIG_OBS="$CONFIG_OBS elfread.o" | |
14819 | ||
81ecdfbb | 14820 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 DJ |
14821 | |
14822 | fi | |
14823 | CFLAGS=$OLD_CFLAGS | |
14824 | LDFLAGS=$OLD_LDFLAGS | |
14825 | LIBS=$OLD_LIBS | |
14826 | ||
121ce6e5 DJ |
14827 | # Add any host-specific objects to GDB. |
14828 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
14829 | ||
3fc11d3e JM |
14830 | LIBGUI="../libgui/src/libgui.a" |
14831 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
14832 | ||
14833 | ||
7a292a7a | 14834 | |
3fc11d3e JM |
14835 | WIN32LDAPP= |
14836 | ||
14837 | ||
14838 | ||
d91670b9 | 14839 | case "${host}" in |
686a5eed | 14840 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
14841 | configdir="win" |
14842 | ;; | |
14843 | *) | |
14844 | configdir="unix" | |
14845 | ;; | |
14846 | esac | |
3fc11d3e JM |
14847 | |
14848 | GDBTKLIBS= | |
14849 | if test "${enable_gdbtk}" = "yes"; then | |
14850 | ||
d1c3b63a KS |
14851 | # Gdbtk must have an absolute path to srcdir in order to run |
14852 | # properly when not installed. | |
14853 | here=`pwd` | |
14854 | cd ${srcdir} | |
14855 | GDBTK_SRC_DIR=`pwd` | |
14856 | cd $here | |
14857 | ||
bec39cab | 14858 | |
5062cc19 KS |
14859 | # |
14860 | # Ok, lets find the tcl configuration | |
14861 | # First, look for one uninstalled. | |
14862 | # the alternative search directory is invoked by --with-tcl | |
14863 | # | |
3fc11d3e | 14864 | |
5062cc19 KS |
14865 | if test x"${no_tcl}" = x ; then |
14866 | # we reset no_tcl in case something fails here | |
14867 | no_tcl=true | |
bec39cab | 14868 | |
81ecdfbb RW |
14869 | # Check whether --with-tcl was given. |
14870 | if test "${with_tcl+set}" = set; then : | |
14871 | withval=$with_tcl; with_tclconfig=${withval} | |
14872 | fi | |
14873 | ||
14874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
14875 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
14876 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
14877 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 14878 | else |
bec39cab | 14879 | |
3fc11d3e | 14880 | |
5062cc19 KS |
14881 | # First check to see if --with-tcl was specified. |
14882 | case "${host}" in | |
14883 | *-*-cygwin*) platDir="win" ;; | |
14884 | *) platDir="unix" ;; | |
14885 | esac | |
14886 | if test x"${with_tclconfig}" != x ; then | |
14887 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
14888 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
14889 | else | |
81ecdfbb | 14890 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
14891 | fi |
14892 | fi | |
14893 | ||
14894 | # then check for a private Tcl installation | |
14895 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14896 | for i in \ | |
14897 | ../tcl \ | |
14898 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14899 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
14900 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14901 | ../../tcl \ | |
14902 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14903 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14904 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
14905 | ../../../tcl \ | |
14906 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14907 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
14908 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
14909 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
14910 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
14911 | break | |
14912 | fi | |
14913 | done | |
14914 | fi | |
14915 | ||
14916 | # on Darwin, check in Framework installation locations | |
14917 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
14918 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
14919 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
14920 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
14921 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
14922 | ; do | |
14923 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
14924 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
14925 | break | |
14926 | fi | |
14927 | done | |
14928 | fi | |
14929 | ||
14930 | # check in a few common install locations | |
14931 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14932 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
14933 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
14934 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
14935 | `ls -d /usr/local/lib 2>/dev/null` \ | |
14936 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
14937 | `ls -d /usr/lib 2>/dev/null` \ | |
14938 | ; do | |
14939 | if test -f "$i/tclConfig.sh" ; then | |
14940 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
14941 | break | |
14942 | fi | |
14943 | done | |
14944 | fi | |
3fc11d3e | 14945 | |
5062cc19 KS |
14946 | # check in a few other private locations |
14947 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14948 | for i in \ | |
14949 | ${srcdir}/../tcl \ | |
14950 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
14951 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
14952 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
14953 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
14954 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
14955 | break | |
14956 | fi | |
14957 | done | |
14958 | fi | |
bec39cab | 14959 | |
3fc11d3e JM |
14960 | fi |
14961 | ||
5062cc19 KS |
14962 | |
14963 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
14964 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
14965 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
14966 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
14967 | else |
14968 | no_tcl= | |
14969 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
14970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
14971 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
14972 | fi |
14973 | fi | |
3fc11d3e | 14974 | |
bec39cab | 14975 | |
85541719 DE |
14976 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
14977 | # point to doing Tcl. | |
bec39cab | 14978 | |
5062cc19 KS |
14979 | # |
14980 | # Ok, lets find the tk configuration | |
14981 | # First, look for one uninstalled. | |
14982 | # the alternative search directory is invoked by --with-tk | |
14983 | # | |
3fc11d3e | 14984 | |
5062cc19 KS |
14985 | if test x"${no_tk}" = x ; then |
14986 | # we reset no_tk in case something fails here | |
14987 | no_tk=true | |
bec39cab | 14988 | |
81ecdfbb RW |
14989 | # Check whether --with-tk was given. |
14990 | if test "${with_tk+set}" = set; then : | |
14991 | withval=$with_tk; with_tkconfig=${withval} | |
14992 | fi | |
14993 | ||
14994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
14995 | $as_echo_n "checking for Tk configuration... " >&6; } | |
14996 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
14997 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14998 | else |
3fc11d3e JM |
14999 | |
15000 | ||
5062cc19 KS |
15001 | # First check to see if --with-tkconfig was specified. |
15002 | if test x"${with_tkconfig}" != x ; then | |
15003 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
15004 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
15005 | else | |
81ecdfbb | 15006 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15007 | fi |
15008 | fi | |
3fc11d3e | 15009 | |
5062cc19 KS |
15010 | # then check for a private Tk library |
15011 | case "${host}" in | |
15012 | *-*-cygwin*) platDir="win" ;; | |
15013 | *) platDir="unix" ;; | |
15014 | esac | |
15015 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15016 | for i in \ | |
15017 | ../tk \ | |
15018 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15019 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
15020 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
15021 | ../../tk \ | |
15022 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15023 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
15024 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
15025 | ../../../tk \ | |
15026 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15027 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
15028 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15029 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15030 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15031 | break | |
15032 | fi | |
15033 | done | |
15034 | fi | |
15035 | ||
15036 | # on Darwin, check in Framework installation locations | |
15037 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
15038 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15039 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15040 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15041 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15042 | ; do | |
15043 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
15044 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
15045 | break | |
15046 | fi | |
15047 | done | |
15048 | fi | |
15049 | ||
15050 | # check in a few common install locations | |
15051 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15052 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15053 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15054 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15055 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15056 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15057 | `ls -d /usr/lib 2>/dev/null` \ | |
15058 | ; do | |
15059 | if test -f "$i/tkConfig.sh" ; then | |
15060 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
15061 | break | |
15062 | fi | |
15063 | done | |
15064 | fi | |
15065 | # check in a few other private locations | |
15066 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15067 | for i in \ | |
15068 | ${srcdir}/../tk \ | |
15069 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15070 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
15071 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15072 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15073 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15074 | break | |
15075 | fi | |
15076 | done | |
15077 | fi | |
3fc11d3e | 15078 | |
3fc11d3e JM |
15079 | fi |
15080 | ||
15081 | ||
5062cc19 KS |
15082 | if test x"${ac_cv_c_tkconfig}" = x ; then |
15083 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
15084 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
15085 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
15086 | else |
15087 | no_tk= | |
15088 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
15089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15090 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 15091 | fi |
3fc11d3e | 15092 | fi |
dd2504ab | 15093 | |
dd2504ab | 15094 | |
85541719 DE |
15095 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
15096 | ||
81ecdfbb RW |
15097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15098 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
15099 | |
15100 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
15101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15102 | $as_echo "loading" >&6; } | |
85541719 DE |
15103 | . ${TCL_BIN_DIR}/tclConfig.sh |
15104 | else | |
81ecdfbb RW |
15105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15106 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
15107 | fi |
15108 | ||
15109 | # eval is required to do the TCL_DBGX substitution | |
15110 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
15111 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
15112 | ||
15113 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
15114 | # then set the common variable name to the value of the build variables. | |
15115 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
15116 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
15117 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
15118 | # installed and uninstalled version of Tcl. | |
15119 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
15120 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
15121 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
15122 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
15123 | elif test "`uname -s`" = "Darwin"; then | |
15124 | # If Tcl was built as a framework, attempt to use the libraries | |
15125 | # from the framework at the given location so that linking works | |
15126 | # against Tcl.framework installed in an arbitary location. | |
15127 | case ${TCL_DEFS} in | |
15128 | *TCL_FRAMEWORK*) | |
15129 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
15130 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
15131 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
15132 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
15133 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
15134 | break | |
15135 | fi | |
15136 | done | |
15137 | fi | |
15138 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
15139 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
15140 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
15141 | fi | |
15142 | ;; | |
15143 | esac | |
15144 | fi | |
15145 | ||
15146 | # eval is required to do the TCL_DBGX substitution | |
15147 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
15148 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
15149 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
15150 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
15151 | ||
15152 | ||
15153 | ||
15154 | ||
15155 | ||
15156 | ||
15157 | ||
15158 | ||
15159 | ||
15160 | ||
15161 | ||
15162 | ||
15163 | ||
15164 | ||
15165 | ||
15166 | # Check for in-tree tcl | |
15167 | here=`pwd` | |
15168 | cd ${srcdir}/.. | |
15169 | topdir=`pwd` | |
15170 | cd ${here} | |
15171 | ||
15172 | intree="no" | |
15173 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
15174 | intree="yes" | |
15175 | fi | |
15176 | ||
15177 | # Find Tcl private headers | |
15178 | if test x"${intree}" = xno; then | |
15179 | ||
81ecdfbb RW |
15180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
15181 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
15182 | private_dir="" |
15183 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
15184 | if test -f ${dir}/tclInt.h ; then | |
15185 | private_dir=${dir} | |
15186 | fi | |
15187 | ||
15188 | if test x"${private_dir}" = x; then | |
81ecdfbb | 15189 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
15190 | else |
15191 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
15192 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15193 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
15194 | fi |
15195 | ||
15196 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
15197 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
15198 | TCL_DEPS="" | |
15199 | else | |
15200 | # If building tcl in the same src tree, private headers | |
15201 | # are not needed, but we need to be sure to use the right | |
15202 | # headers library | |
15203 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
15204 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
15205 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
15206 | fi | |
15207 | ||
15208 | ||
15209 | ||
15210 | ||
15211 | ||
81ecdfbb RW |
15212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15213 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 15214 | |
5062cc19 | 15215 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
15216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15217 | $as_echo "loading" >&6; } | |
5062cc19 | 15218 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 15219 | else |
81ecdfbb RW |
15220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15221 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 15222 | fi |
bec39cab | 15223 | |
5062cc19 KS |
15224 | # eval is required to do the TK_DBGX substitution |
15225 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
15226 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
15227 | ||
15228 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
15229 | # then set the common variable name to the value of the build variables. | |
15230 | # For example, the variable TK_LIB_SPEC will be set to the value | |
15231 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
15232 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
15233 | # installed and uninstalled version of Tcl. | |
85541719 | 15234 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
15235 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
15236 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
15237 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
15238 | elif test "`uname -s`" = "Darwin"; then | |
15239 | # If Tk was built as a framework, attempt to use the libraries | |
15240 | # from the framework at the given location so that linking works | |
15241 | # against Tk.framework installed in an arbitary location. | |
15242 | case ${TK_DEFS} in | |
15243 | *TK_FRAMEWORK*) | |
85541719 | 15244 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
15245 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
15246 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
15247 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
15248 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
15249 | break | |
15250 | fi | |
15251 | done | |
15252 | fi | |
85541719 | 15253 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
15254 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
15255 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
15256 | fi | |
15257 | ;; | |
15258 | esac | |
3fc11d3e JM |
15259 | fi |
15260 | ||
5062cc19 KS |
15261 | # eval is required to do the TK_DBGX substitution |
15262 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
15263 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
15264 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
15265 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 15266 | |
3fc11d3e JM |
15267 | |
15268 | ||
bec39cab AC |
15269 | |
15270 | ||
15271 | ||
15272 | ||
15273 | ||
15274 | ||
15275 | ||
3fc11d3e | 15276 | |
3fc11d3e | 15277 | |
bec39cab | 15278 | |
bec39cab | 15279 | |
85541719 DE |
15280 | # Check for in-tree Tk |
15281 | intree="no" | |
15282 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
15283 | intree="yes" | |
15284 | fi | |
3fc11d3e | 15285 | |
85541719 DE |
15286 | # Find Tk private headers |
15287 | if test x"${intree}" = xno; then | |
3fc11d3e | 15288 | |
81ecdfbb RW |
15289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
15290 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
15291 | private_dir="" |
15292 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
15293 | if test -f ${dir}/tkInt.h; then | |
15294 | private_dir=${dir} | |
3fc11d3e | 15295 | fi |
bec39cab | 15296 | |
5062cc19 | 15297 | if test x"${private_dir}" = x; then |
81ecdfbb | 15298 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 15299 | else |
5062cc19 | 15300 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
15301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15302 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 15303 | fi |
3fc11d3e | 15304 | |
85541719 DE |
15305 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
15306 | TK_LIBRARY=${TK_LIB_SPEC} | |
15307 | TK_DEPS="" | |
15308 | else | |
15309 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
15310 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
15311 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
15312 | fi | |
3fc11d3e JM |
15313 | |
15314 | ||
3fc11d3e JM |
15315 | |
15316 | ||
3fc11d3e | 15317 | |
85541719 | 15318 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 15319 | |
85541719 DE |
15320 | # Include some libraries that Tcl and Tk want. |
15321 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
15322 | # Yes, the ordering seems wrong here. But it isn't. | |
15323 | # TK_LIBS is the list of libraries that need to be linked | |
15324 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
15325 | # were in LIBS then any link tests after this point would | |
15326 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
15327 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 15328 | |
85541719 DE |
15329 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
15330 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
15331 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
15332 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
15333 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
15334 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
15335 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 15336 | |
85541719 DE |
15337 | if test x$gdb_cv_os_cygwin = xyes; then |
15338 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
15339 | WIN32LDAPP="-Wl,--subsystem,console" | |
15340 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 15341 | fi |
ffc6a242 | 15342 | |
81ecdfbb | 15343 | subdirs="$subdirs gdbtk" |
3ace7edb | 15344 | |
85541719 | 15345 | fi |
3fc11d3e JM |
15346 | fi |
15347 | ||
15348 | ||
15349 | ||
15350 | ||
15351 | ||
15352 | ||
15353 | ||
15354 | ||
81ecdfbb RW |
15355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
15356 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 15357 | |
c906108c | 15358 | |
81ecdfbb RW |
15359 | # Check whether --with-x was given. |
15360 | if test "${with_x+set}" = set; then : | |
15361 | withval=$with_x; | |
15362 | fi | |
c906108c SS |
15363 | |
15364 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
15365 | if test "x$with_x" = xno; then | |
15366 | # The user explicitly disabled X. | |
15367 | have_x=disabled | |
15368 | else | |
81ecdfbb RW |
15369 | case $x_includes,$x_libraries in #( |
15370 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
15371 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
15372 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
15373 | else |
15374 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 15375 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 15376 | rm -f -r conftest.dir |
bec39cab AC |
15377 | if mkdir conftest.dir; then |
15378 | cd conftest.dir | |
bec39cab | 15379 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
15380 | incroot: |
15381 | @echo incroot='${INCROOT}' | |
15382 | usrlibdir: | |
15383 | @echo usrlibdir='${USRLIBDIR}' | |
15384 | libdir: | |
15385 | @echo libdir='${LIBDIR}' | |
15386 | _ACEOF | |
15387 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 15388 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
15389 | for ac_var in incroot usrlibdir libdir; do |
15390 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
15391 | done | |
c906108c | 15392 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
15393 | for ac_extension in a so sl dylib la dll; do |
15394 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
15395 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 15396 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
15397 | fi |
15398 | done | |
15399 | # Screen out bogus values from the imake configuration. They are | |
15400 | # bogus both because they are the default anyway, and because | |
15401 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 15402 | case $ac_im_incroot in |
81ecdfbb | 15403 | /usr/include) ac_x_includes= ;; |
bec39cab | 15404 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 15405 | esac |
bec39cab | 15406 | case $ac_im_usrlibdir in |
81ecdfbb | 15407 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 15408 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
15409 | esac |
15410 | fi | |
15411 | cd .. | |
81ecdfbb | 15412 | rm -f -r conftest.dir |
c906108c SS |
15413 | fi |
15414 | ||
bec39cab AC |
15415 | # Standard set of common directories for X headers. |
15416 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
15417 | ac_x_header_dirs=' | |
15418 | /usr/X11/include | |
81ecdfbb | 15419 | /usr/X11R7/include |
bec39cab AC |
15420 | /usr/X11R6/include |
15421 | /usr/X11R5/include | |
15422 | /usr/X11R4/include | |
15423 | ||
15424 | /usr/include/X11 | |
81ecdfbb | 15425 | /usr/include/X11R7 |
bec39cab AC |
15426 | /usr/include/X11R6 |
15427 | /usr/include/X11R5 | |
15428 | /usr/include/X11R4 | |
15429 | ||
15430 | /usr/local/X11/include | |
81ecdfbb | 15431 | /usr/local/X11R7/include |
bec39cab AC |
15432 | /usr/local/X11R6/include |
15433 | /usr/local/X11R5/include | |
15434 | /usr/local/X11R4/include | |
15435 | ||
15436 | /usr/local/include/X11 | |
81ecdfbb | 15437 | /usr/local/include/X11R7 |
bec39cab AC |
15438 | /usr/local/include/X11R6 |
15439 | /usr/local/include/X11R5 | |
15440 | /usr/local/include/X11R4 | |
15441 | ||
15442 | /usr/X386/include | |
15443 | /usr/x386/include | |
15444 | /usr/XFree86/include/X11 | |
15445 | ||
15446 | /usr/include | |
15447 | /usr/local/include | |
15448 | /usr/unsupported/include | |
15449 | /usr/athena/include | |
15450 | /usr/local/x11r5/include | |
15451 | /usr/lpp/Xamples/include | |
15452 | ||
15453 | /usr/openwin/include | |
15454 | /usr/openwin/share/include' | |
15455 | ||
15456 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 15457 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 15458 | # First, try using that file with no special directory specified. |
81ecdfbb | 15459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15460 | /* end confdefs.h. */ |
81ecdfbb | 15461 | #include <X11/Xlib.h> |
bec39cab | 15462 | _ACEOF |
81ecdfbb | 15463 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
15464 | # We can compile using X headers with no special include directory. |
15465 | ac_x_includes= | |
15466 | else | |
bec39cab | 15467 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 15468 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
15469 | ac_x_includes=$ac_dir |
15470 | break | |
15471 | fi | |
15472 | done | |
c906108c | 15473 | fi |
bec39cab AC |
15474 | rm -f conftest.err conftest.$ac_ext |
15475 | fi # $ac_x_includes = no | |
c906108c | 15476 | |
bec39cab | 15477 | if test "$ac_x_libraries" = no; then |
c906108c | 15478 | # Check for the libraries. |
c906108c SS |
15479 | # See if we find them without any special options. |
15480 | # Don't add to $LIBS permanently. | |
bec39cab | 15481 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
15482 | LIBS="-lX11 $LIBS" |
15483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15484 | /* end confdefs.h. */ |
81ecdfbb | 15485 | #include <X11/Xlib.h> |
bec39cab AC |
15486 | int |
15487 | main () | |
15488 | { | |
81ecdfbb | 15489 | XrmInitialize () |
bec39cab AC |
15490 | ; |
15491 | return 0; | |
15492 | } | |
15493 | _ACEOF | |
81ecdfbb | 15494 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15495 | LIBS=$ac_save_LIBS |
c906108c SS |
15496 | # We can link X programs with no special library path. |
15497 | ac_x_libraries= | |
15498 | else | |
81ecdfbb RW |
15499 | LIBS=$ac_save_LIBS |
15500 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 15501 | do |
bec39cab | 15502 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
15503 | for ac_extension in a so sl dylib la dll; do |
15504 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
15505 | ac_x_libraries=$ac_dir |
15506 | break 2 | |
15507 | fi | |
15508 | done | |
15509 | done | |
15510 | fi | |
81ecdfbb RW |
15511 | rm -f core conftest.err conftest.$ac_objext \ |
15512 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 15513 | fi # $ac_x_libraries = no |
c906108c | 15514 | |
81ecdfbb RW |
15515 | case $ac_x_includes,$ac_x_libraries in #( |
15516 | no,* | *,no | *\'*) | |
15517 | # Didn't find X, or a directory has "'" in its name. | |
15518 | ac_cv_have_x="have_x=no";; #( | |
15519 | *) | |
15520 | # Record where we found X for the cache. | |
15521 | ac_cv_have_x="have_x=yes\ | |
15522 | ac_x_includes='$ac_x_includes'\ | |
15523 | ac_x_libraries='$ac_x_libraries'" | |
15524 | esac | |
c906108c | 15525 | fi |
81ecdfbb RW |
15526 | ;; #( |
15527 | *) have_x=yes;; | |
15528 | esac | |
c906108c SS |
15529 | eval "$ac_cv_have_x" |
15530 | fi # $with_x != no | |
15531 | ||
15532 | if test "$have_x" != yes; then | |
81ecdfbb RW |
15533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
15534 | $as_echo "$have_x" >&6; } | |
c906108c SS |
15535 | no_x=yes |
15536 | else | |
15537 | # If each of the values was on the command line, it overrides each guess. | |
15538 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
15539 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
15540 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
15541 | ac_cv_have_x="have_x=yes\ |
15542 | ac_x_includes='$x_includes'\ | |
15543 | ac_x_libraries='$x_libraries'" | |
15544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
15545 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
15546 | fi |
15547 | ||
15548 | ||
bec39cab | 15549 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 15550 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
15551 | # This code just checks for a few cases where we'd like to ignore those |
15552 | # definitions, even when they're present in the '.mt' file. These cases | |
15553 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 15554 | # not part of the source tree. |
7a292a7a | 15555 | # |
81ecdfbb RW |
15556 | # Check whether --enable-sim was given. |
15557 | if test "${enable_sim+set}" = set; then : | |
15558 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
15559 | echo "enableval = ${enableval}"; |
15560 | case "${enableval}" in | |
15561 | yes) ignore_sim=false ;; | |
15562 | no) ignore_sim=true ;; | |
15563 | *) ignore_sim=false ;; | |
15564 | esac | |
15565 | else | |
15566 | ignore_sim=false | |
81ecdfbb RW |
15567 | fi |
15568 | ||
7a292a7a SS |
15569 | |
15570 | if test ! -d "${srcdir}/../sim"; then | |
15571 | ignore_sim=true | |
15572 | fi | |
15573 | ||
9b624dbe UW |
15574 | SIM= |
15575 | SIM_OBS= | |
15576 | if test "${ignore_sim}" = "false"; then | |
15577 | if test x"${gdb_sim}" != x ; then | |
15578 | SIM="${gdb_sim}" | |
15579 | SIM_OBS="remote-sim.o" | |
60ca704f | 15580 | |
81ecdfbb | 15581 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 15582 | |
9b624dbe | 15583 | fi |
7a292a7a SS |
15584 | fi |
15585 | ||
15586 | ||
15587 | ||
c906108c SS |
15588 | |
15589 | ||
15590 | ||
15591 | ||
15592 | ||
15593 | ||
dfcd3bfb | 15594 | |
e56ac5c3 AC |
15595 | |
15596 | ||
b3a90332 AC |
15597 | |
15598 | ||
c35f4ffc | 15599 | # List of host floatformats. |
bec39cab AC |
15600 | |
15601 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15602 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 15603 | _ACEOF |
c35f4ffc | 15604 | |
bec39cab AC |
15605 | |
15606 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15607 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
15608 | _ACEOF |
15609 | ||
c35f4ffc | 15610 | |
bec39cab | 15611 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 15612 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 15613 | _ACEOF |
c35f4ffc AC |
15614 | |
15615 | ||
c906108c SS |
15616 | # target_subdir is used by the testsuite to find the target libraries. |
15617 | target_subdir= | |
15618 | if test "${host}" != "${target}"; then | |
15619 | target_subdir="${target_alias}/" | |
15620 | fi | |
15621 | ||
15622 | ||
15623 | frags= | |
771b4502 | 15624 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
15625 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
15626 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 15627 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
15628 | fi |
15629 | frags="$frags $host_makefile_frag" | |
15630 | else | |
15631 | host_makefile_frag=/dev/null | |
c906108c | 15632 | fi |
c906108c | 15633 | |
c906108c SS |
15634 | |
15635 | ||
15636 | ||
771b4502 | 15637 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
15638 | # We pick this up from the host configuration file (.mh) because we |
15639 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
15640 | nativefile=`sed -n ' |
15641 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
15642 | ' ${host_makefile_frag}` | |
c906108c SS |
15643 | fi |
15644 | ||
15645 | ||
b00a8037 | 15646 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
15647 | |
15648 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 15649 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 15650 | _ACEOF |
b00a8037 DJ |
15651 | |
15652 | fi | |
15653 | ||
8dcde887 | 15654 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
15655 | # Check whether --enable-multi-ice was given. |
15656 | if test "${enable_multi_ice+set}" = set; then : | |
15657 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
15658 | yes | no) |
15659 | ;; | |
81ecdfbb | 15660 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 15661 | esac |
81ecdfbb | 15662 | fi |
b4e70030 | 15663 | |
81ecdfbb RW |
15664 | if test "x$enable_multi_ice" = xyes; then |
15665 | subdirs="$subdirs multi-ice" | |
3ace7edb | 15666 | |
a85f51e7 DJ |
15667 | fi |
15668 | ||
a13e2c95 UW |
15669 | # We only build gdbserver automatically in a native configuration. |
15670 | if test "$gdb_native" = "yes"; then | |
81ecdfbb RW |
15671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
15672 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 15673 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
15674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
15675 | $as_echo "yes" >&6; } | |
15676 | subdirs="$subdirs gdbserver" | |
3ace7edb | 15677 | |
8dcde887 | 15678 | else |
81ecdfbb RW |
15679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
15680 | $as_echo "no" >&6; } | |
8dcde887 MK |
15681 | fi |
15682 | fi | |
15683 | ||
db985757 | 15684 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 15685 | # to an empty version. |
c906108c SS |
15686 | |
15687 | files= | |
15688 | links= | |
5a2402b8 | 15689 | |
c906108c SS |
15690 | rm -f nm.h |
15691 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
15692 | case "${nativefile}" in |
15693 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
15694 | * ) GDB_NM_FILE="${nativefile}" | |
15695 | esac | |
5a2402b8 AC |
15696 | files="${files} ${GDB_NM_FILE}" |
15697 | links="${links} nm.h" | |
60ca704f SE |
15698 | |
15699 | cat >>confdefs.h <<_ACEOF | |
b78960be | 15700 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 15701 | _ACEOF |
5a2402b8 | 15702 | |
c906108c | 15703 | fi |
5a2402b8 AC |
15704 | |
15705 | ||
bec39cab AC |
15706 | ac_sources="$files" |
15707 | ac_dests="$links" | |
15708 | while test -n "$ac_sources"; do | |
15709 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
15710 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
15711 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
15712 | done | |
81ecdfbb | 15713 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
15714 | |
15715 | ||
c906108c SS |
15716 | |
15717 | ||
c906108c | 15718 | |
81ecdfbb | 15719 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 15720 | |
bec39cab | 15721 | |
81ecdfbb RW |
15722 | ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile" |
15723 | ||
15724 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 15725 | |
bec39cab AC |
15726 | cat >confcache <<\_ACEOF |
15727 | # This file is a shell script that caches the results of configure | |
15728 | # tests run on this system so they can be shared between configure | |
15729 | # scripts and configure runs, see configure's option --config-cache. | |
15730 | # It is not useful on other systems. If it contains results you don't | |
15731 | # want to keep, you may remove or edit it. | |
15732 | # | |
15733 | # config.status only pays attention to the cache file if you give it | |
15734 | # the --recheck option to rerun configure. | |
15735 | # | |
15736 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
15737 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15738 | # following values. | |
15739 | ||
15740 | _ACEOF | |
15741 | ||
15742 | # The following way of writing the cache mishandles newlines in values, | |
15743 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 15744 | # So, we kill variables containing newlines. |
bec39cab AC |
15745 | # Ultrix sh set writes to stderr and can't be redirected directly, |
15746 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
15747 | ( |
15748 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
15749 | eval ac_val=\$$ac_var | |
15750 | case $ac_val in #( | |
15751 | *${as_nl}*) | |
15752 | case $ac_var in #( | |
15753 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
15754 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
15755 | esac | |
15756 | case $ac_var in #( | |
15757 | _ | IFS | as_nl) ;; #( | |
15758 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
15759 | *) { eval $ac_var=; unset $ac_var;} ;; | |
15760 | esac ;; | |
15761 | esac | |
15762 | done | |
15763 | ||
bec39cab | 15764 | (set) 2>&1 | |
81ecdfbb RW |
15765 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
15766 | *${as_nl}ac_space=\ *) | |
15767 | # `set' does not quote correctly, so add quotes: double-quote | |
15768 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
15769 | sed -n \ |
15770 | "s/'/'\\\\''/g; | |
15771 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 15772 | ;; #( |
bec39cab AC |
15773 | *) |
15774 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 15775 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 15776 | ;; |
81ecdfbb RW |
15777 | esac | |
15778 | sort | |
15779 | ) | | |
bec39cab | 15780 | sed ' |
81ecdfbb | 15781 | /^ac_cv_env_/b end |
bec39cab | 15782 | t clear |
81ecdfbb | 15783 | :clear |
bec39cab AC |
15784 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
15785 | t end | |
81ecdfbb RW |
15786 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
15787 | :end' >>confcache | |
15788 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
15789 | if test -w "$cache_file"; then | |
15790 | test "x$cache_file" != "x/dev/null" && | |
15791 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
15792 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
15793 | cat confcache >$cache_file |
15794 | else | |
81ecdfbb RW |
15795 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
15796 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
15797 | fi |
15798 | fi | |
15799 | rm -f confcache | |
15800 | ||
15801 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15802 | # Let make expand exec_prefix. | |
15803 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15804 | ||
bec39cab AC |
15805 | DEFS=-DHAVE_CONFIG_H |
15806 | ||
15807 | ac_libobjs= | |
15808 | ac_ltlibobjs= | |
15809 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
15810 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
15811 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
15812 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
15813 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
15814 | # will be set to the directory where LIBOBJS objects are built. | |
15815 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
15816 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
15817 | done |
15818 | LIBOBJS=$ac_libobjs | |
15819 | ||
15820 | LTLIBOBJS=$ac_ltlibobjs | |
15821 | ||
15822 | ||
85981d60 | 15823 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
15824 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
15825 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 15826 | fi |
a417dc56 | 15827 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
15828 | as_fn_error "conditional \"GMAKE\" was never defined. |
15829 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 15830 | fi |
783e057b | 15831 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
81ecdfbb RW |
15832 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
15833 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
783e057b DJ |
15834 | fi |
15835 | ||
15836 | gl_libobjs= | |
15837 | gl_ltlibobjs= | |
15838 | if test -n "$gl_LIBOBJS"; then | |
15839 | # Remove the extension. | |
15840 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 15841 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
15842 | gl_libobjs="$gl_libobjs $i.$ac_objext" |
15843 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
15844 | done | |
15845 | fi | |
15846 | gl_LIBOBJS=$gl_libobjs | |
15847 | ||
15848 | gl_LTLIBOBJS=$gl_ltlibobjs | |
15849 | ||
15850 | ||
15851 | ||
15852 | gltests_libobjs= | |
15853 | gltests_ltlibobjs= | |
15854 | if test -n "$gltests_LIBOBJS"; then | |
15855 | # Remove the extension. | |
15856 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 15857 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
15858 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" |
15859 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
15860 | done | |
15861 | fi | |
15862 | gltests_LIBOBJS=$gltests_libobjs | |
15863 | ||
15864 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
15865 | ||
15866 | ||
e28b3332 | 15867 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
81ecdfbb RW |
15868 | as_fn_error "conditional \"AMDEP\" was never defined. |
15869 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
e28b3332 DJ |
15870 | fi |
15871 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
81ecdfbb RW |
15872 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
15873 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
15874 | fi | |
15875 | if test -n "$EXEEXT"; then | |
15876 | am__EXEEXT_TRUE= | |
15877 | am__EXEEXT_FALSE='#' | |
15878 | else | |
15879 | am__EXEEXT_TRUE='#' | |
15880 | am__EXEEXT_FALSE= | |
e28b3332 | 15881 | fi |
bec39cab | 15882 | |
81ecdfbb RW |
15883 | |
15884 | ||
bec39cab | 15885 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 15886 | ac_write_fail=0 |
bec39cab AC |
15887 | ac_clean_files_save=$ac_clean_files |
15888 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
15889 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
15890 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
15891 | as_write_fail=0 | |
15892 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
15893 | #! $SHELL |
15894 | # Generated by $as_me. | |
15895 | # Run this file to recreate the current configuration. | |
15896 | # Compiler output produced by configure, useful for debugging | |
15897 | # configure, is in config.log if it exists. | |
15898 | ||
15899 | debug=false | |
15900 | ac_cs_recheck=false | |
15901 | ac_cs_silent=false | |
bec39cab | 15902 | |
81ecdfbb RW |
15903 | SHELL=\${CONFIG_SHELL-$SHELL} |
15904 | export SHELL | |
15905 | _ASEOF | |
15906 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
15907 | ## -------------------- ## | |
15908 | ## M4sh Initialization. ## | |
15909 | ## -------------------- ## | |
15910 | ||
15911 | # Be more Bourne compatible | |
15912 | DUALCASE=1; export DUALCASE # for MKS sh | |
15913 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
15914 | emulate sh |
15915 | NULLCMD=: | |
81ecdfbb | 15916 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
15917 | # is contrary to our usage. Disable this feature. |
15918 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
15919 | setopt NO_GLOB_SUBST |
15920 | else | |
15921 | case `(set -o) 2>/dev/null` in #( | |
15922 | *posix*) : | |
15923 | set -o posix ;; #( | |
15924 | *) : | |
15925 | ;; | |
15926 | esac | |
bec39cab | 15927 | fi |
bec39cab | 15928 | |
81ecdfbb RW |
15929 | |
15930 | as_nl=' | |
15931 | ' | |
15932 | export as_nl | |
15933 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
15934 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
15935 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
15936 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
15937 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
15938 | # but without wasting forks for bash or zsh. | |
15939 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
15940 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15941 | as_echo='print -r --' | |
15942 | as_echo_n='print -rn --' | |
15943 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15944 | as_echo='printf %s\n' | |
15945 | as_echo_n='printf %s' | |
15946 | else | |
15947 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
15948 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
15949 | as_echo_n='/usr/ucb/echo -n' | |
15950 | else | |
15951 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
15952 | as_echo_n_body='eval | |
15953 | arg=$1; | |
15954 | case $arg in #( | |
15955 | *"$as_nl"*) | |
15956 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
15957 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
15958 | esac; | |
15959 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
15960 | ' | |
15961 | export as_echo_n_body | |
15962 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
15963 | fi | |
15964 | export as_echo_body | |
15965 | as_echo='sh -c $as_echo_body as_echo' | |
15966 | fi | |
15967 | ||
15968 | # The user is always right. | |
15969 | if test "${PATH_SEPARATOR+set}" != set; then | |
15970 | PATH_SEPARATOR=: | |
15971 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
15972 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
15973 | PATH_SEPARATOR=';' | |
15974 | } | |
bec39cab AC |
15975 | fi |
15976 | ||
15977 | ||
81ecdfbb RW |
15978 | # IFS |
15979 | # We need space, tab and new line, in precisely that order. Quoting is | |
15980 | # there to prevent editors from complaining about space-tab. | |
15981 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
15982 | # splitting by setting IFS to empty value.) | |
15983 | IFS=" "" $as_nl" | |
15984 | ||
15985 | # Find who we are. Look in the path if we contain no directory separator. | |
15986 | case $0 in #(( | |
15987 | *[\\/]* ) as_myself=$0 ;; | |
15988 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
15989 | for as_dir in $PATH | |
15990 | do | |
15991 | IFS=$as_save_IFS | |
15992 | test -z "$as_dir" && as_dir=. | |
15993 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
15994 | done | |
15995 | IFS=$as_save_IFS | |
15996 | ||
15997 | ;; | |
15998 | esac | |
15999 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16000 | # in which case we are not to be found in the path. | |
16001 | if test "x$as_myself" = x; then | |
16002 | as_myself=$0 | |
16003 | fi | |
16004 | if test ! -f "$as_myself"; then | |
16005 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
16006 | exit 1 | |
16007 | fi | |
16008 | ||
16009 | # Unset variables that we do not need and which cause bugs (e.g. in | |
16010 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
16011 | # suppresses any "Segmentation fault" message there. '((' could | |
16012 | # trigger a bug in pdksh 5.2.14. | |
16013 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
16014 | do eval test x\${$as_var+set} = xset \ | |
16015 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
16016 | done | |
bec39cab AC |
16017 | PS1='$ ' |
16018 | PS2='> ' | |
16019 | PS4='+ ' | |
16020 | ||
16021 | # NLS nuisances. | |
81ecdfbb RW |
16022 | LC_ALL=C |
16023 | export LC_ALL | |
16024 | LANGUAGE=C | |
16025 | export LANGUAGE | |
16026 | ||
16027 | # CDPATH. | |
16028 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
16029 | ||
16030 | ||
16031 | # as_fn_error ERROR [LINENO LOG_FD] | |
16032 | # --------------------------------- | |
16033 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
16034 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
16035 | # script with status $?, using 1 if that was 0. | |
16036 | as_fn_error () | |
16037 | { | |
16038 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
16039 | if test "$3"; then | |
16040 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
16041 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
16042 | fi | |
16043 | $as_echo "$as_me: error: $1" >&2 | |
16044 | as_fn_exit $as_status | |
16045 | } # as_fn_error | |
16046 | ||
16047 | ||
16048 | # as_fn_set_status STATUS | |
16049 | # ----------------------- | |
16050 | # Set $? to STATUS, without forking. | |
16051 | as_fn_set_status () | |
16052 | { | |
16053 | return $1 | |
16054 | } # as_fn_set_status | |
16055 | ||
16056 | # as_fn_exit STATUS | |
16057 | # ----------------- | |
16058 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
16059 | as_fn_exit () | |
16060 | { | |
16061 | set +e | |
16062 | as_fn_set_status $1 | |
16063 | exit $1 | |
16064 | } # as_fn_exit | |
16065 | ||
16066 | # as_fn_unset VAR | |
16067 | # --------------- | |
16068 | # Portably unset VAR. | |
16069 | as_fn_unset () | |
16070 | { | |
16071 | { eval $1=; unset $1;} | |
16072 | } | |
16073 | as_unset=as_fn_unset | |
16074 | # as_fn_append VAR VALUE | |
16075 | # ---------------------- | |
16076 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
16077 | # advantage of any shell optimizations that allow amortized linear growth over | |
16078 | # repeated appends, instead of the typical quadratic growth present in naive | |
16079 | # implementations. | |
16080 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
16081 | eval 'as_fn_append () | |
16082 | { | |
16083 | eval $1+=\$2 | |
16084 | }' | |
16085 | else | |
16086 | as_fn_append () | |
16087 | { | |
16088 | eval $1=\$$1\$2 | |
16089 | } | |
16090 | fi # as_fn_append | |
16091 | ||
16092 | # as_fn_arith ARG... | |
16093 | # ------------------ | |
16094 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
16095 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
16096 | # must be portable across $(()) and expr. | |
16097 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
16098 | eval 'as_fn_arith () | |
16099 | { | |
16100 | as_val=$(( $* )) | |
16101 | }' | |
16102 | else | |
16103 | as_fn_arith () | |
16104 | { | |
16105 | as_val=`expr "$@" || test $? -eq 1` | |
16106 | } | |
16107 | fi # as_fn_arith | |
bec39cab | 16108 | |
81ecdfbb RW |
16109 | |
16110 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
16111 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
16112 | as_expr=expr |
16113 | else | |
16114 | as_expr=false | |
16115 | fi | |
16116 | ||
81ecdfbb | 16117 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
16118 | as_basename=basename |
16119 | else | |
16120 | as_basename=false | |
16121 | fi | |
16122 | ||
81ecdfbb RW |
16123 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
16124 | as_dirname=dirname | |
16125 | else | |
16126 | as_dirname=false | |
16127 | fi | |
bec39cab | 16128 | |
81ecdfbb | 16129 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
16130 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
16131 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16132 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
16133 | $as_echo X/"$0" | | |
16134 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
16135 | s//\1/ | |
16136 | q | |
16137 | } | |
16138 | /^X\/\(\/\/\)$/{ | |
16139 | s//\1/ | |
16140 | q | |
16141 | } | |
16142 | /^X\/\(\/\).*/{ | |
16143 | s//\1/ | |
16144 | q | |
16145 | } | |
16146 | s/.*/./; q'` | |
b4e70030 | 16147 | |
b4e70030 JB |
16148 | # Avoid depending upon Character Ranges. |
16149 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16150 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16151 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16152 | as_cr_digits='0123456789' | |
16153 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16154 | ||
81ecdfbb RW |
16155 | ECHO_C= ECHO_N= ECHO_T= |
16156 | case `echo -n x` in #((((( | |
16157 | -n*) | |
16158 | case `echo 'xy\c'` in | |
16159 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
16160 | xy) ECHO_C='\c';; | |
16161 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
16162 | ECHO_T=' ';; | |
16163 | esac;; | |
16164 | *) | |
16165 | ECHO_N='-n';; | |
bec39cab AC |
16166 | esac |
16167 | ||
81ecdfbb RW |
16168 | rm -f conf$$ conf$$.exe conf$$.file |
16169 | if test -d conf$$.dir; then | |
16170 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 16171 | else |
81ecdfbb RW |
16172 | rm -f conf$$.dir |
16173 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 16174 | fi |
81ecdfbb RW |
16175 | if (echo >conf$$.file) 2>/dev/null; then |
16176 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 16177 | as_ln_s='ln -s' |
81ecdfbb RW |
16178 | # ... but there are two gotchas: |
16179 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
16180 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
16181 | # In both cases, we have to default to `cp -p'. | |
16182 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
16183 | as_ln_s='cp -p' | |
16184 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
16185 | as_ln_s=ln | |
16186 | else | |
16187 | as_ln_s='cp -p' | |
b4e70030 | 16188 | fi |
bec39cab AC |
16189 | else |
16190 | as_ln_s='cp -p' | |
16191 | fi | |
81ecdfbb RW |
16192 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
16193 | rmdir conf$$.dir 2>/dev/null | |
16194 | ||
16195 | ||
16196 | # as_fn_mkdir_p | |
16197 | # ------------- | |
16198 | # Create "$as_dir" as a directory, including parents if necessary. | |
16199 | as_fn_mkdir_p () | |
16200 | { | |
16201 | ||
16202 | case $as_dir in #( | |
16203 | -*) as_dir=./$as_dir;; | |
16204 | esac | |
16205 | test -d "$as_dir" || eval $as_mkdir_p || { | |
16206 | as_dirs= | |
16207 | while :; do | |
16208 | case $as_dir in #( | |
16209 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
16210 | *) as_qdir=$as_dir;; | |
16211 | esac | |
16212 | as_dirs="'$as_qdir' $as_dirs" | |
16213 | as_dir=`$as_dirname -- "$as_dir" || | |
16214 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16215 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
16216 | X"$as_dir" : 'X\(//\)$' \| \ | |
16217 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
16218 | $as_echo X"$as_dir" | | |
16219 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16220 | s//\1/ | |
16221 | q | |
16222 | } | |
16223 | /^X\(\/\/\)[^/].*/{ | |
16224 | s//\1/ | |
16225 | q | |
16226 | } | |
16227 | /^X\(\/\/\)$/{ | |
16228 | s//\1/ | |
16229 | q | |
16230 | } | |
16231 | /^X\(\/\).*/{ | |
16232 | s//\1/ | |
16233 | q | |
16234 | } | |
16235 | s/.*/./; q'` | |
16236 | test -d "$as_dir" && break | |
16237 | done | |
16238 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
16239 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
16240 | ||
bec39cab | 16241 | |
81ecdfbb | 16242 | } # as_fn_mkdir_p |
bec39cab | 16243 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 16244 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
16245 | else |
16246 | test -d ./-p && rmdir ./-p | |
16247 | as_mkdir_p=false | |
16248 | fi | |
16249 | ||
81ecdfbb RW |
16250 | if test -x / >/dev/null 2>&1; then |
16251 | as_test_x='test -x' | |
16252 | else | |
16253 | if ls -dL / >/dev/null 2>&1; then | |
16254 | as_ls_L_option=L | |
16255 | else | |
16256 | as_ls_L_option= | |
16257 | fi | |
16258 | as_test_x=' | |
16259 | eval sh -c '\'' | |
16260 | if test -d "$1"; then | |
16261 | test -d "$1/."; | |
16262 | else | |
16263 | case $1 in #( | |
16264 | -*)set "./$1";; | |
16265 | esac; | |
16266 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
16267 | ???[sx]*):;;*)false;;esac;fi | |
16268 | '\'' sh | |
16269 | ' | |
16270 | fi | |
16271 | as_executable_p=$as_test_x | |
bec39cab AC |
16272 | |
16273 | # Sed expression to map a string onto a valid CPP name. | |
16274 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
16275 | ||
16276 | # Sed expression to map a string onto a valid variable name. | |
16277 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
16278 | ||
16279 | ||
bec39cab | 16280 | exec 6>&1 |
81ecdfbb RW |
16281 | ## ----------------------------------- ## |
16282 | ## Main body of $CONFIG_STATUS script. ## | |
16283 | ## ----------------------------------- ## | |
16284 | _ASEOF | |
16285 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
16286 | ||
16287 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16288 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 16289 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
16290 | # values after options handling. |
16291 | ac_log=" | |
bec39cab | 16292 | This file was extended by $as_me, which was |
81ecdfbb | 16293 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
16294 | |
16295 | CONFIG_FILES = $CONFIG_FILES | |
16296 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16297 | CONFIG_LINKS = $CONFIG_LINKS | |
16298 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16299 | $ $0 $@ | |
16300 | ||
81ecdfbb RW |
16301 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
16302 | " | |
16303 | ||
bec39cab AC |
16304 | _ACEOF |
16305 | ||
81ecdfbb RW |
16306 | case $ac_config_files in *" |
16307 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
16308 | esac | |
234b45d4 | 16309 | |
81ecdfbb RW |
16310 | case $ac_config_headers in *" |
16311 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
16312 | esac | |
b4e70030 | 16313 | |
b4e70030 | 16314 | |
81ecdfbb RW |
16315 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
16316 | # Files that config.status was made for. | |
16317 | config_files="$ac_config_files" | |
16318 | config_headers="$ac_config_headers" | |
16319 | config_links="$ac_config_links" | |
16320 | config_commands="$ac_config_commands" | |
234b45d4 | 16321 | |
81ecdfbb | 16322 | _ACEOF |
b4e70030 | 16323 | |
81ecdfbb | 16324 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 16325 | ac_cs_usage="\ |
81ecdfbb RW |
16326 | \`$as_me' instantiates files and other configuration actions |
16327 | from templates according to the current configuration. Unless the files | |
16328 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 16329 | |
81ecdfbb | 16330 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 16331 | |
bec39cab | 16332 | -h, --help print this help, then exit |
81ecdfbb RW |
16333 | -V, --version print version number and configuration settings, then exit |
16334 | -q, --quiet, --silent | |
16335 | do not print progress messages | |
bec39cab AC |
16336 | -d, --debug don't remove temporary files |
16337 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
16338 | --file=FILE[:TEMPLATE] |
16339 | instantiate the configuration file FILE | |
16340 | --header=FILE[:TEMPLATE] | |
16341 | instantiate the configuration header FILE | |
234b45d4 | 16342 | |
bec39cab AC |
16343 | Configuration files: |
16344 | $config_files | |
234b45d4 | 16345 | |
bec39cab AC |
16346 | Configuration headers: |
16347 | $config_headers | |
234b45d4 | 16348 | |
bec39cab AC |
16349 | Configuration links: |
16350 | $config_links | |
234b45d4 | 16351 | |
bec39cab AC |
16352 | Configuration commands: |
16353 | $config_commands | |
16354 | ||
81ecdfbb | 16355 | Report bugs to the package provider." |
b4e70030 | 16356 | |
81ecdfbb RW |
16357 | _ACEOF |
16358 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
16359 | ac_cs_version="\\ |
16360 | config.status | |
81ecdfbb RW |
16361 | configured by $0, generated by GNU Autoconf 2.64, |
16362 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 16363 | |
81ecdfbb | 16364 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
16365 | This config.status script is free software; the Free Software Foundation |
16366 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
16367 | |
16368 | ac_pwd='$ac_pwd' | |
16369 | srcdir='$srcdir' | |
16370 | INSTALL='$INSTALL' | |
16371 | MKDIR_P='$MKDIR_P' | |
16372 | AWK='$AWK' | |
16373 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
16374 | _ACEOF |
16375 | ||
81ecdfbb RW |
16376 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16377 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
16378 | ac_need_defaults=: |
16379 | while test $# != 0 | |
16380 | do | |
16381 | case $1 in | |
16382 | --*=*) | |
81ecdfbb RW |
16383 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
16384 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 16385 | ac_shift=: |
c906108c | 16386 | ;; |
81ecdfbb | 16387 | *) |
bec39cab AC |
16388 | ac_option=$1 |
16389 | ac_optarg=$2 | |
16390 | ac_shift=shift | |
c906108c | 16391 | ;; |
bec39cab | 16392 | esac |
c906108c | 16393 | |
bec39cab AC |
16394 | case $ac_option in |
16395 | # Handling of the options. | |
bec39cab AC |
16396 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
16397 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
16398 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
16399 | $as_echo "$ac_cs_version"; exit ;; | |
16400 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
16401 | debug=: ;; |
16402 | --file | --fil | --fi | --f ) | |
16403 | $ac_shift | |
81ecdfbb RW |
16404 | case $ac_optarg in |
16405 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16406 | esac | |
16407 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
16408 | ac_need_defaults=false;; |
16409 | --header | --heade | --head | --hea ) | |
16410 | $ac_shift | |
81ecdfbb RW |
16411 | case $ac_optarg in |
16412 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16413 | esac | |
16414 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 16415 | ac_need_defaults=false;; |
81ecdfbb RW |
16416 | --he | --h) |
16417 | # Conflict between --help and --header | |
16418 | as_fn_error "ambiguous option: \`$1' | |
16419 | Try \`$0 --help' for more information.";; | |
16420 | --help | --hel | -h ) | |
16421 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
16422 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
16423 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16424 | ac_cs_silent=: ;; | |
c906108c | 16425 | |
bec39cab | 16426 | # This is an error. |
81ecdfbb RW |
16427 | -*) as_fn_error "unrecognized option: \`$1' |
16428 | Try \`$0 --help' for more information." ;; | |
c906108c | 16429 | |
81ecdfbb RW |
16430 | *) as_fn_append ac_config_targets " $1" |
16431 | ac_need_defaults=false ;; | |
c906108c | 16432 | |
bec39cab AC |
16433 | esac |
16434 | shift | |
16435 | done | |
c906108c | 16436 | |
bec39cab | 16437 | ac_configure_extra_args= |
c906108c | 16438 | |
bec39cab AC |
16439 | if $ac_cs_silent; then |
16440 | exec 6>/dev/null | |
16441 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
16442 | fi | |
c906108c | 16443 | |
bec39cab | 16444 | _ACEOF |
81ecdfbb | 16445 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 16446 | if \$ac_cs_recheck; then |
81ecdfbb RW |
16447 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
16448 | shift | |
16449 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
16450 | CONFIG_SHELL='$SHELL' | |
16451 | export CONFIG_SHELL | |
16452 | exec "\$@" | |
bec39cab AC |
16453 | fi |
16454 | ||
16455 | _ACEOF | |
81ecdfbb RW |
16456 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16457 | exec 5>>config.log | |
16458 | { | |
16459 | echo | |
16460 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16461 | ## Running $as_me. ## | |
16462 | _ASBOX | |
16463 | $as_echo "$ac_log" | |
16464 | } >&5 | |
bec39cab | 16465 | |
81ecdfbb RW |
16466 | _ACEOF |
16467 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 16468 | # |
81ecdfbb | 16469 | # INIT-COMMANDS |
c906108c | 16470 | # |
a417dc56 | 16471 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
e28b3332 | 16472 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
b4e70030 | 16473 | |
bec39cab AC |
16474 | _ACEOF |
16475 | ||
81ecdfbb | 16476 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 16477 | |
81ecdfbb | 16478 | # Handling of arguments. |
bec39cab | 16479 | for ac_config_target in $ac_config_targets |
c906108c | 16480 | do |
81ecdfbb RW |
16481 | case $ac_config_target in |
16482 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
16483 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
16484 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
16485 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; | |
16486 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
16487 | ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;; | |
16488 | "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; | |
16489 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16490 | ||
16491 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
16492 | esac |
16493 | done | |
16494 | ||
81ecdfbb | 16495 | |
bec39cab AC |
16496 | # If the user did not use the arguments to specify the items to instantiate, |
16497 | # then the envvar interface is used. Set only those that are not. | |
16498 | # We use the long form for the default assignment because of an extremely | |
16499 | # bizarre bug on SunOS 4.1.3. | |
16500 | if $ac_need_defaults; then | |
16501 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16502 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16503 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
16504 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16505 | fi | |
16506 | ||
b4e70030 | 16507 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 16508 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 16509 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
16510 | # Hook for its removal unless debugging. |
16511 | # Note that there is a small window in which the directory will not be cleaned: | |
16512 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
16513 | $debug || |
16514 | { | |
81ecdfbb RW |
16515 | tmp= |
16516 | trap 'exit_status=$? | |
16517 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
16518 | ' 0 | |
16519 | trap 'as_fn_exit 1' 1 2 13 15 | |
16520 | } | |
16521 | # Create a (secure) tmp directory for tmp files. | |
16522 | ||
16523 | { | |
16524 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
16525 | test -n "$tmp" && test -d "$tmp" | |
16526 | } || | |
16527 | { | |
16528 | tmp=./conf$$-$RANDOM | |
16529 | (umask 077 && mkdir "$tmp") | |
16530 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
16531 | ||
16532 | # Set up the scripts for CONFIG_FILES section. | |
16533 | # No need to generate them if there are no CONFIG_FILES. | |
16534 | # This happens for instance with `./config.status config.h'. | |
16535 | if test -n "$CONFIG_FILES"; then | |
16536 | ||
16537 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
16538 | ac_cs_awk_getline=: | |
16539 | ac_cs_awk_pipe_init= | |
16540 | ac_cs_awk_read_file=' | |
16541 | while ((getline aline < (F[key])) > 0) | |
16542 | print(aline) | |
16543 | close(F[key])' | |
16544 | ac_cs_awk_pipe_fini= | |
16545 | else | |
16546 | ac_cs_awk_getline=false | |
16547 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
16548 | ac_cs_awk_read_file=' | |
16549 | print "|#_!!_#|" | |
16550 | print "cat " F[key] " &&" | |
16551 | '$ac_cs_awk_pipe_init | |
16552 | # The final `:' finishes the AND list. | |
16553 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
16554 | fi | |
16555 | ac_cr=`echo X | tr X '\015'` | |
16556 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
16557 | # But we know of no other shell where ac_cr would be empty at this | |
16558 | # point, so we can use a bashism as a fallback. | |
16559 | if test "x$ac_cr" = x; then | |
16560 | eval ac_cr=\$\'\\r\' | |
16561 | fi | |
16562 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
16563 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
16564 | ac_cs_awk_cr='\r' | |
16565 | else | |
16566 | ac_cs_awk_cr=$ac_cr | |
16567 | fi | |
16568 | ||
16569 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
16570 | _ACEOF | |
16571 | ||
16572 | # Create commands to substitute file output variables. | |
16573 | { | |
16574 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
16575 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
16576 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
16577 | echo "_ACAWK" && | |
16578 | echo "_ACEOF" | |
16579 | } >conf$$files.sh && | |
16580 | . ./conf$$files.sh || | |
16581 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16582 | rm -f conf$$files.sh | |
16583 | ||
16584 | { | |
16585 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
16586 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
16587 | echo "_ACEOF" | |
16588 | } >conf$$subs.sh || | |
16589 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16590 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
16591 | ac_delim='%!_!# ' | |
16592 | for ac_last_try in false false false false false :; do | |
16593 | . ./conf$$subs.sh || | |
16594 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16595 | ||
16596 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
16597 | if test $ac_delim_n = $ac_delim_num; then | |
16598 | break | |
16599 | elif $ac_last_try; then | |
16600 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16601 | else | |
16602 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16603 | fi | |
16604 | done | |
16605 | rm -f conf$$subs.sh | |
16606 | ||
16607 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16608 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
16609 | _ACEOF | |
16610 | sed -n ' | |
16611 | h | |
16612 | s/^/S["/; s/!.*/"]=/ | |
16613 | p | |
16614 | g | |
16615 | s/^[^!]*!// | |
16616 | :repl | |
16617 | t repl | |
16618 | s/'"$ac_delim"'$// | |
16619 | t delim | |
16620 | :nl | |
16621 | h | |
16622 | s/\(.\{148\}\).*/\1/ | |
16623 | t more1 | |
16624 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
16625 | p | |
16626 | n | |
16627 | b repl | |
16628 | :more1 | |
16629 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16630 | p | |
16631 | g | |
16632 | s/.\{148\}// | |
16633 | t nl | |
16634 | :delim | |
16635 | h | |
16636 | s/\(.\{148\}\).*/\1/ | |
16637 | t more2 | |
16638 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
16639 | p | |
16640 | b | |
16641 | :more2 | |
16642 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16643 | p | |
16644 | g | |
16645 | s/.\{148\}// | |
16646 | t delim | |
16647 | ' <conf$$subs.awk | sed ' | |
16648 | /^[^""]/{ | |
16649 | N | |
16650 | s/\n// | |
16651 | } | |
16652 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
16653 | rm -f conf$$subs.awk | |
16654 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16655 | _ACAWK | |
16656 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
16657 | for (key in S) S_is_set[key] = 1 | |
16658 | FS = "\a" | |
16659 | \$ac_cs_awk_pipe_init | |
16660 | } | |
16661 | { | |
16662 | line = $ 0 | |
16663 | nfields = split(line, field, "@") | |
16664 | substed = 0 | |
16665 | len = length(field[1]) | |
16666 | for (i = 2; i < nfields; i++) { | |
16667 | key = field[i] | |
16668 | keylen = length(key) | |
16669 | if (S_is_set[key]) { | |
16670 | value = S[key] | |
16671 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
16672 | len += length(value) + length(field[++i]) | |
16673 | substed = 1 | |
16674 | } else | |
16675 | len += 1 + keylen | |
16676 | } | |
16677 | if (nfields == 3 && !substed) { | |
16678 | key = field[2] | |
16679 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
16680 | \$ac_cs_awk_read_file | |
16681 | next | |
16682 | } | |
16683 | } | |
16684 | print line | |
b4e70030 | 16685 | } |
81ecdfbb RW |
16686 | \$ac_cs_awk_pipe_fini |
16687 | _ACAWK | |
16688 | _ACEOF | |
16689 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16690 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
16691 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
16692 | else | |
16693 | cat | |
16694 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
16695 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
16696 | _ACEOF | |
16697 | ||
16698 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
16699 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16700 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16701 | # (actually we leave an empty line to preserve line numbers). | |
16702 | if test "x$srcdir" = x.; then | |
16703 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
16704 | s/:*\$(srcdir):*/:/ | |
16705 | s/:*\${srcdir}:*/:/ | |
16706 | s/:*@srcdir@:*/:/ | |
16707 | s/^\([^=]*=[ ]*\):*/\1/ | |
16708 | s/:*$// | |
16709 | s/^[^=]*=[ ]*$// | |
16710 | }' | |
16711 | fi | |
16712 | ||
16713 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16714 | fi # test -n "$CONFIG_FILES" | |
16715 | ||
16716 | # Set up the scripts for CONFIG_HEADERS section. | |
16717 | # No need to generate them if there are no CONFIG_HEADERS. | |
16718 | # This happens for instance with `./config.status Makefile'. | |
16719 | if test -n "$CONFIG_HEADERS"; then | |
16720 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
16721 | BEGIN { | |
16722 | _ACEOF | |
16723 | ||
16724 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
16725 | # here-document in config.status, that substitutes the proper values into | |
16726 | # config.h.in to produce config.h. | |
4e8d927d | 16727 | |
81ecdfbb RW |
16728 | # Create a delimiter string that does not exist in confdefs.h, to ease |
16729 | # handling of long lines. | |
16730 | ac_delim='%!_!# ' | |
16731 | for ac_last_try in false false :; do | |
16732 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
16733 | if test -z "$ac_t"; then | |
16734 | break | |
16735 | elif $ac_last_try; then | |
16736 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
16737 | else | |
16738 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16739 | fi | |
16740 | done | |
4e8d927d | 16741 | |
81ecdfbb RW |
16742 | # For the awk script, D is an array of macro values keyed by name, |
16743 | # likewise P contains macro parameters if any. Preserve backslash | |
16744 | # newline sequences. | |
16745 | ||
16746 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
16747 | sed -n ' | |
16748 | s/.\{148\}/&'"$ac_delim"'/g | |
16749 | t rset | |
16750 | :rset | |
16751 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
16752 | t def | |
16753 | d | |
16754 | :def | |
16755 | s/\\$// | |
16756 | t bsnl | |
16757 | s/["\\]/\\&/g | |
16758 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16759 | D["\1"]=" \3"/p | |
16760 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
16761 | d | |
16762 | :bsnl | |
16763 | s/["\\]/\\&/g | |
16764 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16765 | D["\1"]=" \3\\\\\\n"\\/p | |
16766 | t cont | |
16767 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
16768 | t cont | |
16769 | d | |
16770 | :cont | |
16771 | n | |
16772 | s/.\{148\}/&'"$ac_delim"'/g | |
16773 | t clear | |
16774 | :clear | |
16775 | s/\\$// | |
16776 | t bsnlc | |
16777 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
16778 | d | |
16779 | :bsnlc | |
16780 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
16781 | b cont | |
16782 | ' <confdefs.h | sed ' | |
16783 | s/'"$ac_delim"'/"\\\ | |
16784 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
16785 | ||
16786 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16787 | for (key in D) D_is_set[key] = 1 | |
16788 | FS = "\a" | |
16789 | } | |
16790 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
16791 | line = \$ 0 | |
16792 | split(line, arg, " ") | |
16793 | if (arg[1] == "#") { | |
16794 | defundef = arg[2] | |
16795 | mac1 = arg[3] | |
16796 | } else { | |
16797 | defundef = substr(arg[1], 2) | |
16798 | mac1 = arg[2] | |
16799 | } | |
16800 | split(mac1, mac2, "(") #) | |
16801 | macro = mac2[1] | |
16802 | prefix = substr(line, 1, index(line, defundef) - 1) | |
16803 | if (D_is_set[macro]) { | |
16804 | # Preserve the white space surrounding the "#". | |
16805 | print prefix "define", macro P[macro] D[macro] | |
16806 | next | |
16807 | } else { | |
16808 | # Replace #undef with comments. This is necessary, for example, | |
16809 | # in the case of _POSIX_SOURCE, which is predefined and required | |
16810 | # on some systems where configure will not decide to define it. | |
16811 | if (defundef == "undef") { | |
16812 | print "/*", prefix defundef, macro, "*/" | |
16813 | next | |
16814 | } | |
16815 | } | |
b4e70030 | 16816 | } |
81ecdfbb RW |
16817 | { print } |
16818 | _ACAWK | |
b4e70030 | 16819 | _ACEOF |
81ecdfbb RW |
16820 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16821 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
16822 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 16823 | |
4e8d927d | 16824 | |
81ecdfbb RW |
16825 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
16826 | shift | |
16827 | for ac_tag | |
16828 | do | |
16829 | case $ac_tag in | |
16830 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
16831 | esac | |
16832 | case $ac_mode$ac_tag in | |
16833 | :[FHL]*:*);; | |
16834 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
16835 | :[FH]-) ac_tag=-:-;; | |
16836 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
16837 | esac | |
16838 | ac_save_IFS=$IFS | |
16839 | IFS=: | |
16840 | set x $ac_tag | |
16841 | IFS=$ac_save_IFS | |
16842 | shift | |
16843 | ac_file=$1 | |
16844 | shift | |
4e8d927d | 16845 | |
81ecdfbb RW |
16846 | case $ac_mode in |
16847 | :L) ac_source=$1;; | |
16848 | :[FH]) | |
16849 | ac_file_inputs= | |
16850 | for ac_f | |
16851 | do | |
16852 | case $ac_f in | |
16853 | -) ac_f="$tmp/stdin";; | |
16854 | *) # Look for the file first in the build tree, then in the source tree | |
16855 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
16856 | # because $ac_f cannot contain `:'. | |
16857 | test -f "$ac_f" || | |
16858 | case $ac_f in | |
16859 | [\\/$]*) false;; | |
16860 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
16861 | esac || | |
16862 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
16863 | esac | |
16864 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
16865 | as_fn_append ac_file_inputs " '$ac_f'" | |
16866 | done | |
16867 | ||
16868 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
16869 | # use $as_me), people would be surprised to read: | |
16870 | # /* config.h. Generated by config.status. */ | |
16871 | configure_input='Generated from '` | |
16872 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
16873 | `' by configure.' | |
16874 | if test x"$ac_file" != x-; then | |
16875 | configure_input="$ac_file. $configure_input" | |
16876 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
16877 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 16878 | fi |
81ecdfbb RW |
16879 | # Neutralize special characters interpreted by sed in replacement strings. |
16880 | case $configure_input in #( | |
16881 | *\&* | *\|* | *\\* ) | |
16882 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
16883 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
16884 | *) ac_sed_conf_input=$configure_input;; | |
16885 | esac | |
4e8d927d | 16886 | |
81ecdfbb RW |
16887 | case $ac_tag in |
16888 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
16889 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
16890 | esac | |
16891 | ;; | |
c906108c SS |
16892 | esac |
16893 | ||
81ecdfbb | 16894 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
16895 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
16896 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
16897 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16898 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
16899 | $as_echo X"$ac_file" | | |
16900 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16901 | s//\1/ | |
16902 | q | |
16903 | } | |
16904 | /^X\(\/\/\)[^/].*/{ | |
16905 | s//\1/ | |
16906 | q | |
16907 | } | |
16908 | /^X\(\/\/\)$/{ | |
16909 | s//\1/ | |
16910 | q | |
16911 | } | |
16912 | /^X\(\/\).*/{ | |
16913 | s//\1/ | |
16914 | q | |
16915 | } | |
16916 | s/.*/./; q'` | |
16917 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16918 | ac_builddir=. |
16919 | ||
81ecdfbb RW |
16920 | case "$ac_dir" in |
16921 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16922 | *) | |
16923 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16924 | # A ".." for each directory in $ac_dir_suffix. | |
16925 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16926 | case $ac_top_builddir_sub in | |
16927 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16928 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16929 | esac ;; | |
16930 | esac | |
16931 | ac_abs_top_builddir=$ac_pwd | |
16932 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16933 | # for backward compatibility: | |
16934 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16935 | |
16936 | case $srcdir in | |
81ecdfbb | 16937 | .) # We are building in place. |
bec39cab | 16938 | ac_srcdir=. |
81ecdfbb RW |
16939 | ac_top_srcdir=$ac_top_builddir_sub |
16940 | ac_abs_top_srcdir=$ac_pwd ;; | |
16941 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16942 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16943 | ac_top_srcdir=$srcdir |
16944 | ac_abs_top_srcdir=$srcdir ;; | |
16945 | *) # Relative name. | |
16946 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16947 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16948 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16949 | esac |
81ecdfbb | 16950 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 16951 | |
c906108c | 16952 | |
81ecdfbb RW |
16953 | case $ac_mode in |
16954 | :F) | |
16955 | # | |
16956 | # CONFIG_FILE | |
16957 | # | |
c906108c | 16958 | |
bec39cab AC |
16959 | case $INSTALL in |
16960 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 16961 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 16962 | esac |
81ecdfbb RW |
16963 | ac_MKDIR_P=$MKDIR_P |
16964 | case $MKDIR_P in | |
16965 | [\\/$]* | ?:[\\/]* ) ;; | |
16966 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
16967 | esac | |
16968 | _ACEOF | |
121ce6e5 | 16969 | |
81ecdfbb RW |
16970 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16971 | # If the template does not know about datarootdir, expand it. | |
16972 | # FIXME: This hack should be removed a few years after 2.60. | |
16973 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
16974 | ac_sed_dataroot=' | |
16975 | /datarootdir/ { | |
16976 | p | |
16977 | q | |
16978 | } | |
16979 | /@datadir@/p | |
16980 | /@docdir@/p | |
16981 | /@infodir@/p | |
16982 | /@localedir@/p | |
16983 | /@mandir@/p' | |
16984 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
16985 | *datarootdir*) ac_datarootdir_seen=yes;; | |
16986 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
16987 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
16988 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
16989 | _ACEOF | |
16990 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16991 | ac_datarootdir_hack=' | |
16992 | s&@datadir@&$datadir&g | |
16993 | s&@docdir@&$docdir&g | |
16994 | s&@infodir@&$infodir&g | |
16995 | s&@localedir@&$localedir&g | |
16996 | s&@mandir@&$mandir&g | |
16997 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
16998 | esac | |
4e8d927d | 16999 | _ACEOF |
81ecdfbb RW |
17000 | |
17001 | # Neutralize VPATH when `$srcdir' = `.'. | |
17002 | # Shell code in configure.ac might set extrasub. | |
17003 | # FIXME: do we really want to maintain this feature? | |
17004 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17005 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
17006 | $extrasub |
17007 | _ACEOF | |
81ecdfbb | 17008 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
17009 | :t |
17010 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
17011 | s|@configure_input@|$ac_sed_conf_input|;t t |
17012 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
17013 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
17014 | s&@srcdir@&$ac_srcdir&;t t | |
17015 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
17016 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
17017 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
17018 | s&@builddir@&$ac_builddir&;t t | |
17019 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
17020 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
17021 | s&@INSTALL@&$ac_INSTALL&;t t | |
17022 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
17023 | $ac_datarootdir_hack | |
17024 | " | |
17025 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
17026 | if $ac_cs_awk_getline; then | |
17027 | $AWK -f "$tmp/subs.awk" | |
17028 | else | |
17029 | $AWK -f "$tmp/subs.awk" | $SHELL | |
17030 | fi >$tmp/out \ | |
17031 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17032 | ||
17033 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
17034 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
17035 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
17036 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17037 | which seems to be undefined. Please make sure it is defined." >&5 | |
17038 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17039 | which seems to be undefined. Please make sure it is defined." >&2;} | |
17040 | ||
17041 | rm -f "$tmp/stdin" | |
bec39cab | 17042 | case $ac_file in |
81ecdfbb RW |
17043 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
17044 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
17045 | esac \ | |
17046 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17047 | ;; | |
17048 | :H) | |
17049 | # | |
17050 | # CONFIG_HEADER | |
17051 | # | |
bec39cab | 17052 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
17053 | { |
17054 | $as_echo "/* $configure_input */" \ | |
17055 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
17056 | } >"$tmp/config.h" \ | |
17057 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17058 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
17059 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
17060 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 17061 | else |
81ecdfbb RW |
17062 | rm -f "$ac_file" |
17063 | mv "$tmp/config.h" "$ac_file" \ | |
17064 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
17065 | fi |
17066 | else | |
81ecdfbb RW |
17067 | $as_echo "/* $configure_input */" \ |
17068 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
17069 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 17070 | fi |
81ecdfbb RW |
17071 | # Compute "$ac_file"'s index in $config_headers. |
17072 | _am_arg="$ac_file" | |
e28b3332 DJ |
17073 | _am_stamp_count=1 |
17074 | for _am_header in $config_headers :; do | |
17075 | case $_am_header in | |
81ecdfbb | 17076 | $_am_arg | $_am_arg:* ) |
e28b3332 DJ |
17077 | break ;; |
17078 | * ) | |
17079 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
17080 | esac | |
17081 | done | |
81ecdfbb RW |
17082 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || |
17083 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17084 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
17085 | X"$_am_arg" : 'X\(//\)$' \| \ | |
17086 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
17087 | $as_echo X"$_am_arg" | | |
17088 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17089 | s//\1/ | |
17090 | q | |
17091 | } | |
17092 | /^X\(\/\/\)[^/].*/{ | |
17093 | s//\1/ | |
17094 | q | |
17095 | } | |
17096 | /^X\(\/\/\)$/{ | |
17097 | s//\1/ | |
17098 | q | |
17099 | } | |
17100 | /^X\(\/\).*/{ | |
17101 | s//\1/ | |
17102 | q | |
17103 | } | |
17104 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
17105 | ;; | |
17106 | :L) | |
17107 | # | |
17108 | # CONFIG_LINK | |
17109 | # | |
c906108c | 17110 | |
81ecdfbb RW |
17111 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
17112 | : | |
b4e70030 | 17113 | else |
81ecdfbb RW |
17114 | # Prefer the file from the source tree if names are identical. |
17115 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
17116 | ac_source=$srcdir/$ac_source | |
17117 | fi | |
b4e70030 | 17118 | |
81ecdfbb RW |
17119 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
17120 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 17121 | |
81ecdfbb RW |
17122 | if test ! -r "$ac_source"; then |
17123 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
17124 | fi | |
17125 | rm -f "$ac_file" | |
bec39cab | 17126 | |
81ecdfbb RW |
17127 | # Try a relative symlink, then a hard link, then a copy. |
17128 | case $srcdir in | |
17129 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
17130 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
17131 | esac | |
17132 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
17133 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
17134 | cp -p "$ac_source" "$ac_file" || | |
17135 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
17136 | fi | |
17137 | ;; | |
17138 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
17139 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
17140 | ;; | |
c906108c | 17141 | esac |
b4e70030 | 17142 | |
bec39cab | 17143 | |
81ecdfbb RW |
17144 | case $ac_file$ac_mode in |
17145 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
17146 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
17147 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
17148 | # are listed without --file. Let's play safe and only enable the eval | |
17149 | # if we detect the quoting. | |
17150 | case $CONFIG_FILES in | |
17151 | *\'*) eval set x "$CONFIG_FILES" ;; | |
17152 | *) set x $CONFIG_FILES ;; | |
17153 | esac | |
17154 | shift | |
17155 | for mf | |
17156 | do | |
17157 | # Strip MF so we end up with the name of the file. | |
17158 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
17159 | # Check whether this is an Automake generated Makefile or not. | |
17160 | # We used to match only the files named `Makefile.in', but | |
17161 | # some people rename them; so instead we look at the file content. | |
17162 | # Grep'ing the first line is not enough: some people post-process | |
17163 | # each Makefile.in and add a new line on top of each file to say so. | |
17164 | # Grep'ing the whole file is not good either: AIX grep has a line | |
17165 | # limit of 2048, but all sed's we know have understand at least 4000. | |
17166 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
17167 | dirpart=`$as_dirname -- "$mf" || | |
e28b3332 DJ |
17168 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17169 | X"$mf" : 'X\(//\)[^/]' \| \ | |
17170 | X"$mf" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17171 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || |
17172 | $as_echo X"$mf" | | |
17173 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17174 | s//\1/ | |
17175 | q | |
17176 | } | |
17177 | /^X\(\/\/\)[^/].*/{ | |
17178 | s//\1/ | |
17179 | q | |
17180 | } | |
17181 | /^X\(\/\/\)$/{ | |
17182 | s//\1/ | |
17183 | q | |
17184 | } | |
17185 | /^X\(\/\).*/{ | |
17186 | s//\1/ | |
17187 | q | |
17188 | } | |
17189 | s/.*/./; q'` | |
17190 | else | |
17191 | continue | |
17192 | fi | |
17193 | # Extract the definition of DEPDIR, am__include, and am__quote | |
17194 | # from the Makefile without running `make'. | |
17195 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
17196 | test -z "$DEPDIR" && continue | |
17197 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
17198 | test -z "am__include" && continue | |
17199 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
17200 | # When using ansi2knr, U may be empty or an underscore; expand it | |
17201 | U=`sed -n 's/^U = //p' < "$mf"` | |
17202 | # Find all dependency output files, they are included files with | |
17203 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
17204 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
17205 | # expansion. | |
17206 | for file in `sed -n " | |
17207 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
17208 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
17209 | # Make sure the directory exists. | |
17210 | test -f "$dirpart/$file" && continue | |
17211 | fdir=`$as_dirname -- "$file" || | |
e28b3332 DJ |
17212 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17213 | X"$file" : 'X\(//\)[^/]' \| \ | |
17214 | X"$file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17215 | X"$file" : 'X\(/\)' \| . 2>/dev/null || |
17216 | $as_echo X"$file" | | |
17217 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17218 | s//\1/ | |
17219 | q | |
17220 | } | |
17221 | /^X\(\/\/\)[^/].*/{ | |
17222 | s//\1/ | |
17223 | q | |
17224 | } | |
17225 | /^X\(\/\/\)$/{ | |
17226 | s//\1/ | |
17227 | q | |
17228 | } | |
17229 | /^X\(\/\).*/{ | |
17230 | s//\1/ | |
17231 | q | |
17232 | } | |
17233 | s/.*/./; q'` | |
17234 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
17235 | # echo "creating $dirpart/$file" | |
17236 | echo '# dummy' > "$dirpart/$file" | |
e28b3332 | 17237 | done |
e28b3332 | 17238 | done |
81ecdfbb | 17239 | } |
4e8d927d | 17240 | ;; |
81ecdfbb | 17241 | "default":C) |
c906108c SS |
17242 | case x$CONFIG_HEADERS in |
17243 | xconfig.h:config.in) | |
17244 | echo > stamp-h ;; | |
17245 | esac | |
bec39cab | 17246 | ;; |
81ecdfbb | 17247 | |
bec39cab | 17248 | esac |
81ecdfbb | 17249 | done # for ac_tag |
c906108c | 17250 | |
bec39cab | 17251 | |
81ecdfbb | 17252 | as_fn_exit 0 |
bec39cab | 17253 | _ACEOF |
bec39cab AC |
17254 | ac_clean_files=$ac_clean_files_save |
17255 | ||
81ecdfbb RW |
17256 | test $ac_write_fail = 0 || |
17257 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
17258 | ||
bec39cab AC |
17259 | |
17260 | # configure is writing to config.log, and then calls config.status. | |
17261 | # config.status does its own redirection, appending to config.log. | |
17262 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17263 | # by configure, so config.status won't be able to write to it; its | |
17264 | # output is simply discarded. So we exec the FD to /dev/null, | |
17265 | # effectively closing config.log, so it can be properly (re)opened and | |
17266 | # appended to by config.status. When coming back to configure, we | |
17267 | # need to make the FD available again. | |
17268 | if test "$no_create" != yes; then | |
17269 | ac_cs_success=: | |
17270 | ac_config_status_args= | |
17271 | test "$silent" = yes && | |
17272 | ac_config_status_args="$ac_config_status_args --quiet" | |
17273 | exec 5>/dev/null | |
17274 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17275 | exec 5>>config.log | |
17276 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17277 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 17278 | $ac_cs_success || as_fn_exit $? |
bec39cab | 17279 | fi |
c906108c | 17280 | |
bec39cab | 17281 | # |
81ecdfbb | 17282 | # CONFIG_SUBDIRS section. |
bec39cab | 17283 | # |
c906108c SS |
17284 | if test "$no_recursion" != yes; then |
17285 | ||
81ecdfbb RW |
17286 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
17287 | # so they do not pile up. | |
c906108c SS |
17288 | ac_sub_configure_args= |
17289 | ac_prev= | |
fdc59709 PB |
17290 | eval "set x $ac_configure_args" |
17291 | shift | |
17292 | for ac_arg | |
17293 | do | |
c906108c SS |
17294 | if test -n "$ac_prev"; then |
17295 | ac_prev= | |
17296 | continue | |
17297 | fi | |
bec39cab | 17298 | case $ac_arg in |
c906108c SS |
17299 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
17300 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
17301 | ac_prev=cache_file ;; | |
17302 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
17303 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
17304 | | --c=*) | |
17305 | ;; | |
17306 | --config-cache | -C) | |
c906108c SS |
17307 | ;; |
17308 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
17309 | ac_prev=srcdir ;; | |
17310 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
17311 | ;; | |
bec39cab AC |
17312 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
17313 | ac_prev=prefix ;; | |
17314 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
17315 | ;; | |
81ecdfbb RW |
17316 | --disable-option-checking) |
17317 | ;; | |
fdc59709 PB |
17318 | *) |
17319 | case $ac_arg in | |
81ecdfbb | 17320 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17321 | esac |
81ecdfbb | 17322 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
17323 | esac |
17324 | done | |
17325 | ||
bec39cab AC |
17326 | # Always prepend --prefix to ensure using the same prefix |
17327 | # in subdir configurations. | |
fdc59709 PB |
17328 | ac_arg="--prefix=$prefix" |
17329 | case $ac_arg in | |
81ecdfbb | 17330 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17331 | esac |
81ecdfbb RW |
17332 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
17333 | ||
17334 | # Pass --silent | |
17335 | if test "$silent" = yes; then | |
17336 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
17337 | fi | |
17338 | ||
17339 | # Always prepend --disable-option-checking to silence warnings, since | |
17340 | # different subdirs can have different --enable and --with options. | |
17341 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 17342 | |
b4e70030 | 17343 | ac_popdir=`pwd` |
bec39cab | 17344 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
17345 | |
17346 | # Do not complain, so a configure script can configure whichever | |
17347 | # parts of a large source tree are present. | |
fdc59709 | 17348 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 17349 | |
81ecdfbb RW |
17350 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
17351 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
17352 | $as_echo "$ac_msg" >&6 | |
17353 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17354 | ac_builddir=. |
17355 | ||
81ecdfbb RW |
17356 | case "$ac_dir" in |
17357 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17358 | *) | |
17359 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17360 | # A ".." for each directory in $ac_dir_suffix. | |
17361 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17362 | case $ac_top_builddir_sub in | |
17363 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17364 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17365 | esac ;; | |
17366 | esac | |
17367 | ac_abs_top_builddir=$ac_pwd | |
17368 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17369 | # for backward compatibility: | |
17370 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17371 | |
17372 | case $srcdir in | |
81ecdfbb | 17373 | .) # We are building in place. |
bec39cab | 17374 | ac_srcdir=. |
81ecdfbb RW |
17375 | ac_top_srcdir=$ac_top_builddir_sub |
17376 | ac_abs_top_srcdir=$ac_pwd ;; | |
17377 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17378 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17379 | ac_top_srcdir=$srcdir |
17380 | ac_abs_top_srcdir=$srcdir ;; | |
17381 | *) # Relative name. | |
17382 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17383 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17384 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17385 | esac |
81ecdfbb | 17386 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 17387 | |
c906108c | 17388 | |
fdc59709 | 17389 | cd "$ac_dir" |
c906108c SS |
17390 | |
17391 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
17392 | if test -f "$ac_srcdir/configure.gnu"; then |
17393 | ac_sub_configure=$ac_srcdir/configure.gnu | |
17394 | elif test -f "$ac_srcdir/configure"; then | |
17395 | ac_sub_configure=$ac_srcdir/configure | |
17396 | elif test -f "$ac_srcdir/configure.in"; then | |
17397 | # This should be Cygnus configure. | |
17398 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 17399 | else |
81ecdfbb RW |
17400 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
17401 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
17402 | ac_sub_configure= |
17403 | fi | |
17404 | ||
17405 | # The recursion is here. | |
17406 | if test -n "$ac_sub_configure"; then | |
c906108c | 17407 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
17408 | case $cache_file in |
17409 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
17410 | *) # Relative name. |
17411 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 17412 | esac |
c906108c | 17413 | |
81ecdfbb RW |
17414 | { $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 |
17415 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 17416 | # The eval makes quoting arguments work. |
fdc59709 PB |
17417 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
17418 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 17419 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
17420 | fi |
17421 | ||
fdc59709 | 17422 | cd "$ac_popdir" |
c906108c SS |
17423 | done |
17424 | fi | |
81ecdfbb RW |
17425 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
17426 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
17427 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
17428 | fi | |
c906108c SS |
17429 | |
17430 | ||
17431 | exit 0 |