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= |
81ecdfbb RW |
592 | enable_option_checking=no |
593 | ac_subst_vars='am__EXEEXT_FALSE | |
594 | am__EXEEXT_TRUE | |
595 | gltests_LTLIBOBJS | |
596 | gltests_LIBOBJS | |
597 | gl_LTLIBOBJS | |
598 | gl_LIBOBJS | |
599 | LTLIBOBJS | |
600 | LIBOBJS | |
601 | GDB_NM_FILE | |
602 | frags | |
603 | target_subdir | |
604 | CONFIG_UNINSTALL | |
605 | CONFIG_INSTALL | |
606 | CONFIG_CLEAN | |
607 | CONFIG_ALL | |
608 | CONFIG_SRCS | |
609 | CONFIG_DEPS | |
610 | CONFIG_OBS | |
611 | PROFILE_CFLAGS | |
612 | ENABLE_CFLAGS | |
613 | SIM_OBS | |
614 | SIM | |
615 | XMKMF | |
616 | GDBTK_SRC_DIR | |
617 | GDBTK_CFLAGS | |
618 | GDBTKLIBS | |
619 | X_LIBS | |
620 | X_LDFLAGS | |
621 | X_CFLAGS | |
622 | TK_XINCLUDES | |
623 | TK_DEPS | |
624 | TK_LIBRARY | |
625 | TK_INCLUDE | |
626 | TK_STUB_LIB_SPEC | |
627 | TK_STUB_LIB_FLAG | |
628 | TK_STUB_LIB_FILE | |
629 | TK_LIB_SPEC | |
630 | TK_LIB_FLAG | |
631 | TK_LIB_FILE | |
632 | TK_SRC_DIR | |
633 | TK_BIN_DIR | |
634 | TK_VERSION | |
635 | TCL_DEPS | |
636 | TCL_LIBRARY | |
637 | TCL_INCLUDE | |
638 | TCL_STUB_LIB_SPEC | |
639 | TCL_STUB_LIB_FLAG | |
640 | TCL_STUB_LIB_FILE | |
641 | TCL_LIB_SPEC | |
642 | TCL_LIB_FLAG | |
643 | TCL_LIB_FILE | |
644 | TCL_SRC_DIR | |
645 | TCL_BIN_DIR | |
646 | TCL_PATCH_LEVEL | |
647 | TCL_VERSION | |
648 | WIN32LDAPP | |
649 | GUI_CFLAGS_X | |
650 | LIBGUI | |
651 | WIN32LIBS | |
652 | SER_HARDWIRE | |
653 | WERROR_CFLAGS | |
654 | WARN_CFLAGS | |
655 | SYSTEM_GDBINIT | |
656 | TARGET_SYSTEM_ROOT_DEFINE | |
657 | TARGET_SYSTEM_ROOT | |
658 | CONFIG_LDFLAGS | |
659 | ALLOCA | |
660 | PYTHON_CFLAGS | |
661 | LTLIBEXPAT | |
662 | LIBEXPAT | |
663 | HAVE_LIBEXPAT | |
664 | READLINE_CFLAGS | |
665 | READLINE_DEPS | |
666 | READLINE | |
667 | MIG | |
668 | WINDRES | |
669 | DLLTOOL | |
670 | AR | |
671 | YFLAGS | |
672 | YACC | |
673 | LN_S | |
674 | REPORT_BUGS_TEXI | |
675 | REPORT_BUGS_TO | |
676 | PKGVERSION | |
677 | TARGET_OBS | |
678 | subdirs | |
679 | GDB_DATADIR | |
680 | DEBUGDIR | |
681 | am__fastdepCC_FALSE | |
682 | am__fastdepCC_TRUE | |
683 | AMDEPBACKSLASH | |
684 | AMDEP_FALSE | |
685 | AMDEP_TRUE | |
686 | am__quote | |
687 | am__include | |
688 | am__untar | |
689 | am__tar | |
690 | AMTAR | |
691 | AWK | |
692 | mkdir_p | |
693 | MKDIR_P | |
694 | INSTALL_STRIP_PROGRAM | |
695 | STRIP | |
696 | install_sh | |
697 | MAKEINFO | |
698 | AUTOHEADER | |
699 | AUTOMAKE | |
700 | AUTOCONF | |
701 | ACLOCAL | |
702 | VERSION | |
703 | CYGPATH_W | |
704 | am__isrc | |
705 | INSTALL_DATA | |
706 | INSTALL_SCRIPT | |
707 | INSTALL_PROGRAM | |
708 | PACKAGE | |
709 | GNULIB_STDINT_H | |
710 | LIBGNU_LTLIBDEPS | |
711 | LIBGNU_LIBDEPS | |
712 | NEXT_WCHAR_H | |
713 | HAVE_WCHAR_H | |
714 | WCHAR_H | |
715 | REPLACE_WCWIDTH | |
716 | HAVE_DECL_WCWIDTH | |
717 | GNULIB_WCWIDTH | |
718 | NEXT_STRING_H | |
719 | STDINT_H | |
720 | WINT_T_SUFFIX | |
721 | WCHAR_T_SUFFIX | |
722 | SIZE_T_SUFFIX | |
723 | SIG_ATOMIC_T_SUFFIX | |
724 | PTRDIFF_T_SUFFIX | |
725 | HAVE_SIGNED_WINT_T | |
726 | HAVE_SIGNED_WCHAR_T | |
727 | HAVE_SIGNED_SIG_ATOMIC_T | |
728 | BITSIZEOF_WINT_T | |
729 | BITSIZEOF_WCHAR_T | |
730 | BITSIZEOF_SIZE_T | |
731 | BITSIZEOF_SIG_ATOMIC_T | |
732 | BITSIZEOF_PTRDIFF_T | |
733 | HAVE_SYS_BITYPES_H | |
734 | HAVE_SYS_INTTYPES_H | |
735 | HAVE_STDINT_H | |
736 | NEXT_STDINT_H | |
737 | INCLUDE_NEXT | |
738 | HAVE_SYS_TYPES_H | |
739 | HAVE_INTTYPES_H | |
740 | HAVE_UNSIGNED_LONG_LONG_INT | |
741 | HAVE_LONG_LONG_INT | |
742 | REPLACE_STRSTR | |
743 | REPLACE_STRCASESTR | |
744 | REPLACE_MEMMEM | |
745 | REPLACE_STRSIGNAL | |
746 | REPLACE_STRERROR | |
747 | HAVE_DECL_STRSIGNAL | |
748 | HAVE_DECL_STRERROR | |
749 | HAVE_DECL_STRTOK_R | |
750 | HAVE_STRCASESTR | |
751 | HAVE_STRSEP | |
752 | HAVE_STRPBRK | |
753 | HAVE_DECL_STRNLEN | |
754 | HAVE_DECL_STRNDUP | |
755 | HAVE_STRNDUP | |
756 | HAVE_DECL_STRDUP | |
757 | HAVE_STRCHRNUL | |
758 | HAVE_STPNCPY | |
759 | HAVE_STPCPY | |
760 | HAVE_DECL_MEMRCHR | |
761 | HAVE_MEMPCPY | |
762 | HAVE_DECL_MEMMEM | |
763 | GNULIB_STRSIGNAL | |
764 | GNULIB_STRERROR | |
765 | GNULIB_MBSTOK_R | |
766 | GNULIB_MBSSEP | |
767 | GNULIB_MBSSPN | |
768 | GNULIB_MBSPBRK | |
769 | GNULIB_MBSCSPN | |
770 | GNULIB_MBSCASESTR | |
771 | GNULIB_MBSPCASECMP | |
772 | GNULIB_MBSNCASECMP | |
773 | GNULIB_MBSCASECMP | |
774 | GNULIB_MBSSTR | |
775 | GNULIB_MBSRCHR | |
776 | GNULIB_MBSCHR | |
777 | GNULIB_MBSNLEN | |
778 | GNULIB_MBSLEN | |
779 | GNULIB_STRTOK_R | |
780 | GNULIB_STRCASESTR | |
781 | GNULIB_STRSTR | |
782 | GNULIB_STRSEP | |
783 | GNULIB_STRPBRK | |
784 | GNULIB_STRNLEN | |
785 | GNULIB_STRNDUP | |
786 | GNULIB_STRDUP | |
787 | GNULIB_STRCHRNUL | |
788 | GNULIB_STPNCPY | |
789 | GNULIB_STPCPY | |
790 | GNULIB_MEMRCHR | |
791 | GNULIB_MEMPCPY | |
792 | GNULIB_MEMMEM | |
793 | GL_COND_LIBTOOL_FALSE | |
794 | GL_COND_LIBTOOL_TRUE | |
795 | CATOBJEXT | |
796 | GENCAT | |
797 | INSTOBJEXT | |
798 | DATADIRNAME | |
799 | CATALOGS | |
800 | POSUB | |
801 | GMSGFMT | |
802 | XGETTEXT | |
803 | INCINTL | |
804 | LIBINTL_DEP | |
805 | LIBINTL | |
806 | USE_NLS | |
807 | SET_MAKE | |
808 | GMAKE_FALSE | |
809 | GMAKE_TRUE | |
810 | MAKE | |
811 | CCDEPMODE | |
812 | DEPDIR | |
813 | am__leading_dot | |
814 | target_os | |
815 | target_vendor | |
816 | target_cpu | |
817 | target | |
818 | host_os | |
819 | host_vendor | |
820 | host_cpu | |
821 | host | |
822 | build_os | |
823 | build_vendor | |
824 | build_cpu | |
825 | build | |
826 | RANLIB | |
827 | EGREP | |
828 | GREP | |
829 | CPP | |
830 | OBJEXT | |
831 | EXEEXT | |
832 | ac_ct_CC | |
833 | CPPFLAGS | |
834 | LDFLAGS | |
835 | CFLAGS | |
836 | CC | |
837 | MAINT | |
838 | MAINTAINER_MODE_FALSE | |
839 | MAINTAINER_MODE_TRUE | |
840 | target_alias | |
841 | host_alias | |
842 | build_alias | |
843 | LIBS | |
844 | ECHO_T | |
845 | ECHO_N | |
846 | ECHO_C | |
847 | DEFS | |
848 | mandir | |
849 | localedir | |
850 | libdir | |
851 | psdir | |
852 | pdfdir | |
853 | dvidir | |
854 | htmldir | |
855 | infodir | |
856 | docdir | |
857 | oldincludedir | |
858 | includedir | |
859 | localstatedir | |
860 | sharedstatedir | |
861 | sysconfdir | |
862 | datadir | |
863 | datarootdir | |
864 | libexecdir | |
865 | sbindir | |
866 | bindir | |
867 | program_transform_name | |
868 | prefix | |
869 | exec_prefix | |
870 | PACKAGE_URL | |
871 | PACKAGE_BUGREPORT | |
872 | PACKAGE_STRING | |
873 | PACKAGE_VERSION | |
874 | PACKAGE_TARNAME | |
875 | PACKAGE_NAME | |
876 | PATH_SEPARATOR | |
877 | SHELL' | |
a4ce5b0d | 878 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
879 | ac_user_opts=' |
880 | enable_option_checking | |
881 | enable_maintainer_mode | |
882 | enable_dependency_tracking | |
883 | with_separate_debug_dir | |
884 | with_gdb_datadir | |
885 | with_relocated_sources | |
886 | enable_targets | |
887 | enable_64_bit_bfd | |
888 | enable_gdbcli | |
889 | enable_gdbmi | |
890 | enable_tui | |
891 | enable_gdbtk | |
892 | with_libunwind | |
893 | with_curses | |
894 | enable_profiling | |
895 | with_pkgversion | |
896 | with_bugurl | |
897 | with_libiconv_prefix | |
898 | with_system_readline | |
899 | with_expat | |
900 | with_gnu_ld | |
901 | enable_rpath | |
902 | with_libexpat_prefix | |
903 | with_python | |
904 | with_included_regex | |
905 | with_sysroot | |
906 | with_system_gdbinit | |
907 | enable_werror | |
908 | enable_build_warnings | |
909 | enable_gdb_build_warnings | |
910 | with_tcl | |
911 | with_tk | |
912 | with_x | |
913 | enable_sim | |
914 | enable_multi_ice | |
81ecdfbb RW |
915 | ' |
916 | ac_precious_vars='build_alias | |
917 | host_alias | |
918 | target_alias | |
919 | CC | |
920 | CFLAGS | |
921 | LDFLAGS | |
922 | LIBS | |
923 | CPPFLAGS | |
924 | CPP | |
925 | YACC | |
926 | YFLAGS | |
927 | XMKMF' | |
928 | ac_subdirs_all='doc testsuite | |
929 | gdbtk | |
930 | multi-ice | |
931 | gdbserver' | |
c906108c SS |
932 | |
933 | # Initialize some variables set by options. | |
bec39cab AC |
934 | ac_init_help= |
935 | ac_init_version=false | |
81ecdfbb RW |
936 | ac_unrecognized_opts= |
937 | ac_unrecognized_sep= | |
c906108c SS |
938 | # The variables have the same names as the options, with |
939 | # dashes changed to underlines. | |
bec39cab | 940 | cache_file=/dev/null |
c906108c | 941 | exec_prefix=NONE |
c906108c | 942 | no_create= |
c906108c SS |
943 | no_recursion= |
944 | prefix=NONE | |
945 | program_prefix=NONE | |
946 | program_suffix=NONE | |
947 | program_transform_name=s,x,x, | |
948 | silent= | |
949 | site= | |
950 | srcdir= | |
c906108c SS |
951 | verbose= |
952 | x_includes=NONE | |
953 | x_libraries=NONE | |
bec39cab AC |
954 | |
955 | # Installation directory options. | |
956 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
957 | # and all the variables that are supposed to be based on exec_prefix | |
958 | # by default will actually change. | |
959 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 960 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
961 | bindir='${exec_prefix}/bin' |
962 | sbindir='${exec_prefix}/sbin' | |
963 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
964 | datarootdir='${prefix}/share' |
965 | datadir='${datarootdir}' | |
c906108c SS |
966 | sysconfdir='${prefix}/etc' |
967 | sharedstatedir='${prefix}/com' | |
968 | localstatedir='${prefix}/var' | |
c906108c SS |
969 | includedir='${prefix}/include' |
970 | oldincludedir='/usr/include' | |
81ecdfbb RW |
971 | docdir='${datarootdir}/doc/${PACKAGE}' |
972 | infodir='${datarootdir}/info' | |
973 | htmldir='${docdir}' | |
974 | dvidir='${docdir}' | |
975 | pdfdir='${docdir}' | |
976 | psdir='${docdir}' | |
977 | libdir='${exec_prefix}/lib' | |
978 | localedir='${datarootdir}/locale' | |
979 | mandir='${datarootdir}/man' | |
c906108c | 980 | |
c906108c | 981 | ac_prev= |
81ecdfbb | 982 | ac_dashdash= |
c906108c SS |
983 | for ac_option |
984 | do | |
c906108c SS |
985 | # If the previous option needs an argument, assign it. |
986 | if test -n "$ac_prev"; then | |
81ecdfbb | 987 | eval $ac_prev=\$ac_option |
c906108c SS |
988 | ac_prev= |
989 | continue | |
990 | fi | |
991 | ||
81ecdfbb RW |
992 | case $ac_option in |
993 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
994 | *) ac_optarg=yes ;; | |
995 | esac | |
c906108c SS |
996 | |
997 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
998 | ||
81ecdfbb RW |
999 | case $ac_dashdash$ac_option in |
1000 | --) | |
1001 | ac_dashdash=yes ;; | |
c906108c SS |
1002 | |
1003 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1004 | ac_prev=bindir ;; | |
1005 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1006 | bindir=$ac_optarg ;; |
c906108c SS |
1007 | |
1008 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1009 | ac_prev=build_alias ;; |
c906108c | 1010 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1011 | build_alias=$ac_optarg ;; |
c906108c SS |
1012 | |
1013 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1014 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1015 | ac_prev=cache_file ;; | |
1016 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1017 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1018 | cache_file=$ac_optarg ;; |
1019 | ||
1020 | --config-cache | -C) | |
1021 | cache_file=config.cache ;; | |
c906108c | 1022 | |
81ecdfbb | 1023 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1024 | ac_prev=datadir ;; |
81ecdfbb | 1025 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1026 | datadir=$ac_optarg ;; |
c906108c | 1027 | |
81ecdfbb RW |
1028 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1029 | | --dataroo | --dataro | --datar) | |
1030 | ac_prev=datarootdir ;; | |
1031 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1032 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1033 | datarootdir=$ac_optarg ;; | |
1034 | ||
c906108c | 1035 | -disable-* | --disable-*) |
81ecdfbb | 1036 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1037 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1038 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1039 | as_fn_error "invalid feature name: $ac_useropt" | |
1040 | ac_useropt_orig=$ac_useropt | |
1041 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1042 | case $ac_user_opts in | |
1043 | *" | |
1044 | "enable_$ac_useropt" | |
1045 | "*) ;; | |
1046 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1047 | ac_unrecognized_sep=', ';; | |
1048 | esac | |
1049 | eval enable_$ac_useropt=no ;; | |
1050 | ||
1051 | -docdir | --docdir | --docdi | --doc | --do) | |
1052 | ac_prev=docdir ;; | |
1053 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1054 | docdir=$ac_optarg ;; | |
1055 | ||
1056 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1057 | ac_prev=dvidir ;; | |
1058 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1059 | dvidir=$ac_optarg ;; | |
c906108c SS |
1060 | |
1061 | -enable-* | --enable-*) | |
81ecdfbb | 1062 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1063 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1064 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1065 | as_fn_error "invalid feature name: $ac_useropt" | |
1066 | ac_useropt_orig=$ac_useropt | |
1067 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1068 | case $ac_user_opts in | |
1069 | *" | |
1070 | "enable_$ac_useropt" | |
1071 | "*) ;; | |
1072 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1073 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1074 | esac |
81ecdfbb | 1075 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1076 | |
1077 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1078 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1079 | | --exec | --exe | --ex) | |
1080 | ac_prev=exec_prefix ;; | |
1081 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1082 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1083 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1084 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1085 | |
1086 | -gas | --gas | --ga | --g) | |
1087 | # Obsolete; use --with-gas. | |
1088 | with_gas=yes ;; | |
1089 | ||
bec39cab AC |
1090 | -help | --help | --hel | --he | -h) |
1091 | ac_init_help=long ;; | |
1092 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1093 | ac_init_help=recursive ;; | |
1094 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1095 | ac_init_help=short ;; | |
c906108c SS |
1096 | |
1097 | -host | --host | --hos | --ho) | |
bec39cab | 1098 | ac_prev=host_alias ;; |
c906108c | 1099 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1100 | host_alias=$ac_optarg ;; |
c906108c | 1101 | |
81ecdfbb RW |
1102 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1103 | ac_prev=htmldir ;; | |
1104 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1105 | | --ht=*) | |
1106 | htmldir=$ac_optarg ;; | |
1107 | ||
c906108c SS |
1108 | -includedir | --includedir | --includedi | --included | --include \ |
1109 | | --includ | --inclu | --incl | --inc) | |
1110 | ac_prev=includedir ;; | |
1111 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1112 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1113 | includedir=$ac_optarg ;; |
c906108c SS |
1114 | |
1115 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1116 | ac_prev=infodir ;; | |
1117 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1118 | infodir=$ac_optarg ;; |
c906108c SS |
1119 | |
1120 | -libdir | --libdir | --libdi | --libd) | |
1121 | ac_prev=libdir ;; | |
1122 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1123 | libdir=$ac_optarg ;; |
c906108c SS |
1124 | |
1125 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1126 | | --libexe | --libex | --libe) | |
1127 | ac_prev=libexecdir ;; | |
1128 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1129 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1130 | libexecdir=$ac_optarg ;; |
c906108c | 1131 | |
81ecdfbb RW |
1132 | -localedir | --localedir | --localedi | --localed | --locale) |
1133 | ac_prev=localedir ;; | |
1134 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1135 | localedir=$ac_optarg ;; | |
1136 | ||
c906108c | 1137 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1138 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1139 | ac_prev=localstatedir ;; |
1140 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1141 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1142 | localstatedir=$ac_optarg ;; |
c906108c SS |
1143 | |
1144 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1145 | ac_prev=mandir ;; | |
1146 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1147 | mandir=$ac_optarg ;; |
c906108c SS |
1148 | |
1149 | -nfp | --nfp | --nf) | |
1150 | # Obsolete; use --without-fp. | |
1151 | with_fp=no ;; | |
1152 | ||
1153 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1154 | | --no-cr | --no-c | -n) |
c906108c SS |
1155 | no_create=yes ;; |
1156 | ||
1157 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1158 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1159 | no_recursion=yes ;; | |
1160 | ||
1161 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1162 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1163 | | --oldin | --oldi | --old | --ol | --o) | |
1164 | ac_prev=oldincludedir ;; | |
1165 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1166 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1167 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1168 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1169 | |
1170 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1171 | ac_prev=prefix ;; | |
1172 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1173 | prefix=$ac_optarg ;; |
c906108c SS |
1174 | |
1175 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1176 | | --program-pre | --program-pr | --program-p) | |
1177 | ac_prev=program_prefix ;; | |
1178 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1179 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1180 | program_prefix=$ac_optarg ;; |
c906108c SS |
1181 | |
1182 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1183 | | --program-suf | --program-su | --program-s) | |
1184 | ac_prev=program_suffix ;; | |
1185 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1186 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1187 | program_suffix=$ac_optarg ;; |
c906108c SS |
1188 | |
1189 | -program-transform-name | --program-transform-name \ | |
1190 | | --program-transform-nam | --program-transform-na \ | |
1191 | | --program-transform-n | --program-transform- \ | |
1192 | | --program-transform | --program-transfor \ | |
1193 | | --program-transfo | --program-transf \ | |
1194 | | --program-trans | --program-tran \ | |
1195 | | --progr-tra | --program-tr | --program-t) | |
1196 | ac_prev=program_transform_name ;; | |
1197 | -program-transform-name=* | --program-transform-name=* \ | |
1198 | | --program-transform-nam=* | --program-transform-na=* \ | |
1199 | | --program-transform-n=* | --program-transform-=* \ | |
1200 | | --program-transform=* | --program-transfor=* \ | |
1201 | | --program-transfo=* | --program-transf=* \ | |
1202 | | --program-trans=* | --program-tran=* \ | |
1203 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1204 | program_transform_name=$ac_optarg ;; |
c906108c | 1205 | |
81ecdfbb RW |
1206 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1207 | ac_prev=pdfdir ;; | |
1208 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1209 | pdfdir=$ac_optarg ;; | |
1210 | ||
1211 | -psdir | --psdir | --psdi | --psd | --ps) | |
1212 | ac_prev=psdir ;; | |
1213 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1214 | psdir=$ac_optarg ;; | |
1215 | ||
c906108c SS |
1216 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1217 | | -silent | --silent | --silen | --sile | --sil) | |
1218 | silent=yes ;; | |
1219 | ||
1220 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1221 | ac_prev=sbindir ;; | |
1222 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1223 | | --sbi=* | --sb=*) | |
bec39cab | 1224 | sbindir=$ac_optarg ;; |
c906108c SS |
1225 | |
1226 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1227 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1228 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1229 | | --sha | --sh) | |
1230 | ac_prev=sharedstatedir ;; | |
1231 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1232 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1233 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1234 | | --sha=* | --sh=*) | |
bec39cab | 1235 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1236 | |
1237 | -site | --site | --sit) | |
1238 | ac_prev=site ;; | |
1239 | -site=* | --site=* | --sit=*) | |
bec39cab | 1240 | site=$ac_optarg ;; |
3ace7edb | 1241 | |
c906108c SS |
1242 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1243 | ac_prev=srcdir ;; | |
1244 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1245 | srcdir=$ac_optarg ;; |
c906108c SS |
1246 | |
1247 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1248 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1249 | ac_prev=sysconfdir ;; | |
1250 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1251 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1252 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1253 | |
1254 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1255 | ac_prev=target_alias ;; |
c906108c | 1256 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1257 | target_alias=$ac_optarg ;; |
c906108c SS |
1258 | |
1259 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1260 | verbose=yes ;; | |
1261 | ||
bec39cab AC |
1262 | -version | --version | --versio | --versi | --vers | -V) |
1263 | ac_init_version=: ;; | |
c906108c SS |
1264 | |
1265 | -with-* | --with-*) | |
81ecdfbb | 1266 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1267 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1268 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1269 | as_fn_error "invalid package name: $ac_useropt" | |
1270 | ac_useropt_orig=$ac_useropt | |
1271 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1272 | case $ac_user_opts in | |
1273 | *" | |
1274 | "with_$ac_useropt" | |
1275 | "*) ;; | |
1276 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1277 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1278 | esac |
81ecdfbb | 1279 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1280 | |
1281 | -without-* | --without-*) | |
81ecdfbb | 1282 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1283 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1284 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1285 | as_fn_error "invalid package name: $ac_useropt" | |
1286 | ac_useropt_orig=$ac_useropt | |
1287 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1288 | case $ac_user_opts in | |
1289 | *" | |
1290 | "with_$ac_useropt" | |
1291 | "*) ;; | |
1292 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1293 | ac_unrecognized_sep=', ';; | |
1294 | esac | |
1295 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1296 | |
1297 | --x) | |
1298 | # Obsolete; use --with-x. | |
1299 | with_x=yes ;; | |
1300 | ||
1301 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1302 | | --x-incl | --x-inc | --x-in | --x-i) | |
1303 | ac_prev=x_includes ;; | |
1304 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1305 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1306 | x_includes=$ac_optarg ;; |
c906108c SS |
1307 | |
1308 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1309 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1310 | ac_prev=x_libraries ;; | |
1311 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1312 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1313 | x_libraries=$ac_optarg ;; |
c906108c | 1314 | |
81ecdfbb RW |
1315 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1316 | Try \`$0 --help' for more information." | |
c906108c SS |
1317 | ;; |
1318 | ||
bec39cab AC |
1319 | *=*) |
1320 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1321 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1322 | case $ac_envvar in #( |
1323 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1324 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1325 | esac | |
1326 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1327 | export $ac_envvar ;; |
1328 | ||
c906108c | 1329 | *) |
bec39cab | 1330 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1331 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1332 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1333 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1334 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1335 | ;; |
1336 | ||
1337 | esac | |
1338 | done | |
1339 | ||
1340 | if test -n "$ac_prev"; then | |
bec39cab | 1341 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1342 | as_fn_error "missing argument to $ac_option" |
c906108c | 1343 | fi |
c906108c | 1344 | |
81ecdfbb RW |
1345 | if test -n "$ac_unrecognized_opts"; then |
1346 | case $enable_option_checking in | |
1347 | no) ;; | |
1348 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1349 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1350 | esac |
81ecdfbb | 1351 | fi |
b4e70030 | 1352 | |
81ecdfbb RW |
1353 | # Check all directory arguments for consistency. |
1354 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1355 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1356 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1357 | libdir localedir mandir | |
b4e70030 | 1358 | do |
81ecdfbb RW |
1359 | eval ac_val=\$$ac_var |
1360 | # Remove trailing slashes. | |
1361 | case $ac_val in | |
1362 | */ ) | |
1363 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1364 | eval $ac_var=\$ac_val;; | |
1365 | esac | |
1366 | # Be sure to have absolute directory names. | |
b4e70030 | 1367 | case $ac_val in |
81ecdfbb RW |
1368 | [\\/$]* | ?:[\\/]* ) continue;; |
1369 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1370 | esac |
81ecdfbb | 1371 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1372 | done |
1373 | ||
bec39cab AC |
1374 | # There might be people who depend on the old broken behavior: `$host' |
1375 | # used to hold the argument of --host etc. | |
1376 | # FIXME: To remove some day. | |
1377 | build=$build_alias | |
1378 | host=$host_alias | |
1379 | target=$target_alias | |
1380 | ||
1381 | # FIXME: To remove some day. | |
1382 | if test "x$host_alias" != x; then | |
1383 | if test "x$build_alias" = x; then | |
1384 | cross_compiling=maybe | |
81ecdfbb | 1385 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1386 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1387 | elif test "x$build_alias" != "x$host_alias"; then | |
1388 | cross_compiling=yes | |
1389 | fi | |
1390 | fi | |
c906108c | 1391 | |
bec39cab AC |
1392 | ac_tool_prefix= |
1393 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1394 | ||
1395 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1396 | |
c906108c | 1397 | |
81ecdfbb RW |
1398 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1399 | ac_ls_di=`ls -di .` && | |
1400 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1401 | as_fn_error "working directory cannot be determined" | |
1402 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1403 | as_fn_error "pwd does not report name of working directory" | |
1404 | ||
1405 | ||
c906108c SS |
1406 | # Find the source files, if location was not specified. |
1407 | if test -z "$srcdir"; then | |
1408 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1409 | # Try the directory containing this script, then the parent directory. |
1410 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1411 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1412 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1413 | X"$as_myself" : 'X\(//\)$' \| \ | |
1414 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1415 | $as_echo X"$as_myself" | | |
1416 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1417 | s//\1/ | |
1418 | q | |
1419 | } | |
1420 | /^X\(\/\/\)[^/].*/{ | |
1421 | s//\1/ | |
1422 | q | |
1423 | } | |
1424 | /^X\(\/\/\)$/{ | |
1425 | s//\1/ | |
1426 | q | |
1427 | } | |
1428 | /^X\(\/\).*/{ | |
1429 | s//\1/ | |
1430 | q | |
1431 | } | |
1432 | s/.*/./; q'` | |
c906108c | 1433 | srcdir=$ac_confdir |
81ecdfbb | 1434 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1435 | srcdir=.. |
1436 | fi | |
1437 | else | |
1438 | ac_srcdir_defaulted=no | |
1439 | fi | |
81ecdfbb RW |
1440 | if test ! -r "$srcdir/$ac_unique_file"; then |
1441 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1442 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1443 | fi | |
1444 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1445 | ac_abs_confdir=`( | |
1446 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1447 | pwd)` | |
1448 | # When building in place, set srcdir=. | |
1449 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1450 | srcdir=. | |
1451 | fi | |
1452 | # Remove unnecessary trailing slashes from srcdir. | |
1453 | # Double slashes in file names in object file debugging info | |
1454 | # mess up M-x gdb in Emacs. | |
1455 | case $srcdir in | |
1456 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1457 | esac | |
1458 | for ac_var in $ac_precious_vars; do | |
1459 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1460 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1461 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1462 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1463 | done | |
c906108c | 1464 | |
bec39cab AC |
1465 | # |
1466 | # Report the --help message. | |
1467 | # | |
1468 | if test "$ac_init_help" = "long"; then | |
1469 | # Omit some internal or obsolete options to make the list less imposing. | |
1470 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1471 | cat <<_ACEOF | |
1472 | \`configure' configures this package to adapt to many kinds of systems. | |
1473 | ||
1474 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1475 | ||
1476 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1477 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1478 | ||
1479 | Defaults for the options are specified in brackets. | |
1480 | ||
1481 | Configuration: | |
1482 | -h, --help display this help and exit | |
1483 | --help=short display options specific to this package | |
1484 | --help=recursive display the short help of all the included packages | |
1485 | -V, --version display version information and exit | |
1486 | -q, --quiet, --silent do not print \`checking...' messages | |
1487 | --cache-file=FILE cache test results in FILE [disabled] | |
1488 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1489 | -n, --no-create do not create output files | |
1490 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1491 | ||
bec39cab AC |
1492 | Installation directories: |
1493 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1494 | [$ac_default_prefix] |
bec39cab | 1495 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1496 | [PREFIX] |
bec39cab AC |
1497 | |
1498 | By default, \`make install' will install all the files in | |
1499 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1500 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1501 | for instance \`--prefix=\$HOME'. | |
1502 | ||
1503 | For better control, use the options below. | |
1504 | ||
1505 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1506 | --bindir=DIR user executables [EPREFIX/bin] |
1507 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1508 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1509 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1510 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1511 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1512 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1513 | --includedir=DIR C header files [PREFIX/include] | |
1514 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1515 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1516 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1517 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1518 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1519 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1520 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1521 | --htmldir=DIR html documentation [DOCDIR] | |
1522 | --dvidir=DIR dvi documentation [DOCDIR] | |
1523 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1524 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1525 | _ACEOF |
1526 | ||
1527 | cat <<\_ACEOF | |
1528 | ||
1529 | Program names: | |
1530 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1531 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1532 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1533 | ||
1534 | X features: | |
1535 | --x-includes=DIR X include files are in DIR | |
1536 | --x-libraries=DIR X library files are in DIR | |
1537 | ||
1538 | System types: | |
1539 | --build=BUILD configure for building on BUILD [guessed] | |
1540 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1541 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1542 | _ACEOF | |
1543 | fi | |
1544 | ||
1545 | if test -n "$ac_init_help"; then | |
1546 | ||
1547 | cat <<\_ACEOF | |
1548 | ||
1549 | Optional Features: | |
81ecdfbb | 1550 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1551 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1552 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1553 | --enable-maintainer-mode enable make rules and dependencies not useful |
1554 | (and sometimes confusing) to the casual installer | |
e28b3332 DJ |
1555 | --disable-dependency-tracking speeds up one-time build |
1556 | --enable-dependency-tracking do not reject slow dependency extractors | |
a1220294 TT |
1557 | --enable-targets=TARGETS |
1558 | alternative target configurations | |
c0993dbe | 1559 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1560 | --disable-gdbcli disable command-line interface (CLI) |
1561 | --disable-gdbmi disable machine-interface (MI) | |
1562 | --enable-tui enable full-screen terminal user interface (TUI) | |
1563 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1564 | --enable-profiling enable profiling of GDB | |
3841debe | 1565 | --disable-rpath do not hardcode runtime library paths |
a1220294 | 1566 | --enable-werror treat compile warnings as errors |
32c1c914 | 1567 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1568 | --enable-gdb-build-warnings |
32c1c914 | 1569 | enable GDB specific build-time compiler warnings if |
a1220294 | 1570 | gcc is used |
32c1c914 | 1571 | --enable-sim link gdb with simulator |
bec39cab AC |
1572 | --enable-multi-ice build the multi-ice-gdb-server |
1573 | ||
1574 | Optional Packages: | |
1575 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1576 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1577 | --with-separate-debug-dir=PATH |
32c1c914 | 1578 | look for global separate debug info in this path |
62e4f60c | 1579 | [LIBDIR/debug] |
b14b1491 TT |
1580 | --with-gdb-datadir=PATH look for global separate data files in this path |
1581 | [DATADIR/gdb] | |
29b0e8a2 | 1582 | --with-relocated-sources=PATH |
32c1c914 TT |
1583 | automatically relocate this path for source files |
1584 | --with-libunwind use libunwind frame unwinding support | |
cb01cfba JB |
1585 | --with-curses use the curses library instead of the termcap |
1586 | library | |
c16158bc JM |
1587 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1588 | --with-bugurl=URL Direct users to URL to report a bug | |
a1220294 TT |
1589 | --with-libiconv-prefix=DIR |
1590 | search for libiconv in DIR/include and DIR/lib | |
6a30b0a5 | 1591 | --with-system-readline use installed readline library |
5c39566f | 1592 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1593 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1594 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1595 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
d57a3c85 | 1596 | --with-python include python support (auto/yes/no/<path>) |
a1220294 TT |
1597 | --without-included-regex |
1598 | don't use included regex; this is the default on | |
1599 | systems with version 2 of the GNU C library (use | |
1600 | with caution on other system) | |
81ecdfbb | 1601 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1602 | --with-system-gdbinit=PATH |
32c1c914 | 1603 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1604 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1605 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1606 | --with-x use the X Window System |
bec39cab AC |
1607 | |
1608 | Some influential environment variables: | |
1609 | CC C compiler command | |
1610 | CFLAGS C compiler flags | |
1611 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1612 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1613 | LIBS libraries to pass to the linker, e.g. -l<library> |
1614 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1615 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1616 | CPP C preprocessor |
81ecdfbb RW |
1617 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1618 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1619 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1620 | This script will default YFLAGS to the empty string to avoid a | |
1621 | default value of `-d' given by some make applications. | |
1622 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1623 | |
1624 | Use these variables to override the choices made by `configure' or to help | |
1625 | it to find libraries and programs with nonstandard names/locations. | |
1626 | ||
81ecdfbb | 1627 | Report bugs to the package provider. |
bec39cab | 1628 | _ACEOF |
81ecdfbb | 1629 | ac_status=$? |
bec39cab AC |
1630 | fi |
1631 | ||
1632 | if test "$ac_init_help" = "recursive"; then | |
1633 | # If there are subdirs, report their specific --help. | |
bec39cab | 1634 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1635 | test -d "$ac_dir" || |
1636 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1637 | continue | |
bec39cab AC |
1638 | ac_builddir=. |
1639 | ||
81ecdfbb RW |
1640 | case "$ac_dir" in |
1641 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1642 | *) | |
1643 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1644 | # A ".." for each directory in $ac_dir_suffix. | |
1645 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1646 | case $ac_top_builddir_sub in | |
1647 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1648 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1649 | esac ;; | |
1650 | esac | |
1651 | ac_abs_top_builddir=$ac_pwd | |
1652 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1653 | # for backward compatibility: | |
1654 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1655 | |
1656 | case $srcdir in | |
81ecdfbb | 1657 | .) # We are building in place. |
bec39cab | 1658 | ac_srcdir=. |
81ecdfbb RW |
1659 | ac_top_srcdir=$ac_top_builddir_sub |
1660 | ac_abs_top_srcdir=$ac_pwd ;; | |
1661 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1662 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1663 | ac_top_srcdir=$srcdir |
1664 | ac_abs_top_srcdir=$srcdir ;; | |
1665 | *) # Relative name. | |
1666 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1667 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1668 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1669 | esac |
81ecdfbb | 1670 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1671 | |
81ecdfbb RW |
1672 | cd "$ac_dir" || { ac_status=$?; continue; } |
1673 | # Check for guested configure. | |
1674 | if test -f "$ac_srcdir/configure.gnu"; then | |
1675 | echo && | |
1676 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1677 | elif test -f "$ac_srcdir/configure"; then | |
1678 | echo && | |
1679 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1680 | else |
81ecdfbb RW |
1681 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1682 | fi || ac_status=$? | |
1683 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1684 | done |
1685 | fi | |
1686 | ||
81ecdfbb | 1687 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1688 | if $ac_init_version; then |
1689 | cat <<\_ACEOF | |
81ecdfbb RW |
1690 | configure |
1691 | generated by GNU Autoconf 2.64 | |
bec39cab | 1692 | |
81ecdfbb | 1693 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1694 | This configure script is free software; the Free Software Foundation |
1695 | gives unlimited permission to copy, distribute and modify it. | |
1696 | _ACEOF | |
81ecdfbb | 1697 | exit |
bec39cab | 1698 | fi |
bec39cab | 1699 | |
81ecdfbb RW |
1700 | ## ------------------------ ## |
1701 | ## Autoconf initialization. ## | |
1702 | ## ------------------------ ## | |
bec39cab | 1703 | |
81ecdfbb RW |
1704 | # ac_fn_c_try_compile LINENO |
1705 | # -------------------------- | |
1706 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1707 | ac_fn_c_try_compile () | |
1708 | { | |
1709 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1710 | rm -f conftest.$ac_objext | |
1711 | if { { ac_try="$ac_compile" | |
1712 | case "(($ac_try" in | |
1713 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1714 | *) ac_try_echo=$ac_try;; | |
1715 | esac | |
1716 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1717 | $as_echo "$ac_try_echo"; } >&5 | |
1718 | (eval "$ac_compile") 2>conftest.err | |
1719 | ac_status=$? | |
1720 | if test -s conftest.err; then | |
1721 | grep -v '^ *+' conftest.err >conftest.er1 | |
1722 | cat conftest.er1 >&5 | |
1723 | mv -f conftest.er1 conftest.err | |
1724 | fi | |
1725 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1726 | test $ac_status = 0; } && { | |
1727 | test -z "$ac_c_werror_flag" || | |
1728 | test ! -s conftest.err | |
1729 | } && test -s conftest.$ac_objext; then : | |
1730 | ac_retval=0 | |
1731 | else | |
1732 | $as_echo "$as_me: failed program was:" >&5 | |
1733 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1734 | |
81ecdfbb RW |
1735 | ac_retval=1 |
1736 | fi | |
1737 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1738 | return $ac_retval | |
1739 | ||
1740 | } # ac_fn_c_try_compile | |
1741 | ||
1742 | # ac_fn_c_try_cpp LINENO | |
1743 | # ---------------------- | |
1744 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1745 | ac_fn_c_try_cpp () | |
bec39cab | 1746 | { |
81ecdfbb RW |
1747 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1748 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1749 | case "(($ac_try" in | |
1750 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1751 | *) ac_try_echo=$ac_try;; | |
1752 | esac | |
1753 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1754 | $as_echo "$ac_try_echo"; } >&5 | |
1755 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1756 | ac_status=$? | |
1757 | if test -s conftest.err; then | |
1758 | grep -v '^ *+' conftest.err >conftest.er1 | |
1759 | cat conftest.er1 >&5 | |
1760 | mv -f conftest.er1 conftest.err | |
1761 | fi | |
1762 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1763 | test $ac_status = 0; } >/dev/null && { | |
1764 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1765 | test ! -s conftest.err | |
1766 | }; then : | |
1767 | ac_retval=0 | |
1768 | else | |
1769 | $as_echo "$as_me: failed program was:" >&5 | |
1770 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1771 | |
81ecdfbb RW |
1772 | ac_retval=1 |
1773 | fi | |
1774 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1775 | return $ac_retval | |
bec39cab | 1776 | |
81ecdfbb | 1777 | } # ac_fn_c_try_cpp |
bec39cab | 1778 | |
81ecdfbb RW |
1779 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1780 | # ------------------------------------------------------- | |
1781 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1782 | # the include files in INCLUDES and setting the cache variable VAR | |
1783 | # accordingly. | |
1784 | ac_fn_c_check_header_mongrel () | |
1785 | { | |
1786 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1787 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1789 | $as_echo_n "checking for $2... " >&6; } | |
1790 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1791 | $as_echo_n "(cached) " >&6 | |
1792 | fi | |
1793 | eval ac_res=\$$3 | |
1794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1795 | $as_echo "$ac_res" >&6; } | |
1796 | else | |
1797 | # Is the header compilable? | |
1798 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1799 | $as_echo_n "checking $2 usability... " >&6; } | |
1800 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1801 | /* end confdefs.h. */ | |
1802 | $4 | |
1803 | #include <$2> | |
1804 | _ACEOF | |
1805 | if ac_fn_c_try_compile "$LINENO"; then : | |
1806 | ac_header_compiler=yes | |
1807 | else | |
1808 | ac_header_compiler=no | |
1809 | fi | |
1810 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1812 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1813 | |
81ecdfbb RW |
1814 | # Is the header present? |
1815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1816 | $as_echo_n "checking $2 presence... " >&6; } | |
1817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1818 | /* end confdefs.h. */ | |
1819 | #include <$2> | |
1820 | _ACEOF | |
1821 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1822 | ac_header_preproc=yes | |
1823 | else | |
1824 | ac_header_preproc=no | |
1825 | fi | |
1826 | rm -f conftest.err conftest.$ac_ext | |
1827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1828 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1829 | |
81ecdfbb RW |
1830 | # So? What about this header? |
1831 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1832 | yes:no: ) | |
1833 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1834 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1835 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1836 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1837 | ;; | |
1838 | no:yes:* ) | |
1839 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1840 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1841 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1842 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1843 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1844 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1845 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1846 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1847 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1848 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1849 | ;; | |
1850 | esac | |
1851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1852 | $as_echo_n "checking for $2... " >&6; } | |
1853 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1854 | $as_echo_n "(cached) " >&6 | |
1855 | else | |
1856 | eval "$3=\$ac_header_compiler" | |
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 | fi | |
1862 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1863 | |
81ecdfbb | 1864 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1865 | |
81ecdfbb RW |
1866 | # ac_fn_c_try_run LINENO |
1867 | # ---------------------- | |
1868 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1869 | # that executables *can* be run. | |
1870 | ac_fn_c_try_run () | |
1871 | { | |
1872 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1873 | if { { ac_try="$ac_link" | |
1874 | case "(($ac_try" in | |
1875 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1876 | *) ac_try_echo=$ac_try;; | |
1877 | esac | |
1878 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1879 | $as_echo "$ac_try_echo"; } >&5 | |
1880 | (eval "$ac_link") 2>&5 | |
1881 | ac_status=$? | |
1882 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1883 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1884 | { { case "(($ac_try" in | |
1885 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1886 | *) ac_try_echo=$ac_try;; | |
1887 | esac | |
1888 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1889 | $as_echo "$ac_try_echo"; } >&5 | |
1890 | (eval "$ac_try") 2>&5 | |
1891 | ac_status=$? | |
1892 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1893 | test $ac_status = 0; }; }; then : | |
1894 | ac_retval=0 | |
1895 | else | |
1896 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1897 | $as_echo "$as_me: failed program was:" >&5 | |
1898 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1899 | |
81ecdfbb RW |
1900 | ac_retval=$ac_status |
1901 | fi | |
1902 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1903 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1904 | return $ac_retval | |
bec39cab | 1905 | |
81ecdfbb | 1906 | } # ac_fn_c_try_run |
bec39cab | 1907 | |
81ecdfbb RW |
1908 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1909 | # ------------------------------------------------------- | |
1910 | # Tests whether HEADER exists and can be compiled using the include files in | |
1911 | # INCLUDES, setting the cache variable VAR accordingly. | |
1912 | ac_fn_c_check_header_compile () | |
1913 | { | |
1914 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1916 | $as_echo_n "checking for $2... " >&6; } | |
1917 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1918 | $as_echo_n "(cached) " >&6 | |
1919 | else | |
1920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1921 | /* end confdefs.h. */ | |
1922 | $4 | |
1923 | #include <$2> | |
bec39cab | 1924 | _ACEOF |
81ecdfbb RW |
1925 | if ac_fn_c_try_compile "$LINENO"; then : |
1926 | eval "$3=yes" | |
1927 | else | |
1928 | eval "$3=no" | |
1929 | fi | |
1930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1931 | fi | |
1932 | eval ac_res=\$$3 | |
1933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1934 | $as_echo "$ac_res" >&6; } | |
1935 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1936 | |
81ecdfbb | 1937 | } # ac_fn_c_check_header_compile |
bec39cab | 1938 | |
81ecdfbb RW |
1939 | # ac_fn_c_try_link LINENO |
1940 | # ----------------------- | |
1941 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1942 | ac_fn_c_try_link () | |
b4e70030 | 1943 | { |
81ecdfbb RW |
1944 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1945 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1946 | if { { ac_try="$ac_link" | |
1947 | case "(($ac_try" in | |
1948 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1949 | *) ac_try_echo=$ac_try;; | |
1950 | esac | |
1951 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1952 | $as_echo "$ac_try_echo"; } >&5 | |
1953 | (eval "$ac_link") 2>conftest.err | |
1954 | ac_status=$? | |
1955 | if test -s conftest.err; then | |
1956 | grep -v '^ *+' conftest.err >conftest.er1 | |
1957 | cat conftest.er1 >&5 | |
1958 | mv -f conftest.er1 conftest.err | |
1959 | fi | |
1960 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1961 | test $ac_status = 0; } && { | |
1962 | test -z "$ac_c_werror_flag" || | |
1963 | test ! -s conftest.err | |
1964 | } && test -s conftest$ac_exeext && { | |
1965 | test "$cross_compiling" = yes || | |
1966 | $as_test_x conftest$ac_exeext | |
1967 | }; then : | |
1968 | ac_retval=0 | |
1969 | else | |
1970 | $as_echo "$as_me: failed program was:" >&5 | |
1971 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1972 | |
81ecdfbb RW |
1973 | ac_retval=1 |
1974 | fi | |
1975 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1976 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1977 | # interfere with the next link command; also delete a directory that is | |
1978 | # left behind by Apple's compiler. We do this before executing the actions. | |
1979 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1980 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1981 | return $ac_retval | |
bec39cab | 1982 | |
81ecdfbb | 1983 | } # ac_fn_c_try_link |
bec39cab | 1984 | |
81ecdfbb RW |
1985 | # ac_fn_c_check_func LINENO FUNC VAR |
1986 | # ---------------------------------- | |
1987 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1988 | ac_fn_c_check_func () | |
1989 | { | |
1990 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1992 | $as_echo_n "checking for $2... " >&6; } | |
1993 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1994 | $as_echo_n "(cached) " >&6 | |
1995 | else | |
1996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1997 | /* end confdefs.h. */ | |
1998 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1999 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2000 | #define $2 innocuous_$2 | |
bec39cab | 2001 | |
81ecdfbb RW |
2002 | /* System header to define __stub macros and hopefully few prototypes, |
2003 | which can conflict with char $2 (); below. | |
2004 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2005 | <limits.h> exists even on freestanding compilers. */ | |
bec39cab | 2006 | |
81ecdfbb RW |
2007 | #ifdef __STDC__ |
2008 | # include <limits.h> | |
2009 | #else | |
2010 | # include <assert.h> | |
2011 | #endif | |
bec39cab | 2012 | |
81ecdfbb | 2013 | #undef $2 |
bec39cab | 2014 | |
81ecdfbb RW |
2015 | /* Override any GCC internal prototype to avoid an error. |
2016 | Use char because int might match the return type of a GCC | |
2017 | builtin and then its argument prototype would still apply. */ | |
2018 | #ifdef __cplusplus | |
2019 | extern "C" | |
2020 | #endif | |
2021 | char $2 (); | |
2022 | /* The GNU C library defines this for functions which it implements | |
2023 | to always fail with ENOSYS. Some functions are actually named | |
2024 | something starting with __ and the normal name is an alias. */ | |
2025 | #if defined __stub_$2 || defined __stub___$2 | |
2026 | choke me | |
2027 | #endif | |
bec39cab | 2028 | |
81ecdfbb RW |
2029 | int |
2030 | main () | |
2031 | { | |
2032 | return $2 (); | |
2033 | ; | |
2034 | return 0; | |
2035 | } | |
bec39cab | 2036 | _ACEOF |
81ecdfbb RW |
2037 | if ac_fn_c_try_link "$LINENO"; then : |
2038 | eval "$3=yes" | |
2039 | else | |
2040 | eval "$3=no" | |
2041 | fi | |
2042 | rm -f core conftest.err conftest.$ac_objext \ | |
2043 | conftest$ac_exeext conftest.$ac_ext | |
2044 | fi | |
2045 | eval ac_res=\$$3 | |
2046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2047 | $as_echo "$ac_res" >&6; } | |
2048 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2049 | |
81ecdfbb | 2050 | } # ac_fn_c_check_func |
bec39cab | 2051 | |
81ecdfbb RW |
2052 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2053 | # ------------------------------------ | |
2054 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2055 | ac_fn_c_check_decl () | |
2056 | { | |
2057 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2058 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 | |
2059 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2060 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2061 | $as_echo_n "(cached) " >&6 | |
2062 | else | |
2063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2064 | /* end confdefs.h. */ | |
2065 | $4 | |
2066 | int | |
2067 | main () | |
2068 | { | |
2069 | #ifndef $2 | |
2070 | (void) $2; | |
2071 | #endif | |
bec39cab | 2072 | |
81ecdfbb RW |
2073 | ; |
2074 | return 0; | |
2075 | } | |
bec39cab | 2076 | _ACEOF |
81ecdfbb RW |
2077 | if ac_fn_c_try_compile "$LINENO"; then : |
2078 | eval "$3=yes" | |
2079 | else | |
2080 | eval "$3=no" | |
2081 | fi | |
2082 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2083 | fi | |
2084 | eval ac_res=\$$3 | |
2085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2086 | $as_echo "$ac_res" >&6; } | |
2087 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2088 | |
81ecdfbb | 2089 | } # ac_fn_c_check_decl |
bec39cab | 2090 | |
81ecdfbb RW |
2091 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2092 | # -------------------------------------------- | |
2093 | # Tries to find the compile-time value of EXPR in a program that includes | |
2094 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2095 | # computed | |
2096 | ac_fn_c_compute_int () | |
2097 | { | |
2098 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2099 | if test "$cross_compiling" = yes; then | |
2100 | # Depending upon the size, compute the lo and hi bounds. | |
2101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2102 | /* end confdefs.h. */ | |
2103 | $4 | |
2104 | int | |
2105 | main () | |
2106 | { | |
2107 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2108 | test_array [0] = 0 | |
bec39cab | 2109 | |
81ecdfbb RW |
2110 | ; |
2111 | return 0; | |
2112 | } | |
2113 | _ACEOF | |
2114 | if ac_fn_c_try_compile "$LINENO"; then : | |
2115 | ac_lo=0 ac_mid=0 | |
2116 | while :; do | |
2117 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2118 | /* end confdefs.h. */ | |
2119 | $4 | |
2120 | int | |
2121 | main () | |
2122 | { | |
2123 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2124 | test_array [0] = 0 | |
bec39cab | 2125 | |
81ecdfbb RW |
2126 | ; |
2127 | return 0; | |
2128 | } | |
2129 | _ACEOF | |
2130 | if ac_fn_c_try_compile "$LINENO"; then : | |
2131 | ac_hi=$ac_mid; break | |
2132 | else | |
2133 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2134 | if test $ac_lo -le $ac_mid; then | |
2135 | ac_lo= ac_hi= | |
2136 | break | |
2137 | fi | |
2138 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2139 | fi |
81ecdfbb RW |
2140 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2141 | done | |
c906108c | 2142 | else |
81ecdfbb RW |
2143 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2144 | /* end confdefs.h. */ | |
2145 | $4 | |
2146 | int | |
2147 | main () | |
2148 | { | |
2149 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2150 | test_array [0] = 0 | |
bec39cab | 2151 | |
81ecdfbb RW |
2152 | ; |
2153 | return 0; | |
2154 | } | |
2155 | _ACEOF | |
2156 | if ac_fn_c_try_compile "$LINENO"; then : | |
2157 | ac_hi=-1 ac_mid=-1 | |
2158 | while :; do | |
2159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2160 | /* end confdefs.h. */ | |
2161 | $4 | |
2162 | int | |
2163 | main () | |
2164 | { | |
2165 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2166 | test_array [0] = 0 | |
bec39cab | 2167 | |
81ecdfbb RW |
2168 | ; |
2169 | return 0; | |
2170 | } | |
2171 | _ACEOF | |
2172 | if ac_fn_c_try_compile "$LINENO"; then : | |
2173 | ac_lo=$ac_mid; break | |
2174 | else | |
2175 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2176 | if test $ac_mid -le $ac_hi; then | |
2177 | ac_lo= ac_hi= | |
2178 | break | |
2179 | fi | |
2180 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2181 | fi | |
2182 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2183 | done | |
2184 | else | |
2185 | ac_lo= ac_hi= | |
2186 | fi | |
2187 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2188 | fi | |
2189 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2190 | # Binary search between lo and hi bounds. | |
2191 | while test "x$ac_lo" != "x$ac_hi"; do | |
2192 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2194 | /* end confdefs.h. */ | |
2195 | $4 | |
2196 | int | |
2197 | main () | |
2198 | { | |
2199 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2200 | test_array [0] = 0 | |
bec39cab | 2201 | |
81ecdfbb RW |
2202 | ; |
2203 | return 0; | |
2204 | } | |
2205 | _ACEOF | |
2206 | if ac_fn_c_try_compile "$LINENO"; then : | |
2207 | ac_hi=$ac_mid | |
2208 | else | |
2209 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2210 | fi | |
2211 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2212 | done | |
2213 | case $ac_lo in #(( | |
2214 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2215 | '') ac_retval=1 ;; | |
2216 | esac | |
2217 | else | |
2218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2219 | /* end confdefs.h. */ | |
2220 | $4 | |
2221 | static long int longval () { return $2; } | |
2222 | static unsigned long int ulongval () { return $2; } | |
2223 | #include <stdio.h> | |
2224 | #include <stdlib.h> | |
2225 | int | |
2226 | main () | |
2227 | { | |
bec39cab | 2228 | |
81ecdfbb RW |
2229 | FILE *f = fopen ("conftest.val", "w"); |
2230 | if (! f) | |
2231 | return 1; | |
2232 | if (($2) < 0) | |
2233 | { | |
2234 | long int i = longval (); | |
2235 | if (i != ($2)) | |
2236 | return 1; | |
2237 | fprintf (f, "%ld", i); | |
2238 | } | |
2239 | else | |
2240 | { | |
2241 | unsigned long int i = ulongval (); | |
2242 | if (i != ($2)) | |
2243 | return 1; | |
2244 | fprintf (f, "%lu", i); | |
2245 | } | |
2246 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2247 | on some platforms. */ | |
2248 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2249 | |
81ecdfbb RW |
2250 | ; |
2251 | return 0; | |
2252 | } | |
2253 | _ACEOF | |
2254 | if ac_fn_c_try_run "$LINENO"; then : | |
2255 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2256 | else | |
2257 | ac_retval=1 | |
2258 | fi | |
2259 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2260 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2261 | rm -f conftest.val | |
bec39cab | 2262 | |
81ecdfbb RW |
2263 | fi |
2264 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2265 | return $ac_retval | |
bec39cab | 2266 | |
81ecdfbb | 2267 | } # ac_fn_c_compute_int |
bec39cab | 2268 | |
81ecdfbb RW |
2269 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2270 | # ---------------------------------------------------- | |
2271 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2272 | # INCLUDES, setting cache variable VAR accordingly. | |
2273 | ac_fn_c_check_member () | |
2274 | { | |
2275 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2277 | $as_echo_n "checking for $2.$3... " >&6; } | |
2278 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2279 | $as_echo_n "(cached) " >&6 | |
2280 | else | |
2281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2282 | /* end confdefs.h. */ | |
2283 | $5 | |
2284 | int | |
2285 | main () | |
2286 | { | |
2287 | static $2 ac_aggr; | |
2288 | if (ac_aggr.$3) | |
2289 | return 0; | |
2290 | ; | |
2291 | return 0; | |
2292 | } | |
2293 | _ACEOF | |
2294 | if ac_fn_c_try_compile "$LINENO"; then : | |
2295 | eval "$4=yes" | |
2296 | else | |
2297 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2298 | /* end confdefs.h. */ | |
2299 | $5 | |
2300 | int | |
2301 | main () | |
2302 | { | |
2303 | static $2 ac_aggr; | |
2304 | if (sizeof ac_aggr.$3) | |
2305 | return 0; | |
2306 | ; | |
2307 | return 0; | |
2308 | } | |
2309 | _ACEOF | |
2310 | if ac_fn_c_try_compile "$LINENO"; then : | |
2311 | eval "$4=yes" | |
2312 | else | |
2313 | eval "$4=no" | |
2314 | fi | |
2315 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2316 | fi | |
2317 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2318 | fi | |
2319 | eval ac_res=\$$4 | |
2320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2321 | $as_echo "$ac_res" >&6; } | |
2322 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2323 | |
81ecdfbb | 2324 | } # ac_fn_c_check_member |
bec39cab | 2325 | |
81ecdfbb RW |
2326 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2327 | # ------------------------------------------- | |
2328 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2329 | # variable VAR accordingly. | |
2330 | ac_fn_c_check_type () | |
2331 | { | |
2332 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2334 | $as_echo_n "checking for $2... " >&6; } | |
2335 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2336 | $as_echo_n "(cached) " >&6 | |
2337 | else | |
2338 | eval "$3=no" | |
2339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2340 | /* end confdefs.h. */ | |
2341 | $4 | |
2342 | int | |
2343 | main () | |
2344 | { | |
2345 | if (sizeof ($2)) | |
2346 | return 0; | |
2347 | ; | |
2348 | return 0; | |
2349 | } | |
2350 | _ACEOF | |
2351 | if ac_fn_c_try_compile "$LINENO"; then : | |
2352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2353 | /* end confdefs.h. */ | |
2354 | $4 | |
2355 | int | |
2356 | main () | |
2357 | { | |
2358 | if (sizeof (($2))) | |
2359 | return 0; | |
2360 | ; | |
2361 | return 0; | |
2362 | } | |
2363 | _ACEOF | |
2364 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2365 | |
81ecdfbb RW |
2366 | else |
2367 | eval "$3=yes" | |
2368 | fi | |
2369 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2370 | fi | |
2371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2372 | fi | |
2373 | eval ac_res=\$$3 | |
2374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2375 | $as_echo "$ac_res" >&6; } | |
2376 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2377 | |
81ecdfbb RW |
2378 | } # ac_fn_c_check_type |
2379 | cat >config.log <<_ACEOF | |
2380 | This file contains any messages produced by compilers while | |
2381 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2382 | |
81ecdfbb RW |
2383 | It was created by $as_me, which was |
2384 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2385 | |
81ecdfbb | 2386 | $ $0 $@ |
413ccac7 | 2387 | |
81ecdfbb RW |
2388 | _ACEOF |
2389 | exec 5>>config.log | |
2390 | { | |
2391 | cat <<_ASUNAME | |
2392 | ## --------- ## | |
2393 | ## Platform. ## | |
2394 | ## --------- ## | |
413ccac7 | 2395 | |
81ecdfbb RW |
2396 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2397 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2398 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2399 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2400 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2401 | |
81ecdfbb RW |
2402 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2403 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2404 | |
81ecdfbb RW |
2405 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2406 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2407 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2408 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2409 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2410 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2411 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2412 | |
81ecdfbb | 2413 | _ASUNAME |
bec39cab | 2414 | |
bec39cab AC |
2415 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2416 | for as_dir in $PATH | |
2417 | do | |
2418 | IFS=$as_save_IFS | |
2419 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2420 | $as_echo "PATH: $as_dir" |
2421 | done | |
2422 | IFS=$as_save_IFS | |
bec39cab | 2423 | |
81ecdfbb | 2424 | } >&5 |
bec39cab | 2425 | |
81ecdfbb | 2426 | cat >&5 <<_ACEOF |
bec39cab | 2427 | |
bec39cab | 2428 | |
81ecdfbb RW |
2429 | ## ----------- ## |
2430 | ## Core tests. ## | |
2431 | ## ----------- ## | |
2432 | ||
2433 | _ACEOF | |
2434 | ||
2435 | ||
2436 | # Keep a trace of the command line. | |
2437 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2438 | # Strip out --silent because we don't want to record it for future runs. | |
2439 | # Also quote any args containing shell meta-characters. | |
2440 | # Make two passes to allow for proper duplicate-argument suppression. | |
2441 | ac_configure_args= | |
2442 | ac_configure_args0= | |
2443 | ac_configure_args1= | |
2444 | ac_must_keep_next=false | |
2445 | for ac_pass in 1 2 | |
2446 | do | |
2447 | for ac_arg | |
2448 | do | |
2449 | case $ac_arg in | |
2450 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2451 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2452 | | -silent | --silent | --silen | --sile | --sil) | |
2453 | continue ;; | |
2454 | *\'*) | |
2455 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2456 | esac | |
2457 | case $ac_pass in | |
2458 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2459 | 2) | |
2460 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2461 | if test $ac_must_keep_next = true; then | |
2462 | ac_must_keep_next=false # Got value, back to normal. | |
2463 | else | |
2464 | case $ac_arg in | |
2465 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2466 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2467 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2468 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2469 | case "$ac_configure_args0 " in | |
2470 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2471 | esac | |
2472 | ;; | |
2473 | -* ) ac_must_keep_next=true ;; | |
2474 | esac | |
2475 | fi | |
2476 | as_fn_append ac_configure_args " '$ac_arg'" | |
2477 | ;; | |
2478 | esac | |
2479 | done | |
2480 | done | |
2481 | { ac_configure_args0=; unset ac_configure_args0;} | |
2482 | { ac_configure_args1=; unset ac_configure_args1;} | |
2483 | ||
2484 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2485 | # config.log. We remove comments because anyway the quotes in there | |
2486 | # would cause problems or look ugly. | |
2487 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2488 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2489 | trap 'exit_status=$? | |
2490 | # Save into config.log some information that might help in debugging. | |
2491 | { | |
2492 | echo | |
2493 | ||
2494 | cat <<\_ASBOX | |
2495 | ## ---------------- ## | |
2496 | ## Cache variables. ## | |
2497 | ## ---------------- ## | |
2498 | _ASBOX | |
2499 | echo | |
2500 | # The following way of writing the cache mishandles newlines in values, | |
2501 | ( | |
2502 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2503 | eval ac_val=\$$ac_var | |
2504 | case $ac_val in #( | |
2505 | *${as_nl}*) | |
2506 | case $ac_var in #( | |
2507 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2508 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2509 | esac | |
2510 | case $ac_var in #( | |
2511 | _ | IFS | as_nl) ;; #( | |
2512 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2513 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2514 | esac ;; | |
2515 | esac | |
2516 | done | |
2517 | (set) 2>&1 | | |
2518 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2519 | *${as_nl}ac_space=\ *) | |
2520 | sed -n \ | |
2521 | "s/'\''/'\''\\\\'\'''\''/g; | |
2522 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2523 | ;; #( | |
2524 | *) | |
2525 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2526 | ;; | |
2527 | esac | | |
2528 | sort | |
2529 | ) | |
2530 | echo | |
2531 | ||
2532 | cat <<\_ASBOX | |
2533 | ## ----------------- ## | |
2534 | ## Output variables. ## | |
2535 | ## ----------------- ## | |
2536 | _ASBOX | |
2537 | echo | |
2538 | for ac_var in $ac_subst_vars | |
2539 | do | |
2540 | eval ac_val=\$$ac_var | |
2541 | case $ac_val in | |
2542 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2543 | esac | |
2544 | $as_echo "$ac_var='\''$ac_val'\''" | |
2545 | done | sort | |
2546 | echo | |
2547 | ||
2548 | if test -n "$ac_subst_files"; then | |
2549 | cat <<\_ASBOX | |
2550 | ## ------------------- ## | |
2551 | ## File substitutions. ## | |
2552 | ## ------------------- ## | |
2553 | _ASBOX | |
2554 | echo | |
2555 | for ac_var in $ac_subst_files | |
2556 | do | |
2557 | eval ac_val=\$$ac_var | |
2558 | case $ac_val in | |
2559 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2560 | esac | |
2561 | $as_echo "$ac_var='\''$ac_val'\''" | |
2562 | done | sort | |
2563 | echo | |
2564 | fi | |
2565 | ||
2566 | if test -s confdefs.h; then | |
2567 | cat <<\_ASBOX | |
2568 | ## ----------- ## | |
2569 | ## confdefs.h. ## | |
2570 | ## ----------- ## | |
2571 | _ASBOX | |
2572 | echo | |
2573 | cat confdefs.h | |
2574 | echo | |
2575 | fi | |
2576 | test "$ac_signal" != 0 && | |
2577 | $as_echo "$as_me: caught signal $ac_signal" | |
2578 | $as_echo "$as_me: exit $exit_status" | |
2579 | } >&5 | |
2580 | rm -f core *.core core.conftest.* && | |
2581 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2582 | exit $exit_status | |
2583 | ' 0 | |
2584 | for ac_signal in 1 2 13 15; do | |
2585 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2586 | done | |
2587 | ac_signal=0 | |
2588 | ||
2589 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2590 | rm -f -r conftest* confdefs.h | |
2591 | ||
2592 | $as_echo "/* confdefs.h */" > confdefs.h | |
2593 | ||
2594 | # Predefined preprocessor variables. | |
2595 | ||
2596 | cat >>confdefs.h <<_ACEOF | |
2597 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2598 | _ACEOF | |
2599 | ||
2600 | cat >>confdefs.h <<_ACEOF | |
2601 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2602 | _ACEOF | |
2603 | ||
2604 | cat >>confdefs.h <<_ACEOF | |
2605 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2606 | _ACEOF | |
2607 | ||
2608 | cat >>confdefs.h <<_ACEOF | |
2609 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2610 | _ACEOF | |
2611 | ||
2612 | cat >>confdefs.h <<_ACEOF | |
2613 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2614 | _ACEOF | |
2615 | ||
2616 | cat >>confdefs.h <<_ACEOF | |
2617 | #define PACKAGE_URL "$PACKAGE_URL" | |
2618 | _ACEOF | |
2619 | ||
2620 | ||
2621 | # Let the site file select an alternate cache file if it wants to. | |
2622 | # Prefer an explicitly selected file to automatically selected ones. | |
2623 | ac_site_file1=NONE | |
2624 | ac_site_file2=NONE | |
2625 | if test -n "$CONFIG_SITE"; then | |
2626 | ac_site_file1=$CONFIG_SITE | |
2627 | elif test "x$prefix" != xNONE; then | |
2628 | ac_site_file1=$prefix/share/config.site | |
2629 | ac_site_file2=$prefix/etc/config.site | |
2630 | else | |
2631 | ac_site_file1=$ac_default_prefix/share/config.site | |
2632 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2633 | fi | |
2634 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2635 | do | |
2636 | test "x$ac_site_file" = xNONE && continue | |
2637 | if test -r "$ac_site_file"; then | |
2638 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2639 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2640 | sed 's/^/| /' "$ac_site_file" >&5 | |
2641 | . "$ac_site_file" | |
2642 | fi | |
2643 | done | |
2644 | ||
2645 | if test -r "$cache_file"; then | |
2646 | # Some versions of bash will fail to source /dev/null (special | |
2647 | # files actually), so we avoid doing that. | |
2648 | if test -f "$cache_file"; then | |
2649 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2650 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2651 | case $cache_file in | |
2652 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2653 | *) . "./$cache_file";; | |
2654 | esac | |
2655 | fi | |
2656 | else | |
2657 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2658 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2659 | >$cache_file | |
bec39cab AC |
2660 | fi |
2661 | ||
81ecdfbb RW |
2662 | gl_header_list="$gl_header_list stdint.h" |
2663 | gl_header_list="$gl_header_list wchar.h" | |
2664 | gl_header_list="$gl_header_list string.h" | |
2665 | # Check that the precious variables saved in the cache have kept the same | |
2666 | # value. | |
2667 | ac_cache_corrupted=false | |
2668 | for ac_var in $ac_precious_vars; do | |
2669 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2670 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2671 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2672 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2673 | case $ac_old_set,$ac_new_set in | |
2674 | set,) | |
2675 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2676 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2677 | ac_cache_corrupted=: ;; | |
2678 | ,set) | |
2679 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2680 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2681 | ac_cache_corrupted=: ;; | |
2682 | ,);; | |
2683 | *) | |
2684 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2685 | # differences in whitespace do not lead to failure. | |
2686 | ac_old_val_w=`echo x $ac_old_val` | |
2687 | ac_new_val_w=`echo x $ac_new_val` | |
2688 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2689 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2690 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2691 | ac_cache_corrupted=: | |
2692 | else | |
2693 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2694 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2695 | eval $ac_var=\$ac_old_val | |
2696 | fi | |
2697 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2698 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2699 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2700 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2701 | fi;; | |
2702 | esac | |
2703 | # Pass precious variables to config.status. | |
2704 | if test "$ac_new_set" = set; then | |
2705 | case $ac_new_val in | |
2706 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2707 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2708 | esac | |
2709 | case " $ac_configure_args " in | |
2710 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2711 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2712 | esac | |
2713 | fi | |
2714 | done | |
2715 | if $ac_cache_corrupted; then | |
2716 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2717 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2718 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2719 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2720 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2721 | fi | |
2722 | ## -------------------- ## | |
2723 | ## Main body of script. ## | |
2724 | ## -------------------- ## | |
2725 | ||
2726 | ac_ext=c | |
2727 | ac_cpp='$CPP $CPPFLAGS' | |
2728 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2729 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2730 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2731 | ||
2732 | ||
2733 | ||
2734 | ||
2735 | ||
2736 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2737 | ||
2738 | ||
2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2740 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2741 | # Check whether --enable-maintainer-mode was given. | |
2742 | if test "${enable_maintainer_mode+set}" = set; then : | |
2743 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2744 | else | |
2745 | USE_MAINTAINER_MODE=no | |
2746 | fi | |
2747 | ||
2748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2749 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2750 | if test $USE_MAINTAINER_MODE = yes; then | |
2751 | MAINTAINER_MODE_TRUE= | |
2752 | MAINTAINER_MODE_FALSE='#' | |
2753 | else | |
2754 | MAINTAINER_MODE_TRUE='#' | |
2755 | MAINTAINER_MODE_FALSE= | |
2756 | fi | |
2757 | ||
2758 | MAINT=$MAINTAINER_MODE_TRUE | |
2759 | ||
2760 | ||
2761 | ||
2762 | ac_ext=c | |
2763 | ac_cpp='$CPP $CPPFLAGS' | |
2764 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2765 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2766 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2767 | if test -n "$ac_tool_prefix"; then | |
2768 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2769 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2771 | $as_echo_n "checking for $ac_word... " >&6; } | |
2772 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2773 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2774 | else |
2775 | if test -n "$CC"; then | |
2776 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2777 | else | |
bec39cab AC |
2778 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2779 | for as_dir in $PATH | |
2780 | do | |
2781 | IFS=$as_save_IFS | |
2782 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2783 | for ac_exec_ext in '' $ac_executable_extensions; do |
2784 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2785 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2786 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2787 | break 2 |
2788 | fi | |
2789 | done | |
81ecdfbb RW |
2790 | done |
2791 | IFS=$as_save_IFS | |
bec39cab | 2792 | |
c906108c SS |
2793 | fi |
2794 | fi | |
bec39cab | 2795 | CC=$ac_cv_prog_CC |
c906108c | 2796 | if test -n "$CC"; then |
81ecdfbb RW |
2797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2798 | $as_echo "$CC" >&6; } | |
c906108c | 2799 | else |
81ecdfbb RW |
2800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2801 | $as_echo "no" >&6; } | |
c906108c SS |
2802 | fi |
2803 | ||
81ecdfbb | 2804 | |
b4e70030 JB |
2805 | fi |
2806 | if test -z "$ac_cv_prog_CC"; then | |
2807 | ac_ct_CC=$CC | |
81ecdfbb RW |
2808 | # Extract the first word of "gcc", so it can be a program name with args. |
2809 | set dummy gcc; ac_word=$2 | |
2810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2811 | $as_echo_n "checking for $ac_word... " >&6; } | |
2812 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2813 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2814 | else |
2815 | if test -n "$ac_ct_CC"; then | |
2816 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2817 | else | |
2818 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2819 | for as_dir in $PATH | |
2820 | do | |
2821 | IFS=$as_save_IFS | |
2822 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2823 | for ac_exec_ext in '' $ac_executable_extensions; do |
2824 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2825 | ac_cv_prog_ac_ct_CC="gcc" | |
2826 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2827 | break 2 |
4e8d927d | 2828 | fi |
b4e70030 | 2829 | done |
81ecdfbb RW |
2830 | done |
2831 | IFS=$as_save_IFS | |
b4e70030 JB |
2832 | |
2833 | fi | |
2834 | fi | |
2835 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2836 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2838 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2839 | else |
81ecdfbb RW |
2840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2841 | $as_echo "no" >&6; } | |
b4e70030 JB |
2842 | fi |
2843 | ||
81ecdfbb RW |
2844 | if test "x$ac_ct_CC" = x; then |
2845 | CC="" | |
2846 | else | |
2847 | case $cross_compiling:$ac_tool_warned in | |
2848 | yes:) | |
2849 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2850 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2851 | ac_tool_warned=yes ;; | |
2852 | esac | |
2853 | CC=$ac_ct_CC | |
2854 | fi | |
b4e70030 JB |
2855 | else |
2856 | CC="$ac_cv_prog_CC" | |
2857 | fi | |
2858 | ||
c906108c | 2859 | if test -z "$CC"; then |
81ecdfbb RW |
2860 | if test -n "$ac_tool_prefix"; then |
2861 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2862 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2864 | $as_echo_n "checking for $ac_word... " >&6; } | |
2865 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2866 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2867 | else |
2868 | if test -n "$CC"; then | |
2869 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2870 | else | |
bec39cab AC |
2871 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2872 | for as_dir in $PATH | |
2873 | do | |
2874 | IFS=$as_save_IFS | |
2875 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2876 | for ac_exec_ext in '' $ac_executable_extensions; do |
2877 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2878 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2879 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2880 | break 2 |
2881 | fi | |
2882 | done | |
81ecdfbb RW |
2883 | done |
2884 | IFS=$as_save_IFS | |
2885 | ||
2886 | fi | |
2887 | fi | |
2888 | CC=$ac_cv_prog_CC | |
2889 | if test -n "$CC"; then | |
2890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2891 | $as_echo "$CC" >&6; } | |
2892 | else | |
2893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2894 | $as_echo "no" >&6; } | |
2895 | fi | |
2896 | ||
2897 | ||
2898 | fi | |
2899 | fi | |
2900 | if test -z "$CC"; then | |
2901 | # Extract the first word of "cc", so it can be a program name with args. | |
2902 | set dummy cc; ac_word=$2 | |
2903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2904 | $as_echo_n "checking for $ac_word... " >&6; } | |
2905 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2906 | $as_echo_n "(cached) " >&6 | |
2907 | else | |
2908 | if test -n "$CC"; then | |
2909 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2910 | else | |
2911 | ac_prog_rejected=no | |
2912 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2913 | for as_dir in $PATH | |
2914 | do | |
2915 | IFS=$as_save_IFS | |
2916 | test -z "$as_dir" && as_dir=. | |
2917 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2918 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2919 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2920 | ac_prog_rejected=yes | |
2921 | continue | |
2922 | fi | |
2923 | ac_cv_prog_CC="cc" | |
2924 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2925 | break 2 | |
2926 | fi | |
2927 | done | |
2928 | done | |
2929 | IFS=$as_save_IFS | |
bec39cab | 2930 | |
c906108c SS |
2931 | if test $ac_prog_rejected = yes; then |
2932 | # We found a bogon in the path, so make sure we never use it. | |
2933 | set dummy $ac_cv_prog_CC | |
2934 | shift | |
bec39cab | 2935 | if test $# != 0; then |
c906108c SS |
2936 | # We chose a different compiler from the bogus one. |
2937 | # However, it has the same basename, so the bogon will be chosen | |
2938 | # first if we set CC to just the basename; use the full file name. | |
2939 | shift | |
bec39cab | 2940 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2941 | fi |
2942 | fi | |
2943 | fi | |
2944 | fi | |
bec39cab | 2945 | CC=$ac_cv_prog_CC |
c906108c | 2946 | if test -n "$CC"; then |
81ecdfbb RW |
2947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2948 | $as_echo "$CC" >&6; } | |
c906108c | 2949 | else |
81ecdfbb RW |
2950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2951 | $as_echo "no" >&6; } | |
c906108c SS |
2952 | fi |
2953 | ||
81ecdfbb | 2954 | |
bec39cab AC |
2955 | fi |
2956 | if test -z "$CC"; then | |
2957 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2958 | for ac_prog in cl.exe |
bec39cab AC |
2959 | do |
2960 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2961 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2962 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2963 | $as_echo_n "checking for $ac_word... " >&6; } | |
2964 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2965 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2966 | else |
2967 | if test -n "$CC"; then | |
2968 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2969 | else | |
bec39cab AC |
2970 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2971 | for as_dir in $PATH | |
2972 | do | |
2973 | IFS=$as_save_IFS | |
2974 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2975 | for ac_exec_ext in '' $ac_executable_extensions; do |
2976 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2977 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2978 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2979 | break 2 |
2980 | fi | |
2981 | done | |
81ecdfbb RW |
2982 | done |
2983 | IFS=$as_save_IFS | |
bec39cab | 2984 | |
c906108c SS |
2985 | fi |
2986 | fi | |
bec39cab | 2987 | CC=$ac_cv_prog_CC |
c906108c | 2988 | if test -n "$CC"; then |
81ecdfbb RW |
2989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2990 | $as_echo "$CC" >&6; } | |
c906108c | 2991 | else |
81ecdfbb RW |
2992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2993 | $as_echo "no" >&6; } | |
c906108c | 2994 | fi |
bec39cab | 2995 | |
81ecdfbb | 2996 | |
bec39cab AC |
2997 | test -n "$CC" && break |
2998 | done | |
2999 | fi | |
3000 | if test -z "$CC"; then | |
3001 | ac_ct_CC=$CC | |
81ecdfbb | 3002 | for ac_prog in cl.exe |
bec39cab AC |
3003 | do |
3004 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3005 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3007 | $as_echo_n "checking for $ac_word... " >&6; } | |
3008 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3009 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3010 | else |
3011 | if test -n "$ac_ct_CC"; then | |
3012 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3013 | else | |
3014 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3015 | for as_dir in $PATH | |
3016 | do | |
3017 | IFS=$as_save_IFS | |
3018 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3019 | for ac_exec_ext in '' $ac_executable_extensions; do |
3020 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3021 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3022 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3023 | break 2 |
c906108c | 3024 | fi |
bec39cab | 3025 | done |
81ecdfbb RW |
3026 | done |
3027 | IFS=$as_save_IFS | |
bec39cab AC |
3028 | |
3029 | fi | |
3030 | fi | |
3031 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3032 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3034 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3035 | else |
81ecdfbb RW |
3036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3037 | $as_echo "no" >&6; } | |
c906108c SS |
3038 | fi |
3039 | ||
81ecdfbb | 3040 | |
bec39cab AC |
3041 | test -n "$ac_ct_CC" && break |
3042 | done | |
c906108c | 3043 | |
81ecdfbb RW |
3044 | if test "x$ac_ct_CC" = x; then |
3045 | CC="" | |
3046 | else | |
3047 | case $cross_compiling:$ac_tool_warned in | |
3048 | yes:) | |
3049 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3050 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3051 | ac_tool_warned=yes ;; | |
3052 | esac | |
3053 | CC=$ac_ct_CC | |
3054 | fi | |
bec39cab AC |
3055 | fi |
3056 | ||
3057 | fi | |
3058 | ||
3059 | ||
81ecdfbb RW |
3060 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3061 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3062 | as_fn_error "no acceptable C compiler found in \$PATH | |
3063 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3064 | |
3065 | # Provide some information about the compiler. | |
81ecdfbb RW |
3066 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3067 | set X $ac_compile | |
3068 | ac_compiler=$2 | |
3069 | for ac_option in --version -v -V -qversion; do | |
3070 | { { ac_try="$ac_compiler $ac_option >&5" | |
3071 | case "(($ac_try" in | |
3072 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3073 | *) ac_try_echo=$ac_try;; | |
3074 | esac | |
3075 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3076 | $as_echo "$ac_try_echo"; } >&5 | |
3077 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3078 | ac_status=$? |
81ecdfbb RW |
3079 | if test -s conftest.err; then |
3080 | sed '10a\ | |
3081 | ... rest of stderr output deleted ... | |
3082 | 10q' conftest.err >conftest.er1 | |
3083 | cat conftest.er1 >&5 | |
3084 | rm -f conftest.er1 conftest.err | |
3085 | fi | |
3086 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3087 | test $ac_status = 0; } | |
3088 | done | |
bec39cab | 3089 | |
81ecdfbb | 3090 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3091 | /* end confdefs.h. */ |
3092 | ||
3093 | int | |
3094 | main () | |
3095 | { | |
3096 | ||
3097 | ; | |
3098 | return 0; | |
3099 | } | |
3100 | _ACEOF | |
3101 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3102 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3103 | # Try to create an executable without -o first, disregard a.out. |
3104 | # It will help us diagnose broken compilers, and finding out an intuition | |
3105 | # of exeext. | |
81ecdfbb RW |
3106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3107 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3108 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3109 | ||
3110 | # The possible output files: | |
3111 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3112 | ||
3113 | ac_rmfiles= | |
3114 | for ac_file in $ac_files | |
3115 | do | |
3116 | case $ac_file in | |
3117 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3118 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3119 | esac | |
3120 | done | |
3121 | rm -f $ac_rmfiles | |
3122 | ||
3123 | if { { ac_try="$ac_link_default" | |
3124 | case "(($ac_try" in | |
3125 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3126 | *) ac_try_echo=$ac_try;; | |
3127 | esac | |
3128 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3129 | $as_echo "$ac_try_echo"; } >&5 | |
3130 | (eval "$ac_link_default") 2>&5 | |
3131 | ac_status=$? | |
3132 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3133 | test $ac_status = 0; }; then : | |
3134 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3135 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3136 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3137 | # so that the user can short-circuit this test for compilers unknown to | |
3138 | # Autoconf. | |
3139 | for ac_file in $ac_files '' | |
bec39cab AC |
3140 | do |
3141 | test -f "$ac_file" || continue | |
3142 | case $ac_file in | |
81ecdfbb | 3143 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3144 | ;; |
3145 | [ab].out ) | |
3146 | # We found the default executable, but exeext='' is most | |
3147 | # certainly right. | |
3148 | break;; | |
3149 | *.* ) | |
81ecdfbb RW |
3150 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3151 | then :; else | |
3152 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3153 | fi | |
3154 | # We set ac_cv_exeext here because the later test for it is not | |
3155 | # safe: cross compilers may not add the suffix if given an `-o' | |
3156 | # argument, so we may need to know it at that point already. | |
3157 | # Even if this section looks crufty: it has the advantage of | |
3158 | # actually working. | |
b4e70030 JB |
3159 | break;; |
3160 | * ) | |
3161 | break;; | |
bec39cab AC |
3162 | esac |
3163 | done | |
81ecdfbb RW |
3164 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3165 | ||
bec39cab | 3166 | else |
81ecdfbb RW |
3167 | ac_file='' |
3168 | fi | |
3169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3170 | $as_echo "$ac_file" >&6; } | |
3171 | if test -z "$ac_file"; then : | |
3172 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3173 | sed 's/^/| /' conftest.$ac_ext >&5 |
3174 | ||
81ecdfbb RW |
3175 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3176 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3177 | { as_fn_set_status 77 | |
3178 | as_fn_error "C compiler cannot create executables | |
3179 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3180 | fi |
b4e70030 | 3181 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3182 | |
81ecdfbb | 3183 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3184 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3186 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3187 | # If not cross compiling, check that we can run a simple program. |
3188 | if test "$cross_compiling" != yes; then | |
3189 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3190 | { { case "(($ac_try" in |
3191 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3192 | *) ac_try_echo=$ac_try;; | |
3193 | esac | |
3194 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3195 | $as_echo "$ac_try_echo"; } >&5 | |
3196 | (eval "$ac_try") 2>&5 | |
bec39cab | 3197 | ac_status=$? |
81ecdfbb RW |
3198 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3199 | test $ac_status = 0; }; }; then | |
bec39cab | 3200 | cross_compiling=no |
c906108c | 3201 | else |
bec39cab AC |
3202 | if test "$cross_compiling" = maybe; then |
3203 | cross_compiling=yes | |
3204 | else | |
81ecdfbb RW |
3205 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3206 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3207 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3208 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3209 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3210 | fi |
c906108c | 3211 | fi |
bec39cab | 3212 | fi |
81ecdfbb RW |
3213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3214 | $as_echo "yes" >&6; } | |
bec39cab | 3215 | |
81ecdfbb | 3216 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3217 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3218 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3219 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3221 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3223 | $as_echo "$cross_compiling" >&6; } | |
3224 | ||
3225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3226 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3227 | if { { ac_try="$ac_link" | |
3228 | case "(($ac_try" in | |
3229 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3230 | *) ac_try_echo=$ac_try;; | |
3231 | esac | |
3232 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3233 | $as_echo "$ac_try_echo"; } >&5 | |
3234 | (eval "$ac_link") 2>&5 | |
bec39cab | 3235 | ac_status=$? |
81ecdfbb RW |
3236 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3237 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3238 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3239 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3240 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3241 | # `rm'. | |
3242 | for ac_file in conftest.exe conftest conftest.*; do | |
3243 | test -f "$ac_file" || continue | |
3244 | case $ac_file in | |
81ecdfbb | 3245 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3246 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3247 | break;; |
3248 | * ) break;; | |
3249 | esac | |
3250 | done | |
c906108c | 3251 | else |
81ecdfbb RW |
3252 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3253 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3254 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3255 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3256 | fi |
b4e70030 | 3257 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3258 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3259 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3260 | |
b4e70030 | 3261 | rm -f conftest.$ac_ext |
bec39cab AC |
3262 | EXEEXT=$ac_cv_exeext |
3263 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3265 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3266 | if test "${ac_cv_objext+set}" = set; then : | |
3267 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3268 | else |
81ecdfbb | 3269 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3270 | /* end confdefs.h. */ |
3271 | ||
3272 | int | |
3273 | main () | |
3274 | { | |
3275 | ||
3276 | ; | |
3277 | return 0; | |
3278 | } | |
3279 | _ACEOF | |
3280 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3281 | if { { ac_try="$ac_compile" |
3282 | case "(($ac_try" in | |
3283 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3284 | *) ac_try_echo=$ac_try;; | |
3285 | esac | |
3286 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3287 | $as_echo "$ac_try_echo"; } >&5 | |
3288 | (eval "$ac_compile") 2>&5 | |
3289 | ac_status=$? | |
3290 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3291 | test $ac_status = 0; }; then : | |
3292 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3293 | test -f "$ac_file" || continue; | |
bec39cab | 3294 | case $ac_file in |
81ecdfbb | 3295 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3296 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3297 | break;; | |
3298 | esac | |
3299 | done | |
c906108c | 3300 | else |
81ecdfbb | 3301 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3302 | sed 's/^/| /' conftest.$ac_ext >&5 |
3303 | ||
81ecdfbb RW |
3304 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3305 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3306 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3307 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3308 | fi |
b4e70030 | 3309 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3310 | fi |
81ecdfbb RW |
3311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3312 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3313 | OBJEXT=$ac_cv_objext |
3314 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3316 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3317 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3318 | $as_echo_n "(cached) " >&6 | |
c906108c | 3319 | else |
81ecdfbb | 3320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3321 | /* end confdefs.h. */ |
3322 | ||
3323 | int | |
3324 | main () | |
3325 | { | |
3326 | #ifndef __GNUC__ | |
3327 | choke me | |
3328 | #endif | |
3329 | ||
3330 | ; | |
3331 | return 0; | |
3332 | } | |
3333 | _ACEOF | |
81ecdfbb | 3334 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3335 | ac_compiler_gnu=yes |
3336 | else | |
81ecdfbb | 3337 | ac_compiler_gnu=no |
bec39cab | 3338 | fi |
81ecdfbb | 3339 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3340 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3341 | ||
3342 | fi | |
81ecdfbb RW |
3343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3344 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3345 | if test $ac_compiler_gnu = yes; then | |
3346 | GCC=yes | |
3347 | else | |
3348 | GCC= | |
3349 | fi | |
bec39cab AC |
3350 | ac_test_CFLAGS=${CFLAGS+set} |
3351 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3353 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3354 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3355 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3356 | else |
81ecdfbb RW |
3357 | ac_save_c_werror_flag=$ac_c_werror_flag |
3358 | ac_c_werror_flag=yes | |
3359 | ac_cv_prog_cc_g=no | |
3360 | CFLAGS="-g" | |
3361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3362 | /* end confdefs.h. */ |
3363 | ||
3364 | int | |
3365 | main () | |
3366 | { | |
3367 | ||
3368 | ; | |
3369 | return 0; | |
3370 | } | |
3371 | _ACEOF | |
81ecdfbb | 3372 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3373 | ac_cv_prog_cc_g=yes |
3374 | else | |
81ecdfbb RW |
3375 | CFLAGS="" |
3376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3377 | /* end confdefs.h. */ | |
3378 | ||
3379 | int | |
3380 | main () | |
3381 | { | |
3382 | ||
3383 | ; | |
3384 | return 0; | |
3385 | } | |
3386 | _ACEOF | |
3387 | if ac_fn_c_try_compile "$LINENO"; then : | |
3388 | ||
3389 | else | |
3390 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3391 | CFLAGS="-g" | |
3392 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3393 | /* end confdefs.h. */ | |
3394 | ||
3395 | int | |
3396 | main () | |
3397 | { | |
c906108c | 3398 | |
81ecdfbb RW |
3399 | ; |
3400 | return 0; | |
3401 | } | |
3402 | _ACEOF | |
3403 | if ac_fn_c_try_compile "$LINENO"; then : | |
3404 | ac_cv_prog_cc_g=yes | |
3405 | fi | |
3406 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3407 | fi | |
3408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3409 | fi |
81ecdfbb RW |
3410 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3411 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3412 | fi |
81ecdfbb RW |
3413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3414 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3415 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3416 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3417 | elif test $ac_cv_prog_cc_g = yes; then |
3418 | if test "$GCC" = yes; then | |
3419 | CFLAGS="-g -O2" | |
3420 | else | |
3421 | CFLAGS="-g" | |
3422 | fi | |
3423 | else | |
3424 | if test "$GCC" = yes; then | |
3425 | CFLAGS="-O2" | |
3426 | else | |
3427 | CFLAGS= | |
3428 | fi | |
3429 | fi | |
81ecdfbb RW |
3430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3431 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3432 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3433 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3434 | else |
81ecdfbb | 3435 | ac_cv_prog_cc_c89=no |
bec39cab | 3436 | ac_save_CC=$CC |
81ecdfbb | 3437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3438 | /* end confdefs.h. */ |
c906108c SS |
3439 | #include <stdarg.h> |
3440 | #include <stdio.h> | |
3441 | #include <sys/types.h> | |
3442 | #include <sys/stat.h> | |
3443 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3444 | struct buf { int x; }; | |
3445 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3446 | static char *e (p, i) | |
3447 | char **p; | |
3448 | int i; | |
3449 | { | |
3450 | return p[i]; | |
3451 | } | |
3452 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3453 | { | |
3454 | char *s; | |
3455 | va_list v; | |
3456 | va_start (v,p); | |
3457 | s = g (p, va_arg (v,int)); | |
3458 | va_end (v); | |
3459 | return s; | |
3460 | } | |
bec39cab AC |
3461 | |
3462 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3463 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3464 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3465 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3466 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3467 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3468 | that's true only with -std. */ |
bec39cab AC |
3469 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3470 | ||
81ecdfbb RW |
3471 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3472 | inside strings and character constants. */ | |
3473 | #define FOO(x) 'x' | |
3474 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3475 | ||
c906108c SS |
3476 | int test (int i, double x); |
3477 | struct s1 {int (*f) (int a);}; | |
3478 | struct s2 {int (*f) (double a);}; | |
3479 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3480 | int argc; | |
3481 | char **argv; | |
bec39cab AC |
3482 | int |
3483 | main () | |
3484 | { | |
c906108c | 3485 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3486 | ; |
3487 | return 0; | |
3488 | } | |
3489 | _ACEOF | |
81ecdfbb RW |
3490 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3491 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3492 | do |
3493 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3494 | if ac_fn_c_try_compile "$LINENO"; then : |
3495 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3496 | fi |
81ecdfbb RW |
3497 | rm -f core conftest.err conftest.$ac_objext |
3498 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3499 | done |
81ecdfbb | 3500 | rm -f conftest.$ac_ext |
bec39cab | 3501 | CC=$ac_save_CC |
c906108c SS |
3502 | |
3503 | fi | |
81ecdfbb RW |
3504 | # AC_CACHE_VAL |
3505 | case "x$ac_cv_prog_cc_c89" in | |
3506 | x) | |
3507 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3508 | $as_echo "none needed" >&6; } ;; | |
3509 | xno) | |
3510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3511 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3512 | *) |
81ecdfbb RW |
3513 | CC="$CC $ac_cv_prog_cc_c89" |
3514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3515 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3516 | esac |
81ecdfbb | 3517 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3518 | |
b4e70030 JB |
3519 | fi |
3520 | ||
bec39cab AC |
3521 | ac_ext=c |
3522 | ac_cpp='$CPP $CPPFLAGS' | |
3523 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3524 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3525 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3526 | |
60ca704f | 3527 | |
bec39cab AC |
3528 | ac_ext=c |
3529 | ac_cpp='$CPP $CPPFLAGS' | |
3530 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3531 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3532 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3534 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3535 | # On Suns, sometimes $CPP names a directory. |
3536 | if test -n "$CPP" && test -d "$CPP"; then | |
3537 | CPP= | |
8bb2c122 | 3538 | fi |
bec39cab | 3539 | if test -z "$CPP"; then |
81ecdfbb RW |
3540 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3541 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3542 | else |
3543 | # Double quotes because CPP needs to be expanded | |
3544 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3545 | do | |
3546 | ac_preproc_ok=false | |
3547 | for ac_c_preproc_warn_flag in '' yes | |
3548 | do | |
3549 | # Use a header file that comes with gcc, so configuring glibc | |
3550 | # with a fresh cross-compiler works. | |
3551 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3552 | # <limits.h> exists even on freestanding compilers. | |
3553 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3554 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3555 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3556 | /* end confdefs.h. */ |
3557 | #ifdef __STDC__ | |
3558 | # include <limits.h> | |
3559 | #else | |
3560 | # include <assert.h> | |
3561 | #endif | |
3562 | Syntax error | |
3563 | _ACEOF | |
81ecdfbb | 3564 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3565 | |
81ecdfbb | 3566 | else |
bec39cab AC |
3567 | # Broken: fails on valid input. |
3568 | continue | |
3569 | fi | |
3570 | rm -f conftest.err conftest.$ac_ext | |
3571 | ||
81ecdfbb | 3572 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3573 | # can be detected and how. |
81ecdfbb | 3574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3575 | /* end confdefs.h. */ |
3576 | #include <ac_nonexistent.h> | |
3577 | _ACEOF | |
81ecdfbb | 3578 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3579 | # Broken: success on invalid input. |
3580 | continue | |
8bb2c122 | 3581 | else |
bec39cab AC |
3582 | # Passes both tests. |
3583 | ac_preproc_ok=: | |
3584 | break | |
8bb2c122 | 3585 | fi |
bec39cab | 3586 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3587 | |
bec39cab AC |
3588 | done |
3589 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3590 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3591 | if $ac_preproc_ok; then : |
bec39cab AC |
3592 | break |
3593 | fi | |
8bb2c122 | 3594 | |
bec39cab AC |
3595 | done |
3596 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3597 | |
c906108c | 3598 | fi |
bec39cab AC |
3599 | CPP=$ac_cv_prog_CPP |
3600 | else | |
3601 | ac_cv_prog_CPP=$CPP | |
c906108c | 3602 | fi |
81ecdfbb RW |
3603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3604 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3605 | ac_preproc_ok=false |
3606 | for ac_c_preproc_warn_flag in '' yes | |
3607 | do | |
3608 | # Use a header file that comes with gcc, so configuring glibc | |
3609 | # with a fresh cross-compiler works. | |
3610 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3611 | # <limits.h> exists even on freestanding compilers. | |
3612 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3613 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3614 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3615 | /* end confdefs.h. */ |
3616 | #ifdef __STDC__ | |
3617 | # include <limits.h> | |
3618 | #else | |
3619 | # include <assert.h> | |
3620 | #endif | |
3621 | Syntax error | |
3622 | _ACEOF | |
81ecdfbb | 3623 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3624 | |
81ecdfbb | 3625 | else |
bec39cab AC |
3626 | # Broken: fails on valid input. |
3627 | continue | |
3628 | fi | |
3629 | rm -f conftest.err conftest.$ac_ext | |
3630 | ||
81ecdfbb | 3631 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3632 | # can be detected and how. |
81ecdfbb | 3633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3634 | /* end confdefs.h. */ |
3635 | #include <ac_nonexistent.h> | |
3636 | _ACEOF | |
81ecdfbb | 3637 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3638 | # Broken: success on invalid input. |
3639 | continue | |
c906108c | 3640 | else |
bec39cab AC |
3641 | # Passes both tests. |
3642 | ac_preproc_ok=: | |
3643 | break | |
c906108c | 3644 | fi |
bec39cab | 3645 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3646 | |
bec39cab AC |
3647 | done |
3648 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3649 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3650 | if $ac_preproc_ok; then : |
3651 | ||
c906108c | 3652 | else |
81ecdfbb RW |
3653 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3654 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3655 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3656 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3657 | fi |
c906108c | 3658 | |
bec39cab AC |
3659 | ac_ext=c |
3660 | ac_cpp='$CPP $CPPFLAGS' | |
3661 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3662 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3663 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3664 | ||
3665 | ||
81ecdfbb RW |
3666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3667 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3668 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3669 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3670 | else |
81ecdfbb RW |
3671 | if test -z "$GREP"; then |
3672 | ac_path_GREP_found=false | |
3673 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3674 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3675 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3676 | do | |
3677 | IFS=$as_save_IFS | |
3678 | test -z "$as_dir" && as_dir=. | |
3679 | for ac_prog in grep ggrep; do | |
3680 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3681 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3682 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3683 | # Check for GNU ac_path_GREP and select it if it is found. | |
3684 | # Check for GNU $ac_path_GREP | |
3685 | case `"$ac_path_GREP" --version 2>&1` in | |
3686 | *GNU*) | |
3687 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3688 | *) | |
3689 | ac_count=0 | |
3690 | $as_echo_n 0123456789 >"conftest.in" | |
3691 | while : | |
3692 | do | |
3693 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3694 | mv "conftest.tmp" "conftest.in" | |
3695 | cp "conftest.in" "conftest.nl" | |
3696 | $as_echo 'GREP' >> "conftest.nl" | |
3697 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3698 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3699 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3700 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3701 | # Best one so far, save it but keep looking for a better one | |
3702 | ac_cv_path_GREP="$ac_path_GREP" | |
3703 | ac_path_GREP_max=$ac_count | |
bec39cab | 3704 | fi |
81ecdfbb RW |
3705 | # 10*(2^10) chars as input seems more than enough |
3706 | test $ac_count -gt 10 && break | |
3707 | done | |
3708 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3709 | esac | |
bec39cab | 3710 | |
81ecdfbb RW |
3711 | $ac_path_GREP_found && break 3 |
3712 | done | |
3713 | done | |
3714 | done | |
3715 | IFS=$as_save_IFS | |
3716 | if test -z "$ac_cv_path_GREP"; then | |
3717 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3718 | fi | |
c906108c | 3719 | else |
81ecdfbb | 3720 | ac_cv_path_GREP=$GREP |
c906108c | 3721 | fi |
c906108c | 3722 | |
81ecdfbb RW |
3723 | fi |
3724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3725 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3726 | GREP="$ac_cv_path_GREP" | |
c906108c | 3727 | |
c906108c | 3728 | |
81ecdfbb RW |
3729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3730 | $as_echo_n "checking for egrep... " >&6; } | |
3731 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3732 | $as_echo_n "(cached) " >&6 | |
783e057b | 3733 | else |
81ecdfbb RW |
3734 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3735 | then ac_cv_path_EGREP="$GREP -E" | |
3736 | else | |
3737 | if test -z "$EGREP"; then | |
3738 | ac_path_EGREP_found=false | |
3739 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3740 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3741 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3742 | do |
3743 | IFS=$as_save_IFS | |
3744 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3745 | for ac_prog in egrep; do |
3746 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3747 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3748 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3749 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3750 | # Check for GNU $ac_path_EGREP | |
3751 | case `"$ac_path_EGREP" --version 2>&1` in | |
3752 | *GNU*) | |
3753 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3754 | *) | |
3755 | ac_count=0 | |
3756 | $as_echo_n 0123456789 >"conftest.in" | |
3757 | while : | |
3758 | do | |
3759 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3760 | mv "conftest.tmp" "conftest.in" | |
3761 | cp "conftest.in" "conftest.nl" | |
3762 | $as_echo 'EGREP' >> "conftest.nl" | |
3763 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3764 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3765 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3766 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3767 | # Best one so far, save it but keep looking for a better one | |
3768 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3769 | ac_path_EGREP_max=$ac_count | |
3770 | fi | |
3771 | # 10*(2^10) chars as input seems more than enough | |
3772 | test $ac_count -gt 10 && break | |
3773 | done | |
3774 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3775 | esac | |
bec39cab | 3776 | |
81ecdfbb RW |
3777 | $ac_path_EGREP_found && break 3 |
3778 | done | |
3779 | done | |
3780 | done | |
3781 | IFS=$as_save_IFS | |
3782 | if test -z "$ac_cv_path_EGREP"; then | |
3783 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3784 | fi |
783e057b | 3785 | else |
81ecdfbb | 3786 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3787 | fi |
3788 | ||
81ecdfbb | 3789 | fi |
783e057b | 3790 | fi |
81ecdfbb RW |
3791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3792 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3793 | EGREP="$ac_cv_path_EGREP" | |
3794 | ||
783e057b | 3795 | |
81ecdfbb RW |
3796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3797 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3798 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3799 | $as_echo_n "(cached) " >&6 | |
783e057b | 3800 | else |
81ecdfbb | 3801 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3802 | /* end confdefs.h. */ |
783e057b | 3803 | #include <stdlib.h> |
bec39cab | 3804 | #include <stdarg.h> |
783e057b DJ |
3805 | #include <string.h> |
3806 | #include <float.h> | |
c906108c | 3807 | |
bec39cab AC |
3808 | int |
3809 | main () | |
3810 | { | |
c906108c | 3811 | |
bec39cab AC |
3812 | ; |
3813 | return 0; | |
3814 | } | |
3815 | _ACEOF | |
81ecdfbb | 3816 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3817 | ac_cv_header_stdc=yes |
c906108c | 3818 | else |
81ecdfbb | 3819 | ac_cv_header_stdc=no |
c906108c | 3820 | fi |
81ecdfbb | 3821 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3822 | |
783e057b DJ |
3823 | if test $ac_cv_header_stdc = yes; then |
3824 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3825 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3826 | /* end confdefs.h. */ |
3827 | #include <string.h> | |
c906108c | 3828 | |
783e057b DJ |
3829 | _ACEOF |
3830 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3831 | $EGREP "memchr" >/dev/null 2>&1; then : |
3832 | ||
c906108c | 3833 | else |
783e057b | 3834 | ac_cv_header_stdc=no |
c906108c | 3835 | fi |
783e057b | 3836 | rm -f conftest* |
c906108c SS |
3837 | |
3838 | fi | |
3839 | ||
783e057b DJ |
3840 | if test $ac_cv_header_stdc = yes; then |
3841 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3843 | /* end confdefs.h. */ |
3844 | #include <stdlib.h> | |
bec39cab | 3845 | |
783e057b DJ |
3846 | _ACEOF |
3847 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3848 | $EGREP "free" >/dev/null 2>&1; then : |
3849 | ||
bec39cab | 3850 | else |
783e057b | 3851 | ac_cv_header_stdc=no |
bec39cab | 3852 | fi |
783e057b | 3853 | rm -f conftest* |
bec39cab AC |
3854 | |
3855 | fi | |
bec39cab | 3856 | |
783e057b DJ |
3857 | if test $ac_cv_header_stdc = yes; then |
3858 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3859 | if test "$cross_compiling" = yes; then : |
783e057b | 3860 | : |
bec39cab | 3861 | else |
81ecdfbb | 3862 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3863 | /* end confdefs.h. */ |
3864 | #include <ctype.h> | |
81ecdfbb | 3865 | #include <stdlib.h> |
783e057b DJ |
3866 | #if ((' ' & 0x0FF) == 0x020) |
3867 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3868 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3869 | #else | |
3870 | # define ISLOWER(c) \ | |
3871 | (('a' <= (c) && (c) <= 'i') \ | |
3872 | || ('j' <= (c) && (c) <= 'r') \ | |
3873 | || ('s' <= (c) && (c) <= 'z')) | |
3874 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3875 | #endif | |
3876 | ||
3877 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3878 | int | |
3879 | main () | |
3880 | { | |
3881 | int i; | |
3882 | for (i = 0; i < 256; i++) | |
3883 | if (XOR (islower (i), ISLOWER (i)) | |
3884 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3885 | return 2; |
3886 | return 0; | |
783e057b DJ |
3887 | } |
3888 | _ACEOF | |
81ecdfbb | 3889 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3890 | |
81ecdfbb RW |
3891 | else |
3892 | ac_cv_header_stdc=no | |
783e057b | 3893 | fi |
81ecdfbb RW |
3894 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3895 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3896 | fi |
81ecdfbb | 3897 | |
783e057b DJ |
3898 | fi |
3899 | fi | |
81ecdfbb RW |
3900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3901 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3902 | if test $ac_cv_header_stdc = yes; then |
3903 | ||
81ecdfbb | 3904 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3905 | |
3906 | fi | |
3907 | ||
3908 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3909 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3910 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3911 | do : |
3912 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3913 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3914 | " | |
3915 | eval as_val=\$$as_ac_Header | |
3916 | if test "x$as_val" = x""yes; then : | |
783e057b | 3917 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3918 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3919 | _ACEOF |
3920 | ||
3921 | fi | |
3922 | ||
3923 | done | |
3924 | ||
3925 | ||
3926 | ||
81ecdfbb RW |
3927 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3928 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3929 | MINIX=yes |
3930 | else | |
3931 | MINIX= | |
3932 | fi | |
3933 | ||
3934 | ||
3935 | if test "$MINIX" = yes; then | |
3936 | ||
81ecdfbb | 3937 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3938 | |
3939 | ||
81ecdfbb | 3940 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3941 | |
3942 | ||
81ecdfbb | 3943 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3944 | |
3945 | fi | |
3946 | ||
3947 | ||
81ecdfbb RW |
3948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3949 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3950 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3951 | $as_echo_n "(cached) " >&6 | |
783e057b | 3952 | else |
81ecdfbb | 3953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3954 | /* end confdefs.h. */ |
3955 | ||
3956 | # define __EXTENSIONS__ 1 | |
3957 | $ac_includes_default | |
3958 | int | |
3959 | main () | |
3960 | { | |
3961 | ||
3962 | ; | |
3963 | return 0; | |
3964 | } | |
3965 | _ACEOF | |
81ecdfbb | 3966 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3967 | ac_cv_safe_to_define___extensions__=yes |
3968 | else | |
81ecdfbb | 3969 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3970 | fi |
81ecdfbb | 3971 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3972 | fi |
81ecdfbb RW |
3973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3974 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3975 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3976 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3977 | |
81ecdfbb | 3978 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3979 | |
81ecdfbb | 3980 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3981 | |
81ecdfbb | 3982 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3983 | |
81ecdfbb | 3984 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3985 | |
3986 | ||
81ecdfbb RW |
3987 | if test -n "$ac_tool_prefix"; then |
3988 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
3989 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
3990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3991 | $as_echo_n "checking for $ac_word... " >&6; } | |
3992 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
3993 | $as_echo_n "(cached) " >&6 | |
3994 | else | |
3995 | if test -n "$RANLIB"; then | |
3996 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3997 | else | |
3998 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3999 | for as_dir in $PATH | |
4000 | do | |
4001 | IFS=$as_save_IFS | |
4002 | test -z "$as_dir" && as_dir=. | |
4003 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4004 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4005 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4006 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4007 | break 2 | |
4008 | fi | |
4009 | done | |
4010 | done | |
4011 | IFS=$as_save_IFS | |
783e057b | 4012 | |
81ecdfbb RW |
4013 | fi |
4014 | fi | |
4015 | RANLIB=$ac_cv_prog_RANLIB | |
4016 | if test -n "$RANLIB"; then | |
4017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4018 | $as_echo "$RANLIB" >&6; } | |
4019 | else | |
4020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4021 | $as_echo "no" >&6; } | |
4022 | fi | |
783e057b DJ |
4023 | |
4024 | ||
81ecdfbb RW |
4025 | fi |
4026 | if test -z "$ac_cv_prog_RANLIB"; then | |
4027 | ac_ct_RANLIB=$RANLIB | |
4028 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4029 | set dummy ranlib; ac_word=$2 | |
4030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4031 | $as_echo_n "checking for $ac_word... " >&6; } | |
4032 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
4033 | $as_echo_n "(cached) " >&6 | |
783e057b | 4034 | else |
81ecdfbb RW |
4035 | if test -n "$ac_ct_RANLIB"; then |
4036 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4037 | else | |
4038 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4039 | for as_dir in $PATH | |
4040 | do | |
4041 | IFS=$as_save_IFS | |
4042 | test -z "$as_dir" && as_dir=. | |
4043 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4044 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4045 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
4046 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4047 | break 2 | |
4048 | fi | |
4049 | done | |
4050 | done | |
4051 | IFS=$as_save_IFS | |
4052 | ||
4053 | fi | |
4054 | fi | |
4055 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4056 | if test -n "$ac_ct_RANLIB"; then | |
4057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4058 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4059 | else | |
4060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4061 | $as_echo "no" >&6; } | |
4062 | fi | |
4063 | ||
4064 | if test "x$ac_ct_RANLIB" = x; then | |
4065 | RANLIB=":" | |
4066 | else | |
4067 | case $cross_compiling:$ac_tool_warned in | |
4068 | yes:) | |
4069 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4070 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4071 | ac_tool_warned=yes ;; | |
4072 | esac | |
4073 | RANLIB=$ac_ct_RANLIB | |
4074 | fi | |
4075 | else | |
4076 | RANLIB="$ac_cv_prog_RANLIB" | |
4077 | fi | |
4078 | ||
4079 | ||
4080 | ||
4081 | ||
4082 | ||
4083 | ||
4084 | ||
4085 | ||
4086 | ||
4087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4088 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4089 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4090 | $as_echo_n "(cached) " >&6 | |
4091 | else | |
4092 | am_cv_prog_cc_stdc=no | |
4093 | ac_save_CC="$CC" | |
4094 | # Don't try gcc -ansi; that turns off useful extensions and | |
4095 | # breaks some systems' header files. | |
4096 | # AIX -qlanglvl=ansi | |
4097 | # Ultrix and OSF/1 -std1 | |
4098 | # HP-UX 10.20 and later -Ae | |
4099 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4100 | # SVR4 -Xc -D__EXTENSIONS__ | |
4101 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4102 | do | |
783e057b | 4103 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4105 | /* end confdefs.h. */ |
4106 | #include <stdarg.h> | |
4107 | #include <stdio.h> | |
4108 | #include <sys/types.h> | |
4109 | #include <sys/stat.h> | |
4110 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4111 | struct buf { int x; }; | |
4112 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4113 | static char *e (p, i) | |
4114 | char **p; | |
4115 | int i; | |
4116 | { | |
4117 | return p[i]; | |
4118 | } | |
4119 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4120 | { | |
4121 | char *s; | |
4122 | va_list v; | |
4123 | va_start (v,p); | |
4124 | s = g (p, va_arg (v,int)); | |
4125 | va_end (v); | |
4126 | return s; | |
4127 | } | |
4128 | int test (int i, double x); | |
4129 | struct s1 {int (*f) (int a);}; | |
4130 | struct s2 {int (*f) (double a);}; | |
4131 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4132 | int argc; | |
4133 | char **argv; | |
4134 | ||
4135 | int | |
4136 | main () | |
4137 | { | |
4138 | ||
4139 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4140 | ||
4141 | ; | |
4142 | return 0; | |
4143 | } | |
4144 | _ACEOF | |
81ecdfbb | 4145 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4146 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4147 | fi |
81ecdfbb | 4148 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4149 | done |
4150 | CC="$ac_save_CC" | |
4151 | ||
4152 | fi | |
4153 | ||
4154 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4156 | $as_echo "none needed" >&6; } | |
783e057b | 4157 | else |
81ecdfbb RW |
4158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4159 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4160 | fi |
4161 | case "x$am_cv_prog_cc_stdc" in | |
4162 | x|xno) ;; | |
4163 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4164 | esac | |
4165 | ||
4166 | ||
4167 | ac_aux_dir= | |
81ecdfbb RW |
4168 | for ac_dir in .. "$srcdir"/..; do |
4169 | for ac_t in install-sh install.sh shtool; do | |
4170 | if test -f "$ac_dir/$ac_t"; then | |
4171 | ac_aux_dir=$ac_dir | |
4172 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4173 | break 2 | |
4174 | fi | |
4175 | done | |
783e057b DJ |
4176 | done |
4177 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4178 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4179 | fi |
81ecdfbb RW |
4180 | |
4181 | # These three variables are undocumented and unsupported, | |
4182 | # and are intended to be withdrawn in a future Autoconf release. | |
4183 | # They can cause serious problems if a builder's source tree is in a directory | |
4184 | # whose full name contains unusual characters. | |
4185 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4186 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4187 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4188 | ||
783e057b DJ |
4189 | |
4190 | # Make sure we can run config.sub. | |
81ecdfbb RW |
4191 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
4192 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
4193 | ||
4194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4195 | $as_echo_n "checking build system type... " >&6; } | |
4196 | if test "${ac_cv_build+set}" = set; then : | |
4197 | $as_echo_n "(cached) " >&6 | |
4198 | else | |
4199 | ac_build_alias=$build_alias | |
4200 | test "x$ac_build_alias" = x && | |
4201 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4202 | test "x$ac_build_alias" = x && | |
4203 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
4204 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
4205 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
4206 | ||
4207 | fi | |
4208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4209 | $as_echo "$ac_cv_build" >&6; } | |
4210 | case $ac_cv_build in | |
4211 | *-*-*) ;; | |
4212 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
4213 | esac | |
783e057b | 4214 | build=$ac_cv_build |
81ecdfbb RW |
4215 | ac_save_IFS=$IFS; IFS='-' |
4216 | set x $ac_cv_build | |
4217 | shift | |
4218 | build_cpu=$1 | |
4219 | build_vendor=$2 | |
4220 | shift; shift | |
4221 | # Remember, the first character of IFS is used to create $*, | |
4222 | # except with old shells: | |
4223 | build_os=$* | |
4224 | IFS=$ac_save_IFS | |
4225 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
783e057b DJ |
4226 | |
4227 | ||
81ecdfbb RW |
4228 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4229 | $as_echo_n "checking host system type... " >&6; } | |
4230 | if test "${ac_cv_host+set}" = set; then : | |
4231 | $as_echo_n "(cached) " >&6 | |
4232 | else | |
4233 | if test "x$host_alias" = x; then | |
4234 | ac_cv_host=$ac_cv_build | |
783e057b | 4235 | else |
81ecdfbb RW |
4236 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4237 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
4238 | fi | |
783e057b DJ |
4239 | |
4240 | fi | |
81ecdfbb RW |
4241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4242 | $as_echo "$ac_cv_host" >&6; } | |
4243 | case $ac_cv_host in | |
4244 | *-*-*) ;; | |
4245 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
4246 | esac | |
783e057b | 4247 | host=$ac_cv_host |
81ecdfbb RW |
4248 | ac_save_IFS=$IFS; IFS='-' |
4249 | set x $ac_cv_host | |
4250 | shift | |
4251 | host_cpu=$1 | |
4252 | host_vendor=$2 | |
4253 | shift; shift | |
4254 | # Remember, the first character of IFS is used to create $*, | |
4255 | # except with old shells: | |
4256 | host_os=$* | |
4257 | IFS=$ac_save_IFS | |
4258 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
783e057b DJ |
4259 | |
4260 | ||
81ecdfbb RW |
4261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
4262 | $as_echo_n "checking target system type... " >&6; } | |
4263 | if test "${ac_cv_target+set}" = set; then : | |
4264 | $as_echo_n "(cached) " >&6 | |
783e057b | 4265 | else |
81ecdfbb RW |
4266 | if test "x$target_alias" = x; then |
4267 | ac_cv_target=$ac_cv_host | |
4268 | else | |
4269 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4270 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4271 | fi | |
bec39cab AC |
4272 | |
4273 | fi | |
81ecdfbb RW |
4274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 |
4275 | $as_echo "$ac_cv_target" >&6; } | |
4276 | case $ac_cv_target in | |
4277 | *-*-*) ;; | |
4278 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4279 | esac | |
783e057b | 4280 | target=$ac_cv_target |
81ecdfbb RW |
4281 | ac_save_IFS=$IFS; IFS='-' |
4282 | set x $ac_cv_target | |
4283 | shift | |
4284 | target_cpu=$1 | |
4285 | target_vendor=$2 | |
4286 | shift; shift | |
4287 | # Remember, the first character of IFS is used to create $*, | |
4288 | # except with old shells: | |
4289 | target_os=$* | |
4290 | IFS=$ac_save_IFS | |
4291 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
783e057b DJ |
4292 | |
4293 | ||
4294 | # The aliases save the names the user supplied, while $host etc. | |
4295 | # will get canonicalized. | |
4296 | test -n "$target_alias" && | |
4297 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4298 | NONENONEs,x,x, && | |
4299 | program_prefix=${target_alias}- | |
4300 | ||
81ecdfbb | 4301 | |
a417dc56 RW |
4302 | # Dependency checking. |
4303 | rm -rf .tst 2>/dev/null | |
4304 | mkdir .tst 2>/dev/null | |
4305 | if test -d .tst; then | |
4306 | am__leading_dot=. | |
4307 | else | |
4308 | am__leading_dot=_ | |
4309 | fi | |
4310 | rmdir .tst 2>/dev/null | |
4311 | ||
4312 | DEPDIR="${am__leading_dot}deps" | |
4313 | ||
81ecdfbb | 4314 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4315 | |
4316 | ||
4317 | depcc="$CC" am_compiler_list= | |
4318 | ||
4319 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4321 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4322 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4323 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4324 | else |
4325 | if test -f "$am_depcomp"; then | |
4326 | # We make a subdir and do the tests there. Otherwise we can end up | |
4327 | # making bogus files that we don't know about and never remove. For | |
4328 | # instance it was reported that on HP-UX the gcc test will end up | |
4329 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4330 | # in D'. | |
4331 | mkdir conftest.dir | |
4332 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4333 | # using a relative directory. | |
4334 | cp "$am_depcomp" conftest.dir | |
4335 | cd conftest.dir | |
4336 | # We will build objects and dependencies in a subdirectory because | |
4337 | # it helps to detect inapplicable dependency modes. For instance | |
4338 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4339 | # side effect of compilation, but ICC will put the dependencies in | |
4340 | # the current directory while Tru64 will put them in the object | |
4341 | # directory. | |
4342 | mkdir sub | |
4343 | ||
4344 | am_cv_CC_dependencies_compiler_type=none | |
4345 | if test "$am_compiler_list" = ""; then | |
4346 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4347 | fi | |
4348 | for depmode in $am_compiler_list; do | |
4349 | if test $depmode = none; then break; fi | |
4350 | ||
81ecdfbb | 4351 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4352 | # Setup a source with many dependencies, because some compilers |
4353 | # like to wrap large dependency lists on column 80 (with \), and | |
4354 | # we should not choose a depcomp mode which is confused by this. | |
4355 | # | |
4356 | # We need to recreate these files for each test, as the compiler may | |
4357 | # overwrite some of them when testing with obscure command lines. | |
4358 | # This happens at least with the AIX C compiler. | |
4359 | : > sub/conftest.c | |
4360 | for i in 1 2 3 4 5 6; do | |
4361 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4362 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4363 | # Solaris 8's {/usr,}/bin/sh. | |
4364 | touch sub/conftst$i.h | |
4365 | done | |
4366 | echo "include sub/conftest.Po" > confmf | |
4367 | ||
4368 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4369 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4370 | # handle `-M -o', and we need to detect this. | |
4371 | depcmd="depmode=$depmode \ | |
4372 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4373 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4374 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4375 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4376 | if env $depcmd > conftest.err 2>&1 && | |
4377 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4378 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4379 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4380 | # icc doesn't choke on unknown options, it will just issue warnings | |
4381 | # or remarks (even with -Werror). So we grep stderr for any message | |
4382 | # that says an option was ignored or not supported. | |
4383 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4384 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4385 | # The diagnosis changed in icc 8.0: | |
4386 | # icc: Command line remark: option '-MP' not supported | |
4387 | if (grep 'ignoring option' conftest.err || | |
4388 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4389 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4390 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4391 | break |
4392 | fi | |
4393 | fi | |
81ecdfbb | 4394 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4395 | sed -e 's/^/| /' < conftest.err >&5 |
4396 | done | |
4397 | ||
4398 | cd .. | |
4399 | rm -rf conftest.dir | |
4400 | else | |
4401 | am_cv_CC_dependencies_compiler_type=none | |
4402 | fi | |
4403 | ||
4404 | fi | |
81ecdfbb RW |
4405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4406 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4407 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4408 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4409 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4410 | ||
4411 | fi | |
4412 | ||
4413 | ||
4414 | # Check for the 'make' the user wants to use. | |
4415 | for ac_prog in make | |
4416 | do | |
4417 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4418 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4419 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4420 | $as_echo_n "checking for $ac_word... " >&6; } | |
4421 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4422 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4423 | else |
4424 | if test -n "$MAKE"; then | |
4425 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4426 | else | |
4427 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4428 | for as_dir in $PATH | |
4429 | do | |
4430 | IFS=$as_save_IFS | |
4431 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4432 | for ac_exec_ext in '' $ac_executable_extensions; do |
4433 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4434 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4435 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4436 | break 2 |
4437 | fi | |
4438 | done | |
81ecdfbb RW |
4439 | done |
4440 | IFS=$as_save_IFS | |
a417dc56 RW |
4441 | |
4442 | fi | |
4443 | fi | |
4444 | MAKE=$ac_cv_prog_MAKE | |
4445 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4447 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4448 | else |
81ecdfbb RW |
4449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4450 | $as_echo "no" >&6; } | |
a417dc56 RW |
4451 | fi |
4452 | ||
81ecdfbb | 4453 | |
a417dc56 RW |
4454 | test -n "$MAKE" && break |
4455 | done | |
4456 | ||
4457 | MAKE_IS_GNU= | |
4458 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4459 | *GNU*) | |
4460 | MAKE_IS_GNU=yes | |
4461 | ;; | |
4462 | esac | |
81ecdfbb | 4463 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4464 | GMAKE_TRUE= |
4465 | GMAKE_FALSE='#' | |
4466 | else | |
4467 | GMAKE_TRUE='#' | |
4468 | GMAKE_FALSE= | |
4469 | fi | |
4470 | ||
81ecdfbb RW |
4471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4472 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4473 | set x ${MAKE-make} | |
4474 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4475 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4476 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4477 | else |
4478 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4479 | SHELL = /bin/sh |
a417dc56 | 4480 | all: |
81ecdfbb | 4481 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4482 | _ACEOF |
4483 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4484 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4485 | *@@@%%%=?*=@@@%%%*) | |
4486 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4487 | *) | |
4488 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4489 | esac | |
a417dc56 RW |
4490 | rm -f conftest.make |
4491 | fi | |
81ecdfbb RW |
4492 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4493 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4494 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4495 | SET_MAKE= |
4496 | else | |
81ecdfbb RW |
4497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4498 | $as_echo "no" >&6; } | |
a417dc56 RW |
4499 | SET_MAKE="MAKE=${MAKE-make}" |
4500 | fi | |
4501 | ||
4502 | ||
783e057b DJ |
4503 | |
4504 | CONFIG_OBS= | |
4505 | CONFIG_DEPS= | |
4506 | CONFIG_SRCS= | |
4507 | ENABLE_CFLAGS= | |
4508 | ||
4509 | CONFIG_ALL= | |
4510 | CONFIG_CLEAN= | |
4511 | CONFIG_INSTALL= | |
4512 | CONFIG_UNINSTALL= | |
4513 | ||
4514 | # If we haven't got the data from the intl directory, | |
4515 | # assume NLS is disabled. | |
4516 | USE_NLS=no | |
4517 | LIBINTL= | |
4518 | LIBINTL_DEP= | |
4519 | INCINTL= | |
4520 | XGETTEXT= | |
4521 | GMSGFMT= | |
4522 | POSUB= | |
4523 | ||
4524 | if test -f ../intl/config.intl; then | |
4525 | . ../intl/config.intl | |
4526 | fi | |
81ecdfbb RW |
4527 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4528 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4529 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4531 | $as_echo "no" >&6; } | |
783e057b | 4532 | else |
81ecdfbb RW |
4533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4534 | $as_echo "yes" >&6; } | |
783e057b | 4535 | |
81ecdfbb | 4536 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4537 | |
4538 | ||
81ecdfbb RW |
4539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4540 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4541 | # Look for .po and .gmo files in the source directory. |
4542 | CATALOGS= | |
4543 | XLINGUAS= | |
4544 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4545 | # If there aren't any .gmo files the shell will give us the | |
4546 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4547 | # weeded out. | |
4548 | case "$cat" in *\**) | |
4549 | continue;; | |
4550 | esac | |
4551 | # The quadruple backslash is collapsed to a double backslash | |
4552 | # by the backticks, then collapsed again by the double quotes, | |
4553 | # leaving us with one backslash in the sed expression (right | |
4554 | # before the dot that mustn't act as a wildcard). | |
4555 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
4556 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4557 | # The user is allowed to set LINGUAS to a list of languages to | |
4558 | # install catalogs for. If it's empty that means "all of them." | |
4559 | if test "x$LINGUAS" = x; then | |
4560 | CATALOGS="$CATALOGS $cat" | |
4561 | XLINGUAS="$XLINGUAS $lang" | |
4562 | else | |
4563 | case "$LINGUAS" in *$lang*) | |
4564 | CATALOGS="$CATALOGS $cat" | |
4565 | XLINGUAS="$XLINGUAS $lang" | |
4566 | ;; | |
4567 | esac | |
4568 | fi | |
4569 | done | |
4570 | LINGUAS="$XLINGUAS" | |
81ecdfbb RW |
4571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
4572 | $as_echo "$LINGUAS" >&6; } | |
783e057b DJ |
4573 | |
4574 | ||
4575 | DATADIRNAME=share | |
4576 | ||
4577 | INSTOBJEXT=.mo | |
4578 | ||
4579 | GENCAT=gencat | |
4580 | ||
4581 | CATOBJEXT=.gmo | |
4582 | ||
4583 | fi | |
4584 | ||
4585 | localedir='${datadir}/locale' | |
4586 | ||
4587 | ||
4588 | if test x"$USE_NLS" = xyes; then | |
4589 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4590 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4591 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4592 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
4593 | fi | |
4594 | ||
4595 | ||
4596 | GNULIB_MEMMEM=0; | |
4597 | GNULIB_MEMPCPY=0; | |
4598 | GNULIB_MEMRCHR=0; | |
4599 | GNULIB_STPCPY=0; | |
4600 | GNULIB_STPNCPY=0; | |
4601 | GNULIB_STRCHRNUL=0; | |
4602 | GNULIB_STRDUP=0; | |
4603 | GNULIB_STRNDUP=0; | |
4604 | GNULIB_STRNLEN=0; | |
4605 | GNULIB_STRPBRK=0; | |
4606 | GNULIB_STRSEP=0; | |
4607 | GNULIB_STRSTR=0; | |
4608 | GNULIB_STRCASESTR=0; | |
4609 | GNULIB_STRTOK_R=0; | |
4610 | GNULIB_MBSLEN=0; | |
4611 | GNULIB_MBSNLEN=0; | |
4612 | GNULIB_MBSCHR=0; | |
4613 | GNULIB_MBSRCHR=0; | |
4614 | GNULIB_MBSSTR=0; | |
4615 | GNULIB_MBSCASECMP=0; | |
4616 | GNULIB_MBSNCASECMP=0; | |
4617 | GNULIB_MBSPCASECMP=0; | |
4618 | GNULIB_MBSCASESTR=0; | |
4619 | GNULIB_MBSCSPN=0; | |
4620 | GNULIB_MBSPBRK=0; | |
4621 | GNULIB_MBSSPN=0; | |
4622 | GNULIB_MBSSEP=0; | |
4623 | GNULIB_MBSTOK_R=0; | |
4624 | GNULIB_STRERROR=0; | |
4625 | GNULIB_STRSIGNAL=0; | |
4626 | HAVE_DECL_MEMMEM=1; | |
4627 | HAVE_MEMPCPY=1; | |
4628 | HAVE_DECL_MEMRCHR=1; | |
4629 | HAVE_STPCPY=1; | |
4630 | HAVE_STPNCPY=1; | |
4631 | HAVE_STRCHRNUL=1; | |
4632 | HAVE_DECL_STRDUP=1; | |
4633 | HAVE_STRNDUP=1; | |
4634 | HAVE_DECL_STRNDUP=1; | |
4635 | HAVE_DECL_STRNLEN=1; | |
4636 | HAVE_STRPBRK=1; | |
4637 | HAVE_STRSEP=1; | |
4638 | HAVE_STRCASESTR=1; | |
4639 | HAVE_DECL_STRTOK_R=1; | |
4640 | HAVE_DECL_STRERROR=1; | |
4641 | HAVE_DECL_STRSIGNAL=1; | |
4642 | REPLACE_STRERROR=0; | |
4643 | REPLACE_STRSIGNAL=0; | |
4644 | REPLACE_MEMMEM=0; | |
4645 | REPLACE_STRCASESTR=0; | |
4646 | REPLACE_STRSTR=0; | |
4647 | ||
4648 | ||
81ecdfbb RW |
4649 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
4650 | if test "x$ac_cv_have_decl_memmem" = x""yes; then : | |
4651 | ac_have_decl=1 | |
783e057b | 4652 | else |
81ecdfbb | 4653 | ac_have_decl=0 |
783e057b | 4654 | fi |
783e057b DJ |
4655 | |
4656 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 4657 | #define HAVE_DECL_MEMMEM $ac_have_decl |
783e057b DJ |
4658 | _ACEOF |
4659 | ||
4660 | ||
783e057b DJ |
4661 | |
4662 | ||
4663 | ||
4664 | ||
4665 | ||
4666 | ||
4667 | ||
4668 | ||
783e057b | 4669 | |
783e057b | 4670 | |
783e057b | 4671 | |
81ecdfbb RW |
4672 | for ac_func in memmem |
4673 | do : | |
4674 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
4675 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 4676 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4677 | #define HAVE_MEMMEM 1 |
783e057b DJ |
4678 | _ACEOF |
4679 | ||
4680 | else | |
4681 | ||
4682 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
4683 | ||
4684 | fi | |
4685 | done | |
4686 | ||
4687 | ||
4688 | ||
4689 | : | |
4690 | ||
4691 | ||
4692 | ||
4693 | ||
4694 | ||
4695 | if test $ac_cv_have_decl_memmem = no; then | |
4696 | HAVE_DECL_MEMMEM=0 | |
4697 | fi | |
4698 | : | |
4699 | ||
4700 | ||
81ecdfbb RW |
4701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
4702 | $as_echo_n "checking for long long int... " >&6; } | |
4703 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
4704 | $as_echo_n "(cached) " >&6 | |
783e057b | 4705 | else |
81ecdfbb | 4706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 4707 | /* end confdefs.h. */ |
81ecdfbb RW |
4708 | |
4709 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
783e057b DJ |
4710 | implementations with broken preprocessors. Perhaps this can |
4711 | be revisited in 2012. In the meantime, code should not expect | |
4712 | #if to work with literals wider than 32 bits. */ | |
4713 | /* Test literals. */ | |
4714 | long long int ll = 9223372036854775807ll; | |
4715 | long long int nll = -9223372036854775807LL; | |
4716 | unsigned long long int ull = 18446744073709551615ULL; | |
4717 | /* Test constant expressions. */ | |
4718 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
4719 | ? 1 : -1)]; | |
4720 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
4721 | ? 1 : -1)]; | |
4722 | int i = 63; | |
4723 | int | |
4724 | main () | |
4725 | { | |
4726 | /* Test availability of runtime routines for shift and division. */ | |
4727 | long long int llmax = 9223372036854775807ll; | |
4728 | unsigned long long int ullmax = 18446744073709551615ull; | |
4729 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
4730 | | (llmax / ll) | (llmax % ll) | |
4731 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
4732 | | (ullmax / ull) | (ullmax % ull)); | |
4733 | ; | |
4734 | return 0; | |
4735 | } | |
4736 | ||
4737 | _ACEOF | |
81ecdfbb RW |
4738 | if ac_fn_c_try_link "$LINENO"; then : |
4739 | if test "$cross_compiling" = yes; then : | |
783e057b DJ |
4740 | ac_cv_type_long_long_int=yes |
4741 | else | |
81ecdfbb | 4742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4743 | /* end confdefs.h. */ |
4744 | #include <limits.h> | |
4745 | #ifndef LLONG_MAX | |
4746 | # define HALF \ | |
4747 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
4748 | # define LLONG_MAX (HALF - 1 + HALF) | |
4749 | #endif | |
4750 | int | |
4751 | main () | |
4752 | { | |
4753 | long long int n = 1; | |
4754 | int i; | |
4755 | for (i = 0; ; i++) | |
4756 | { | |
4757 | long long int m = n << i; | |
4758 | if (m >> i != n) | |
4759 | return 1; | |
4760 | if (LLONG_MAX / 2 < m) | |
4761 | break; | |
4762 | } | |
4763 | return 0; | |
4764 | ; | |
4765 | return 0; | |
4766 | } | |
4767 | _ACEOF | |
81ecdfbb | 4768 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
4769 | ac_cv_type_long_long_int=yes |
4770 | else | |
81ecdfbb | 4771 | ac_cv_type_long_long_int=no |
783e057b | 4772 | fi |
81ecdfbb RW |
4773 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4774 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4775 | fi |
783e057b | 4776 | |
81ecdfbb RW |
4777 | else |
4778 | ac_cv_type_long_long_int=no | |
783e057b | 4779 | fi |
81ecdfbb RW |
4780 | rm -f core conftest.err conftest.$ac_objext \ |
4781 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 4782 | fi |
81ecdfbb RW |
4783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
4784 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
783e057b DJ |
4785 | if test $ac_cv_type_long_long_int = yes; then |
4786 | ||
81ecdfbb | 4787 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
4788 | |
4789 | fi | |
4790 | ||
4791 | ||
81ecdfbb RW |
4792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
4793 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
4794 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
4795 | $as_echo_n "(cached) " >&6 | |
783e057b | 4796 | else |
81ecdfbb | 4797 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 4798 | /* end confdefs.h. */ |
81ecdfbb RW |
4799 | |
4800 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
783e057b DJ |
4801 | implementations with broken preprocessors. Perhaps this can |
4802 | be revisited in 2012. In the meantime, code should not expect | |
4803 | #if to work with literals wider than 32 bits. */ | |
4804 | /* Test literals. */ | |
4805 | long long int ll = 9223372036854775807ll; | |
4806 | long long int nll = -9223372036854775807LL; | |
4807 | unsigned long long int ull = 18446744073709551615ULL; | |
4808 | /* Test constant expressions. */ | |
4809 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
4810 | ? 1 : -1)]; | |
4811 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
4812 | ? 1 : -1)]; | |
4813 | int i = 63; | |
4814 | int | |
4815 | main () | |
4816 | { | |
4817 | /* Test availability of runtime routines for shift and division. */ | |
4818 | long long int llmax = 9223372036854775807ll; | |
4819 | unsigned long long int ullmax = 18446744073709551615ull; | |
4820 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
4821 | | (llmax / ll) | (llmax % ll) | |
4822 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
4823 | | (ullmax / ull) | (ullmax % ull)); | |
4824 | ; | |
4825 | return 0; | |
4826 | } | |
4827 | ||
4828 | _ACEOF | |
81ecdfbb | 4829 | if ac_fn_c_try_link "$LINENO"; then : |
783e057b DJ |
4830 | ac_cv_type_unsigned_long_long_int=yes |
4831 | else | |
81ecdfbb | 4832 | ac_cv_type_unsigned_long_long_int=no |
783e057b | 4833 | fi |
81ecdfbb RW |
4834 | rm -f core conftest.err conftest.$ac_objext \ |
4835 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 4836 | fi |
81ecdfbb RW |
4837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 |
4838 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
783e057b DJ |
4839 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
4840 | ||
81ecdfbb | 4841 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
4842 | |
4843 | fi | |
4844 | ||
4845 | ||
4846 | ||
81ecdfbb RW |
4847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 |
4848 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
4849 | if test "${gl_cv_have_include_next+set}" = set; then : | |
4850 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
4851 | else |
4852 | rm -rf conftestd1 conftestd2 | |
4853 | mkdir conftestd1 conftestd2 | |
4854 | cat <<EOF > conftestd1/conftest.h | |
4855 | #define DEFINED_IN_CONFTESTD1 | |
4856 | #include_next <conftest.h> | |
4857 | #ifdef DEFINED_IN_CONFTESTD2 | |
4858 | int foo; | |
4859 | #else | |
4860 | #error "include_next doesn't work" | |
4861 | #endif | |
4862 | EOF | |
4863 | cat <<EOF > conftestd2/conftest.h | |
4864 | #ifndef DEFINED_IN_CONFTESTD1 | |
4865 | #error "include_next test doesn't work" | |
4866 | #endif | |
4867 | #define DEFINED_IN_CONFTESTD2 | |
4868 | EOF | |
4869 | save_CPPFLAGS="$CPPFLAGS" | |
4870 | CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2" | |
81ecdfbb RW |
4871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4872 | /* end confdefs.h. */ | |
783e057b DJ |
4873 | #include <conftest.h> |
4874 | _ACEOF | |
81ecdfbb | 4875 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4876 | gl_cv_have_include_next=yes |
4877 | else | |
81ecdfbb | 4878 | gl_cv_have_include_next=no |
783e057b | 4879 | fi |
81ecdfbb | 4880 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4881 | CPPFLAGS="$save_CPPFLAGS" |
4882 | rm -rf conftestd1 conftestd2 | |
4883 | ||
4884 | fi | |
81ecdfbb RW |
4885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 |
4886 | $as_echo "$gl_cv_have_include_next" >&6; } | |
783e057b DJ |
4887 | if test $gl_cv_have_include_next = yes; then |
4888 | ||
4889 | ||
81ecdfbb | 4890 | $as_echo "#define HAVE_INCLUDE_NEXT 1" >>confdefs.h |
783e057b DJ |
4891 | |
4892 | ||
4893 | INCLUDE_NEXT=include_next | |
4894 | else | |
4895 | INCLUDE_NEXT=include | |
4896 | fi | |
4897 | ||
4898 | ||
4899 | ||
4900 | ||
4901 | ||
4902 | ||
81ecdfbb RW |
4903 | for ac_header in $gl_header_list |
4904 | do : | |
4905 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4906 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
4907 | eval as_val=\$$as_ac_Header | |
4908 | if test "x$as_val" = x""yes; then : | |
783e057b | 4909 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4910 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4911 | _ACEOF |
4912 | ||
4913 | fi | |
4914 | ||
4915 | done | |
4916 | ||
4917 | ||
4918 | ||
4919 | ||
4920 | ||
4921 | ||
4922 | ||
4923 | ||
4924 | ||
4925 | ||
81ecdfbb RW |
4926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
4927 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
4928 | if test "${ac_cv_c_restrict+set}" = set; then : | |
4929 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
4930 | else |
4931 | ac_cv_c_restrict=no | |
4932 | # The order here caters to the fact that C++ does not require restrict. | |
4933 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
81ecdfbb | 4934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4935 | /* end confdefs.h. */ |
4936 | typedef int * int_ptr; | |
4937 | int foo (int_ptr $ac_kw ip) { | |
4938 | return ip[0]; | |
4939 | } | |
4940 | int | |
4941 | main () | |
4942 | { | |
4943 | int s[1]; | |
4944 | int * $ac_kw t = s; | |
4945 | t[0] = 0; | |
4946 | return foo(t) | |
4947 | ; | |
4948 | return 0; | |
4949 | } | |
4950 | _ACEOF | |
81ecdfbb | 4951 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4952 | ac_cv_c_restrict=$ac_kw |
783e057b | 4953 | fi |
81ecdfbb | 4954 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4955 | test "$ac_cv_c_restrict" != no && break |
4956 | done | |
4957 | ||
4958 | fi | |
81ecdfbb RW |
4959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
4960 | $as_echo "$ac_cv_c_restrict" >&6; } | |
783e057b DJ |
4961 | |
4962 | case $ac_cv_c_restrict in | |
4963 | restrict) ;; | |
81ecdfbb | 4964 | no) $as_echo "#define restrict /**/" >>confdefs.h |
783e057b DJ |
4965 | ;; |
4966 | *) cat >>confdefs.h <<_ACEOF | |
4967 | #define restrict $ac_cv_c_restrict | |
4968 | _ACEOF | |
4969 | ;; | |
4970 | esac | |
4971 | ||
4972 | ||
4973 | ||
4974 | ||
4975 | ||
4976 | ||
4977 | ||
4978 | ||
4979 | ||
4980 | ||
4981 | ||
4982 | ||
783e057b DJ |
4983 | : |
4984 | ||
4985 | ||
4986 | ||
4987 | ||
4988 | ||
4989 | ||
4990 | ||
4991 | if test $gl_cv_have_include_next = yes; then | |
4992 | gl_cv_next_string_h='<'string.h'>' | |
4993 | else | |
81ecdfbb RW |
4994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 |
4995 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
4996 | if test "${gl_cv_next_string_h+set}" = set; then : | |
4997 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
4998 | else |
4999 | ||
5000 | if test $ac_cv_header_string_h = yes; then | |
81ecdfbb | 5001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5002 | /* end confdefs.h. */ |
5003 | #include <string.h> | |
5004 | ||
5005 | _ACEOF | |
5006 | gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5007 | sed -n '\#/string.h#{ | |
5008 | s#.*"\(.*/string.h\)".*#\1# | |
5009 | s#^/[^/]#//&# | |
5010 | p | |
5011 | q | |
5012 | }'`'"' | |
5013 | else | |
5014 | gl_cv_next_string_h='<'string.h'>' | |
5015 | fi | |
5016 | ||
5017 | fi | |
81ecdfbb RW |
5018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 |
5019 | $as_echo "$gl_cv_next_string_h" >&6; } | |
783e057b DJ |
5020 | fi |
5021 | NEXT_STRING_H=$gl_cv_next_string_h | |
5022 | ||
5023 | ||
5024 | ||
5025 | ||
5026 | ||
5027 | GNULIB_WCWIDTH=0; | |
5028 | HAVE_DECL_WCWIDTH=1; | |
5029 | REPLACE_WCWIDTH=0; | |
5030 | WCHAR_H= | |
5031 | ||
5032 | ||
5033 | ||
81ecdfbb | 5034 | if false; then |
783e057b DJ |
5035 | GL_COND_LIBTOOL_TRUE= |
5036 | GL_COND_LIBTOOL_FALSE='#' | |
5037 | else | |
5038 | GL_COND_LIBTOOL_TRUE='#' | |
5039 | GL_COND_LIBTOOL_FALSE= | |
5040 | fi | |
5041 | ||
5042 | gl_cond_libtool=false | |
5043 | gl_libdeps= | |
5044 | gl_ltlibdeps= | |
5045 | ||
5046 | ||
5047 | ||
5048 | gl_source_base='gnulib' | |
5049 | ||
5050 | ||
5051 | ||
5052 | ||
5053 | ||
5054 | ||
5055 | ||
5056 | ||
81ecdfbb RW |
5057 | for ac_func in memchr |
5058 | do : | |
5059 | ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr" | |
5060 | if test "x$ac_cv_func_memchr" = x""yes; then : | |
783e057b | 5061 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5062 | #define HAVE_MEMCHR 1 |
783e057b DJ |
5063 | _ACEOF |
5064 | ||
5065 | else | |
5066 | ||
5067 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
5068 | ||
5069 | fi | |
5070 | done | |
5071 | ||
5072 | ||
5073 | if test $ac_cv_func_memchr = no; then | |
5074 | ||
81ecdfbb RW |
5075 | for ac_header in bp-sym.h |
5076 | do : | |
5077 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
5078 | if test "x$ac_cv_header_bp_sym_h" = x""yes; then : | |
783e057b | 5079 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5080 | #define HAVE_BP_SYM_H 1 |
783e057b DJ |
5081 | _ACEOF |
5082 | ||
5083 | fi | |
5084 | ||
5085 | done | |
5086 | ||
5087 | ||
5088 | fi | |
5089 | ||
5090 | ||
81ecdfbb RW |
5091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 |
5092 | $as_echo_n "checking for working memcmp... " >&6; } | |
5093 | if test "${ac_cv_func_memcmp_working+set}" = set; then : | |
5094 | $as_echo_n "(cached) " >&6 | |
783e057b | 5095 | else |
81ecdfbb | 5096 | if test "$cross_compiling" = yes; then : |
783e057b DJ |
5097 | ac_cv_func_memcmp_working=no |
5098 | else | |
81ecdfbb | 5099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5100 | /* end confdefs.h. */ |
5101 | $ac_includes_default | |
5102 | int | |
5103 | main () | |
5104 | { | |
5105 | ||
5106 | /* Some versions of memcmp are not 8-bit clean. */ | |
81ecdfbb | 5107 | char c0 = '\100', c1 = '\200', c2 = '\201'; |
783e057b | 5108 | if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) |
81ecdfbb | 5109 | return 1; |
783e057b DJ |
5110 | |
5111 | /* The Next x86 OpenStep bug shows up only when comparing 16 bytes | |
5112 | or more and with at least one buffer not starting on a 4-byte boundary. | |
5113 | William Lewis provided this test program. */ | |
5114 | { | |
5115 | char foo[21]; | |
5116 | char bar[21]; | |
5117 | int i; | |
5118 | for (i = 0; i < 4; i++) | |
5119 | { | |
5120 | char *a = foo + i; | |
5121 | char *b = bar + i; | |
5122 | strcpy (a, "--------01111111"); | |
5123 | strcpy (b, "--------10000000"); | |
5124 | if (memcmp (a, b, 16) >= 0) | |
81ecdfbb | 5125 | return 1; |
783e057b | 5126 | } |
81ecdfbb | 5127 | return 0; |
783e057b DJ |
5128 | } |
5129 | ||
5130 | ; | |
5131 | return 0; | |
5132 | } | |
5133 | _ACEOF | |
81ecdfbb | 5134 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
5135 | ac_cv_func_memcmp_working=yes |
5136 | else | |
81ecdfbb | 5137 | ac_cv_func_memcmp_working=no |
783e057b | 5138 | fi |
81ecdfbb RW |
5139 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5140 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 5141 | fi |
81ecdfbb | 5142 | |
783e057b | 5143 | fi |
81ecdfbb RW |
5144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 |
5145 | $as_echo "$ac_cv_func_memcmp_working" >&6; } | |
783e057b DJ |
5146 | test $ac_cv_func_memcmp_working = no && |
5147 | ||
5148 | ||
5149 | ||
5150 | ||
5151 | ||
5152 | ||
5153 | gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext" | |
5154 | ||
5155 | ||
5156 | if test $ac_cv_func_memcmp_working = no; then | |
5157 | ||
81ecdfbb | 5158 | $as_echo "#define memcmp rpl_memcmp" >>confdefs.h |
783e057b DJ |
5159 | |
5160 | : | |
5161 | fi | |
5162 | ||
5163 | ||
5164 | ||
5165 | if test $ac_cv_have_decl_memmem = yes; then | |
81ecdfbb RW |
5166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 |
5167 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
5168 | if test "${gl_cv_func_memmem_works+set}" = set; then : | |
5169 | $as_echo_n "(cached) " >&6 | |
783e057b | 5170 | else |
81ecdfbb | 5171 | if test "$cross_compiling" = yes; then : |
783e057b DJ |
5172 | gl_cv_func_memmem_works="guessing no" |
5173 | else | |
81ecdfbb | 5174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5175 | /* end confdefs.h. */ |
5176 | ||
5177 | #include <string.h> /* for memmem */ | |
5178 | #include <stdlib.h> /* for malloc */ | |
5179 | #include <unistd.h> /* for alarm */ | |
5180 | ||
5181 | int | |
5182 | main () | |
5183 | { | |
5184 | size_t m = 1000000; | |
5185 | char *haystack = (char *) malloc (2 * m + 1); | |
5186 | char *needle = (char *) malloc (m + 1); | |
5187 | void *result = 0; | |
5188 | /* Failure to compile this test due to missing alarm is okay, | |
5189 | since all such platforms (mingw) also lack memmem. */ | |
5190 | alarm (5); | |
5191 | /* Check for quadratic performance. */ | |
5192 | if (haystack && needle) | |
5193 | { | |
5194 | memset (haystack, 'A', 2 * m); | |
5195 | haystack[2 * m] = 'B'; | |
5196 | memset (needle, 'A', m); | |
5197 | needle[m] = 'B'; | |
5198 | result = memmem (haystack, 2 * m + 1, needle, m + 1); | |
5199 | } | |
5200 | /* Check for empty needle behavior. */ | |
5201 | return !result || !memmem ("a", 1, 0, 0); | |
5202 | ; | |
5203 | return 0; | |
5204 | } | |
5205 | _ACEOF | |
81ecdfbb | 5206 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
5207 | gl_cv_func_memmem_works=yes |
5208 | else | |
81ecdfbb | 5209 | gl_cv_func_memmem_works=no |
783e057b | 5210 | fi |
81ecdfbb RW |
5211 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5212 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 5213 | fi |
81ecdfbb | 5214 | |
783e057b | 5215 | fi |
81ecdfbb RW |
5216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5 |
5217 | $as_echo "$gl_cv_func_memmem_works" >&6; } | |
783e057b DJ |
5218 | if test "$gl_cv_func_memmem_works" != yes; then |
5219 | REPLACE_MEMMEM=1 | |
5220 | ||
5221 | ||
5222 | ||
5223 | ||
5224 | ||
5225 | ||
5226 | ||
5227 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" | |
5228 | ||
5229 | fi | |
5230 | fi | |
5231 | ||
5232 | ||
5233 | ||
5234 | ||
5235 | ||
5236 | ||
5237 | ||
5238 | ||
5239 | ||
5240 | ||
5241 | ||
5242 | ||
81ecdfbb RW |
5243 | for ac_func in memmem |
5244 | do : | |
5245 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
5246 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 5247 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5248 | #define HAVE_MEMMEM 1 |
783e057b DJ |
5249 | _ACEOF |
5250 | ||
5251 | else | |
5252 | ||
5253 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
5254 | ||
5255 | fi | |
5256 | done | |
5257 | ||
5258 | ||
5259 | ||
5260 | : | |
5261 | ||
5262 | ||
5263 | ||
5264 | ||
5265 | ||
5266 | if test $ac_cv_have_decl_memmem = no; then | |
5267 | HAVE_DECL_MEMMEM=0 | |
5268 | fi | |
5269 | : | |
5270 | ||
5271 | ||
5272 | ||
5273 | GNULIB_MEMMEM=1 | |
5274 | ||
5275 | ||
5276 | ||
5277 | ||
5278 | if test $ac_cv_type_long_long_int = yes; then | |
5279 | HAVE_LONG_LONG_INT=1 | |
5280 | else | |
5281 | HAVE_LONG_LONG_INT=0 | |
5282 | fi | |
5283 | ||
5284 | ||
5285 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
5286 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
5287 | else | |
5288 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
5289 | fi | |
5290 | ||
5291 | ||
5292 | if test $ac_cv_header_inttypes_h = yes; then | |
5293 | HAVE_INTTYPES_H=1 | |
5294 | else | |
5295 | HAVE_INTTYPES_H=0 | |
5296 | fi | |
5297 | ||
5298 | ||
5299 | if test $ac_cv_header_sys_types_h = yes; then | |
5300 | HAVE_SYS_TYPES_H=1 | |
5301 | else | |
5302 | HAVE_SYS_TYPES_H=0 | |
5303 | fi | |
5304 | ||
5305 | ||
5306 | ||
5307 | ||
5308 | ||
5309 | : | |
5310 | ||
5311 | ||
5312 | ||
5313 | ||
5314 | ||
5315 | ||
5316 | ||
5317 | if test $gl_cv_have_include_next = yes; then | |
5318 | gl_cv_next_stdint_h='<'stdint.h'>' | |
5319 | else | |
81ecdfbb RW |
5320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 |
5321 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
5322 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
5323 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
5324 | else |
5325 | ||
5326 | if test $ac_cv_header_stdint_h = yes; then | |
81ecdfbb | 5327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5328 | /* end confdefs.h. */ |
5329 | #include <stdint.h> | |
5330 | ||
5331 | _ACEOF | |
5332 | gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5333 | sed -n '\#/stdint.h#{ | |
5334 | s#.*"\(.*/stdint.h\)".*#\1# | |
5335 | s#^/[^/]#//&# | |
5336 | p | |
5337 | q | |
5338 | }'`'"' | |
5339 | else | |
5340 | gl_cv_next_stdint_h='<'stdint.h'>' | |
5341 | fi | |
5342 | ||
5343 | fi | |
81ecdfbb RW |
5344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
5345 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
783e057b DJ |
5346 | fi |
5347 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
5348 | ||
5349 | ||
5350 | ||
5351 | if test $ac_cv_header_stdint_h = yes; then | |
5352 | HAVE_STDINT_H=1 | |
5353 | else | |
5354 | HAVE_STDINT_H=0 | |
5355 | fi | |
5356 | ||
5357 | ||
5358 | if test $ac_cv_header_stdint_h = yes; then | |
81ecdfbb RW |
5359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 |
5360 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
5361 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
5362 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
5363 | else |
5364 | gl_cv_header_working_stdint_h=no | |
81ecdfbb | 5365 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5366 | /* end confdefs.h. */ |
5367 | ||
81ecdfbb | 5368 | |
783e057b DJ |
5369 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
5370 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
5371 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
5372 | #include <stdint.h> | |
5373 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
5374 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
5375 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
5376 | #endif | |
5377 | ||
5378 | ||
5379 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5380 | included before <wchar.h>. */ | |
5381 | #include <stddef.h> | |
5382 | #include <signal.h> | |
5383 | #if HAVE_WCHAR_H | |
5384 | # include <stdio.h> | |
5385 | # include <time.h> | |
5386 | # include <wchar.h> | |
5387 | #endif | |
5388 | ||
5389 | ||
5390 | #ifdef INT8_MAX | |
5391 | int8_t a1 = INT8_MAX; | |
5392 | int8_t a1min = INT8_MIN; | |
5393 | #endif | |
5394 | #ifdef INT16_MAX | |
5395 | int16_t a2 = INT16_MAX; | |
5396 | int16_t a2min = INT16_MIN; | |
5397 | #endif | |
5398 | #ifdef INT32_MAX | |
5399 | int32_t a3 = INT32_MAX; | |
5400 | int32_t a3min = INT32_MIN; | |
5401 | #endif | |
5402 | #ifdef INT64_MAX | |
5403 | int64_t a4 = INT64_MAX; | |
5404 | int64_t a4min = INT64_MIN; | |
5405 | #endif | |
5406 | #ifdef UINT8_MAX | |
5407 | uint8_t b1 = UINT8_MAX; | |
5408 | #else | |
5409 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
5410 | #endif | |
5411 | #ifdef UINT16_MAX | |
5412 | uint16_t b2 = UINT16_MAX; | |
5413 | #endif | |
5414 | #ifdef UINT32_MAX | |
5415 | uint32_t b3 = UINT32_MAX; | |
5416 | #endif | |
5417 | #ifdef UINT64_MAX | |
5418 | uint64_t b4 = UINT64_MAX; | |
5419 | #endif | |
5420 | int_least8_t c1 = INT8_C (0x7f); | |
5421 | int_least8_t c1max = INT_LEAST8_MAX; | |
5422 | int_least8_t c1min = INT_LEAST8_MIN; | |
5423 | int_least16_t c2 = INT16_C (0x7fff); | |
5424 | int_least16_t c2max = INT_LEAST16_MAX; | |
5425 | int_least16_t c2min = INT_LEAST16_MIN; | |
5426 | int_least32_t c3 = INT32_C (0x7fffffff); | |
5427 | int_least32_t c3max = INT_LEAST32_MAX; | |
5428 | int_least32_t c3min = INT_LEAST32_MIN; | |
5429 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
5430 | int_least64_t c4max = INT_LEAST64_MAX; | |
5431 | int_least64_t c4min = INT_LEAST64_MIN; | |
5432 | uint_least8_t d1 = UINT8_C (0xff); | |
5433 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
5434 | uint_least16_t d2 = UINT16_C (0xffff); | |
5435 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
5436 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
5437 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
5438 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
5439 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
5440 | int_fast8_t e1 = INT_FAST8_MAX; | |
5441 | int_fast8_t e1min = INT_FAST8_MIN; | |
5442 | int_fast16_t e2 = INT_FAST16_MAX; | |
5443 | int_fast16_t e2min = INT_FAST16_MIN; | |
5444 | int_fast32_t e3 = INT_FAST32_MAX; | |
5445 | int_fast32_t e3min = INT_FAST32_MIN; | |
5446 | int_fast64_t e4 = INT_FAST64_MAX; | |
5447 | int_fast64_t e4min = INT_FAST64_MIN; | |
5448 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
5449 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
5450 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
5451 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
5452 | #ifdef INTPTR_MAX | |
5453 | intptr_t g = INTPTR_MAX; | |
5454 | intptr_t gmin = INTPTR_MIN; | |
5455 | #endif | |
5456 | #ifdef UINTPTR_MAX | |
5457 | uintptr_t h = UINTPTR_MAX; | |
5458 | #endif | |
5459 | intmax_t i = INTMAX_MAX; | |
5460 | uintmax_t j = UINTMAX_MAX; | |
5461 | ||
5462 | #include <limits.h> /* for CHAR_BIT */ | |
5463 | #define TYPE_MINIMUM(t) \ | |
5464 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
5465 | #define TYPE_MAXIMUM(t) \ | |
5466 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
5467 | struct s { | |
5468 | int check_PTRDIFF: | |
5469 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
5470 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
5471 | ? 1 : -1; | |
5472 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
5473 | int check_SIG_ATOMIC: | |
5474 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
5475 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
5476 | ? 1 : -1; | |
5477 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
5478 | int check_WCHAR: | |
5479 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
5480 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
5481 | ? 1 : -1; | |
5482 | /* Detect bug in mingw. */ | |
5483 | int check_WINT: | |
5484 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
5485 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
5486 | ? 1 : -1; | |
5487 | ||
5488 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ | |
5489 | int check_UINT8_C: | |
5490 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
5491 | int check_UINT16_C: | |
5492 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
5493 | ||
5494 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
5495 | #ifdef UINT8_MAX | |
5496 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
5497 | #endif | |
5498 | #ifdef UINT16_MAX | |
5499 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
5500 | #endif | |
5501 | #ifdef UINT32_MAX | |
5502 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
5503 | #endif | |
5504 | #ifdef UINT64_MAX | |
5505 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
5506 | #endif | |
5507 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
5508 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
5509 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
5510 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
5511 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
5512 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
5513 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
5514 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
5515 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
5516 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
5517 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
5518 | }; | |
5519 | ||
5520 | int | |
5521 | main () | |
5522 | { | |
5523 | ||
5524 | ; | |
5525 | return 0; | |
5526 | } | |
5527 | _ACEOF | |
81ecdfbb | 5528 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5529 | gl_cv_header_working_stdint_h=yes |
783e057b | 5530 | fi |
81ecdfbb | 5531 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 5532 | fi |
81ecdfbb RW |
5533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 |
5534 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
783e057b DJ |
5535 | fi |
5536 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
5537 | STDINT_H= | |
5538 | else | |
81ecdfbb RW |
5539 | for ac_header in sys/inttypes.h sys/bitypes.h |
5540 | do : | |
5541 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5542 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5543 | eval as_val=\$$as_ac_Header | |
5544 | if test "x$as_val" = x""yes; then : | |
783e057b | 5545 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5546 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
5547 | _ACEOF |
5548 | ||
5549 | fi | |
5550 | ||
5551 | done | |
5552 | ||
5553 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
5554 | HAVE_SYS_INTTYPES_H=1 | |
5555 | else | |
5556 | HAVE_SYS_INTTYPES_H=0 | |
5557 | fi | |
5558 | ||
5559 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
5560 | HAVE_SYS_BITYPES_H=1 | |
5561 | else | |
5562 | HAVE_SYS_BITYPES_H=0 | |
5563 | fi | |
5564 | ||
5565 | ||
5566 | ||
5567 | : | |
5568 | ||
5569 | ||
5570 | ||
5571 | ||
5572 | ||
5573 | ||
5574 | ||
5575 | ||
5576 | ||
81ecdfbb RW |
5577 | for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do |
5578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
5579 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
5580 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5581 | $as_echo_n "(cached) " >&6 | |
5582 | else | |
5583 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
5584 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5585 | included before <wchar.h>. */ | |
5586 | #include <stddef.h> | |
5587 | #include <signal.h> | |
5588 | #if HAVE_WCHAR_H | |
5589 | # include <stdio.h> | |
5590 | # include <time.h> | |
5591 | # include <wchar.h> | |
5592 | #endif | |
5593 | ||
5594 | #include <limits.h>"; then : | |
5595 | ||
5596 | else | |
5597 | result=unknown | |
5598 | fi | |
5599 | ||
5600 | eval gl_cv_bitsizeof_${gltype}=\$result | |
5601 | ||
5602 | fi | |
5603 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
5604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5605 | $as_echo "$ac_res" >&6; } | |
5606 | eval result=\$gl_cv_bitsizeof_${gltype} | |
5607 | if test $result = unknown; then | |
5608 | result=0 | |
5609 | fi | |
5610 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
5611 | cat >>confdefs.h <<_ACEOF | |
5612 | #define BITSIZEOF_${GLTYPE} $result | |
5613 | _ACEOF | |
783e057b | 5614 | |
81ecdfbb RW |
5615 | eval BITSIZEOF_${GLTYPE}=\$result |
5616 | done | |
783e057b DJ |
5617 | |
5618 | ||
5619 | ||
5620 | ||
81ecdfbb RW |
5621 | for gltype in sig_atomic_t wchar_t wint_t ; do |
5622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
5623 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
5624 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5625 | $as_echo_n "(cached) " >&6 | |
783e057b | 5626 | else |
81ecdfbb | 5627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5628 | /* end confdefs.h. */ |
5629 | ||
5630 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5631 | included before <wchar.h>. */ | |
5632 | #include <stddef.h> | |
5633 | #include <signal.h> | |
5634 | #if HAVE_WCHAR_H | |
5635 | # include <stdio.h> | |
5636 | # include <time.h> | |
5637 | # include <wchar.h> | |
5638 | #endif | |
5639 | ||
5640 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
5641 | int | |
5642 | main () | |
5643 | { | |
5644 | ||
5645 | ; | |
5646 | return 0; | |
5647 | } | |
5648 | _ACEOF | |
81ecdfbb | 5649 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
5650 | result=yes |
5651 | else | |
81ecdfbb | 5652 | result=no |
20e95c23 | 5653 | fi |
81ecdfbb | 5654 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5655 | eval gl_cv_type_${gltype}_signed=\$result |
5656 | ||
5657 | fi | |
81ecdfbb RW |
5658 | eval ac_res=\$gl_cv_type_${gltype}_signed |
5659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5660 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
5661 | eval result=\$gl_cv_type_${gltype}_signed |
5662 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
5663 | if test "$result" = yes; then | |
5664 | cat >>confdefs.h <<_ACEOF | |
5665 | #define HAVE_SIGNED_${GLTYPE} 1 | |
5666 | _ACEOF | |
5667 | ||
5668 | eval HAVE_SIGNED_${GLTYPE}=1 | |
5669 | else | |
5670 | eval HAVE_SIGNED_${GLTYPE}=0 | |
5671 | fi | |
5672 | done | |
5673 | ||
5674 | ||
5675 | gl_cv_type_ptrdiff_t_signed=yes | |
5676 | gl_cv_type_size_t_signed=no | |
5677 | ||
5678 | ||
783e057b | 5679 | for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do |
81ecdfbb RW |
5680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 |
5681 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
5682 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5683 | $as_echo_n "(cached) " >&6 | |
c906108c | 5684 | else |
783e057b DJ |
5685 | eval gl_cv_type_${gltype}_suffix=no |
5686 | eval result=\$gl_cv_type_${gltype}_signed | |
5687 | if test "$result" = yes; then | |
5688 | glsufu= | |
5689 | else | |
5690 | glsufu=u | |
5691 | fi | |
5692 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
5693 | case $glsuf in | |
5694 | '') gltype1='int';; | |
5695 | l) gltype1='long int';; | |
5696 | ll) gltype1='long long int';; | |
5697 | i64) gltype1='__int64';; | |
5698 | u) gltype1='unsigned int';; | |
5699 | ul) gltype1='unsigned long int';; | |
5700 | ull) gltype1='unsigned long long int';; | |
5701 | ui64)gltype1='unsigned __int64';; | |
5702 | esac | |
81ecdfbb | 5703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5704 | /* end confdefs.h. */ |
5705 | ||
5706 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5707 | included before <wchar.h>. */ | |
5708 | #include <stddef.h> | |
5709 | #include <signal.h> | |
5710 | #if HAVE_WCHAR_H | |
5711 | # include <stdio.h> | |
5712 | # include <time.h> | |
5713 | # include <wchar.h> | |
5714 | #endif | |
5715 | ||
5716 | extern $gltype foo; | |
5717 | extern $gltype1 foo; | |
5718 | int | |
5719 | main () | |
5720 | { | |
5721 | ||
5722 | ; | |
5723 | return 0; | |
5724 | } | |
5725 | _ACEOF | |
81ecdfbb | 5726 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5727 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 5728 | fi |
81ecdfbb | 5729 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5730 | eval result=\$gl_cv_type_${gltype}_suffix |
5731 | test "$result" != no && break | |
5732 | done | |
5733 | fi | |
81ecdfbb RW |
5734 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
5735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5736 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
5737 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
5738 | eval result=\$gl_cv_type_${gltype}_suffix | |
5739 | test "$result" = no && result= | |
5740 | eval ${GLTYPE}_SUFFIX=\$result | |
5741 | cat >>confdefs.h <<_ACEOF | |
5742 | #define ${GLTYPE}_SUFFIX $result | |
5743 | _ACEOF | |
5744 | ||
5745 | done | |
5746 | ||
5747 | ||
5748 | ||
5749 | STDINT_H=stdint.h | |
5750 | fi | |
5751 | ||
5752 | ||
5753 | ||
5754 | ||
5755 | ||
5756 | ||
5757 | ||
81ecdfbb RW |
5758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> is standalone" >&5 |
5759 | $as_echo_n "checking whether <wchar.h> is standalone... " >&6; } | |
5760 | if test "${gl_cv_header_wchar_h_standalone+set}" = set; then : | |
5761 | $as_echo_n "(cached) " >&6 | |
783e057b | 5762 | else |
81ecdfbb RW |
5763 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5764 | /* end confdefs.h. */ | |
783e057b DJ |
5765 | #include <wchar.h> |
5766 | wchar_t w; | |
5767 | _ACEOF | |
81ecdfbb | 5768 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
5769 | gl_cv_header_wchar_h_standalone=yes |
5770 | else | |
81ecdfbb | 5771 | gl_cv_header_wchar_h_standalone=no |
783e057b | 5772 | fi |
81ecdfbb | 5773 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 5774 | fi |
81ecdfbb RW |
5775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_standalone" >&5 |
5776 | $as_echo "$gl_cv_header_wchar_h_standalone" >&6; } | |
783e057b DJ |
5777 | if test $gl_cv_header_wchar_h_standalone != yes; then |
5778 | WCHAR_H=wchar.h | |
5779 | fi | |
5780 | ||
5781 | ||
5782 | : | |
5783 | ||
5784 | ||
5785 | ||
5786 | ||
5787 | ||
5788 | if test $ac_cv_header_wchar_h = yes; then | |
5789 | HAVE_WCHAR_H=1 | |
5790 | else | |
5791 | HAVE_WCHAR_H=0 | |
5792 | fi | |
5793 | ||
5794 | ||
5795 | ||
5796 | ||
5797 | : | |
5798 | ||
5799 | ||
5800 | ||
5801 | ||
5802 | ||
5803 | ||
5804 | ||
5805 | if test $gl_cv_have_include_next = yes; then | |
5806 | gl_cv_next_wchar_h='<'wchar.h'>' | |
5807 | else | |
81ecdfbb RW |
5808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 |
5809 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
5810 | if test "${gl_cv_next_wchar_h+set}" = set; then : | |
5811 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
5812 | else |
5813 | ||
5814 | if test $ac_cv_header_wchar_h = yes; then | |
81ecdfbb | 5815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5816 | /* end confdefs.h. */ |
5817 | #include <wchar.h> | |
5818 | ||
5819 | _ACEOF | |
5820 | gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5821 | sed -n '\#/wchar.h#{ | |
5822 | s#.*"\(.*/wchar.h\)".*#\1# | |
5823 | s#^/[^/]#//&# | |
5824 | p | |
5825 | q | |
5826 | }'`'"' | |
5827 | else | |
5828 | gl_cv_next_wchar_h='<'wchar.h'>' | |
5829 | fi | |
5830 | ||
5831 | fi | |
81ecdfbb RW |
5832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 |
5833 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
783e057b DJ |
5834 | fi |
5835 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
5836 | ||
c906108c | 5837 | |
c906108c | 5838 | |
c906108c | 5839 | |
c906108c | 5840 | |
c906108c | 5841 | |
c906108c | 5842 | |
c906108c | 5843 | |
783e057b DJ |
5844 | gltests_libdeps= |
5845 | gltests_ltlibdeps= | |
20e95c23 | 5846 | |
20e95c23 | 5847 | |
20e95c23 | 5848 | |
783e057b | 5849 | gl_source_base='tests' |
c906108c | 5850 | |
bec39cab | 5851 | |
bec39cab | 5852 | |
783e057b DJ |
5853 | |
5854 | LIBGNU_LIBDEPS="$gl_libdeps" | |
5855 | ||
5856 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
5857 | ||
5858 | ||
e28b3332 | 5859 | |
d5af19ba DJ |
5860 | # For Makefile dependencies. |
5861 | GNULIB_STDINT_H= | |
5862 | if test x"$STDINT_H" != x; then | |
5863 | GNULIB_STDINT_H=gnulib/$STDINT_H | |
5864 | fi | |
5865 | ||
5866 | ||
bec39cab AC |
5867 | PACKAGE=gdb |
5868 | ||
5869 | cat >>confdefs.h <<_ACEOF | |
5870 | #define PACKAGE "$PACKAGE" | |
5871 | _ACEOF | |
5872 | ||
5873 | ||
5874 | ||
e28b3332 DJ |
5875 | # GDB does not use automake, but gnulib does. This line lets us |
5876 | # generate its Makefile.in. | |
81ecdfbb RW |
5877 | am__api_version='1.11' |
5878 | ||
e28b3332 DJ |
5879 | # Find a good install program. We prefer a C program (faster), |
5880 | # so one script is as good as another. But avoid the broken or | |
5881 | # incompatible versions: | |
5882 | # SysV /etc/install, /usr/sbin/install | |
5883 | # SunOS /usr/etc/install | |
5884 | # IRIX /sbin/install | |
5885 | # AIX /bin/install | |
5886 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5887 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5888 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5889 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5890 | # OS/2's system install, which has a completely different semantic | |
5891 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 5892 | # Reject install programs that cannot install multiple files. |
81ecdfbb RW |
5893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
5894 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
e28b3332 | 5895 | if test -z "$INSTALL"; then |
81ecdfbb RW |
5896 | if test "${ac_cv_path_install+set}" = set; then : |
5897 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
5898 | else |
5899 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5900 | for as_dir in $PATH | |
5901 | do | |
5902 | IFS=$as_save_IFS | |
5903 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5904 | # Account for people who put trailing slashes in PATH elements. |
5905 | case $as_dir/ in #(( | |
5906 | ./ | .// | /[cC]/* | \ | |
e28b3332 | 5907 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
81ecdfbb | 5908 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
e28b3332 DJ |
5909 | /usr/ucb/* ) ;; |
5910 | *) | |
5911 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5912 | # Don't use installbsd from OSF since it installs stuff as root | |
5913 | # by default. | |
5914 | for ac_prog in ginstall scoinst install; do | |
5915 | for ac_exec_ext in '' $ac_executable_extensions; do | |
81ecdfbb | 5916 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then |
e28b3332 DJ |
5917 | if test $ac_prog = install && |
5918 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5919 | # AIX install. It has an incompatible calling convention. | |
5920 | : | |
5921 | elif test $ac_prog = install && | |
5922 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5923 | # program-specific install script used by HP pwplus--don't use. | |
5924 | : | |
5925 | else | |
85541719 DE |
5926 | rm -rf conftest.one conftest.two conftest.dir |
5927 | echo one > conftest.one | |
5928 | echo two > conftest.two | |
5929 | mkdir conftest.dir | |
5930 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5931 | test -s conftest.one && test -s conftest.two && | |
5932 | test -s conftest.dir/conftest.one && | |
5933 | test -s conftest.dir/conftest.two | |
5934 | then | |
5935 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5936 | break 3 | |
5937 | fi | |
e28b3332 DJ |
5938 | fi |
5939 | fi | |
5940 | done | |
5941 | done | |
5942 | ;; | |
5943 | esac | |
81ecdfbb RW |
5944 | |
5945 | done | |
5946 | IFS=$as_save_IFS | |
e28b3332 | 5947 | |
85541719 | 5948 | rm -rf conftest.one conftest.two conftest.dir |
e28b3332 DJ |
5949 | |
5950 | fi | |
5951 | if test "${ac_cv_path_install+set}" = set; then | |
5952 | INSTALL=$ac_cv_path_install | |
5953 | else | |
85541719 DE |
5954 | # As a last resort, use the slow shell script. Don't cache a |
5955 | # value for INSTALL within a source directory, because that will | |
e28b3332 | 5956 | # break other packages using the cache if that directory is |
85541719 | 5957 | # removed, or if the value is a relative name. |
e28b3332 DJ |
5958 | INSTALL=$ac_install_sh |
5959 | fi | |
5960 | fi | |
81ecdfbb RW |
5961 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
5962 | $as_echo "$INSTALL" >&6; } | |
e28b3332 DJ |
5963 | |
5964 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5965 | # It thinks the first close brace ends the variable substitution. | |
5966 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5967 | ||
5968 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5969 | ||
5970 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
5971 | ||
81ecdfbb RW |
5972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
5973 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
e28b3332 DJ |
5974 | # Just in case |
5975 | sleep 1 | |
5976 | echo timestamp > conftest.file | |
81ecdfbb RW |
5977 | # Reject unsafe characters in $srcdir or the absolute working directory |
5978 | # name. Accept space and tab only in the latter. | |
5979 | am_lf=' | |
5980 | ' | |
5981 | case `pwd` in | |
5982 | *[\\\"\#\$\&\'\`$am_lf]*) | |
5983 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; | |
5984 | esac | |
5985 | case $srcdir in | |
5986 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
5987 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; | |
5988 | esac | |
5989 | ||
e28b3332 DJ |
5990 | # Do `set' in a subshell so we don't clobber the current shell's |
5991 | # arguments. Must try -L first in case configure is actually a | |
5992 | # symlink; some systems play weird games with the mod time of symlinks | |
5993 | # (eg FreeBSD returns the mod time of the symlink's containing | |
5994 | # directory). | |
5995 | if ( | |
81ecdfbb | 5996 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
e28b3332 DJ |
5997 | if test "$*" = "X"; then |
5998 | # -L didn't work. | |
81ecdfbb | 5999 | set X `ls -t "$srcdir/configure" conftest.file` |
e28b3332 DJ |
6000 | fi |
6001 | rm -f conftest.file | |
6002 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
6003 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
6004 | ||
6005 | # If neither matched, then we have a broken ls. This can happen | |
6006 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
6007 | # broken ls alias from the environment. This has actually | |
6008 | # happened. Such a system could not be considered "sane". | |
81ecdfbb RW |
6009 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
6010 | alias in your environment" "$LINENO" 5 | |
e28b3332 DJ |
6011 | fi |
6012 | ||
6013 | test "$2" = conftest.file | |
6014 | ) | |
6015 | then | |
6016 | # Ok. | |
6017 | : | |
6018 | else | |
81ecdfbb RW |
6019 | as_fn_error "newly created file is older than distributed files! |
6020 | Check your system clock" "$LINENO" 5 | |
e28b3332 | 6021 | fi |
81ecdfbb RW |
6022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6023 | $as_echo "yes" >&6; } | |
e28b3332 | 6024 | test "$program_prefix" != NONE && |
81ecdfbb | 6025 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
e28b3332 DJ |
6026 | # Use a double $ so make ignores it. |
6027 | test "$program_suffix" != NONE && | |
81ecdfbb RW |
6028 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
6029 | # Double any \ or $. | |
e28b3332 | 6030 | # By default was `s,x,x', remove it if useless. |
81ecdfbb RW |
6031 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
6032 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
e28b3332 DJ |
6033 | |
6034 | # expand $ac_aux_dir to an absolute path | |
6035 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
6036 | ||
81ecdfbb RW |
6037 | if test x"${MISSING+set}" != xset; then |
6038 | case $am_aux_dir in | |
6039 | *\ * | *\ *) | |
6040 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
6041 | *) | |
6042 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
6043 | esac | |
6044 | fi | |
e28b3332 DJ |
6045 | # Use eval to expand $SHELL |
6046 | if eval "$MISSING --run true"; then | |
6047 | am_missing_run="$MISSING --run " | |
6048 | else | |
6049 | am_missing_run= | |
81ecdfbb RW |
6050 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 |
6051 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
6052 | fi | |
6053 | ||
6054 | if test x"${install_sh}" != xset; then | |
6055 | case $am_aux_dir in | |
6056 | *\ * | *\ *) | |
6057 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
6058 | *) | |
6059 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
6060 | esac | |
6061 | fi | |
6062 | ||
6063 | # Installed binaries are usually stripped using `strip' when the user | |
6064 | # run `make install-strip'. However `strip' might not be the right | |
6065 | # tool to use in cross-compilation environments, therefore Automake | |
6066 | # will honor the `STRIP' environment variable to overrule this program. | |
6067 | if test "$cross_compiling" != no; then | |
6068 | if test -n "$ac_tool_prefix"; then | |
6069 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
6070 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
6071 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6072 | $as_echo_n "checking for $ac_word... " >&6; } | |
6073 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
6074 | $as_echo_n "(cached) " >&6 | |
6075 | else | |
6076 | if test -n "$STRIP"; then | |
6077 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
6078 | else | |
6079 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6080 | for as_dir in $PATH | |
6081 | do | |
6082 | IFS=$as_save_IFS | |
6083 | test -z "$as_dir" && as_dir=. | |
6084 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6085 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6086 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
6087 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6088 | break 2 | |
6089 | fi | |
6090 | done | |
6091 | done | |
6092 | IFS=$as_save_IFS | |
6093 | ||
6094 | fi | |
6095 | fi | |
6096 | STRIP=$ac_cv_prog_STRIP | |
6097 | if test -n "$STRIP"; then | |
6098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
6099 | $as_echo "$STRIP" >&6; } | |
6100 | else | |
6101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6102 | $as_echo "no" >&6; } | |
6103 | fi | |
6104 | ||
6105 | ||
6106 | fi | |
6107 | if test -z "$ac_cv_prog_STRIP"; then | |
6108 | ac_ct_STRIP=$STRIP | |
6109 | # Extract the first word of "strip", so it can be a program name with args. | |
6110 | set dummy strip; ac_word=$2 | |
6111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6112 | $as_echo_n "checking for $ac_word... " >&6; } | |
6113 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
6114 | $as_echo_n "(cached) " >&6 | |
6115 | else | |
6116 | if test -n "$ac_ct_STRIP"; then | |
6117 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
6118 | else | |
6119 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6120 | for as_dir in $PATH | |
6121 | do | |
6122 | IFS=$as_save_IFS | |
6123 | test -z "$as_dir" && as_dir=. | |
6124 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6125 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6126 | ac_cv_prog_ac_ct_STRIP="strip" | |
6127 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6128 | break 2 | |
6129 | fi | |
6130 | done | |
6131 | done | |
6132 | IFS=$as_save_IFS | |
6133 | ||
6134 | fi | |
6135 | fi | |
6136 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
6137 | if test -n "$ac_ct_STRIP"; then | |
6138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
6139 | $as_echo "$ac_ct_STRIP" >&6; } | |
6140 | else | |
6141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6142 | $as_echo "no" >&6; } | |
6143 | fi | |
6144 | ||
6145 | if test "x$ac_ct_STRIP" = x; then | |
6146 | STRIP=":" | |
6147 | else | |
6148 | case $cross_compiling:$ac_tool_warned in | |
6149 | yes:) | |
6150 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6151 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6152 | ac_tool_warned=yes ;; | |
6153 | esac | |
6154 | STRIP=$ac_ct_STRIP | |
6155 | fi | |
6156 | else | |
6157 | STRIP="$ac_cv_prog_STRIP" | |
6158 | fi | |
6159 | ||
6160 | fi | |
6161 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
6162 | ||
6163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
6164 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
6165 | if test -z "$MKDIR_P"; then | |
6166 | if test "${ac_cv_path_mkdir+set}" = set; then : | |
6167 | $as_echo_n "(cached) " >&6 | |
6168 | else | |
6169 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6170 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
6171 | do | |
6172 | IFS=$as_save_IFS | |
6173 | test -z "$as_dir" && as_dir=. | |
6174 | for ac_prog in mkdir gmkdir; do | |
6175 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6176 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
6177 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
6178 | 'mkdir (GNU coreutils) '* | \ | |
6179 | 'mkdir (coreutils) '* | \ | |
6180 | 'mkdir (fileutils) '4.1*) | |
6181 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
6182 | break 3;; | |
6183 | esac | |
6184 | done | |
6185 | done | |
e28b3332 | 6186 | done |
81ecdfbb RW |
6187 | IFS=$as_save_IFS |
6188 | ||
6189 | fi | |
6190 | ||
6191 | if test "${ac_cv_path_mkdir+set}" = set; then | |
6192 | MKDIR_P="$ac_cv_path_mkdir -p" | |
e28b3332 | 6193 | else |
81ecdfbb RW |
6194 | # As a last resort, use the slow shell script. Don't cache a |
6195 | # value for MKDIR_P within a source directory, because that will | |
6196 | # break other packages using the cache if that directory is | |
6197 | # removed, or if the value is a relative name. | |
6198 | test -d ./--version && rmdir ./--version | |
6199 | MKDIR_P="$ac_install_sh -d" | |
e28b3332 DJ |
6200 | fi |
6201 | fi | |
81ecdfbb RW |
6202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
6203 | $as_echo "$MKDIR_P" >&6; } | |
6204 | ||
6205 | mkdir_p="$MKDIR_P" | |
6206 | case $mkdir_p in | |
6207 | [\\/$]* | ?:[\\/]*) ;; | |
6208 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
6209 | esac | |
e28b3332 DJ |
6210 | |
6211 | for ac_prog in gawk mawk nawk awk | |
6212 | do | |
6213 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6214 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
6215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6216 | $as_echo_n "checking for $ac_word... " >&6; } | |
6217 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
6218 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
6219 | else |
6220 | if test -n "$AWK"; then | |
6221 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
6222 | else | |
6223 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6224 | for as_dir in $PATH | |
6225 | do | |
6226 | IFS=$as_save_IFS | |
6227 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6228 | for ac_exec_ext in '' $ac_executable_extensions; do |
6229 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e28b3332 | 6230 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 6231 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
e28b3332 DJ |
6232 | break 2 |
6233 | fi | |
6234 | done | |
81ecdfbb RW |
6235 | done |
6236 | IFS=$as_save_IFS | |
e28b3332 DJ |
6237 | |
6238 | fi | |
6239 | fi | |
6240 | AWK=$ac_cv_prog_AWK | |
6241 | if test -n "$AWK"; then | |
81ecdfbb RW |
6242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
6243 | $as_echo "$AWK" >&6; } | |
e28b3332 | 6244 | else |
81ecdfbb RW |
6245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6246 | $as_echo "no" >&6; } | |
e28b3332 DJ |
6247 | fi |
6248 | ||
81ecdfbb | 6249 | |
e28b3332 DJ |
6250 | test -n "$AWK" && break |
6251 | done | |
6252 | ||
81ecdfbb | 6253 | ac_config_commands="$ac_config_commands depfiles" |
e28b3332 DJ |
6254 | |
6255 | ||
6256 | am_make=${MAKE-make} | |
6257 | cat > confinc << 'END' | |
6258 | am__doit: | |
81ecdfbb | 6259 | @echo this is the am__doit target |
e28b3332 DJ |
6260 | .PHONY: am__doit |
6261 | END | |
6262 | # If we don't find an include directive, just comment out the code. | |
81ecdfbb RW |
6263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 |
6264 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
e28b3332 DJ |
6265 | am__include="#" |
6266 | am__quote= | |
6267 | _am_result=none | |
6268 | # First try GNU make style include. | |
6269 | echo "include confinc" > confmf | |
81ecdfbb RW |
6270 | # Ignore all kinds of additional output from `make'. |
6271 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
6272 | *the\ am__doit\ target*) | |
6273 | am__include=include | |
6274 | am__quote= | |
6275 | _am_result=GNU | |
6276 | ;; | |
6277 | esac | |
e28b3332 DJ |
6278 | # Now try BSD make style include. |
6279 | if test "$am__include" = "#"; then | |
6280 | echo '.include "confinc"' > confmf | |
81ecdfbb RW |
6281 | case `$am_make -s -f confmf 2> /dev/null` in #( |
6282 | *the\ am__doit\ target*) | |
6283 | am__include=.include | |
6284 | am__quote="\"" | |
6285 | _am_result=BSD | |
6286 | ;; | |
6287 | esac | |
e28b3332 DJ |
6288 | fi |
6289 | ||
6290 | ||
81ecdfbb RW |
6291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 |
6292 | $as_echo "$_am_result" >&6; } | |
e28b3332 DJ |
6293 | rm -f confinc confmf |
6294 | ||
81ecdfbb RW |
6295 | # Check whether --enable-dependency-tracking was given. |
6296 | if test "${enable_dependency_tracking+set}" = set; then : | |
6297 | enableval=$enable_dependency_tracking; | |
6298 | fi | |
e28b3332 | 6299 | |
e28b3332 DJ |
6300 | if test "x$enable_dependency_tracking" != xno; then |
6301 | am_depcomp="$ac_aux_dir/depcomp" | |
6302 | AMDEPBACKSLASH='\' | |
6303 | fi | |
81ecdfbb | 6304 | if test "x$enable_dependency_tracking" != xno; then |
e28b3332 DJ |
6305 | AMDEP_TRUE= |
6306 | AMDEP_FALSE='#' | |
6307 | else | |
6308 | AMDEP_TRUE='#' | |
6309 | AMDEP_FALSE= | |
6310 | fi | |
6311 | ||
6312 | ||
81ecdfbb RW |
6313 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
6314 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
6315 | # is not polluted with repeated "-I." | |
6316 | am__isrc=' -I$(srcdir)' | |
6317 | # test to see if srcdir already configured | |
6318 | if test -f $srcdir/config.status; then | |
6319 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
6320 | fi | |
e28b3332 DJ |
6321 | fi |
6322 | ||
6323 | # test whether we have cygpath | |
6324 | if test -z "$CYGPATH_W"; then | |
6325 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
6326 | CYGPATH_W='cygpath -w' | |
6327 | else | |
6328 | CYGPATH_W=echo | |
6329 | fi | |
6330 | fi | |
6331 | ||
6332 | ||
6333 | # Define the identity of the package. | |
6334 | PACKAGE=gdb | |
6335 | VERSION=UNUSED-VERSION | |
6336 | ||
6337 | ||
6338 | # Some tools Automake needs. | |
6339 | ||
6340 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
6341 | ||
6342 | ||
6343 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
6344 | ||
6345 | ||
6346 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
6347 | ||
6348 | ||
6349 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
6350 | ||
6351 | ||
6352 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
6353 | ||
e28b3332 DJ |
6354 | # We need awk for the "check" target. The system "awk" is bad on |
6355 | # some platforms. | |
6356 | # Always define AMTAR for backward compatibility. | |
6357 | ||
6358 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
6359 | ||
6360 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
6361 | ||
6362 | ||
6363 | ||
6364 | ||
6365 | depcc="$CC" am_compiler_list= | |
6366 | ||
81ecdfbb RW |
6367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6368 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
6369 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
6370 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
6371 | else |
6372 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
6373 | # We make a subdir and do the tests there. Otherwise we can end up | |
6374 | # making bogus files that we don't know about and never remove. For | |
6375 | # instance it was reported that on HP-UX the gcc test will end up | |
6376 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6377 | # in D'. | |
6378 | mkdir conftest.dir | |
6379 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6380 | # using a relative directory. | |
6381 | cp "$am_depcomp" conftest.dir | |
6382 | cd conftest.dir | |
6383 | # We will build objects and dependencies in a subdirectory because | |
6384 | # it helps to detect inapplicable dependency modes. For instance | |
6385 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6386 | # side effect of compilation, but ICC will put the dependencies in | |
6387 | # the current directory while Tru64 will put them in the object | |
6388 | # directory. | |
6389 | mkdir sub | |
6390 | ||
6391 | am_cv_CC_dependencies_compiler_type=none | |
6392 | if test "$am_compiler_list" = ""; then | |
6393 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6394 | fi | |
81ecdfbb RW |
6395 | am__universal=false |
6396 | case " $depcc " in #( | |
6397 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
6398 | esac | |
6399 | ||
e28b3332 DJ |
6400 | for depmode in $am_compiler_list; do |
6401 | # Setup a source with many dependencies, because some compilers | |
6402 | # like to wrap large dependency lists on column 80 (with \), and | |
6403 | # we should not choose a depcomp mode which is confused by this. | |
6404 | # | |
6405 | # We need to recreate these files for each test, as the compiler may | |
6406 | # overwrite some of them when testing with obscure command lines. | |
6407 | # This happens at least with the AIX C compiler. | |
6408 | : > sub/conftest.c | |
6409 | for i in 1 2 3 4 5 6; do | |
6410 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6411 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6412 | # Solaris 8's {/usr,}/bin/sh. | |
6413 | touch sub/conftst$i.h | |
6414 | done | |
6415 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
6416 | ||
81ecdfbb RW |
6417 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
6418 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6419 | # handle `-M -o', and we need to detect this. Also, some Intel | |
6420 | # versions had trouble with output in subdirs | |
6421 | am__obj=sub/conftest.${OBJEXT-o} | |
6422 | am__minus_obj="-o $am__obj" | |
e28b3332 | 6423 | case $depmode in |
81ecdfbb RW |
6424 | gcc) |
6425 | # This depmode causes a compiler race in universal mode. | |
6426 | test "$am__universal" = false || continue | |
6427 | ;; | |
e28b3332 DJ |
6428 | nosideeffect) |
6429 | # after this tag, mechanisms are not by side-effect, so they'll | |
6430 | # only be used when explicitly requested | |
6431 | if test "x$enable_dependency_tracking" = xyes; then | |
6432 | continue | |
6433 | else | |
6434 | break | |
6435 | fi | |
6436 | ;; | |
81ecdfbb RW |
6437 | msvisualcpp | msvcmsys) |
6438 | # This compiler won't grok `-c -o', but also, the minuso test has | |
6439 | # not run yet. These depmodes are late enough in the game, and | |
6440 | # so weak that their functioning should not be impacted. | |
6441 | am__obj=conftest.${OBJEXT-o} | |
6442 | am__minus_obj= | |
6443 | ;; | |
e28b3332 DJ |
6444 | none) break ;; |
6445 | esac | |
e28b3332 | 6446 | if depmode=$depmode \ |
81ecdfbb | 6447 | source=sub/conftest.c object=$am__obj \ |
e28b3332 | 6448 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
81ecdfbb | 6449 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
e28b3332 | 6450 | >/dev/null 2>conftest.err && |
81ecdfbb | 6451 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 | 6452 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
81ecdfbb | 6453 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 DJ |
6454 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
6455 | # icc doesn't choke on unknown options, it will just issue warnings | |
6456 | # or remarks (even with -Werror). So we grep stderr for any message | |
6457 | # that says an option was ignored or not supported. | |
6458 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6459 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6460 | # The diagnosis changed in icc 8.0: | |
6461 | # icc: Command line remark: option '-MP' not supported | |
6462 | if (grep 'ignoring option' conftest.err || | |
6463 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6464 | am_cv_CC_dependencies_compiler_type=$depmode | |
6465 | break | |
6466 | fi | |
6467 | fi | |
6468 | done | |
6469 | ||
6470 | cd .. | |
6471 | rm -rf conftest.dir | |
6472 | else | |
6473 | am_cv_CC_dependencies_compiler_type=none | |
6474 | fi | |
6475 | ||
6476 | fi | |
81ecdfbb RW |
6477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6478 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
e28b3332 DJ |
6479 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6480 | ||
81ecdfbb | 6481 | if |
e28b3332 DJ |
6482 | test "x$enable_dependency_tracking" != xno \ |
6483 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
6484 | am__fastdepCC_TRUE= | |
6485 | am__fastdepCC_FALSE='#' | |
6486 | else | |
6487 | am__fastdepCC_TRUE='#' | |
6488 | am__fastdepCC_FALSE= | |
6489 | fi | |
6490 | ||
6491 | ||
6492 | ||
6493 | ||
bec39cab AC |
6494 | |
6495 | ||
81ecdfbb RW |
6496 | # Check whether --with-separate-debug-dir was given. |
6497 | if test "${with_separate_debug_dir+set}" = set; then : | |
6498 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6499 | DEBUGDIR=$withval |
6500 | else | |
6501 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6502 | fi |
6503 | ||
20e95c23 | 6504 | |
783e057b DJ |
6505 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6506 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6507 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6508 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6509 | |
783e057b DJ |
6510 | cat >>confdefs.h <<_ACEOF |
6511 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6512 | _ACEOF |
20e95c23 | 6513 | |
20e95c23 | 6514 | |
20e95c23 | 6515 | |
b14b1491 TT |
6516 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6517 | if test "x$prefix" = xNONE; then | |
6518 | test_prefix=/usr/local | |
6519 | else | |
6520 | test_prefix=$prefix | |
6521 | fi | |
783e057b | 6522 | else |
b14b1491 | 6523 | test_prefix=$exec_prefix |
783e057b | 6524 | fi |
b14b1491 TT |
6525 | value=0 |
6526 | case ${ac_define_dir} in | |
6527 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6528 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6529 | value=1 | |
6530 | ;; | |
6531 | esac | |
6532 | ||
6533 | cat >>confdefs.h <<_ACEOF | |
6534 | #define DEBUGDIR_RELOCATABLE $value | |
6535 | _ACEOF | |
6536 | ||
6537 | ||
6538 | ||
6539 | # GDB's datadir relocation | |
6540 | ||
6541 | ||
6542 | ||
81ecdfbb RW |
6543 | # Check whether --with-gdb-datadir was given. |
6544 | if test "${with_gdb_datadir+set}" = set; then : | |
6545 | withval=$with_gdb_datadir; | |
b14b1491 | 6546 | GDB_DATADIR=$withval |
20e95c23 | 6547 | else |
b14b1491 | 6548 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6549 | fi |
6550 | ||
20e95c23 | 6551 | |
b14b1491 TT |
6552 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6553 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6554 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6555 | ac_define_dir=`eval echo $ac_define_dir` | |
6556 | ||
6557 | cat >>confdefs.h <<_ACEOF | |
6558 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6559 | _ACEOF |
6560 | ||
b14b1491 TT |
6561 | |
6562 | ||
6563 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
6564 | if test "x$prefix" = xNONE; then | |
6565 | test_prefix=/usr/local | |
6566 | else | |
6567 | test_prefix=$prefix | |
6568 | fi | |
6569 | else | |
6570 | test_prefix=$exec_prefix | |
6571 | fi | |
6572 | value=0 | |
6573 | case ${ac_define_dir} in | |
6574 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6575 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6576 | value=1 | |
6577 | ;; | |
6578 | esac | |
6579 | ||
6580 | cat >>confdefs.h <<_ACEOF | |
6581 | #define GDB_DATADIR_RELOCATABLE $value | |
6582 | _ACEOF | |
6583 | ||
6584 | ||
783e057b | 6585 | |
20e95c23 | 6586 | |
81ecdfbb RW |
6587 | # Check whether --with-relocated-sources was given. |
6588 | if test "${with_relocated_sources+set}" = set; then : | |
6589 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6590 | |
6591 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6592 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6593 | ac_define_dir=`eval echo $reloc_srcdir` | |
6594 | ac_define_dir=`eval echo $ac_define_dir` | |
6595 | ||
6596 | cat >>confdefs.h <<_ACEOF | |
6597 | #define RELOC_SRCDIR "$ac_define_dir" | |
6598 | _ACEOF | |
6599 | ||
6600 | ||
6601 | ||
81ecdfbb RW |
6602 | fi |
6603 | ||
29b0e8a2 JM |
6604 | |
6605 | ||
20e95c23 | 6606 | |
783e057b | 6607 | subdirs="$subdirs doc testsuite" |
20e95c23 DJ |
6608 | |
6609 | ||
783e057b | 6610 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6611 | # Check whether --enable-targets was given. |
6612 | if test "${enable_targets+set}" = set; then : | |
6613 | enableval=$enable_targets; case "${enableval}" in | |
6614 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
6615 | ;; |
6616 | no) enable_targets= ;; | |
6617 | *) enable_targets=$enableval ;; | |
6618 | esac | |
81ecdfbb RW |
6619 | fi |
6620 | ||
20e95c23 | 6621 | |
783e057b | 6622 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6623 | # Check whether --enable-64-bit-bfd was given. |
6624 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6625 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6626 | yes) want64=true ;; |
6627 | no) want64=false ;; | |
81ecdfbb | 6628 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6629 | esac |
6630 | else | |
6631 | want64=false | |
81ecdfbb RW |
6632 | fi |
6633 | ||
783e057b DJ |
6634 | # Provide defaults for some variables set by the per-host and per-target |
6635 | # configuration. | |
6636 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6637 | |
783e057b DJ |
6638 | if test "${target}" = "${host}"; then |
6639 | gdb_native=yes | |
6640 | else | |
6641 | gdb_native=no | |
6642 | fi | |
20e95c23 | 6643 | |
783e057b | 6644 | . $srcdir/configure.host |
20e95c23 | 6645 | |
783e057b | 6646 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6647 | |
783e057b DJ |
6648 | TARGET_OBS= |
6649 | all_targets= | |
20e95c23 | 6650 | |
783e057b | 6651 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6652 | do |
783e057b DJ |
6653 | if test "$targ_alias" = "all"; then |
6654 | all_targets=true | |
6655 | else | |
6656 | # Canonicalize the secondary target names. | |
6657 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6658 | if test -n "$result"; then | |
6659 | targ=$result | |
6660 | else | |
6661 | targ=$targ_alias | |
6662 | fi | |
20e95c23 | 6663 | |
783e057b | 6664 | . ${srcdir}/configure.tgt |
20e95c23 | 6665 | |
783e057b DJ |
6666 | # Target-specific object files |
6667 | for i in ${gdb_target_obs}; do | |
6668 | case " $TARGET_OBS " in | |
6669 | *" ${i} "*) ;; | |
6670 | *) | |
6671 | TARGET_OBS="$TARGET_OBS ${i}" | |
6672 | ;; | |
6673 | esac | |
6674 | done | |
20e95c23 | 6675 | |
783e057b DJ |
6676 | # Check whether this target needs 64-bit CORE_ADDR |
6677 | if test x${want64} = xfalse; then | |
6678 | . ${srcdir}/../bfd/config.bfd | |
6679 | fi | |
6680 | fi | |
20e95c23 DJ |
6681 | done |
6682 | ||
783e057b DJ |
6683 | if test x${all_targets} = xtrue; then |
6684 | ||
6685 | # We want all 64-bit targets if we either: | |
6686 | # - run on a 64-bit host or | |
6687 | # - already require 64-bit support for some other target or | |
6688 | # - the --enable-64-bit-bfd option was supplied | |
6689 | # Otherwise we only support all 32-bit targets. | |
6690 | # | |
6691 | # NOTE: This test must be in sync with the corresponding | |
6692 | # tests in BFD! | |
20e95c23 | 6693 | |
783e057b | 6694 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6695 | # The cast to long int works around a bug in the HP C Compiler |
6696 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6697 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6698 | # This bug is HP SR number 8606223364. | |
6699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6700 | $as_echo_n "checking size of long... " >&6; } | |
6701 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
6702 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 6703 | else |
81ecdfbb | 6704 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6705 | |
81ecdfbb RW |
6706 | else |
6707 | if test "$ac_cv_type_long" = yes; then | |
6708 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6709 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6710 | { as_fn_set_status 77 | |
6711 | as_fn_error "cannot compute sizeof (long) | |
6712 | See \`config.log' for more details." "$LINENO" 5; }; } | |
6713 | else | |
6714 | ac_cv_sizeof_long=0 | |
6715 | fi | |
c0993dbe | 6716 | fi |
81ecdfbb | 6717 | |
c0993dbe | 6718 | fi |
81ecdfbb RW |
6719 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6720 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6721 | |
c0993dbe | 6722 | |
c0993dbe | 6723 | |
c0993dbe UW |
6724 | cat >>confdefs.h <<_ACEOF |
6725 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6726 | _ACEOF | |
6727 | ||
6728 | ||
6729 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6730 | want64=true | |
6731 | fi | |
6732 | fi | |
6733 | if test x${want64} = xtrue; then | |
6734 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6735 | else | |
6736 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6737 | fi | |
6738 | fi | |
6739 | ||
6740 | ||
6741 | ||
6742 | # For other settings, only the main target counts. | |
6743 | gdb_sim= | |
6744 | gdb_osabi= | |
6745 | build_gdbserver= | |
6746 | targ=$target; . ${srcdir}/configure.tgt | |
6747 | ||
6748 | # Fetch the default architecture and default target vector from BFD. | |
6749 | targ=$target; . $srcdir/../bfd/config.bfd | |
6750 | ||
6751 | # We only want the first architecture, so strip off the others if | |
6752 | # there is more than one. | |
6753 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6754 | ||
6755 | if test "x$targ_archs" != x; then | |
6756 | ||
6757 | cat >>confdefs.h <<_ACEOF | |
6758 | #define DEFAULT_BFD_ARCH $targ_archs | |
6759 | _ACEOF | |
6760 | ||
6761 | fi | |
6762 | if test "x$targ_defvec" != x; then | |
6763 | ||
6764 | cat >>confdefs.h <<_ACEOF | |
6765 | #define DEFAULT_BFD_VEC $targ_defvec | |
6766 | _ACEOF | |
6767 | ||
6768 | fi | |
6769 | ||
c0993dbe UW |
6770 | # The CLI cannot be disabled yet, but may be in the future. |
6771 | ||
6772 | # Enable CLI. | |
81ecdfbb RW |
6773 | # Check whether --enable-gdbcli was given. |
6774 | if test "${enable_gdbcli+set}" = set; then : | |
6775 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
6776 | yes) |
6777 | ;; | |
6778 | no) | |
81ecdfbb | 6779 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 6780 | *) |
81ecdfbb | 6781 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
6782 | esac |
6783 | else | |
6784 | enable_gdbcli=yes | |
81ecdfbb RW |
6785 | fi |
6786 | ||
c0993dbe UW |
6787 | if test x"$enable_gdbcli" = xyes; then |
6788 | if test -d $srcdir/cli; then | |
6789 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
6790 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
6791 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
6792 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
6793 | fi | |
6794 | fi | |
6795 | ||
6796 | # Enable MI. | |
81ecdfbb RW |
6797 | # Check whether --enable-gdbmi was given. |
6798 | if test "${enable_gdbmi+set}" = set; then : | |
6799 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6800 | yes | no) |
6801 | ;; | |
6802 | *) | |
81ecdfbb | 6803 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6804 | esac |
6805 | else | |
6806 | enable_gdbmi=yes | |
81ecdfbb RW |
6807 | fi |
6808 | ||
c0993dbe UW |
6809 | if test x"$enable_gdbmi" = xyes; then |
6810 | if test -d $srcdir/mi; then | |
6811 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
6812 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6813 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6814 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6815 | fi | |
6816 | fi | |
6817 | ||
6818 | # Enable TUI. | |
81ecdfbb RW |
6819 | # Check whether --enable-tui was given. |
6820 | if test "${enable_tui+set}" = set; then : | |
6821 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6822 | yes | no | auto) |
c0993dbe UW |
6823 | ;; |
6824 | *) | |
81ecdfbb | 6825 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6826 | esac |
6827 | else | |
3ca64bd3 | 6828 | enable_tui=auto |
81ecdfbb RW |
6829 | fi |
6830 | ||
c0993dbe UW |
6831 | |
6832 | # Enable gdbtk. | |
81ecdfbb RW |
6833 | # Check whether --enable-gdbtk was given. |
6834 | if test "${enable_gdbtk+set}" = set; then : | |
6835 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6836 | yes | no) |
6837 | ;; | |
6838 | *) | |
81ecdfbb | 6839 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6840 | esac |
6841 | else | |
5062cc19 | 6842 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
6843 | enable_gdbtk=yes |
6844 | else | |
6845 | enable_gdbtk=no | |
6846 | fi | |
81ecdfbb RW |
6847 | fi |
6848 | ||
c0993dbe UW |
6849 | # We unconditionally disable gdbtk tests on selected platforms. |
6850 | case $host_os in | |
6851 | go32* | windows*) | |
81ecdfbb RW |
6852 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6853 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6854 | enable_gdbtk=no ;; |
6855 | esac | |
6856 | ||
6857 | # Libunwind support. | |
bec39cab | 6858 | |
81ecdfbb RW |
6859 | # Check whether --with-libunwind was given. |
6860 | if test "${with_libunwind+set}" = set; then : | |
6861 | withval=$with_libunwind; case "${withval}" in | |
bec39cab AC |
6862 | yes) enable_libunwind=yes ;; |
6863 | no) enable_libunwind=no ;; | |
81ecdfbb | 6864 | *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;; |
bec39cab | 6865 | esac |
bec39cab | 6866 | else |
bec39cab | 6867 | |
81ecdfbb RW |
6868 | for ac_header in libunwind.h libunwind-ia64.h |
6869 | do : | |
6870 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6871 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
6872 | eval as_val=\$$as_ac_Header | |
6873 | if test "x$as_val" = x""yes; then : | |
bec39cab | 6874 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6875 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
6876 | _ACEOF |
6877 | ||
6878 | fi | |
6879 | ||
6880 | done | |
6881 | ||
a9322a30 TT |
6882 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then |
6883 | enable_libunwind=yes; | |
6884 | fi | |
6885 | ||
bec39cab | 6886 | fi |
bec39cab | 6887 | |
bec39cab | 6888 | |
81ecdfbb RW |
6889 | if test x"$enable_libunwind" = xyes; then |
6890 | for ac_header in libunwind.h libunwind-ia64.h | |
6891 | do : | |
6892 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6893 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
6894 | eval as_val=\$$as_ac_Header | |
6895 | if test "x$as_val" = x""yes; then : | |
bec39cab | 6896 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6897 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
6898 | _ACEOF |
6899 | ||
6900 | fi | |
6901 | ||
6902 | done | |
6903 | ||
bec39cab | 6904 | |
81ecdfbb | 6905 | $as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h |
a9322a30 TT |
6906 | |
6907 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
6908 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
6909 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
6910 | fi | |
6911 | ||
cb01cfba JB |
6912 | opt_curses=no |
6913 | ||
81ecdfbb RW |
6914 | # Check whether --with-curses was given. |
6915 | if test "${with_curses+set}" = set; then : | |
6916 | withval=$with_curses; opt_curses=$withval | |
6917 | fi | |
6918 | ||
cb01cfba | 6919 | |
76a39ba7 | 6920 | prefer_curses=no |
cb01cfba | 6921 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 6922 | prefer_curses=yes |
cb01cfba JB |
6923 | fi |
6924 | ||
a9322a30 | 6925 | # Profiling support. |
81ecdfbb RW |
6926 | # Check whether --enable-profiling was given. |
6927 | if test "${enable_profiling+set}" = set; then : | |
6928 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
6929 | yes | no) |
6930 | ;; | |
6931 | *) | |
81ecdfbb | 6932 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
6933 | esac |
6934 | else | |
6935 | enable_profiling=no | |
81ecdfbb | 6936 | fi |
bec39cab | 6937 | |
a9322a30 TT |
6938 | |
6939 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
6940 | do : |
6941 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6942 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6943 | eval as_val=\$$as_ac_var | |
6944 | if test "x$as_val" = x""yes; then : | |
6945 | cat >>confdefs.h <<_ACEOF | |
6946 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 6947 | _ACEOF |
a9322a30 | 6948 | |
81ecdfbb RW |
6949 | fi |
6950 | done | |
a9322a30 | 6951 | |
81ecdfbb RW |
6952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
6953 | $as_echo_n "checking for _etext... " >&6; } | |
6954 | if test "${ac_cv_var__etext+set}" = set; then : | |
6955 | $as_echo_n "(cached) " >&6 | |
6956 | else | |
6957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6958 | /* end confdefs.h. */ | |
6959 | #include <stdlib.h> | |
6960 | extern char _etext; | |
a9322a30 TT |
6961 | |
6962 | int | |
6963 | main () | |
6964 | { | |
6965 | free (&_etext); | |
6966 | ; | |
6967 | return 0; | |
6968 | } | |
bec39cab | 6969 | _ACEOF |
81ecdfbb | 6970 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6971 | ac_cv_var__etext=yes |
bec39cab | 6972 | else |
81ecdfbb | 6973 | ac_cv_var__etext=no |
bec39cab | 6974 | fi |
81ecdfbb RW |
6975 | rm -f core conftest.err conftest.$ac_objext \ |
6976 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6977 | fi |
81ecdfbb RW |
6978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6979 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 6980 | if test $ac_cv_var__etext = yes; then |
60ca704f | 6981 | |
81ecdfbb | 6982 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6983 | |
bec39cab | 6984 | fi |
81ecdfbb RW |
6985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6986 | $as_echo_n "checking for etext... " >&6; } | |
6987 | if test "${ac_cv_var_etext+set}" = set; then : | |
6988 | $as_echo_n "(cached) " >&6 | |
bec39cab | 6989 | else |
81ecdfbb | 6990 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6991 | /* end confdefs.h. */ |
a9322a30 TT |
6992 | #include <stdlib.h> |
6993 | extern char etext; | |
bec39cab AC |
6994 | |
6995 | int | |
6996 | main () | |
6997 | { | |
a9322a30 | 6998 | free (&etext); |
bec39cab AC |
6999 | ; |
7000 | return 0; | |
7001 | } | |
7002 | _ACEOF | |
81ecdfbb | 7003 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7004 | ac_cv_var_etext=yes |
bec39cab | 7005 | else |
81ecdfbb | 7006 | ac_cv_var_etext=no |
bec39cab | 7007 | fi |
81ecdfbb RW |
7008 | rm -f core conftest.err conftest.$ac_objext \ |
7009 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 7010 | fi |
81ecdfbb RW |
7011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
7012 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
7013 | if test $ac_cv_var_etext = yes; then |
7014 | ||
81ecdfbb | 7015 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
7016 | |
7017 | fi | |
a9322a30 TT |
7018 | if test "$enable_profiling" = yes ; then |
7019 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 7020 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
7021 | fi |
7022 | PROFILE_CFLAGS=-pg | |
7023 | OLD_CFLAGS="$CFLAGS" | |
7024 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 7025 | |
81ecdfbb RW |
7026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7027 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
7028 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
7029 | $as_echo_n "(cached) " >&6 | |
bec39cab | 7030 | else |
81ecdfbb | 7031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7032 | /* end confdefs.h. */ |
bec39cab AC |
7033 | |
7034 | int | |
7035 | main () | |
7036 | { | |
a9322a30 | 7037 | int x; |
bec39cab AC |
7038 | ; |
7039 | return 0; | |
7040 | } | |
7041 | _ACEOF | |
81ecdfbb | 7042 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7043 | ac_cv_cc_supports_pg=yes |
bec39cab | 7044 | else |
81ecdfbb | 7045 | ac_cv_cc_supports_pg=no |
bec39cab | 7046 | fi |
81ecdfbb | 7047 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 7048 | fi |
81ecdfbb RW |
7049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7050 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7051 | |
a9322a30 | 7052 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 7053 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7054 | fi |
bec39cab | 7055 | |
a9322a30 | 7056 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7057 | fi |
7058 | ||
c16158bc JM |
7059 | |
7060 | ||
81ecdfbb RW |
7061 | # Check whether --with-pkgversion was given. |
7062 | if test "${with_pkgversion+set}" = set; then : | |
7063 | withval=$with_pkgversion; case "$withval" in | |
7064 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
7065 | no) PKGVERSION= ;; |
7066 | *) PKGVERSION="($withval) " ;; | |
7067 | esac | |
7068 | else | |
7069 | PKGVERSION="(GDB) " | |
7070 | ||
81ecdfbb | 7071 | fi |
c16158bc JM |
7072 | |
7073 | ||
7074 | ||
7075 | ||
81ecdfbb RW |
7076 | |
7077 | # Check whether --with-bugurl was given. | |
7078 | if test "${with_bugurl+set}" = set; then : | |
7079 | withval=$with_bugurl; case "$withval" in | |
7080 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
7081 | no) BUGURL= |
7082 | ;; | |
7083 | *) BUGURL="$withval" | |
7084 | ;; | |
7085 | esac | |
7086 | else | |
7087 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
7088 | ||
81ecdfbb RW |
7089 | fi |
7090 | ||
c16158bc JM |
7091 | case ${BUGURL} in |
7092 | "") | |
7093 | REPORT_BUGS_TO= | |
7094 | REPORT_BUGS_TEXI= | |
7095 | ;; | |
7096 | *) | |
7097 | REPORT_BUGS_TO="<$BUGURL>" | |
7098 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7099 | ;; | |
7100 | esac; | |
7101 | ||
7102 | ||
7103 | ||
7104 | ||
7105 | cat >>confdefs.h <<_ACEOF | |
7106 | #define PKGVERSION "$PKGVERSION" | |
7107 | _ACEOF | |
7108 | ||
7109 | ||
7110 | cat >>confdefs.h <<_ACEOF | |
7111 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7112 | _ACEOF | |
7113 | ||
7114 | ||
bec39cab AC |
7115 | # --------------------- # |
7116 | # Checks for programs. # | |
7117 | # --------------------- # | |
7118 | ||
7119 | for ac_prog in gawk mawk nawk awk | |
7120 | do | |
7121 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7122 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7124 | $as_echo_n "checking for $ac_word... " >&6; } | |
7125 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7126 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7127 | else |
7128 | if test -n "$AWK"; then | |
7129 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7130 | else | |
7131 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7132 | for as_dir in $PATH | |
7133 | do | |
7134 | IFS=$as_save_IFS | |
7135 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7136 | for ac_exec_ext in '' $ac_executable_extensions; do |
7137 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7138 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7139 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7140 | break 2 |
7141 | fi | |
7142 | done | |
81ecdfbb RW |
7143 | done |
7144 | IFS=$as_save_IFS | |
bec39cab AC |
7145 | |
7146 | fi | |
7147 | fi | |
7148 | AWK=$ac_cv_prog_AWK | |
7149 | if test -n "$AWK"; then | |
81ecdfbb RW |
7150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7151 | $as_echo "$AWK" >&6; } | |
bec39cab | 7152 | else |
81ecdfbb RW |
7153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7154 | $as_echo "no" >&6; } | |
bec39cab AC |
7155 | fi |
7156 | ||
bec39cab | 7157 | |
81ecdfbb | 7158 | test -n "$AWK" && break |
bec39cab AC |
7159 | done |
7160 | ||
bec39cab | 7161 | |
81ecdfbb RW |
7162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7163 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7164 | LN_S=$as_ln_s |
7165 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7167 | $as_echo "yes" >&6; } | |
bec39cab | 7168 | else |
81ecdfbb RW |
7169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7170 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7171 | fi |
7172 | ||
7173 | if test -n "$ac_tool_prefix"; then | |
7174 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7175 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7177 | $as_echo_n "checking for $ac_word... " >&6; } | |
7178 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
7179 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7180 | else |
7181 | if test -n "$RANLIB"; then | |
7182 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7183 | else | |
7184 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7185 | for as_dir in $PATH | |
7186 | do | |
7187 | IFS=$as_save_IFS | |
7188 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7189 | for ac_exec_ext in '' $ac_executable_extensions; do |
7190 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7191 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7192 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7193 | break 2 |
7194 | fi | |
7195 | done | |
81ecdfbb RW |
7196 | done |
7197 | IFS=$as_save_IFS | |
bec39cab AC |
7198 | |
7199 | fi | |
7200 | fi | |
7201 | RANLIB=$ac_cv_prog_RANLIB | |
7202 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7204 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7205 | else |
81ecdfbb RW |
7206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7207 | $as_echo "no" >&6; } | |
bec39cab AC |
7208 | fi |
7209 | ||
81ecdfbb | 7210 | |
bec39cab AC |
7211 | fi |
7212 | if test -z "$ac_cv_prog_RANLIB"; then | |
7213 | ac_ct_RANLIB=$RANLIB | |
7214 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7215 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7217 | $as_echo_n "checking for $ac_word... " >&6; } | |
7218 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
7219 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7220 | else |
7221 | if test -n "$ac_ct_RANLIB"; then | |
7222 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7223 | else | |
7224 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7225 | for as_dir in $PATH | |
7226 | do | |
7227 | IFS=$as_save_IFS | |
7228 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7229 | for ac_exec_ext in '' $ac_executable_extensions; do |
7230 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7231 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7232 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7233 | break 2 |
7234 | fi | |
7235 | done | |
81ecdfbb RW |
7236 | done |
7237 | IFS=$as_save_IFS | |
bec39cab | 7238 | |
bec39cab AC |
7239 | fi |
7240 | fi | |
7241 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7242 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7244 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7245 | else |
81ecdfbb RW |
7246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7247 | $as_echo "no" >&6; } | |
bec39cab AC |
7248 | fi |
7249 | ||
81ecdfbb RW |
7250 | if test "x$ac_ct_RANLIB" = x; then |
7251 | RANLIB=":" | |
7252 | else | |
7253 | case $cross_compiling:$ac_tool_warned in | |
7254 | yes:) | |
7255 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7256 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7257 | ac_tool_warned=yes ;; | |
7258 | esac | |
7259 | RANLIB=$ac_ct_RANLIB | |
7260 | fi | |
bec39cab AC |
7261 | else |
7262 | RANLIB="$ac_cv_prog_RANLIB" | |
7263 | fi | |
7264 | ||
7265 | for ac_prog in 'bison -y' byacc | |
7266 | do | |
7267 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7268 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7270 | $as_echo_n "checking for $ac_word... " >&6; } | |
7271 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
7272 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7273 | else |
7274 | if test -n "$YACC"; then | |
7275 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7276 | else | |
7277 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7278 | for as_dir in $PATH | |
7279 | do | |
7280 | IFS=$as_save_IFS | |
7281 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7282 | for ac_exec_ext in '' $ac_executable_extensions; do |
7283 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7284 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7285 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7286 | break 2 |
7287 | fi | |
7288 | done | |
81ecdfbb RW |
7289 | done |
7290 | IFS=$as_save_IFS | |
bec39cab AC |
7291 | |
7292 | fi | |
7293 | fi | |
7294 | YACC=$ac_cv_prog_YACC | |
7295 | if test -n "$YACC"; then | |
81ecdfbb RW |
7296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7297 | $as_echo "$YACC" >&6; } | |
bec39cab | 7298 | else |
81ecdfbb RW |
7299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7300 | $as_echo "no" >&6; } | |
bec39cab AC |
7301 | fi |
7302 | ||
81ecdfbb | 7303 | |
bec39cab AC |
7304 | test -n "$YACC" && break |
7305 | done | |
7306 | test -n "$YACC" || YACC="yacc" | |
7307 | ||
7308 | ||
7309 | if test -n "$ac_tool_prefix"; then | |
7310 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7311 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7313 | $as_echo_n "checking for $ac_word... " >&6; } | |
7314 | if test "${ac_cv_prog_AR+set}" = set; then : | |
7315 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7316 | else |
7317 | if test -n "$AR"; then | |
7318 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7319 | else | |
7320 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7321 | for as_dir in $PATH | |
7322 | do | |
7323 | IFS=$as_save_IFS | |
7324 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7325 | for ac_exec_ext in '' $ac_executable_extensions; do |
7326 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7327 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7328 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7329 | break 2 |
7330 | fi | |
7331 | done | |
81ecdfbb RW |
7332 | done |
7333 | IFS=$as_save_IFS | |
bec39cab AC |
7334 | |
7335 | fi | |
7336 | fi | |
7337 | AR=$ac_cv_prog_AR | |
7338 | if test -n "$AR"; then | |
81ecdfbb RW |
7339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7340 | $as_echo "$AR" >&6; } | |
bec39cab | 7341 | else |
81ecdfbb RW |
7342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7343 | $as_echo "no" >&6; } | |
bec39cab AC |
7344 | fi |
7345 | ||
81ecdfbb | 7346 | |
bec39cab AC |
7347 | fi |
7348 | if test -z "$ac_cv_prog_AR"; then | |
7349 | ac_ct_AR=$AR | |
7350 | # Extract the first word of "ar", so it can be a program name with args. | |
7351 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7353 | $as_echo_n "checking for $ac_word... " >&6; } | |
7354 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
7355 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7356 | else |
7357 | if test -n "$ac_ct_AR"; then | |
7358 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7359 | else | |
7360 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7361 | for as_dir in $PATH | |
7362 | do | |
7363 | IFS=$as_save_IFS | |
7364 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7365 | for ac_exec_ext in '' $ac_executable_extensions; do |
7366 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7367 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7368 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7369 | break 2 |
7370 | fi | |
7371 | done | |
81ecdfbb RW |
7372 | done |
7373 | IFS=$as_save_IFS | |
bec39cab AC |
7374 | |
7375 | fi | |
7376 | fi | |
7377 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7378 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7380 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7381 | else |
81ecdfbb RW |
7382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7383 | $as_echo "no" >&6; } | |
bec39cab AC |
7384 | fi |
7385 | ||
81ecdfbb RW |
7386 | if test "x$ac_ct_AR" = x; then |
7387 | AR="" | |
7388 | else | |
7389 | case $cross_compiling:$ac_tool_warned in | |
7390 | yes:) | |
7391 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7392 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7393 | ac_tool_warned=yes ;; | |
7394 | esac | |
7395 | AR=$ac_ct_AR | |
7396 | fi | |
bec39cab AC |
7397 | else |
7398 | AR="$ac_cv_prog_AR" | |
7399 | fi | |
7400 | ||
7401 | if test -n "$ac_tool_prefix"; then | |
7402 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7403 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7405 | $as_echo_n "checking for $ac_word... " >&6; } | |
7406 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
7407 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7408 | else |
7409 | if test -n "$DLLTOOL"; then | |
7410 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7411 | else | |
7412 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7413 | for as_dir in $PATH | |
7414 | do | |
7415 | IFS=$as_save_IFS | |
7416 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7417 | for ac_exec_ext in '' $ac_executable_extensions; do |
7418 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7419 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7420 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7421 | break 2 |
7422 | fi | |
7423 | done | |
81ecdfbb RW |
7424 | done |
7425 | IFS=$as_save_IFS | |
bec39cab AC |
7426 | |
7427 | fi | |
7428 | fi | |
7429 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7430 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7432 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7433 | else |
81ecdfbb RW |
7434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7435 | $as_echo "no" >&6; } | |
bec39cab AC |
7436 | fi |
7437 | ||
81ecdfbb | 7438 | |
bec39cab AC |
7439 | fi |
7440 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7441 | ac_ct_DLLTOOL=$DLLTOOL | |
7442 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7443 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7445 | $as_echo_n "checking for $ac_word... " >&6; } | |
7446 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
7447 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7448 | else |
7449 | if test -n "$ac_ct_DLLTOOL"; then | |
7450 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7451 | else | |
7452 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7453 | for as_dir in $PATH | |
7454 | do | |
7455 | IFS=$as_save_IFS | |
7456 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7457 | for ac_exec_ext in '' $ac_executable_extensions; do |
7458 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7459 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7460 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7461 | break 2 |
7462 | fi | |
7463 | done | |
81ecdfbb RW |
7464 | done |
7465 | IFS=$as_save_IFS | |
bec39cab AC |
7466 | |
7467 | fi | |
7468 | fi | |
7469 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7470 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7472 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7473 | else |
81ecdfbb RW |
7474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7475 | $as_echo "no" >&6; } | |
bec39cab AC |
7476 | fi |
7477 | ||
81ecdfbb RW |
7478 | if test "x$ac_ct_DLLTOOL" = x; then |
7479 | DLLTOOL="" | |
7480 | else | |
7481 | case $cross_compiling:$ac_tool_warned in | |
7482 | yes:) | |
7483 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7484 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7485 | ac_tool_warned=yes ;; | |
7486 | esac | |
7487 | DLLTOOL=$ac_ct_DLLTOOL | |
7488 | fi | |
bec39cab AC |
7489 | else |
7490 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7491 | fi | |
7492 | ||
7493 | if test -n "$ac_tool_prefix"; then | |
7494 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7495 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7497 | $as_echo_n "checking for $ac_word... " >&6; } | |
7498 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
7499 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7500 | else |
7501 | if test -n "$WINDRES"; then | |
7502 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7503 | else | |
7504 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7505 | for as_dir in $PATH | |
7506 | do | |
7507 | IFS=$as_save_IFS | |
7508 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7509 | for ac_exec_ext in '' $ac_executable_extensions; do |
7510 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7511 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7512 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7513 | break 2 |
7514 | fi | |
7515 | done | |
81ecdfbb RW |
7516 | done |
7517 | IFS=$as_save_IFS | |
bec39cab AC |
7518 | |
7519 | fi | |
7520 | fi | |
7521 | WINDRES=$ac_cv_prog_WINDRES | |
7522 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7524 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7525 | else |
81ecdfbb RW |
7526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7527 | $as_echo "no" >&6; } | |
bec39cab AC |
7528 | fi |
7529 | ||
81ecdfbb | 7530 | |
bec39cab AC |
7531 | fi |
7532 | if test -z "$ac_cv_prog_WINDRES"; then | |
7533 | ac_ct_WINDRES=$WINDRES | |
7534 | # Extract the first word of "windres", so it can be a program name with args. | |
7535 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7537 | $as_echo_n "checking for $ac_word... " >&6; } | |
7538 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
7539 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7540 | else |
7541 | if test -n "$ac_ct_WINDRES"; then | |
7542 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7543 | else | |
7544 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7545 | for as_dir in $PATH | |
7546 | do | |
7547 | IFS=$as_save_IFS | |
7548 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7549 | for ac_exec_ext in '' $ac_executable_extensions; do |
7550 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7551 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7552 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7553 | break 2 |
7554 | fi | |
7555 | done | |
81ecdfbb RW |
7556 | done |
7557 | IFS=$as_save_IFS | |
bec39cab AC |
7558 | |
7559 | fi | |
7560 | fi | |
7561 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7562 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7564 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7565 | else |
81ecdfbb RW |
7566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7567 | $as_echo "no" >&6; } | |
c906108c | 7568 | fi |
bec39cab | 7569 | |
81ecdfbb RW |
7570 | if test "x$ac_ct_WINDRES" = x; then |
7571 | WINDRES="" | |
7572 | else | |
7573 | case $cross_compiling:$ac_tool_warned in | |
7574 | yes:) | |
7575 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7576 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7577 | ac_tool_warned=yes ;; | |
7578 | esac | |
7579 | WINDRES=$ac_ct_WINDRES | |
7580 | fi | |
c906108c | 7581 | else |
bec39cab | 7582 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7583 | fi |
7584 | ||
bec39cab AC |
7585 | |
7586 | # Needed for GNU/Hurd. | |
7587 | if test -n "$ac_tool_prefix"; then | |
7588 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
7589 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7591 | $as_echo_n "checking for $ac_word... " >&6; } | |
7592 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
7593 | $as_echo_n "(cached) " >&6 | |
c906108c | 7594 | else |
bec39cab AC |
7595 | if test -n "$MIG"; then |
7596 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7597 | else | |
7598 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7599 | for as_dir in $PATH | |
7600 | do | |
7601 | IFS=$as_save_IFS | |
7602 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7603 | for ac_exec_ext in '' $ac_executable_extensions; do |
7604 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7605 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7606 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7607 | break 2 |
7608 | fi | |
7609 | done | |
81ecdfbb RW |
7610 | done |
7611 | IFS=$as_save_IFS | |
bec39cab | 7612 | |
c906108c | 7613 | fi |
bec39cab AC |
7614 | fi |
7615 | MIG=$ac_cv_prog_MIG | |
7616 | if test -n "$MIG"; then | |
81ecdfbb RW |
7617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7618 | $as_echo "$MIG" >&6; } | |
c906108c | 7619 | else |
81ecdfbb RW |
7620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7621 | $as_echo "no" >&6; } | |
c906108c SS |
7622 | fi |
7623 | ||
81ecdfbb | 7624 | |
bec39cab AC |
7625 | fi |
7626 | if test -z "$ac_cv_prog_MIG"; then | |
7627 | ac_ct_MIG=$MIG | |
7628 | # Extract the first word of "mig", so it can be a program name with args. | |
7629 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
7630 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7631 | $as_echo_n "checking for $ac_word... " >&6; } | |
7632 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
7633 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7634 | else |
7635 | if test -n "$ac_ct_MIG"; then | |
7636 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
7637 | else | |
7638 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7639 | for as_dir in $PATH | |
7640 | do | |
7641 | IFS=$as_save_IFS | |
7642 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7643 | for ac_exec_ext in '' $ac_executable_extensions; do |
7644 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 7645 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 7646 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7647 | break 2 |
7648 | fi | |
7649 | done | |
81ecdfbb RW |
7650 | done |
7651 | IFS=$as_save_IFS | |
c906108c | 7652 | |
bec39cab AC |
7653 | fi |
7654 | fi | |
7655 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
7656 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
7657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
7658 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 7659 | else |
81ecdfbb RW |
7660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7661 | $as_echo "no" >&6; } | |
bec39cab | 7662 | fi |
c906108c | 7663 | |
81ecdfbb RW |
7664 | if test "x$ac_ct_MIG" = x; then |
7665 | MIG="" | |
7666 | else | |
7667 | case $cross_compiling:$ac_tool_warned in | |
7668 | yes:) | |
7669 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7670 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7671 | ac_tool_warned=yes ;; | |
7672 | esac | |
7673 | MIG=$ac_ct_MIG | |
7674 | fi | |
bec39cab AC |
7675 | else |
7676 | MIG="$ac_cv_prog_MIG" | |
7677 | fi | |
c906108c | 7678 | |
c906108c | 7679 | |
bec39cab AC |
7680 | # ---------------------- # |
7681 | # Checks for libraries. # | |
7682 | # ---------------------- # | |
c906108c | 7683 | |
bec39cab | 7684 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
7685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
7686 | $as_echo_n "checking for main in -lm... " >&6; } | |
7687 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
7688 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7689 | else |
7690 | ac_check_lib_save_LIBS=$LIBS | |
7691 | LIBS="-lm $LIBS" | |
81ecdfbb | 7692 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7693 | /* end confdefs.h. */ |
c906108c | 7694 | |
c906108c | 7695 | |
bec39cab AC |
7696 | int |
7697 | main () | |
7698 | { | |
81ecdfbb | 7699 | return main (); |
bec39cab AC |
7700 | ; |
7701 | return 0; | |
7702 | } | |
7703 | _ACEOF | |
81ecdfbb | 7704 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7705 | ac_cv_lib_m_main=yes |
7706 | else | |
81ecdfbb | 7707 | ac_cv_lib_m_main=no |
bec39cab | 7708 | fi |
81ecdfbb RW |
7709 | rm -f core conftest.err conftest.$ac_objext \ |
7710 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7711 | LIBS=$ac_check_lib_save_LIBS |
7712 | fi | |
81ecdfbb RW |
7713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
7714 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
7715 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
7716 | cat >>confdefs.h <<_ACEOF |
7717 | #define HAVE_LIBM 1 | |
7718 | _ACEOF | |
7719 | ||
7720 | LIBS="-lm $LIBS" | |
c906108c | 7721 | |
c906108c | 7722 | fi |
bec39cab AC |
7723 | |
7724 | ||
7725 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
7726 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
7727 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
7728 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
7729 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
7730 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 7731 | |
c906108c | 7732 | else |
81ecdfbb RW |
7733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
7734 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
7735 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
7736 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7737 | else |
7738 | ac_check_lib_save_LIBS=$LIBS | |
7739 | LIBS="-lw $LIBS" | |
81ecdfbb | 7740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7741 | /* end confdefs.h. */ |
c906108c | 7742 | |
81ecdfbb RW |
7743 | /* Override any GCC internal prototype to avoid an error. |
7744 | Use char because int might match the return type of a GCC | |
7745 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7746 | #ifdef __cplusplus |
7747 | extern "C" | |
7748 | #endif | |
bec39cab AC |
7749 | char wctype (); |
7750 | int | |
7751 | main () | |
7752 | { | |
81ecdfbb | 7753 | return wctype (); |
bec39cab AC |
7754 | ; |
7755 | return 0; | |
7756 | } | |
7757 | _ACEOF | |
81ecdfbb | 7758 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7759 | ac_cv_lib_w_wctype=yes |
7760 | else | |
81ecdfbb | 7761 | ac_cv_lib_w_wctype=no |
bec39cab | 7762 | fi |
81ecdfbb RW |
7763 | rm -f core conftest.err conftest.$ac_objext \ |
7764 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7765 | LIBS=$ac_check_lib_save_LIBS |
7766 | fi | |
81ecdfbb RW |
7767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
7768 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
7769 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
7770 | cat >>confdefs.h <<_ACEOF |
7771 | #define HAVE_LIBW 1 | |
7772 | _ACEOF | |
c906108c | 7773 | |
bec39cab | 7774 | LIBS="-lw $LIBS" |
c906108c | 7775 | |
bec39cab | 7776 | fi |
c906108c | 7777 | |
bec39cab | 7778 | fi |
c906108c | 7779 | |
ddc9cd0f | 7780 | |
bec39cab | 7781 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
7782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
7783 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
7784 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7785 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7786 | else |
7787 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7789 | /* end confdefs.h. */ |
ddc9cd0f | 7790 | |
81ecdfbb RW |
7791 | /* Override any GCC internal prototype to avoid an error. |
7792 | Use char because int might match the return type of a GCC | |
7793 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7794 | #ifdef __cplusplus |
7795 | extern "C" | |
7796 | #endif | |
bec39cab AC |
7797 | char gethostbyname (); |
7798 | int | |
7799 | main () | |
7800 | { | |
81ecdfbb | 7801 | return gethostbyname (); |
bec39cab AC |
7802 | ; |
7803 | return 0; | |
7804 | } | |
7805 | _ACEOF | |
81ecdfbb RW |
7806 | for ac_lib in '' nsl; do |
7807 | if test -z "$ac_lib"; then | |
7808 | ac_res="none required" | |
7809 | else | |
7810 | ac_res=-l$ac_lib | |
b4e70030 | 7811 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7812 | fi |
7813 | if ac_fn_c_try_link "$LINENO"; then : | |
7814 | ac_cv_search_gethostbyname=$ac_res | |
7815 | fi | |
7816 | rm -f core conftest.err conftest.$ac_objext \ | |
7817 | conftest$ac_exeext | |
7818 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
7819 | break | |
7820 | fi | |
7821 | done | |
7822 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 7823 | |
bec39cab | 7824 | else |
81ecdfbb | 7825 | ac_cv_search_gethostbyname=no |
bec39cab | 7826 | fi |
81ecdfbb | 7827 | rm conftest.$ac_ext |
bec39cab AC |
7828 | LIBS=$ac_func_search_save_LIBS |
7829 | fi | |
81ecdfbb RW |
7830 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
7831 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
7832 | ac_res=$ac_cv_search_gethostbyname | |
7833 | if test "$ac_res" != no; then : | |
7834 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 7835 | |
bec39cab | 7836 | fi |
96baa820 | 7837 | |
c906108c | 7838 | |
b4e70030 | 7839 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
7840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
7841 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
7842 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7843 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
7844 | else |
7845 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7847 | /* end confdefs.h. */ |
7848 | ||
81ecdfbb RW |
7849 | /* Override any GCC internal prototype to avoid an error. |
7850 | Use char because int might match the return type of a GCC | |
7851 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
7852 | #ifdef __cplusplus |
7853 | extern "C" | |
7854 | #endif | |
b4e70030 JB |
7855 | char socketpair (); |
7856 | int | |
7857 | main () | |
7858 | { | |
81ecdfbb | 7859 | return socketpair (); |
b4e70030 JB |
7860 | ; |
7861 | return 0; | |
7862 | } | |
7863 | _ACEOF | |
81ecdfbb RW |
7864 | for ac_lib in '' socket; do |
7865 | if test -z "$ac_lib"; then | |
7866 | ac_res="none required" | |
7867 | else | |
7868 | ac_res=-l$ac_lib | |
b4e70030 | 7869 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7870 | fi |
7871 | if ac_fn_c_try_link "$LINENO"; then : | |
7872 | ac_cv_search_socketpair=$ac_res | |
7873 | fi | |
7874 | rm -f core conftest.err conftest.$ac_objext \ | |
7875 | conftest$ac_exeext | |
7876 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
7877 | break | |
7878 | fi | |
7879 | done | |
7880 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 7881 | |
b4e70030 | 7882 | else |
81ecdfbb | 7883 | ac_cv_search_socketpair=no |
b4e70030 | 7884 | fi |
81ecdfbb | 7885 | rm conftest.$ac_ext |
b4e70030 JB |
7886 | LIBS=$ac_func_search_save_LIBS |
7887 | fi | |
81ecdfbb RW |
7888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7889 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7890 | ac_res=$ac_cv_search_socketpair | |
7891 | if test "$ac_res" != no; then : | |
7892 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7893 | |
7894 | fi | |
7895 | ||
7896 | ||
233a11ab | 7897 | # Link in zlib if we can. This allows us to read compressed debug sections. |
81ecdfbb RW |
7898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 |
7899 | $as_echo_n "checking for library containing zlibVersion... " >&6; } | |
7900 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
7901 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
7902 | else |
7903 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
7905 | /* end confdefs.h. */ |
7906 | ||
81ecdfbb RW |
7907 | /* Override any GCC internal prototype to avoid an error. |
7908 | Use char because int might match the return type of a GCC | |
233a11ab | 7909 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
7910 | #ifdef __cplusplus |
7911 | extern "C" | |
7912 | #endif | |
233a11ab CS |
7913 | char zlibVersion (); |
7914 | int | |
7915 | main () | |
7916 | { | |
81ecdfbb | 7917 | return zlibVersion (); |
233a11ab CS |
7918 | ; |
7919 | return 0; | |
7920 | } | |
7921 | _ACEOF | |
81ecdfbb RW |
7922 | for ac_lib in '' z; do |
7923 | if test -z "$ac_lib"; then | |
7924 | ac_res="none required" | |
233a11ab | 7925 | else |
81ecdfbb RW |
7926 | ac_res=-l$ac_lib |
7927 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 7928 | fi |
81ecdfbb RW |
7929 | if ac_fn_c_try_link "$LINENO"; then : |
7930 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 7931 | fi |
81ecdfbb RW |
7932 | rm -f core conftest.err conftest.$ac_objext \ |
7933 | conftest$ac_exeext | |
7934 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
7935 | break | |
233a11ab | 7936 | fi |
81ecdfbb RW |
7937 | done |
7938 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 7939 | |
233a11ab | 7940 | else |
81ecdfbb | 7941 | ac_cv_search_zlibVersion=no |
233a11ab | 7942 | fi |
81ecdfbb RW |
7943 | rm conftest.$ac_ext |
7944 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 7945 | fi |
81ecdfbb RW |
7946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
7947 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
7948 | ac_res=$ac_cv_search_zlibVersion | |
7949 | if test "$ac_res" != no; then : | |
7950 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7951 | for ac_header in zlib.h | |
7952 | do : | |
7953 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
7954 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 7955 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 7956 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
7957 | _ACEOF |
7958 | ||
7959 | fi | |
7960 | ||
7961 | done | |
7962 | ||
7963 | fi | |
7964 | ||
7965 | ||
77f120bf | 7966 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
7967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
7968 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
7969 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
7970 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
7971 | else |
7972 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7974 | /* end confdefs.h. */ |
c906108c | 7975 | |
81ecdfbb RW |
7976 | /* Override any GCC internal prototype to avoid an error. |
7977 | Use char because int might match the return type of a GCC | |
7978 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7979 | #ifdef __cplusplus |
7980 | extern "C" | |
7981 | #endif | |
77f120bf | 7982 | char dlgetmodinfo (); |
bec39cab AC |
7983 | int |
7984 | main () | |
7985 | { | |
81ecdfbb | 7986 | return dlgetmodinfo (); |
bec39cab AC |
7987 | ; |
7988 | return 0; | |
7989 | } | |
7990 | _ACEOF | |
81ecdfbb RW |
7991 | for ac_lib in '' dl xpdl; do |
7992 | if test -z "$ac_lib"; then | |
7993 | ac_res="none required" | |
7994 | else | |
7995 | ac_res=-l$ac_lib | |
b4e70030 | 7996 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7997 | fi |
7998 | if ac_fn_c_try_link "$LINENO"; then : | |
7999 | ac_cv_search_dlgetmodinfo=$ac_res | |
8000 | fi | |
8001 | rm -f core conftest.err conftest.$ac_objext \ | |
8002 | conftest$ac_exeext | |
8003 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
8004 | break | |
8005 | fi | |
8006 | done | |
8007 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 8008 | |
4e8d927d | 8009 | else |
81ecdfbb | 8010 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 8011 | fi |
81ecdfbb | 8012 | rm conftest.$ac_ext |
bec39cab AC |
8013 | LIBS=$ac_func_search_save_LIBS |
8014 | fi | |
81ecdfbb RW |
8015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
8016 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
8017 | ac_res=$ac_cv_search_dlgetmodinfo | |
8018 | if test "$ac_res" != no; then : | |
8019 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 8020 | |
8bb2c122 | 8021 | fi |
8bb2c122 | 8022 | |
8bb2c122 | 8023 | |
77f120bf | 8024 | |
77f120bf | 8025 | |
6c7a06a3 | 8026 | |
81ecdfbb RW |
8027 | # Check whether --with-libiconv-prefix was given. |
8028 | if test "${with_libiconv_prefix+set}" = set; then : | |
8029 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 8030 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
8031 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
8032 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
8033 | done |
8034 | ||
81ecdfbb RW |
8035 | fi |
8036 | ||
6c7a06a3 TT |
8037 | |
8038 | BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs" | |
8039 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" | |
8040 | ||
81ecdfbb RW |
8041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8042 | $as_echo_n "checking for iconv... " >&6; } | |
8043 | if test "${am_cv_func_iconv+set}" = set; then : | |
8044 | $as_echo_n "(cached) " >&6 | |
d542061a | 8045 | else |
6c7a06a3 TT |
8046 | |
8047 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8048 | am_cv_lib_iconv=no | |
8049 | am_cv_use_build_libiconv=no | |
4edb1e84 JB |
8050 | |
8051 | # If libiconv is part of the build tree, then try using it over | |
8052 | # any system iconv. | |
8053 | if test -d ../libiconv; then | |
8054 | am_save_LIBS="$LIBS" | |
8055 | am_save_CPPFLAGS="$CPPFLAGS" | |
8056 | LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv" | |
8057 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
81ecdfbb | 8058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 8059 | /* end confdefs.h. */ |
6c7a06a3 TT |
8060 | #include <stdlib.h> |
8061 | #include <iconv.h> | |
d542061a UW |
8062 | int |
8063 | main () | |
8064 | { | |
6c7a06a3 | 8065 | iconv_t cd = iconv_open("",""); |
4edb1e84 JB |
8066 | iconv(cd,NULL,NULL,NULL,NULL); |
8067 | iconv_close(cd); | |
d542061a UW |
8068 | ; |
8069 | return 0; | |
8070 | } | |
8071 | _ACEOF | |
81ecdfbb | 8072 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 JB |
8073 | am_cv_use_build_libiconv=yes |
8074 | am_cv_lib_iconv=yes | |
8075 | am_cv_func_iconv=yes | |
d542061a | 8076 | fi |
81ecdfbb RW |
8077 | rm -f core conftest.err conftest.$ac_objext \ |
8078 | conftest$ac_exeext conftest.$ac_ext | |
4edb1e84 JB |
8079 | LIBS="$am_save_LIBS" |
8080 | CPPFLAGS="$am_save_CPPFLAGS" | |
8081 | fi | |
94ae1714 | 8082 | |
4edb1e84 | 8083 | # Next, try to find iconv in libc. |
6c7a06a3 | 8084 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 8085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 8086 | /* end confdefs.h. */ |
6c7a06a3 TT |
8087 | #include <stdlib.h> |
8088 | #include <iconv.h> | |
d542061a UW |
8089 | int |
8090 | main () | |
8091 | { | |
6c7a06a3 TT |
8092 | iconv_t cd = iconv_open("",""); |
8093 | iconv(cd,NULL,NULL,NULL,NULL); | |
8094 | iconv_close(cd); | |
d542061a UW |
8095 | ; |
8096 | return 0; | |
8097 | } | |
8098 | _ACEOF | |
81ecdfbb | 8099 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8100 | am_cv_func_iconv=yes |
d542061a | 8101 | fi |
81ecdfbb RW |
8102 | rm -f core conftest.err conftest.$ac_objext \ |
8103 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 8104 | fi |
94ae1714 | 8105 | |
4edb1e84 JB |
8106 | # If iconv was not in libc, try -liconv. In this case, arrange to |
8107 | # look in the libiconv prefix, if it was specified by the user. | |
8108 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 8109 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
8110 | am_save_LIBS="$LIBS" |
8111 | if test -n "$LIBICONV_INCLUDE"; then | |
8112 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
8113 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
8114 | fi | |
8115 | LIBS="$LIBS -liconv" | |
81ecdfbb | 8116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8117 | /* end confdefs.h. */ |
6c7a06a3 TT |
8118 | #include <stdlib.h> |
8119 | #include <iconv.h> | |
bec39cab AC |
8120 | int |
8121 | main () | |
8122 | { | |
6c7a06a3 TT |
8123 | iconv_t cd = iconv_open("",""); |
8124 | iconv(cd,NULL,NULL,NULL,NULL); | |
8125 | iconv_close(cd); | |
bec39cab AC |
8126 | ; |
8127 | return 0; | |
8128 | } | |
8129 | _ACEOF | |
81ecdfbb | 8130 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8131 | am_cv_lib_iconv=yes |
6c7a06a3 | 8132 | am_cv_func_iconv=yes |
627af7ea | 8133 | fi |
81ecdfbb RW |
8134 | rm -f core conftest.err conftest.$ac_objext \ |
8135 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 8136 | LIBS="$am_save_LIBS" |
fc3b640d | 8137 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
8138 | fi |
8139 | ||
8140 | fi | |
81ecdfbb RW |
8141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8142 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
8143 | |
8144 | # Set the various flags based on the cache variables. We can't rely | |
8145 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
8146 | LIBICONV= |
8147 | if test "$am_cv_lib_iconv" = yes; then | |
8148 | LIBICONV="-liconv" | |
94ae1714 TT |
8149 | else |
8150 | LIBICONV_LIBDIR= | |
8151 | LIBICONV_INCLUDE= | |
fc3b640d TT |
8152 | fi |
8153 | if test "$am_cv_use_build_libiconv" = yes; then | |
8154 | LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR" | |
8155 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" | |
8156 | fi | |
8157 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
8158 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 8159 | |
6c7a06a3 TT |
8160 | if test "$am_cv_func_iconv" = yes; then |
8161 | ||
81ecdfbb | 8162 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 8163 | |
81ecdfbb RW |
8164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8165 | $as_echo_n "checking for iconv declaration... " >&6; } | |
8166 | if test "${am_cv_proto_iconv+set}" = set; then : | |
8167 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8168 | else |
8169 | ||
81ecdfbb | 8170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8171 | /* end confdefs.h. */ |
8172 | ||
6c7a06a3 TT |
8173 | #include <stdlib.h> |
8174 | #include <iconv.h> | |
8175 | extern | |
b4e70030 | 8176 | #ifdef __cplusplus |
6c7a06a3 | 8177 | "C" |
b4e70030 | 8178 | #endif |
6c7a06a3 TT |
8179 | #if defined(__STDC__) || defined(__cplusplus) |
8180 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8181 | #else | |
8182 | size_t iconv(); | |
8183 | #endif | |
8184 | ||
b4e70030 JB |
8185 | int |
8186 | main () | |
8187 | { | |
6c7a06a3 | 8188 | |
b4e70030 JB |
8189 | ; |
8190 | return 0; | |
8191 | } | |
8192 | _ACEOF | |
81ecdfbb | 8193 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8194 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8195 | else |
81ecdfbb | 8196 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8197 | fi |
81ecdfbb | 8198 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8199 | 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);" |
8200 | fi | |
8201 | ||
8202 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8204 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8205 | $as_echo "${ac_t:- |
8206 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8207 | |
8208 | cat >>confdefs.h <<_ACEOF | |
8209 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8210 | _ACEOF | |
8211 | ||
8212 | fi | |
6c7a06a3 TT |
8213 | |
8214 | ||
8215 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. | |
8216 | # There is a very specific comment in /usr/include/curses.h explaining that | |
8217 | # termcap routines built into libcurses must not be used. | |
8218 | # | |
8219 | # The symptoms we observed so far is GDB unexpectedly changing | |
8220 | # the terminal settings when tgetent is called - this is particularly | |
8221 | # visible as the output is missing carriage returns, and so rapidly | |
8222 | # becomes very hard to read. | |
8223 | # | |
8224 | # The readline configure script has already decided that libtermcap | |
8225 | # was enough for its purposes, and so decided to build readline using | |
8226 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
8227 | # TUI enabled results in both libraries to be used at the same time, | |
8228 | # which is not allowed. This basically means that GDB with TUI is | |
8229 | # broken on alpha-osf. | |
8230 | ||
8231 | case $host_os in | |
8232 | alpha*-*-osf* ) | |
8233 | if "$enable_tui" = "yes"; then | |
81ecdfbb | 8234 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 TT |
8235 | fi |
8236 | if "$enable_tui" = "auto"; then | |
8237 | enable_tui=no | |
8238 | fi | |
8239 | ;; | |
8240 | esac | |
8241 | ||
cb01cfba | 8242 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 8243 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
8244 | prefer_curses=yes |
8245 | fi | |
8246 | ||
8247 | curses_found=no | |
8248 | if test x"$prefer_curses" = xyes; then | |
8249 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
8250 | # curses library because the latter might not provide all the | |
8251 | # functionality we need. However, this leads to problems on systems | |
8252 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
8253 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
8254 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
8255 | # a situation. | |
81ecdfbb RW |
8256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
8257 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
8258 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8259 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8260 | else |
8261 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8263 | /* end confdefs.h. */ |
8264 | ||
81ecdfbb RW |
8265 | /* Override any GCC internal prototype to avoid an error. |
8266 | Use char because int might match the return type of a GCC | |
8267 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8268 | #ifdef __cplusplus |
8269 | extern "C" | |
8270 | #endif | |
6c7a06a3 TT |
8271 | char waddstr (); |
8272 | int | |
8273 | main () | |
8274 | { | |
81ecdfbb | 8275 | return waddstr (); |
6c7a06a3 TT |
8276 | ; |
8277 | return 0; | |
8278 | } | |
8279 | _ACEOF | |
81ecdfbb RW |
8280 | for ac_lib in '' ncurses cursesX curses; do |
8281 | if test -z "$ac_lib"; then | |
8282 | ac_res="none required" | |
8283 | else | |
8284 | ac_res=-l$ac_lib | |
8285 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8286 | fi | |
8287 | if ac_fn_c_try_link "$LINENO"; then : | |
8288 | ac_cv_search_waddstr=$ac_res | |
8289 | fi | |
8290 | rm -f core conftest.err conftest.$ac_objext \ | |
8291 | conftest$ac_exeext | |
8292 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8293 | break | |
8294 | fi | |
8295 | done | |
8296 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
8297 | ||
6c7a06a3 | 8298 | else |
81ecdfbb RW |
8299 | ac_cv_search_waddstr=no |
8300 | fi | |
8301 | rm conftest.$ac_ext | |
8302 | LIBS=$ac_func_search_save_LIBS | |
8303 | fi | |
8304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
8305 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
8306 | ac_res=$ac_cv_search_waddstr | |
8307 | if test "$ac_res" != no; then : | |
8308 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
8309 | |
8310 | fi | |
8311 | ||
8312 | ||
cb01cfba JB |
8313 | if test "$ac_cv_search_waddstr" != no; then |
8314 | curses_found=yes | |
8315 | fi | |
8316 | fi | |
8317 | ||
8318 | # Check whether we should enable the TUI, but only do so if we really | |
8319 | # can. | |
8320 | if test x"$enable_tui" != xno; then | |
8321 | if test -d $srcdir/tui; then | |
8322 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
8323 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
8324 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
8325 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
8326 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
8327 | CONFIG_ALL="${CONFIG_ALL} all-tui" | |
8328 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
8329 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
8330 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
8331 | else | |
8332 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 8333 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 8334 | else |
81ecdfbb RW |
8335 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
8336 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
8337 | fi |
8338 | fi | |
8339 | fi | |
8340 | fi | |
8341 | ||
8342 | # Since GDB uses Readline, we need termcap functionality. In many | |
8343 | # cases this will be provided by the curses library, but some systems | |
8344 | # have a seperate termcap library, or no curses library at all. | |
8345 | ||
8346 | case $host_os in | |
8347 | cygwin*) | |
8348 | if test -d $srcdir/libtermcap; then | |
8349 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
8350 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
8351 | fi ;; | |
8352 | go32* | *djgpp*) | |
8353 | ac_cv_search_tgetent="none required" | |
8354 | ;; | |
8355 | *mingw32*) | |
8356 | ac_cv_search_tgetent="none required" | |
8357 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
8358 | ;; | |
8359 | esac | |
8360 | ||
8361 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
8362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
8363 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
8364 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8365 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
8366 | else |
8367 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8369 | /* end confdefs.h. */ |
8370 | ||
81ecdfbb RW |
8371 | /* Override any GCC internal prototype to avoid an error. |
8372 | Use char because int might match the return type of a GCC | |
8373 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8374 | #ifdef __cplusplus |
8375 | extern "C" | |
8376 | #endif | |
6c7a06a3 TT |
8377 | char tgetent (); |
8378 | int | |
8379 | main () | |
8380 | { | |
81ecdfbb | 8381 | return tgetent (); |
6c7a06a3 TT |
8382 | ; |
8383 | return 0; | |
8384 | } | |
8385 | _ACEOF | |
81ecdfbb RW |
8386 | for ac_lib in '' termcap tinfo curses ncurses; do |
8387 | if test -z "$ac_lib"; then | |
8388 | ac_res="none required" | |
8389 | else | |
8390 | ac_res=-l$ac_lib | |
6c7a06a3 | 8391 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8392 | fi |
8393 | if ac_fn_c_try_link "$LINENO"; then : | |
8394 | ac_cv_search_tgetent=$ac_res | |
8395 | fi | |
8396 | rm -f core conftest.err conftest.$ac_objext \ | |
8397 | conftest$ac_exeext | |
8398 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
8399 | break | |
8400 | fi | |
8401 | done | |
8402 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 8403 | |
6c7a06a3 | 8404 | else |
81ecdfbb | 8405 | ac_cv_search_tgetent=no |
6c7a06a3 | 8406 | fi |
81ecdfbb | 8407 | rm conftest.$ac_ext |
6c7a06a3 TT |
8408 | LIBS=$ac_func_search_save_LIBS |
8409 | fi | |
81ecdfbb RW |
8410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
8411 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
8412 | ac_res=$ac_cv_search_tgetent | |
8413 | if test "$ac_res" != no; then : | |
8414 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 8415 | |
06825bd1 MK |
8416 | fi |
8417 | ||
06825bd1 | 8418 | |
bec39cab | 8419 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 8420 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
8421 | fi |
8422 | ||
3841debe | 8423 | |
81ecdfbb RW |
8424 | # Check whether --with-system-readline was given. |
8425 | if test "${with_system_readline+set}" = set; then : | |
8426 | withval=$with_system_readline; | |
8427 | fi | |
6a30b0a5 | 8428 | |
6a30b0a5 AS |
8429 | |
8430 | if test "$with_system_readline" = yes; then | |
8431 | READLINE=-lreadline | |
8432 | READLINE_DEPS= | |
8433 | READLINE_CFLAGS= | |
a71e0887 JK |
8434 | |
8435 | # readline-6.0 started to use the name `_rl_echoing_p'. | |
8436 | # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. | |
8437 | ||
8438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5 | |
8439 | $as_echo_n "checking for readline_echoing_p... " >&6; } | |
8440 | save_LIBS=$LIBS | |
8441 | LIBS="$LIBS $READLINE" | |
8442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8443 | /* end confdefs.h. */ | |
8444 | ||
8445 | int | |
8446 | main () | |
8447 | { | |
8448 | extern int readline_echoing_p; | |
8449 | return readline_echoing_p; | |
8450 | ; | |
8451 | return 0; | |
8452 | } | |
8453 | _ACEOF | |
8454 | if ac_fn_c_try_link "$LINENO"; then : | |
8455 | READLINE_ECHOING_P=yes | |
8456 | else | |
8457 | READLINE_ECHOING_P=no | |
8458 | ||
8459 | $as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h | |
8460 | ||
8461 | fi | |
8462 | rm -f core conftest.err conftest.$ac_objext \ | |
8463 | conftest$ac_exeext conftest.$ac_ext | |
8464 | LIBS="$save_LIBS" | |
8465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5 | |
8466 | $as_echo "$READLINE_ECHOING_P" >&6; } | |
6a30b0a5 AS |
8467 | else |
8468 | READLINE='$(READLINE_DIR)/libreadline.a' | |
8469 | READLINE_DEPS='$(READLINE)' | |
8470 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
8471 | fi | |
8472 | ||
8473 | ||
8474 | ||
8475 | ||
8476 | ||
81ecdfbb RW |
8477 | # Check whether --with-expat was given. |
8478 | if test "${with_expat+set}" = set; then : | |
8479 | withval=$with_expat; | |
5c39566f DJ |
8480 | else |
8481 | with_expat=auto | |
81ecdfbb RW |
8482 | fi |
8483 | ||
8484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
8485 | $as_echo_n "checking whether to use expat... " >&6; } | |
8486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
8487 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
8488 | |
8489 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
8490 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
8491 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
8492 | HAVE_LIBEXPAT=no |
8493 | else | |
8494 | ||
3841debe DJ |
8495 | if test "X$prefix" = "XNONE"; then |
8496 | acl_final_prefix="$ac_default_prefix" | |
8497 | else | |
8498 | acl_final_prefix="$prefix" | |
8499 | fi | |
8500 | if test "X$exec_prefix" = "XNONE"; then | |
8501 | acl_final_exec_prefix='${prefix}' | |
8502 | else | |
8503 | acl_final_exec_prefix="$exec_prefix" | |
8504 | fi | |
8505 | acl_save_prefix="$prefix" | |
8506 | prefix="$acl_final_prefix" | |
8507 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8508 | prefix="$acl_save_prefix" | |
8509 | ||
8510 | ||
81ecdfbb RW |
8511 | # Check whether --with-gnu-ld was given. |
8512 | if test "${with_gnu_ld+set}" = set; then : | |
8513 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
8514 | else |
8515 | with_gnu_ld=no | |
81ecdfbb RW |
8516 | fi |
8517 | ||
3841debe DJ |
8518 | # Prepare PATH_SEPARATOR. |
8519 | # The user is always right. | |
8520 | if test "${PATH_SEPARATOR+set}" != set; then | |
8521 | echo "#! /bin/sh" >conf$$.sh | |
8522 | echo "exit 0" >>conf$$.sh | |
8523 | chmod +x conf$$.sh | |
8524 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8525 | PATH_SEPARATOR=';' | |
8526 | else | |
8527 | PATH_SEPARATOR=: | |
8528 | fi | |
8529 | rm -f conf$$.sh | |
8530 | fi | |
8531 | ac_prog=ld | |
8532 | if test "$GCC" = yes; then | |
8533 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
8534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
8535 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
8536 | case $host in |
8537 | *-*-mingw*) | |
8538 | # gcc leaves a trailing carriage return which upsets mingw | |
8539 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8540 | *) | |
8541 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8542 | esac | |
8543 | case $ac_prog in | |
8544 | # Accept absolute paths. | |
8545 | [\\/]* | [A-Za-z]:[\\/]*) | |
8546 | re_direlt='/[^/][^/]*/\.\./' | |
8547 | # Canonicalize the path of ld | |
8548 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8549 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8550 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8551 | done | |
8552 | test -z "$LD" && LD="$ac_prog" | |
8553 | ;; | |
8554 | "") | |
8555 | # If it fails, then pretend we aren't using GCC. | |
8556 | ac_prog=ld | |
8557 | ;; | |
8558 | *) | |
8559 | # If it is relative, then search for the first ld in PATH. | |
8560 | with_gnu_ld=unknown | |
8561 | ;; | |
8562 | esac | |
8563 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
8564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
8565 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 8566 | else |
81ecdfbb RW |
8567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
8568 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 8569 | fi |
81ecdfbb RW |
8570 | if test "${acl_cv_path_LD+set}" = set; then : |
8571 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
8572 | else |
8573 | if test -z "$LD"; then | |
8574 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8575 | for ac_dir in $PATH; do | |
8576 | test -z "$ac_dir" && ac_dir=. | |
8577 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8578 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8579 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8580 | # but apparently some GNU ld's only accept -v. | |
8581 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8582 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8583 | test "$with_gnu_ld" != no && break | |
8584 | else | |
8585 | test "$with_gnu_ld" != yes && break | |
8586 | fi | |
8587 | fi | |
8588 | done | |
8589 | IFS="$ac_save_ifs" | |
8590 | else | |
8591 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8592 | fi | |
8593 | fi | |
8594 | ||
8595 | LD="$acl_cv_path_LD" | |
8596 | if test -n "$LD"; then | |
81ecdfbb RW |
8597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
8598 | $as_echo "$LD" >&6; } | |
3841debe | 8599 | else |
81ecdfbb RW |
8600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8601 | $as_echo "no" >&6; } | |
3841debe | 8602 | fi |
81ecdfbb RW |
8603 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
8604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
8605 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
8606 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
8607 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
8608 | else |
8609 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8610 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8611 | acl_cv_prog_gnu_ld=yes | |
8612 | else | |
8613 | acl_cv_prog_gnu_ld=no | |
8614 | fi | |
8615 | fi | |
81ecdfbb RW |
8616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
8617 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
8618 | with_gnu_ld=$acl_cv_prog_gnu_ld |
8619 | ||
8620 | ||
8621 | ||
81ecdfbb RW |
8622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
8623 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
8624 | if test "${acl_cv_rpath+set}" = set; then : | |
8625 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
8626 | else |
8627 | ||
8628 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8629 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8630 | . ./conftest.sh | |
8631 | rm -f ./conftest.sh | |
8632 | acl_cv_rpath=done | |
8633 | ||
8634 | fi | |
81ecdfbb RW |
8635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
8636 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
8637 | wl="$acl_cv_wl" |
8638 | libext="$acl_cv_libext" | |
8639 | shlibext="$acl_cv_shlibext" | |
8640 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8641 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8642 | hardcode_direct="$acl_cv_hardcode_direct" | |
8643 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
8644 | # Check whether --enable-rpath was given. |
8645 | if test "${enable_rpath+set}" = set; then : | |
8646 | enableval=$enable_rpath; : | |
3841debe DJ |
8647 | else |
8648 | enable_rpath=yes | |
81ecdfbb RW |
8649 | fi |
8650 | ||
3841debe DJ |
8651 | |
8652 | ||
8653 | ||
8654 | ||
8655 | ||
8656 | ||
8657 | ||
8658 | ||
8659 | ||
8660 | use_additional=yes | |
8661 | ||
8662 | acl_save_prefix="$prefix" | |
8663 | prefix="$acl_final_prefix" | |
8664 | acl_save_exec_prefix="$exec_prefix" | |
8665 | exec_prefix="$acl_final_exec_prefix" | |
8666 | ||
8667 | eval additional_includedir=\"$includedir\" | |
8668 | eval additional_libdir=\"$libdir\" | |
8669 | ||
8670 | exec_prefix="$acl_save_exec_prefix" | |
8671 | prefix="$acl_save_prefix" | |
8672 | ||
8673 | ||
81ecdfbb RW |
8674 | # Check whether --with-libexpat-prefix was given. |
8675 | if test "${with_libexpat_prefix+set}" = set; then : | |
8676 | withval=$with_libexpat_prefix; | |
3841debe DJ |
8677 | if test "X$withval" = "Xno"; then |
8678 | use_additional=no | |
8679 | else | |
8680 | if test "X$withval" = "X"; then | |
8681 | ||
8682 | acl_save_prefix="$prefix" | |
8683 | prefix="$acl_final_prefix" | |
8684 | acl_save_exec_prefix="$exec_prefix" | |
8685 | exec_prefix="$acl_final_exec_prefix" | |
8686 | ||
8687 | eval additional_includedir=\"$includedir\" | |
8688 | eval additional_libdir=\"$libdir\" | |
8689 | ||
8690 | exec_prefix="$acl_save_exec_prefix" | |
8691 | prefix="$acl_save_prefix" | |
8692 | ||
8693 | else | |
8694 | additional_includedir="$withval/include" | |
8695 | additional_libdir="$withval/lib" | |
8696 | fi | |
8697 | fi | |
8698 | ||
81ecdfbb RW |
8699 | fi |
8700 | ||
3841debe DJ |
8701 | LIBEXPAT= |
8702 | LTLIBEXPAT= | |
8703 | INCEXPAT= | |
8704 | rpathdirs= | |
8705 | ltrpathdirs= | |
8706 | names_already_handled= | |
8707 | names_next_round='expat ' | |
8708 | while test -n "$names_next_round"; do | |
8709 | names_this_round="$names_next_round" | |
8710 | names_next_round= | |
8711 | for name in $names_this_round; do | |
8712 | already_handled= | |
8713 | for n in $names_already_handled; do | |
8714 | if test "$n" = "$name"; then | |
8715 | already_handled=yes | |
8716 | break | |
8717 | fi | |
8718 | done | |
8719 | if test -z "$already_handled"; then | |
8720 | names_already_handled="$names_already_handled $name" | |
8721 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8722 | eval value=\"\$HAVE_LIB$uppername\" | |
8723 | if test -n "$value"; then | |
8724 | if test "$value" = yes; then | |
8725 | eval value=\"\$LIB$uppername\" | |
8726 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
8727 | eval value=\"\$LTLIB$uppername\" | |
8728 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
8729 | else | |
8730 | : | |
8731 | fi | |
8732 | else | |
8733 | found_dir= | |
8734 | found_la= | |
8735 | found_so= | |
8736 | found_a= | |
8737 | if test $use_additional = yes; then | |
8738 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8739 | found_dir="$additional_libdir" | |
8740 | found_so="$additional_libdir/lib$name.$shlibext" | |
8741 | if test -f "$additional_libdir/lib$name.la"; then | |
8742 | found_la="$additional_libdir/lib$name.la" | |
8743 | fi | |
8744 | else | |
8745 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8746 | found_dir="$additional_libdir" | |
8747 | found_a="$additional_libdir/lib$name.$libext" | |
8748 | if test -f "$additional_libdir/lib$name.la"; then | |
8749 | found_la="$additional_libdir/lib$name.la" | |
8750 | fi | |
8751 | fi | |
8752 | fi | |
8753 | fi | |
8754 | if test "X$found_dir" = "X"; then | |
8755 | for x in $LDFLAGS $LTLIBEXPAT; do | |
8756 | ||
8757 | acl_save_prefix="$prefix" | |
8758 | prefix="$acl_final_prefix" | |
8759 | acl_save_exec_prefix="$exec_prefix" | |
8760 | exec_prefix="$acl_final_exec_prefix" | |
8761 | eval x=\"$x\" | |
8762 | exec_prefix="$acl_save_exec_prefix" | |
8763 | prefix="$acl_save_prefix" | |
8764 | ||
8765 | case "$x" in | |
8766 | -L*) | |
8767 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8768 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8769 | found_dir="$dir" | |
8770 | found_so="$dir/lib$name.$shlibext" | |
8771 | if test -f "$dir/lib$name.la"; then | |
8772 | found_la="$dir/lib$name.la" | |
8773 | fi | |
8774 | else | |
8775 | if test -f "$dir/lib$name.$libext"; then | |
8776 | found_dir="$dir" | |
8777 | found_a="$dir/lib$name.$libext" | |
8778 | if test -f "$dir/lib$name.la"; then | |
8779 | found_la="$dir/lib$name.la" | |
8780 | fi | |
8781 | fi | |
8782 | fi | |
8783 | ;; | |
8784 | esac | |
8785 | if test "X$found_dir" != "X"; then | |
8786 | break | |
8787 | fi | |
8788 | done | |
8789 | fi | |
8790 | if test "X$found_dir" != "X"; then | |
8791 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
8792 | if test "X$found_so" != "X"; then | |
8793 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8794 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8795 | else | |
8796 | haveit= | |
8797 | for x in $ltrpathdirs; do | |
8798 | if test "X$x" = "X$found_dir"; then | |
8799 | haveit=yes | |
8800 | break | |
8801 | fi | |
8802 | done | |
8803 | if test -z "$haveit"; then | |
8804 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8805 | fi | |
8806 | if test "$hardcode_direct" = yes; then | |
8807 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8808 | else | |
8809 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8810 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8811 | haveit= | |
8812 | for x in $rpathdirs; do | |
8813 | if test "X$x" = "X$found_dir"; then | |
8814 | haveit=yes | |
8815 | break | |
8816 | fi | |
8817 | done | |
8818 | if test -z "$haveit"; then | |
8819 | rpathdirs="$rpathdirs $found_dir" | |
8820 | fi | |
8821 | else | |
8822 | haveit= | |
8823 | for x in $LDFLAGS $LIBEXPAT; do | |
8824 | ||
8825 | acl_save_prefix="$prefix" | |
8826 | prefix="$acl_final_prefix" | |
8827 | acl_save_exec_prefix="$exec_prefix" | |
8828 | exec_prefix="$acl_final_exec_prefix" | |
8829 | eval x=\"$x\" | |
8830 | exec_prefix="$acl_save_exec_prefix" | |
8831 | prefix="$acl_save_prefix" | |
8832 | ||
8833 | if test "X$x" = "X-L$found_dir"; then | |
8834 | haveit=yes | |
8835 | break | |
8836 | fi | |
8837 | done | |
8838 | if test -z "$haveit"; then | |
8839 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
8840 | fi | |
8841 | if test "$hardcode_minus_L" != no; then | |
8842 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
8843 | else | |
8844 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
8845 | fi | |
8846 | fi | |
8847 | fi | |
8848 | fi | |
8849 | else | |
8850 | if test "X$found_a" != "X"; then | |
8851 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
8852 | else | |
8853 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
8854 | fi | |
8855 | fi | |
8856 | additional_includedir= | |
8857 | case "$found_dir" in | |
8858 | */lib | */lib/) | |
8859 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8860 | additional_includedir="$basedir/include" | |
8861 | ;; | |
8862 | esac | |
8863 | if test "X$additional_includedir" != "X"; then | |
8864 | if test "X$additional_includedir" != "X/usr/include"; then | |
8865 | haveit= | |
8866 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8867 | if test -n "$GCC"; then | |
8868 | case $host_os in | |
8869 | linux*) haveit=yes;; | |
8870 | esac | |
8871 | fi | |
8872 | fi | |
8873 | if test -z "$haveit"; then | |
8874 | for x in $CPPFLAGS $INCEXPAT; do | |
8875 | ||
8876 | acl_save_prefix="$prefix" | |
8877 | prefix="$acl_final_prefix" | |
8878 | acl_save_exec_prefix="$exec_prefix" | |
8879 | exec_prefix="$acl_final_exec_prefix" | |
8880 | eval x=\"$x\" | |
8881 | exec_prefix="$acl_save_exec_prefix" | |
8882 | prefix="$acl_save_prefix" | |
8883 | ||
8884 | if test "X$x" = "X-I$additional_includedir"; then | |
8885 | haveit=yes | |
8886 | break | |
8887 | fi | |
8888 | done | |
8889 | if test -z "$haveit"; then | |
8890 | if test -d "$additional_includedir"; then | |
8891 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
8892 | fi | |
8893 | fi | |
8894 | fi | |
8895 | fi | |
8896 | fi | |
8897 | if test -n "$found_la"; then | |
8898 | save_libdir="$libdir" | |
8899 | case "$found_la" in | |
8900 | */* | *\\*) . "$found_la" ;; | |
8901 | *) . "./$found_la" ;; | |
8902 | esac | |
8903 | libdir="$save_libdir" | |
8904 | for dep in $dependency_libs; do | |
8905 | case "$dep" in | |
8906 | -L*) | |
8907 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8908 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8909 | haveit= | |
8910 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8911 | if test -n "$GCC"; then | |
8912 | case $host_os in | |
8913 | linux*) haveit=yes;; | |
8914 | esac | |
8915 | fi | |
8916 | fi | |
8917 | if test -z "$haveit"; then | |
8918 | haveit= | |
8919 | for x in $LDFLAGS $LIBEXPAT; do | |
8920 | ||
8921 | acl_save_prefix="$prefix" | |
8922 | prefix="$acl_final_prefix" | |
8923 | acl_save_exec_prefix="$exec_prefix" | |
8924 | exec_prefix="$acl_final_exec_prefix" | |
8925 | eval x=\"$x\" | |
8926 | exec_prefix="$acl_save_exec_prefix" | |
8927 | prefix="$acl_save_prefix" | |
8928 | ||
8929 | if test "X$x" = "X-L$additional_libdir"; then | |
8930 | haveit=yes | |
8931 | break | |
8932 | fi | |
8933 | done | |
8934 | if test -z "$haveit"; then | |
8935 | if test -d "$additional_libdir"; then | |
8936 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
8937 | fi | |
8938 | fi | |
8939 | haveit= | |
8940 | for x in $LDFLAGS $LTLIBEXPAT; do | |
8941 | ||
8942 | acl_save_prefix="$prefix" | |
8943 | prefix="$acl_final_prefix" | |
8944 | acl_save_exec_prefix="$exec_prefix" | |
8945 | exec_prefix="$acl_final_exec_prefix" | |
8946 | eval x=\"$x\" | |
8947 | exec_prefix="$acl_save_exec_prefix" | |
8948 | prefix="$acl_save_prefix" | |
8949 | ||
8950 | if test "X$x" = "X-L$additional_libdir"; then | |
8951 | haveit=yes | |
8952 | break | |
8953 | fi | |
8954 | done | |
8955 | if test -z "$haveit"; then | |
8956 | if test -d "$additional_libdir"; then | |
8957 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
8958 | fi | |
8959 | fi | |
8960 | fi | |
8961 | fi | |
8962 | ;; | |
8963 | -R*) | |
8964 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8965 | if test "$enable_rpath" != no; then | |
8966 | haveit= | |
8967 | for x in $rpathdirs; do | |
8968 | if test "X$x" = "X$dir"; then | |
8969 | haveit=yes | |
8970 | break | |
8971 | fi | |
8972 | done | |
8973 | if test -z "$haveit"; then | |
8974 | rpathdirs="$rpathdirs $dir" | |
8975 | fi | |
8976 | haveit= | |
8977 | for x in $ltrpathdirs; do | |
8978 | if test "X$x" = "X$dir"; then | |
8979 | haveit=yes | |
8980 | break | |
8981 | fi | |
8982 | done | |
8983 | if test -z "$haveit"; then | |
8984 | ltrpathdirs="$ltrpathdirs $dir" | |
8985 | fi | |
8986 | fi | |
8987 | ;; | |
8988 | -l*) | |
8989 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8990 | ;; | |
8991 | *.la) | |
8992 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8993 | ;; | |
8994 | *) | |
8995 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
8996 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
8997 | ;; | |
81ecdfbb RW |
8998 | esac |
8999 | done | |
9000 | fi | |
9001 | else | |
9002 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9003 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9004 | fi | |
9005 | fi | |
9006 | fi | |
9007 | done | |
9008 | done | |
9009 | if test "X$rpathdirs" != "X"; then | |
9010 | if test -n "$hardcode_libdir_separator"; then | |
9011 | alldirs= | |
9012 | for found_dir in $rpathdirs; do | |
9013 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9014 | done | |
9015 | acl_save_libdir="$libdir" | |
9016 | libdir="$alldirs" | |
9017 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9018 | libdir="$acl_save_libdir" | |
9019 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9020 | else | |
9021 | for found_dir in $rpathdirs; do | |
9022 | acl_save_libdir="$libdir" | |
9023 | libdir="$found_dir" | |
9024 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9025 | libdir="$acl_save_libdir" | |
9026 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9027 | done | |
9028 | fi | |
9029 | fi | |
9030 | if test "X$ltrpathdirs" != "X"; then | |
9031 | for found_dir in $ltrpathdirs; do | |
9032 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9033 | done | |
9034 | fi | |
a9322a30 TT |
9035 | |
9036 | ||
81ecdfbb | 9037 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9038 | |
81ecdfbb RW |
9039 | for element in $INCEXPAT; do |
9040 | haveit= | |
9041 | for x in $CPPFLAGS; do | |
a9322a30 | 9042 | |
81ecdfbb RW |
9043 | acl_save_prefix="$prefix" |
9044 | prefix="$acl_final_prefix" | |
9045 | acl_save_exec_prefix="$exec_prefix" | |
9046 | exec_prefix="$acl_final_exec_prefix" | |
9047 | eval x=\"$x\" | |
9048 | exec_prefix="$acl_save_exec_prefix" | |
9049 | prefix="$acl_save_prefix" | |
a8111142 | 9050 | |
81ecdfbb RW |
9051 | if test "X$x" = "X$element"; then |
9052 | haveit=yes | |
9053 | break | |
9054 | fi | |
9055 | done | |
9056 | if test -z "$haveit"; then | |
9057 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9058 | fi | |
9059 | done | |
a9322a30 TT |
9060 | |
9061 | ||
81ecdfbb RW |
9062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9063 | $as_echo_n "checking for libexpat... " >&6; } | |
9064 | if test "${ac_cv_libexpat+set}" = set; then : | |
9065 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9066 | else |
bec39cab | 9067 | |
81ecdfbb RW |
9068 | ac_save_LIBS="$LIBS" |
9069 | LIBS="$LIBS $LIBEXPAT" | |
9070 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9071 | /* end confdefs.h. */ |
81ecdfbb RW |
9072 | #include "expat.h" |
9073 | int | |
9074 | main () | |
9075 | { | |
9076 | XML_Parser p = XML_ParserCreate (0); | |
9077 | ; | |
9078 | return 0; | |
9079 | } | |
bec39cab | 9080 | _ACEOF |
81ecdfbb RW |
9081 | if ac_fn_c_try_link "$LINENO"; then : |
9082 | ac_cv_libexpat=yes | |
c906108c | 9083 | else |
81ecdfbb | 9084 | ac_cv_libexpat=no |
bec39cab | 9085 | fi |
81ecdfbb RW |
9086 | rm -f core conftest.err conftest.$ac_objext \ |
9087 | conftest$ac_exeext conftest.$ac_ext | |
9088 | LIBS="$ac_save_LIBS" | |
c906108c | 9089 | |
95ca63c4 | 9090 | fi |
81ecdfbb RW |
9091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9092 | $as_echo "$ac_cv_libexpat" >&6; } | |
9093 | if test "$ac_cv_libexpat" = yes; then | |
9094 | HAVE_LIBEXPAT=yes | |
bec39cab | 9095 | |
81ecdfbb | 9096 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9097 | |
81ecdfbb RW |
9098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9099 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9101 | $as_echo "$LIBEXPAT" >&6; } | |
9102 | else | |
9103 | HAVE_LIBEXPAT=no | |
9104 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9105 | LIBEXPAT= | |
9106 | LTLIBEXPAT= | |
9107 | fi | |
95ca63c4 CF |
9108 | |
9109 | ||
9110 | ||
7cb9022a MK |
9111 | |
9112 | ||
bec39cab | 9113 | |
81ecdfbb RW |
9114 | if test "$HAVE_LIBEXPAT" != yes; then |
9115 | if test "$with_expat" = yes; then | |
9116 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
9117 | else | |
9118 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9119 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
9120 | fi | |
9121 | else | |
9122 | save_LIBS=$LIBS | |
9123 | LIBS="$LIBS $LIBEXPAT" | |
9124 | for ac_func in XML_StopParser | |
9125 | do : | |
9126 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
9127 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 9128 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9129 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 9130 | _ACEOF |
95ca63c4 | 9131 | |
bec39cab | 9132 | fi |
bec39cab | 9133 | done |
95ca63c4 | 9134 | |
81ecdfbb RW |
9135 | LIBS=$save_LIBS |
9136 | fi | |
a9322a30 TT |
9137 | fi |
9138 | ||
a9322a30 | 9139 | |
a9322a30 TT |
9140 | |
9141 | ||
81ecdfbb RW |
9142 | # Check whether --with-python was given. |
9143 | if test "${with_python+set}" = set; then : | |
9144 | withval=$with_python; | |
bec39cab | 9145 | else |
81ecdfbb | 9146 | with_python=auto |
bec39cab | 9147 | fi |
bec39cab | 9148 | |
81ecdfbb RW |
9149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
9150 | $as_echo_n "checking whether to use python... " >&6; } | |
9151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
9152 | $as_echo "$with_python" >&6; } | |
9a156167 | 9153 | |
81ecdfbb RW |
9154 | if test "${with_python}" = no; then |
9155 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
9156 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
9157 | have_libpython=no | |
bec39cab | 9158 | else |
81ecdfbb RW |
9159 | case "${with_python}" in |
9160 | yes | auto) | |
9161 | # Leave as empty, use defaults. | |
9162 | python_includes= | |
9163 | python_libs= | |
9164 | ;; | |
9165 | /*) | |
9166 | python_includes="-I${with_python}/include" | |
9167 | python_libs="-L${with_python}/lib" | |
9168 | ;; | |
9169 | *) | |
9170 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
9171 | ;; | |
9172 | esac | |
9173 | ||
9174 | save_CPPFLAGS=$CPPFLAGS | |
9175 | CPPFLAGS="$CPPFLAGS ${python_includes}" | |
9176 | save_LIBS=$LIBS | |
9177 | LIBS="$LIBS ${python_libs}" | |
9178 | have_libpython=no | |
9179 | if test "${have_libpython}" = no; then | |
bec39cab | 9180 | |
81ecdfbb | 9181 | version=python2.6 |
bec39cab | 9182 | |
81ecdfbb RW |
9183 | |
9184 | HAVE_LIBPYTHON2_6=no | |
9185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
9186 | $as_echo_n "checking for ${version}... " >&6; } | |
9187 | save_LIBS=$LIBS | |
9188 | LIBS="$LIBS -l${version}" | |
9189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9190 | /* end confdefs.h. */ |
81ecdfbb RW |
9191 | #include "${version}/Python.h" |
9192 | int | |
9193 | main () | |
9194 | { | |
9195 | Py_Initialize (); | |
9196 | ; | |
9197 | return 0; | |
9198 | } | |
bec39cab | 9199 | _ACEOF |
81ecdfbb RW |
9200 | if ac_fn_c_try_link "$LINENO"; then : |
9201 | HAVE_LIBPYTHON2_6=yes | |
9202 | have_libpython=yes | |
bec39cab | 9203 | else |
81ecdfbb | 9204 | LIBS=$save_LIBS |
9a156167 | 9205 | fi |
81ecdfbb RW |
9206 | rm -f core conftest.err conftest.$ac_objext \ |
9207 | conftest$ac_exeext conftest.$ac_ext | |
9208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_6" >&5 | |
9209 | $as_echo "$HAVE_LIBPYTHON2_6" >&6; } | |
9a156167 | 9210 | |
81ecdfbb | 9211 | if test "${HAVE_LIBPYTHON2_6}" = yes; then |
9a156167 | 9212 | |
81ecdfbb | 9213 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h |
9a156167 | 9214 | |
81ecdfbb RW |
9215 | fi |
9216 | fi | |
9217 | if test ${have_libpython} = no; then | |
9a156167 | 9218 | |
81ecdfbb | 9219 | version=python2.5 |
9a156167 | 9220 | |
9a156167 | 9221 | |
81ecdfbb RW |
9222 | HAVE_LIBPYTHON2_5=no |
9223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
9224 | $as_echo_n "checking for ${version}... " >&6; } | |
9225 | save_LIBS=$LIBS | |
9226 | LIBS="$LIBS -l${version}" | |
9227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
436868fb | 9228 | /* end confdefs.h. */ |
81ecdfbb RW |
9229 | #include "${version}/Python.h" |
9230 | int | |
9231 | main () | |
9232 | { | |
9233 | Py_Initialize (); | |
9234 | ; | |
9235 | return 0; | |
9236 | } | |
436868fb | 9237 | _ACEOF |
81ecdfbb RW |
9238 | if ac_fn_c_try_link "$LINENO"; then : |
9239 | HAVE_LIBPYTHON2_5=yes | |
9240 | have_libpython=yes | |
436868fb | 9241 | else |
81ecdfbb | 9242 | LIBS=$save_LIBS |
436868fb | 9243 | fi |
81ecdfbb RW |
9244 | rm -f core conftest.err conftest.$ac_objext \ |
9245 | conftest$ac_exeext conftest.$ac_ext | |
9246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_5" >&5 | |
9247 | $as_echo "$HAVE_LIBPYTHON2_5" >&6; } | |
436868fb | 9248 | |
81ecdfbb | 9249 | if test "${HAVE_LIBPYTHON2_5}" = yes; then |
a9322a30 | 9250 | |
81ecdfbb | 9251 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h |
a9322a30 | 9252 | |
81ecdfbb RW |
9253 | fi |
9254 | fi | |
9255 | if test ${have_libpython} = no; then | |
a9322a30 | 9256 | |
81ecdfbb | 9257 | version=python2.4 |
a9322a30 | 9258 | |
81ecdfbb RW |
9259 | |
9260 | HAVE_LIBPYTHON2_4=no | |
9261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
9262 | $as_echo_n "checking for ${version}... " >&6; } | |
9263 | save_LIBS=$LIBS | |
9264 | LIBS="$LIBS -l${version}" | |
9265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
436868fb | 9266 | /* end confdefs.h. */ |
81ecdfbb | 9267 | #include "${version}/Python.h" |
a9322a30 TT |
9268 | int |
9269 | main () | |
9270 | { | |
81ecdfbb | 9271 | Py_Initialize (); |
a9322a30 TT |
9272 | ; |
9273 | return 0; | |
9274 | } | |
436868fb | 9275 | _ACEOF |
81ecdfbb RW |
9276 | if ac_fn_c_try_link "$LINENO"; then : |
9277 | HAVE_LIBPYTHON2_4=yes | |
9278 | have_libpython=yes | |
436868fb | 9279 | else |
81ecdfbb | 9280 | LIBS=$save_LIBS |
436868fb | 9281 | fi |
81ecdfbb RW |
9282 | rm -f core conftest.err conftest.$ac_objext \ |
9283 | conftest$ac_exeext conftest.$ac_ext | |
9284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPYTHON2_4" >&5 | |
9285 | $as_echo "$HAVE_LIBPYTHON2_4" >&6; } | |
9286 | ||
9287 | if test "${HAVE_LIBPYTHON2_4}" = yes; then | |
9288 | ||
9289 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
9290 | ||
9291 | fi | |
9292 | fi | |
9293 | if test ${have_libpython} = no; then | |
9294 | case "${with_python}" in | |
9295 | yes) | |
9296 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
9297 | ;; | |
9298 | auto) | |
9299 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
9300 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
9301 | ;; | |
9302 | *) | |
9303 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
9304 | ;; | |
9305 | esac | |
9306 | CPPFLAGS=$save_CPPFLAGS | |
9307 | LIBS=$save_LIBS | |
9308 | fi | |
436868fb | 9309 | fi |
436868fb | 9310 | |
81ecdfbb | 9311 | if test "${have_libpython}" = yes; then |
436868fb | 9312 | |
81ecdfbb | 9313 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 9314 | |
81ecdfbb RW |
9315 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
9316 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
9317 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
9318 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" | |
436868fb | 9319 | |
81ecdfbb RW |
9320 | # Flags needed to compile Python code (taken from python-config --cflags). |
9321 | # We cannot call python-config directly because it will output whatever was | |
9322 | # used when compiling the Python interpreter itself, including flags which | |
9323 | # would make the python-related objects be compiled differently from the | |
9324 | # rest of GDB (e.g., -O2 and -fPIC). | |
9325 | if test "${GCC}" = yes; then | |
9326 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
9327 | fi | |
436868fb | 9328 | |
81ecdfbb RW |
9329 | if test "x${tentative_python_cflags}" != x; then |
9330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
9331 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
9332 | for flag in ${tentative_python_cflags}; do | |
9333 | # Check that the compiler accepts it | |
9334 | saved_CFLAGS="$CFLAGS" | |
9335 | CFLAGS="$CFLAGS $flag" | |
9336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9337 | /* end confdefs.h. */ |
81ecdfbb | 9338 | |
a9322a30 TT |
9339 | int |
9340 | main () | |
9341 | { | |
a9322a30 TT |
9342 | |
9343 | ; | |
9344 | return 0; | |
9345 | } | |
bec39cab | 9346 | _ACEOF |
81ecdfbb RW |
9347 | if ac_fn_c_try_compile "$LINENO"; then : |
9348 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 9349 | fi |
81ecdfbb RW |
9350 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9351 | CFLAGS="$saved_CFLAGS" | |
9352 | done | |
9353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
9354 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
9355 | fi | |
9356 | else | |
9357 | # Even if Python support is not compiled in, we need to have these files | |
9358 | # included in order to recognize the GDB command "python". | |
2c9e3c69 JB |
9359 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o" |
9360 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c python/py-prettyprint.c" | |
a9322a30 | 9361 | fi |
9a156167 | 9362 | |
9a156167 | 9363 | |
81ecdfbb RW |
9364 | # ------------------------- # |
9365 | # Checks for header files. # | |
9366 | # ------------------------- # | |
c890192f | 9367 | |
81ecdfbb RW |
9368 | ac_header_dirent=no |
9369 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
9370 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
9371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
9372 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
9373 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9374 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9375 | else |
81ecdfbb | 9376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9377 | /* end confdefs.h. */ |
81ecdfbb RW |
9378 | #include <sys/types.h> |
9379 | #include <$ac_hdr> | |
9380 | ||
a9322a30 TT |
9381 | int |
9382 | main () | |
9383 | { | |
81ecdfbb RW |
9384 | if ((DIR *) 0) |
9385 | return 0; | |
a9322a30 TT |
9386 | ; |
9387 | return 0; | |
9388 | } | |
bec39cab | 9389 | _ACEOF |
81ecdfbb RW |
9390 | if ac_fn_c_try_compile "$LINENO"; then : |
9391 | eval "$as_ac_Header=yes" | |
bec39cab | 9392 | else |
81ecdfbb | 9393 | eval "$as_ac_Header=no" |
bec39cab | 9394 | fi |
81ecdfbb | 9395 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9396 | fi |
81ecdfbb RW |
9397 | eval ac_res=\$$as_ac_Header |
9398 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
9399 | $as_echo "$ac_res" >&6; } | |
9400 | eval as_val=\$$as_ac_Header | |
9401 | if test "x$as_val" = x""yes; then : | |
9402 | cat >>confdefs.h <<_ACEOF | |
9403 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 9404 | _ACEOF |
bec39cab | 9405 | |
81ecdfbb RW |
9406 | ac_header_dirent=$ac_hdr; break |
9407 | fi | |
bec39cab | 9408 | |
81ecdfbb RW |
9409 | done |
9410 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
9411 | if test $ac_header_dirent = dirent.h; then | |
9412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
9413 | $as_echo_n "checking for library containing opendir... " >&6; } | |
9414 | if test "${ac_cv_search_opendir+set}" = set; then : | |
9415 | $as_echo_n "(cached) " >&6 | |
c890192f | 9416 | else |
81ecdfbb RW |
9417 | ac_func_search_save_LIBS=$LIBS |
9418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9419 | /* end confdefs.h. */ | |
9420 | ||
9421 | /* Override any GCC internal prototype to avoid an error. | |
9422 | Use char because int might match the return type of a GCC | |
9423 | builtin and then its argument prototype would still apply. */ | |
9424 | #ifdef __cplusplus | |
9425 | extern "C" | |
9426 | #endif | |
9427 | char opendir (); | |
9428 | int | |
9429 | main () | |
9430 | { | |
9431 | return opendir (); | |
9432 | ; | |
9433 | return 0; | |
9434 | } | |
bec39cab | 9435 | _ACEOF |
81ecdfbb RW |
9436 | for ac_lib in '' dir; do |
9437 | if test -z "$ac_lib"; then | |
9438 | ac_res="none required" | |
9439 | else | |
9440 | ac_res=-l$ac_lib | |
9441 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9442 | fi | |
9443 | if ac_fn_c_try_link "$LINENO"; then : | |
9444 | ac_cv_search_opendir=$ac_res | |
9445 | fi | |
9446 | rm -f core conftest.err conftest.$ac_objext \ | |
9447 | conftest$ac_exeext | |
9448 | if test "${ac_cv_search_opendir+set}" = set; then : | |
9449 | break | |
9450 | fi | |
9451 | done | |
9452 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 9453 | |
81ecdfbb RW |
9454 | else |
9455 | ac_cv_search_opendir=no | |
9456 | fi | |
9457 | rm conftest.$ac_ext | |
9458 | LIBS=$ac_func_search_save_LIBS | |
9459 | fi | |
9460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
9461 | $as_echo "$ac_cv_search_opendir" >&6; } | |
9462 | ac_res=$ac_cv_search_opendir | |
9463 | if test "$ac_res" != no; then : | |
9464 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 9465 | |
bec39cab | 9466 | fi |
81ecdfbb | 9467 | |
bec39cab | 9468 | else |
81ecdfbb RW |
9469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
9470 | $as_echo_n "checking for library containing opendir... " >&6; } | |
9471 | if test "${ac_cv_search_opendir+set}" = set; then : | |
9472 | $as_echo_n "(cached) " >&6 | |
9473 | else | |
9474 | ac_func_search_save_LIBS=$LIBS | |
9475 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9476 | /* end confdefs.h. */ |
81ecdfbb RW |
9477 | |
9478 | /* Override any GCC internal prototype to avoid an error. | |
9479 | Use char because int might match the return type of a GCC | |
9480 | builtin and then its argument prototype would still apply. */ | |
9481 | #ifdef __cplusplus | |
9482 | extern "C" | |
9483 | #endif | |
9484 | char opendir (); | |
a9322a30 TT |
9485 | int |
9486 | main () | |
9487 | { | |
81ecdfbb | 9488 | return opendir (); |
a9322a30 TT |
9489 | ; |
9490 | return 0; | |
9491 | } | |
bec39cab | 9492 | _ACEOF |
81ecdfbb RW |
9493 | for ac_lib in '' x; do |
9494 | if test -z "$ac_lib"; then | |
9495 | ac_res="none required" | |
9496 | else | |
9497 | ac_res=-l$ac_lib | |
9498 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9499 | fi | |
9500 | if ac_fn_c_try_link "$LINENO"; then : | |
9501 | ac_cv_search_opendir=$ac_res | |
9502 | fi | |
9503 | rm -f core conftest.err conftest.$ac_objext \ | |
9504 | conftest$ac_exeext | |
9505 | if test "${ac_cv_search_opendir+set}" = set; then : | |
9506 | break | |
9507 | fi | |
9508 | done | |
9509 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 9510 | |
81ecdfbb RW |
9511 | else |
9512 | ac_cv_search_opendir=no | |
bec39cab | 9513 | fi |
81ecdfbb RW |
9514 | rm conftest.$ac_ext |
9515 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 9516 | fi |
81ecdfbb RW |
9517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
9518 | $as_echo "$ac_cv_search_opendir" >&6; } | |
9519 | ac_res=$ac_cv_search_opendir | |
9520 | if test "$ac_res" != no; then : | |
9521 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 9522 | |
81ecdfbb | 9523 | fi |
bec39cab | 9524 | |
81ecdfbb | 9525 | fi |
bec39cab | 9526 | |
81ecdfbb RW |
9527 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
9528 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
9529 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
9530 | $as_echo_n "(cached) " >&6 | |
9a156167 | 9531 | else |
81ecdfbb RW |
9532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9533 | /* end confdefs.h. */ | |
9534 | #include <sys/types.h> | |
9535 | #include <sys/stat.h> | |
9536 | ||
9537 | #if defined S_ISBLK && defined S_IFDIR | |
9538 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
9539 | #endif | |
9540 | ||
9541 | #if defined S_ISBLK && defined S_IFCHR | |
9542 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
9543 | #endif | |
9544 | ||
9545 | #if defined S_ISLNK && defined S_IFREG | |
9546 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
9547 | #endif | |
9548 | ||
9549 | #if defined S_ISSOCK && defined S_IFREG | |
9550 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
9551 | #endif | |
9552 | ||
bec39cab | 9553 | _ACEOF |
81ecdfbb RW |
9554 | if ac_fn_c_try_compile "$LINENO"; then : |
9555 | ac_cv_header_stat_broken=no | |
9556 | else | |
9557 | ac_cv_header_stat_broken=yes | |
9558 | fi | |
9559 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9560 | fi | |
9561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
9562 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
9563 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 9564 | |
81ecdfbb | 9565 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 9566 | |
bec39cab | 9567 | fi |
81ecdfbb RW |
9568 | |
9569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
9570 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
9571 | if test "${ac_cv_header_stdc+set}" = set; then : | |
9572 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9573 | else |
81ecdfbb | 9574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9575 | /* end confdefs.h. */ |
81ecdfbb RW |
9576 | #include <stdlib.h> |
9577 | #include <stdarg.h> | |
9578 | #include <string.h> | |
9579 | #include <float.h> | |
9580 | ||
a9322a30 TT |
9581 | int |
9582 | main () | |
9583 | { | |
a9322a30 TT |
9584 | |
9585 | ; | |
9586 | return 0; | |
9587 | } | |
bec39cab | 9588 | _ACEOF |
81ecdfbb RW |
9589 | if ac_fn_c_try_compile "$LINENO"; then : |
9590 | ac_cv_header_stdc=yes | |
bec39cab | 9591 | else |
81ecdfbb | 9592 | ac_cv_header_stdc=no |
a9322a30 | 9593 | fi |
81ecdfbb | 9594 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9595 | |
81ecdfbb RW |
9596 | if test $ac_cv_header_stdc = yes; then |
9597 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
9598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9599 | /* end confdefs.h. */ | |
9600 | #include <string.h> | |
bec39cab | 9601 | |
81ecdfbb RW |
9602 | _ACEOF |
9603 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9604 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 9605 | |
bec39cab | 9606 | else |
81ecdfbb RW |
9607 | ac_cv_header_stdc=no |
9608 | fi | |
9609 | rm -f conftest* | |
9610 | ||
9611 | fi | |
9612 | ||
9613 | if test $ac_cv_header_stdc = yes; then | |
9614 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
9615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9616 | /* end confdefs.h. */ | |
9617 | #include <stdlib.h> | |
9618 | ||
bec39cab | 9619 | _ACEOF |
81ecdfbb RW |
9620 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
9621 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 9622 | |
81ecdfbb RW |
9623 | else |
9624 | ac_cv_header_stdc=no | |
9625 | fi | |
9626 | rm -f conftest* | |
bec39cab | 9627 | |
bec39cab | 9628 | fi |
81ecdfbb RW |
9629 | |
9630 | if test $ac_cv_header_stdc = yes; then | |
9631 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
9632 | if test "$cross_compiling" = yes; then : | |
9633 | : | |
bec39cab | 9634 | else |
81ecdfbb | 9635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9636 | /* end confdefs.h. */ |
81ecdfbb RW |
9637 | #include <ctype.h> |
9638 | #include <stdlib.h> | |
9639 | #if ((' ' & 0x0FF) == 0x020) | |
9640 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
9641 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
9642 | #else | |
9643 | # define ISLOWER(c) \ | |
9644 | (('a' <= (c) && (c) <= 'i') \ | |
9645 | || ('j' <= (c) && (c) <= 'r') \ | |
9646 | || ('s' <= (c) && (c) <= 'z')) | |
9647 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
9648 | #endif | |
9649 | ||
9650 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
9651 | int |
9652 | main () | |
9653 | { | |
81ecdfbb RW |
9654 | int i; |
9655 | for (i = 0; i < 256; i++) | |
9656 | if (XOR (islower (i), ISLOWER (i)) | |
9657 | || toupper (i) != TOUPPER (i)) | |
9658 | return 2; | |
a9322a30 TT |
9659 | return 0; |
9660 | } | |
bec39cab | 9661 | _ACEOF |
81ecdfbb RW |
9662 | if ac_fn_c_try_run "$LINENO"; then : |
9663 | ||
bec39cab | 9664 | else |
81ecdfbb RW |
9665 | ac_cv_header_stdc=no |
9666 | fi | |
9667 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9668 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9669 | fi | |
bec39cab | 9670 | |
bec39cab | 9671 | fi |
a9322a30 | 9672 | fi |
81ecdfbb RW |
9673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
9674 | $as_echo "$ac_cv_header_stdc" >&6; } | |
9675 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 9676 | |
81ecdfbb | 9677 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 9678 | |
81ecdfbb | 9679 | fi |
bec39cab | 9680 | |
81ecdfbb RW |
9681 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9682 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
9683 | # unconditionally, so what's the point in checking these? | |
9684 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
9685 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
9686 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
9687 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
9688 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
9689 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
9690 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
9691 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h | |
9692 | do : | |
9693 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9694 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9695 | eval as_val=\$$as_ac_Header | |
9696 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9697 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9698 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9699 | _ACEOF |
c906108c | 9700 | |
bec39cab | 9701 | fi |
81ecdfbb RW |
9702 | |
9703 | done | |
9704 | ||
9705 | for ac_header in link.h | |
9706 | do : | |
9707 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
9708 | # include <sys/types.h> | |
9709 | #endif | |
9710 | #if HAVE_NLIST_H | |
9711 | # include <nlist.h> | |
a9322a30 TT |
9712 | #endif |
9713 | ||
81ecdfbb RW |
9714 | " |
9715 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
9716 | cat >>confdefs.h <<_ACEOF | |
9717 | #define HAVE_LINK_H 1 | |
bec39cab | 9718 | _ACEOF |
bec39cab | 9719 | |
a9322a30 | 9720 | fi |
bec39cab | 9721 | |
81ecdfbb | 9722 | done |
c906108c | 9723 | |
81ecdfbb RW |
9724 | for ac_header in sys/proc.h |
9725 | do : | |
9726 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
9727 | # include <sys/param.h> | |
9728 | #endif | |
c906108c | 9729 | |
81ecdfbb RW |
9730 | " |
9731 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 9732 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9733 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 9734 | _ACEOF |
5ee754fc | 9735 | |
bec39cab | 9736 | fi |
81ecdfbb RW |
9737 | |
9738 | done | |
9739 | ||
9740 | for ac_header in sys/user.h | |
9741 | do : | |
9742 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
9743 | # include <sys/param.h> | |
a9322a30 TT |
9744 | #endif |
9745 | ||
81ecdfbb RW |
9746 | " |
9747 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
9748 | cat >>confdefs.h <<_ACEOF | |
9749 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 9750 | _ACEOF |
bec39cab | 9751 | |
a9322a30 | 9752 | fi |
bec39cab | 9753 | |
81ecdfbb | 9754 | done |
5ee754fc | 9755 | |
5ee754fc | 9756 | |
81ecdfbb RW |
9757 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
9758 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
9759 | # think that we don't have <curses.h> if we're using GCC. | |
9760 | case $host_os in | |
9761 | solaris2.[789]) | |
9762 | if test "$GCC" = yes; then | |
9763 | ||
9764 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
9765 | ||
9766 | fi ;; | |
9767 | esac | |
9768 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
9769 | do : | |
9770 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9771 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9772 | eval as_val=\$$as_ac_Header | |
9773 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9774 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9775 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9776 | _ACEOF |
5ee754fc MK |
9777 | |
9778 | fi | |
9779 | ||
81ecdfbb | 9780 | done |
bec39cab | 9781 | |
81ecdfbb RW |
9782 | for ac_header in term.h |
9783 | do : | |
9784 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
9785 | # include <curses.h> | |
9786 | #endif | |
bec39cab | 9787 | |
81ecdfbb RW |
9788 | " |
9789 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
9790 | cat >>confdefs.h <<_ACEOF | |
9791 | #define HAVE_TERM_H 1 | |
a8111142 | 9792 | _ACEOF |
a8111142 | 9793 | |
a8111142 | 9794 | fi |
a8111142 | 9795 | |
81ecdfbb | 9796 | done |
a8111142 TT |
9797 | |
9798 | ||
81ecdfbb RW |
9799 | # ------------------------- # |
9800 | # Checks for declarations. # | |
9801 | # ------------------------- # | |
a9322a30 | 9802 | |
81ecdfbb RW |
9803 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
9804 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
9805 | ac_have_decl=1 | |
bec39cab | 9806 | else |
81ecdfbb RW |
9807 | ac_have_decl=0 |
9808 | fi | |
9809 | ||
9810 | cat >>confdefs.h <<_ACEOF | |
9811 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 9812 | _ACEOF |
81ecdfbb RW |
9813 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
9814 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
9815 | ac_have_decl=1 | |
9816 | else | |
9817 | ac_have_decl=0 | |
9818 | fi | |
9819 | ||
9820 | cat >>confdefs.h <<_ACEOF | |
9821 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 9822 | _ACEOF |
81ecdfbb RW |
9823 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
9824 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
9825 | ac_have_decl=1 | |
bec39cab | 9826 | else |
81ecdfbb RW |
9827 | ac_have_decl=0 |
9828 | fi | |
bec39cab | 9829 | |
81ecdfbb RW |
9830 | cat >>confdefs.h <<_ACEOF |
9831 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 9832 | _ACEOF |
81ecdfbb RW |
9833 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
9834 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
9835 | ac_have_decl=1 | |
9836 | else | |
9837 | ac_have_decl=0 | |
9838 | fi | |
9839 | ||
9840 | cat >>confdefs.h <<_ACEOF | |
9841 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 9842 | _ACEOF |
81ecdfbb RW |
9843 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
9844 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
9845 | ac_have_decl=1 | |
bec39cab | 9846 | else |
81ecdfbb RW |
9847 | ac_have_decl=0 |
9848 | fi | |
5ee754fc | 9849 | |
81ecdfbb RW |
9850 | cat >>confdefs.h <<_ACEOF |
9851 | #define HAVE_DECL_STRSTR $ac_have_decl | |
9852 | _ACEOF | |
9853 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
9854 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
9855 | ac_have_decl=1 | |
9856 | else | |
9857 | ac_have_decl=0 | |
5ee754fc | 9858 | fi |
81ecdfbb RW |
9859 | |
9860 | cat >>confdefs.h <<_ACEOF | |
9861 | #define HAVE_DECL_GETOPT $ac_have_decl | |
9862 | _ACEOF | |
9863 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
9864 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
9865 | ac_have_decl=1 | |
9866 | else | |
9867 | ac_have_decl=0 | |
5ee754fc | 9868 | fi |
81ecdfbb RW |
9869 | |
9870 | cat >>confdefs.h <<_ACEOF | |
9871 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
9872 | _ACEOF | |
9873 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
9874 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
9875 | ac_have_decl=1 | |
9876 | else | |
9877 | ac_have_decl=0 | |
5ee754fc MK |
9878 | fi |
9879 | ||
a9322a30 | 9880 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9881 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 9882 | _ACEOF |
5ee754fc | 9883 | |
5ee754fc | 9884 | |
81ecdfbb RW |
9885 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9886 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9887 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9888 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9889 | else |
81ecdfbb | 9890 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9891 | /* end confdefs.h. */ |
81ecdfbb | 9892 | #include <locale.h> |
a9322a30 TT |
9893 | int |
9894 | main () | |
9895 | { | |
81ecdfbb | 9896 | return LC_MESSAGES |
a9322a30 TT |
9897 | ; |
9898 | return 0; | |
9899 | } | |
bec39cab | 9900 | _ACEOF |
81ecdfbb RW |
9901 | if ac_fn_c_try_link "$LINENO"; then : |
9902 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9903 | else |
81ecdfbb RW |
9904 | am_cv_val_LC_MESSAGES=no |
9905 | fi | |
9906 | rm -f core conftest.err conftest.$ac_objext \ | |
9907 | conftest$ac_exeext conftest.$ac_ext | |
9908 | fi | |
9909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9910 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9911 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9912 | |
81ecdfbb RW |
9913 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9914 | ||
9915 | fi | |
9916 | ||
9917 | ||
9918 | # ----------------------- # | |
9919 | # Checks for structures. # | |
9920 | # ----------------------- # | |
9921 | ||
9922 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9923 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9924 | ||
9925 | cat >>confdefs.h <<_ACEOF | |
9926 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9927 | _ACEOF |
7eb368b3 | 9928 | |
81ecdfbb | 9929 | |
7eb368b3 | 9930 | fi |
81ecdfbb RW |
9931 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9932 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9933 | |
a9322a30 TT |
9934 | cat >>confdefs.h <<_ACEOF |
9935 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9936 | _ACEOF |
9937 | ||
a9322a30 | 9938 | |
7eb368b3 NR |
9939 | fi |
9940 | ||
7eb368b3 | 9941 | |
a9322a30 TT |
9942 | # ------------------ # |
9943 | # Checks for types. # | |
9944 | # ------------------ # | |
7eb368b3 | 9945 | |
81ecdfbb RW |
9946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9947 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9948 | if test "${ac_cv_type_signal+set}" = set; then : | |
9949 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9950 | else |
81ecdfbb | 9951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9952 | /* end confdefs.h. */ |
a9322a30 TT |
9953 | #include <sys/types.h> |
9954 | #include <signal.h> | |
7cb9022a | 9955 | |
a9322a30 TT |
9956 | int |
9957 | main () | |
9958 | { | |
81ecdfbb | 9959 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9960 | ; |
9961 | return 0; | |
9962 | } | |
bec39cab | 9963 | _ACEOF |
81ecdfbb RW |
9964 | if ac_fn_c_try_compile "$LINENO"; then : |
9965 | ac_cv_type_signal=int | |
bec39cab | 9966 | else |
81ecdfbb | 9967 | ac_cv_type_signal=void |
bec39cab | 9968 | fi |
81ecdfbb | 9969 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9970 | fi |
81ecdfbb RW |
9971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9972 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9973 | |
a9322a30 TT |
9974 | cat >>confdefs.h <<_ACEOF |
9975 | #define RETSIGTYPE $ac_cv_type_signal | |
9976 | _ACEOF | |
5ee754fc | 9977 | |
bec39cab | 9978 | |
81ecdfbb | 9979 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9980 | #include <sys/socket.h> |
9981 | ||
81ecdfbb RW |
9982 | " |
9983 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9984 | |
a9322a30 TT |
9985 | cat >>confdefs.h <<_ACEOF |
9986 | #define HAVE_SOCKLEN_T 1 | |
9987 | _ACEOF | |
9988 | ||
9989 | ||
9990 | fi | |
9991 | ||
9992 | ||
9993 | # ------------------------------------- # | |
9994 | # Checks for compiler characteristics. # | |
9995 | # ------------------------------------- # | |
9996 | ||
81ecdfbb RW |
9997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9998 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9999 | if test "${ac_cv_c_const+set}" = set; then : | |
10000 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10001 | else |
81ecdfbb | 10002 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10003 | /* end confdefs.h. */ |
a9322a30 TT |
10004 | |
10005 | int | |
10006 | main () | |
10007 | { | |
10008 | /* FIXME: Include the comments suggested by Paul. */ | |
10009 | #ifndef __cplusplus | |
10010 | /* Ultrix mips cc rejects this. */ | |
10011 | typedef int charset[2]; | |
81ecdfbb | 10012 | const charset cs; |
a9322a30 | 10013 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
10014 | char const *const *pcpcc; |
10015 | char **ppc; | |
a9322a30 TT |
10016 | /* NEC SVR4.0.2 mips cc rejects this. */ |
10017 | struct point {int x, y;}; | |
10018 | static struct point const zero = {0,0}; | |
10019 | /* AIX XL C 1.02.0.0 rejects this. | |
10020 | It does not let you subtract one const X* pointer from another in | |
10021 | an arm of an if-expression whose if-part is not a constant | |
10022 | expression */ | |
10023 | const char *g = "string"; | |
81ecdfbb | 10024 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 10025 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
10026 | ++pcpcc; |
10027 | ppc = (char**) pcpcc; | |
10028 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
10029 | { /* SCO 3.2v4 cc rejects this. */ |
10030 | char *t; | |
10031 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
10032 | ||
10033 | *t++ = 0; | |
81ecdfbb | 10034 | if (s) return 0; |
a9322a30 TT |
10035 | } |
10036 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
10037 | int x[] = {25, 17}; | |
10038 | const int *foo = &x[0]; | |
10039 | ++foo; | |
10040 | } | |
10041 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
10042 | typedef const int *iptr; | |
10043 | iptr p = 0; | |
10044 | ++p; | |
10045 | } | |
10046 | { /* AIX XL C 1.02.0.0 rejects this saying | |
10047 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
10048 | struct s { int j; const int *ap[3]; }; | |
10049 | struct s *b; b->j = 5; | |
10050 | } | |
10051 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
10052 | const int foo = 10; | |
81ecdfbb | 10053 | if (!foo) return 0; |
a9322a30 | 10054 | } |
81ecdfbb | 10055 | return !cs[0] && !zero.x; |
a9322a30 TT |
10056 | #endif |
10057 | ||
10058 | ; | |
10059 | return 0; | |
10060 | } | |
bec39cab | 10061 | _ACEOF |
81ecdfbb | 10062 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10063 | ac_cv_c_const=yes |
5ee754fc | 10064 | else |
81ecdfbb | 10065 | ac_cv_c_const=no |
5ee754fc | 10066 | fi |
81ecdfbb | 10067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 10068 | fi |
81ecdfbb RW |
10069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
10070 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 10071 | if test $ac_cv_c_const = no; then |
bec39cab | 10072 | |
81ecdfbb | 10073 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 10074 | |
5ee754fc | 10075 | fi |
bec39cab | 10076 | |
81ecdfbb RW |
10077 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
10078 | $as_echo_n "checking for inline... " >&6; } | |
10079 | if test "${ac_cv_c_inline+set}" = set; then : | |
10080 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10081 | else |
a9322a30 TT |
10082 | ac_cv_c_inline=no |
10083 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 10084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10085 | /* end confdefs.h. */ |
a9322a30 TT |
10086 | #ifndef __cplusplus |
10087 | typedef int foo_t; | |
10088 | static $ac_kw foo_t static_foo () {return 0; } | |
10089 | $ac_kw foo_t foo () {return 0; } | |
10090 | #endif | |
10091 | ||
bec39cab | 10092 | _ACEOF |
81ecdfbb RW |
10093 | if ac_fn_c_try_compile "$LINENO"; then : |
10094 | ac_cv_c_inline=$ac_kw | |
bec39cab | 10095 | fi |
81ecdfbb RW |
10096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10097 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 10098 | done |
bec39cab | 10099 | |
5ee754fc | 10100 | fi |
81ecdfbb RW |
10101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
10102 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 10103 | |
a9322a30 TT |
10104 | case $ac_cv_c_inline in |
10105 | inline | yes) ;; | |
10106 | *) | |
10107 | case $ac_cv_c_inline in | |
10108 | no) ac_val=;; | |
10109 | *) ac_val=$ac_cv_c_inline;; | |
10110 | esac | |
10111 | cat >>confdefs.h <<_ACEOF | |
10112 | #ifndef __cplusplus | |
10113 | #define inline $ac_val | |
10114 | #endif | |
10115 | _ACEOF | |
bec39cab AC |
10116 | ;; |
10117 | esac | |
bec39cab | 10118 | |
81ecdfbb RW |
10119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
10120 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
10121 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
10122 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10123 | else |
81ecdfbb RW |
10124 | ac_cv_c_bigendian=unknown |
10125 | # See if we're dealing with a universal compiler. | |
10126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10127 | /* end confdefs.h. */ | |
10128 | #ifndef __APPLE_CC__ | |
10129 | not a universal capable compiler | |
10130 | #endif | |
10131 | typedef int dummy; | |
10132 | ||
10133 | _ACEOF | |
10134 | if ac_fn_c_try_compile "$LINENO"; then : | |
10135 | ||
10136 | # Check for potential -arch flags. It is not universal unless | |
10137 | # there are at least two -arch flags with different values. | |
10138 | ac_arch= | |
10139 | ac_prev= | |
10140 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
10141 | if test -n "$ac_prev"; then | |
10142 | case $ac_word in | |
10143 | i?86 | x86_64 | ppc | ppc64) | |
10144 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
10145 | ac_arch=$ac_word | |
10146 | else | |
10147 | ac_cv_c_bigendian=universal | |
10148 | break | |
10149 | fi | |
10150 | ;; | |
10151 | esac | |
10152 | ac_prev= | |
10153 | elif test "x$ac_word" = "x-arch"; then | |
10154 | ac_prev=arch | |
10155 | fi | |
10156 | done | |
10157 | fi | |
10158 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10159 | if test $ac_cv_c_bigendian = unknown; then | |
10160 | # See if sys/param.h defines the BYTE_ORDER macro. | |
10161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10162 | /* end confdefs.h. */ |
a9322a30 | 10163 | #include <sys/types.h> |
81ecdfbb | 10164 | #include <sys/param.h> |
a9322a30 TT |
10165 | |
10166 | int | |
10167 | main () | |
10168 | { | |
81ecdfbb RW |
10169 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
10170 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
10171 | && LITTLE_ENDIAN) | |
10172 | bogus endian macros | |
10173 | #endif | |
a9322a30 TT |
10174 | |
10175 | ; | |
10176 | return 0; | |
10177 | } | |
bec39cab | 10178 | _ACEOF |
81ecdfbb | 10179 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10180 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 10181 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10182 | /* end confdefs.h. */ |
a9322a30 | 10183 | #include <sys/types.h> |
81ecdfbb | 10184 | #include <sys/param.h> |
a9322a30 TT |
10185 | |
10186 | int | |
10187 | main () | |
10188 | { | |
10189 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
10190 | not big endian |
10191 | #endif | |
a9322a30 TT |
10192 | |
10193 | ; | |
10194 | return 0; | |
10195 | } | |
bec39cab | 10196 | _ACEOF |
81ecdfbb | 10197 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10198 | ac_cv_c_bigendian=yes |
5ee754fc | 10199 | else |
81ecdfbb | 10200 | ac_cv_c_bigendian=no |
5ee754fc | 10201 | fi |
81ecdfbb RW |
10202 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10203 | fi | |
10204 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10205 | fi | |
10206 | if test $ac_cv_c_bigendian = unknown; then | |
10207 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
10208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10209 | /* end confdefs.h. */ | |
10210 | #include <limits.h> | |
bec39cab | 10211 | |
81ecdfbb RW |
10212 | int |
10213 | main () | |
10214 | { | |
10215 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
10216 | bogus endian macros | |
10217 | #endif | |
10218 | ||
10219 | ; | |
10220 | return 0; | |
10221 | } | |
7eb368b3 | 10222 | _ACEOF |
81ecdfbb RW |
10223 | if ac_fn_c_try_compile "$LINENO"; then : |
10224 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
10225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 10226 | /* end confdefs.h. */ |
81ecdfbb RW |
10227 | #include <limits.h> |
10228 | ||
7eb368b3 NR |
10229 | int |
10230 | main () | |
10231 | { | |
81ecdfbb RW |
10232 | #ifndef _BIG_ENDIAN |
10233 | not big endian | |
10234 | #endif | |
10235 | ||
7eb368b3 NR |
10236 | ; |
10237 | return 0; | |
10238 | } | |
10239 | _ACEOF | |
81ecdfbb | 10240 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 10241 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
10242 | else |
10243 | ac_cv_c_bigendian=no | |
a9322a30 | 10244 | fi |
81ecdfbb | 10245 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 10246 | fi |
81ecdfbb RW |
10247 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10248 | fi | |
10249 | if test $ac_cv_c_bigendian = unknown; then | |
10250 | # Compile a test program. | |
10251 | if test "$cross_compiling" = yes; then : | |
10252 | # Try to guess by grepping values from an object file. | |
10253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10254 | /* end confdefs.h. */ | |
10255 | short int ascii_mm[] = | |
10256 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
10257 | short int ascii_ii[] = | |
10258 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
10259 | int use_ascii (int i) { | |
10260 | return ascii_mm[i] + ascii_ii[i]; | |
10261 | } | |
10262 | short int ebcdic_ii[] = | |
10263 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
10264 | short int ebcdic_mm[] = | |
10265 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
10266 | int use_ebcdic (int i) { | |
10267 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
10268 | } | |
10269 | extern int foo; | |
7eb368b3 | 10270 | |
81ecdfbb RW |
10271 | int |
10272 | main () | |
10273 | { | |
10274 | return use_ascii (foo) == use_ebcdic (foo); | |
10275 | ; | |
10276 | return 0; | |
10277 | } | |
10278 | _ACEOF | |
10279 | if ac_fn_c_try_compile "$LINENO"; then : | |
10280 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
10281 | ac_cv_c_bigendian=yes | |
10282 | fi | |
10283 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
10284 | if test "$ac_cv_c_bigendian" = unknown; then | |
10285 | ac_cv_c_bigendian=no | |
10286 | else | |
10287 | # finding both strings is unlikely to happen, but who knows? | |
10288 | ac_cv_c_bigendian=unknown | |
10289 | fi | |
10290 | fi | |
7eb368b3 | 10291 | fi |
81ecdfbb | 10292 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 10293 | else |
81ecdfbb | 10294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10295 | /* end confdefs.h. */ |
81ecdfbb | 10296 | $ac_includes_default |
d3ea6809 MM |
10297 | int |
10298 | main () | |
10299 | { | |
81ecdfbb RW |
10300 | |
10301 | /* Are we little or big endian? From Harbison&Steele. */ | |
10302 | union | |
10303 | { | |
10304 | long int l; | |
10305 | char c[sizeof (long int)]; | |
10306 | } u; | |
10307 | u.l = 1; | |
10308 | return u.c[sizeof (long int) - 1] == 1; | |
10309 | ||
10310 | ; | |
10311 | return 0; | |
d3ea6809 MM |
10312 | } |
10313 | _ACEOF | |
81ecdfbb | 10314 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 10315 | ac_cv_c_bigendian=no |
d3ea6809 | 10316 | else |
81ecdfbb | 10317 | ac_cv_c_bigendian=yes |
d3ea6809 | 10318 | fi |
81ecdfbb RW |
10319 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10320 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10321 | fi |
a9322a30 | 10322 | |
81ecdfbb RW |
10323 | fi |
10324 | fi | |
10325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
10326 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
10327 | case $ac_cv_c_bigendian in #( | |
10328 | yes) | |
10329 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
10330 | ;; #( | |
10331 | no) | |
10332 | ;; #( | |
10333 | universal) | |
10334 | ||
10335 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
10336 | ||
10337 | ;; #( | |
10338 | *) | |
10339 | as_fn_error "unknown endianness | |
10340 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
10341 | esac | |
d3ea6809 MM |
10342 | |
10343 | ||
a9322a30 TT |
10344 | # ------------------------------ # |
10345 | # Checks for library functions. # | |
10346 | # ------------------------------ # | |
d3ea6809 | 10347 | |
a9322a30 TT |
10348 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
10349 | # for constant arguments. Useless! | |
81ecdfbb RW |
10350 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
10351 | $as_echo_n "checking for working alloca.h... " >&6; } | |
10352 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
10353 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 10354 | else |
81ecdfbb | 10355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 10356 | /* end confdefs.h. */ |
a9322a30 | 10357 | #include <alloca.h> |
bec39cab AC |
10358 | int |
10359 | main () | |
10360 | { | |
a9322a30 | 10361 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 10362 | if (p) return 0; |
bec39cab AC |
10363 | ; |
10364 | return 0; | |
10365 | } | |
10366 | _ACEOF | |
81ecdfbb | 10367 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 10368 | ac_cv_working_alloca_h=yes |
bec39cab | 10369 | else |
81ecdfbb | 10370 | ac_cv_working_alloca_h=no |
bec39cab | 10371 | fi |
81ecdfbb RW |
10372 | rm -f core conftest.err conftest.$ac_objext \ |
10373 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 10374 | fi |
81ecdfbb RW |
10375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
10376 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
10377 | if test $ac_cv_working_alloca_h = yes; then |
10378 | ||
81ecdfbb | 10379 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 10380 | |
c906108c | 10381 | fi |
bec39cab | 10382 | |
81ecdfbb RW |
10383 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
10384 | $as_echo_n "checking for alloca... " >&6; } | |
10385 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
10386 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10387 | else |
81ecdfbb | 10388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10389 | /* end confdefs.h. */ |
a9322a30 TT |
10390 | #ifdef __GNUC__ |
10391 | # define alloca __builtin_alloca | |
b4e70030 | 10392 | #else |
a9322a30 TT |
10393 | # ifdef _MSC_VER |
10394 | # include <malloc.h> | |
10395 | # define alloca _alloca | |
10396 | # else | |
81ecdfbb | 10397 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
10398 | # include <alloca.h> |
10399 | # else | |
10400 | # ifdef _AIX | |
10401 | #pragma alloca | |
10402 | # else | |
10403 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
10404 | char *alloca (); | |
10405 | # endif | |
10406 | # endif | |
10407 | # endif | |
10408 | # endif | |
c906108c | 10409 | #endif |
97bf5e38 | 10410 | |
bec39cab AC |
10411 | int |
10412 | main () | |
10413 | { | |
a9322a30 | 10414 | char *p = (char *) alloca (1); |
81ecdfbb | 10415 | if (p) return 0; |
bec39cab AC |
10416 | ; |
10417 | return 0; | |
10418 | } | |
10419 | _ACEOF | |
81ecdfbb | 10420 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 10421 | ac_cv_func_alloca_works=yes |
bec39cab | 10422 | else |
81ecdfbb | 10423 | ac_cv_func_alloca_works=no |
bec39cab | 10424 | fi |
81ecdfbb RW |
10425 | rm -f core conftest.err conftest.$ac_objext \ |
10426 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 10427 | fi |
81ecdfbb RW |
10428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
10429 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
10430 | |
10431 | if test $ac_cv_func_alloca_works = yes; then | |
10432 | ||
81ecdfbb | 10433 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 10434 | |
a9322a30 TT |
10435 | else |
10436 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
10437 | # that cause trouble. Some versions do not even contain alloca or | |
10438 | # contain a buggy version. If you still want to use their alloca, | |
10439 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
10440 | ||
81ecdfbb | 10441 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 10442 | |
81ecdfbb | 10443 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 10444 | |
bec39cab | 10445 | |
81ecdfbb RW |
10446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
10447 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
10448 | if test "${ac_cv_os_cray+set}" = set; then : | |
10449 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10450 | else |
81ecdfbb | 10451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 10452 | /* end confdefs.h. */ |
81ecdfbb | 10453 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
10454 | webecray |
10455 | #else | |
10456 | wenotbecray | |
10457 | #endif | |
10458 | ||
10459 | _ACEOF | |
10460 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 10461 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
10462 | ac_cv_os_cray=yes |
10463 | else | |
81ecdfbb | 10464 | ac_cv_os_cray=no |
bec39cab | 10465 | fi |
81ecdfbb RW |
10466 | rm -f conftest* |
10467 | ||
bec39cab | 10468 | fi |
81ecdfbb RW |
10469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
10470 | $as_echo "$ac_cv_os_cray" >&6; } | |
10471 | if test $ac_cv_os_cray = yes; then | |
10472 | for ac_func in _getb67 GETB67 getb67; do | |
10473 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10474 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10475 | eval as_val=\$$as_ac_var | |
10476 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
10477 | |
10478 | cat >>confdefs.h <<_ACEOF | |
10479 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 10480 | _ACEOF |
c906108c | 10481 | |
a9322a30 | 10482 | break |
c906108c SS |
10483 | fi |
10484 | ||
a9322a30 TT |
10485 | done |
10486 | fi | |
bec39cab | 10487 | |
81ecdfbb RW |
10488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
10489 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
10490 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
10491 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10492 | else |
81ecdfbb | 10493 | if test "$cross_compiling" = yes; then : |
a9322a30 | 10494 | ac_cv_c_stack_direction=0 |
bec39cab | 10495 | else |
81ecdfbb | 10496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10497 | /* end confdefs.h. */ |
81ecdfbb | 10498 | $ac_includes_default |
a9322a30 TT |
10499 | int |
10500 | find_stack_direction () | |
b4e70030 | 10501 | { |
a9322a30 TT |
10502 | static char *addr = 0; |
10503 | auto char dummy; | |
10504 | if (addr == 0) | |
10505 | { | |
10506 | addr = &dummy; | |
10507 | return find_stack_direction (); | |
10508 | } | |
10509 | else | |
10510 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 10511 | } |
b757528f | 10512 | |
bec39cab AC |
10513 | int |
10514 | main () | |
10515 | { | |
81ecdfbb | 10516 | return find_stack_direction () < 0; |
bec39cab AC |
10517 | } |
10518 | _ACEOF | |
81ecdfbb | 10519 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10520 | ac_cv_c_stack_direction=1 |
10521 | else | |
81ecdfbb | 10522 | ac_cv_c_stack_direction=-1 |
a9322a30 | 10523 | fi |
81ecdfbb RW |
10524 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10525 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10526 | fi |
a9322a30 | 10527 | |
81ecdfbb RW |
10528 | fi |
10529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
10530 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
10531 | cat >>confdefs.h <<_ACEOF |
10532 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
10533 | _ACEOF | |
10534 | ||
10535 | ||
10536 | fi | |
10537 | ||
a9322a30 | 10538 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
10539 | do : |
10540 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10541 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10542 | eval as_val=\$$as_ac_Header | |
10543 | if test "x$as_val" = x""yes; then : | |
bec39cab | 10544 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10545 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 10546 | _ACEOF |
b757528f | 10547 | |
b757528f | 10548 | fi |
bec39cab | 10549 | |
a9322a30 | 10550 | done |
a3828db0 | 10551 | |
a9322a30 | 10552 | for ac_func in getpagesize |
81ecdfbb RW |
10553 | do : |
10554 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
10555 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 10556 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10557 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 10558 | _ACEOF |
bcb3dc3d | 10559 | |
bcb3dc3d MK |
10560 | fi |
10561 | done | |
10562 | ||
81ecdfbb RW |
10563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
10564 | $as_echo_n "checking for working mmap... " >&6; } | |
10565 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
10566 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10567 | else |
81ecdfbb | 10568 | if test "$cross_compiling" = yes; then : |
a9322a30 | 10569 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 10570 | else |
81ecdfbb | 10571 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10572 | /* end confdefs.h. */ |
a9322a30 TT |
10573 | $ac_includes_default |
10574 | /* malloc might have been renamed as rpl_malloc. */ | |
10575 | #undef malloc | |
bec39cab | 10576 | |
a9322a30 TT |
10577 | /* Thanks to Mike Haertel and Jim Avera for this test. |
10578 | Here is a matrix of mmap possibilities: | |
10579 | mmap private not fixed | |
10580 | mmap private fixed at somewhere currently unmapped | |
10581 | mmap private fixed at somewhere already mapped | |
10582 | mmap shared not fixed | |
10583 | mmap shared fixed at somewhere currently unmapped | |
10584 | mmap shared fixed at somewhere already mapped | |
10585 | For private mappings, we should verify that changes cannot be read() | |
10586 | back from the file, nor mmap's back from the file at a different | |
10587 | address. (There have been systems where private was not correctly | |
10588 | implemented like the infamous i386 svr4.0, and systems where the | |
10589 | VM page cache was not coherent with the file system buffer cache | |
10590 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
10591 | For shared mappings, we should conversely verify that changes get | |
10592 | propagated back to all the places they're supposed to be. | |
bec39cab | 10593 | |
a9322a30 TT |
10594 | Grep wants private fixed already mapped. |
10595 | The main things grep needs to know about mmap are: | |
10596 | * does it exist and is it safe to write into the mmap'd area | |
10597 | * how to use it (BSD variants) */ | |
8b9cf735 | 10598 | |
a9322a30 TT |
10599 | #include <fcntl.h> |
10600 | #include <sys/mman.h> | |
8b9cf735 | 10601 | |
81ecdfbb | 10602 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 10603 | char *malloc (); |
a3828db0 MK |
10604 | #endif |
10605 | ||
a9322a30 | 10606 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 10607 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 10608 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 10609 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
10610 | # define HAVE_SYS_PARAM_H 1 |
10611 | # endif | |
10612 | ||
10613 | # ifdef _SC_PAGESIZE | |
10614 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
10615 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 10616 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
10617 | # include <sys/param.h> |
10618 | # ifdef EXEC_PAGESIZE | |
10619 | # define getpagesize() EXEC_PAGESIZE | |
10620 | # else /* no EXEC_PAGESIZE */ | |
10621 | # ifdef NBPG | |
10622 | # define getpagesize() NBPG * CLSIZE | |
10623 | # ifndef CLSIZE | |
10624 | # define CLSIZE 1 | |
10625 | # endif /* no CLSIZE */ | |
10626 | # else /* no NBPG */ | |
10627 | # ifdef NBPC | |
10628 | # define getpagesize() NBPC | |
10629 | # else /* no NBPC */ | |
10630 | # ifdef PAGESIZE | |
10631 | # define getpagesize() PAGESIZE | |
10632 | # endif /* PAGESIZE */ | |
10633 | # endif /* no NBPC */ | |
10634 | # endif /* no NBPG */ | |
10635 | # endif /* no EXEC_PAGESIZE */ | |
10636 | # else /* no HAVE_SYS_PARAM_H */ | |
10637 | # define getpagesize() 8192 /* punt totally */ | |
10638 | # endif /* no HAVE_SYS_PARAM_H */ | |
10639 | # endif /* no _SC_PAGESIZE */ | |
10640 | ||
10641 | #endif /* no HAVE_GETPAGESIZE */ | |
10642 | ||
bec39cab AC |
10643 | int |
10644 | main () | |
10645 | { | |
a9322a30 TT |
10646 | char *data, *data2, *data3; |
10647 | int i, pagesize; | |
10648 | int fd; | |
10649 | ||
10650 | pagesize = getpagesize (); | |
10651 | ||
10652 | /* First, make a file with some known garbage in it. */ | |
10653 | data = (char *) malloc (pagesize); | |
10654 | if (!data) | |
81ecdfbb | 10655 | return 1; |
a9322a30 TT |
10656 | for (i = 0; i < pagesize; ++i) |
10657 | *(data + i) = rand (); | |
10658 | umask (0); | |
10659 | fd = creat ("conftest.mmap", 0600); | |
10660 | if (fd < 0) | |
81ecdfbb | 10661 | return 1; |
a9322a30 | 10662 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 10663 | return 1; |
a9322a30 TT |
10664 | close (fd); |
10665 | ||
10666 | /* Next, try to mmap the file at a fixed address which already has | |
10667 | something else allocated at it. If we can, also make sure that | |
10668 | we see the same garbage. */ | |
10669 | fd = open ("conftest.mmap", O_RDWR); | |
10670 | if (fd < 0) | |
81ecdfbb | 10671 | return 1; |
a9322a30 TT |
10672 | data2 = (char *) malloc (2 * pagesize); |
10673 | if (!data2) | |
81ecdfbb RW |
10674 | return 1; |
10675 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
10676 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
10677 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 10678 | return 1; |
a9322a30 TT |
10679 | for (i = 0; i < pagesize; ++i) |
10680 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 10681 | return 1; |
a9322a30 TT |
10682 | |
10683 | /* Finally, make sure that changes to the mapped area do not | |
10684 | percolate back to the file as seen by read(). (This is a bug on | |
10685 | some variants of i386 svr4.0.) */ | |
10686 | for (i = 0; i < pagesize; ++i) | |
10687 | *(data2 + i) = *(data2 + i) + 1; | |
10688 | data3 = (char *) malloc (pagesize); | |
10689 | if (!data3) | |
81ecdfbb | 10690 | return 1; |
a9322a30 | 10691 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 10692 | return 1; |
a9322a30 TT |
10693 | for (i = 0; i < pagesize; ++i) |
10694 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 10695 | return 1; |
a9322a30 | 10696 | close (fd); |
81ecdfbb | 10697 | return 0; |
bec39cab AC |
10698 | } |
10699 | _ACEOF | |
81ecdfbb | 10700 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 10701 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 10702 | else |
81ecdfbb | 10703 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 10704 | fi |
81ecdfbb RW |
10705 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10706 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 10707 | fi |
81ecdfbb | 10708 | |
a9322a30 | 10709 | fi |
81ecdfbb RW |
10710 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
10711 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
10712 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
10713 | ||
81ecdfbb | 10714 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 10715 | |
086ec9eb | 10716 | fi |
a9322a30 | 10717 | rm -f conftest.mmap |
a3828db0 | 10718 | |
81ecdfbb RW |
10719 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
10720 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 10721 | |
a9322a30 TT |
10722 | else |
10723 | ||
10724 | cat >>confdefs.h <<_ACEOF | |
10725 | #define pid_t int | |
bec39cab | 10726 | _ACEOF |
086ec9eb MK |
10727 | |
10728 | fi | |
10729 | ||
81ecdfbb RW |
10730 | for ac_header in vfork.h |
10731 | do : | |
10732 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
10733 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 10734 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10735 | #define HAVE_VFORK_H 1 |
bec39cab | 10736 | _ACEOF |
c906108c SS |
10737 | |
10738 | fi | |
a9322a30 | 10739 | |
a3828db0 | 10740 | done |
c906108c | 10741 | |
a9322a30 | 10742 | for ac_func in fork vfork |
81ecdfbb RW |
10743 | do : |
10744 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10745 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10746 | eval as_val=\$$as_ac_var | |
10747 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 10748 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10749 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 10750 | _ACEOF |
b83266a0 | 10751 | |
97bf5e38 | 10752 | fi |
a3828db0 | 10753 | done |
b83266a0 | 10754 | |
a9322a30 | 10755 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
10756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
10757 | $as_echo_n "checking for working fork... " >&6; } | |
10758 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
10759 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10760 | else |
81ecdfbb | 10761 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10762 | ac_cv_func_fork_works=cross |
10763 | else | |
81ecdfbb RW |
10764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10765 | /* end confdefs.h. */ | |
10766 | $ac_includes_default | |
10767 | int | |
10768 | main () | |
10769 | { | |
10770 | ||
10771 | /* By Ruediger Kuhlmann. */ | |
10772 | return fork () < 0; | |
10773 | ||
10774 | ; | |
10775 | return 0; | |
10776 | } | |
a9322a30 | 10777 | _ACEOF |
81ecdfbb | 10778 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10779 | ac_cv_func_fork_works=yes |
10780 | else | |
81ecdfbb | 10781 | ac_cv_func_fork_works=no |
a9322a30 | 10782 | fi |
81ecdfbb RW |
10783 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10784 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10785 | fi |
81ecdfbb | 10786 | |
a9322a30 | 10787 | fi |
81ecdfbb RW |
10788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
10789 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
10790 | |
10791 | else | |
10792 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10793 | fi | |
10794 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10795 | case $host in | |
10796 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10797 | # Override, as these systems have only a dummy fork() stub | |
10798 | ac_cv_func_fork_works=no | |
10799 | ;; | |
10800 | *) | |
10801 | ac_cv_func_fork_works=yes | |
10802 | ;; | |
10803 | esac | |
81ecdfbb RW |
10804 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
10805 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10806 | fi |
10807 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
10808 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
10809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
10810 | $as_echo_n "checking for working vfork... " >&6; } | |
10811 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
10812 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10813 | else |
81ecdfbb | 10814 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10815 | ac_cv_func_vfork_works=cross |
10816 | else | |
81ecdfbb | 10817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
10818 | /* end confdefs.h. */ |
10819 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 10820 | $ac_includes_default |
a9322a30 | 10821 | #include <sys/wait.h> |
81ecdfbb | 10822 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
10823 | # include <vfork.h> |
10824 | #endif | |
10825 | /* On some sparc systems, changes by the child to local and incoming | |
10826 | argument registers are propagated back to the parent. The compiler | |
10827 | is told about this with #include <vfork.h>, but some compilers | |
10828 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10829 | static variable whose address is put into a register that is | |
10830 | clobbered by the vfork. */ | |
10831 | static void | |
10832 | #ifdef __cplusplus | |
10833 | sparc_address_test (int arg) | |
10834 | # else | |
10835 | sparc_address_test (arg) int arg; | |
10836 | #endif | |
10837 | { | |
10838 | static pid_t child; | |
10839 | if (!child) { | |
10840 | child = vfork (); | |
10841 | if (child < 0) { | |
10842 | perror ("vfork"); | |
10843 | _exit(2); | |
10844 | } | |
10845 | if (!child) { | |
10846 | arg = getpid(); | |
10847 | write(-1, "", 0); | |
10848 | _exit (arg); | |
10849 | } | |
10850 | } | |
10851 | } | |
10852 | ||
10853 | int | |
10854 | main () | |
10855 | { | |
10856 | pid_t parent = getpid (); | |
10857 | pid_t child; | |
10858 | ||
10859 | sparc_address_test (0); | |
10860 | ||
10861 | child = vfork (); | |
10862 | ||
10863 | if (child == 0) { | |
10864 | /* Here is another test for sparc vfork register problems. This | |
10865 | test uses lots of local variables, at least as many local | |
10866 | variables as main has allocated so far including compiler | |
10867 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10868 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10869 | reuse the register of parent for one of the local variables, | |
10870 | since it will think that parent can't possibly be used any more | |
10871 | in this routine. Assigning to the local variable will thus | |
10872 | munge parent in the parent process. */ | |
10873 | pid_t | |
10874 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10875 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10876 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10877 | use the same hardware register for all 8 local variables. */ | |
10878 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10879 | || p != p5 || p != p6 || p != p7) | |
10880 | _exit(1); | |
10881 | ||
10882 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10883 | from child file descriptors. If the child closes a descriptor | |
10884 | before it execs or exits, this munges the parent's descriptor | |
10885 | as well. Test for this by closing stdout in the child. */ | |
10886 | _exit(close(fileno(stdout)) != 0); | |
10887 | } else { | |
10888 | int status; | |
10889 | struct stat st; | |
10890 | ||
10891 | while (wait(&status) != child) | |
10892 | ; | |
81ecdfbb | 10893 | return ( |
a9322a30 TT |
10894 | /* Was there some problem with vforking? */ |
10895 | child < 0 | |
10896 | ||
10897 | /* Did the child fail? (This shouldn't happen.) */ | |
10898 | || status | |
10899 | ||
10900 | /* Did the vfork/compiler bug occur? */ | |
10901 | || parent != getpid() | |
10902 | ||
10903 | /* Did the file descriptor bug occur? */ | |
10904 | || fstat(fileno(stdout), &st) != 0 | |
10905 | ); | |
10906 | } | |
10907 | } | |
10908 | _ACEOF | |
81ecdfbb | 10909 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10910 | ac_cv_func_vfork_works=yes |
10911 | else | |
81ecdfbb | 10912 | ac_cv_func_vfork_works=no |
a9322a30 | 10913 | fi |
81ecdfbb RW |
10914 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10915 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10916 | fi |
81ecdfbb | 10917 | |
a9322a30 | 10918 | fi |
81ecdfbb RW |
10919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10920 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10921 | |
10922 | fi; | |
10923 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10924 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10925 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10926 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10927 | fi |
10928 | ||
10929 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10930 | ||
81ecdfbb | 10931 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10932 | |
10933 | else | |
10934 | ||
81ecdfbb | 10935 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10936 | |
10937 | fi | |
10938 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10939 | ||
81ecdfbb | 10940 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10941 | |
10942 | fi | |
10943 | ||
a9322a30 | 10944 | for ac_func in canonicalize_file_name realpath getrusage getuid \ |
a156a290 | 10945 | getgid pipe poll pread64 sbrk setpgid setpgrp setsid \ |
a9322a30 | 10946 | sigaction sigprocmask sigsetmask socketpair syscall \ |
732f6a93 | 10947 | ttrace wborder setlocale iconvlist libiconvlist btowc |
81ecdfbb RW |
10948 | do : |
10949 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10950 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10951 | eval as_val=\$$as_ac_var | |
10952 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10953 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10954 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10955 | _ACEOF |
10956 | ||
10957 | fi | |
10958 | done | |
10959 | ||
10960 | ||
81ecdfbb RW |
10961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10962 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10963 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10964 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10965 | else |
81ecdfbb | 10966 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10967 | /* end confdefs.h. */ |
10968 | #include <langinfo.h> | |
10969 | int | |
10970 | main () | |
10971 | { | |
10972 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10973 | ; |
10974 | return 0; | |
10975 | } | |
10976 | _ACEOF | |
81ecdfbb | 10977 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10978 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10979 | else |
81ecdfbb | 10980 | am_cv_langinfo_codeset=no |
a4db0f07 | 10981 | fi |
81ecdfbb RW |
10982 | rm -f core conftest.err conftest.$ac_objext \ |
10983 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10984 | |
a4db0f07 | 10985 | fi |
81ecdfbb RW |
10986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10987 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10988 | if test $am_cv_langinfo_codeset = yes; then |
10989 | ||
81ecdfbb | 10990 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10991 | |
6c7a06a3 | 10992 | fi |
c906108c | 10993 | |
06825bd1 | 10994 | |
a3828db0 MK |
10995 | # Check the return and argument types of ptrace. No canned test for |
10996 | # this, so roll our own. | |
10997 | gdb_ptrace_headers=' | |
10998 | #if HAVE_SYS_TYPES_H | |
10999 | # include <sys/types.h> | |
11000 | #endif | |
11001 | #if HAVE_SYS_PTRACE_H | |
11002 | # include <sys/ptrace.h> | |
11003 | #endif | |
11004 | #if HAVE_UNISTD_H | |
11005 | # include <unistd.h> | |
11006 | #endif | |
11007 | ' | |
11008 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
11009 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
11010 | " | |
11011 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
11012 | ac_have_decl=1 | |
06825bd1 | 11013 | else |
81ecdfbb | 11014 | ac_have_decl=0 |
06825bd1 | 11015 | fi |
06825bd1 | 11016 | |
a3828db0 | 11017 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11018 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 11019 | _ACEOF |
81ecdfbb | 11020 | if test $ac_have_decl = 1; then : |
bec39cab | 11021 | |
a3828db0 | 11022 | else |
a3828db0 MK |
11023 | |
11024 | : ${gdb_cv_func_ptrace_ret='int'} | |
11025 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
11026 | ||
06825bd1 MK |
11027 | fi |
11028 | ||
064ef605 DJ |
11029 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
11030 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
11031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
11032 | $as_echo_n "checking return type of ptrace... " >&6; } | |
11033 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
11034 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11035 | else |
81ecdfbb | 11036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11037 | /* end confdefs.h. */ |
a3828db0 | 11038 | $gdb_ptrace_headers |
bec39cab AC |
11039 | int |
11040 | main () | |
11041 | { | |
064ef605 DJ |
11042 | extern long ptrace (enum __ptrace_request, ...); |
11043 | ; | |
11044 | return 0; | |
11045 | } | |
11046 | _ACEOF | |
81ecdfbb | 11047 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
11048 | gdb_cv_func_ptrace_ret='long' |
11049 | else | |
81ecdfbb | 11050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
11051 | /* end confdefs.h. */ |
11052 | $gdb_ptrace_headers | |
11053 | int | |
11054 | main () | |
11055 | { | |
a3828db0 | 11056 | extern int ptrace (); |
bec39cab AC |
11057 | ; |
11058 | return 0; | |
11059 | } | |
11060 | _ACEOF | |
81ecdfbb | 11061 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11062 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 11063 | else |
81ecdfbb | 11064 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 11065 | fi |
81ecdfbb | 11066 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 11067 | fi |
81ecdfbb | 11068 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 11069 | fi |
81ecdfbb RW |
11070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
11071 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 11072 | |
a3828db0 MK |
11073 | cat >>confdefs.h <<_ACEOF |
11074 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 11075 | _ACEOF |
70f9f479 | 11076 | |
a3828db0 | 11077 | # Check argument types. |
81ecdfbb RW |
11078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
11079 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
11080 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
11081 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11082 | else |
a3828db0 | 11083 | |
81ecdfbb | 11084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
11085 | /* end confdefs.h. */ |
11086 | $gdb_ptrace_headers | |
11087 | int | |
11088 | main () | |
11089 | { | |
11090 | extern long ptrace (enum __ptrace_request, ...); | |
11091 | ; | |
11092 | return 0; | |
11093 | } | |
11094 | _ACEOF | |
81ecdfbb | 11095 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
11096 | gdb_cv_func_ptrace_args='int,int,long,long' |
11097 | else | |
064ef605 | 11098 | |
a3828db0 MK |
11099 | for gdb_arg1 in 'int' 'long'; do |
11100 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 11101 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 11102 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 11103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11104 | /* end confdefs.h. */ |
a3828db0 | 11105 | $gdb_ptrace_headers |
bec39cab AC |
11106 | int |
11107 | main () | |
11108 | { | |
a3828db0 MK |
11109 | |
11110 | extern $gdb_cv_func_ptrace_ret | |
11111 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
11112 | ||
bec39cab AC |
11113 | ; |
11114 | return 0; | |
11115 | } | |
11116 | _ACEOF | |
81ecdfbb | 11117 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
11118 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
11119 | break 4; | |
5c7f2947 | 11120 | fi |
81ecdfbb | 11121 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 11122 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 11123 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11124 | /* end confdefs.h. */ |
a3828db0 | 11125 | $gdb_ptrace_headers |
bec39cab AC |
11126 | int |
11127 | main () | |
11128 | { | |
a3828db0 MK |
11129 | |
11130 | extern $gdb_cv_func_ptrace_ret | |
11131 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
11132 | ||
bec39cab AC |
11133 | ; |
11134 | return 0; | |
11135 | } | |
11136 | _ACEOF | |
81ecdfbb | 11137 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
11138 | |
11139 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
11140 | break 5; | |
78434e59 | 11141 | fi |
81ecdfbb | 11142 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
11143 | done |
11144 | done | |
11145 | done | |
11146 | done | |
11147 | done | |
11148 | # Provide a safe default value. | |
11149 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
11150 | ||
064ef605 | 11151 | fi |
81ecdfbb | 11152 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 11153 | fi |
81ecdfbb RW |
11154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
11155 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
11156 | ac_save_IFS=$IFS; IFS=',' |
11157 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
11158 | IFS=$ac_save_IFS | |
11159 | shift | |
bec39cab | 11160 | |
a3828db0 MK |
11161 | cat >>confdefs.h <<_ACEOF |
11162 | #define PTRACE_TYPE_ARG3 $3 | |
11163 | _ACEOF | |
11164 | ||
11165 | if test -n "$5"; then | |
11166 | ||
11167 | cat >>confdefs.h <<_ACEOF | |
11168 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 11169 | _ACEOF |
78434e59 MK |
11170 | |
11171 | fi | |
11172 | ||
a3828db0 | 11173 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
11174 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
11175 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
11176 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
11177 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 11178 | else |
81ecdfbb RW |
11179 | if test "$cross_compiling" = yes; then : |
11180 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 11181 | else |
81ecdfbb | 11182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11183 | /* end confdefs.h. */ |
81ecdfbb | 11184 | $ac_includes_default |
bec39cab AC |
11185 | int |
11186 | main () | |
11187 | { | |
a3828db0 MK |
11188 | /* If this system has a BSD-style setpgrp which takes arguments, |
11189 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
11190 | exit successfully. */ | |
81ecdfbb | 11191 | return setpgrp (1,1) != -1; |
bec39cab AC |
11192 | ; |
11193 | return 0; | |
11194 | } | |
11195 | _ACEOF | |
81ecdfbb | 11196 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 11197 | ac_cv_func_setpgrp_void=no |
c906108c | 11198 | else |
81ecdfbb | 11199 | ac_cv_func_setpgrp_void=yes |
c906108c | 11200 | fi |
81ecdfbb RW |
11201 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11202 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11203 | fi |
81ecdfbb | 11204 | |
a3828db0 | 11205 | fi |
81ecdfbb RW |
11206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
11207 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
11208 | if test $ac_cv_func_setpgrp_void = yes; then |
11209 | ||
81ecdfbb | 11210 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
11211 | |
11212 | fi | |
a3828db0 MK |
11213 | |
11214 | else | |
81ecdfbb RW |
11215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
11216 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
11217 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
11218 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11219 | else |
81ecdfbb | 11220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11221 | /* end confdefs.h. */ |
a3828db0 MK |
11222 | |
11223 | #include <unistd.h> | |
11224 | ||
bec39cab AC |
11225 | int |
11226 | main () | |
11227 | { | |
a3828db0 MK |
11228 | |
11229 | if (setpgrp(1,1) == -1) | |
11230 | exit (0); | |
11231 | else | |
11232 | exit (1); | |
11233 | ||
bec39cab AC |
11234 | ; |
11235 | return 0; | |
11236 | } | |
11237 | _ACEOF | |
81ecdfbb | 11238 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11239 | ac_cv_func_setpgrp_void=no |
c906108c | 11240 | else |
81ecdfbb | 11241 | ac_cv_func_setpgrp_void=yes |
c906108c | 11242 | fi |
81ecdfbb | 11243 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11244 | fi |
81ecdfbb RW |
11245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
11246 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 11247 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 11248 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 11249 | |
a3828db0 | 11250 | fi |
c906108c SS |
11251 | fi |
11252 | ||
a3828db0 MK |
11253 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
11254 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
11255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
11256 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
11257 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
11258 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11259 | else |
81ecdfbb | 11260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11261 | /* end confdefs.h. */ |
a3828db0 MK |
11262 | |
11263 | #include <setjmp.h> | |
11264 | ||
bec39cab AC |
11265 | int |
11266 | main () | |
11267 | { | |
a3828db0 | 11268 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
11269 | ; |
11270 | return 0; | |
11271 | } | |
11272 | _ACEOF | |
81ecdfbb | 11273 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11274 | gdb_cv_func_sigsetjmp=yes |
c906108c | 11275 | else |
81ecdfbb | 11276 | gdb_cv_func_sigsetjmp=no |
c906108c | 11277 | fi |
81ecdfbb | 11278 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11279 | fi |
81ecdfbb RW |
11280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
11281 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 11282 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 11283 | |
81ecdfbb | 11284 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 11285 | |
97bf5e38 | 11286 | fi |
c906108c | 11287 | |
a3828db0 MK |
11288 | # Assume we'll default to using the included libiberty regex. |
11289 | gdb_use_included_regex=yes | |
11290 | ||
11291 | # However, if the system regex is GNU regex, then default to *not* | |
11292 | # using the included regex. | |
81ecdfbb RW |
11293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
11294 | $as_echo_n "checking for GNU regex... " >&6; } | |
11295 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
11296 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11297 | else |
81ecdfbb | 11298 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11299 | /* end confdefs.h. */ |
a3828db0 | 11300 | #include <gnu-versions.h> |
bec39cab AC |
11301 | int |
11302 | main () | |
11303 | { | |
81ecdfbb RW |
11304 | #define REGEX_INTERFACE_VERSION 1 |
11305 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
11306 | # error "Version mismatch" | |
11307 | #endif | |
5c45e068 MK |
11308 | ; |
11309 | return 0; | |
11310 | } | |
11311 | _ACEOF | |
81ecdfbb RW |
11312 | if ac_fn_c_try_compile "$LINENO"; then : |
11313 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 11314 | else |
81ecdfbb RW |
11315 | gdb_cv_have_gnu_regex=no |
11316 | fi | |
11317 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11318 | fi | |
11319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
11320 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
11321 | if test $gdb_cv_have_gnu_regex = yes; then | |
11322 | gdb_use_included_regex=no | |
5c45e068 | 11323 | fi |
81ecdfbb RW |
11324 | |
11325 | ||
11326 | # Check whether --with-included-regex was given. | |
11327 | if test "${with_included_regex+set}" = set; then : | |
11328 | withval=$with_included_regex; gdb_with_regex=$withval | |
11329 | else | |
11330 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 11331 | fi |
81ecdfbb RW |
11332 | |
11333 | if test "$gdb_with_regex" = yes; then | |
11334 | ||
11335 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
11336 | ||
c906108c | 11337 | fi |
81ecdfbb RW |
11338 | |
11339 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
11340 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
11341 | #include <sys/proc.h> | |
11342 | ||
11343 | " | |
11344 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 11345 | |
5c45e068 | 11346 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 11347 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 11348 | _ACEOF |
c906108c | 11349 | |
5c45e068 | 11350 | |
97bf5e38 | 11351 | fi |
c906108c | 11352 | |
5c45e068 | 11353 | |
a3828db0 | 11354 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
11355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
11356 | $as_echo_n "checking for struct lwp... " >&6; } | |
11357 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
11358 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11359 | else |
81ecdfbb | 11360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11361 | /* end confdefs.h. */ |
a3828db0 MK |
11362 | #include <sys/param.h> |
11363 | #include <sys/lwp.h> | |
bec39cab AC |
11364 | int |
11365 | main () | |
11366 | { | |
a3828db0 | 11367 | struct lwp l; |
bec39cab AC |
11368 | ; |
11369 | return 0; | |
11370 | } | |
11371 | _ACEOF | |
81ecdfbb | 11372 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11373 | gdb_cv_struct_lwp=yes |
c906108c | 11374 | else |
81ecdfbb | 11375 | gdb_cv_struct_lwp=no |
c906108c | 11376 | fi |
81ecdfbb | 11377 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11378 | fi |
81ecdfbb RW |
11379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
11380 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 11381 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 11382 | |
81ecdfbb | 11383 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 11384 | |
97bf5e38 | 11385 | fi |
c906108c | 11386 | |
a3828db0 | 11387 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
11388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
11389 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
11390 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
11391 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11392 | else |
81ecdfbb | 11393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11394 | /* end confdefs.h. */ |
a3828db0 MK |
11395 | #include <sys/types.h> |
11396 | #include <machine/reg.h> | |
bec39cab AC |
11397 | int |
11398 | main () | |
11399 | { | |
a3828db0 | 11400 | struct reg r; |
bec39cab AC |
11401 | ; |
11402 | return 0; | |
11403 | } | |
11404 | _ACEOF | |
81ecdfbb | 11405 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11406 | gdb_cv_struct_reg=yes |
27ca5dad | 11407 | else |
81ecdfbb | 11408 | gdb_cv_struct_reg=no |
27ca5dad | 11409 | fi |
81ecdfbb | 11410 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 11411 | fi |
81ecdfbb RW |
11412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
11413 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 11414 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 11415 | |
81ecdfbb | 11416 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
11417 | |
11418 | fi | |
97bf5e38 | 11419 | |
a3828db0 MK |
11420 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
11421 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
11422 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
11423 | " | |
11424 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
11425 | |
11426 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 11427 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 11428 | _ACEOF |
3862412b | 11429 | |
5c45e068 | 11430 | |
97bf5e38 | 11431 | fi |
81ecdfbb RW |
11432 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
11433 | " | |
11434 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
11435 | |
11436 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 11437 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 11438 | _ACEOF |
3862412b | 11439 | |
5c45e068 | 11440 | |
97bf5e38 | 11441 | fi |
3862412b | 11442 | |
5c45e068 | 11443 | |
a3828db0 | 11444 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
11445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
11446 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
11447 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
11448 | $as_echo_n "(cached) " >&6 | |
451928c5 | 11449 | else |
81ecdfbb | 11450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11451 | /* end confdefs.h. */ |
a3828db0 | 11452 | #include <sys/ptrace.h> |
bec39cab AC |
11453 | int |
11454 | main () | |
11455 | { | |
a3828db0 | 11456 | PTRACE_GETREGS; |
bec39cab AC |
11457 | ; |
11458 | return 0; | |
11459 | } | |
11460 | _ACEOF | |
81ecdfbb | 11461 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11462 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 11463 | else |
81ecdfbb | 11464 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 11465 | fi |
81ecdfbb | 11466 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
11467 | fi |
11468 | ||
81ecdfbb RW |
11469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
11470 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 11471 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 11472 | |
81ecdfbb | 11473 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 11474 | |
97bf5e38 | 11475 | fi |
451928c5 | 11476 | |
a3828db0 | 11477 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
11478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
11479 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
11480 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
11481 | $as_echo_n "(cached) " >&6 | |
451928c5 | 11482 | else |
81ecdfbb | 11483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11484 | /* end confdefs.h. */ |
a3828db0 | 11485 | #include <sys/ptrace.h> |
bec39cab AC |
11486 | int |
11487 | main () | |
11488 | { | |
a3828db0 | 11489 | PTRACE_GETFPXREGS; |
bec39cab AC |
11490 | ; |
11491 | return 0; | |
11492 | } | |
11493 | _ACEOF | |
81ecdfbb | 11494 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11495 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 11496 | else |
81ecdfbb | 11497 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 11498 | fi |
81ecdfbb | 11499 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
11500 | fi |
11501 | ||
81ecdfbb RW |
11502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
11503 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 11504 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 11505 | |
81ecdfbb | 11506 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 11507 | |
97bf5e38 | 11508 | fi |
451928c5 | 11509 | |
a3828db0 | 11510 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
11511 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
11512 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
11513 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
11514 | $as_echo_n "(cached) " >&6 | |
3862412b | 11515 | else |
81ecdfbb | 11516 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11517 | /* end confdefs.h. */ |
a3828db0 MK |
11518 | #include <sys/types.h> |
11519 | #include <sys/ptrace.h> | |
bec39cab AC |
11520 | int |
11521 | main () | |
11522 | { | |
a3828db0 | 11523 | PT_GETDBREGS; |
bec39cab AC |
11524 | ; |
11525 | return 0; | |
11526 | } | |
11527 | _ACEOF | |
81ecdfbb | 11528 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11529 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 11530 | else |
81ecdfbb | 11531 | gdb_cv_have_pt_getdbregs=no |
3862412b | 11532 | fi |
81ecdfbb | 11533 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
11534 | fi |
11535 | ||
81ecdfbb RW |
11536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
11537 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 11538 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 11539 | |
81ecdfbb | 11540 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 11541 | |
97bf5e38 | 11542 | fi |
3862412b | 11543 | |
a3828db0 | 11544 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
11545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
11546 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
11547 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
11548 | $as_echo_n "(cached) " >&6 | |
3862412b | 11549 | else |
81ecdfbb | 11550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11551 | /* end confdefs.h. */ |
a3828db0 MK |
11552 | #include <sys/types.h> |
11553 | #include <sys/ptrace.h> | |
bec39cab AC |
11554 | int |
11555 | main () | |
11556 | { | |
a3828db0 | 11557 | PT_GETXMMREGS; |
bec39cab AC |
11558 | ; |
11559 | return 0; | |
11560 | } | |
11561 | _ACEOF | |
81ecdfbb | 11562 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 11563 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 11564 | else |
81ecdfbb | 11565 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 11566 | fi |
81ecdfbb | 11567 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
11568 | fi |
11569 | ||
81ecdfbb RW |
11570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
11571 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 11572 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 11573 | |
81ecdfbb | 11574 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 11575 | |
97bf5e38 | 11576 | fi |
3862412b | 11577 | |
eb368090 | 11578 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
11579 | |
11580 | if test "${target}" = "${host}"; then | |
11581 | case "${host}" in | |
97bf5e38 | 11582 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 11583 | |
81ecdfbb | 11584 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
11585 | |
11586 | ;; | |
c162e8c9 | 11587 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 11588 | |
81ecdfbb | 11589 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
11590 | |
11591 | ;; | |
11592 | mips-sgi-irix5*) | |
11593 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 11594 | |
81ecdfbb | 11595 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
11596 | |
11597 | ;; | |
11598 | esac | |
11599 | fi | |
11600 | ||
11601 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
11602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
11603 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
11604 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
11605 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11606 | else |
81ecdfbb | 11607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11608 | /* end confdefs.h. */ |
596c9d4b KB |
11609 | |
11610 | #define _SYSCALL32 | |
11611 | #include <sys/procfs.h> | |
bec39cab AC |
11612 | int |
11613 | main () | |
11614 | { | |
97bf5e38 | 11615 | pstatus_t avar |
bec39cab AC |
11616 | ; |
11617 | return 0; | |
11618 | } | |
11619 | _ACEOF | |
81ecdfbb | 11620 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11621 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 11622 | else |
81ecdfbb | 11623 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 11624 | |
596c9d4b | 11625 | fi |
81ecdfbb | 11626 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
11627 | fi |
11628 | ||
97bf5e38 | 11629 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 11630 | |
81ecdfbb | 11631 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
11632 | |
11633 | fi | |
81ecdfbb RW |
11634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
11635 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 11636 | |
81ecdfbb RW |
11637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
11638 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
11639 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
11640 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 11641 | else |
81ecdfbb | 11642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11643 | /* end confdefs.h. */ |
596c9d4b KB |
11644 | |
11645 | #define _SYSCALL32 | |
11646 | #include <sys/procfs.h> | |
bec39cab AC |
11647 | int |
11648 | main () | |
11649 | { | |
97bf5e38 | 11650 | prrun_t avar |
bec39cab AC |
11651 | ; |
11652 | return 0; | |
11653 | } | |
11654 | _ACEOF | |
81ecdfbb | 11655 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11656 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 11657 | else |
81ecdfbb | 11658 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 11659 | |
596c9d4b | 11660 | fi |
81ecdfbb | 11661 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
11662 | fi |
11663 | ||
97bf5e38 | 11664 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 11665 | |
81ecdfbb | 11666 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
11667 | |
11668 | fi | |
81ecdfbb RW |
11669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
11670 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 11671 | |
81ecdfbb RW |
11672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
11673 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
11674 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
11675 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 11676 | else |
81ecdfbb | 11677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11678 | /* end confdefs.h. */ |
596c9d4b KB |
11679 | |
11680 | #define _SYSCALL32 | |
11681 | #include <sys/procfs.h> | |
bec39cab AC |
11682 | int |
11683 | main () | |
11684 | { | |
97bf5e38 | 11685 | gregset_t avar |
bec39cab AC |
11686 | ; |
11687 | return 0; | |
11688 | } | |
11689 | _ACEOF | |
81ecdfbb | 11690 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11691 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 11692 | else |
81ecdfbb | 11693 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 11694 | |
596c9d4b | 11695 | fi |
81ecdfbb | 11696 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
11697 | fi |
11698 | ||
97bf5e38 | 11699 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 11700 | |
81ecdfbb | 11701 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
11702 | |
11703 | fi | |
81ecdfbb RW |
11704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
11705 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 11706 | |
81ecdfbb RW |
11707 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
11708 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
11709 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
11710 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 11711 | else |
81ecdfbb | 11712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11713 | /* end confdefs.h. */ |
97bf5e38 MK |
11714 | |
11715 | #define _SYSCALL32 | |
d84dd0c5 | 11716 | #include <sys/procfs.h> |
bec39cab AC |
11717 | int |
11718 | main () | |
11719 | { | |
97bf5e38 | 11720 | fpregset_t avar |
bec39cab AC |
11721 | ; |
11722 | return 0; | |
11723 | } | |
11724 | _ACEOF | |
81ecdfbb | 11725 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11726 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 11727 | else |
81ecdfbb | 11728 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 11729 | |
d84dd0c5 | 11730 | fi |
81ecdfbb | 11731 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
11732 | fi |
11733 | ||
97bf5e38 | 11734 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 11735 | |
81ecdfbb | 11736 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 11737 | |
97bf5e38 | 11738 | fi |
81ecdfbb RW |
11739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
11740 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 11741 | |
81ecdfbb RW |
11742 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
11743 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
11744 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
11745 | $as_echo_n "(cached) " >&6 | |
c906108c | 11746 | else |
81ecdfbb | 11747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11748 | /* end confdefs.h. */ |
c906108c | 11749 | |
97bf5e38 MK |
11750 | #define _SYSCALL32 |
11751 | #include <sys/procfs.h> | |
bec39cab AC |
11752 | int |
11753 | main () | |
11754 | { | |
97bf5e38 | 11755 | prgregset_t avar |
bec39cab AC |
11756 | ; |
11757 | return 0; | |
11758 | } | |
11759 | _ACEOF | |
81ecdfbb | 11760 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11761 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 11762 | else |
81ecdfbb | 11763 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 11764 | |
c906108c | 11765 | fi |
81ecdfbb | 11766 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11767 | fi |
11768 | ||
97bf5e38 | 11769 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 11770 | |
81ecdfbb | 11771 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 11772 | |
97bf5e38 | 11773 | fi |
81ecdfbb RW |
11774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
11775 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 11776 | |
81ecdfbb RW |
11777 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
11778 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
11779 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
11780 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11781 | else |
81ecdfbb | 11782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11783 | /* end confdefs.h. */ |
97bf5e38 MK |
11784 | |
11785 | #define _SYSCALL32 | |
11786 | #include <sys/procfs.h> | |
bec39cab AC |
11787 | int |
11788 | main () | |
11789 | { | |
97bf5e38 | 11790 | prfpregset_t avar |
bec39cab AC |
11791 | ; |
11792 | return 0; | |
11793 | } | |
11794 | _ACEOF | |
81ecdfbb | 11795 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11796 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 11797 | else |
81ecdfbb | 11798 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 11799 | |
d45fe813 | 11800 | fi |
81ecdfbb | 11801 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11802 | fi |
11803 | ||
97bf5e38 | 11804 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 11805 | |
81ecdfbb | 11806 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 11807 | |
97bf5e38 | 11808 | fi |
81ecdfbb RW |
11809 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
11810 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 11811 | |
81ecdfbb RW |
11812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
11813 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
11814 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
11815 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11816 | else |
81ecdfbb | 11817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11818 | /* end confdefs.h. */ |
97bf5e38 MK |
11819 | |
11820 | #define _SYSCALL32 | |
11821 | #include <sys/procfs.h> | |
bec39cab AC |
11822 | int |
11823 | main () | |
11824 | { | |
97bf5e38 | 11825 | prgregset32_t avar |
bec39cab AC |
11826 | ; |
11827 | return 0; | |
11828 | } | |
11829 | _ACEOF | |
81ecdfbb | 11830 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11831 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 11832 | else |
81ecdfbb | 11833 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 11834 | |
d45fe813 | 11835 | fi |
81ecdfbb | 11836 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11837 | fi |
11838 | ||
97bf5e38 | 11839 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 11840 | |
81ecdfbb | 11841 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 11842 | |
97bf5e38 | 11843 | fi |
81ecdfbb RW |
11844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
11845 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 11846 | |
81ecdfbb RW |
11847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
11848 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
11849 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
11850 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11851 | else |
81ecdfbb | 11852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11853 | /* end confdefs.h. */ |
97bf5e38 MK |
11854 | |
11855 | #define _SYSCALL32 | |
11856 | #include <sys/procfs.h> | |
bec39cab AC |
11857 | int |
11858 | main () | |
11859 | { | |
97bf5e38 | 11860 | prfpregset32_t avar |
bec39cab AC |
11861 | ; |
11862 | return 0; | |
11863 | } | |
11864 | _ACEOF | |
81ecdfbb | 11865 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11866 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 11867 | else |
81ecdfbb | 11868 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 11869 | |
d45fe813 | 11870 | fi |
81ecdfbb | 11871 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11872 | fi |
11873 | ||
97bf5e38 | 11874 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 11875 | |
81ecdfbb | 11876 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 11877 | |
97bf5e38 | 11878 | fi |
81ecdfbb RW |
11879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
11880 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 11881 | |
81ecdfbb RW |
11882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11883 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11884 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11885 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11886 | else |
81ecdfbb | 11887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11888 | /* end confdefs.h. */ |
97bf5e38 | 11889 | |
d45fe813 | 11890 | #define _SYSCALL32 |
97bf5e38 | 11891 | #include <sys/procfs.h> |
bec39cab AC |
11892 | int |
11893 | main () | |
11894 | { | |
97bf5e38 | 11895 | lwpid_t avar |
bec39cab AC |
11896 | ; |
11897 | return 0; | |
11898 | } | |
11899 | _ACEOF | |
81ecdfbb | 11900 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11901 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11902 | else |
81ecdfbb | 11903 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11904 | |
d45fe813 | 11905 | fi |
81ecdfbb | 11906 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11907 | fi |
11908 | ||
97bf5e38 | 11909 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11910 | |
81ecdfbb | 11911 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11912 | |
97bf5e38 | 11913 | fi |
81ecdfbb RW |
11914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11915 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11916 | |
81ecdfbb RW |
11917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11918 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11919 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11920 | $as_echo_n "(cached) " >&6 | |
c906108c | 11921 | else |
81ecdfbb | 11922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11923 | /* end confdefs.h. */ |
c906108c | 11924 | |
97bf5e38 MK |
11925 | #define _SYSCALL32 |
11926 | #include <sys/procfs.h> | |
bec39cab AC |
11927 | int |
11928 | main () | |
11929 | { | |
97bf5e38 | 11930 | psaddr_t avar |
bec39cab AC |
11931 | ; |
11932 | return 0; | |
11933 | } | |
11934 | _ACEOF | |
81ecdfbb | 11935 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11936 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11937 | else |
81ecdfbb | 11938 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11939 | |
c906108c | 11940 | fi |
81ecdfbb | 11941 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11942 | fi |
11943 | ||
97bf5e38 | 11944 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11945 | |
81ecdfbb | 11946 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11947 | |
97bf5e38 | 11948 | fi |
81ecdfbb RW |
11949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11950 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11951 | |
81ecdfbb RW |
11952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11953 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11954 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11955 | $as_echo_n "(cached) " >&6 | |
c906108c | 11956 | else |
81ecdfbb | 11957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11958 | /* end confdefs.h. */ |
c906108c | 11959 | |
97bf5e38 MK |
11960 | #define _SYSCALL32 |
11961 | #include <sys/procfs.h> | |
bec39cab AC |
11962 | int |
11963 | main () | |
11964 | { | |
97bf5e38 | 11965 | prsysent_t avar |
bec39cab AC |
11966 | ; |
11967 | return 0; | |
11968 | } | |
11969 | _ACEOF | |
81ecdfbb | 11970 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11971 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11972 | else |
81ecdfbb | 11973 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11974 | |
c906108c | 11975 | fi |
81ecdfbb | 11976 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11977 | fi |
11978 | ||
97bf5e38 | 11979 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11980 | |
81ecdfbb | 11981 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11982 | |
97bf5e38 | 11983 | fi |
81ecdfbb RW |
11984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11985 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11986 | |
81ecdfbb RW |
11987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11988 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11989 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11990 | $as_echo_n "(cached) " >&6 | |
c906108c | 11991 | else |
81ecdfbb | 11992 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11993 | /* end confdefs.h. */ |
c906108c | 11994 | |
97bf5e38 MK |
11995 | #define _SYSCALL32 |
11996 | #include <sys/procfs.h> | |
bec39cab AC |
11997 | int |
11998 | main () | |
11999 | { | |
97bf5e38 | 12000 | pr_sigset_t avar |
bec39cab AC |
12001 | ; |
12002 | return 0; | |
12003 | } | |
12004 | _ACEOF | |
81ecdfbb | 12005 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12006 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 12007 | else |
81ecdfbb | 12008 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 12009 | |
c906108c | 12010 | fi |
81ecdfbb | 12011 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12012 | fi |
12013 | ||
97bf5e38 | 12014 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 12015 | |
81ecdfbb | 12016 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 12017 | |
97bf5e38 | 12018 | fi |
81ecdfbb RW |
12019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
12020 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 12021 | |
81ecdfbb RW |
12022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
12023 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
12024 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
12025 | $as_echo_n "(cached) " >&6 | |
c906108c | 12026 | else |
81ecdfbb | 12027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12028 | /* end confdefs.h. */ |
c906108c | 12029 | |
97bf5e38 MK |
12030 | #define _SYSCALL32 |
12031 | #include <sys/procfs.h> | |
bec39cab AC |
12032 | int |
12033 | main () | |
12034 | { | |
97bf5e38 | 12035 | pr_sigaction64_t avar |
bec39cab AC |
12036 | ; |
12037 | return 0; | |
12038 | } | |
12039 | _ACEOF | |
81ecdfbb | 12040 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12041 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 12042 | else |
81ecdfbb | 12043 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 12044 | |
c906108c | 12045 | fi |
81ecdfbb | 12046 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12047 | fi |
12048 | ||
97bf5e38 | 12049 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 12050 | |
81ecdfbb | 12051 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 12052 | |
97bf5e38 | 12053 | fi |
81ecdfbb RW |
12054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
12055 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 12056 | |
81ecdfbb RW |
12057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
12058 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
12059 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
12060 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12061 | else |
81ecdfbb | 12062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12063 | /* end confdefs.h. */ |
97bf5e38 MK |
12064 | |
12065 | #define _SYSCALL32 | |
12066 | #include <sys/procfs.h> | |
bec39cab AC |
12067 | int |
12068 | main () | |
12069 | { | |
97bf5e38 | 12070 | pr_siginfo64_t avar |
bec39cab AC |
12071 | ; |
12072 | return 0; | |
12073 | } | |
12074 | _ACEOF | |
81ecdfbb | 12075 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12076 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
12077 | else | |
81ecdfbb | 12078 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 12079 | |
97bf5e38 | 12080 | fi |
81ecdfbb | 12081 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12082 | fi |
c906108c | 12083 | |
97bf5e38 | 12084 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 12085 | |
81ecdfbb | 12086 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 12087 | |
97bf5e38 | 12088 | fi |
81ecdfbb RW |
12089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
12090 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
12091 | |
12092 | ||
97bf5e38 MK |
12093 | |
12094 | ||
12095 | ||
97bf5e38 | 12096 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
12097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
12098 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
12099 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
12100 | $as_echo_n "(cached) " >&6 | |
c906108c | 12101 | else |
81ecdfbb | 12102 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 12103 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 12104 | else |
81ecdfbb | 12105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12106 | /* end confdefs.h. */ |
97bf5e38 MK |
12107 | #include <sys/procfs.h> |
12108 | int main () | |
12109 | { | |
12110 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
12111 | return 1; | |
12112 | return 0; | |
12113 | } | |
bec39cab | 12114 | _ACEOF |
81ecdfbb | 12115 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 12116 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
12117 | else |
12118 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 12119 | fi |
81ecdfbb RW |
12120 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12121 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 12122 | fi |
81ecdfbb | 12123 | |
c906108c SS |
12124 | fi |
12125 | ||
81ecdfbb RW |
12126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
12127 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 12128 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 12129 | |
81ecdfbb | 12130 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 12131 | |
97bf5e38 MK |
12132 | fi |
12133 | fi | |
c906108c | 12134 | |
bec39cab | 12135 | |
81ecdfbb RW |
12136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
12137 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
12138 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
12139 | $as_echo_n "(cached) " >&6 | |
c906108c | 12140 | else |
81ecdfbb | 12141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12142 | /* end confdefs.h. */ |
97bf5e38 MK |
12143 | #include <unistd.h> |
12144 | #include <sys/types.h> | |
12145 | #include <sys/procfs.h> | |
12146 | ||
bec39cab AC |
12147 | int |
12148 | main () | |
12149 | { | |
97bf5e38 MK |
12150 | |
12151 | int dummy;; | |
12152 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
12153 | |
12154 | ; | |
12155 | return 0; | |
12156 | } | |
12157 | _ACEOF | |
81ecdfbb | 12158 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12159 | gdb_cv_have_procfs_piocset=yes |
c906108c | 12160 | else |
81ecdfbb | 12161 | gdb_cv_have_procfs_piocset=no |
c906108c | 12162 | fi |
81ecdfbb | 12163 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12164 | fi |
97bf5e38 | 12165 | |
81ecdfbb RW |
12166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
12167 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 12168 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 12169 | |
81ecdfbb | 12170 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
12171 | |
12172 | fi | |
c906108c | 12173 | fi |
c906108c | 12174 | |
97bf5e38 | 12175 | if test ${host} = ${target} ; then |
bec39cab | 12176 | |
81ecdfbb RW |
12177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
12178 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
12179 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
12180 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12181 | else |
81ecdfbb | 12182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12183 | /* end confdefs.h. */ |
97bf5e38 | 12184 | #include <link.h> |
bec39cab AC |
12185 | int |
12186 | main () | |
12187 | { | |
97bf5e38 | 12188 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
12189 | ; |
12190 | return 0; | |
12191 | } | |
12192 | _ACEOF | |
81ecdfbb | 12193 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 12194 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 12195 | else |
81ecdfbb | 12196 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 12197 | fi |
81ecdfbb | 12198 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
12199 | fi |
12200 | ||
81ecdfbb RW |
12201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
12202 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 12203 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 12204 | |
81ecdfbb | 12205 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
12206 | |
12207 | fi | |
12208 | ||
bec39cab | 12209 | |
81ecdfbb RW |
12210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
12211 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
12212 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
12213 | $as_echo_n "(cached) " >&6 | |
c906108c | 12214 | else |
81ecdfbb | 12215 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12216 | /* end confdefs.h. */ |
97bf5e38 MK |
12217 | #include <sys/types.h> |
12218 | #include <link.h> | |
bec39cab AC |
12219 | int |
12220 | main () | |
12221 | { | |
97bf5e38 | 12222 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
12223 | ; |
12224 | return 0; | |
12225 | } | |
12226 | _ACEOF | |
81ecdfbb | 12227 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12228 | gdb_cv_have_struct_link_map_with_lm_members=yes |
12229 | else | |
81ecdfbb | 12230 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 12231 | fi |
81ecdfbb | 12232 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12233 | fi |
c906108c | 12234 | |
81ecdfbb RW |
12235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
12236 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 12237 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 12238 | |
81ecdfbb | 12239 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
12240 | |
12241 | fi | |
12242 | ||
bec39cab | 12243 | |
81ecdfbb RW |
12244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
12245 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
12246 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
12247 | $as_echo_n "(cached) " >&6 | |
c906108c | 12248 | else |
81ecdfbb | 12249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12250 | /* end confdefs.h. */ |
97bf5e38 MK |
12251 | #include <sys/types.h> |
12252 | #ifdef HAVE_NLIST_H | |
12253 | #include <nlist.h> | |
12254 | #endif | |
12255 | #include <link.h> | |
bec39cab AC |
12256 | int |
12257 | main () | |
12258 | { | |
97bf5e38 | 12259 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
12260 | ; |
12261 | return 0; | |
12262 | } | |
12263 | _ACEOF | |
81ecdfbb | 12264 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12265 | gdb_cv_have_struct_so_map_with_som_members=yes |
12266 | else | |
81ecdfbb | 12267 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 12268 | fi |
81ecdfbb | 12269 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12270 | fi |
c906108c | 12271 | |
81ecdfbb RW |
12272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
12273 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 12274 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 12275 | |
81ecdfbb | 12276 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 12277 | |
97bf5e38 | 12278 | fi |
c906108c | 12279 | |
bec39cab | 12280 | |
81ecdfbb RW |
12281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
12282 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
12283 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
12284 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12285 | else |
81ecdfbb | 12286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12287 | /* end confdefs.h. */ |
97bf5e38 MK |
12288 | #define _SYSCALL32 |
12289 | #include <sys/link.h> | |
bec39cab AC |
12290 | int |
12291 | main () | |
12292 | { | |
97bf5e38 | 12293 | struct link_map32 l; |
bec39cab AC |
12294 | ; |
12295 | return 0; | |
12296 | } | |
12297 | _ACEOF | |
81ecdfbb | 12298 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12299 | gdb_cv_have_struct_link_map32=yes |
12300 | else | |
81ecdfbb | 12301 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 12302 | fi |
81ecdfbb | 12303 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12304 | fi |
c906108c | 12305 | |
81ecdfbb RW |
12306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
12307 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 12308 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 12309 | |
81ecdfbb | 12310 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 12311 | |
60ca704f | 12312 | |
81ecdfbb | 12313 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 12314 | |
97bf5e38 MK |
12315 | fi |
12316 | fi | |
c906108c | 12317 | |
bc8bcb4b | 12318 | # Check if the compiler supports the `long long' type. |
c906108c | 12319 | |
81ecdfbb RW |
12320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
12321 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
12322 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
12323 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12324 | else |
81ecdfbb | 12325 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12326 | /* end confdefs.h. */ |
bc8bcb4b | 12327 | extern long long foo; |
bec39cab AC |
12328 | int |
12329 | main () | |
12330 | { | |
bc8bcb4b | 12331 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
12332 | ; |
12333 | return 0; | |
12334 | } | |
12335 | _ACEOF | |
81ecdfbb | 12336 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
12337 | gdb_cv_c_long_long=yes |
12338 | else | |
81ecdfbb | 12339 | gdb_cv_c_long_long=no |
97bf5e38 | 12340 | fi |
81ecdfbb | 12341 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12342 | fi |
81ecdfbb RW |
12343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
12344 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 12345 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 12346 | |
81ecdfbb | 12347 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
12348 | |
12349 | fi | |
12350 | ||
bc8bcb4b | 12351 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 12352 | |
81ecdfbb RW |
12353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
12354 | $as_echo_n "checking for long long support in printf... " >&6; } | |
12355 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
12356 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12357 | else |
81ecdfbb | 12358 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12359 | gdb_cv_printf_has_long_long=no |
12360 | else | |
81ecdfbb | 12361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12362 | /* end confdefs.h. */ |
bc8bcb4b MK |
12363 | $ac_includes_default |
12364 | int | |
12365 | main () | |
12366 | { | |
12367 | char buf[32]; | |
97bf5e38 MK |
12368 | long long l = 0; |
12369 | l = (l << 16) + 0x0123; | |
12370 | l = (l << 16) + 0x4567; | |
12371 | l = (l << 16) + 0x89ab; | |
12372 | l = (l << 16) + 0xcdef; | |
12373 | sprintf (buf, "0x%016llx", l); | |
12374 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
12375 | ; |
12376 | return 0; | |
c906108c | 12377 | } |
bec39cab | 12378 | _ACEOF |
81ecdfbb | 12379 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
12380 | gdb_cv_printf_has_long_long=yes |
12381 | else | |
81ecdfbb | 12382 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 12383 | fi |
81ecdfbb RW |
12384 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12385 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12386 | fi |
81ecdfbb | 12387 | |
97bf5e38 | 12388 | fi |
81ecdfbb RW |
12389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
12390 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 12391 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 12392 | |
81ecdfbb | 12393 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
12394 | |
12395 | fi | |
97bf5e38 | 12396 | |
1a619819 LM |
12397 | # Check if the compiler and runtime support printing decfloats. |
12398 | ||
81ecdfbb RW |
12399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
12400 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
12401 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
12402 | $as_echo_n "(cached) " >&6 | |
1a619819 | 12403 | else |
81ecdfbb | 12404 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
12405 | gdb_cv_printf_has_decfloat=no |
12406 | else | |
81ecdfbb | 12407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
12408 | /* end confdefs.h. */ |
12409 | $ac_includes_default | |
12410 | int | |
12411 | main () | |
12412 | { | |
12413 | char buf[64]; | |
12414 | _Decimal32 d32 = 1.2345df; | |
12415 | _Decimal64 d64 = 1.2345dd; | |
12416 | _Decimal128 d128 = 1.2345dl; | |
12417 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
12418 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
12419 | ; | |
12420 | return 0; | |
12421 | } | |
12422 | _ACEOF | |
81ecdfbb | 12423 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
12424 | gdb_cv_printf_has_decfloat=yes |
12425 | else | |
81ecdfbb | 12426 | gdb_cv_printf_has_decfloat=no |
1a619819 | 12427 | fi |
81ecdfbb RW |
12428 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12429 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 12430 | fi |
81ecdfbb | 12431 | |
1a619819 | 12432 | fi |
81ecdfbb RW |
12433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
12434 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
12435 | if test $gdb_cv_printf_has_decfloat = yes; then |
12436 | ||
81ecdfbb | 12437 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
12438 | |
12439 | fi | |
12440 | ||
bc8bcb4b MK |
12441 | # Check if the compiler supports the `long double' type. We can't use |
12442 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
12443 | # constants defined in <float.h> that fail on some systems, | |
12444 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 12445 | |
81ecdfbb RW |
12446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
12447 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
12448 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
12449 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12450 | else |
81ecdfbb | 12451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12452 | /* end confdefs.h. */ |
97bf5e38 | 12453 | long double foo; |
bec39cab | 12454 | _ACEOF |
81ecdfbb | 12455 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 12456 | gdb_cv_c_long_double=yes |
97bf5e38 | 12457 | else |
81ecdfbb | 12458 | gdb_cv_c_long_double=no |
97bf5e38 | 12459 | fi |
81ecdfbb | 12460 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 12461 | fi |
81ecdfbb RW |
12462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
12463 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 12464 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 12465 | |
81ecdfbb | 12466 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12467 | |
12468 | fi | |
12469 | ||
bc8bcb4b | 12470 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 12471 | |
81ecdfbb RW |
12472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
12473 | $as_echo_n "checking for long double support in printf... " >&6; } | |
12474 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
12475 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12476 | else |
81ecdfbb | 12477 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12478 | gdb_cv_printf_has_long_double=no |
12479 | else | |
81ecdfbb | 12480 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12481 | /* end confdefs.h. */ |
bc8bcb4b MK |
12482 | $ac_includes_default |
12483 | int | |
12484 | main () | |
12485 | { | |
12486 | char buf[16]; | |
97bf5e38 MK |
12487 | long double f = 3.141592653; |
12488 | sprintf (buf, "%Lg", f); | |
12489 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
12490 | ; |
12491 | return 0; | |
97bf5e38 | 12492 | } |
bec39cab | 12493 | _ACEOF |
81ecdfbb | 12494 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 12495 | gdb_cv_printf_has_long_double=yes |
c906108c | 12496 | else |
81ecdfbb | 12497 | gdb_cv_printf_has_long_double=no |
c906108c | 12498 | fi |
81ecdfbb RW |
12499 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12500 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 12501 | fi |
81ecdfbb | 12502 | |
c906108c | 12503 | fi |
81ecdfbb RW |
12504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
12505 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 12506 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 12507 | |
81ecdfbb | 12508 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12509 | |
12510 | fi | |
97bf5e38 | 12511 | |
bc8bcb4b | 12512 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 12513 | |
81ecdfbb RW |
12514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
12515 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
12516 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
12517 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12518 | else |
81ecdfbb | 12519 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
12520 | gdb_cv_scanf_has_long_double=no |
12521 | else | |
81ecdfbb | 12522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12523 | /* end confdefs.h. */ |
bc8bcb4b MK |
12524 | #include <stdio.h> |
12525 | int | |
12526 | main () | |
12527 | { | |
12528 | char *buf = "3.141592653"; | |
97bf5e38 MK |
12529 | long double f = 0; |
12530 | sscanf (buf, "%Lg", &f); | |
12531 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
12532 | ; |
12533 | return 0; | |
97bf5e38 | 12534 | } |
bec39cab | 12535 | _ACEOF |
81ecdfbb | 12536 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
12537 | gdb_cv_scanf_has_long_double=yes |
12538 | else | |
81ecdfbb | 12539 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 12540 | fi |
81ecdfbb RW |
12541 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12542 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12543 | fi |
81ecdfbb | 12544 | |
c906108c | 12545 | fi |
81ecdfbb RW |
12546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
12547 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 12548 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 12549 | |
81ecdfbb | 12550 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
12551 | |
12552 | fi | |
c906108c | 12553 | |
438013df AO |
12554 | case ${host_os} in |
12555 | aix*) | |
81ecdfbb RW |
12556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
12557 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
12558 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
12559 | $as_echo_n "(cached) " >&6 | |
438013df | 12560 | else |
bec39cab | 12561 | |
438013df AO |
12562 | SAVE_LDFLAGS=$LDFLAGS |
12563 | ||
12564 | case $GCC in | |
12565 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
12566 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
12567 | esac | |
12568 | ||
12569 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 12570 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12571 | /* end confdefs.h. */ |
438013df | 12572 | |
bec39cab AC |
12573 | int |
12574 | main () | |
12575 | { | |
438013df | 12576 | int i; |
bec39cab AC |
12577 | ; |
12578 | return 0; | |
12579 | } | |
12580 | _ACEOF | |
81ecdfbb | 12581 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 12582 | |
81ecdfbb RW |
12583 | else |
12584 | gdb_cv_bigtoc= | |
438013df | 12585 | fi |
81ecdfbb RW |
12586 | rm -f core conftest.err conftest.$ac_objext \ |
12587 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 12588 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 12589 | |
bec39cab | 12590 | fi |
81ecdfbb RW |
12591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
12592 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
12593 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
12594 | ;; | |
12595 | esac | |
12596 | ||
c906108c SS |
12597 | |
12598 | ||
12599 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
12600 | case ${host_os} in | |
12601 | hpux*) | |
81ecdfbb RW |
12602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5 |
12603 | $as_echo_n "checking for HPUX/OSF thread support... " >&6; } | |
c906108c SS |
12604 | if test -f /usr/include/dce/cma_config.h ; then |
12605 | if test "$GCC" = "yes" ; then | |
81ecdfbb RW |
12606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12607 | $as_echo "yes" >&6; } | |
60ca704f | 12608 | |
81ecdfbb | 12609 | $as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h |
c906108c | 12610 | |
3483b318 | 12611 | CONFIG_OBS="${CONFIG_OBS} hpux-thread.o" |
c906108c SS |
12612 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
12613 | else | |
81ecdfbb RW |
12614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5 |
12615 | $as_echo "no (suppressed because you are not using GCC)" >&6; } | |
c906108c SS |
12616 | fi |
12617 | else | |
81ecdfbb RW |
12618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12619 | $as_echo "no" >&6; } | |
c906108c SS |
12620 | fi |
12621 | ;; | |
12622 | solaris*) | |
d92419e5 JB |
12623 | # See if thread_db library is around for Solaris thread debugging. |
12624 | # Note that we must explicitly test for version 1 of the library | |
12625 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
12626 | # the same API. | |
81ecdfbb RW |
12627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
12628 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 12629 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
12630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12631 | $as_echo "yes" >&6; } | |
60ca704f | 12632 | |
81ecdfbb | 12633 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 12634 | |
3483b318 | 12635 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 12636 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
12637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
12638 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
12639 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
12640 | $as_echo_n "(cached) " >&6 | |
c906108c | 12641 | else |
bec39cab | 12642 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 12643 | LIBS="-ldl $LIBS" |
81ecdfbb | 12644 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
12645 | /* end confdefs.h. */ |
12646 | ||
81ecdfbb RW |
12647 | /* Override any GCC internal prototype to avoid an error. |
12648 | Use char because int might match the return type of a GCC | |
12649 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
12650 | #ifdef __cplusplus |
12651 | extern "C" | |
12652 | #endif | |
bec39cab AC |
12653 | char dlopen (); |
12654 | int | |
12655 | main () | |
12656 | { | |
81ecdfbb | 12657 | return dlopen (); |
bec39cab AC |
12658 | ; |
12659 | return 0; | |
12660 | } | |
12661 | _ACEOF | |
81ecdfbb | 12662 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
12663 | ac_cv_lib_dl_dlopen=yes |
12664 | else | |
81ecdfbb | 12665 | ac_cv_lib_dl_dlopen=no |
bec39cab | 12666 | fi |
81ecdfbb RW |
12667 | rm -f core conftest.err conftest.$ac_objext \ |
12668 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
12669 | LIBS=$ac_check_lib_save_LIBS |
12670 | fi | |
81ecdfbb RW |
12671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
12672 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
12673 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
12674 | cat >>confdefs.h <<_ACEOF |
12675 | #define HAVE_LIBDL 1 | |
12676 | _ACEOF | |
c906108c SS |
12677 | |
12678 | LIBS="-ldl $LIBS" | |
12679 | ||
c906108c SS |
12680 | fi |
12681 | ||
12682 | if test "$GCC" = "yes" ; then | |
12683 | # The GNU linker requires the -export-dynamic option to make | |
12684 | # all symbols visible in the dynamic symbol table. | |
12685 | hold_ldflags=$LDFLAGS | |
81ecdfbb RW |
12686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5 |
12687 | $as_echo_n "checking for the ld -export-dynamic flag... " >&6; } | |
c906108c | 12688 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
81ecdfbb | 12689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12690 | /* end confdefs.h. */ |
c906108c | 12691 | |
bec39cab AC |
12692 | int |
12693 | main () | |
12694 | { | |
c906108c | 12695 | int i; |
bec39cab AC |
12696 | ; |
12697 | return 0; | |
12698 | } | |
12699 | _ACEOF | |
81ecdfbb | 12700 | if ac_fn_c_try_link "$LINENO"; then : |
c906108c SS |
12701 | found=yes |
12702 | else | |
81ecdfbb | 12703 | found=no |
c906108c | 12704 | fi |
81ecdfbb RW |
12705 | rm -f core conftest.err conftest.$ac_objext \ |
12706 | conftest$ac_exeext conftest.$ac_ext | |
c906108c | 12707 | LDFLAGS=$hold_ldflags |
81ecdfbb RW |
12708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
12709 | $as_echo "$found" >&6; } | |
c906108c SS |
12710 | if test $found = yes; then |
12711 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
12712 | fi | |
12713 | fi | |
12714 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
12715 | # at one point. | |
81ecdfbb RW |
12716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
12717 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
12718 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
12719 | $as_echo_n "(cached) " >&6 | |
c906108c | 12720 | else |
bec39cab | 12721 | |
81ecdfbb | 12722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12723 | /* end confdefs.h. */ |
c906108c SS |
12724 | |
12725 | #include <proc_service.h> | |
12726 | ps_err_e ps_pdwrite | |
12727 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 12728 | |
bec39cab AC |
12729 | int |
12730 | main () | |
12731 | { | |
12732 | ||
12733 | ; | |
12734 | return 0; | |
12735 | } | |
12736 | _ACEOF | |
81ecdfbb | 12737 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
12738 | gdb_cv_proc_service_is_old=no |
12739 | else | |
81ecdfbb | 12740 | gdb_cv_proc_service_is_old=yes |
c906108c | 12741 | fi |
81ecdfbb | 12742 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12743 | |
c906108c SS |
12744 | fi |
12745 | ||
81ecdfbb RW |
12746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
12747 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 12748 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 12749 | |
81ecdfbb | 12750 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
12751 | |
12752 | fi | |
12753 | else | |
81ecdfbb RW |
12754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12755 | $as_echo "no" >&6; } | |
c906108c SS |
12756 | fi |
12757 | ;; | |
d92419e5 | 12758 | aix*) |
81ecdfbb RW |
12759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
12760 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
12761 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
12762 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12763 | else |
81ecdfbb | 12764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12765 | /* end confdefs.h. */ |
d92419e5 | 12766 | #include <sys/pthdebug.h> |
bec39cab AC |
12767 | int |
12768 | main () | |
12769 | { | |
d92419e5 JB |
12770 | #ifndef PTHDB_VERSION_3 |
12771 | #error | |
12772 | #endif | |
bec39cab AC |
12773 | ; |
12774 | return 0; | |
12775 | } | |
12776 | _ACEOF | |
81ecdfbb | 12777 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
12778 | gdb_cv_have_aix_thread_debug=yes |
12779 | else | |
81ecdfbb | 12780 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 12781 | fi |
81ecdfbb | 12782 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
12783 | fi |
12784 | ||
81ecdfbb RW |
12785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
12786 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
12787 | if test $gdb_cv_have_aix_thread_debug = yes; then |
12788 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 12789 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
12790 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
12791 | fi | |
12792 | ;; | |
c906108c | 12793 | esac |
bec39cab | 12794 | |
c906108c SS |
12795 | fi |
12796 | ||
3f47be5c | 12797 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
12798 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
12799 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
12800 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
12801 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12802 | else |
81ecdfbb | 12803 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12804 | /* end confdefs.h. */ |
3f47be5c | 12805 | #include <thread_db.h> |
bec39cab AC |
12806 | int |
12807 | main () | |
12808 | { | |
3f47be5c | 12809 | int i = TD_NOTALLOC; |
bec39cab AC |
12810 | ; |
12811 | return 0; | |
12812 | } | |
12813 | _ACEOF | |
81ecdfbb | 12814 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12815 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12816 | else | |
81ecdfbb | 12817 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12818 | |
3f47be5c | 12819 | fi |
81ecdfbb | 12820 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12821 | |
bec39cab | 12822 | fi |
81ecdfbb RW |
12823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12824 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12826 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12827 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12828 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12829 | else |
81ecdfbb | 12830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12831 | /* end confdefs.h. */ |
12832 | #include <thread_db.h> | |
12833 | int | |
12834 | main () | |
12835 | { | |
12836 | int i = TD_VERSION; | |
12837 | ; | |
12838 | return 0; | |
12839 | } | |
12840 | _ACEOF | |
81ecdfbb | 12841 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12842 | gdb_cv_thread_db_h_has_td_version=yes |
12843 | else | |
81ecdfbb | 12844 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12845 | |
12846 | fi | |
81ecdfbb | 12847 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12848 | |
12849 | fi | |
81ecdfbb RW |
12850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12851 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12853 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12854 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12855 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12856 | else |
81ecdfbb | 12857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12858 | /* end confdefs.h. */ |
12859 | #include <thread_db.h> | |
12860 | int | |
12861 | main () | |
12862 | { | |
12863 | int i = TD_NOTLS; | |
12864 | ; | |
12865 | return 0; | |
12866 | } | |
12867 | _ACEOF | |
81ecdfbb | 12868 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12869 | gdb_cv_thread_db_h_has_td_notls=yes |
12870 | else | |
81ecdfbb | 12871 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12872 | |
12873 | fi | |
81ecdfbb | 12874 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12875 | |
12876 | fi | |
81ecdfbb RW |
12877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12878 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12879 | fi |
12880 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12881 | |
81ecdfbb | 12882 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12883 | |
59f80f10 DJ |
12884 | fi |
12885 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12886 | ||
81ecdfbb | 12887 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12888 | |
12889 | fi | |
12890 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12891 | ||
81ecdfbb | 12892 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12893 | |
3f47be5c EZ |
12894 | fi |
12895 | ||
b757528f | 12896 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12898 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12899 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
12900 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12901 | else |
81ecdfbb | 12902 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12903 | /* end confdefs.h. */ |
b757528f | 12904 | #include <sys/syscall.h> |
bec39cab AC |
12905 | int |
12906 | main () | |
12907 | { | |
b757528f | 12908 | int i = __NR_tkill; |
bec39cab AC |
12909 | ; |
12910 | return 0; | |
12911 | } | |
12912 | _ACEOF | |
81ecdfbb | 12913 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12914 | gdb_cv_sys_syscall_h_has_tkill=yes |
12915 | else | |
81ecdfbb | 12916 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12917 | |
b757528f | 12918 | fi |
81ecdfbb | 12919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12920 | |
bec39cab | 12921 | fi |
81ecdfbb RW |
12922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12923 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
12924 | fi |
12925 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 12926 | |
81ecdfbb | 12927 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
12928 | |
12929 | fi | |
12930 | ||
81ecdfbb RW |
12931 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12932 | " | |
12933 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12934 | ac_have_decl=1 | |
10568435 | 12935 | else |
81ecdfbb | 12936 | ac_have_decl=0 |
10568435 | 12937 | fi |
10568435 JK |
12938 | |
12939 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12940 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12941 | _ACEOF |
12942 | ||
12943 | ||
81ecdfbb RW |
12944 | if test "$cross_compiling" = yes; then : |
12945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12946 | /* end confdefs.h. */ |
12947 | #include <sys/personality.h> | |
12948 | int | |
12949 | main () | |
12950 | { | |
12951 | ||
12952 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12953 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12954 | # endif | |
12955 | /* Test the flag could be set and stays set. */ | |
12956 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12957 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12958 | return 1 | |
12959 | ; | |
12960 | return 0; | |
12961 | } | |
12962 | _ACEOF | |
81ecdfbb | 12963 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12964 | have_personality=true |
12965 | else | |
81ecdfbb | 12966 | have_personality=false |
10568435 | 12967 | fi |
81ecdfbb RW |
12968 | rm -f core conftest.err conftest.$ac_objext \ |
12969 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12970 | else |
81ecdfbb | 12971 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12972 | /* end confdefs.h. */ |
12973 | #include <sys/personality.h> | |
12974 | int | |
12975 | main () | |
12976 | { | |
12977 | ||
12978 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12979 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12980 | # endif | |
12981 | /* Test the flag could be set and stays set. */ | |
12982 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12983 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12984 | return 1 | |
12985 | ; | |
12986 | return 0; | |
12987 | } | |
12988 | _ACEOF | |
81ecdfbb | 12989 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12990 | have_personality=true |
12991 | else | |
81ecdfbb | 12992 | have_personality=false |
10568435 | 12993 | fi |
81ecdfbb RW |
12994 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12995 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12996 | fi |
81ecdfbb | 12997 | |
10568435 JK |
12998 | if $have_personality |
12999 | then | |
13000 | ||
81ecdfbb | 13001 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
13002 | |
13003 | fi | |
13004 | ||
fb40c209 | 13005 | |
b14b1491 | 13006 | target_sysroot_reloc=0 |
bec39cab | 13007 | |
81ecdfbb RW |
13008 | # Check whether --with-sysroot was given. |
13009 | if test "${with_sysroot+set}" = set; then : | |
13010 | withval=$with_sysroot; | |
030292b7 | 13011 | case ${with_sysroot} in |
715d1656 | 13012 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
13013 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
13014 | esac | |
13015 | ||
13016 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
13017 | ||
07abfebf RS |
13018 | if test "x$prefix" = xNONE; then |
13019 | test_prefix=/usr/local | |
13020 | else | |
13021 | test_prefix=$prefix | |
13022 | fi | |
aa28a74e | 13023 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
07abfebf | 13024 | test_exec_prefix=$test_prefix |
030292b7 | 13025 | else |
07abfebf | 13026 | test_exec_prefix=$exec_prefix |
030292b7 DJ |
13027 | fi |
13028 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 | 13029 | "${test_prefix}"|"${test_prefix}/"*|\ |
07abfebf RS |
13030 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
13031 | '${prefix}'|'${prefix}/'*|\ | |
715d1656 | 13032 | '${exec_prefix}'|'${exec_prefix}/'*) |
b14b1491 | 13033 | target_sysroot_reloc=1 |
030292b7 DJ |
13034 | ;; |
13035 | esac | |
13036 | ||
13037 | else | |
bec39cab | 13038 | |
030292b7 DJ |
13039 | TARGET_SYSTEM_ROOT= |
13040 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
13041 | ||
81ecdfbb | 13042 | fi |
b14b1491 | 13043 | |
81ecdfbb | 13044 | TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc" |
030292b7 DJ |
13045 | |
13046 | ||
13047 | ||
16e7150e | 13048 | |
16e7150e | 13049 | |
81ecdfbb RW |
13050 | # Check whether --with-system-gdbinit was given. |
13051 | if test "${with_system_gdbinit+set}" = set; then : | |
13052 | withval=$with_system_gdbinit; | |
b14b1491 TT |
13053 | SYSTEM_GDBINIT=$withval |
13054 | else | |
13055 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
13056 | fi |
13057 | ||
16e7150e JG |
13058 | |
13059 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
13060 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 13061 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
13062 | ac_define_dir=`eval echo $ac_define_dir` |
13063 | ||
13064 | cat >>confdefs.h <<_ACEOF | |
13065 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
13066 | _ACEOF | |
13067 | ||
13068 | ||
13069 | ||
b14b1491 TT |
13070 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
13071 | if test "x$prefix" = xNONE; then | |
13072 | test_prefix=/usr/local | |
13073 | else | |
13074 | test_prefix=$prefix | |
13075 | fi | |
13076 | else | |
13077 | test_prefix=$exec_prefix | |
13078 | fi | |
13079 | value=0 | |
13080 | case ${ac_define_dir} in | |
13081 | "${test_prefix}"|"${test_prefix}/"*|\ | |
13082 | '${exec_prefix}'|'${exec_prefix}/'*) | |
13083 | value=1 | |
13084 | ;; | |
13085 | esac | |
16e7150e | 13086 | |
b14b1491 TT |
13087 | cat >>confdefs.h <<_ACEOF |
13088 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
13089 | _ACEOF |
13090 | ||
b14b1491 | 13091 | |
16e7150e | 13092 | |
81ecdfbb RW |
13093 | # Check whether --enable-werror was given. |
13094 | if test "${enable_werror+set}" = set; then : | |
13095 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
13096 | yes | y) ERROR_ON_WARNING="yes" ;; |
13097 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 13098 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 13099 | esac |
81ecdfbb RW |
13100 | fi |
13101 | ||
094a342e MK |
13102 | |
13103 | # Enable -Werror by default when using gcc | |
13104 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
13105 | ERROR_ON_WARNING=yes | |
13106 | fi | |
13107 | ||
13108 | WERROR_CFLAGS="" | |
13109 | if test "${ERROR_ON_WARNING}" = yes ; then | |
13110 | WERROR_CFLAGS="-Werror" | |
13111 | fi | |
13112 | ||
aa79a185 DJ |
13113 | # The entries after -Wno-pointer-sign are disabled warnings which may |
13114 | # be enabled in the future, which can not currently be used to build | |
13115 | # GDB. | |
13116 | # NOTE: If you change this list, remember to update | |
3b851bce | 13117 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
13118 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
13119 | -Wformat-nonliteral -Wno-pointer-sign \ | |
e23525a0 | 13120 | -Wno-unused -Wunused-value -Wno-switch -Wno-char-subscripts" |
a3b362c4 | 13121 | |
3526781e DJ |
13122 | # Enable -Wno-format by default when using gcc on mingw since many |
13123 | # GCC versions complain about %I64. | |
13124 | case "${host}" in | |
13125 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
13126 | esac | |
13127 | ||
81ecdfbb RW |
13128 | # Check whether --enable-build-warnings was given. |
13129 | if test "${enable_build_warnings+set}" = set; then : | |
13130 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
13131 | yes) ;; |
13132 | no) build_warnings="-w";; | |
13133 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13134 | build_warnings="${build_warnings} ${t}";; | |
13135 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13136 | build_warnings="${t} ${build_warnings}";; | |
13137 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
13138 | esac | |
d4f3574e | 13139 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 13140 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 13141 | fi |
81ecdfbb RW |
13142 | fi |
13143 | # Check whether --enable-gdb-build-warnings was given. | |
13144 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
13145 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
13146 | yes) ;; |
13147 | no) build_warnings="-w";; | |
13148 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13149 | build_warnings="${build_warnings} ${t}";; | |
13150 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
13151 | build_warnings="${t} ${build_warnings}";; | |
13152 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
13153 | esac | |
13154 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
13155 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
13156 | fi | |
81ecdfbb RW |
13157 | fi |
13158 | WARN_CFLAGS="" | |
c906108c SS |
13159 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
13160 | then | |
81ecdfbb RW |
13161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
13162 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
13163 | # Separate out the -Werror flag as some files just cannot be |
13164 | # compiled with it enabled. | |
13165 | for w in ${build_warnings}; do | |
13166 | case $w in | |
13167 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
13168 | *) # Check that GCC accepts it | |
4536bbc6 AC |
13169 | saved_CFLAGS="$CFLAGS" |
13170 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 13171 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13172 | /* end confdefs.h. */ |
4536bbc6 | 13173 | |
bec39cab AC |
13174 | int |
13175 | main () | |
13176 | { | |
4536bbc6 | 13177 | |
bec39cab AC |
13178 | ; |
13179 | return 0; | |
13180 | } | |
13181 | _ACEOF | |
81ecdfbb | 13182 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 13183 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 13184 | fi |
81ecdfbb | 13185 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 13186 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
13187 | esac |
13188 | done | |
81ecdfbb RW |
13189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
13190 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
13191 | fi |
13192 | ||
13193 | ||
104c1213 | 13194 | |
7a292a7a | 13195 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
13196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
13197 | $as_echo_n "checking for cygwin... " >&6; } | |
13198 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
13199 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13200 | else |
81ecdfbb | 13201 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13202 | /* end confdefs.h. */ |
7a292a7a SS |
13203 | |
13204 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
13205 | lose | |
13206 | #endif | |
bec39cab | 13207 | _ACEOF |
7a292a7a | 13208 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 13209 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
13210 | gdb_cv_os_cygwin=yes |
13211 | else | |
7a292a7a SS |
13212 | gdb_cv_os_cygwin=no |
13213 | fi | |
13214 | rm -f conftest* | |
13215 | ||
13216 | fi | |
81ecdfbb RW |
13217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
13218 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 13219 | |
aff38e61 | 13220 | |
3eb25fda | 13221 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 13222 | case ${host} in |
95cbc983 AC |
13223 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
13224 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 13225 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
13226 | esac |
13227 | ||
13228 | ||
cd0fc7c3 SS |
13229 | # libreadline needs libuser32.a in a cygwin environment |
13230 | WIN32LIBS= | |
13231 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
13232 | WIN32LIBS="-luser32" |
13233 | case "${target}" in | |
13234 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
13235 | ;; | |
13236 | esac | |
cd0fc7c3 | 13237 | fi |
c906108c | 13238 | |
b4505029 MM |
13239 | # The ser-tcp.c module requires sockets. |
13240 | case ${host} in | |
13241 | *mingw32*) | |
13242 | ||
81ecdfbb | 13243 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
13244 | |
13245 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
13246 | ;; | |
13247 | esac | |
13248 | ||
7a292a7a | 13249 | |
31d99776 DJ |
13250 | # Add ELF support to GDB, but only if BFD includes ELF support. |
13251 | OLD_CFLAGS=$CFLAGS | |
13252 | OLD_LDFLAGS=$LDFLAGS | |
13253 | OLD_LIBS=$LIBS | |
cab58a69 | 13254 | CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" |
31d99776 | 13255 | LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" |
7b3200f9 | 13256 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
0f72fb1c | 13257 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
13258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
13259 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
13260 | if test "${gdb_cv_var_elf+set}" = set; then : | |
13261 | $as_echo_n "(cached) " >&6 | |
31d99776 | 13262 | else |
81ecdfbb | 13263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
13264 | /* end confdefs.h. */ |
13265 | #include <stdlib.h> | |
13266 | #include "bfd.h" | |
13267 | #include "elf-bfd.h" | |
13268 | ||
13269 | int | |
13270 | main () | |
13271 | { | |
13272 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
13273 | ; | |
13274 | return 0; | |
13275 | } | |
13276 | _ACEOF | |
81ecdfbb | 13277 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
13278 | gdb_cv_var_elf=yes |
13279 | else | |
81ecdfbb | 13280 | gdb_cv_var_elf=no |
31d99776 | 13281 | fi |
81ecdfbb RW |
13282 | rm -f core conftest.err conftest.$ac_objext \ |
13283 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 13284 | fi |
81ecdfbb RW |
13285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
13286 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 DJ |
13287 | if test $gdb_cv_var_elf = yes; then |
13288 | CONFIG_OBS="$CONFIG_OBS elfread.o" | |
13289 | ||
81ecdfbb | 13290 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 DJ |
13291 | |
13292 | fi | |
13293 | CFLAGS=$OLD_CFLAGS | |
13294 | LDFLAGS=$OLD_LDFLAGS | |
13295 | LIBS=$OLD_LIBS | |
13296 | ||
121ce6e5 DJ |
13297 | # Add any host-specific objects to GDB. |
13298 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
13299 | ||
3fc11d3e JM |
13300 | LIBGUI="../libgui/src/libgui.a" |
13301 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
13302 | ||
13303 | ||
7a292a7a | 13304 | |
3fc11d3e JM |
13305 | WIN32LDAPP= |
13306 | ||
13307 | ||
13308 | ||
d91670b9 | 13309 | case "${host}" in |
686a5eed | 13310 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
13311 | configdir="win" |
13312 | ;; | |
13313 | *) | |
13314 | configdir="unix" | |
13315 | ;; | |
13316 | esac | |
3fc11d3e JM |
13317 | |
13318 | GDBTKLIBS= | |
13319 | if test "${enable_gdbtk}" = "yes"; then | |
13320 | ||
d1c3b63a KS |
13321 | # Gdbtk must have an absolute path to srcdir in order to run |
13322 | # properly when not installed. | |
13323 | here=`pwd` | |
13324 | cd ${srcdir} | |
13325 | GDBTK_SRC_DIR=`pwd` | |
13326 | cd $here | |
13327 | ||
bec39cab | 13328 | |
5062cc19 KS |
13329 | # |
13330 | # Ok, lets find the tcl configuration | |
13331 | # First, look for one uninstalled. | |
13332 | # the alternative search directory is invoked by --with-tcl | |
13333 | # | |
3fc11d3e | 13334 | |
5062cc19 KS |
13335 | if test x"${no_tcl}" = x ; then |
13336 | # we reset no_tcl in case something fails here | |
13337 | no_tcl=true | |
bec39cab | 13338 | |
81ecdfbb RW |
13339 | # Check whether --with-tcl was given. |
13340 | if test "${with_tcl+set}" = set; then : | |
13341 | withval=$with_tcl; with_tclconfig=${withval} | |
13342 | fi | |
13343 | ||
13344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
13345 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
13346 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
13347 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 13348 | else |
bec39cab | 13349 | |
3fc11d3e | 13350 | |
5062cc19 KS |
13351 | # First check to see if --with-tcl was specified. |
13352 | case "${host}" in | |
13353 | *-*-cygwin*) platDir="win" ;; | |
13354 | *) platDir="unix" ;; | |
13355 | esac | |
13356 | if test x"${with_tclconfig}" != x ; then | |
13357 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
13358 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
13359 | else | |
81ecdfbb | 13360 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13361 | fi |
13362 | fi | |
13363 | ||
13364 | # then check for a private Tcl installation | |
13365 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13366 | for i in \ | |
13367 | ../tcl \ | |
13368 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13369 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
13370 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13371 | ../../tcl \ | |
13372 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13373 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13374 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13375 | ../../../tcl \ | |
13376 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13377 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13378 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13379 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13380 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13381 | break | |
13382 | fi | |
13383 | done | |
13384 | fi | |
13385 | ||
13386 | # on Darwin, check in Framework installation locations | |
13387 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
13388 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13389 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13390 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13391 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13392 | ; do | |
13393 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
13394 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
13395 | break | |
13396 | fi | |
13397 | done | |
13398 | fi | |
13399 | ||
13400 | # check in a few common install locations | |
13401 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13402 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13403 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13404 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13405 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13406 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13407 | `ls -d /usr/lib 2>/dev/null` \ | |
13408 | ; do | |
13409 | if test -f "$i/tclConfig.sh" ; then | |
13410 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
13411 | break | |
13412 | fi | |
13413 | done | |
13414 | fi | |
3fc11d3e | 13415 | |
5062cc19 KS |
13416 | # check in a few other private locations |
13417 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13418 | for i in \ | |
13419 | ${srcdir}/../tcl \ | |
13420 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13421 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
13422 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13423 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13424 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13425 | break | |
13426 | fi | |
13427 | done | |
13428 | fi | |
bec39cab | 13429 | |
3fc11d3e JM |
13430 | fi |
13431 | ||
5062cc19 KS |
13432 | |
13433 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13434 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
13435 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
13436 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
13437 | else |
13438 | no_tcl= | |
13439 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
13440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13441 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
13442 | fi |
13443 | fi | |
3fc11d3e | 13444 | |
bec39cab | 13445 | |
85541719 DE |
13446 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
13447 | # point to doing Tcl. | |
bec39cab | 13448 | |
5062cc19 KS |
13449 | # |
13450 | # Ok, lets find the tk configuration | |
13451 | # First, look for one uninstalled. | |
13452 | # the alternative search directory is invoked by --with-tk | |
13453 | # | |
3fc11d3e | 13454 | |
5062cc19 KS |
13455 | if test x"${no_tk}" = x ; then |
13456 | # we reset no_tk in case something fails here | |
13457 | no_tk=true | |
bec39cab | 13458 | |
81ecdfbb RW |
13459 | # Check whether --with-tk was given. |
13460 | if test "${with_tk+set}" = set; then : | |
13461 | withval=$with_tk; with_tkconfig=${withval} | |
13462 | fi | |
13463 | ||
13464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
13465 | $as_echo_n "checking for Tk configuration... " >&6; } | |
13466 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
13467 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13468 | else |
3fc11d3e JM |
13469 | |
13470 | ||
5062cc19 KS |
13471 | # First check to see if --with-tkconfig was specified. |
13472 | if test x"${with_tkconfig}" != x ; then | |
13473 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
13474 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
13475 | else | |
81ecdfbb | 13476 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13477 | fi |
13478 | fi | |
3fc11d3e | 13479 | |
5062cc19 KS |
13480 | # then check for a private Tk library |
13481 | case "${host}" in | |
13482 | *-*-cygwin*) platDir="win" ;; | |
13483 | *) platDir="unix" ;; | |
13484 | esac | |
13485 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13486 | for i in \ | |
13487 | ../tk \ | |
13488 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13489 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
13490 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
13491 | ../../tk \ | |
13492 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13493 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
13494 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
13495 | ../../../tk \ | |
13496 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13497 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
13498 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13499 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13500 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13501 | break | |
13502 | fi | |
13503 | done | |
13504 | fi | |
13505 | ||
13506 | # on Darwin, check in Framework installation locations | |
13507 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
13508 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13509 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13510 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13511 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13512 | ; do | |
13513 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
13514 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
13515 | break | |
13516 | fi | |
13517 | done | |
13518 | fi | |
13519 | ||
13520 | # check in a few common install locations | |
13521 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13522 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13523 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13524 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13525 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13526 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13527 | `ls -d /usr/lib 2>/dev/null` \ | |
13528 | ; do | |
13529 | if test -f "$i/tkConfig.sh" ; then | |
13530 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
13531 | break | |
13532 | fi | |
13533 | done | |
13534 | fi | |
13535 | # check in a few other private locations | |
13536 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13537 | for i in \ | |
13538 | ${srcdir}/../tk \ | |
13539 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13540 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
13541 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13542 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13543 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13544 | break | |
13545 | fi | |
13546 | done | |
13547 | fi | |
3fc11d3e | 13548 | |
3fc11d3e JM |
13549 | fi |
13550 | ||
13551 | ||
5062cc19 KS |
13552 | if test x"${ac_cv_c_tkconfig}" = x ; then |
13553 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
13554 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
13555 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
13556 | else |
13557 | no_tk= | |
13558 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
13559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13560 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 13561 | fi |
3fc11d3e | 13562 | fi |
dd2504ab | 13563 | |
dd2504ab | 13564 | |
85541719 DE |
13565 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
13566 | ||
81ecdfbb RW |
13567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13568 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
13569 | |
13570 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
13571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
13572 | $as_echo "loading" >&6; } | |
85541719 DE |
13573 | . ${TCL_BIN_DIR}/tclConfig.sh |
13574 | else | |
81ecdfbb RW |
13575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13576 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
13577 | fi |
13578 | ||
13579 | # eval is required to do the TCL_DBGX substitution | |
13580 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
13581 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
13582 | ||
13583 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
13584 | # then set the common variable name to the value of the build variables. | |
13585 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
13586 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
13587 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
13588 | # installed and uninstalled version of Tcl. | |
13589 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
13590 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
13591 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
13592 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
13593 | elif test "`uname -s`" = "Darwin"; then | |
13594 | # If Tcl was built as a framework, attempt to use the libraries | |
13595 | # from the framework at the given location so that linking works | |
13596 | # against Tcl.framework installed in an arbitary location. | |
13597 | case ${TCL_DEFS} in | |
13598 | *TCL_FRAMEWORK*) | |
13599 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
13600 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
13601 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
13602 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
13603 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
13604 | break | |
13605 | fi | |
13606 | done | |
13607 | fi | |
13608 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
13609 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
13610 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
13611 | fi | |
13612 | ;; | |
13613 | esac | |
13614 | fi | |
13615 | ||
13616 | # eval is required to do the TCL_DBGX substitution | |
13617 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
13618 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
13619 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
13620 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
13621 | ||
13622 | ||
13623 | ||
13624 | ||
13625 | ||
13626 | ||
13627 | ||
13628 | ||
13629 | ||
13630 | ||
13631 | ||
13632 | ||
13633 | ||
13634 | ||
13635 | ||
13636 | # Check for in-tree tcl | |
13637 | here=`pwd` | |
13638 | cd ${srcdir}/.. | |
13639 | topdir=`pwd` | |
13640 | cd ${here} | |
13641 | ||
13642 | intree="no" | |
13643 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
13644 | intree="yes" | |
13645 | fi | |
13646 | ||
13647 | # Find Tcl private headers | |
13648 | if test x"${intree}" = xno; then | |
13649 | ||
81ecdfbb RW |
13650 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
13651 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
13652 | private_dir="" |
13653 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
13654 | if test -f ${dir}/tclInt.h ; then | |
13655 | private_dir=${dir} | |
13656 | fi | |
13657 | ||
13658 | if test x"${private_dir}" = x; then | |
81ecdfbb | 13659 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
13660 | else |
13661 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
13662 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
13663 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
13664 | fi |
13665 | ||
13666 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
13667 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
13668 | TCL_DEPS="" | |
13669 | else | |
13670 | # If building tcl in the same src tree, private headers | |
13671 | # are not needed, but we need to be sure to use the right | |
13672 | # headers library | |
13673 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
13674 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
13675 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
13676 | fi | |
13677 | ||
13678 | ||
13679 | ||
13680 | ||
13681 | ||
81ecdfbb RW |
13682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13683 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 13684 | |
5062cc19 | 13685 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
13686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
13687 | $as_echo "loading" >&6; } | |
5062cc19 | 13688 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 13689 | else |
81ecdfbb RW |
13690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13691 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 13692 | fi |
bec39cab | 13693 | |
5062cc19 KS |
13694 | # eval is required to do the TK_DBGX substitution |
13695 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
13696 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
13697 | ||
13698 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
13699 | # then set the common variable name to the value of the build variables. | |
13700 | # For example, the variable TK_LIB_SPEC will be set to the value | |
13701 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
13702 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
13703 | # installed and uninstalled version of Tcl. | |
85541719 | 13704 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
13705 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
13706 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
13707 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
13708 | elif test "`uname -s`" = "Darwin"; then | |
13709 | # If Tk was built as a framework, attempt to use the libraries | |
13710 | # from the framework at the given location so that linking works | |
13711 | # against Tk.framework installed in an arbitary location. | |
13712 | case ${TK_DEFS} in | |
13713 | *TK_FRAMEWORK*) | |
85541719 | 13714 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
13715 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
13716 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
13717 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
13718 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
13719 | break | |
13720 | fi | |
13721 | done | |
13722 | fi | |
85541719 | 13723 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
13724 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
13725 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
13726 | fi | |
13727 | ;; | |
13728 | esac | |
3fc11d3e JM |
13729 | fi |
13730 | ||
5062cc19 KS |
13731 | # eval is required to do the TK_DBGX substitution |
13732 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
13733 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
13734 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
13735 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 13736 | |
3fc11d3e JM |
13737 | |
13738 | ||
bec39cab AC |
13739 | |
13740 | ||
13741 | ||
13742 | ||
13743 | ||
13744 | ||
13745 | ||
3fc11d3e | 13746 | |
3fc11d3e | 13747 | |
bec39cab | 13748 | |
bec39cab | 13749 | |
85541719 DE |
13750 | # Check for in-tree Tk |
13751 | intree="no" | |
13752 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
13753 | intree="yes" | |
13754 | fi | |
3fc11d3e | 13755 | |
85541719 DE |
13756 | # Find Tk private headers |
13757 | if test x"${intree}" = xno; then | |
3fc11d3e | 13758 | |
81ecdfbb RW |
13759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
13760 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
13761 | private_dir="" |
13762 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
13763 | if test -f ${dir}/tkInt.h; then | |
13764 | private_dir=${dir} | |
3fc11d3e | 13765 | fi |
bec39cab | 13766 | |
5062cc19 | 13767 | if test x"${private_dir}" = x; then |
81ecdfbb | 13768 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 13769 | else |
5062cc19 | 13770 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
13771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
13772 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 13773 | fi |
3fc11d3e | 13774 | |
85541719 DE |
13775 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
13776 | TK_LIBRARY=${TK_LIB_SPEC} | |
13777 | TK_DEPS="" | |
13778 | else | |
13779 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
13780 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
13781 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
13782 | fi | |
3fc11d3e JM |
13783 | |
13784 | ||
3fc11d3e JM |
13785 | |
13786 | ||
3fc11d3e | 13787 | |
85541719 | 13788 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 13789 | |
85541719 DE |
13790 | # Include some libraries that Tcl and Tk want. |
13791 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
13792 | # Yes, the ordering seems wrong here. But it isn't. | |
13793 | # TK_LIBS is the list of libraries that need to be linked | |
13794 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
13795 | # were in LIBS then any link tests after this point would | |
13796 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
13797 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 13798 | |
85541719 DE |
13799 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
13800 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
13801 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
13802 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
13803 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
13804 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
13805 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 13806 | |
85541719 DE |
13807 | if test x$gdb_cv_os_cygwin = xyes; then |
13808 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
13809 | WIN32LDAPP="-Wl,--subsystem,console" | |
13810 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 13811 | fi |
ffc6a242 | 13812 | |
81ecdfbb | 13813 | subdirs="$subdirs gdbtk" |
3ace7edb | 13814 | |
85541719 | 13815 | fi |
3fc11d3e JM |
13816 | fi |
13817 | ||
13818 | ||
13819 | ||
13820 | ||
13821 | ||
13822 | ||
13823 | ||
13824 | ||
81ecdfbb RW |
13825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
13826 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 13827 | |
c906108c | 13828 | |
81ecdfbb RW |
13829 | # Check whether --with-x was given. |
13830 | if test "${with_x+set}" = set; then : | |
13831 | withval=$with_x; | |
13832 | fi | |
c906108c SS |
13833 | |
13834 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
13835 | if test "x$with_x" = xno; then | |
13836 | # The user explicitly disabled X. | |
13837 | have_x=disabled | |
13838 | else | |
81ecdfbb RW |
13839 | case $x_includes,$x_libraries in #( |
13840 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
13841 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
13842 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
13843 | else |
13844 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 13845 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 13846 | rm -f -r conftest.dir |
bec39cab AC |
13847 | if mkdir conftest.dir; then |
13848 | cd conftest.dir | |
bec39cab | 13849 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
13850 | incroot: |
13851 | @echo incroot='${INCROOT}' | |
13852 | usrlibdir: | |
13853 | @echo usrlibdir='${USRLIBDIR}' | |
13854 | libdir: | |
13855 | @echo libdir='${LIBDIR}' | |
13856 | _ACEOF | |
13857 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 13858 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
13859 | for ac_var in incroot usrlibdir libdir; do |
13860 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
13861 | done | |
c906108c | 13862 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
13863 | for ac_extension in a so sl dylib la dll; do |
13864 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
13865 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 13866 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
13867 | fi |
13868 | done | |
13869 | # Screen out bogus values from the imake configuration. They are | |
13870 | # bogus both because they are the default anyway, and because | |
13871 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 13872 | case $ac_im_incroot in |
81ecdfbb | 13873 | /usr/include) ac_x_includes= ;; |
bec39cab | 13874 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 13875 | esac |
bec39cab | 13876 | case $ac_im_usrlibdir in |
81ecdfbb | 13877 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 13878 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
13879 | esac |
13880 | fi | |
13881 | cd .. | |
81ecdfbb | 13882 | rm -f -r conftest.dir |
c906108c SS |
13883 | fi |
13884 | ||
bec39cab AC |
13885 | # Standard set of common directories for X headers. |
13886 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
13887 | ac_x_header_dirs=' | |
13888 | /usr/X11/include | |
81ecdfbb | 13889 | /usr/X11R7/include |
bec39cab AC |
13890 | /usr/X11R6/include |
13891 | /usr/X11R5/include | |
13892 | /usr/X11R4/include | |
13893 | ||
13894 | /usr/include/X11 | |
81ecdfbb | 13895 | /usr/include/X11R7 |
bec39cab AC |
13896 | /usr/include/X11R6 |
13897 | /usr/include/X11R5 | |
13898 | /usr/include/X11R4 | |
13899 | ||
13900 | /usr/local/X11/include | |
81ecdfbb | 13901 | /usr/local/X11R7/include |
bec39cab AC |
13902 | /usr/local/X11R6/include |
13903 | /usr/local/X11R5/include | |
13904 | /usr/local/X11R4/include | |
13905 | ||
13906 | /usr/local/include/X11 | |
81ecdfbb | 13907 | /usr/local/include/X11R7 |
bec39cab AC |
13908 | /usr/local/include/X11R6 |
13909 | /usr/local/include/X11R5 | |
13910 | /usr/local/include/X11R4 | |
13911 | ||
13912 | /usr/X386/include | |
13913 | /usr/x386/include | |
13914 | /usr/XFree86/include/X11 | |
13915 | ||
13916 | /usr/include | |
13917 | /usr/local/include | |
13918 | /usr/unsupported/include | |
13919 | /usr/athena/include | |
13920 | /usr/local/x11r5/include | |
13921 | /usr/lpp/Xamples/include | |
13922 | ||
13923 | /usr/openwin/include | |
13924 | /usr/openwin/share/include' | |
13925 | ||
13926 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 13927 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 13928 | # First, try using that file with no special directory specified. |
81ecdfbb | 13929 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13930 | /* end confdefs.h. */ |
81ecdfbb | 13931 | #include <X11/Xlib.h> |
bec39cab | 13932 | _ACEOF |
81ecdfbb | 13933 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
13934 | # We can compile using X headers with no special include directory. |
13935 | ac_x_includes= | |
13936 | else | |
bec39cab | 13937 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 13938 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
13939 | ac_x_includes=$ac_dir |
13940 | break | |
13941 | fi | |
13942 | done | |
c906108c | 13943 | fi |
bec39cab AC |
13944 | rm -f conftest.err conftest.$ac_ext |
13945 | fi # $ac_x_includes = no | |
c906108c | 13946 | |
bec39cab | 13947 | if test "$ac_x_libraries" = no; then |
c906108c | 13948 | # Check for the libraries. |
c906108c SS |
13949 | # See if we find them without any special options. |
13950 | # Don't add to $LIBS permanently. | |
bec39cab | 13951 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
13952 | LIBS="-lX11 $LIBS" |
13953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 13954 | /* end confdefs.h. */ |
81ecdfbb | 13955 | #include <X11/Xlib.h> |
bec39cab AC |
13956 | int |
13957 | main () | |
13958 | { | |
81ecdfbb | 13959 | XrmInitialize () |
bec39cab AC |
13960 | ; |
13961 | return 0; | |
13962 | } | |
13963 | _ACEOF | |
81ecdfbb | 13964 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 13965 | LIBS=$ac_save_LIBS |
c906108c SS |
13966 | # We can link X programs with no special library path. |
13967 | ac_x_libraries= | |
13968 | else | |
81ecdfbb RW |
13969 | LIBS=$ac_save_LIBS |
13970 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 13971 | do |
bec39cab | 13972 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
13973 | for ac_extension in a so sl dylib la dll; do |
13974 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
13975 | ac_x_libraries=$ac_dir |
13976 | break 2 | |
13977 | fi | |
13978 | done | |
13979 | done | |
13980 | fi | |
81ecdfbb RW |
13981 | rm -f core conftest.err conftest.$ac_objext \ |
13982 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 13983 | fi # $ac_x_libraries = no |
c906108c | 13984 | |
81ecdfbb RW |
13985 | case $ac_x_includes,$ac_x_libraries in #( |
13986 | no,* | *,no | *\'*) | |
13987 | # Didn't find X, or a directory has "'" in its name. | |
13988 | ac_cv_have_x="have_x=no";; #( | |
13989 | *) | |
13990 | # Record where we found X for the cache. | |
13991 | ac_cv_have_x="have_x=yes\ | |
13992 | ac_x_includes='$ac_x_includes'\ | |
13993 | ac_x_libraries='$ac_x_libraries'" | |
13994 | esac | |
c906108c | 13995 | fi |
81ecdfbb RW |
13996 | ;; #( |
13997 | *) have_x=yes;; | |
13998 | esac | |
c906108c SS |
13999 | eval "$ac_cv_have_x" |
14000 | fi # $with_x != no | |
14001 | ||
14002 | if test "$have_x" != yes; then | |
81ecdfbb RW |
14003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
14004 | $as_echo "$have_x" >&6; } | |
c906108c SS |
14005 | no_x=yes |
14006 | else | |
14007 | # If each of the values was on the command line, it overrides each guess. | |
14008 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
14009 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
14010 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
14011 | ac_cv_have_x="have_x=yes\ |
14012 | ac_x_includes='$x_includes'\ | |
14013 | ac_x_libraries='$x_libraries'" | |
14014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
14015 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
14016 | fi |
14017 | ||
14018 | ||
bec39cab | 14019 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 14020 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
14021 | # This code just checks for a few cases where we'd like to ignore those |
14022 | # definitions, even when they're present in the '.mt' file. These cases | |
14023 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 14024 | # not part of the source tree. |
7a292a7a | 14025 | # |
81ecdfbb RW |
14026 | # Check whether --enable-sim was given. |
14027 | if test "${enable_sim+set}" = set; then : | |
14028 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
14029 | echo "enableval = ${enableval}"; |
14030 | case "${enableval}" in | |
14031 | yes) ignore_sim=false ;; | |
14032 | no) ignore_sim=true ;; | |
14033 | *) ignore_sim=false ;; | |
14034 | esac | |
14035 | else | |
14036 | ignore_sim=false | |
81ecdfbb RW |
14037 | fi |
14038 | ||
7a292a7a SS |
14039 | |
14040 | if test ! -d "${srcdir}/../sim"; then | |
14041 | ignore_sim=true | |
14042 | fi | |
14043 | ||
9b624dbe UW |
14044 | SIM= |
14045 | SIM_OBS= | |
14046 | if test "${ignore_sim}" = "false"; then | |
14047 | if test x"${gdb_sim}" != x ; then | |
14048 | SIM="${gdb_sim}" | |
14049 | SIM_OBS="remote-sim.o" | |
60ca704f | 14050 | |
81ecdfbb | 14051 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 14052 | |
9b624dbe | 14053 | fi |
7a292a7a SS |
14054 | fi |
14055 | ||
14056 | ||
14057 | ||
c906108c SS |
14058 | |
14059 | ||
14060 | ||
14061 | ||
14062 | ||
14063 | ||
dfcd3bfb | 14064 | |
e56ac5c3 AC |
14065 | |
14066 | ||
b3a90332 AC |
14067 | |
14068 | ||
c35f4ffc | 14069 | # List of host floatformats. |
bec39cab AC |
14070 | |
14071 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14072 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 14073 | _ACEOF |
c35f4ffc | 14074 | |
bec39cab AC |
14075 | |
14076 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14077 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
14078 | _ACEOF |
14079 | ||
c35f4ffc | 14080 | |
bec39cab | 14081 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 14082 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 14083 | _ACEOF |
c35f4ffc AC |
14084 | |
14085 | ||
c906108c SS |
14086 | # target_subdir is used by the testsuite to find the target libraries. |
14087 | target_subdir= | |
14088 | if test "${host}" != "${target}"; then | |
14089 | target_subdir="${target_alias}/" | |
14090 | fi | |
14091 | ||
14092 | ||
14093 | frags= | |
771b4502 | 14094 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
14095 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
14096 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 14097 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
14098 | fi |
14099 | frags="$frags $host_makefile_frag" | |
14100 | else | |
14101 | host_makefile_frag=/dev/null | |
c906108c | 14102 | fi |
c906108c | 14103 | |
c906108c SS |
14104 | |
14105 | ||
14106 | ||
771b4502 | 14107 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
14108 | # We pick this up from the host configuration file (.mh) because we |
14109 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
14110 | nativefile=`sed -n ' |
14111 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
14112 | ' ${host_makefile_frag}` | |
c906108c SS |
14113 | fi |
14114 | ||
14115 | ||
b00a8037 | 14116 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
14117 | |
14118 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 14119 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 14120 | _ACEOF |
b00a8037 DJ |
14121 | |
14122 | fi | |
14123 | ||
8dcde887 | 14124 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
14125 | # Check whether --enable-multi-ice was given. |
14126 | if test "${enable_multi_ice+set}" = set; then : | |
14127 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
14128 | yes | no) |
14129 | ;; | |
81ecdfbb | 14130 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 14131 | esac |
81ecdfbb | 14132 | fi |
b4e70030 | 14133 | |
81ecdfbb RW |
14134 | if test "x$enable_multi_ice" = xyes; then |
14135 | subdirs="$subdirs multi-ice" | |
3ace7edb | 14136 | |
a85f51e7 DJ |
14137 | fi |
14138 | ||
a13e2c95 UW |
14139 | # We only build gdbserver automatically in a native configuration. |
14140 | if test "$gdb_native" = "yes"; then | |
81ecdfbb RW |
14141 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
14142 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 14143 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
14144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14145 | $as_echo "yes" >&6; } | |
14146 | subdirs="$subdirs gdbserver" | |
3ace7edb | 14147 | |
8dcde887 | 14148 | else |
81ecdfbb RW |
14149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14150 | $as_echo "no" >&6; } | |
8dcde887 MK |
14151 | fi |
14152 | fi | |
14153 | ||
db985757 | 14154 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 14155 | # to an empty version. |
c906108c SS |
14156 | |
14157 | files= | |
14158 | links= | |
5a2402b8 | 14159 | |
c906108c SS |
14160 | rm -f nm.h |
14161 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
14162 | case "${nativefile}" in |
14163 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
14164 | * ) GDB_NM_FILE="${nativefile}" | |
14165 | esac | |
5a2402b8 AC |
14166 | files="${files} ${GDB_NM_FILE}" |
14167 | links="${links} nm.h" | |
60ca704f SE |
14168 | |
14169 | cat >>confdefs.h <<_ACEOF | |
b78960be | 14170 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 14171 | _ACEOF |
5a2402b8 | 14172 | |
c906108c | 14173 | fi |
5a2402b8 AC |
14174 | |
14175 | ||
bec39cab AC |
14176 | ac_sources="$files" |
14177 | ac_dests="$links" | |
14178 | while test -n "$ac_sources"; do | |
14179 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
14180 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
14181 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
14182 | done | |
81ecdfbb | 14183 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
14184 | |
14185 | ||
c906108c SS |
14186 | |
14187 | ||
c906108c | 14188 | |
81ecdfbb | 14189 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 14190 | |
bec39cab | 14191 | |
81ecdfbb RW |
14192 | ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile" |
14193 | ||
14194 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 14195 | |
bec39cab AC |
14196 | cat >confcache <<\_ACEOF |
14197 | # This file is a shell script that caches the results of configure | |
14198 | # tests run on this system so they can be shared between configure | |
14199 | # scripts and configure runs, see configure's option --config-cache. | |
14200 | # It is not useful on other systems. If it contains results you don't | |
14201 | # want to keep, you may remove or edit it. | |
14202 | # | |
14203 | # config.status only pays attention to the cache file if you give it | |
14204 | # the --recheck option to rerun configure. | |
14205 | # | |
14206 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
14207 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
14208 | # following values. | |
14209 | ||
14210 | _ACEOF | |
14211 | ||
14212 | # The following way of writing the cache mishandles newlines in values, | |
14213 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 14214 | # So, we kill variables containing newlines. |
bec39cab AC |
14215 | # Ultrix sh set writes to stderr and can't be redirected directly, |
14216 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
14217 | ( |
14218 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
14219 | eval ac_val=\$$ac_var | |
14220 | case $ac_val in #( | |
14221 | *${as_nl}*) | |
14222 | case $ac_var in #( | |
14223 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
14224 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
14225 | esac | |
14226 | case $ac_var in #( | |
14227 | _ | IFS | as_nl) ;; #( | |
14228 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
14229 | *) { eval $ac_var=; unset $ac_var;} ;; | |
14230 | esac ;; | |
14231 | esac | |
14232 | done | |
14233 | ||
bec39cab | 14234 | (set) 2>&1 | |
81ecdfbb RW |
14235 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
14236 | *${as_nl}ac_space=\ *) | |
14237 | # `set' does not quote correctly, so add quotes: double-quote | |
14238 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
14239 | sed -n \ |
14240 | "s/'/'\\\\''/g; | |
14241 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 14242 | ;; #( |
bec39cab AC |
14243 | *) |
14244 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 14245 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 14246 | ;; |
81ecdfbb RW |
14247 | esac | |
14248 | sort | |
14249 | ) | | |
bec39cab | 14250 | sed ' |
81ecdfbb | 14251 | /^ac_cv_env_/b end |
bec39cab | 14252 | t clear |
81ecdfbb | 14253 | :clear |
bec39cab AC |
14254 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
14255 | t end | |
81ecdfbb RW |
14256 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
14257 | :end' >>confcache | |
14258 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
14259 | if test -w "$cache_file"; then | |
14260 | test "x$cache_file" != "x/dev/null" && | |
14261 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
14262 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
14263 | cat confcache >$cache_file |
14264 | else | |
81ecdfbb RW |
14265 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
14266 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
14267 | fi |
14268 | fi | |
14269 | rm -f confcache | |
14270 | ||
14271 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
14272 | # Let make expand exec_prefix. | |
14273 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
14274 | ||
bec39cab AC |
14275 | DEFS=-DHAVE_CONFIG_H |
14276 | ||
14277 | ac_libobjs= | |
14278 | ac_ltlibobjs= | |
14279 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
14280 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
14281 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
14282 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
14283 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
14284 | # will be set to the directory where LIBOBJS objects are built. | |
14285 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
14286 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
14287 | done |
14288 | LIBOBJS=$ac_libobjs | |
14289 | ||
14290 | LTLIBOBJS=$ac_ltlibobjs | |
14291 | ||
14292 | ||
85981d60 | 14293 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
14294 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
14295 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 14296 | fi |
a417dc56 | 14297 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
14298 | as_fn_error "conditional \"GMAKE\" was never defined. |
14299 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 14300 | fi |
783e057b | 14301 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
81ecdfbb RW |
14302 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
14303 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
783e057b DJ |
14304 | fi |
14305 | ||
14306 | gl_libobjs= | |
14307 | gl_ltlibobjs= | |
14308 | if test -n "$gl_LIBOBJS"; then | |
14309 | # Remove the extension. | |
14310 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
14311 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do | |
14312 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
14313 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
14314 | done | |
14315 | fi | |
14316 | gl_LIBOBJS=$gl_libobjs | |
14317 | ||
14318 | gl_LTLIBOBJS=$gl_ltlibobjs | |
14319 | ||
14320 | ||
14321 | ||
14322 | gltests_libobjs= | |
14323 | gltests_ltlibobjs= | |
14324 | if test -n "$gltests_LIBOBJS"; then | |
14325 | # Remove the extension. | |
14326 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
14327 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do | |
14328 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
14329 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
14330 | done | |
14331 | fi | |
14332 | gltests_LIBOBJS=$gltests_libobjs | |
14333 | ||
14334 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
14335 | ||
14336 | ||
e28b3332 | 14337 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
81ecdfbb RW |
14338 | as_fn_error "conditional \"AMDEP\" was never defined. |
14339 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
e28b3332 DJ |
14340 | fi |
14341 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
81ecdfbb RW |
14342 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
14343 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
14344 | fi | |
14345 | if test -n "$EXEEXT"; then | |
14346 | am__EXEEXT_TRUE= | |
14347 | am__EXEEXT_FALSE='#' | |
14348 | else | |
14349 | am__EXEEXT_TRUE='#' | |
14350 | am__EXEEXT_FALSE= | |
e28b3332 | 14351 | fi |
bec39cab | 14352 | |
81ecdfbb RW |
14353 | |
14354 | ||
bec39cab | 14355 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 14356 | ac_write_fail=0 |
bec39cab AC |
14357 | ac_clean_files_save=$ac_clean_files |
14358 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
14359 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
14360 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
14361 | as_write_fail=0 | |
14362 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
14363 | #! $SHELL |
14364 | # Generated by $as_me. | |
14365 | # Run this file to recreate the current configuration. | |
14366 | # Compiler output produced by configure, useful for debugging | |
14367 | # configure, is in config.log if it exists. | |
14368 | ||
14369 | debug=false | |
14370 | ac_cs_recheck=false | |
14371 | ac_cs_silent=false | |
bec39cab | 14372 | |
81ecdfbb RW |
14373 | SHELL=\${CONFIG_SHELL-$SHELL} |
14374 | export SHELL | |
14375 | _ASEOF | |
14376 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
14377 | ## -------------------- ## | |
14378 | ## M4sh Initialization. ## | |
14379 | ## -------------------- ## | |
14380 | ||
14381 | # Be more Bourne compatible | |
14382 | DUALCASE=1; export DUALCASE # for MKS sh | |
14383 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
14384 | emulate sh |
14385 | NULLCMD=: | |
81ecdfbb | 14386 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
14387 | # is contrary to our usage. Disable this feature. |
14388 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
14389 | setopt NO_GLOB_SUBST |
14390 | else | |
14391 | case `(set -o) 2>/dev/null` in #( | |
14392 | *posix*) : | |
14393 | set -o posix ;; #( | |
14394 | *) : | |
14395 | ;; | |
14396 | esac | |
bec39cab | 14397 | fi |
bec39cab | 14398 | |
81ecdfbb RW |
14399 | |
14400 | as_nl=' | |
14401 | ' | |
14402 | export as_nl | |
14403 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
14404 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
14405 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
14406 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
14407 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
14408 | # but without wasting forks for bash or zsh. | |
14409 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
14410 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
14411 | as_echo='print -r --' | |
14412 | as_echo_n='print -rn --' | |
14413 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
14414 | as_echo='printf %s\n' | |
14415 | as_echo_n='printf %s' | |
14416 | else | |
14417 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
14418 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
14419 | as_echo_n='/usr/ucb/echo -n' | |
14420 | else | |
14421 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
14422 | as_echo_n_body='eval | |
14423 | arg=$1; | |
14424 | case $arg in #( | |
14425 | *"$as_nl"*) | |
14426 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
14427 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
14428 | esac; | |
14429 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
14430 | ' | |
14431 | export as_echo_n_body | |
14432 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
14433 | fi | |
14434 | export as_echo_body | |
14435 | as_echo='sh -c $as_echo_body as_echo' | |
14436 | fi | |
14437 | ||
14438 | # The user is always right. | |
14439 | if test "${PATH_SEPARATOR+set}" != set; then | |
14440 | PATH_SEPARATOR=: | |
14441 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
14442 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
14443 | PATH_SEPARATOR=';' | |
14444 | } | |
bec39cab AC |
14445 | fi |
14446 | ||
14447 | ||
81ecdfbb RW |
14448 | # IFS |
14449 | # We need space, tab and new line, in precisely that order. Quoting is | |
14450 | # there to prevent editors from complaining about space-tab. | |
14451 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
14452 | # splitting by setting IFS to empty value.) | |
14453 | IFS=" "" $as_nl" | |
14454 | ||
14455 | # Find who we are. Look in the path if we contain no directory separator. | |
14456 | case $0 in #(( | |
14457 | *[\\/]* ) as_myself=$0 ;; | |
14458 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14459 | for as_dir in $PATH | |
14460 | do | |
14461 | IFS=$as_save_IFS | |
14462 | test -z "$as_dir" && as_dir=. | |
14463 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
14464 | done | |
14465 | IFS=$as_save_IFS | |
14466 | ||
14467 | ;; | |
14468 | esac | |
14469 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
14470 | # in which case we are not to be found in the path. | |
14471 | if test "x$as_myself" = x; then | |
14472 | as_myself=$0 | |
14473 | fi | |
14474 | if test ! -f "$as_myself"; then | |
14475 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
14476 | exit 1 | |
14477 | fi | |
14478 | ||
14479 | # Unset variables that we do not need and which cause bugs (e.g. in | |
14480 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
14481 | # suppresses any "Segmentation fault" message there. '((' could | |
14482 | # trigger a bug in pdksh 5.2.14. | |
14483 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
14484 | do eval test x\${$as_var+set} = xset \ | |
14485 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
14486 | done | |
bec39cab AC |
14487 | PS1='$ ' |
14488 | PS2='> ' | |
14489 | PS4='+ ' | |
14490 | ||
14491 | # NLS nuisances. | |
81ecdfbb RW |
14492 | LC_ALL=C |
14493 | export LC_ALL | |
14494 | LANGUAGE=C | |
14495 | export LANGUAGE | |
14496 | ||
14497 | # CDPATH. | |
14498 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
14499 | ||
14500 | ||
14501 | # as_fn_error ERROR [LINENO LOG_FD] | |
14502 | # --------------------------------- | |
14503 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
14504 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
14505 | # script with status $?, using 1 if that was 0. | |
14506 | as_fn_error () | |
14507 | { | |
14508 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
14509 | if test "$3"; then | |
14510 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
14511 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
14512 | fi | |
14513 | $as_echo "$as_me: error: $1" >&2 | |
14514 | as_fn_exit $as_status | |
14515 | } # as_fn_error | |
14516 | ||
14517 | ||
14518 | # as_fn_set_status STATUS | |
14519 | # ----------------------- | |
14520 | # Set $? to STATUS, without forking. | |
14521 | as_fn_set_status () | |
14522 | { | |
14523 | return $1 | |
14524 | } # as_fn_set_status | |
14525 | ||
14526 | # as_fn_exit STATUS | |
14527 | # ----------------- | |
14528 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
14529 | as_fn_exit () | |
14530 | { | |
14531 | set +e | |
14532 | as_fn_set_status $1 | |
14533 | exit $1 | |
14534 | } # as_fn_exit | |
14535 | ||
14536 | # as_fn_unset VAR | |
14537 | # --------------- | |
14538 | # Portably unset VAR. | |
14539 | as_fn_unset () | |
14540 | { | |
14541 | { eval $1=; unset $1;} | |
14542 | } | |
14543 | as_unset=as_fn_unset | |
14544 | # as_fn_append VAR VALUE | |
14545 | # ---------------------- | |
14546 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
14547 | # advantage of any shell optimizations that allow amortized linear growth over | |
14548 | # repeated appends, instead of the typical quadratic growth present in naive | |
14549 | # implementations. | |
14550 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
14551 | eval 'as_fn_append () | |
14552 | { | |
14553 | eval $1+=\$2 | |
14554 | }' | |
14555 | else | |
14556 | as_fn_append () | |
14557 | { | |
14558 | eval $1=\$$1\$2 | |
14559 | } | |
14560 | fi # as_fn_append | |
14561 | ||
14562 | # as_fn_arith ARG... | |
14563 | # ------------------ | |
14564 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
14565 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
14566 | # must be portable across $(()) and expr. | |
14567 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
14568 | eval 'as_fn_arith () | |
14569 | { | |
14570 | as_val=$(( $* )) | |
14571 | }' | |
14572 | else | |
14573 | as_fn_arith () | |
14574 | { | |
14575 | as_val=`expr "$@" || test $? -eq 1` | |
14576 | } | |
14577 | fi # as_fn_arith | |
bec39cab | 14578 | |
81ecdfbb RW |
14579 | |
14580 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
14581 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
14582 | as_expr=expr |
14583 | else | |
14584 | as_expr=false | |
14585 | fi | |
14586 | ||
81ecdfbb | 14587 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
14588 | as_basename=basename |
14589 | else | |
14590 | as_basename=false | |
14591 | fi | |
14592 | ||
81ecdfbb RW |
14593 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
14594 | as_dirname=dirname | |
14595 | else | |
14596 | as_dirname=false | |
14597 | fi | |
bec39cab | 14598 | |
81ecdfbb | 14599 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
14600 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
14601 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
14602 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
14603 | $as_echo X/"$0" | | |
14604 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
14605 | s//\1/ | |
14606 | q | |
14607 | } | |
14608 | /^X\/\(\/\/\)$/{ | |
14609 | s//\1/ | |
14610 | q | |
14611 | } | |
14612 | /^X\/\(\/\).*/{ | |
14613 | s//\1/ | |
14614 | q | |
14615 | } | |
14616 | s/.*/./; q'` | |
b4e70030 | 14617 | |
b4e70030 JB |
14618 | # Avoid depending upon Character Ranges. |
14619 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
14620 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
14621 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
14622 | as_cr_digits='0123456789' | |
14623 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
14624 | ||
81ecdfbb RW |
14625 | ECHO_C= ECHO_N= ECHO_T= |
14626 | case `echo -n x` in #((((( | |
14627 | -n*) | |
14628 | case `echo 'xy\c'` in | |
14629 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
14630 | xy) ECHO_C='\c';; | |
14631 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
14632 | ECHO_T=' ';; | |
14633 | esac;; | |
14634 | *) | |
14635 | ECHO_N='-n';; | |
bec39cab AC |
14636 | esac |
14637 | ||
81ecdfbb RW |
14638 | rm -f conf$$ conf$$.exe conf$$.file |
14639 | if test -d conf$$.dir; then | |
14640 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 14641 | else |
81ecdfbb RW |
14642 | rm -f conf$$.dir |
14643 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 14644 | fi |
81ecdfbb RW |
14645 | if (echo >conf$$.file) 2>/dev/null; then |
14646 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 14647 | as_ln_s='ln -s' |
81ecdfbb RW |
14648 | # ... but there are two gotchas: |
14649 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
14650 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
14651 | # In both cases, we have to default to `cp -p'. | |
14652 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
14653 | as_ln_s='cp -p' | |
14654 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
14655 | as_ln_s=ln | |
14656 | else | |
14657 | as_ln_s='cp -p' | |
b4e70030 | 14658 | fi |
bec39cab AC |
14659 | else |
14660 | as_ln_s='cp -p' | |
14661 | fi | |
81ecdfbb RW |
14662 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
14663 | rmdir conf$$.dir 2>/dev/null | |
14664 | ||
14665 | ||
14666 | # as_fn_mkdir_p | |
14667 | # ------------- | |
14668 | # Create "$as_dir" as a directory, including parents if necessary. | |
14669 | as_fn_mkdir_p () | |
14670 | { | |
14671 | ||
14672 | case $as_dir in #( | |
14673 | -*) as_dir=./$as_dir;; | |
14674 | esac | |
14675 | test -d "$as_dir" || eval $as_mkdir_p || { | |
14676 | as_dirs= | |
14677 | while :; do | |
14678 | case $as_dir in #( | |
14679 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
14680 | *) as_qdir=$as_dir;; | |
14681 | esac | |
14682 | as_dirs="'$as_qdir' $as_dirs" | |
14683 | as_dir=`$as_dirname -- "$as_dir" || | |
14684 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
14685 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
14686 | X"$as_dir" : 'X\(//\)$' \| \ | |
14687 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
14688 | $as_echo X"$as_dir" | | |
14689 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
14690 | s//\1/ | |
14691 | q | |
14692 | } | |
14693 | /^X\(\/\/\)[^/].*/{ | |
14694 | s//\1/ | |
14695 | q | |
14696 | } | |
14697 | /^X\(\/\/\)$/{ | |
14698 | s//\1/ | |
14699 | q | |
14700 | } | |
14701 | /^X\(\/\).*/{ | |
14702 | s//\1/ | |
14703 | q | |
14704 | } | |
14705 | s/.*/./; q'` | |
14706 | test -d "$as_dir" && break | |
14707 | done | |
14708 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
14709 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
14710 | ||
bec39cab | 14711 | |
81ecdfbb | 14712 | } # as_fn_mkdir_p |
bec39cab | 14713 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 14714 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
14715 | else |
14716 | test -d ./-p && rmdir ./-p | |
14717 | as_mkdir_p=false | |
14718 | fi | |
14719 | ||
81ecdfbb RW |
14720 | if test -x / >/dev/null 2>&1; then |
14721 | as_test_x='test -x' | |
14722 | else | |
14723 | if ls -dL / >/dev/null 2>&1; then | |
14724 | as_ls_L_option=L | |
14725 | else | |
14726 | as_ls_L_option= | |
14727 | fi | |
14728 | as_test_x=' | |
14729 | eval sh -c '\'' | |
14730 | if test -d "$1"; then | |
14731 | test -d "$1/."; | |
14732 | else | |
14733 | case $1 in #( | |
14734 | -*)set "./$1";; | |
14735 | esac; | |
14736 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
14737 | ???[sx]*):;;*)false;;esac;fi | |
14738 | '\'' sh | |
14739 | ' | |
14740 | fi | |
14741 | as_executable_p=$as_test_x | |
bec39cab AC |
14742 | |
14743 | # Sed expression to map a string onto a valid CPP name. | |
14744 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
14745 | ||
14746 | # Sed expression to map a string onto a valid variable name. | |
14747 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
14748 | ||
14749 | ||
bec39cab | 14750 | exec 6>&1 |
81ecdfbb RW |
14751 | ## ----------------------------------- ## |
14752 | ## Main body of $CONFIG_STATUS script. ## | |
14753 | ## ----------------------------------- ## | |
14754 | _ASEOF | |
14755 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
14756 | ||
14757 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14758 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 14759 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
14760 | # values after options handling. |
14761 | ac_log=" | |
bec39cab | 14762 | This file was extended by $as_me, which was |
81ecdfbb | 14763 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
14764 | |
14765 | CONFIG_FILES = $CONFIG_FILES | |
14766 | CONFIG_HEADERS = $CONFIG_HEADERS | |
14767 | CONFIG_LINKS = $CONFIG_LINKS | |
14768 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
14769 | $ $0 $@ | |
14770 | ||
81ecdfbb RW |
14771 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
14772 | " | |
14773 | ||
bec39cab AC |
14774 | _ACEOF |
14775 | ||
81ecdfbb RW |
14776 | case $ac_config_files in *" |
14777 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
14778 | esac | |
234b45d4 | 14779 | |
81ecdfbb RW |
14780 | case $ac_config_headers in *" |
14781 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
14782 | esac | |
b4e70030 | 14783 | |
b4e70030 | 14784 | |
81ecdfbb RW |
14785 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
14786 | # Files that config.status was made for. | |
14787 | config_files="$ac_config_files" | |
14788 | config_headers="$ac_config_headers" | |
14789 | config_links="$ac_config_links" | |
14790 | config_commands="$ac_config_commands" | |
234b45d4 | 14791 | |
81ecdfbb | 14792 | _ACEOF |
b4e70030 | 14793 | |
81ecdfbb | 14794 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 14795 | ac_cs_usage="\ |
81ecdfbb RW |
14796 | \`$as_me' instantiates files and other configuration actions |
14797 | from templates according to the current configuration. Unless the files | |
14798 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 14799 | |
81ecdfbb | 14800 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 14801 | |
bec39cab | 14802 | -h, --help print this help, then exit |
81ecdfbb RW |
14803 | -V, --version print version number and configuration settings, then exit |
14804 | -q, --quiet, --silent | |
14805 | do not print progress messages | |
bec39cab AC |
14806 | -d, --debug don't remove temporary files |
14807 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
14808 | --file=FILE[:TEMPLATE] |
14809 | instantiate the configuration file FILE | |
14810 | --header=FILE[:TEMPLATE] | |
14811 | instantiate the configuration header FILE | |
234b45d4 | 14812 | |
bec39cab AC |
14813 | Configuration files: |
14814 | $config_files | |
234b45d4 | 14815 | |
bec39cab AC |
14816 | Configuration headers: |
14817 | $config_headers | |
234b45d4 | 14818 | |
bec39cab AC |
14819 | Configuration links: |
14820 | $config_links | |
234b45d4 | 14821 | |
bec39cab AC |
14822 | Configuration commands: |
14823 | $config_commands | |
14824 | ||
81ecdfbb | 14825 | Report bugs to the package provider." |
b4e70030 | 14826 | |
81ecdfbb RW |
14827 | _ACEOF |
14828 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
14829 | ac_cs_version="\\ |
14830 | config.status | |
81ecdfbb RW |
14831 | configured by $0, generated by GNU Autoconf 2.64, |
14832 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 14833 | |
81ecdfbb | 14834 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
14835 | This config.status script is free software; the Free Software Foundation |
14836 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
14837 | |
14838 | ac_pwd='$ac_pwd' | |
14839 | srcdir='$srcdir' | |
14840 | INSTALL='$INSTALL' | |
14841 | MKDIR_P='$MKDIR_P' | |
14842 | AWK='$AWK' | |
14843 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
14844 | _ACEOF |
14845 | ||
81ecdfbb RW |
14846 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14847 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
14848 | ac_need_defaults=: |
14849 | while test $# != 0 | |
14850 | do | |
14851 | case $1 in | |
14852 | --*=*) | |
81ecdfbb RW |
14853 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
14854 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 14855 | ac_shift=: |
c906108c | 14856 | ;; |
81ecdfbb | 14857 | *) |
bec39cab AC |
14858 | ac_option=$1 |
14859 | ac_optarg=$2 | |
14860 | ac_shift=shift | |
c906108c | 14861 | ;; |
bec39cab | 14862 | esac |
c906108c | 14863 | |
bec39cab AC |
14864 | case $ac_option in |
14865 | # Handling of the options. | |
bec39cab AC |
14866 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
14867 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
14868 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
14869 | $as_echo "$ac_cs_version"; exit ;; | |
14870 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
14871 | debug=: ;; |
14872 | --file | --fil | --fi | --f ) | |
14873 | $ac_shift | |
81ecdfbb RW |
14874 | case $ac_optarg in |
14875 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14876 | esac | |
14877 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
14878 | ac_need_defaults=false;; |
14879 | --header | --heade | --head | --hea ) | |
14880 | $ac_shift | |
81ecdfbb RW |
14881 | case $ac_optarg in |
14882 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14883 | esac | |
14884 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 14885 | ac_need_defaults=false;; |
81ecdfbb RW |
14886 | --he | --h) |
14887 | # Conflict between --help and --header | |
14888 | as_fn_error "ambiguous option: \`$1' | |
14889 | Try \`$0 --help' for more information.";; | |
14890 | --help | --hel | -h ) | |
14891 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
14892 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
14893 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
14894 | ac_cs_silent=: ;; | |
c906108c | 14895 | |
bec39cab | 14896 | # This is an error. |
81ecdfbb RW |
14897 | -*) as_fn_error "unrecognized option: \`$1' |
14898 | Try \`$0 --help' for more information." ;; | |
c906108c | 14899 | |
81ecdfbb RW |
14900 | *) as_fn_append ac_config_targets " $1" |
14901 | ac_need_defaults=false ;; | |
c906108c | 14902 | |
bec39cab AC |
14903 | esac |
14904 | shift | |
14905 | done | |
c906108c | 14906 | |
bec39cab | 14907 | ac_configure_extra_args= |
c906108c | 14908 | |
bec39cab AC |
14909 | if $ac_cs_silent; then |
14910 | exec 6>/dev/null | |
14911 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
14912 | fi | |
c906108c | 14913 | |
bec39cab | 14914 | _ACEOF |
81ecdfbb | 14915 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 14916 | if \$ac_cs_recheck; then |
81ecdfbb RW |
14917 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
14918 | shift | |
14919 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
14920 | CONFIG_SHELL='$SHELL' | |
14921 | export CONFIG_SHELL | |
14922 | exec "\$@" | |
bec39cab AC |
14923 | fi |
14924 | ||
14925 | _ACEOF | |
81ecdfbb RW |
14926 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14927 | exec 5>>config.log | |
14928 | { | |
14929 | echo | |
14930 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
14931 | ## Running $as_me. ## | |
14932 | _ASBOX | |
14933 | $as_echo "$ac_log" | |
14934 | } >&5 | |
bec39cab | 14935 | |
81ecdfbb RW |
14936 | _ACEOF |
14937 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 14938 | # |
81ecdfbb | 14939 | # INIT-COMMANDS |
c906108c | 14940 | # |
a417dc56 | 14941 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
e28b3332 | 14942 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
b4e70030 | 14943 | |
bec39cab AC |
14944 | _ACEOF |
14945 | ||
81ecdfbb | 14946 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 14947 | |
81ecdfbb | 14948 | # Handling of arguments. |
bec39cab | 14949 | for ac_config_target in $ac_config_targets |
c906108c | 14950 | do |
81ecdfbb RW |
14951 | case $ac_config_target in |
14952 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
14953 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
14954 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
14955 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; | |
14956 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
14957 | ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;; | |
14958 | "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; | |
14959 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
14960 | ||
14961 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
14962 | esac |
14963 | done | |
14964 | ||
81ecdfbb | 14965 | |
bec39cab AC |
14966 | # If the user did not use the arguments to specify the items to instantiate, |
14967 | # then the envvar interface is used. Set only those that are not. | |
14968 | # We use the long form for the default assignment because of an extremely | |
14969 | # bizarre bug on SunOS 4.1.3. | |
14970 | if $ac_need_defaults; then | |
14971 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
14972 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
14973 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
14974 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
14975 | fi | |
14976 | ||
b4e70030 | 14977 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 14978 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 14979 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
14980 | # Hook for its removal unless debugging. |
14981 | # Note that there is a small window in which the directory will not be cleaned: | |
14982 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
14983 | $debug || |
14984 | { | |
81ecdfbb RW |
14985 | tmp= |
14986 | trap 'exit_status=$? | |
14987 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
14988 | ' 0 | |
14989 | trap 'as_fn_exit 1' 1 2 13 15 | |
14990 | } | |
14991 | # Create a (secure) tmp directory for tmp files. | |
14992 | ||
14993 | { | |
14994 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
14995 | test -n "$tmp" && test -d "$tmp" | |
14996 | } || | |
14997 | { | |
14998 | tmp=./conf$$-$RANDOM | |
14999 | (umask 077 && mkdir "$tmp") | |
15000 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
15001 | ||
15002 | # Set up the scripts for CONFIG_FILES section. | |
15003 | # No need to generate them if there are no CONFIG_FILES. | |
15004 | # This happens for instance with `./config.status config.h'. | |
15005 | if test -n "$CONFIG_FILES"; then | |
15006 | ||
15007 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
15008 | ac_cs_awk_getline=: | |
15009 | ac_cs_awk_pipe_init= | |
15010 | ac_cs_awk_read_file=' | |
15011 | while ((getline aline < (F[key])) > 0) | |
15012 | print(aline) | |
15013 | close(F[key])' | |
15014 | ac_cs_awk_pipe_fini= | |
15015 | else | |
15016 | ac_cs_awk_getline=false | |
15017 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
15018 | ac_cs_awk_read_file=' | |
15019 | print "|#_!!_#|" | |
15020 | print "cat " F[key] " &&" | |
15021 | '$ac_cs_awk_pipe_init | |
15022 | # The final `:' finishes the AND list. | |
15023 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
15024 | fi | |
15025 | ac_cr=`echo X | tr X '\015'` | |
15026 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
15027 | # But we know of no other shell where ac_cr would be empty at this | |
15028 | # point, so we can use a bashism as a fallback. | |
15029 | if test "x$ac_cr" = x; then | |
15030 | eval ac_cr=\$\'\\r\' | |
15031 | fi | |
15032 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
15033 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
15034 | ac_cs_awk_cr='\r' | |
15035 | else | |
15036 | ac_cs_awk_cr=$ac_cr | |
15037 | fi | |
15038 | ||
15039 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
15040 | _ACEOF | |
15041 | ||
15042 | # Create commands to substitute file output variables. | |
15043 | { | |
15044 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
15045 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
15046 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
15047 | echo "_ACAWK" && | |
15048 | echo "_ACEOF" | |
15049 | } >conf$$files.sh && | |
15050 | . ./conf$$files.sh || | |
15051 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15052 | rm -f conf$$files.sh | |
15053 | ||
15054 | { | |
15055 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
15056 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
15057 | echo "_ACEOF" | |
15058 | } >conf$$subs.sh || | |
15059 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15060 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
15061 | ac_delim='%!_!# ' | |
15062 | for ac_last_try in false false false false false :; do | |
15063 | . ./conf$$subs.sh || | |
15064 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15065 | ||
15066 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
15067 | if test $ac_delim_n = $ac_delim_num; then | |
15068 | break | |
15069 | elif $ac_last_try; then | |
15070 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15071 | else | |
15072 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15073 | fi | |
15074 | done | |
15075 | rm -f conf$$subs.sh | |
15076 | ||
15077 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15078 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
15079 | _ACEOF | |
15080 | sed -n ' | |
15081 | h | |
15082 | s/^/S["/; s/!.*/"]=/ | |
15083 | p | |
15084 | g | |
15085 | s/^[^!]*!// | |
15086 | :repl | |
15087 | t repl | |
15088 | s/'"$ac_delim"'$// | |
15089 | t delim | |
15090 | :nl | |
15091 | h | |
15092 | s/\(.\{148\}\).*/\1/ | |
15093 | t more1 | |
15094 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
15095 | p | |
15096 | n | |
15097 | b repl | |
15098 | :more1 | |
15099 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15100 | p | |
15101 | g | |
15102 | s/.\{148\}// | |
15103 | t nl | |
15104 | :delim | |
15105 | h | |
15106 | s/\(.\{148\}\).*/\1/ | |
15107 | t more2 | |
15108 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
15109 | p | |
15110 | b | |
15111 | :more2 | |
15112 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15113 | p | |
15114 | g | |
15115 | s/.\{148\}// | |
15116 | t delim | |
15117 | ' <conf$$subs.awk | sed ' | |
15118 | /^[^""]/{ | |
15119 | N | |
15120 | s/\n// | |
15121 | } | |
15122 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
15123 | rm -f conf$$subs.awk | |
15124 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15125 | _ACAWK | |
15126 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
15127 | for (key in S) S_is_set[key] = 1 | |
15128 | FS = "\a" | |
15129 | \$ac_cs_awk_pipe_init | |
15130 | } | |
15131 | { | |
15132 | line = $ 0 | |
15133 | nfields = split(line, field, "@") | |
15134 | substed = 0 | |
15135 | len = length(field[1]) | |
15136 | for (i = 2; i < nfields; i++) { | |
15137 | key = field[i] | |
15138 | keylen = length(key) | |
15139 | if (S_is_set[key]) { | |
15140 | value = S[key] | |
15141 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
15142 | len += length(value) + length(field[++i]) | |
15143 | substed = 1 | |
15144 | } else | |
15145 | len += 1 + keylen | |
15146 | } | |
15147 | if (nfields == 3 && !substed) { | |
15148 | key = field[2] | |
15149 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
15150 | \$ac_cs_awk_read_file | |
15151 | next | |
15152 | } | |
15153 | } | |
15154 | print line | |
b4e70030 | 15155 | } |
81ecdfbb RW |
15156 | \$ac_cs_awk_pipe_fini |
15157 | _ACAWK | |
15158 | _ACEOF | |
15159 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15160 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
15161 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
15162 | else | |
15163 | cat | |
15164 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
15165 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
15166 | _ACEOF | |
15167 | ||
15168 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
15169 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
15170 | # trailing colons and then remove the whole line if VPATH becomes empty | |
15171 | # (actually we leave an empty line to preserve line numbers). | |
15172 | if test "x$srcdir" = x.; then | |
15173 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
15174 | s/:*\$(srcdir):*/:/ | |
15175 | s/:*\${srcdir}:*/:/ | |
15176 | s/:*@srcdir@:*/:/ | |
15177 | s/^\([^=]*=[ ]*\):*/\1/ | |
15178 | s/:*$// | |
15179 | s/^[^=]*=[ ]*$// | |
15180 | }' | |
15181 | fi | |
15182 | ||
15183 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15184 | fi # test -n "$CONFIG_FILES" | |
15185 | ||
15186 | # Set up the scripts for CONFIG_HEADERS section. | |
15187 | # No need to generate them if there are no CONFIG_HEADERS. | |
15188 | # This happens for instance with `./config.status Makefile'. | |
15189 | if test -n "$CONFIG_HEADERS"; then | |
15190 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
15191 | BEGIN { | |
15192 | _ACEOF | |
15193 | ||
15194 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
15195 | # here-document in config.status, that substitutes the proper values into | |
15196 | # config.h.in to produce config.h. | |
4e8d927d | 15197 | |
81ecdfbb RW |
15198 | # Create a delimiter string that does not exist in confdefs.h, to ease |
15199 | # handling of long lines. | |
15200 | ac_delim='%!_!# ' | |
15201 | for ac_last_try in false false :; do | |
15202 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
15203 | if test -z "$ac_t"; then | |
15204 | break | |
15205 | elif $ac_last_try; then | |
15206 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
15207 | else | |
15208 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15209 | fi | |
15210 | done | |
4e8d927d | 15211 | |
81ecdfbb RW |
15212 | # For the awk script, D is an array of macro values keyed by name, |
15213 | # likewise P contains macro parameters if any. Preserve backslash | |
15214 | # newline sequences. | |
15215 | ||
15216 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
15217 | sed -n ' | |
15218 | s/.\{148\}/&'"$ac_delim"'/g | |
15219 | t rset | |
15220 | :rset | |
15221 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
15222 | t def | |
15223 | d | |
15224 | :def | |
15225 | s/\\$// | |
15226 | t bsnl | |
15227 | s/["\\]/\\&/g | |
15228 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15229 | D["\1"]=" \3"/p | |
15230 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
15231 | d | |
15232 | :bsnl | |
15233 | s/["\\]/\\&/g | |
15234 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15235 | D["\1"]=" \3\\\\\\n"\\/p | |
15236 | t cont | |
15237 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
15238 | t cont | |
15239 | d | |
15240 | :cont | |
15241 | n | |
15242 | s/.\{148\}/&'"$ac_delim"'/g | |
15243 | t clear | |
15244 | :clear | |
15245 | s/\\$// | |
15246 | t bsnlc | |
15247 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
15248 | d | |
15249 | :bsnlc | |
15250 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
15251 | b cont | |
15252 | ' <confdefs.h | sed ' | |
15253 | s/'"$ac_delim"'/"\\\ | |
15254 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
15255 | ||
15256 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15257 | for (key in D) D_is_set[key] = 1 | |
15258 | FS = "\a" | |
15259 | } | |
15260 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
15261 | line = \$ 0 | |
15262 | split(line, arg, " ") | |
15263 | if (arg[1] == "#") { | |
15264 | defundef = arg[2] | |
15265 | mac1 = arg[3] | |
15266 | } else { | |
15267 | defundef = substr(arg[1], 2) | |
15268 | mac1 = arg[2] | |
15269 | } | |
15270 | split(mac1, mac2, "(") #) | |
15271 | macro = mac2[1] | |
15272 | prefix = substr(line, 1, index(line, defundef) - 1) | |
15273 | if (D_is_set[macro]) { | |
15274 | # Preserve the white space surrounding the "#". | |
15275 | print prefix "define", macro P[macro] D[macro] | |
15276 | next | |
15277 | } else { | |
15278 | # Replace #undef with comments. This is necessary, for example, | |
15279 | # in the case of _POSIX_SOURCE, which is predefined and required | |
15280 | # on some systems where configure will not decide to define it. | |
15281 | if (defundef == "undef") { | |
15282 | print "/*", prefix defundef, macro, "*/" | |
15283 | next | |
15284 | } | |
15285 | } | |
b4e70030 | 15286 | } |
81ecdfbb RW |
15287 | { print } |
15288 | _ACAWK | |
b4e70030 | 15289 | _ACEOF |
81ecdfbb RW |
15290 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15291 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
15292 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 15293 | |
4e8d927d | 15294 | |
81ecdfbb RW |
15295 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
15296 | shift | |
15297 | for ac_tag | |
15298 | do | |
15299 | case $ac_tag in | |
15300 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
15301 | esac | |
15302 | case $ac_mode$ac_tag in | |
15303 | :[FHL]*:*);; | |
15304 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
15305 | :[FH]-) ac_tag=-:-;; | |
15306 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
15307 | esac | |
15308 | ac_save_IFS=$IFS | |
15309 | IFS=: | |
15310 | set x $ac_tag | |
15311 | IFS=$ac_save_IFS | |
15312 | shift | |
15313 | ac_file=$1 | |
15314 | shift | |
4e8d927d | 15315 | |
81ecdfbb RW |
15316 | case $ac_mode in |
15317 | :L) ac_source=$1;; | |
15318 | :[FH]) | |
15319 | ac_file_inputs= | |
15320 | for ac_f | |
15321 | do | |
15322 | case $ac_f in | |
15323 | -) ac_f="$tmp/stdin";; | |
15324 | *) # Look for the file first in the build tree, then in the source tree | |
15325 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
15326 | # because $ac_f cannot contain `:'. | |
15327 | test -f "$ac_f" || | |
15328 | case $ac_f in | |
15329 | [\\/$]*) false;; | |
15330 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
15331 | esac || | |
15332 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
15333 | esac | |
15334 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
15335 | as_fn_append ac_file_inputs " '$ac_f'" | |
15336 | done | |
15337 | ||
15338 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
15339 | # use $as_me), people would be surprised to read: | |
15340 | # /* config.h. Generated by config.status. */ | |
15341 | configure_input='Generated from '` | |
15342 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
15343 | `' by configure.' | |
15344 | if test x"$ac_file" != x-; then | |
15345 | configure_input="$ac_file. $configure_input" | |
15346 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
15347 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 15348 | fi |
81ecdfbb RW |
15349 | # Neutralize special characters interpreted by sed in replacement strings. |
15350 | case $configure_input in #( | |
15351 | *\&* | *\|* | *\\* ) | |
15352 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
15353 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
15354 | *) ac_sed_conf_input=$configure_input;; | |
15355 | esac | |
4e8d927d | 15356 | |
81ecdfbb RW |
15357 | case $ac_tag in |
15358 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
15359 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
15360 | esac | |
15361 | ;; | |
c906108c SS |
15362 | esac |
15363 | ||
81ecdfbb | 15364 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
15365 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
15366 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
15367 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
15368 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
15369 | $as_echo X"$ac_file" | | |
15370 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15371 | s//\1/ | |
15372 | q | |
15373 | } | |
15374 | /^X\(\/\/\)[^/].*/{ | |
15375 | s//\1/ | |
15376 | q | |
15377 | } | |
15378 | /^X\(\/\/\)$/{ | |
15379 | s//\1/ | |
15380 | q | |
15381 | } | |
15382 | /^X\(\/\).*/{ | |
15383 | s//\1/ | |
15384 | q | |
15385 | } | |
15386 | s/.*/./; q'` | |
15387 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
15388 | ac_builddir=. |
15389 | ||
81ecdfbb RW |
15390 | case "$ac_dir" in |
15391 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15392 | *) | |
15393 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
15394 | # A ".." for each directory in $ac_dir_suffix. | |
15395 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
15396 | case $ac_top_builddir_sub in | |
15397 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15398 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
15399 | esac ;; | |
15400 | esac | |
15401 | ac_abs_top_builddir=$ac_pwd | |
15402 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
15403 | # for backward compatibility: | |
15404 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
15405 | |
15406 | case $srcdir in | |
81ecdfbb | 15407 | .) # We are building in place. |
bec39cab | 15408 | ac_srcdir=. |
81ecdfbb RW |
15409 | ac_top_srcdir=$ac_top_builddir_sub |
15410 | ac_abs_top_srcdir=$ac_pwd ;; | |
15411 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 15412 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
15413 | ac_top_srcdir=$srcdir |
15414 | ac_abs_top_srcdir=$srcdir ;; | |
15415 | *) # Relative name. | |
15416 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
15417 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
15418 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 15419 | esac |
81ecdfbb | 15420 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 15421 | |
c906108c | 15422 | |
81ecdfbb RW |
15423 | case $ac_mode in |
15424 | :F) | |
15425 | # | |
15426 | # CONFIG_FILE | |
15427 | # | |
c906108c | 15428 | |
bec39cab AC |
15429 | case $INSTALL in |
15430 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 15431 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 15432 | esac |
81ecdfbb RW |
15433 | ac_MKDIR_P=$MKDIR_P |
15434 | case $MKDIR_P in | |
15435 | [\\/$]* | ?:[\\/]* ) ;; | |
15436 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
15437 | esac | |
15438 | _ACEOF | |
121ce6e5 | 15439 | |
81ecdfbb RW |
15440 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15441 | # If the template does not know about datarootdir, expand it. | |
15442 | # FIXME: This hack should be removed a few years after 2.60. | |
15443 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
15444 | ac_sed_dataroot=' | |
15445 | /datarootdir/ { | |
15446 | p | |
15447 | q | |
15448 | } | |
15449 | /@datadir@/p | |
15450 | /@docdir@/p | |
15451 | /@infodir@/p | |
15452 | /@localedir@/p | |
15453 | /@mandir@/p' | |
15454 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
15455 | *datarootdir*) ac_datarootdir_seen=yes;; | |
15456 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
15457 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
15458 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
15459 | _ACEOF | |
15460 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15461 | ac_datarootdir_hack=' | |
15462 | s&@datadir@&$datadir&g | |
15463 | s&@docdir@&$docdir&g | |
15464 | s&@infodir@&$infodir&g | |
15465 | s&@localedir@&$localedir&g | |
15466 | s&@mandir@&$mandir&g | |
15467 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
15468 | esac | |
4e8d927d | 15469 | _ACEOF |
81ecdfbb RW |
15470 | |
15471 | # Neutralize VPATH when `$srcdir' = `.'. | |
15472 | # Shell code in configure.ac might set extrasub. | |
15473 | # FIXME: do we really want to maintain this feature? | |
15474 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15475 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
15476 | $extrasub |
15477 | _ACEOF | |
81ecdfbb | 15478 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
15479 | :t |
15480 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
15481 | s|@configure_input@|$ac_sed_conf_input|;t t |
15482 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
15483 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
15484 | s&@srcdir@&$ac_srcdir&;t t | |
15485 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
15486 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
15487 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
15488 | s&@builddir@&$ac_builddir&;t t | |
15489 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
15490 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
15491 | s&@INSTALL@&$ac_INSTALL&;t t | |
15492 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
15493 | $ac_datarootdir_hack | |
15494 | " | |
15495 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
15496 | if $ac_cs_awk_getline; then | |
15497 | $AWK -f "$tmp/subs.awk" | |
15498 | else | |
15499 | $AWK -f "$tmp/subs.awk" | $SHELL | |
15500 | fi >$tmp/out \ | |
15501 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
15502 | ||
15503 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
15504 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
15505 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
15506 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
15507 | which seems to be undefined. Please make sure it is defined." >&5 | |
15508 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
15509 | which seems to be undefined. Please make sure it is defined." >&2;} | |
15510 | ||
15511 | rm -f "$tmp/stdin" | |
bec39cab | 15512 | case $ac_file in |
81ecdfbb RW |
15513 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
15514 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
15515 | esac \ | |
15516 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
15517 | ;; | |
15518 | :H) | |
15519 | # | |
15520 | # CONFIG_HEADER | |
15521 | # | |
bec39cab | 15522 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
15523 | { |
15524 | $as_echo "/* $configure_input */" \ | |
15525 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
15526 | } >"$tmp/config.h" \ | |
15527 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
15528 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
15529 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
15530 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 15531 | else |
81ecdfbb RW |
15532 | rm -f "$ac_file" |
15533 | mv "$tmp/config.h" "$ac_file" \ | |
15534 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
15535 | fi |
15536 | else | |
81ecdfbb RW |
15537 | $as_echo "/* $configure_input */" \ |
15538 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
15539 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 15540 | fi |
81ecdfbb RW |
15541 | # Compute "$ac_file"'s index in $config_headers. |
15542 | _am_arg="$ac_file" | |
e28b3332 DJ |
15543 | _am_stamp_count=1 |
15544 | for _am_header in $config_headers :; do | |
15545 | case $_am_header in | |
81ecdfbb | 15546 | $_am_arg | $_am_arg:* ) |
e28b3332 DJ |
15547 | break ;; |
15548 | * ) | |
15549 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
15550 | esac | |
15551 | done | |
81ecdfbb RW |
15552 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || |
15553 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
15554 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
15555 | X"$_am_arg" : 'X\(//\)$' \| \ | |
15556 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
15557 | $as_echo X"$_am_arg" | | |
15558 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15559 | s//\1/ | |
15560 | q | |
15561 | } | |
15562 | /^X\(\/\/\)[^/].*/{ | |
15563 | s//\1/ | |
15564 | q | |
15565 | } | |
15566 | /^X\(\/\/\)$/{ | |
15567 | s//\1/ | |
15568 | q | |
15569 | } | |
15570 | /^X\(\/\).*/{ | |
15571 | s//\1/ | |
15572 | q | |
15573 | } | |
15574 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
15575 | ;; | |
15576 | :L) | |
15577 | # | |
15578 | # CONFIG_LINK | |
15579 | # | |
c906108c | 15580 | |
81ecdfbb RW |
15581 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
15582 | : | |
b4e70030 | 15583 | else |
81ecdfbb RW |
15584 | # Prefer the file from the source tree if names are identical. |
15585 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
15586 | ac_source=$srcdir/$ac_source | |
15587 | fi | |
b4e70030 | 15588 | |
81ecdfbb RW |
15589 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
15590 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 15591 | |
81ecdfbb RW |
15592 | if test ! -r "$ac_source"; then |
15593 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
15594 | fi | |
15595 | rm -f "$ac_file" | |
bec39cab | 15596 | |
81ecdfbb RW |
15597 | # Try a relative symlink, then a hard link, then a copy. |
15598 | case $srcdir in | |
15599 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
15600 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
15601 | esac | |
15602 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
15603 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
15604 | cp -p "$ac_source" "$ac_file" || | |
15605 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
15606 | fi | |
15607 | ;; | |
15608 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
15609 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
15610 | ;; | |
c906108c | 15611 | esac |
b4e70030 | 15612 | |
bec39cab | 15613 | |
81ecdfbb RW |
15614 | case $ac_file$ac_mode in |
15615 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
15616 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
15617 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
15618 | # are listed without --file. Let's play safe and only enable the eval | |
15619 | # if we detect the quoting. | |
15620 | case $CONFIG_FILES in | |
15621 | *\'*) eval set x "$CONFIG_FILES" ;; | |
15622 | *) set x $CONFIG_FILES ;; | |
15623 | esac | |
15624 | shift | |
15625 | for mf | |
15626 | do | |
15627 | # Strip MF so we end up with the name of the file. | |
15628 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
15629 | # Check whether this is an Automake generated Makefile or not. | |
15630 | # We used to match only the files named `Makefile.in', but | |
15631 | # some people rename them; so instead we look at the file content. | |
15632 | # Grep'ing the first line is not enough: some people post-process | |
15633 | # each Makefile.in and add a new line on top of each file to say so. | |
15634 | # Grep'ing the whole file is not good either: AIX grep has a line | |
15635 | # limit of 2048, but all sed's we know have understand at least 4000. | |
15636 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
15637 | dirpart=`$as_dirname -- "$mf" || | |
e28b3332 DJ |
15638 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
15639 | X"$mf" : 'X\(//\)[^/]' \| \ | |
15640 | X"$mf" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
15641 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || |
15642 | $as_echo X"$mf" | | |
15643 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15644 | s//\1/ | |
15645 | q | |
15646 | } | |
15647 | /^X\(\/\/\)[^/].*/{ | |
15648 | s//\1/ | |
15649 | q | |
15650 | } | |
15651 | /^X\(\/\/\)$/{ | |
15652 | s//\1/ | |
15653 | q | |
15654 | } | |
15655 | /^X\(\/\).*/{ | |
15656 | s//\1/ | |
15657 | q | |
15658 | } | |
15659 | s/.*/./; q'` | |
15660 | else | |
15661 | continue | |
15662 | fi | |
15663 | # Extract the definition of DEPDIR, am__include, and am__quote | |
15664 | # from the Makefile without running `make'. | |
15665 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
15666 | test -z "$DEPDIR" && continue | |
15667 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
15668 | test -z "am__include" && continue | |
15669 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
15670 | # When using ansi2knr, U may be empty or an underscore; expand it | |
15671 | U=`sed -n 's/^U = //p' < "$mf"` | |
15672 | # Find all dependency output files, they are included files with | |
15673 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
15674 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
15675 | # expansion. | |
15676 | for file in `sed -n " | |
15677 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
15678 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
15679 | # Make sure the directory exists. | |
15680 | test -f "$dirpart/$file" && continue | |
15681 | fdir=`$as_dirname -- "$file" || | |
e28b3332 DJ |
15682 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
15683 | X"$file" : 'X\(//\)[^/]' \| \ | |
15684 | X"$file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
15685 | X"$file" : 'X\(/\)' \| . 2>/dev/null || |
15686 | $as_echo X"$file" | | |
15687 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15688 | s//\1/ | |
15689 | q | |
15690 | } | |
15691 | /^X\(\/\/\)[^/].*/{ | |
15692 | s//\1/ | |
15693 | q | |
15694 | } | |
15695 | /^X\(\/\/\)$/{ | |
15696 | s//\1/ | |
15697 | q | |
15698 | } | |
15699 | /^X\(\/\).*/{ | |
15700 | s//\1/ | |
15701 | q | |
15702 | } | |
15703 | s/.*/./; q'` | |
15704 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
15705 | # echo "creating $dirpart/$file" | |
15706 | echo '# dummy' > "$dirpart/$file" | |
e28b3332 | 15707 | done |
e28b3332 | 15708 | done |
81ecdfbb | 15709 | } |
4e8d927d | 15710 | ;; |
81ecdfbb | 15711 | "default":C) |
c906108c SS |
15712 | case x$CONFIG_HEADERS in |
15713 | xconfig.h:config.in) | |
15714 | echo > stamp-h ;; | |
15715 | esac | |
bec39cab | 15716 | ;; |
81ecdfbb | 15717 | |
bec39cab | 15718 | esac |
81ecdfbb | 15719 | done # for ac_tag |
c906108c | 15720 | |
bec39cab | 15721 | |
81ecdfbb | 15722 | as_fn_exit 0 |
bec39cab | 15723 | _ACEOF |
bec39cab AC |
15724 | ac_clean_files=$ac_clean_files_save |
15725 | ||
81ecdfbb RW |
15726 | test $ac_write_fail = 0 || |
15727 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
15728 | ||
bec39cab AC |
15729 | |
15730 | # configure is writing to config.log, and then calls config.status. | |
15731 | # config.status does its own redirection, appending to config.log. | |
15732 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
15733 | # by configure, so config.status won't be able to write to it; its | |
15734 | # output is simply discarded. So we exec the FD to /dev/null, | |
15735 | # effectively closing config.log, so it can be properly (re)opened and | |
15736 | # appended to by config.status. When coming back to configure, we | |
15737 | # need to make the FD available again. | |
15738 | if test "$no_create" != yes; then | |
15739 | ac_cs_success=: | |
15740 | ac_config_status_args= | |
15741 | test "$silent" = yes && | |
15742 | ac_config_status_args="$ac_config_status_args --quiet" | |
15743 | exec 5>/dev/null | |
15744 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
15745 | exec 5>>config.log | |
15746 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
15747 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 15748 | $ac_cs_success || as_fn_exit $? |
bec39cab | 15749 | fi |
c906108c | 15750 | |
bec39cab | 15751 | # |
81ecdfbb | 15752 | # CONFIG_SUBDIRS section. |
bec39cab | 15753 | # |
c906108c SS |
15754 | if test "$no_recursion" != yes; then |
15755 | ||
81ecdfbb RW |
15756 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
15757 | # so they do not pile up. | |
c906108c SS |
15758 | ac_sub_configure_args= |
15759 | ac_prev= | |
fdc59709 PB |
15760 | eval "set x $ac_configure_args" |
15761 | shift | |
15762 | for ac_arg | |
15763 | do | |
c906108c SS |
15764 | if test -n "$ac_prev"; then |
15765 | ac_prev= | |
15766 | continue | |
15767 | fi | |
bec39cab | 15768 | case $ac_arg in |
c906108c SS |
15769 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
15770 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
15771 | ac_prev=cache_file ;; | |
15772 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
15773 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
15774 | | --c=*) | |
15775 | ;; | |
15776 | --config-cache | -C) | |
c906108c SS |
15777 | ;; |
15778 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
15779 | ac_prev=srcdir ;; | |
15780 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
15781 | ;; | |
bec39cab AC |
15782 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
15783 | ac_prev=prefix ;; | |
15784 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
15785 | ;; | |
81ecdfbb RW |
15786 | --disable-option-checking) |
15787 | ;; | |
fdc59709 PB |
15788 | *) |
15789 | case $ac_arg in | |
81ecdfbb | 15790 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 15791 | esac |
81ecdfbb | 15792 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
15793 | esac |
15794 | done | |
15795 | ||
bec39cab AC |
15796 | # Always prepend --prefix to ensure using the same prefix |
15797 | # in subdir configurations. | |
fdc59709 PB |
15798 | ac_arg="--prefix=$prefix" |
15799 | case $ac_arg in | |
81ecdfbb | 15800 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 15801 | esac |
81ecdfbb RW |
15802 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
15803 | ||
15804 | # Pass --silent | |
15805 | if test "$silent" = yes; then | |
15806 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
15807 | fi | |
15808 | ||
15809 | # Always prepend --disable-option-checking to silence warnings, since | |
15810 | # different subdirs can have different --enable and --with options. | |
15811 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 15812 | |
b4e70030 | 15813 | ac_popdir=`pwd` |
bec39cab | 15814 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
15815 | |
15816 | # Do not complain, so a configure script can configure whichever | |
15817 | # parts of a large source tree are present. | |
fdc59709 | 15818 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 15819 | |
81ecdfbb RW |
15820 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
15821 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
15822 | $as_echo "$ac_msg" >&6 | |
15823 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
15824 | ac_builddir=. |
15825 | ||
81ecdfbb RW |
15826 | case "$ac_dir" in |
15827 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15828 | *) | |
15829 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
15830 | # A ".." for each directory in $ac_dir_suffix. | |
15831 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
15832 | case $ac_top_builddir_sub in | |
15833 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15834 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
15835 | esac ;; | |
15836 | esac | |
15837 | ac_abs_top_builddir=$ac_pwd | |
15838 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
15839 | # for backward compatibility: | |
15840 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
15841 | |
15842 | case $srcdir in | |
81ecdfbb | 15843 | .) # We are building in place. |
bec39cab | 15844 | ac_srcdir=. |
81ecdfbb RW |
15845 | ac_top_srcdir=$ac_top_builddir_sub |
15846 | ac_abs_top_srcdir=$ac_pwd ;; | |
15847 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 15848 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
15849 | ac_top_srcdir=$srcdir |
15850 | ac_abs_top_srcdir=$srcdir ;; | |
15851 | *) # Relative name. | |
15852 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
15853 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
15854 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 15855 | esac |
81ecdfbb | 15856 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 15857 | |
c906108c | 15858 | |
fdc59709 | 15859 | cd "$ac_dir" |
c906108c SS |
15860 | |
15861 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
15862 | if test -f "$ac_srcdir/configure.gnu"; then |
15863 | ac_sub_configure=$ac_srcdir/configure.gnu | |
15864 | elif test -f "$ac_srcdir/configure"; then | |
15865 | ac_sub_configure=$ac_srcdir/configure | |
15866 | elif test -f "$ac_srcdir/configure.in"; then | |
15867 | # This should be Cygnus configure. | |
15868 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 15869 | else |
81ecdfbb RW |
15870 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
15871 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
15872 | ac_sub_configure= |
15873 | fi | |
15874 | ||
15875 | # The recursion is here. | |
15876 | if test -n "$ac_sub_configure"; then | |
c906108c | 15877 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
15878 | case $cache_file in |
15879 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
15880 | *) # Relative name. |
15881 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 15882 | esac |
c906108c | 15883 | |
81ecdfbb RW |
15884 | { $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 |
15885 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 15886 | # The eval makes quoting arguments work. |
fdc59709 PB |
15887 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
15888 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 15889 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
15890 | fi |
15891 | ||
fdc59709 | 15892 | cd "$ac_popdir" |
c906108c SS |
15893 | done |
15894 | fi | |
81ecdfbb RW |
15895 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
15896 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
15897 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
15898 | fi | |
c906108c SS |
15899 | |
15900 | ||
15901 | exit 0 |