Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
783e057b | 591 | gl_header_list= |
f434ba03 | 592 | gl_func_list= |
81ecdfbb RW |
593 | enable_option_checking=no |
594 | ac_subst_vars='am__EXEEXT_FALSE | |
595 | am__EXEEXT_TRUE | |
596 | gltests_LTLIBOBJS | |
597 | gltests_LIBOBJS | |
598 | gl_LTLIBOBJS | |
599 | gl_LIBOBJS | |
600 | LTLIBOBJS | |
601 | LIBOBJS | |
602 | GDB_NM_FILE | |
603 | frags | |
604 | target_subdir | |
605 | CONFIG_UNINSTALL | |
606 | CONFIG_INSTALL | |
607 | CONFIG_CLEAN | |
608 | CONFIG_ALL | |
609 | CONFIG_SRCS | |
610 | CONFIG_DEPS | |
611 | CONFIG_OBS | |
612 | PROFILE_CFLAGS | |
613 | ENABLE_CFLAGS | |
614 | SIM_OBS | |
615 | SIM | |
616 | XMKMF | |
617 | GDBTK_SRC_DIR | |
618 | GDBTK_CFLAGS | |
619 | GDBTKLIBS | |
620 | X_LIBS | |
621 | X_LDFLAGS | |
622 | X_CFLAGS | |
623 | TK_XINCLUDES | |
624 | TK_DEPS | |
625 | TK_LIBRARY | |
626 | TK_INCLUDE | |
627 | TK_STUB_LIB_SPEC | |
628 | TK_STUB_LIB_FLAG | |
629 | TK_STUB_LIB_FILE | |
630 | TK_LIB_SPEC | |
631 | TK_LIB_FLAG | |
632 | TK_LIB_FILE | |
633 | TK_SRC_DIR | |
634 | TK_BIN_DIR | |
635 | TK_VERSION | |
636 | TCL_DEPS | |
637 | TCL_LIBRARY | |
638 | TCL_INCLUDE | |
639 | TCL_STUB_LIB_SPEC | |
640 | TCL_STUB_LIB_FLAG | |
641 | TCL_STUB_LIB_FILE | |
642 | TCL_LIB_SPEC | |
643 | TCL_LIB_FLAG | |
644 | TCL_LIB_FILE | |
645 | TCL_SRC_DIR | |
646 | TCL_BIN_DIR | |
647 | TCL_PATCH_LEVEL | |
648 | TCL_VERSION | |
649 | WIN32LDAPP | |
650 | GUI_CFLAGS_X | |
651 | LIBGUI | |
652 | WIN32LIBS | |
653 | SER_HARDWIRE | |
654 | WERROR_CFLAGS | |
655 | WARN_CFLAGS | |
656 | SYSTEM_GDBINIT | |
657 | TARGET_SYSTEM_ROOT_DEFINE | |
658 | TARGET_SYSTEM_ROOT | |
659 | CONFIG_LDFLAGS | |
f6528abd | 660 | RDYNAMIC |
81ecdfbb | 661 | ALLOCA |
ac534cba JB |
662 | PYTHON_LIBS |
663 | PYTHON_CPPFLAGS | |
81ecdfbb | 664 | PYTHON_CFLAGS |
ec685c5e | 665 | python_prog_path |
81ecdfbb RW |
666 | LTLIBEXPAT |
667 | LIBEXPAT | |
668 | HAVE_LIBEXPAT | |
39037522 | 669 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
670 | READLINE_CFLAGS |
671 | READLINE_DEPS | |
672 | READLINE | |
673 | MIG | |
674 | WINDRES | |
675 | DLLTOOL | |
676 | AR | |
677 | YFLAGS | |
678 | YACC | |
679 | LN_S | |
680 | REPORT_BUGS_TEXI | |
681 | REPORT_BUGS_TO | |
682 | PKGVERSION | |
683 | TARGET_OBS | |
684 | subdirs | |
685 | GDB_DATADIR | |
686 | DEBUGDIR | |
687 | am__fastdepCC_FALSE | |
688 | am__fastdepCC_TRUE | |
689 | AMDEPBACKSLASH | |
690 | AMDEP_FALSE | |
691 | AMDEP_TRUE | |
692 | am__quote | |
693 | am__include | |
694 | am__untar | |
695 | am__tar | |
696 | AMTAR | |
697 | AWK | |
698 | mkdir_p | |
699 | MKDIR_P | |
700 | INSTALL_STRIP_PROGRAM | |
701 | STRIP | |
702 | install_sh | |
703 | MAKEINFO | |
704 | AUTOHEADER | |
705 | AUTOMAKE | |
706 | AUTOCONF | |
707 | ACLOCAL | |
708 | VERSION | |
709 | CYGPATH_W | |
710 | am__isrc | |
711 | INSTALL_DATA | |
712 | INSTALL_SCRIPT | |
713 | INSTALL_PROGRAM | |
714 | PACKAGE | |
715 | GNULIB_STDINT_H | |
716 | LIBGNU_LTLIBDEPS | |
717 | LIBGNU_LIBDEPS | |
f434ba03 PA |
718 | gltests_WITNESS |
719 | HAVE_WINT_T | |
81ecdfbb | 720 | HAVE_WCHAR_H |
f434ba03 PA |
721 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H |
722 | NEXT_WCHAR_H | |
81ecdfbb | 723 | REPLACE_WCWIDTH |
f434ba03 PA |
724 | REPLACE_WCSNRTOMBS |
725 | REPLACE_WCSRTOMBS | |
726 | REPLACE_WCRTOMB | |
727 | REPLACE_MBSNRTOWCS | |
728 | REPLACE_MBSRTOWCS | |
729 | REPLACE_MBRLEN | |
730 | REPLACE_MBRTOWC | |
731 | REPLACE_MBSINIT | |
732 | REPLACE_WCTOB | |
733 | REPLACE_BTOWC | |
734 | REPLACE_MBSTATE_T | |
81ecdfbb | 735 | HAVE_DECL_WCWIDTH |
f434ba03 PA |
736 | HAVE_DECL_WCTOB |
737 | HAVE_WCSNRTOMBS | |
738 | HAVE_WCSRTOMBS | |
739 | HAVE_WCRTOMB | |
740 | HAVE_MBSNRTOWCS | |
741 | HAVE_MBSRTOWCS | |
742 | HAVE_MBRLEN | |
743 | HAVE_MBRTOWC | |
744 | HAVE_MBSINIT | |
745 | HAVE_BTOWC | |
81ecdfbb | 746 | GNULIB_WCWIDTH |
f434ba03 PA |
747 | GNULIB_WCSNRTOMBS |
748 | GNULIB_WCSRTOMBS | |
749 | GNULIB_WCRTOMB | |
750 | GNULIB_MBSNRTOWCS | |
751 | GNULIB_MBSRTOWCS | |
752 | GNULIB_MBRLEN | |
753 | GNULIB_MBRTOWC | |
754 | GNULIB_MBSINIT | |
755 | GNULIB_WCTOB | |
756 | GNULIB_BTOWC | |
757 | NEXT_AS_FIRST_DIRECTIVE_STRING_H | |
81ecdfbb RW |
758 | NEXT_STRING_H |
759 | STDINT_H | |
760 | WINT_T_SUFFIX | |
761 | WCHAR_T_SUFFIX | |
81ecdfbb | 762 | SIG_ATOMIC_T_SUFFIX |
f434ba03 | 763 | SIZE_T_SUFFIX |
81ecdfbb RW |
764 | PTRDIFF_T_SUFFIX |
765 | HAVE_SIGNED_WINT_T | |
766 | HAVE_SIGNED_WCHAR_T | |
767 | HAVE_SIGNED_SIG_ATOMIC_T | |
768 | BITSIZEOF_WINT_T | |
769 | BITSIZEOF_WCHAR_T | |
81ecdfbb | 770 | BITSIZEOF_SIG_ATOMIC_T |
f434ba03 | 771 | BITSIZEOF_SIZE_T |
81ecdfbb RW |
772 | BITSIZEOF_PTRDIFF_T |
773 | HAVE_SYS_BITYPES_H | |
774 | HAVE_SYS_INTTYPES_H | |
775 | HAVE_STDINT_H | |
f434ba03 | 776 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H |
81ecdfbb | 777 | NEXT_STDINT_H |
81ecdfbb RW |
778 | HAVE_SYS_TYPES_H |
779 | HAVE_INTTYPES_H | |
780 | HAVE_UNSIGNED_LONG_LONG_INT | |
781 | HAVE_LONG_LONG_INT | |
f434ba03 PA |
782 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
783 | NEXT_STDDEF_H | |
784 | PRAGMA_SYSTEM_HEADER | |
785 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
786 | INCLUDE_NEXT | |
787 | STDDEF_H | |
788 | HAVE_WCHAR_T | |
789 | REPLACE_NULL | |
790 | APPLE_UNIVERSAL_BUILD | |
791 | UNDEFINE_STRTOK_R | |
792 | REPLACE_STRTOK_R | |
81ecdfbb | 793 | REPLACE_STRSIGNAL |
f434ba03 PA |
794 | REPLACE_STRNLEN |
795 | REPLACE_STRNDUP | |
796 | REPLACE_STRNCAT | |
81ecdfbb | 797 | REPLACE_STRERROR |
f434ba03 PA |
798 | REPLACE_STRCASESTR |
799 | REPLACE_STRSTR | |
800 | REPLACE_STRDUP | |
801 | REPLACE_STPNCPY | |
802 | REPLACE_MEMMEM | |
803 | REPLACE_MEMCHR | |
804 | HAVE_STRVERSCMP | |
81ecdfbb | 805 | HAVE_DECL_STRSIGNAL |
81ecdfbb RW |
806 | HAVE_DECL_STRTOK_R |
807 | HAVE_STRCASESTR | |
808 | HAVE_STRSEP | |
809 | HAVE_STRPBRK | |
810 | HAVE_DECL_STRNLEN | |
811 | HAVE_DECL_STRNDUP | |
81ecdfbb RW |
812 | HAVE_DECL_STRDUP |
813 | HAVE_STRCHRNUL | |
814 | HAVE_STPNCPY | |
815 | HAVE_STPCPY | |
f434ba03 | 816 | HAVE_RAWMEMCHR |
81ecdfbb RW |
817 | HAVE_DECL_MEMRCHR |
818 | HAVE_MEMPCPY | |
819 | HAVE_DECL_MEMMEM | |
f434ba03 PA |
820 | HAVE_MEMCHR |
821 | HAVE_MBSLEN | |
822 | GNULIB_STRVERSCMP | |
81ecdfbb RW |
823 | GNULIB_STRSIGNAL |
824 | GNULIB_STRERROR | |
825 | GNULIB_MBSTOK_R | |
826 | GNULIB_MBSSEP | |
827 | GNULIB_MBSSPN | |
828 | GNULIB_MBSPBRK | |
829 | GNULIB_MBSCSPN | |
830 | GNULIB_MBSCASESTR | |
831 | GNULIB_MBSPCASECMP | |
832 | GNULIB_MBSNCASECMP | |
833 | GNULIB_MBSCASECMP | |
834 | GNULIB_MBSSTR | |
835 | GNULIB_MBSRCHR | |
836 | GNULIB_MBSCHR | |
837 | GNULIB_MBSNLEN | |
838 | GNULIB_MBSLEN | |
839 | GNULIB_STRTOK_R | |
840 | GNULIB_STRCASESTR | |
841 | GNULIB_STRSTR | |
842 | GNULIB_STRSEP | |
843 | GNULIB_STRPBRK | |
844 | GNULIB_STRNLEN | |
845 | GNULIB_STRNDUP | |
f434ba03 | 846 | GNULIB_STRNCAT |
81ecdfbb RW |
847 | GNULIB_STRDUP |
848 | GNULIB_STRCHRNUL | |
849 | GNULIB_STPNCPY | |
850 | GNULIB_STPCPY | |
f434ba03 | 851 | GNULIB_RAWMEMCHR |
81ecdfbb RW |
852 | GNULIB_MEMRCHR |
853 | GNULIB_MEMPCPY | |
854 | GNULIB_MEMMEM | |
f434ba03 | 855 | GNULIB_MEMCHR |
81ecdfbb RW |
856 | GL_COND_LIBTOOL_FALSE |
857 | GL_COND_LIBTOOL_TRUE | |
858 | CATOBJEXT | |
859 | GENCAT | |
860 | INSTOBJEXT | |
861 | DATADIRNAME | |
862 | CATALOGS | |
863 | POSUB | |
864 | GMSGFMT | |
865 | XGETTEXT | |
866 | INCINTL | |
867 | LIBINTL_DEP | |
868 | LIBINTL | |
869 | USE_NLS | |
870 | SET_MAKE | |
871 | GMAKE_FALSE | |
872 | GMAKE_TRUE | |
873 | MAKE | |
874 | CCDEPMODE | |
875 | DEPDIR | |
876 | am__leading_dot | |
877 | target_os | |
878 | target_vendor | |
879 | target_cpu | |
880 | target | |
f434ba03 PA |
881 | RANLIB |
882 | EGREP | |
883 | GREP | |
884 | CPP | |
81ecdfbb RW |
885 | host_os |
886 | host_vendor | |
887 | host_cpu | |
888 | host | |
889 | build_os | |
890 | build_vendor | |
891 | build_cpu | |
892 | build | |
81ecdfbb RW |
893 | OBJEXT |
894 | EXEEXT | |
895 | ac_ct_CC | |
896 | CPPFLAGS | |
897 | LDFLAGS | |
898 | CFLAGS | |
899 | CC | |
900 | MAINT | |
901 | MAINTAINER_MODE_FALSE | |
902 | MAINTAINER_MODE_TRUE | |
903 | target_alias | |
904 | host_alias | |
905 | build_alias | |
906 | LIBS | |
907 | ECHO_T | |
908 | ECHO_N | |
909 | ECHO_C | |
910 | DEFS | |
911 | mandir | |
912 | localedir | |
913 | libdir | |
914 | psdir | |
915 | pdfdir | |
916 | dvidir | |
917 | htmldir | |
918 | infodir | |
919 | docdir | |
920 | oldincludedir | |
921 | includedir | |
922 | localstatedir | |
923 | sharedstatedir | |
924 | sysconfdir | |
925 | datadir | |
926 | datarootdir | |
927 | libexecdir | |
928 | sbindir | |
929 | bindir | |
930 | program_transform_name | |
931 | prefix | |
932 | exec_prefix | |
933 | PACKAGE_URL | |
934 | PACKAGE_BUGREPORT | |
935 | PACKAGE_STRING | |
936 | PACKAGE_VERSION | |
937 | PACKAGE_TARNAME | |
938 | PACKAGE_NAME | |
939 | PATH_SEPARATOR | |
940 | SHELL' | |
a4ce5b0d | 941 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
942 | ac_user_opts=' |
943 | enable_option_checking | |
944 | enable_maintainer_mode | |
da2f07f1 JK |
945 | enable_plugins |
946 | enable_largefile | |
81ecdfbb RW |
947 | enable_dependency_tracking |
948 | with_separate_debug_dir | |
949 | with_gdb_datadir | |
950 | with_relocated_sources | |
951 | enable_targets | |
952 | enable_64_bit_bfd | |
953 | enable_gdbcli | |
954 | enable_gdbmi | |
955 | enable_tui | |
956 | enable_gdbtk | |
957 | with_libunwind | |
958 | with_curses | |
959 | enable_profiling | |
960 | with_pkgversion | |
961 | with_bugurl | |
b040ad30 | 962 | with_zlib |
81ecdfbb RW |
963 | with_libiconv_prefix |
964 | with_system_readline | |
965 | with_expat | |
966 | with_gnu_ld | |
967 | enable_rpath | |
968 | with_libexpat_prefix | |
969 | with_python | |
970 | with_included_regex | |
971 | with_sysroot | |
972 | with_system_gdbinit | |
973 | enable_werror | |
974 | enable_build_warnings | |
975 | enable_gdb_build_warnings | |
976 | with_tcl | |
977 | with_tk | |
978 | with_x | |
979 | enable_sim | |
980 | enable_multi_ice | |
496c0e1b | 981 | enable_gdbserver |
81ecdfbb RW |
982 | ' |
983 | ac_precious_vars='build_alias | |
984 | host_alias | |
985 | target_alias | |
986 | CC | |
987 | CFLAGS | |
988 | LDFLAGS | |
989 | LIBS | |
990 | CPPFLAGS | |
991 | CPP | |
992 | YACC | |
993 | YFLAGS | |
994 | XMKMF' | |
5ae98d25 | 995 | ac_subdirs_all='testsuite |
4f3e6fb7 | 996 | common |
81ecdfbb RW |
997 | gdbtk |
998 | multi-ice | |
999 | gdbserver' | |
c906108c SS |
1000 | |
1001 | # Initialize some variables set by options. | |
bec39cab AC |
1002 | ac_init_help= |
1003 | ac_init_version=false | |
81ecdfbb RW |
1004 | ac_unrecognized_opts= |
1005 | ac_unrecognized_sep= | |
c906108c SS |
1006 | # The variables have the same names as the options, with |
1007 | # dashes changed to underlines. | |
bec39cab | 1008 | cache_file=/dev/null |
c906108c | 1009 | exec_prefix=NONE |
c906108c | 1010 | no_create= |
c906108c SS |
1011 | no_recursion= |
1012 | prefix=NONE | |
1013 | program_prefix=NONE | |
1014 | program_suffix=NONE | |
1015 | program_transform_name=s,x,x, | |
1016 | silent= | |
1017 | site= | |
1018 | srcdir= | |
c906108c SS |
1019 | verbose= |
1020 | x_includes=NONE | |
1021 | x_libraries=NONE | |
bec39cab AC |
1022 | |
1023 | # Installation directory options. | |
1024 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1025 | # and all the variables that are supposed to be based on exec_prefix | |
1026 | # by default will actually change. | |
1027 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 1028 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
1029 | bindir='${exec_prefix}/bin' |
1030 | sbindir='${exec_prefix}/sbin' | |
1031 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
1032 | datarootdir='${prefix}/share' |
1033 | datadir='${datarootdir}' | |
c906108c SS |
1034 | sysconfdir='${prefix}/etc' |
1035 | sharedstatedir='${prefix}/com' | |
1036 | localstatedir='${prefix}/var' | |
c906108c SS |
1037 | includedir='${prefix}/include' |
1038 | oldincludedir='/usr/include' | |
81ecdfbb RW |
1039 | docdir='${datarootdir}/doc/${PACKAGE}' |
1040 | infodir='${datarootdir}/info' | |
1041 | htmldir='${docdir}' | |
1042 | dvidir='${docdir}' | |
1043 | pdfdir='${docdir}' | |
1044 | psdir='${docdir}' | |
1045 | libdir='${exec_prefix}/lib' | |
1046 | localedir='${datarootdir}/locale' | |
1047 | mandir='${datarootdir}/man' | |
c906108c | 1048 | |
c906108c | 1049 | ac_prev= |
81ecdfbb | 1050 | ac_dashdash= |
c906108c SS |
1051 | for ac_option |
1052 | do | |
c906108c SS |
1053 | # If the previous option needs an argument, assign it. |
1054 | if test -n "$ac_prev"; then | |
81ecdfbb | 1055 | eval $ac_prev=\$ac_option |
c906108c SS |
1056 | ac_prev= |
1057 | continue | |
1058 | fi | |
1059 | ||
81ecdfbb RW |
1060 | case $ac_option in |
1061 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
1062 | *) ac_optarg=yes ;; | |
1063 | esac | |
c906108c SS |
1064 | |
1065 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1066 | ||
81ecdfbb RW |
1067 | case $ac_dashdash$ac_option in |
1068 | --) | |
1069 | ac_dashdash=yes ;; | |
c906108c SS |
1070 | |
1071 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1072 | ac_prev=bindir ;; | |
1073 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1074 | bindir=$ac_optarg ;; |
c906108c SS |
1075 | |
1076 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1077 | ac_prev=build_alias ;; |
c906108c | 1078 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1079 | build_alias=$ac_optarg ;; |
c906108c SS |
1080 | |
1081 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1082 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1083 | ac_prev=cache_file ;; | |
1084 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1085 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1086 | cache_file=$ac_optarg ;; |
1087 | ||
1088 | --config-cache | -C) | |
1089 | cache_file=config.cache ;; | |
c906108c | 1090 | |
81ecdfbb | 1091 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1092 | ac_prev=datadir ;; |
81ecdfbb | 1093 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1094 | datadir=$ac_optarg ;; |
c906108c | 1095 | |
81ecdfbb RW |
1096 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1097 | | --dataroo | --dataro | --datar) | |
1098 | ac_prev=datarootdir ;; | |
1099 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1100 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1101 | datarootdir=$ac_optarg ;; | |
1102 | ||
c906108c | 1103 | -disable-* | --disable-*) |
81ecdfbb | 1104 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1105 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1106 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1107 | as_fn_error "invalid feature name: $ac_useropt" | |
1108 | ac_useropt_orig=$ac_useropt | |
1109 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1110 | case $ac_user_opts in | |
1111 | *" | |
1112 | "enable_$ac_useropt" | |
1113 | "*) ;; | |
1114 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1115 | ac_unrecognized_sep=', ';; | |
1116 | esac | |
1117 | eval enable_$ac_useropt=no ;; | |
1118 | ||
1119 | -docdir | --docdir | --docdi | --doc | --do) | |
1120 | ac_prev=docdir ;; | |
1121 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1122 | docdir=$ac_optarg ;; | |
1123 | ||
1124 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1125 | ac_prev=dvidir ;; | |
1126 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1127 | dvidir=$ac_optarg ;; | |
c906108c SS |
1128 | |
1129 | -enable-* | --enable-*) | |
81ecdfbb | 1130 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1131 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1132 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1133 | as_fn_error "invalid feature name: $ac_useropt" | |
1134 | ac_useropt_orig=$ac_useropt | |
1135 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1136 | case $ac_user_opts in | |
1137 | *" | |
1138 | "enable_$ac_useropt" | |
1139 | "*) ;; | |
1140 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1141 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1142 | esac |
81ecdfbb | 1143 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1144 | |
1145 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1146 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1147 | | --exec | --exe | --ex) | |
1148 | ac_prev=exec_prefix ;; | |
1149 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1150 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1151 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1152 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1153 | |
1154 | -gas | --gas | --ga | --g) | |
1155 | # Obsolete; use --with-gas. | |
1156 | with_gas=yes ;; | |
1157 | ||
bec39cab AC |
1158 | -help | --help | --hel | --he | -h) |
1159 | ac_init_help=long ;; | |
1160 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1161 | ac_init_help=recursive ;; | |
1162 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1163 | ac_init_help=short ;; | |
c906108c SS |
1164 | |
1165 | -host | --host | --hos | --ho) | |
bec39cab | 1166 | ac_prev=host_alias ;; |
c906108c | 1167 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1168 | host_alias=$ac_optarg ;; |
c906108c | 1169 | |
81ecdfbb RW |
1170 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1171 | ac_prev=htmldir ;; | |
1172 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1173 | | --ht=*) | |
1174 | htmldir=$ac_optarg ;; | |
1175 | ||
c906108c SS |
1176 | -includedir | --includedir | --includedi | --included | --include \ |
1177 | | --includ | --inclu | --incl | --inc) | |
1178 | ac_prev=includedir ;; | |
1179 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1180 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1181 | includedir=$ac_optarg ;; |
c906108c SS |
1182 | |
1183 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1184 | ac_prev=infodir ;; | |
1185 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1186 | infodir=$ac_optarg ;; |
c906108c SS |
1187 | |
1188 | -libdir | --libdir | --libdi | --libd) | |
1189 | ac_prev=libdir ;; | |
1190 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1191 | libdir=$ac_optarg ;; |
c906108c SS |
1192 | |
1193 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1194 | | --libexe | --libex | --libe) | |
1195 | ac_prev=libexecdir ;; | |
1196 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1197 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1198 | libexecdir=$ac_optarg ;; |
c906108c | 1199 | |
81ecdfbb RW |
1200 | -localedir | --localedir | --localedi | --localed | --locale) |
1201 | ac_prev=localedir ;; | |
1202 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1203 | localedir=$ac_optarg ;; | |
1204 | ||
c906108c | 1205 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1206 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1207 | ac_prev=localstatedir ;; |
1208 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1209 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1210 | localstatedir=$ac_optarg ;; |
c906108c SS |
1211 | |
1212 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1213 | ac_prev=mandir ;; | |
1214 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1215 | mandir=$ac_optarg ;; |
c906108c SS |
1216 | |
1217 | -nfp | --nfp | --nf) | |
1218 | # Obsolete; use --without-fp. | |
1219 | with_fp=no ;; | |
1220 | ||
1221 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1222 | | --no-cr | --no-c | -n) |
c906108c SS |
1223 | no_create=yes ;; |
1224 | ||
1225 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1226 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1227 | no_recursion=yes ;; | |
1228 | ||
1229 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1230 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1231 | | --oldin | --oldi | --old | --ol | --o) | |
1232 | ac_prev=oldincludedir ;; | |
1233 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1234 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1235 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1236 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1237 | |
1238 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1239 | ac_prev=prefix ;; | |
1240 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1241 | prefix=$ac_optarg ;; |
c906108c SS |
1242 | |
1243 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1244 | | --program-pre | --program-pr | --program-p) | |
1245 | ac_prev=program_prefix ;; | |
1246 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1247 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1248 | program_prefix=$ac_optarg ;; |
c906108c SS |
1249 | |
1250 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1251 | | --program-suf | --program-su | --program-s) | |
1252 | ac_prev=program_suffix ;; | |
1253 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1254 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1255 | program_suffix=$ac_optarg ;; |
c906108c SS |
1256 | |
1257 | -program-transform-name | --program-transform-name \ | |
1258 | | --program-transform-nam | --program-transform-na \ | |
1259 | | --program-transform-n | --program-transform- \ | |
1260 | | --program-transform | --program-transfor \ | |
1261 | | --program-transfo | --program-transf \ | |
1262 | | --program-trans | --program-tran \ | |
1263 | | --progr-tra | --program-tr | --program-t) | |
1264 | ac_prev=program_transform_name ;; | |
1265 | -program-transform-name=* | --program-transform-name=* \ | |
1266 | | --program-transform-nam=* | --program-transform-na=* \ | |
1267 | | --program-transform-n=* | --program-transform-=* \ | |
1268 | | --program-transform=* | --program-transfor=* \ | |
1269 | | --program-transfo=* | --program-transf=* \ | |
1270 | | --program-trans=* | --program-tran=* \ | |
1271 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1272 | program_transform_name=$ac_optarg ;; |
c906108c | 1273 | |
81ecdfbb RW |
1274 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1275 | ac_prev=pdfdir ;; | |
1276 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1277 | pdfdir=$ac_optarg ;; | |
1278 | ||
1279 | -psdir | --psdir | --psdi | --psd | --ps) | |
1280 | ac_prev=psdir ;; | |
1281 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1282 | psdir=$ac_optarg ;; | |
1283 | ||
c906108c SS |
1284 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1285 | | -silent | --silent | --silen | --sile | --sil) | |
1286 | silent=yes ;; | |
1287 | ||
1288 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1289 | ac_prev=sbindir ;; | |
1290 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1291 | | --sbi=* | --sb=*) | |
bec39cab | 1292 | sbindir=$ac_optarg ;; |
c906108c SS |
1293 | |
1294 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1295 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1296 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1297 | | --sha | --sh) | |
1298 | ac_prev=sharedstatedir ;; | |
1299 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1300 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1301 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1302 | | --sha=* | --sh=*) | |
bec39cab | 1303 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1304 | |
1305 | -site | --site | --sit) | |
1306 | ac_prev=site ;; | |
1307 | -site=* | --site=* | --sit=*) | |
bec39cab | 1308 | site=$ac_optarg ;; |
3ace7edb | 1309 | |
c906108c SS |
1310 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1311 | ac_prev=srcdir ;; | |
1312 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1313 | srcdir=$ac_optarg ;; |
c906108c SS |
1314 | |
1315 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1316 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1317 | ac_prev=sysconfdir ;; | |
1318 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1319 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1320 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1321 | |
1322 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1323 | ac_prev=target_alias ;; |
c906108c | 1324 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1325 | target_alias=$ac_optarg ;; |
c906108c SS |
1326 | |
1327 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1328 | verbose=yes ;; | |
1329 | ||
bec39cab AC |
1330 | -version | --version | --versio | --versi | --vers | -V) |
1331 | ac_init_version=: ;; | |
c906108c SS |
1332 | |
1333 | -with-* | --with-*) | |
81ecdfbb | 1334 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1335 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1336 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1337 | as_fn_error "invalid package name: $ac_useropt" | |
1338 | ac_useropt_orig=$ac_useropt | |
1339 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1340 | case $ac_user_opts in | |
1341 | *" | |
1342 | "with_$ac_useropt" | |
1343 | "*) ;; | |
1344 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1345 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1346 | esac |
81ecdfbb | 1347 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1348 | |
1349 | -without-* | --without-*) | |
81ecdfbb | 1350 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1351 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1352 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1353 | as_fn_error "invalid package name: $ac_useropt" | |
1354 | ac_useropt_orig=$ac_useropt | |
1355 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1356 | case $ac_user_opts in | |
1357 | *" | |
1358 | "with_$ac_useropt" | |
1359 | "*) ;; | |
1360 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1361 | ac_unrecognized_sep=', ';; | |
1362 | esac | |
1363 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1364 | |
1365 | --x) | |
1366 | # Obsolete; use --with-x. | |
1367 | with_x=yes ;; | |
1368 | ||
1369 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1370 | | --x-incl | --x-inc | --x-in | --x-i) | |
1371 | ac_prev=x_includes ;; | |
1372 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1373 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1374 | x_includes=$ac_optarg ;; |
c906108c SS |
1375 | |
1376 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1377 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1378 | ac_prev=x_libraries ;; | |
1379 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1380 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1381 | x_libraries=$ac_optarg ;; |
c906108c | 1382 | |
81ecdfbb RW |
1383 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1384 | Try \`$0 --help' for more information." | |
c906108c SS |
1385 | ;; |
1386 | ||
bec39cab AC |
1387 | *=*) |
1388 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1389 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1390 | case $ac_envvar in #( |
1391 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1392 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1393 | esac | |
1394 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1395 | export $ac_envvar ;; |
1396 | ||
c906108c | 1397 | *) |
bec39cab | 1398 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1399 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1400 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1401 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1402 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1403 | ;; |
1404 | ||
1405 | esac | |
1406 | done | |
1407 | ||
1408 | if test -n "$ac_prev"; then | |
bec39cab | 1409 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1410 | as_fn_error "missing argument to $ac_option" |
c906108c | 1411 | fi |
c906108c | 1412 | |
81ecdfbb RW |
1413 | if test -n "$ac_unrecognized_opts"; then |
1414 | case $enable_option_checking in | |
1415 | no) ;; | |
1416 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1417 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1418 | esac |
81ecdfbb | 1419 | fi |
b4e70030 | 1420 | |
81ecdfbb RW |
1421 | # Check all directory arguments for consistency. |
1422 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1423 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1424 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1425 | libdir localedir mandir | |
b4e70030 | 1426 | do |
81ecdfbb RW |
1427 | eval ac_val=\$$ac_var |
1428 | # Remove trailing slashes. | |
1429 | case $ac_val in | |
1430 | */ ) | |
1431 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1432 | eval $ac_var=\$ac_val;; | |
1433 | esac | |
1434 | # Be sure to have absolute directory names. | |
b4e70030 | 1435 | case $ac_val in |
81ecdfbb RW |
1436 | [\\/$]* | ?:[\\/]* ) continue;; |
1437 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1438 | esac |
81ecdfbb | 1439 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1440 | done |
1441 | ||
bec39cab AC |
1442 | # There might be people who depend on the old broken behavior: `$host' |
1443 | # used to hold the argument of --host etc. | |
1444 | # FIXME: To remove some day. | |
1445 | build=$build_alias | |
1446 | host=$host_alias | |
1447 | target=$target_alias | |
1448 | ||
1449 | # FIXME: To remove some day. | |
1450 | if test "x$host_alias" != x; then | |
1451 | if test "x$build_alias" = x; then | |
1452 | cross_compiling=maybe | |
81ecdfbb | 1453 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1454 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1455 | elif test "x$build_alias" != "x$host_alias"; then | |
1456 | cross_compiling=yes | |
1457 | fi | |
1458 | fi | |
c906108c | 1459 | |
bec39cab AC |
1460 | ac_tool_prefix= |
1461 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1462 | ||
1463 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1464 | |
c906108c | 1465 | |
81ecdfbb RW |
1466 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1467 | ac_ls_di=`ls -di .` && | |
1468 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1469 | as_fn_error "working directory cannot be determined" | |
1470 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1471 | as_fn_error "pwd does not report name of working directory" | |
1472 | ||
1473 | ||
c906108c SS |
1474 | # Find the source files, if location was not specified. |
1475 | if test -z "$srcdir"; then | |
1476 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1477 | # Try the directory containing this script, then the parent directory. |
1478 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1479 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1480 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1481 | X"$as_myself" : 'X\(//\)$' \| \ | |
1482 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1483 | $as_echo X"$as_myself" | | |
1484 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1485 | s//\1/ | |
1486 | q | |
1487 | } | |
1488 | /^X\(\/\/\)[^/].*/{ | |
1489 | s//\1/ | |
1490 | q | |
1491 | } | |
1492 | /^X\(\/\/\)$/{ | |
1493 | s//\1/ | |
1494 | q | |
1495 | } | |
1496 | /^X\(\/\).*/{ | |
1497 | s//\1/ | |
1498 | q | |
1499 | } | |
1500 | s/.*/./; q'` | |
c906108c | 1501 | srcdir=$ac_confdir |
81ecdfbb | 1502 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1503 | srcdir=.. |
1504 | fi | |
1505 | else | |
1506 | ac_srcdir_defaulted=no | |
1507 | fi | |
81ecdfbb RW |
1508 | if test ! -r "$srcdir/$ac_unique_file"; then |
1509 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1510 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1511 | fi | |
1512 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1513 | ac_abs_confdir=`( | |
1514 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1515 | pwd)` | |
1516 | # When building in place, set srcdir=. | |
1517 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1518 | srcdir=. | |
1519 | fi | |
1520 | # Remove unnecessary trailing slashes from srcdir. | |
1521 | # Double slashes in file names in object file debugging info | |
1522 | # mess up M-x gdb in Emacs. | |
1523 | case $srcdir in | |
1524 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1525 | esac | |
1526 | for ac_var in $ac_precious_vars; do | |
1527 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1528 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1529 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1530 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1531 | done | |
c906108c | 1532 | |
bec39cab AC |
1533 | # |
1534 | # Report the --help message. | |
1535 | # | |
1536 | if test "$ac_init_help" = "long"; then | |
1537 | # Omit some internal or obsolete options to make the list less imposing. | |
1538 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1539 | cat <<_ACEOF | |
1540 | \`configure' configures this package to adapt to many kinds of systems. | |
1541 | ||
1542 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1543 | ||
1544 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1545 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1546 | ||
1547 | Defaults for the options are specified in brackets. | |
1548 | ||
1549 | Configuration: | |
1550 | -h, --help display this help and exit | |
1551 | --help=short display options specific to this package | |
1552 | --help=recursive display the short help of all the included packages | |
1553 | -V, --version display version information and exit | |
1554 | -q, --quiet, --silent do not print \`checking...' messages | |
1555 | --cache-file=FILE cache test results in FILE [disabled] | |
1556 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1557 | -n, --no-create do not create output files | |
1558 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1559 | ||
bec39cab AC |
1560 | Installation directories: |
1561 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1562 | [$ac_default_prefix] |
bec39cab | 1563 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1564 | [PREFIX] |
bec39cab AC |
1565 | |
1566 | By default, \`make install' will install all the files in | |
1567 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1568 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1569 | for instance \`--prefix=\$HOME'. | |
1570 | ||
1571 | For better control, use the options below. | |
1572 | ||
1573 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1574 | --bindir=DIR user executables [EPREFIX/bin] |
1575 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1576 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1577 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1578 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1579 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1580 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1581 | --includedir=DIR C header files [PREFIX/include] | |
1582 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1583 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1584 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1585 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1586 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1587 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1588 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1589 | --htmldir=DIR html documentation [DOCDIR] | |
1590 | --dvidir=DIR dvi documentation [DOCDIR] | |
1591 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1592 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1593 | _ACEOF |
1594 | ||
1595 | cat <<\_ACEOF | |
1596 | ||
1597 | Program names: | |
1598 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1599 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1600 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1601 | ||
1602 | X features: | |
1603 | --x-includes=DIR X include files are in DIR | |
1604 | --x-libraries=DIR X library files are in DIR | |
1605 | ||
1606 | System types: | |
1607 | --build=BUILD configure for building on BUILD [guessed] | |
1608 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1609 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1610 | _ACEOF | |
1611 | fi | |
1612 | ||
1613 | if test -n "$ac_init_help"; then | |
1614 | ||
1615 | cat <<\_ACEOF | |
1616 | ||
1617 | Optional Features: | |
81ecdfbb | 1618 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1619 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1620 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1621 | --enable-maintainer-mode enable make rules and dependencies not useful |
1622 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1623 | --enable-plugins Enable support for plugins (defaults no) |
1624 | --disable-largefile omit support for large files | |
e28b3332 DJ |
1625 | --disable-dependency-tracking speeds up one-time build |
1626 | --enable-dependency-tracking do not reject slow dependency extractors | |
a1220294 TT |
1627 | --enable-targets=TARGETS |
1628 | alternative target configurations | |
c0993dbe | 1629 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1630 | --disable-gdbcli disable command-line interface (CLI) |
1631 | --disable-gdbmi disable machine-interface (MI) | |
1632 | --enable-tui enable full-screen terminal user interface (TUI) | |
1633 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1634 | --enable-profiling enable profiling of GDB | |
3841debe | 1635 | --disable-rpath do not hardcode runtime library paths |
a1220294 | 1636 | --enable-werror treat compile warnings as errors |
32c1c914 | 1637 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1638 | --enable-gdb-build-warnings |
32c1c914 | 1639 | enable GDB specific build-time compiler warnings if |
a1220294 | 1640 | gcc is used |
32c1c914 | 1641 | --enable-sim link gdb with simulator |
bec39cab | 1642 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1643 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1644 | is auto) | |
bec39cab AC |
1645 | |
1646 | Optional Packages: | |
1647 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1648 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1649 | --with-separate-debug-dir=PATH |
32c1c914 | 1650 | look for global separate debug info in this path |
62e4f60c | 1651 | [LIBDIR/debug] |
b14b1491 TT |
1652 | --with-gdb-datadir=PATH look for global separate data files in this path |
1653 | [DATADIR/gdb] | |
29b0e8a2 | 1654 | --with-relocated-sources=PATH |
32c1c914 TT |
1655 | automatically relocate this path for source files |
1656 | --with-libunwind use libunwind frame unwinding support | |
cb01cfba JB |
1657 | --with-curses use the curses library instead of the termcap |
1658 | library | |
c16158bc JM |
1659 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1660 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1661 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1662 | --with-libiconv-prefix=DIR |
1663 | search for libiconv in DIR/include and DIR/lib | |
6a30b0a5 | 1664 | --with-system-readline use installed readline library |
5c39566f | 1665 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1666 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1667 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1668 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1669 | --with-python[=PYTHON] include python support |
1670 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1671 | --without-included-regex |
1672 | don't use included regex; this is the default on | |
1673 | systems with version 2 of the GNU C library (use | |
1674 | with caution on other system) | |
81ecdfbb | 1675 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1676 | --with-system-gdbinit=PATH |
32c1c914 | 1677 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1678 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1679 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1680 | --with-x use the X Window System |
bec39cab AC |
1681 | |
1682 | Some influential environment variables: | |
1683 | CC C compiler command | |
1684 | CFLAGS C compiler flags | |
1685 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1686 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1687 | LIBS libraries to pass to the linker, e.g. -l<library> |
1688 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1689 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1690 | CPP C preprocessor |
81ecdfbb RW |
1691 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1692 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1693 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1694 | This script will default YFLAGS to the empty string to avoid a | |
1695 | default value of `-d' given by some make applications. | |
1696 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1697 | |
1698 | Use these variables to override the choices made by `configure' or to help | |
1699 | it to find libraries and programs with nonstandard names/locations. | |
1700 | ||
81ecdfbb | 1701 | Report bugs to the package provider. |
bec39cab | 1702 | _ACEOF |
81ecdfbb | 1703 | ac_status=$? |
bec39cab AC |
1704 | fi |
1705 | ||
1706 | if test "$ac_init_help" = "recursive"; then | |
1707 | # If there are subdirs, report their specific --help. | |
bec39cab | 1708 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1709 | test -d "$ac_dir" || |
1710 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1711 | continue | |
bec39cab AC |
1712 | ac_builddir=. |
1713 | ||
81ecdfbb RW |
1714 | case "$ac_dir" in |
1715 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1716 | *) | |
1717 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1718 | # A ".." for each directory in $ac_dir_suffix. | |
1719 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1720 | case $ac_top_builddir_sub in | |
1721 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1722 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1723 | esac ;; | |
1724 | esac | |
1725 | ac_abs_top_builddir=$ac_pwd | |
1726 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1727 | # for backward compatibility: | |
1728 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1729 | |
1730 | case $srcdir in | |
81ecdfbb | 1731 | .) # We are building in place. |
bec39cab | 1732 | ac_srcdir=. |
81ecdfbb RW |
1733 | ac_top_srcdir=$ac_top_builddir_sub |
1734 | ac_abs_top_srcdir=$ac_pwd ;; | |
1735 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1736 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1737 | ac_top_srcdir=$srcdir |
1738 | ac_abs_top_srcdir=$srcdir ;; | |
1739 | *) # Relative name. | |
1740 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1741 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1742 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1743 | esac |
81ecdfbb | 1744 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1745 | |
81ecdfbb RW |
1746 | cd "$ac_dir" || { ac_status=$?; continue; } |
1747 | # Check for guested configure. | |
1748 | if test -f "$ac_srcdir/configure.gnu"; then | |
1749 | echo && | |
1750 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1751 | elif test -f "$ac_srcdir/configure"; then | |
1752 | echo && | |
1753 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1754 | else |
81ecdfbb RW |
1755 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1756 | fi || ac_status=$? | |
1757 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1758 | done |
1759 | fi | |
1760 | ||
81ecdfbb | 1761 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1762 | if $ac_init_version; then |
1763 | cat <<\_ACEOF | |
81ecdfbb RW |
1764 | configure |
1765 | generated by GNU Autoconf 2.64 | |
bec39cab | 1766 | |
81ecdfbb | 1767 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1768 | This configure script is free software; the Free Software Foundation |
1769 | gives unlimited permission to copy, distribute and modify it. | |
1770 | _ACEOF | |
81ecdfbb | 1771 | exit |
bec39cab | 1772 | fi |
bec39cab | 1773 | |
81ecdfbb RW |
1774 | ## ------------------------ ## |
1775 | ## Autoconf initialization. ## | |
1776 | ## ------------------------ ## | |
bec39cab | 1777 | |
81ecdfbb RW |
1778 | # ac_fn_c_try_compile LINENO |
1779 | # -------------------------- | |
1780 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1781 | ac_fn_c_try_compile () | |
1782 | { | |
1783 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1784 | rm -f conftest.$ac_objext | |
1785 | if { { ac_try="$ac_compile" | |
1786 | case "(($ac_try" in | |
1787 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1788 | *) ac_try_echo=$ac_try;; | |
1789 | esac | |
1790 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1791 | $as_echo "$ac_try_echo"; } >&5 | |
1792 | (eval "$ac_compile") 2>conftest.err | |
1793 | ac_status=$? | |
1794 | if test -s conftest.err; then | |
1795 | grep -v '^ *+' conftest.err >conftest.er1 | |
1796 | cat conftest.er1 >&5 | |
1797 | mv -f conftest.er1 conftest.err | |
1798 | fi | |
1799 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1800 | test $ac_status = 0; } && { | |
1801 | test -z "$ac_c_werror_flag" || | |
1802 | test ! -s conftest.err | |
1803 | } && test -s conftest.$ac_objext; then : | |
1804 | ac_retval=0 | |
1805 | else | |
1806 | $as_echo "$as_me: failed program was:" >&5 | |
1807 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1808 | |
81ecdfbb RW |
1809 | ac_retval=1 |
1810 | fi | |
1811 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1812 | return $ac_retval | |
1813 | ||
1814 | } # ac_fn_c_try_compile | |
1815 | ||
1816 | # ac_fn_c_try_cpp LINENO | |
1817 | # ---------------------- | |
1818 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1819 | ac_fn_c_try_cpp () | |
bec39cab | 1820 | { |
81ecdfbb RW |
1821 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1822 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1823 | case "(($ac_try" in | |
1824 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1825 | *) ac_try_echo=$ac_try;; | |
1826 | esac | |
1827 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1828 | $as_echo "$ac_try_echo"; } >&5 | |
1829 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1830 | ac_status=$? | |
1831 | if test -s conftest.err; then | |
1832 | grep -v '^ *+' conftest.err >conftest.er1 | |
1833 | cat conftest.er1 >&5 | |
1834 | mv -f conftest.er1 conftest.err | |
1835 | fi | |
1836 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1837 | test $ac_status = 0; } >/dev/null && { | |
1838 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1839 | test ! -s conftest.err | |
1840 | }; then : | |
1841 | ac_retval=0 | |
1842 | else | |
1843 | $as_echo "$as_me: failed program was:" >&5 | |
1844 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1845 | |
81ecdfbb RW |
1846 | ac_retval=1 |
1847 | fi | |
1848 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1849 | return $ac_retval | |
bec39cab | 1850 | |
81ecdfbb | 1851 | } # ac_fn_c_try_cpp |
bec39cab | 1852 | |
81ecdfbb RW |
1853 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1854 | # ------------------------------------------------------- | |
1855 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1856 | # the include files in INCLUDES and setting the cache variable VAR | |
1857 | # accordingly. | |
1858 | ac_fn_c_check_header_mongrel () | |
1859 | { | |
1860 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1861 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1863 | $as_echo_n "checking for $2... " >&6; } | |
1864 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1865 | $as_echo_n "(cached) " >&6 | |
1866 | fi | |
1867 | eval ac_res=\$$3 | |
1868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1869 | $as_echo "$ac_res" >&6; } | |
1870 | else | |
1871 | # Is the header compilable? | |
1872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1873 | $as_echo_n "checking $2 usability... " >&6; } | |
1874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1875 | /* end confdefs.h. */ | |
1876 | $4 | |
1877 | #include <$2> | |
1878 | _ACEOF | |
1879 | if ac_fn_c_try_compile "$LINENO"; then : | |
1880 | ac_header_compiler=yes | |
1881 | else | |
1882 | ac_header_compiler=no | |
1883 | fi | |
1884 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1886 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1887 | |
81ecdfbb RW |
1888 | # Is the header present? |
1889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1890 | $as_echo_n "checking $2 presence... " >&6; } | |
1891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1892 | /* end confdefs.h. */ | |
1893 | #include <$2> | |
1894 | _ACEOF | |
1895 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1896 | ac_header_preproc=yes | |
1897 | else | |
1898 | ac_header_preproc=no | |
1899 | fi | |
1900 | rm -f conftest.err conftest.$ac_ext | |
1901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1902 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1903 | |
81ecdfbb RW |
1904 | # So? What about this header? |
1905 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1906 | yes:no: ) | |
1907 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1908 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1909 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1910 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1911 | ;; | |
1912 | no:yes:* ) | |
1913 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1914 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1915 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1916 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1917 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1918 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1919 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1920 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1921 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1922 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1923 | ;; | |
1924 | esac | |
1925 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1926 | $as_echo_n "checking for $2... " >&6; } | |
1927 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1928 | $as_echo_n "(cached) " >&6 | |
1929 | else | |
1930 | eval "$3=\$ac_header_compiler" | |
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 | fi | |
1936 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1937 | |
81ecdfbb | 1938 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1939 | |
81ecdfbb RW |
1940 | # ac_fn_c_try_run LINENO |
1941 | # ---------------------- | |
1942 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1943 | # that executables *can* be run. | |
1944 | ac_fn_c_try_run () | |
1945 | { | |
1946 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1947 | if { { ac_try="$ac_link" | |
1948 | case "(($ac_try" in | |
1949 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1950 | *) ac_try_echo=$ac_try;; | |
1951 | esac | |
1952 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1953 | $as_echo "$ac_try_echo"; } >&5 | |
1954 | (eval "$ac_link") 2>&5 | |
1955 | ac_status=$? | |
1956 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1957 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1958 | { { case "(($ac_try" in | |
1959 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1960 | *) ac_try_echo=$ac_try;; | |
1961 | esac | |
1962 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1963 | $as_echo "$ac_try_echo"; } >&5 | |
1964 | (eval "$ac_try") 2>&5 | |
1965 | ac_status=$? | |
1966 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1967 | test $ac_status = 0; }; }; then : | |
1968 | ac_retval=0 | |
1969 | else | |
1970 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1971 | $as_echo "$as_me: failed program was:" >&5 | |
1972 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1973 | |
81ecdfbb RW |
1974 | ac_retval=$ac_status |
1975 | fi | |
1976 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1977 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1978 | return $ac_retval | |
bec39cab | 1979 | |
81ecdfbb | 1980 | } # ac_fn_c_try_run |
bec39cab | 1981 | |
81ecdfbb RW |
1982 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1983 | # ------------------------------------------------------- | |
1984 | # Tests whether HEADER exists and can be compiled using the include files in | |
1985 | # INCLUDES, setting the cache variable VAR accordingly. | |
1986 | ac_fn_c_check_header_compile () | |
1987 | { | |
1988 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1989 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1990 | $as_echo_n "checking for $2... " >&6; } | |
1991 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1992 | $as_echo_n "(cached) " >&6 | |
1993 | else | |
1994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1995 | /* end confdefs.h. */ | |
1996 | $4 | |
1997 | #include <$2> | |
bec39cab | 1998 | _ACEOF |
81ecdfbb RW |
1999 | if ac_fn_c_try_compile "$LINENO"; then : |
2000 | eval "$3=yes" | |
2001 | else | |
2002 | eval "$3=no" | |
2003 | fi | |
2004 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2005 | fi | |
2006 | eval ac_res=\$$3 | |
2007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2008 | $as_echo "$ac_res" >&6; } | |
2009 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2010 | |
81ecdfbb | 2011 | } # ac_fn_c_check_header_compile |
bec39cab | 2012 | |
81ecdfbb RW |
2013 | # ac_fn_c_try_link LINENO |
2014 | # ----------------------- | |
2015 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2016 | ac_fn_c_try_link () | |
b4e70030 | 2017 | { |
81ecdfbb RW |
2018 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
2019 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2020 | if { { ac_try="$ac_link" | |
2021 | case "(($ac_try" in | |
2022 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2023 | *) ac_try_echo=$ac_try;; | |
2024 | esac | |
2025 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2026 | $as_echo "$ac_try_echo"; } >&5 | |
2027 | (eval "$ac_link") 2>conftest.err | |
2028 | ac_status=$? | |
2029 | if test -s conftest.err; then | |
2030 | grep -v '^ *+' conftest.err >conftest.er1 | |
2031 | cat conftest.er1 >&5 | |
2032 | mv -f conftest.er1 conftest.err | |
2033 | fi | |
2034 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2035 | test $ac_status = 0; } && { | |
2036 | test -z "$ac_c_werror_flag" || | |
2037 | test ! -s conftest.err | |
2038 | } && test -s conftest$ac_exeext && { | |
2039 | test "$cross_compiling" = yes || | |
2040 | $as_test_x conftest$ac_exeext | |
2041 | }; then : | |
2042 | ac_retval=0 | |
2043 | else | |
2044 | $as_echo "$as_me: failed program was:" >&5 | |
2045 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2046 | |
81ecdfbb RW |
2047 | ac_retval=1 |
2048 | fi | |
2049 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2050 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2051 | # interfere with the next link command; also delete a directory that is | |
2052 | # left behind by Apple's compiler. We do this before executing the actions. | |
2053 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2054 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2055 | return $ac_retval | |
bec39cab | 2056 | |
81ecdfbb | 2057 | } # ac_fn_c_try_link |
bec39cab | 2058 | |
81ecdfbb RW |
2059 | # ac_fn_c_check_func LINENO FUNC VAR |
2060 | # ---------------------------------- | |
2061 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2062 | ac_fn_c_check_func () | |
2063 | { | |
2064 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2065 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2066 | $as_echo_n "checking for $2... " >&6; } | |
2067 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2068 | $as_echo_n "(cached) " >&6 | |
2069 | else | |
2070 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2071 | /* end confdefs.h. */ | |
2072 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2073 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2074 | #define $2 innocuous_$2 | |
bec39cab | 2075 | |
81ecdfbb RW |
2076 | /* System header to define __stub macros and hopefully few prototypes, |
2077 | which can conflict with char $2 (); below. | |
2078 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2079 | <limits.h> exists even on freestanding compilers. */ | |
bec39cab | 2080 | |
81ecdfbb RW |
2081 | #ifdef __STDC__ |
2082 | # include <limits.h> | |
2083 | #else | |
2084 | # include <assert.h> | |
2085 | #endif | |
bec39cab | 2086 | |
81ecdfbb | 2087 | #undef $2 |
bec39cab | 2088 | |
81ecdfbb RW |
2089 | /* Override any GCC internal prototype to avoid an error. |
2090 | Use char because int might match the return type of a GCC | |
2091 | builtin and then its argument prototype would still apply. */ | |
2092 | #ifdef __cplusplus | |
2093 | extern "C" | |
2094 | #endif | |
2095 | char $2 (); | |
2096 | /* The GNU C library defines this for functions which it implements | |
2097 | to always fail with ENOSYS. Some functions are actually named | |
2098 | something starting with __ and the normal name is an alias. */ | |
2099 | #if defined __stub_$2 || defined __stub___$2 | |
2100 | choke me | |
2101 | #endif | |
bec39cab | 2102 | |
81ecdfbb RW |
2103 | int |
2104 | main () | |
2105 | { | |
2106 | return $2 (); | |
2107 | ; | |
2108 | return 0; | |
2109 | } | |
bec39cab | 2110 | _ACEOF |
81ecdfbb RW |
2111 | if ac_fn_c_try_link "$LINENO"; then : |
2112 | eval "$3=yes" | |
2113 | else | |
2114 | eval "$3=no" | |
2115 | fi | |
2116 | rm -f core conftest.err conftest.$ac_objext \ | |
2117 | conftest$ac_exeext conftest.$ac_ext | |
2118 | fi | |
2119 | eval ac_res=\$$3 | |
2120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2121 | $as_echo "$ac_res" >&6; } | |
2122 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2123 | |
81ecdfbb | 2124 | } # ac_fn_c_check_func |
bec39cab | 2125 | |
81ecdfbb RW |
2126 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2127 | # ------------------------------------ | |
2128 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2129 | ac_fn_c_check_decl () | |
2130 | { | |
2131 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
e7a30f46 DE |
2132 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
2133 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2135 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
81ecdfbb RW |
2136 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
2137 | $as_echo_n "(cached) " >&6 | |
2138 | else | |
2139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2140 | /* end confdefs.h. */ | |
2141 | $4 | |
2142 | int | |
2143 | main () | |
2144 | { | |
e7a30f46 DE |
2145 | #ifndef $as_decl_name |
2146 | #ifdef __cplusplus | |
2147 | (void) $as_decl_use; | |
2148 | #else | |
2149 | (void) $as_decl_name; | |
2150 | #endif | |
81ecdfbb | 2151 | #endif |
bec39cab | 2152 | |
81ecdfbb RW |
2153 | ; |
2154 | return 0; | |
2155 | } | |
bec39cab | 2156 | _ACEOF |
81ecdfbb RW |
2157 | if ac_fn_c_try_compile "$LINENO"; then : |
2158 | eval "$3=yes" | |
2159 | else | |
2160 | eval "$3=no" | |
2161 | fi | |
2162 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2163 | fi | |
2164 | eval ac_res=\$$3 | |
2165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2166 | $as_echo "$ac_res" >&6; } | |
2167 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2168 | |
81ecdfbb | 2169 | } # ac_fn_c_check_decl |
bec39cab | 2170 | |
81ecdfbb RW |
2171 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2172 | # -------------------------------------------- | |
2173 | # Tries to find the compile-time value of EXPR in a program that includes | |
2174 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2175 | # computed | |
2176 | ac_fn_c_compute_int () | |
2177 | { | |
2178 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2179 | if test "$cross_compiling" = yes; then | |
2180 | # Depending upon the size, compute the lo and hi bounds. | |
2181 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2182 | /* end confdefs.h. */ | |
2183 | $4 | |
2184 | int | |
2185 | main () | |
2186 | { | |
2187 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2188 | test_array [0] = 0 | |
bec39cab | 2189 | |
81ecdfbb RW |
2190 | ; |
2191 | return 0; | |
2192 | } | |
2193 | _ACEOF | |
2194 | if ac_fn_c_try_compile "$LINENO"; then : | |
2195 | ac_lo=0 ac_mid=0 | |
2196 | while :; do | |
2197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2198 | /* end confdefs.h. */ | |
2199 | $4 | |
2200 | int | |
2201 | main () | |
2202 | { | |
2203 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2204 | test_array [0] = 0 | |
bec39cab | 2205 | |
81ecdfbb RW |
2206 | ; |
2207 | return 0; | |
2208 | } | |
2209 | _ACEOF | |
2210 | if ac_fn_c_try_compile "$LINENO"; then : | |
2211 | ac_hi=$ac_mid; break | |
2212 | else | |
2213 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2214 | if test $ac_lo -le $ac_mid; then | |
2215 | ac_lo= ac_hi= | |
2216 | break | |
2217 | fi | |
2218 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2219 | fi |
81ecdfbb RW |
2220 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2221 | done | |
c906108c | 2222 | else |
81ecdfbb RW |
2223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2224 | /* end confdefs.h. */ | |
2225 | $4 | |
2226 | int | |
2227 | main () | |
2228 | { | |
2229 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2230 | test_array [0] = 0 | |
bec39cab | 2231 | |
81ecdfbb RW |
2232 | ; |
2233 | return 0; | |
2234 | } | |
2235 | _ACEOF | |
2236 | if ac_fn_c_try_compile "$LINENO"; then : | |
2237 | ac_hi=-1 ac_mid=-1 | |
2238 | while :; do | |
2239 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2240 | /* end confdefs.h. */ | |
2241 | $4 | |
2242 | int | |
2243 | main () | |
2244 | { | |
2245 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2246 | test_array [0] = 0 | |
bec39cab | 2247 | |
81ecdfbb RW |
2248 | ; |
2249 | return 0; | |
2250 | } | |
2251 | _ACEOF | |
2252 | if ac_fn_c_try_compile "$LINENO"; then : | |
2253 | ac_lo=$ac_mid; break | |
2254 | else | |
2255 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2256 | if test $ac_mid -le $ac_hi; then | |
2257 | ac_lo= ac_hi= | |
2258 | break | |
2259 | fi | |
2260 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2261 | fi | |
2262 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2263 | done | |
2264 | else | |
2265 | ac_lo= ac_hi= | |
2266 | fi | |
2267 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2268 | fi | |
2269 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2270 | # Binary search between lo and hi bounds. | |
2271 | while test "x$ac_lo" != "x$ac_hi"; do | |
2272 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2274 | /* end confdefs.h. */ | |
2275 | $4 | |
2276 | int | |
2277 | main () | |
2278 | { | |
2279 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2280 | test_array [0] = 0 | |
bec39cab | 2281 | |
81ecdfbb RW |
2282 | ; |
2283 | return 0; | |
2284 | } | |
2285 | _ACEOF | |
2286 | if ac_fn_c_try_compile "$LINENO"; then : | |
2287 | ac_hi=$ac_mid | |
2288 | else | |
2289 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2290 | fi | |
2291 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2292 | done | |
2293 | case $ac_lo in #(( | |
2294 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2295 | '') ac_retval=1 ;; | |
2296 | esac | |
2297 | else | |
2298 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2299 | /* end confdefs.h. */ | |
2300 | $4 | |
2301 | static long int longval () { return $2; } | |
2302 | static unsigned long int ulongval () { return $2; } | |
2303 | #include <stdio.h> | |
2304 | #include <stdlib.h> | |
2305 | int | |
2306 | main () | |
2307 | { | |
bec39cab | 2308 | |
81ecdfbb RW |
2309 | FILE *f = fopen ("conftest.val", "w"); |
2310 | if (! f) | |
2311 | return 1; | |
2312 | if (($2) < 0) | |
2313 | { | |
2314 | long int i = longval (); | |
2315 | if (i != ($2)) | |
2316 | return 1; | |
2317 | fprintf (f, "%ld", i); | |
2318 | } | |
2319 | else | |
2320 | { | |
2321 | unsigned long int i = ulongval (); | |
2322 | if (i != ($2)) | |
2323 | return 1; | |
2324 | fprintf (f, "%lu", i); | |
2325 | } | |
2326 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2327 | on some platforms. */ | |
2328 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2329 | |
81ecdfbb RW |
2330 | ; |
2331 | return 0; | |
2332 | } | |
2333 | _ACEOF | |
2334 | if ac_fn_c_try_run "$LINENO"; then : | |
2335 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2336 | else | |
2337 | ac_retval=1 | |
2338 | fi | |
2339 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2340 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2341 | rm -f conftest.val | |
bec39cab | 2342 | |
81ecdfbb RW |
2343 | fi |
2344 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2345 | return $ac_retval | |
bec39cab | 2346 | |
81ecdfbb | 2347 | } # ac_fn_c_compute_int |
bec39cab | 2348 | |
81ecdfbb RW |
2349 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2350 | # ---------------------------------------------------- | |
2351 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2352 | # INCLUDES, setting cache variable VAR accordingly. | |
2353 | ac_fn_c_check_member () | |
2354 | { | |
2355 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2357 | $as_echo_n "checking for $2.$3... " >&6; } | |
2358 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2359 | $as_echo_n "(cached) " >&6 | |
2360 | else | |
2361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2362 | /* end confdefs.h. */ | |
2363 | $5 | |
2364 | int | |
2365 | main () | |
2366 | { | |
2367 | static $2 ac_aggr; | |
2368 | if (ac_aggr.$3) | |
2369 | return 0; | |
2370 | ; | |
2371 | return 0; | |
2372 | } | |
2373 | _ACEOF | |
2374 | if ac_fn_c_try_compile "$LINENO"; then : | |
2375 | eval "$4=yes" | |
2376 | else | |
2377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2378 | /* end confdefs.h. */ | |
2379 | $5 | |
2380 | int | |
2381 | main () | |
2382 | { | |
2383 | static $2 ac_aggr; | |
2384 | if (sizeof ac_aggr.$3) | |
2385 | return 0; | |
2386 | ; | |
2387 | return 0; | |
2388 | } | |
2389 | _ACEOF | |
2390 | if ac_fn_c_try_compile "$LINENO"; then : | |
2391 | eval "$4=yes" | |
2392 | else | |
2393 | eval "$4=no" | |
2394 | fi | |
2395 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2396 | fi | |
2397 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2398 | fi | |
2399 | eval ac_res=\$$4 | |
2400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2401 | $as_echo "$ac_res" >&6; } | |
2402 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2403 | |
81ecdfbb | 2404 | } # ac_fn_c_check_member |
bec39cab | 2405 | |
81ecdfbb RW |
2406 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2407 | # ------------------------------------------- | |
2408 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2409 | # variable VAR accordingly. | |
2410 | ac_fn_c_check_type () | |
2411 | { | |
2412 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2414 | $as_echo_n "checking for $2... " >&6; } | |
2415 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2416 | $as_echo_n "(cached) " >&6 | |
2417 | else | |
2418 | eval "$3=no" | |
2419 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2420 | /* end confdefs.h. */ | |
2421 | $4 | |
2422 | int | |
2423 | main () | |
2424 | { | |
2425 | if (sizeof ($2)) | |
2426 | return 0; | |
2427 | ; | |
2428 | return 0; | |
2429 | } | |
2430 | _ACEOF | |
2431 | if ac_fn_c_try_compile "$LINENO"; then : | |
2432 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2433 | /* end confdefs.h. */ | |
2434 | $4 | |
2435 | int | |
2436 | main () | |
2437 | { | |
2438 | if (sizeof (($2))) | |
2439 | return 0; | |
2440 | ; | |
2441 | return 0; | |
2442 | } | |
2443 | _ACEOF | |
2444 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2445 | |
81ecdfbb RW |
2446 | else |
2447 | eval "$3=yes" | |
2448 | fi | |
2449 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2450 | fi | |
2451 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2452 | fi | |
2453 | eval ac_res=\$$3 | |
2454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2455 | $as_echo "$ac_res" >&6; } | |
2456 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2457 | |
81ecdfbb RW |
2458 | } # ac_fn_c_check_type |
2459 | cat >config.log <<_ACEOF | |
2460 | This file contains any messages produced by compilers while | |
2461 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2462 | |
81ecdfbb RW |
2463 | It was created by $as_me, which was |
2464 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2465 | |
81ecdfbb | 2466 | $ $0 $@ |
413ccac7 | 2467 | |
81ecdfbb RW |
2468 | _ACEOF |
2469 | exec 5>>config.log | |
2470 | { | |
2471 | cat <<_ASUNAME | |
2472 | ## --------- ## | |
2473 | ## Platform. ## | |
2474 | ## --------- ## | |
413ccac7 | 2475 | |
81ecdfbb RW |
2476 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2477 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2478 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2479 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2480 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2481 | |
81ecdfbb RW |
2482 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2483 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2484 | |
81ecdfbb RW |
2485 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2486 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2487 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2488 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2489 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2490 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2491 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2492 | |
81ecdfbb | 2493 | _ASUNAME |
bec39cab | 2494 | |
bec39cab AC |
2495 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2496 | for as_dir in $PATH | |
2497 | do | |
2498 | IFS=$as_save_IFS | |
2499 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2500 | $as_echo "PATH: $as_dir" |
2501 | done | |
2502 | IFS=$as_save_IFS | |
bec39cab | 2503 | |
81ecdfbb | 2504 | } >&5 |
bec39cab | 2505 | |
81ecdfbb | 2506 | cat >&5 <<_ACEOF |
bec39cab | 2507 | |
bec39cab | 2508 | |
81ecdfbb RW |
2509 | ## ----------- ## |
2510 | ## Core tests. ## | |
2511 | ## ----------- ## | |
2512 | ||
2513 | _ACEOF | |
2514 | ||
2515 | ||
2516 | # Keep a trace of the command line. | |
2517 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2518 | # Strip out --silent because we don't want to record it for future runs. | |
2519 | # Also quote any args containing shell meta-characters. | |
2520 | # Make two passes to allow for proper duplicate-argument suppression. | |
2521 | ac_configure_args= | |
2522 | ac_configure_args0= | |
2523 | ac_configure_args1= | |
2524 | ac_must_keep_next=false | |
2525 | for ac_pass in 1 2 | |
2526 | do | |
2527 | for ac_arg | |
2528 | do | |
2529 | case $ac_arg in | |
2530 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2531 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2532 | | -silent | --silent | --silen | --sile | --sil) | |
2533 | continue ;; | |
2534 | *\'*) | |
2535 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2536 | esac | |
2537 | case $ac_pass in | |
2538 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2539 | 2) | |
2540 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2541 | if test $ac_must_keep_next = true; then | |
2542 | ac_must_keep_next=false # Got value, back to normal. | |
2543 | else | |
2544 | case $ac_arg in | |
2545 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2546 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2547 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2548 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2549 | case "$ac_configure_args0 " in | |
2550 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2551 | esac | |
2552 | ;; | |
2553 | -* ) ac_must_keep_next=true ;; | |
2554 | esac | |
2555 | fi | |
2556 | as_fn_append ac_configure_args " '$ac_arg'" | |
2557 | ;; | |
2558 | esac | |
2559 | done | |
2560 | done | |
2561 | { ac_configure_args0=; unset ac_configure_args0;} | |
2562 | { ac_configure_args1=; unset ac_configure_args1;} | |
2563 | ||
2564 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2565 | # config.log. We remove comments because anyway the quotes in there | |
2566 | # would cause problems or look ugly. | |
2567 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2568 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2569 | trap 'exit_status=$? | |
2570 | # Save into config.log some information that might help in debugging. | |
2571 | { | |
2572 | echo | |
2573 | ||
2574 | cat <<\_ASBOX | |
2575 | ## ---------------- ## | |
2576 | ## Cache variables. ## | |
2577 | ## ---------------- ## | |
2578 | _ASBOX | |
2579 | echo | |
2580 | # The following way of writing the cache mishandles newlines in values, | |
2581 | ( | |
2582 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2583 | eval ac_val=\$$ac_var | |
2584 | case $ac_val in #( | |
2585 | *${as_nl}*) | |
2586 | case $ac_var in #( | |
2587 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2588 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2589 | esac | |
2590 | case $ac_var in #( | |
2591 | _ | IFS | as_nl) ;; #( | |
2592 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2593 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2594 | esac ;; | |
2595 | esac | |
2596 | done | |
2597 | (set) 2>&1 | | |
2598 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2599 | *${as_nl}ac_space=\ *) | |
2600 | sed -n \ | |
2601 | "s/'\''/'\''\\\\'\'''\''/g; | |
2602 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2603 | ;; #( | |
2604 | *) | |
2605 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2606 | ;; | |
2607 | esac | | |
2608 | sort | |
2609 | ) | |
2610 | echo | |
2611 | ||
2612 | cat <<\_ASBOX | |
2613 | ## ----------------- ## | |
2614 | ## Output variables. ## | |
2615 | ## ----------------- ## | |
2616 | _ASBOX | |
2617 | echo | |
2618 | for ac_var in $ac_subst_vars | |
2619 | do | |
2620 | eval ac_val=\$$ac_var | |
2621 | case $ac_val in | |
2622 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2623 | esac | |
2624 | $as_echo "$ac_var='\''$ac_val'\''" | |
2625 | done | sort | |
2626 | echo | |
2627 | ||
2628 | if test -n "$ac_subst_files"; then | |
2629 | cat <<\_ASBOX | |
2630 | ## ------------------- ## | |
2631 | ## File substitutions. ## | |
2632 | ## ------------------- ## | |
2633 | _ASBOX | |
2634 | echo | |
2635 | for ac_var in $ac_subst_files | |
2636 | do | |
2637 | eval ac_val=\$$ac_var | |
2638 | case $ac_val in | |
2639 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2640 | esac | |
2641 | $as_echo "$ac_var='\''$ac_val'\''" | |
2642 | done | sort | |
2643 | echo | |
2644 | fi | |
2645 | ||
2646 | if test -s confdefs.h; then | |
2647 | cat <<\_ASBOX | |
2648 | ## ----------- ## | |
2649 | ## confdefs.h. ## | |
2650 | ## ----------- ## | |
2651 | _ASBOX | |
2652 | echo | |
2653 | cat confdefs.h | |
2654 | echo | |
2655 | fi | |
2656 | test "$ac_signal" != 0 && | |
2657 | $as_echo "$as_me: caught signal $ac_signal" | |
2658 | $as_echo "$as_me: exit $exit_status" | |
2659 | } >&5 | |
2660 | rm -f core *.core core.conftest.* && | |
2661 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2662 | exit $exit_status | |
2663 | ' 0 | |
2664 | for ac_signal in 1 2 13 15; do | |
2665 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2666 | done | |
2667 | ac_signal=0 | |
2668 | ||
2669 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2670 | rm -f -r conftest* confdefs.h | |
2671 | ||
2672 | $as_echo "/* confdefs.h */" > confdefs.h | |
2673 | ||
2674 | # Predefined preprocessor variables. | |
2675 | ||
2676 | cat >>confdefs.h <<_ACEOF | |
2677 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2678 | _ACEOF | |
2679 | ||
2680 | cat >>confdefs.h <<_ACEOF | |
2681 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2682 | _ACEOF | |
2683 | ||
2684 | cat >>confdefs.h <<_ACEOF | |
2685 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2686 | _ACEOF | |
2687 | ||
2688 | cat >>confdefs.h <<_ACEOF | |
2689 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2690 | _ACEOF | |
2691 | ||
2692 | cat >>confdefs.h <<_ACEOF | |
2693 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2694 | _ACEOF | |
2695 | ||
2696 | cat >>confdefs.h <<_ACEOF | |
2697 | #define PACKAGE_URL "$PACKAGE_URL" | |
2698 | _ACEOF | |
2699 | ||
2700 | ||
2701 | # Let the site file select an alternate cache file if it wants to. | |
2702 | # Prefer an explicitly selected file to automatically selected ones. | |
2703 | ac_site_file1=NONE | |
2704 | ac_site_file2=NONE | |
2705 | if test -n "$CONFIG_SITE"; then | |
2706 | ac_site_file1=$CONFIG_SITE | |
2707 | elif test "x$prefix" != xNONE; then | |
2708 | ac_site_file1=$prefix/share/config.site | |
2709 | ac_site_file2=$prefix/etc/config.site | |
2710 | else | |
2711 | ac_site_file1=$ac_default_prefix/share/config.site | |
2712 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2713 | fi | |
2714 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2715 | do | |
2716 | test "x$ac_site_file" = xNONE && continue | |
2717 | if test -r "$ac_site_file"; then | |
2718 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2719 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2720 | sed 's/^/| /' "$ac_site_file" >&5 | |
2721 | . "$ac_site_file" | |
2722 | fi | |
2723 | done | |
2724 | ||
2725 | if test -r "$cache_file"; then | |
2726 | # Some versions of bash will fail to source /dev/null (special | |
2727 | # files actually), so we avoid doing that. | |
2728 | if test -f "$cache_file"; then | |
2729 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2730 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2731 | case $cache_file in | |
2732 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2733 | *) . "./$cache_file";; | |
2734 | esac | |
2735 | fi | |
2736 | else | |
2737 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2738 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2739 | >$cache_file | |
bec39cab AC |
2740 | fi |
2741 | ||
f434ba03 PA |
2742 | gl_header_list="$gl_header_list sys/mman.h" |
2743 | gl_func_list="$gl_func_list mprotect" | |
2744 | gl_func_list="$gl_func_list memchr" | |
2745 | gl_header_list="$gl_header_list stddef.h" | |
81ecdfbb RW |
2746 | gl_header_list="$gl_header_list stdint.h" |
2747 | gl_header_list="$gl_header_list wchar.h" | |
2748 | gl_header_list="$gl_header_list string.h" | |
2749 | # Check that the precious variables saved in the cache have kept the same | |
2750 | # value. | |
2751 | ac_cache_corrupted=false | |
2752 | for ac_var in $ac_precious_vars; do | |
2753 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2754 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2755 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2756 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2757 | case $ac_old_set,$ac_new_set in | |
2758 | set,) | |
2759 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2760 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2761 | ac_cache_corrupted=: ;; | |
2762 | ,set) | |
2763 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2764 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2765 | ac_cache_corrupted=: ;; | |
2766 | ,);; | |
2767 | *) | |
2768 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2769 | # differences in whitespace do not lead to failure. | |
2770 | ac_old_val_w=`echo x $ac_old_val` | |
2771 | ac_new_val_w=`echo x $ac_new_val` | |
2772 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2773 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2774 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2775 | ac_cache_corrupted=: | |
2776 | else | |
2777 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2778 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2779 | eval $ac_var=\$ac_old_val | |
2780 | fi | |
2781 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2782 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2783 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2784 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2785 | fi;; | |
2786 | esac | |
2787 | # Pass precious variables to config.status. | |
2788 | if test "$ac_new_set" = set; then | |
2789 | case $ac_new_val in | |
2790 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2791 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2792 | esac | |
2793 | case " $ac_configure_args " in | |
2794 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2795 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2796 | esac | |
2797 | fi | |
2798 | done | |
2799 | if $ac_cache_corrupted; then | |
2800 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2801 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2802 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2803 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2804 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2805 | fi | |
2806 | ## -------------------- ## | |
2807 | ## Main body of script. ## | |
2808 | ## -------------------- ## | |
2809 | ||
2810 | ac_ext=c | |
2811 | ac_cpp='$CPP $CPPFLAGS' | |
2812 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2813 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2814 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2815 | ||
2816 | ||
2817 | ||
2818 | ||
2819 | ||
2820 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2821 | ||
2822 | ||
2823 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2824 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2825 | # Check whether --enable-maintainer-mode was given. | |
2826 | if test "${enable_maintainer_mode+set}" = set; then : | |
2827 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2828 | else | |
2829 | USE_MAINTAINER_MODE=no | |
2830 | fi | |
2831 | ||
2832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2833 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2834 | if test $USE_MAINTAINER_MODE = yes; then | |
2835 | MAINTAINER_MODE_TRUE= | |
2836 | MAINTAINER_MODE_FALSE='#' | |
2837 | else | |
2838 | MAINTAINER_MODE_TRUE='#' | |
2839 | MAINTAINER_MODE_FALSE= | |
2840 | fi | |
2841 | ||
2842 | MAINT=$MAINTAINER_MODE_TRUE | |
2843 | ||
2844 | ||
2845 | ||
2846 | ac_ext=c | |
2847 | ac_cpp='$CPP $CPPFLAGS' | |
2848 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2849 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2850 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2851 | if test -n "$ac_tool_prefix"; then | |
2852 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2853 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2855 | $as_echo_n "checking for $ac_word... " >&6; } | |
2856 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2857 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2858 | else |
2859 | if test -n "$CC"; then | |
2860 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2861 | else | |
bec39cab AC |
2862 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2863 | for as_dir in $PATH | |
2864 | do | |
2865 | IFS=$as_save_IFS | |
2866 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2867 | for ac_exec_ext in '' $ac_executable_extensions; do |
2868 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2869 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2870 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2871 | break 2 |
2872 | fi | |
2873 | done | |
81ecdfbb RW |
2874 | done |
2875 | IFS=$as_save_IFS | |
bec39cab | 2876 | |
c906108c SS |
2877 | fi |
2878 | fi | |
bec39cab | 2879 | CC=$ac_cv_prog_CC |
c906108c | 2880 | if test -n "$CC"; then |
81ecdfbb RW |
2881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2882 | $as_echo "$CC" >&6; } | |
c906108c | 2883 | else |
81ecdfbb RW |
2884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2885 | $as_echo "no" >&6; } | |
c906108c SS |
2886 | fi |
2887 | ||
81ecdfbb | 2888 | |
b4e70030 JB |
2889 | fi |
2890 | if test -z "$ac_cv_prog_CC"; then | |
2891 | ac_ct_CC=$CC | |
81ecdfbb RW |
2892 | # Extract the first word of "gcc", so it can be a program name with args. |
2893 | set dummy gcc; ac_word=$2 | |
2894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2895 | $as_echo_n "checking for $ac_word... " >&6; } | |
2896 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2897 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2898 | else |
2899 | if test -n "$ac_ct_CC"; then | |
2900 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2901 | else | |
2902 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2903 | for as_dir in $PATH | |
2904 | do | |
2905 | IFS=$as_save_IFS | |
2906 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2907 | for ac_exec_ext in '' $ac_executable_extensions; do |
2908 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2909 | ac_cv_prog_ac_ct_CC="gcc" | |
2910 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2911 | break 2 |
4e8d927d | 2912 | fi |
b4e70030 | 2913 | done |
81ecdfbb RW |
2914 | done |
2915 | IFS=$as_save_IFS | |
b4e70030 JB |
2916 | |
2917 | fi | |
2918 | fi | |
2919 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2920 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2922 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2923 | else |
81ecdfbb RW |
2924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2925 | $as_echo "no" >&6; } | |
b4e70030 JB |
2926 | fi |
2927 | ||
81ecdfbb RW |
2928 | if test "x$ac_ct_CC" = x; then |
2929 | CC="" | |
2930 | else | |
2931 | case $cross_compiling:$ac_tool_warned in | |
2932 | yes:) | |
2933 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2934 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2935 | ac_tool_warned=yes ;; | |
2936 | esac | |
2937 | CC=$ac_ct_CC | |
2938 | fi | |
b4e70030 JB |
2939 | else |
2940 | CC="$ac_cv_prog_CC" | |
2941 | fi | |
2942 | ||
c906108c | 2943 | if test -z "$CC"; then |
81ecdfbb RW |
2944 | if test -n "$ac_tool_prefix"; then |
2945 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2946 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2948 | $as_echo_n "checking for $ac_word... " >&6; } | |
2949 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2950 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2951 | else |
2952 | if test -n "$CC"; then | |
2953 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2954 | else | |
bec39cab AC |
2955 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2956 | for as_dir in $PATH | |
2957 | do | |
2958 | IFS=$as_save_IFS | |
2959 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2960 | for ac_exec_ext in '' $ac_executable_extensions; do |
2961 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2962 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2963 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2964 | break 2 |
2965 | fi | |
2966 | done | |
81ecdfbb RW |
2967 | done |
2968 | IFS=$as_save_IFS | |
2969 | ||
2970 | fi | |
2971 | fi | |
2972 | CC=$ac_cv_prog_CC | |
2973 | if test -n "$CC"; then | |
2974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2975 | $as_echo "$CC" >&6; } | |
2976 | else | |
2977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2978 | $as_echo "no" >&6; } | |
2979 | fi | |
2980 | ||
2981 | ||
2982 | fi | |
2983 | fi | |
2984 | if test -z "$CC"; then | |
2985 | # Extract the first word of "cc", so it can be a program name with args. | |
2986 | set dummy cc; ac_word=$2 | |
2987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2988 | $as_echo_n "checking for $ac_word... " >&6; } | |
2989 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2990 | $as_echo_n "(cached) " >&6 | |
2991 | else | |
2992 | if test -n "$CC"; then | |
2993 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2994 | else | |
2995 | ac_prog_rejected=no | |
2996 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2997 | for as_dir in $PATH | |
2998 | do | |
2999 | IFS=$as_save_IFS | |
3000 | test -z "$as_dir" && as_dir=. | |
3001 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3002 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3003 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3004 | ac_prog_rejected=yes | |
3005 | continue | |
3006 | fi | |
3007 | ac_cv_prog_CC="cc" | |
3008 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3009 | break 2 | |
3010 | fi | |
3011 | done | |
3012 | done | |
3013 | IFS=$as_save_IFS | |
bec39cab | 3014 | |
c906108c SS |
3015 | if test $ac_prog_rejected = yes; then |
3016 | # We found a bogon in the path, so make sure we never use it. | |
3017 | set dummy $ac_cv_prog_CC | |
3018 | shift | |
bec39cab | 3019 | if test $# != 0; then |
c906108c SS |
3020 | # We chose a different compiler from the bogus one. |
3021 | # However, it has the same basename, so the bogon will be chosen | |
3022 | # first if we set CC to just the basename; use the full file name. | |
3023 | shift | |
bec39cab | 3024 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3025 | fi |
3026 | fi | |
3027 | fi | |
3028 | fi | |
bec39cab | 3029 | CC=$ac_cv_prog_CC |
c906108c | 3030 | if test -n "$CC"; then |
81ecdfbb RW |
3031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3032 | $as_echo "$CC" >&6; } | |
c906108c | 3033 | else |
81ecdfbb RW |
3034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3035 | $as_echo "no" >&6; } | |
c906108c SS |
3036 | fi |
3037 | ||
81ecdfbb | 3038 | |
bec39cab AC |
3039 | fi |
3040 | if test -z "$CC"; then | |
3041 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3042 | for ac_prog in cl.exe |
bec39cab AC |
3043 | do |
3044 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3045 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3047 | $as_echo_n "checking for $ac_word... " >&6; } | |
3048 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3049 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
3050 | else |
3051 | if test -n "$CC"; then | |
3052 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3053 | else | |
bec39cab AC |
3054 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3055 | for as_dir in $PATH | |
3056 | do | |
3057 | IFS=$as_save_IFS | |
3058 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3059 | for ac_exec_ext in '' $ac_executable_extensions; do |
3060 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3061 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3062 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3063 | break 2 |
3064 | fi | |
3065 | done | |
81ecdfbb RW |
3066 | done |
3067 | IFS=$as_save_IFS | |
bec39cab | 3068 | |
c906108c SS |
3069 | fi |
3070 | fi | |
bec39cab | 3071 | CC=$ac_cv_prog_CC |
c906108c | 3072 | if test -n "$CC"; then |
81ecdfbb RW |
3073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3074 | $as_echo "$CC" >&6; } | |
c906108c | 3075 | else |
81ecdfbb RW |
3076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3077 | $as_echo "no" >&6; } | |
c906108c | 3078 | fi |
bec39cab | 3079 | |
81ecdfbb | 3080 | |
bec39cab AC |
3081 | test -n "$CC" && break |
3082 | done | |
3083 | fi | |
3084 | if test -z "$CC"; then | |
3085 | ac_ct_CC=$CC | |
81ecdfbb | 3086 | for ac_prog in cl.exe |
bec39cab AC |
3087 | do |
3088 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3089 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3091 | $as_echo_n "checking for $ac_word... " >&6; } | |
3092 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3093 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3094 | else |
3095 | if test -n "$ac_ct_CC"; then | |
3096 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3097 | else | |
3098 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3099 | for as_dir in $PATH | |
3100 | do | |
3101 | IFS=$as_save_IFS | |
3102 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3103 | for ac_exec_ext in '' $ac_executable_extensions; do |
3104 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3105 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3106 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3107 | break 2 |
c906108c | 3108 | fi |
bec39cab | 3109 | done |
81ecdfbb RW |
3110 | done |
3111 | IFS=$as_save_IFS | |
bec39cab AC |
3112 | |
3113 | fi | |
3114 | fi | |
3115 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3116 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3118 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3119 | else |
81ecdfbb RW |
3120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3121 | $as_echo "no" >&6; } | |
c906108c SS |
3122 | fi |
3123 | ||
81ecdfbb | 3124 | |
bec39cab AC |
3125 | test -n "$ac_ct_CC" && break |
3126 | done | |
c906108c | 3127 | |
81ecdfbb RW |
3128 | if test "x$ac_ct_CC" = x; then |
3129 | CC="" | |
3130 | else | |
3131 | case $cross_compiling:$ac_tool_warned in | |
3132 | yes:) | |
3133 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3134 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3135 | ac_tool_warned=yes ;; | |
3136 | esac | |
3137 | CC=$ac_ct_CC | |
3138 | fi | |
bec39cab AC |
3139 | fi |
3140 | ||
3141 | fi | |
3142 | ||
3143 | ||
81ecdfbb RW |
3144 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3145 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3146 | as_fn_error "no acceptable C compiler found in \$PATH | |
3147 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3148 | |
3149 | # Provide some information about the compiler. | |
81ecdfbb RW |
3150 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3151 | set X $ac_compile | |
3152 | ac_compiler=$2 | |
3153 | for ac_option in --version -v -V -qversion; do | |
3154 | { { ac_try="$ac_compiler $ac_option >&5" | |
3155 | case "(($ac_try" in | |
3156 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3157 | *) ac_try_echo=$ac_try;; | |
3158 | esac | |
3159 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3160 | $as_echo "$ac_try_echo"; } >&5 | |
3161 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3162 | ac_status=$? |
81ecdfbb RW |
3163 | if test -s conftest.err; then |
3164 | sed '10a\ | |
3165 | ... rest of stderr output deleted ... | |
3166 | 10q' conftest.err >conftest.er1 | |
3167 | cat conftest.er1 >&5 | |
3168 | rm -f conftest.er1 conftest.err | |
3169 | fi | |
3170 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3171 | test $ac_status = 0; } | |
3172 | done | |
bec39cab | 3173 | |
81ecdfbb | 3174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3175 | /* end confdefs.h. */ |
3176 | ||
3177 | int | |
3178 | main () | |
3179 | { | |
3180 | ||
3181 | ; | |
3182 | return 0; | |
3183 | } | |
3184 | _ACEOF | |
3185 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3186 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3187 | # Try to create an executable without -o first, disregard a.out. |
3188 | # It will help us diagnose broken compilers, and finding out an intuition | |
3189 | # of exeext. | |
81ecdfbb RW |
3190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3191 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3192 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3193 | ||
3194 | # The possible output files: | |
3195 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3196 | ||
3197 | ac_rmfiles= | |
3198 | for ac_file in $ac_files | |
3199 | do | |
3200 | case $ac_file in | |
3201 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3202 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3203 | esac | |
3204 | done | |
3205 | rm -f $ac_rmfiles | |
3206 | ||
3207 | if { { ac_try="$ac_link_default" | |
3208 | case "(($ac_try" in | |
3209 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3210 | *) ac_try_echo=$ac_try;; | |
3211 | esac | |
3212 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3213 | $as_echo "$ac_try_echo"; } >&5 | |
3214 | (eval "$ac_link_default") 2>&5 | |
3215 | ac_status=$? | |
3216 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3217 | test $ac_status = 0; }; then : | |
3218 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3219 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3220 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3221 | # so that the user can short-circuit this test for compilers unknown to | |
3222 | # Autoconf. | |
3223 | for ac_file in $ac_files '' | |
bec39cab AC |
3224 | do |
3225 | test -f "$ac_file" || continue | |
3226 | case $ac_file in | |
81ecdfbb | 3227 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3228 | ;; |
3229 | [ab].out ) | |
3230 | # We found the default executable, but exeext='' is most | |
3231 | # certainly right. | |
3232 | break;; | |
3233 | *.* ) | |
81ecdfbb RW |
3234 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3235 | then :; else | |
3236 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3237 | fi | |
3238 | # We set ac_cv_exeext here because the later test for it is not | |
3239 | # safe: cross compilers may not add the suffix if given an `-o' | |
3240 | # argument, so we may need to know it at that point already. | |
3241 | # Even if this section looks crufty: it has the advantage of | |
3242 | # actually working. | |
b4e70030 JB |
3243 | break;; |
3244 | * ) | |
3245 | break;; | |
bec39cab AC |
3246 | esac |
3247 | done | |
81ecdfbb RW |
3248 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3249 | ||
bec39cab | 3250 | else |
81ecdfbb RW |
3251 | ac_file='' |
3252 | fi | |
3253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3254 | $as_echo "$ac_file" >&6; } | |
3255 | if test -z "$ac_file"; then : | |
3256 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3257 | sed 's/^/| /' conftest.$ac_ext >&5 |
3258 | ||
81ecdfbb RW |
3259 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3260 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3261 | { as_fn_set_status 77 | |
3262 | as_fn_error "C compiler cannot create executables | |
3263 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3264 | fi |
b4e70030 | 3265 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3266 | |
81ecdfbb | 3267 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3268 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3270 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3271 | # If not cross compiling, check that we can run a simple program. |
3272 | if test "$cross_compiling" != yes; then | |
3273 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3274 | { { case "(($ac_try" in |
3275 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3276 | *) ac_try_echo=$ac_try;; | |
3277 | esac | |
3278 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3279 | $as_echo "$ac_try_echo"; } >&5 | |
3280 | (eval "$ac_try") 2>&5 | |
bec39cab | 3281 | ac_status=$? |
81ecdfbb RW |
3282 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3283 | test $ac_status = 0; }; }; then | |
bec39cab | 3284 | cross_compiling=no |
c906108c | 3285 | else |
bec39cab AC |
3286 | if test "$cross_compiling" = maybe; then |
3287 | cross_compiling=yes | |
3288 | else | |
81ecdfbb RW |
3289 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3290 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3291 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3292 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3293 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3294 | fi |
c906108c | 3295 | fi |
bec39cab | 3296 | fi |
81ecdfbb RW |
3297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3298 | $as_echo "yes" >&6; } | |
bec39cab | 3299 | |
81ecdfbb | 3300 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3301 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3302 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3303 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3305 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3307 | $as_echo "$cross_compiling" >&6; } | |
3308 | ||
3309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3310 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3311 | if { { ac_try="$ac_link" | |
3312 | case "(($ac_try" in | |
3313 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3314 | *) ac_try_echo=$ac_try;; | |
3315 | esac | |
3316 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3317 | $as_echo "$ac_try_echo"; } >&5 | |
3318 | (eval "$ac_link") 2>&5 | |
bec39cab | 3319 | ac_status=$? |
81ecdfbb RW |
3320 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3321 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3322 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3323 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3324 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3325 | # `rm'. | |
3326 | for ac_file in conftest.exe conftest conftest.*; do | |
3327 | test -f "$ac_file" || continue | |
3328 | case $ac_file in | |
81ecdfbb | 3329 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3330 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3331 | break;; |
3332 | * ) break;; | |
3333 | esac | |
3334 | done | |
c906108c | 3335 | else |
81ecdfbb RW |
3336 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3337 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3338 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3339 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3340 | fi |
b4e70030 | 3341 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3343 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3344 | |
b4e70030 | 3345 | rm -f conftest.$ac_ext |
bec39cab AC |
3346 | EXEEXT=$ac_cv_exeext |
3347 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3349 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3350 | if test "${ac_cv_objext+set}" = set; then : | |
3351 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3352 | else |
81ecdfbb | 3353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3354 | /* end confdefs.h. */ |
3355 | ||
3356 | int | |
3357 | main () | |
3358 | { | |
3359 | ||
3360 | ; | |
3361 | return 0; | |
3362 | } | |
3363 | _ACEOF | |
3364 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3365 | if { { ac_try="$ac_compile" |
3366 | case "(($ac_try" in | |
3367 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3368 | *) ac_try_echo=$ac_try;; | |
3369 | esac | |
3370 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3371 | $as_echo "$ac_try_echo"; } >&5 | |
3372 | (eval "$ac_compile") 2>&5 | |
3373 | ac_status=$? | |
3374 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3375 | test $ac_status = 0; }; then : | |
3376 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3377 | test -f "$ac_file" || continue; | |
bec39cab | 3378 | case $ac_file in |
81ecdfbb | 3379 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3380 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3381 | break;; | |
3382 | esac | |
3383 | done | |
c906108c | 3384 | else |
81ecdfbb | 3385 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3386 | sed 's/^/| /' conftest.$ac_ext >&5 |
3387 | ||
81ecdfbb RW |
3388 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3389 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3390 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3391 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3392 | fi |
b4e70030 | 3393 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3394 | fi |
81ecdfbb RW |
3395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3396 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3397 | OBJEXT=$ac_cv_objext |
3398 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3400 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3401 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3402 | $as_echo_n "(cached) " >&6 | |
c906108c | 3403 | else |
81ecdfbb | 3404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3405 | /* end confdefs.h. */ |
3406 | ||
3407 | int | |
3408 | main () | |
3409 | { | |
3410 | #ifndef __GNUC__ | |
3411 | choke me | |
3412 | #endif | |
3413 | ||
3414 | ; | |
3415 | return 0; | |
3416 | } | |
3417 | _ACEOF | |
81ecdfbb | 3418 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3419 | ac_compiler_gnu=yes |
3420 | else | |
81ecdfbb | 3421 | ac_compiler_gnu=no |
bec39cab | 3422 | fi |
81ecdfbb | 3423 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3424 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3425 | ||
3426 | fi | |
81ecdfbb RW |
3427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3428 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3429 | if test $ac_compiler_gnu = yes; then | |
3430 | GCC=yes | |
3431 | else | |
3432 | GCC= | |
3433 | fi | |
bec39cab AC |
3434 | ac_test_CFLAGS=${CFLAGS+set} |
3435 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3437 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3438 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3439 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3440 | else |
81ecdfbb RW |
3441 | ac_save_c_werror_flag=$ac_c_werror_flag |
3442 | ac_c_werror_flag=yes | |
3443 | ac_cv_prog_cc_g=no | |
3444 | CFLAGS="-g" | |
3445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3446 | /* end confdefs.h. */ |
3447 | ||
3448 | int | |
3449 | main () | |
3450 | { | |
3451 | ||
3452 | ; | |
3453 | return 0; | |
3454 | } | |
3455 | _ACEOF | |
81ecdfbb | 3456 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3457 | ac_cv_prog_cc_g=yes |
3458 | else | |
81ecdfbb RW |
3459 | CFLAGS="" |
3460 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3461 | /* end confdefs.h. */ | |
3462 | ||
3463 | int | |
3464 | main () | |
3465 | { | |
3466 | ||
3467 | ; | |
3468 | return 0; | |
3469 | } | |
3470 | _ACEOF | |
3471 | if ac_fn_c_try_compile "$LINENO"; then : | |
3472 | ||
3473 | else | |
3474 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3475 | CFLAGS="-g" | |
3476 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3477 | /* end confdefs.h. */ | |
3478 | ||
3479 | int | |
3480 | main () | |
3481 | { | |
c906108c | 3482 | |
81ecdfbb RW |
3483 | ; |
3484 | return 0; | |
3485 | } | |
3486 | _ACEOF | |
3487 | if ac_fn_c_try_compile "$LINENO"; then : | |
3488 | ac_cv_prog_cc_g=yes | |
3489 | fi | |
3490 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3491 | fi | |
3492 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3493 | fi |
81ecdfbb RW |
3494 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3495 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3496 | fi |
81ecdfbb RW |
3497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3498 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3499 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3500 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3501 | elif test $ac_cv_prog_cc_g = yes; then |
3502 | if test "$GCC" = yes; then | |
3503 | CFLAGS="-g -O2" | |
3504 | else | |
3505 | CFLAGS="-g" | |
3506 | fi | |
3507 | else | |
3508 | if test "$GCC" = yes; then | |
3509 | CFLAGS="-O2" | |
3510 | else | |
3511 | CFLAGS= | |
3512 | fi | |
3513 | fi | |
81ecdfbb RW |
3514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3515 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3516 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3517 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3518 | else |
81ecdfbb | 3519 | ac_cv_prog_cc_c89=no |
bec39cab | 3520 | ac_save_CC=$CC |
81ecdfbb | 3521 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3522 | /* end confdefs.h. */ |
c906108c SS |
3523 | #include <stdarg.h> |
3524 | #include <stdio.h> | |
3525 | #include <sys/types.h> | |
3526 | #include <sys/stat.h> | |
3527 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3528 | struct buf { int x; }; | |
3529 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3530 | static char *e (p, i) | |
3531 | char **p; | |
3532 | int i; | |
3533 | { | |
3534 | return p[i]; | |
3535 | } | |
3536 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3537 | { | |
3538 | char *s; | |
3539 | va_list v; | |
3540 | va_start (v,p); | |
3541 | s = g (p, va_arg (v,int)); | |
3542 | va_end (v); | |
3543 | return s; | |
3544 | } | |
bec39cab AC |
3545 | |
3546 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3547 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3548 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3549 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3550 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3551 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3552 | that's true only with -std. */ |
bec39cab AC |
3553 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3554 | ||
81ecdfbb RW |
3555 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3556 | inside strings and character constants. */ | |
3557 | #define FOO(x) 'x' | |
3558 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3559 | ||
c906108c SS |
3560 | int test (int i, double x); |
3561 | struct s1 {int (*f) (int a);}; | |
3562 | struct s2 {int (*f) (double a);}; | |
3563 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3564 | int argc; | |
3565 | char **argv; | |
bec39cab AC |
3566 | int |
3567 | main () | |
3568 | { | |
c906108c | 3569 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3570 | ; |
3571 | return 0; | |
3572 | } | |
3573 | _ACEOF | |
81ecdfbb RW |
3574 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3575 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3576 | do |
3577 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3578 | if ac_fn_c_try_compile "$LINENO"; then : |
3579 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3580 | fi |
81ecdfbb RW |
3581 | rm -f core conftest.err conftest.$ac_objext |
3582 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3583 | done |
81ecdfbb | 3584 | rm -f conftest.$ac_ext |
bec39cab | 3585 | CC=$ac_save_CC |
c906108c SS |
3586 | |
3587 | fi | |
81ecdfbb RW |
3588 | # AC_CACHE_VAL |
3589 | case "x$ac_cv_prog_cc_c89" in | |
3590 | x) | |
3591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3592 | $as_echo "none needed" >&6; } ;; | |
3593 | xno) | |
3594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3595 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3596 | *) |
81ecdfbb RW |
3597 | CC="$CC $ac_cv_prog_cc_c89" |
3598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3599 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3600 | esac |
81ecdfbb | 3601 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3602 | |
b4e70030 JB |
3603 | fi |
3604 | ||
bec39cab AC |
3605 | ac_ext=c |
3606 | ac_cpp='$CPP $CPPFLAGS' | |
3607 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3608 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3609 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3610 | |
f434ba03 PA |
3611 | ac_aux_dir= |
3612 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3613 | for ac_t in install-sh install.sh shtool; do | |
3614 | if test -f "$ac_dir/$ac_t"; then | |
3615 | ac_aux_dir=$ac_dir | |
3616 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3617 | break 2 | |
3618 | fi | |
3619 | done | |
3620 | done | |
3621 | if test -z "$ac_aux_dir"; then | |
3622 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3623 | fi | |
3624 | ||
3625 | # These three variables are undocumented and unsupported, | |
3626 | # and are intended to be withdrawn in a future Autoconf release. | |
3627 | # They can cause serious problems if a builder's source tree is in a directory | |
3628 | # whose full name contains unusual characters. | |
3629 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3630 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3631 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3632 | ||
3633 | ||
3634 | # Make sure we can run config.sub. | |
3635 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3636 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3637 | ||
3638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3639 | $as_echo_n "checking build system type... " >&6; } | |
3640 | if test "${ac_cv_build+set}" = set; then : | |
3641 | $as_echo_n "(cached) " >&6 | |
3642 | else | |
3643 | ac_build_alias=$build_alias | |
3644 | test "x$ac_build_alias" = x && | |
3645 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3646 | test "x$ac_build_alias" = x && | |
3647 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3648 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3649 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3650 | ||
3651 | fi | |
3652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3653 | $as_echo "$ac_cv_build" >&6; } | |
3654 | case $ac_cv_build in | |
3655 | *-*-*) ;; | |
3656 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
3657 | esac | |
3658 | build=$ac_cv_build | |
3659 | ac_save_IFS=$IFS; IFS='-' | |
3660 | set x $ac_cv_build | |
3661 | shift | |
3662 | build_cpu=$1 | |
3663 | build_vendor=$2 | |
3664 | shift; shift | |
3665 | # Remember, the first character of IFS is used to create $*, | |
3666 | # except with old shells: | |
3667 | build_os=$* | |
3668 | IFS=$ac_save_IFS | |
3669 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3670 | ||
3671 | ||
3672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3673 | $as_echo_n "checking host system type... " >&6; } | |
3674 | if test "${ac_cv_host+set}" = set; then : | |
3675 | $as_echo_n "(cached) " >&6 | |
3676 | else | |
3677 | if test "x$host_alias" = x; then | |
3678 | ac_cv_host=$ac_cv_build | |
3679 | else | |
3680 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3681 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
3682 | fi | |
3683 | ||
3684 | fi | |
3685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3686 | $as_echo "$ac_cv_host" >&6; } | |
3687 | case $ac_cv_host in | |
3688 | *-*-*) ;; | |
3689 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
3690 | esac | |
3691 | host=$ac_cv_host | |
3692 | ac_save_IFS=$IFS; IFS='-' | |
3693 | set x $ac_cv_host | |
3694 | shift | |
3695 | host_cpu=$1 | |
3696 | host_vendor=$2 | |
3697 | shift; shift | |
3698 | # Remember, the first character of IFS is used to create $*, | |
3699 | # except with old shells: | |
3700 | host_os=$* | |
3701 | IFS=$ac_save_IFS | |
3702 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3703 | ||
3704 | ||
60ca704f | 3705 | |
bec39cab AC |
3706 | ac_ext=c |
3707 | ac_cpp='$CPP $CPPFLAGS' | |
3708 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3709 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3710 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3712 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3713 | # On Suns, sometimes $CPP names a directory. |
3714 | if test -n "$CPP" && test -d "$CPP"; then | |
3715 | CPP= | |
8bb2c122 | 3716 | fi |
bec39cab | 3717 | if test -z "$CPP"; then |
81ecdfbb RW |
3718 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3719 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3720 | else |
3721 | # Double quotes because CPP needs to be expanded | |
3722 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3723 | do | |
3724 | ac_preproc_ok=false | |
3725 | for ac_c_preproc_warn_flag in '' yes | |
3726 | do | |
3727 | # Use a header file that comes with gcc, so configuring glibc | |
3728 | # with a fresh cross-compiler works. | |
3729 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3730 | # <limits.h> exists even on freestanding compilers. | |
3731 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3732 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3734 | /* end confdefs.h. */ |
3735 | #ifdef __STDC__ | |
3736 | # include <limits.h> | |
3737 | #else | |
3738 | # include <assert.h> | |
3739 | #endif | |
3740 | Syntax error | |
3741 | _ACEOF | |
81ecdfbb | 3742 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3743 | |
81ecdfbb | 3744 | else |
bec39cab AC |
3745 | # Broken: fails on valid input. |
3746 | continue | |
3747 | fi | |
3748 | rm -f conftest.err conftest.$ac_ext | |
3749 | ||
81ecdfbb | 3750 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3751 | # can be detected and how. |
81ecdfbb | 3752 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3753 | /* end confdefs.h. */ |
3754 | #include <ac_nonexistent.h> | |
3755 | _ACEOF | |
81ecdfbb | 3756 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3757 | # Broken: success on invalid input. |
3758 | continue | |
8bb2c122 | 3759 | else |
bec39cab AC |
3760 | # Passes both tests. |
3761 | ac_preproc_ok=: | |
3762 | break | |
8bb2c122 | 3763 | fi |
bec39cab | 3764 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3765 | |
bec39cab AC |
3766 | done |
3767 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3768 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3769 | if $ac_preproc_ok; then : |
bec39cab AC |
3770 | break |
3771 | fi | |
8bb2c122 | 3772 | |
bec39cab AC |
3773 | done |
3774 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3775 | |
c906108c | 3776 | fi |
bec39cab AC |
3777 | CPP=$ac_cv_prog_CPP |
3778 | else | |
3779 | ac_cv_prog_CPP=$CPP | |
c906108c | 3780 | fi |
81ecdfbb RW |
3781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3782 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3783 | ac_preproc_ok=false |
3784 | for ac_c_preproc_warn_flag in '' yes | |
3785 | do | |
3786 | # Use a header file that comes with gcc, so configuring glibc | |
3787 | # with a fresh cross-compiler works. | |
3788 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3789 | # <limits.h> exists even on freestanding compilers. | |
3790 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3791 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3793 | /* end confdefs.h. */ |
3794 | #ifdef __STDC__ | |
3795 | # include <limits.h> | |
3796 | #else | |
3797 | # include <assert.h> | |
3798 | #endif | |
3799 | Syntax error | |
3800 | _ACEOF | |
81ecdfbb | 3801 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3802 | |
81ecdfbb | 3803 | else |
bec39cab AC |
3804 | # Broken: fails on valid input. |
3805 | continue | |
3806 | fi | |
3807 | rm -f conftest.err conftest.$ac_ext | |
3808 | ||
81ecdfbb | 3809 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3810 | # can be detected and how. |
81ecdfbb | 3811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3812 | /* end confdefs.h. */ |
3813 | #include <ac_nonexistent.h> | |
3814 | _ACEOF | |
81ecdfbb | 3815 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3816 | # Broken: success on invalid input. |
3817 | continue | |
c906108c | 3818 | else |
bec39cab AC |
3819 | # Passes both tests. |
3820 | ac_preproc_ok=: | |
3821 | break | |
c906108c | 3822 | fi |
bec39cab | 3823 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3824 | |
bec39cab AC |
3825 | done |
3826 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3827 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3828 | if $ac_preproc_ok; then : |
3829 | ||
c906108c | 3830 | else |
81ecdfbb RW |
3831 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3832 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3833 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3834 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3835 | fi |
c906108c | 3836 | |
bec39cab AC |
3837 | ac_ext=c |
3838 | ac_cpp='$CPP $CPPFLAGS' | |
3839 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3840 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3841 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3842 | ||
3843 | ||
81ecdfbb RW |
3844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3845 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3846 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3847 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3848 | else |
81ecdfbb RW |
3849 | if test -z "$GREP"; then |
3850 | ac_path_GREP_found=false | |
3851 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3852 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3853 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3854 | do | |
3855 | IFS=$as_save_IFS | |
3856 | test -z "$as_dir" && as_dir=. | |
3857 | for ac_prog in grep ggrep; do | |
3858 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3859 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3860 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3861 | # Check for GNU ac_path_GREP and select it if it is found. | |
3862 | # Check for GNU $ac_path_GREP | |
3863 | case `"$ac_path_GREP" --version 2>&1` in | |
3864 | *GNU*) | |
3865 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3866 | *) | |
3867 | ac_count=0 | |
3868 | $as_echo_n 0123456789 >"conftest.in" | |
3869 | while : | |
3870 | do | |
3871 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3872 | mv "conftest.tmp" "conftest.in" | |
3873 | cp "conftest.in" "conftest.nl" | |
3874 | $as_echo 'GREP' >> "conftest.nl" | |
3875 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3876 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3877 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3878 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3879 | # Best one so far, save it but keep looking for a better one | |
3880 | ac_cv_path_GREP="$ac_path_GREP" | |
3881 | ac_path_GREP_max=$ac_count | |
bec39cab | 3882 | fi |
81ecdfbb RW |
3883 | # 10*(2^10) chars as input seems more than enough |
3884 | test $ac_count -gt 10 && break | |
3885 | done | |
3886 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3887 | esac | |
bec39cab | 3888 | |
81ecdfbb RW |
3889 | $ac_path_GREP_found && break 3 |
3890 | done | |
3891 | done | |
3892 | done | |
3893 | IFS=$as_save_IFS | |
3894 | if test -z "$ac_cv_path_GREP"; then | |
3895 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3896 | fi | |
c906108c | 3897 | else |
81ecdfbb | 3898 | ac_cv_path_GREP=$GREP |
c906108c | 3899 | fi |
c906108c | 3900 | |
81ecdfbb RW |
3901 | fi |
3902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3903 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3904 | GREP="$ac_cv_path_GREP" | |
c906108c | 3905 | |
c906108c | 3906 | |
81ecdfbb RW |
3907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3908 | $as_echo_n "checking for egrep... " >&6; } | |
3909 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3910 | $as_echo_n "(cached) " >&6 | |
783e057b | 3911 | else |
81ecdfbb RW |
3912 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3913 | then ac_cv_path_EGREP="$GREP -E" | |
3914 | else | |
3915 | if test -z "$EGREP"; then | |
3916 | ac_path_EGREP_found=false | |
3917 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3918 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3919 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3920 | do |
3921 | IFS=$as_save_IFS | |
3922 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3923 | for ac_prog in egrep; do |
3924 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3925 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3926 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3927 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3928 | # Check for GNU $ac_path_EGREP | |
3929 | case `"$ac_path_EGREP" --version 2>&1` in | |
3930 | *GNU*) | |
3931 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3932 | *) | |
3933 | ac_count=0 | |
3934 | $as_echo_n 0123456789 >"conftest.in" | |
3935 | while : | |
3936 | do | |
3937 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3938 | mv "conftest.tmp" "conftest.in" | |
3939 | cp "conftest.in" "conftest.nl" | |
3940 | $as_echo 'EGREP' >> "conftest.nl" | |
3941 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3942 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3943 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3944 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3945 | # Best one so far, save it but keep looking for a better one | |
3946 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3947 | ac_path_EGREP_max=$ac_count | |
3948 | fi | |
3949 | # 10*(2^10) chars as input seems more than enough | |
3950 | test $ac_count -gt 10 && break | |
3951 | done | |
3952 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3953 | esac | |
bec39cab | 3954 | |
81ecdfbb RW |
3955 | $ac_path_EGREP_found && break 3 |
3956 | done | |
3957 | done | |
3958 | done | |
3959 | IFS=$as_save_IFS | |
3960 | if test -z "$ac_cv_path_EGREP"; then | |
3961 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3962 | fi |
783e057b | 3963 | else |
81ecdfbb | 3964 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3965 | fi |
3966 | ||
81ecdfbb | 3967 | fi |
783e057b | 3968 | fi |
81ecdfbb RW |
3969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3970 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3971 | EGREP="$ac_cv_path_EGREP" | |
3972 | ||
783e057b | 3973 | |
81ecdfbb RW |
3974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3975 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3976 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3977 | $as_echo_n "(cached) " >&6 | |
783e057b | 3978 | else |
81ecdfbb | 3979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3980 | /* end confdefs.h. */ |
783e057b | 3981 | #include <stdlib.h> |
bec39cab | 3982 | #include <stdarg.h> |
783e057b DJ |
3983 | #include <string.h> |
3984 | #include <float.h> | |
c906108c | 3985 | |
bec39cab AC |
3986 | int |
3987 | main () | |
3988 | { | |
c906108c | 3989 | |
bec39cab AC |
3990 | ; |
3991 | return 0; | |
3992 | } | |
3993 | _ACEOF | |
81ecdfbb | 3994 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3995 | ac_cv_header_stdc=yes |
c906108c | 3996 | else |
81ecdfbb | 3997 | ac_cv_header_stdc=no |
c906108c | 3998 | fi |
81ecdfbb | 3999 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4000 | |
783e057b DJ |
4001 | if test $ac_cv_header_stdc = yes; then |
4002 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4003 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4004 | /* end confdefs.h. */ |
4005 | #include <string.h> | |
c906108c | 4006 | |
783e057b DJ |
4007 | _ACEOF |
4008 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4009 | $EGREP "memchr" >/dev/null 2>&1; then : |
4010 | ||
c906108c | 4011 | else |
783e057b | 4012 | ac_cv_header_stdc=no |
c906108c | 4013 | fi |
783e057b | 4014 | rm -f conftest* |
c906108c SS |
4015 | |
4016 | fi | |
4017 | ||
783e057b DJ |
4018 | if test $ac_cv_header_stdc = yes; then |
4019 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4021 | /* end confdefs.h. */ |
4022 | #include <stdlib.h> | |
bec39cab | 4023 | |
783e057b DJ |
4024 | _ACEOF |
4025 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4026 | $EGREP "free" >/dev/null 2>&1; then : |
4027 | ||
bec39cab | 4028 | else |
783e057b | 4029 | ac_cv_header_stdc=no |
bec39cab | 4030 | fi |
783e057b | 4031 | rm -f conftest* |
bec39cab AC |
4032 | |
4033 | fi | |
bec39cab | 4034 | |
783e057b DJ |
4035 | if test $ac_cv_header_stdc = yes; then |
4036 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4037 | if test "$cross_compiling" = yes; then : |
783e057b | 4038 | : |
bec39cab | 4039 | else |
81ecdfbb | 4040 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4041 | /* end confdefs.h. */ |
4042 | #include <ctype.h> | |
81ecdfbb | 4043 | #include <stdlib.h> |
783e057b DJ |
4044 | #if ((' ' & 0x0FF) == 0x020) |
4045 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4046 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4047 | #else | |
4048 | # define ISLOWER(c) \ | |
4049 | (('a' <= (c) && (c) <= 'i') \ | |
4050 | || ('j' <= (c) && (c) <= 'r') \ | |
4051 | || ('s' <= (c) && (c) <= 'z')) | |
4052 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4053 | #endif | |
4054 | ||
4055 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4056 | int | |
4057 | main () | |
4058 | { | |
4059 | int i; | |
4060 | for (i = 0; i < 256; i++) | |
4061 | if (XOR (islower (i), ISLOWER (i)) | |
4062 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4063 | return 2; |
4064 | return 0; | |
783e057b DJ |
4065 | } |
4066 | _ACEOF | |
81ecdfbb | 4067 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4068 | |
81ecdfbb RW |
4069 | else |
4070 | ac_cv_header_stdc=no | |
783e057b | 4071 | fi |
81ecdfbb RW |
4072 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4073 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4074 | fi |
81ecdfbb | 4075 | |
783e057b DJ |
4076 | fi |
4077 | fi | |
81ecdfbb RW |
4078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4079 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4080 | if test $ac_cv_header_stdc = yes; then |
4081 | ||
81ecdfbb | 4082 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4083 | |
4084 | fi | |
4085 | ||
4086 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4087 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4088 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4089 | do : |
4090 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4091 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4092 | " | |
4093 | eval as_val=\$$as_ac_Header | |
4094 | if test "x$as_val" = x""yes; then : | |
783e057b | 4095 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4096 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4097 | _ACEOF |
4098 | ||
4099 | fi | |
4100 | ||
4101 | done | |
4102 | ||
4103 | ||
4104 | ||
f434ba03 PA |
4105 | |
4106 | ||
81ecdfbb RW |
4107 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4108 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4109 | MINIX=yes |
4110 | else | |
4111 | MINIX= | |
4112 | fi | |
4113 | ||
4114 | ||
4115 | if test "$MINIX" = yes; then | |
4116 | ||
81ecdfbb | 4117 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4118 | |
4119 | ||
81ecdfbb | 4120 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4121 | |
4122 | ||
81ecdfbb | 4123 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4124 | |
4125 | fi | |
4126 | ||
f434ba03 PA |
4127 | case "$host_os" in |
4128 | hpux*) | |
4129 | ||
4130 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
4131 | ||
4132 | ;; | |
4133 | esac | |
4134 | ||
783e057b | 4135 | |
81ecdfbb RW |
4136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4137 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4138 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4139 | $as_echo_n "(cached) " >&6 | |
783e057b | 4140 | else |
81ecdfbb | 4141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4142 | /* end confdefs.h. */ |
4143 | ||
f434ba03 PA |
4144 | # define __EXTENSIONS__ 1 |
4145 | $ac_includes_default | |
783e057b DJ |
4146 | int |
4147 | main () | |
4148 | { | |
4149 | ||
4150 | ; | |
4151 | return 0; | |
4152 | } | |
4153 | _ACEOF | |
81ecdfbb | 4154 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4155 | ac_cv_safe_to_define___extensions__=yes |
4156 | else | |
81ecdfbb | 4157 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4158 | fi |
81ecdfbb | 4159 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4160 | fi |
81ecdfbb RW |
4161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4162 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4163 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4164 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4165 | |
81ecdfbb | 4166 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4167 | |
81ecdfbb | 4168 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4169 | |
81ecdfbb | 4170 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4171 | |
81ecdfbb | 4172 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4173 | |
4174 | ||
81ecdfbb RW |
4175 | if test -n "$ac_tool_prefix"; then |
4176 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4177 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4179 | $as_echo_n "checking for $ac_word... " >&6; } | |
4180 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
4181 | $as_echo_n "(cached) " >&6 | |
4182 | else | |
4183 | if test -n "$RANLIB"; then | |
4184 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4185 | else | |
4186 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4187 | for as_dir in $PATH | |
4188 | do | |
4189 | IFS=$as_save_IFS | |
4190 | test -z "$as_dir" && as_dir=. | |
4191 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4192 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4193 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4194 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4195 | break 2 | |
4196 | fi | |
4197 | done | |
4198 | done | |
4199 | IFS=$as_save_IFS | |
783e057b | 4200 | |
81ecdfbb RW |
4201 | fi |
4202 | fi | |
4203 | RANLIB=$ac_cv_prog_RANLIB | |
4204 | if test -n "$RANLIB"; then | |
4205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4206 | $as_echo "$RANLIB" >&6; } | |
4207 | else | |
4208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4209 | $as_echo "no" >&6; } | |
4210 | fi | |
783e057b DJ |
4211 | |
4212 | ||
81ecdfbb RW |
4213 | fi |
4214 | if test -z "$ac_cv_prog_RANLIB"; then | |
4215 | ac_ct_RANLIB=$RANLIB | |
4216 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4217 | set dummy ranlib; ac_word=$2 | |
4218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4219 | $as_echo_n "checking for $ac_word... " >&6; } | |
4220 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
4221 | $as_echo_n "(cached) " >&6 | |
783e057b | 4222 | else |
81ecdfbb RW |
4223 | if test -n "$ac_ct_RANLIB"; then |
4224 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4225 | else | |
4226 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4227 | for as_dir in $PATH | |
4228 | do | |
4229 | IFS=$as_save_IFS | |
4230 | test -z "$as_dir" && as_dir=. | |
4231 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4232 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4233 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
4234 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4235 | break 2 | |
4236 | fi | |
4237 | done | |
4238 | done | |
4239 | IFS=$as_save_IFS | |
4240 | ||
4241 | fi | |
4242 | fi | |
4243 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4244 | if test -n "$ac_ct_RANLIB"; then | |
4245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4246 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4247 | else | |
4248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4249 | $as_echo "no" >&6; } | |
4250 | fi | |
4251 | ||
4252 | if test "x$ac_ct_RANLIB" = x; then | |
4253 | RANLIB=":" | |
4254 | else | |
4255 | case $cross_compiling:$ac_tool_warned in | |
4256 | yes:) | |
4257 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4258 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4259 | ac_tool_warned=yes ;; | |
4260 | esac | |
4261 | RANLIB=$ac_ct_RANLIB | |
4262 | fi | |
4263 | else | |
4264 | RANLIB="$ac_cv_prog_RANLIB" | |
4265 | fi | |
4266 | ||
4267 | ||
4268 | ||
4269 | ||
4270 | ||
4271 | ||
3388710e JM |
4272 | |
4273 | ||
3388710e | 4274 | |
f434ba03 PA |
4275 | # Code from module arg-nonnull: |
4276 | # Code from module c++defs: | |
4277 | # Code from module extensions: | |
3388710e | 4278 | |
f434ba03 PA |
4279 | # Code from module include_next: |
4280 | # Code from module memchr: | |
4281 | # Code from module memmem: | |
4282 | # Code from module memmem-simple: | |
4283 | # Code from module multiarch: | |
4284 | # Code from module stddef: | |
4285 | # Code from module stdint: | |
4286 | # Code from module string: | |
4287 | # Code from module warn-on-use: | |
4288 | # Code from module wchar: | |
3388710e JM |
4289 | |
4290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4291 | $as_echo_n "checking target system type... " >&6; } | |
4292 | if test "${ac_cv_target+set}" = set; then : | |
4293 | $as_echo_n "(cached) " >&6 | |
4294 | else | |
4295 | if test "x$target_alias" = x; then | |
4296 | ac_cv_target=$ac_cv_host | |
4297 | else | |
4298 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4299 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4300 | fi | |
4301 | ||
4302 | fi | |
4303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4304 | $as_echo "$ac_cv_target" >&6; } | |
4305 | case $ac_cv_target in | |
4306 | *-*-*) ;; | |
4307 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4308 | esac | |
4309 | target=$ac_cv_target | |
4310 | ac_save_IFS=$IFS; IFS='-' | |
4311 | set x $ac_cv_target | |
4312 | shift | |
4313 | target_cpu=$1 | |
4314 | target_vendor=$2 | |
4315 | shift; shift | |
4316 | # Remember, the first character of IFS is used to create $*, | |
4317 | # except with old shells: | |
4318 | target_os=$* | |
4319 | IFS=$ac_save_IFS | |
4320 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4321 | ||
4322 | ||
4323 | # The aliases save the names the user supplied, while $host etc. | |
4324 | # will get canonicalized. | |
4325 | test -n "$target_alias" && | |
4326 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4327 | NONENONEs,x,x, && | |
4328 | program_prefix=${target_alias}- | |
4329 | ||
4330 | # The tests for host and target for $enable_largefile require | |
4331 | # canonical names. | |
4332 | ||
4333 | ||
81ecdfbb | 4334 | |
da2f07f1 JK |
4335 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4336 | # even in directories otherwise not depending on the $plugins option. | |
4337 | ||
4338 | ||
4339 | # Check whether --enable-plugins was given. | |
4340 | if test "${enable_plugins+set}" = set; then : | |
4341 | enableval=$enable_plugins; case "${enableval}" in | |
4342 | yes | "") plugins=yes ;; | |
4343 | no) plugins=no ;; | |
4344 | *) plugins=yes ;; | |
4345 | esac | |
4346 | else | |
4347 | plugins=no | |
4348 | fi | |
4349 | ||
4350 | ||
4351 | ||
4352 | case "${host}" in | |
4353 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4354 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4355 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4356 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4357 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4358 | # large-file support through the --enable-largefile switch, disable | |
4359 | # large-file support in favor of procfs support. | |
4360 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4361 | && : ${enable_largefile="no"} | |
4362 | ;; | |
4363 | esac | |
4364 | ||
4365 | # Check whether --enable-largefile was given. | |
4366 | if test "${enable_largefile+set}" = set; then : | |
4367 | enableval=$enable_largefile; | |
4368 | fi | |
4369 | ||
4370 | if test "$enable_largefile" != no; then | |
4371 | ||
4372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4373 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4374 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4375 | $as_echo_n "(cached) " >&6 | |
4376 | else | |
4377 | ac_cv_sys_largefile_CC=no | |
4378 | if test "$GCC" != yes; then | |
4379 | ac_save_CC=$CC | |
4380 | while :; do | |
4381 | # IRIX 6.2 and later do not support large files by default, | |
4382 | # so use the C compiler's -n32 option if that helps. | |
4383 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4384 | /* end confdefs.h. */ | |
4385 | #include <sys/types.h> | |
4386 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4387 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4388 | since some C++ compilers masquerading as C compilers | |
4389 | incorrectly reject 9223372036854775807. */ | |
4390 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4391 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4392 | && LARGE_OFF_T % 2147483647 == 1) | |
4393 | ? 1 : -1]; | |
4394 | int | |
4395 | main () | |
4396 | { | |
4397 | ||
4398 | ; | |
4399 | return 0; | |
4400 | } | |
4401 | _ACEOF | |
4402 | if ac_fn_c_try_compile "$LINENO"; then : | |
4403 | break | |
4404 | fi | |
4405 | rm -f core conftest.err conftest.$ac_objext | |
4406 | CC="$CC -n32" | |
4407 | if ac_fn_c_try_compile "$LINENO"; then : | |
4408 | ac_cv_sys_largefile_CC=' -n32'; break | |
4409 | fi | |
4410 | rm -f core conftest.err conftest.$ac_objext | |
4411 | break | |
4412 | done | |
4413 | CC=$ac_save_CC | |
4414 | rm -f conftest.$ac_ext | |
4415 | fi | |
4416 | fi | |
4417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4418 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4419 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4420 | CC=$CC$ac_cv_sys_largefile_CC | |
4421 | fi | |
4422 | ||
4423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4424 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4425 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4426 | $as_echo_n "(cached) " >&6 | |
4427 | else | |
4428 | while :; do | |
4429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4430 | /* end confdefs.h. */ | |
4431 | #include <sys/types.h> | |
4432 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4433 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4434 | since some C++ compilers masquerading as C compilers | |
4435 | incorrectly reject 9223372036854775807. */ | |
4436 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4437 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4438 | && LARGE_OFF_T % 2147483647 == 1) | |
4439 | ? 1 : -1]; | |
4440 | int | |
4441 | main () | |
4442 | { | |
4443 | ||
4444 | ; | |
4445 | return 0; | |
4446 | } | |
4447 | _ACEOF | |
4448 | if ac_fn_c_try_compile "$LINENO"; then : | |
4449 | ac_cv_sys_file_offset_bits=no; break | |
4450 | fi | |
4451 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4453 | /* end confdefs.h. */ | |
4454 | #define _FILE_OFFSET_BITS 64 | |
4455 | #include <sys/types.h> | |
4456 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4457 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4458 | since some C++ compilers masquerading as C compilers | |
4459 | incorrectly reject 9223372036854775807. */ | |
4460 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4461 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4462 | && LARGE_OFF_T % 2147483647 == 1) | |
4463 | ? 1 : -1]; | |
4464 | int | |
4465 | main () | |
4466 | { | |
4467 | ||
4468 | ; | |
4469 | return 0; | |
4470 | } | |
4471 | _ACEOF | |
4472 | if ac_fn_c_try_compile "$LINENO"; then : | |
4473 | ac_cv_sys_file_offset_bits=64; break | |
4474 | fi | |
4475 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4476 | ac_cv_sys_file_offset_bits=unknown | |
4477 | break | |
4478 | done | |
4479 | fi | |
4480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4481 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4482 | case $ac_cv_sys_file_offset_bits in #( | |
4483 | no | unknown) ;; | |
4484 | *) | |
4485 | cat >>confdefs.h <<_ACEOF | |
4486 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4487 | _ACEOF | |
4488 | ;; | |
4489 | esac | |
4490 | rm -rf conftest* | |
4491 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4493 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4494 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4495 | $as_echo_n "(cached) " >&6 | |
4496 | else | |
4497 | while :; do | |
4498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4499 | /* end confdefs.h. */ | |
4500 | #include <sys/types.h> | |
4501 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4502 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4503 | since some C++ compilers masquerading as C compilers | |
4504 | incorrectly reject 9223372036854775807. */ | |
4505 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4506 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4507 | && LARGE_OFF_T % 2147483647 == 1) | |
4508 | ? 1 : -1]; | |
4509 | int | |
4510 | main () | |
4511 | { | |
4512 | ||
4513 | ; | |
4514 | return 0; | |
4515 | } | |
4516 | _ACEOF | |
4517 | if ac_fn_c_try_compile "$LINENO"; then : | |
4518 | ac_cv_sys_large_files=no; break | |
4519 | fi | |
4520 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4521 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4522 | /* end confdefs.h. */ | |
4523 | #define _LARGE_FILES 1 | |
4524 | #include <sys/types.h> | |
4525 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4526 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4527 | since some C++ compilers masquerading as C compilers | |
4528 | incorrectly reject 9223372036854775807. */ | |
4529 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4530 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4531 | && LARGE_OFF_T % 2147483647 == 1) | |
4532 | ? 1 : -1]; | |
4533 | int | |
4534 | main () | |
4535 | { | |
4536 | ||
4537 | ; | |
4538 | return 0; | |
4539 | } | |
4540 | _ACEOF | |
4541 | if ac_fn_c_try_compile "$LINENO"; then : | |
4542 | ac_cv_sys_large_files=1; break | |
4543 | fi | |
4544 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4545 | ac_cv_sys_large_files=unknown | |
4546 | break | |
4547 | done | |
4548 | fi | |
4549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4550 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4551 | case $ac_cv_sys_large_files in #( | |
4552 | no | unknown) ;; | |
4553 | *) | |
4554 | cat >>confdefs.h <<_ACEOF | |
4555 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4556 | _ACEOF | |
4557 | ;; | |
4558 | esac | |
4559 | rm -rf conftest* | |
4560 | fi | |
4561 | fi | |
4562 | ||
4563 | ||
4564 | ||
81ecdfbb RW |
4565 | |
4566 | ||
4567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4568 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4569 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4570 | $as_echo_n "(cached) " >&6 | |
4571 | else | |
4572 | am_cv_prog_cc_stdc=no | |
4573 | ac_save_CC="$CC" | |
4574 | # Don't try gcc -ansi; that turns off useful extensions and | |
4575 | # breaks some systems' header files. | |
4576 | # AIX -qlanglvl=ansi | |
4577 | # Ultrix and OSF/1 -std1 | |
4578 | # HP-UX 10.20 and later -Ae | |
4579 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4580 | # SVR4 -Xc -D__EXTENSIONS__ | |
4581 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4582 | do | |
783e057b | 4583 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4584 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4585 | /* end confdefs.h. */ |
4586 | #include <stdarg.h> | |
4587 | #include <stdio.h> | |
4588 | #include <sys/types.h> | |
4589 | #include <sys/stat.h> | |
4590 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4591 | struct buf { int x; }; | |
4592 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4593 | static char *e (p, i) | |
4594 | char **p; | |
4595 | int i; | |
4596 | { | |
4597 | return p[i]; | |
4598 | } | |
4599 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4600 | { | |
4601 | char *s; | |
4602 | va_list v; | |
4603 | va_start (v,p); | |
4604 | s = g (p, va_arg (v,int)); | |
4605 | va_end (v); | |
4606 | return s; | |
4607 | } | |
4608 | int test (int i, double x); | |
4609 | struct s1 {int (*f) (int a);}; | |
4610 | struct s2 {int (*f) (double a);}; | |
4611 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4612 | int argc; | |
4613 | char **argv; | |
4614 | ||
4615 | int | |
4616 | main () | |
4617 | { | |
4618 | ||
4619 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4620 | ||
4621 | ; | |
4622 | return 0; | |
4623 | } | |
4624 | _ACEOF | |
81ecdfbb | 4625 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4626 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4627 | fi |
81ecdfbb | 4628 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4629 | done |
4630 | CC="$ac_save_CC" | |
4631 | ||
4632 | fi | |
4633 | ||
4634 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4636 | $as_echo "none needed" >&6; } | |
783e057b | 4637 | else |
81ecdfbb RW |
4638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4639 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4640 | fi |
4641 | case "x$am_cv_prog_cc_stdc" in | |
4642 | x|xno) ;; | |
4643 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4644 | esac | |
4645 | ||
4646 | ||
4647 | ac_aux_dir= | |
81ecdfbb RW |
4648 | for ac_dir in .. "$srcdir"/..; do |
4649 | for ac_t in install-sh install.sh shtool; do | |
4650 | if test -f "$ac_dir/$ac_t"; then | |
4651 | ac_aux_dir=$ac_dir | |
4652 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4653 | break 2 | |
4654 | fi | |
4655 | done | |
783e057b DJ |
4656 | done |
4657 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4658 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4659 | fi |
81ecdfbb RW |
4660 | |
4661 | # These three variables are undocumented and unsupported, | |
4662 | # and are intended to be withdrawn in a future Autoconf release. | |
4663 | # They can cause serious problems if a builder's source tree is in a directory | |
4664 | # whose full name contains unusual characters. | |
4665 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4666 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4667 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4668 | ||
783e057b | 4669 | |
783e057b | 4670 | |
81ecdfbb | 4671 | |
a417dc56 RW |
4672 | # Dependency checking. |
4673 | rm -rf .tst 2>/dev/null | |
4674 | mkdir .tst 2>/dev/null | |
4675 | if test -d .tst; then | |
4676 | am__leading_dot=. | |
4677 | else | |
4678 | am__leading_dot=_ | |
4679 | fi | |
4680 | rmdir .tst 2>/dev/null | |
4681 | ||
4682 | DEPDIR="${am__leading_dot}deps" | |
4683 | ||
81ecdfbb | 4684 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4685 | |
4686 | ||
4687 | depcc="$CC" am_compiler_list= | |
4688 | ||
4689 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4691 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4692 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4693 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4694 | else |
4695 | if test -f "$am_depcomp"; then | |
4696 | # We make a subdir and do the tests there. Otherwise we can end up | |
4697 | # making bogus files that we don't know about and never remove. For | |
4698 | # instance it was reported that on HP-UX the gcc test will end up | |
4699 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4700 | # in D'. | |
4701 | mkdir conftest.dir | |
4702 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4703 | # using a relative directory. | |
4704 | cp "$am_depcomp" conftest.dir | |
4705 | cd conftest.dir | |
4706 | # We will build objects and dependencies in a subdirectory because | |
4707 | # it helps to detect inapplicable dependency modes. For instance | |
4708 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4709 | # side effect of compilation, but ICC will put the dependencies in | |
4710 | # the current directory while Tru64 will put them in the object | |
4711 | # directory. | |
4712 | mkdir sub | |
4713 | ||
4714 | am_cv_CC_dependencies_compiler_type=none | |
4715 | if test "$am_compiler_list" = ""; then | |
4716 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4717 | fi | |
4718 | for depmode in $am_compiler_list; do | |
4719 | if test $depmode = none; then break; fi | |
4720 | ||
81ecdfbb | 4721 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4722 | # Setup a source with many dependencies, because some compilers |
4723 | # like to wrap large dependency lists on column 80 (with \), and | |
4724 | # we should not choose a depcomp mode which is confused by this. | |
4725 | # | |
4726 | # We need to recreate these files for each test, as the compiler may | |
4727 | # overwrite some of them when testing with obscure command lines. | |
4728 | # This happens at least with the AIX C compiler. | |
4729 | : > sub/conftest.c | |
4730 | for i in 1 2 3 4 5 6; do | |
4731 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4732 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4733 | # Solaris 8's {/usr,}/bin/sh. | |
4734 | touch sub/conftst$i.h | |
4735 | done | |
4736 | echo "include sub/conftest.Po" > confmf | |
4737 | ||
4738 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4739 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4740 | # handle `-M -o', and we need to detect this. | |
4741 | depcmd="depmode=$depmode \ | |
4742 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4743 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4744 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4745 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4746 | if env $depcmd > conftest.err 2>&1 && | |
4747 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4748 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4749 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4750 | # icc doesn't choke on unknown options, it will just issue warnings | |
4751 | # or remarks (even with -Werror). So we grep stderr for any message | |
4752 | # that says an option was ignored or not supported. | |
4753 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4754 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4755 | # The diagnosis changed in icc 8.0: | |
4756 | # icc: Command line remark: option '-MP' not supported | |
4757 | if (grep 'ignoring option' conftest.err || | |
4758 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4759 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4760 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4761 | break |
4762 | fi | |
4763 | fi | |
81ecdfbb | 4764 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4765 | sed -e 's/^/| /' < conftest.err >&5 |
4766 | done | |
4767 | ||
4768 | cd .. | |
4769 | rm -rf conftest.dir | |
4770 | else | |
4771 | am_cv_CC_dependencies_compiler_type=none | |
4772 | fi | |
4773 | ||
4774 | fi | |
81ecdfbb RW |
4775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4776 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4777 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4778 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4779 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4780 | ||
4781 | fi | |
4782 | ||
4783 | ||
4784 | # Check for the 'make' the user wants to use. | |
4785 | for ac_prog in make | |
4786 | do | |
4787 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4788 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4790 | $as_echo_n "checking for $ac_word... " >&6; } | |
4791 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4792 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4793 | else |
4794 | if test -n "$MAKE"; then | |
4795 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4796 | else | |
4797 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4798 | for as_dir in $PATH | |
4799 | do | |
4800 | IFS=$as_save_IFS | |
4801 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4802 | for ac_exec_ext in '' $ac_executable_extensions; do |
4803 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4804 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4805 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4806 | break 2 |
4807 | fi | |
4808 | done | |
81ecdfbb RW |
4809 | done |
4810 | IFS=$as_save_IFS | |
a417dc56 RW |
4811 | |
4812 | fi | |
4813 | fi | |
4814 | MAKE=$ac_cv_prog_MAKE | |
4815 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4816 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4817 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4818 | else |
81ecdfbb RW |
4819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4820 | $as_echo "no" >&6; } | |
a417dc56 RW |
4821 | fi |
4822 | ||
81ecdfbb | 4823 | |
a417dc56 RW |
4824 | test -n "$MAKE" && break |
4825 | done | |
4826 | ||
4827 | MAKE_IS_GNU= | |
4828 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4829 | *GNU*) | |
4830 | MAKE_IS_GNU=yes | |
4831 | ;; | |
4832 | esac | |
81ecdfbb | 4833 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4834 | GMAKE_TRUE= |
4835 | GMAKE_FALSE='#' | |
4836 | else | |
4837 | GMAKE_TRUE='#' | |
4838 | GMAKE_FALSE= | |
4839 | fi | |
4840 | ||
81ecdfbb RW |
4841 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4842 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4843 | set x ${MAKE-make} | |
4844 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4845 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4846 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4847 | else |
4848 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4849 | SHELL = /bin/sh |
a417dc56 | 4850 | all: |
81ecdfbb | 4851 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4852 | _ACEOF |
4853 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4854 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4855 | *@@@%%%=?*=@@@%%%*) | |
4856 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4857 | *) | |
4858 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4859 | esac | |
a417dc56 RW |
4860 | rm -f conftest.make |
4861 | fi | |
81ecdfbb RW |
4862 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4864 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4865 | SET_MAKE= |
4866 | else | |
81ecdfbb RW |
4867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4868 | $as_echo "no" >&6; } | |
a417dc56 RW |
4869 | SET_MAKE="MAKE=${MAKE-make}" |
4870 | fi | |
4871 | ||
4872 | ||
783e057b DJ |
4873 | |
4874 | CONFIG_OBS= | |
4875 | CONFIG_DEPS= | |
4876 | CONFIG_SRCS= | |
4877 | ENABLE_CFLAGS= | |
4878 | ||
4879 | CONFIG_ALL= | |
4880 | CONFIG_CLEAN= | |
4881 | CONFIG_INSTALL= | |
4882 | CONFIG_UNINSTALL= | |
4883 | ||
4884 | # If we haven't got the data from the intl directory, | |
4885 | # assume NLS is disabled. | |
4886 | USE_NLS=no | |
4887 | LIBINTL= | |
4888 | LIBINTL_DEP= | |
4889 | INCINTL= | |
4890 | XGETTEXT= | |
4891 | GMSGFMT= | |
4892 | POSUB= | |
4893 | ||
4894 | if test -f ../intl/config.intl; then | |
4895 | . ../intl/config.intl | |
4896 | fi | |
81ecdfbb RW |
4897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4898 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4899 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4901 | $as_echo "no" >&6; } | |
783e057b | 4902 | else |
81ecdfbb RW |
4903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4904 | $as_echo "yes" >&6; } | |
783e057b | 4905 | |
81ecdfbb | 4906 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4907 | |
4908 | ||
81ecdfbb RW |
4909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4910 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4911 | # Look for .po and .gmo files in the source directory. |
4912 | CATALOGS= | |
4913 | XLINGUAS= | |
4914 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4915 | # If there aren't any .gmo files the shell will give us the | |
4916 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4917 | # weeded out. | |
4918 | case "$cat" in *\**) | |
4919 | continue;; | |
4920 | esac | |
4921 | # The quadruple backslash is collapsed to a double backslash | |
4922 | # by the backticks, then collapsed again by the double quotes, | |
4923 | # leaving us with one backslash in the sed expression (right | |
4924 | # before the dot that mustn't act as a wildcard). | |
4925 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
4926 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4927 | # The user is allowed to set LINGUAS to a list of languages to | |
4928 | # install catalogs for. If it's empty that means "all of them." | |
4929 | if test "x$LINGUAS" = x; then | |
4930 | CATALOGS="$CATALOGS $cat" | |
4931 | XLINGUAS="$XLINGUAS $lang" | |
4932 | else | |
4933 | case "$LINGUAS" in *$lang*) | |
4934 | CATALOGS="$CATALOGS $cat" | |
4935 | XLINGUAS="$XLINGUAS $lang" | |
4936 | ;; | |
4937 | esac | |
4938 | fi | |
4939 | done | |
4940 | LINGUAS="$XLINGUAS" | |
81ecdfbb RW |
4941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
4942 | $as_echo "$LINGUAS" >&6; } | |
783e057b DJ |
4943 | |
4944 | ||
4945 | DATADIRNAME=share | |
4946 | ||
4947 | INSTOBJEXT=.mo | |
4948 | ||
4949 | GENCAT=gencat | |
4950 | ||
4951 | CATOBJEXT=.gmo | |
4952 | ||
4953 | fi | |
4954 | ||
4955 | localedir='${datadir}/locale' | |
4956 | ||
4957 | ||
4958 | if test x"$USE_NLS" = xyes; then | |
4959 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4960 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4961 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4962 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
4963 | fi | |
4964 | ||
4965 | ||
f434ba03 PA |
4966 | |
4967 | ||
4968 | ||
4969 | LIBC_FATAL_STDERR_=1 | |
4970 | export LIBC_FATAL_STDERR_ | |
4971 | ||
4972 | ||
4973 | ||
4974 | ||
4975 | ||
4976 | for ac_header in $gl_header_list | |
4977 | do : | |
4978 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4979 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
4980 | eval as_val=\$$as_ac_Header | |
4981 | if test "x$as_val" = x""yes; then : | |
4982 | cat >>confdefs.h <<_ACEOF | |
4983 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4984 | _ACEOF | |
4985 | ||
4986 | fi | |
4987 | ||
4988 | done | |
4989 | ||
4990 | ||
4991 | ||
4992 | ||
4993 | ||
4994 | ||
4995 | ||
4996 | ||
4997 | ||
4998 | for ac_func in $gl_func_list | |
4999 | do : | |
5000 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5001 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5002 | eval as_val=\$$as_ac_var | |
5003 | if test "x$as_val" = x""yes; then : | |
5004 | cat >>confdefs.h <<_ACEOF | |
5005 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
5006 | _ACEOF | |
5007 | ||
5008 | fi | |
5009 | done | |
5010 | ||
5011 | ||
5012 | ||
5013 | ||
5014 | ||
5015 | ||
5016 | GNULIB_MEMCHR=0; | |
5017 | GNULIB_MEMMEM=0; | |
5018 | GNULIB_MEMPCPY=0; | |
5019 | GNULIB_MEMRCHR=0; | |
5020 | GNULIB_RAWMEMCHR=0; | |
5021 | GNULIB_STPCPY=0; | |
5022 | GNULIB_STPNCPY=0; | |
5023 | GNULIB_STRCHRNUL=0; | |
5024 | GNULIB_STRDUP=0; | |
5025 | GNULIB_STRNCAT=0; | |
5026 | GNULIB_STRNDUP=0; | |
5027 | GNULIB_STRNLEN=0; | |
5028 | GNULIB_STRPBRK=0; | |
5029 | GNULIB_STRSEP=0; | |
5030 | GNULIB_STRSTR=0; | |
5031 | GNULIB_STRCASESTR=0; | |
5032 | GNULIB_STRTOK_R=0; | |
5033 | GNULIB_MBSLEN=0; | |
5034 | GNULIB_MBSNLEN=0; | |
5035 | GNULIB_MBSCHR=0; | |
5036 | GNULIB_MBSRCHR=0; | |
5037 | GNULIB_MBSSTR=0; | |
5038 | GNULIB_MBSCASECMP=0; | |
5039 | GNULIB_MBSNCASECMP=0; | |
5040 | GNULIB_MBSPCASECMP=0; | |
5041 | GNULIB_MBSCASESTR=0; | |
5042 | GNULIB_MBSCSPN=0; | |
5043 | GNULIB_MBSPBRK=0; | |
5044 | GNULIB_MBSSPN=0; | |
5045 | GNULIB_MBSSEP=0; | |
5046 | GNULIB_MBSTOK_R=0; | |
5047 | GNULIB_STRERROR=0; | |
5048 | GNULIB_STRSIGNAL=0; | |
5049 | GNULIB_STRVERSCMP=0; | |
5050 | HAVE_MBSLEN=0; | |
5051 | HAVE_MEMCHR=1; | |
5052 | HAVE_DECL_MEMMEM=1; | |
5053 | HAVE_MEMPCPY=1; | |
5054 | HAVE_DECL_MEMRCHR=1; | |
5055 | HAVE_RAWMEMCHR=1; | |
5056 | HAVE_STPCPY=1; | |
5057 | HAVE_STPNCPY=1; | |
5058 | HAVE_STRCHRNUL=1; | |
5059 | HAVE_DECL_STRDUP=1; | |
5060 | HAVE_DECL_STRNDUP=1; | |
5061 | HAVE_DECL_STRNLEN=1; | |
5062 | HAVE_STRPBRK=1; | |
5063 | HAVE_STRSEP=1; | |
5064 | HAVE_STRCASESTR=1; | |
5065 | HAVE_DECL_STRTOK_R=1; | |
5066 | HAVE_DECL_STRSIGNAL=1; | |
5067 | HAVE_STRVERSCMP=1; | |
5068 | REPLACE_MEMCHR=0; | |
783e057b | 5069 | REPLACE_MEMMEM=0; |
f434ba03 PA |
5070 | REPLACE_STPNCPY=0; |
5071 | REPLACE_STRDUP=0; | |
783e057b | 5072 | REPLACE_STRSTR=0; |
f434ba03 PA |
5073 | REPLACE_STRCASESTR=0; |
5074 | REPLACE_STRERROR=0; | |
5075 | REPLACE_STRNCAT=0; | |
5076 | REPLACE_STRNDUP=0; | |
5077 | REPLACE_STRNLEN=0; | |
5078 | REPLACE_STRSIGNAL=0; | |
5079 | REPLACE_STRTOK_R=0; | |
5080 | UNDEFINE_STRTOK_R=0; | |
5081 | ||
5082 | ||
5083 | ||
5084 | ||
5085 | ||
5086 | ||
5087 | ||
5088 | ||
5089 | ||
5090 | ||
5091 | ||
5092 | ||
5093 | ||
5094 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it | |
5095 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | |
5096 | # irrelevant for anonymous mappings. | |
5097 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
5098 | if test "x$ac_cv_func_mmap" = x""yes; then : | |
5099 | gl_have_mmap=yes | |
5100 | else | |
5101 | gl_have_mmap=no | |
5102 | fi | |
5103 | ||
5104 | ||
5105 | # Try to allow MAP_ANONYMOUS. | |
5106 | gl_have_mmap_anonymous=no | |
5107 | if test $gl_have_mmap = yes; then | |
5108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 | |
5109 | $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } | |
5110 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5111 | /* end confdefs.h. */ | |
5112 | ||
5113 | #include <sys/mman.h> | |
5114 | #ifdef MAP_ANONYMOUS | |
5115 | I cant identify this map. | |
5116 | #endif | |
5117 | ||
5118 | _ACEOF | |
5119 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5120 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5121 | gl_have_mmap_anonymous=yes | |
5122 | fi | |
5123 | rm -f conftest* | |
5124 | ||
5125 | if test $gl_have_mmap_anonymous != yes; then | |
5126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5127 | /* end confdefs.h. */ | |
5128 | ||
5129 | #include <sys/mman.h> | |
5130 | #ifdef MAP_ANON | |
5131 | I cant identify this map. | |
5132 | #endif | |
5133 | ||
5134 | _ACEOF | |
5135 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5136 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
5137 | ||
5138 | $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h | |
5139 | ||
5140 | gl_have_mmap_anonymous=yes | |
5141 | fi | |
5142 | rm -f conftest* | |
5143 | ||
5144 | fi | |
5145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 | |
5146 | $as_echo "$gl_have_mmap_anonymous" >&6; } | |
5147 | if test $gl_have_mmap_anonymous = yes; then | |
5148 | ||
5149 | $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h | |
5150 | ||
5151 | fi | |
5152 | fi | |
5153 | ||
5154 | ||
5155 | : | |
5156 | ||
5157 | ||
5158 | ||
5159 | ||
5160 | ||
5161 | ||
5162 | : | |
5163 | ||
5164 | ||
5165 | ||
5166 | ||
5167 | ||
5168 | ||
5169 | ||
5170 | ||
5171 | : | |
5172 | ||
5173 | ||
5174 | ||
5175 | ||
5176 | ||
5177 | if test $ac_cv_func_memchr = yes; then | |
5178 | # Detect platform-specific bugs in some versions of glibc: | |
5179 | # memchr should not dereference anything with length 0 | |
5180 | # http://bugzilla.redhat.com/499689 | |
5181 | # memchr should not dereference overestimated length after a match | |
5182 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | |
5183 | # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 | |
5184 | # Assume that memchr works on platforms that lack mprotect. | |
5185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 | |
5186 | $as_echo_n "checking whether memchr works... " >&6; } | |
5187 | if test "${gl_cv_func_memchr_works+set}" = set; then : | |
5188 | $as_echo_n "(cached) " >&6 | |
5189 | else | |
5190 | if test "$cross_compiling" = yes; then : | |
5191 | gl_cv_func_memchr_works="guessing no" | |
5192 | else | |
5193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5194 | /* end confdefs.h. */ | |
5195 | ||
5196 | #include <string.h> | |
5197 | #if HAVE_SYS_MMAN_H | |
5198 | # include <fcntl.h> | |
5199 | # include <unistd.h> | |
5200 | # include <sys/types.h> | |
5201 | # include <sys/mman.h> | |
5202 | # ifndef MAP_FILE | |
5203 | # define MAP_FILE 0 | |
5204 | # endif | |
5205 | #endif | |
5206 | ||
5207 | int | |
5208 | main () | |
5209 | { | |
5210 | ||
5211 | char *fence = NULL; | |
5212 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | |
5213 | # if HAVE_MAP_ANONYMOUS | |
5214 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | |
5215 | const int fd = -1; | |
5216 | # else /* !HAVE_MAP_ANONYMOUS */ | |
5217 | const int flags = MAP_FILE | MAP_PRIVATE; | |
5218 | int fd = open ("/dev/zero", O_RDONLY, 0666); | |
5219 | if (fd >= 0) | |
5220 | # endif | |
5221 | { | |
5222 | int pagesize = getpagesize (); | |
5223 | char *two_pages = | |
5224 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | |
5225 | flags, fd, 0); | |
5226 | if (two_pages != (char *)(-1) | |
5227 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | |
5228 | fence = two_pages + pagesize; | |
5229 | } | |
5230 | #endif | |
5231 | if (fence) | |
5232 | { | |
5233 | if (memchr (fence, 0, 0)) | |
5234 | return 1; | |
5235 | strcpy (fence - 9, "12345678"); | |
5236 | if (memchr (fence - 9, 0, 79) != fence - 1) | |
5237 | return 2; | |
5238 | } | |
5239 | return 0; | |
5240 | ||
5241 | ; | |
5242 | return 0; | |
5243 | } | |
5244 | _ACEOF | |
5245 | if ac_fn_c_try_run "$LINENO"; then : | |
5246 | gl_cv_func_memchr_works=yes | |
5247 | else | |
5248 | gl_cv_func_memchr_works=no | |
5249 | fi | |
5250 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5251 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5252 | fi | |
5253 | ||
5254 | fi | |
5255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 | |
5256 | $as_echo "$gl_cv_func_memchr_works" >&6; } | |
5257 | if test "$gl_cv_func_memchr_works" != yes; then | |
5258 | REPLACE_MEMCHR=1 | |
5259 | fi | |
5260 | else | |
5261 | HAVE_MEMCHR=0 | |
5262 | fi | |
5263 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then | |
5264 | ||
5265 | ||
5266 | ||
5267 | ||
5268 | ||
5269 | ||
5270 | ||
5271 | ||
5272 | gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" | |
5273 | ||
5274 | ||
5275 | for ac_header in bp-sym.h | |
5276 | do : | |
5277 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
5278 | if test "x$ac_cv_header_bp_sym_h" = x""yes; then : | |
5279 | cat >>confdefs.h <<_ACEOF | |
5280 | #define HAVE_BP_SYM_H 1 | |
5281 | _ACEOF | |
5282 | ||
5283 | fi | |
5284 | ||
5285 | done | |
5286 | ||
5287 | ||
5288 | fi | |
783e057b DJ |
5289 | |
5290 | ||
81ecdfbb RW |
5291 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
5292 | if test "x$ac_cv_have_decl_memmem" = x""yes; then : | |
5293 | ac_have_decl=1 | |
783e057b | 5294 | else |
81ecdfbb | 5295 | ac_have_decl=0 |
783e057b | 5296 | fi |
783e057b DJ |
5297 | |
5298 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 5299 | #define HAVE_DECL_MEMMEM $ac_have_decl |
783e057b DJ |
5300 | _ACEOF |
5301 | ||
5302 | ||
783e057b DJ |
5303 | |
5304 | ||
5305 | ||
5306 | ||
5307 | ||
5308 | ||
5309 | ||
5310 | ||
783e057b | 5311 | |
783e057b | 5312 | |
783e057b | 5313 | |
f434ba03 | 5314 | |
81ecdfbb RW |
5315 | for ac_func in memmem |
5316 | do : | |
5317 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
5318 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 5319 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 5320 | #define HAVE_MEMMEM 1 |
783e057b DJ |
5321 | _ACEOF |
5322 | ||
5323 | else | |
5324 | ||
5325 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
5326 | ||
5327 | fi | |
5328 | done | |
5329 | ||
5330 | ||
5331 | ||
5332 | : | |
5333 | ||
5334 | ||
5335 | ||
5336 | ||
5337 | ||
5338 | if test $ac_cv_have_decl_memmem = no; then | |
5339 | HAVE_DECL_MEMMEM=0 | |
5340 | fi | |
5341 | : | |
5342 | ||
5343 | ||
f434ba03 PA |
5344 | gl_cv_c_multiarch=no |
5345 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5346 | /* end confdefs.h. */ | |
5347 | #ifndef __APPLE_CC__ | |
5348 | not a universal capable compiler | |
5349 | #endif | |
5350 | typedef int dummy; | |
5351 | ||
5352 | _ACEOF | |
5353 | if ac_fn_c_try_compile "$LINENO"; then : | |
5354 | ||
5355 | arch= | |
5356 | prev= | |
5357 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
5358 | if test -n "$prev"; then | |
5359 | case $word in | |
5360 | i?86 | x86_64 | ppc | ppc64) | |
5361 | if test -z "$arch" || test "$arch" = "$word"; then | |
5362 | arch="$word" | |
5363 | else | |
5364 | gl_cv_c_multiarch=yes | |
5365 | fi | |
5366 | ;; | |
5367 | esac | |
5368 | prev= | |
5369 | else | |
5370 | if test "x$word" = "x-arch"; then | |
5371 | prev=arch | |
5372 | fi | |
5373 | fi | |
5374 | done | |
5375 | ||
5376 | fi | |
5377 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5378 | if test $gl_cv_c_multiarch = yes; then | |
5379 | ||
5380 | $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
5381 | ||
5382 | APPLE_UNIVERSAL_BUILD=1 | |
5383 | else | |
5384 | APPLE_UNIVERSAL_BUILD=0 | |
5385 | fi | |
5386 | ||
5387 | ||
5388 | ||
5389 | REPLACE_NULL=0; | |
5390 | HAVE_WCHAR_T=1; | |
5391 | STDDEF_H=''; | |
5392 | ||
5393 | ||
5394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
5395 | $as_echo_n "checking for wchar_t... " >&6; } | |
5396 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
5397 | $as_echo_n "(cached) " >&6 | |
5398 | else | |
5399 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5400 | /* end confdefs.h. */ | |
5401 | #include <stddef.h> | |
5402 | wchar_t foo = (wchar_t)'\0'; | |
5403 | int | |
5404 | main () | |
5405 | { | |
5406 | ||
5407 | ; | |
5408 | return 0; | |
5409 | } | |
5410 | _ACEOF | |
5411 | if ac_fn_c_try_compile "$LINENO"; then : | |
5412 | gt_cv_c_wchar_t=yes | |
5413 | else | |
5414 | gt_cv_c_wchar_t=no | |
5415 | fi | |
5416 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5417 | fi | |
5418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
5419 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
5420 | if test $gt_cv_c_wchar_t = yes; then | |
5421 | ||
5422 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
5423 | ||
5424 | fi | |
5425 | ||
5426 | ||
5427 | ||
5428 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
5429 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
5430 | if test "${gl_cv_have_include_next+set}" = set; then : | |
5431 | $as_echo_n "(cached) " >&6 | |
5432 | else | |
5433 | rm -rf conftestd1a conftestd1b conftestd2 | |
5434 | mkdir conftestd1a conftestd1b conftestd2 | |
5435 | cat <<EOF > conftestd1a/conftest.h | |
5436 | #define DEFINED_IN_CONFTESTD1 | |
5437 | #include_next <conftest.h> | |
5438 | #ifdef DEFINED_IN_CONFTESTD2 | |
5439 | int foo; | |
5440 | #else | |
5441 | #error "include_next doesn't work" | |
5442 | #endif | |
5443 | EOF | |
5444 | cat <<EOF > conftestd1b/conftest.h | |
5445 | #define DEFINED_IN_CONFTESTD1 | |
5446 | #include <stdio.h> | |
5447 | #include_next <conftest.h> | |
5448 | #ifdef DEFINED_IN_CONFTESTD2 | |
5449 | int foo; | |
5450 | #else | |
5451 | #error "include_next doesn't work" | |
5452 | #endif | |
5453 | EOF | |
5454 | cat <<EOF > conftestd2/conftest.h | |
5455 | #ifndef DEFINED_IN_CONFTESTD1 | |
5456 | #error "include_next test doesn't work" | |
5457 | #endif | |
5458 | #define DEFINED_IN_CONFTESTD2 | |
5459 | EOF | |
5460 | gl_save_CPPFLAGS="$CPPFLAGS" | |
5461 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
5462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5463 | /* end confdefs.h. */ | |
5464 | #include <conftest.h> | |
5465 | _ACEOF | |
5466 | if ac_fn_c_try_compile "$LINENO"; then : | |
5467 | gl_cv_have_include_next=yes | |
5468 | else | |
5469 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
5470 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5471 | /* end confdefs.h. */ | |
5472 | #include <conftest.h> | |
5473 | _ACEOF | |
5474 | if ac_fn_c_try_compile "$LINENO"; then : | |
5475 | gl_cv_have_include_next=buggy | |
5476 | else | |
5477 | gl_cv_have_include_next=no | |
5478 | fi | |
5479 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5480 | ||
5481 | fi | |
5482 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5483 | CPPFLAGS="$gl_save_CPPFLAGS" | |
5484 | rm -rf conftestd1a conftestd1b conftestd2 | |
5485 | ||
5486 | fi | |
5487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
5488 | $as_echo "$gl_cv_have_include_next" >&6; } | |
5489 | PRAGMA_SYSTEM_HEADER= | |
5490 | if test $gl_cv_have_include_next = yes; then | |
5491 | INCLUDE_NEXT=include_next | |
5492 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5493 | if test -n "$GCC"; then | |
5494 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
5495 | fi | |
5496 | else | |
5497 | if test $gl_cv_have_include_next = buggy; then | |
5498 | INCLUDE_NEXT=include | |
5499 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5500 | else | |
5501 | INCLUDE_NEXT=include | |
5502 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
5503 | fi | |
5504 | fi | |
5505 | ||
5506 | ||
5507 | ||
5508 | ||
5509 | ||
5510 | ||
5511 | ||
5512 | ||
5513 | ||
5514 | ||
81ecdfbb RW |
5515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
5516 | $as_echo_n "checking for long long int... " >&6; } | |
5517 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
5518 | $as_echo_n "(cached) " >&6 | |
783e057b | 5519 | else |
81ecdfbb | 5520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5521 | /* end confdefs.h. */ |
81ecdfbb RW |
5522 | |
5523 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5524 | implementations with broken preprocessors. Perhaps this can |
5525 | be revisited in 2012. In the meantime, code should not expect | |
5526 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5527 | /* Test literals. */ |
5528 | long long int ll = 9223372036854775807ll; | |
5529 | long long int nll = -9223372036854775807LL; | |
5530 | unsigned long long int ull = 18446744073709551615ULL; | |
5531 | /* Test constant expressions. */ | |
5532 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5533 | ? 1 : -1)]; |
783e057b | 5534 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5535 | ? 1 : -1)]; |
783e057b DJ |
5536 | int i = 63; |
5537 | int | |
5538 | main () | |
5539 | { | |
5540 | /* Test availability of runtime routines for shift and division. */ | |
5541 | long long int llmax = 9223372036854775807ll; | |
5542 | unsigned long long int ullmax = 18446744073709551615ull; | |
5543 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5544 | | (llmax / ll) | (llmax % ll) |
5545 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5546 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5547 | ; |
5548 | return 0; | |
5549 | } | |
5550 | ||
5551 | _ACEOF | |
81ecdfbb | 5552 | if ac_fn_c_try_link "$LINENO"; then : |
f434ba03 | 5553 | if test "$cross_compiling" = yes; then : |
783e057b DJ |
5554 | ac_cv_type_long_long_int=yes |
5555 | else | |
81ecdfbb | 5556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5557 | /* end confdefs.h. */ |
5558 | #include <limits.h> | |
f434ba03 PA |
5559 | #ifndef LLONG_MAX |
5560 | # define HALF \ | |
5561 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
5562 | # define LLONG_MAX (HALF - 1 + HALF) | |
5563 | #endif | |
783e057b DJ |
5564 | int |
5565 | main () | |
5566 | { | |
5567 | long long int n = 1; | |
f434ba03 PA |
5568 | int i; |
5569 | for (i = 0; ; i++) | |
5570 | { | |
5571 | long long int m = n << i; | |
5572 | if (m >> i != n) | |
5573 | return 1; | |
5574 | if (LLONG_MAX / 2 < m) | |
5575 | break; | |
5576 | } | |
5577 | return 0; | |
783e057b DJ |
5578 | ; |
5579 | return 0; | |
5580 | } | |
5581 | _ACEOF | |
81ecdfbb | 5582 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
5583 | ac_cv_type_long_long_int=yes |
5584 | else | |
81ecdfbb | 5585 | ac_cv_type_long_long_int=no |
783e057b | 5586 | fi |
81ecdfbb RW |
5587 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5588 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 5589 | fi |
783e057b | 5590 | |
81ecdfbb RW |
5591 | else |
5592 | ac_cv_type_long_long_int=no | |
783e057b | 5593 | fi |
81ecdfbb RW |
5594 | rm -f core conftest.err conftest.$ac_objext \ |
5595 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5596 | fi |
81ecdfbb RW |
5597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
5598 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
783e057b DJ |
5599 | if test $ac_cv_type_long_long_int = yes; then |
5600 | ||
81ecdfbb | 5601 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5602 | |
5603 | fi | |
5604 | ||
5605 | ||
81ecdfbb RW |
5606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
5607 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
5608 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
5609 | $as_echo_n "(cached) " >&6 | |
783e057b | 5610 | else |
81ecdfbb | 5611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 5612 | /* end confdefs.h. */ |
81ecdfbb RW |
5613 | |
5614 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
f434ba03 PA |
5615 | implementations with broken preprocessors. Perhaps this can |
5616 | be revisited in 2012. In the meantime, code should not expect | |
5617 | #if to work with literals wider than 32 bits. */ | |
783e057b DJ |
5618 | /* Test literals. */ |
5619 | long long int ll = 9223372036854775807ll; | |
5620 | long long int nll = -9223372036854775807LL; | |
5621 | unsigned long long int ull = 18446744073709551615ULL; | |
5622 | /* Test constant expressions. */ | |
5623 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
f434ba03 | 5624 | ? 1 : -1)]; |
783e057b | 5625 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
f434ba03 | 5626 | ? 1 : -1)]; |
783e057b DJ |
5627 | int i = 63; |
5628 | int | |
5629 | main () | |
5630 | { | |
5631 | /* Test availability of runtime routines for shift and division. */ | |
5632 | long long int llmax = 9223372036854775807ll; | |
5633 | unsigned long long int ullmax = 18446744073709551615ull; | |
5634 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
f434ba03 PA |
5635 | | (llmax / ll) | (llmax % ll) |
5636 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5637 | | (ullmax / ull) | (ullmax % ull)); | |
783e057b DJ |
5638 | ; |
5639 | return 0; | |
5640 | } | |
5641 | ||
5642 | _ACEOF | |
81ecdfbb | 5643 | if ac_fn_c_try_link "$LINENO"; then : |
783e057b DJ |
5644 | ac_cv_type_unsigned_long_long_int=yes |
5645 | else | |
81ecdfbb | 5646 | ac_cv_type_unsigned_long_long_int=no |
783e057b | 5647 | fi |
81ecdfbb RW |
5648 | rm -f core conftest.err conftest.$ac_objext \ |
5649 | conftest$ac_exeext conftest.$ac_ext | |
783e057b | 5650 | fi |
81ecdfbb RW |
5651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 |
5652 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
783e057b DJ |
5653 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
5654 | ||
81ecdfbb | 5655 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
783e057b DJ |
5656 | |
5657 | fi | |
5658 | ||
5659 | ||
5660 | ||
783e057b DJ |
5661 | |
5662 | ||
5663 | ||
5664 | ||
5665 | ||
5666 | ||
5667 | ||
5668 | ||
81ecdfbb RW |
5669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
5670 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
5671 | if test "${ac_cv_c_restrict+set}" = set; then : | |
5672 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
5673 | else |
5674 | ac_cv_c_restrict=no | |
5675 | # The order here caters to the fact that C++ does not require restrict. | |
5676 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
81ecdfbb | 5677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5678 | /* end confdefs.h. */ |
5679 | typedef int * int_ptr; | |
5680 | int foo (int_ptr $ac_kw ip) { | |
5681 | return ip[0]; | |
5682 | } | |
5683 | int | |
5684 | main () | |
5685 | { | |
5686 | int s[1]; | |
5687 | int * $ac_kw t = s; | |
5688 | t[0] = 0; | |
5689 | return foo(t) | |
5690 | ; | |
5691 | return 0; | |
5692 | } | |
5693 | _ACEOF | |
81ecdfbb | 5694 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5695 | ac_cv_c_restrict=$ac_kw |
783e057b | 5696 | fi |
81ecdfbb | 5697 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5698 | test "$ac_cv_c_restrict" != no && break |
5699 | done | |
5700 | ||
5701 | fi | |
81ecdfbb RW |
5702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
5703 | $as_echo "$ac_cv_c_restrict" >&6; } | |
783e057b DJ |
5704 | |
5705 | case $ac_cv_c_restrict in | |
5706 | restrict) ;; | |
81ecdfbb | 5707 | no) $as_echo "#define restrict /**/" >>confdefs.h |
783e057b DJ |
5708 | ;; |
5709 | *) cat >>confdefs.h <<_ACEOF | |
5710 | #define restrict $ac_cv_c_restrict | |
5711 | _ACEOF | |
5712 | ;; | |
5713 | esac | |
5714 | ||
5715 | ||
5716 | ||
5717 | ||
5718 | ||
5719 | ||
5720 | ||
5721 | ||
5722 | ||
5723 | ||
5724 | ||
5725 | ||
f434ba03 | 5726 | |
783e057b DJ |
5727 | : |
5728 | ||
5729 | ||
5730 | ||
5731 | ||
5732 | ||
5733 | ||
5734 | ||
f434ba03 PA |
5735 | if test $gl_cv_have_include_next = yes; then |
5736 | gl_cv_next_string_h='<'string.h'>' | |
5737 | else | |
5738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 | |
5739 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
5740 | if test "${gl_cv_next_string_h+set}" = set; then : | |
5741 | $as_echo_n "(cached) " >&6 | |
5742 | else | |
5743 | ||
5744 | if test $ac_cv_header_string_h = yes; then | |
5745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5746 | /* end confdefs.h. */ | |
5747 | #include <string.h> | |
5748 | ||
5749 | _ACEOF | |
5750 | case "$host_os" in | |
5751 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
5752 | *) gl_absname_cpp="$ac_cpp" ;; | |
5753 | esac | |
5754 | gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
5755 | sed -n '\#/string.h#{ | |
5756 | s#.*"\(.*/string.h\)".*#\1# | |
5757 | s#^/[^/]#//&# | |
5758 | p | |
5759 | q | |
5760 | }'`'"' | |
5761 | else | |
5762 | gl_cv_next_string_h='<'string.h'>' | |
5763 | fi | |
5764 | ||
5765 | fi | |
5766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 | |
5767 | $as_echo "$gl_cv_next_string_h" >&6; } | |
5768 | fi | |
5769 | NEXT_STRING_H=$gl_cv_next_string_h | |
5770 | ||
5771 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
5772 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5773 | gl_next_as_first_directive='<'string.h'>' | |
5774 | else | |
5775 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5776 | gl_next_as_first_directive=$gl_cv_next_string_h | |
5777 | fi | |
5778 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive | |
5779 | ||
5780 | ||
5781 | ||
5782 | ||
5783 | ||
5784 | for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do | |
5785 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
5786 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
5787 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
5788 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5789 | $as_echo_n "(cached) " >&6 | |
5790 | else | |
5791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5792 | /* end confdefs.h. */ | |
5793 | #include <string.h> | |
5794 | ||
5795 | int | |
5796 | main () | |
5797 | { | |
5798 | #undef $gl_func | |
5799 | (void) $gl_func; | |
5800 | ; | |
5801 | return 0; | |
5802 | } | |
5803 | _ACEOF | |
5804 | if ac_fn_c_try_compile "$LINENO"; then : | |
5805 | eval "$as_gl_Symbol=yes" | |
5806 | else | |
5807 | eval "$as_gl_Symbol=no" | |
5808 | fi | |
5809 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5810 | fi | |
5811 | eval ac_res=\$$as_gl_Symbol | |
5812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5813 | $as_echo "$ac_res" >&6; } | |
5814 | eval as_val=\$$as_gl_Symbol | |
5815 | if test "x$as_val" = x""yes; then : | |
5816 | cat >>confdefs.h <<_ACEOF | |
5817 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
5818 | _ACEOF | |
5819 | ||
5820 | eval ac_cv_have_decl_$gl_func=yes | |
5821 | fi | |
5822 | done | |
5823 | ||
5824 | ||
5825 | ||
5826 | GNULIB_BTOWC=0; | |
5827 | GNULIB_WCTOB=0; | |
5828 | GNULIB_MBSINIT=0; | |
5829 | GNULIB_MBRTOWC=0; | |
5830 | GNULIB_MBRLEN=0; | |
5831 | GNULIB_MBSRTOWCS=0; | |
5832 | GNULIB_MBSNRTOWCS=0; | |
5833 | GNULIB_WCRTOMB=0; | |
5834 | GNULIB_WCSRTOMBS=0; | |
5835 | GNULIB_WCSNRTOMBS=0; | |
5836 | GNULIB_WCWIDTH=0; | |
5837 | HAVE_BTOWC=1; | |
5838 | HAVE_MBSINIT=1; | |
5839 | HAVE_MBRTOWC=1; | |
5840 | HAVE_MBRLEN=1; | |
5841 | HAVE_MBSRTOWCS=1; | |
5842 | HAVE_MBSNRTOWCS=1; | |
5843 | HAVE_WCRTOMB=1; | |
5844 | HAVE_WCSRTOMBS=1; | |
5845 | HAVE_WCSNRTOMBS=1; | |
5846 | HAVE_DECL_WCTOB=1; | |
5847 | HAVE_DECL_WCWIDTH=1; | |
5848 | REPLACE_MBSTATE_T=0; | |
5849 | REPLACE_BTOWC=0; | |
5850 | REPLACE_WCTOB=0; | |
5851 | REPLACE_MBSINIT=0; | |
5852 | REPLACE_MBRTOWC=0; | |
5853 | REPLACE_MBRLEN=0; | |
5854 | REPLACE_MBSRTOWCS=0; | |
5855 | REPLACE_MBSNRTOWCS=0; | |
5856 | REPLACE_WCRTOMB=0; | |
5857 | REPLACE_WCSRTOMBS=0; | |
5858 | REPLACE_WCSNRTOMBS=0; | |
5859 | REPLACE_WCWIDTH=0; | |
5860 | ||
5861 | ||
5862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 | |
5863 | $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } | |
5864 | if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : | |
81ecdfbb | 5865 | $as_echo_n "(cached) " >&6 |
783e057b | 5866 | else |
f434ba03 PA |
5867 | gl_cv_header_wchar_h_correct_inline=yes |
5868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5869 | /* end confdefs.h. */ | |
783e057b | 5870 | |
f434ba03 PA |
5871 | #define wcstod renamed_wcstod |
5872 | #include <wchar.h> | |
5873 | extern int zero (void); | |
5874 | int main () { return zero(); } | |
5875 | ||
5876 | _ACEOF | |
5877 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
5878 | (eval $ac_compile) 2>&5 | |
5879 | ac_status=$? | |
5880 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5881 | test $ac_status = 0; }; then | |
5882 | mv conftest.$ac_objext conftest1.$ac_objext | |
5883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b | 5884 | /* end confdefs.h. */ |
f434ba03 PA |
5885 | |
5886 | #define wcstod renamed_wcstod | |
5887 | #include <wchar.h> | |
5888 | int zero (void) { return 0; } | |
783e057b DJ |
5889 | |
5890 | _ACEOF | |
f434ba03 PA |
5891 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
5892 | (eval $ac_compile) 2>&5 | |
5893 | ac_status=$? | |
5894 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5895 | test $ac_status = 0; }; then | |
5896 | mv conftest.$ac_objext conftest2.$ac_objext | |
5897 | if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then | |
5898 | : | |
5899 | else | |
5900 | gl_cv_header_wchar_h_correct_inline=no | |
5901 | fi | |
5902 | fi | |
5903 | fi | |
5904 | rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext | |
783e057b DJ |
5905 | |
5906 | fi | |
f434ba03 PA |
5907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 |
5908 | $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } | |
5909 | if test $gl_cv_header_wchar_h_correct_inline = no; then | |
5910 | as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). | |
5911 | This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in | |
5912 | C99 mode. You have four options: | |
5913 | - Add the flag -fgnu89-inline to CC and reconfigure, or | |
5914 | - Fix your include files, using parts of | |
5915 | <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or | |
5916 | - Use a gcc version older than 4.3, or | |
5917 | - Don't use the flags -std=c99 or -std=gnu99. | |
5918 | Configuration aborted." "$LINENO" 5 | |
5919 | fi | |
783e057b DJ |
5920 | |
5921 | ||
f434ba03 PA |
5922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 |
5923 | $as_echo_n "checking for wint_t... " >&6; } | |
5924 | if test "${gt_cv_c_wint_t+set}" = set; then : | |
5925 | $as_echo_n "(cached) " >&6 | |
5926 | else | |
5927 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5928 | /* end confdefs.h. */ | |
783e057b | 5929 | |
f434ba03 PA |
5930 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
5931 | <wchar.h>. | |
5932 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | |
5933 | before <wchar.h>. */ | |
5934 | #include <stddef.h> | |
5935 | #include <stdio.h> | |
5936 | #include <time.h> | |
5937 | #include <wchar.h> | |
5938 | wint_t foo = (wchar_t)'\0'; | |
5939 | int | |
5940 | main () | |
5941 | { | |
783e057b | 5942 | |
f434ba03 PA |
5943 | ; |
5944 | return 0; | |
5945 | } | |
5946 | _ACEOF | |
5947 | if ac_fn_c_try_compile "$LINENO"; then : | |
5948 | gt_cv_c_wint_t=yes | |
5949 | else | |
5950 | gt_cv_c_wint_t=no | |
5951 | fi | |
5952 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5953 | fi | |
5954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 | |
5955 | $as_echo "$gt_cv_c_wint_t" >&6; } | |
5956 | if test $gt_cv_c_wint_t = yes; then | |
783e057b | 5957 | |
f434ba03 | 5958 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h |
783e057b | 5959 | |
f434ba03 | 5960 | fi |
783e057b DJ |
5961 | |
5962 | ||
81ecdfbb | 5963 | if false; then |
783e057b DJ |
5964 | GL_COND_LIBTOOL_TRUE= |
5965 | GL_COND_LIBTOOL_FALSE='#' | |
5966 | else | |
5967 | GL_COND_LIBTOOL_TRUE='#' | |
5968 | GL_COND_LIBTOOL_FALSE= | |
5969 | fi | |
5970 | ||
5971 | gl_cond_libtool=false | |
5972 | gl_libdeps= | |
5973 | gl_ltlibdeps= | |
f434ba03 | 5974 | gl_m4_base='gnulib/m4' |
783e057b DJ |
5975 | |
5976 | ||
5977 | ||
783e057b DJ |
5978 | |
5979 | ||
5980 | ||
5981 | ||
5982 | ||
5983 | ||
f434ba03 PA |
5984 | gl_source_base='gnulib' |
5985 | # Code from module arg-nonnull: | |
5986 | # Code from module c++defs: | |
5987 | # Code from module extensions: | |
5988 | # Code from module include_next: | |
5989 | # Code from module memchr: | |
783e057b | 5990 | |
783e057b | 5991 | |
783e057b | 5992 | |
783e057b | 5993 | |
f434ba03 | 5994 | GNULIB_MEMCHR=1 |
783e057b | 5995 | |
783e057b | 5996 | |
783e057b | 5997 | |
f434ba03 | 5998 | $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h |
783e057b | 5999 | |
783e057b DJ |
6000 | |
6001 | ||
f434ba03 | 6002 | # Code from module memmem: |
783e057b DJ |
6003 | |
6004 | ||
f434ba03 PA |
6005 | if test $ac_cv_have_decl_memmem = yes; then |
6006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 | |
6007 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
6008 | if test "${gl_cv_func_memmem_works+set}" = set; then : | |
81ecdfbb | 6009 | $as_echo_n "(cached) " >&6 |
783e057b | 6010 | else |
81ecdfbb | 6011 | if test "$cross_compiling" = yes; then : |
f434ba03 | 6012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 6013 | /* end confdefs.h. */ |
783e057b | 6014 | |
f434ba03 PA |
6015 | #include <features.h> |
6016 | #ifdef __GNU_LIBRARY__ | |
6017 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) | |
6018 | Lucky user | |
6019 | #endif | |
6020 | #endif | |
6021 | #ifdef __CYGWIN__ | |
6022 | #include <cygwin/version.h> | |
6023 | #if CYGWIN_VERSION_DLL_MAJOR >= 1007 | |
6024 | Lucky user | |
6025 | #endif | |
6026 | #endif | |
783e057b | 6027 | |
783e057b | 6028 | _ACEOF |
f434ba03 PA |
6029 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6030 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
6031 | gl_cv_func_memmem_works=yes | |
783e057b | 6032 | else |
f434ba03 | 6033 | gl_cv_func_memmem_works="guessing no" |
783e057b | 6034 | fi |
f434ba03 | 6035 | rm -f conftest* |
783e057b DJ |
6036 | |
6037 | ||
783e057b | 6038 | else |
81ecdfbb | 6039 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6040 | /* end confdefs.h. */ |
6041 | ||
f434ba03 | 6042 | #include <signal.h> /* for signal */ |
783e057b DJ |
6043 | #include <string.h> /* for memmem */ |
6044 | #include <stdlib.h> /* for malloc */ | |
6045 | #include <unistd.h> /* for alarm */ | |
6046 | ||
6047 | int | |
6048 | main () | |
6049 | { | |
6050 | size_t m = 1000000; | |
6051 | char *haystack = (char *) malloc (2 * m + 1); | |
6052 | char *needle = (char *) malloc (m + 1); | |
6053 | void *result = 0; | |
6054 | /* Failure to compile this test due to missing alarm is okay, | |
6055 | since all such platforms (mingw) also lack memmem. */ | |
f434ba03 | 6056 | signal (SIGALRM, SIG_DFL); |
783e057b DJ |
6057 | alarm (5); |
6058 | /* Check for quadratic performance. */ | |
6059 | if (haystack && needle) | |
6060 | { | |
f434ba03 PA |
6061 | memset (haystack, 'A', 2 * m); |
6062 | haystack[2 * m] = 'B'; | |
6063 | memset (needle, 'A', m); | |
6064 | needle[m] = 'B'; | |
6065 | result = memmem (haystack, 2 * m + 1, needle, m + 1); | |
783e057b DJ |
6066 | } |
6067 | /* Check for empty needle behavior. */ | |
6068 | return !result || !memmem ("a", 1, 0, 0); | |
6069 | ; | |
6070 | return 0; | |
6071 | } | |
6072 | _ACEOF | |
81ecdfbb | 6073 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
6074 | gl_cv_func_memmem_works=yes |
6075 | else | |
81ecdfbb | 6076 | gl_cv_func_memmem_works=no |
783e057b | 6077 | fi |
81ecdfbb RW |
6078 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6079 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 6080 | fi |
81ecdfbb | 6081 | |
f434ba03 | 6082 | |
783e057b | 6083 | fi |
81ecdfbb RW |
6084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5 |
6085 | $as_echo "$gl_cv_func_memmem_works" >&6; } | |
783e057b DJ |
6086 | if test "$gl_cv_func_memmem_works" != yes; then |
6087 | REPLACE_MEMMEM=1 | |
6088 | ||
6089 | ||
6090 | ||
6091 | ||
6092 | ||
6093 | ||
6094 | ||
f434ba03 | 6095 | |
783e057b DJ |
6096 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" |
6097 | ||
6098 | fi | |
6099 | fi | |
6100 | ||
f434ba03 PA |
6101 | # Code from module memmem-simple: |
6102 | ||
783e057b DJ |
6103 | |
6104 | ||
6105 | ||
6106 | ||
6107 | ||
6108 | ||
6109 | ||
6110 | ||
6111 | ||
6112 | ||
6113 | ||
81ecdfbb RW |
6114 | for ac_func in memmem |
6115 | do : | |
6116 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
6117 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 6118 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6119 | #define HAVE_MEMMEM 1 |
783e057b DJ |
6120 | _ACEOF |
6121 | ||
6122 | else | |
6123 | ||
6124 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
6125 | ||
6126 | fi | |
6127 | done | |
6128 | ||
6129 | ||
6130 | ||
6131 | : | |
6132 | ||
6133 | ||
6134 | ||
6135 | ||
6136 | ||
6137 | if test $ac_cv_have_decl_memmem = no; then | |
6138 | HAVE_DECL_MEMMEM=0 | |
6139 | fi | |
6140 | : | |
6141 | ||
6142 | ||
6143 | ||
f434ba03 | 6144 | |
783e057b DJ |
6145 | GNULIB_MEMMEM=1 |
6146 | ||
6147 | ||
6148 | ||
f434ba03 PA |
6149 | $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h |
6150 | ||
6151 | ||
6152 | ||
6153 | # Code from module multiarch: | |
6154 | ||
6155 | # Code from module stddef: | |
6156 | ||
6157 | ||
6158 | ||
6159 | if test $gt_cv_c_wchar_t = no; then | |
6160 | HAVE_WCHAR_T=0 | |
6161 | STDDEF_H=stddef.h | |
6162 | fi | |
6163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
6164 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
6165 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
6166 | $as_echo_n "(cached) " >&6 | |
6167 | else | |
6168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6169 | /* end confdefs.h. */ | |
6170 | #include <stddef.h> | |
6171 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
6172 | ||
6173 | int | |
6174 | main () | |
6175 | { | |
6176 | ||
6177 | ; | |
6178 | return 0; | |
6179 | } | |
6180 | _ACEOF | |
6181 | if ac_fn_c_try_compile "$LINENO"; then : | |
6182 | gl_cv_decl_null_works=yes | |
6183 | else | |
6184 | gl_cv_decl_null_works=no | |
6185 | fi | |
6186 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6187 | fi | |
6188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
6189 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
6190 | if test $gl_cv_decl_null_works = no; then | |
6191 | REPLACE_NULL=1 | |
6192 | STDDEF_H=stddef.h | |
6193 | fi | |
6194 | if test -n "$STDDEF_H"; then | |
6195 | ||
6196 | ||
6197 | ||
6198 | ||
6199 | : | |
6200 | ||
6201 | ||
6202 | ||
6203 | ||
6204 | ||
6205 | ||
6206 | ||
6207 | if test $gl_cv_have_include_next = yes; then | |
6208 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6209 | else | |
6210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
6211 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
6212 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
6213 | $as_echo_n "(cached) " >&6 | |
6214 | else | |
6215 | ||
6216 | if test $ac_cv_header_stddef_h = yes; then | |
6217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6218 | /* end confdefs.h. */ | |
6219 | #include <stddef.h> | |
6220 | ||
6221 | _ACEOF | |
6222 | case "$host_os" in | |
6223 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6224 | *) gl_absname_cpp="$ac_cpp" ;; | |
6225 | esac | |
6226 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6227 | sed -n '\#/stddef.h#{ | |
6228 | s#.*"\(.*/stddef.h\)".*#\1# | |
6229 | s#^/[^/]#//&# | |
6230 | p | |
6231 | q | |
6232 | }'`'"' | |
6233 | else | |
6234 | gl_cv_next_stddef_h='<'stddef.h'>' | |
6235 | fi | |
6236 | ||
6237 | fi | |
6238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
6239 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
6240 | fi | |
6241 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
6242 | ||
6243 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
6244 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6245 | gl_next_as_first_directive='<'stddef.h'>' | |
6246 | else | |
6247 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6248 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
6249 | fi | |
6250 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
6251 | ||
6252 | ||
6253 | ||
6254 | fi | |
6255 | ||
6256 | # Code from module stdint: | |
6257 | ||
6258 | ||
783e057b DJ |
6259 | |
6260 | if test $ac_cv_type_long_long_int = yes; then | |
6261 | HAVE_LONG_LONG_INT=1 | |
6262 | else | |
6263 | HAVE_LONG_LONG_INT=0 | |
6264 | fi | |
6265 | ||
6266 | ||
6267 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
6268 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
6269 | else | |
6270 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
6271 | fi | |
6272 | ||
6273 | ||
6274 | if test $ac_cv_header_inttypes_h = yes; then | |
6275 | HAVE_INTTYPES_H=1 | |
6276 | else | |
6277 | HAVE_INTTYPES_H=0 | |
6278 | fi | |
6279 | ||
6280 | ||
6281 | if test $ac_cv_header_sys_types_h = yes; then | |
6282 | HAVE_SYS_TYPES_H=1 | |
6283 | else | |
6284 | HAVE_SYS_TYPES_H=0 | |
6285 | fi | |
6286 | ||
6287 | ||
6288 | ||
6289 | ||
6290 | ||
f434ba03 | 6291 | |
783e057b DJ |
6292 | : |
6293 | ||
6294 | ||
6295 | ||
6296 | ||
6297 | ||
6298 | ||
6299 | ||
6300 | if test $gl_cv_have_include_next = yes; then | |
6301 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6302 | else | |
81ecdfbb RW |
6303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 |
6304 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
6305 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
6306 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6307 | else |
6308 | ||
f434ba03 PA |
6309 | if test $ac_cv_header_stdint_h = yes; then |
6310 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
6311 | /* end confdefs.h. */ |
6312 | #include <stdint.h> | |
6313 | ||
6314 | _ACEOF | |
f434ba03 PA |
6315 | case "$host_os" in |
6316 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6317 | *) gl_absname_cpp="$ac_cpp" ;; | |
6318 | esac | |
6319 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6320 | sed -n '\#/stdint.h#{ | |
6321 | s#.*"\(.*/stdint.h\)".*#\1# | |
6322 | s#^/[^/]#//&# | |
6323 | p | |
6324 | q | |
6325 | }'`'"' | |
6326 | else | |
6327 | gl_cv_next_stdint_h='<'stdint.h'>' | |
6328 | fi | |
783e057b DJ |
6329 | |
6330 | fi | |
81ecdfbb RW |
6331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
6332 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
783e057b DJ |
6333 | fi |
6334 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
6335 | ||
f434ba03 PA |
6336 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
6337 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6338 | gl_next_as_first_directive='<'stdint.h'>' | |
6339 | else | |
6340 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6341 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
6342 | fi | |
6343 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
6344 | ||
783e057b DJ |
6345 | |
6346 | ||
6347 | if test $ac_cv_header_stdint_h = yes; then | |
6348 | HAVE_STDINT_H=1 | |
6349 | else | |
6350 | HAVE_STDINT_H=0 | |
6351 | fi | |
6352 | ||
6353 | ||
6354 | if test $ac_cv_header_stdint_h = yes; then | |
81ecdfbb RW |
6355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 |
6356 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
6357 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
6358 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6359 | else |
6360 | gl_cv_header_working_stdint_h=no | |
81ecdfbb | 6361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6362 | /* end confdefs.h. */ |
6363 | ||
81ecdfbb | 6364 | |
783e057b DJ |
6365 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
6366 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6367 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6368 | #include <stdint.h> | |
6369 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
6370 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
6371 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
6372 | #endif | |
6373 | ||
6374 | ||
6375 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6376 | included before <wchar.h>. */ | |
6377 | #include <stddef.h> | |
6378 | #include <signal.h> | |
6379 | #if HAVE_WCHAR_H | |
6380 | # include <stdio.h> | |
6381 | # include <time.h> | |
6382 | # include <wchar.h> | |
6383 | #endif | |
6384 | ||
6385 | ||
6386 | #ifdef INT8_MAX | |
6387 | int8_t a1 = INT8_MAX; | |
6388 | int8_t a1min = INT8_MIN; | |
6389 | #endif | |
6390 | #ifdef INT16_MAX | |
6391 | int16_t a2 = INT16_MAX; | |
6392 | int16_t a2min = INT16_MIN; | |
6393 | #endif | |
6394 | #ifdef INT32_MAX | |
6395 | int32_t a3 = INT32_MAX; | |
6396 | int32_t a3min = INT32_MIN; | |
6397 | #endif | |
6398 | #ifdef INT64_MAX | |
6399 | int64_t a4 = INT64_MAX; | |
6400 | int64_t a4min = INT64_MIN; | |
6401 | #endif | |
6402 | #ifdef UINT8_MAX | |
6403 | uint8_t b1 = UINT8_MAX; | |
6404 | #else | |
6405 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
6406 | #endif | |
6407 | #ifdef UINT16_MAX | |
6408 | uint16_t b2 = UINT16_MAX; | |
6409 | #endif | |
6410 | #ifdef UINT32_MAX | |
6411 | uint32_t b3 = UINT32_MAX; | |
6412 | #endif | |
6413 | #ifdef UINT64_MAX | |
6414 | uint64_t b4 = UINT64_MAX; | |
6415 | #endif | |
6416 | int_least8_t c1 = INT8_C (0x7f); | |
6417 | int_least8_t c1max = INT_LEAST8_MAX; | |
6418 | int_least8_t c1min = INT_LEAST8_MIN; | |
6419 | int_least16_t c2 = INT16_C (0x7fff); | |
6420 | int_least16_t c2max = INT_LEAST16_MAX; | |
6421 | int_least16_t c2min = INT_LEAST16_MIN; | |
6422 | int_least32_t c3 = INT32_C (0x7fffffff); | |
6423 | int_least32_t c3max = INT_LEAST32_MAX; | |
6424 | int_least32_t c3min = INT_LEAST32_MIN; | |
6425 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
6426 | int_least64_t c4max = INT_LEAST64_MAX; | |
6427 | int_least64_t c4min = INT_LEAST64_MIN; | |
6428 | uint_least8_t d1 = UINT8_C (0xff); | |
6429 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
6430 | uint_least16_t d2 = UINT16_C (0xffff); | |
6431 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
6432 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
6433 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
6434 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
6435 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
6436 | int_fast8_t e1 = INT_FAST8_MAX; | |
6437 | int_fast8_t e1min = INT_FAST8_MIN; | |
6438 | int_fast16_t e2 = INT_FAST16_MAX; | |
6439 | int_fast16_t e2min = INT_FAST16_MIN; | |
6440 | int_fast32_t e3 = INT_FAST32_MAX; | |
6441 | int_fast32_t e3min = INT_FAST32_MIN; | |
6442 | int_fast64_t e4 = INT_FAST64_MAX; | |
6443 | int_fast64_t e4min = INT_FAST64_MIN; | |
6444 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
6445 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
6446 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
6447 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
6448 | #ifdef INTPTR_MAX | |
6449 | intptr_t g = INTPTR_MAX; | |
6450 | intptr_t gmin = INTPTR_MIN; | |
6451 | #endif | |
6452 | #ifdef UINTPTR_MAX | |
6453 | uintptr_t h = UINTPTR_MAX; | |
6454 | #endif | |
6455 | intmax_t i = INTMAX_MAX; | |
6456 | uintmax_t j = UINTMAX_MAX; | |
6457 | ||
6458 | #include <limits.h> /* for CHAR_BIT */ | |
6459 | #define TYPE_MINIMUM(t) \ | |
6460 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
6461 | #define TYPE_MAXIMUM(t) \ | |
6462 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
6463 | struct s { | |
6464 | int check_PTRDIFF: | |
6465 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
6466 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
6467 | ? 1 : -1; | |
6468 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
6469 | int check_SIG_ATOMIC: | |
6470 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
6471 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
6472 | ? 1 : -1; | |
6473 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
6474 | int check_WCHAR: | |
6475 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
6476 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
6477 | ? 1 : -1; | |
6478 | /* Detect bug in mingw. */ | |
6479 | int check_WINT: | |
6480 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
6481 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
6482 | ? 1 : -1; | |
6483 | ||
f434ba03 PA |
6484 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
6485 | int check_UINT8_C: | |
6486 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
6487 | int check_UINT16_C: | |
6488 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
6489 | ||
6490 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
6491 | #ifdef UINT8_MAX | |
6492 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
6493 | #endif | |
6494 | #ifdef UINT16_MAX | |
6495 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
6496 | #endif | |
6497 | #ifdef UINT32_MAX | |
6498 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
6499 | #endif | |
6500 | #ifdef UINT64_MAX | |
6501 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
6502 | #endif | |
6503 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
6504 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
6505 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
6506 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
6507 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
6508 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
6509 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
6510 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
6511 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
6512 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
6513 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
6514 | }; | |
6515 | ||
6516 | int | |
6517 | main () | |
6518 | { | |
6519 | ||
6520 | ; | |
6521 | return 0; | |
6522 | } | |
6523 | _ACEOF | |
6524 | if ac_fn_c_try_compile "$LINENO"; then : | |
6525 | if test "$cross_compiling" = yes; then : | |
6526 | gl_cv_header_working_stdint_h=yes | |
6527 | ||
6528 | else | |
6529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6530 | /* end confdefs.h. */ | |
6531 | ||
6532 | ||
6533 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
6534 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6535 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
6536 | #include <stdint.h> | |
6537 | ||
783e057b | 6538 | |
f434ba03 PA |
6539 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
6540 | included before <wchar.h>. */ | |
6541 | #include <stddef.h> | |
6542 | #include <signal.h> | |
6543 | #if HAVE_WCHAR_H | |
6544 | # include <stdio.h> | |
6545 | # include <time.h> | |
6546 | # include <wchar.h> | |
6547 | #endif | |
6548 | ||
6549 | ||
6550 | #include <stdio.h> | |
6551 | #include <string.h> | |
6552 | #define MVAL(macro) MVAL1(macro) | |
6553 | #define MVAL1(expression) #expression | |
6554 | static const char *macro_values[] = | |
6555 | { | |
6556 | #ifdef INT8_MAX | |
6557 | MVAL (INT8_MAX), | |
6558 | #endif | |
6559 | #ifdef INT16_MAX | |
6560 | MVAL (INT16_MAX), | |
6561 | #endif | |
6562 | #ifdef INT32_MAX | |
6563 | MVAL (INT32_MAX), | |
6564 | #endif | |
6565 | #ifdef INT64_MAX | |
6566 | MVAL (INT64_MAX), | |
6567 | #endif | |
783e057b | 6568 | #ifdef UINT8_MAX |
f434ba03 | 6569 | MVAL (UINT8_MAX), |
783e057b DJ |
6570 | #endif |
6571 | #ifdef UINT16_MAX | |
f434ba03 | 6572 | MVAL (UINT16_MAX), |
783e057b DJ |
6573 | #endif |
6574 | #ifdef UINT32_MAX | |
f434ba03 | 6575 | MVAL (UINT32_MAX), |
783e057b DJ |
6576 | #endif |
6577 | #ifdef UINT64_MAX | |
f434ba03 | 6578 | MVAL (UINT64_MAX), |
783e057b | 6579 | #endif |
f434ba03 PA |
6580 | NULL |
6581 | }; | |
783e057b DJ |
6582 | |
6583 | int | |
6584 | main () | |
6585 | { | |
6586 | ||
f434ba03 PA |
6587 | const char **mv; |
6588 | for (mv = macro_values; *mv != NULL; mv++) | |
6589 | { | |
6590 | const char *value = *mv; | |
6591 | /* Test whether it looks like a cast expression. */ | |
6592 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
6593 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
6594 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
6595 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
6596 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
6597 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
6598 | return 1; | |
6599 | } | |
6600 | return 0; | |
6601 | ||
783e057b DJ |
6602 | ; |
6603 | return 0; | |
6604 | } | |
6605 | _ACEOF | |
f434ba03 | 6606 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 6607 | gl_cv_header_working_stdint_h=yes |
f434ba03 PA |
6608 | fi |
6609 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6610 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6611 | fi | |
6612 | ||
6613 | ||
783e057b | 6614 | fi |
81ecdfbb | 6615 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 | 6616 | |
783e057b | 6617 | fi |
81ecdfbb RW |
6618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 |
6619 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
783e057b DJ |
6620 | fi |
6621 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
6622 | STDINT_H= | |
6623 | else | |
81ecdfbb RW |
6624 | for ac_header in sys/inttypes.h sys/bitypes.h |
6625 | do : | |
6626 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6627 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
6628 | eval as_val=\$$as_ac_Header | |
6629 | if test "x$as_val" = x""yes; then : | |
783e057b | 6630 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6631 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
6632 | _ACEOF |
6633 | ||
6634 | fi | |
6635 | ||
6636 | done | |
6637 | ||
6638 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
6639 | HAVE_SYS_INTTYPES_H=1 | |
6640 | else | |
6641 | HAVE_SYS_INTTYPES_H=0 | |
6642 | fi | |
6643 | ||
6644 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
6645 | HAVE_SYS_BITYPES_H=1 | |
6646 | else | |
6647 | HAVE_SYS_BITYPES_H=0 | |
6648 | fi | |
6649 | ||
6650 | ||
6651 | ||
6652 | : | |
6653 | ||
6654 | ||
6655 | ||
6656 | ||
6657 | ||
6658 | ||
6659 | ||
6660 | ||
f434ba03 PA |
6661 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
6662 | ||
6663 | ||
6664 | for gltype in ptrdiff_t size_t ; do | |
6665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
6666 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6667 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6668 | $as_echo_n "(cached) " >&6 | |
6669 | else | |
6670 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6671 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6672 | included before <wchar.h>. */ | |
6673 | #include <stddef.h> | |
6674 | #include <signal.h> | |
6675 | #if HAVE_WCHAR_H | |
6676 | # include <stdio.h> | |
6677 | # include <time.h> | |
6678 | # include <wchar.h> | |
6679 | #endif | |
6680 | ||
6681 | #include <limits.h>"; then : | |
6682 | ||
6683 | else | |
6684 | result=unknown | |
6685 | fi | |
6686 | ||
6687 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6688 | ||
6689 | fi | |
6690 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6692 | $as_echo "$ac_res" >&6; } | |
6693 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6694 | if test $result = unknown; then | |
6695 | result=0 | |
6696 | fi | |
6697 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6698 | cat >>confdefs.h <<_ACEOF | |
6699 | #define BITSIZEOF_${GLTYPE} $result | |
6700 | _ACEOF | |
6701 | ||
6702 | eval BITSIZEOF_${GLTYPE}=\$result | |
6703 | done | |
6704 | ||
6705 | ||
6706 | fi | |
6707 | ||
783e057b | 6708 | |
f434ba03 | 6709 | for gltype in sig_atomic_t wchar_t wint_t ; do |
81ecdfbb RW |
6710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 |
6711 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
6712 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6713 | $as_echo_n "(cached) " >&6 | |
6714 | else | |
6715 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
6716 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6717 | included before <wchar.h>. */ | |
6718 | #include <stddef.h> | |
6719 | #include <signal.h> | |
6720 | #if HAVE_WCHAR_H | |
6721 | # include <stdio.h> | |
6722 | # include <time.h> | |
6723 | # include <wchar.h> | |
6724 | #endif | |
6725 | ||
6726 | #include <limits.h>"; then : | |
6727 | ||
6728 | else | |
6729 | result=unknown | |
6730 | fi | |
6731 | ||
6732 | eval gl_cv_bitsizeof_${gltype}=\$result | |
6733 | ||
6734 | fi | |
6735 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
6736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6737 | $as_echo "$ac_res" >&6; } | |
6738 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6739 | if test $result = unknown; then | |
6740 | result=0 | |
6741 | fi | |
6742 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6743 | cat >>confdefs.h <<_ACEOF | |
6744 | #define BITSIZEOF_${GLTYPE} $result | |
6745 | _ACEOF | |
783e057b | 6746 | |
81ecdfbb RW |
6747 | eval BITSIZEOF_${GLTYPE}=\$result |
6748 | done | |
783e057b DJ |
6749 | |
6750 | ||
6751 | ||
6752 | ||
81ecdfbb RW |
6753 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
6755 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
6756 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6757 | $as_echo_n "(cached) " >&6 | |
783e057b | 6758 | else |
81ecdfbb | 6759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6760 | /* end confdefs.h. */ |
6761 | ||
6762 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6763 | included before <wchar.h>. */ | |
6764 | #include <stddef.h> | |
6765 | #include <signal.h> | |
6766 | #if HAVE_WCHAR_H | |
6767 | # include <stdio.h> | |
6768 | # include <time.h> | |
6769 | # include <wchar.h> | |
6770 | #endif | |
6771 | ||
6772 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
6773 | int | |
6774 | main () | |
6775 | { | |
6776 | ||
6777 | ; | |
6778 | return 0; | |
6779 | } | |
6780 | _ACEOF | |
81ecdfbb | 6781 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
6782 | result=yes |
6783 | else | |
81ecdfbb | 6784 | result=no |
20e95c23 | 6785 | fi |
81ecdfbb | 6786 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6787 | eval gl_cv_type_${gltype}_signed=\$result |
6788 | ||
6789 | fi | |
81ecdfbb RW |
6790 | eval ac_res=\$gl_cv_type_${gltype}_signed |
6791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6792 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6793 | eval result=\$gl_cv_type_${gltype}_signed |
6794 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6795 | if test "$result" = yes; then | |
6796 | cat >>confdefs.h <<_ACEOF | |
6797 | #define HAVE_SIGNED_${GLTYPE} 1 | |
6798 | _ACEOF | |
6799 | ||
6800 | eval HAVE_SIGNED_${GLTYPE}=1 | |
6801 | else | |
6802 | eval HAVE_SIGNED_${GLTYPE}=0 | |
6803 | fi | |
6804 | done | |
6805 | ||
6806 | ||
6807 | gl_cv_type_ptrdiff_t_signed=yes | |
6808 | gl_cv_type_size_t_signed=no | |
f434ba03 | 6809 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
783e057b DJ |
6810 | |
6811 | ||
f434ba03 | 6812 | for gltype in ptrdiff_t size_t ; do |
81ecdfbb RW |
6813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 |
6814 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6815 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6816 | $as_echo_n "(cached) " >&6 | |
c906108c | 6817 | else |
783e057b DJ |
6818 | eval gl_cv_type_${gltype}_suffix=no |
6819 | eval result=\$gl_cv_type_${gltype}_signed | |
6820 | if test "$result" = yes; then | |
6821 | glsufu= | |
6822 | else | |
6823 | glsufu=u | |
6824 | fi | |
6825 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6826 | case $glsuf in | |
6827 | '') gltype1='int';; | |
f434ba03 PA |
6828 | l) gltype1='long int';; |
6829 | ll) gltype1='long long int';; | |
6830 | i64) gltype1='__int64';; | |
6831 | u) gltype1='unsigned int';; | |
6832 | ul) gltype1='unsigned long int';; | |
6833 | ull) gltype1='unsigned long long int';; | |
783e057b DJ |
6834 | ui64)gltype1='unsigned __int64';; |
6835 | esac | |
81ecdfbb | 6836 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
6837 | /* end confdefs.h. */ |
6838 | ||
6839 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6840 | included before <wchar.h>. */ | |
6841 | #include <stddef.h> | |
6842 | #include <signal.h> | |
6843 | #if HAVE_WCHAR_H | |
6844 | # include <stdio.h> | |
6845 | # include <time.h> | |
6846 | # include <wchar.h> | |
6847 | #endif | |
6848 | ||
6849 | extern $gltype foo; | |
6850 | extern $gltype1 foo; | |
6851 | int | |
6852 | main () | |
6853 | { | |
6854 | ||
6855 | ; | |
6856 | return 0; | |
6857 | } | |
6858 | _ACEOF | |
81ecdfbb | 6859 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 6860 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6861 | fi |
81ecdfbb | 6862 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
6863 | eval result=\$gl_cv_type_${gltype}_suffix |
6864 | test "$result" != no && break | |
6865 | done | |
6866 | fi | |
81ecdfbb RW |
6867 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6869 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
6870 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
6871 | eval result=\$gl_cv_type_${gltype}_suffix | |
6872 | test "$result" = no && result= | |
6873 | eval ${GLTYPE}_SUFFIX=\$result | |
6874 | cat >>confdefs.h <<_ACEOF | |
6875 | #define ${GLTYPE}_SUFFIX $result | |
6876 | _ACEOF | |
6877 | ||
6878 | done | |
6879 | ||
6880 | ||
783e057b DJ |
6881 | fi |
6882 | ||
6883 | ||
f434ba03 PA |
6884 | for gltype in sig_atomic_t wchar_t wint_t ; do |
6885 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
6886 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
6887 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
81ecdfbb | 6888 | $as_echo_n "(cached) " >&6 |
783e057b | 6889 | else |
f434ba03 PA |
6890 | eval gl_cv_type_${gltype}_suffix=no |
6891 | eval result=\$gl_cv_type_${gltype}_signed | |
6892 | if test "$result" = yes; then | |
6893 | glsufu= | |
6894 | else | |
6895 | glsufu=u | |
6896 | fi | |
6897 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6898 | case $glsuf in | |
6899 | '') gltype1='int';; | |
6900 | l) gltype1='long int';; | |
6901 | ll) gltype1='long long int';; | |
6902 | i64) gltype1='__int64';; | |
6903 | u) gltype1='unsigned int';; | |
6904 | ul) gltype1='unsigned long int';; | |
6905 | ull) gltype1='unsigned long long int';; | |
6906 | ui64)gltype1='unsigned __int64';; | |
6907 | esac | |
6908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
81ecdfbb | 6909 | /* end confdefs.h. */ |
f434ba03 PA |
6910 | |
6911 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6912 | included before <wchar.h>. */ | |
6913 | #include <stddef.h> | |
6914 | #include <signal.h> | |
6915 | #if HAVE_WCHAR_H | |
6916 | # include <stdio.h> | |
6917 | # include <time.h> | |
6918 | # include <wchar.h> | |
6919 | #endif | |
6920 | ||
6921 | extern $gltype foo; | |
6922 | extern $gltype1 foo; | |
6923 | int | |
6924 | main () | |
6925 | { | |
6926 | ||
6927 | ; | |
6928 | return 0; | |
6929 | } | |
783e057b | 6930 | _ACEOF |
81ecdfbb | 6931 | if ac_fn_c_try_compile "$LINENO"; then : |
f434ba03 | 6932 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 6933 | fi |
81ecdfbb | 6934 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 PA |
6935 | eval result=\$gl_cv_type_${gltype}_suffix |
6936 | test "$result" != no && break | |
6937 | done | |
783e057b | 6938 | fi |
f434ba03 PA |
6939 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
6940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6941 | $as_echo "$ac_res" >&6; } | |
6942 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6943 | eval result=\$gl_cv_type_${gltype}_suffix | |
6944 | test "$result" = no && result= | |
6945 | eval ${GLTYPE}_SUFFIX=\$result | |
6946 | cat >>confdefs.h <<_ACEOF | |
6947 | #define ${GLTYPE}_SUFFIX $result | |
6948 | _ACEOF | |
6949 | ||
6950 | done | |
6951 | ||
6952 | ||
6953 | ||
6954 | STDINT_H=stdint.h | |
783e057b DJ |
6955 | fi |
6956 | ||
6957 | ||
f434ba03 PA |
6958 | # Code from module string: |
6959 | ||
6960 | ||
6961 | ||
6962 | # Code from module warn-on-use: | |
6963 | # Code from module wchar: | |
6964 | ||
6965 | ||
6966 | ||
6967 | ||
783e057b DJ |
6968 | : |
6969 | ||
6970 | ||
6971 | ||
6972 | ||
6973 | ||
783e057b DJ |
6974 | |
6975 | ||
6976 | ||
6977 | ||
6978 | : | |
6979 | ||
6980 | ||
6981 | ||
6982 | ||
6983 | ||
6984 | ||
6985 | ||
6986 | if test $gl_cv_have_include_next = yes; then | |
6987 | gl_cv_next_wchar_h='<'wchar.h'>' | |
6988 | else | |
81ecdfbb RW |
6989 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 |
6990 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
6991 | if test "${gl_cv_next_wchar_h+set}" = set; then : | |
6992 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
6993 | else |
6994 | ||
f434ba03 PA |
6995 | if test $ac_cv_header_wchar_h = yes; then |
6996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
6997 | /* end confdefs.h. */ |
6998 | #include <wchar.h> | |
6999 | ||
7000 | _ACEOF | |
f434ba03 PA |
7001 | case "$host_os" in |
7002 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
7003 | *) gl_absname_cpp="$ac_cpp" ;; | |
7004 | esac | |
7005 | gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
7006 | sed -n '\#/wchar.h#{ | |
7007 | s#.*"\(.*/wchar.h\)".*#\1# | |
7008 | s#^/[^/]#//&# | |
7009 | p | |
7010 | q | |
7011 | }'`'"' | |
7012 | else | |
7013 | gl_cv_next_wchar_h='<'wchar.h'>' | |
7014 | fi | |
783e057b DJ |
7015 | |
7016 | fi | |
81ecdfbb RW |
7017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 |
7018 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
783e057b DJ |
7019 | fi |
7020 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
7021 | ||
f434ba03 PA |
7022 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
7023 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
7024 | gl_next_as_first_directive='<'wchar.h'>' | |
7025 | else | |
7026 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
7027 | gl_next_as_first_directive=$gl_cv_next_wchar_h | |
7028 | fi | |
7029 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive | |
7030 | ||
7031 | ||
7032 | ||
7033 | if test $ac_cv_header_wchar_h = yes; then | |
7034 | HAVE_WCHAR_H=1 | |
7035 | else | |
7036 | HAVE_WCHAR_H=0 | |
7037 | fi | |
7038 | ||
7039 | ||
7040 | ||
7041 | if test $gt_cv_c_wint_t = yes; then | |
7042 | HAVE_WINT_T=1 | |
7043 | else | |
7044 | HAVE_WINT_T=0 | |
7045 | fi | |
7046 | ||
7047 | ||
7048 | ||
7049 | for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do | |
7050 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
7051 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
7052 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
7053 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7054 | $as_echo_n "(cached) " >&6 | |
7055 | else | |
7056 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7057 | /* end confdefs.h. */ | |
7058 | ||
7059 | /* Some systems require additional headers. */ | |
7060 | #ifndef __GLIBC__ | |
7061 | # include <stddef.h> | |
7062 | # include <stdio.h> | |
7063 | # include <time.h> | |
7064 | #endif | |
7065 | #include <wchar.h> | |
7066 | ||
7067 | int | |
7068 | main () | |
7069 | { | |
7070 | #undef $gl_func | |
7071 | (void) $gl_func; | |
7072 | ; | |
7073 | return 0; | |
7074 | } | |
7075 | _ACEOF | |
7076 | if ac_fn_c_try_compile "$LINENO"; then : | |
7077 | eval "$as_gl_Symbol=yes" | |
7078 | else | |
7079 | eval "$as_gl_Symbol=no" | |
7080 | fi | |
7081 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7082 | fi | |
7083 | eval ac_res=\$$as_gl_Symbol | |
7084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7085 | $as_echo "$ac_res" >&6; } | |
7086 | eval as_val=\$$as_gl_Symbol | |
7087 | if test "x$as_val" = x""yes; then : | |
7088 | cat >>confdefs.h <<_ACEOF | |
7089 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
7090 | _ACEOF | |
7091 | ||
7092 | eval ac_cv_have_decl_$gl_func=yes | |
7093 | fi | |
7094 | done | |
7095 | ||
7096 | ||
7097 | # Code from module dummy: | |
7098 | # End of code from modules | |
7099 | ||
7100 | ||
c906108c | 7101 | |
c906108c | 7102 | |
c906108c | 7103 | |
c906108c | 7104 | |
c906108c | 7105 | |
c906108c | 7106 | |
c906108c | 7107 | |
783e057b DJ |
7108 | gltests_libdeps= |
7109 | gltests_ltlibdeps= | |
20e95c23 | 7110 | |
20e95c23 | 7111 | |
20e95c23 | 7112 | |
f434ba03 PA |
7113 | |
7114 | ||
7115 | ||
7116 | ||
7117 | ||
7118 | ||
783e057b | 7119 | gl_source_base='tests' |
f434ba03 PA |
7120 | gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS |
7121 | ||
7122 | gl_module_indicator_condition=$gltests_WITNESS | |
7123 | ||
7124 | ||
7125 | ||
7126 | ||
7127 | ||
c906108c | 7128 | |
bec39cab | 7129 | |
bec39cab | 7130 | |
783e057b DJ |
7131 | |
7132 | LIBGNU_LIBDEPS="$gl_libdeps" | |
7133 | ||
7134 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
7135 | ||
7136 | ||
e28b3332 | 7137 | |
d5af19ba DJ |
7138 | # For Makefile dependencies. |
7139 | GNULIB_STDINT_H= | |
7140 | if test x"$STDINT_H" != x; then | |
7141 | GNULIB_STDINT_H=gnulib/$STDINT_H | |
7142 | fi | |
7143 | ||
7144 | ||
bec39cab AC |
7145 | PACKAGE=gdb |
7146 | ||
7147 | cat >>confdefs.h <<_ACEOF | |
7148 | #define PACKAGE "$PACKAGE" | |
7149 | _ACEOF | |
7150 | ||
7151 | ||
7152 | ||
e28b3332 DJ |
7153 | # GDB does not use automake, but gnulib does. This line lets us |
7154 | # generate its Makefile.in. | |
81ecdfbb RW |
7155 | am__api_version='1.11' |
7156 | ||
e28b3332 DJ |
7157 | # Find a good install program. We prefer a C program (faster), |
7158 | # so one script is as good as another. But avoid the broken or | |
7159 | # incompatible versions: | |
7160 | # SysV /etc/install, /usr/sbin/install | |
7161 | # SunOS /usr/etc/install | |
7162 | # IRIX /sbin/install | |
7163 | # AIX /bin/install | |
7164 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7165 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7166 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7167 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7168 | # OS/2's system install, which has a completely different semantic | |
7169 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 7170 | # Reject install programs that cannot install multiple files. |
81ecdfbb RW |
7171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
7172 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
e28b3332 | 7173 | if test -z "$INSTALL"; then |
81ecdfbb RW |
7174 | if test "${ac_cv_path_install+set}" = set; then : |
7175 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7176 | else |
7177 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7178 | for as_dir in $PATH | |
7179 | do | |
7180 | IFS=$as_save_IFS | |
7181 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7182 | # Account for people who put trailing slashes in PATH elements. |
7183 | case $as_dir/ in #(( | |
7184 | ./ | .// | /[cC]/* | \ | |
e28b3332 | 7185 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
81ecdfbb | 7186 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
e28b3332 DJ |
7187 | /usr/ucb/* ) ;; |
7188 | *) | |
7189 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7190 | # Don't use installbsd from OSF since it installs stuff as root | |
7191 | # by default. | |
7192 | for ac_prog in ginstall scoinst install; do | |
7193 | for ac_exec_ext in '' $ac_executable_extensions; do | |
81ecdfbb | 7194 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then |
e28b3332 DJ |
7195 | if test $ac_prog = install && |
7196 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7197 | # AIX install. It has an incompatible calling convention. | |
7198 | : | |
7199 | elif test $ac_prog = install && | |
7200 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7201 | # program-specific install script used by HP pwplus--don't use. | |
7202 | : | |
7203 | else | |
85541719 DE |
7204 | rm -rf conftest.one conftest.two conftest.dir |
7205 | echo one > conftest.one | |
7206 | echo two > conftest.two | |
7207 | mkdir conftest.dir | |
7208 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7209 | test -s conftest.one && test -s conftest.two && | |
7210 | test -s conftest.dir/conftest.one && | |
7211 | test -s conftest.dir/conftest.two | |
7212 | then | |
7213 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7214 | break 3 | |
7215 | fi | |
e28b3332 DJ |
7216 | fi |
7217 | fi | |
7218 | done | |
7219 | done | |
7220 | ;; | |
7221 | esac | |
81ecdfbb RW |
7222 | |
7223 | done | |
7224 | IFS=$as_save_IFS | |
e28b3332 | 7225 | |
85541719 | 7226 | rm -rf conftest.one conftest.two conftest.dir |
e28b3332 DJ |
7227 | |
7228 | fi | |
7229 | if test "${ac_cv_path_install+set}" = set; then | |
7230 | INSTALL=$ac_cv_path_install | |
7231 | else | |
85541719 DE |
7232 | # As a last resort, use the slow shell script. Don't cache a |
7233 | # value for INSTALL within a source directory, because that will | |
e28b3332 | 7234 | # break other packages using the cache if that directory is |
85541719 | 7235 | # removed, or if the value is a relative name. |
e28b3332 DJ |
7236 | INSTALL=$ac_install_sh |
7237 | fi | |
7238 | fi | |
81ecdfbb RW |
7239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
7240 | $as_echo "$INSTALL" >&6; } | |
e28b3332 DJ |
7241 | |
7242 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7243 | # It thinks the first close brace ends the variable substitution. | |
7244 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7245 | ||
7246 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7247 | ||
7248 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7249 | ||
81ecdfbb RW |
7250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
7251 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
e28b3332 DJ |
7252 | # Just in case |
7253 | sleep 1 | |
7254 | echo timestamp > conftest.file | |
81ecdfbb RW |
7255 | # Reject unsafe characters in $srcdir or the absolute working directory |
7256 | # name. Accept space and tab only in the latter. | |
7257 | am_lf=' | |
7258 | ' | |
7259 | case `pwd` in | |
7260 | *[\\\"\#\$\&\'\`$am_lf]*) | |
7261 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; | |
7262 | esac | |
7263 | case $srcdir in | |
7264 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
7265 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; | |
7266 | esac | |
7267 | ||
e28b3332 DJ |
7268 | # Do `set' in a subshell so we don't clobber the current shell's |
7269 | # arguments. Must try -L first in case configure is actually a | |
7270 | # symlink; some systems play weird games with the mod time of symlinks | |
7271 | # (eg FreeBSD returns the mod time of the symlink's containing | |
7272 | # directory). | |
7273 | if ( | |
81ecdfbb | 7274 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
e28b3332 DJ |
7275 | if test "$*" = "X"; then |
7276 | # -L didn't work. | |
81ecdfbb | 7277 | set X `ls -t "$srcdir/configure" conftest.file` |
e28b3332 DJ |
7278 | fi |
7279 | rm -f conftest.file | |
7280 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
7281 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
7282 | ||
7283 | # If neither matched, then we have a broken ls. This can happen | |
7284 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
7285 | # broken ls alias from the environment. This has actually | |
7286 | # happened. Such a system could not be considered "sane". | |
81ecdfbb RW |
7287 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
7288 | alias in your environment" "$LINENO" 5 | |
e28b3332 DJ |
7289 | fi |
7290 | ||
7291 | test "$2" = conftest.file | |
7292 | ) | |
7293 | then | |
7294 | # Ok. | |
7295 | : | |
7296 | else | |
81ecdfbb RW |
7297 | as_fn_error "newly created file is older than distributed files! |
7298 | Check your system clock" "$LINENO" 5 | |
e28b3332 | 7299 | fi |
81ecdfbb RW |
7300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7301 | $as_echo "yes" >&6; } | |
e28b3332 | 7302 | test "$program_prefix" != NONE && |
81ecdfbb | 7303 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
e28b3332 DJ |
7304 | # Use a double $ so make ignores it. |
7305 | test "$program_suffix" != NONE && | |
81ecdfbb RW |
7306 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
7307 | # Double any \ or $. | |
e28b3332 | 7308 | # By default was `s,x,x', remove it if useless. |
81ecdfbb RW |
7309 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
7310 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
e28b3332 DJ |
7311 | |
7312 | # expand $ac_aux_dir to an absolute path | |
7313 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
7314 | ||
81ecdfbb RW |
7315 | if test x"${MISSING+set}" != xset; then |
7316 | case $am_aux_dir in | |
7317 | *\ * | *\ *) | |
7318 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
7319 | *) | |
7320 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
7321 | esac | |
7322 | fi | |
e28b3332 DJ |
7323 | # Use eval to expand $SHELL |
7324 | if eval "$MISSING --run true"; then | |
7325 | am_missing_run="$MISSING --run " | |
7326 | else | |
7327 | am_missing_run= | |
81ecdfbb RW |
7328 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 |
7329 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
7330 | fi | |
7331 | ||
7332 | if test x"${install_sh}" != xset; then | |
7333 | case $am_aux_dir in | |
7334 | *\ * | *\ *) | |
7335 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
7336 | *) | |
7337 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
7338 | esac | |
7339 | fi | |
7340 | ||
7341 | # Installed binaries are usually stripped using `strip' when the user | |
7342 | # run `make install-strip'. However `strip' might not be the right | |
7343 | # tool to use in cross-compilation environments, therefore Automake | |
7344 | # will honor the `STRIP' environment variable to overrule this program. | |
7345 | if test "$cross_compiling" != no; then | |
7346 | if test -n "$ac_tool_prefix"; then | |
7347 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
7348 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
7349 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7350 | $as_echo_n "checking for $ac_word... " >&6; } | |
7351 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
7352 | $as_echo_n "(cached) " >&6 | |
7353 | else | |
7354 | if test -n "$STRIP"; then | |
7355 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
7356 | else | |
7357 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7358 | for as_dir in $PATH | |
7359 | do | |
7360 | IFS=$as_save_IFS | |
7361 | test -z "$as_dir" && as_dir=. | |
7362 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7363 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7364 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
7365 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7366 | break 2 | |
7367 | fi | |
7368 | done | |
7369 | done | |
7370 | IFS=$as_save_IFS | |
7371 | ||
7372 | fi | |
7373 | fi | |
7374 | STRIP=$ac_cv_prog_STRIP | |
7375 | if test -n "$STRIP"; then | |
7376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
7377 | $as_echo "$STRIP" >&6; } | |
7378 | else | |
7379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7380 | $as_echo "no" >&6; } | |
7381 | fi | |
7382 | ||
7383 | ||
7384 | fi | |
7385 | if test -z "$ac_cv_prog_STRIP"; then | |
7386 | ac_ct_STRIP=$STRIP | |
7387 | # Extract the first word of "strip", so it can be a program name with args. | |
7388 | set dummy strip; ac_word=$2 | |
7389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7390 | $as_echo_n "checking for $ac_word... " >&6; } | |
7391 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
7392 | $as_echo_n "(cached) " >&6 | |
7393 | else | |
7394 | if test -n "$ac_ct_STRIP"; then | |
7395 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
7396 | else | |
7397 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7398 | for as_dir in $PATH | |
7399 | do | |
7400 | IFS=$as_save_IFS | |
7401 | test -z "$as_dir" && as_dir=. | |
7402 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7403 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7404 | ac_cv_prog_ac_ct_STRIP="strip" | |
7405 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7406 | break 2 | |
7407 | fi | |
7408 | done | |
7409 | done | |
7410 | IFS=$as_save_IFS | |
7411 | ||
7412 | fi | |
7413 | fi | |
7414 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
7415 | if test -n "$ac_ct_STRIP"; then | |
7416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
7417 | $as_echo "$ac_ct_STRIP" >&6; } | |
7418 | else | |
7419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7420 | $as_echo "no" >&6; } | |
7421 | fi | |
7422 | ||
7423 | if test "x$ac_ct_STRIP" = x; then | |
7424 | STRIP=":" | |
7425 | else | |
7426 | case $cross_compiling:$ac_tool_warned in | |
7427 | yes:) | |
7428 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7429 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7430 | ac_tool_warned=yes ;; | |
7431 | esac | |
7432 | STRIP=$ac_ct_STRIP | |
7433 | fi | |
7434 | else | |
7435 | STRIP="$ac_cv_prog_STRIP" | |
7436 | fi | |
7437 | ||
7438 | fi | |
7439 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
7440 | ||
7441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
7442 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
7443 | if test -z "$MKDIR_P"; then | |
7444 | if test "${ac_cv_path_mkdir+set}" = set; then : | |
7445 | $as_echo_n "(cached) " >&6 | |
7446 | else | |
7447 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7448 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
7449 | do | |
7450 | IFS=$as_save_IFS | |
7451 | test -z "$as_dir" && as_dir=. | |
7452 | for ac_prog in mkdir gmkdir; do | |
7453 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7454 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
7455 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
7456 | 'mkdir (GNU coreutils) '* | \ | |
7457 | 'mkdir (coreutils) '* | \ | |
7458 | 'mkdir (fileutils) '4.1*) | |
7459 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
7460 | break 3;; | |
7461 | esac | |
7462 | done | |
7463 | done | |
e28b3332 | 7464 | done |
81ecdfbb RW |
7465 | IFS=$as_save_IFS |
7466 | ||
7467 | fi | |
7468 | ||
7469 | if test "${ac_cv_path_mkdir+set}" = set; then | |
7470 | MKDIR_P="$ac_cv_path_mkdir -p" | |
e28b3332 | 7471 | else |
81ecdfbb RW |
7472 | # As a last resort, use the slow shell script. Don't cache a |
7473 | # value for MKDIR_P within a source directory, because that will | |
7474 | # break other packages using the cache if that directory is | |
7475 | # removed, or if the value is a relative name. | |
7476 | test -d ./--version && rmdir ./--version | |
7477 | MKDIR_P="$ac_install_sh -d" | |
e28b3332 DJ |
7478 | fi |
7479 | fi | |
81ecdfbb RW |
7480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
7481 | $as_echo "$MKDIR_P" >&6; } | |
7482 | ||
f434ba03 | 7483 | |
81ecdfbb RW |
7484 | mkdir_p="$MKDIR_P" |
7485 | case $mkdir_p in | |
7486 | [\\/$]* | ?:[\\/]*) ;; | |
7487 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
7488 | esac | |
e28b3332 DJ |
7489 | |
7490 | for ac_prog in gawk mawk nawk awk | |
7491 | do | |
7492 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7493 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7495 | $as_echo_n "checking for $ac_word... " >&6; } | |
7496 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7497 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7498 | else |
7499 | if test -n "$AWK"; then | |
7500 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7501 | else | |
7502 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7503 | for as_dir in $PATH | |
7504 | do | |
7505 | IFS=$as_save_IFS | |
7506 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
7507 | for ac_exec_ext in '' $ac_executable_extensions; do |
7508 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e28b3332 | 7509 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7510 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
e28b3332 DJ |
7511 | break 2 |
7512 | fi | |
7513 | done | |
81ecdfbb RW |
7514 | done |
7515 | IFS=$as_save_IFS | |
e28b3332 DJ |
7516 | |
7517 | fi | |
7518 | fi | |
7519 | AWK=$ac_cv_prog_AWK | |
7520 | if test -n "$AWK"; then | |
81ecdfbb RW |
7521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7522 | $as_echo "$AWK" >&6; } | |
e28b3332 | 7523 | else |
81ecdfbb RW |
7524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7525 | $as_echo "no" >&6; } | |
e28b3332 DJ |
7526 | fi |
7527 | ||
81ecdfbb | 7528 | |
e28b3332 DJ |
7529 | test -n "$AWK" && break |
7530 | done | |
7531 | ||
81ecdfbb | 7532 | ac_config_commands="$ac_config_commands depfiles" |
e28b3332 DJ |
7533 | |
7534 | ||
7535 | am_make=${MAKE-make} | |
7536 | cat > confinc << 'END' | |
7537 | am__doit: | |
81ecdfbb | 7538 | @echo this is the am__doit target |
e28b3332 DJ |
7539 | .PHONY: am__doit |
7540 | END | |
7541 | # If we don't find an include directive, just comment out the code. | |
81ecdfbb RW |
7542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 |
7543 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
e28b3332 DJ |
7544 | am__include="#" |
7545 | am__quote= | |
7546 | _am_result=none | |
7547 | # First try GNU make style include. | |
7548 | echo "include confinc" > confmf | |
81ecdfbb RW |
7549 | # Ignore all kinds of additional output from `make'. |
7550 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
7551 | *the\ am__doit\ target*) | |
7552 | am__include=include | |
7553 | am__quote= | |
7554 | _am_result=GNU | |
7555 | ;; | |
7556 | esac | |
e28b3332 DJ |
7557 | # Now try BSD make style include. |
7558 | if test "$am__include" = "#"; then | |
7559 | echo '.include "confinc"' > confmf | |
81ecdfbb RW |
7560 | case `$am_make -s -f confmf 2> /dev/null` in #( |
7561 | *the\ am__doit\ target*) | |
7562 | am__include=.include | |
7563 | am__quote="\"" | |
7564 | _am_result=BSD | |
7565 | ;; | |
7566 | esac | |
e28b3332 DJ |
7567 | fi |
7568 | ||
7569 | ||
81ecdfbb RW |
7570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 |
7571 | $as_echo "$_am_result" >&6; } | |
e28b3332 DJ |
7572 | rm -f confinc confmf |
7573 | ||
81ecdfbb RW |
7574 | # Check whether --enable-dependency-tracking was given. |
7575 | if test "${enable_dependency_tracking+set}" = set; then : | |
7576 | enableval=$enable_dependency_tracking; | |
7577 | fi | |
e28b3332 | 7578 | |
e28b3332 DJ |
7579 | if test "x$enable_dependency_tracking" != xno; then |
7580 | am_depcomp="$ac_aux_dir/depcomp" | |
7581 | AMDEPBACKSLASH='\' | |
7582 | fi | |
81ecdfbb | 7583 | if test "x$enable_dependency_tracking" != xno; then |
e28b3332 DJ |
7584 | AMDEP_TRUE= |
7585 | AMDEP_FALSE='#' | |
7586 | else | |
7587 | AMDEP_TRUE='#' | |
7588 | AMDEP_FALSE= | |
7589 | fi | |
7590 | ||
7591 | ||
81ecdfbb RW |
7592 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
7593 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
7594 | # is not polluted with repeated "-I." | |
7595 | am__isrc=' -I$(srcdir)' | |
7596 | # test to see if srcdir already configured | |
7597 | if test -f $srcdir/config.status; then | |
7598 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
7599 | fi | |
e28b3332 DJ |
7600 | fi |
7601 | ||
7602 | # test whether we have cygpath | |
7603 | if test -z "$CYGPATH_W"; then | |
7604 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
7605 | CYGPATH_W='cygpath -w' | |
7606 | else | |
7607 | CYGPATH_W=echo | |
7608 | fi | |
7609 | fi | |
7610 | ||
7611 | ||
7612 | # Define the identity of the package. | |
7613 | PACKAGE=gdb | |
7614 | VERSION=UNUSED-VERSION | |
7615 | ||
7616 | ||
7617 | # Some tools Automake needs. | |
7618 | ||
7619 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
7620 | ||
7621 | ||
7622 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
7623 | ||
7624 | ||
7625 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
7626 | ||
7627 | ||
7628 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
7629 | ||
7630 | ||
7631 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
7632 | ||
e28b3332 DJ |
7633 | # We need awk for the "check" target. The system "awk" is bad on |
7634 | # some platforms. | |
7635 | # Always define AMTAR for backward compatibility. | |
7636 | ||
7637 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
7638 | ||
7639 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
7640 | ||
7641 | ||
7642 | ||
7643 | ||
7644 | depcc="$CC" am_compiler_list= | |
7645 | ||
81ecdfbb RW |
7646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
7647 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
7648 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
7649 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
7650 | else |
7651 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
7652 | # We make a subdir and do the tests there. Otherwise we can end up | |
7653 | # making bogus files that we don't know about and never remove. For | |
7654 | # instance it was reported that on HP-UX the gcc test will end up | |
7655 | # making a dummy file named `D' -- because `-MD' means `put the output | |
7656 | # in D'. | |
7657 | mkdir conftest.dir | |
7658 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
7659 | # using a relative directory. | |
7660 | cp "$am_depcomp" conftest.dir | |
7661 | cd conftest.dir | |
7662 | # We will build objects and dependencies in a subdirectory because | |
7663 | # it helps to detect inapplicable dependency modes. For instance | |
7664 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
7665 | # side effect of compilation, but ICC will put the dependencies in | |
7666 | # the current directory while Tru64 will put them in the object | |
7667 | # directory. | |
7668 | mkdir sub | |
7669 | ||
7670 | am_cv_CC_dependencies_compiler_type=none | |
7671 | if test "$am_compiler_list" = ""; then | |
7672 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
7673 | fi | |
81ecdfbb RW |
7674 | am__universal=false |
7675 | case " $depcc " in #( | |
7676 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
7677 | esac | |
7678 | ||
e28b3332 DJ |
7679 | for depmode in $am_compiler_list; do |
7680 | # Setup a source with many dependencies, because some compilers | |
7681 | # like to wrap large dependency lists on column 80 (with \), and | |
7682 | # we should not choose a depcomp mode which is confused by this. | |
7683 | # | |
7684 | # We need to recreate these files for each test, as the compiler may | |
7685 | # overwrite some of them when testing with obscure command lines. | |
7686 | # This happens at least with the AIX C compiler. | |
7687 | : > sub/conftest.c | |
7688 | for i in 1 2 3 4 5 6; do | |
7689 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
7690 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
7691 | # Solaris 8's {/usr,}/bin/sh. | |
7692 | touch sub/conftst$i.h | |
7693 | done | |
7694 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
7695 | ||
81ecdfbb RW |
7696 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
7697 | # mode. It turns out that the SunPro C++ compiler does not properly | |
7698 | # handle `-M -o', and we need to detect this. Also, some Intel | |
7699 | # versions had trouble with output in subdirs | |
7700 | am__obj=sub/conftest.${OBJEXT-o} | |
7701 | am__minus_obj="-o $am__obj" | |
e28b3332 | 7702 | case $depmode in |
81ecdfbb RW |
7703 | gcc) |
7704 | # This depmode causes a compiler race in universal mode. | |
7705 | test "$am__universal" = false || continue | |
7706 | ;; | |
e28b3332 DJ |
7707 | nosideeffect) |
7708 | # after this tag, mechanisms are not by side-effect, so they'll | |
7709 | # only be used when explicitly requested | |
7710 | if test "x$enable_dependency_tracking" = xyes; then | |
7711 | continue | |
7712 | else | |
7713 | break | |
7714 | fi | |
7715 | ;; | |
81ecdfbb RW |
7716 | msvisualcpp | msvcmsys) |
7717 | # This compiler won't grok `-c -o', but also, the minuso test has | |
7718 | # not run yet. These depmodes are late enough in the game, and | |
7719 | # so weak that their functioning should not be impacted. | |
7720 | am__obj=conftest.${OBJEXT-o} | |
7721 | am__minus_obj= | |
7722 | ;; | |
e28b3332 DJ |
7723 | none) break ;; |
7724 | esac | |
e28b3332 | 7725 | if depmode=$depmode \ |
81ecdfbb | 7726 | source=sub/conftest.c object=$am__obj \ |
e28b3332 | 7727 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
81ecdfbb | 7728 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
e28b3332 | 7729 | >/dev/null 2>conftest.err && |
81ecdfbb | 7730 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 | 7731 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
81ecdfbb | 7732 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 DJ |
7733 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
7734 | # icc doesn't choke on unknown options, it will just issue warnings | |
7735 | # or remarks (even with -Werror). So we grep stderr for any message | |
7736 | # that says an option was ignored or not supported. | |
7737 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
7738 | # icc: Command line warning: ignoring option '-M'; no argument required | |
7739 | # The diagnosis changed in icc 8.0: | |
7740 | # icc: Command line remark: option '-MP' not supported | |
7741 | if (grep 'ignoring option' conftest.err || | |
7742 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
7743 | am_cv_CC_dependencies_compiler_type=$depmode | |
7744 | break | |
7745 | fi | |
7746 | fi | |
7747 | done | |
7748 | ||
7749 | cd .. | |
7750 | rm -rf conftest.dir | |
7751 | else | |
7752 | am_cv_CC_dependencies_compiler_type=none | |
7753 | fi | |
7754 | ||
7755 | fi | |
81ecdfbb RW |
7756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
7757 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
e28b3332 DJ |
7758 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
7759 | ||
81ecdfbb | 7760 | if |
e28b3332 DJ |
7761 | test "x$enable_dependency_tracking" != xno \ |
7762 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
7763 | am__fastdepCC_TRUE= | |
7764 | am__fastdepCC_FALSE='#' | |
7765 | else | |
7766 | am__fastdepCC_TRUE='#' | |
7767 | am__fastdepCC_FALSE= | |
7768 | fi | |
7769 | ||
7770 | ||
7771 | ||
7772 | ||
bec39cab AC |
7773 | |
7774 | ||
81ecdfbb RW |
7775 | # Check whether --with-separate-debug-dir was given. |
7776 | if test "${with_separate_debug_dir+set}" = set; then : | |
7777 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
7778 | DEBUGDIR=$withval |
7779 | else | |
7780 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
7781 | fi |
7782 | ||
20e95c23 | 7783 | |
783e057b DJ |
7784 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7785 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 7786 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 7787 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 7788 | |
783e057b DJ |
7789 | cat >>confdefs.h <<_ACEOF |
7790 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 7791 | _ACEOF |
20e95c23 | 7792 | |
20e95c23 | 7793 | |
20e95c23 | 7794 | |
0c4a4063 | 7795 | |
b14b1491 TT |
7796 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7797 | if test "x$prefix" = xNONE; then | |
7798 | test_prefix=/usr/local | |
7799 | else | |
7800 | test_prefix=$prefix | |
7801 | fi | |
783e057b | 7802 | else |
b14b1491 | 7803 | test_prefix=$exec_prefix |
783e057b | 7804 | fi |
b14b1491 TT |
7805 | value=0 |
7806 | case ${ac_define_dir} in | |
7807 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7808 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7809 | value=1 | |
7810 | ;; | |
7811 | esac | |
7812 | ||
7813 | cat >>confdefs.h <<_ACEOF | |
7814 | #define DEBUGDIR_RELOCATABLE $value | |
7815 | _ACEOF | |
7816 | ||
7817 | ||
7818 | ||
0c4a4063 | 7819 | |
b14b1491 TT |
7820 | # GDB's datadir relocation |
7821 | ||
7822 | ||
7823 | ||
81ecdfbb RW |
7824 | # Check whether --with-gdb-datadir was given. |
7825 | if test "${with_gdb_datadir+set}" = set; then : | |
7826 | withval=$with_gdb_datadir; | |
b14b1491 | 7827 | GDB_DATADIR=$withval |
20e95c23 | 7828 | else |
b14b1491 | 7829 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
7830 | fi |
7831 | ||
20e95c23 | 7832 | |
b14b1491 TT |
7833 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7834 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7835 | ac_define_dir=`eval echo $GDB_DATADIR` | |
7836 | ac_define_dir=`eval echo $ac_define_dir` | |
7837 | ||
7838 | cat >>confdefs.h <<_ACEOF | |
7839 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
7840 | _ACEOF |
7841 | ||
b14b1491 TT |
7842 | |
7843 | ||
0c4a4063 | 7844 | |
b14b1491 TT |
7845 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7846 | if test "x$prefix" = xNONE; then | |
7847 | test_prefix=/usr/local | |
7848 | else | |
7849 | test_prefix=$prefix | |
7850 | fi | |
7851 | else | |
7852 | test_prefix=$exec_prefix | |
7853 | fi | |
7854 | value=0 | |
7855 | case ${ac_define_dir} in | |
7856 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7857 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7858 | value=1 | |
7859 | ;; | |
7860 | esac | |
7861 | ||
7862 | cat >>confdefs.h <<_ACEOF | |
7863 | #define GDB_DATADIR_RELOCATABLE $value | |
7864 | _ACEOF | |
7865 | ||
7866 | ||
783e057b | 7867 | |
20e95c23 | 7868 | |
0c4a4063 | 7869 | |
81ecdfbb RW |
7870 | # Check whether --with-relocated-sources was given. |
7871 | if test "${with_relocated_sources+set}" = set; then : | |
7872 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
7873 | |
7874 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7875 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7876 | ac_define_dir=`eval echo $reloc_srcdir` | |
7877 | ac_define_dir=`eval echo $ac_define_dir` | |
7878 | ||
7879 | cat >>confdefs.h <<_ACEOF | |
7880 | #define RELOC_SRCDIR "$ac_define_dir" | |
7881 | _ACEOF | |
7882 | ||
7883 | ||
7884 | ||
81ecdfbb RW |
7885 | fi |
7886 | ||
29b0e8a2 JM |
7887 | |
7888 | ||
20e95c23 | 7889 | |
5ae98d25 | 7890 | subdirs="$subdirs testsuite" |
20e95c23 | 7891 | |
4f3e6fb7 YQ |
7892 | subdirs="$subdirs common" |
7893 | ||
20e95c23 | 7894 | |
783e057b | 7895 | # Check whether to support alternative target configurations |
81ecdfbb RW |
7896 | # Check whether --enable-targets was given. |
7897 | if test "${enable_targets+set}" = set; then : | |
7898 | enableval=$enable_targets; case "${enableval}" in | |
7899 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
7900 | ;; |
7901 | no) enable_targets= ;; | |
7902 | *) enable_targets=$enableval ;; | |
7903 | esac | |
81ecdfbb RW |
7904 | fi |
7905 | ||
20e95c23 | 7906 | |
783e057b | 7907 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
7908 | # Check whether --enable-64-bit-bfd was given. |
7909 | if test "${enable_64_bit_bfd+set}" = set; then : | |
7910 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
7911 | yes) want64=true ;; |
7912 | no) want64=false ;; | |
81ecdfbb | 7913 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
7914 | esac |
7915 | else | |
7916 | want64=false | |
81ecdfbb RW |
7917 | fi |
7918 | ||
783e057b DJ |
7919 | # Provide defaults for some variables set by the per-host and per-target |
7920 | # configuration. | |
7921 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 7922 | |
783e057b DJ |
7923 | if test "${target}" = "${host}"; then |
7924 | gdb_native=yes | |
7925 | else | |
7926 | gdb_native=no | |
7927 | fi | |
20e95c23 | 7928 | |
783e057b | 7929 | . $srcdir/configure.host |
20e95c23 | 7930 | |
783e057b | 7931 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 7932 | |
783e057b DJ |
7933 | TARGET_OBS= |
7934 | all_targets= | |
20e95c23 | 7935 | |
783e057b | 7936 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 7937 | do |
783e057b DJ |
7938 | if test "$targ_alias" = "all"; then |
7939 | all_targets=true | |
7940 | else | |
7941 | # Canonicalize the secondary target names. | |
7942 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
7943 | if test -n "$result"; then | |
7944 | targ=$result | |
7945 | else | |
7946 | targ=$targ_alias | |
7947 | fi | |
20e95c23 | 7948 | |
783e057b | 7949 | . ${srcdir}/configure.tgt |
20e95c23 | 7950 | |
bf307134 JB |
7951 | if test -z "${gdb_target_obs}"; then : |
7952 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
7953 | fi | |
7954 | ||
783e057b DJ |
7955 | # Target-specific object files |
7956 | for i in ${gdb_target_obs}; do | |
7957 | case " $TARGET_OBS " in | |
7958 | *" ${i} "*) ;; | |
7959 | *) | |
7960 | TARGET_OBS="$TARGET_OBS ${i}" | |
7961 | ;; | |
7962 | esac | |
7963 | done | |
20e95c23 | 7964 | |
783e057b DJ |
7965 | # Check whether this target needs 64-bit CORE_ADDR |
7966 | if test x${want64} = xfalse; then | |
7967 | . ${srcdir}/../bfd/config.bfd | |
7968 | fi | |
7969 | fi | |
20e95c23 DJ |
7970 | done |
7971 | ||
783e057b DJ |
7972 | if test x${all_targets} = xtrue; then |
7973 | ||
7974 | # We want all 64-bit targets if we either: | |
7975 | # - run on a 64-bit host or | |
7976 | # - already require 64-bit support for some other target or | |
7977 | # - the --enable-64-bit-bfd option was supplied | |
7978 | # Otherwise we only support all 32-bit targets. | |
7979 | # | |
7980 | # NOTE: This test must be in sync with the corresponding | |
7981 | # tests in BFD! | |
20e95c23 | 7982 | |
783e057b | 7983 | if test x${want64} = xfalse; then |
81ecdfbb RW |
7984 | # The cast to long int works around a bug in the HP C Compiler |
7985 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7986 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7987 | # This bug is HP SR number 8606223364. | |
7988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
7989 | $as_echo_n "checking size of long... " >&6; } | |
7990 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
7991 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 7992 | else |
81ecdfbb | 7993 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 7994 | |
81ecdfbb RW |
7995 | else |
7996 | if test "$ac_cv_type_long" = yes; then | |
7997 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7998 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7999 | { as_fn_set_status 77 | |
8000 | as_fn_error "cannot compute sizeof (long) | |
8001 | See \`config.log' for more details." "$LINENO" 5; }; } | |
8002 | else | |
8003 | ac_cv_sizeof_long=0 | |
8004 | fi | |
c0993dbe | 8005 | fi |
81ecdfbb | 8006 | |
c0993dbe | 8007 | fi |
81ecdfbb RW |
8008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
8009 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 8010 | |
c0993dbe | 8011 | |
c0993dbe | 8012 | |
c0993dbe UW |
8013 | cat >>confdefs.h <<_ACEOF |
8014 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
8015 | _ACEOF | |
8016 | ||
8017 | ||
8018 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
8019 | want64=true | |
8020 | fi | |
8021 | fi | |
8022 | if test x${want64} = xtrue; then | |
8023 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
8024 | else | |
8025 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
8026 | fi | |
8027 | fi | |
8028 | ||
8029 | ||
8030 | ||
8031 | # For other settings, only the main target counts. | |
8032 | gdb_sim= | |
8033 | gdb_osabi= | |
8034 | build_gdbserver= | |
8035 | targ=$target; . ${srcdir}/configure.tgt | |
8036 | ||
8037 | # Fetch the default architecture and default target vector from BFD. | |
8038 | targ=$target; . $srcdir/../bfd/config.bfd | |
8039 | ||
8040 | # We only want the first architecture, so strip off the others if | |
8041 | # there is more than one. | |
8042 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
8043 | ||
8044 | if test "x$targ_archs" != x; then | |
8045 | ||
8046 | cat >>confdefs.h <<_ACEOF | |
8047 | #define DEFAULT_BFD_ARCH $targ_archs | |
8048 | _ACEOF | |
8049 | ||
8050 | fi | |
8051 | if test "x$targ_defvec" != x; then | |
8052 | ||
8053 | cat >>confdefs.h <<_ACEOF | |
8054 | #define DEFAULT_BFD_VEC $targ_defvec | |
8055 | _ACEOF | |
8056 | ||
8057 | fi | |
8058 | ||
c0993dbe UW |
8059 | # The CLI cannot be disabled yet, but may be in the future. |
8060 | ||
8061 | # Enable CLI. | |
81ecdfbb RW |
8062 | # Check whether --enable-gdbcli was given. |
8063 | if test "${enable_gdbcli+set}" = set; then : | |
8064 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
8065 | yes) |
8066 | ;; | |
8067 | no) | |
81ecdfbb | 8068 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 8069 | *) |
81ecdfbb | 8070 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
8071 | esac |
8072 | else | |
8073 | enable_gdbcli=yes | |
81ecdfbb RW |
8074 | fi |
8075 | ||
c0993dbe UW |
8076 | if test x"$enable_gdbcli" = xyes; then |
8077 | if test -d $srcdir/cli; then | |
8078 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
8079 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
8080 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
8081 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
8082 | fi | |
8083 | fi | |
8084 | ||
8085 | # Enable MI. | |
81ecdfbb RW |
8086 | # Check whether --enable-gdbmi was given. |
8087 | if test "${enable_gdbmi+set}" = set; then : | |
8088 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
8089 | yes | no) |
8090 | ;; | |
8091 | *) | |
81ecdfbb | 8092 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
8093 | esac |
8094 | else | |
8095 | enable_gdbmi=yes | |
81ecdfbb RW |
8096 | fi |
8097 | ||
c0993dbe UW |
8098 | if test x"$enable_gdbmi" = xyes; then |
8099 | if test -d $srcdir/mi; then | |
8100 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
8101 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
8102 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
8103 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
8104 | fi | |
8105 | fi | |
8106 | ||
8107 | # Enable TUI. | |
81ecdfbb RW |
8108 | # Check whether --enable-tui was given. |
8109 | if test "${enable_tui+set}" = set; then : | |
8110 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 8111 | yes | no | auto) |
c0993dbe UW |
8112 | ;; |
8113 | *) | |
81ecdfbb | 8114 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
8115 | esac |
8116 | else | |
3ca64bd3 | 8117 | enable_tui=auto |
81ecdfbb RW |
8118 | fi |
8119 | ||
c0993dbe UW |
8120 | |
8121 | # Enable gdbtk. | |
81ecdfbb RW |
8122 | # Check whether --enable-gdbtk was given. |
8123 | if test "${enable_gdbtk+set}" = set; then : | |
8124 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
8125 | yes | no) |
8126 | ;; | |
8127 | *) | |
81ecdfbb | 8128 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
8129 | esac |
8130 | else | |
5062cc19 | 8131 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
8132 | enable_gdbtk=yes |
8133 | else | |
8134 | enable_gdbtk=no | |
8135 | fi | |
81ecdfbb RW |
8136 | fi |
8137 | ||
c0993dbe UW |
8138 | # We unconditionally disable gdbtk tests on selected platforms. |
8139 | case $host_os in | |
8140 | go32* | windows*) | |
81ecdfbb RW |
8141 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
8142 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
8143 | enable_gdbtk=no ;; |
8144 | esac | |
8145 | ||
8146 | # Libunwind support. | |
bec39cab | 8147 | |
81ecdfbb RW |
8148 | # Check whether --with-libunwind was given. |
8149 | if test "${with_libunwind+set}" = set; then : | |
8150 | withval=$with_libunwind; case "${withval}" in | |
bec39cab AC |
8151 | yes) enable_libunwind=yes ;; |
8152 | no) enable_libunwind=no ;; | |
81ecdfbb | 8153 | *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;; |
bec39cab | 8154 | esac |
bec39cab | 8155 | else |
bec39cab | 8156 | |
81ecdfbb RW |
8157 | for ac_header in libunwind.h libunwind-ia64.h |
8158 | do : | |
8159 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8160 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8161 | eval as_val=\$$as_ac_Header | |
8162 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8163 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8164 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8165 | _ACEOF |
8166 | ||
8167 | fi | |
8168 | ||
8169 | done | |
8170 | ||
a9322a30 TT |
8171 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then |
8172 | enable_libunwind=yes; | |
8173 | fi | |
8174 | ||
bec39cab | 8175 | fi |
bec39cab | 8176 | |
bec39cab | 8177 | |
81ecdfbb RW |
8178 | if test x"$enable_libunwind" = xyes; then |
8179 | for ac_header in libunwind.h libunwind-ia64.h | |
8180 | do : | |
8181 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8182 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8183 | eval as_val=\$$as_ac_Header | |
8184 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8185 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8186 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab AC |
8187 | _ACEOF |
8188 | ||
8189 | fi | |
8190 | ||
8191 | done | |
8192 | ||
bec39cab | 8193 | |
81ecdfbb | 8194 | $as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h |
a9322a30 TT |
8195 | |
8196 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
8197 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
8198 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
8199 | fi | |
8200 | ||
cb01cfba JB |
8201 | opt_curses=no |
8202 | ||
81ecdfbb RW |
8203 | # Check whether --with-curses was given. |
8204 | if test "${with_curses+set}" = set; then : | |
8205 | withval=$with_curses; opt_curses=$withval | |
8206 | fi | |
8207 | ||
cb01cfba | 8208 | |
76a39ba7 | 8209 | prefer_curses=no |
cb01cfba | 8210 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 8211 | prefer_curses=yes |
cb01cfba JB |
8212 | fi |
8213 | ||
a9322a30 | 8214 | # Profiling support. |
81ecdfbb RW |
8215 | # Check whether --enable-profiling was given. |
8216 | if test "${enable_profiling+set}" = set; then : | |
8217 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
8218 | yes | no) |
8219 | ;; | |
8220 | *) | |
81ecdfbb | 8221 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
8222 | esac |
8223 | else | |
8224 | enable_profiling=no | |
81ecdfbb | 8225 | fi |
bec39cab | 8226 | |
a9322a30 TT |
8227 | |
8228 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
8229 | do : |
8230 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8231 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8232 | eval as_val=\$$as_ac_var | |
8233 | if test "x$as_val" = x""yes; then : | |
8234 | cat >>confdefs.h <<_ACEOF | |
8235 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 8236 | _ACEOF |
a9322a30 | 8237 | |
81ecdfbb RW |
8238 | fi |
8239 | done | |
a9322a30 | 8240 | |
81ecdfbb RW |
8241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
8242 | $as_echo_n "checking for _etext... " >&6; } | |
8243 | if test "${ac_cv_var__etext+set}" = set; then : | |
8244 | $as_echo_n "(cached) " >&6 | |
8245 | else | |
8246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8247 | /* end confdefs.h. */ | |
8248 | #include <stdlib.h> | |
8249 | extern char _etext; | |
a9322a30 TT |
8250 | |
8251 | int | |
8252 | main () | |
8253 | { | |
8254 | free (&_etext); | |
8255 | ; | |
8256 | return 0; | |
8257 | } | |
bec39cab | 8258 | _ACEOF |
81ecdfbb | 8259 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8260 | ac_cv_var__etext=yes |
bec39cab | 8261 | else |
81ecdfbb | 8262 | ac_cv_var__etext=no |
bec39cab | 8263 | fi |
81ecdfbb RW |
8264 | rm -f core conftest.err conftest.$ac_objext \ |
8265 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8266 | fi |
81ecdfbb RW |
8267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
8268 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 8269 | if test $ac_cv_var__etext = yes; then |
60ca704f | 8270 | |
81ecdfbb | 8271 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 8272 | |
bec39cab | 8273 | fi |
81ecdfbb RW |
8274 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
8275 | $as_echo_n "checking for etext... " >&6; } | |
8276 | if test "${ac_cv_var_etext+set}" = set; then : | |
8277 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8278 | else |
81ecdfbb | 8279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8280 | /* end confdefs.h. */ |
a9322a30 TT |
8281 | #include <stdlib.h> |
8282 | extern char etext; | |
bec39cab AC |
8283 | |
8284 | int | |
8285 | main () | |
8286 | { | |
a9322a30 | 8287 | free (&etext); |
bec39cab AC |
8288 | ; |
8289 | return 0; | |
8290 | } | |
8291 | _ACEOF | |
81ecdfbb | 8292 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 8293 | ac_cv_var_etext=yes |
bec39cab | 8294 | else |
81ecdfbb | 8295 | ac_cv_var_etext=no |
bec39cab | 8296 | fi |
81ecdfbb RW |
8297 | rm -f core conftest.err conftest.$ac_objext \ |
8298 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8299 | fi |
81ecdfbb RW |
8300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
8301 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
8302 | if test $ac_cv_var_etext = yes; then |
8303 | ||
81ecdfbb | 8304 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
8305 | |
8306 | fi | |
a9322a30 TT |
8307 | if test "$enable_profiling" = yes ; then |
8308 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 8309 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
8310 | fi |
8311 | PROFILE_CFLAGS=-pg | |
8312 | OLD_CFLAGS="$CFLAGS" | |
8313 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 8314 | |
81ecdfbb RW |
8315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
8316 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
8317 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
8318 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8319 | else |
81ecdfbb | 8320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8321 | /* end confdefs.h. */ |
bec39cab AC |
8322 | |
8323 | int | |
8324 | main () | |
8325 | { | |
a9322a30 | 8326 | int x; |
bec39cab AC |
8327 | ; |
8328 | return 0; | |
8329 | } | |
8330 | _ACEOF | |
81ecdfbb | 8331 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 8332 | ac_cv_cc_supports_pg=yes |
bec39cab | 8333 | else |
81ecdfbb | 8334 | ac_cv_cc_supports_pg=no |
bec39cab | 8335 | fi |
81ecdfbb | 8336 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8337 | fi |
81ecdfbb RW |
8338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
8339 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 8340 | |
a9322a30 | 8341 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 8342 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 8343 | fi |
bec39cab | 8344 | |
a9322a30 | 8345 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
8346 | fi |
8347 | ||
c16158bc JM |
8348 | |
8349 | ||
81ecdfbb RW |
8350 | # Check whether --with-pkgversion was given. |
8351 | if test "${with_pkgversion+set}" = set; then : | |
8352 | withval=$with_pkgversion; case "$withval" in | |
8353 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8354 | no) PKGVERSION= ;; |
8355 | *) PKGVERSION="($withval) " ;; | |
8356 | esac | |
8357 | else | |
8358 | PKGVERSION="(GDB) " | |
8359 | ||
81ecdfbb | 8360 | fi |
c16158bc JM |
8361 | |
8362 | ||
8363 | ||
8364 | ||
81ecdfbb RW |
8365 | |
8366 | # Check whether --with-bugurl was given. | |
8367 | if test "${with_bugurl+set}" = set; then : | |
8368 | withval=$with_bugurl; case "$withval" in | |
8369 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
8370 | no) BUGURL= |
8371 | ;; | |
8372 | *) BUGURL="$withval" | |
8373 | ;; | |
8374 | esac | |
8375 | else | |
8376 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
8377 | ||
81ecdfbb RW |
8378 | fi |
8379 | ||
c16158bc JM |
8380 | case ${BUGURL} in |
8381 | "") | |
8382 | REPORT_BUGS_TO= | |
8383 | REPORT_BUGS_TEXI= | |
8384 | ;; | |
8385 | *) | |
8386 | REPORT_BUGS_TO="<$BUGURL>" | |
8387 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
8388 | ;; | |
8389 | esac; | |
8390 | ||
8391 | ||
8392 | ||
8393 | ||
8394 | cat >>confdefs.h <<_ACEOF | |
8395 | #define PKGVERSION "$PKGVERSION" | |
8396 | _ACEOF | |
8397 | ||
8398 | ||
8399 | cat >>confdefs.h <<_ACEOF | |
8400 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
8401 | _ACEOF | |
8402 | ||
8403 | ||
bec39cab AC |
8404 | # --------------------- # |
8405 | # Checks for programs. # | |
8406 | # --------------------- # | |
8407 | ||
8408 | for ac_prog in gawk mawk nawk awk | |
8409 | do | |
8410 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8411 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8413 | $as_echo_n "checking for $ac_word... " >&6; } | |
8414 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
8415 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8416 | else |
8417 | if test -n "$AWK"; then | |
8418 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
8419 | else | |
8420 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8421 | for as_dir in $PATH | |
8422 | do | |
8423 | IFS=$as_save_IFS | |
8424 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8425 | for ac_exec_ext in '' $ac_executable_extensions; do |
8426 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8427 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 8428 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8429 | break 2 |
8430 | fi | |
8431 | done | |
81ecdfbb RW |
8432 | done |
8433 | IFS=$as_save_IFS | |
bec39cab AC |
8434 | |
8435 | fi | |
8436 | fi | |
8437 | AWK=$ac_cv_prog_AWK | |
8438 | if test -n "$AWK"; then | |
81ecdfbb RW |
8439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
8440 | $as_echo "$AWK" >&6; } | |
bec39cab | 8441 | else |
81ecdfbb RW |
8442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8443 | $as_echo "no" >&6; } | |
bec39cab AC |
8444 | fi |
8445 | ||
bec39cab | 8446 | |
81ecdfbb | 8447 | test -n "$AWK" && break |
bec39cab AC |
8448 | done |
8449 | ||
bec39cab | 8450 | |
81ecdfbb RW |
8451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
8452 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
8453 | LN_S=$as_ln_s |
8454 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
8455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
8456 | $as_echo "yes" >&6; } | |
bec39cab | 8457 | else |
81ecdfbb RW |
8458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
8459 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
8460 | fi |
8461 | ||
8462 | if test -n "$ac_tool_prefix"; then | |
8463 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
8464 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
8465 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8466 | $as_echo_n "checking for $ac_word... " >&6; } | |
8467 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
8468 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8469 | else |
8470 | if test -n "$RANLIB"; then | |
8471 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
8472 | else | |
8473 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8474 | for as_dir in $PATH | |
8475 | do | |
8476 | IFS=$as_save_IFS | |
8477 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8478 | for ac_exec_ext in '' $ac_executable_extensions; do |
8479 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8480 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 8481 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8482 | break 2 |
8483 | fi | |
8484 | done | |
81ecdfbb RW |
8485 | done |
8486 | IFS=$as_save_IFS | |
bec39cab AC |
8487 | |
8488 | fi | |
8489 | fi | |
8490 | RANLIB=$ac_cv_prog_RANLIB | |
8491 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
8492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
8493 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 8494 | else |
81ecdfbb RW |
8495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8496 | $as_echo "no" >&6; } | |
bec39cab AC |
8497 | fi |
8498 | ||
81ecdfbb | 8499 | |
bec39cab AC |
8500 | fi |
8501 | if test -z "$ac_cv_prog_RANLIB"; then | |
8502 | ac_ct_RANLIB=$RANLIB | |
8503 | # Extract the first word of "ranlib", so it can be a program name with args. | |
8504 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
8505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8506 | $as_echo_n "checking for $ac_word... " >&6; } | |
8507 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
8508 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8509 | else |
8510 | if test -n "$ac_ct_RANLIB"; then | |
8511 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
8512 | else | |
8513 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8514 | for as_dir in $PATH | |
8515 | do | |
8516 | IFS=$as_save_IFS | |
8517 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8518 | for ac_exec_ext in '' $ac_executable_extensions; do |
8519 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8520 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 8521 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8522 | break 2 |
8523 | fi | |
8524 | done | |
81ecdfbb RW |
8525 | done |
8526 | IFS=$as_save_IFS | |
bec39cab | 8527 | |
bec39cab AC |
8528 | fi |
8529 | fi | |
8530 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
8531 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
8532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
8533 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 8534 | else |
81ecdfbb RW |
8535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8536 | $as_echo "no" >&6; } | |
bec39cab AC |
8537 | fi |
8538 | ||
81ecdfbb RW |
8539 | if test "x$ac_ct_RANLIB" = x; then |
8540 | RANLIB=":" | |
8541 | else | |
8542 | case $cross_compiling:$ac_tool_warned in | |
8543 | yes:) | |
8544 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8545 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8546 | ac_tool_warned=yes ;; | |
8547 | esac | |
8548 | RANLIB=$ac_ct_RANLIB | |
8549 | fi | |
bec39cab AC |
8550 | else |
8551 | RANLIB="$ac_cv_prog_RANLIB" | |
8552 | fi | |
8553 | ||
8554 | for ac_prog in 'bison -y' byacc | |
8555 | do | |
8556 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8557 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8559 | $as_echo_n "checking for $ac_word... " >&6; } | |
8560 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
8561 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8562 | else |
8563 | if test -n "$YACC"; then | |
8564 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
8565 | else | |
8566 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8567 | for as_dir in $PATH | |
8568 | do | |
8569 | IFS=$as_save_IFS | |
8570 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8571 | for ac_exec_ext in '' $ac_executable_extensions; do |
8572 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8573 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 8574 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8575 | break 2 |
8576 | fi | |
8577 | done | |
81ecdfbb RW |
8578 | done |
8579 | IFS=$as_save_IFS | |
bec39cab AC |
8580 | |
8581 | fi | |
8582 | fi | |
8583 | YACC=$ac_cv_prog_YACC | |
8584 | if test -n "$YACC"; then | |
81ecdfbb RW |
8585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
8586 | $as_echo "$YACC" >&6; } | |
bec39cab | 8587 | else |
81ecdfbb RW |
8588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8589 | $as_echo "no" >&6; } | |
bec39cab AC |
8590 | fi |
8591 | ||
81ecdfbb | 8592 | |
bec39cab AC |
8593 | test -n "$YACC" && break |
8594 | done | |
8595 | test -n "$YACC" || YACC="yacc" | |
8596 | ||
8597 | ||
8598 | if test -n "$ac_tool_prefix"; then | |
8599 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
8600 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
8601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8602 | $as_echo_n "checking for $ac_word... " >&6; } | |
8603 | if test "${ac_cv_prog_AR+set}" = set; then : | |
8604 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8605 | else |
8606 | if test -n "$AR"; then | |
8607 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
8608 | else | |
8609 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8610 | for as_dir in $PATH | |
8611 | do | |
8612 | IFS=$as_save_IFS | |
8613 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8614 | for ac_exec_ext in '' $ac_executable_extensions; do |
8615 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8616 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 8617 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8618 | break 2 |
8619 | fi | |
8620 | done | |
81ecdfbb RW |
8621 | done |
8622 | IFS=$as_save_IFS | |
bec39cab AC |
8623 | |
8624 | fi | |
8625 | fi | |
8626 | AR=$ac_cv_prog_AR | |
8627 | if test -n "$AR"; then | |
81ecdfbb RW |
8628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
8629 | $as_echo "$AR" >&6; } | |
bec39cab | 8630 | else |
81ecdfbb RW |
8631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8632 | $as_echo "no" >&6; } | |
bec39cab AC |
8633 | fi |
8634 | ||
81ecdfbb | 8635 | |
bec39cab AC |
8636 | fi |
8637 | if test -z "$ac_cv_prog_AR"; then | |
8638 | ac_ct_AR=$AR | |
8639 | # Extract the first word of "ar", so it can be a program name with args. | |
8640 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
8641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8642 | $as_echo_n "checking for $ac_word... " >&6; } | |
8643 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
8644 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8645 | else |
8646 | if test -n "$ac_ct_AR"; then | |
8647 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
8648 | else | |
8649 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8650 | for as_dir in $PATH | |
8651 | do | |
8652 | IFS=$as_save_IFS | |
8653 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8654 | for ac_exec_ext in '' $ac_executable_extensions; do |
8655 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8656 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 8657 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8658 | break 2 |
8659 | fi | |
8660 | done | |
81ecdfbb RW |
8661 | done |
8662 | IFS=$as_save_IFS | |
bec39cab AC |
8663 | |
8664 | fi | |
8665 | fi | |
8666 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
8667 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
8668 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
8669 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 8670 | else |
81ecdfbb RW |
8671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8672 | $as_echo "no" >&6; } | |
bec39cab AC |
8673 | fi |
8674 | ||
81ecdfbb RW |
8675 | if test "x$ac_ct_AR" = x; then |
8676 | AR="" | |
8677 | else | |
8678 | case $cross_compiling:$ac_tool_warned in | |
8679 | yes:) | |
8680 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8681 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8682 | ac_tool_warned=yes ;; | |
8683 | esac | |
8684 | AR=$ac_ct_AR | |
8685 | fi | |
bec39cab AC |
8686 | else |
8687 | AR="$ac_cv_prog_AR" | |
8688 | fi | |
8689 | ||
8690 | if test -n "$ac_tool_prefix"; then | |
8691 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
8692 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
8693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8694 | $as_echo_n "checking for $ac_word... " >&6; } | |
8695 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
8696 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8697 | else |
8698 | if test -n "$DLLTOOL"; then | |
8699 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
8700 | else | |
8701 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8702 | for as_dir in $PATH | |
8703 | do | |
8704 | IFS=$as_save_IFS | |
8705 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8706 | for ac_exec_ext in '' $ac_executable_extensions; do |
8707 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8708 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 8709 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8710 | break 2 |
8711 | fi | |
8712 | done | |
81ecdfbb RW |
8713 | done |
8714 | IFS=$as_save_IFS | |
bec39cab AC |
8715 | |
8716 | fi | |
8717 | fi | |
8718 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
8719 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
8720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
8721 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 8722 | else |
81ecdfbb RW |
8723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8724 | $as_echo "no" >&6; } | |
bec39cab AC |
8725 | fi |
8726 | ||
81ecdfbb | 8727 | |
bec39cab AC |
8728 | fi |
8729 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
8730 | ac_ct_DLLTOOL=$DLLTOOL | |
8731 | # Extract the first word of "dlltool", so it can be a program name with args. | |
8732 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
8733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8734 | $as_echo_n "checking for $ac_word... " >&6; } | |
8735 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
8736 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8737 | else |
8738 | if test -n "$ac_ct_DLLTOOL"; then | |
8739 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
8740 | else | |
8741 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8742 | for as_dir in $PATH | |
8743 | do | |
8744 | IFS=$as_save_IFS | |
8745 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8746 | for ac_exec_ext in '' $ac_executable_extensions; do |
8747 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8748 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 8749 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8750 | break 2 |
8751 | fi | |
8752 | done | |
81ecdfbb RW |
8753 | done |
8754 | IFS=$as_save_IFS | |
bec39cab AC |
8755 | |
8756 | fi | |
8757 | fi | |
8758 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
8759 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
8760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
8761 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 8762 | else |
81ecdfbb RW |
8763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8764 | $as_echo "no" >&6; } | |
bec39cab AC |
8765 | fi |
8766 | ||
81ecdfbb RW |
8767 | if test "x$ac_ct_DLLTOOL" = x; then |
8768 | DLLTOOL="" | |
8769 | else | |
8770 | case $cross_compiling:$ac_tool_warned in | |
8771 | yes:) | |
8772 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8773 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8774 | ac_tool_warned=yes ;; | |
8775 | esac | |
8776 | DLLTOOL=$ac_ct_DLLTOOL | |
8777 | fi | |
bec39cab AC |
8778 | else |
8779 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
8780 | fi | |
8781 | ||
8782 | if test -n "$ac_tool_prefix"; then | |
8783 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
8784 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
8785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8786 | $as_echo_n "checking for $ac_word... " >&6; } | |
8787 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
8788 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8789 | else |
8790 | if test -n "$WINDRES"; then | |
8791 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
8792 | else | |
8793 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8794 | for as_dir in $PATH | |
8795 | do | |
8796 | IFS=$as_save_IFS | |
8797 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8798 | for ac_exec_ext in '' $ac_executable_extensions; do |
8799 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8800 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 8801 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8802 | break 2 |
8803 | fi | |
8804 | done | |
81ecdfbb RW |
8805 | done |
8806 | IFS=$as_save_IFS | |
bec39cab AC |
8807 | |
8808 | fi | |
8809 | fi | |
8810 | WINDRES=$ac_cv_prog_WINDRES | |
8811 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
8812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
8813 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 8814 | else |
81ecdfbb RW |
8815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8816 | $as_echo "no" >&6; } | |
bec39cab AC |
8817 | fi |
8818 | ||
81ecdfbb | 8819 | |
bec39cab AC |
8820 | fi |
8821 | if test -z "$ac_cv_prog_WINDRES"; then | |
8822 | ac_ct_WINDRES=$WINDRES | |
8823 | # Extract the first word of "windres", so it can be a program name with args. | |
8824 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
8825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8826 | $as_echo_n "checking for $ac_word... " >&6; } | |
8827 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
8828 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8829 | else |
8830 | if test -n "$ac_ct_WINDRES"; then | |
8831 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
8832 | else | |
8833 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8834 | for as_dir in $PATH | |
8835 | do | |
8836 | IFS=$as_save_IFS | |
8837 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8838 | for ac_exec_ext in '' $ac_executable_extensions; do |
8839 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8840 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 8841 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8842 | break 2 |
8843 | fi | |
8844 | done | |
81ecdfbb RW |
8845 | done |
8846 | IFS=$as_save_IFS | |
bec39cab AC |
8847 | |
8848 | fi | |
8849 | fi | |
8850 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
8851 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
8852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
8853 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 8854 | else |
81ecdfbb RW |
8855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8856 | $as_echo "no" >&6; } | |
c906108c | 8857 | fi |
bec39cab | 8858 | |
81ecdfbb RW |
8859 | if test "x$ac_ct_WINDRES" = x; then |
8860 | WINDRES="" | |
8861 | else | |
8862 | case $cross_compiling:$ac_tool_warned in | |
8863 | yes:) | |
8864 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8865 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8866 | ac_tool_warned=yes ;; | |
8867 | esac | |
8868 | WINDRES=$ac_ct_WINDRES | |
8869 | fi | |
c906108c | 8870 | else |
bec39cab | 8871 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
8872 | fi |
8873 | ||
bec39cab AC |
8874 | |
8875 | # Needed for GNU/Hurd. | |
8876 | if test -n "$ac_tool_prefix"; then | |
8877 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
8878 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
8879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8880 | $as_echo_n "checking for $ac_word... " >&6; } | |
8881 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
8882 | $as_echo_n "(cached) " >&6 | |
c906108c | 8883 | else |
bec39cab AC |
8884 | if test -n "$MIG"; then |
8885 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
8886 | else | |
8887 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8888 | for as_dir in $PATH | |
8889 | do | |
8890 | IFS=$as_save_IFS | |
8891 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8892 | for ac_exec_ext in '' $ac_executable_extensions; do |
8893 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8894 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 8895 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8896 | break 2 |
8897 | fi | |
8898 | done | |
81ecdfbb RW |
8899 | done |
8900 | IFS=$as_save_IFS | |
bec39cab | 8901 | |
c906108c | 8902 | fi |
bec39cab AC |
8903 | fi |
8904 | MIG=$ac_cv_prog_MIG | |
8905 | if test -n "$MIG"; then | |
81ecdfbb RW |
8906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
8907 | $as_echo "$MIG" >&6; } | |
c906108c | 8908 | else |
81ecdfbb RW |
8909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8910 | $as_echo "no" >&6; } | |
c906108c SS |
8911 | fi |
8912 | ||
81ecdfbb | 8913 | |
bec39cab AC |
8914 | fi |
8915 | if test -z "$ac_cv_prog_MIG"; then | |
8916 | ac_ct_MIG=$MIG | |
8917 | # Extract the first word of "mig", so it can be a program name with args. | |
8918 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
8919 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8920 | $as_echo_n "checking for $ac_word... " >&6; } | |
8921 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
8922 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8923 | else |
8924 | if test -n "$ac_ct_MIG"; then | |
8925 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8926 | else | |
8927 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8928 | for as_dir in $PATH | |
8929 | do | |
8930 | IFS=$as_save_IFS | |
8931 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8932 | for ac_exec_ext in '' $ac_executable_extensions; do |
8933 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 8934 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8935 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8936 | break 2 |
8937 | fi | |
8938 | done | |
81ecdfbb RW |
8939 | done |
8940 | IFS=$as_save_IFS | |
c906108c | 8941 | |
bec39cab AC |
8942 | fi |
8943 | fi | |
8944 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8945 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8947 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8948 | else |
81ecdfbb RW |
8949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8950 | $as_echo "no" >&6; } | |
bec39cab | 8951 | fi |
c906108c | 8952 | |
81ecdfbb RW |
8953 | if test "x$ac_ct_MIG" = x; then |
8954 | MIG="" | |
8955 | else | |
8956 | case $cross_compiling:$ac_tool_warned in | |
8957 | yes:) | |
8958 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8959 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8960 | ac_tool_warned=yes ;; | |
8961 | esac | |
8962 | MIG=$ac_ct_MIG | |
8963 | fi | |
bec39cab AC |
8964 | else |
8965 | MIG="$ac_cv_prog_MIG" | |
8966 | fi | |
c906108c | 8967 | |
c906108c | 8968 | |
bec39cab AC |
8969 | # ---------------------- # |
8970 | # Checks for libraries. # | |
8971 | # ---------------------- # | |
c906108c | 8972 | |
bec39cab | 8973 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8975 | $as_echo_n "checking for main in -lm... " >&6; } | |
8976 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
8977 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
8978 | else |
8979 | ac_check_lib_save_LIBS=$LIBS | |
8980 | LIBS="-lm $LIBS" | |
81ecdfbb | 8981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8982 | /* end confdefs.h. */ |
c906108c | 8983 | |
c906108c | 8984 | |
bec39cab AC |
8985 | int |
8986 | main () | |
8987 | { | |
81ecdfbb | 8988 | return main (); |
bec39cab AC |
8989 | ; |
8990 | return 0; | |
8991 | } | |
8992 | _ACEOF | |
81ecdfbb | 8993 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8994 | ac_cv_lib_m_main=yes |
8995 | else | |
81ecdfbb | 8996 | ac_cv_lib_m_main=no |
bec39cab | 8997 | fi |
81ecdfbb RW |
8998 | rm -f core conftest.err conftest.$ac_objext \ |
8999 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
9000 | LIBS=$ac_check_lib_save_LIBS |
9001 | fi | |
81ecdfbb RW |
9002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
9003 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
9004 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
9005 | cat >>confdefs.h <<_ACEOF |
9006 | #define HAVE_LIBM 1 | |
9007 | _ACEOF | |
9008 | ||
9009 | LIBS="-lm $LIBS" | |
c906108c | 9010 | |
c906108c | 9011 | fi |
bec39cab AC |
9012 | |
9013 | ||
9014 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
9015 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
9016 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
9017 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
9018 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
9019 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 9020 | |
c906108c | 9021 | else |
81ecdfbb RW |
9022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
9023 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
9024 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
9025 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9026 | else |
9027 | ac_check_lib_save_LIBS=$LIBS | |
9028 | LIBS="-lw $LIBS" | |
81ecdfbb | 9029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9030 | /* end confdefs.h. */ |
c906108c | 9031 | |
81ecdfbb RW |
9032 | /* Override any GCC internal prototype to avoid an error. |
9033 | Use char because int might match the return type of a GCC | |
9034 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9035 | #ifdef __cplusplus |
9036 | extern "C" | |
9037 | #endif | |
bec39cab AC |
9038 | char wctype (); |
9039 | int | |
9040 | main () | |
9041 | { | |
81ecdfbb | 9042 | return wctype (); |
bec39cab AC |
9043 | ; |
9044 | return 0; | |
9045 | } | |
9046 | _ACEOF | |
81ecdfbb | 9047 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
9048 | ac_cv_lib_w_wctype=yes |
9049 | else | |
81ecdfbb | 9050 | ac_cv_lib_w_wctype=no |
bec39cab | 9051 | fi |
81ecdfbb RW |
9052 | rm -f core conftest.err conftest.$ac_objext \ |
9053 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
9054 | LIBS=$ac_check_lib_save_LIBS |
9055 | fi | |
81ecdfbb RW |
9056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
9057 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
9058 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
9059 | cat >>confdefs.h <<_ACEOF |
9060 | #define HAVE_LIBW 1 | |
9061 | _ACEOF | |
c906108c | 9062 | |
bec39cab | 9063 | LIBS="-lw $LIBS" |
c906108c | 9064 | |
bec39cab | 9065 | fi |
c906108c | 9066 | |
bec39cab | 9067 | fi |
c906108c | 9068 | |
ddc9cd0f | 9069 | |
bec39cab | 9070 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
9071 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
9072 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
9073 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9074 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9075 | else |
9076 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9078 | /* end confdefs.h. */ |
ddc9cd0f | 9079 | |
81ecdfbb RW |
9080 | /* Override any GCC internal prototype to avoid an error. |
9081 | Use char because int might match the return type of a GCC | |
9082 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9083 | #ifdef __cplusplus |
9084 | extern "C" | |
9085 | #endif | |
bec39cab AC |
9086 | char gethostbyname (); |
9087 | int | |
9088 | main () | |
9089 | { | |
81ecdfbb | 9090 | return gethostbyname (); |
bec39cab AC |
9091 | ; |
9092 | return 0; | |
9093 | } | |
9094 | _ACEOF | |
81ecdfbb RW |
9095 | for ac_lib in '' nsl; do |
9096 | if test -z "$ac_lib"; then | |
9097 | ac_res="none required" | |
9098 | else | |
9099 | ac_res=-l$ac_lib | |
b4e70030 | 9100 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9101 | fi |
9102 | if ac_fn_c_try_link "$LINENO"; then : | |
9103 | ac_cv_search_gethostbyname=$ac_res | |
9104 | fi | |
9105 | rm -f core conftest.err conftest.$ac_objext \ | |
9106 | conftest$ac_exeext | |
9107 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
9108 | break | |
9109 | fi | |
9110 | done | |
9111 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 9112 | |
bec39cab | 9113 | else |
81ecdfbb | 9114 | ac_cv_search_gethostbyname=no |
bec39cab | 9115 | fi |
81ecdfbb | 9116 | rm conftest.$ac_ext |
bec39cab AC |
9117 | LIBS=$ac_func_search_save_LIBS |
9118 | fi | |
81ecdfbb RW |
9119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
9120 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
9121 | ac_res=$ac_cv_search_gethostbyname | |
9122 | if test "$ac_res" != no; then : | |
9123 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 9124 | |
bec39cab | 9125 | fi |
96baa820 | 9126 | |
c906108c | 9127 | |
b4e70030 | 9128 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
9129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
9130 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
9131 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9132 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
9133 | else |
9134 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9136 | /* end confdefs.h. */ |
9137 | ||
81ecdfbb RW |
9138 | /* Override any GCC internal prototype to avoid an error. |
9139 | Use char because int might match the return type of a GCC | |
9140 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
9141 | #ifdef __cplusplus |
9142 | extern "C" | |
9143 | #endif | |
b4e70030 JB |
9144 | char socketpair (); |
9145 | int | |
9146 | main () | |
9147 | { | |
81ecdfbb | 9148 | return socketpair (); |
b4e70030 JB |
9149 | ; |
9150 | return 0; | |
9151 | } | |
9152 | _ACEOF | |
81ecdfbb RW |
9153 | for ac_lib in '' socket; do |
9154 | if test -z "$ac_lib"; then | |
9155 | ac_res="none required" | |
9156 | else | |
9157 | ac_res=-l$ac_lib | |
b4e70030 | 9158 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9159 | fi |
9160 | if ac_fn_c_try_link "$LINENO"; then : | |
9161 | ac_cv_search_socketpair=$ac_res | |
9162 | fi | |
9163 | rm -f core conftest.err conftest.$ac_objext \ | |
9164 | conftest$ac_exeext | |
9165 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
9166 | break | |
9167 | fi | |
9168 | done | |
9169 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 9170 | |
b4e70030 | 9171 | else |
81ecdfbb | 9172 | ac_cv_search_socketpair=no |
b4e70030 | 9173 | fi |
81ecdfbb | 9174 | rm conftest.$ac_ext |
b4e70030 JB |
9175 | LIBS=$ac_func_search_save_LIBS |
9176 | fi | |
81ecdfbb RW |
9177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
9178 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
9179 | ac_res=$ac_cv_search_socketpair | |
9180 | if test "$ac_res" != no; then : | |
9181 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
9182 | |
9183 | fi | |
9184 | ||
9185 | ||
233a11ab | 9186 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
9187 | |
9188 | # See if the user specified whether he wants zlib support or not. | |
9189 | ||
9190 | # Check whether --with-zlib was given. | |
9191 | if test "${with_zlib+set}" = set; then : | |
9192 | withval=$with_zlib; | |
9193 | else | |
9194 | with_zlib=auto | |
9195 | fi | |
9196 | ||
9197 | ||
9198 | if test "$with_zlib" != "no"; then | |
9199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
9200 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
9201 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9202 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
9203 | else |
9204 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9205 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
9206 | /* end confdefs.h. */ |
9207 | ||
81ecdfbb RW |
9208 | /* Override any GCC internal prototype to avoid an error. |
9209 | Use char because int might match the return type of a GCC | |
233a11ab | 9210 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
9211 | #ifdef __cplusplus |
9212 | extern "C" | |
9213 | #endif | |
233a11ab CS |
9214 | char zlibVersion (); |
9215 | int | |
9216 | main () | |
9217 | { | |
81ecdfbb | 9218 | return zlibVersion (); |
233a11ab CS |
9219 | ; |
9220 | return 0; | |
9221 | } | |
9222 | _ACEOF | |
81ecdfbb RW |
9223 | for ac_lib in '' z; do |
9224 | if test -z "$ac_lib"; then | |
9225 | ac_res="none required" | |
233a11ab | 9226 | else |
81ecdfbb RW |
9227 | ac_res=-l$ac_lib |
9228 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 9229 | fi |
81ecdfbb RW |
9230 | if ac_fn_c_try_link "$LINENO"; then : |
9231 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 9232 | fi |
81ecdfbb RW |
9233 | rm -f core conftest.err conftest.$ac_objext \ |
9234 | conftest$ac_exeext | |
9235 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
9236 | break | |
233a11ab | 9237 | fi |
81ecdfbb RW |
9238 | done |
9239 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 9240 | |
233a11ab | 9241 | else |
81ecdfbb | 9242 | ac_cv_search_zlibVersion=no |
233a11ab | 9243 | fi |
81ecdfbb RW |
9244 | rm conftest.$ac_ext |
9245 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 9246 | fi |
81ecdfbb RW |
9247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
9248 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
9249 | ac_res=$ac_cv_search_zlibVersion | |
9250 | if test "$ac_res" != no; then : | |
9251 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9252 | for ac_header in zlib.h | |
9253 | do : | |
9254 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
9255 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 9256 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9257 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
9258 | _ACEOF |
9259 | ||
9260 | fi | |
9261 | ||
9262 | done | |
9263 | ||
9264 | fi | |
9265 | ||
b040ad30 JB |
9266 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
9267 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
9268 | fi | |
9269 | fi | |
9270 | ||
233a11ab | 9271 | |
77f120bf | 9272 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
9273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
9274 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
9275 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9276 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9277 | else |
9278 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9280 | /* end confdefs.h. */ |
c906108c | 9281 | |
81ecdfbb RW |
9282 | /* Override any GCC internal prototype to avoid an error. |
9283 | Use char because int might match the return type of a GCC | |
9284 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9285 | #ifdef __cplusplus |
9286 | extern "C" | |
9287 | #endif | |
77f120bf | 9288 | char dlgetmodinfo (); |
bec39cab AC |
9289 | int |
9290 | main () | |
9291 | { | |
81ecdfbb | 9292 | return dlgetmodinfo (); |
bec39cab AC |
9293 | ; |
9294 | return 0; | |
9295 | } | |
9296 | _ACEOF | |
81ecdfbb RW |
9297 | for ac_lib in '' dl xpdl; do |
9298 | if test -z "$ac_lib"; then | |
9299 | ac_res="none required" | |
9300 | else | |
9301 | ac_res=-l$ac_lib | |
b4e70030 | 9302 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9303 | fi |
9304 | if ac_fn_c_try_link "$LINENO"; then : | |
9305 | ac_cv_search_dlgetmodinfo=$ac_res | |
9306 | fi | |
9307 | rm -f core conftest.err conftest.$ac_objext \ | |
9308 | conftest$ac_exeext | |
9309 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
9310 | break | |
9311 | fi | |
9312 | done | |
9313 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 9314 | |
4e8d927d | 9315 | else |
81ecdfbb | 9316 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 9317 | fi |
81ecdfbb | 9318 | rm conftest.$ac_ext |
bec39cab AC |
9319 | LIBS=$ac_func_search_save_LIBS |
9320 | fi | |
81ecdfbb RW |
9321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
9322 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
9323 | ac_res=$ac_cv_search_dlgetmodinfo | |
9324 | if test "$ac_res" != no; then : | |
9325 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 9326 | |
8bb2c122 | 9327 | fi |
8bb2c122 | 9328 | |
8bb2c122 | 9329 | |
77f120bf | 9330 | |
77f120bf | 9331 | |
6c7a06a3 | 9332 | |
81ecdfbb RW |
9333 | # Check whether --with-libiconv-prefix was given. |
9334 | if test "${with_libiconv_prefix+set}" = set; then : | |
9335 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 9336 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
9337 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
9338 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
9339 | done |
9340 | ||
81ecdfbb RW |
9341 | fi |
9342 | ||
6c7a06a3 | 9343 | |
f18c4681 | 9344 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
9345 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
9346 | ||
81ecdfbb RW |
9347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
9348 | $as_echo_n "checking for iconv... " >&6; } | |
9349 | if test "${am_cv_func_iconv+set}" = set; then : | |
9350 | $as_echo_n "(cached) " >&6 | |
d542061a | 9351 | else |
6c7a06a3 TT |
9352 | |
9353 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
9354 | am_cv_lib_iconv=no | |
9355 | am_cv_use_build_libiconv=no | |
f0f20949 | 9356 | am_cv_build_libiconv_path= |
4edb1e84 JB |
9357 | |
9358 | # If libiconv is part of the build tree, then try using it over | |
9359 | # any system iconv. | |
9360 | if test -d ../libiconv; then | |
f18c4681 JB |
9361 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
9362 | am_save_LIBS="$LIBS" | |
9363 | am_save_CPPFLAGS="$CPPFLAGS" | |
9364 | LIBS="$LIBS $lib_dir/libiconv.a" | |
9365 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
9366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 9367 | /* end confdefs.h. */ |
6c7a06a3 TT |
9368 | #include <stdlib.h> |
9369 | #include <iconv.h> | |
d542061a UW |
9370 | int |
9371 | main () | |
9372 | { | |
6c7a06a3 | 9373 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
9374 | iconv(cd,NULL,NULL,NULL,NULL); |
9375 | iconv_close(cd); | |
d542061a UW |
9376 | ; |
9377 | return 0; | |
9378 | } | |
9379 | _ACEOF | |
81ecdfbb | 9380 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9381 | am_cv_use_build_libiconv=yes |
f0f20949 | 9382 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
9383 | am_cv_lib_iconv=yes |
9384 | am_cv_func_iconv=yes | |
d542061a | 9385 | fi |
81ecdfbb RW |
9386 | rm -f core conftest.err conftest.$ac_objext \ |
9387 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
9388 | LIBS="$am_save_LIBS" |
9389 | CPPFLAGS="$am_save_CPPFLAGS" | |
9390 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
9391 | break |
9392 | fi | |
9393 | done | |
4edb1e84 | 9394 | fi |
94ae1714 | 9395 | |
4edb1e84 | 9396 | # Next, try to find iconv in libc. |
6c7a06a3 | 9397 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 9398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 9399 | /* end confdefs.h. */ |
6c7a06a3 TT |
9400 | #include <stdlib.h> |
9401 | #include <iconv.h> | |
d542061a UW |
9402 | int |
9403 | main () | |
9404 | { | |
6c7a06a3 TT |
9405 | iconv_t cd = iconv_open("",""); |
9406 | iconv(cd,NULL,NULL,NULL,NULL); | |
9407 | iconv_close(cd); | |
d542061a UW |
9408 | ; |
9409 | return 0; | |
9410 | } | |
9411 | _ACEOF | |
81ecdfbb | 9412 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9413 | am_cv_func_iconv=yes |
d542061a | 9414 | fi |
81ecdfbb RW |
9415 | rm -f core conftest.err conftest.$ac_objext \ |
9416 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 9417 | fi |
94ae1714 | 9418 | |
4edb1e84 JB |
9419 | # If iconv was not in libc, try -liconv. In this case, arrange to |
9420 | # look in the libiconv prefix, if it was specified by the user. | |
9421 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 9422 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
9423 | am_save_LIBS="$LIBS" |
9424 | if test -n "$LIBICONV_INCLUDE"; then | |
9425 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9426 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
9427 | fi | |
9428 | LIBS="$LIBS -liconv" | |
81ecdfbb | 9429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9430 | /* end confdefs.h. */ |
6c7a06a3 TT |
9431 | #include <stdlib.h> |
9432 | #include <iconv.h> | |
bec39cab AC |
9433 | int |
9434 | main () | |
9435 | { | |
6c7a06a3 TT |
9436 | iconv_t cd = iconv_open("",""); |
9437 | iconv(cd,NULL,NULL,NULL,NULL); | |
9438 | iconv_close(cd); | |
bec39cab AC |
9439 | ; |
9440 | return 0; | |
9441 | } | |
9442 | _ACEOF | |
81ecdfbb | 9443 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 9444 | am_cv_lib_iconv=yes |
6c7a06a3 | 9445 | am_cv_func_iconv=yes |
627af7ea | 9446 | fi |
81ecdfbb RW |
9447 | rm -f core conftest.err conftest.$ac_objext \ |
9448 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 9449 | LIBS="$am_save_LIBS" |
fc3b640d | 9450 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
9451 | fi |
9452 | ||
9453 | fi | |
81ecdfbb RW |
9454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
9455 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
9456 | |
9457 | # Set the various flags based on the cache variables. We can't rely | |
9458 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
9459 | LIBICONV= |
9460 | if test "$am_cv_lib_iconv" = yes; then | |
9461 | LIBICONV="-liconv" | |
94ae1714 TT |
9462 | else |
9463 | LIBICONV_LIBDIR= | |
9464 | LIBICONV_INCLUDE= | |
fc3b640d TT |
9465 | fi |
9466 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 9467 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 9468 | LIBICONV_LIBDIR="" |
fc3b640d TT |
9469 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
9470 | fi | |
9471 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
9472 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 9473 | |
6c7a06a3 TT |
9474 | if test "$am_cv_func_iconv" = yes; then |
9475 | ||
81ecdfbb | 9476 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 9477 | |
81ecdfbb RW |
9478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
9479 | $as_echo_n "checking for iconv declaration... " >&6; } | |
9480 | if test "${am_cv_proto_iconv+set}" = set; then : | |
9481 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9482 | else |
9483 | ||
81ecdfbb | 9484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
9485 | /* end confdefs.h. */ |
9486 | ||
6c7a06a3 TT |
9487 | #include <stdlib.h> |
9488 | #include <iconv.h> | |
9489 | extern | |
b4e70030 | 9490 | #ifdef __cplusplus |
6c7a06a3 | 9491 | "C" |
b4e70030 | 9492 | #endif |
6c7a06a3 TT |
9493 | #if defined(__STDC__) || defined(__cplusplus) |
9494 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
9495 | #else | |
9496 | size_t iconv(); | |
9497 | #endif | |
9498 | ||
b4e70030 JB |
9499 | int |
9500 | main () | |
9501 | { | |
6c7a06a3 | 9502 | |
b4e70030 JB |
9503 | ; |
9504 | return 0; | |
9505 | } | |
9506 | _ACEOF | |
81ecdfbb | 9507 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 9508 | am_cv_proto_iconv_arg1="" |
4e8d927d | 9509 | else |
81ecdfbb | 9510 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 9511 | fi |
81ecdfbb | 9512 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
9513 | 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);" |
9514 | fi | |
9515 | ||
9516 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 9517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 9518 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
9519 | $as_echo "${ac_t:- |
9520 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
9521 | |
9522 | cat >>confdefs.h <<_ACEOF | |
9523 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
9524 | _ACEOF | |
9525 | ||
9526 | fi | |
6c7a06a3 TT |
9527 | |
9528 | ||
9529 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. | |
9530 | # There is a very specific comment in /usr/include/curses.h explaining that | |
9531 | # termcap routines built into libcurses must not be used. | |
9532 | # | |
9533 | # The symptoms we observed so far is GDB unexpectedly changing | |
9534 | # the terminal settings when tgetent is called - this is particularly | |
9535 | # visible as the output is missing carriage returns, and so rapidly | |
9536 | # becomes very hard to read. | |
9537 | # | |
9538 | # The readline configure script has already decided that libtermcap | |
9539 | # was enough for its purposes, and so decided to build readline using | |
9540 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
9541 | # TUI enabled results in both libraries to be used at the same time, | |
9542 | # which is not allowed. This basically means that GDB with TUI is | |
9543 | # broken on alpha-osf. | |
9544 | ||
9545 | case $host_os in | |
6bcc772d RO |
9546 | osf* ) |
9547 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9548 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 9549 | fi |
6bcc772d | 9550 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
9551 | enable_tui=no |
9552 | fi | |
9553 | ;; | |
9554 | esac | |
9555 | ||
cb01cfba | 9556 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9557 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9558 | prefer_curses=yes |
9559 | fi | |
9560 | ||
9561 | curses_found=no | |
9562 | if test x"$prefer_curses" = xyes; then | |
9563 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9564 | # curses library because the latter might not provide all the | |
9565 | # functionality we need. However, this leads to problems on systems | |
9566 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9567 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9568 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9569 | # a situation. | |
81ecdfbb RW |
9570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9571 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
9572 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9573 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9574 | else |
9575 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9576 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9577 | /* end confdefs.h. */ |
9578 | ||
81ecdfbb RW |
9579 | /* Override any GCC internal prototype to avoid an error. |
9580 | Use char because int might match the return type of a GCC | |
9581 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9582 | #ifdef __cplusplus |
9583 | extern "C" | |
9584 | #endif | |
6c7a06a3 TT |
9585 | char waddstr (); |
9586 | int | |
9587 | main () | |
9588 | { | |
81ecdfbb | 9589 | return waddstr (); |
6c7a06a3 TT |
9590 | ; |
9591 | return 0; | |
9592 | } | |
9593 | _ACEOF | |
81ecdfbb RW |
9594 | for ac_lib in '' ncurses cursesX curses; do |
9595 | if test -z "$ac_lib"; then | |
9596 | ac_res="none required" | |
9597 | else | |
9598 | ac_res=-l$ac_lib | |
9599 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9600 | fi | |
9601 | if ac_fn_c_try_link "$LINENO"; then : | |
9602 | ac_cv_search_waddstr=$ac_res | |
9603 | fi | |
9604 | rm -f core conftest.err conftest.$ac_objext \ | |
9605 | conftest$ac_exeext | |
9606 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9607 | break | |
9608 | fi | |
9609 | done | |
9610 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
9611 | ||
6c7a06a3 | 9612 | else |
81ecdfbb RW |
9613 | ac_cv_search_waddstr=no |
9614 | fi | |
9615 | rm conftest.$ac_ext | |
9616 | LIBS=$ac_func_search_save_LIBS | |
9617 | fi | |
9618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9619 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9620 | ac_res=$ac_cv_search_waddstr | |
9621 | if test "$ac_res" != no; then : | |
9622 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9623 | |
9624 | fi | |
9625 | ||
9626 | ||
cb01cfba JB |
9627 | if test "$ac_cv_search_waddstr" != no; then |
9628 | curses_found=yes | |
9629 | fi | |
9630 | fi | |
9631 | ||
9632 | # Check whether we should enable the TUI, but only do so if we really | |
9633 | # can. | |
9634 | if test x"$enable_tui" != xno; then | |
9635 | if test -d $srcdir/tui; then | |
9636 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
9637 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9638 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9639 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9640 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
9641 | CONFIG_ALL="${CONFIG_ALL} all-tui" | |
9642 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
9643 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
9644 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
9645 | else | |
9646 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 9647 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9648 | else |
81ecdfbb RW |
9649 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9650 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9651 | fi |
9652 | fi | |
9653 | fi | |
9654 | fi | |
9655 | ||
9656 | # Since GDB uses Readline, we need termcap functionality. In many | |
9657 | # cases this will be provided by the curses library, but some systems | |
9658 | # have a seperate termcap library, or no curses library at all. | |
9659 | ||
9660 | case $host_os in | |
9661 | cygwin*) | |
9662 | if test -d $srcdir/libtermcap; then | |
9663 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
9664 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9665 | fi ;; | |
9666 | go32* | *djgpp*) | |
9667 | ac_cv_search_tgetent="none required" | |
9668 | ;; | |
9669 | *mingw32*) | |
9670 | ac_cv_search_tgetent="none required" | |
9671 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
9672 | ;; | |
9673 | esac | |
9674 | ||
9675 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9677 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
9678 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9679 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
9680 | else |
9681 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9683 | /* end confdefs.h. */ |
9684 | ||
81ecdfbb RW |
9685 | /* Override any GCC internal prototype to avoid an error. |
9686 | Use char because int might match the return type of a GCC | |
9687 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9688 | #ifdef __cplusplus |
9689 | extern "C" | |
9690 | #endif | |
6c7a06a3 TT |
9691 | char tgetent (); |
9692 | int | |
9693 | main () | |
9694 | { | |
81ecdfbb | 9695 | return tgetent (); |
6c7a06a3 TT |
9696 | ; |
9697 | return 0; | |
9698 | } | |
9699 | _ACEOF | |
81ecdfbb RW |
9700 | for ac_lib in '' termcap tinfo curses ncurses; do |
9701 | if test -z "$ac_lib"; then | |
9702 | ac_res="none required" | |
9703 | else | |
9704 | ac_res=-l$ac_lib | |
6c7a06a3 | 9705 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9706 | fi |
9707 | if ac_fn_c_try_link "$LINENO"; then : | |
9708 | ac_cv_search_tgetent=$ac_res | |
9709 | fi | |
9710 | rm -f core conftest.err conftest.$ac_objext \ | |
9711 | conftest$ac_exeext | |
9712 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
9713 | break | |
9714 | fi | |
9715 | done | |
9716 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 9717 | |
6c7a06a3 | 9718 | else |
81ecdfbb | 9719 | ac_cv_search_tgetent=no |
6c7a06a3 | 9720 | fi |
81ecdfbb | 9721 | rm conftest.$ac_ext |
6c7a06a3 TT |
9722 | LIBS=$ac_func_search_save_LIBS |
9723 | fi | |
81ecdfbb RW |
9724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9725 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9726 | ac_res=$ac_cv_search_tgetent | |
9727 | if test "$ac_res" != no; then : | |
9728 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9729 | |
06825bd1 MK |
9730 | fi |
9731 | ||
06825bd1 | 9732 | |
bec39cab | 9733 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 9734 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
9735 | fi |
9736 | ||
3841debe | 9737 | |
81ecdfbb RW |
9738 | # Check whether --with-system-readline was given. |
9739 | if test "${with_system_readline+set}" = set; then : | |
9740 | withval=$with_system_readline; | |
9741 | fi | |
6a30b0a5 | 9742 | |
6a30b0a5 AS |
9743 | |
9744 | if test "$with_system_readline" = yes; then | |
9745 | READLINE=-lreadline | |
9746 | READLINE_DEPS= | |
9747 | READLINE_CFLAGS= | |
39037522 | 9748 | READLINE_TEXI_INCFLAG= |
a71e0887 JK |
9749 | |
9750 | # readline-6.0 started to use the name `_rl_echoing_p'. | |
9751 | # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. | |
9752 | ||
9753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5 | |
9754 | $as_echo_n "checking for readline_echoing_p... " >&6; } | |
9755 | save_LIBS=$LIBS | |
9756 | LIBS="$LIBS $READLINE" | |
9757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9758 | /* end confdefs.h. */ | |
9759 | ||
9760 | int | |
9761 | main () | |
9762 | { | |
9763 | extern int readline_echoing_p; | |
9764 | return readline_echoing_p; | |
9765 | ; | |
9766 | return 0; | |
9767 | } | |
9768 | _ACEOF | |
9769 | if ac_fn_c_try_link "$LINENO"; then : | |
9770 | READLINE_ECHOING_P=yes | |
9771 | else | |
9772 | READLINE_ECHOING_P=no | |
9773 | ||
9774 | $as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h | |
9775 | ||
9776 | fi | |
9777 | rm -f core conftest.err conftest.$ac_objext \ | |
9778 | conftest$ac_exeext conftest.$ac_ext | |
9779 | LIBS="$save_LIBS" | |
9780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5 | |
9781 | $as_echo "$READLINE_ECHOING_P" >&6; } | |
6a30b0a5 AS |
9782 | else |
9783 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9784 | READLINE_DEPS='$(READLINE)' | |
9785 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9786 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9787 | fi |
9788 | ||
9789 | ||
9790 | ||
9791 | ||
9792 | ||
39037522 | 9793 | |
81ecdfbb RW |
9794 | # Check whether --with-expat was given. |
9795 | if test "${with_expat+set}" = set; then : | |
9796 | withval=$with_expat; | |
5c39566f DJ |
9797 | else |
9798 | with_expat=auto | |
81ecdfbb RW |
9799 | fi |
9800 | ||
9801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9802 | $as_echo_n "checking whether to use expat... " >&6; } | |
9803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9804 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9805 | |
9806 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9807 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9808 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9809 | HAVE_LIBEXPAT=no |
9810 | else | |
9811 | ||
3841debe DJ |
9812 | if test "X$prefix" = "XNONE"; then |
9813 | acl_final_prefix="$ac_default_prefix" | |
9814 | else | |
9815 | acl_final_prefix="$prefix" | |
9816 | fi | |
9817 | if test "X$exec_prefix" = "XNONE"; then | |
9818 | acl_final_exec_prefix='${prefix}' | |
9819 | else | |
9820 | acl_final_exec_prefix="$exec_prefix" | |
9821 | fi | |
9822 | acl_save_prefix="$prefix" | |
9823 | prefix="$acl_final_prefix" | |
9824 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
9825 | prefix="$acl_save_prefix" | |
9826 | ||
9827 | ||
81ecdfbb RW |
9828 | # Check whether --with-gnu-ld was given. |
9829 | if test "${with_gnu_ld+set}" = set; then : | |
9830 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
9831 | else |
9832 | with_gnu_ld=no | |
81ecdfbb RW |
9833 | fi |
9834 | ||
3841debe DJ |
9835 | # Prepare PATH_SEPARATOR. |
9836 | # The user is always right. | |
9837 | if test "${PATH_SEPARATOR+set}" != set; then | |
9838 | echo "#! /bin/sh" >conf$$.sh | |
9839 | echo "exit 0" >>conf$$.sh | |
9840 | chmod +x conf$$.sh | |
9841 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
9842 | PATH_SEPARATOR=';' | |
9843 | else | |
9844 | PATH_SEPARATOR=: | |
9845 | fi | |
9846 | rm -f conf$$.sh | |
9847 | fi | |
9848 | ac_prog=ld | |
9849 | if test "$GCC" = yes; then | |
9850 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
9851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
9852 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
9853 | case $host in |
9854 | *-*-mingw*) | |
9855 | # gcc leaves a trailing carriage return which upsets mingw | |
9856 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
9857 | *) | |
9858 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
9859 | esac | |
9860 | case $ac_prog in | |
9861 | # Accept absolute paths. | |
9862 | [\\/]* | [A-Za-z]:[\\/]*) | |
9863 | re_direlt='/[^/][^/]*/\.\./' | |
9864 | # Canonicalize the path of ld | |
9865 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
9866 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
9867 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
9868 | done | |
9869 | test -z "$LD" && LD="$ac_prog" | |
9870 | ;; | |
9871 | "") | |
9872 | # If it fails, then pretend we aren't using GCC. | |
9873 | ac_prog=ld | |
9874 | ;; | |
9875 | *) | |
9876 | # If it is relative, then search for the first ld in PATH. | |
9877 | with_gnu_ld=unknown | |
9878 | ;; | |
9879 | esac | |
9880 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
9881 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
9882 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 9883 | else |
81ecdfbb RW |
9884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
9885 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 9886 | fi |
81ecdfbb RW |
9887 | if test "${acl_cv_path_LD+set}" = set; then : |
9888 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9889 | else |
9890 | if test -z "$LD"; then | |
9891 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
9892 | for ac_dir in $PATH; do | |
9893 | test -z "$ac_dir" && ac_dir=. | |
9894 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
9895 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
9896 | # Check to see if the program is GNU ld. I'd rather use --version, | |
9897 | # but apparently some GNU ld's only accept -v. | |
9898 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
9899 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
9900 | test "$with_gnu_ld" != no && break | |
9901 | else | |
9902 | test "$with_gnu_ld" != yes && break | |
9903 | fi | |
9904 | fi | |
9905 | done | |
9906 | IFS="$ac_save_ifs" | |
9907 | else | |
9908 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
9909 | fi | |
9910 | fi | |
9911 | ||
9912 | LD="$acl_cv_path_LD" | |
9913 | if test -n "$LD"; then | |
81ecdfbb RW |
9914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
9915 | $as_echo "$LD" >&6; } | |
3841debe | 9916 | else |
81ecdfbb RW |
9917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9918 | $as_echo "no" >&6; } | |
3841debe | 9919 | fi |
81ecdfbb RW |
9920 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
9921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
9922 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
9923 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
9924 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9925 | else |
9926 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
9927 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
9928 | acl_cv_prog_gnu_ld=yes | |
9929 | else | |
9930 | acl_cv_prog_gnu_ld=no | |
9931 | fi | |
9932 | fi | |
81ecdfbb RW |
9933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
9934 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
9935 | with_gnu_ld=$acl_cv_prog_gnu_ld |
9936 | ||
9937 | ||
9938 | ||
81ecdfbb RW |
9939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
9940 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
9941 | if test "${acl_cv_rpath+set}" = set; then : | |
9942 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
9943 | else |
9944 | ||
9945 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
9946 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
9947 | . ./conftest.sh | |
9948 | rm -f ./conftest.sh | |
9949 | acl_cv_rpath=done | |
9950 | ||
9951 | fi | |
81ecdfbb RW |
9952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
9953 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
9954 | wl="$acl_cv_wl" |
9955 | libext="$acl_cv_libext" | |
9956 | shlibext="$acl_cv_shlibext" | |
9957 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
9958 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
9959 | hardcode_direct="$acl_cv_hardcode_direct" | |
9960 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
9961 | # Check whether --enable-rpath was given. |
9962 | if test "${enable_rpath+set}" = set; then : | |
9963 | enableval=$enable_rpath; : | |
3841debe DJ |
9964 | else |
9965 | enable_rpath=yes | |
81ecdfbb RW |
9966 | fi |
9967 | ||
3841debe DJ |
9968 | |
9969 | ||
9970 | ||
9971 | ||
9972 | ||
9973 | ||
9974 | ||
9975 | ||
9976 | ||
9977 | use_additional=yes | |
9978 | ||
9979 | acl_save_prefix="$prefix" | |
9980 | prefix="$acl_final_prefix" | |
9981 | acl_save_exec_prefix="$exec_prefix" | |
9982 | exec_prefix="$acl_final_exec_prefix" | |
9983 | ||
9984 | eval additional_includedir=\"$includedir\" | |
9985 | eval additional_libdir=\"$libdir\" | |
9986 | ||
9987 | exec_prefix="$acl_save_exec_prefix" | |
9988 | prefix="$acl_save_prefix" | |
9989 | ||
9990 | ||
81ecdfbb RW |
9991 | # Check whether --with-libexpat-prefix was given. |
9992 | if test "${with_libexpat_prefix+set}" = set; then : | |
9993 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9994 | if test "X$withval" = "Xno"; then |
9995 | use_additional=no | |
9996 | else | |
9997 | if test "X$withval" = "X"; then | |
9998 | ||
9999 | acl_save_prefix="$prefix" | |
10000 | prefix="$acl_final_prefix" | |
10001 | acl_save_exec_prefix="$exec_prefix" | |
10002 | exec_prefix="$acl_final_exec_prefix" | |
10003 | ||
10004 | eval additional_includedir=\"$includedir\" | |
10005 | eval additional_libdir=\"$libdir\" | |
10006 | ||
10007 | exec_prefix="$acl_save_exec_prefix" | |
10008 | prefix="$acl_save_prefix" | |
10009 | ||
10010 | else | |
10011 | additional_includedir="$withval/include" | |
10012 | additional_libdir="$withval/lib" | |
10013 | fi | |
10014 | fi | |
10015 | ||
81ecdfbb RW |
10016 | fi |
10017 | ||
3841debe DJ |
10018 | LIBEXPAT= |
10019 | LTLIBEXPAT= | |
10020 | INCEXPAT= | |
10021 | rpathdirs= | |
10022 | ltrpathdirs= | |
10023 | names_already_handled= | |
10024 | names_next_round='expat ' | |
10025 | while test -n "$names_next_round"; do | |
10026 | names_this_round="$names_next_round" | |
10027 | names_next_round= | |
10028 | for name in $names_this_round; do | |
10029 | already_handled= | |
10030 | for n in $names_already_handled; do | |
10031 | if test "$n" = "$name"; then | |
10032 | already_handled=yes | |
10033 | break | |
10034 | fi | |
10035 | done | |
10036 | if test -z "$already_handled"; then | |
10037 | names_already_handled="$names_already_handled $name" | |
10038 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10039 | eval value=\"\$HAVE_LIB$uppername\" | |
10040 | if test -n "$value"; then | |
10041 | if test "$value" = yes; then | |
10042 | eval value=\"\$LIB$uppername\" | |
10043 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
10044 | eval value=\"\$LTLIB$uppername\" | |
10045 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
10046 | else | |
10047 | : | |
10048 | fi | |
10049 | else | |
10050 | found_dir= | |
10051 | found_la= | |
10052 | found_so= | |
10053 | found_a= | |
10054 | if test $use_additional = yes; then | |
10055 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10056 | found_dir="$additional_libdir" | |
10057 | found_so="$additional_libdir/lib$name.$shlibext" | |
10058 | if test -f "$additional_libdir/lib$name.la"; then | |
10059 | found_la="$additional_libdir/lib$name.la" | |
10060 | fi | |
10061 | else | |
10062 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10063 | found_dir="$additional_libdir" | |
10064 | found_a="$additional_libdir/lib$name.$libext" | |
10065 | if test -f "$additional_libdir/lib$name.la"; then | |
10066 | found_la="$additional_libdir/lib$name.la" | |
10067 | fi | |
10068 | fi | |
10069 | fi | |
10070 | fi | |
10071 | if test "X$found_dir" = "X"; then | |
10072 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10073 | ||
10074 | acl_save_prefix="$prefix" | |
10075 | prefix="$acl_final_prefix" | |
10076 | acl_save_exec_prefix="$exec_prefix" | |
10077 | exec_prefix="$acl_final_exec_prefix" | |
10078 | eval x=\"$x\" | |
10079 | exec_prefix="$acl_save_exec_prefix" | |
10080 | prefix="$acl_save_prefix" | |
10081 | ||
10082 | case "$x" in | |
10083 | -L*) | |
10084 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10085 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10086 | found_dir="$dir" | |
10087 | found_so="$dir/lib$name.$shlibext" | |
10088 | if test -f "$dir/lib$name.la"; then | |
10089 | found_la="$dir/lib$name.la" | |
10090 | fi | |
10091 | else | |
10092 | if test -f "$dir/lib$name.$libext"; then | |
10093 | found_dir="$dir" | |
10094 | found_a="$dir/lib$name.$libext" | |
10095 | if test -f "$dir/lib$name.la"; then | |
10096 | found_la="$dir/lib$name.la" | |
10097 | fi | |
10098 | fi | |
10099 | fi | |
10100 | ;; | |
10101 | esac | |
10102 | if test "X$found_dir" != "X"; then | |
10103 | break | |
10104 | fi | |
10105 | done | |
10106 | fi | |
10107 | if test "X$found_dir" != "X"; then | |
10108 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
10109 | if test "X$found_so" != "X"; then | |
10110 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10111 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10112 | else | |
10113 | haveit= | |
10114 | for x in $ltrpathdirs; do | |
10115 | if test "X$x" = "X$found_dir"; then | |
10116 | haveit=yes | |
10117 | break | |
10118 | fi | |
10119 | done | |
10120 | if test -z "$haveit"; then | |
10121 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10122 | fi | |
10123 | if test "$hardcode_direct" = yes; then | |
10124 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10125 | else | |
10126 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10127 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10128 | haveit= | |
10129 | for x in $rpathdirs; do | |
10130 | if test "X$x" = "X$found_dir"; then | |
10131 | haveit=yes | |
10132 | break | |
10133 | fi | |
10134 | done | |
10135 | if test -z "$haveit"; then | |
10136 | rpathdirs="$rpathdirs $found_dir" | |
10137 | fi | |
10138 | else | |
10139 | haveit= | |
10140 | for x in $LDFLAGS $LIBEXPAT; do | |
10141 | ||
10142 | acl_save_prefix="$prefix" | |
10143 | prefix="$acl_final_prefix" | |
10144 | acl_save_exec_prefix="$exec_prefix" | |
10145 | exec_prefix="$acl_final_exec_prefix" | |
10146 | eval x=\"$x\" | |
10147 | exec_prefix="$acl_save_exec_prefix" | |
10148 | prefix="$acl_save_prefix" | |
10149 | ||
10150 | if test "X$x" = "X-L$found_dir"; then | |
10151 | haveit=yes | |
10152 | break | |
10153 | fi | |
10154 | done | |
10155 | if test -z "$haveit"; then | |
10156 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
10157 | fi | |
10158 | if test "$hardcode_minus_L" != no; then | |
10159 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10160 | else | |
10161 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10162 | fi | |
10163 | fi | |
10164 | fi | |
10165 | fi | |
10166 | else | |
10167 | if test "X$found_a" != "X"; then | |
10168 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
10169 | else | |
10170 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
10171 | fi | |
10172 | fi | |
10173 | additional_includedir= | |
10174 | case "$found_dir" in | |
10175 | */lib | */lib/) | |
10176 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10177 | additional_includedir="$basedir/include" | |
10178 | ;; | |
10179 | esac | |
10180 | if test "X$additional_includedir" != "X"; then | |
10181 | if test "X$additional_includedir" != "X/usr/include"; then | |
10182 | haveit= | |
10183 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10184 | if test -n "$GCC"; then | |
10185 | case $host_os in | |
10186 | linux*) haveit=yes;; | |
10187 | esac | |
10188 | fi | |
10189 | fi | |
10190 | if test -z "$haveit"; then | |
10191 | for x in $CPPFLAGS $INCEXPAT; do | |
10192 | ||
10193 | acl_save_prefix="$prefix" | |
10194 | prefix="$acl_final_prefix" | |
10195 | acl_save_exec_prefix="$exec_prefix" | |
10196 | exec_prefix="$acl_final_exec_prefix" | |
10197 | eval x=\"$x\" | |
10198 | exec_prefix="$acl_save_exec_prefix" | |
10199 | prefix="$acl_save_prefix" | |
10200 | ||
10201 | if test "X$x" = "X-I$additional_includedir"; then | |
10202 | haveit=yes | |
10203 | break | |
10204 | fi | |
10205 | done | |
10206 | if test -z "$haveit"; then | |
10207 | if test -d "$additional_includedir"; then | |
10208 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
10209 | fi | |
10210 | fi | |
10211 | fi | |
10212 | fi | |
10213 | fi | |
10214 | if test -n "$found_la"; then | |
10215 | save_libdir="$libdir" | |
10216 | case "$found_la" in | |
10217 | */* | *\\*) . "$found_la" ;; | |
10218 | *) . "./$found_la" ;; | |
10219 | esac | |
10220 | libdir="$save_libdir" | |
10221 | for dep in $dependency_libs; do | |
10222 | case "$dep" in | |
10223 | -L*) | |
10224 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10225 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10226 | haveit= | |
10227 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10228 | if test -n "$GCC"; then | |
10229 | case $host_os in | |
10230 | linux*) haveit=yes;; | |
10231 | esac | |
10232 | fi | |
10233 | fi | |
10234 | if test -z "$haveit"; then | |
10235 | haveit= | |
10236 | for x in $LDFLAGS $LIBEXPAT; do | |
10237 | ||
10238 | acl_save_prefix="$prefix" | |
10239 | prefix="$acl_final_prefix" | |
10240 | acl_save_exec_prefix="$exec_prefix" | |
10241 | exec_prefix="$acl_final_exec_prefix" | |
10242 | eval x=\"$x\" | |
10243 | exec_prefix="$acl_save_exec_prefix" | |
10244 | prefix="$acl_save_prefix" | |
10245 | ||
10246 | if test "X$x" = "X-L$additional_libdir"; then | |
10247 | haveit=yes | |
10248 | break | |
10249 | fi | |
10250 | done | |
10251 | if test -z "$haveit"; then | |
10252 | if test -d "$additional_libdir"; then | |
10253 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
10254 | fi | |
10255 | fi | |
10256 | haveit= | |
10257 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10258 | ||
10259 | acl_save_prefix="$prefix" | |
10260 | prefix="$acl_final_prefix" | |
10261 | acl_save_exec_prefix="$exec_prefix" | |
10262 | exec_prefix="$acl_final_exec_prefix" | |
10263 | eval x=\"$x\" | |
10264 | exec_prefix="$acl_save_exec_prefix" | |
10265 | prefix="$acl_save_prefix" | |
10266 | ||
10267 | if test "X$x" = "X-L$additional_libdir"; then | |
10268 | haveit=yes | |
10269 | break | |
10270 | fi | |
10271 | done | |
10272 | if test -z "$haveit"; then | |
10273 | if test -d "$additional_libdir"; then | |
10274 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
10275 | fi | |
10276 | fi | |
10277 | fi | |
10278 | fi | |
10279 | ;; | |
10280 | -R*) | |
10281 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10282 | if test "$enable_rpath" != no; then | |
10283 | haveit= | |
10284 | for x in $rpathdirs; do | |
10285 | if test "X$x" = "X$dir"; then | |
10286 | haveit=yes | |
10287 | break | |
10288 | fi | |
10289 | done | |
10290 | if test -z "$haveit"; then | |
10291 | rpathdirs="$rpathdirs $dir" | |
10292 | fi | |
10293 | haveit= | |
10294 | for x in $ltrpathdirs; do | |
10295 | if test "X$x" = "X$dir"; then | |
10296 | haveit=yes | |
10297 | break | |
10298 | fi | |
10299 | done | |
10300 | if test -z "$haveit"; then | |
10301 | ltrpathdirs="$ltrpathdirs $dir" | |
10302 | fi | |
10303 | fi | |
10304 | ;; | |
10305 | -l*) | |
10306 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10307 | ;; | |
10308 | *.la) | |
10309 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10310 | ;; | |
10311 | *) | |
10312 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
10313 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
10314 | ;; | |
81ecdfbb RW |
10315 | esac |
10316 | done | |
10317 | fi | |
10318 | else | |
10319 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
10320 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
10321 | fi | |
10322 | fi | |
10323 | fi | |
10324 | done | |
10325 | done | |
10326 | if test "X$rpathdirs" != "X"; then | |
10327 | if test -n "$hardcode_libdir_separator"; then | |
10328 | alldirs= | |
10329 | for found_dir in $rpathdirs; do | |
10330 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10331 | done | |
10332 | acl_save_libdir="$libdir" | |
10333 | libdir="$alldirs" | |
10334 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10335 | libdir="$acl_save_libdir" | |
10336 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10337 | else | |
10338 | for found_dir in $rpathdirs; do | |
10339 | acl_save_libdir="$libdir" | |
10340 | libdir="$found_dir" | |
10341 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10342 | libdir="$acl_save_libdir" | |
10343 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
10344 | done | |
10345 | fi | |
10346 | fi | |
10347 | if test "X$ltrpathdirs" != "X"; then | |
10348 | for found_dir in $ltrpathdirs; do | |
10349 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
10350 | done | |
10351 | fi | |
a9322a30 TT |
10352 | |
10353 | ||
81ecdfbb | 10354 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 10355 | |
81ecdfbb RW |
10356 | for element in $INCEXPAT; do |
10357 | haveit= | |
10358 | for x in $CPPFLAGS; do | |
a9322a30 | 10359 | |
81ecdfbb RW |
10360 | acl_save_prefix="$prefix" |
10361 | prefix="$acl_final_prefix" | |
10362 | acl_save_exec_prefix="$exec_prefix" | |
10363 | exec_prefix="$acl_final_exec_prefix" | |
10364 | eval x=\"$x\" | |
10365 | exec_prefix="$acl_save_exec_prefix" | |
10366 | prefix="$acl_save_prefix" | |
a8111142 | 10367 | |
81ecdfbb RW |
10368 | if test "X$x" = "X$element"; then |
10369 | haveit=yes | |
10370 | break | |
10371 | fi | |
10372 | done | |
10373 | if test -z "$haveit"; then | |
10374 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10375 | fi | |
10376 | done | |
a9322a30 TT |
10377 | |
10378 | ||
81ecdfbb RW |
10379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
10380 | $as_echo_n "checking for libexpat... " >&6; } | |
10381 | if test "${ac_cv_libexpat+set}" = set; then : | |
10382 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10383 | else |
bec39cab | 10384 | |
81ecdfbb RW |
10385 | ac_save_LIBS="$LIBS" |
10386 | LIBS="$LIBS $LIBEXPAT" | |
10387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10388 | /* end confdefs.h. */ |
81ecdfbb RW |
10389 | #include "expat.h" |
10390 | int | |
10391 | main () | |
10392 | { | |
10393 | XML_Parser p = XML_ParserCreate (0); | |
10394 | ; | |
10395 | return 0; | |
10396 | } | |
bec39cab | 10397 | _ACEOF |
81ecdfbb RW |
10398 | if ac_fn_c_try_link "$LINENO"; then : |
10399 | ac_cv_libexpat=yes | |
c906108c | 10400 | else |
81ecdfbb | 10401 | ac_cv_libexpat=no |
bec39cab | 10402 | fi |
81ecdfbb RW |
10403 | rm -f core conftest.err conftest.$ac_objext \ |
10404 | conftest$ac_exeext conftest.$ac_ext | |
10405 | LIBS="$ac_save_LIBS" | |
c906108c | 10406 | |
95ca63c4 | 10407 | fi |
81ecdfbb RW |
10408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
10409 | $as_echo "$ac_cv_libexpat" >&6; } | |
10410 | if test "$ac_cv_libexpat" = yes; then | |
10411 | HAVE_LIBEXPAT=yes | |
bec39cab | 10412 | |
81ecdfbb | 10413 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 10414 | |
81ecdfbb RW |
10415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
10416 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
10417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
10418 | $as_echo "$LIBEXPAT" >&6; } | |
10419 | else | |
10420 | HAVE_LIBEXPAT=no | |
10421 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10422 | LIBEXPAT= | |
10423 | LTLIBEXPAT= | |
10424 | fi | |
95ca63c4 CF |
10425 | |
10426 | ||
10427 | ||
7cb9022a MK |
10428 | |
10429 | ||
bec39cab | 10430 | |
81ecdfbb RW |
10431 | if test "$HAVE_LIBEXPAT" != yes; then |
10432 | if test "$with_expat" = yes; then | |
10433 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
10434 | else | |
10435 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
10436 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10437 | fi | |
10438 | else | |
10439 | save_LIBS=$LIBS | |
10440 | LIBS="$LIBS $LIBEXPAT" | |
10441 | for ac_func in XML_StopParser | |
10442 | do : | |
10443 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
10444 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 10445 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10446 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10447 | _ACEOF |
95ca63c4 | 10448 | |
bec39cab | 10449 | fi |
bec39cab | 10450 | done |
95ca63c4 | 10451 | |
81ecdfbb RW |
10452 | LIBS=$save_LIBS |
10453 | fi | |
a9322a30 TT |
10454 | fi |
10455 | ||
a9322a30 | 10456 | |
a9322a30 TT |
10457 | |
10458 | ||
ec685c5e | 10459 | |
0c4a4063 | 10460 | |
81ecdfbb RW |
10461 | # Check whether --with-python was given. |
10462 | if test "${with_python+set}" = set; then : | |
10463 | withval=$with_python; | |
bec39cab | 10464 | else |
81ecdfbb | 10465 | with_python=auto |
bec39cab | 10466 | fi |
bec39cab | 10467 | |
81ecdfbb RW |
10468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10469 | $as_echo_n "checking whether to use python... " >&6; } | |
10470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10471 | $as_echo "$with_python" >&6; } | |
9a156167 | 10472 | |
81ecdfbb RW |
10473 | if test "${with_python}" = no; then |
10474 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10475 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10476 | have_libpython=no | |
bec39cab | 10477 | else |
81ecdfbb | 10478 | case "${with_python}" in |
81ecdfbb | 10479 | /*) |
ec685c5e DE |
10480 | if test -d ${with_python}; then |
10481 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 10482 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10483 | python_prefix= |
9c4ea6c5 JB |
10484 | # If python does not exit ${with_python}/bin, then try in |
10485 | # ${with_python}. On Windows/MinGW, this is where the Python | |
10486 | # executable is. | |
10487 | if test ! -x "${python_prog}"; then | |
10488 | python_prog="${with_python}/python" | |
10489 | python_prefix= | |
10490 | fi | |
e7a30f46 | 10491 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
10492 | # Fall back to gdb 7.0/7.1 behaviour. |
10493 | python_prog=missing | |
0c4a4063 | 10494 | python_prefix=${with_python} |
ec685c5e | 10495 | fi |
e7a30f46 | 10496 | elif test -x "${with_python}"; then |
ec685c5e DE |
10497 | # While we can't run python compiled for $host (unless host == build), |
10498 | # the user could write a script that provides the needed information, | |
10499 | # so we support that. | |
ec685c5e | 10500 | python_prog=${with_python} |
0c4a4063 | 10501 | python_prefix= |
ec685c5e DE |
10502 | else |
10503 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
10504 | fi | |
81ecdfbb | 10505 | ;; |
ec685c5e DE |
10506 | */*) |
10507 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
10508 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
10509 | ;; | |
ec685c5e DE |
10510 | *) |
10511 | # The user has either specified auto, yes, or the name of the python | |
10512 | # program assumed to be in $PATH. | |
10513 | python_prefix= | |
10514 | case "${with_python}" in | |
10515 | yes | auto) | |
10516 | if test ${build} = ${host}; then | |
10517 | # Extract the first word of "python", so it can be a program name with args. | |
10518 | set dummy python; ac_word=$2 | |
10519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10520 | $as_echo_n "checking for $ac_word... " >&6; } | |
10521 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10522 | $as_echo_n "(cached) " >&6 | |
10523 | else | |
10524 | case $python_prog_path in | |
10525 | [\\/]* | ?:[\\/]*) | |
10526 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10527 | ;; | |
10528 | *) | |
10529 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10530 | for as_dir in $PATH | |
10531 | do | |
10532 | IFS=$as_save_IFS | |
10533 | test -z "$as_dir" && as_dir=. | |
10534 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10535 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10536 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10537 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10538 | break 2 | |
10539 | fi | |
10540 | done | |
10541 | done | |
10542 | IFS=$as_save_IFS | |
10543 | ||
10544 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10545 | ;; | |
10546 | esac | |
10547 | fi | |
10548 | python_prog_path=$ac_cv_path_python_prog_path | |
10549 | if test -n "$python_prog_path"; then | |
10550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10551 | $as_echo "$python_prog_path" >&6; } | |
10552 | else | |
10553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10554 | $as_echo "no" >&6; } | |
10555 | fi | |
10556 | ||
10557 | ||
10558 | if test "${python_prog_path}" = missing; then | |
10559 | python_prog=missing | |
10560 | else | |
10561 | python_prog=${python_prog_path} | |
10562 | fi | |
10563 | else | |
10564 | # Not much we can do except assume the cross-compiler will find the | |
10565 | # right files. | |
10566 | python_prog=missing | |
10567 | fi | |
10568 | ;; | |
10569 | *) | |
10570 | # While we can't run python compiled for $host (unless host == build), | |
10571 | # the user could write a script that provides the needed information, | |
10572 | # so we support that. | |
10573 | python_prog="${with_python}" | |
10574 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10575 | set dummy ${python_prog}; ac_word=$2 | |
10576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10577 | $as_echo_n "checking for $ac_word... " >&6; } | |
10578 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
10579 | $as_echo_n "(cached) " >&6 | |
10580 | else | |
10581 | case $python_prog_path in | |
10582 | [\\/]* | ?:[\\/]*) | |
10583 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10584 | ;; | |
10585 | *) | |
10586 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10587 | for as_dir in $PATH | |
10588 | do | |
10589 | IFS=$as_save_IFS | |
10590 | test -z "$as_dir" && as_dir=. | |
10591 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10592 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10593 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
10594 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10595 | break 2 | |
10596 | fi | |
10597 | done | |
10598 | done | |
10599 | IFS=$as_save_IFS | |
10600 | ||
10601 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10602 | ;; | |
10603 | esac | |
10604 | fi | |
10605 | python_prog_path=$ac_cv_path_python_prog_path | |
10606 | if test -n "$python_prog_path"; then | |
10607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10608 | $as_echo "$python_prog_path" >&6; } | |
10609 | else | |
10610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10611 | $as_echo "no" >&6; } | |
10612 | fi | |
10613 | ||
10614 | ||
10615 | if test "${python_prog_path}" = missing; then | |
10616 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
10617 | fi | |
10618 | ;; | |
10619 | esac | |
81ecdfbb RW |
10620 | esac |
10621 | ||
ec685c5e | 10622 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
10623 | # We have a python program to use, but it may be too old. |
10624 | # Don't flag an error for --with-python=auto (the default). | |
10625 | have_python_config=yes | |
ec685c5e DE |
10626 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
10627 | if test $? != 0; then | |
e7a30f46 DE |
10628 | have_python_config=failed |
10629 | if test "${with_python}" != auto; then | |
10630 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
10631 | fi | |
ec685c5e DE |
10632 | fi |
10633 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10634 | if test $? != 0; then | |
e7a30f46 DE |
10635 | have_python_config=failed |
10636 | if test "${with_python}" != auto; then | |
10637 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
10638 | fi | |
ec685c5e | 10639 | fi |
0c4a4063 DE |
10640 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10641 | if test $? != 0; then | |
e7a30f46 DE |
10642 | have_python_config=failed |
10643 | if test "${with_python}" != auto; then | |
10644 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
10645 | fi | |
0c4a4063 | 10646 | fi |
ec685c5e | 10647 | else |
ac534cba JB |
10648 | # We do not have a python executable we can use to determine where |
10649 | # to find the Python headers and libs. We cannot guess the include | |
10650 | # path from the python_prefix either, because that include path | |
10651 | # depends on the Python version. So, there is nothing much we can | |
10652 | # do except assume that the compiler will be able to find those files. | |
10653 | python_includes= | |
10654 | python_libs= | |
0c4a4063 | 10655 | have_python_config=no |
ec685c5e | 10656 | fi |
bec39cab | 10657 | |
ec685c5e DE |
10658 | # If we have python-config, only try the configuration it provides. |
10659 | # Otherwise fallback on the old way of trying different versions of | |
10660 | # python in turn. | |
81ecdfbb | 10661 | |
ec685c5e DE |
10662 | have_libpython=no |
10663 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
10664 | # Determine the Python version by extracting "-lpython<version>" |
10665 | # part of the python_libs. <version> is usually X.Y with X and Y | |
10666 | # being decimal numbers, but can also be XY (seen on Windows). | |
10667 | # | |
10668 | # The extraction is performed using sed with a regular expression. | |
10669 | # Initially, the regexp used was using the '?' quantifier to make | |
10670 | # the dot in the version number optional. Unfortunately, this | |
10671 | # does not work with non-GNU versions of sed because, because of | |
10672 | # what looks like a limitation (the '?' quantifier does not work | |
10673 | # with back-references). We work around this limitation by using | |
10674 | # the '*' quantifier instead. It means that, in theory, we might | |
10675 | # match unexpected version strings such as "-lpython2..7", but | |
10676 | # this seems unlikely in practice. And even if that happens, | |
10677 | # an error will be triggered later on, when checking that version | |
10678 | # number. | |
ec685c5e | 10679 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 10680 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
10681 | case "${python_version}" in |
10682 | python*) | |
ec685c5e DE |
10683 | |
10684 | version=${python_version} | |
10685 | ||
10686 | new_CPPFLAGS=${python_includes} | |
10687 | new_LIBS=${python_libs} | |
81ecdfbb RW |
10688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10689 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10690 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10691 | save_LIBS=$LIBS |
ec685c5e DE |
10692 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10693 | LIBS="$LIBS $new_LIBS" | |
10694 | found_usable_python=no | |
81ecdfbb | 10695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10696 | /* end confdefs.h. */ |
ac534cba | 10697 | #include "Python.h" |
81ecdfbb RW |
10698 | int |
10699 | main () | |
10700 | { | |
10701 | Py_Initialize (); | |
10702 | ; | |
10703 | return 0; | |
10704 | } | |
bec39cab | 10705 | _ACEOF |
81ecdfbb | 10706 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10707 | have_libpython=${version} |
10708 | found_usable_python=yes | |
ac534cba JB |
10709 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10710 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 10711 | fi |
81ecdfbb RW |
10712 | rm -f core conftest.err conftest.$ac_objext \ |
10713 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10714 | CPPFLAGS=$save_CPPFLAGS |
10715 | LIBS=$save_LIBS | |
ec685c5e DE |
10716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10717 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10718 | |
0c4a4063 DE |
10719 | ;; |
10720 | *) | |
ec685c5e | 10721 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
10722 | ;; |
10723 | esac | |
e7a30f46 | 10724 | elif test "${have_python_config}" != failed; then |
ec685c5e | 10725 | if test "${have_libpython}" = no; then |
9a156167 | 10726 | |
420697bb TT |
10727 | version=python2.7 |
10728 | ||
10729 | new_CPPFLAGS=${python_includes} | |
10730 | new_LIBS="${python_libs} -lpython2.7" | |
10731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10732 | $as_echo_n "checking for ${version}... " >&6; } | |
10733 | save_CPPFLAGS=$CPPFLAGS | |
10734 | save_LIBS=$LIBS | |
10735 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10736 | LIBS="$LIBS $new_LIBS" | |
10737 | found_usable_python=no | |
10738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10739 | /* end confdefs.h. */ | |
ac534cba | 10740 | #include "Python.h" |
420697bb TT |
10741 | int |
10742 | main () | |
10743 | { | |
10744 | Py_Initialize (); | |
10745 | ; | |
10746 | return 0; | |
10747 | } | |
10748 | _ACEOF | |
10749 | if ac_fn_c_try_link "$LINENO"; then : | |
10750 | have_libpython=${version} | |
10751 | found_usable_python=yes | |
ac534cba JB |
10752 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10753 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
10754 | fi |
10755 | rm -f core conftest.err conftest.$ac_objext \ | |
10756 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10757 | CPPFLAGS=$save_CPPFLAGS |
10758 | LIBS=$save_LIBS | |
420697bb TT |
10759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10760 | $as_echo "${found_usable_python}" >&6; } | |
10761 | ||
10762 | fi | |
10763 | if test "${have_libpython}" = no; then | |
10764 | ||
ec685c5e DE |
10765 | version=python2.6 |
10766 | ||
10767 | new_CPPFLAGS=${python_includes} | |
10768 | new_LIBS="${python_libs} -lpython2.6" | |
10769 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
10770 | $as_echo_n "checking for ${version}... " >&6; } | |
10771 | save_CPPFLAGS=$CPPFLAGS | |
10772 | save_LIBS=$LIBS | |
10773 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10774 | LIBS="$LIBS $new_LIBS" | |
10775 | found_usable_python=no | |
10776 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10777 | /* end confdefs.h. */ | |
ac534cba | 10778 | #include "Python.h" |
ec685c5e DE |
10779 | int |
10780 | main () | |
10781 | { | |
10782 | Py_Initialize (); | |
10783 | ; | |
10784 | return 0; | |
10785 | } | |
10786 | _ACEOF | |
10787 | if ac_fn_c_try_link "$LINENO"; then : | |
10788 | have_libpython=${version} | |
10789 | found_usable_python=yes | |
ac534cba JB |
10790 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10791 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
10792 | fi |
10793 | rm -f core conftest.err conftest.$ac_objext \ | |
10794 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10795 | CPPFLAGS=$save_CPPFLAGS |
10796 | LIBS=$save_LIBS | |
ec685c5e DE |
10797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10798 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10799 | |
81ecdfbb | 10800 | fi |
ec685c5e | 10801 | if test ${have_libpython} = no; then |
9a156167 | 10802 | |
81ecdfbb | 10803 | version=python2.5 |
9a156167 | 10804 | |
ec685c5e DE |
10805 | new_CPPFLAGS=${python_includes} |
10806 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
10807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10808 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10809 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10810 | save_LIBS=$LIBS |
ec685c5e DE |
10811 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10812 | LIBS="$LIBS $new_LIBS" | |
10813 | found_usable_python=no | |
81ecdfbb | 10814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10815 | /* end confdefs.h. */ |
ac534cba | 10816 | #include "Python.h" |
81ecdfbb RW |
10817 | int |
10818 | main () | |
10819 | { | |
10820 | Py_Initialize (); | |
10821 | ; | |
10822 | return 0; | |
10823 | } | |
436868fb | 10824 | _ACEOF |
81ecdfbb | 10825 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10826 | have_libpython=${version} |
10827 | found_usable_python=yes | |
ac534cba JB |
10828 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10829 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10830 | fi |
81ecdfbb RW |
10831 | rm -f core conftest.err conftest.$ac_objext \ |
10832 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10833 | CPPFLAGS=$save_CPPFLAGS |
10834 | LIBS=$save_LIBS | |
ec685c5e DE |
10835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10836 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 10837 | |
81ecdfbb | 10838 | fi |
ec685c5e | 10839 | if test ${have_libpython} = no; then |
a9322a30 | 10840 | |
81ecdfbb | 10841 | version=python2.4 |
a9322a30 | 10842 | |
ec685c5e DE |
10843 | new_CPPFLAGS=${python_includes} |
10844 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
10845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10846 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10847 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10848 | save_LIBS=$LIBS |
ec685c5e DE |
10849 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
10850 | LIBS="$LIBS $new_LIBS" | |
10851 | found_usable_python=no | |
81ecdfbb | 10852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10853 | /* end confdefs.h. */ |
ac534cba | 10854 | #include "Python.h" |
a9322a30 TT |
10855 | int |
10856 | main () | |
10857 | { | |
81ecdfbb | 10858 | Py_Initialize (); |
a9322a30 TT |
10859 | ; |
10860 | return 0; | |
10861 | } | |
436868fb | 10862 | _ACEOF |
81ecdfbb | 10863 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10864 | have_libpython=${version} |
10865 | found_usable_python=yes | |
ac534cba JB |
10866 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10867 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10868 | fi |
81ecdfbb RW |
10869 | rm -f core conftest.err conftest.$ac_objext \ |
10870 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10871 | CPPFLAGS=$save_CPPFLAGS |
10872 | LIBS=$save_LIBS | |
ec685c5e DE |
10873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10874 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10875 | |
ec685c5e DE |
10876 | fi |
10877 | fi | |
9c4ea6c5 | 10878 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
10879 | |
10880 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
10881 | ||
9c4ea6c5 | 10882 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
10883 | |
10884 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
10885 | ||
9c4ea6c5 | 10886 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
10887 | |
10888 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
10889 | ||
9c4ea6c5 | 10890 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
10891 | |
10892 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
10893 | ||
81ecdfbb | 10894 | fi |
ec685c5e DE |
10895 | |
10896 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10897 | case "${with_python}" in |
10898 | yes) | |
10899 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
10900 | ;; | |
10901 | auto) | |
10902 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10903 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10904 | ;; | |
10905 | *) | |
10906 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
10907 | ;; | |
10908 | esac | |
0c4a4063 DE |
10909 | else |
10910 | if test -n "${python_prefix}"; then | |
10911 | ||
10912 | cat >>confdefs.h <<_ACEOF | |
10913 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10914 | _ACEOF | |
10915 | ||
10916 | ||
10917 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10918 | if test "x$prefix" = xNONE; then | |
10919 | test_prefix=/usr/local | |
10920 | else | |
10921 | test_prefix=$prefix | |
10922 | fi | |
10923 | else | |
10924 | test_prefix=$exec_prefix | |
10925 | fi | |
10926 | value=0 | |
10927 | case ${python_prefix} in | |
10928 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10929 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10930 | value=1 | |
10931 | ;; | |
10932 | esac | |
10933 | ||
10934 | cat >>confdefs.h <<_ACEOF | |
10935 | #define PYTHON_PATH_RELOCATABLE $value | |
10936 | _ACEOF | |
10937 | ||
10938 | ||
10939 | fi | |
81ecdfbb | 10940 | fi |
436868fb | 10941 | fi |
436868fb | 10942 | |
ec685c5e | 10943 | if test "${have_libpython}" != no; then |
436868fb | 10944 | |
81ecdfbb | 10945 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10946 | |
81ecdfbb RW |
10947 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10948 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10949 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 10950 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 10951 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 10952 | |
81ecdfbb RW |
10953 | # Flags needed to compile Python code (taken from python-config --cflags). |
10954 | # We cannot call python-config directly because it will output whatever was | |
10955 | # used when compiling the Python interpreter itself, including flags which | |
10956 | # would make the python-related objects be compiled differently from the | |
10957 | # rest of GDB (e.g., -O2 and -fPIC). | |
10958 | if test "${GCC}" = yes; then | |
10959 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
10960 | fi | |
436868fb | 10961 | |
81ecdfbb RW |
10962 | if test "x${tentative_python_cflags}" != x; then |
10963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10964 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10965 | for flag in ${tentative_python_cflags}; do | |
10966 | # Check that the compiler accepts it | |
10967 | saved_CFLAGS="$CFLAGS" | |
10968 | CFLAGS="$CFLAGS $flag" | |
10969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10970 | /* end confdefs.h. */ |
81ecdfbb | 10971 | |
a9322a30 TT |
10972 | int |
10973 | main () | |
10974 | { | |
a9322a30 TT |
10975 | |
10976 | ; | |
10977 | return 0; | |
10978 | } | |
bec39cab | 10979 | _ACEOF |
81ecdfbb RW |
10980 | if ac_fn_c_try_compile "$LINENO"; then : |
10981 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10982 | fi |
81ecdfbb RW |
10983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10984 | CFLAGS="$saved_CFLAGS" | |
10985 | done | |
10986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10987 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10988 | fi | |
043b6510 JB |
10989 | |
10990 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
10991 | # #if _SGIAPI | |
10992 | # #define siginfo __siginfo | |
10993 | # #endif | |
10994 | # The problem is that including Python causes some XOPEN macros to be | |
10995 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
10996 | # to false. So, we work around this issue by defining siginfo ourself | |
10997 | # though the command-line. | |
10998 | case "$gdb_host" in | |
10999 | irix*) if test "${GCC}" = yes; then | |
11000 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
11001 | fi | |
11002 | ;; | |
11003 | esac | |
81ecdfbb RW |
11004 | else |
11005 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
11006 | # included. |
11007 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
11008 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
11009 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 11010 | fi |
9a156167 | 11011 | |
9a156167 | 11012 | |
ac534cba JB |
11013 | |
11014 | ||
81ecdfbb RW |
11015 | # ------------------------- # |
11016 | # Checks for header files. # | |
11017 | # ------------------------- # | |
c890192f | 11018 | |
81ecdfbb RW |
11019 | ac_header_dirent=no |
11020 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
11021 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
11022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
11023 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
11024 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
11025 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11026 | else |
81ecdfbb | 11027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11028 | /* end confdefs.h. */ |
81ecdfbb RW |
11029 | #include <sys/types.h> |
11030 | #include <$ac_hdr> | |
11031 | ||
a9322a30 TT |
11032 | int |
11033 | main () | |
11034 | { | |
81ecdfbb RW |
11035 | if ((DIR *) 0) |
11036 | return 0; | |
a9322a30 TT |
11037 | ; |
11038 | return 0; | |
11039 | } | |
bec39cab | 11040 | _ACEOF |
81ecdfbb RW |
11041 | if ac_fn_c_try_compile "$LINENO"; then : |
11042 | eval "$as_ac_Header=yes" | |
bec39cab | 11043 | else |
81ecdfbb | 11044 | eval "$as_ac_Header=no" |
bec39cab | 11045 | fi |
81ecdfbb | 11046 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 11047 | fi |
81ecdfbb RW |
11048 | eval ac_res=\$$as_ac_Header |
11049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
11050 | $as_echo "$ac_res" >&6; } | |
11051 | eval as_val=\$$as_ac_Header | |
11052 | if test "x$as_val" = x""yes; then : | |
11053 | cat >>confdefs.h <<_ACEOF | |
11054 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 11055 | _ACEOF |
bec39cab | 11056 | |
81ecdfbb RW |
11057 | ac_header_dirent=$ac_hdr; break |
11058 | fi | |
bec39cab | 11059 | |
81ecdfbb RW |
11060 | done |
11061 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
11062 | if test $ac_header_dirent = dirent.h; then | |
11063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
11064 | $as_echo_n "checking for library containing opendir... " >&6; } | |
11065 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11066 | $as_echo_n "(cached) " >&6 | |
c890192f | 11067 | else |
81ecdfbb RW |
11068 | ac_func_search_save_LIBS=$LIBS |
11069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11070 | /* end confdefs.h. */ | |
11071 | ||
11072 | /* Override any GCC internal prototype to avoid an error. | |
11073 | Use char because int might match the return type of a GCC | |
11074 | builtin and then its argument prototype would still apply. */ | |
11075 | #ifdef __cplusplus | |
11076 | extern "C" | |
11077 | #endif | |
11078 | char opendir (); | |
11079 | int | |
11080 | main () | |
11081 | { | |
11082 | return opendir (); | |
11083 | ; | |
11084 | return 0; | |
11085 | } | |
bec39cab | 11086 | _ACEOF |
81ecdfbb RW |
11087 | for ac_lib in '' dir; do |
11088 | if test -z "$ac_lib"; then | |
11089 | ac_res="none required" | |
11090 | else | |
11091 | ac_res=-l$ac_lib | |
11092 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11093 | fi | |
11094 | if ac_fn_c_try_link "$LINENO"; then : | |
11095 | ac_cv_search_opendir=$ac_res | |
11096 | fi | |
11097 | rm -f core conftest.err conftest.$ac_objext \ | |
11098 | conftest$ac_exeext | |
11099 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11100 | break | |
11101 | fi | |
11102 | done | |
11103 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 11104 | |
81ecdfbb RW |
11105 | else |
11106 | ac_cv_search_opendir=no | |
11107 | fi | |
11108 | rm conftest.$ac_ext | |
11109 | LIBS=$ac_func_search_save_LIBS | |
11110 | fi | |
11111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
11112 | $as_echo "$ac_cv_search_opendir" >&6; } | |
11113 | ac_res=$ac_cv_search_opendir | |
11114 | if test "$ac_res" != no; then : | |
11115 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 11116 | |
bec39cab | 11117 | fi |
81ecdfbb | 11118 | |
bec39cab | 11119 | else |
81ecdfbb RW |
11120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
11121 | $as_echo_n "checking for library containing opendir... " >&6; } | |
11122 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11123 | $as_echo_n "(cached) " >&6 | |
11124 | else | |
11125 | ac_func_search_save_LIBS=$LIBS | |
11126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11127 | /* end confdefs.h. */ |
81ecdfbb RW |
11128 | |
11129 | /* Override any GCC internal prototype to avoid an error. | |
11130 | Use char because int might match the return type of a GCC | |
11131 | builtin and then its argument prototype would still apply. */ | |
11132 | #ifdef __cplusplus | |
11133 | extern "C" | |
11134 | #endif | |
11135 | char opendir (); | |
a9322a30 TT |
11136 | int |
11137 | main () | |
11138 | { | |
81ecdfbb | 11139 | return opendir (); |
a9322a30 TT |
11140 | ; |
11141 | return 0; | |
11142 | } | |
bec39cab | 11143 | _ACEOF |
81ecdfbb RW |
11144 | for ac_lib in '' x; do |
11145 | if test -z "$ac_lib"; then | |
11146 | ac_res="none required" | |
11147 | else | |
11148 | ac_res=-l$ac_lib | |
11149 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11150 | fi | |
11151 | if ac_fn_c_try_link "$LINENO"; then : | |
11152 | ac_cv_search_opendir=$ac_res | |
11153 | fi | |
11154 | rm -f core conftest.err conftest.$ac_objext \ | |
11155 | conftest$ac_exeext | |
11156 | if test "${ac_cv_search_opendir+set}" = set; then : | |
11157 | break | |
11158 | fi | |
11159 | done | |
11160 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 11161 | |
81ecdfbb RW |
11162 | else |
11163 | ac_cv_search_opendir=no | |
bec39cab | 11164 | fi |
81ecdfbb RW |
11165 | rm conftest.$ac_ext |
11166 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 11167 | fi |
81ecdfbb RW |
11168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
11169 | $as_echo "$ac_cv_search_opendir" >&6; } | |
11170 | ac_res=$ac_cv_search_opendir | |
11171 | if test "$ac_res" != no; then : | |
11172 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 11173 | |
81ecdfbb | 11174 | fi |
bec39cab | 11175 | |
81ecdfbb | 11176 | fi |
bec39cab | 11177 | |
81ecdfbb RW |
11178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
11179 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
11180 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
11181 | $as_echo_n "(cached) " >&6 | |
9a156167 | 11182 | else |
81ecdfbb RW |
11183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11184 | /* end confdefs.h. */ | |
11185 | #include <sys/types.h> | |
11186 | #include <sys/stat.h> | |
11187 | ||
11188 | #if defined S_ISBLK && defined S_IFDIR | |
11189 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
11190 | #endif | |
11191 | ||
11192 | #if defined S_ISBLK && defined S_IFCHR | |
11193 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
11194 | #endif | |
11195 | ||
11196 | #if defined S_ISLNK && defined S_IFREG | |
11197 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
11198 | #endif | |
11199 | ||
11200 | #if defined S_ISSOCK && defined S_IFREG | |
11201 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
11202 | #endif | |
11203 | ||
bec39cab | 11204 | _ACEOF |
81ecdfbb RW |
11205 | if ac_fn_c_try_compile "$LINENO"; then : |
11206 | ac_cv_header_stat_broken=no | |
11207 | else | |
11208 | ac_cv_header_stat_broken=yes | |
11209 | fi | |
11210 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11211 | fi | |
11212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
11213 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
11214 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 11215 | |
81ecdfbb | 11216 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 11217 | |
bec39cab | 11218 | fi |
81ecdfbb RW |
11219 | |
11220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
11221 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11222 | if test "${ac_cv_header_stdc+set}" = set; then : | |
11223 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11224 | else |
81ecdfbb | 11225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11226 | /* end confdefs.h. */ |
81ecdfbb RW |
11227 | #include <stdlib.h> |
11228 | #include <stdarg.h> | |
11229 | #include <string.h> | |
11230 | #include <float.h> | |
11231 | ||
a9322a30 TT |
11232 | int |
11233 | main () | |
11234 | { | |
a9322a30 TT |
11235 | |
11236 | ; | |
11237 | return 0; | |
11238 | } | |
bec39cab | 11239 | _ACEOF |
81ecdfbb RW |
11240 | if ac_fn_c_try_compile "$LINENO"; then : |
11241 | ac_cv_header_stdc=yes | |
bec39cab | 11242 | else |
81ecdfbb | 11243 | ac_cv_header_stdc=no |
a9322a30 | 11244 | fi |
81ecdfbb | 11245 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11246 | |
81ecdfbb RW |
11247 | if test $ac_cv_header_stdc = yes; then |
11248 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11250 | /* end confdefs.h. */ | |
11251 | #include <string.h> | |
bec39cab | 11252 | |
81ecdfbb RW |
11253 | _ACEOF |
11254 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11255 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 11256 | |
bec39cab | 11257 | else |
81ecdfbb RW |
11258 | ac_cv_header_stdc=no |
11259 | fi | |
11260 | rm -f conftest* | |
11261 | ||
11262 | fi | |
11263 | ||
11264 | if test $ac_cv_header_stdc = yes; then | |
11265 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11266 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11267 | /* end confdefs.h. */ | |
11268 | #include <stdlib.h> | |
11269 | ||
bec39cab | 11270 | _ACEOF |
81ecdfbb RW |
11271 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11272 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 11273 | |
81ecdfbb RW |
11274 | else |
11275 | ac_cv_header_stdc=no | |
11276 | fi | |
11277 | rm -f conftest* | |
bec39cab | 11278 | |
bec39cab | 11279 | fi |
81ecdfbb RW |
11280 | |
11281 | if test $ac_cv_header_stdc = yes; then | |
11282 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11283 | if test "$cross_compiling" = yes; then : | |
11284 | : | |
bec39cab | 11285 | else |
81ecdfbb | 11286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11287 | /* end confdefs.h. */ |
81ecdfbb RW |
11288 | #include <ctype.h> |
11289 | #include <stdlib.h> | |
11290 | #if ((' ' & 0x0FF) == 0x020) | |
11291 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11292 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11293 | #else | |
11294 | # define ISLOWER(c) \ | |
11295 | (('a' <= (c) && (c) <= 'i') \ | |
11296 | || ('j' <= (c) && (c) <= 'r') \ | |
11297 | || ('s' <= (c) && (c) <= 'z')) | |
11298 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11299 | #endif | |
11300 | ||
11301 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
11302 | int |
11303 | main () | |
11304 | { | |
81ecdfbb RW |
11305 | int i; |
11306 | for (i = 0; i < 256; i++) | |
11307 | if (XOR (islower (i), ISLOWER (i)) | |
11308 | || toupper (i) != TOUPPER (i)) | |
11309 | return 2; | |
a9322a30 TT |
11310 | return 0; |
11311 | } | |
bec39cab | 11312 | _ACEOF |
81ecdfbb RW |
11313 | if ac_fn_c_try_run "$LINENO"; then : |
11314 | ||
bec39cab | 11315 | else |
81ecdfbb RW |
11316 | ac_cv_header_stdc=no |
11317 | fi | |
11318 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11319 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11320 | fi | |
bec39cab | 11321 | |
bec39cab | 11322 | fi |
a9322a30 | 11323 | fi |
81ecdfbb RW |
11324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
11325 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11326 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 11327 | |
81ecdfbb | 11328 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 11329 | |
81ecdfbb | 11330 | fi |
bec39cab | 11331 | |
81ecdfbb RW |
11332 | # elf_hp.h is for HP/UX 64-bit shared library support. |
11333 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
11334 | # unconditionally, so what's the point in checking these? | |
11335 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
11336 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
11337 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
11338 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
11339 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
11340 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
11341 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
11342 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h | |
11343 | do : | |
11344 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11345 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11346 | eval as_val=\$$as_ac_Header | |
11347 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11348 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11349 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11350 | _ACEOF |
c906108c | 11351 | |
bec39cab | 11352 | fi |
81ecdfbb RW |
11353 | |
11354 | done | |
11355 | ||
11356 | for ac_header in link.h | |
11357 | do : | |
11358 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
11359 | # include <sys/types.h> | |
11360 | #endif | |
11361 | #if HAVE_NLIST_H | |
11362 | # include <nlist.h> | |
a9322a30 TT |
11363 | #endif |
11364 | ||
81ecdfbb RW |
11365 | " |
11366 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
11367 | cat >>confdefs.h <<_ACEOF | |
11368 | #define HAVE_LINK_H 1 | |
bec39cab | 11369 | _ACEOF |
bec39cab | 11370 | |
a9322a30 | 11371 | fi |
bec39cab | 11372 | |
81ecdfbb | 11373 | done |
c906108c | 11374 | |
81ecdfbb RW |
11375 | for ac_header in sys/proc.h |
11376 | do : | |
11377 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
11378 | # include <sys/param.h> | |
11379 | #endif | |
c906108c | 11380 | |
81ecdfbb RW |
11381 | " |
11382 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 11383 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11384 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 11385 | _ACEOF |
5ee754fc | 11386 | |
bec39cab | 11387 | fi |
81ecdfbb RW |
11388 | |
11389 | done | |
11390 | ||
11391 | for ac_header in sys/user.h | |
11392 | do : | |
11393 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
11394 | # include <sys/param.h> | |
a9322a30 TT |
11395 | #endif |
11396 | ||
81ecdfbb RW |
11397 | " |
11398 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
11399 | cat >>confdefs.h <<_ACEOF | |
11400 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 11401 | _ACEOF |
bec39cab | 11402 | |
a9322a30 | 11403 | fi |
bec39cab | 11404 | |
81ecdfbb | 11405 | done |
5ee754fc | 11406 | |
5ee754fc | 11407 | |
81ecdfbb RW |
11408 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
11409 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
11410 | # think that we don't have <curses.h> if we're using GCC. | |
11411 | case $host_os in | |
11412 | solaris2.[789]) | |
11413 | if test "$GCC" = yes; then | |
11414 | ||
11415 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
11416 | ||
11417 | fi ;; | |
11418 | esac | |
11419 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
11420 | do : | |
11421 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11422 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11423 | eval as_val=\$$as_ac_Header | |
11424 | if test "x$as_val" = x""yes; then : | |
bec39cab | 11425 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11426 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 11427 | _ACEOF |
5ee754fc MK |
11428 | |
11429 | fi | |
11430 | ||
81ecdfbb | 11431 | done |
bec39cab | 11432 | |
81ecdfbb RW |
11433 | for ac_header in term.h |
11434 | do : | |
11435 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
11436 | # include <curses.h> | |
11437 | #endif | |
bec39cab | 11438 | |
81ecdfbb RW |
11439 | " |
11440 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
11441 | cat >>confdefs.h <<_ACEOF | |
11442 | #define HAVE_TERM_H 1 | |
a8111142 | 11443 | _ACEOF |
a8111142 | 11444 | |
a8111142 | 11445 | fi |
a8111142 | 11446 | |
81ecdfbb | 11447 | done |
a8111142 TT |
11448 | |
11449 | ||
81ecdfbb RW |
11450 | # ------------------------- # |
11451 | # Checks for declarations. # | |
11452 | # ------------------------- # | |
a9322a30 | 11453 | |
81ecdfbb RW |
11454 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
11455 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
11456 | ac_have_decl=1 | |
bec39cab | 11457 | else |
81ecdfbb RW |
11458 | ac_have_decl=0 |
11459 | fi | |
11460 | ||
11461 | cat >>confdefs.h <<_ACEOF | |
11462 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 11463 | _ACEOF |
81ecdfbb RW |
11464 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
11465 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
11466 | ac_have_decl=1 | |
11467 | else | |
11468 | ac_have_decl=0 | |
11469 | fi | |
11470 | ||
11471 | cat >>confdefs.h <<_ACEOF | |
11472 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 11473 | _ACEOF |
81ecdfbb RW |
11474 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
11475 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
11476 | ac_have_decl=1 | |
bec39cab | 11477 | else |
81ecdfbb RW |
11478 | ac_have_decl=0 |
11479 | fi | |
bec39cab | 11480 | |
81ecdfbb RW |
11481 | cat >>confdefs.h <<_ACEOF |
11482 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 11483 | _ACEOF |
81ecdfbb RW |
11484 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
11485 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
11486 | ac_have_decl=1 | |
11487 | else | |
11488 | ac_have_decl=0 | |
11489 | fi | |
11490 | ||
11491 | cat >>confdefs.h <<_ACEOF | |
11492 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 11493 | _ACEOF |
81ecdfbb RW |
11494 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
11495 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
11496 | ac_have_decl=1 | |
bec39cab | 11497 | else |
81ecdfbb RW |
11498 | ac_have_decl=0 |
11499 | fi | |
5ee754fc | 11500 | |
81ecdfbb RW |
11501 | cat >>confdefs.h <<_ACEOF |
11502 | #define HAVE_DECL_STRSTR $ac_have_decl | |
11503 | _ACEOF | |
11504 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
11505 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
11506 | ac_have_decl=1 | |
11507 | else | |
11508 | ac_have_decl=0 | |
5ee754fc | 11509 | fi |
81ecdfbb RW |
11510 | |
11511 | cat >>confdefs.h <<_ACEOF | |
11512 | #define HAVE_DECL_GETOPT $ac_have_decl | |
11513 | _ACEOF | |
11514 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
11515 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
11516 | ac_have_decl=1 | |
11517 | else | |
11518 | ac_have_decl=0 | |
5ee754fc | 11519 | fi |
81ecdfbb RW |
11520 | |
11521 | cat >>confdefs.h <<_ACEOF | |
11522 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11523 | _ACEOF | |
11524 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
11525 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
11526 | ac_have_decl=1 | |
11527 | else | |
11528 | ac_have_decl=0 | |
5ee754fc MK |
11529 | fi |
11530 | ||
a9322a30 | 11531 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 11532 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 11533 | _ACEOF |
5ee754fc | 11534 | |
5ee754fc | 11535 | |
81ecdfbb RW |
11536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
11537 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
11538 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
11539 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11540 | else |
81ecdfbb | 11541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11542 | /* end confdefs.h. */ |
81ecdfbb | 11543 | #include <locale.h> |
a9322a30 TT |
11544 | int |
11545 | main () | |
11546 | { | |
81ecdfbb | 11547 | return LC_MESSAGES |
a9322a30 TT |
11548 | ; |
11549 | return 0; | |
11550 | } | |
bec39cab | 11551 | _ACEOF |
81ecdfbb RW |
11552 | if ac_fn_c_try_link "$LINENO"; then : |
11553 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 11554 | else |
81ecdfbb RW |
11555 | am_cv_val_LC_MESSAGES=no |
11556 | fi | |
11557 | rm -f core conftest.err conftest.$ac_objext \ | |
11558 | conftest$ac_exeext conftest.$ac_ext | |
11559 | fi | |
11560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
11561 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
11562 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 11563 | |
81ecdfbb RW |
11564 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
11565 | ||
11566 | fi | |
11567 | ||
11568 | ||
11569 | # ----------------------- # | |
11570 | # Checks for structures. # | |
11571 | # ----------------------- # | |
11572 | ||
11573 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
11574 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
11575 | ||
11576 | cat >>confdefs.h <<_ACEOF | |
11577 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 11578 | _ACEOF |
7eb368b3 | 11579 | |
81ecdfbb | 11580 | |
7eb368b3 | 11581 | fi |
81ecdfbb RW |
11582 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
11583 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 11584 | |
a9322a30 TT |
11585 | cat >>confdefs.h <<_ACEOF |
11586 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
11587 | _ACEOF |
11588 | ||
a9322a30 | 11589 | |
7eb368b3 NR |
11590 | fi |
11591 | ||
7eb368b3 | 11592 | |
a9322a30 TT |
11593 | # ------------------ # |
11594 | # Checks for types. # | |
11595 | # ------------------ # | |
7eb368b3 | 11596 | |
81ecdfbb RW |
11597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
11598 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
11599 | if test "${ac_cv_type_signal+set}" = set; then : | |
11600 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11601 | else |
81ecdfbb | 11602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11603 | /* end confdefs.h. */ |
a9322a30 TT |
11604 | #include <sys/types.h> |
11605 | #include <signal.h> | |
7cb9022a | 11606 | |
a9322a30 TT |
11607 | int |
11608 | main () | |
11609 | { | |
81ecdfbb | 11610 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
11611 | ; |
11612 | return 0; | |
11613 | } | |
bec39cab | 11614 | _ACEOF |
81ecdfbb RW |
11615 | if ac_fn_c_try_compile "$LINENO"; then : |
11616 | ac_cv_type_signal=int | |
bec39cab | 11617 | else |
81ecdfbb | 11618 | ac_cv_type_signal=void |
bec39cab | 11619 | fi |
81ecdfbb | 11620 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11621 | fi |
81ecdfbb RW |
11622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
11623 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 11624 | |
a9322a30 TT |
11625 | cat >>confdefs.h <<_ACEOF |
11626 | #define RETSIGTYPE $ac_cv_type_signal | |
11627 | _ACEOF | |
5ee754fc | 11628 | |
bec39cab | 11629 | |
81ecdfbb | 11630 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
11631 | #include <sys/socket.h> |
11632 | ||
81ecdfbb RW |
11633 | " |
11634 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 11635 | |
a9322a30 TT |
11636 | cat >>confdefs.h <<_ACEOF |
11637 | #define HAVE_SOCKLEN_T 1 | |
11638 | _ACEOF | |
11639 | ||
11640 | ||
11641 | fi | |
11642 | ||
11643 | ||
11644 | # ------------------------------------- # | |
11645 | # Checks for compiler characteristics. # | |
11646 | # ------------------------------------- # | |
11647 | ||
81ecdfbb RW |
11648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
11649 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
11650 | if test "${ac_cv_c_const+set}" = set; then : | |
11651 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 11652 | else |
81ecdfbb | 11653 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11654 | /* end confdefs.h. */ |
a9322a30 TT |
11655 | |
11656 | int | |
11657 | main () | |
11658 | { | |
11659 | /* FIXME: Include the comments suggested by Paul. */ | |
11660 | #ifndef __cplusplus | |
11661 | /* Ultrix mips cc rejects this. */ | |
11662 | typedef int charset[2]; | |
81ecdfbb | 11663 | const charset cs; |
a9322a30 | 11664 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
11665 | char const *const *pcpcc; |
11666 | char **ppc; | |
a9322a30 TT |
11667 | /* NEC SVR4.0.2 mips cc rejects this. */ |
11668 | struct point {int x, y;}; | |
11669 | static struct point const zero = {0,0}; | |
11670 | /* AIX XL C 1.02.0.0 rejects this. | |
11671 | It does not let you subtract one const X* pointer from another in | |
11672 | an arm of an if-expression whose if-part is not a constant | |
11673 | expression */ | |
11674 | const char *g = "string"; | |
81ecdfbb | 11675 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 11676 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
11677 | ++pcpcc; |
11678 | ppc = (char**) pcpcc; | |
11679 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
11680 | { /* SCO 3.2v4 cc rejects this. */ |
11681 | char *t; | |
11682 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
11683 | ||
11684 | *t++ = 0; | |
81ecdfbb | 11685 | if (s) return 0; |
a9322a30 TT |
11686 | } |
11687 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
11688 | int x[] = {25, 17}; | |
11689 | const int *foo = &x[0]; | |
11690 | ++foo; | |
11691 | } | |
11692 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
11693 | typedef const int *iptr; | |
11694 | iptr p = 0; | |
11695 | ++p; | |
11696 | } | |
11697 | { /* AIX XL C 1.02.0.0 rejects this saying | |
11698 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
11699 | struct s { int j; const int *ap[3]; }; | |
11700 | struct s *b; b->j = 5; | |
11701 | } | |
11702 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
11703 | const int foo = 10; | |
81ecdfbb | 11704 | if (!foo) return 0; |
a9322a30 | 11705 | } |
81ecdfbb | 11706 | return !cs[0] && !zero.x; |
a9322a30 TT |
11707 | #endif |
11708 | ||
11709 | ; | |
11710 | return 0; | |
11711 | } | |
bec39cab | 11712 | _ACEOF |
81ecdfbb | 11713 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11714 | ac_cv_c_const=yes |
5ee754fc | 11715 | else |
81ecdfbb | 11716 | ac_cv_c_const=no |
5ee754fc | 11717 | fi |
81ecdfbb | 11718 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 11719 | fi |
81ecdfbb RW |
11720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
11721 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 11722 | if test $ac_cv_c_const = no; then |
bec39cab | 11723 | |
81ecdfbb | 11724 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 11725 | |
5ee754fc | 11726 | fi |
bec39cab | 11727 | |
81ecdfbb RW |
11728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
11729 | $as_echo_n "checking for inline... " >&6; } | |
11730 | if test "${ac_cv_c_inline+set}" = set; then : | |
11731 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11732 | else |
a9322a30 TT |
11733 | ac_cv_c_inline=no |
11734 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 11735 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11736 | /* end confdefs.h. */ |
a9322a30 TT |
11737 | #ifndef __cplusplus |
11738 | typedef int foo_t; | |
11739 | static $ac_kw foo_t static_foo () {return 0; } | |
11740 | $ac_kw foo_t foo () {return 0; } | |
11741 | #endif | |
11742 | ||
bec39cab | 11743 | _ACEOF |
81ecdfbb RW |
11744 | if ac_fn_c_try_compile "$LINENO"; then : |
11745 | ac_cv_c_inline=$ac_kw | |
bec39cab | 11746 | fi |
81ecdfbb RW |
11747 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11748 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 11749 | done |
bec39cab | 11750 | |
5ee754fc | 11751 | fi |
81ecdfbb RW |
11752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
11753 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 11754 | |
a9322a30 TT |
11755 | case $ac_cv_c_inline in |
11756 | inline | yes) ;; | |
11757 | *) | |
11758 | case $ac_cv_c_inline in | |
11759 | no) ac_val=;; | |
11760 | *) ac_val=$ac_cv_c_inline;; | |
11761 | esac | |
11762 | cat >>confdefs.h <<_ACEOF | |
11763 | #ifndef __cplusplus | |
11764 | #define inline $ac_val | |
11765 | #endif | |
11766 | _ACEOF | |
bec39cab AC |
11767 | ;; |
11768 | esac | |
bec39cab | 11769 | |
81ecdfbb RW |
11770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
11771 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
11772 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
11773 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11774 | else |
81ecdfbb RW |
11775 | ac_cv_c_bigendian=unknown |
11776 | # See if we're dealing with a universal compiler. | |
11777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11778 | /* end confdefs.h. */ | |
11779 | #ifndef __APPLE_CC__ | |
11780 | not a universal capable compiler | |
11781 | #endif | |
11782 | typedef int dummy; | |
11783 | ||
11784 | _ACEOF | |
11785 | if ac_fn_c_try_compile "$LINENO"; then : | |
11786 | ||
11787 | # Check for potential -arch flags. It is not universal unless | |
11788 | # there are at least two -arch flags with different values. | |
11789 | ac_arch= | |
11790 | ac_prev= | |
11791 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
11792 | if test -n "$ac_prev"; then | |
11793 | case $ac_word in | |
11794 | i?86 | x86_64 | ppc | ppc64) | |
11795 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
11796 | ac_arch=$ac_word | |
11797 | else | |
11798 | ac_cv_c_bigendian=universal | |
11799 | break | |
11800 | fi | |
11801 | ;; | |
11802 | esac | |
11803 | ac_prev= | |
11804 | elif test "x$ac_word" = "x-arch"; then | |
11805 | ac_prev=arch | |
11806 | fi | |
11807 | done | |
11808 | fi | |
11809 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11810 | if test $ac_cv_c_bigendian = unknown; then | |
11811 | # See if sys/param.h defines the BYTE_ORDER macro. | |
11812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11813 | /* end confdefs.h. */ |
a9322a30 | 11814 | #include <sys/types.h> |
81ecdfbb | 11815 | #include <sys/param.h> |
a9322a30 TT |
11816 | |
11817 | int | |
11818 | main () | |
11819 | { | |
81ecdfbb RW |
11820 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
11821 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
11822 | && LITTLE_ENDIAN) | |
11823 | bogus endian macros | |
11824 | #endif | |
a9322a30 TT |
11825 | |
11826 | ; | |
11827 | return 0; | |
11828 | } | |
bec39cab | 11829 | _ACEOF |
81ecdfbb | 11830 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11831 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 11832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11833 | /* end confdefs.h. */ |
a9322a30 | 11834 | #include <sys/types.h> |
81ecdfbb | 11835 | #include <sys/param.h> |
a9322a30 TT |
11836 | |
11837 | int | |
11838 | main () | |
11839 | { | |
11840 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
11841 | not big endian |
11842 | #endif | |
a9322a30 TT |
11843 | |
11844 | ; | |
11845 | return 0; | |
11846 | } | |
bec39cab | 11847 | _ACEOF |
81ecdfbb | 11848 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11849 | ac_cv_c_bigendian=yes |
5ee754fc | 11850 | else |
81ecdfbb | 11851 | ac_cv_c_bigendian=no |
5ee754fc | 11852 | fi |
81ecdfbb RW |
11853 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11854 | fi | |
11855 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11856 | fi | |
11857 | if test $ac_cv_c_bigendian = unknown; then | |
11858 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
11859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11860 | /* end confdefs.h. */ | |
11861 | #include <limits.h> | |
bec39cab | 11862 | |
81ecdfbb RW |
11863 | int |
11864 | main () | |
11865 | { | |
11866 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
11867 | bogus endian macros | |
11868 | #endif | |
11869 | ||
11870 | ; | |
11871 | return 0; | |
11872 | } | |
7eb368b3 | 11873 | _ACEOF |
81ecdfbb RW |
11874 | if ac_fn_c_try_compile "$LINENO"; then : |
11875 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
11876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 11877 | /* end confdefs.h. */ |
81ecdfbb RW |
11878 | #include <limits.h> |
11879 | ||
7eb368b3 NR |
11880 | int |
11881 | main () | |
11882 | { | |
81ecdfbb RW |
11883 | #ifndef _BIG_ENDIAN |
11884 | not big endian | |
11885 | #endif | |
11886 | ||
7eb368b3 NR |
11887 | ; |
11888 | return 0; | |
11889 | } | |
11890 | _ACEOF | |
81ecdfbb | 11891 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 11892 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
11893 | else |
11894 | ac_cv_c_bigendian=no | |
a9322a30 | 11895 | fi |
81ecdfbb | 11896 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 11897 | fi |
81ecdfbb RW |
11898 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11899 | fi | |
11900 | if test $ac_cv_c_bigendian = unknown; then | |
11901 | # Compile a test program. | |
11902 | if test "$cross_compiling" = yes; then : | |
11903 | # Try to guess by grepping values from an object file. | |
11904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11905 | /* end confdefs.h. */ | |
11906 | short int ascii_mm[] = | |
11907 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
11908 | short int ascii_ii[] = | |
11909 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
11910 | int use_ascii (int i) { | |
11911 | return ascii_mm[i] + ascii_ii[i]; | |
11912 | } | |
11913 | short int ebcdic_ii[] = | |
11914 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
11915 | short int ebcdic_mm[] = | |
11916 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
11917 | int use_ebcdic (int i) { | |
11918 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
11919 | } | |
11920 | extern int foo; | |
7eb368b3 | 11921 | |
81ecdfbb RW |
11922 | int |
11923 | main () | |
11924 | { | |
11925 | return use_ascii (foo) == use_ebcdic (foo); | |
11926 | ; | |
11927 | return 0; | |
11928 | } | |
11929 | _ACEOF | |
11930 | if ac_fn_c_try_compile "$LINENO"; then : | |
11931 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
11932 | ac_cv_c_bigendian=yes | |
11933 | fi | |
11934 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
11935 | if test "$ac_cv_c_bigendian" = unknown; then | |
11936 | ac_cv_c_bigendian=no | |
11937 | else | |
11938 | # finding both strings is unlikely to happen, but who knows? | |
11939 | ac_cv_c_bigendian=unknown | |
11940 | fi | |
11941 | fi | |
7eb368b3 | 11942 | fi |
81ecdfbb | 11943 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11944 | else |
81ecdfbb | 11945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11946 | /* end confdefs.h. */ |
81ecdfbb | 11947 | $ac_includes_default |
d3ea6809 MM |
11948 | int |
11949 | main () | |
11950 | { | |
81ecdfbb RW |
11951 | |
11952 | /* Are we little or big endian? From Harbison&Steele. */ | |
11953 | union | |
11954 | { | |
11955 | long int l; | |
11956 | char c[sizeof (long int)]; | |
11957 | } u; | |
11958 | u.l = 1; | |
11959 | return u.c[sizeof (long int) - 1] == 1; | |
11960 | ||
11961 | ; | |
11962 | return 0; | |
d3ea6809 MM |
11963 | } |
11964 | _ACEOF | |
81ecdfbb | 11965 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 11966 | ac_cv_c_bigendian=no |
d3ea6809 | 11967 | else |
81ecdfbb | 11968 | ac_cv_c_bigendian=yes |
d3ea6809 | 11969 | fi |
81ecdfbb RW |
11970 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11971 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 11972 | fi |
a9322a30 | 11973 | |
81ecdfbb RW |
11974 | fi |
11975 | fi | |
11976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
11977 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
11978 | case $ac_cv_c_bigendian in #( | |
11979 | yes) | |
11980 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
11981 | ;; #( | |
11982 | no) | |
11983 | ;; #( | |
11984 | universal) | |
11985 | ||
11986 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
11987 | ||
11988 | ;; #( | |
11989 | *) | |
11990 | as_fn_error "unknown endianness | |
11991 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
11992 | esac | |
d3ea6809 MM |
11993 | |
11994 | ||
a9322a30 TT |
11995 | # ------------------------------ # |
11996 | # Checks for library functions. # | |
11997 | # ------------------------------ # | |
d3ea6809 | 11998 | |
a9322a30 TT |
11999 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
12000 | # for constant arguments. Useless! | |
81ecdfbb RW |
12001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
12002 | $as_echo_n "checking for working alloca.h... " >&6; } | |
12003 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
12004 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 12005 | else |
81ecdfbb | 12006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 12007 | /* end confdefs.h. */ |
a9322a30 | 12008 | #include <alloca.h> |
bec39cab AC |
12009 | int |
12010 | main () | |
12011 | { | |
a9322a30 | 12012 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 12013 | if (p) return 0; |
bec39cab AC |
12014 | ; |
12015 | return 0; | |
12016 | } | |
12017 | _ACEOF | |
81ecdfbb | 12018 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 12019 | ac_cv_working_alloca_h=yes |
bec39cab | 12020 | else |
81ecdfbb | 12021 | ac_cv_working_alloca_h=no |
bec39cab | 12022 | fi |
81ecdfbb RW |
12023 | rm -f core conftest.err conftest.$ac_objext \ |
12024 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 12025 | fi |
81ecdfbb RW |
12026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
12027 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
12028 | if test $ac_cv_working_alloca_h = yes; then |
12029 | ||
81ecdfbb | 12030 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 12031 | |
c906108c | 12032 | fi |
bec39cab | 12033 | |
81ecdfbb RW |
12034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
12035 | $as_echo_n "checking for alloca... " >&6; } | |
12036 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
12037 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12038 | else |
81ecdfbb | 12039 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12040 | /* end confdefs.h. */ |
a9322a30 TT |
12041 | #ifdef __GNUC__ |
12042 | # define alloca __builtin_alloca | |
b4e70030 | 12043 | #else |
a9322a30 TT |
12044 | # ifdef _MSC_VER |
12045 | # include <malloc.h> | |
12046 | # define alloca _alloca | |
12047 | # else | |
81ecdfbb | 12048 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
12049 | # include <alloca.h> |
12050 | # else | |
12051 | # ifdef _AIX | |
12052 | #pragma alloca | |
12053 | # else | |
12054 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
12055 | char *alloca (); | |
12056 | # endif | |
12057 | # endif | |
12058 | # endif | |
12059 | # endif | |
c906108c | 12060 | #endif |
97bf5e38 | 12061 | |
bec39cab AC |
12062 | int |
12063 | main () | |
12064 | { | |
a9322a30 | 12065 | char *p = (char *) alloca (1); |
81ecdfbb | 12066 | if (p) return 0; |
bec39cab AC |
12067 | ; |
12068 | return 0; | |
12069 | } | |
12070 | _ACEOF | |
81ecdfbb | 12071 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 12072 | ac_cv_func_alloca_works=yes |
bec39cab | 12073 | else |
81ecdfbb | 12074 | ac_cv_func_alloca_works=no |
bec39cab | 12075 | fi |
81ecdfbb RW |
12076 | rm -f core conftest.err conftest.$ac_objext \ |
12077 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 12078 | fi |
81ecdfbb RW |
12079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
12080 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
12081 | |
12082 | if test $ac_cv_func_alloca_works = yes; then | |
12083 | ||
81ecdfbb | 12084 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 12085 | |
a9322a30 TT |
12086 | else |
12087 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
12088 | # that cause trouble. Some versions do not even contain alloca or | |
12089 | # contain a buggy version. If you still want to use their alloca, | |
12090 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
12091 | ||
81ecdfbb | 12092 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 12093 | |
81ecdfbb | 12094 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 12095 | |
bec39cab | 12096 | |
81ecdfbb RW |
12097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
12098 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
12099 | if test "${ac_cv_os_cray+set}" = set; then : | |
12100 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12101 | else |
81ecdfbb | 12102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 12103 | /* end confdefs.h. */ |
81ecdfbb | 12104 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
12105 | webecray |
12106 | #else | |
12107 | wenotbecray | |
12108 | #endif | |
12109 | ||
12110 | _ACEOF | |
12111 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 12112 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
12113 | ac_cv_os_cray=yes |
12114 | else | |
81ecdfbb | 12115 | ac_cv_os_cray=no |
bec39cab | 12116 | fi |
81ecdfbb RW |
12117 | rm -f conftest* |
12118 | ||
bec39cab | 12119 | fi |
81ecdfbb RW |
12120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
12121 | $as_echo "$ac_cv_os_cray" >&6; } | |
12122 | if test $ac_cv_os_cray = yes; then | |
12123 | for ac_func in _getb67 GETB67 getb67; do | |
12124 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12125 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12126 | eval as_val=\$$as_ac_var | |
12127 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
12128 | |
12129 | cat >>confdefs.h <<_ACEOF | |
12130 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 12131 | _ACEOF |
c906108c | 12132 | |
a9322a30 | 12133 | break |
c906108c SS |
12134 | fi |
12135 | ||
a9322a30 TT |
12136 | done |
12137 | fi | |
bec39cab | 12138 | |
81ecdfbb RW |
12139 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
12140 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
12141 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
12142 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12143 | else |
81ecdfbb | 12144 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12145 | ac_cv_c_stack_direction=0 |
bec39cab | 12146 | else |
81ecdfbb | 12147 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12148 | /* end confdefs.h. */ |
81ecdfbb | 12149 | $ac_includes_default |
a9322a30 TT |
12150 | int |
12151 | find_stack_direction () | |
b4e70030 | 12152 | { |
a9322a30 TT |
12153 | static char *addr = 0; |
12154 | auto char dummy; | |
12155 | if (addr == 0) | |
12156 | { | |
12157 | addr = &dummy; | |
12158 | return find_stack_direction (); | |
12159 | } | |
12160 | else | |
12161 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 12162 | } |
b757528f | 12163 | |
bec39cab AC |
12164 | int |
12165 | main () | |
12166 | { | |
81ecdfbb | 12167 | return find_stack_direction () < 0; |
bec39cab AC |
12168 | } |
12169 | _ACEOF | |
81ecdfbb | 12170 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12171 | ac_cv_c_stack_direction=1 |
12172 | else | |
81ecdfbb | 12173 | ac_cv_c_stack_direction=-1 |
a9322a30 | 12174 | fi |
81ecdfbb RW |
12175 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12176 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12177 | fi |
a9322a30 | 12178 | |
81ecdfbb RW |
12179 | fi |
12180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12181 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
12182 | cat >>confdefs.h <<_ACEOF |
12183 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12184 | _ACEOF | |
12185 | ||
12186 | ||
12187 | fi | |
12188 | ||
a9322a30 | 12189 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
12190 | do : |
12191 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12192 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12193 | eval as_val=\$$as_ac_Header | |
12194 | if test "x$as_val" = x""yes; then : | |
bec39cab | 12195 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12196 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12197 | _ACEOF |
b757528f | 12198 | |
b757528f | 12199 | fi |
bec39cab | 12200 | |
a9322a30 | 12201 | done |
a3828db0 | 12202 | |
a9322a30 | 12203 | for ac_func in getpagesize |
81ecdfbb RW |
12204 | do : |
12205 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
12206 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 12207 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12208 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12209 | _ACEOF |
bcb3dc3d | 12210 | |
bcb3dc3d MK |
12211 | fi |
12212 | done | |
12213 | ||
81ecdfbb RW |
12214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12215 | $as_echo_n "checking for working mmap... " >&6; } | |
12216 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
12217 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12218 | else |
81ecdfbb | 12219 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12220 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12221 | else |
81ecdfbb | 12222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12223 | /* end confdefs.h. */ |
a9322a30 TT |
12224 | $ac_includes_default |
12225 | /* malloc might have been renamed as rpl_malloc. */ | |
12226 | #undef malloc | |
bec39cab | 12227 | |
a9322a30 TT |
12228 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12229 | Here is a matrix of mmap possibilities: | |
12230 | mmap private not fixed | |
12231 | mmap private fixed at somewhere currently unmapped | |
12232 | mmap private fixed at somewhere already mapped | |
12233 | mmap shared not fixed | |
12234 | mmap shared fixed at somewhere currently unmapped | |
12235 | mmap shared fixed at somewhere already mapped | |
12236 | For private mappings, we should verify that changes cannot be read() | |
12237 | back from the file, nor mmap's back from the file at a different | |
12238 | address. (There have been systems where private was not correctly | |
12239 | implemented like the infamous i386 svr4.0, and systems where the | |
12240 | VM page cache was not coherent with the file system buffer cache | |
12241 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12242 | For shared mappings, we should conversely verify that changes get | |
12243 | propagated back to all the places they're supposed to be. | |
bec39cab | 12244 | |
a9322a30 TT |
12245 | Grep wants private fixed already mapped. |
12246 | The main things grep needs to know about mmap are: | |
12247 | * does it exist and is it safe to write into the mmap'd area | |
12248 | * how to use it (BSD variants) */ | |
8b9cf735 | 12249 | |
a9322a30 TT |
12250 | #include <fcntl.h> |
12251 | #include <sys/mman.h> | |
8b9cf735 | 12252 | |
81ecdfbb | 12253 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12254 | char *malloc (); |
a3828db0 MK |
12255 | #endif |
12256 | ||
a9322a30 | 12257 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12258 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 12259 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 12260 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
12261 | # define HAVE_SYS_PARAM_H 1 |
12262 | # endif | |
12263 | ||
12264 | # ifdef _SC_PAGESIZE | |
12265 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12266 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12267 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12268 | # include <sys/param.h> |
12269 | # ifdef EXEC_PAGESIZE | |
12270 | # define getpagesize() EXEC_PAGESIZE | |
12271 | # else /* no EXEC_PAGESIZE */ | |
12272 | # ifdef NBPG | |
12273 | # define getpagesize() NBPG * CLSIZE | |
12274 | # ifndef CLSIZE | |
12275 | # define CLSIZE 1 | |
12276 | # endif /* no CLSIZE */ | |
12277 | # else /* no NBPG */ | |
12278 | # ifdef NBPC | |
12279 | # define getpagesize() NBPC | |
12280 | # else /* no NBPC */ | |
12281 | # ifdef PAGESIZE | |
12282 | # define getpagesize() PAGESIZE | |
12283 | # endif /* PAGESIZE */ | |
12284 | # endif /* no NBPC */ | |
12285 | # endif /* no NBPG */ | |
12286 | # endif /* no EXEC_PAGESIZE */ | |
12287 | # else /* no HAVE_SYS_PARAM_H */ | |
12288 | # define getpagesize() 8192 /* punt totally */ | |
12289 | # endif /* no HAVE_SYS_PARAM_H */ | |
12290 | # endif /* no _SC_PAGESIZE */ | |
12291 | ||
12292 | #endif /* no HAVE_GETPAGESIZE */ | |
12293 | ||
bec39cab AC |
12294 | int |
12295 | main () | |
12296 | { | |
a9322a30 TT |
12297 | char *data, *data2, *data3; |
12298 | int i, pagesize; | |
12299 | int fd; | |
12300 | ||
12301 | pagesize = getpagesize (); | |
12302 | ||
12303 | /* First, make a file with some known garbage in it. */ | |
12304 | data = (char *) malloc (pagesize); | |
12305 | if (!data) | |
81ecdfbb | 12306 | return 1; |
a9322a30 TT |
12307 | for (i = 0; i < pagesize; ++i) |
12308 | *(data + i) = rand (); | |
12309 | umask (0); | |
12310 | fd = creat ("conftest.mmap", 0600); | |
12311 | if (fd < 0) | |
81ecdfbb | 12312 | return 1; |
a9322a30 | 12313 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 12314 | return 1; |
a9322a30 TT |
12315 | close (fd); |
12316 | ||
12317 | /* Next, try to mmap the file at a fixed address which already has | |
12318 | something else allocated at it. If we can, also make sure that | |
12319 | we see the same garbage. */ | |
12320 | fd = open ("conftest.mmap", O_RDWR); | |
12321 | if (fd < 0) | |
81ecdfbb | 12322 | return 1; |
a9322a30 TT |
12323 | data2 = (char *) malloc (2 * pagesize); |
12324 | if (!data2) | |
81ecdfbb RW |
12325 | return 1; |
12326 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
12327 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12328 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 12329 | return 1; |
a9322a30 TT |
12330 | for (i = 0; i < pagesize; ++i) |
12331 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 12332 | return 1; |
a9322a30 TT |
12333 | |
12334 | /* Finally, make sure that changes to the mapped area do not | |
12335 | percolate back to the file as seen by read(). (This is a bug on | |
12336 | some variants of i386 svr4.0.) */ | |
12337 | for (i = 0; i < pagesize; ++i) | |
12338 | *(data2 + i) = *(data2 + i) + 1; | |
12339 | data3 = (char *) malloc (pagesize); | |
12340 | if (!data3) | |
81ecdfbb | 12341 | return 1; |
a9322a30 | 12342 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 12343 | return 1; |
a9322a30 TT |
12344 | for (i = 0; i < pagesize; ++i) |
12345 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 12346 | return 1; |
a9322a30 | 12347 | close (fd); |
81ecdfbb | 12348 | return 0; |
bec39cab AC |
12349 | } |
12350 | _ACEOF | |
81ecdfbb | 12351 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12352 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12353 | else |
81ecdfbb | 12354 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12355 | fi |
81ecdfbb RW |
12356 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12357 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12358 | fi |
81ecdfbb | 12359 | |
a9322a30 | 12360 | fi |
81ecdfbb RW |
12361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12362 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12363 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12364 | ||
81ecdfbb | 12365 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12366 | |
086ec9eb | 12367 | fi |
a9322a30 | 12368 | rm -f conftest.mmap |
a3828db0 | 12369 | |
81ecdfbb RW |
12370 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
12371 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 12372 | |
a9322a30 TT |
12373 | else |
12374 | ||
12375 | cat >>confdefs.h <<_ACEOF | |
12376 | #define pid_t int | |
bec39cab | 12377 | _ACEOF |
086ec9eb MK |
12378 | |
12379 | fi | |
12380 | ||
81ecdfbb RW |
12381 | for ac_header in vfork.h |
12382 | do : | |
12383 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
12384 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 12385 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12386 | #define HAVE_VFORK_H 1 |
bec39cab | 12387 | _ACEOF |
c906108c SS |
12388 | |
12389 | fi | |
a9322a30 | 12390 | |
a3828db0 | 12391 | done |
c906108c | 12392 | |
a9322a30 | 12393 | for ac_func in fork vfork |
81ecdfbb RW |
12394 | do : |
12395 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12396 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12397 | eval as_val=\$$as_ac_var | |
12398 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 12399 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12400 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 12401 | _ACEOF |
b83266a0 | 12402 | |
97bf5e38 | 12403 | fi |
a3828db0 | 12404 | done |
b83266a0 | 12405 | |
a9322a30 | 12406 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
12407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
12408 | $as_echo_n "checking for working fork... " >&6; } | |
12409 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
12410 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12411 | else |
81ecdfbb | 12412 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12413 | ac_cv_func_fork_works=cross |
12414 | else | |
81ecdfbb RW |
12415 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12416 | /* end confdefs.h. */ | |
12417 | $ac_includes_default | |
12418 | int | |
12419 | main () | |
12420 | { | |
12421 | ||
12422 | /* By Ruediger Kuhlmann. */ | |
12423 | return fork () < 0; | |
12424 | ||
12425 | ; | |
12426 | return 0; | |
12427 | } | |
a9322a30 | 12428 | _ACEOF |
81ecdfbb | 12429 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12430 | ac_cv_func_fork_works=yes |
12431 | else | |
81ecdfbb | 12432 | ac_cv_func_fork_works=no |
a9322a30 | 12433 | fi |
81ecdfbb RW |
12434 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12435 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12436 | fi |
81ecdfbb | 12437 | |
a9322a30 | 12438 | fi |
81ecdfbb RW |
12439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
12440 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
12441 | |
12442 | else | |
12443 | ac_cv_func_fork_works=$ac_cv_func_fork | |
12444 | fi | |
12445 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12446 | case $host in | |
12447 | *-*-amigaos* | *-*-msdosdjgpp*) | |
12448 | # Override, as these systems have only a dummy fork() stub | |
12449 | ac_cv_func_fork_works=no | |
12450 | ;; | |
12451 | *) | |
12452 | ac_cv_func_fork_works=yes | |
12453 | ;; | |
12454 | esac | |
81ecdfbb RW |
12455 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
12456 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12457 | fi |
12458 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
12459 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
12460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
12461 | $as_echo_n "checking for working vfork... " >&6; } | |
12462 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
12463 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 12464 | else |
81ecdfbb | 12465 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12466 | ac_cv_func_vfork_works=cross |
12467 | else | |
81ecdfbb | 12468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
12469 | /* end confdefs.h. */ |
12470 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 12471 | $ac_includes_default |
a9322a30 | 12472 | #include <sys/wait.h> |
81ecdfbb | 12473 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
12474 | # include <vfork.h> |
12475 | #endif | |
12476 | /* On some sparc systems, changes by the child to local and incoming | |
12477 | argument registers are propagated back to the parent. The compiler | |
12478 | is told about this with #include <vfork.h>, but some compilers | |
12479 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
12480 | static variable whose address is put into a register that is | |
12481 | clobbered by the vfork. */ | |
12482 | static void | |
12483 | #ifdef __cplusplus | |
12484 | sparc_address_test (int arg) | |
12485 | # else | |
12486 | sparc_address_test (arg) int arg; | |
12487 | #endif | |
12488 | { | |
12489 | static pid_t child; | |
12490 | if (!child) { | |
12491 | child = vfork (); | |
12492 | if (child < 0) { | |
12493 | perror ("vfork"); | |
12494 | _exit(2); | |
12495 | } | |
12496 | if (!child) { | |
12497 | arg = getpid(); | |
12498 | write(-1, "", 0); | |
12499 | _exit (arg); | |
12500 | } | |
12501 | } | |
12502 | } | |
12503 | ||
12504 | int | |
12505 | main () | |
12506 | { | |
12507 | pid_t parent = getpid (); | |
12508 | pid_t child; | |
12509 | ||
12510 | sparc_address_test (0); | |
12511 | ||
12512 | child = vfork (); | |
12513 | ||
12514 | if (child == 0) { | |
12515 | /* Here is another test for sparc vfork register problems. This | |
12516 | test uses lots of local variables, at least as many local | |
12517 | variables as main has allocated so far including compiler | |
12518 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
12519 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
12520 | reuse the register of parent for one of the local variables, | |
12521 | since it will think that parent can't possibly be used any more | |
12522 | in this routine. Assigning to the local variable will thus | |
12523 | munge parent in the parent process. */ | |
12524 | pid_t | |
12525 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
12526 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
12527 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
12528 | use the same hardware register for all 8 local variables. */ | |
12529 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
12530 | || p != p5 || p != p6 || p != p7) | |
12531 | _exit(1); | |
12532 | ||
12533 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
12534 | from child file descriptors. If the child closes a descriptor | |
12535 | before it execs or exits, this munges the parent's descriptor | |
12536 | as well. Test for this by closing stdout in the child. */ | |
12537 | _exit(close(fileno(stdout)) != 0); | |
12538 | } else { | |
12539 | int status; | |
12540 | struct stat st; | |
12541 | ||
12542 | while (wait(&status) != child) | |
12543 | ; | |
81ecdfbb | 12544 | return ( |
a9322a30 TT |
12545 | /* Was there some problem with vforking? */ |
12546 | child < 0 | |
12547 | ||
12548 | /* Did the child fail? (This shouldn't happen.) */ | |
12549 | || status | |
12550 | ||
12551 | /* Did the vfork/compiler bug occur? */ | |
12552 | || parent != getpid() | |
12553 | ||
12554 | /* Did the file descriptor bug occur? */ | |
12555 | || fstat(fileno(stdout), &st) != 0 | |
12556 | ); | |
12557 | } | |
12558 | } | |
12559 | _ACEOF | |
81ecdfbb | 12560 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12561 | ac_cv_func_vfork_works=yes |
12562 | else | |
81ecdfbb | 12563 | ac_cv_func_vfork_works=no |
a9322a30 | 12564 | fi |
81ecdfbb RW |
12565 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12566 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12567 | fi |
81ecdfbb | 12568 | |
a9322a30 | 12569 | fi |
81ecdfbb RW |
12570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
12571 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
12572 | |
12573 | fi; | |
12574 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12575 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
12576 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
12577 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12578 | fi |
12579 | ||
12580 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
12581 | ||
81ecdfbb | 12582 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
12583 | |
12584 | else | |
12585 | ||
81ecdfbb | 12586 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
12587 | |
12588 | fi | |
12589 | if test "x$ac_cv_func_fork_works" = xyes; then | |
12590 | ||
81ecdfbb | 12591 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
12592 | |
12593 | fi | |
12594 | ||
a9322a30 | 12595 | for ac_func in canonicalize_file_name realpath getrusage getuid \ |
db5e03ae | 12596 | getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \ |
a9322a30 | 12597 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 12598 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
0a4f61e3 | 12599 | setrlimit getrlimit posix_madvise waitpid |
81ecdfbb RW |
12600 | do : |
12601 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12602 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12603 | eval as_val=\$$as_ac_var | |
12604 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 12605 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12606 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
12607 | _ACEOF |
12608 | ||
12609 | fi | |
12610 | done | |
12611 | ||
12612 | ||
81ecdfbb RW |
12613 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
12614 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12615 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
12616 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 12617 | else |
81ecdfbb | 12618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
12619 | /* end confdefs.h. */ |
12620 | #include <langinfo.h> | |
12621 | int | |
12622 | main () | |
12623 | { | |
12624 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
12625 | ; |
12626 | return 0; | |
12627 | } | |
12628 | _ACEOF | |
81ecdfbb | 12629 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 12630 | am_cv_langinfo_codeset=yes |
a4db0f07 | 12631 | else |
81ecdfbb | 12632 | am_cv_langinfo_codeset=no |
a4db0f07 | 12633 | fi |
81ecdfbb RW |
12634 | rm -f core conftest.err conftest.$ac_objext \ |
12635 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 12636 | |
a4db0f07 | 12637 | fi |
81ecdfbb RW |
12638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12639 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
12640 | if test $am_cv_langinfo_codeset = yes; then |
12641 | ||
81ecdfbb | 12642 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 12643 | |
6c7a06a3 | 12644 | fi |
c906108c | 12645 | |
06825bd1 | 12646 | |
a3828db0 MK |
12647 | # Check the return and argument types of ptrace. No canned test for |
12648 | # this, so roll our own. | |
12649 | gdb_ptrace_headers=' | |
12650 | #if HAVE_SYS_TYPES_H | |
12651 | # include <sys/types.h> | |
12652 | #endif | |
12653 | #if HAVE_SYS_PTRACE_H | |
12654 | # include <sys/ptrace.h> | |
12655 | #endif | |
12656 | #if HAVE_UNISTD_H | |
12657 | # include <unistd.h> | |
12658 | #endif | |
12659 | ' | |
12660 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
12661 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
12662 | " | |
12663 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
12664 | ac_have_decl=1 | |
06825bd1 | 12665 | else |
81ecdfbb | 12666 | ac_have_decl=0 |
06825bd1 | 12667 | fi |
06825bd1 | 12668 | |
a3828db0 | 12669 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12670 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 12671 | _ACEOF |
81ecdfbb | 12672 | if test $ac_have_decl = 1; then : |
bec39cab | 12673 | |
a3828db0 | 12674 | else |
a3828db0 MK |
12675 | |
12676 | : ${gdb_cv_func_ptrace_ret='int'} | |
12677 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12678 | ||
06825bd1 MK |
12679 | fi |
12680 | ||
064ef605 DJ |
12681 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
12682 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
12683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
12684 | $as_echo_n "checking return type of ptrace... " >&6; } | |
12685 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
12686 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12687 | else |
81ecdfbb | 12688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12689 | /* end confdefs.h. */ |
a3828db0 | 12690 | $gdb_ptrace_headers |
bec39cab AC |
12691 | int |
12692 | main () | |
12693 | { | |
064ef605 DJ |
12694 | extern long ptrace (enum __ptrace_request, ...); |
12695 | ; | |
12696 | return 0; | |
12697 | } | |
12698 | _ACEOF | |
81ecdfbb | 12699 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
12700 | gdb_cv_func_ptrace_ret='long' |
12701 | else | |
81ecdfbb | 12702 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12703 | /* end confdefs.h. */ |
12704 | $gdb_ptrace_headers | |
12705 | int | |
12706 | main () | |
12707 | { | |
a3828db0 | 12708 | extern int ptrace (); |
bec39cab AC |
12709 | ; |
12710 | return 0; | |
12711 | } | |
12712 | _ACEOF | |
81ecdfbb | 12713 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12714 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 12715 | else |
81ecdfbb | 12716 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 12717 | fi |
81ecdfbb | 12718 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 12719 | fi |
81ecdfbb | 12720 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 12721 | fi |
81ecdfbb RW |
12722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
12723 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 12724 | |
a3828db0 MK |
12725 | cat >>confdefs.h <<_ACEOF |
12726 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 12727 | _ACEOF |
70f9f479 | 12728 | |
a3828db0 | 12729 | # Check argument types. |
81ecdfbb RW |
12730 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
12731 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
12732 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
12733 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12734 | else |
a3828db0 | 12735 | |
81ecdfbb | 12736 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
12737 | /* end confdefs.h. */ |
12738 | $gdb_ptrace_headers | |
12739 | int | |
12740 | main () | |
12741 | { | |
12742 | extern long ptrace (enum __ptrace_request, ...); | |
12743 | ; | |
12744 | return 0; | |
12745 | } | |
12746 | _ACEOF | |
81ecdfbb | 12747 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
12748 | gdb_cv_func_ptrace_args='int,int,long,long' |
12749 | else | |
064ef605 | 12750 | |
a3828db0 MK |
12751 | for gdb_arg1 in 'int' 'long'; do |
12752 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 12753 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 12754 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 12755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12756 | /* end confdefs.h. */ |
a3828db0 | 12757 | $gdb_ptrace_headers |
bec39cab AC |
12758 | int |
12759 | main () | |
12760 | { | |
a3828db0 MK |
12761 | |
12762 | extern $gdb_cv_func_ptrace_ret | |
12763 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
12764 | ||
bec39cab AC |
12765 | ; |
12766 | return 0; | |
12767 | } | |
12768 | _ACEOF | |
81ecdfbb | 12769 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12770 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
12771 | break 4; | |
5c7f2947 | 12772 | fi |
81ecdfbb | 12773 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 12774 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 12775 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12776 | /* end confdefs.h. */ |
a3828db0 | 12777 | $gdb_ptrace_headers |
bec39cab AC |
12778 | int |
12779 | main () | |
12780 | { | |
a3828db0 MK |
12781 | |
12782 | extern $gdb_cv_func_ptrace_ret | |
12783 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
12784 | ||
bec39cab AC |
12785 | ; |
12786 | return 0; | |
12787 | } | |
12788 | _ACEOF | |
81ecdfbb | 12789 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
12790 | |
12791 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
12792 | break 5; | |
78434e59 | 12793 | fi |
81ecdfbb | 12794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
12795 | done |
12796 | done | |
12797 | done | |
12798 | done | |
12799 | done | |
12800 | # Provide a safe default value. | |
12801 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
12802 | ||
064ef605 | 12803 | fi |
81ecdfbb | 12804 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 12805 | fi |
81ecdfbb RW |
12806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
12807 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
12808 | ac_save_IFS=$IFS; IFS=',' |
12809 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
12810 | IFS=$ac_save_IFS | |
12811 | shift | |
bec39cab | 12812 | |
a3828db0 MK |
12813 | cat >>confdefs.h <<_ACEOF |
12814 | #define PTRACE_TYPE_ARG3 $3 | |
12815 | _ACEOF | |
12816 | ||
12817 | if test -n "$5"; then | |
12818 | ||
12819 | cat >>confdefs.h <<_ACEOF | |
12820 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 12821 | _ACEOF |
78434e59 MK |
12822 | |
12823 | fi | |
12824 | ||
a3828db0 | 12825 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
12826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12827 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12828 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12829 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 12830 | else |
81ecdfbb RW |
12831 | if test "$cross_compiling" = yes; then : |
12832 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 12833 | else |
81ecdfbb | 12834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12835 | /* end confdefs.h. */ |
81ecdfbb | 12836 | $ac_includes_default |
bec39cab AC |
12837 | int |
12838 | main () | |
12839 | { | |
a3828db0 MK |
12840 | /* If this system has a BSD-style setpgrp which takes arguments, |
12841 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
12842 | exit successfully. */ | |
81ecdfbb | 12843 | return setpgrp (1,1) != -1; |
bec39cab AC |
12844 | ; |
12845 | return 0; | |
12846 | } | |
12847 | _ACEOF | |
81ecdfbb | 12848 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 12849 | ac_cv_func_setpgrp_void=no |
c906108c | 12850 | else |
81ecdfbb | 12851 | ac_cv_func_setpgrp_void=yes |
c906108c | 12852 | fi |
81ecdfbb RW |
12853 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12854 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 12855 | fi |
81ecdfbb | 12856 | |
a3828db0 | 12857 | fi |
81ecdfbb RW |
12858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12859 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
12860 | if test $ac_cv_func_setpgrp_void = yes; then |
12861 | ||
81ecdfbb | 12862 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
12863 | |
12864 | fi | |
a3828db0 MK |
12865 | |
12866 | else | |
81ecdfbb RW |
12867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
12868 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
12869 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
12870 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 12871 | else |
81ecdfbb | 12872 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12873 | /* end confdefs.h. */ |
a3828db0 MK |
12874 | |
12875 | #include <unistd.h> | |
12876 | ||
bec39cab AC |
12877 | int |
12878 | main () | |
12879 | { | |
a3828db0 MK |
12880 | |
12881 | if (setpgrp(1,1) == -1) | |
12882 | exit (0); | |
12883 | else | |
12884 | exit (1); | |
12885 | ||
bec39cab AC |
12886 | ; |
12887 | return 0; | |
12888 | } | |
12889 | _ACEOF | |
81ecdfbb | 12890 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12891 | ac_cv_func_setpgrp_void=no |
c906108c | 12892 | else |
81ecdfbb | 12893 | ac_cv_func_setpgrp_void=yes |
c906108c | 12894 | fi |
81ecdfbb | 12895 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12896 | fi |
81ecdfbb RW |
12897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
12898 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 12899 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 12900 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 12901 | |
a3828db0 | 12902 | fi |
c906108c SS |
12903 | fi |
12904 | ||
a3828db0 MK |
12905 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
12906 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
12907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
12908 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
12909 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
12910 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12911 | else |
81ecdfbb | 12912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12913 | /* end confdefs.h. */ |
a3828db0 MK |
12914 | |
12915 | #include <setjmp.h> | |
12916 | ||
bec39cab AC |
12917 | int |
12918 | main () | |
12919 | { | |
a3828db0 | 12920 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
12921 | ; |
12922 | return 0; | |
12923 | } | |
12924 | _ACEOF | |
81ecdfbb | 12925 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 12926 | gdb_cv_func_sigsetjmp=yes |
c906108c | 12927 | else |
81ecdfbb | 12928 | gdb_cv_func_sigsetjmp=no |
c906108c | 12929 | fi |
81ecdfbb | 12930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12931 | fi |
81ecdfbb RW |
12932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
12933 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 12934 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 12935 | |
81ecdfbb | 12936 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 12937 | |
97bf5e38 | 12938 | fi |
c906108c | 12939 | |
a3828db0 MK |
12940 | # Assume we'll default to using the included libiberty regex. |
12941 | gdb_use_included_regex=yes | |
12942 | ||
12943 | # However, if the system regex is GNU regex, then default to *not* | |
12944 | # using the included regex. | |
81ecdfbb RW |
12945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
12946 | $as_echo_n "checking for GNU regex... " >&6; } | |
12947 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
12948 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12949 | else |
81ecdfbb | 12950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12951 | /* end confdefs.h. */ |
a3828db0 | 12952 | #include <gnu-versions.h> |
bec39cab AC |
12953 | int |
12954 | main () | |
12955 | { | |
81ecdfbb RW |
12956 | #define REGEX_INTERFACE_VERSION 1 |
12957 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
12958 | # error "Version mismatch" | |
12959 | #endif | |
5c45e068 MK |
12960 | ; |
12961 | return 0; | |
12962 | } | |
12963 | _ACEOF | |
81ecdfbb RW |
12964 | if ac_fn_c_try_compile "$LINENO"; then : |
12965 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 12966 | else |
81ecdfbb RW |
12967 | gdb_cv_have_gnu_regex=no |
12968 | fi | |
12969 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12970 | fi | |
12971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
12972 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
12973 | if test $gdb_cv_have_gnu_regex = yes; then | |
12974 | gdb_use_included_regex=no | |
5c45e068 | 12975 | fi |
81ecdfbb RW |
12976 | |
12977 | ||
12978 | # Check whether --with-included-regex was given. | |
12979 | if test "${with_included_regex+set}" = set; then : | |
12980 | withval=$with_included_regex; gdb_with_regex=$withval | |
12981 | else | |
12982 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 12983 | fi |
81ecdfbb RW |
12984 | |
12985 | if test "$gdb_with_regex" = yes; then | |
12986 | ||
12987 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
12988 | ||
c906108c | 12989 | fi |
81ecdfbb RW |
12990 | |
12991 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
12992 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
12993 | #include <sys/proc.h> | |
12994 | ||
12995 | " | |
12996 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 12997 | |
5c45e068 | 12998 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 12999 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 13000 | _ACEOF |
c906108c | 13001 | |
5c45e068 | 13002 | |
97bf5e38 | 13003 | fi |
c906108c | 13004 | |
5c45e068 | 13005 | |
a3828db0 | 13006 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
13007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
13008 | $as_echo_n "checking for struct lwp... " >&6; } | |
13009 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
13010 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13011 | else |
81ecdfbb | 13012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13013 | /* end confdefs.h. */ |
a3828db0 MK |
13014 | #include <sys/param.h> |
13015 | #include <sys/lwp.h> | |
bec39cab AC |
13016 | int |
13017 | main () | |
13018 | { | |
a3828db0 | 13019 | struct lwp l; |
bec39cab AC |
13020 | ; |
13021 | return 0; | |
13022 | } | |
13023 | _ACEOF | |
81ecdfbb | 13024 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13025 | gdb_cv_struct_lwp=yes |
c906108c | 13026 | else |
81ecdfbb | 13027 | gdb_cv_struct_lwp=no |
c906108c | 13028 | fi |
81ecdfbb | 13029 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13030 | fi |
81ecdfbb RW |
13031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
13032 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 13033 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 13034 | |
81ecdfbb | 13035 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 13036 | |
97bf5e38 | 13037 | fi |
c906108c | 13038 | |
a3828db0 | 13039 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
13040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
13041 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
13042 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
13043 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13044 | else |
81ecdfbb | 13045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13046 | /* end confdefs.h. */ |
a3828db0 MK |
13047 | #include <sys/types.h> |
13048 | #include <machine/reg.h> | |
bec39cab AC |
13049 | int |
13050 | main () | |
13051 | { | |
a3828db0 | 13052 | struct reg r; |
bec39cab AC |
13053 | ; |
13054 | return 0; | |
13055 | } | |
13056 | _ACEOF | |
81ecdfbb | 13057 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13058 | gdb_cv_struct_reg=yes |
27ca5dad | 13059 | else |
81ecdfbb | 13060 | gdb_cv_struct_reg=no |
27ca5dad | 13061 | fi |
81ecdfbb | 13062 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 13063 | fi |
81ecdfbb RW |
13064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
13065 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 13066 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 13067 | |
81ecdfbb | 13068 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
13069 | |
13070 | fi | |
97bf5e38 | 13071 | |
a3828db0 MK |
13072 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
13073 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
13074 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
13075 | " | |
13076 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
13077 | |
13078 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 13079 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 13080 | _ACEOF |
3862412b | 13081 | |
5c45e068 | 13082 | |
97bf5e38 | 13083 | fi |
81ecdfbb RW |
13084 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
13085 | " | |
13086 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
13087 | |
13088 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 13089 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 13090 | _ACEOF |
3862412b | 13091 | |
5c45e068 | 13092 | |
97bf5e38 | 13093 | fi |
3862412b | 13094 | |
5c45e068 | 13095 | |
a3828db0 | 13096 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
13097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
13098 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
13099 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
13100 | $as_echo_n "(cached) " >&6 | |
451928c5 | 13101 | else |
81ecdfbb | 13102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13103 | /* end confdefs.h. */ |
a3828db0 | 13104 | #include <sys/ptrace.h> |
bec39cab AC |
13105 | int |
13106 | main () | |
13107 | { | |
a3828db0 | 13108 | PTRACE_GETREGS; |
bec39cab AC |
13109 | ; |
13110 | return 0; | |
13111 | } | |
13112 | _ACEOF | |
81ecdfbb | 13113 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13114 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 13115 | else |
81ecdfbb | 13116 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 13117 | fi |
81ecdfbb | 13118 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13119 | fi |
13120 | ||
81ecdfbb RW |
13121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
13122 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 13123 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 13124 | |
81ecdfbb | 13125 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 13126 | |
97bf5e38 | 13127 | fi |
451928c5 | 13128 | |
a3828db0 | 13129 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
13130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
13131 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
13132 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
13133 | $as_echo_n "(cached) " >&6 | |
451928c5 | 13134 | else |
81ecdfbb | 13135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13136 | /* end confdefs.h. */ |
a3828db0 | 13137 | #include <sys/ptrace.h> |
bec39cab AC |
13138 | int |
13139 | main () | |
13140 | { | |
a3828db0 | 13141 | PTRACE_GETFPXREGS; |
bec39cab AC |
13142 | ; |
13143 | return 0; | |
13144 | } | |
13145 | _ACEOF | |
81ecdfbb | 13146 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13147 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 13148 | else |
81ecdfbb | 13149 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 13150 | fi |
81ecdfbb | 13151 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
13152 | fi |
13153 | ||
81ecdfbb RW |
13154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
13155 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 13156 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 13157 | |
81ecdfbb | 13158 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 13159 | |
97bf5e38 | 13160 | fi |
451928c5 | 13161 | |
a3828db0 | 13162 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
13163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
13164 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
13165 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
13166 | $as_echo_n "(cached) " >&6 | |
3862412b | 13167 | else |
81ecdfbb | 13168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13169 | /* end confdefs.h. */ |
a3828db0 MK |
13170 | #include <sys/types.h> |
13171 | #include <sys/ptrace.h> | |
bec39cab AC |
13172 | int |
13173 | main () | |
13174 | { | |
a3828db0 | 13175 | PT_GETDBREGS; |
bec39cab AC |
13176 | ; |
13177 | return 0; | |
13178 | } | |
13179 | _ACEOF | |
81ecdfbb | 13180 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13181 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 13182 | else |
81ecdfbb | 13183 | gdb_cv_have_pt_getdbregs=no |
3862412b | 13184 | fi |
81ecdfbb | 13185 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13186 | fi |
13187 | ||
81ecdfbb RW |
13188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
13189 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 13190 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 13191 | |
81ecdfbb | 13192 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 13193 | |
97bf5e38 | 13194 | fi |
3862412b | 13195 | |
a3828db0 | 13196 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
13197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
13198 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
13199 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
13200 | $as_echo_n "(cached) " >&6 | |
3862412b | 13201 | else |
81ecdfbb | 13202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13203 | /* end confdefs.h. */ |
a3828db0 MK |
13204 | #include <sys/types.h> |
13205 | #include <sys/ptrace.h> | |
bec39cab AC |
13206 | int |
13207 | main () | |
13208 | { | |
a3828db0 | 13209 | PT_GETXMMREGS; |
bec39cab AC |
13210 | ; |
13211 | return 0; | |
13212 | } | |
13213 | _ACEOF | |
81ecdfbb | 13214 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13215 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 13216 | else |
81ecdfbb | 13217 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 13218 | fi |
81ecdfbb | 13219 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
13220 | fi |
13221 | ||
81ecdfbb RW |
13222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
13223 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 13224 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 13225 | |
81ecdfbb | 13226 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 13227 | |
97bf5e38 | 13228 | fi |
3862412b | 13229 | |
eb368090 | 13230 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
13231 | |
13232 | if test "${target}" = "${host}"; then | |
13233 | case "${host}" in | |
97bf5e38 | 13234 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 13235 | |
81ecdfbb | 13236 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
13237 | |
13238 | ;; | |
c162e8c9 | 13239 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 13240 | |
81ecdfbb | 13241 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
13242 | |
13243 | ;; | |
13244 | mips-sgi-irix5*) | |
13245 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 13246 | |
81ecdfbb | 13247 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
13248 | |
13249 | ;; | |
13250 | esac | |
13251 | fi | |
13252 | ||
13253 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
13254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
13255 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
13256 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
13257 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13258 | else |
81ecdfbb | 13259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13260 | /* end confdefs.h. */ |
596c9d4b KB |
13261 | |
13262 | #define _SYSCALL32 | |
d30c5336 JK |
13263 | /* Needed for new procfs interface on sparc-solaris. */ |
13264 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13265 | #include <sys/procfs.h> |
bec39cab AC |
13266 | int |
13267 | main () | |
13268 | { | |
97bf5e38 | 13269 | pstatus_t avar |
bec39cab AC |
13270 | ; |
13271 | return 0; | |
13272 | } | |
13273 | _ACEOF | |
81ecdfbb | 13274 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13275 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 13276 | else |
81ecdfbb | 13277 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 13278 | |
596c9d4b | 13279 | fi |
81ecdfbb | 13280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13281 | fi |
13282 | ||
97bf5e38 | 13283 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 13284 | |
81ecdfbb | 13285 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
13286 | |
13287 | fi | |
81ecdfbb RW |
13288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
13289 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 13290 | |
81ecdfbb RW |
13291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
13292 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
13293 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
13294 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13295 | else |
81ecdfbb | 13296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13297 | /* end confdefs.h. */ |
596c9d4b KB |
13298 | |
13299 | #define _SYSCALL32 | |
d30c5336 JK |
13300 | /* Needed for new procfs interface on sparc-solaris. */ |
13301 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13302 | #include <sys/procfs.h> |
bec39cab AC |
13303 | int |
13304 | main () | |
13305 | { | |
97bf5e38 | 13306 | prrun_t avar |
bec39cab AC |
13307 | ; |
13308 | return 0; | |
13309 | } | |
13310 | _ACEOF | |
81ecdfbb | 13311 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13312 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 13313 | else |
81ecdfbb | 13314 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 13315 | |
596c9d4b | 13316 | fi |
81ecdfbb | 13317 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13318 | fi |
13319 | ||
97bf5e38 | 13320 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 13321 | |
81ecdfbb | 13322 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
13323 | |
13324 | fi | |
81ecdfbb RW |
13325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
13326 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 13327 | |
81ecdfbb RW |
13328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
13329 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
13330 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
13331 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 13332 | else |
81ecdfbb | 13333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13334 | /* end confdefs.h. */ |
596c9d4b KB |
13335 | |
13336 | #define _SYSCALL32 | |
d30c5336 JK |
13337 | /* Needed for new procfs interface on sparc-solaris. */ |
13338 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 13339 | #include <sys/procfs.h> |
bec39cab AC |
13340 | int |
13341 | main () | |
13342 | { | |
97bf5e38 | 13343 | gregset_t avar |
bec39cab AC |
13344 | ; |
13345 | return 0; | |
13346 | } | |
13347 | _ACEOF | |
81ecdfbb | 13348 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13349 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 13350 | else |
81ecdfbb | 13351 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 13352 | |
596c9d4b | 13353 | fi |
81ecdfbb | 13354 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
13355 | fi |
13356 | ||
97bf5e38 | 13357 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 13358 | |
81ecdfbb | 13359 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
13360 | |
13361 | fi | |
81ecdfbb RW |
13362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
13363 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 13364 | |
81ecdfbb RW |
13365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
13366 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
13367 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
13368 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 13369 | else |
81ecdfbb | 13370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13371 | /* end confdefs.h. */ |
97bf5e38 MK |
13372 | |
13373 | #define _SYSCALL32 | |
d30c5336 JK |
13374 | /* Needed for new procfs interface on sparc-solaris. */ |
13375 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 13376 | #include <sys/procfs.h> |
bec39cab AC |
13377 | int |
13378 | main () | |
13379 | { | |
97bf5e38 | 13380 | fpregset_t avar |
bec39cab AC |
13381 | ; |
13382 | return 0; | |
13383 | } | |
13384 | _ACEOF | |
81ecdfbb | 13385 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13386 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 13387 | else |
81ecdfbb | 13388 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 13389 | |
d84dd0c5 | 13390 | fi |
81ecdfbb | 13391 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
13392 | fi |
13393 | ||
97bf5e38 | 13394 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 13395 | |
81ecdfbb | 13396 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 13397 | |
97bf5e38 | 13398 | fi |
81ecdfbb RW |
13399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
13400 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 13401 | |
81ecdfbb RW |
13402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
13403 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
13404 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
13405 | $as_echo_n "(cached) " >&6 | |
c906108c | 13406 | else |
81ecdfbb | 13407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13408 | /* end confdefs.h. */ |
c906108c | 13409 | |
97bf5e38 | 13410 | #define _SYSCALL32 |
d30c5336 JK |
13411 | /* Needed for new procfs interface on sparc-solaris. */ |
13412 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13413 | #include <sys/procfs.h> |
bec39cab AC |
13414 | int |
13415 | main () | |
13416 | { | |
97bf5e38 | 13417 | prgregset_t avar |
bec39cab AC |
13418 | ; |
13419 | return 0; | |
13420 | } | |
13421 | _ACEOF | |
81ecdfbb | 13422 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13423 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 13424 | else |
81ecdfbb | 13425 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 13426 | |
c906108c | 13427 | fi |
81ecdfbb | 13428 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13429 | fi |
13430 | ||
97bf5e38 | 13431 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 13432 | |
81ecdfbb | 13433 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 13434 | |
97bf5e38 | 13435 | fi |
81ecdfbb RW |
13436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
13437 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 13438 | |
81ecdfbb RW |
13439 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
13440 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
13441 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
13442 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13443 | else |
81ecdfbb | 13444 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13445 | /* end confdefs.h. */ |
97bf5e38 MK |
13446 | |
13447 | #define _SYSCALL32 | |
d30c5336 JK |
13448 | /* Needed for new procfs interface on sparc-solaris. */ |
13449 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13450 | #include <sys/procfs.h> |
bec39cab AC |
13451 | int |
13452 | main () | |
13453 | { | |
97bf5e38 | 13454 | prfpregset_t avar |
bec39cab AC |
13455 | ; |
13456 | return 0; | |
13457 | } | |
13458 | _ACEOF | |
81ecdfbb | 13459 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13460 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 13461 | else |
81ecdfbb | 13462 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 13463 | |
d45fe813 | 13464 | fi |
81ecdfbb | 13465 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13466 | fi |
13467 | ||
97bf5e38 | 13468 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 13469 | |
81ecdfbb | 13470 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 13471 | |
97bf5e38 | 13472 | fi |
81ecdfbb RW |
13473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
13474 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 13475 | |
81ecdfbb RW |
13476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
13477 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
13478 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
13479 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13480 | else |
81ecdfbb | 13481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13482 | /* end confdefs.h. */ |
97bf5e38 MK |
13483 | |
13484 | #define _SYSCALL32 | |
d30c5336 JK |
13485 | /* Needed for new procfs interface on sparc-solaris. */ |
13486 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13487 | #include <sys/procfs.h> |
bec39cab AC |
13488 | int |
13489 | main () | |
13490 | { | |
97bf5e38 | 13491 | prgregset32_t avar |
bec39cab AC |
13492 | ; |
13493 | return 0; | |
13494 | } | |
13495 | _ACEOF | |
81ecdfbb | 13496 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13497 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 13498 | else |
81ecdfbb | 13499 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 13500 | |
d45fe813 | 13501 | fi |
81ecdfbb | 13502 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13503 | fi |
13504 | ||
97bf5e38 | 13505 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 13506 | |
81ecdfbb | 13507 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 13508 | |
97bf5e38 | 13509 | fi |
81ecdfbb RW |
13510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
13511 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 13512 | |
81ecdfbb RW |
13513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
13514 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
13515 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
13516 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13517 | else |
81ecdfbb | 13518 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13519 | /* end confdefs.h. */ |
97bf5e38 MK |
13520 | |
13521 | #define _SYSCALL32 | |
d30c5336 JK |
13522 | /* Needed for new procfs interface on sparc-solaris. */ |
13523 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13524 | #include <sys/procfs.h> |
bec39cab AC |
13525 | int |
13526 | main () | |
13527 | { | |
97bf5e38 | 13528 | prfpregset32_t avar |
bec39cab AC |
13529 | ; |
13530 | return 0; | |
13531 | } | |
13532 | _ACEOF | |
81ecdfbb | 13533 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13534 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 13535 | else |
81ecdfbb | 13536 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 13537 | |
d45fe813 | 13538 | fi |
81ecdfbb | 13539 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13540 | fi |
13541 | ||
97bf5e38 | 13542 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 13543 | |
81ecdfbb | 13544 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 13545 | |
97bf5e38 | 13546 | fi |
81ecdfbb RW |
13547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
13548 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 13549 | |
81ecdfbb RW |
13550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
13551 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
13552 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
13553 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 13554 | else |
81ecdfbb | 13555 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13556 | /* end confdefs.h. */ |
97bf5e38 | 13557 | |
d45fe813 | 13558 | #define _SYSCALL32 |
d30c5336 JK |
13559 | /* Needed for new procfs interface on sparc-solaris. */ |
13560 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13561 | #include <sys/procfs.h> |
bec39cab AC |
13562 | int |
13563 | main () | |
13564 | { | |
97bf5e38 | 13565 | lwpid_t avar |
bec39cab AC |
13566 | ; |
13567 | return 0; | |
13568 | } | |
13569 | _ACEOF | |
81ecdfbb | 13570 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13571 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 13572 | else |
81ecdfbb | 13573 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 13574 | |
d45fe813 | 13575 | fi |
81ecdfbb | 13576 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
13577 | fi |
13578 | ||
97bf5e38 | 13579 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 13580 | |
81ecdfbb | 13581 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 13582 | |
97bf5e38 | 13583 | fi |
81ecdfbb RW |
13584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
13585 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 13586 | |
81ecdfbb RW |
13587 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
13588 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
13589 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
13590 | $as_echo_n "(cached) " >&6 | |
c906108c | 13591 | else |
81ecdfbb | 13592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13593 | /* end confdefs.h. */ |
c906108c | 13594 | |
97bf5e38 | 13595 | #define _SYSCALL32 |
d30c5336 JK |
13596 | /* Needed for new procfs interface on sparc-solaris. */ |
13597 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13598 | #include <sys/procfs.h> |
bec39cab AC |
13599 | int |
13600 | main () | |
13601 | { | |
97bf5e38 | 13602 | psaddr_t avar |
bec39cab AC |
13603 | ; |
13604 | return 0; | |
13605 | } | |
13606 | _ACEOF | |
81ecdfbb | 13607 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13608 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 13609 | else |
81ecdfbb | 13610 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 13611 | |
c906108c | 13612 | fi |
81ecdfbb | 13613 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13614 | fi |
13615 | ||
97bf5e38 | 13616 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 13617 | |
81ecdfbb | 13618 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 13619 | |
97bf5e38 | 13620 | fi |
81ecdfbb RW |
13621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
13622 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 13623 | |
81ecdfbb RW |
13624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
13625 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
13626 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
13627 | $as_echo_n "(cached) " >&6 | |
c906108c | 13628 | else |
81ecdfbb | 13629 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13630 | /* end confdefs.h. */ |
c906108c | 13631 | |
97bf5e38 | 13632 | #define _SYSCALL32 |
d30c5336 JK |
13633 | /* Needed for new procfs interface on sparc-solaris. */ |
13634 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13635 | #include <sys/procfs.h> |
bec39cab AC |
13636 | int |
13637 | main () | |
13638 | { | |
97bf5e38 | 13639 | prsysent_t avar |
bec39cab AC |
13640 | ; |
13641 | return 0; | |
13642 | } | |
13643 | _ACEOF | |
81ecdfbb | 13644 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13645 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 13646 | else |
81ecdfbb | 13647 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 13648 | |
c906108c | 13649 | fi |
81ecdfbb | 13650 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13651 | fi |
13652 | ||
97bf5e38 | 13653 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 13654 | |
81ecdfbb | 13655 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 13656 | |
97bf5e38 | 13657 | fi |
81ecdfbb RW |
13658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
13659 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 13660 | |
81ecdfbb RW |
13661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
13662 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
13663 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
13664 | $as_echo_n "(cached) " >&6 | |
c906108c | 13665 | else |
81ecdfbb | 13666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13667 | /* end confdefs.h. */ |
c906108c | 13668 | |
97bf5e38 | 13669 | #define _SYSCALL32 |
d30c5336 JK |
13670 | /* Needed for new procfs interface on sparc-solaris. */ |
13671 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13672 | #include <sys/procfs.h> |
bec39cab AC |
13673 | int |
13674 | main () | |
13675 | { | |
97bf5e38 | 13676 | pr_sigset_t avar |
bec39cab AC |
13677 | ; |
13678 | return 0; | |
13679 | } | |
13680 | _ACEOF | |
81ecdfbb | 13681 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13682 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 13683 | else |
81ecdfbb | 13684 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 13685 | |
c906108c | 13686 | fi |
81ecdfbb | 13687 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13688 | fi |
13689 | ||
97bf5e38 | 13690 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 13691 | |
81ecdfbb | 13692 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 13693 | |
97bf5e38 | 13694 | fi |
81ecdfbb RW |
13695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
13696 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 13697 | |
81ecdfbb RW |
13698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
13699 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
13700 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
13701 | $as_echo_n "(cached) " >&6 | |
c906108c | 13702 | else |
81ecdfbb | 13703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13704 | /* end confdefs.h. */ |
c906108c | 13705 | |
97bf5e38 | 13706 | #define _SYSCALL32 |
d30c5336 JK |
13707 | /* Needed for new procfs interface on sparc-solaris. */ |
13708 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13709 | #include <sys/procfs.h> |
bec39cab AC |
13710 | int |
13711 | main () | |
13712 | { | |
97bf5e38 | 13713 | pr_sigaction64_t avar |
bec39cab AC |
13714 | ; |
13715 | return 0; | |
13716 | } | |
13717 | _ACEOF | |
81ecdfbb | 13718 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13719 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 13720 | else |
81ecdfbb | 13721 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 13722 | |
c906108c | 13723 | fi |
81ecdfbb | 13724 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13725 | fi |
13726 | ||
97bf5e38 | 13727 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 13728 | |
81ecdfbb | 13729 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 13730 | |
97bf5e38 | 13731 | fi |
81ecdfbb RW |
13732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
13733 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 13734 | |
81ecdfbb RW |
13735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
13736 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
13737 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
13738 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13739 | else |
81ecdfbb | 13740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13741 | /* end confdefs.h. */ |
97bf5e38 MK |
13742 | |
13743 | #define _SYSCALL32 | |
d30c5336 JK |
13744 | /* Needed for new procfs interface on sparc-solaris. */ |
13745 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 13746 | #include <sys/procfs.h> |
bec39cab AC |
13747 | int |
13748 | main () | |
13749 | { | |
97bf5e38 | 13750 | pr_siginfo64_t avar |
bec39cab AC |
13751 | ; |
13752 | return 0; | |
13753 | } | |
13754 | _ACEOF | |
81ecdfbb | 13755 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13756 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
13757 | else | |
81ecdfbb | 13758 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 13759 | |
97bf5e38 | 13760 | fi |
81ecdfbb | 13761 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13762 | fi |
c906108c | 13763 | |
97bf5e38 | 13764 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 13765 | |
81ecdfbb | 13766 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 13767 | |
97bf5e38 | 13768 | fi |
81ecdfbb RW |
13769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
13770 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
13771 | |
13772 | ||
97bf5e38 MK |
13773 | |
13774 | ||
13775 | ||
97bf5e38 | 13776 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
13777 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
13778 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
13779 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
13780 | $as_echo_n "(cached) " >&6 | |
c906108c | 13781 | else |
81ecdfbb | 13782 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 13783 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 13784 | else |
81ecdfbb | 13785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13786 | /* end confdefs.h. */ |
97bf5e38 MK |
13787 | #include <sys/procfs.h> |
13788 | int main () | |
13789 | { | |
13790 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
13791 | return 1; | |
13792 | return 0; | |
13793 | } | |
bec39cab | 13794 | _ACEOF |
81ecdfbb | 13795 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 13796 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
13797 | else |
13798 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 13799 | fi |
81ecdfbb RW |
13800 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13801 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 13802 | fi |
81ecdfbb | 13803 | |
c906108c SS |
13804 | fi |
13805 | ||
81ecdfbb RW |
13806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
13807 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 13808 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 13809 | |
81ecdfbb | 13810 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 13811 | |
97bf5e38 MK |
13812 | fi |
13813 | fi | |
c906108c | 13814 | |
bec39cab | 13815 | |
81ecdfbb RW |
13816 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
13817 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
13818 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
13819 | $as_echo_n "(cached) " >&6 | |
c906108c | 13820 | else |
81ecdfbb | 13821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13822 | /* end confdefs.h. */ |
97bf5e38 MK |
13823 | #include <unistd.h> |
13824 | #include <sys/types.h> | |
13825 | #include <sys/procfs.h> | |
13826 | ||
bec39cab AC |
13827 | int |
13828 | main () | |
13829 | { | |
97bf5e38 MK |
13830 | |
13831 | int dummy;; | |
13832 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
13833 | |
13834 | ; | |
13835 | return 0; | |
13836 | } | |
13837 | _ACEOF | |
81ecdfbb | 13838 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13839 | gdb_cv_have_procfs_piocset=yes |
c906108c | 13840 | else |
81ecdfbb | 13841 | gdb_cv_have_procfs_piocset=no |
c906108c | 13842 | fi |
81ecdfbb | 13843 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13844 | fi |
97bf5e38 | 13845 | |
81ecdfbb RW |
13846 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
13847 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 13848 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 13849 | |
81ecdfbb | 13850 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
13851 | |
13852 | fi | |
c906108c | 13853 | fi |
c906108c | 13854 | |
97bf5e38 | 13855 | if test ${host} = ${target} ; then |
bec39cab | 13856 | |
81ecdfbb RW |
13857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
13858 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
13859 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
13860 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13861 | else |
81ecdfbb | 13862 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13863 | /* end confdefs.h. */ |
97bf5e38 | 13864 | #include <link.h> |
bec39cab AC |
13865 | int |
13866 | main () | |
13867 | { | |
97bf5e38 | 13868 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
13869 | ; |
13870 | return 0; | |
13871 | } | |
13872 | _ACEOF | |
81ecdfbb | 13873 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 13874 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 13875 | else |
81ecdfbb | 13876 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 13877 | fi |
81ecdfbb | 13878 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
13879 | fi |
13880 | ||
81ecdfbb RW |
13881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
13882 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 13883 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 13884 | |
81ecdfbb | 13885 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
13886 | |
13887 | fi | |
13888 | ||
bec39cab | 13889 | |
81ecdfbb RW |
13890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
13891 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
13892 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
13893 | $as_echo_n "(cached) " >&6 | |
c906108c | 13894 | else |
81ecdfbb | 13895 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13896 | /* end confdefs.h. */ |
97bf5e38 MK |
13897 | #include <sys/types.h> |
13898 | #include <link.h> | |
bec39cab AC |
13899 | int |
13900 | main () | |
13901 | { | |
97bf5e38 | 13902 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
13903 | ; |
13904 | return 0; | |
13905 | } | |
13906 | _ACEOF | |
81ecdfbb | 13907 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13908 | gdb_cv_have_struct_link_map_with_lm_members=yes |
13909 | else | |
81ecdfbb | 13910 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 13911 | fi |
81ecdfbb | 13912 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 13913 | fi |
c906108c | 13914 | |
81ecdfbb RW |
13915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
13916 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 13917 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 13918 | |
81ecdfbb | 13919 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
13920 | |
13921 | fi | |
13922 | ||
bec39cab | 13923 | |
81ecdfbb RW |
13924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
13925 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
13926 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
13927 | $as_echo_n "(cached) " >&6 | |
c906108c | 13928 | else |
81ecdfbb | 13929 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13930 | /* end confdefs.h. */ |
97bf5e38 MK |
13931 | #include <sys/types.h> |
13932 | #ifdef HAVE_NLIST_H | |
13933 | #include <nlist.h> | |
13934 | #endif | |
13935 | #include <link.h> | |
bec39cab AC |
13936 | int |
13937 | main () | |
13938 | { | |
97bf5e38 | 13939 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
13940 | ; |
13941 | return 0; | |
13942 | } | |
13943 | _ACEOF | |
81ecdfbb | 13944 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13945 | gdb_cv_have_struct_so_map_with_som_members=yes |
13946 | else | |
81ecdfbb | 13947 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 13948 | fi |
81ecdfbb | 13949 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13950 | fi |
c906108c | 13951 | |
81ecdfbb RW |
13952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
13953 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 13954 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 13955 | |
81ecdfbb | 13956 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 13957 | |
97bf5e38 | 13958 | fi |
c906108c | 13959 | |
bec39cab | 13960 | |
81ecdfbb RW |
13961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
13962 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
13963 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
13964 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 13965 | else |
81ecdfbb | 13966 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13967 | /* end confdefs.h. */ |
97bf5e38 MK |
13968 | #define _SYSCALL32 |
13969 | #include <sys/link.h> | |
bec39cab AC |
13970 | int |
13971 | main () | |
13972 | { | |
97bf5e38 | 13973 | struct link_map32 l; |
bec39cab AC |
13974 | ; |
13975 | return 0; | |
13976 | } | |
13977 | _ACEOF | |
81ecdfbb | 13978 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
13979 | gdb_cv_have_struct_link_map32=yes |
13980 | else | |
81ecdfbb | 13981 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 13982 | fi |
81ecdfbb | 13983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 13984 | fi |
c906108c | 13985 | |
81ecdfbb RW |
13986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
13987 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 13988 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 13989 | |
81ecdfbb | 13990 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 13991 | |
60ca704f | 13992 | |
81ecdfbb | 13993 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 13994 | |
97bf5e38 MK |
13995 | fi |
13996 | fi | |
c906108c | 13997 | |
bc8bcb4b | 13998 | # Check if the compiler supports the `long long' type. |
c906108c | 13999 | |
81ecdfbb RW |
14000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
14001 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
14002 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
14003 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14004 | else |
81ecdfbb | 14005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14006 | /* end confdefs.h. */ |
bc8bcb4b | 14007 | extern long long foo; |
bec39cab AC |
14008 | int |
14009 | main () | |
14010 | { | |
bc8bcb4b | 14011 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
14012 | ; |
14013 | return 0; | |
14014 | } | |
14015 | _ACEOF | |
81ecdfbb | 14016 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14017 | gdb_cv_c_long_long=yes |
14018 | else | |
81ecdfbb | 14019 | gdb_cv_c_long_long=no |
97bf5e38 | 14020 | fi |
81ecdfbb | 14021 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14022 | fi |
81ecdfbb RW |
14023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
14024 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 14025 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 14026 | |
81ecdfbb | 14027 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14028 | |
14029 | fi | |
14030 | ||
bc8bcb4b | 14031 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 14032 | |
81ecdfbb RW |
14033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
14034 | $as_echo_n "checking for long long support in printf... " >&6; } | |
14035 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
14036 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14037 | else |
81ecdfbb | 14038 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14039 | gdb_cv_printf_has_long_long=no |
14040 | else | |
81ecdfbb | 14041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14042 | /* end confdefs.h. */ |
bc8bcb4b MK |
14043 | $ac_includes_default |
14044 | int | |
14045 | main () | |
14046 | { | |
14047 | char buf[32]; | |
97bf5e38 MK |
14048 | long long l = 0; |
14049 | l = (l << 16) + 0x0123; | |
14050 | l = (l << 16) + 0x4567; | |
14051 | l = (l << 16) + 0x89ab; | |
14052 | l = (l << 16) + 0xcdef; | |
14053 | sprintf (buf, "0x%016llx", l); | |
14054 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
14055 | ; |
14056 | return 0; | |
c906108c | 14057 | } |
bec39cab | 14058 | _ACEOF |
81ecdfbb | 14059 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14060 | gdb_cv_printf_has_long_long=yes |
14061 | else | |
81ecdfbb | 14062 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 14063 | fi |
81ecdfbb RW |
14064 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14065 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14066 | fi |
81ecdfbb | 14067 | |
97bf5e38 | 14068 | fi |
81ecdfbb RW |
14069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
14070 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 14071 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 14072 | |
81ecdfbb | 14073 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14074 | |
14075 | fi | |
97bf5e38 | 14076 | |
1a619819 LM |
14077 | # Check if the compiler and runtime support printing decfloats. |
14078 | ||
81ecdfbb RW |
14079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
14080 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
14081 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
14082 | $as_echo_n "(cached) " >&6 | |
1a619819 | 14083 | else |
81ecdfbb | 14084 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
14085 | gdb_cv_printf_has_decfloat=no |
14086 | else | |
81ecdfbb | 14087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
14088 | /* end confdefs.h. */ |
14089 | $ac_includes_default | |
14090 | int | |
14091 | main () | |
14092 | { | |
14093 | char buf[64]; | |
14094 | _Decimal32 d32 = 1.2345df; | |
14095 | _Decimal64 d64 = 1.2345dd; | |
14096 | _Decimal128 d128 = 1.2345dl; | |
14097 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
14098 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
14099 | ; | |
14100 | return 0; | |
14101 | } | |
14102 | _ACEOF | |
81ecdfbb | 14103 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
14104 | gdb_cv_printf_has_decfloat=yes |
14105 | else | |
81ecdfbb | 14106 | gdb_cv_printf_has_decfloat=no |
1a619819 | 14107 | fi |
81ecdfbb RW |
14108 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14109 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 14110 | fi |
81ecdfbb | 14111 | |
1a619819 | 14112 | fi |
81ecdfbb RW |
14113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
14114 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
14115 | if test $gdb_cv_printf_has_decfloat = yes; then |
14116 | ||
81ecdfbb | 14117 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
14118 | |
14119 | fi | |
14120 | ||
bc8bcb4b MK |
14121 | # Check if the compiler supports the `long double' type. We can't use |
14122 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
14123 | # constants defined in <float.h> that fail on some systems, | |
14124 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 14125 | |
81ecdfbb RW |
14126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
14127 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
14128 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
14129 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14130 | else |
81ecdfbb | 14131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14132 | /* end confdefs.h. */ |
97bf5e38 | 14133 | long double foo; |
bec39cab | 14134 | _ACEOF |
81ecdfbb | 14135 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 14136 | gdb_cv_c_long_double=yes |
97bf5e38 | 14137 | else |
81ecdfbb | 14138 | gdb_cv_c_long_double=no |
97bf5e38 | 14139 | fi |
81ecdfbb | 14140 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14141 | fi |
81ecdfbb RW |
14142 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
14143 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 14144 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 14145 | |
81ecdfbb | 14146 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14147 | |
14148 | fi | |
14149 | ||
bc8bcb4b | 14150 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14151 | |
81ecdfbb RW |
14152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14153 | $as_echo_n "checking for long double support in printf... " >&6; } | |
14154 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
14155 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14156 | else |
81ecdfbb | 14157 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14158 | gdb_cv_printf_has_long_double=no |
14159 | else | |
81ecdfbb | 14160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14161 | /* end confdefs.h. */ |
bc8bcb4b MK |
14162 | $ac_includes_default |
14163 | int | |
14164 | main () | |
14165 | { | |
14166 | char buf[16]; | |
97bf5e38 MK |
14167 | long double f = 3.141592653; |
14168 | sprintf (buf, "%Lg", f); | |
14169 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14170 | ; |
14171 | return 0; | |
97bf5e38 | 14172 | } |
bec39cab | 14173 | _ACEOF |
81ecdfbb | 14174 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14175 | gdb_cv_printf_has_long_double=yes |
c906108c | 14176 | else |
81ecdfbb | 14177 | gdb_cv_printf_has_long_double=no |
c906108c | 14178 | fi |
81ecdfbb RW |
14179 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14180 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14181 | fi |
81ecdfbb | 14182 | |
c906108c | 14183 | fi |
81ecdfbb RW |
14184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14185 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14186 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14187 | |
81ecdfbb | 14188 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14189 | |
14190 | fi | |
97bf5e38 | 14191 | |
bc8bcb4b | 14192 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14193 | |
81ecdfbb RW |
14194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14195 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
14196 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
14197 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14198 | else |
81ecdfbb | 14199 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14200 | gdb_cv_scanf_has_long_double=no |
14201 | else | |
81ecdfbb | 14202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14203 | /* end confdefs.h. */ |
bc8bcb4b MK |
14204 | #include <stdio.h> |
14205 | int | |
14206 | main () | |
14207 | { | |
14208 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14209 | long double f = 0; |
14210 | sscanf (buf, "%Lg", &f); | |
14211 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14212 | ; |
14213 | return 0; | |
97bf5e38 | 14214 | } |
bec39cab | 14215 | _ACEOF |
81ecdfbb | 14216 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14217 | gdb_cv_scanf_has_long_double=yes |
14218 | else | |
81ecdfbb | 14219 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14220 | fi |
81ecdfbb RW |
14221 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14222 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14223 | fi |
81ecdfbb | 14224 | |
c906108c | 14225 | fi |
81ecdfbb RW |
14226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14227 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14228 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14229 | |
81ecdfbb | 14230 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14231 | |
14232 | fi | |
c906108c | 14233 | |
438013df AO |
14234 | case ${host_os} in |
14235 | aix*) | |
81ecdfbb RW |
14236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14237 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
14238 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
14239 | $as_echo_n "(cached) " >&6 | |
438013df | 14240 | else |
bec39cab | 14241 | |
438013df AO |
14242 | SAVE_LDFLAGS=$LDFLAGS |
14243 | ||
14244 | case $GCC in | |
14245 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14246 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14247 | esac | |
14248 | ||
14249 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14251 | /* end confdefs.h. */ |
438013df | 14252 | |
bec39cab AC |
14253 | int |
14254 | main () | |
14255 | { | |
438013df | 14256 | int i; |
bec39cab AC |
14257 | ; |
14258 | return 0; | |
14259 | } | |
14260 | _ACEOF | |
81ecdfbb | 14261 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14262 | |
81ecdfbb RW |
14263 | else |
14264 | gdb_cv_bigtoc= | |
438013df | 14265 | fi |
81ecdfbb RW |
14266 | rm -f core conftest.err conftest.$ac_objext \ |
14267 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 14268 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 14269 | |
bec39cab | 14270 | fi |
81ecdfbb RW |
14271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
14272 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
14273 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
14274 | ;; | |
14275 | esac | |
14276 | ||
38f6b338 | 14277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 14278 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
14279 | dynamic_list=false |
14280 | if test "${gdb_native}" = yes; then | |
14281 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
14282 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
14283 | # may not be supported there. | |
14284 | old_LDFLAGS="$LDFLAGS" | |
14285 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
14286 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
14287 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
14288 | if test "${have_libpython}" = no; then | |
14289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
14290 | /* end confdefs.h. */ |
14291 | ||
14292 | int | |
14293 | main () | |
14294 | { | |
14295 | ||
14296 | ; | |
14297 | return 0; | |
14298 | } | |
14299 | _ACEOF | |
14300 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
14301 | dynamic_list=true |
14302 | fi | |
14303 | rm -f core conftest.err conftest.$ac_objext \ | |
14304 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
14305 | else |
14306 | # Workaround http://bugs.python.org/issue4434 where static | |
14307 | # libpythonX.Y.a would get its symbols required for | |
14308 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
14309 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
14310 | old_CFLAGS="$CFLAGS" | |
14311 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
14312 | if test "$cross_compiling" = yes; then : | |
3bebe2f2 | 14313 | true |
f6528abd | 14314 | else |
3bebe2f2 JK |
14315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14316 | /* end confdefs.h. */ | |
14317 | #include "${have_libpython}/Python.h" | |
14318 | int | |
14319 | main () | |
14320 | { | |
14321 | int err; | |
38f6b338 JK |
14322 | Py_Initialize (); |
14323 | err = PyRun_SimpleString ("import itertools\n"); | |
14324 | Py_Finalize (); | |
14325 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
14326 | ; |
14327 | return 0; | |
14328 | } | |
14329 | _ACEOF | |
14330 | if ac_fn_c_try_run "$LINENO"; then : | |
14331 | dynamic_list=true | |
14332 | fi | |
14333 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14334 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14335 | fi | |
14336 | ||
38f6b338 JK |
14337 | CFLAGS="$old_CFLAGS" |
14338 | fi | |
14339 | LDFLAGS="$old_LDFLAGS" | |
14340 | fi | |
14341 | if $dynamic_list; then | |
14342 | found="-Wl,--dynamic-list" | |
14343 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 14344 | else |
38f6b338 JK |
14345 | found="-rdynamic" |
14346 | RDYNAMIC="-rdynamic" | |
f6528abd | 14347 | fi |
f6528abd | 14348 | |
38f6b338 | 14349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 14350 | $as_echo "$found" >&6; } |
0407b3f1 | 14351 | |
f6528abd | 14352 | |
0407b3f1 | 14353 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 14354 | case ${host_os} in |
c906108c | 14355 | solaris*) |
d92419e5 JB |
14356 | # See if thread_db library is around for Solaris thread debugging. |
14357 | # Note that we must explicitly test for version 1 of the library | |
14358 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
14359 | # the same API. | |
81ecdfbb RW |
14360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
14361 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 14362 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
14363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14364 | $as_echo "yes" >&6; } | |
60ca704f | 14365 | |
81ecdfbb | 14366 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 14367 | |
3483b318 | 14368 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 14369 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
14370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
14371 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
14372 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
14373 | $as_echo_n "(cached) " >&6 | |
c906108c | 14374 | else |
bec39cab | 14375 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 14376 | LIBS="-ldl $LIBS" |
81ecdfbb | 14377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
14378 | /* end confdefs.h. */ |
14379 | ||
81ecdfbb RW |
14380 | /* Override any GCC internal prototype to avoid an error. |
14381 | Use char because int might match the return type of a GCC | |
14382 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
14383 | #ifdef __cplusplus |
14384 | extern "C" | |
14385 | #endif | |
bec39cab AC |
14386 | char dlopen (); |
14387 | int | |
14388 | main () | |
14389 | { | |
81ecdfbb | 14390 | return dlopen (); |
bec39cab AC |
14391 | ; |
14392 | return 0; | |
14393 | } | |
14394 | _ACEOF | |
81ecdfbb | 14395 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
14396 | ac_cv_lib_dl_dlopen=yes |
14397 | else | |
81ecdfbb | 14398 | ac_cv_lib_dl_dlopen=no |
bec39cab | 14399 | fi |
81ecdfbb RW |
14400 | rm -f core conftest.err conftest.$ac_objext \ |
14401 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
14402 | LIBS=$ac_check_lib_save_LIBS |
14403 | fi | |
81ecdfbb RW |
14404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
14405 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
14406 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
14407 | cat >>confdefs.h <<_ACEOF |
14408 | #define HAVE_LIBDL 1 | |
14409 | _ACEOF | |
c906108c SS |
14410 | |
14411 | LIBS="-ldl $LIBS" | |
14412 | ||
c906108c SS |
14413 | fi |
14414 | ||
f6528abd | 14415 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
14416 | # Sun randomly tweaked the prototypes in <proc_service.h> |
14417 | # at one point. | |
81ecdfbb RW |
14418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
14419 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
14420 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
14421 | $as_echo_n "(cached) " >&6 | |
c906108c | 14422 | else |
bec39cab | 14423 | |
81ecdfbb | 14424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14425 | /* end confdefs.h. */ |
c906108c SS |
14426 | |
14427 | #include <proc_service.h> | |
14428 | ps_err_e ps_pdwrite | |
14429 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 14430 | |
bec39cab AC |
14431 | int |
14432 | main () | |
14433 | { | |
14434 | ||
14435 | ; | |
14436 | return 0; | |
14437 | } | |
14438 | _ACEOF | |
81ecdfbb | 14439 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
14440 | gdb_cv_proc_service_is_old=no |
14441 | else | |
81ecdfbb | 14442 | gdb_cv_proc_service_is_old=yes |
c906108c | 14443 | fi |
81ecdfbb | 14444 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 14445 | |
c906108c SS |
14446 | fi |
14447 | ||
81ecdfbb RW |
14448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
14449 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 14450 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 14451 | |
81ecdfbb | 14452 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
14453 | |
14454 | fi | |
14455 | else | |
81ecdfbb RW |
14456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14457 | $as_echo "no" >&6; } | |
c906108c SS |
14458 | fi |
14459 | ;; | |
d92419e5 | 14460 | aix*) |
81ecdfbb RW |
14461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
14462 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
14463 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
14464 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14465 | else |
81ecdfbb | 14466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14467 | /* end confdefs.h. */ |
d92419e5 | 14468 | #include <sys/pthdebug.h> |
bec39cab AC |
14469 | int |
14470 | main () | |
14471 | { | |
d92419e5 JB |
14472 | #ifndef PTHDB_VERSION_3 |
14473 | #error | |
14474 | #endif | |
bec39cab AC |
14475 | ; |
14476 | return 0; | |
14477 | } | |
14478 | _ACEOF | |
81ecdfbb | 14479 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
14480 | gdb_cv_have_aix_thread_debug=yes |
14481 | else | |
81ecdfbb | 14482 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 14483 | fi |
81ecdfbb | 14484 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
14485 | fi |
14486 | ||
81ecdfbb RW |
14487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
14488 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
14489 | if test $gdb_cv_have_aix_thread_debug = yes; then |
14490 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 14491 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
14492 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
14493 | fi | |
14494 | ;; | |
c906108c | 14495 | esac |
bec39cab | 14496 | |
c906108c SS |
14497 | fi |
14498 | ||
3f47be5c | 14499 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
14500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
14501 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
14502 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
14503 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14504 | else |
81ecdfbb | 14505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14506 | /* end confdefs.h. */ |
3f47be5c | 14507 | #include <thread_db.h> |
bec39cab AC |
14508 | int |
14509 | main () | |
14510 | { | |
3f47be5c | 14511 | int i = TD_NOTALLOC; |
bec39cab AC |
14512 | ; |
14513 | return 0; | |
14514 | } | |
14515 | _ACEOF | |
81ecdfbb | 14516 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
14517 | gdb_cv_thread_db_h_has_td_notalloc=yes |
14518 | else | |
81ecdfbb | 14519 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 14520 | |
3f47be5c | 14521 | fi |
81ecdfbb | 14522 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 14523 | |
bec39cab | 14524 | fi |
81ecdfbb RW |
14525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
14526 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
14527 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
14528 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
14529 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
14530 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14531 | else |
81ecdfbb | 14532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14533 | /* end confdefs.h. */ |
14534 | #include <thread_db.h> | |
14535 | int | |
14536 | main () | |
14537 | { | |
14538 | int i = TD_VERSION; | |
14539 | ; | |
14540 | return 0; | |
14541 | } | |
14542 | _ACEOF | |
81ecdfbb | 14543 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14544 | gdb_cv_thread_db_h_has_td_version=yes |
14545 | else | |
81ecdfbb | 14546 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
14547 | |
14548 | fi | |
81ecdfbb | 14549 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14550 | |
14551 | fi | |
81ecdfbb RW |
14552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
14553 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
14554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
14555 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
14556 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
14557 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 14558 | else |
81ecdfbb | 14559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
14560 | /* end confdefs.h. */ |
14561 | #include <thread_db.h> | |
14562 | int | |
14563 | main () | |
14564 | { | |
14565 | int i = TD_NOTLS; | |
14566 | ; | |
14567 | return 0; | |
14568 | } | |
14569 | _ACEOF | |
81ecdfbb | 14570 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
14571 | gdb_cv_thread_db_h_has_td_notls=yes |
14572 | else | |
81ecdfbb | 14573 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
14574 | |
14575 | fi | |
81ecdfbb | 14576 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
14577 | |
14578 | fi | |
81ecdfbb RW |
14579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
14580 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
14581 | fi |
14582 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 14583 | |
81ecdfbb | 14584 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 14585 | |
59f80f10 DJ |
14586 | fi |
14587 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
14588 | ||
81ecdfbb | 14589 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
14590 | |
14591 | fi | |
14592 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
14593 | ||
81ecdfbb | 14594 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 14595 | |
3f47be5c EZ |
14596 | fi |
14597 | ||
b757528f | 14598 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
14599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
14600 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
14601 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
14602 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14603 | else |
81ecdfbb | 14604 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14605 | /* end confdefs.h. */ |
b757528f | 14606 | #include <sys/syscall.h> |
bec39cab AC |
14607 | int |
14608 | main () | |
14609 | { | |
b757528f | 14610 | int i = __NR_tkill; |
bec39cab AC |
14611 | ; |
14612 | return 0; | |
14613 | } | |
14614 | _ACEOF | |
81ecdfbb | 14615 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
14616 | gdb_cv_sys_syscall_h_has_tkill=yes |
14617 | else | |
81ecdfbb | 14618 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 14619 | |
b757528f | 14620 | fi |
81ecdfbb | 14621 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 14622 | |
bec39cab | 14623 | fi |
81ecdfbb RW |
14624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
14625 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
14626 | fi |
14627 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 14628 | |
81ecdfbb | 14629 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
14630 | |
14631 | fi | |
14632 | ||
81ecdfbb RW |
14633 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
14634 | " | |
14635 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
14636 | ac_have_decl=1 | |
10568435 | 14637 | else |
81ecdfbb | 14638 | ac_have_decl=0 |
10568435 | 14639 | fi |
10568435 JK |
14640 | |
14641 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 14642 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
14643 | _ACEOF |
14644 | ||
14645 | ||
81ecdfbb RW |
14646 | if test "$cross_compiling" = yes; then : |
14647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
14648 | /* end confdefs.h. */ |
14649 | #include <sys/personality.h> | |
14650 | int | |
14651 | main () | |
14652 | { | |
14653 | ||
14654 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14655 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14656 | # endif | |
14657 | /* Test the flag could be set and stays set. */ | |
14658 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14659 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14660 | return 1 | |
14661 | ; | |
14662 | return 0; | |
14663 | } | |
14664 | _ACEOF | |
81ecdfbb | 14665 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
14666 | have_personality=true |
14667 | else | |
81ecdfbb | 14668 | have_personality=false |
10568435 | 14669 | fi |
81ecdfbb RW |
14670 | rm -f core conftest.err conftest.$ac_objext \ |
14671 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 14672 | else |
81ecdfbb | 14673 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
14674 | /* end confdefs.h. */ |
14675 | #include <sys/personality.h> | |
14676 | int | |
14677 | main () | |
14678 | { | |
14679 | ||
14680 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
14681 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
14682 | # endif | |
14683 | /* Test the flag could be set and stays set. */ | |
14684 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
14685 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
14686 | return 1 | |
14687 | ; | |
14688 | return 0; | |
14689 | } | |
14690 | _ACEOF | |
81ecdfbb | 14691 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
14692 | have_personality=true |
14693 | else | |
81ecdfbb | 14694 | have_personality=false |
10568435 | 14695 | fi |
81ecdfbb RW |
14696 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14697 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 14698 | fi |
81ecdfbb | 14699 | |
10568435 JK |
14700 | if $have_personality |
14701 | then | |
14702 | ||
81ecdfbb | 14703 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
14704 | |
14705 | fi | |
14706 | ||
fb40c209 | 14707 | |
b14b1491 | 14708 | target_sysroot_reloc=0 |
bec39cab | 14709 | |
81ecdfbb RW |
14710 | # Check whether --with-sysroot was given. |
14711 | if test "${with_sysroot+set}" = set; then : | |
14712 | withval=$with_sysroot; | |
030292b7 | 14713 | case ${with_sysroot} in |
715d1656 | 14714 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
14715 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
14716 | esac | |
14717 | ||
14718 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
14719 | ||
07abfebf RS |
14720 | if test "x$prefix" = xNONE; then |
14721 | test_prefix=/usr/local | |
14722 | else | |
14723 | test_prefix=$prefix | |
14724 | fi | |
aa28a74e | 14725 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
07abfebf | 14726 | test_exec_prefix=$test_prefix |
030292b7 | 14727 | else |
07abfebf | 14728 | test_exec_prefix=$exec_prefix |
030292b7 DJ |
14729 | fi |
14730 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 | 14731 | "${test_prefix}"|"${test_prefix}/"*|\ |
07abfebf RS |
14732 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
14733 | '${prefix}'|'${prefix}/'*|\ | |
715d1656 | 14734 | '${exec_prefix}'|'${exec_prefix}/'*) |
b14b1491 | 14735 | target_sysroot_reloc=1 |
030292b7 DJ |
14736 | ;; |
14737 | esac | |
14738 | ||
14739 | else | |
bec39cab | 14740 | |
030292b7 DJ |
14741 | TARGET_SYSTEM_ROOT= |
14742 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
14743 | ||
81ecdfbb | 14744 | fi |
b14b1491 | 14745 | |
81ecdfbb | 14746 | TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc" |
030292b7 DJ |
14747 | |
14748 | ||
14749 | ||
16e7150e | 14750 | |
16e7150e | 14751 | |
81ecdfbb RW |
14752 | # Check whether --with-system-gdbinit was given. |
14753 | if test "${with_system_gdbinit+set}" = set; then : | |
14754 | withval=$with_system_gdbinit; | |
b14b1491 TT |
14755 | SYSTEM_GDBINIT=$withval |
14756 | else | |
14757 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
14758 | fi |
14759 | ||
16e7150e JG |
14760 | |
14761 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
14762 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 14763 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
14764 | ac_define_dir=`eval echo $ac_define_dir` |
14765 | ||
14766 | cat >>confdefs.h <<_ACEOF | |
14767 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
14768 | _ACEOF | |
14769 | ||
14770 | ||
14771 | ||
0c4a4063 | 14772 | |
b14b1491 TT |
14773 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
14774 | if test "x$prefix" = xNONE; then | |
14775 | test_prefix=/usr/local | |
14776 | else | |
14777 | test_prefix=$prefix | |
14778 | fi | |
14779 | else | |
14780 | test_prefix=$exec_prefix | |
14781 | fi | |
14782 | value=0 | |
14783 | case ${ac_define_dir} in | |
14784 | "${test_prefix}"|"${test_prefix}/"*|\ | |
14785 | '${exec_prefix}'|'${exec_prefix}/'*) | |
14786 | value=1 | |
14787 | ;; | |
14788 | esac | |
16e7150e | 14789 | |
b14b1491 TT |
14790 | cat >>confdefs.h <<_ACEOF |
14791 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
14792 | _ACEOF |
14793 | ||
b14b1491 | 14794 | |
16e7150e | 14795 | |
0c4a4063 | 14796 | |
81ecdfbb RW |
14797 | # Check whether --enable-werror was given. |
14798 | if test "${enable_werror+set}" = set; then : | |
14799 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
14800 | yes | y) ERROR_ON_WARNING="yes" ;; |
14801 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 14802 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 14803 | esac |
81ecdfbb RW |
14804 | fi |
14805 | ||
094a342e MK |
14806 | |
14807 | # Enable -Werror by default when using gcc | |
14808 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
14809 | ERROR_ON_WARNING=yes | |
14810 | fi | |
14811 | ||
14812 | WERROR_CFLAGS="" | |
14813 | if test "${ERROR_ON_WARNING}" = yes ; then | |
14814 | WERROR_CFLAGS="-Werror" | |
14815 | fi | |
14816 | ||
aa79a185 DJ |
14817 | # The entries after -Wno-pointer-sign are disabled warnings which may |
14818 | # be enabled in the future, which can not currently be used to build | |
14819 | # GDB. | |
14820 | # NOTE: If you change this list, remember to update | |
3b851bce | 14821 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
14822 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
14823 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 JB |
14824 | -Wno-unused -Wunused-value -Wunused-function \ |
14825 | -Wno-switch -Wno-char-subscripts" | |
a3b362c4 | 14826 | |
3526781e DJ |
14827 | # Enable -Wno-format by default when using gcc on mingw since many |
14828 | # GCC versions complain about %I64. | |
14829 | case "${host}" in | |
14830 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
14831 | esac | |
14832 | ||
81ecdfbb RW |
14833 | # Check whether --enable-build-warnings was given. |
14834 | if test "${enable_build_warnings+set}" = set; then : | |
14835 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
14836 | yes) ;; |
14837 | no) build_warnings="-w";; | |
14838 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14839 | build_warnings="${build_warnings} ${t}";; | |
14840 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14841 | build_warnings="${t} ${build_warnings}";; | |
14842 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14843 | esac | |
d4f3574e | 14844 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 14845 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 14846 | fi |
81ecdfbb RW |
14847 | fi |
14848 | # Check whether --enable-gdb-build-warnings was given. | |
14849 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
14850 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
14851 | yes) ;; |
14852 | no) build_warnings="-w";; | |
14853 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14854 | build_warnings="${build_warnings} ${t}";; | |
14855 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
14856 | build_warnings="${t} ${build_warnings}";; | |
14857 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
14858 | esac | |
14859 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
14860 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
14861 | fi | |
81ecdfbb RW |
14862 | fi |
14863 | WARN_CFLAGS="" | |
c906108c SS |
14864 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
14865 | then | |
81ecdfbb RW |
14866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
14867 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
14868 | # Separate out the -Werror flag as some files just cannot be |
14869 | # compiled with it enabled. | |
14870 | for w in ${build_warnings}; do | |
14871 | case $w in | |
14872 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
14873 | *) # Check that GCC accepts it | |
4536bbc6 AC |
14874 | saved_CFLAGS="$CFLAGS" |
14875 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 14876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14877 | /* end confdefs.h. */ |
4536bbc6 | 14878 | |
bec39cab AC |
14879 | int |
14880 | main () | |
14881 | { | |
4536bbc6 | 14882 | |
bec39cab AC |
14883 | ; |
14884 | return 0; | |
14885 | } | |
14886 | _ACEOF | |
81ecdfbb | 14887 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 14888 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 14889 | fi |
81ecdfbb | 14890 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 14891 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
14892 | esac |
14893 | done | |
81ecdfbb RW |
14894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
14895 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
14896 | fi |
14897 | ||
14898 | ||
104c1213 | 14899 | |
7a292a7a | 14900 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
14901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
14902 | $as_echo_n "checking for cygwin... " >&6; } | |
14903 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
14904 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14905 | else |
81ecdfbb | 14906 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14907 | /* end confdefs.h. */ |
7a292a7a SS |
14908 | |
14909 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
14910 | lose | |
14911 | #endif | |
bec39cab | 14912 | _ACEOF |
7a292a7a | 14913 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 14914 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
14915 | gdb_cv_os_cygwin=yes |
14916 | else | |
7a292a7a SS |
14917 | gdb_cv_os_cygwin=no |
14918 | fi | |
14919 | rm -f conftest* | |
14920 | ||
14921 | fi | |
81ecdfbb RW |
14922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
14923 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 14924 | |
aff38e61 | 14925 | |
3eb25fda | 14926 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 14927 | case ${host} in |
95cbc983 AC |
14928 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
14929 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 14930 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
14931 | esac |
14932 | ||
14933 | ||
cd0fc7c3 SS |
14934 | # libreadline needs libuser32.a in a cygwin environment |
14935 | WIN32LIBS= | |
14936 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
14937 | WIN32LIBS="-luser32" |
14938 | case "${target}" in | |
14939 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
14940 | ;; | |
14941 | esac | |
cd0fc7c3 | 14942 | fi |
c906108c | 14943 | |
b4505029 MM |
14944 | # The ser-tcp.c module requires sockets. |
14945 | case ${host} in | |
14946 | *mingw32*) | |
14947 | ||
81ecdfbb | 14948 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
14949 | |
14950 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
14951 | ;; | |
14952 | esac | |
14953 | ||
7a292a7a | 14954 | |
31d99776 DJ |
14955 | # Add ELF support to GDB, but only if BFD includes ELF support. |
14956 | OLD_CFLAGS=$CFLAGS | |
14957 | OLD_LDFLAGS=$LDFLAGS | |
14958 | OLD_LIBS=$LIBS | |
cab58a69 | 14959 | CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" |
31d99776 | 14960 | LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" |
7b3200f9 | 14961 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
075ff26d JK |
14962 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
14963 | if test "$plugins" = "yes"; then | |
14964 | LIBS="-ldl $LIBS" | |
14965 | fi | |
0f72fb1c | 14966 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
14967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
14968 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
14969 | if test "${gdb_cv_var_elf+set}" = set; then : | |
14970 | $as_echo_n "(cached) " >&6 | |
31d99776 | 14971 | else |
81ecdfbb | 14972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
14973 | /* end confdefs.h. */ |
14974 | #include <stdlib.h> | |
14975 | #include "bfd.h" | |
14976 | #include "elf-bfd.h" | |
14977 | ||
14978 | int | |
14979 | main () | |
14980 | { | |
14981 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
14982 | ; | |
14983 | return 0; | |
14984 | } | |
14985 | _ACEOF | |
81ecdfbb | 14986 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
14987 | gdb_cv_var_elf=yes |
14988 | else | |
81ecdfbb | 14989 | gdb_cv_var_elf=no |
31d99776 | 14990 | fi |
81ecdfbb RW |
14991 | rm -f core conftest.err conftest.$ac_objext \ |
14992 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 14993 | fi |
81ecdfbb RW |
14994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
14995 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 DJ |
14996 | if test $gdb_cv_var_elf = yes; then |
14997 | CONFIG_OBS="$CONFIG_OBS elfread.o" | |
14998 | ||
81ecdfbb | 14999 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 15000 | |
075ff26d JK |
15001 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
15002 | if test "$plugins" = "yes"; then | |
15003 | OLD_LIBS="-ldl $OLD_LIBS" | |
15004 | fi | |
31d99776 DJ |
15005 | fi |
15006 | CFLAGS=$OLD_CFLAGS | |
15007 | LDFLAGS=$OLD_LDFLAGS | |
15008 | LIBS=$OLD_LIBS | |
15009 | ||
121ce6e5 DJ |
15010 | # Add any host-specific objects to GDB. |
15011 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
15012 | ||
3fc11d3e JM |
15013 | LIBGUI="../libgui/src/libgui.a" |
15014 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
15015 | ||
15016 | ||
7a292a7a | 15017 | |
3fc11d3e JM |
15018 | WIN32LDAPP= |
15019 | ||
15020 | ||
15021 | ||
d91670b9 | 15022 | case "${host}" in |
686a5eed | 15023 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
15024 | configdir="win" |
15025 | ;; | |
15026 | *) | |
15027 | configdir="unix" | |
15028 | ;; | |
15029 | esac | |
3fc11d3e JM |
15030 | |
15031 | GDBTKLIBS= | |
15032 | if test "${enable_gdbtk}" = "yes"; then | |
15033 | ||
d1c3b63a KS |
15034 | # Gdbtk must have an absolute path to srcdir in order to run |
15035 | # properly when not installed. | |
15036 | here=`pwd` | |
15037 | cd ${srcdir} | |
15038 | GDBTK_SRC_DIR=`pwd` | |
15039 | cd $here | |
15040 | ||
bec39cab | 15041 | |
5062cc19 KS |
15042 | # |
15043 | # Ok, lets find the tcl configuration | |
15044 | # First, look for one uninstalled. | |
15045 | # the alternative search directory is invoked by --with-tcl | |
15046 | # | |
3fc11d3e | 15047 | |
5062cc19 KS |
15048 | if test x"${no_tcl}" = x ; then |
15049 | # we reset no_tcl in case something fails here | |
15050 | no_tcl=true | |
bec39cab | 15051 | |
81ecdfbb RW |
15052 | # Check whether --with-tcl was given. |
15053 | if test "${with_tcl+set}" = set; then : | |
15054 | withval=$with_tcl; with_tclconfig=${withval} | |
15055 | fi | |
15056 | ||
15057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
15058 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
15059 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
15060 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 15061 | else |
bec39cab | 15062 | |
3fc11d3e | 15063 | |
5062cc19 KS |
15064 | # First check to see if --with-tcl was specified. |
15065 | case "${host}" in | |
15066 | *-*-cygwin*) platDir="win" ;; | |
15067 | *) platDir="unix" ;; | |
15068 | esac | |
15069 | if test x"${with_tclconfig}" != x ; then | |
15070 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
15071 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
15072 | else | |
81ecdfbb | 15073 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15074 | fi |
15075 | fi | |
15076 | ||
15077 | # then check for a private Tcl installation | |
15078 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15079 | for i in \ | |
15080 | ../tcl \ | |
15081 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15082 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
15083 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
15084 | ../../tcl \ | |
15085 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15086 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
15087 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
15088 | ../../../tcl \ | |
15089 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15090 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
15091 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
15092 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
15093 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
15094 | break | |
15095 | fi | |
15096 | done | |
15097 | fi | |
15098 | ||
15099 | # on Darwin, check in Framework installation locations | |
15100 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
15101 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15102 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15103 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15104 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15105 | ; do | |
15106 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
15107 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
15108 | break | |
15109 | fi | |
15110 | done | |
15111 | fi | |
15112 | ||
15113 | # check in a few common install locations | |
15114 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15115 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15116 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15117 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15118 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15119 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15120 | `ls -d /usr/lib 2>/dev/null` \ | |
15121 | ; do | |
15122 | if test -f "$i/tclConfig.sh" ; then | |
15123 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
15124 | break | |
15125 | fi | |
15126 | done | |
15127 | fi | |
3fc11d3e | 15128 | |
5062cc19 KS |
15129 | # check in a few other private locations |
15130 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15131 | for i in \ | |
15132 | ${srcdir}/../tcl \ | |
15133 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15134 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
15135 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
15136 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
15137 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
15138 | break | |
15139 | fi | |
15140 | done | |
15141 | fi | |
bec39cab | 15142 | |
3fc11d3e JM |
15143 | fi |
15144 | ||
5062cc19 KS |
15145 | |
15146 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
15147 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
15148 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
15149 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
15150 | else |
15151 | no_tcl= | |
15152 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
15153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15154 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
15155 | fi |
15156 | fi | |
3fc11d3e | 15157 | |
bec39cab | 15158 | |
85541719 DE |
15159 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
15160 | # point to doing Tcl. | |
bec39cab | 15161 | |
5062cc19 KS |
15162 | # |
15163 | # Ok, lets find the tk configuration | |
15164 | # First, look for one uninstalled. | |
15165 | # the alternative search directory is invoked by --with-tk | |
15166 | # | |
3fc11d3e | 15167 | |
5062cc19 KS |
15168 | if test x"${no_tk}" = x ; then |
15169 | # we reset no_tk in case something fails here | |
15170 | no_tk=true | |
bec39cab | 15171 | |
81ecdfbb RW |
15172 | # Check whether --with-tk was given. |
15173 | if test "${with_tk+set}" = set; then : | |
15174 | withval=$with_tk; with_tkconfig=${withval} | |
15175 | fi | |
15176 | ||
15177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
15178 | $as_echo_n "checking for Tk configuration... " >&6; } | |
15179 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
15180 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15181 | else |
3fc11d3e JM |
15182 | |
15183 | ||
5062cc19 KS |
15184 | # First check to see if --with-tkconfig was specified. |
15185 | if test x"${with_tkconfig}" != x ; then | |
15186 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
15187 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
15188 | else | |
81ecdfbb | 15189 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
15190 | fi |
15191 | fi | |
3fc11d3e | 15192 | |
5062cc19 KS |
15193 | # then check for a private Tk library |
15194 | case "${host}" in | |
15195 | *-*-cygwin*) platDir="win" ;; | |
15196 | *) platDir="unix" ;; | |
15197 | esac | |
15198 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15199 | for i in \ | |
15200 | ../tk \ | |
15201 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15202 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
15203 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
15204 | ../../tk \ | |
15205 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15206 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
15207 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
15208 | ../../../tk \ | |
15209 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15210 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
15211 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15212 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15213 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15214 | break | |
15215 | fi | |
15216 | done | |
15217 | fi | |
15218 | ||
15219 | # on Darwin, check in Framework installation locations | |
15220 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
15221 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
15222 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
15223 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
15224 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
15225 | ; do | |
15226 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
15227 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
15228 | break | |
15229 | fi | |
15230 | done | |
15231 | fi | |
15232 | ||
15233 | # check in a few common install locations | |
15234 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15235 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
15236 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
15237 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
15238 | `ls -d /usr/local/lib 2>/dev/null` \ | |
15239 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
15240 | `ls -d /usr/lib 2>/dev/null` \ | |
15241 | ; do | |
15242 | if test -f "$i/tkConfig.sh" ; then | |
15243 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
15244 | break | |
15245 | fi | |
15246 | done | |
15247 | fi | |
15248 | # check in a few other private locations | |
15249 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
15250 | for i in \ | |
15251 | ${srcdir}/../tk \ | |
15252 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
15253 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
15254 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
15255 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
15256 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
15257 | break | |
15258 | fi | |
15259 | done | |
15260 | fi | |
3fc11d3e | 15261 | |
3fc11d3e JM |
15262 | fi |
15263 | ||
15264 | ||
5062cc19 KS |
15265 | if test x"${ac_cv_c_tkconfig}" = x ; then |
15266 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
15267 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
15268 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
15269 | else |
15270 | no_tk= | |
15271 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
15272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15273 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 15274 | fi |
3fc11d3e | 15275 | fi |
dd2504ab | 15276 | |
dd2504ab | 15277 | |
85541719 DE |
15278 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
15279 | ||
81ecdfbb RW |
15280 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15281 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
15282 | |
15283 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
15284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15285 | $as_echo "loading" >&6; } | |
85541719 DE |
15286 | . ${TCL_BIN_DIR}/tclConfig.sh |
15287 | else | |
81ecdfbb RW |
15288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
15289 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
15290 | fi |
15291 | ||
15292 | # eval is required to do the TCL_DBGX substitution | |
15293 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
15294 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
15295 | ||
15296 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
15297 | # then set the common variable name to the value of the build variables. | |
15298 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
15299 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
15300 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
15301 | # installed and uninstalled version of Tcl. | |
15302 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
15303 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
15304 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
15305 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
15306 | elif test "`uname -s`" = "Darwin"; then | |
15307 | # If Tcl was built as a framework, attempt to use the libraries | |
15308 | # from the framework at the given location so that linking works | |
15309 | # against Tcl.framework installed in an arbitary location. | |
15310 | case ${TCL_DEFS} in | |
15311 | *TCL_FRAMEWORK*) | |
15312 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
15313 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
15314 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
15315 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
15316 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
15317 | break | |
15318 | fi | |
15319 | done | |
15320 | fi | |
15321 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
15322 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
15323 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
15324 | fi | |
15325 | ;; | |
15326 | esac | |
15327 | fi | |
15328 | ||
15329 | # eval is required to do the TCL_DBGX substitution | |
15330 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
15331 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
15332 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
15333 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
15334 | ||
15335 | ||
15336 | ||
15337 | ||
15338 | ||
15339 | ||
15340 | ||
15341 | ||
15342 | ||
15343 | ||
15344 | ||
15345 | ||
15346 | ||
15347 | ||
15348 | ||
15349 | # Check for in-tree tcl | |
15350 | here=`pwd` | |
15351 | cd ${srcdir}/.. | |
15352 | topdir=`pwd` | |
15353 | cd ${here} | |
15354 | ||
15355 | intree="no" | |
15356 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
15357 | intree="yes" | |
15358 | fi | |
15359 | ||
15360 | # Find Tcl private headers | |
15361 | if test x"${intree}" = xno; then | |
15362 | ||
81ecdfbb RW |
15363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
15364 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
15365 | private_dir="" |
15366 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
15367 | if test -f ${dir}/tclInt.h ; then | |
15368 | private_dir=${dir} | |
15369 | fi | |
15370 | ||
15371 | if test x"${private_dir}" = x; then | |
81ecdfbb | 15372 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
15373 | else |
15374 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
15375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15376 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
15377 | fi |
15378 | ||
15379 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
15380 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
15381 | TCL_DEPS="" | |
15382 | else | |
15383 | # If building tcl in the same src tree, private headers | |
15384 | # are not needed, but we need to be sure to use the right | |
15385 | # headers library | |
15386 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
15387 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
15388 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
15389 | fi | |
15390 | ||
15391 | ||
15392 | ||
15393 | ||
15394 | ||
81ecdfbb RW |
15395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15396 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 15397 | |
5062cc19 | 15398 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
15399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
15400 | $as_echo "loading" >&6; } | |
5062cc19 | 15401 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 15402 | else |
81ecdfbb RW |
15403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
15404 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 15405 | fi |
bec39cab | 15406 | |
5062cc19 KS |
15407 | # eval is required to do the TK_DBGX substitution |
15408 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
15409 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
15410 | ||
15411 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
15412 | # then set the common variable name to the value of the build variables. | |
15413 | # For example, the variable TK_LIB_SPEC will be set to the value | |
15414 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
15415 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
15416 | # installed and uninstalled version of Tcl. | |
85541719 | 15417 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
15418 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
15419 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
15420 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
15421 | elif test "`uname -s`" = "Darwin"; then | |
15422 | # If Tk was built as a framework, attempt to use the libraries | |
15423 | # from the framework at the given location so that linking works | |
15424 | # against Tk.framework installed in an arbitary location. | |
15425 | case ${TK_DEFS} in | |
15426 | *TK_FRAMEWORK*) | |
85541719 | 15427 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
15428 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
15429 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
15430 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
15431 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
15432 | break | |
15433 | fi | |
15434 | done | |
15435 | fi | |
85541719 | 15436 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
15437 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
15438 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
15439 | fi | |
15440 | ;; | |
15441 | esac | |
3fc11d3e JM |
15442 | fi |
15443 | ||
5062cc19 KS |
15444 | # eval is required to do the TK_DBGX substitution |
15445 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
15446 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
15447 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
15448 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 15449 | |
3fc11d3e JM |
15450 | |
15451 | ||
bec39cab AC |
15452 | |
15453 | ||
15454 | ||
15455 | ||
15456 | ||
15457 | ||
15458 | ||
3fc11d3e | 15459 | |
3fc11d3e | 15460 | |
bec39cab | 15461 | |
bec39cab | 15462 | |
85541719 DE |
15463 | # Check for in-tree Tk |
15464 | intree="no" | |
15465 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
15466 | intree="yes" | |
15467 | fi | |
3fc11d3e | 15468 | |
85541719 DE |
15469 | # Find Tk private headers |
15470 | if test x"${intree}" = xno; then | |
3fc11d3e | 15471 | |
81ecdfbb RW |
15472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
15473 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
15474 | private_dir="" |
15475 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
15476 | if test -f ${dir}/tkInt.h; then | |
15477 | private_dir=${dir} | |
3fc11d3e | 15478 | fi |
bec39cab | 15479 | |
5062cc19 | 15480 | if test x"${private_dir}" = x; then |
81ecdfbb | 15481 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 15482 | else |
5062cc19 | 15483 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
15484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
15485 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 15486 | fi |
3fc11d3e | 15487 | |
85541719 DE |
15488 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
15489 | TK_LIBRARY=${TK_LIB_SPEC} | |
15490 | TK_DEPS="" | |
15491 | else | |
15492 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
15493 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
15494 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
15495 | fi | |
3fc11d3e JM |
15496 | |
15497 | ||
3fc11d3e JM |
15498 | |
15499 | ||
3fc11d3e | 15500 | |
85541719 | 15501 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 15502 | |
85541719 DE |
15503 | # Include some libraries that Tcl and Tk want. |
15504 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
15505 | # Yes, the ordering seems wrong here. But it isn't. | |
15506 | # TK_LIBS is the list of libraries that need to be linked | |
15507 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
15508 | # were in LIBS then any link tests after this point would | |
15509 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
15510 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 15511 | |
85541719 DE |
15512 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
15513 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
15514 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
15515 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
15516 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
15517 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
15518 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 15519 | |
85541719 DE |
15520 | if test x$gdb_cv_os_cygwin = xyes; then |
15521 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
15522 | WIN32LDAPP="-Wl,--subsystem,console" | |
15523 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 15524 | fi |
ffc6a242 | 15525 | |
81ecdfbb | 15526 | subdirs="$subdirs gdbtk" |
3ace7edb | 15527 | |
85541719 | 15528 | fi |
3fc11d3e JM |
15529 | fi |
15530 | ||
15531 | ||
15532 | ||
15533 | ||
15534 | ||
15535 | ||
15536 | ||
15537 | ||
81ecdfbb RW |
15538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
15539 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 15540 | |
c906108c | 15541 | |
81ecdfbb RW |
15542 | # Check whether --with-x was given. |
15543 | if test "${with_x+set}" = set; then : | |
15544 | withval=$with_x; | |
15545 | fi | |
c906108c SS |
15546 | |
15547 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
15548 | if test "x$with_x" = xno; then | |
15549 | # The user explicitly disabled X. | |
15550 | have_x=disabled | |
15551 | else | |
81ecdfbb RW |
15552 | case $x_includes,$x_libraries in #( |
15553 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
15554 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
15555 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
15556 | else |
15557 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 15558 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 15559 | rm -f -r conftest.dir |
bec39cab AC |
15560 | if mkdir conftest.dir; then |
15561 | cd conftest.dir | |
bec39cab | 15562 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
15563 | incroot: |
15564 | @echo incroot='${INCROOT}' | |
15565 | usrlibdir: | |
15566 | @echo usrlibdir='${USRLIBDIR}' | |
15567 | libdir: | |
15568 | @echo libdir='${LIBDIR}' | |
15569 | _ACEOF | |
15570 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 15571 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
15572 | for ac_var in incroot usrlibdir libdir; do |
15573 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
15574 | done | |
c906108c | 15575 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
15576 | for ac_extension in a so sl dylib la dll; do |
15577 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
15578 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 15579 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
15580 | fi |
15581 | done | |
15582 | # Screen out bogus values from the imake configuration. They are | |
15583 | # bogus both because they are the default anyway, and because | |
15584 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 15585 | case $ac_im_incroot in |
81ecdfbb | 15586 | /usr/include) ac_x_includes= ;; |
bec39cab | 15587 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 15588 | esac |
bec39cab | 15589 | case $ac_im_usrlibdir in |
81ecdfbb | 15590 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 15591 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
15592 | esac |
15593 | fi | |
15594 | cd .. | |
81ecdfbb | 15595 | rm -f -r conftest.dir |
c906108c SS |
15596 | fi |
15597 | ||
bec39cab AC |
15598 | # Standard set of common directories for X headers. |
15599 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
15600 | ac_x_header_dirs=' | |
15601 | /usr/X11/include | |
81ecdfbb | 15602 | /usr/X11R7/include |
bec39cab AC |
15603 | /usr/X11R6/include |
15604 | /usr/X11R5/include | |
15605 | /usr/X11R4/include | |
15606 | ||
15607 | /usr/include/X11 | |
81ecdfbb | 15608 | /usr/include/X11R7 |
bec39cab AC |
15609 | /usr/include/X11R6 |
15610 | /usr/include/X11R5 | |
15611 | /usr/include/X11R4 | |
15612 | ||
15613 | /usr/local/X11/include | |
81ecdfbb | 15614 | /usr/local/X11R7/include |
bec39cab AC |
15615 | /usr/local/X11R6/include |
15616 | /usr/local/X11R5/include | |
15617 | /usr/local/X11R4/include | |
15618 | ||
15619 | /usr/local/include/X11 | |
81ecdfbb | 15620 | /usr/local/include/X11R7 |
bec39cab AC |
15621 | /usr/local/include/X11R6 |
15622 | /usr/local/include/X11R5 | |
15623 | /usr/local/include/X11R4 | |
15624 | ||
15625 | /usr/X386/include | |
15626 | /usr/x386/include | |
15627 | /usr/XFree86/include/X11 | |
15628 | ||
15629 | /usr/include | |
15630 | /usr/local/include | |
15631 | /usr/unsupported/include | |
15632 | /usr/athena/include | |
15633 | /usr/local/x11r5/include | |
15634 | /usr/lpp/Xamples/include | |
15635 | ||
15636 | /usr/openwin/include | |
15637 | /usr/openwin/share/include' | |
15638 | ||
15639 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 15640 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 15641 | # First, try using that file with no special directory specified. |
81ecdfbb | 15642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15643 | /* end confdefs.h. */ |
81ecdfbb | 15644 | #include <X11/Xlib.h> |
bec39cab | 15645 | _ACEOF |
81ecdfbb | 15646 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
15647 | # We can compile using X headers with no special include directory. |
15648 | ac_x_includes= | |
15649 | else | |
bec39cab | 15650 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 15651 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
15652 | ac_x_includes=$ac_dir |
15653 | break | |
15654 | fi | |
15655 | done | |
c906108c | 15656 | fi |
bec39cab AC |
15657 | rm -f conftest.err conftest.$ac_ext |
15658 | fi # $ac_x_includes = no | |
c906108c | 15659 | |
bec39cab | 15660 | if test "$ac_x_libraries" = no; then |
c906108c | 15661 | # Check for the libraries. |
c906108c SS |
15662 | # See if we find them without any special options. |
15663 | # Don't add to $LIBS permanently. | |
bec39cab | 15664 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
15665 | LIBS="-lX11 $LIBS" |
15666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15667 | /* end confdefs.h. */ |
81ecdfbb | 15668 | #include <X11/Xlib.h> |
bec39cab AC |
15669 | int |
15670 | main () | |
15671 | { | |
81ecdfbb | 15672 | XrmInitialize () |
bec39cab AC |
15673 | ; |
15674 | return 0; | |
15675 | } | |
15676 | _ACEOF | |
81ecdfbb | 15677 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15678 | LIBS=$ac_save_LIBS |
c906108c SS |
15679 | # We can link X programs with no special library path. |
15680 | ac_x_libraries= | |
15681 | else | |
81ecdfbb RW |
15682 | LIBS=$ac_save_LIBS |
15683 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 15684 | do |
bec39cab | 15685 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
15686 | for ac_extension in a so sl dylib la dll; do |
15687 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
15688 | ac_x_libraries=$ac_dir |
15689 | break 2 | |
15690 | fi | |
15691 | done | |
15692 | done | |
15693 | fi | |
81ecdfbb RW |
15694 | rm -f core conftest.err conftest.$ac_objext \ |
15695 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 15696 | fi # $ac_x_libraries = no |
c906108c | 15697 | |
81ecdfbb RW |
15698 | case $ac_x_includes,$ac_x_libraries in #( |
15699 | no,* | *,no | *\'*) | |
15700 | # Didn't find X, or a directory has "'" in its name. | |
15701 | ac_cv_have_x="have_x=no";; #( | |
15702 | *) | |
15703 | # Record where we found X for the cache. | |
15704 | ac_cv_have_x="have_x=yes\ | |
15705 | ac_x_includes='$ac_x_includes'\ | |
15706 | ac_x_libraries='$ac_x_libraries'" | |
15707 | esac | |
c906108c | 15708 | fi |
81ecdfbb RW |
15709 | ;; #( |
15710 | *) have_x=yes;; | |
15711 | esac | |
c906108c SS |
15712 | eval "$ac_cv_have_x" |
15713 | fi # $with_x != no | |
15714 | ||
15715 | if test "$have_x" != yes; then | |
81ecdfbb RW |
15716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
15717 | $as_echo "$have_x" >&6; } | |
c906108c SS |
15718 | no_x=yes |
15719 | else | |
15720 | # If each of the values was on the command line, it overrides each guess. | |
15721 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
15722 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
15723 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
15724 | ac_cv_have_x="have_x=yes\ |
15725 | ac_x_includes='$x_includes'\ | |
15726 | ac_x_libraries='$x_libraries'" | |
15727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
15728 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
15729 | fi |
15730 | ||
15731 | ||
bec39cab | 15732 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 15733 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
15734 | # This code just checks for a few cases where we'd like to ignore those |
15735 | # definitions, even when they're present in the '.mt' file. These cases | |
15736 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 15737 | # not part of the source tree. |
7a292a7a | 15738 | # |
81ecdfbb RW |
15739 | # Check whether --enable-sim was given. |
15740 | if test "${enable_sim+set}" = set; then : | |
15741 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
15742 | echo "enableval = ${enableval}"; |
15743 | case "${enableval}" in | |
15744 | yes) ignore_sim=false ;; | |
15745 | no) ignore_sim=true ;; | |
15746 | *) ignore_sim=false ;; | |
15747 | esac | |
15748 | else | |
15749 | ignore_sim=false | |
81ecdfbb RW |
15750 | fi |
15751 | ||
7a292a7a SS |
15752 | |
15753 | if test ! -d "${srcdir}/../sim"; then | |
15754 | ignore_sim=true | |
15755 | fi | |
15756 | ||
9b624dbe UW |
15757 | SIM= |
15758 | SIM_OBS= | |
15759 | if test "${ignore_sim}" = "false"; then | |
15760 | if test x"${gdb_sim}" != x ; then | |
15761 | SIM="${gdb_sim}" | |
15762 | SIM_OBS="remote-sim.o" | |
60ca704f | 15763 | |
81ecdfbb | 15764 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 15765 | |
9b624dbe | 15766 | fi |
7a292a7a SS |
15767 | fi |
15768 | ||
15769 | ||
15770 | ||
c906108c SS |
15771 | |
15772 | ||
15773 | ||
15774 | ||
15775 | ||
15776 | ||
dfcd3bfb | 15777 | |
e56ac5c3 AC |
15778 | |
15779 | ||
b3a90332 AC |
15780 | |
15781 | ||
c35f4ffc | 15782 | # List of host floatformats. |
bec39cab AC |
15783 | |
15784 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15785 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 15786 | _ACEOF |
c35f4ffc | 15787 | |
bec39cab AC |
15788 | |
15789 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 15790 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
15791 | _ACEOF |
15792 | ||
c35f4ffc | 15793 | |
bec39cab | 15794 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 15795 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 15796 | _ACEOF |
c35f4ffc AC |
15797 | |
15798 | ||
c906108c SS |
15799 | # target_subdir is used by the testsuite to find the target libraries. |
15800 | target_subdir= | |
15801 | if test "${host}" != "${target}"; then | |
15802 | target_subdir="${target_alias}/" | |
15803 | fi | |
15804 | ||
15805 | ||
15806 | frags= | |
771b4502 | 15807 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
15808 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
15809 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 15810 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
15811 | fi |
15812 | frags="$frags $host_makefile_frag" | |
15813 | else | |
15814 | host_makefile_frag=/dev/null | |
c906108c | 15815 | fi |
c906108c | 15816 | |
c906108c SS |
15817 | |
15818 | ||
15819 | ||
771b4502 | 15820 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
15821 | # We pick this up from the host configuration file (.mh) because we |
15822 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
15823 | nativefile=`sed -n ' |
15824 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
15825 | ' ${host_makefile_frag}` | |
c906108c SS |
15826 | fi |
15827 | ||
15828 | ||
b00a8037 | 15829 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
15830 | |
15831 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 15832 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 15833 | _ACEOF |
b00a8037 DJ |
15834 | |
15835 | fi | |
15836 | ||
8dcde887 | 15837 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
15838 | # Check whether --enable-multi-ice was given. |
15839 | if test "${enable_multi_ice+set}" = set; then : | |
15840 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
15841 | yes | no) |
15842 | ;; | |
81ecdfbb | 15843 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 15844 | esac |
81ecdfbb | 15845 | fi |
b4e70030 | 15846 | |
81ecdfbb RW |
15847 | if test "x$enable_multi_ice" = xyes; then |
15848 | subdirs="$subdirs multi-ice" | |
3ace7edb | 15849 | |
a85f51e7 DJ |
15850 | fi |
15851 | ||
496c0e1b JB |
15852 | # Check whether --enable-gdbserver was given. |
15853 | if test "${enable_gdbserver+set}" = set; then : | |
15854 | enableval=$enable_gdbserver; case "${enableval}" in | |
15855 | yes| no|auto) ;; | |
15856 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
15857 | esac | |
15858 | else | |
15859 | enable_gdbserver=auto | |
15860 | fi | |
15861 | ||
15862 | ||
15863 | # We only build gdbserver automatically in a native configuration, and | |
15864 | # only if the user did not explicitly disable its build. | |
15865 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
15866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
15867 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 15868 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
15869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
15870 | $as_echo "yes" >&6; } | |
15871 | subdirs="$subdirs gdbserver" | |
3ace7edb | 15872 | |
496c0e1b | 15873 | gdbserver_build_enabled=yes |
8dcde887 | 15874 | else |
81ecdfbb RW |
15875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
15876 | $as_echo "no" >&6; } | |
8dcde887 MK |
15877 | fi |
15878 | fi | |
15879 | ||
496c0e1b JB |
15880 | # If the user explicitly request the gdbserver to be built, verify that |
15881 | # we were in fact able to enable it. | |
15882 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
15883 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
15884 | fi | |
15885 | ||
db985757 | 15886 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 15887 | # to an empty version. |
c906108c SS |
15888 | |
15889 | files= | |
15890 | links= | |
5a2402b8 | 15891 | |
c906108c SS |
15892 | rm -f nm.h |
15893 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
15894 | case "${nativefile}" in |
15895 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
15896 | * ) GDB_NM_FILE="${nativefile}" | |
15897 | esac | |
5a2402b8 AC |
15898 | files="${files} ${GDB_NM_FILE}" |
15899 | links="${links} nm.h" | |
60ca704f SE |
15900 | |
15901 | cat >>confdefs.h <<_ACEOF | |
b78960be | 15902 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 15903 | _ACEOF |
5a2402b8 | 15904 | |
c906108c | 15905 | fi |
5a2402b8 AC |
15906 | |
15907 | ||
bec39cab AC |
15908 | ac_sources="$files" |
15909 | ac_dests="$links" | |
15910 | while test -n "$ac_sources"; do | |
15911 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
15912 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
15913 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
15914 | done | |
81ecdfbb | 15915 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
15916 | |
15917 | ||
c906108c SS |
15918 | |
15919 | ||
c906108c | 15920 | |
81ecdfbb | 15921 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 15922 | |
bec39cab | 15923 | |
5ae98d25 | 15924 | ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile" |
81ecdfbb RW |
15925 | |
15926 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 15927 | |
bec39cab AC |
15928 | cat >confcache <<\_ACEOF |
15929 | # This file is a shell script that caches the results of configure | |
15930 | # tests run on this system so they can be shared between configure | |
15931 | # scripts and configure runs, see configure's option --config-cache. | |
15932 | # It is not useful on other systems. If it contains results you don't | |
15933 | # want to keep, you may remove or edit it. | |
15934 | # | |
15935 | # config.status only pays attention to the cache file if you give it | |
15936 | # the --recheck option to rerun configure. | |
15937 | # | |
15938 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
15939 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15940 | # following values. | |
15941 | ||
15942 | _ACEOF | |
15943 | ||
15944 | # The following way of writing the cache mishandles newlines in values, | |
15945 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 15946 | # So, we kill variables containing newlines. |
bec39cab AC |
15947 | # Ultrix sh set writes to stderr and can't be redirected directly, |
15948 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
15949 | ( |
15950 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
15951 | eval ac_val=\$$ac_var | |
15952 | case $ac_val in #( | |
15953 | *${as_nl}*) | |
15954 | case $ac_var in #( | |
15955 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
15956 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
15957 | esac | |
15958 | case $ac_var in #( | |
15959 | _ | IFS | as_nl) ;; #( | |
15960 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
15961 | *) { eval $ac_var=; unset $ac_var;} ;; | |
15962 | esac ;; | |
15963 | esac | |
15964 | done | |
15965 | ||
bec39cab | 15966 | (set) 2>&1 | |
81ecdfbb RW |
15967 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
15968 | *${as_nl}ac_space=\ *) | |
15969 | # `set' does not quote correctly, so add quotes: double-quote | |
15970 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
15971 | sed -n \ |
15972 | "s/'/'\\\\''/g; | |
15973 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 15974 | ;; #( |
bec39cab AC |
15975 | *) |
15976 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 15977 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 15978 | ;; |
81ecdfbb RW |
15979 | esac | |
15980 | sort | |
15981 | ) | | |
bec39cab | 15982 | sed ' |
81ecdfbb | 15983 | /^ac_cv_env_/b end |
bec39cab | 15984 | t clear |
81ecdfbb | 15985 | :clear |
bec39cab AC |
15986 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
15987 | t end | |
81ecdfbb RW |
15988 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
15989 | :end' >>confcache | |
15990 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
15991 | if test -w "$cache_file"; then | |
15992 | test "x$cache_file" != "x/dev/null" && | |
15993 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
15994 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
15995 | cat confcache >$cache_file |
15996 | else | |
81ecdfbb RW |
15997 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
15998 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
15999 | fi |
16000 | fi | |
16001 | rm -f confcache | |
16002 | ||
16003 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16004 | # Let make expand exec_prefix. | |
16005 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16006 | ||
bec39cab AC |
16007 | DEFS=-DHAVE_CONFIG_H |
16008 | ||
16009 | ac_libobjs= | |
16010 | ac_ltlibobjs= | |
16011 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16012 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
16013 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
16014 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
16015 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
16016 | # will be set to the directory where LIBOBJS objects are built. | |
16017 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
16018 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
16019 | done |
16020 | LIBOBJS=$ac_libobjs | |
16021 | ||
16022 | LTLIBOBJS=$ac_ltlibobjs | |
16023 | ||
16024 | ||
85981d60 | 16025 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
16026 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
16027 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 16028 | fi |
a417dc56 | 16029 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
16030 | as_fn_error "conditional \"GMAKE\" was never defined. |
16031 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 16032 | fi |
783e057b | 16033 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
81ecdfbb RW |
16034 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
16035 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
783e057b DJ |
16036 | fi |
16037 | ||
16038 | gl_libobjs= | |
16039 | gl_ltlibobjs= | |
16040 | if test -n "$gl_LIBOBJS"; then | |
16041 | # Remove the extension. | |
16042 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 16043 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
16044 | gl_libobjs="$gl_libobjs $i.$ac_objext" |
16045 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
16046 | done | |
16047 | fi | |
16048 | gl_LIBOBJS=$gl_libobjs | |
16049 | ||
16050 | gl_LTLIBOBJS=$gl_ltlibobjs | |
16051 | ||
16052 | ||
16053 | ||
16054 | gltests_libobjs= | |
16055 | gltests_ltlibobjs= | |
16056 | if test -n "$gltests_LIBOBJS"; then | |
16057 | # Remove the extension. | |
16058 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 16059 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
16060 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" |
16061 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
16062 | done | |
16063 | fi | |
16064 | gltests_LIBOBJS=$gltests_libobjs | |
16065 | ||
16066 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
16067 | ||
16068 | ||
e28b3332 | 16069 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
81ecdfbb RW |
16070 | as_fn_error "conditional \"AMDEP\" was never defined. |
16071 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
e28b3332 DJ |
16072 | fi |
16073 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
81ecdfbb RW |
16074 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
16075 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
16076 | fi | |
16077 | if test -n "$EXEEXT"; then | |
16078 | am__EXEEXT_TRUE= | |
16079 | am__EXEEXT_FALSE='#' | |
16080 | else | |
16081 | am__EXEEXT_TRUE='#' | |
16082 | am__EXEEXT_FALSE= | |
e28b3332 | 16083 | fi |
bec39cab | 16084 | |
81ecdfbb RW |
16085 | |
16086 | ||
bec39cab | 16087 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 16088 | ac_write_fail=0 |
bec39cab AC |
16089 | ac_clean_files_save=$ac_clean_files |
16090 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
16091 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
16092 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16093 | as_write_fail=0 | |
16094 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
16095 | #! $SHELL |
16096 | # Generated by $as_me. | |
16097 | # Run this file to recreate the current configuration. | |
16098 | # Compiler output produced by configure, useful for debugging | |
16099 | # configure, is in config.log if it exists. | |
16100 | ||
16101 | debug=false | |
16102 | ac_cs_recheck=false | |
16103 | ac_cs_silent=false | |
bec39cab | 16104 | |
81ecdfbb RW |
16105 | SHELL=\${CONFIG_SHELL-$SHELL} |
16106 | export SHELL | |
16107 | _ASEOF | |
16108 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
16109 | ## -------------------- ## | |
16110 | ## M4sh Initialization. ## | |
16111 | ## -------------------- ## | |
16112 | ||
16113 | # Be more Bourne compatible | |
16114 | DUALCASE=1; export DUALCASE # for MKS sh | |
16115 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
16116 | emulate sh |
16117 | NULLCMD=: | |
81ecdfbb | 16118 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
16119 | # is contrary to our usage. Disable this feature. |
16120 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
16121 | setopt NO_GLOB_SUBST |
16122 | else | |
16123 | case `(set -o) 2>/dev/null` in #( | |
16124 | *posix*) : | |
16125 | set -o posix ;; #( | |
16126 | *) : | |
16127 | ;; | |
16128 | esac | |
bec39cab | 16129 | fi |
bec39cab | 16130 | |
81ecdfbb RW |
16131 | |
16132 | as_nl=' | |
16133 | ' | |
16134 | export as_nl | |
16135 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
16136 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
16137 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
16138 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
16139 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
16140 | # but without wasting forks for bash or zsh. | |
16141 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
16142 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16143 | as_echo='print -r --' | |
16144 | as_echo_n='print -rn --' | |
16145 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16146 | as_echo='printf %s\n' | |
16147 | as_echo_n='printf %s' | |
16148 | else | |
16149 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
16150 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
16151 | as_echo_n='/usr/ucb/echo -n' | |
16152 | else | |
16153 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
16154 | as_echo_n_body='eval | |
16155 | arg=$1; | |
16156 | case $arg in #( | |
16157 | *"$as_nl"*) | |
16158 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
16159 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
16160 | esac; | |
16161 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
16162 | ' | |
16163 | export as_echo_n_body | |
16164 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
16165 | fi | |
16166 | export as_echo_body | |
16167 | as_echo='sh -c $as_echo_body as_echo' | |
16168 | fi | |
16169 | ||
16170 | # The user is always right. | |
16171 | if test "${PATH_SEPARATOR+set}" != set; then | |
16172 | PATH_SEPARATOR=: | |
16173 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
16174 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
16175 | PATH_SEPARATOR=';' | |
16176 | } | |
bec39cab AC |
16177 | fi |
16178 | ||
16179 | ||
81ecdfbb RW |
16180 | # IFS |
16181 | # We need space, tab and new line, in precisely that order. Quoting is | |
16182 | # there to prevent editors from complaining about space-tab. | |
16183 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
16184 | # splitting by setting IFS to empty value.) | |
16185 | IFS=" "" $as_nl" | |
16186 | ||
16187 | # Find who we are. Look in the path if we contain no directory separator. | |
16188 | case $0 in #(( | |
16189 | *[\\/]* ) as_myself=$0 ;; | |
16190 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16191 | for as_dir in $PATH | |
16192 | do | |
16193 | IFS=$as_save_IFS | |
16194 | test -z "$as_dir" && as_dir=. | |
16195 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16196 | done | |
16197 | IFS=$as_save_IFS | |
16198 | ||
16199 | ;; | |
16200 | esac | |
16201 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16202 | # in which case we are not to be found in the path. | |
16203 | if test "x$as_myself" = x; then | |
16204 | as_myself=$0 | |
16205 | fi | |
16206 | if test ! -f "$as_myself"; then | |
16207 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
16208 | exit 1 | |
16209 | fi | |
16210 | ||
16211 | # Unset variables that we do not need and which cause bugs (e.g. in | |
16212 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
16213 | # suppresses any "Segmentation fault" message there. '((' could | |
16214 | # trigger a bug in pdksh 5.2.14. | |
16215 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
16216 | do eval test x\${$as_var+set} = xset \ | |
16217 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
16218 | done | |
bec39cab AC |
16219 | PS1='$ ' |
16220 | PS2='> ' | |
16221 | PS4='+ ' | |
16222 | ||
16223 | # NLS nuisances. | |
81ecdfbb RW |
16224 | LC_ALL=C |
16225 | export LC_ALL | |
16226 | LANGUAGE=C | |
16227 | export LANGUAGE | |
16228 | ||
16229 | # CDPATH. | |
16230 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
16231 | ||
16232 | ||
16233 | # as_fn_error ERROR [LINENO LOG_FD] | |
16234 | # --------------------------------- | |
16235 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
16236 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
16237 | # script with status $?, using 1 if that was 0. | |
16238 | as_fn_error () | |
16239 | { | |
16240 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
16241 | if test "$3"; then | |
16242 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
16243 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
16244 | fi | |
16245 | $as_echo "$as_me: error: $1" >&2 | |
16246 | as_fn_exit $as_status | |
16247 | } # as_fn_error | |
16248 | ||
16249 | ||
16250 | # as_fn_set_status STATUS | |
16251 | # ----------------------- | |
16252 | # Set $? to STATUS, without forking. | |
16253 | as_fn_set_status () | |
16254 | { | |
16255 | return $1 | |
16256 | } # as_fn_set_status | |
16257 | ||
16258 | # as_fn_exit STATUS | |
16259 | # ----------------- | |
16260 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
16261 | as_fn_exit () | |
16262 | { | |
16263 | set +e | |
16264 | as_fn_set_status $1 | |
16265 | exit $1 | |
16266 | } # as_fn_exit | |
16267 | ||
16268 | # as_fn_unset VAR | |
16269 | # --------------- | |
16270 | # Portably unset VAR. | |
16271 | as_fn_unset () | |
16272 | { | |
16273 | { eval $1=; unset $1;} | |
16274 | } | |
16275 | as_unset=as_fn_unset | |
16276 | # as_fn_append VAR VALUE | |
16277 | # ---------------------- | |
16278 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
16279 | # advantage of any shell optimizations that allow amortized linear growth over | |
16280 | # repeated appends, instead of the typical quadratic growth present in naive | |
16281 | # implementations. | |
16282 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
16283 | eval 'as_fn_append () | |
16284 | { | |
16285 | eval $1+=\$2 | |
16286 | }' | |
16287 | else | |
16288 | as_fn_append () | |
16289 | { | |
16290 | eval $1=\$$1\$2 | |
16291 | } | |
16292 | fi # as_fn_append | |
16293 | ||
16294 | # as_fn_arith ARG... | |
16295 | # ------------------ | |
16296 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
16297 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
16298 | # must be portable across $(()) and expr. | |
16299 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
16300 | eval 'as_fn_arith () | |
16301 | { | |
16302 | as_val=$(( $* )) | |
16303 | }' | |
16304 | else | |
16305 | as_fn_arith () | |
16306 | { | |
16307 | as_val=`expr "$@" || test $? -eq 1` | |
16308 | } | |
16309 | fi # as_fn_arith | |
bec39cab | 16310 | |
81ecdfbb RW |
16311 | |
16312 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
16313 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
16314 | as_expr=expr |
16315 | else | |
16316 | as_expr=false | |
16317 | fi | |
16318 | ||
81ecdfbb | 16319 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
16320 | as_basename=basename |
16321 | else | |
16322 | as_basename=false | |
16323 | fi | |
16324 | ||
81ecdfbb RW |
16325 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
16326 | as_dirname=dirname | |
16327 | else | |
16328 | as_dirname=false | |
16329 | fi | |
bec39cab | 16330 | |
81ecdfbb | 16331 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
16332 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
16333 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16334 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
16335 | $as_echo X/"$0" | | |
16336 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
16337 | s//\1/ | |
16338 | q | |
16339 | } | |
16340 | /^X\/\(\/\/\)$/{ | |
16341 | s//\1/ | |
16342 | q | |
16343 | } | |
16344 | /^X\/\(\/\).*/{ | |
16345 | s//\1/ | |
16346 | q | |
16347 | } | |
16348 | s/.*/./; q'` | |
b4e70030 | 16349 | |
b4e70030 JB |
16350 | # Avoid depending upon Character Ranges. |
16351 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16352 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16353 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16354 | as_cr_digits='0123456789' | |
16355 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16356 | ||
81ecdfbb RW |
16357 | ECHO_C= ECHO_N= ECHO_T= |
16358 | case `echo -n x` in #((((( | |
16359 | -n*) | |
16360 | case `echo 'xy\c'` in | |
16361 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
16362 | xy) ECHO_C='\c';; | |
16363 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
16364 | ECHO_T=' ';; | |
16365 | esac;; | |
16366 | *) | |
16367 | ECHO_N='-n';; | |
bec39cab AC |
16368 | esac |
16369 | ||
81ecdfbb RW |
16370 | rm -f conf$$ conf$$.exe conf$$.file |
16371 | if test -d conf$$.dir; then | |
16372 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 16373 | else |
81ecdfbb RW |
16374 | rm -f conf$$.dir |
16375 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 16376 | fi |
81ecdfbb RW |
16377 | if (echo >conf$$.file) 2>/dev/null; then |
16378 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 16379 | as_ln_s='ln -s' |
81ecdfbb RW |
16380 | # ... but there are two gotchas: |
16381 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
16382 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
16383 | # In both cases, we have to default to `cp -p'. | |
16384 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
16385 | as_ln_s='cp -p' | |
16386 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
16387 | as_ln_s=ln | |
16388 | else | |
16389 | as_ln_s='cp -p' | |
b4e70030 | 16390 | fi |
bec39cab AC |
16391 | else |
16392 | as_ln_s='cp -p' | |
16393 | fi | |
81ecdfbb RW |
16394 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
16395 | rmdir conf$$.dir 2>/dev/null | |
16396 | ||
16397 | ||
16398 | # as_fn_mkdir_p | |
16399 | # ------------- | |
16400 | # Create "$as_dir" as a directory, including parents if necessary. | |
16401 | as_fn_mkdir_p () | |
16402 | { | |
16403 | ||
16404 | case $as_dir in #( | |
16405 | -*) as_dir=./$as_dir;; | |
16406 | esac | |
16407 | test -d "$as_dir" || eval $as_mkdir_p || { | |
16408 | as_dirs= | |
16409 | while :; do | |
16410 | case $as_dir in #( | |
16411 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
16412 | *) as_qdir=$as_dir;; | |
16413 | esac | |
16414 | as_dirs="'$as_qdir' $as_dirs" | |
16415 | as_dir=`$as_dirname -- "$as_dir" || | |
16416 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16417 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
16418 | X"$as_dir" : 'X\(//\)$' \| \ | |
16419 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
16420 | $as_echo X"$as_dir" | | |
16421 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16422 | s//\1/ | |
16423 | q | |
16424 | } | |
16425 | /^X\(\/\/\)[^/].*/{ | |
16426 | s//\1/ | |
16427 | q | |
16428 | } | |
16429 | /^X\(\/\/\)$/{ | |
16430 | s//\1/ | |
16431 | q | |
16432 | } | |
16433 | /^X\(\/\).*/{ | |
16434 | s//\1/ | |
16435 | q | |
16436 | } | |
16437 | s/.*/./; q'` | |
16438 | test -d "$as_dir" && break | |
16439 | done | |
16440 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
16441 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
16442 | ||
bec39cab | 16443 | |
81ecdfbb | 16444 | } # as_fn_mkdir_p |
bec39cab | 16445 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 16446 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
16447 | else |
16448 | test -d ./-p && rmdir ./-p | |
16449 | as_mkdir_p=false | |
16450 | fi | |
16451 | ||
81ecdfbb RW |
16452 | if test -x / >/dev/null 2>&1; then |
16453 | as_test_x='test -x' | |
16454 | else | |
16455 | if ls -dL / >/dev/null 2>&1; then | |
16456 | as_ls_L_option=L | |
16457 | else | |
16458 | as_ls_L_option= | |
16459 | fi | |
16460 | as_test_x=' | |
16461 | eval sh -c '\'' | |
16462 | if test -d "$1"; then | |
16463 | test -d "$1/."; | |
16464 | else | |
16465 | case $1 in #( | |
16466 | -*)set "./$1";; | |
16467 | esac; | |
16468 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
16469 | ???[sx]*):;;*)false;;esac;fi | |
16470 | '\'' sh | |
16471 | ' | |
16472 | fi | |
16473 | as_executable_p=$as_test_x | |
bec39cab AC |
16474 | |
16475 | # Sed expression to map a string onto a valid CPP name. | |
16476 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
16477 | ||
16478 | # Sed expression to map a string onto a valid variable name. | |
16479 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
16480 | ||
16481 | ||
bec39cab | 16482 | exec 6>&1 |
81ecdfbb RW |
16483 | ## ----------------------------------- ## |
16484 | ## Main body of $CONFIG_STATUS script. ## | |
16485 | ## ----------------------------------- ## | |
16486 | _ASEOF | |
16487 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
16488 | ||
16489 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16490 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 16491 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
16492 | # values after options handling. |
16493 | ac_log=" | |
bec39cab | 16494 | This file was extended by $as_me, which was |
81ecdfbb | 16495 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
16496 | |
16497 | CONFIG_FILES = $CONFIG_FILES | |
16498 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16499 | CONFIG_LINKS = $CONFIG_LINKS | |
16500 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16501 | $ $0 $@ | |
16502 | ||
81ecdfbb RW |
16503 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
16504 | " | |
16505 | ||
bec39cab AC |
16506 | _ACEOF |
16507 | ||
81ecdfbb RW |
16508 | case $ac_config_files in *" |
16509 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
16510 | esac | |
234b45d4 | 16511 | |
81ecdfbb RW |
16512 | case $ac_config_headers in *" |
16513 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
16514 | esac | |
b4e70030 | 16515 | |
b4e70030 | 16516 | |
81ecdfbb RW |
16517 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
16518 | # Files that config.status was made for. | |
16519 | config_files="$ac_config_files" | |
16520 | config_headers="$ac_config_headers" | |
16521 | config_links="$ac_config_links" | |
16522 | config_commands="$ac_config_commands" | |
234b45d4 | 16523 | |
81ecdfbb | 16524 | _ACEOF |
b4e70030 | 16525 | |
81ecdfbb | 16526 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 16527 | ac_cs_usage="\ |
81ecdfbb RW |
16528 | \`$as_me' instantiates files and other configuration actions |
16529 | from templates according to the current configuration. Unless the files | |
16530 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 16531 | |
81ecdfbb | 16532 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 16533 | |
bec39cab | 16534 | -h, --help print this help, then exit |
81ecdfbb RW |
16535 | -V, --version print version number and configuration settings, then exit |
16536 | -q, --quiet, --silent | |
16537 | do not print progress messages | |
bec39cab AC |
16538 | -d, --debug don't remove temporary files |
16539 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
16540 | --file=FILE[:TEMPLATE] |
16541 | instantiate the configuration file FILE | |
16542 | --header=FILE[:TEMPLATE] | |
16543 | instantiate the configuration header FILE | |
234b45d4 | 16544 | |
bec39cab AC |
16545 | Configuration files: |
16546 | $config_files | |
234b45d4 | 16547 | |
bec39cab AC |
16548 | Configuration headers: |
16549 | $config_headers | |
234b45d4 | 16550 | |
bec39cab AC |
16551 | Configuration links: |
16552 | $config_links | |
234b45d4 | 16553 | |
bec39cab AC |
16554 | Configuration commands: |
16555 | $config_commands | |
16556 | ||
81ecdfbb | 16557 | Report bugs to the package provider." |
b4e70030 | 16558 | |
81ecdfbb RW |
16559 | _ACEOF |
16560 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
16561 | ac_cs_version="\\ |
16562 | config.status | |
81ecdfbb RW |
16563 | configured by $0, generated by GNU Autoconf 2.64, |
16564 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 16565 | |
81ecdfbb | 16566 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
16567 | This config.status script is free software; the Free Software Foundation |
16568 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
16569 | |
16570 | ac_pwd='$ac_pwd' | |
16571 | srcdir='$srcdir' | |
16572 | INSTALL='$INSTALL' | |
16573 | MKDIR_P='$MKDIR_P' | |
16574 | AWK='$AWK' | |
16575 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
16576 | _ACEOF |
16577 | ||
81ecdfbb RW |
16578 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16579 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
16580 | ac_need_defaults=: |
16581 | while test $# != 0 | |
16582 | do | |
16583 | case $1 in | |
16584 | --*=*) | |
81ecdfbb RW |
16585 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
16586 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 16587 | ac_shift=: |
c906108c | 16588 | ;; |
81ecdfbb | 16589 | *) |
bec39cab AC |
16590 | ac_option=$1 |
16591 | ac_optarg=$2 | |
16592 | ac_shift=shift | |
c906108c | 16593 | ;; |
bec39cab | 16594 | esac |
c906108c | 16595 | |
bec39cab AC |
16596 | case $ac_option in |
16597 | # Handling of the options. | |
bec39cab AC |
16598 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
16599 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
16600 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
16601 | $as_echo "$ac_cs_version"; exit ;; | |
16602 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
16603 | debug=: ;; |
16604 | --file | --fil | --fi | --f ) | |
16605 | $ac_shift | |
81ecdfbb RW |
16606 | case $ac_optarg in |
16607 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16608 | esac | |
16609 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
16610 | ac_need_defaults=false;; |
16611 | --header | --heade | --head | --hea ) | |
16612 | $ac_shift | |
81ecdfbb RW |
16613 | case $ac_optarg in |
16614 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16615 | esac | |
16616 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 16617 | ac_need_defaults=false;; |
81ecdfbb RW |
16618 | --he | --h) |
16619 | # Conflict between --help and --header | |
16620 | as_fn_error "ambiguous option: \`$1' | |
16621 | Try \`$0 --help' for more information.";; | |
16622 | --help | --hel | -h ) | |
16623 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
16624 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
16625 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16626 | ac_cs_silent=: ;; | |
c906108c | 16627 | |
bec39cab | 16628 | # This is an error. |
81ecdfbb RW |
16629 | -*) as_fn_error "unrecognized option: \`$1' |
16630 | Try \`$0 --help' for more information." ;; | |
c906108c | 16631 | |
81ecdfbb RW |
16632 | *) as_fn_append ac_config_targets " $1" |
16633 | ac_need_defaults=false ;; | |
c906108c | 16634 | |
bec39cab AC |
16635 | esac |
16636 | shift | |
16637 | done | |
c906108c | 16638 | |
bec39cab | 16639 | ac_configure_extra_args= |
c906108c | 16640 | |
bec39cab AC |
16641 | if $ac_cs_silent; then |
16642 | exec 6>/dev/null | |
16643 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
16644 | fi | |
c906108c | 16645 | |
bec39cab | 16646 | _ACEOF |
81ecdfbb | 16647 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 16648 | if \$ac_cs_recheck; then |
81ecdfbb RW |
16649 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
16650 | shift | |
16651 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
16652 | CONFIG_SHELL='$SHELL' | |
16653 | export CONFIG_SHELL | |
16654 | exec "\$@" | |
bec39cab AC |
16655 | fi |
16656 | ||
16657 | _ACEOF | |
81ecdfbb RW |
16658 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16659 | exec 5>>config.log | |
16660 | { | |
16661 | echo | |
16662 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16663 | ## Running $as_me. ## | |
16664 | _ASBOX | |
16665 | $as_echo "$ac_log" | |
16666 | } >&5 | |
bec39cab | 16667 | |
81ecdfbb RW |
16668 | _ACEOF |
16669 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 16670 | # |
81ecdfbb | 16671 | # INIT-COMMANDS |
c906108c | 16672 | # |
a417dc56 | 16673 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
e28b3332 | 16674 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
b4e70030 | 16675 | |
bec39cab AC |
16676 | _ACEOF |
16677 | ||
81ecdfbb | 16678 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 16679 | |
81ecdfbb | 16680 | # Handling of arguments. |
bec39cab | 16681 | for ac_config_target in $ac_config_targets |
c906108c | 16682 | do |
81ecdfbb RW |
16683 | case $ac_config_target in |
16684 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
16685 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
16686 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
16687 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; | |
16688 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
16689 | ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;; | |
5ae98d25 | 16690 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
81ecdfbb | 16691 | "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; |
aa2e2d8d | 16692 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
16693 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
16694 | ||
16695 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
16696 | esac |
16697 | done | |
16698 | ||
81ecdfbb | 16699 | |
bec39cab AC |
16700 | # If the user did not use the arguments to specify the items to instantiate, |
16701 | # then the envvar interface is used. Set only those that are not. | |
16702 | # We use the long form for the default assignment because of an extremely | |
16703 | # bizarre bug on SunOS 4.1.3. | |
16704 | if $ac_need_defaults; then | |
16705 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16706 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16707 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
16708 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16709 | fi | |
16710 | ||
b4e70030 | 16711 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 16712 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 16713 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
16714 | # Hook for its removal unless debugging. |
16715 | # Note that there is a small window in which the directory will not be cleaned: | |
16716 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
16717 | $debug || |
16718 | { | |
81ecdfbb RW |
16719 | tmp= |
16720 | trap 'exit_status=$? | |
16721 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
16722 | ' 0 | |
16723 | trap 'as_fn_exit 1' 1 2 13 15 | |
16724 | } | |
16725 | # Create a (secure) tmp directory for tmp files. | |
16726 | ||
16727 | { | |
16728 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
16729 | test -n "$tmp" && test -d "$tmp" | |
16730 | } || | |
16731 | { | |
16732 | tmp=./conf$$-$RANDOM | |
16733 | (umask 077 && mkdir "$tmp") | |
16734 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
16735 | ||
16736 | # Set up the scripts for CONFIG_FILES section. | |
16737 | # No need to generate them if there are no CONFIG_FILES. | |
16738 | # This happens for instance with `./config.status config.h'. | |
16739 | if test -n "$CONFIG_FILES"; then | |
16740 | ||
16741 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
16742 | ac_cs_awk_getline=: | |
16743 | ac_cs_awk_pipe_init= | |
16744 | ac_cs_awk_read_file=' | |
16745 | while ((getline aline < (F[key])) > 0) | |
16746 | print(aline) | |
16747 | close(F[key])' | |
16748 | ac_cs_awk_pipe_fini= | |
16749 | else | |
16750 | ac_cs_awk_getline=false | |
16751 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
16752 | ac_cs_awk_read_file=' | |
16753 | print "|#_!!_#|" | |
16754 | print "cat " F[key] " &&" | |
16755 | '$ac_cs_awk_pipe_init | |
16756 | # The final `:' finishes the AND list. | |
16757 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
16758 | fi | |
16759 | ac_cr=`echo X | tr X '\015'` | |
16760 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
16761 | # But we know of no other shell where ac_cr would be empty at this | |
16762 | # point, so we can use a bashism as a fallback. | |
16763 | if test "x$ac_cr" = x; then | |
16764 | eval ac_cr=\$\'\\r\' | |
16765 | fi | |
16766 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
16767 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
16768 | ac_cs_awk_cr='\r' | |
16769 | else | |
16770 | ac_cs_awk_cr=$ac_cr | |
16771 | fi | |
16772 | ||
16773 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
16774 | _ACEOF | |
16775 | ||
16776 | # Create commands to substitute file output variables. | |
16777 | { | |
16778 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
16779 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
16780 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
16781 | echo "_ACAWK" && | |
16782 | echo "_ACEOF" | |
16783 | } >conf$$files.sh && | |
16784 | . ./conf$$files.sh || | |
16785 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16786 | rm -f conf$$files.sh | |
16787 | ||
16788 | { | |
16789 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
16790 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
16791 | echo "_ACEOF" | |
16792 | } >conf$$subs.sh || | |
16793 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16794 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
16795 | ac_delim='%!_!# ' | |
16796 | for ac_last_try in false false false false false :; do | |
16797 | . ./conf$$subs.sh || | |
16798 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16799 | ||
16800 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
16801 | if test $ac_delim_n = $ac_delim_num; then | |
16802 | break | |
16803 | elif $ac_last_try; then | |
16804 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
16805 | else | |
16806 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16807 | fi | |
16808 | done | |
16809 | rm -f conf$$subs.sh | |
16810 | ||
16811 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16812 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
16813 | _ACEOF | |
16814 | sed -n ' | |
16815 | h | |
16816 | s/^/S["/; s/!.*/"]=/ | |
16817 | p | |
16818 | g | |
16819 | s/^[^!]*!// | |
16820 | :repl | |
16821 | t repl | |
16822 | s/'"$ac_delim"'$// | |
16823 | t delim | |
16824 | :nl | |
16825 | h | |
16826 | s/\(.\{148\}\).*/\1/ | |
16827 | t more1 | |
16828 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
16829 | p | |
16830 | n | |
16831 | b repl | |
16832 | :more1 | |
16833 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16834 | p | |
16835 | g | |
16836 | s/.\{148\}// | |
16837 | t nl | |
16838 | :delim | |
16839 | h | |
16840 | s/\(.\{148\}\).*/\1/ | |
16841 | t more2 | |
16842 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
16843 | p | |
16844 | b | |
16845 | :more2 | |
16846 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16847 | p | |
16848 | g | |
16849 | s/.\{148\}// | |
16850 | t delim | |
16851 | ' <conf$$subs.awk | sed ' | |
16852 | /^[^""]/{ | |
16853 | N | |
16854 | s/\n// | |
16855 | } | |
16856 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
16857 | rm -f conf$$subs.awk | |
16858 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16859 | _ACAWK | |
16860 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
16861 | for (key in S) S_is_set[key] = 1 | |
16862 | FS = "\a" | |
16863 | \$ac_cs_awk_pipe_init | |
16864 | } | |
16865 | { | |
16866 | line = $ 0 | |
16867 | nfields = split(line, field, "@") | |
16868 | substed = 0 | |
16869 | len = length(field[1]) | |
16870 | for (i = 2; i < nfields; i++) { | |
16871 | key = field[i] | |
16872 | keylen = length(key) | |
16873 | if (S_is_set[key]) { | |
16874 | value = S[key] | |
16875 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
16876 | len += length(value) + length(field[++i]) | |
16877 | substed = 1 | |
16878 | } else | |
16879 | len += 1 + keylen | |
16880 | } | |
16881 | if (nfields == 3 && !substed) { | |
16882 | key = field[2] | |
16883 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
16884 | \$ac_cs_awk_read_file | |
16885 | next | |
16886 | } | |
16887 | } | |
16888 | print line | |
b4e70030 | 16889 | } |
81ecdfbb RW |
16890 | \$ac_cs_awk_pipe_fini |
16891 | _ACAWK | |
16892 | _ACEOF | |
16893 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16894 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
16895 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
16896 | else | |
16897 | cat | |
16898 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
16899 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
16900 | _ACEOF | |
16901 | ||
16902 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
16903 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16904 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16905 | # (actually we leave an empty line to preserve line numbers). | |
16906 | if test "x$srcdir" = x.; then | |
16907 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
16908 | s/:*\$(srcdir):*/:/ | |
16909 | s/:*\${srcdir}:*/:/ | |
16910 | s/:*@srcdir@:*/:/ | |
16911 | s/^\([^=]*=[ ]*\):*/\1/ | |
16912 | s/:*$// | |
16913 | s/^[^=]*=[ ]*$// | |
16914 | }' | |
16915 | fi | |
16916 | ||
16917 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16918 | fi # test -n "$CONFIG_FILES" | |
16919 | ||
16920 | # Set up the scripts for CONFIG_HEADERS section. | |
16921 | # No need to generate them if there are no CONFIG_HEADERS. | |
16922 | # This happens for instance with `./config.status Makefile'. | |
16923 | if test -n "$CONFIG_HEADERS"; then | |
16924 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
16925 | BEGIN { | |
16926 | _ACEOF | |
16927 | ||
16928 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
16929 | # here-document in config.status, that substitutes the proper values into | |
16930 | # config.h.in to produce config.h. | |
4e8d927d | 16931 | |
81ecdfbb RW |
16932 | # Create a delimiter string that does not exist in confdefs.h, to ease |
16933 | # handling of long lines. | |
16934 | ac_delim='%!_!# ' | |
16935 | for ac_last_try in false false :; do | |
16936 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
16937 | if test -z "$ac_t"; then | |
16938 | break | |
16939 | elif $ac_last_try; then | |
16940 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
16941 | else | |
16942 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16943 | fi | |
16944 | done | |
4e8d927d | 16945 | |
81ecdfbb RW |
16946 | # For the awk script, D is an array of macro values keyed by name, |
16947 | # likewise P contains macro parameters if any. Preserve backslash | |
16948 | # newline sequences. | |
16949 | ||
16950 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
16951 | sed -n ' | |
16952 | s/.\{148\}/&'"$ac_delim"'/g | |
16953 | t rset | |
16954 | :rset | |
16955 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
16956 | t def | |
16957 | d | |
16958 | :def | |
16959 | s/\\$// | |
16960 | t bsnl | |
16961 | s/["\\]/\\&/g | |
16962 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16963 | D["\1"]=" \3"/p | |
16964 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
16965 | d | |
16966 | :bsnl | |
16967 | s/["\\]/\\&/g | |
16968 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16969 | D["\1"]=" \3\\\\\\n"\\/p | |
16970 | t cont | |
16971 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
16972 | t cont | |
16973 | d | |
16974 | :cont | |
16975 | n | |
16976 | s/.\{148\}/&'"$ac_delim"'/g | |
16977 | t clear | |
16978 | :clear | |
16979 | s/\\$// | |
16980 | t bsnlc | |
16981 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
16982 | d | |
16983 | :bsnlc | |
16984 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
16985 | b cont | |
16986 | ' <confdefs.h | sed ' | |
16987 | s/'"$ac_delim"'/"\\\ | |
16988 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
16989 | ||
16990 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16991 | for (key in D) D_is_set[key] = 1 | |
16992 | FS = "\a" | |
16993 | } | |
16994 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
16995 | line = \$ 0 | |
16996 | split(line, arg, " ") | |
16997 | if (arg[1] == "#") { | |
16998 | defundef = arg[2] | |
16999 | mac1 = arg[3] | |
17000 | } else { | |
17001 | defundef = substr(arg[1], 2) | |
17002 | mac1 = arg[2] | |
17003 | } | |
17004 | split(mac1, mac2, "(") #) | |
17005 | macro = mac2[1] | |
17006 | prefix = substr(line, 1, index(line, defundef) - 1) | |
17007 | if (D_is_set[macro]) { | |
17008 | # Preserve the white space surrounding the "#". | |
17009 | print prefix "define", macro P[macro] D[macro] | |
17010 | next | |
17011 | } else { | |
17012 | # Replace #undef with comments. This is necessary, for example, | |
17013 | # in the case of _POSIX_SOURCE, which is predefined and required | |
17014 | # on some systems where configure will not decide to define it. | |
17015 | if (defundef == "undef") { | |
17016 | print "/*", prefix defundef, macro, "*/" | |
17017 | next | |
17018 | } | |
17019 | } | |
b4e70030 | 17020 | } |
81ecdfbb RW |
17021 | { print } |
17022 | _ACAWK | |
b4e70030 | 17023 | _ACEOF |
81ecdfbb RW |
17024 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17025 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
17026 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 17027 | |
4e8d927d | 17028 | |
81ecdfbb RW |
17029 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
17030 | shift | |
17031 | for ac_tag | |
17032 | do | |
17033 | case $ac_tag in | |
17034 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
17035 | esac | |
17036 | case $ac_mode$ac_tag in | |
17037 | :[FHL]*:*);; | |
17038 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
17039 | :[FH]-) ac_tag=-:-;; | |
17040 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
17041 | esac | |
17042 | ac_save_IFS=$IFS | |
17043 | IFS=: | |
17044 | set x $ac_tag | |
17045 | IFS=$ac_save_IFS | |
17046 | shift | |
17047 | ac_file=$1 | |
17048 | shift | |
4e8d927d | 17049 | |
81ecdfbb RW |
17050 | case $ac_mode in |
17051 | :L) ac_source=$1;; | |
17052 | :[FH]) | |
17053 | ac_file_inputs= | |
17054 | for ac_f | |
17055 | do | |
17056 | case $ac_f in | |
17057 | -) ac_f="$tmp/stdin";; | |
17058 | *) # Look for the file first in the build tree, then in the source tree | |
17059 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
17060 | # because $ac_f cannot contain `:'. | |
17061 | test -f "$ac_f" || | |
17062 | case $ac_f in | |
17063 | [\\/$]*) false;; | |
17064 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
17065 | esac || | |
17066 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
17067 | esac | |
17068 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
17069 | as_fn_append ac_file_inputs " '$ac_f'" | |
17070 | done | |
17071 | ||
17072 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17073 | # use $as_me), people would be surprised to read: | |
17074 | # /* config.h. Generated by config.status. */ | |
17075 | configure_input='Generated from '` | |
17076 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
17077 | `' by configure.' | |
17078 | if test x"$ac_file" != x-; then | |
17079 | configure_input="$ac_file. $configure_input" | |
17080 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
17081 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 17082 | fi |
81ecdfbb RW |
17083 | # Neutralize special characters interpreted by sed in replacement strings. |
17084 | case $configure_input in #( | |
17085 | *\&* | *\|* | *\\* ) | |
17086 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
17087 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
17088 | *) ac_sed_conf_input=$configure_input;; | |
17089 | esac | |
4e8d927d | 17090 | |
81ecdfbb RW |
17091 | case $ac_tag in |
17092 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
17093 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
17094 | esac | |
17095 | ;; | |
c906108c SS |
17096 | esac |
17097 | ||
81ecdfbb | 17098 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
17099 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17100 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
17101 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17102 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
17103 | $as_echo X"$ac_file" | | |
17104 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17105 | s//\1/ | |
17106 | q | |
17107 | } | |
17108 | /^X\(\/\/\)[^/].*/{ | |
17109 | s//\1/ | |
17110 | q | |
17111 | } | |
17112 | /^X\(\/\/\)$/{ | |
17113 | s//\1/ | |
17114 | q | |
17115 | } | |
17116 | /^X\(\/\).*/{ | |
17117 | s//\1/ | |
17118 | q | |
17119 | } | |
17120 | s/.*/./; q'` | |
17121 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17122 | ac_builddir=. |
17123 | ||
81ecdfbb RW |
17124 | case "$ac_dir" in |
17125 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17126 | *) | |
17127 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17128 | # A ".." for each directory in $ac_dir_suffix. | |
17129 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17130 | case $ac_top_builddir_sub in | |
17131 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17132 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17133 | esac ;; | |
17134 | esac | |
17135 | ac_abs_top_builddir=$ac_pwd | |
17136 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17137 | # for backward compatibility: | |
17138 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17139 | |
17140 | case $srcdir in | |
81ecdfbb | 17141 | .) # We are building in place. |
bec39cab | 17142 | ac_srcdir=. |
81ecdfbb RW |
17143 | ac_top_srcdir=$ac_top_builddir_sub |
17144 | ac_abs_top_srcdir=$ac_pwd ;; | |
17145 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17146 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17147 | ac_top_srcdir=$srcdir |
17148 | ac_abs_top_srcdir=$srcdir ;; | |
17149 | *) # Relative name. | |
17150 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17151 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17152 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17153 | esac |
81ecdfbb | 17154 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 17155 | |
c906108c | 17156 | |
81ecdfbb RW |
17157 | case $ac_mode in |
17158 | :F) | |
17159 | # | |
17160 | # CONFIG_FILE | |
17161 | # | |
c906108c | 17162 | |
bec39cab AC |
17163 | case $INSTALL in |
17164 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 17165 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 17166 | esac |
81ecdfbb RW |
17167 | ac_MKDIR_P=$MKDIR_P |
17168 | case $MKDIR_P in | |
17169 | [\\/$]* | ?:[\\/]* ) ;; | |
17170 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
17171 | esac | |
17172 | _ACEOF | |
121ce6e5 | 17173 | |
81ecdfbb RW |
17174 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
17175 | # If the template does not know about datarootdir, expand it. | |
17176 | # FIXME: This hack should be removed a few years after 2.60. | |
17177 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
17178 | ac_sed_dataroot=' | |
17179 | /datarootdir/ { | |
17180 | p | |
17181 | q | |
17182 | } | |
17183 | /@datadir@/p | |
17184 | /@docdir@/p | |
17185 | /@infodir@/p | |
17186 | /@localedir@/p | |
17187 | /@mandir@/p' | |
17188 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
17189 | *datarootdir*) ac_datarootdir_seen=yes;; | |
17190 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
17191 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
17192 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
17193 | _ACEOF | |
17194 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17195 | ac_datarootdir_hack=' | |
17196 | s&@datadir@&$datadir&g | |
17197 | s&@docdir@&$docdir&g | |
17198 | s&@infodir@&$infodir&g | |
17199 | s&@localedir@&$localedir&g | |
17200 | s&@mandir@&$mandir&g | |
17201 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
17202 | esac | |
4e8d927d | 17203 | _ACEOF |
81ecdfbb RW |
17204 | |
17205 | # Neutralize VPATH when `$srcdir' = `.'. | |
17206 | # Shell code in configure.ac might set extrasub. | |
17207 | # FIXME: do we really want to maintain this feature? | |
17208 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17209 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
17210 | $extrasub |
17211 | _ACEOF | |
81ecdfbb | 17212 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
17213 | :t |
17214 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
17215 | s|@configure_input@|$ac_sed_conf_input|;t t |
17216 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
17217 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
17218 | s&@srcdir@&$ac_srcdir&;t t | |
17219 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
17220 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
17221 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
17222 | s&@builddir@&$ac_builddir&;t t | |
17223 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
17224 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
17225 | s&@INSTALL@&$ac_INSTALL&;t t | |
17226 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
17227 | $ac_datarootdir_hack | |
17228 | " | |
17229 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
17230 | if $ac_cs_awk_getline; then | |
17231 | $AWK -f "$tmp/subs.awk" | |
17232 | else | |
17233 | $AWK -f "$tmp/subs.awk" | $SHELL | |
17234 | fi >$tmp/out \ | |
17235 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17236 | ||
17237 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
17238 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
17239 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
17240 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17241 | which seems to be undefined. Please make sure it is defined." >&5 | |
17242 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17243 | which seems to be undefined. Please make sure it is defined." >&2;} | |
17244 | ||
17245 | rm -f "$tmp/stdin" | |
bec39cab | 17246 | case $ac_file in |
81ecdfbb RW |
17247 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
17248 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
17249 | esac \ | |
17250 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17251 | ;; | |
17252 | :H) | |
17253 | # | |
17254 | # CONFIG_HEADER | |
17255 | # | |
bec39cab | 17256 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
17257 | { |
17258 | $as_echo "/* $configure_input */" \ | |
17259 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
17260 | } >"$tmp/config.h" \ | |
17261 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
17262 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
17263 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
17264 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 17265 | else |
81ecdfbb RW |
17266 | rm -f "$ac_file" |
17267 | mv "$tmp/config.h" "$ac_file" \ | |
17268 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
17269 | fi |
17270 | else | |
81ecdfbb RW |
17271 | $as_echo "/* $configure_input */" \ |
17272 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
17273 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 17274 | fi |
81ecdfbb RW |
17275 | # Compute "$ac_file"'s index in $config_headers. |
17276 | _am_arg="$ac_file" | |
e28b3332 DJ |
17277 | _am_stamp_count=1 |
17278 | for _am_header in $config_headers :; do | |
17279 | case $_am_header in | |
81ecdfbb | 17280 | $_am_arg | $_am_arg:* ) |
e28b3332 DJ |
17281 | break ;; |
17282 | * ) | |
17283 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
17284 | esac | |
17285 | done | |
81ecdfbb RW |
17286 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || |
17287 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17288 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
17289 | X"$_am_arg" : 'X\(//\)$' \| \ | |
17290 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
17291 | $as_echo X"$_am_arg" | | |
17292 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17293 | s//\1/ | |
17294 | q | |
17295 | } | |
17296 | /^X\(\/\/\)[^/].*/{ | |
17297 | s//\1/ | |
17298 | q | |
17299 | } | |
17300 | /^X\(\/\/\)$/{ | |
17301 | s//\1/ | |
17302 | q | |
17303 | } | |
17304 | /^X\(\/\).*/{ | |
17305 | s//\1/ | |
17306 | q | |
17307 | } | |
17308 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
17309 | ;; | |
17310 | :L) | |
17311 | # | |
17312 | # CONFIG_LINK | |
17313 | # | |
c906108c | 17314 | |
81ecdfbb RW |
17315 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
17316 | : | |
b4e70030 | 17317 | else |
81ecdfbb RW |
17318 | # Prefer the file from the source tree if names are identical. |
17319 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
17320 | ac_source=$srcdir/$ac_source | |
17321 | fi | |
b4e70030 | 17322 | |
81ecdfbb RW |
17323 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
17324 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 17325 | |
81ecdfbb RW |
17326 | if test ! -r "$ac_source"; then |
17327 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
17328 | fi | |
17329 | rm -f "$ac_file" | |
bec39cab | 17330 | |
81ecdfbb RW |
17331 | # Try a relative symlink, then a hard link, then a copy. |
17332 | case $srcdir in | |
17333 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
17334 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
17335 | esac | |
17336 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
17337 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
17338 | cp -p "$ac_source" "$ac_file" || | |
17339 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
17340 | fi | |
17341 | ;; | |
17342 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
17343 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
17344 | ;; | |
c906108c | 17345 | esac |
b4e70030 | 17346 | |
bec39cab | 17347 | |
81ecdfbb RW |
17348 | case $ac_file$ac_mode in |
17349 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
17350 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
17351 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
17352 | # are listed without --file. Let's play safe and only enable the eval | |
17353 | # if we detect the quoting. | |
17354 | case $CONFIG_FILES in | |
17355 | *\'*) eval set x "$CONFIG_FILES" ;; | |
17356 | *) set x $CONFIG_FILES ;; | |
17357 | esac | |
17358 | shift | |
17359 | for mf | |
17360 | do | |
17361 | # Strip MF so we end up with the name of the file. | |
17362 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
17363 | # Check whether this is an Automake generated Makefile or not. | |
17364 | # We used to match only the files named `Makefile.in', but | |
17365 | # some people rename them; so instead we look at the file content. | |
17366 | # Grep'ing the first line is not enough: some people post-process | |
17367 | # each Makefile.in and add a new line on top of each file to say so. | |
17368 | # Grep'ing the whole file is not good either: AIX grep has a line | |
17369 | # limit of 2048, but all sed's we know have understand at least 4000. | |
17370 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
17371 | dirpart=`$as_dirname -- "$mf" || | |
e28b3332 DJ |
17372 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17373 | X"$mf" : 'X\(//\)[^/]' \| \ | |
17374 | X"$mf" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17375 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || |
17376 | $as_echo X"$mf" | | |
17377 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17378 | s//\1/ | |
17379 | q | |
17380 | } | |
17381 | /^X\(\/\/\)[^/].*/{ | |
17382 | s//\1/ | |
17383 | q | |
17384 | } | |
17385 | /^X\(\/\/\)$/{ | |
17386 | s//\1/ | |
17387 | q | |
17388 | } | |
17389 | /^X\(\/\).*/{ | |
17390 | s//\1/ | |
17391 | q | |
17392 | } | |
17393 | s/.*/./; q'` | |
17394 | else | |
17395 | continue | |
17396 | fi | |
17397 | # Extract the definition of DEPDIR, am__include, and am__quote | |
17398 | # from the Makefile without running `make'. | |
17399 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
17400 | test -z "$DEPDIR" && continue | |
17401 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
17402 | test -z "am__include" && continue | |
17403 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
17404 | # When using ansi2knr, U may be empty or an underscore; expand it | |
17405 | U=`sed -n 's/^U = //p' < "$mf"` | |
17406 | # Find all dependency output files, they are included files with | |
17407 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
17408 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
17409 | # expansion. | |
17410 | for file in `sed -n " | |
17411 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
17412 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
17413 | # Make sure the directory exists. | |
17414 | test -f "$dirpart/$file" && continue | |
17415 | fdir=`$as_dirname -- "$file" || | |
e28b3332 DJ |
17416 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
17417 | X"$file" : 'X\(//\)[^/]' \| \ | |
17418 | X"$file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
17419 | X"$file" : 'X\(/\)' \| . 2>/dev/null || |
17420 | $as_echo X"$file" | | |
17421 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17422 | s//\1/ | |
17423 | q | |
17424 | } | |
17425 | /^X\(\/\/\)[^/].*/{ | |
17426 | s//\1/ | |
17427 | q | |
17428 | } | |
17429 | /^X\(\/\/\)$/{ | |
17430 | s//\1/ | |
17431 | q | |
17432 | } | |
17433 | /^X\(\/\).*/{ | |
17434 | s//\1/ | |
17435 | q | |
17436 | } | |
17437 | s/.*/./; q'` | |
17438 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
17439 | # echo "creating $dirpart/$file" | |
17440 | echo '# dummy' > "$dirpart/$file" | |
e28b3332 | 17441 | done |
e28b3332 | 17442 | done |
81ecdfbb | 17443 | } |
4e8d927d | 17444 | ;; |
81ecdfbb | 17445 | "default":C) |
c906108c SS |
17446 | case x$CONFIG_HEADERS in |
17447 | xconfig.h:config.in) | |
17448 | echo > stamp-h ;; | |
17449 | esac | |
bec39cab | 17450 | ;; |
81ecdfbb | 17451 | |
bec39cab | 17452 | esac |
81ecdfbb | 17453 | done # for ac_tag |
c906108c | 17454 | |
bec39cab | 17455 | |
81ecdfbb | 17456 | as_fn_exit 0 |
bec39cab | 17457 | _ACEOF |
bec39cab AC |
17458 | ac_clean_files=$ac_clean_files_save |
17459 | ||
81ecdfbb RW |
17460 | test $ac_write_fail = 0 || |
17461 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
17462 | ||
bec39cab AC |
17463 | |
17464 | # configure is writing to config.log, and then calls config.status. | |
17465 | # config.status does its own redirection, appending to config.log. | |
17466 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17467 | # by configure, so config.status won't be able to write to it; its | |
17468 | # output is simply discarded. So we exec the FD to /dev/null, | |
17469 | # effectively closing config.log, so it can be properly (re)opened and | |
17470 | # appended to by config.status. When coming back to configure, we | |
17471 | # need to make the FD available again. | |
17472 | if test "$no_create" != yes; then | |
17473 | ac_cs_success=: | |
17474 | ac_config_status_args= | |
17475 | test "$silent" = yes && | |
17476 | ac_config_status_args="$ac_config_status_args --quiet" | |
17477 | exec 5>/dev/null | |
17478 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17479 | exec 5>>config.log | |
17480 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17481 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 17482 | $ac_cs_success || as_fn_exit $? |
bec39cab | 17483 | fi |
c906108c | 17484 | |
bec39cab | 17485 | # |
81ecdfbb | 17486 | # CONFIG_SUBDIRS section. |
bec39cab | 17487 | # |
c906108c SS |
17488 | if test "$no_recursion" != yes; then |
17489 | ||
81ecdfbb RW |
17490 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
17491 | # so they do not pile up. | |
c906108c SS |
17492 | ac_sub_configure_args= |
17493 | ac_prev= | |
fdc59709 PB |
17494 | eval "set x $ac_configure_args" |
17495 | shift | |
17496 | for ac_arg | |
17497 | do | |
c906108c SS |
17498 | if test -n "$ac_prev"; then |
17499 | ac_prev= | |
17500 | continue | |
17501 | fi | |
bec39cab | 17502 | case $ac_arg in |
c906108c SS |
17503 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
17504 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
17505 | ac_prev=cache_file ;; | |
17506 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
17507 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
17508 | | --c=*) | |
17509 | ;; | |
17510 | --config-cache | -C) | |
c906108c SS |
17511 | ;; |
17512 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
17513 | ac_prev=srcdir ;; | |
17514 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
17515 | ;; | |
bec39cab AC |
17516 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
17517 | ac_prev=prefix ;; | |
17518 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
17519 | ;; | |
81ecdfbb RW |
17520 | --disable-option-checking) |
17521 | ;; | |
fdc59709 PB |
17522 | *) |
17523 | case $ac_arg in | |
81ecdfbb | 17524 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17525 | esac |
81ecdfbb | 17526 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
17527 | esac |
17528 | done | |
17529 | ||
bec39cab AC |
17530 | # Always prepend --prefix to ensure using the same prefix |
17531 | # in subdir configurations. | |
fdc59709 PB |
17532 | ac_arg="--prefix=$prefix" |
17533 | case $ac_arg in | |
81ecdfbb | 17534 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 17535 | esac |
81ecdfbb RW |
17536 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
17537 | ||
17538 | # Pass --silent | |
17539 | if test "$silent" = yes; then | |
17540 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
17541 | fi | |
17542 | ||
17543 | # Always prepend --disable-option-checking to silence warnings, since | |
17544 | # different subdirs can have different --enable and --with options. | |
17545 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 17546 | |
b4e70030 | 17547 | ac_popdir=`pwd` |
bec39cab | 17548 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
17549 | |
17550 | # Do not complain, so a configure script can configure whichever | |
17551 | # parts of a large source tree are present. | |
fdc59709 | 17552 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 17553 | |
81ecdfbb RW |
17554 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
17555 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
17556 | $as_echo "$ac_msg" >&6 | |
17557 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
17558 | ac_builddir=. |
17559 | ||
81ecdfbb RW |
17560 | case "$ac_dir" in |
17561 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17562 | *) | |
17563 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
17564 | # A ".." for each directory in $ac_dir_suffix. | |
17565 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
17566 | case $ac_top_builddir_sub in | |
17567 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17568 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17569 | esac ;; | |
17570 | esac | |
17571 | ac_abs_top_builddir=$ac_pwd | |
17572 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17573 | # for backward compatibility: | |
17574 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
17575 | |
17576 | case $srcdir in | |
81ecdfbb | 17577 | .) # We are building in place. |
bec39cab | 17578 | ac_srcdir=. |
81ecdfbb RW |
17579 | ac_top_srcdir=$ac_top_builddir_sub |
17580 | ac_abs_top_srcdir=$ac_pwd ;; | |
17581 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 17582 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
17583 | ac_top_srcdir=$srcdir |
17584 | ac_abs_top_srcdir=$srcdir ;; | |
17585 | *) # Relative name. | |
17586 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17587 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17588 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 17589 | esac |
81ecdfbb | 17590 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 17591 | |
c906108c | 17592 | |
fdc59709 | 17593 | cd "$ac_dir" |
c906108c SS |
17594 | |
17595 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
17596 | if test -f "$ac_srcdir/configure.gnu"; then |
17597 | ac_sub_configure=$ac_srcdir/configure.gnu | |
17598 | elif test -f "$ac_srcdir/configure"; then | |
17599 | ac_sub_configure=$ac_srcdir/configure | |
17600 | elif test -f "$ac_srcdir/configure.in"; then | |
17601 | # This should be Cygnus configure. | |
17602 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 17603 | else |
81ecdfbb RW |
17604 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
17605 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
17606 | ac_sub_configure= |
17607 | fi | |
17608 | ||
17609 | # The recursion is here. | |
17610 | if test -n "$ac_sub_configure"; then | |
c906108c | 17611 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
17612 | case $cache_file in |
17613 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
17614 | *) # Relative name. |
17615 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 17616 | esac |
c906108c | 17617 | |
81ecdfbb RW |
17618 | { $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 |
17619 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 17620 | # The eval makes quoting arguments work. |
fdc59709 PB |
17621 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
17622 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 17623 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
17624 | fi |
17625 | ||
fdc59709 | 17626 | cd "$ac_popdir" |
c906108c SS |
17627 | done |
17628 | fi | |
81ecdfbb RW |
17629 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
17630 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
17631 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
17632 | fi | |
c906108c SS |
17633 | |
17634 | ||
17635 | exit 0 |