Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
d0ac1c44 SM |
3 | # Generated by GNU Autoconf 2.69. |
4 | # | |
5 | # | |
6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
81ecdfbb | 7 | # |
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. | |
d0ac1c44 | 90 | as_myself= |
81ecdfbb RW |
91 | case $0 in #(( |
92 | *[\\/]* ) as_myself=$0 ;; | |
93 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
94 | for as_dir in $PATH | |
95 | do | |
96 | IFS=$as_save_IFS | |
97 | test -z "$as_dir" && as_dir=. | |
98 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
99 | done | |
100 | IFS=$as_save_IFS | |
101 | ||
102 | ;; | |
103 | esac | |
104 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
105 | # in which case we are not to be found in the path. | |
106 | if test "x$as_myself" = x; then | |
107 | as_myself=$0 | |
108 | fi | |
109 | if test ! -f "$as_myself"; then | |
110 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
111 | exit 1 | |
112 | fi | |
113 | ||
114 | # Unset variables that we do not need and which cause bugs (e.g. in | |
115 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
116 | # suppresses any "Segmentation fault" message there. '((' could | |
117 | # trigger a bug in pdksh 5.2.14. | |
118 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
119 | do eval test x\${$as_var+set} = xset \ | |
120 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
121 | done | |
bec39cab AC |
122 | PS1='$ ' |
123 | PS2='> ' | |
124 | PS4='+ ' | |
125 | ||
126 | # NLS nuisances. | |
81ecdfbb RW |
127 | LC_ALL=C |
128 | export LC_ALL | |
129 | LANGUAGE=C | |
130 | export LANGUAGE | |
131 | ||
132 | # CDPATH. | |
133 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
134 | ||
d0ac1c44 SM |
135 | # Use a proper internal environment variable to ensure we don't fall |
136 | # into an infinite loop, continuously re-executing ourselves. | |
137 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
138 | _as_can_reexec=no; export _as_can_reexec; | |
139 | # We cannot yet assume a decent shell, so we have to provide a | |
140 | # neutralization value for shells without unset; and this also | |
141 | # works around shells that cannot unset nonexistent variables. | |
142 | # Preserve -v and -x to the replacement shell. | |
143 | BASH_ENV=/dev/null | |
144 | ENV=/dev/null | |
145 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
146 | case $- in # (((( | |
147 | *v*x* | *x*v* ) as_opts=-vx ;; | |
148 | *v* ) as_opts=-v ;; | |
149 | *x* ) as_opts=-x ;; | |
150 | * ) as_opts= ;; | |
151 | esac | |
152 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
153 | # Admittedly, this is quite paranoid, since all the known shells bail | |
154 | # out after a failed `exec'. | |
155 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
156 | as_fn_exit 255 | |
157 | fi | |
158 | # We don't want this to propagate to other subprocesses. | |
159 | { _as_can_reexec=; unset _as_can_reexec;} | |
81ecdfbb RW |
160 | if test "x$CONFIG_SHELL" = x; then |
161 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
162 | emulate sh | |
163 | NULLCMD=: | |
164 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
165 | # is contrary to our usage. Disable this feature. | |
166 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
167 | setopt NO_GLOB_SUBST | |
168 | else | |
169 | case \`(set -o) 2>/dev/null\` in #( | |
170 | *posix*) : | |
171 | set -o posix ;; #( | |
172 | *) : | |
173 | ;; | |
174 | esac | |
175 | fi | |
176 | " | |
177 | as_required="as_fn_return () { (exit \$1); } | |
178 | as_fn_success () { as_fn_return 0; } | |
179 | as_fn_failure () { as_fn_return 1; } | |
180 | as_fn_ret_success () { return 0; } | |
181 | as_fn_ret_failure () { return 1; } | |
182 | ||
183 | exitcode=0 | |
184 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
185 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
186 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
187 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
188 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
189 | ||
190 | else | |
191 | exitcode=1; echo positional parameters were not saved. | |
192 | fi | |
d0ac1c44 SM |
193 | test x\$exitcode = x0 || exit 1 |
194 | test -x / || exit 1" | |
81ecdfbb RW |
195 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO |
196 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
197 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
198 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
199 | test \$(( 1 + 1 )) = 2 || exit 1" | |
200 | if (eval "$as_required") 2>/dev/null; then : | |
201 | as_have_required=yes | |
202 | else | |
203 | as_have_required=no | |
204 | fi | |
205 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
206 | ||
207 | else | |
208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
209 | as_found=false | |
210 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 211 | do |
81ecdfbb RW |
212 | IFS=$as_save_IFS |
213 | test -z "$as_dir" && as_dir=. | |
214 | as_found=: | |
215 | case $as_dir in #( | |
216 | /*) | |
217 | for as_base in sh bash ksh sh5; do | |
218 | # Try only shells that exist, to save several forks. | |
219 | as_shell=$as_dir/$as_base | |
220 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
221 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
222 | CONFIG_SHELL=$as_shell as_have_required=yes | |
223 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
224 | break 2 | |
225 | fi | |
226 | fi | |
227 | done;; | |
228 | esac | |
229 | as_found=false | |
230 | done | |
231 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
232 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
233 | CONFIG_SHELL=$SHELL as_have_required=yes | |
234 | fi; } | |
235 | IFS=$as_save_IFS | |
236 | ||
237 | ||
238 | if test "x$CONFIG_SHELL" != x; then : | |
d0ac1c44 SM |
239 | export CONFIG_SHELL |
240 | # We cannot yet assume a decent shell, so we have to provide a | |
241 | # neutralization value for shells without unset; and this also | |
242 | # works around shells that cannot unset nonexistent variables. | |
243 | # Preserve -v and -x to the replacement shell. | |
244 | BASH_ENV=/dev/null | |
245 | ENV=/dev/null | |
246 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
247 | case $- in # (((( | |
248 | *v*x* | *x*v* ) as_opts=-vx ;; | |
249 | *v* ) as_opts=-v ;; | |
250 | *x* ) as_opts=-x ;; | |
251 | * ) as_opts= ;; | |
252 | esac | |
253 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
254 | # Admittedly, this is quite paranoid, since all the known shells bail | |
255 | # out after a failed `exec'. | |
256 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
257 | exit 255 | |
81ecdfbb RW |
258 | fi |
259 | ||
260 | if test x$as_have_required = xno; then : | |
261 | $as_echo "$0: This script requires a shell more modern than all" | |
262 | $as_echo "$0: the shells that I found on your system." | |
263 | if test x${ZSH_VERSION+set} = xset ; then | |
264 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
265 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 266 | else |
81ecdfbb RW |
267 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
268 | $0: including any error possibly output before this | |
269 | $0: message. Then install a modern shell, or manually run | |
270 | $0: the script under such a shell if you do have one." | |
bec39cab | 271 | fi |
81ecdfbb RW |
272 | exit 1 |
273 | fi | |
274 | fi | |
275 | fi | |
276 | SHELL=${CONFIG_SHELL-/bin/sh} | |
277 | export SHELL | |
278 | # Unset more variables known to interfere with behavior of common tools. | |
279 | CLICOLOR_FORCE= GREP_OPTIONS= | |
280 | unset CLICOLOR_FORCE GREP_OPTIONS | |
281 | ||
282 | ## --------------------- ## | |
283 | ## M4sh Shell Functions. ## | |
284 | ## --------------------- ## | |
285 | # as_fn_unset VAR | |
286 | # --------------- | |
287 | # Portably unset VAR. | |
288 | as_fn_unset () | |
289 | { | |
290 | { eval $1=; unset $1;} | |
291 | } | |
292 | as_unset=as_fn_unset | |
293 | ||
294 | # as_fn_set_status STATUS | |
295 | # ----------------------- | |
296 | # Set $? to STATUS, without forking. | |
297 | as_fn_set_status () | |
298 | { | |
299 | return $1 | |
300 | } # as_fn_set_status | |
bec39cab | 301 | |
81ecdfbb RW |
302 | # as_fn_exit STATUS |
303 | # ----------------- | |
304 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
305 | as_fn_exit () | |
306 | { | |
307 | set +e | |
308 | as_fn_set_status $1 | |
309 | exit $1 | |
310 | } # as_fn_exit | |
311 | ||
312 | # as_fn_mkdir_p | |
313 | # ------------- | |
314 | # Create "$as_dir" as a directory, including parents if necessary. | |
315 | as_fn_mkdir_p () | |
316 | { | |
317 | ||
318 | case $as_dir in #( | |
319 | -*) as_dir=./$as_dir;; | |
320 | esac | |
321 | test -d "$as_dir" || eval $as_mkdir_p || { | |
322 | as_dirs= | |
323 | while :; do | |
324 | case $as_dir in #( | |
325 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
326 | *) as_qdir=$as_dir;; | |
327 | esac | |
328 | as_dirs="'$as_qdir' $as_dirs" | |
329 | as_dir=`$as_dirname -- "$as_dir" || | |
330 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
331 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
332 | X"$as_dir" : 'X\(//\)$' \| \ | |
333 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
334 | $as_echo X"$as_dir" | | |
335 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
336 | s//\1/ | |
337 | q | |
338 | } | |
339 | /^X\(\/\/\)[^/].*/{ | |
340 | s//\1/ | |
341 | q | |
342 | } | |
343 | /^X\(\/\/\)$/{ | |
344 | s//\1/ | |
345 | q | |
346 | } | |
347 | /^X\(\/\).*/{ | |
348 | s//\1/ | |
349 | q | |
350 | } | |
351 | s/.*/./; q'` | |
352 | test -d "$as_dir" && break | |
353 | done | |
354 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 355 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb RW |
356 | |
357 | ||
358 | } # as_fn_mkdir_p | |
d0ac1c44 SM |
359 | |
360 | # as_fn_executable_p FILE | |
361 | # ----------------------- | |
362 | # Test if FILE is an executable regular file. | |
363 | as_fn_executable_p () | |
364 | { | |
365 | test -f "$1" && test -x "$1" | |
366 | } # as_fn_executable_p | |
81ecdfbb RW |
367 | # as_fn_append VAR VALUE |
368 | # ---------------------- | |
369 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
370 | # advantage of any shell optimizations that allow amortized linear growth over | |
371 | # repeated appends, instead of the typical quadratic growth present in naive | |
372 | # implementations. | |
373 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
374 | eval 'as_fn_append () | |
375 | { | |
376 | eval $1+=\$2 | |
377 | }' | |
378 | else | |
379 | as_fn_append () | |
380 | { | |
381 | eval $1=\$$1\$2 | |
382 | } | |
383 | fi # as_fn_append | |
384 | ||
385 | # as_fn_arith ARG... | |
386 | # ------------------ | |
387 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
388 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
389 | # must be portable across $(()) and expr. | |
390 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
391 | eval 'as_fn_arith () | |
392 | { | |
393 | as_val=$(( $* )) | |
394 | }' | |
395 | else | |
396 | as_fn_arith () | |
397 | { | |
398 | as_val=`expr "$@" || test $? -eq 1` | |
399 | } | |
400 | fi # as_fn_arith | |
401 | ||
402 | ||
d0ac1c44 SM |
403 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
404 | # ---------------------------------------- | |
81ecdfbb RW |
405 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
406 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 407 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
408 | as_fn_error () |
409 | { | |
d0ac1c44 SM |
410 | as_status=$1; test $as_status -eq 0 && as_status=1 |
411 | if test "$4"; then | |
412 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
413 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 414 | fi |
d0ac1c44 | 415 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
416 | as_fn_exit $as_status |
417 | } # as_fn_error | |
418 | ||
419 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
420 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
421 | as_expr=expr |
422 | else | |
423 | as_expr=false | |
424 | fi | |
425 | ||
81ecdfbb | 426 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
427 | as_basename=basename |
428 | else | |
429 | as_basename=false | |
430 | fi | |
431 | ||
81ecdfbb RW |
432 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
433 | as_dirname=dirname | |
434 | else | |
435 | as_dirname=false | |
436 | fi | |
bec39cab | 437 | |
81ecdfbb | 438 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
439 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
440 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
441 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
442 | $as_echo X/"$0" | | |
443 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
444 | s//\1/ | |
445 | q | |
446 | } | |
447 | /^X\/\(\/\/\)$/{ | |
448 | s//\1/ | |
449 | q | |
450 | } | |
451 | /^X\/\(\/\).*/{ | |
452 | s//\1/ | |
453 | q | |
454 | } | |
455 | s/.*/./; q'` | |
bec39cab | 456 | |
b4e70030 JB |
457 | # Avoid depending upon Character Ranges. |
458 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
459 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
460 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
461 | as_cr_digits='0123456789' | |
462 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 463 | |
bec39cab | 464 | |
81ecdfbb RW |
465 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
466 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
467 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
468 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
469 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
470 | sed -n ' | |
471 | p | |
472 | /[$]LINENO/= | |
473 | ' <$as_myself | | |
bec39cab | 474 | sed ' |
81ecdfbb RW |
475 | s/[$]LINENO.*/&-/ |
476 | t lineno | |
477 | b | |
478 | :lineno | |
bec39cab | 479 | N |
81ecdfbb RW |
480 | :loop |
481 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 482 | t loop |
81ecdfbb | 483 | s/-\n.*// |
bec39cab | 484 | ' >$as_me.lineno && |
81ecdfbb RW |
485 | chmod +x "$as_me.lineno" || |
486 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab | 487 | |
d0ac1c44 SM |
488 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have |
489 | # already done that, so ensure we don't try to do so again and fall | |
490 | # in an infinite loop. This has already happened in practice. | |
491 | _as_can_reexec=no; export _as_can_reexec | |
bec39cab AC |
492 | # Don't try to exec as it changes $[0], causing all sort of problems |
493 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
494 | # original and so on. Autoconf is especially sensitive to this). |
495 | . "./$as_me.lineno" | |
bec39cab AC |
496 | # Exit status is that of the last command. |
497 | exit | |
498 | } | |
499 | ||
81ecdfbb RW |
500 | ECHO_C= ECHO_N= ECHO_T= |
501 | case `echo -n x` in #((((( | |
502 | -n*) | |
503 | case `echo 'xy\c'` in | |
504 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
505 | xy) ECHO_C='\c';; | |
506 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
507 | ECHO_T=' ';; | |
508 | esac;; | |
509 | *) | |
510 | ECHO_N='-n';; | |
bec39cab AC |
511 | esac |
512 | ||
81ecdfbb RW |
513 | rm -f conf$$ conf$$.exe conf$$.file |
514 | if test -d conf$$.dir; then | |
515 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 516 | else |
81ecdfbb RW |
517 | rm -f conf$$.dir |
518 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 519 | fi |
81ecdfbb RW |
520 | if (echo >conf$$.file) 2>/dev/null; then |
521 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 522 | as_ln_s='ln -s' |
81ecdfbb RW |
523 | # ... but there are two gotchas: |
524 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
525 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 526 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 527 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 528 | as_ln_s='cp -pR' |
81ecdfbb RW |
529 | elif ln conf$$.file conf$$ 2>/dev/null; then |
530 | as_ln_s=ln | |
531 | else | |
d0ac1c44 | 532 | as_ln_s='cp -pR' |
b4e70030 | 533 | fi |
bec39cab | 534 | else |
d0ac1c44 | 535 | as_ln_s='cp -pR' |
bec39cab | 536 | fi |
81ecdfbb RW |
537 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
538 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
539 | |
540 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 541 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
542 | else |
543 | test -d ./-p && rmdir ./-p | |
544 | as_mkdir_p=false | |
545 | fi | |
546 | ||
d0ac1c44 SM |
547 | as_test_x='test -x' |
548 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
549 | |
550 | # Sed expression to map a string onto a valid CPP name. | |
551 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
552 | ||
553 | # Sed expression to map a string onto a valid variable name. | |
554 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
555 | ||
556 | ||
d0ac1c44 SM |
557 | test -n "$DJDIR" || exec 7<&0 </dev/null |
558 | exec 6>&1 | |
c906108c | 559 | |
bec39cab | 560 | # Name of the host. |
d0ac1c44 | 561 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
bec39cab AC |
562 | # so uname gets run too. |
563 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
564 | ||
bec39cab AC |
565 | # |
566 | # Initializations. | |
567 | # | |
c906108c | 568 | ac_default_prefix=/usr/local |
81ecdfbb | 569 | ac_clean_files= |
bec39cab | 570 | ac_config_libobj_dir=. |
81ecdfbb | 571 | LIBOBJS= |
bec39cab AC |
572 | cross_compiling=no |
573 | subdirs= | |
574 | MFLAGS= | |
575 | MAKEFLAGS= | |
b4e70030 | 576 | |
bec39cab AC |
577 | # Identity of this package. |
578 | PACKAGE_NAME= | |
579 | PACKAGE_TARNAME= | |
580 | PACKAGE_VERSION= | |
581 | PACKAGE_STRING= | |
582 | PACKAGE_BUGREPORT= | |
81ecdfbb | 583 | PACKAGE_URL= |
bec39cab AC |
584 | |
585 | ac_unique_file="main.c" | |
586 | # Factoring default headers for most tests. | |
587 | ac_includes_default="\ | |
588 | #include <stdio.h> | |
81ecdfbb | 589 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
590 | # include <sys/types.h> |
591 | #endif | |
81ecdfbb | 592 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
593 | # include <sys/stat.h> |
594 | #endif | |
81ecdfbb | 595 | #ifdef STDC_HEADERS |
bec39cab AC |
596 | # include <stdlib.h> |
597 | # include <stddef.h> | |
598 | #else | |
81ecdfbb | 599 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
600 | # include <stdlib.h> |
601 | # endif | |
602 | #endif | |
81ecdfbb RW |
603 | #ifdef HAVE_STRING_H |
604 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
605 | # include <memory.h> |
606 | # endif | |
607 | # include <string.h> | |
608 | #endif | |
81ecdfbb | 609 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
610 | # include <strings.h> |
611 | #endif | |
81ecdfbb | 612 | #ifdef HAVE_INTTYPES_H |
bec39cab | 613 | # include <inttypes.h> |
bec39cab | 614 | #endif |
81ecdfbb RW |
615 | #ifdef HAVE_STDINT_H |
616 | # include <stdint.h> | |
617 | #endif | |
618 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
619 | # include <unistd.h> |
620 | #endif" | |
621 | ||
81ecdfbb | 622 | enable_option_checking=no |
d0ac1c44 | 623 | ac_header_list= |
c971b7fa | 624 | ac_subst_vars='LTLIBOBJS |
81ecdfbb | 625 | LIBOBJS |
b292c783 JK |
626 | GCORE_TRANSFORM_NAME |
627 | GDB_TRANSFORM_NAME | |
e3487908 | 628 | XSLTPROC |
81ecdfbb | 629 | GDB_NM_FILE |
393fd4c3 YQ |
630 | LTLIBBABELTRACE |
631 | LIBBABELTRACE | |
632 | HAVE_LIBBABELTRACE | |
21ea5acd SDJ |
633 | HAVE_NATIVE_GCORE_HOST |
634 | NAT_GENERATED_FILES | |
635 | XM_CLIBS | |
636 | MH_CFLAGS | |
637 | LOADLIBES | |
638 | NAT_CDEPS | |
639 | NATDEPFILES | |
640 | NAT_FILE | |
81ecdfbb RW |
641 | target_subdir |
642 | CONFIG_UNINSTALL | |
643 | CONFIG_INSTALL | |
644 | CONFIG_CLEAN | |
645 | CONFIG_ALL | |
646 | CONFIG_SRCS | |
647 | CONFIG_DEPS | |
648 | CONFIG_OBS | |
649 | PROFILE_CFLAGS | |
650 | ENABLE_CFLAGS | |
651 | SIM_OBS | |
652 | SIM | |
653 | XMKMF | |
654 | GDBTK_SRC_DIR | |
655 | GDBTK_CFLAGS | |
656 | GDBTKLIBS | |
657 | X_LIBS | |
658 | X_LDFLAGS | |
659 | X_CFLAGS | |
660 | TK_XINCLUDES | |
661 | TK_DEPS | |
662 | TK_LIBRARY | |
663 | TK_INCLUDE | |
664 | TK_STUB_LIB_SPEC | |
665 | TK_STUB_LIB_FLAG | |
666 | TK_STUB_LIB_FILE | |
667 | TK_LIB_SPEC | |
668 | TK_LIB_FLAG | |
669 | TK_LIB_FILE | |
670 | TK_SRC_DIR | |
671 | TK_BIN_DIR | |
672 | TK_VERSION | |
673 | TCL_DEPS | |
674 | TCL_LIBRARY | |
675 | TCL_INCLUDE | |
676 | TCL_STUB_LIB_SPEC | |
677 | TCL_STUB_LIB_FLAG | |
678 | TCL_STUB_LIB_FILE | |
679 | TCL_LIB_SPEC | |
680 | TCL_LIB_FLAG | |
681 | TCL_LIB_FILE | |
682 | TCL_SRC_DIR | |
683 | TCL_BIN_DIR | |
684 | TCL_PATCH_LEVEL | |
685 | TCL_VERSION | |
686 | WIN32LDAPP | |
687 | GUI_CFLAGS_X | |
688 | LIBGUI | |
608e2dbb TT |
689 | LTLIBLZMA |
690 | LIBLZMA | |
691 | HAVE_LIBLZMA | |
81ecdfbb RW |
692 | WIN32LIBS |
693 | SER_HARDWIRE | |
694 | WERROR_CFLAGS | |
695 | WARN_CFLAGS | |
696 | SYSTEM_GDBINIT | |
81ecdfbb RW |
697 | TARGET_SYSTEM_ROOT |
698 | CONFIG_LDFLAGS | |
f6528abd | 699 | RDYNAMIC |
81ecdfbb | 700 | ALLOCA |
58bfce93 MM |
701 | LTLIBIPT |
702 | LIBIPT | |
703 | HAVE_LIBIPT | |
4df42755 DE |
704 | HAVE_GUILE_FALSE |
705 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
706 | GUILE_LIBS |
707 | GUILE_CPPFLAGS | |
e76c5d17 DE |
708 | GUILD_TARGET_FLAG |
709 | GUILD | |
ed3ef339 | 710 | pkg_config_prog_path |
4df42755 DE |
711 | HAVE_PYTHON_FALSE |
712 | HAVE_PYTHON_TRUE | |
ac534cba JB |
713 | PYTHON_LIBS |
714 | PYTHON_CPPFLAGS | |
81ecdfbb | 715 | PYTHON_CFLAGS |
ec685c5e | 716 | python_prog_path |
2400729e UW |
717 | LTLIBMPFR |
718 | LIBMPFR | |
719 | HAVE_LIBMPFR | |
81ecdfbb RW |
720 | LTLIBEXPAT |
721 | LIBEXPAT | |
722 | HAVE_LIBEXPAT | |
b8e0a31c | 723 | JIT_READER_DIR |
f997c383 | 724 | TARGET_PTR |
39037522 | 725 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
726 | READLINE_CFLAGS |
727 | READLINE_DEPS | |
728 | READLINE | |
016a3251 DD |
729 | LTLIBICONV |
730 | LIBICONV | |
711a72d3 L |
731 | zlibinc |
732 | zlibdir | |
81ecdfbb RW |
733 | MIG |
734 | WINDRES | |
735 | DLLTOOL | |
c971b7fa | 736 | AR |
81ecdfbb RW |
737 | YFLAGS |
738 | YACC | |
c971b7fa | 739 | RANLIB |
81ecdfbb | 740 | LN_S |
c971b7fa PA |
741 | INSTALL_DATA |
742 | INSTALL_SCRIPT | |
743 | INSTALL_PROGRAM | |
744 | AWK | |
81ecdfbb RW |
745 | REPORT_BUGS_TEXI |
746 | REPORT_BUGS_TO | |
747 | PKGVERSION | |
44cee4fd | 748 | CODESIGN_CERT |
b292c783 | 749 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
750 | TARGET_OBS |
751 | subdirs | |
752 | GDB_DATADIR | |
753 | DEBUGDIR | |
5048e516 JK |
754 | MAKEINFO_EXTRA_FLAGS |
755 | MAKEINFOFLAGS | |
756 | MAKEINFO | |
81ecdfbb RW |
757 | PACKAGE |
758 | GNULIB_STDINT_H | |
81ecdfbb RW |
759 | CATOBJEXT |
760 | GENCAT | |
761 | INSTOBJEXT | |
762 | DATADIRNAME | |
763 | CATALOGS | |
764 | POSUB | |
765 | GMSGFMT | |
766 | XGETTEXT | |
767 | INCINTL | |
768 | LIBINTL_DEP | |
769 | LIBINTL | |
770 | USE_NLS | |
81ecdfbb RW |
771 | CCDEPMODE |
772 | DEPDIR | |
773 | am__leading_dot | |
0bcda685 PA |
774 | CXX_DIALECT |
775 | HAVE_CXX11 | |
4869db5e RM |
776 | INSTALL_STRIP_PROGRAM |
777 | STRIP | |
778 | install_sh | |
81ecdfbb RW |
779 | target_os |
780 | target_vendor | |
781 | target_cpu | |
782 | target | |
783 | host_os | |
784 | host_vendor | |
785 | host_cpu | |
786 | host | |
787 | build_os | |
788 | build_vendor | |
789 | build_cpu | |
790 | build | |
c971b7fa PA |
791 | EGREP |
792 | GREP | |
793 | CPP | |
3bc3d82a PA |
794 | ac_ct_CXX |
795 | CXXFLAGS | |
796 | CXX | |
81ecdfbb RW |
797 | OBJEXT |
798 | EXEEXT | |
799 | ac_ct_CC | |
800 | CPPFLAGS | |
801 | LDFLAGS | |
802 | CFLAGS | |
803 | CC | |
804 | MAINT | |
805 | MAINTAINER_MODE_FALSE | |
806 | MAINTAINER_MODE_TRUE | |
807 | target_alias | |
808 | host_alias | |
809 | build_alias | |
810 | LIBS | |
811 | ECHO_T | |
812 | ECHO_N | |
813 | ECHO_C | |
814 | DEFS | |
815 | mandir | |
816 | localedir | |
817 | libdir | |
818 | psdir | |
819 | pdfdir | |
820 | dvidir | |
821 | htmldir | |
822 | infodir | |
823 | docdir | |
824 | oldincludedir | |
825 | includedir | |
826 | localstatedir | |
827 | sharedstatedir | |
828 | sysconfdir | |
829 | datadir | |
830 | datarootdir | |
831 | libexecdir | |
832 | sbindir | |
833 | bindir | |
834 | program_transform_name | |
835 | prefix | |
836 | exec_prefix | |
837 | PACKAGE_URL | |
838 | PACKAGE_BUGREPORT | |
839 | PACKAGE_STRING | |
840 | PACKAGE_VERSION | |
841 | PACKAGE_TARNAME | |
842 | PACKAGE_NAME | |
843 | PATH_SEPARATOR | |
844 | SHELL' | |
2b351b19 | 845 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
846 | ac_user_opts=' |
847 | enable_option_checking | |
848 | enable_maintainer_mode | |
da2f07f1 JK |
849 | enable_plugins |
850 | enable_largefile | |
81ecdfbb RW |
851 | with_separate_debug_dir |
852 | with_gdb_datadir | |
853 | with_relocated_sources | |
7349ff92 | 854 | with_auto_load_dir |
bccbefd2 | 855 | with_auto_load_safe_path |
81ecdfbb RW |
856 | enable_targets |
857 | enable_64_bit_bfd | |
81ecdfbb RW |
858 | enable_gdbmi |
859 | enable_tui | |
860 | enable_gdbtk | |
05e7c244 | 861 | with_libunwind_ia64 |
81ecdfbb RW |
862 | with_curses |
863 | enable_profiling | |
44cee4fd | 864 | enable_codesign |
81ecdfbb RW |
865 | with_pkgversion |
866 | with_bugurl | |
711a72d3 | 867 | with_system_zlib |
016a3251 DD |
868 | with_gnu_ld |
869 | enable_rpath | |
81ecdfbb | 870 | with_libiconv_prefix |
478aac75 | 871 | with_iconv_bin |
81ecdfbb | 872 | with_system_readline |
b8e0a31c | 873 | with_jit_reader_dir |
81ecdfbb | 874 | with_expat |
81ecdfbb | 875 | with_libexpat_prefix |
2400729e UW |
876 | with_mpfr |
877 | with_libmpfr_prefix | |
81ecdfbb | 878 | with_python |
ed3ef339 | 879 | with_guile |
a8db4212 | 880 | enable_libmcheck |
58bfce93 MM |
881 | with_intel_pt |
882 | with_libipt_prefix | |
81ecdfbb RW |
883 | with_included_regex |
884 | with_sysroot | |
885 | with_system_gdbinit | |
886 | enable_werror | |
887 | enable_build_warnings | |
888 | enable_gdb_build_warnings | |
608e2dbb TT |
889 | with_lzma |
890 | with_liblzma_prefix | |
81ecdfbb RW |
891 | with_tcl |
892 | with_tk | |
893 | with_x | |
894 | enable_sim | |
895 | enable_multi_ice | |
496c0e1b | 896 | enable_gdbserver |
393fd4c3 YQ |
897 | with_babeltrace |
898 | with_libbabeltrace_prefix | |
81ecdfbb RW |
899 | ' |
900 | ac_precious_vars='build_alias | |
901 | host_alias | |
902 | target_alias | |
903 | CC | |
904 | CFLAGS | |
905 | LDFLAGS | |
906 | LIBS | |
907 | CPPFLAGS | |
3bc3d82a PA |
908 | CXX |
909 | CXXFLAGS | |
910 | CCC | |
81ecdfbb | 911 | CPP |
f06e05e0 JK |
912 | MAKEINFO |
913 | MAKEINFOFLAGS | |
81ecdfbb RW |
914 | YACC |
915 | YFLAGS | |
916 | XMKMF' | |
5ae98d25 | 917 | ac_subdirs_all='testsuite |
81ecdfbb RW |
918 | gdbtk |
919 | multi-ice | |
920 | gdbserver' | |
c906108c SS |
921 | |
922 | # Initialize some variables set by options. | |
bec39cab AC |
923 | ac_init_help= |
924 | ac_init_version=false | |
81ecdfbb RW |
925 | ac_unrecognized_opts= |
926 | ac_unrecognized_sep= | |
c906108c SS |
927 | # The variables have the same names as the options, with |
928 | # dashes changed to underlines. | |
bec39cab | 929 | cache_file=/dev/null |
c906108c | 930 | exec_prefix=NONE |
c906108c | 931 | no_create= |
c906108c SS |
932 | no_recursion= |
933 | prefix=NONE | |
934 | program_prefix=NONE | |
935 | program_suffix=NONE | |
936 | program_transform_name=s,x,x, | |
937 | silent= | |
938 | site= | |
939 | srcdir= | |
c906108c SS |
940 | verbose= |
941 | x_includes=NONE | |
942 | x_libraries=NONE | |
bec39cab AC |
943 | |
944 | # Installation directory options. | |
945 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
946 | # and all the variables that are supposed to be based on exec_prefix | |
947 | # by default will actually change. | |
948 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 949 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
950 | bindir='${exec_prefix}/bin' |
951 | sbindir='${exec_prefix}/sbin' | |
952 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
953 | datarootdir='${prefix}/share' |
954 | datadir='${datarootdir}' | |
c906108c SS |
955 | sysconfdir='${prefix}/etc' |
956 | sharedstatedir='${prefix}/com' | |
957 | localstatedir='${prefix}/var' | |
c906108c SS |
958 | includedir='${prefix}/include' |
959 | oldincludedir='/usr/include' | |
81ecdfbb RW |
960 | docdir='${datarootdir}/doc/${PACKAGE}' |
961 | infodir='${datarootdir}/info' | |
962 | htmldir='${docdir}' | |
963 | dvidir='${docdir}' | |
964 | pdfdir='${docdir}' | |
965 | psdir='${docdir}' | |
966 | libdir='${exec_prefix}/lib' | |
967 | localedir='${datarootdir}/locale' | |
968 | mandir='${datarootdir}/man' | |
c906108c | 969 | |
c906108c | 970 | ac_prev= |
81ecdfbb | 971 | ac_dashdash= |
c906108c SS |
972 | for ac_option |
973 | do | |
c906108c SS |
974 | # If the previous option needs an argument, assign it. |
975 | if test -n "$ac_prev"; then | |
81ecdfbb | 976 | eval $ac_prev=\$ac_option |
c906108c SS |
977 | ac_prev= |
978 | continue | |
979 | fi | |
980 | ||
81ecdfbb | 981 | case $ac_option in |
d0ac1c44 SM |
982 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
983 | *=) ac_optarg= ;; | |
984 | *) ac_optarg=yes ;; | |
81ecdfbb | 985 | esac |
c906108c SS |
986 | |
987 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
988 | ||
81ecdfbb RW |
989 | case $ac_dashdash$ac_option in |
990 | --) | |
991 | ac_dashdash=yes ;; | |
c906108c SS |
992 | |
993 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
994 | ac_prev=bindir ;; | |
995 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 996 | bindir=$ac_optarg ;; |
c906108c SS |
997 | |
998 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 999 | ac_prev=build_alias ;; |
c906108c | 1000 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1001 | build_alias=$ac_optarg ;; |
c906108c SS |
1002 | |
1003 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1004 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1005 | ac_prev=cache_file ;; | |
1006 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1007 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1008 | cache_file=$ac_optarg ;; |
1009 | ||
1010 | --config-cache | -C) | |
1011 | cache_file=config.cache ;; | |
c906108c | 1012 | |
81ecdfbb | 1013 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1014 | ac_prev=datadir ;; |
81ecdfbb | 1015 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1016 | datadir=$ac_optarg ;; |
c906108c | 1017 | |
81ecdfbb RW |
1018 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1019 | | --dataroo | --dataro | --datar) | |
1020 | ac_prev=datarootdir ;; | |
1021 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1022 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1023 | datarootdir=$ac_optarg ;; | |
1024 | ||
c906108c | 1025 | -disable-* | --disable-*) |
81ecdfbb | 1026 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1027 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1028 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1029 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1030 | ac_useropt_orig=$ac_useropt |
1031 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1032 | case $ac_user_opts in | |
1033 | *" | |
1034 | "enable_$ac_useropt" | |
1035 | "*) ;; | |
1036 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1037 | ac_unrecognized_sep=', ';; | |
1038 | esac | |
1039 | eval enable_$ac_useropt=no ;; | |
1040 | ||
1041 | -docdir | --docdir | --docdi | --doc | --do) | |
1042 | ac_prev=docdir ;; | |
1043 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1044 | docdir=$ac_optarg ;; | |
1045 | ||
1046 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1047 | ac_prev=dvidir ;; | |
1048 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1049 | dvidir=$ac_optarg ;; | |
c906108c SS |
1050 | |
1051 | -enable-* | --enable-*) | |
81ecdfbb | 1052 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1053 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1054 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1055 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1056 | ac_useropt_orig=$ac_useropt |
1057 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1058 | case $ac_user_opts in | |
1059 | *" | |
1060 | "enable_$ac_useropt" | |
1061 | "*) ;; | |
1062 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1063 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1064 | esac |
81ecdfbb | 1065 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1066 | |
1067 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1068 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1069 | | --exec | --exe | --ex) | |
1070 | ac_prev=exec_prefix ;; | |
1071 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1072 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1073 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1074 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1075 | |
1076 | -gas | --gas | --ga | --g) | |
1077 | # Obsolete; use --with-gas. | |
1078 | with_gas=yes ;; | |
1079 | ||
bec39cab AC |
1080 | -help | --help | --hel | --he | -h) |
1081 | ac_init_help=long ;; | |
1082 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1083 | ac_init_help=recursive ;; | |
1084 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1085 | ac_init_help=short ;; | |
c906108c SS |
1086 | |
1087 | -host | --host | --hos | --ho) | |
bec39cab | 1088 | ac_prev=host_alias ;; |
c906108c | 1089 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1090 | host_alias=$ac_optarg ;; |
c906108c | 1091 | |
81ecdfbb RW |
1092 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1093 | ac_prev=htmldir ;; | |
1094 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1095 | | --ht=*) | |
1096 | htmldir=$ac_optarg ;; | |
1097 | ||
c906108c SS |
1098 | -includedir | --includedir | --includedi | --included | --include \ |
1099 | | --includ | --inclu | --incl | --inc) | |
1100 | ac_prev=includedir ;; | |
1101 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1102 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1103 | includedir=$ac_optarg ;; |
c906108c SS |
1104 | |
1105 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1106 | ac_prev=infodir ;; | |
1107 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1108 | infodir=$ac_optarg ;; |
c906108c SS |
1109 | |
1110 | -libdir | --libdir | --libdi | --libd) | |
1111 | ac_prev=libdir ;; | |
1112 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1113 | libdir=$ac_optarg ;; |
c906108c SS |
1114 | |
1115 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1116 | | --libexe | --libex | --libe) | |
1117 | ac_prev=libexecdir ;; | |
1118 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1119 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1120 | libexecdir=$ac_optarg ;; |
c906108c | 1121 | |
81ecdfbb RW |
1122 | -localedir | --localedir | --localedi | --localed | --locale) |
1123 | ac_prev=localedir ;; | |
1124 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1125 | localedir=$ac_optarg ;; | |
1126 | ||
c906108c | 1127 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1128 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1129 | ac_prev=localstatedir ;; |
1130 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1131 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1132 | localstatedir=$ac_optarg ;; |
c906108c SS |
1133 | |
1134 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1135 | ac_prev=mandir ;; | |
1136 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1137 | mandir=$ac_optarg ;; |
c906108c SS |
1138 | |
1139 | -nfp | --nfp | --nf) | |
1140 | # Obsolete; use --without-fp. | |
1141 | with_fp=no ;; | |
1142 | ||
1143 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1144 | | --no-cr | --no-c | -n) |
c906108c SS |
1145 | no_create=yes ;; |
1146 | ||
1147 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1148 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1149 | no_recursion=yes ;; | |
1150 | ||
1151 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1152 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1153 | | --oldin | --oldi | --old | --ol | --o) | |
1154 | ac_prev=oldincludedir ;; | |
1155 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1156 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1157 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1158 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1159 | |
1160 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1161 | ac_prev=prefix ;; | |
1162 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1163 | prefix=$ac_optarg ;; |
c906108c SS |
1164 | |
1165 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1166 | | --program-pre | --program-pr | --program-p) | |
1167 | ac_prev=program_prefix ;; | |
1168 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1169 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1170 | program_prefix=$ac_optarg ;; |
c906108c SS |
1171 | |
1172 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1173 | | --program-suf | --program-su | --program-s) | |
1174 | ac_prev=program_suffix ;; | |
1175 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1176 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1177 | program_suffix=$ac_optarg ;; |
c906108c SS |
1178 | |
1179 | -program-transform-name | --program-transform-name \ | |
1180 | | --program-transform-nam | --program-transform-na \ | |
1181 | | --program-transform-n | --program-transform- \ | |
1182 | | --program-transform | --program-transfor \ | |
1183 | | --program-transfo | --program-transf \ | |
1184 | | --program-trans | --program-tran \ | |
1185 | | --progr-tra | --program-tr | --program-t) | |
1186 | ac_prev=program_transform_name ;; | |
1187 | -program-transform-name=* | --program-transform-name=* \ | |
1188 | | --program-transform-nam=* | --program-transform-na=* \ | |
1189 | | --program-transform-n=* | --program-transform-=* \ | |
1190 | | --program-transform=* | --program-transfor=* \ | |
1191 | | --program-transfo=* | --program-transf=* \ | |
1192 | | --program-trans=* | --program-tran=* \ | |
1193 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1194 | program_transform_name=$ac_optarg ;; |
c906108c | 1195 | |
81ecdfbb RW |
1196 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1197 | ac_prev=pdfdir ;; | |
1198 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1199 | pdfdir=$ac_optarg ;; | |
1200 | ||
1201 | -psdir | --psdir | --psdi | --psd | --ps) | |
1202 | ac_prev=psdir ;; | |
1203 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1204 | psdir=$ac_optarg ;; | |
1205 | ||
c906108c SS |
1206 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1207 | | -silent | --silent | --silen | --sile | --sil) | |
1208 | silent=yes ;; | |
1209 | ||
1210 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1211 | ac_prev=sbindir ;; | |
1212 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1213 | | --sbi=* | --sb=*) | |
bec39cab | 1214 | sbindir=$ac_optarg ;; |
c906108c SS |
1215 | |
1216 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1217 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1218 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1219 | | --sha | --sh) | |
1220 | ac_prev=sharedstatedir ;; | |
1221 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1222 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1223 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1224 | | --sha=* | --sh=*) | |
bec39cab | 1225 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1226 | |
1227 | -site | --site | --sit) | |
1228 | ac_prev=site ;; | |
1229 | -site=* | --site=* | --sit=*) | |
bec39cab | 1230 | site=$ac_optarg ;; |
3ace7edb | 1231 | |
c906108c SS |
1232 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1233 | ac_prev=srcdir ;; | |
1234 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1235 | srcdir=$ac_optarg ;; |
c906108c SS |
1236 | |
1237 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1238 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1239 | ac_prev=sysconfdir ;; | |
1240 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1241 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1242 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1243 | |
1244 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1245 | ac_prev=target_alias ;; |
c906108c | 1246 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1247 | target_alias=$ac_optarg ;; |
c906108c SS |
1248 | |
1249 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1250 | verbose=yes ;; | |
1251 | ||
bec39cab AC |
1252 | -version | --version | --versio | --versi | --vers | -V) |
1253 | ac_init_version=: ;; | |
c906108c SS |
1254 | |
1255 | -with-* | --with-*) | |
81ecdfbb | 1256 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1257 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1258 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1259 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1260 | ac_useropt_orig=$ac_useropt |
1261 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1262 | case $ac_user_opts in | |
1263 | *" | |
1264 | "with_$ac_useropt" | |
1265 | "*) ;; | |
1266 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1267 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1268 | esac |
81ecdfbb | 1269 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1270 | |
1271 | -without-* | --without-*) | |
81ecdfbb | 1272 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1273 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1274 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1275 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1276 | ac_useropt_orig=$ac_useropt |
1277 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1278 | case $ac_user_opts in | |
1279 | *" | |
1280 | "with_$ac_useropt" | |
1281 | "*) ;; | |
1282 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1283 | ac_unrecognized_sep=', ';; | |
1284 | esac | |
1285 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1286 | |
1287 | --x) | |
1288 | # Obsolete; use --with-x. | |
1289 | with_x=yes ;; | |
1290 | ||
1291 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1292 | | --x-incl | --x-inc | --x-in | --x-i) | |
1293 | ac_prev=x_includes ;; | |
1294 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1295 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1296 | x_includes=$ac_optarg ;; |
c906108c SS |
1297 | |
1298 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1299 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1300 | ac_prev=x_libraries ;; | |
1301 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1302 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1303 | x_libraries=$ac_optarg ;; |
c906108c | 1304 | |
d0ac1c44 SM |
1305 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1306 | Try \`$0 --help' for more information" | |
c906108c SS |
1307 | ;; |
1308 | ||
bec39cab AC |
1309 | *=*) |
1310 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1311 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1312 | case $ac_envvar in #( |
1313 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1314 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1315 | esac |
1316 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1317 | export $ac_envvar ;; |
1318 | ||
c906108c | 1319 | *) |
bec39cab | 1320 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1321 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1322 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1323 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1324 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c906108c SS |
1325 | ;; |
1326 | ||
1327 | esac | |
1328 | done | |
1329 | ||
1330 | if test -n "$ac_prev"; then | |
bec39cab | 1331 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1332 | as_fn_error $? "missing argument to $ac_option" |
c906108c | 1333 | fi |
c906108c | 1334 | |
81ecdfbb RW |
1335 | if test -n "$ac_unrecognized_opts"; then |
1336 | case $enable_option_checking in | |
1337 | no) ;; | |
d0ac1c44 | 1338 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1339 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
b4e70030 | 1340 | esac |
81ecdfbb | 1341 | fi |
b4e70030 | 1342 | |
81ecdfbb RW |
1343 | # Check all directory arguments for consistency. |
1344 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1345 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1346 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1347 | libdir localedir mandir | |
b4e70030 | 1348 | do |
81ecdfbb RW |
1349 | eval ac_val=\$$ac_var |
1350 | # Remove trailing slashes. | |
1351 | case $ac_val in | |
1352 | */ ) | |
1353 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1354 | eval $ac_var=\$ac_val;; | |
1355 | esac | |
1356 | # Be sure to have absolute directory names. | |
b4e70030 | 1357 | case $ac_val in |
81ecdfbb RW |
1358 | [\\/$]* | ?:[\\/]* ) continue;; |
1359 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1360 | esac |
d0ac1c44 | 1361 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1362 | done |
1363 | ||
bec39cab AC |
1364 | # There might be people who depend on the old broken behavior: `$host' |
1365 | # used to hold the argument of --host etc. | |
1366 | # FIXME: To remove some day. | |
1367 | build=$build_alias | |
1368 | host=$host_alias | |
1369 | target=$target_alias | |
1370 | ||
1371 | # FIXME: To remove some day. | |
1372 | if test "x$host_alias" != x; then | |
1373 | if test "x$build_alias" = x; then | |
1374 | cross_compiling=maybe | |
bec39cab AC |
1375 | elif test "x$build_alias" != "x$host_alias"; then |
1376 | cross_compiling=yes | |
1377 | fi | |
1378 | fi | |
c906108c | 1379 | |
bec39cab AC |
1380 | ac_tool_prefix= |
1381 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1382 | ||
1383 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1384 | |
c906108c | 1385 | |
81ecdfbb RW |
1386 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1387 | ac_ls_di=`ls -di .` && | |
1388 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1389 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1390 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1391 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1392 | |
1393 | ||
c906108c SS |
1394 | # Find the source files, if location was not specified. |
1395 | if test -z "$srcdir"; then | |
1396 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1397 | # Try the directory containing this script, then the parent directory. |
1398 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1399 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1400 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1401 | X"$as_myself" : 'X\(//\)$' \| \ | |
1402 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1403 | $as_echo X"$as_myself" | | |
1404 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1405 | s//\1/ | |
1406 | q | |
1407 | } | |
1408 | /^X\(\/\/\)[^/].*/{ | |
1409 | s//\1/ | |
1410 | q | |
1411 | } | |
1412 | /^X\(\/\/\)$/{ | |
1413 | s//\1/ | |
1414 | q | |
1415 | } | |
1416 | /^X\(\/\).*/{ | |
1417 | s//\1/ | |
1418 | q | |
1419 | } | |
1420 | s/.*/./; q'` | |
c906108c | 1421 | srcdir=$ac_confdir |
81ecdfbb | 1422 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1423 | srcdir=.. |
1424 | fi | |
1425 | else | |
1426 | ac_srcdir_defaulted=no | |
1427 | fi | |
81ecdfbb RW |
1428 | if test ! -r "$srcdir/$ac_unique_file"; then |
1429 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1430 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1431 | fi |
1432 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1433 | ac_abs_confdir=`( | |
d0ac1c44 | 1434 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1435 | pwd)` |
1436 | # When building in place, set srcdir=. | |
1437 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1438 | srcdir=. | |
1439 | fi | |
1440 | # Remove unnecessary trailing slashes from srcdir. | |
1441 | # Double slashes in file names in object file debugging info | |
1442 | # mess up M-x gdb in Emacs. | |
1443 | case $srcdir in | |
1444 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1445 | esac | |
1446 | for ac_var in $ac_precious_vars; do | |
1447 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1448 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1449 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1450 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1451 | done | |
c906108c | 1452 | |
bec39cab AC |
1453 | # |
1454 | # Report the --help message. | |
1455 | # | |
1456 | if test "$ac_init_help" = "long"; then | |
1457 | # Omit some internal or obsolete options to make the list less imposing. | |
1458 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1459 | cat <<_ACEOF | |
1460 | \`configure' configures this package to adapt to many kinds of systems. | |
1461 | ||
1462 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1463 | ||
1464 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1465 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1466 | ||
1467 | Defaults for the options are specified in brackets. | |
1468 | ||
1469 | Configuration: | |
1470 | -h, --help display this help and exit | |
1471 | --help=short display options specific to this package | |
1472 | --help=recursive display the short help of all the included packages | |
1473 | -V, --version display version information and exit | |
d0ac1c44 | 1474 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1475 | --cache-file=FILE cache test results in FILE [disabled] |
1476 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1477 | -n, --no-create do not create output files | |
1478 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1479 | ||
bec39cab AC |
1480 | Installation directories: |
1481 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1482 | [$ac_default_prefix] |
bec39cab | 1483 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1484 | [PREFIX] |
bec39cab AC |
1485 | |
1486 | By default, \`make install' will install all the files in | |
1487 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1488 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1489 | for instance \`--prefix=\$HOME'. | |
1490 | ||
1491 | For better control, use the options below. | |
1492 | ||
1493 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1494 | --bindir=DIR user executables [EPREFIX/bin] |
1495 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1496 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1497 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1498 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1499 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1500 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1501 | --includedir=DIR C header files [PREFIX/include] | |
1502 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1503 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1504 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1505 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1506 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1507 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1508 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1509 | --htmldir=DIR html documentation [DOCDIR] | |
1510 | --dvidir=DIR dvi documentation [DOCDIR] | |
1511 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1512 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1513 | _ACEOF |
1514 | ||
1515 | cat <<\_ACEOF | |
1516 | ||
9009e1ae MR |
1517 | Program names: |
1518 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1519 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1520 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1521 | ||
bec39cab AC |
1522 | X features: |
1523 | --x-includes=DIR X include files are in DIR | |
1524 | --x-libraries=DIR X library files are in DIR | |
1525 | ||
1526 | System types: | |
1527 | --build=BUILD configure for building on BUILD [guessed] | |
1528 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1529 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1530 | _ACEOF | |
1531 | fi | |
1532 | ||
1533 | if test -n "$ac_init_help"; then | |
1534 | ||
1535 | cat <<\_ACEOF | |
1536 | ||
1537 | Optional Features: | |
81ecdfbb | 1538 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1539 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1540 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1541 | --enable-maintainer-mode |
1542 | enable make rules and dependencies not useful (and | |
1543 | sometimes confusing) to the casual installer | |
2974be62 | 1544 | --enable-plugins Enable support for plugins |
da2f07f1 | 1545 | --disable-largefile omit support for large files |
a1220294 TT |
1546 | --enable-targets=TARGETS |
1547 | alternative target configurations | |
c0993dbe | 1548 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1549 | --disable-gdbmi disable machine-interface (MI) |
1550 | --enable-tui enable full-screen terminal user interface (TUI) | |
1551 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1552 | --enable-profiling enable profiling of GDB | |
44cee4fd | 1553 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
3841debe | 1554 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1555 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1556 | --enable-werror treat compile warnings as errors |
32c1c914 | 1557 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1558 | --enable-gdb-build-warnings |
32c1c914 | 1559 | enable GDB specific build-time compiler warnings if |
a1220294 | 1560 | gcc is used |
32c1c914 | 1561 | --enable-sim link gdb with simulator |
bec39cab | 1562 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1563 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1564 | is auto) | |
bec39cab AC |
1565 | |
1566 | Optional Packages: | |
1567 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1568 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1569 | --with-separate-debug-dir=PATH |
32c1c914 | 1570 | look for global separate debug info in this path |
62e4f60c | 1571 | [LIBDIR/debug] |
b14b1491 TT |
1572 | --with-gdb-datadir=PATH look for global separate data files in this path |
1573 | [DATADIR/gdb] | |
29b0e8a2 | 1574 | --with-relocated-sources=PATH |
32c1c914 | 1575 | automatically relocate this path for source files |
7349ff92 | 1576 | --with-auto-load-dir=PATH |
aff139ff | 1577 | directories from which to load auto-loaded scripts |
1564a261 | 1578 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1579 | --with-auto-load-safe-path=PATH |
aff139ff | 1580 | directories safe to hold auto-loaded files |
7349ff92 | 1581 | [--with-auto-load-dir] |
bccbefd2 JK |
1582 | --without-auto-load-safe-path |
1583 | do not restrict auto-loaded files locations | |
05e7c244 | 1584 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1585 | --with-curses use the curses library instead of the termcap |
1586 | library | |
c16158bc JM |
1587 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1588 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1589 | --with-system-zlib use installed libz |
016a3251 DD |
1590 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1591 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1592 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
478aac75 | 1593 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1594 | --with-system-readline use installed readline library |
b8e0a31c SD |
1595 | --with-jit-reader-dir=PATH |
1596 | directory to load the JIT readers from | |
5c39566f | 1597 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1598 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1599 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
2400729e UW |
1600 | --with-mpfr include MPFR support (auto/yes/no) |
1601 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1602 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
0c4a4063 DE |
1603 | --with-python[=PYTHON] include python support |
1604 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1605 | --with-guile[=GUILE] include guile support |
1606 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1607 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1608 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1609 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
a1220294 TT |
1610 | --without-included-regex |
1611 | don't use included regex; this is the default on | |
1612 | systems with version 2 of the GNU C library (use | |
1613 | with caution on other system) | |
81ecdfbb | 1614 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1615 | --with-system-gdbinit=PATH |
32c1c914 | 1616 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1617 | --with-lzma support lzma compression (auto/yes/no) |
1618 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1619 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1620 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1621 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1622 | --with-x use the X Window System |
393fd4c3 YQ |
1623 | --with-babeltrace include babeltrace support (auto/yes/no) |
1624 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1625 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1626 | |
1627 | Some influential environment variables: | |
1628 | CC C compiler command | |
1629 | CFLAGS C compiler flags | |
1630 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1631 | nonstandard directory <lib dir> | |
81ecdfbb | 1632 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1633 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1634 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1635 | CXX C++ compiler command |
1636 | CXXFLAGS C++ compiler flags | |
bec39cab | 1637 | CPP C preprocessor |
f06e05e0 JK |
1638 | MAKEINFO Parent configure detects if it is of sufficient version. |
1639 | MAKEINFOFLAGS | |
1640 | Parameters for MAKEINFO. | |
d0ac1c44 SM |
1641 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1642 | Defaults to the first program found out of: `bison -y', `byacc', | |
1643 | `yacc'. | |
81ecdfbb RW |
1644 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1645 | This script will default YFLAGS to the empty string to avoid a | |
1646 | default value of `-d' given by some make applications. | |
1647 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1648 | |
1649 | Use these variables to override the choices made by `configure' or to help | |
1650 | it to find libraries and programs with nonstandard names/locations. | |
1651 | ||
81ecdfbb | 1652 | Report bugs to the package provider. |
bec39cab | 1653 | _ACEOF |
81ecdfbb | 1654 | ac_status=$? |
bec39cab AC |
1655 | fi |
1656 | ||
1657 | if test "$ac_init_help" = "recursive"; then | |
1658 | # If there are subdirs, report their specific --help. | |
bec39cab | 1659 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1660 | test -d "$ac_dir" || |
1661 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1662 | continue | |
bec39cab AC |
1663 | ac_builddir=. |
1664 | ||
81ecdfbb RW |
1665 | case "$ac_dir" in |
1666 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1667 | *) | |
1668 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1669 | # A ".." for each directory in $ac_dir_suffix. | |
1670 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1671 | case $ac_top_builddir_sub in | |
1672 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1673 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1674 | esac ;; | |
1675 | esac | |
1676 | ac_abs_top_builddir=$ac_pwd | |
1677 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1678 | # for backward compatibility: | |
1679 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1680 | |
1681 | case $srcdir in | |
81ecdfbb | 1682 | .) # We are building in place. |
bec39cab | 1683 | ac_srcdir=. |
81ecdfbb RW |
1684 | ac_top_srcdir=$ac_top_builddir_sub |
1685 | ac_abs_top_srcdir=$ac_pwd ;; | |
1686 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1687 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1688 | ac_top_srcdir=$srcdir |
1689 | ac_abs_top_srcdir=$srcdir ;; | |
1690 | *) # Relative name. | |
1691 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1692 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1693 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1694 | esac |
81ecdfbb | 1695 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1696 | |
81ecdfbb RW |
1697 | cd "$ac_dir" || { ac_status=$?; continue; } |
1698 | # Check for guested configure. | |
1699 | if test -f "$ac_srcdir/configure.gnu"; then | |
1700 | echo && | |
1701 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1702 | elif test -f "$ac_srcdir/configure"; then | |
1703 | echo && | |
1704 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1705 | else |
81ecdfbb RW |
1706 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1707 | fi || ac_status=$? | |
1708 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1709 | done |
1710 | fi | |
1711 | ||
81ecdfbb | 1712 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1713 | if $ac_init_version; then |
1714 | cat <<\_ACEOF | |
81ecdfbb | 1715 | configure |
d0ac1c44 | 1716 | generated by GNU Autoconf 2.69 |
bec39cab | 1717 | |
d0ac1c44 | 1718 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1719 | This configure script is free software; the Free Software Foundation |
1720 | gives unlimited permission to copy, distribute and modify it. | |
1721 | _ACEOF | |
81ecdfbb | 1722 | exit |
bec39cab | 1723 | fi |
bec39cab | 1724 | |
81ecdfbb RW |
1725 | ## ------------------------ ## |
1726 | ## Autoconf initialization. ## | |
1727 | ## ------------------------ ## | |
bec39cab | 1728 | |
81ecdfbb RW |
1729 | # ac_fn_c_try_compile LINENO |
1730 | # -------------------------- | |
1731 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1732 | ac_fn_c_try_compile () | |
1733 | { | |
1734 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1735 | rm -f conftest.$ac_objext | |
1736 | if { { ac_try="$ac_compile" | |
1737 | case "(($ac_try" in | |
1738 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1739 | *) ac_try_echo=$ac_try;; | |
1740 | esac | |
1741 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1742 | $as_echo "$ac_try_echo"; } >&5 | |
1743 | (eval "$ac_compile") 2>conftest.err | |
1744 | ac_status=$? | |
1745 | if test -s conftest.err; then | |
1746 | grep -v '^ *+' conftest.err >conftest.er1 | |
1747 | cat conftest.er1 >&5 | |
1748 | mv -f conftest.er1 conftest.err | |
1749 | fi | |
1750 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1751 | test $ac_status = 0; } && { | |
1752 | test -z "$ac_c_werror_flag" || | |
1753 | test ! -s conftest.err | |
1754 | } && test -s conftest.$ac_objext; then : | |
1755 | ac_retval=0 | |
1756 | else | |
1757 | $as_echo "$as_me: failed program was:" >&5 | |
1758 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1759 | |
81ecdfbb RW |
1760 | ac_retval=1 |
1761 | fi | |
d0ac1c44 SM |
1762 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1763 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1764 | |
1765 | } # ac_fn_c_try_compile | |
1766 | ||
3bc3d82a PA |
1767 | # ac_fn_cxx_try_compile LINENO |
1768 | # ---------------------------- | |
1769 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1770 | ac_fn_cxx_try_compile () | |
1771 | { | |
1772 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1773 | rm -f conftest.$ac_objext | |
1774 | if { { ac_try="$ac_compile" | |
1775 | case "(($ac_try" in | |
1776 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1777 | *) ac_try_echo=$ac_try;; | |
1778 | esac | |
1779 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1780 | $as_echo "$ac_try_echo"; } >&5 | |
1781 | (eval "$ac_compile") 2>conftest.err | |
1782 | ac_status=$? | |
1783 | if test -s conftest.err; then | |
1784 | grep -v '^ *+' conftest.err >conftest.er1 | |
1785 | cat conftest.er1 >&5 | |
1786 | mv -f conftest.er1 conftest.err | |
1787 | fi | |
1788 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1789 | test $ac_status = 0; } && { | |
1790 | test -z "$ac_cxx_werror_flag" || | |
1791 | test ! -s conftest.err | |
1792 | } && test -s conftest.$ac_objext; then : | |
1793 | ac_retval=0 | |
1794 | else | |
1795 | $as_echo "$as_me: failed program was:" >&5 | |
1796 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1797 | ||
1798 | ac_retval=1 | |
1799 | fi | |
d0ac1c44 SM |
1800 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1801 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1802 | |
1803 | } # ac_fn_cxx_try_compile | |
1804 | ||
81ecdfbb RW |
1805 | # ac_fn_c_try_cpp LINENO |
1806 | # ---------------------- | |
1807 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1808 | ac_fn_c_try_cpp () | |
bec39cab | 1809 | { |
81ecdfbb RW |
1810 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1811 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1812 | case "(($ac_try" in | |
1813 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1814 | *) ac_try_echo=$ac_try;; | |
1815 | esac | |
1816 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1817 | $as_echo "$ac_try_echo"; } >&5 | |
1818 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1819 | ac_status=$? | |
1820 | if test -s conftest.err; then | |
1821 | grep -v '^ *+' conftest.err >conftest.er1 | |
1822 | cat conftest.er1 >&5 | |
1823 | mv -f conftest.er1 conftest.err | |
1824 | fi | |
1825 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1826 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1827 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1828 | test ! -s conftest.err | |
1829 | }; then : | |
1830 | ac_retval=0 | |
1831 | else | |
1832 | $as_echo "$as_me: failed program was:" >&5 | |
1833 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1834 | |
81ecdfbb RW |
1835 | ac_retval=1 |
1836 | fi | |
d0ac1c44 SM |
1837 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1838 | as_fn_set_status $ac_retval | |
bec39cab | 1839 | |
81ecdfbb | 1840 | } # ac_fn_c_try_cpp |
bec39cab | 1841 | |
81ecdfbb RW |
1842 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1843 | # ------------------------------------------------------- | |
1844 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1845 | # the include files in INCLUDES and setting the cache variable VAR | |
1846 | # accordingly. | |
1847 | ac_fn_c_check_header_mongrel () | |
1848 | { | |
1849 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1850 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1852 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1853 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1854 | $as_echo_n "(cached) " >&6 |
1855 | fi | |
1856 | eval ac_res=\$$3 | |
1857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1858 | $as_echo "$ac_res" >&6; } | |
1859 | else | |
1860 | # Is the header compilable? | |
1861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1862 | $as_echo_n "checking $2 usability... " >&6; } | |
1863 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1864 | /* end confdefs.h. */ | |
1865 | $4 | |
1866 | #include <$2> | |
1867 | _ACEOF | |
1868 | if ac_fn_c_try_compile "$LINENO"; then : | |
1869 | ac_header_compiler=yes | |
1870 | else | |
1871 | ac_header_compiler=no | |
1872 | fi | |
1873 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1875 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1876 | |
81ecdfbb RW |
1877 | # Is the header present? |
1878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1879 | $as_echo_n "checking $2 presence... " >&6; } | |
1880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1881 | /* end confdefs.h. */ | |
1882 | #include <$2> | |
1883 | _ACEOF | |
1884 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1885 | ac_header_preproc=yes | |
1886 | else | |
1887 | ac_header_preproc=no | |
1888 | fi | |
d0ac1c44 | 1889 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1891 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1892 | |
81ecdfbb RW |
1893 | # So? What about this header? |
1894 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1895 | yes:no: ) | |
1896 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1897 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1898 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1899 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1900 | ;; | |
1901 | no:yes:* ) | |
1902 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1903 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1904 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1905 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1906 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1907 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1908 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1909 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1910 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1911 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1912 | ;; | |
1913 | esac | |
1914 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1915 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1916 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1917 | $as_echo_n "(cached) " >&6 |
1918 | else | |
1919 | eval "$3=\$ac_header_compiler" | |
1920 | fi | |
1921 | eval ac_res=\$$3 | |
1922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1923 | $as_echo "$ac_res" >&6; } | |
1924 | fi | |
d0ac1c44 | 1925 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 1926 | |
81ecdfbb | 1927 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1928 | |
81ecdfbb RW |
1929 | # ac_fn_c_try_run LINENO |
1930 | # ---------------------- | |
1931 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1932 | # that executables *can* be run. | |
1933 | ac_fn_c_try_run () | |
1934 | { | |
1935 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1936 | if { { ac_try="$ac_link" | |
1937 | case "(($ac_try" in | |
1938 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1939 | *) ac_try_echo=$ac_try;; | |
1940 | esac | |
1941 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1942 | $as_echo "$ac_try_echo"; } >&5 | |
1943 | (eval "$ac_link") 2>&5 | |
1944 | ac_status=$? | |
1945 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1946 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1947 | { { case "(($ac_try" in | |
1948 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1949 | *) ac_try_echo=$ac_try;; | |
1950 | esac | |
1951 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1952 | $as_echo "$ac_try_echo"; } >&5 | |
1953 | (eval "$ac_try") 2>&5 | |
1954 | ac_status=$? | |
1955 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1956 | test $ac_status = 0; }; }; then : | |
1957 | ac_retval=0 | |
1958 | else | |
1959 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1960 | $as_echo "$as_me: failed program was:" >&5 | |
1961 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1962 | |
81ecdfbb RW |
1963 | ac_retval=$ac_status |
1964 | fi | |
1965 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
1966 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1967 | as_fn_set_status $ac_retval | |
bec39cab | 1968 | |
81ecdfbb | 1969 | } # ac_fn_c_try_run |
bec39cab | 1970 | |
81ecdfbb RW |
1971 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1972 | # ------------------------------------------------------- | |
1973 | # Tests whether HEADER exists and can be compiled using the include files in | |
1974 | # INCLUDES, setting the cache variable VAR accordingly. | |
1975 | ac_fn_c_check_header_compile () | |
1976 | { | |
1977 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1979 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1980 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1981 | $as_echo_n "(cached) " >&6 |
1982 | else | |
1983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1984 | /* end confdefs.h. */ | |
1985 | $4 | |
1986 | #include <$2> | |
bec39cab | 1987 | _ACEOF |
81ecdfbb RW |
1988 | if ac_fn_c_try_compile "$LINENO"; then : |
1989 | eval "$3=yes" | |
1990 | else | |
1991 | eval "$3=no" | |
1992 | fi | |
1993 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1994 | fi | |
1995 | eval ac_res=\$$3 | |
1996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1997 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1998 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 1999 | |
81ecdfbb | 2000 | } # ac_fn_c_check_header_compile |
bec39cab | 2001 | |
2974be62 AM |
2002 | # ac_fn_c_try_link LINENO |
2003 | # ----------------------- | |
2004 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2005 | ac_fn_c_try_link () | |
2006 | { | |
2007 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2008 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2009 | if { { ac_try="$ac_link" | |
2010 | case "(($ac_try" in | |
2011 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2012 | *) ac_try_echo=$ac_try;; | |
2013 | esac | |
2014 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2015 | $as_echo "$ac_try_echo"; } >&5 | |
2016 | (eval "$ac_link") 2>conftest.err | |
2017 | ac_status=$? | |
2018 | if test -s conftest.err; then | |
2019 | grep -v '^ *+' conftest.err >conftest.er1 | |
2020 | cat conftest.er1 >&5 | |
2021 | mv -f conftest.er1 conftest.err | |
2022 | fi | |
2023 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2024 | test $ac_status = 0; } && { | |
2025 | test -z "$ac_c_werror_flag" || | |
2026 | test ! -s conftest.err | |
2027 | } && test -s conftest$ac_exeext && { | |
2028 | test "$cross_compiling" = yes || | |
d0ac1c44 | 2029 | test -x conftest$ac_exeext |
2974be62 AM |
2030 | }; then : |
2031 | ac_retval=0 | |
2032 | else | |
2033 | $as_echo "$as_me: failed program was:" >&5 | |
2034 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2035 | ||
2036 | ac_retval=1 | |
2037 | fi | |
2038 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2039 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2040 | # interfere with the next link command; also delete a directory that is | |
2041 | # left behind by Apple's compiler. We do this before executing the actions. | |
2042 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2043 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2044 | as_fn_set_status $ac_retval | |
2974be62 AM |
2045 | |
2046 | } # ac_fn_c_try_link | |
2047 | ||
81ecdfbb RW |
2048 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2049 | # -------------------------------------------- | |
2050 | # Tries to find the compile-time value of EXPR in a program that includes | |
2051 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2052 | # computed | |
2053 | ac_fn_c_compute_int () | |
2054 | { | |
2055 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2056 | if test "$cross_compiling" = yes; then | |
2057 | # Depending upon the size, compute the lo and hi bounds. | |
2058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2059 | /* end confdefs.h. */ | |
2060 | $4 | |
2061 | int | |
2062 | main () | |
2063 | { | |
2064 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2065 | test_array [0] = 0; |
2066 | return test_array [0]; | |
bec39cab | 2067 | |
81ecdfbb RW |
2068 | ; |
2069 | return 0; | |
2070 | } | |
2071 | _ACEOF | |
2072 | if ac_fn_c_try_compile "$LINENO"; then : | |
2073 | ac_lo=0 ac_mid=0 | |
2074 | while :; do | |
2075 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2076 | /* end confdefs.h. */ | |
2077 | $4 | |
2078 | int | |
2079 | main () | |
2080 | { | |
2081 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2082 | test_array [0] = 0; |
2083 | return test_array [0]; | |
bec39cab | 2084 | |
81ecdfbb RW |
2085 | ; |
2086 | return 0; | |
2087 | } | |
2088 | _ACEOF | |
2089 | if ac_fn_c_try_compile "$LINENO"; then : | |
2090 | ac_hi=$ac_mid; break | |
2091 | else | |
2092 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2093 | if test $ac_lo -le $ac_mid; then | |
2094 | ac_lo= ac_hi= | |
2095 | break | |
2096 | fi | |
2097 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2098 | fi |
81ecdfbb RW |
2099 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2100 | done | |
c906108c | 2101 | else |
81ecdfbb RW |
2102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2103 | /* end confdefs.h. */ | |
2104 | $4 | |
2105 | int | |
2106 | main () | |
2107 | { | |
2108 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2109 | test_array [0] = 0; |
2110 | return test_array [0]; | |
bec39cab | 2111 | |
81ecdfbb RW |
2112 | ; |
2113 | return 0; | |
2114 | } | |
2115 | _ACEOF | |
2116 | if ac_fn_c_try_compile "$LINENO"; then : | |
2117 | ac_hi=-1 ac_mid=-1 | |
2118 | while :; do | |
2119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2120 | /* end confdefs.h. */ | |
2121 | $4 | |
2122 | int | |
2123 | main () | |
2124 | { | |
2125 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2126 | test_array [0] = 0; |
2127 | return test_array [0]; | |
bec39cab | 2128 | |
81ecdfbb RW |
2129 | ; |
2130 | return 0; | |
2131 | } | |
2132 | _ACEOF | |
2133 | if ac_fn_c_try_compile "$LINENO"; then : | |
2134 | ac_lo=$ac_mid; break | |
2135 | else | |
2136 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2137 | if test $ac_mid -le $ac_hi; then | |
2138 | ac_lo= ac_hi= | |
2139 | break | |
2140 | fi | |
2141 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2142 | fi | |
2143 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2144 | done | |
2145 | else | |
2146 | ac_lo= ac_hi= | |
2147 | fi | |
2148 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2149 | fi | |
2150 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2151 | # Binary search between lo and hi bounds. | |
2152 | while test "x$ac_lo" != "x$ac_hi"; do | |
2153 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2155 | /* end confdefs.h. */ | |
2156 | $4 | |
2157 | int | |
2158 | main () | |
2159 | { | |
2160 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2161 | test_array [0] = 0; |
2162 | return test_array [0]; | |
bec39cab | 2163 | |
81ecdfbb RW |
2164 | ; |
2165 | return 0; | |
2166 | } | |
2167 | _ACEOF | |
2168 | if ac_fn_c_try_compile "$LINENO"; then : | |
2169 | ac_hi=$ac_mid | |
2170 | else | |
2171 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2172 | fi | |
2173 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2174 | done | |
2175 | case $ac_lo in #(( | |
2176 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2177 | '') ac_retval=1 ;; | |
2178 | esac | |
2179 | else | |
2180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2181 | /* end confdefs.h. */ | |
2182 | $4 | |
2183 | static long int longval () { return $2; } | |
2184 | static unsigned long int ulongval () { return $2; } | |
2185 | #include <stdio.h> | |
2186 | #include <stdlib.h> | |
2187 | int | |
2188 | main () | |
2189 | { | |
bec39cab | 2190 | |
81ecdfbb RW |
2191 | FILE *f = fopen ("conftest.val", "w"); |
2192 | if (! f) | |
2193 | return 1; | |
2194 | if (($2) < 0) | |
2195 | { | |
2196 | long int i = longval (); | |
2197 | if (i != ($2)) | |
2198 | return 1; | |
2199 | fprintf (f, "%ld", i); | |
2200 | } | |
2201 | else | |
2202 | { | |
2203 | unsigned long int i = ulongval (); | |
2204 | if (i != ($2)) | |
2205 | return 1; | |
2206 | fprintf (f, "%lu", i); | |
2207 | } | |
2208 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2209 | on some platforms. */ | |
2210 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2211 | |
81ecdfbb RW |
2212 | ; |
2213 | return 0; | |
2214 | } | |
2215 | _ACEOF | |
2216 | if ac_fn_c_try_run "$LINENO"; then : | |
2217 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2218 | else | |
2219 | ac_retval=1 | |
2220 | fi | |
2221 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2222 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2223 | rm -f conftest.val | |
bec39cab | 2224 | |
81ecdfbb | 2225 | fi |
d0ac1c44 SM |
2226 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2227 | as_fn_set_status $ac_retval | |
bec39cab | 2228 | |
81ecdfbb | 2229 | } # ac_fn_c_compute_int |
bec39cab | 2230 | |
55a8c076 YQ |
2231 | # ac_fn_c_check_func LINENO FUNC VAR |
2232 | # ---------------------------------- | |
2233 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2234 | ac_fn_c_check_func () | |
81ecdfbb RW |
2235 | { |
2236 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2237 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2238 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2239 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2240 | $as_echo_n "(cached) " >&6 |
2241 | else | |
81ecdfbb RW |
2242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2243 | /* end confdefs.h. */ | |
55a8c076 YQ |
2244 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2245 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2246 | #define $2 innocuous_$2 | |
2247 | ||
2248 | /* System header to define __stub macros and hopefully few prototypes, | |
2249 | which can conflict with char $2 (); below. | |
2250 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2251 | <limits.h> exists even on freestanding compilers. */ | |
2252 | ||
2253 | #ifdef __STDC__ | |
2254 | # include <limits.h> | |
2255 | #else | |
2256 | # include <assert.h> | |
2257 | #endif | |
2258 | ||
2259 | #undef $2 | |
2260 | ||
2261 | /* Override any GCC internal prototype to avoid an error. | |
2262 | Use char because int might match the return type of a GCC | |
2263 | builtin and then its argument prototype would still apply. */ | |
2264 | #ifdef __cplusplus | |
2265 | extern "C" | |
2266 | #endif | |
2267 | char $2 (); | |
2268 | /* The GNU C library defines this for functions which it implements | |
2269 | to always fail with ENOSYS. Some functions are actually named | |
2270 | something starting with __ and the normal name is an alias. */ | |
2271 | #if defined __stub_$2 || defined __stub___$2 | |
2272 | choke me | |
2273 | #endif | |
2274 | ||
2275 | int | |
2276 | main () | |
2277 | { | |
2278 | return $2 (); | |
2279 | ; | |
2280 | return 0; | |
2281 | } | |
2282 | _ACEOF | |
2283 | if ac_fn_c_try_link "$LINENO"; then : | |
2284 | eval "$3=yes" | |
2285 | else | |
2286 | eval "$3=no" | |
2287 | fi | |
2288 | rm -f core conftest.err conftest.$ac_objext \ | |
2289 | conftest$ac_exeext conftest.$ac_ext | |
2290 | fi | |
2291 | eval ac_res=\$$3 | |
2292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2293 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2294 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
55a8c076 YQ |
2295 | |
2296 | } # ac_fn_c_check_func | |
2297 | ||
c56ccc05 MM |
2298 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2299 | # ---------------------------------------------------- | |
2300 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2301 | # INCLUDES, setting cache variable VAR accordingly. | |
2302 | ac_fn_c_check_member () | |
2303 | { | |
2304 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2305 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2306 | $as_echo_n "checking for $2.$3... " >&6; } | |
d0ac1c44 | 2307 | if eval \${$4+:} false; then : |
c56ccc05 MM |
2308 | $as_echo_n "(cached) " >&6 |
2309 | else | |
2310 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2311 | /* end confdefs.h. */ | |
2312 | $5 | |
2313 | int | |
2314 | main () | |
2315 | { | |
2316 | static $2 ac_aggr; | |
2317 | if (ac_aggr.$3) | |
2318 | return 0; | |
2319 | ; | |
2320 | return 0; | |
2321 | } | |
2322 | _ACEOF | |
2323 | if ac_fn_c_try_compile "$LINENO"; then : | |
2324 | eval "$4=yes" | |
2325 | else | |
2326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2327 | /* end confdefs.h. */ | |
2328 | $5 | |
2329 | int | |
2330 | main () | |
2331 | { | |
2332 | static $2 ac_aggr; | |
2333 | if (sizeof ac_aggr.$3) | |
2334 | return 0; | |
2335 | ; | |
2336 | return 0; | |
2337 | } | |
2338 | _ACEOF | |
2339 | if ac_fn_c_try_compile "$LINENO"; then : | |
2340 | eval "$4=yes" | |
2341 | else | |
2342 | eval "$4=no" | |
2343 | fi | |
2344 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2345 | fi | |
2346 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2347 | fi | |
2348 | eval ac_res=\$$4 | |
2349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2350 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2351 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
c56ccc05 MM |
2352 | |
2353 | } # ac_fn_c_check_member | |
2354 | ||
07697489 PA |
2355 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2356 | # ------------------------------------------- | |
2357 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2358 | # variable VAR accordingly. | |
2359 | ac_fn_c_check_type () | |
2360 | { | |
2361 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2363 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2364 | if eval \${$3+:} false; then : |
07697489 PA |
2365 | $as_echo_n "(cached) " >&6 |
2366 | else | |
2367 | eval "$3=no" | |
2368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2369 | /* end confdefs.h. */ | |
2370 | $4 | |
2371 | int | |
2372 | main () | |
2373 | { | |
2374 | if (sizeof ($2)) | |
2375 | return 0; | |
2376 | ; | |
2377 | return 0; | |
2378 | } | |
2379 | _ACEOF | |
2380 | if ac_fn_c_try_compile "$LINENO"; then : | |
2381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2382 | /* end confdefs.h. */ | |
2383 | $4 | |
2384 | int | |
2385 | main () | |
2386 | { | |
2387 | if (sizeof (($2))) | |
2388 | return 0; | |
2389 | ; | |
2390 | return 0; | |
2391 | } | |
2392 | _ACEOF | |
2393 | if ac_fn_c_try_compile "$LINENO"; then : | |
2394 | ||
2395 | else | |
2396 | eval "$3=yes" | |
2397 | fi | |
2398 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2399 | fi | |
2400 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2401 | fi | |
2402 | eval ac_res=\$$3 | |
2403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2404 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2405 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
07697489 PA |
2406 | |
2407 | } # ac_fn_c_check_type | |
2408 | ||
d0ac1c44 SM |
2409 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2410 | # --------------------------------------------- | |
2411 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2412 | # accordingly. | |
770d76d7 PA |
2413 | ac_fn_c_check_decl () |
2414 | { | |
2415 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2416 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2417 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2419 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
d0ac1c44 | 2420 | if eval \${$3+:} false; then : |
770d76d7 PA |
2421 | $as_echo_n "(cached) " >&6 |
2422 | else | |
2423 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2424 | /* end confdefs.h. */ | |
2425 | $4 | |
2426 | int | |
2427 | main () | |
2428 | { | |
2429 | #ifndef $as_decl_name | |
2430 | #ifdef __cplusplus | |
2431 | (void) $as_decl_use; | |
2432 | #else | |
2433 | (void) $as_decl_name; | |
2434 | #endif | |
2435 | #endif | |
2436 | ||
2437 | ; | |
2438 | return 0; | |
2439 | } | |
2440 | _ACEOF | |
2441 | if ac_fn_c_try_compile "$LINENO"; then : | |
2442 | eval "$3=yes" | |
2443 | else | |
2444 | eval "$3=no" | |
2445 | fi | |
2446 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2447 | fi | |
2448 | eval ac_res=\$$3 | |
2449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2450 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2451 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
770d76d7 PA |
2452 | |
2453 | } # ac_fn_c_check_decl | |
81ecdfbb RW |
2454 | cat >config.log <<_ACEOF |
2455 | This file contains any messages produced by compilers while | |
2456 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2457 | |
81ecdfbb | 2458 | It was created by $as_me, which was |
d0ac1c44 | 2459 | generated by GNU Autoconf 2.69. Invocation command line was |
b4e70030 | 2460 | |
81ecdfbb | 2461 | $ $0 $@ |
413ccac7 | 2462 | |
81ecdfbb RW |
2463 | _ACEOF |
2464 | exec 5>>config.log | |
2465 | { | |
2466 | cat <<_ASUNAME | |
2467 | ## --------- ## | |
2468 | ## Platform. ## | |
2469 | ## --------- ## | |
413ccac7 | 2470 | |
81ecdfbb RW |
2471 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2472 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2473 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2474 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2475 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2476 | |
81ecdfbb RW |
2477 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2478 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2479 | |
81ecdfbb RW |
2480 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2481 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2482 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2483 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2484 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2485 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2486 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2487 | |
81ecdfbb | 2488 | _ASUNAME |
bec39cab | 2489 | |
bec39cab AC |
2490 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2491 | for as_dir in $PATH | |
2492 | do | |
2493 | IFS=$as_save_IFS | |
2494 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2495 | $as_echo "PATH: $as_dir" |
2496 | done | |
2497 | IFS=$as_save_IFS | |
bec39cab | 2498 | |
81ecdfbb | 2499 | } >&5 |
bec39cab | 2500 | |
81ecdfbb | 2501 | cat >&5 <<_ACEOF |
bec39cab | 2502 | |
bec39cab | 2503 | |
81ecdfbb RW |
2504 | ## ----------- ## |
2505 | ## Core tests. ## | |
2506 | ## ----------- ## | |
2507 | ||
2508 | _ACEOF | |
2509 | ||
2510 | ||
2511 | # Keep a trace of the command line. | |
2512 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2513 | # Strip out --silent because we don't want to record it for future runs. | |
2514 | # Also quote any args containing shell meta-characters. | |
2515 | # Make two passes to allow for proper duplicate-argument suppression. | |
2516 | ac_configure_args= | |
2517 | ac_configure_args0= | |
2518 | ac_configure_args1= | |
2519 | ac_must_keep_next=false | |
2520 | for ac_pass in 1 2 | |
2521 | do | |
2522 | for ac_arg | |
2523 | do | |
2524 | case $ac_arg in | |
2525 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2526 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2527 | | -silent | --silent | --silen | --sile | --sil) | |
2528 | continue ;; | |
2529 | *\'*) | |
2530 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2531 | esac | |
2532 | case $ac_pass in | |
2533 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2534 | 2) | |
2535 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2536 | if test $ac_must_keep_next = true; then | |
2537 | ac_must_keep_next=false # Got value, back to normal. | |
2538 | else | |
2539 | case $ac_arg in | |
2540 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2541 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2542 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2543 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2544 | case "$ac_configure_args0 " in | |
2545 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2546 | esac | |
2547 | ;; | |
2548 | -* ) ac_must_keep_next=true ;; | |
2549 | esac | |
2550 | fi | |
2551 | as_fn_append ac_configure_args " '$ac_arg'" | |
2552 | ;; | |
2553 | esac | |
2554 | done | |
2555 | done | |
2556 | { ac_configure_args0=; unset ac_configure_args0;} | |
2557 | { ac_configure_args1=; unset ac_configure_args1;} | |
2558 | ||
2559 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2560 | # config.log. We remove comments because anyway the quotes in there | |
2561 | # would cause problems or look ugly. | |
2562 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2563 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2564 | trap 'exit_status=$? | |
2565 | # Save into config.log some information that might help in debugging. | |
2566 | { | |
2567 | echo | |
2568 | ||
d0ac1c44 | 2569 | $as_echo "## ---------------- ## |
81ecdfbb | 2570 | ## Cache variables. ## |
d0ac1c44 | 2571 | ## ---------------- ##" |
81ecdfbb RW |
2572 | echo |
2573 | # The following way of writing the cache mishandles newlines in values, | |
2574 | ( | |
2575 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2576 | eval ac_val=\$$ac_var | |
2577 | case $ac_val in #( | |
2578 | *${as_nl}*) | |
2579 | case $ac_var in #( | |
2580 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2581 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2582 | esac | |
2583 | case $ac_var in #( | |
2584 | _ | IFS | as_nl) ;; #( | |
2585 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2586 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2587 | esac ;; | |
2588 | esac | |
2589 | done | |
2590 | (set) 2>&1 | | |
2591 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2592 | *${as_nl}ac_space=\ *) | |
2593 | sed -n \ | |
2594 | "s/'\''/'\''\\\\'\'''\''/g; | |
2595 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2596 | ;; #( | |
2597 | *) | |
2598 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2599 | ;; | |
2600 | esac | | |
2601 | sort | |
2602 | ) | |
2603 | echo | |
2604 | ||
d0ac1c44 | 2605 | $as_echo "## ----------------- ## |
81ecdfbb | 2606 | ## Output variables. ## |
d0ac1c44 | 2607 | ## ----------------- ##" |
81ecdfbb RW |
2608 | echo |
2609 | for ac_var in $ac_subst_vars | |
2610 | do | |
2611 | eval ac_val=\$$ac_var | |
2612 | case $ac_val in | |
2613 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2614 | esac | |
2615 | $as_echo "$ac_var='\''$ac_val'\''" | |
2616 | done | sort | |
2617 | echo | |
2618 | ||
2619 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2620 | $as_echo "## ------------------- ## |
81ecdfbb | 2621 | ## File substitutions. ## |
d0ac1c44 | 2622 | ## ------------------- ##" |
81ecdfbb RW |
2623 | echo |
2624 | for ac_var in $ac_subst_files | |
2625 | do | |
2626 | eval ac_val=\$$ac_var | |
2627 | case $ac_val in | |
2628 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2629 | esac | |
2630 | $as_echo "$ac_var='\''$ac_val'\''" | |
2631 | done | sort | |
2632 | echo | |
2633 | fi | |
2634 | ||
2635 | if test -s confdefs.h; then | |
d0ac1c44 | 2636 | $as_echo "## ----------- ## |
81ecdfbb | 2637 | ## confdefs.h. ## |
d0ac1c44 | 2638 | ## ----------- ##" |
81ecdfbb RW |
2639 | echo |
2640 | cat confdefs.h | |
2641 | echo | |
2642 | fi | |
2643 | test "$ac_signal" != 0 && | |
2644 | $as_echo "$as_me: caught signal $ac_signal" | |
2645 | $as_echo "$as_me: exit $exit_status" | |
2646 | } >&5 | |
2647 | rm -f core *.core core.conftest.* && | |
2648 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2649 | exit $exit_status | |
2650 | ' 0 | |
2651 | for ac_signal in 1 2 13 15; do | |
2652 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2653 | done | |
2654 | ac_signal=0 | |
2655 | ||
2656 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2657 | rm -f -r conftest* confdefs.h | |
2658 | ||
2659 | $as_echo "/* confdefs.h */" > confdefs.h | |
2660 | ||
2661 | # Predefined preprocessor variables. | |
2662 | ||
2663 | cat >>confdefs.h <<_ACEOF | |
2664 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2665 | _ACEOF | |
2666 | ||
2667 | cat >>confdefs.h <<_ACEOF | |
2668 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2669 | _ACEOF | |
2670 | ||
2671 | cat >>confdefs.h <<_ACEOF | |
2672 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2673 | _ACEOF | |
2674 | ||
2675 | cat >>confdefs.h <<_ACEOF | |
2676 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2677 | _ACEOF | |
2678 | ||
2679 | cat >>confdefs.h <<_ACEOF | |
2680 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2681 | _ACEOF | |
2682 | ||
2683 | cat >>confdefs.h <<_ACEOF | |
2684 | #define PACKAGE_URL "$PACKAGE_URL" | |
2685 | _ACEOF | |
2686 | ||
2687 | ||
2688 | # Let the site file select an alternate cache file if it wants to. | |
2689 | # Prefer an explicitly selected file to automatically selected ones. | |
2690 | ac_site_file1=NONE | |
2691 | ac_site_file2=NONE | |
2692 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2693 | # We do not want a PATH search for config.site. |
2694 | case $CONFIG_SITE in #(( | |
2695 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2696 | */*) ac_site_file1=$CONFIG_SITE;; | |
2697 | *) ac_site_file1=./$CONFIG_SITE;; | |
2698 | esac | |
81ecdfbb RW |
2699 | elif test "x$prefix" != xNONE; then |
2700 | ac_site_file1=$prefix/share/config.site | |
2701 | ac_site_file2=$prefix/etc/config.site | |
2702 | else | |
2703 | ac_site_file1=$ac_default_prefix/share/config.site | |
2704 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2705 | fi | |
2706 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2707 | do | |
2708 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2709 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2710 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2711 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2712 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
2713 | . "$ac_site_file" \ |
2714 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2715 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2716 | as_fn_error $? "failed to load site script $ac_site_file | |
2717 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
2718 | fi |
2719 | done | |
2720 | ||
2721 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2722 | # Some versions of bash will fail to source /dev/null (special files |
2723 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2724 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2725 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2726 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2727 | case $cache_file in | |
2728 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2729 | *) . "./$cache_file";; | |
2730 | esac | |
2731 | fi | |
2732 | else | |
2733 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2734 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2735 | >$cache_file | |
bec39cab AC |
2736 | fi |
2737 | ||
d0ac1c44 SM |
2738 | as_fn_append ac_header_list " stdlib.h" |
2739 | as_fn_append ac_header_list " unistd.h" | |
2740 | as_fn_append ac_header_list " sys/param.h" | |
81ecdfbb RW |
2741 | # Check that the precious variables saved in the cache have kept the same |
2742 | # value. | |
2743 | ac_cache_corrupted=false | |
2744 | for ac_var in $ac_precious_vars; do | |
2745 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2746 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2747 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2748 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2749 | case $ac_old_set,$ac_new_set in | |
2750 | set,) | |
2751 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2752 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2753 | ac_cache_corrupted=: ;; | |
2754 | ,set) | |
2755 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2756 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2757 | ac_cache_corrupted=: ;; | |
2758 | ,);; | |
2759 | *) | |
2760 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2761 | # differences in whitespace do not lead to failure. | |
2762 | ac_old_val_w=`echo x $ac_old_val` | |
2763 | ac_new_val_w=`echo x $ac_new_val` | |
2764 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2765 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2766 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2767 | ac_cache_corrupted=: | |
2768 | else | |
2769 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2770 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2771 | eval $ac_var=\$ac_old_val | |
2772 | fi | |
2773 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2774 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2775 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2776 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2777 | fi;; | |
2778 | esac | |
2779 | # Pass precious variables to config.status. | |
2780 | if test "$ac_new_set" = set; then | |
2781 | case $ac_new_val in | |
2782 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2783 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2784 | esac | |
2785 | case " $ac_configure_args " in | |
2786 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2787 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2788 | esac | |
2789 | fi | |
2790 | done | |
2791 | if $ac_cache_corrupted; then | |
2792 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2793 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2794 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2795 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2796 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
81ecdfbb RW |
2797 | fi |
2798 | ## -------------------- ## | |
2799 | ## Main body of script. ## | |
2800 | ## -------------------- ## | |
2801 | ||
2802 | ac_ext=c | |
2803 | ac_cpp='$CPP $CPPFLAGS' | |
2804 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2805 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2806 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2807 | ||
2808 | ||
2809 | ||
2810 | ||
2811 | ||
2812 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2813 | ||
2814 | ||
2815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2816 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2817 | # Check whether --enable-maintainer-mode was given. | |
2818 | if test "${enable_maintainer_mode+set}" = set; then : | |
2819 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2820 | else | |
2821 | USE_MAINTAINER_MODE=no | |
2822 | fi | |
2823 | ||
2824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2825 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2826 | if test $USE_MAINTAINER_MODE = yes; then | |
2827 | MAINTAINER_MODE_TRUE= | |
2828 | MAINTAINER_MODE_FALSE='#' | |
2829 | else | |
2830 | MAINTAINER_MODE_TRUE='#' | |
2831 | MAINTAINER_MODE_FALSE= | |
2832 | fi | |
2833 | ||
2834 | MAINT=$MAINTAINER_MODE_TRUE | |
2835 | ||
2836 | ||
2837 | ||
17ef446e | 2838 | # Set the 'development' global. |
270c9937 | 2839 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2840 | |
81ecdfbb RW |
2841 | ac_ext=c |
2842 | ac_cpp='$CPP $CPPFLAGS' | |
2843 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2844 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2845 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2846 | if test -n "$ac_tool_prefix"; then | |
2847 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2848 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2850 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2851 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2852 | $as_echo_n "(cached) " >&6 |
c906108c SS |
2853 | else |
2854 | if test -n "$CC"; then | |
2855 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2856 | else | |
bec39cab AC |
2857 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2858 | for as_dir in $PATH | |
2859 | do | |
2860 | IFS=$as_save_IFS | |
2861 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2862 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2863 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2864 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
2865 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2866 | break 2 |
2867 | fi | |
2868 | done | |
81ecdfbb RW |
2869 | done |
2870 | IFS=$as_save_IFS | |
bec39cab | 2871 | |
c906108c SS |
2872 | fi |
2873 | fi | |
bec39cab | 2874 | CC=$ac_cv_prog_CC |
c906108c | 2875 | if test -n "$CC"; then |
81ecdfbb RW |
2876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2877 | $as_echo "$CC" >&6; } | |
c906108c | 2878 | else |
81ecdfbb RW |
2879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2880 | $as_echo "no" >&6; } | |
c906108c SS |
2881 | fi |
2882 | ||
81ecdfbb | 2883 | |
b4e70030 JB |
2884 | fi |
2885 | if test -z "$ac_cv_prog_CC"; then | |
2886 | ac_ct_CC=$CC | |
81ecdfbb RW |
2887 | # Extract the first word of "gcc", so it can be a program name with args. |
2888 | set dummy gcc; ac_word=$2 | |
2889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2890 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2891 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 2892 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
2893 | else |
2894 | if test -n "$ac_ct_CC"; then | |
2895 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2896 | else | |
2897 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2898 | for as_dir in $PATH | |
2899 | do | |
2900 | IFS=$as_save_IFS | |
2901 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2902 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2903 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2904 | ac_cv_prog_ac_ct_CC="gcc" |
2905 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2906 | break 2 |
4e8d927d | 2907 | fi |
b4e70030 | 2908 | done |
81ecdfbb RW |
2909 | done |
2910 | IFS=$as_save_IFS | |
b4e70030 JB |
2911 | |
2912 | fi | |
2913 | fi | |
2914 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2915 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2917 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2918 | else |
81ecdfbb RW |
2919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2920 | $as_echo "no" >&6; } | |
b4e70030 JB |
2921 | fi |
2922 | ||
81ecdfbb RW |
2923 | if test "x$ac_ct_CC" = x; then |
2924 | CC="" | |
2925 | else | |
2926 | case $cross_compiling:$ac_tool_warned in | |
2927 | yes:) | |
2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2929 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2930 | ac_tool_warned=yes ;; | |
2931 | esac | |
2932 | CC=$ac_ct_CC | |
2933 | fi | |
b4e70030 JB |
2934 | else |
2935 | CC="$ac_cv_prog_CC" | |
2936 | fi | |
2937 | ||
c906108c | 2938 | if test -z "$CC"; then |
81ecdfbb RW |
2939 | if test -n "$ac_tool_prefix"; then |
2940 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2941 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2943 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2944 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2945 | $as_echo_n "(cached) " >&6 |
c906108c SS |
2946 | else |
2947 | if test -n "$CC"; then | |
2948 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2949 | else | |
bec39cab AC |
2950 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2951 | for as_dir in $PATH | |
2952 | do | |
2953 | IFS=$as_save_IFS | |
2954 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2955 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2956 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2957 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
2958 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2959 | break 2 |
2960 | fi | |
2961 | done | |
81ecdfbb RW |
2962 | done |
2963 | IFS=$as_save_IFS | |
2964 | ||
2965 | fi | |
2966 | fi | |
2967 | CC=$ac_cv_prog_CC | |
2968 | if test -n "$CC"; then | |
2969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2970 | $as_echo "$CC" >&6; } | |
2971 | else | |
2972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2973 | $as_echo "no" >&6; } | |
2974 | fi | |
2975 | ||
2976 | ||
2977 | fi | |
2978 | fi | |
2979 | if test -z "$CC"; then | |
2980 | # Extract the first word of "cc", so it can be a program name with args. | |
2981 | set dummy cc; ac_word=$2 | |
2982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2983 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2984 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb RW |
2985 | $as_echo_n "(cached) " >&6 |
2986 | else | |
2987 | if test -n "$CC"; then | |
2988 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2989 | else | |
2990 | ac_prog_rejected=no | |
2991 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2992 | for as_dir in $PATH | |
2993 | do | |
2994 | IFS=$as_save_IFS | |
2995 | test -z "$as_dir" && as_dir=. | |
2996 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 2997 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2998 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
2999 | ac_prog_rejected=yes | |
3000 | continue | |
3001 | fi | |
3002 | ac_cv_prog_CC="cc" | |
3003 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3004 | break 2 | |
3005 | fi | |
3006 | done | |
3007 | done | |
3008 | IFS=$as_save_IFS | |
bec39cab | 3009 | |
c906108c SS |
3010 | if test $ac_prog_rejected = yes; then |
3011 | # We found a bogon in the path, so make sure we never use it. | |
3012 | set dummy $ac_cv_prog_CC | |
3013 | shift | |
bec39cab | 3014 | if test $# != 0; then |
c906108c SS |
3015 | # We chose a different compiler from the bogus one. |
3016 | # However, it has the same basename, so the bogon will be chosen | |
3017 | # first if we set CC to just the basename; use the full file name. | |
3018 | shift | |
bec39cab | 3019 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3020 | fi |
3021 | fi | |
3022 | fi | |
3023 | fi | |
bec39cab | 3024 | CC=$ac_cv_prog_CC |
c906108c | 3025 | if test -n "$CC"; then |
81ecdfbb RW |
3026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3027 | $as_echo "$CC" >&6; } | |
c906108c | 3028 | else |
81ecdfbb RW |
3029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3030 | $as_echo "no" >&6; } | |
c906108c SS |
3031 | fi |
3032 | ||
81ecdfbb | 3033 | |
bec39cab AC |
3034 | fi |
3035 | if test -z "$CC"; then | |
3036 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3037 | for ac_prog in cl.exe |
bec39cab AC |
3038 | do |
3039 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3040 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3042 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3043 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3044 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3045 | else |
3046 | if test -n "$CC"; then | |
3047 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3048 | else | |
bec39cab AC |
3049 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3050 | for as_dir in $PATH | |
3051 | do | |
3052 | IFS=$as_save_IFS | |
3053 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3054 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3055 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3056 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3057 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3058 | break 2 |
3059 | fi | |
3060 | done | |
81ecdfbb RW |
3061 | done |
3062 | IFS=$as_save_IFS | |
bec39cab | 3063 | |
c906108c SS |
3064 | fi |
3065 | fi | |
bec39cab | 3066 | CC=$ac_cv_prog_CC |
c906108c | 3067 | if test -n "$CC"; then |
81ecdfbb RW |
3068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3069 | $as_echo "$CC" >&6; } | |
c906108c | 3070 | else |
81ecdfbb RW |
3071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3072 | $as_echo "no" >&6; } | |
c906108c | 3073 | fi |
bec39cab | 3074 | |
81ecdfbb | 3075 | |
bec39cab AC |
3076 | test -n "$CC" && break |
3077 | done | |
3078 | fi | |
3079 | if test -z "$CC"; then | |
3080 | ac_ct_CC=$CC | |
81ecdfbb | 3081 | for ac_prog in cl.exe |
bec39cab AC |
3082 | do |
3083 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3084 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3086 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3087 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3088 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3089 | else |
3090 | if test -n "$ac_ct_CC"; then | |
3091 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3092 | else | |
3093 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3094 | for as_dir in $PATH | |
3095 | do | |
3096 | IFS=$as_save_IFS | |
3097 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3098 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3099 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3100 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3101 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3102 | break 2 |
c906108c | 3103 | fi |
bec39cab | 3104 | done |
81ecdfbb RW |
3105 | done |
3106 | IFS=$as_save_IFS | |
bec39cab AC |
3107 | |
3108 | fi | |
3109 | fi | |
3110 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3111 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3113 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3114 | else |
81ecdfbb RW |
3115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3116 | $as_echo "no" >&6; } | |
c906108c SS |
3117 | fi |
3118 | ||
81ecdfbb | 3119 | |
bec39cab AC |
3120 | test -n "$ac_ct_CC" && break |
3121 | done | |
c906108c | 3122 | |
81ecdfbb RW |
3123 | if test "x$ac_ct_CC" = x; then |
3124 | CC="" | |
3125 | else | |
3126 | case $cross_compiling:$ac_tool_warned in | |
3127 | yes:) | |
3128 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3129 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3130 | ac_tool_warned=yes ;; | |
3131 | esac | |
3132 | CC=$ac_ct_CC | |
3133 | fi | |
bec39cab AC |
3134 | fi |
3135 | ||
3136 | fi | |
3137 | ||
3138 | ||
81ecdfbb RW |
3139 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3140 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3141 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3142 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3143 | |
3144 | # Provide some information about the compiler. | |
81ecdfbb RW |
3145 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3146 | set X $ac_compile | |
3147 | ac_compiler=$2 | |
3148 | for ac_option in --version -v -V -qversion; do | |
3149 | { { ac_try="$ac_compiler $ac_option >&5" | |
3150 | case "(($ac_try" in | |
3151 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3152 | *) ac_try_echo=$ac_try;; | |
3153 | esac | |
3154 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3155 | $as_echo "$ac_try_echo"; } >&5 | |
3156 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3157 | ac_status=$? |
81ecdfbb RW |
3158 | if test -s conftest.err; then |
3159 | sed '10a\ | |
3160 | ... rest of stderr output deleted ... | |
3161 | 10q' conftest.err >conftest.er1 | |
3162 | cat conftest.er1 >&5 | |
81ecdfbb | 3163 | fi |
d0ac1c44 | 3164 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3165 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3166 | test $ac_status = 0; } | |
3167 | done | |
bec39cab | 3168 | |
81ecdfbb | 3169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3170 | /* end confdefs.h. */ |
3171 | ||
3172 | int | |
3173 | main () | |
3174 | { | |
3175 | ||
3176 | ; | |
3177 | return 0; | |
3178 | } | |
3179 | _ACEOF | |
3180 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3181 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3182 | # Try to create an executable without -o first, disregard a.out. |
3183 | # It will help us diagnose broken compilers, and finding out an intuition | |
3184 | # of exeext. | |
d0ac1c44 SM |
3185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3186 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3187 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3188 | ||
3189 | # The possible output files: | |
3190 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3191 | ||
3192 | ac_rmfiles= | |
3193 | for ac_file in $ac_files | |
3194 | do | |
3195 | case $ac_file in | |
3196 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3197 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3198 | esac | |
3199 | done | |
3200 | rm -f $ac_rmfiles | |
3201 | ||
3202 | if { { ac_try="$ac_link_default" | |
3203 | case "(($ac_try" in | |
3204 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3205 | *) ac_try_echo=$ac_try;; | |
3206 | esac | |
3207 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3208 | $as_echo "$ac_try_echo"; } >&5 | |
3209 | (eval "$ac_link_default") 2>&5 | |
3210 | ac_status=$? | |
3211 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3212 | test $ac_status = 0; }; then : | |
3213 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3214 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3215 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3216 | # so that the user can short-circuit this test for compilers unknown to | |
3217 | # Autoconf. | |
3218 | for ac_file in $ac_files '' | |
bec39cab AC |
3219 | do |
3220 | test -f "$ac_file" || continue | |
3221 | case $ac_file in | |
81ecdfbb | 3222 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3223 | ;; |
3224 | [ab].out ) | |
3225 | # We found the default executable, but exeext='' is most | |
3226 | # certainly right. | |
3227 | break;; | |
3228 | *.* ) | |
81ecdfbb RW |
3229 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3230 | then :; else | |
3231 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3232 | fi | |
3233 | # We set ac_cv_exeext here because the later test for it is not | |
3234 | # safe: cross compilers may not add the suffix if given an `-o' | |
3235 | # argument, so we may need to know it at that point already. | |
3236 | # Even if this section looks crufty: it has the advantage of | |
3237 | # actually working. | |
b4e70030 JB |
3238 | break;; |
3239 | * ) | |
3240 | break;; | |
bec39cab AC |
3241 | esac |
3242 | done | |
81ecdfbb RW |
3243 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3244 | ||
bec39cab | 3245 | else |
81ecdfbb RW |
3246 | ac_file='' |
3247 | fi | |
81ecdfbb | 3248 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3250 | $as_echo "no" >&6; } | |
3251 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3252 | sed 's/^/| /' conftest.$ac_ext >&5 |
3253 | ||
81ecdfbb RW |
3254 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3255 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3256 | as_fn_error 77 "C compiler cannot create executables |
3257 | See \`config.log' for more details" "$LINENO" 5; } | |
3258 | else | |
3259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3260 | $as_echo "yes" >&6; } | |
bec39cab | 3261 | fi |
d0ac1c44 SM |
3262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3263 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3265 | $as_echo "$ac_file" >&6; } | |
b4e70030 | 3266 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3267 | |
d0ac1c44 | 3268 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
b4e70030 | 3269 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3271 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3272 | if { { ac_try="$ac_link" | |
3273 | case "(($ac_try" in | |
3274 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3275 | *) ac_try_echo=$ac_try;; | |
3276 | esac | |
3277 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3278 | $as_echo "$ac_try_echo"; } >&5 | |
3279 | (eval "$ac_link") 2>&5 | |
bec39cab | 3280 | ac_status=$? |
81ecdfbb RW |
3281 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3282 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3283 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3284 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3285 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3286 | # `rm'. | |
3287 | for ac_file in conftest.exe conftest conftest.*; do | |
3288 | test -f "$ac_file" || continue | |
3289 | case $ac_file in | |
81ecdfbb | 3290 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3291 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3292 | break;; |
3293 | * ) break;; | |
3294 | esac | |
3295 | done | |
c906108c | 3296 | else |
81ecdfbb RW |
3297 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3298 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3299 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3300 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3301 | fi |
d0ac1c44 | 3302 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3304 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3305 | |
b4e70030 | 3306 | rm -f conftest.$ac_ext |
bec39cab AC |
3307 | EXEEXT=$ac_cv_exeext |
3308 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3310 | /* end confdefs.h. */ | |
3311 | #include <stdio.h> | |
3312 | int | |
3313 | main () | |
3314 | { | |
3315 | FILE *f = fopen ("conftest.out", "w"); | |
3316 | return ferror (f) || fclose (f) != 0; | |
3317 | ||
3318 | ; | |
3319 | return 0; | |
3320 | } | |
3321 | _ACEOF | |
3322 | ac_clean_files="$ac_clean_files conftest.out" | |
3323 | # Check that the compiler produces executables we can run. If not, either | |
3324 | # the compiler is broken, or we cross compile. | |
3325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3326 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3327 | if test "$cross_compiling" != yes; then | |
3328 | { { ac_try="$ac_link" | |
3329 | case "(($ac_try" in | |
3330 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3331 | *) ac_try_echo=$ac_try;; | |
3332 | esac | |
3333 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3334 | $as_echo "$ac_try_echo"; } >&5 | |
3335 | (eval "$ac_link") 2>&5 | |
3336 | ac_status=$? | |
3337 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3338 | test $ac_status = 0; } | |
3339 | if { ac_try='./conftest$ac_cv_exeext' | |
3340 | { { case "(($ac_try" in | |
3341 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3342 | *) ac_try_echo=$ac_try;; | |
3343 | esac | |
3344 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3345 | $as_echo "$ac_try_echo"; } >&5 | |
3346 | (eval "$ac_try") 2>&5 | |
3347 | ac_status=$? | |
3348 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3349 | test $ac_status = 0; }; }; then | |
3350 | cross_compiling=no | |
3351 | else | |
3352 | if test "$cross_compiling" = maybe; then | |
3353 | cross_compiling=yes | |
3354 | else | |
3355 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3356 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3357 | as_fn_error $? "cannot run C compiled programs. | |
3358 | If you meant to cross compile, use \`--host'. | |
3359 | See \`config.log' for more details" "$LINENO" 5; } | |
3360 | fi | |
3361 | fi | |
3362 | fi | |
3363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3364 | $as_echo "$cross_compiling" >&6; } | |
3365 | ||
3366 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3367 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3369 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3370 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3371 | $as_echo_n "(cached) " >&6 |
bec39cab | 3372 | else |
81ecdfbb | 3373 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3374 | /* end confdefs.h. */ |
3375 | ||
3376 | int | |
3377 | main () | |
3378 | { | |
3379 | ||
3380 | ; | |
3381 | return 0; | |
3382 | } | |
3383 | _ACEOF | |
3384 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3385 | if { { ac_try="$ac_compile" |
3386 | case "(($ac_try" in | |
3387 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3388 | *) ac_try_echo=$ac_try;; | |
3389 | esac | |
3390 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3391 | $as_echo "$ac_try_echo"; } >&5 | |
3392 | (eval "$ac_compile") 2>&5 | |
3393 | ac_status=$? | |
3394 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3395 | test $ac_status = 0; }; then : | |
3396 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3397 | test -f "$ac_file" || continue; | |
bec39cab | 3398 | case $ac_file in |
81ecdfbb | 3399 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3400 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3401 | break;; | |
3402 | esac | |
3403 | done | |
c906108c | 3404 | else |
81ecdfbb | 3405 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3406 | sed 's/^/| /' conftest.$ac_ext >&5 |
3407 | ||
81ecdfbb RW |
3408 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3409 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3410 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3411 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3412 | fi |
b4e70030 | 3413 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3414 | fi |
81ecdfbb RW |
3415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3416 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3417 | OBJEXT=$ac_cv_objext |
3418 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3419 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3420 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3421 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3422 | $as_echo_n "(cached) " >&6 |
c906108c | 3423 | else |
81ecdfbb | 3424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3425 | /* end confdefs.h. */ |
3426 | ||
3427 | int | |
3428 | main () | |
3429 | { | |
3430 | #ifndef __GNUC__ | |
3431 | choke me | |
3432 | #endif | |
3433 | ||
3434 | ; | |
3435 | return 0; | |
3436 | } | |
3437 | _ACEOF | |
81ecdfbb | 3438 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3439 | ac_compiler_gnu=yes |
3440 | else | |
81ecdfbb | 3441 | ac_compiler_gnu=no |
bec39cab | 3442 | fi |
81ecdfbb | 3443 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3444 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3445 | ||
3446 | fi | |
81ecdfbb RW |
3447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3448 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3449 | if test $ac_compiler_gnu = yes; then | |
3450 | GCC=yes | |
3451 | else | |
3452 | GCC= | |
3453 | fi | |
bec39cab AC |
3454 | ac_test_CFLAGS=${CFLAGS+set} |
3455 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3457 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3458 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb | 3459 | $as_echo_n "(cached) " >&6 |
bec39cab | 3460 | else |
81ecdfbb RW |
3461 | ac_save_c_werror_flag=$ac_c_werror_flag |
3462 | ac_c_werror_flag=yes | |
3463 | ac_cv_prog_cc_g=no | |
3464 | CFLAGS="-g" | |
3465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3466 | /* end confdefs.h. */ |
3467 | ||
3468 | int | |
3469 | main () | |
3470 | { | |
3471 | ||
3472 | ; | |
3473 | return 0; | |
3474 | } | |
3475 | _ACEOF | |
81ecdfbb | 3476 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3477 | ac_cv_prog_cc_g=yes |
3478 | else | |
81ecdfbb RW |
3479 | CFLAGS="" |
3480 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3481 | /* end confdefs.h. */ | |
3482 | ||
3483 | int | |
3484 | main () | |
3485 | { | |
3486 | ||
3487 | ; | |
3488 | return 0; | |
3489 | } | |
3490 | _ACEOF | |
3491 | if ac_fn_c_try_compile "$LINENO"; then : | |
3492 | ||
3493 | else | |
3494 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3495 | CFLAGS="-g" | |
3496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3497 | /* end confdefs.h. */ | |
3498 | ||
3499 | int | |
3500 | main () | |
3501 | { | |
c906108c | 3502 | |
81ecdfbb RW |
3503 | ; |
3504 | return 0; | |
3505 | } | |
3506 | _ACEOF | |
3507 | if ac_fn_c_try_compile "$LINENO"; then : | |
3508 | ac_cv_prog_cc_g=yes | |
3509 | fi | |
3510 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3511 | fi | |
3512 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3513 | fi |
81ecdfbb RW |
3514 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3515 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3516 | fi |
81ecdfbb RW |
3517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3518 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3519 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3520 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3521 | elif test $ac_cv_prog_cc_g = yes; then |
3522 | if test "$GCC" = yes; then | |
3523 | CFLAGS="-g -O2" | |
3524 | else | |
3525 | CFLAGS="-g" | |
3526 | fi | |
3527 | else | |
3528 | if test "$GCC" = yes; then | |
3529 | CFLAGS="-O2" | |
3530 | else | |
3531 | CFLAGS= | |
3532 | fi | |
3533 | fi | |
81ecdfbb RW |
3534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3535 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3536 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3537 | $as_echo_n "(cached) " >&6 |
bec39cab | 3538 | else |
81ecdfbb | 3539 | ac_cv_prog_cc_c89=no |
bec39cab | 3540 | ac_save_CC=$CC |
81ecdfbb | 3541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3542 | /* end confdefs.h. */ |
c906108c SS |
3543 | #include <stdarg.h> |
3544 | #include <stdio.h> | |
d0ac1c44 | 3545 | struct stat; |
c906108c SS |
3546 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3547 | struct buf { int x; }; | |
3548 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3549 | static char *e (p, i) | |
3550 | char **p; | |
3551 | int i; | |
3552 | { | |
3553 | return p[i]; | |
3554 | } | |
3555 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3556 | { | |
3557 | char *s; | |
3558 | va_list v; | |
3559 | va_start (v,p); | |
3560 | s = g (p, va_arg (v,int)); | |
3561 | va_end (v); | |
3562 | return s; | |
3563 | } | |
bec39cab AC |
3564 | |
3565 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3566 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3567 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3568 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3569 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3570 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3571 | that's true only with -std. */ |
bec39cab AC |
3572 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3573 | ||
81ecdfbb RW |
3574 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3575 | inside strings and character constants. */ | |
3576 | #define FOO(x) 'x' | |
3577 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3578 | ||
c906108c SS |
3579 | int test (int i, double x); |
3580 | struct s1 {int (*f) (int a);}; | |
3581 | struct s2 {int (*f) (double a);}; | |
3582 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3583 | int argc; | |
3584 | char **argv; | |
bec39cab AC |
3585 | int |
3586 | main () | |
3587 | { | |
c906108c | 3588 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3589 | ; |
3590 | return 0; | |
3591 | } | |
3592 | _ACEOF | |
81ecdfbb RW |
3593 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3594 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3595 | do |
3596 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3597 | if ac_fn_c_try_compile "$LINENO"; then : |
3598 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3599 | fi |
81ecdfbb RW |
3600 | rm -f core conftest.err conftest.$ac_objext |
3601 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3602 | done |
81ecdfbb | 3603 | rm -f conftest.$ac_ext |
bec39cab | 3604 | CC=$ac_save_CC |
c906108c SS |
3605 | |
3606 | fi | |
81ecdfbb RW |
3607 | # AC_CACHE_VAL |
3608 | case "x$ac_cv_prog_cc_c89" in | |
3609 | x) | |
3610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3611 | $as_echo "none needed" >&6; } ;; | |
3612 | xno) | |
3613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3614 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3615 | *) |
81ecdfbb RW |
3616 | CC="$CC $ac_cv_prog_cc_c89" |
3617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3618 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3619 | esac |
81ecdfbb | 3620 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3621 | |
b4e70030 JB |
3622 | fi |
3623 | ||
bec39cab AC |
3624 | ac_ext=c |
3625 | ac_cpp='$CPP $CPPFLAGS' | |
3626 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3627 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3628 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3629 | |
3bc3d82a PA |
3630 | ac_ext=cpp |
3631 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3632 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3633 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3634 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3635 | if test -z "$CXX"; then | |
3636 | if test -n "$CCC"; then | |
3637 | CXX=$CCC | |
3638 | else | |
3639 | if test -n "$ac_tool_prefix"; then | |
3640 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3641 | do | |
3642 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3643 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3644 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3645 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3646 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3647 | $as_echo_n "(cached) " >&6 |
3648 | else | |
3649 | if test -n "$CXX"; then | |
3650 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3651 | else | |
3652 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3653 | for as_dir in $PATH | |
3654 | do | |
3655 | IFS=$as_save_IFS | |
3656 | test -z "$as_dir" && as_dir=. | |
3657 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3658 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3659 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3660 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3661 | break 2 | |
3662 | fi | |
3663 | done | |
3664 | done | |
3665 | IFS=$as_save_IFS | |
3666 | ||
3667 | fi | |
3668 | fi | |
3669 | CXX=$ac_cv_prog_CXX | |
3670 | if test -n "$CXX"; then | |
3671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3672 | $as_echo "$CXX" >&6; } | |
3673 | else | |
3674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3675 | $as_echo "no" >&6; } | |
3676 | fi | |
3677 | ||
3678 | ||
3679 | test -n "$CXX" && break | |
3680 | done | |
3681 | fi | |
3682 | if test -z "$CXX"; then | |
3683 | ac_ct_CXX=$CXX | |
3684 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3685 | do | |
3686 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3687 | set dummy $ac_prog; ac_word=$2 | |
3688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3689 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3690 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3691 | $as_echo_n "(cached) " >&6 |
3692 | else | |
3693 | if test -n "$ac_ct_CXX"; then | |
3694 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3695 | else | |
3696 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3697 | for as_dir in $PATH | |
3698 | do | |
3699 | IFS=$as_save_IFS | |
3700 | test -z "$as_dir" && as_dir=. | |
3701 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3702 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3703 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3704 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3705 | break 2 | |
3706 | fi | |
3707 | done | |
3708 | done | |
3709 | IFS=$as_save_IFS | |
3710 | ||
3711 | fi | |
3712 | fi | |
3713 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3714 | if test -n "$ac_ct_CXX"; then | |
3715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3716 | $as_echo "$ac_ct_CXX" >&6; } | |
3717 | else | |
3718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3719 | $as_echo "no" >&6; } | |
3720 | fi | |
3721 | ||
3722 | ||
3723 | test -n "$ac_ct_CXX" && break | |
3724 | done | |
3725 | ||
3726 | if test "x$ac_ct_CXX" = x; then | |
3727 | CXX="g++" | |
3728 | else | |
3729 | case $cross_compiling:$ac_tool_warned in | |
3730 | yes:) | |
3731 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3732 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3733 | ac_tool_warned=yes ;; | |
3734 | esac | |
3735 | CXX=$ac_ct_CXX | |
3736 | fi | |
3737 | fi | |
3738 | ||
3739 | fi | |
3740 | fi | |
3741 | # Provide some information about the compiler. | |
3742 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3743 | set X $ac_compile | |
3744 | ac_compiler=$2 | |
3745 | for ac_option in --version -v -V -qversion; do | |
3746 | { { ac_try="$ac_compiler $ac_option >&5" | |
3747 | case "(($ac_try" in | |
3748 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3749 | *) ac_try_echo=$ac_try;; | |
3750 | esac | |
3751 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3752 | $as_echo "$ac_try_echo"; } >&5 | |
3753 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3754 | ac_status=$? | |
3755 | if test -s conftest.err; then | |
3756 | sed '10a\ | |
3757 | ... rest of stderr output deleted ... | |
3758 | 10q' conftest.err >conftest.er1 | |
3759 | cat conftest.er1 >&5 | |
3bc3d82a | 3760 | fi |
d0ac1c44 | 3761 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3762 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3763 | test $ac_status = 0; } | |
3764 | done | |
3765 | ||
3766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3767 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3768 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3769 | $as_echo_n "(cached) " >&6 |
3770 | else | |
3771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3772 | /* end confdefs.h. */ | |
3773 | ||
3774 | int | |
3775 | main () | |
3776 | { | |
3777 | #ifndef __GNUC__ | |
3778 | choke me | |
3779 | #endif | |
3780 | ||
3781 | ; | |
3782 | return 0; | |
3783 | } | |
3784 | _ACEOF | |
3785 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3786 | ac_compiler_gnu=yes | |
3787 | else | |
3788 | ac_compiler_gnu=no | |
3789 | fi | |
3790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3791 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3792 | ||
3793 | fi | |
3794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3795 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3796 | if test $ac_compiler_gnu = yes; then | |
3797 | GXX=yes | |
3798 | else | |
3799 | GXX= | |
3800 | fi | |
3801 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3802 | ac_save_CXXFLAGS=$CXXFLAGS | |
3803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3804 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3805 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3806 | $as_echo_n "(cached) " >&6 |
3807 | else | |
3808 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3809 | ac_cxx_werror_flag=yes | |
3810 | ac_cv_prog_cxx_g=no | |
3811 | CXXFLAGS="-g" | |
3812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3813 | /* end confdefs.h. */ | |
3814 | ||
3815 | int | |
3816 | main () | |
3817 | { | |
3818 | ||
3819 | ; | |
3820 | return 0; | |
3821 | } | |
3822 | _ACEOF | |
3823 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3824 | ac_cv_prog_cxx_g=yes | |
3825 | else | |
3826 | CXXFLAGS="" | |
3827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3828 | /* end confdefs.h. */ | |
3829 | ||
3830 | int | |
3831 | main () | |
3832 | { | |
3833 | ||
3834 | ; | |
3835 | return 0; | |
3836 | } | |
3837 | _ACEOF | |
3838 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3839 | ||
3840 | else | |
3841 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3842 | CXXFLAGS="-g" | |
3843 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3844 | /* end confdefs.h. */ | |
3845 | ||
3846 | int | |
3847 | main () | |
3848 | { | |
3849 | ||
3850 | ; | |
3851 | return 0; | |
3852 | } | |
3853 | _ACEOF | |
3854 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3855 | ac_cv_prog_cxx_g=yes | |
3856 | fi | |
3857 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3858 | fi | |
3859 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3860 | fi | |
3861 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3862 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3863 | fi | |
3864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3865 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3866 | if test "$ac_test_CXXFLAGS" = set; then | |
3867 | CXXFLAGS=$ac_save_CXXFLAGS | |
3868 | elif test $ac_cv_prog_cxx_g = yes; then | |
3869 | if test "$GXX" = yes; then | |
3870 | CXXFLAGS="-g -O2" | |
3871 | else | |
3872 | CXXFLAGS="-g" | |
3873 | fi | |
3874 | else | |
3875 | if test "$GXX" = yes; then | |
3876 | CXXFLAGS="-O2" | |
3877 | else | |
3878 | CXXFLAGS= | |
3879 | fi | |
3880 | fi | |
3881 | ac_ext=c | |
3882 | ac_cpp='$CPP $CPPFLAGS' | |
3883 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3884 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3885 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3886 | ||
3887 | ||
60ca704f | 3888 | |
bec39cab AC |
3889 | ac_ext=c |
3890 | ac_cpp='$CPP $CPPFLAGS' | |
3891 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3892 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3893 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3895 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3896 | # On Suns, sometimes $CPP names a directory. |
3897 | if test -n "$CPP" && test -d "$CPP"; then | |
3898 | CPP= | |
8bb2c122 | 3899 | fi |
bec39cab | 3900 | if test -z "$CPP"; then |
d0ac1c44 | 3901 | if ${ac_cv_prog_CPP+:} false; then : |
81ecdfbb | 3902 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3903 | else |
3904 | # Double quotes because CPP needs to be expanded | |
3905 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3906 | do | |
3907 | ac_preproc_ok=false | |
3908 | for ac_c_preproc_warn_flag in '' yes | |
3909 | do | |
3910 | # Use a header file that comes with gcc, so configuring glibc | |
3911 | # with a fresh cross-compiler works. | |
3912 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3913 | # <limits.h> exists even on freestanding compilers. | |
3914 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3915 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3917 | /* end confdefs.h. */ |
3918 | #ifdef __STDC__ | |
3919 | # include <limits.h> | |
3920 | #else | |
3921 | # include <assert.h> | |
3922 | #endif | |
3923 | Syntax error | |
3924 | _ACEOF | |
81ecdfbb | 3925 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3926 | |
81ecdfbb | 3927 | else |
bec39cab AC |
3928 | # Broken: fails on valid input. |
3929 | continue | |
3930 | fi | |
d0ac1c44 | 3931 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 3932 | |
81ecdfbb | 3933 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3934 | # can be detected and how. |
81ecdfbb | 3935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3936 | /* end confdefs.h. */ |
3937 | #include <ac_nonexistent.h> | |
3938 | _ACEOF | |
81ecdfbb | 3939 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3940 | # Broken: success on invalid input. |
3941 | continue | |
8bb2c122 | 3942 | else |
bec39cab AC |
3943 | # Passes both tests. |
3944 | ac_preproc_ok=: | |
3945 | break | |
8bb2c122 | 3946 | fi |
d0ac1c44 | 3947 | rm -f conftest.err conftest.i conftest.$ac_ext |
8bb2c122 | 3948 | |
bec39cab AC |
3949 | done |
3950 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 3951 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb | 3952 | if $ac_preproc_ok; then : |
bec39cab AC |
3953 | break |
3954 | fi | |
8bb2c122 | 3955 | |
bec39cab AC |
3956 | done |
3957 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3958 | |
c906108c | 3959 | fi |
bec39cab AC |
3960 | CPP=$ac_cv_prog_CPP |
3961 | else | |
3962 | ac_cv_prog_CPP=$CPP | |
c906108c | 3963 | fi |
81ecdfbb RW |
3964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3965 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3966 | ac_preproc_ok=false |
3967 | for ac_c_preproc_warn_flag in '' yes | |
3968 | do | |
3969 | # Use a header file that comes with gcc, so configuring glibc | |
3970 | # with a fresh cross-compiler works. | |
3971 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3972 | # <limits.h> exists even on freestanding compilers. | |
3973 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3974 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3976 | /* end confdefs.h. */ |
3977 | #ifdef __STDC__ | |
3978 | # include <limits.h> | |
3979 | #else | |
3980 | # include <assert.h> | |
3981 | #endif | |
3982 | Syntax error | |
3983 | _ACEOF | |
81ecdfbb | 3984 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3985 | |
81ecdfbb | 3986 | else |
bec39cab AC |
3987 | # Broken: fails on valid input. |
3988 | continue | |
3989 | fi | |
d0ac1c44 | 3990 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 3991 | |
81ecdfbb | 3992 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3993 | # can be detected and how. |
81ecdfbb | 3994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3995 | /* end confdefs.h. */ |
3996 | #include <ac_nonexistent.h> | |
3997 | _ACEOF | |
81ecdfbb | 3998 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3999 | # Broken: success on invalid input. |
4000 | continue | |
c906108c | 4001 | else |
bec39cab AC |
4002 | # Passes both tests. |
4003 | ac_preproc_ok=: | |
4004 | break | |
c906108c | 4005 | fi |
d0ac1c44 | 4006 | rm -f conftest.err conftest.i conftest.$ac_ext |
c906108c | 4007 | |
bec39cab AC |
4008 | done |
4009 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4010 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
4011 | if $ac_preproc_ok; then : |
4012 | ||
c906108c | 4013 | else |
81ecdfbb RW |
4014 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4015 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4016 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4017 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 4018 | fi |
c906108c | 4019 | |
bec39cab AC |
4020 | ac_ext=c |
4021 | ac_cpp='$CPP $CPPFLAGS' | |
4022 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4023 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4024 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4025 | ||
4026 | ||
81ecdfbb RW |
4027 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4028 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 4029 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 4030 | $as_echo_n "(cached) " >&6 |
4e8d927d | 4031 | else |
81ecdfbb RW |
4032 | if test -z "$GREP"; then |
4033 | ac_path_GREP_found=false | |
4034 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4035 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4036 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4037 | do | |
4038 | IFS=$as_save_IFS | |
4039 | test -z "$as_dir" && as_dir=. | |
4040 | for ac_prog in grep ggrep; do | |
4041 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4042 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4043 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
4044 | # Check for GNU ac_path_GREP and select it if it is found. |
4045 | # Check for GNU $ac_path_GREP | |
4046 | case `"$ac_path_GREP" --version 2>&1` in | |
4047 | *GNU*) | |
4048 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4049 | *) | |
4050 | ac_count=0 | |
4051 | $as_echo_n 0123456789 >"conftest.in" | |
4052 | while : | |
4053 | do | |
4054 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4055 | mv "conftest.tmp" "conftest.in" | |
4056 | cp "conftest.in" "conftest.nl" | |
4057 | $as_echo 'GREP' >> "conftest.nl" | |
4058 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4059 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4060 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4061 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4062 | # Best one so far, save it but keep looking for a better one | |
4063 | ac_cv_path_GREP="$ac_path_GREP" | |
4064 | ac_path_GREP_max=$ac_count | |
bec39cab | 4065 | fi |
81ecdfbb RW |
4066 | # 10*(2^10) chars as input seems more than enough |
4067 | test $ac_count -gt 10 && break | |
4068 | done | |
4069 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4070 | esac | |
bec39cab | 4071 | |
81ecdfbb RW |
4072 | $ac_path_GREP_found && break 3 |
4073 | done | |
4074 | done | |
4075 | done | |
4076 | IFS=$as_save_IFS | |
4077 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 4078 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4079 | fi |
c906108c | 4080 | else |
81ecdfbb | 4081 | ac_cv_path_GREP=$GREP |
c906108c | 4082 | fi |
c906108c | 4083 | |
81ecdfbb RW |
4084 | fi |
4085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4086 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4087 | GREP="$ac_cv_path_GREP" | |
c906108c | 4088 | |
c906108c | 4089 | |
81ecdfbb RW |
4090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4091 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4092 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb | 4093 | $as_echo_n "(cached) " >&6 |
783e057b | 4094 | else |
81ecdfbb RW |
4095 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4096 | then ac_cv_path_EGREP="$GREP -E" | |
4097 | else | |
4098 | if test -z "$EGREP"; then | |
4099 | ac_path_EGREP_found=false | |
4100 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4101 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4102 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4103 | do |
4104 | IFS=$as_save_IFS | |
4105 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4106 | for ac_prog in egrep; do |
4107 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4108 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4109 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4110 | # Check for GNU ac_path_EGREP and select it if it is found. |
4111 | # Check for GNU $ac_path_EGREP | |
4112 | case `"$ac_path_EGREP" --version 2>&1` in | |
4113 | *GNU*) | |
4114 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4115 | *) | |
4116 | ac_count=0 | |
4117 | $as_echo_n 0123456789 >"conftest.in" | |
4118 | while : | |
4119 | do | |
4120 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4121 | mv "conftest.tmp" "conftest.in" | |
4122 | cp "conftest.in" "conftest.nl" | |
4123 | $as_echo 'EGREP' >> "conftest.nl" | |
4124 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4125 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4126 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4127 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4128 | # Best one so far, save it but keep looking for a better one | |
4129 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4130 | ac_path_EGREP_max=$ac_count | |
4131 | fi | |
4132 | # 10*(2^10) chars as input seems more than enough | |
4133 | test $ac_count -gt 10 && break | |
4134 | done | |
4135 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4136 | esac | |
bec39cab | 4137 | |
81ecdfbb RW |
4138 | $ac_path_EGREP_found && break 3 |
4139 | done | |
4140 | done | |
4141 | done | |
4142 | IFS=$as_save_IFS | |
4143 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4144 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
783e057b | 4145 | fi |
783e057b | 4146 | else |
81ecdfbb | 4147 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4148 | fi |
4149 | ||
81ecdfbb | 4150 | fi |
783e057b | 4151 | fi |
81ecdfbb RW |
4152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4153 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4154 | EGREP="$ac_cv_path_EGREP" | |
4155 | ||
783e057b | 4156 | |
81ecdfbb RW |
4157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4158 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4159 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 4160 | $as_echo_n "(cached) " >&6 |
783e057b | 4161 | else |
81ecdfbb | 4162 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4163 | /* end confdefs.h. */ |
783e057b | 4164 | #include <stdlib.h> |
bec39cab | 4165 | #include <stdarg.h> |
783e057b DJ |
4166 | #include <string.h> |
4167 | #include <float.h> | |
c906108c | 4168 | |
bec39cab AC |
4169 | int |
4170 | main () | |
4171 | { | |
c906108c | 4172 | |
bec39cab AC |
4173 | ; |
4174 | return 0; | |
4175 | } | |
4176 | _ACEOF | |
81ecdfbb | 4177 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4178 | ac_cv_header_stdc=yes |
c906108c | 4179 | else |
81ecdfbb | 4180 | ac_cv_header_stdc=no |
c906108c | 4181 | fi |
81ecdfbb | 4182 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4183 | |
783e057b DJ |
4184 | if test $ac_cv_header_stdc = yes; then |
4185 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4186 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4187 | /* end confdefs.h. */ |
4188 | #include <string.h> | |
c906108c | 4189 | |
783e057b DJ |
4190 | _ACEOF |
4191 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4192 | $EGREP "memchr" >/dev/null 2>&1; then : |
4193 | ||
c906108c | 4194 | else |
783e057b | 4195 | ac_cv_header_stdc=no |
c906108c | 4196 | fi |
783e057b | 4197 | rm -f conftest* |
c906108c SS |
4198 | |
4199 | fi | |
4200 | ||
783e057b DJ |
4201 | if test $ac_cv_header_stdc = yes; then |
4202 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4204 | /* end confdefs.h. */ |
4205 | #include <stdlib.h> | |
bec39cab | 4206 | |
783e057b DJ |
4207 | _ACEOF |
4208 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4209 | $EGREP "free" >/dev/null 2>&1; then : |
4210 | ||
bec39cab | 4211 | else |
783e057b | 4212 | ac_cv_header_stdc=no |
bec39cab | 4213 | fi |
783e057b | 4214 | rm -f conftest* |
bec39cab AC |
4215 | |
4216 | fi | |
bec39cab | 4217 | |
783e057b DJ |
4218 | if test $ac_cv_header_stdc = yes; then |
4219 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4220 | if test "$cross_compiling" = yes; then : |
783e057b | 4221 | : |
bec39cab | 4222 | else |
81ecdfbb | 4223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4224 | /* end confdefs.h. */ |
4225 | #include <ctype.h> | |
81ecdfbb | 4226 | #include <stdlib.h> |
783e057b DJ |
4227 | #if ((' ' & 0x0FF) == 0x020) |
4228 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4229 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4230 | #else | |
4231 | # define ISLOWER(c) \ | |
4232 | (('a' <= (c) && (c) <= 'i') \ | |
4233 | || ('j' <= (c) && (c) <= 'r') \ | |
4234 | || ('s' <= (c) && (c) <= 'z')) | |
4235 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4236 | #endif | |
4237 | ||
4238 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4239 | int | |
4240 | main () | |
4241 | { | |
4242 | int i; | |
4243 | for (i = 0; i < 256; i++) | |
4244 | if (XOR (islower (i), ISLOWER (i)) | |
4245 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4246 | return 2; |
4247 | return 0; | |
783e057b DJ |
4248 | } |
4249 | _ACEOF | |
81ecdfbb | 4250 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4251 | |
81ecdfbb RW |
4252 | else |
4253 | ac_cv_header_stdc=no | |
783e057b | 4254 | fi |
81ecdfbb RW |
4255 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4256 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4257 | fi |
81ecdfbb | 4258 | |
783e057b DJ |
4259 | fi |
4260 | fi | |
81ecdfbb RW |
4261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4262 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4263 | if test $ac_cv_header_stdc = yes; then |
4264 | ||
81ecdfbb | 4265 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4266 | |
4267 | fi | |
4268 | ||
4269 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4270 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4271 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4272 | do : |
4273 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4274 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4275 | " | |
d0ac1c44 | 4276 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
783e057b | 4277 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4278 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4279 | _ACEOF |
4280 | ||
4281 | fi | |
4282 | ||
4283 | done | |
4284 | ||
4285 | ||
4286 | ||
81ecdfbb | 4287 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4288 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
783e057b DJ |
4289 | MINIX=yes |
4290 | else | |
4291 | MINIX= | |
4292 | fi | |
4293 | ||
4294 | ||
4295 | if test "$MINIX" = yes; then | |
4296 | ||
81ecdfbb | 4297 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4298 | |
4299 | ||
81ecdfbb | 4300 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4301 | |
4302 | ||
81ecdfbb | 4303 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4304 | |
4305 | fi | |
4306 | ||
4307 | ||
81ecdfbb RW |
4308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4309 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4310 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
81ecdfbb | 4311 | $as_echo_n "(cached) " >&6 |
783e057b | 4312 | else |
81ecdfbb | 4313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4314 | /* end confdefs.h. */ |
4315 | ||
d0ac1c44 SM |
4316 | # define __EXTENSIONS__ 1 |
4317 | $ac_includes_default | |
783e057b DJ |
4318 | int |
4319 | main () | |
4320 | { | |
4321 | ||
4322 | ; | |
4323 | return 0; | |
4324 | } | |
4325 | _ACEOF | |
81ecdfbb | 4326 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4327 | ac_cv_safe_to_define___extensions__=yes |
4328 | else | |
81ecdfbb | 4329 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4330 | fi |
81ecdfbb | 4331 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4332 | fi |
81ecdfbb RW |
4333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4334 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4335 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4336 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4337 | |
81ecdfbb | 4338 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4339 | |
81ecdfbb | 4340 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4341 | |
81ecdfbb | 4342 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4343 | |
81ecdfbb | 4344 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4345 | |
4346 | ||
c971b7fa PA |
4347 | ac_aux_dir= |
4348 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4349 | if test -f "$ac_dir/install-sh"; then |
4350 | ac_aux_dir=$ac_dir | |
4351 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4352 | break | |
4353 | elif test -f "$ac_dir/install.sh"; then | |
4354 | ac_aux_dir=$ac_dir | |
4355 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4356 | break | |
4357 | elif test -f "$ac_dir/shtool"; then | |
4358 | ac_aux_dir=$ac_dir | |
4359 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4360 | break | |
4361 | fi | |
c971b7fa PA |
4362 | done |
4363 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4364 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
c971b7fa | 4365 | fi |
770d76d7 | 4366 | |
c971b7fa PA |
4367 | # These three variables are undocumented and unsupported, |
4368 | # and are intended to be withdrawn in a future Autoconf release. | |
4369 | # They can cause serious problems if a builder's source tree is in a directory | |
4370 | # whose full name contains unusual characters. | |
4371 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4372 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4373 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4374 | |
770d76d7 | 4375 | |
c971b7fa PA |
4376 | # Make sure we can run config.sub. |
4377 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4378 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 | 4379 | |
c971b7fa PA |
4380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4381 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4382 | if ${ac_cv_build+:} false; then : |
c971b7fa | 4383 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4384 | else |
c971b7fa PA |
4385 | ac_build_alias=$build_alias |
4386 | test "x$ac_build_alias" = x && | |
4387 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4388 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4389 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
c971b7fa | 4390 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4391 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
c971b7fa | 4392 | |
770d76d7 | 4393 | fi |
c971b7fa PA |
4394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4395 | $as_echo "$ac_cv_build" >&6; } | |
4396 | case $ac_cv_build in | |
4397 | *-*-*) ;; | |
d0ac1c44 | 4398 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 | 4399 | esac |
c971b7fa PA |
4400 | build=$ac_cv_build |
4401 | ac_save_IFS=$IFS; IFS='-' | |
4402 | set x $ac_cv_build | |
4403 | shift | |
4404 | build_cpu=$1 | |
4405 | build_vendor=$2 | |
4406 | shift; shift | |
4407 | # Remember, the first character of IFS is used to create $*, | |
4408 | # except with old shells: | |
4409 | build_os=$* | |
4410 | IFS=$ac_save_IFS | |
4411 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4412 | |
4413 | ||
c971b7fa PA |
4414 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4415 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4416 | if ${ac_cv_host+:} false; then : |
81ecdfbb RW |
4417 | $as_echo_n "(cached) " >&6 |
4418 | else | |
c971b7fa PA |
4419 | if test "x$host_alias" = x; then |
4420 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4421 | else |
c971b7fa | 4422 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
d0ac1c44 | 4423 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
81ecdfbb | 4424 | fi |
81ecdfbb RW |
4425 | |
4426 | fi | |
c971b7fa PA |
4427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4428 | $as_echo "$ac_cv_host" >&6; } | |
4429 | case $ac_cv_host in | |
4430 | *-*-*) ;; | |
d0ac1c44 | 4431 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
81ecdfbb | 4432 | esac |
c971b7fa PA |
4433 | host=$ac_cv_host |
4434 | ac_save_IFS=$IFS; IFS='-' | |
4435 | set x $ac_cv_host | |
4436 | shift | |
4437 | host_cpu=$1 | |
4438 | host_vendor=$2 | |
4439 | shift; shift | |
4440 | # Remember, the first character of IFS is used to create $*, | |
4441 | # except with old shells: | |
4442 | host_os=$* | |
4443 | IFS=$ac_save_IFS | |
4444 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4445 | |
4446 | ||
4447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4448 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4449 | if ${ac_cv_target+:} false; then : |
3388710e JM |
4450 | $as_echo_n "(cached) " >&6 |
4451 | else | |
4452 | if test "x$target_alias" = x; then | |
4453 | ac_cv_target=$ac_cv_host | |
4454 | else | |
4455 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
d0ac1c44 | 4456 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
3388710e JM |
4457 | fi |
4458 | ||
4459 | fi | |
4460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4461 | $as_echo "$ac_cv_target" >&6; } | |
4462 | case $ac_cv_target in | |
4463 | *-*-*) ;; | |
d0ac1c44 | 4464 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
3388710e JM |
4465 | esac |
4466 | target=$ac_cv_target | |
4467 | ac_save_IFS=$IFS; IFS='-' | |
4468 | set x $ac_cv_target | |
4469 | shift | |
4470 | target_cpu=$1 | |
4471 | target_vendor=$2 | |
4472 | shift; shift | |
4473 | # Remember, the first character of IFS is used to create $*, | |
4474 | # except with old shells: | |
4475 | target_os=$* | |
4476 | IFS=$ac_save_IFS | |
4477 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4478 | ||
4479 | ||
4480 | # The aliases save the names the user supplied, while $host etc. | |
4481 | # will get canonicalized. | |
4482 | test -n "$target_alias" && | |
4483 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4484 | NONENONEs,x,x, && | |
4485 | program_prefix=${target_alias}- | |
4486 | ||
4487 | # The tests for host and target for $enable_largefile require | |
4488 | # canonical names. | |
4489 | ||
4490 | ||
81ecdfbb | 4491 | |
da2f07f1 JK |
4492 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4493 | # even in directories otherwise not depending on the $plugins option. | |
4494 | ||
4495 | ||
2974be62 AM |
4496 | maybe_plugins=no |
4497 | for ac_header in dlfcn.h | |
4498 | do : | |
4499 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4500 | " | |
d0ac1c44 | 4501 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
2974be62 AM |
4502 | cat >>confdefs.h <<_ACEOF |
4503 | #define HAVE_DLFCN_H 1 | |
4504 | _ACEOF | |
4505 | maybe_plugins=yes | |
4506 | fi | |
4507 | ||
4508 | done | |
4509 | ||
4510 | for ac_header in windows.h | |
4511 | do : | |
4512 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4513 | " | |
d0ac1c44 | 4514 | if test "x$ac_cv_header_windows_h" = xyes; then : |
2974be62 AM |
4515 | cat >>confdefs.h <<_ACEOF |
4516 | #define HAVE_WINDOWS_H 1 | |
4517 | _ACEOF | |
4518 | maybe_plugins=yes | |
4519 | fi | |
4520 | ||
4521 | done | |
4522 | ||
4523 | ||
4524 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4525 | if test "${enable_plugins+set}" = set; then : |
4526 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4527 | no) plugins=no ;; |
4528 | *) plugins=yes | |
4529 | if test "$maybe_plugins" != "yes" ; then | |
d0ac1c44 | 4530 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
2974be62 AM |
4531 | fi ;; |
4532 | esac | |
da2f07f1 | 4533 | else |
2974be62 AM |
4534 | plugins=$maybe_plugins |
4535 | ||
da2f07f1 JK |
4536 | fi |
4537 | ||
2974be62 | 4538 | if test "$plugins" = "yes"; then |
458412c3 TT |
4539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4540 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
d0ac1c44 | 4541 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4542 | $as_echo_n "(cached) " >&6 |
4543 | else | |
4544 | ac_func_search_save_LIBS=$LIBS | |
4545 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4546 | /* end confdefs.h. */ | |
4547 | ||
4548 | /* Override any GCC internal prototype to avoid an error. | |
4549 | Use char because int might match the return type of a GCC | |
4550 | builtin and then its argument prototype would still apply. */ | |
4551 | #ifdef __cplusplus | |
4552 | extern "C" | |
4553 | #endif | |
458412c3 | 4554 | char dlsym (); |
2974be62 AM |
4555 | int |
4556 | main () | |
4557 | { | |
458412c3 | 4558 | return dlsym (); |
2974be62 AM |
4559 | ; |
4560 | return 0; | |
4561 | } | |
4562 | _ACEOF | |
4563 | for ac_lib in '' dl; do | |
4564 | if test -z "$ac_lib"; then | |
4565 | ac_res="none required" | |
4566 | else | |
4567 | ac_res=-l$ac_lib | |
4568 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4569 | fi | |
4570 | if ac_fn_c_try_link "$LINENO"; then : | |
458412c3 | 4571 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4572 | fi |
4573 | rm -f core conftest.err conftest.$ac_objext \ | |
4574 | conftest$ac_exeext | |
d0ac1c44 | 4575 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4576 | break |
4577 | fi | |
4578 | done | |
d0ac1c44 | 4579 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4580 | |
4581 | else | |
458412c3 | 4582 | ac_cv_search_dlsym=no |
2974be62 AM |
4583 | fi |
4584 | rm conftest.$ac_ext | |
4585 | LIBS=$ac_func_search_save_LIBS | |
4586 | fi | |
458412c3 TT |
4587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4588 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4589 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
4590 | if test "$ac_res" != no; then : |
4591 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4592 | ||
4593 | fi | |
4594 | ||
4595 | fi | |
da2f07f1 JK |
4596 | |
4597 | ||
4598 | case "${host}" in | |
4599 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4600 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4601 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4602 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4603 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4604 | # large-file support through the --enable-largefile switch, disable | |
4605 | # large-file support in favor of procfs support. | |
4606 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4607 | && : ${enable_largefile="no"} | |
4608 | ;; | |
4609 | esac | |
4610 | ||
4611 | # Check whether --enable-largefile was given. | |
4612 | if test "${enable_largefile+set}" = set; then : | |
4613 | enableval=$enable_largefile; | |
4614 | fi | |
4615 | ||
4616 | if test "$enable_largefile" != no; then | |
4617 | ||
4618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4619 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4620 | if ${ac_cv_sys_largefile_CC+:} false; then : |
da2f07f1 JK |
4621 | $as_echo_n "(cached) " >&6 |
4622 | else | |
4623 | ac_cv_sys_largefile_CC=no | |
4624 | if test "$GCC" != yes; then | |
4625 | ac_save_CC=$CC | |
4626 | while :; do | |
4627 | # IRIX 6.2 and later do not support large files by default, | |
4628 | # so use the C compiler's -n32 option if that helps. | |
4629 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4630 | /* end confdefs.h. */ | |
4631 | #include <sys/types.h> | |
4632 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4633 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4634 | since some C++ compilers masquerading as C compilers | |
4635 | incorrectly reject 9223372036854775807. */ | |
4636 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4637 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4638 | && LARGE_OFF_T % 2147483647 == 1) | |
4639 | ? 1 : -1]; | |
4640 | int | |
4641 | main () | |
4642 | { | |
4643 | ||
4644 | ; | |
4645 | return 0; | |
4646 | } | |
4647 | _ACEOF | |
4648 | if ac_fn_c_try_compile "$LINENO"; then : | |
4649 | break | |
4650 | fi | |
4651 | rm -f core conftest.err conftest.$ac_objext | |
4652 | CC="$CC -n32" | |
4653 | if ac_fn_c_try_compile "$LINENO"; then : | |
4654 | ac_cv_sys_largefile_CC=' -n32'; break | |
4655 | fi | |
4656 | rm -f core conftest.err conftest.$ac_objext | |
4657 | break | |
4658 | done | |
4659 | CC=$ac_save_CC | |
4660 | rm -f conftest.$ac_ext | |
4661 | fi | |
4662 | fi | |
4663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4664 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4665 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4666 | CC=$CC$ac_cv_sys_largefile_CC | |
4667 | fi | |
4668 | ||
4669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4670 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4671 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
da2f07f1 JK |
4672 | $as_echo_n "(cached) " >&6 |
4673 | else | |
4674 | while :; do | |
4675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4676 | /* end confdefs.h. */ | |
4677 | #include <sys/types.h> | |
4678 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4679 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4680 | since some C++ compilers masquerading as C compilers | |
4681 | incorrectly reject 9223372036854775807. */ | |
4682 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4683 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4684 | && LARGE_OFF_T % 2147483647 == 1) | |
4685 | ? 1 : -1]; | |
4686 | int | |
4687 | main () | |
4688 | { | |
4689 | ||
4690 | ; | |
4691 | return 0; | |
4692 | } | |
4693 | _ACEOF | |
4694 | if ac_fn_c_try_compile "$LINENO"; then : | |
4695 | ac_cv_sys_file_offset_bits=no; break | |
4696 | fi | |
4697 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4699 | /* end confdefs.h. */ | |
4700 | #define _FILE_OFFSET_BITS 64 | |
4701 | #include <sys/types.h> | |
4702 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4703 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4704 | since some C++ compilers masquerading as C compilers | |
4705 | incorrectly reject 9223372036854775807. */ | |
4706 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4707 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4708 | && LARGE_OFF_T % 2147483647 == 1) | |
4709 | ? 1 : -1]; | |
4710 | int | |
4711 | main () | |
4712 | { | |
4713 | ||
4714 | ; | |
4715 | return 0; | |
4716 | } | |
4717 | _ACEOF | |
4718 | if ac_fn_c_try_compile "$LINENO"; then : | |
4719 | ac_cv_sys_file_offset_bits=64; break | |
4720 | fi | |
4721 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4722 | ac_cv_sys_file_offset_bits=unknown | |
4723 | break | |
4724 | done | |
4725 | fi | |
4726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4727 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4728 | case $ac_cv_sys_file_offset_bits in #( | |
4729 | no | unknown) ;; | |
4730 | *) | |
4731 | cat >>confdefs.h <<_ACEOF | |
4732 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4733 | _ACEOF | |
4734 | ;; | |
4735 | esac | |
4736 | rm -rf conftest* | |
4737 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4739 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4740 | if ${ac_cv_sys_large_files+:} false; then : |
da2f07f1 JK |
4741 | $as_echo_n "(cached) " >&6 |
4742 | else | |
4743 | while :; do | |
4744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4745 | /* end confdefs.h. */ | |
4746 | #include <sys/types.h> | |
4747 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4748 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4749 | since some C++ compilers masquerading as C compilers | |
4750 | incorrectly reject 9223372036854775807. */ | |
4751 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4752 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4753 | && LARGE_OFF_T % 2147483647 == 1) | |
4754 | ? 1 : -1]; | |
4755 | int | |
4756 | main () | |
4757 | { | |
4758 | ||
4759 | ; | |
4760 | return 0; | |
4761 | } | |
4762 | _ACEOF | |
4763 | if ac_fn_c_try_compile "$LINENO"; then : | |
4764 | ac_cv_sys_large_files=no; break | |
4765 | fi | |
4766 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4768 | /* end confdefs.h. */ | |
4769 | #define _LARGE_FILES 1 | |
4770 | #include <sys/types.h> | |
4771 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4772 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4773 | since some C++ compilers masquerading as C compilers | |
4774 | incorrectly reject 9223372036854775807. */ | |
4775 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4776 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4777 | && LARGE_OFF_T % 2147483647 == 1) | |
4778 | ? 1 : -1]; | |
4779 | int | |
4780 | main () | |
4781 | { | |
4782 | ||
4783 | ; | |
4784 | return 0; | |
4785 | } | |
4786 | _ACEOF | |
4787 | if ac_fn_c_try_compile "$LINENO"; then : | |
4788 | ac_cv_sys_large_files=1; break | |
4789 | fi | |
4790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4791 | ac_cv_sys_large_files=unknown | |
4792 | break | |
4793 | done | |
4794 | fi | |
4795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4796 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4797 | case $ac_cv_sys_large_files in #( | |
4798 | no | unknown) ;; | |
4799 | *) | |
4800 | cat >>confdefs.h <<_ACEOF | |
4801 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4802 | _ACEOF | |
4803 | ;; | |
4804 | esac | |
4805 | rm -rf conftest* | |
4806 | fi | |
d0ac1c44 SM |
4807 | |
4808 | ||
da2f07f1 JK |
4809 | fi |
4810 | ||
4811 | ||
4812 | ||
81ecdfbb RW |
4813 | |
4814 | ||
4815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4816 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
d0ac1c44 | 4817 | if ${am_cv_prog_cc_stdc+:} false; then : |
81ecdfbb RW |
4818 | $as_echo_n "(cached) " >&6 |
4819 | else | |
4820 | am_cv_prog_cc_stdc=no | |
4821 | ac_save_CC="$CC" | |
4822 | # Don't try gcc -ansi; that turns off useful extensions and | |
4823 | # breaks some systems' header files. | |
4824 | # AIX -qlanglvl=ansi | |
4825 | # Ultrix and OSF/1 -std1 | |
4826 | # HP-UX 10.20 and later -Ae | |
4827 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4828 | # SVR4 -Xc -D__EXTENSIONS__ | |
4829 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4830 | do | |
783e057b | 4831 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4833 | /* end confdefs.h. */ |
4834 | #include <stdarg.h> | |
4835 | #include <stdio.h> | |
4836 | #include <sys/types.h> | |
4837 | #include <sys/stat.h> | |
4838 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4839 | struct buf { int x; }; | |
4840 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4841 | static char *e (p, i) | |
4842 | char **p; | |
4843 | int i; | |
4844 | { | |
4845 | return p[i]; | |
4846 | } | |
4847 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4848 | { | |
4849 | char *s; | |
4850 | va_list v; | |
4851 | va_start (v,p); | |
4852 | s = g (p, va_arg (v,int)); | |
4853 | va_end (v); | |
4854 | return s; | |
4855 | } | |
4856 | int test (int i, double x); | |
4857 | struct s1 {int (*f) (int a);}; | |
4858 | struct s2 {int (*f) (double a);}; | |
4859 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4860 | int argc; | |
4861 | char **argv; | |
4862 | ||
4863 | int | |
4864 | main () | |
4865 | { | |
4866 | ||
4867 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4868 | ||
4869 | ; | |
4870 | return 0; | |
4871 | } | |
4872 | _ACEOF | |
81ecdfbb | 4873 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4874 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4875 | fi |
81ecdfbb | 4876 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4877 | done |
4878 | CC="$ac_save_CC" | |
4879 | ||
4880 | fi | |
4881 | ||
4882 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4884 | $as_echo "none needed" >&6; } | |
783e057b | 4885 | else |
81ecdfbb RW |
4886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4887 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4888 | fi |
4889 | case "x$am_cv_prog_cc_stdc" in | |
4890 | x|xno) ;; | |
4891 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4892 | esac | |
4893 | ||
d0ac1c44 SM |
4894 | # Expand $ac_aux_dir to an absolute path. |
4895 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4869db5e | 4896 | |
d0ac1c44 | 4897 | if test x"${install_sh+set}" != xset; then |
4869db5e RM |
4898 | case $am_aux_dir in |
4899 | *\ * | *\ *) | |
4900 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4901 | *) | |
4902 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4903 | esac | |
4904 | fi | |
4905 | ||
d0ac1c44 SM |
4906 | # Installed binaries are usually stripped using 'strip' when the user |
4907 | # run "make install-strip". However 'strip' might not be the right | |
4869db5e | 4908 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 4909 | # will honor the 'STRIP' environment variable to overrule this program. |
4869db5e RM |
4910 | if test "$cross_compiling" != no; then |
4911 | if test -n "$ac_tool_prefix"; then | |
4912 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4913 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4914 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4915 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4916 | if ${ac_cv_prog_STRIP+:} false; then : |
4869db5e RM |
4917 | $as_echo_n "(cached) " >&6 |
4918 | else | |
4919 | if test -n "$STRIP"; then | |
4920 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4921 | else | |
4922 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4923 | for as_dir in $PATH | |
4924 | do | |
4925 | IFS=$as_save_IFS | |
4926 | test -z "$as_dir" && as_dir=. | |
4927 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4928 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
4929 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
4930 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4931 | break 2 | |
4932 | fi | |
4933 | done | |
4934 | done | |
4935 | IFS=$as_save_IFS | |
4936 | ||
4937 | fi | |
4938 | fi | |
4939 | STRIP=$ac_cv_prog_STRIP | |
4940 | if test -n "$STRIP"; then | |
4941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4942 | $as_echo "$STRIP" >&6; } | |
4943 | else | |
4944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4945 | $as_echo "no" >&6; } | |
4946 | fi | |
4947 | ||
4948 | ||
4949 | fi | |
4950 | if test -z "$ac_cv_prog_STRIP"; then | |
4951 | ac_ct_STRIP=$STRIP | |
4952 | # Extract the first word of "strip", so it can be a program name with args. | |
4953 | set dummy strip; ac_word=$2 | |
4954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4955 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4956 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
4869db5e RM |
4957 | $as_echo_n "(cached) " >&6 |
4958 | else | |
4959 | if test -n "$ac_ct_STRIP"; then | |
4960 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4961 | else | |
4962 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4963 | for as_dir in $PATH | |
4964 | do | |
4965 | IFS=$as_save_IFS | |
4966 | test -z "$as_dir" && as_dir=. | |
4967 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4968 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
4969 | ac_cv_prog_ac_ct_STRIP="strip" |
4970 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4971 | break 2 | |
4972 | fi | |
4973 | done | |
4974 | done | |
4975 | IFS=$as_save_IFS | |
4976 | ||
4977 | fi | |
4978 | fi | |
4979 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4980 | if test -n "$ac_ct_STRIP"; then | |
4981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4982 | $as_echo "$ac_ct_STRIP" >&6; } | |
4983 | else | |
4984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4985 | $as_echo "no" >&6; } | |
4986 | fi | |
4987 | ||
4988 | if test "x$ac_ct_STRIP" = x; then | |
4989 | STRIP=":" | |
4990 | else | |
4991 | case $cross_compiling:$ac_tool_warned in | |
4992 | yes:) | |
4993 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4994 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4995 | ac_tool_warned=yes ;; | |
4996 | esac | |
4997 | STRIP=$ac_ct_STRIP | |
4998 | fi | |
4999 | else | |
5000 | STRIP="$ac_cv_prog_STRIP" | |
5001 | fi | |
5002 | ||
5003 | fi | |
5004 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
5005 | ||
783e057b DJ |
5006 | |
5007 | ac_aux_dir= | |
81ecdfbb | 5008 | for ac_dir in .. "$srcdir"/..; do |
d0ac1c44 SM |
5009 | if test -f "$ac_dir/install-sh"; then |
5010 | ac_aux_dir=$ac_dir | |
5011 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5012 | break | |
5013 | elif test -f "$ac_dir/install.sh"; then | |
5014 | ac_aux_dir=$ac_dir | |
5015 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5016 | break | |
5017 | elif test -f "$ac_dir/shtool"; then | |
5018 | ac_aux_dir=$ac_dir | |
5019 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5020 | break | |
5021 | fi | |
783e057b DJ |
5022 | done |
5023 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 5024 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 5025 | fi |
81ecdfbb RW |
5026 | |
5027 | # These three variables are undocumented and unsupported, | |
5028 | # and are intended to be withdrawn in a future Autoconf release. | |
5029 | # They can cause serious problems if a builder's source tree is in a directory | |
5030 | # whose full name contains unusual characters. | |
5031 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5032 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5033 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5034 | ||
783e057b | 5035 | |
783e057b | 5036 | |
9009e1ae MR |
5037 | test "$program_prefix" != NONE && |
5038 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5039 | # Use a double $ so make ignores it. | |
5040 | test "$program_suffix" != NONE && | |
5041 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5042 | # Double any \ or $. | |
5043 | # By default was `s,x,x', remove it if useless. | |
5044 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5045 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5046 | ||
81ecdfbb | 5047 | |
0bcda685 PA |
5048 | # We require a C++11 compiler. Check if one is available, and if |
5049 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5050 | ||
41260ac2 | 5051 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5052 | ac_ext=cpp |
5053 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5054 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5055 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5056 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5057 | CXX_DIALECT="" | |
5058 | ac_success=no | |
5059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5060 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5061 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5062 | $as_echo_n "(cached) " >&6 |
5063 | else | |
5064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5065 | /* end confdefs.h. */ | |
5066 | ||
5067 | ||
5068 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5069 | // Hopefully, this will speed up the test. | |
5070 | ||
5071 | #ifndef __cplusplus | |
5072 | ||
5073 | #error "This is not a C++ compiler" | |
5074 | ||
5075 | #elif __cplusplus < 201103L | |
5076 | ||
5077 | #error "This is not a C++11 compiler" | |
5078 | ||
5079 | #else | |
5080 | ||
5081 | namespace cxx11 | |
5082 | { | |
5083 | ||
5084 | namespace test_static_assert | |
5085 | { | |
5086 | ||
5087 | template <typename T> | |
5088 | struct check | |
5089 | { | |
5090 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5091 | }; | |
5092 | ||
5093 | } | |
5094 | ||
5095 | namespace test_final_override | |
5096 | { | |
5097 | ||
5098 | struct Base | |
5099 | { | |
5100 | virtual void f() {} | |
5101 | }; | |
5102 | ||
5103 | struct Derived : public Base | |
5104 | { | |
5105 | virtual void f() override {} | |
5106 | }; | |
5107 | ||
5108 | } | |
5109 | ||
5110 | namespace test_double_right_angle_brackets | |
5111 | { | |
5112 | ||
5113 | template < typename T > | |
5114 | struct check {}; | |
5115 | ||
5116 | typedef check<void> single_type; | |
5117 | typedef check<check<void>> double_type; | |
5118 | typedef check<check<check<void>>> triple_type; | |
5119 | typedef check<check<check<check<void>>>> quadruple_type; | |
5120 | ||
5121 | } | |
5122 | ||
5123 | namespace test_decltype | |
5124 | { | |
5125 | ||
5126 | int | |
5127 | f() | |
5128 | { | |
5129 | int a = 1; | |
5130 | decltype(a) b = 2; | |
5131 | return a + b; | |
5132 | } | |
5133 | ||
5134 | } | |
5135 | ||
5136 | namespace test_type_deduction | |
5137 | { | |
5138 | ||
5139 | template < typename T1, typename T2 > | |
5140 | struct is_same | |
5141 | { | |
5142 | static const bool value = false; | |
5143 | }; | |
5144 | ||
5145 | template < typename T > | |
5146 | struct is_same<T, T> | |
5147 | { | |
5148 | static const bool value = true; | |
5149 | }; | |
5150 | ||
5151 | template < typename T1, typename T2 > | |
5152 | auto | |
5153 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5154 | { | |
5155 | return a1 + a2; | |
5156 | } | |
5157 | ||
5158 | int | |
5159 | test(const int c, volatile int v) | |
5160 | { | |
5161 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5162 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5163 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5164 | auto ac = c; | |
5165 | auto av = v; | |
5166 | auto sumi = ac + av + 'x'; | |
5167 | auto sumf = ac + av + 1.0; | |
5168 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5169 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5170 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5171 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5172 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5173 | return (sumf > 0.0) ? sumi : add(c, v); | |
5174 | } | |
5175 | ||
5176 | } | |
5177 | ||
5178 | namespace test_noexcept | |
5179 | { | |
5180 | ||
5181 | int f() { return 0; } | |
5182 | int g() noexcept { return 0; } | |
5183 | ||
5184 | static_assert(noexcept(f()) == false, ""); | |
5185 | static_assert(noexcept(g()) == true, ""); | |
5186 | ||
5187 | } | |
5188 | ||
5189 | namespace test_constexpr | |
5190 | { | |
5191 | ||
5192 | template < typename CharT > | |
5193 | unsigned long constexpr | |
5194 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5195 | { | |
5196 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5197 | } | |
5198 | ||
5199 | template < typename CharT > | |
5200 | unsigned long constexpr | |
5201 | strlen_c(const CharT *const s) noexcept | |
5202 | { | |
5203 | return strlen_c_r(s, 0UL); | |
5204 | } | |
5205 | ||
5206 | static_assert(strlen_c("") == 0UL, ""); | |
5207 | static_assert(strlen_c("1") == 1UL, ""); | |
5208 | static_assert(strlen_c("example") == 7UL, ""); | |
5209 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5210 | ||
5211 | } | |
5212 | ||
5213 | namespace test_rvalue_references | |
5214 | { | |
5215 | ||
5216 | template < int N > | |
5217 | struct answer | |
5218 | { | |
5219 | static constexpr int value = N; | |
5220 | }; | |
5221 | ||
5222 | answer<1> f(int&) { return answer<1>(); } | |
5223 | answer<2> f(const int&) { return answer<2>(); } | |
5224 | answer<3> f(int&&) { return answer<3>(); } | |
5225 | ||
5226 | void | |
5227 | test() | |
5228 | { | |
5229 | int i = 0; | |
5230 | const int c = 0; | |
5231 | static_assert(decltype(f(i))::value == 1, ""); | |
5232 | static_assert(decltype(f(c))::value == 2, ""); | |
5233 | static_assert(decltype(f(0))::value == 3, ""); | |
5234 | } | |
5235 | ||
5236 | } | |
5237 | ||
5238 | namespace test_uniform_initialization | |
5239 | { | |
5240 | ||
5241 | struct test | |
5242 | { | |
5243 | static const int zero {}; | |
5244 | static const int one {1}; | |
5245 | }; | |
5246 | ||
5247 | static_assert(test::zero == 0, ""); | |
5248 | static_assert(test::one == 1, ""); | |
5249 | ||
5250 | } | |
5251 | ||
5252 | namespace test_lambdas | |
5253 | { | |
5254 | ||
5255 | void | |
5256 | test1() | |
5257 | { | |
5258 | auto lambda1 = [](){}; | |
5259 | auto lambda2 = lambda1; | |
5260 | lambda1(); | |
5261 | lambda2(); | |
5262 | } | |
5263 | ||
5264 | int | |
5265 | test2() | |
5266 | { | |
5267 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5268 | auto b = []() -> int { return '0'; }(); | |
5269 | auto c = [=](){ return a + b; }(); | |
5270 | auto d = [&](){ return c; }(); | |
5271 | auto e = [a, &b](int x) mutable { | |
5272 | const auto identity = [](int y){ return y; }; | |
5273 | for (auto i = 0; i < a; ++i) | |
5274 | a += b--; | |
5275 | return x + identity(a + b); | |
5276 | }(0); | |
5277 | return a + b + c + d + e; | |
5278 | } | |
5279 | ||
5280 | int | |
5281 | test3() | |
5282 | { | |
5283 | const auto nullary = [](){ return 0; }; | |
5284 | const auto unary = [](int x){ return x; }; | |
5285 | using nullary_t = decltype(nullary); | |
5286 | using unary_t = decltype(unary); | |
5287 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5288 | const auto higher2nd = [unary](nullary_t f1){ | |
5289 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5290 | }; | |
5291 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5292 | } | |
5293 | ||
5294 | } | |
5295 | ||
5296 | namespace test_variadic_templates | |
5297 | { | |
5298 | ||
5299 | template <int...> | |
5300 | struct sum; | |
5301 | ||
5302 | template <int N0, int... N1toN> | |
5303 | struct sum<N0, N1toN...> | |
5304 | { | |
5305 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5306 | }; | |
5307 | ||
5308 | template <> | |
5309 | struct sum<> | |
5310 | { | |
5311 | static constexpr auto value = 0; | |
5312 | }; | |
5313 | ||
5314 | static_assert(sum<>::value == 0, ""); | |
5315 | static_assert(sum<1>::value == 1, ""); | |
5316 | static_assert(sum<23>::value == 23, ""); | |
5317 | static_assert(sum<1, 2>::value == 3, ""); | |
5318 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5319 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5320 | ||
5321 | } | |
5322 | ||
5323 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5324 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5325 | // because of this. | |
5326 | namespace test_template_alias_sfinae | |
5327 | { | |
5328 | ||
5329 | struct foo {}; | |
5330 | ||
5331 | template<typename T> | |
5332 | using member = typename T::member_type; | |
5333 | ||
5334 | template<typename T> | |
5335 | void func(...) {} | |
5336 | ||
5337 | template<typename T> | |
5338 | void func(member<T>*) {} | |
5339 | ||
5340 | void test(); | |
5341 | ||
5342 | void test() { func<foo>(0); } | |
5343 | ||
5344 | } | |
5345 | ||
5346 | } // namespace cxx11 | |
5347 | ||
5348 | #endif // __cplusplus >= 201103L | |
5349 | ||
5350 | ||
5351 | ||
5352 | _ACEOF | |
5353 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5354 | ax_cv_cxx_compile_cxx11=yes | |
5355 | else | |
5356 | ax_cv_cxx_compile_cxx11=no | |
5357 | fi | |
5358 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5359 | fi | |
5360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5361 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5362 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5363 | ac_success=yes | |
5364 | fi | |
5365 | ||
5366 | if test x$ac_success = xno; then | |
41260ac2 SM |
5367 | for alternative in ${ax_cxx_compile_alternatives}; do |
5368 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5369 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5371 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5372 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5373 | $as_echo_n "(cached) " >&6 |
5374 | else | |
5375 | ac_save_CXX="$CXX" | |
5376 | CXX="$CXX $switch" | |
5377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5378 | /* end confdefs.h. */ | |
5379 | ||
5380 | ||
5381 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5382 | // Hopefully, this will speed up the test. | |
5383 | ||
5384 | #ifndef __cplusplus | |
5385 | ||
5386 | #error "This is not a C++ compiler" | |
5387 | ||
5388 | #elif __cplusplus < 201103L | |
5389 | ||
5390 | #error "This is not a C++11 compiler" | |
5391 | ||
5392 | #else | |
5393 | ||
5394 | namespace cxx11 | |
5395 | { | |
5396 | ||
5397 | namespace test_static_assert | |
5398 | { | |
5399 | ||
5400 | template <typename T> | |
5401 | struct check | |
5402 | { | |
5403 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5404 | }; | |
5405 | ||
5406 | } | |
5407 | ||
5408 | namespace test_final_override | |
5409 | { | |
5410 | ||
5411 | struct Base | |
5412 | { | |
5413 | virtual void f() {} | |
5414 | }; | |
5415 | ||
5416 | struct Derived : public Base | |
5417 | { | |
5418 | virtual void f() override {} | |
5419 | }; | |
5420 | ||
5421 | } | |
5422 | ||
5423 | namespace test_double_right_angle_brackets | |
5424 | { | |
5425 | ||
5426 | template < typename T > | |
5427 | struct check {}; | |
5428 | ||
5429 | typedef check<void> single_type; | |
5430 | typedef check<check<void>> double_type; | |
5431 | typedef check<check<check<void>>> triple_type; | |
5432 | typedef check<check<check<check<void>>>> quadruple_type; | |
5433 | ||
5434 | } | |
5435 | ||
5436 | namespace test_decltype | |
5437 | { | |
5438 | ||
5439 | int | |
5440 | f() | |
5441 | { | |
5442 | int a = 1; | |
5443 | decltype(a) b = 2; | |
5444 | return a + b; | |
5445 | } | |
5446 | ||
5447 | } | |
5448 | ||
5449 | namespace test_type_deduction | |
5450 | { | |
5451 | ||
5452 | template < typename T1, typename T2 > | |
5453 | struct is_same | |
5454 | { | |
5455 | static const bool value = false; | |
5456 | }; | |
5457 | ||
5458 | template < typename T > | |
5459 | struct is_same<T, T> | |
5460 | { | |
5461 | static const bool value = true; | |
5462 | }; | |
5463 | ||
5464 | template < typename T1, typename T2 > | |
5465 | auto | |
5466 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5467 | { | |
5468 | return a1 + a2; | |
5469 | } | |
5470 | ||
5471 | int | |
5472 | test(const int c, volatile int v) | |
5473 | { | |
5474 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5475 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5476 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5477 | auto ac = c; | |
5478 | auto av = v; | |
5479 | auto sumi = ac + av + 'x'; | |
5480 | auto sumf = ac + av + 1.0; | |
5481 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5482 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5483 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5484 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5485 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5486 | return (sumf > 0.0) ? sumi : add(c, v); | |
5487 | } | |
5488 | ||
5489 | } | |
5490 | ||
5491 | namespace test_noexcept | |
5492 | { | |
5493 | ||
5494 | int f() { return 0; } | |
5495 | int g() noexcept { return 0; } | |
5496 | ||
5497 | static_assert(noexcept(f()) == false, ""); | |
5498 | static_assert(noexcept(g()) == true, ""); | |
5499 | ||
5500 | } | |
5501 | ||
5502 | namespace test_constexpr | |
5503 | { | |
5504 | ||
5505 | template < typename CharT > | |
5506 | unsigned long constexpr | |
5507 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5508 | { | |
5509 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5510 | } | |
5511 | ||
5512 | template < typename CharT > | |
5513 | unsigned long constexpr | |
5514 | strlen_c(const CharT *const s) noexcept | |
5515 | { | |
5516 | return strlen_c_r(s, 0UL); | |
5517 | } | |
5518 | ||
5519 | static_assert(strlen_c("") == 0UL, ""); | |
5520 | static_assert(strlen_c("1") == 1UL, ""); | |
5521 | static_assert(strlen_c("example") == 7UL, ""); | |
5522 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5523 | ||
5524 | } | |
5525 | ||
5526 | namespace test_rvalue_references | |
5527 | { | |
5528 | ||
5529 | template < int N > | |
5530 | struct answer | |
5531 | { | |
5532 | static constexpr int value = N; | |
5533 | }; | |
5534 | ||
5535 | answer<1> f(int&) { return answer<1>(); } | |
5536 | answer<2> f(const int&) { return answer<2>(); } | |
5537 | answer<3> f(int&&) { return answer<3>(); } | |
5538 | ||
5539 | void | |
5540 | test() | |
5541 | { | |
5542 | int i = 0; | |
5543 | const int c = 0; | |
5544 | static_assert(decltype(f(i))::value == 1, ""); | |
5545 | static_assert(decltype(f(c))::value == 2, ""); | |
5546 | static_assert(decltype(f(0))::value == 3, ""); | |
5547 | } | |
5548 | ||
5549 | } | |
5550 | ||
5551 | namespace test_uniform_initialization | |
5552 | { | |
5553 | ||
5554 | struct test | |
5555 | { | |
5556 | static const int zero {}; | |
5557 | static const int one {1}; | |
5558 | }; | |
5559 | ||
5560 | static_assert(test::zero == 0, ""); | |
5561 | static_assert(test::one == 1, ""); | |
5562 | ||
5563 | } | |
5564 | ||
5565 | namespace test_lambdas | |
5566 | { | |
5567 | ||
5568 | void | |
5569 | test1() | |
5570 | { | |
5571 | auto lambda1 = [](){}; | |
5572 | auto lambda2 = lambda1; | |
5573 | lambda1(); | |
5574 | lambda2(); | |
5575 | } | |
5576 | ||
5577 | int | |
5578 | test2() | |
5579 | { | |
5580 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5581 | auto b = []() -> int { return '0'; }(); | |
5582 | auto c = [=](){ return a + b; }(); | |
5583 | auto d = [&](){ return c; }(); | |
5584 | auto e = [a, &b](int x) mutable { | |
5585 | const auto identity = [](int y){ return y; }; | |
5586 | for (auto i = 0; i < a; ++i) | |
5587 | a += b--; | |
5588 | return x + identity(a + b); | |
5589 | }(0); | |
5590 | return a + b + c + d + e; | |
5591 | } | |
5592 | ||
5593 | int | |
5594 | test3() | |
5595 | { | |
5596 | const auto nullary = [](){ return 0; }; | |
5597 | const auto unary = [](int x){ return x; }; | |
5598 | using nullary_t = decltype(nullary); | |
5599 | using unary_t = decltype(unary); | |
5600 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5601 | const auto higher2nd = [unary](nullary_t f1){ | |
5602 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5603 | }; | |
5604 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5605 | } | |
5606 | ||
5607 | } | |
5608 | ||
5609 | namespace test_variadic_templates | |
5610 | { | |
5611 | ||
5612 | template <int...> | |
5613 | struct sum; | |
5614 | ||
5615 | template <int N0, int... N1toN> | |
5616 | struct sum<N0, N1toN...> | |
5617 | { | |
5618 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5619 | }; | |
5620 | ||
5621 | template <> | |
5622 | struct sum<> | |
5623 | { | |
5624 | static constexpr auto value = 0; | |
5625 | }; | |
5626 | ||
5627 | static_assert(sum<>::value == 0, ""); | |
5628 | static_assert(sum<1>::value == 1, ""); | |
5629 | static_assert(sum<23>::value == 23, ""); | |
5630 | static_assert(sum<1, 2>::value == 3, ""); | |
5631 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5632 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5633 | ||
5634 | } | |
5635 | ||
5636 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5637 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5638 | // because of this. | |
5639 | namespace test_template_alias_sfinae | |
5640 | { | |
5641 | ||
5642 | struct foo {}; | |
5643 | ||
5644 | template<typename T> | |
5645 | using member = typename T::member_type; | |
5646 | ||
5647 | template<typename T> | |
5648 | void func(...) {} | |
5649 | ||
5650 | template<typename T> | |
5651 | void func(member<T>*) {} | |
5652 | ||
5653 | void test(); | |
5654 | ||
5655 | void test() { func<foo>(0); } | |
5656 | ||
5657 | } | |
5658 | ||
5659 | } // namespace cxx11 | |
5660 | ||
5661 | #endif // __cplusplus >= 201103L | |
5662 | ||
5663 | ||
5664 | ||
5665 | _ACEOF | |
5666 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5667 | eval $cachevar=yes | |
5668 | else | |
5669 | eval $cachevar=no | |
5670 | fi | |
5671 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5672 | CXX="$ac_save_CXX" | |
5673 | fi | |
5674 | eval ac_res=\$$cachevar | |
5675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5676 | $as_echo "$ac_res" >&6; } | |
5677 | if eval test x\$$cachevar = xyes; then | |
5678 | CXX_DIALECT="$switch" | |
5679 | ac_success=yes | |
5680 | break | |
5681 | fi | |
5682 | done | |
5683 | fi | |
5684 | ||
5685 | if test x$ac_success = xno; then | |
41260ac2 SM |
5686 | for alternative in ${ax_cxx_compile_alternatives}; do |
5687 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5688 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5690 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5691 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5692 | $as_echo_n "(cached) " >&6 |
5693 | else | |
5694 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5695 | CXX="$CXX $switch" |
5696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5697 | /* end confdefs.h. */ |
5698 | ||
5699 | ||
5700 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5701 | // Hopefully, this will speed up the test. | |
5702 | ||
5703 | #ifndef __cplusplus | |
5704 | ||
5705 | #error "This is not a C++ compiler" | |
5706 | ||
5707 | #elif __cplusplus < 201103L | |
5708 | ||
5709 | #error "This is not a C++11 compiler" | |
5710 | ||
5711 | #else | |
5712 | ||
5713 | namespace cxx11 | |
5714 | { | |
5715 | ||
5716 | namespace test_static_assert | |
5717 | { | |
5718 | ||
5719 | template <typename T> | |
5720 | struct check | |
5721 | { | |
5722 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5723 | }; | |
5724 | ||
5725 | } | |
5726 | ||
5727 | namespace test_final_override | |
5728 | { | |
5729 | ||
5730 | struct Base | |
5731 | { | |
5732 | virtual void f() {} | |
5733 | }; | |
5734 | ||
5735 | struct Derived : public Base | |
5736 | { | |
5737 | virtual void f() override {} | |
5738 | }; | |
5739 | ||
5740 | } | |
5741 | ||
5742 | namespace test_double_right_angle_brackets | |
5743 | { | |
5744 | ||
5745 | template < typename T > | |
5746 | struct check {}; | |
5747 | ||
5748 | typedef check<void> single_type; | |
5749 | typedef check<check<void>> double_type; | |
5750 | typedef check<check<check<void>>> triple_type; | |
5751 | typedef check<check<check<check<void>>>> quadruple_type; | |
5752 | ||
5753 | } | |
5754 | ||
5755 | namespace test_decltype | |
5756 | { | |
5757 | ||
5758 | int | |
5759 | f() | |
5760 | { | |
5761 | int a = 1; | |
5762 | decltype(a) b = 2; | |
5763 | return a + b; | |
5764 | } | |
5765 | ||
5766 | } | |
5767 | ||
5768 | namespace test_type_deduction | |
5769 | { | |
5770 | ||
5771 | template < typename T1, typename T2 > | |
5772 | struct is_same | |
5773 | { | |
5774 | static const bool value = false; | |
5775 | }; | |
5776 | ||
5777 | template < typename T > | |
5778 | struct is_same<T, T> | |
5779 | { | |
5780 | static const bool value = true; | |
5781 | }; | |
5782 | ||
5783 | template < typename T1, typename T2 > | |
5784 | auto | |
5785 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5786 | { | |
5787 | return a1 + a2; | |
5788 | } | |
5789 | ||
5790 | int | |
5791 | test(const int c, volatile int v) | |
5792 | { | |
5793 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5794 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5795 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5796 | auto ac = c; | |
5797 | auto av = v; | |
5798 | auto sumi = ac + av + 'x'; | |
5799 | auto sumf = ac + av + 1.0; | |
5800 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5801 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5802 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5803 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5804 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5805 | return (sumf > 0.0) ? sumi : add(c, v); | |
5806 | } | |
5807 | ||
5808 | } | |
5809 | ||
5810 | namespace test_noexcept | |
5811 | { | |
5812 | ||
5813 | int f() { return 0; } | |
5814 | int g() noexcept { return 0; } | |
5815 | ||
5816 | static_assert(noexcept(f()) == false, ""); | |
5817 | static_assert(noexcept(g()) == true, ""); | |
5818 | ||
5819 | } | |
5820 | ||
5821 | namespace test_constexpr | |
5822 | { | |
5823 | ||
5824 | template < typename CharT > | |
5825 | unsigned long constexpr | |
5826 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5827 | { | |
5828 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5829 | } | |
5830 | ||
5831 | template < typename CharT > | |
5832 | unsigned long constexpr | |
5833 | strlen_c(const CharT *const s) noexcept | |
5834 | { | |
5835 | return strlen_c_r(s, 0UL); | |
5836 | } | |
5837 | ||
5838 | static_assert(strlen_c("") == 0UL, ""); | |
5839 | static_assert(strlen_c("1") == 1UL, ""); | |
5840 | static_assert(strlen_c("example") == 7UL, ""); | |
5841 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5842 | ||
5843 | } | |
5844 | ||
5845 | namespace test_rvalue_references | |
5846 | { | |
5847 | ||
5848 | template < int N > | |
5849 | struct answer | |
5850 | { | |
5851 | static constexpr int value = N; | |
5852 | }; | |
5853 | ||
5854 | answer<1> f(int&) { return answer<1>(); } | |
5855 | answer<2> f(const int&) { return answer<2>(); } | |
5856 | answer<3> f(int&&) { return answer<3>(); } | |
5857 | ||
5858 | void | |
5859 | test() | |
5860 | { | |
5861 | int i = 0; | |
5862 | const int c = 0; | |
5863 | static_assert(decltype(f(i))::value == 1, ""); | |
5864 | static_assert(decltype(f(c))::value == 2, ""); | |
5865 | static_assert(decltype(f(0))::value == 3, ""); | |
5866 | } | |
5867 | ||
5868 | } | |
5869 | ||
5870 | namespace test_uniform_initialization | |
5871 | { | |
5872 | ||
5873 | struct test | |
5874 | { | |
5875 | static const int zero {}; | |
5876 | static const int one {1}; | |
5877 | }; | |
5878 | ||
5879 | static_assert(test::zero == 0, ""); | |
5880 | static_assert(test::one == 1, ""); | |
5881 | ||
5882 | } | |
5883 | ||
5884 | namespace test_lambdas | |
5885 | { | |
5886 | ||
5887 | void | |
5888 | test1() | |
5889 | { | |
5890 | auto lambda1 = [](){}; | |
5891 | auto lambda2 = lambda1; | |
5892 | lambda1(); | |
5893 | lambda2(); | |
5894 | } | |
5895 | ||
5896 | int | |
5897 | test2() | |
5898 | { | |
5899 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5900 | auto b = []() -> int { return '0'; }(); | |
5901 | auto c = [=](){ return a + b; }(); | |
5902 | auto d = [&](){ return c; }(); | |
5903 | auto e = [a, &b](int x) mutable { | |
5904 | const auto identity = [](int y){ return y; }; | |
5905 | for (auto i = 0; i < a; ++i) | |
5906 | a += b--; | |
5907 | return x + identity(a + b); | |
5908 | }(0); | |
5909 | return a + b + c + d + e; | |
5910 | } | |
5911 | ||
5912 | int | |
5913 | test3() | |
5914 | { | |
5915 | const auto nullary = [](){ return 0; }; | |
5916 | const auto unary = [](int x){ return x; }; | |
5917 | using nullary_t = decltype(nullary); | |
5918 | using unary_t = decltype(unary); | |
5919 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5920 | const auto higher2nd = [unary](nullary_t f1){ | |
5921 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5922 | }; | |
5923 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5924 | } | |
5925 | ||
5926 | } | |
5927 | ||
5928 | namespace test_variadic_templates | |
5929 | { | |
5930 | ||
5931 | template <int...> | |
5932 | struct sum; | |
5933 | ||
5934 | template <int N0, int... N1toN> | |
5935 | struct sum<N0, N1toN...> | |
5936 | { | |
5937 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5938 | }; | |
5939 | ||
5940 | template <> | |
5941 | struct sum<> | |
5942 | { | |
5943 | static constexpr auto value = 0; | |
5944 | }; | |
5945 | ||
5946 | static_assert(sum<>::value == 0, ""); | |
5947 | static_assert(sum<1>::value == 1, ""); | |
5948 | static_assert(sum<23>::value == 23, ""); | |
5949 | static_assert(sum<1, 2>::value == 3, ""); | |
5950 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5951 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5952 | ||
5953 | } | |
5954 | ||
5955 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5956 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5957 | // because of this. | |
5958 | namespace test_template_alias_sfinae | |
5959 | { | |
5960 | ||
5961 | struct foo {}; | |
5962 | ||
5963 | template<typename T> | |
5964 | using member = typename T::member_type; | |
5965 | ||
5966 | template<typename T> | |
5967 | void func(...) {} | |
5968 | ||
5969 | template<typename T> | |
5970 | void func(member<T>*) {} | |
5971 | ||
5972 | void test(); | |
5973 | ||
5974 | void test() { func<foo>(0); } | |
5975 | ||
5976 | } | |
5977 | ||
5978 | } // namespace cxx11 | |
5979 | ||
5980 | #endif // __cplusplus >= 201103L | |
5981 | ||
5982 | ||
5983 | ||
5984 | _ACEOF | |
5985 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5986 | eval $cachevar=yes | |
5987 | else | |
5988 | eval $cachevar=no | |
5989 | fi | |
5990 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 5991 | CXX="$ac_save_CXX" |
0bcda685 PA |
5992 | fi |
5993 | eval ac_res=\$$cachevar | |
5994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5995 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
5996 | if eval test x\$$cachevar = xyes; then |
5997 | CXX_DIALECT="$switch" | |
5998 | ac_success=yes | |
5999 | break | |
6000 | fi | |
6001 | done | |
6002 | if test x$ac_success = xyes; then | |
0bcda685 PA |
6003 | break |
6004 | fi | |
6005 | done | |
6006 | fi | |
6007 | ac_ext=c | |
6008 | ac_cpp='$CPP $CPPFLAGS' | |
6009 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6010 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6011 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6012 | ||
6013 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6014 | if test x$ac_success = xno; then | |
d0ac1c44 | 6015 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
6016 | fi |
6017 | fi | |
6018 | if test x$ac_success = xno; then | |
6019 | HAVE_CXX11=0 | |
6020 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6021 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6022 | else | |
6023 | HAVE_CXX11=1 | |
6024 | ||
6025 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6026 | ||
6027 | fi | |
6028 | ||
6029 | ||
6030 | ||
6031 | ||
a417dc56 RW |
6032 | # Dependency checking. |
6033 | rm -rf .tst 2>/dev/null | |
6034 | mkdir .tst 2>/dev/null | |
6035 | if test -d .tst; then | |
6036 | am__leading_dot=. | |
6037 | else | |
6038 | am__leading_dot=_ | |
6039 | fi | |
6040 | rmdir .tst 2>/dev/null | |
6041 | ||
6042 | DEPDIR="${am__leading_dot}deps" | |
6043 | ||
81ecdfbb | 6044 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
6045 | |
6046 | ||
6047 | depcc="$CC" am_compiler_list= | |
6048 | ||
6049 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
6050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6051 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6052 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
81ecdfbb | 6053 | $as_echo_n "(cached) " >&6 |
a417dc56 RW |
6054 | else |
6055 | if test -f "$am_depcomp"; then | |
6056 | # We make a subdir and do the tests there. Otherwise we can end up | |
6057 | # making bogus files that we don't know about and never remove. For | |
6058 | # instance it was reported that on HP-UX the gcc test will end up | |
6059 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6060 | # in D'. | |
6061 | mkdir conftest.dir | |
6062 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6063 | # using a relative directory. | |
6064 | cp "$am_depcomp" conftest.dir | |
6065 | cd conftest.dir | |
6066 | # We will build objects and dependencies in a subdirectory because | |
6067 | # it helps to detect inapplicable dependency modes. For instance | |
6068 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6069 | # side effect of compilation, but ICC will put the dependencies in | |
6070 | # the current directory while Tru64 will put them in the object | |
6071 | # directory. | |
6072 | mkdir sub | |
6073 | ||
6074 | am_cv_CC_dependencies_compiler_type=none | |
6075 | if test "$am_compiler_list" = ""; then | |
6076 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6077 | fi | |
6078 | for depmode in $am_compiler_list; do | |
6079 | if test $depmode = none; then break; fi | |
6080 | ||
81ecdfbb | 6081 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6082 | # Setup a source with many dependencies, because some compilers |
6083 | # like to wrap large dependency lists on column 80 (with \), and | |
6084 | # we should not choose a depcomp mode which is confused by this. | |
6085 | # | |
6086 | # We need to recreate these files for each test, as the compiler may | |
6087 | # overwrite some of them when testing with obscure command lines. | |
6088 | # This happens at least with the AIX C compiler. | |
6089 | : > sub/conftest.c | |
6090 | for i in 1 2 3 4 5 6; do | |
6091 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6092 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6093 | # Solaris 8's {/usr,}/bin/sh. | |
6094 | touch sub/conftst$i.h | |
6095 | done | |
6096 | echo "include sub/conftest.Po" > confmf | |
6097 | ||
6098 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6099 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6100 | # handle `-M -o', and we need to detect this. | |
6101 | depcmd="depmode=$depmode \ | |
6102 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6103 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6104 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6105 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6106 | if env $depcmd > conftest.err 2>&1 && | |
6107 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6108 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6109 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6110 | # icc doesn't choke on unknown options, it will just issue warnings | |
6111 | # or remarks (even with -Werror). So we grep stderr for any message | |
6112 | # that says an option was ignored or not supported. | |
6113 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6114 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6115 | # The diagnosis changed in icc 8.0: | |
6116 | # icc: Command line remark: option '-MP' not supported | |
6117 | if (grep 'ignoring option' conftest.err || | |
6118 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6119 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6120 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6121 | break |
6122 | fi | |
6123 | fi | |
81ecdfbb | 6124 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6125 | sed -e 's/^/| /' < conftest.err >&5 |
6126 | done | |
6127 | ||
6128 | cd .. | |
6129 | rm -rf conftest.dir | |
6130 | else | |
6131 | am_cv_CC_dependencies_compiler_type=none | |
6132 | fi | |
6133 | ||
6134 | fi | |
81ecdfbb RW |
6135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6136 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6137 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
d0ac1c44 | 6138 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6139 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6140 | ||
6141 | fi | |
6142 | ||
6143 | ||
648d586d JB |
6144 | gnulib_extra_configure_args= |
6145 | # If large-file support is disabled, make sure gnulib does the same. | |
6146 | if test "$enable_largefile" = no; then | |
6147 | gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" | |
6148 | fi | |
6149 | ||
c971b7fa PA |
6150 | # Configure gnulib. We need to build gnulib under some other |
6151 | # directory not "gnulib", to avoid the problem of both GDB and | |
6152 | # GDBserver wanting to build it in the same directory, when building | |
6153 | # in the source dir. | |
783e057b | 6154 | |
c971b7fa PA |
6155 | in_src="gnulib" |
6156 | in_build="build-gnulib" | |
648d586d | 6157 | in_extra_args="$gnulib_extra_configure_args" |
c971b7fa PA |
6158 | |
6159 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
6160 | # so they do not pile up. | |
6161 | ac_sub_configure_args= | |
6162 | ac_prev= | |
6163 | eval "set x $ac_configure_args" | |
6164 | shift | |
6165 | for ac_arg | |
6166 | do | |
6167 | if test -n "$ac_prev"; then | |
6168 | ac_prev= | |
6169 | continue | |
6170 | fi | |
6171 | case $ac_arg in | |
6172 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6173 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6174 | ac_prev=cache_file ;; | |
6175 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6176 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
6177 | | --c=*) | |
6178 | ;; | |
6179 | --config-cache | -C) | |
6180 | ;; | |
6181 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6182 | ac_prev=srcdir ;; | |
6183 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6184 | ;; | |
6185 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
6186 | ac_prev=prefix ;; | |
6187 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
6188 | ;; | |
6189 | --disable-option-checking) | |
6190 | ;; | |
6191 | *) | |
6192 | case $ac_arg in | |
6193 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6194 | esac | |
6195 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
6196 | esac | |
6197 | done | |
6198 | ||
6199 | # Always prepend --prefix to ensure using the same prefix | |
6200 | # in subdir configurations. | |
6201 | ac_arg="--prefix=$prefix" | |
6202 | case $ac_arg in | |
6203 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6204 | esac | |
6205 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
6206 | ||
6207 | # Pass --silent | |
6208 | if test "$silent" = yes; then | |
6209 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
6210 | fi | |
6211 | ||
6212 | # Always prepend --disable-option-checking to silence warnings, since | |
6213 | # different subdirs can have different --enable and --with options. | |
6214 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
6215 | ||
6216 | ac_popdir=`pwd` | |
6217 | ac_dir=$in_build | |
6218 | ||
6219 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
6220 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
6221 | $as_echo "$ac_msg" >&6 | |
6222 | as_dir="$ac_dir"; as_fn_mkdir_p | |
6223 | ||
38ea300a PA |
6224 | case $srcdir in |
6225 | [\\/]* | ?:[\\/]* ) | |
6226 | ac_srcdir=$srcdir/$in_src ;; | |
6227 | *) # Relative name. | |
6228 | ac_srcdir=../$srcdir/$in_src ;; | |
6229 | esac | |
c971b7fa PA |
6230 | |
6231 | cd "$ac_dir" | |
6232 | ||
6233 | ac_sub_configure=$ac_srcdir/configure | |
6234 | ||
6235 | # Make the cache file name correct relative to the subdirectory. | |
6236 | case $cache_file in | |
6237 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
6238 | *) # Relative name. | |
6239 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
6240 | esac | |
6241 | ||
648d586d JB |
6242 | if test -n "$in_extra_args"; then |
6243 | # Add the extra args at the end. | |
6244 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
6245 | fi | |
6246 | ||
c971b7fa PA |
6247 | { $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 |
6248 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
6249 | # The eval makes quoting arguments work. | |
6250 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
6251 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 6252 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c971b7fa PA |
6253 | |
6254 | cd "$ac_popdir" | |
783e057b | 6255 | |
c971b7fa PA |
6256 | |
6257 | ||
6258 | CONFIG_OBS= | |
6259 | CONFIG_DEPS= | |
6260 | CONFIG_SRCS= | |
6261 | ENABLE_CFLAGS= | |
6262 | ||
6263 | CONFIG_ALL= | |
6264 | CONFIG_CLEAN= | |
6265 | CONFIG_INSTALL= | |
6266 | CONFIG_UNINSTALL= | |
6267 | ||
6268 | # If we haven't got the data from the intl directory, | |
6269 | # assume NLS is disabled. | |
6270 | USE_NLS=no | |
6271 | LIBINTL= | |
6272 | LIBINTL_DEP= | |
6273 | INCINTL= | |
6274 | XGETTEXT= | |
6275 | GMSGFMT= | |
6276 | POSUB= | |
783e057b DJ |
6277 | |
6278 | if test -f ../intl/config.intl; then | |
6279 | . ../intl/config.intl | |
6280 | fi | |
81ecdfbb RW |
6281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6282 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6283 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6285 | $as_echo "no" >&6; } | |
783e057b | 6286 | else |
81ecdfbb RW |
6287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6288 | $as_echo "yes" >&6; } | |
783e057b | 6289 | |
81ecdfbb | 6290 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6291 | |
6292 | ||
81ecdfbb RW |
6293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6294 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6295 | # Look for .po and .gmo files in the source directory. |
6296 | CATALOGS= | |
6297 | XLINGUAS= | |
6298 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6299 | # If there aren't any .gmo files the shell will give us the | |
6300 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6301 | # weeded out. | |
6302 | case "$cat" in *\**) | |
6303 | continue;; | |
6304 | esac | |
6305 | # The quadruple backslash is collapsed to a double backslash | |
6306 | # by the backticks, then collapsed again by the double quotes, | |
6307 | # leaving us with one backslash in the sed expression (right | |
6308 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6309 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6310 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6311 | # The user is allowed to set LINGUAS to a list of languages to | |
6312 | # install catalogs for. If it's empty that means "all of them." | |
6313 | if test "x$LINGUAS" = x; then | |
6314 | CATALOGS="$CATALOGS $cat" | |
6315 | XLINGUAS="$XLINGUAS $lang" | |
6316 | else | |
6317 | case "$LINGUAS" in *$lang*) | |
6318 | CATALOGS="$CATALOGS $cat" | |
6319 | XLINGUAS="$XLINGUAS $lang" | |
6320 | ;; | |
6321 | esac | |
e28b3332 DJ |
6322 | fi |
6323 | done | |
c971b7fa PA |
6324 | LINGUAS="$XLINGUAS" |
6325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6326 | $as_echo "$LINGUAS" >&6; } | |
6327 | ||
6328 | ||
6329 | DATADIRNAME=share | |
6330 | ||
6331 | INSTOBJEXT=.mo | |
6332 | ||
6333 | GENCAT=gencat | |
6334 | ||
6335 | CATOBJEXT=.gmo | |
e28b3332 | 6336 | |
e28b3332 DJ |
6337 | fi |
6338 | ||
c971b7fa PA |
6339 | localedir='${datadir}/locale' |
6340 | ||
6341 | ||
6342 | if test x"$USE_NLS" = xyes; then | |
6343 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6344 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6345 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6346 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6347 | fi |
e28b3332 | 6348 | |
c971b7fa PA |
6349 | GNULIB=build-gnulib/import |
6350 | ||
6351 | # For Makefile dependencies. | |
6352 | GNULIB_STDINT_H= | |
6353 | if test x"$STDINT_H" != x; then | |
6354 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
6355 | fi |
6356 | ||
6357 | ||
c971b7fa PA |
6358 | PACKAGE=gdb |
6359 | ||
6360 | cat >>confdefs.h <<_ACEOF | |
6361 | #define PACKAGE "$PACKAGE" | |
6362 | _ACEOF | |
6363 | ||
6364 | ||
6365 | ||
6366 | # We never need to detect it in this sub-configure. | |
6367 | # But preserve it for config.status --recheck. | |
6368 | ||
6369 | ||
6370 | ||
6371 | MAKEINFO_EXTRA_FLAGS="" | |
6372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6373 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
d0ac1c44 | 6374 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
c971b7fa PA |
6375 | $as_echo_n "(cached) " >&6 |
6376 | else | |
6377 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6378 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6379 | gdb_cv_have_makeinfo_click=yes | |
6380 | else | |
6381 | gdb_cv_have_makeinfo_click=no | |
6382 | fi | |
6383 | fi | |
6384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6385 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6386 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6387 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6388 | fi | |
e28b3332 DJ |
6389 | |
6390 | ||
bec39cab AC |
6391 | |
6392 | ||
81ecdfbb RW |
6393 | # Check whether --with-separate-debug-dir was given. |
6394 | if test "${with_separate_debug_dir+set}" = set; then : | |
6395 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6396 | DEBUGDIR=$withval |
6397 | else | |
6398 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6399 | fi |
6400 | ||
20e95c23 | 6401 | |
783e057b DJ |
6402 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6403 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6404 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6405 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6406 | |
783e057b DJ |
6407 | cat >>confdefs.h <<_ACEOF |
6408 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6409 | _ACEOF |
20e95c23 | 6410 | |
20e95c23 | 6411 | |
20e95c23 | 6412 | |
0c4a4063 | 6413 | |
b14b1491 TT |
6414 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6415 | if test "x$prefix" = xNONE; then | |
6416 | test_prefix=/usr/local | |
6417 | else | |
6418 | test_prefix=$prefix | |
6419 | fi | |
783e057b | 6420 | else |
b14b1491 | 6421 | test_prefix=$exec_prefix |
783e057b | 6422 | fi |
b14b1491 TT |
6423 | value=0 |
6424 | case ${ac_define_dir} in | |
6425 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6426 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6427 | value=1 | |
6428 | ;; | |
6429 | esac | |
6430 | ||
6431 | cat >>confdefs.h <<_ACEOF | |
6432 | #define DEBUGDIR_RELOCATABLE $value | |
6433 | _ACEOF | |
6434 | ||
6435 | ||
6436 | ||
0c4a4063 | 6437 | |
f83d8a90 DE |
6438 | # We can't pass paths as command line arguments. |
6439 | # Mingw32 tries to be clever and will convert the paths for us. | |
6440 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6441 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6442 | # This breaks GDB's relocatable path conversions since paths passed in | |
6443 | # config.h would not get so translated, the path prefixes no longer match. | |
6444 | ||
6445 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6446 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6447 | ac_define_dir=`eval echo $bindir` | |
6448 | ac_define_dir=`eval echo $ac_define_dir` | |
6449 | ||
6450 | cat >>confdefs.h <<_ACEOF | |
6451 | #define BINDIR "$ac_define_dir" | |
6452 | _ACEOF | |
6453 | ||
6454 | ||
6455 | ||
b14b1491 TT |
6456 | # GDB's datadir relocation |
6457 | ||
6458 | ||
6459 | ||
81ecdfbb RW |
6460 | # Check whether --with-gdb-datadir was given. |
6461 | if test "${with_gdb_datadir+set}" = set; then : | |
6462 | withval=$with_gdb_datadir; | |
b14b1491 | 6463 | GDB_DATADIR=$withval |
20e95c23 | 6464 | else |
b14b1491 | 6465 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6466 | fi |
6467 | ||
20e95c23 | 6468 | |
b14b1491 TT |
6469 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6470 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6471 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6472 | ac_define_dir=`eval echo $ac_define_dir` | |
6473 | ||
6474 | cat >>confdefs.h <<_ACEOF | |
6475 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6476 | _ACEOF |
6477 | ||
b14b1491 TT |
6478 | |
6479 | ||
0c4a4063 | 6480 | |
b14b1491 TT |
6481 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6482 | if test "x$prefix" = xNONE; then | |
6483 | test_prefix=/usr/local | |
6484 | else | |
6485 | test_prefix=$prefix | |
6486 | fi | |
6487 | else | |
6488 | test_prefix=$exec_prefix | |
6489 | fi | |
6490 | value=0 | |
6491 | case ${ac_define_dir} in | |
6492 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6493 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6494 | value=1 | |
6495 | ;; | |
6496 | esac | |
6497 | ||
6498 | cat >>confdefs.h <<_ACEOF | |
6499 | #define GDB_DATADIR_RELOCATABLE $value | |
6500 | _ACEOF | |
6501 | ||
6502 | ||
783e057b | 6503 | |
20e95c23 | 6504 | |
0c4a4063 | 6505 | |
81ecdfbb RW |
6506 | # Check whether --with-relocated-sources was given. |
6507 | if test "${with_relocated_sources+set}" = set; then : | |
6508 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6509 | |
6510 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6511 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6512 | ac_define_dir=`eval echo $reloc_srcdir` | |
6513 | ac_define_dir=`eval echo $ac_define_dir` | |
6514 | ||
6515 | cat >>confdefs.h <<_ACEOF | |
6516 | #define RELOC_SRCDIR "$ac_define_dir" | |
6517 | _ACEOF | |
6518 | ||
6519 | ||
6520 | ||
81ecdfbb RW |
6521 | fi |
6522 | ||
29b0e8a2 | 6523 | |
7349ff92 JK |
6524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6525 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6526 | ||
6527 | # Check whether --with-auto-load-dir was given. | |
6528 | if test "${with_auto_load_dir+set}" = set; then : | |
6529 | withval=$with_auto_load_dir; | |
6530 | else | |
1564a261 | 6531 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6532 | fi |
6533 | ||
1564a261 | 6534 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6535 | |
6536 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6537 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6538 | ac_define_dir=`eval echo $escape_dir` | |
6539 | ac_define_dir=`eval echo $ac_define_dir` | |
6540 | ||
6541 | cat >>confdefs.h <<_ACEOF | |
6542 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6543 | _ACEOF | |
6544 | ||
6545 | ||
6546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6547 | $as_echo "$with_auto_load_dir" >&6; } | |
6548 | ||
bccbefd2 JK |
6549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6550 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6551 | ||
6552 | # Check whether --with-auto-load-safe-path was given. | |
6553 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6554 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6555 | with_auto_load_safe_path="/" |
6556 | fi | |
bccbefd2 | 6557 | else |
7349ff92 | 6558 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6559 | fi |
6560 | ||
1564a261 | 6561 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6562 | |
6563 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6564 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6565 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6566 | ac_define_dir=`eval echo $ac_define_dir` |
6567 | ||
6568 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6569 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6570 | _ACEOF |
6571 | ||
6572 | ||
6573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6574 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6575 | ||
29b0e8a2 | 6576 | |
20e95c23 | 6577 | |
5ae98d25 | 6578 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6579 | |
6580 | ||
783e057b | 6581 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6582 | # Check whether --enable-targets was given. |
6583 | if test "${enable_targets+set}" = set; then : | |
6584 | enableval=$enable_targets; case "${enableval}" in | |
d0ac1c44 | 6585 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
783e057b DJ |
6586 | ;; |
6587 | no) enable_targets= ;; | |
6588 | *) enable_targets=$enableval ;; | |
6589 | esac | |
81ecdfbb RW |
6590 | fi |
6591 | ||
20e95c23 | 6592 | |
783e057b | 6593 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6594 | # Check whether --enable-64-bit-bfd was given. |
6595 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6596 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6597 | yes) want64=true ;; |
6598 | no) want64=false ;; | |
d0ac1c44 | 6599 | *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6600 | esac |
6601 | else | |
6602 | want64=false | |
81ecdfbb RW |
6603 | fi |
6604 | ||
783e057b DJ |
6605 | # Provide defaults for some variables set by the per-host and per-target |
6606 | # configuration. | |
6607 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6608 | |
783e057b DJ |
6609 | if test "${target}" = "${host}"; then |
6610 | gdb_native=yes | |
6611 | else | |
6612 | gdb_native=no | |
6613 | fi | |
20e95c23 | 6614 | |
783e057b | 6615 | . $srcdir/configure.host |
20e95c23 | 6616 | |
fb23d554 SDJ |
6617 | # Add in the common host objects. |
6618 | . $srcdir/common/common.host | |
6619 | gdb_host_obs="$gdb_host_obs $common_host_obs" | |
6620 | ||
783e057b | 6621 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6622 | |
783e057b DJ |
6623 | TARGET_OBS= |
6624 | all_targets= | |
b292c783 | 6625 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6626 | |
783e057b | 6627 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6628 | do |
783e057b DJ |
6629 | if test "$targ_alias" = "all"; then |
6630 | all_targets=true | |
6631 | else | |
6632 | # Canonicalize the secondary target names. | |
6633 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6634 | if test -n "$result"; then | |
6635 | targ=$result | |
6636 | else | |
6637 | targ=$targ_alias | |
6638 | fi | |
20e95c23 | 6639 | |
783e057b | 6640 | . ${srcdir}/configure.tgt |
20e95c23 | 6641 | |
bf307134 | 6642 | if test -z "${gdb_target_obs}"; then : |
d0ac1c44 | 6643 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
bf307134 JB |
6644 | fi |
6645 | ||
783e057b DJ |
6646 | # Target-specific object files |
6647 | for i in ${gdb_target_obs}; do | |
6648 | case " $TARGET_OBS " in | |
6649 | *" ${i} "*) ;; | |
6650 | *) | |
6651 | TARGET_OBS="$TARGET_OBS ${i}" | |
6652 | ;; | |
6653 | esac | |
6654 | done | |
20e95c23 | 6655 | |
783e057b DJ |
6656 | # Check whether this target needs 64-bit CORE_ADDR |
6657 | if test x${want64} = xfalse; then | |
6658 | . ${srcdir}/../bfd/config.bfd | |
6659 | fi | |
b292c783 JK |
6660 | |
6661 | # Check whether this target is native and supports gcore. | |
6662 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6663 | && $gdb_have_gcore; then | |
6664 | HAVE_NATIVE_GCORE_TARGET=1 | |
6665 | fi | |
783e057b | 6666 | fi |
20e95c23 DJ |
6667 | done |
6668 | ||
783e057b DJ |
6669 | if test x${all_targets} = xtrue; then |
6670 | ||
6671 | # We want all 64-bit targets if we either: | |
6672 | # - run on a 64-bit host or | |
6673 | # - already require 64-bit support for some other target or | |
6674 | # - the --enable-64-bit-bfd option was supplied | |
6675 | # Otherwise we only support all 32-bit targets. | |
6676 | # | |
6677 | # NOTE: This test must be in sync with the corresponding | |
6678 | # tests in BFD! | |
20e95c23 | 6679 | |
783e057b | 6680 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6681 | # The cast to long int works around a bug in the HP C Compiler |
6682 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6683 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6684 | # This bug is HP SR number 8606223364. | |
6685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6686 | $as_echo_n "checking size of long... " >&6; } | |
d0ac1c44 | 6687 | if ${ac_cv_sizeof_long+:} false; then : |
81ecdfbb | 6688 | $as_echo_n "(cached) " >&6 |
c0993dbe | 6689 | else |
81ecdfbb | 6690 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6691 | |
81ecdfbb RW |
6692 | else |
6693 | if test "$ac_cv_type_long" = yes; then | |
6694 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6695 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
6696 | as_fn_error 77 "cannot compute sizeof (long) |
6697 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
6698 | else |
6699 | ac_cv_sizeof_long=0 | |
6700 | fi | |
c0993dbe | 6701 | fi |
81ecdfbb | 6702 | |
c0993dbe | 6703 | fi |
81ecdfbb RW |
6704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6705 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6706 | |
c0993dbe | 6707 | |
c0993dbe | 6708 | |
c0993dbe UW |
6709 | cat >>confdefs.h <<_ACEOF |
6710 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6711 | _ACEOF | |
6712 | ||
6713 | ||
6714 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6715 | want64=true | |
6716 | fi | |
6717 | fi | |
6718 | if test x${want64} = xtrue; then | |
6719 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6720 | else | |
6721 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6722 | fi | |
6723 | fi | |
6724 | ||
6725 | ||
6726 | ||
b292c783 | 6727 | |
c0993dbe UW |
6728 | # For other settings, only the main target counts. |
6729 | gdb_sim= | |
6730 | gdb_osabi= | |
6731 | build_gdbserver= | |
6732 | targ=$target; . ${srcdir}/configure.tgt | |
6733 | ||
6734 | # Fetch the default architecture and default target vector from BFD. | |
6735 | targ=$target; . $srcdir/../bfd/config.bfd | |
6736 | ||
6737 | # We only want the first architecture, so strip off the others if | |
6738 | # there is more than one. | |
6739 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6740 | ||
6741 | if test "x$targ_archs" != x; then | |
6742 | ||
6743 | cat >>confdefs.h <<_ACEOF | |
6744 | #define DEFAULT_BFD_ARCH $targ_archs | |
6745 | _ACEOF | |
6746 | ||
6747 | fi | |
6748 | if test "x$targ_defvec" != x; then | |
6749 | ||
6750 | cat >>confdefs.h <<_ACEOF | |
6751 | #define DEFAULT_BFD_VEC $targ_defvec | |
6752 | _ACEOF | |
6753 | ||
6754 | fi | |
6755 | ||
c0993dbe | 6756 | # Enable MI. |
81ecdfbb RW |
6757 | # Check whether --enable-gdbmi was given. |
6758 | if test "${enable_gdbmi+set}" = set; then : | |
6759 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6760 | yes | no) |
6761 | ;; | |
6762 | *) | |
d0ac1c44 | 6763 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6764 | esac |
6765 | else | |
6766 | enable_gdbmi=yes | |
81ecdfbb RW |
6767 | fi |
6768 | ||
c0993dbe UW |
6769 | if test x"$enable_gdbmi" = xyes; then |
6770 | if test -d $srcdir/mi; then | |
6771 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
6772 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6773 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6774 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6775 | fi | |
6776 | fi | |
6777 | ||
6778 | # Enable TUI. | |
81ecdfbb RW |
6779 | # Check whether --enable-tui was given. |
6780 | if test "${enable_tui+set}" = set; then : | |
6781 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6782 | yes | no | auto) |
c0993dbe UW |
6783 | ;; |
6784 | *) | |
d0ac1c44 | 6785 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6786 | esac |
6787 | else | |
3ca64bd3 | 6788 | enable_tui=auto |
81ecdfbb RW |
6789 | fi |
6790 | ||
c0993dbe UW |
6791 | |
6792 | # Enable gdbtk. | |
81ecdfbb RW |
6793 | # Check whether --enable-gdbtk was given. |
6794 | if test "${enable_gdbtk+set}" = set; then : | |
6795 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6796 | yes | no) |
6797 | ;; | |
6798 | *) | |
d0ac1c44 | 6799 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6800 | esac |
6801 | else | |
5062cc19 | 6802 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
6803 | enable_gdbtk=yes |
6804 | else | |
6805 | enable_gdbtk=no | |
6806 | fi | |
81ecdfbb RW |
6807 | fi |
6808 | ||
c0993dbe UW |
6809 | # We unconditionally disable gdbtk tests on selected platforms. |
6810 | case $host_os in | |
6811 | go32* | windows*) | |
81ecdfbb RW |
6812 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6813 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6814 | enable_gdbtk=no ;; |
6815 | esac | |
6816 | ||
05e7c244 | 6817 | # Libunwind support for ia64. |
bec39cab | 6818 | |
05e7c244 JK |
6819 | |
6820 | # Check whether --with-libunwind-ia64 was given. | |
6821 | if test "${with_libunwind_ia64+set}" = set; then : | |
6822 | withval=$with_libunwind_ia64; | |
bec39cab | 6823 | else |
05e7c244 JK |
6824 | with_libunwind_ia64=auto |
6825 | fi | |
bec39cab | 6826 | |
05e7c244 JK |
6827 | |
6828 | # Backward compatibility option. | |
6829 | if test "${with_libunwind+set}" = set; then | |
6830 | if test x"$with_libunwind_ia64" != xauto; then | |
d0ac1c44 | 6831 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
05e7c244 JK |
6832 | fi |
6833 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
6834 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
6835 | with_libunwind_ia64="$with_libunwind" | |
6836 | fi | |
6837 | ||
6838 | case "$with_libunwind_ia64" in | |
6839 | yes | no) | |
6840 | ;; | |
6841 | auto) | |
6842 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 6843 | do : |
b54a8fd7 | 6844 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 6845 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 6846 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6847 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6848 | _ACEOF |
6849 | ||
6850 | fi | |
6851 | ||
6852 | done | |
6853 | ||
05e7c244 JK |
6854 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
6855 | ;; | |
6856 | *) | |
d0ac1c44 | 6857 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
05e7c244 JK |
6858 | ;; |
6859 | esac | |
bec39cab | 6860 | |
05e7c244 | 6861 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 6862 | for ac_header in libunwind-ia64.h |
81ecdfbb | 6863 | do : |
b54a8fd7 | 6864 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 6865 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 6866 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6867 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6868 | _ACEOF |
6869 | ||
6870 | fi | |
6871 | ||
6872 | done | |
6873 | ||
05e7c244 | 6874 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
d0ac1c44 | 6875 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
05e7c244 JK |
6876 | fi |
6877 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
6878 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
6879 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
6880 | fi |
6881 | ||
cb01cfba JB |
6882 | opt_curses=no |
6883 | ||
81ecdfbb RW |
6884 | # Check whether --with-curses was given. |
6885 | if test "${with_curses+set}" = set; then : | |
6886 | withval=$with_curses; opt_curses=$withval | |
6887 | fi | |
6888 | ||
cb01cfba | 6889 | |
76a39ba7 | 6890 | prefer_curses=no |
cb01cfba | 6891 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 6892 | prefer_curses=yes |
cb01cfba JB |
6893 | fi |
6894 | ||
a9322a30 | 6895 | # Profiling support. |
81ecdfbb RW |
6896 | # Check whether --enable-profiling was given. |
6897 | if test "${enable_profiling+set}" = set; then : | |
6898 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
6899 | yes | no) |
6900 | ;; | |
6901 | *) | |
d0ac1c44 | 6902 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
6903 | esac |
6904 | else | |
6905 | enable_profiling=no | |
81ecdfbb | 6906 | fi |
bec39cab | 6907 | |
a9322a30 TT |
6908 | |
6909 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
6910 | do : |
6911 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6912 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6913 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
6914 | cat >>confdefs.h <<_ACEOF |
6915 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 6916 | _ACEOF |
a9322a30 | 6917 | |
81ecdfbb RW |
6918 | fi |
6919 | done | |
a9322a30 | 6920 | |
81ecdfbb RW |
6921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
6922 | $as_echo_n "checking for _etext... " >&6; } | |
d0ac1c44 | 6923 | if ${ac_cv_var__etext+:} false; then : |
81ecdfbb RW |
6924 | $as_echo_n "(cached) " >&6 |
6925 | else | |
6926 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6927 | /* end confdefs.h. */ | |
6928 | #include <stdlib.h> | |
6929 | extern char _etext; | |
a9322a30 TT |
6930 | |
6931 | int | |
6932 | main () | |
6933 | { | |
6934 | free (&_etext); | |
6935 | ; | |
6936 | return 0; | |
6937 | } | |
bec39cab | 6938 | _ACEOF |
81ecdfbb | 6939 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6940 | ac_cv_var__etext=yes |
bec39cab | 6941 | else |
81ecdfbb | 6942 | ac_cv_var__etext=no |
bec39cab | 6943 | fi |
81ecdfbb RW |
6944 | rm -f core conftest.err conftest.$ac_objext \ |
6945 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6946 | fi |
81ecdfbb RW |
6947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6948 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 6949 | if test $ac_cv_var__etext = yes; then |
60ca704f | 6950 | |
81ecdfbb | 6951 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6952 | |
bec39cab | 6953 | fi |
81ecdfbb RW |
6954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6955 | $as_echo_n "checking for etext... " >&6; } | |
d0ac1c44 | 6956 | if ${ac_cv_var_etext+:} false; then : |
81ecdfbb | 6957 | $as_echo_n "(cached) " >&6 |
bec39cab | 6958 | else |
81ecdfbb | 6959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6960 | /* end confdefs.h. */ |
a9322a30 TT |
6961 | #include <stdlib.h> |
6962 | extern char etext; | |
bec39cab AC |
6963 | |
6964 | int | |
6965 | main () | |
6966 | { | |
a9322a30 | 6967 | free (&etext); |
bec39cab AC |
6968 | ; |
6969 | return 0; | |
6970 | } | |
6971 | _ACEOF | |
81ecdfbb | 6972 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6973 | ac_cv_var_etext=yes |
bec39cab | 6974 | else |
81ecdfbb | 6975 | ac_cv_var_etext=no |
bec39cab | 6976 | fi |
81ecdfbb RW |
6977 | rm -f core conftest.err conftest.$ac_objext \ |
6978 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6979 | fi |
81ecdfbb RW |
6980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
6981 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
6982 | if test $ac_cv_var_etext = yes; then |
6983 | ||
81ecdfbb | 6984 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
6985 | |
6986 | fi | |
a9322a30 TT |
6987 | if test "$enable_profiling" = yes ; then |
6988 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
d0ac1c44 | 6989 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
6990 | fi |
6991 | PROFILE_CFLAGS=-pg | |
6992 | OLD_CFLAGS="$CFLAGS" | |
6993 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 6994 | |
81ecdfbb RW |
6995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
6996 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
d0ac1c44 | 6997 | if ${ac_cv_cc_supports_pg+:} false; then : |
81ecdfbb | 6998 | $as_echo_n "(cached) " >&6 |
bec39cab | 6999 | else |
81ecdfbb | 7000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7001 | /* end confdefs.h. */ |
bec39cab AC |
7002 | |
7003 | int | |
7004 | main () | |
7005 | { | |
a9322a30 | 7006 | int x; |
bec39cab AC |
7007 | ; |
7008 | return 0; | |
7009 | } | |
7010 | _ACEOF | |
81ecdfbb | 7011 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7012 | ac_cv_cc_supports_pg=yes |
bec39cab | 7013 | else |
81ecdfbb | 7014 | ac_cv_cc_supports_pg=no |
bec39cab | 7015 | fi |
81ecdfbb | 7016 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 7017 | fi |
81ecdfbb RW |
7018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7019 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7020 | |
a9322a30 | 7021 | if test $ac_cv_cc_supports_pg = no; then |
d0ac1c44 | 7022 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7023 | fi |
bec39cab | 7024 | |
a9322a30 | 7025 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7026 | fi |
7027 | ||
44cee4fd TT |
7028 | CODESIGN_CERT= |
7029 | # Check whether --enable-codesign was given. | |
7030 | if test "${enable_codesign+set}" = set; then : | |
7031 | enableval=$enable_codesign; CODESIGN_CERT=$enableval | |
7032 | fi | |
7033 | ||
7034 | ||
7035 | ||
c16158bc JM |
7036 | |
7037 | ||
81ecdfbb RW |
7038 | # Check whether --with-pkgversion was given. |
7039 | if test "${with_pkgversion+set}" = set; then : | |
7040 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 7041 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
7042 | no) PKGVERSION= ;; |
7043 | *) PKGVERSION="($withval) " ;; | |
7044 | esac | |
7045 | else | |
7046 | PKGVERSION="(GDB) " | |
7047 | ||
81ecdfbb | 7048 | fi |
c16158bc JM |
7049 | |
7050 | ||
7051 | ||
7052 | ||
81ecdfbb RW |
7053 | |
7054 | # Check whether --with-bugurl was given. | |
7055 | if test "${with_bugurl+set}" = set; then : | |
7056 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 7057 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
7058 | no) BUGURL= |
7059 | ;; | |
7060 | *) BUGURL="$withval" | |
7061 | ;; | |
7062 | esac | |
7063 | else | |
7064 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
7065 | ||
81ecdfbb RW |
7066 | fi |
7067 | ||
c16158bc JM |
7068 | case ${BUGURL} in |
7069 | "") | |
7070 | REPORT_BUGS_TO= | |
7071 | REPORT_BUGS_TEXI= | |
7072 | ;; | |
7073 | *) | |
7074 | REPORT_BUGS_TO="<$BUGURL>" | |
7075 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7076 | ;; | |
7077 | esac; | |
7078 | ||
7079 | ||
7080 | ||
7081 | ||
7082 | cat >>confdefs.h <<_ACEOF | |
7083 | #define PKGVERSION "$PKGVERSION" | |
7084 | _ACEOF | |
7085 | ||
7086 | ||
7087 | cat >>confdefs.h <<_ACEOF | |
7088 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7089 | _ACEOF | |
7090 | ||
7091 | ||
bec39cab AC |
7092 | # --------------------- # |
7093 | # Checks for programs. # | |
7094 | # --------------------- # | |
7095 | ||
7096 | for ac_prog in gawk mawk nawk awk | |
7097 | do | |
7098 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7099 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7101 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7102 | if ${ac_cv_prog_AWK+:} false; then : |
81ecdfbb | 7103 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7104 | else |
7105 | if test -n "$AWK"; then | |
7106 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7107 | else | |
7108 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7109 | for as_dir in $PATH | |
7110 | do | |
7111 | IFS=$as_save_IFS | |
7112 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7113 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7114 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7115 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7116 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7117 | break 2 |
7118 | fi | |
7119 | done | |
81ecdfbb RW |
7120 | done |
7121 | IFS=$as_save_IFS | |
bec39cab AC |
7122 | |
7123 | fi | |
7124 | fi | |
7125 | AWK=$ac_cv_prog_AWK | |
7126 | if test -n "$AWK"; then | |
81ecdfbb RW |
7127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7128 | $as_echo "$AWK" >&6; } | |
bec39cab | 7129 | else |
81ecdfbb RW |
7130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7131 | $as_echo "no" >&6; } | |
bec39cab AC |
7132 | fi |
7133 | ||
bec39cab | 7134 | |
81ecdfbb | 7135 | test -n "$AWK" && break |
bec39cab AC |
7136 | done |
7137 | ||
c971b7fa PA |
7138 | # Find a good install program. We prefer a C program (faster), |
7139 | # so one script is as good as another. But avoid the broken or | |
7140 | # incompatible versions: | |
7141 | # SysV /etc/install, /usr/sbin/install | |
7142 | # SunOS /usr/etc/install | |
7143 | # IRIX /sbin/install | |
7144 | # AIX /bin/install | |
7145 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7146 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7147 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7148 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7149 | # OS/2's system install, which has a completely different semantic | |
7150 | # ./install, which can be erroneously created by make from ./install.sh. | |
7151 | # Reject install programs that cannot install multiple files. | |
7152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7153 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7154 | if test -z "$INSTALL"; then | |
d0ac1c44 | 7155 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
7156 | $as_echo_n "(cached) " >&6 |
7157 | else | |
7158 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7159 | for as_dir in $PATH | |
7160 | do | |
7161 | IFS=$as_save_IFS | |
7162 | test -z "$as_dir" && as_dir=. | |
7163 | # Account for people who put trailing slashes in PATH elements. | |
7164 | case $as_dir/ in #(( | |
7165 | ./ | .// | /[cC]/* | \ | |
7166 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7167 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7168 | /usr/ucb/* ) ;; | |
7169 | *) | |
7170 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7171 | # Don't use installbsd from OSF since it installs stuff as root | |
7172 | # by default. | |
7173 | for ac_prog in ginstall scoinst install; do | |
7174 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 7175 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
7176 | if test $ac_prog = install && |
7177 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7178 | # AIX install. It has an incompatible calling convention. | |
7179 | : | |
7180 | elif test $ac_prog = install && | |
7181 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7182 | # program-specific install script used by HP pwplus--don't use. | |
7183 | : | |
7184 | else | |
7185 | rm -rf conftest.one conftest.two conftest.dir | |
7186 | echo one > conftest.one | |
7187 | echo two > conftest.two | |
7188 | mkdir conftest.dir | |
7189 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7190 | test -s conftest.one && test -s conftest.two && | |
7191 | test -s conftest.dir/conftest.one && | |
7192 | test -s conftest.dir/conftest.two | |
7193 | then | |
7194 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7195 | break 3 | |
7196 | fi | |
7197 | fi | |
7198 | fi | |
7199 | done | |
7200 | done | |
7201 | ;; | |
7202 | esac | |
7203 | ||
7204 | done | |
7205 | IFS=$as_save_IFS | |
7206 | ||
7207 | rm -rf conftest.one conftest.two conftest.dir | |
7208 | ||
7209 | fi | |
7210 | if test "${ac_cv_path_install+set}" = set; then | |
7211 | INSTALL=$ac_cv_path_install | |
7212 | else | |
7213 | # As a last resort, use the slow shell script. Don't cache a | |
7214 | # value for INSTALL within a source directory, because that will | |
7215 | # break other packages using the cache if that directory is | |
7216 | # removed, or if the value is a relative name. | |
7217 | INSTALL=$ac_install_sh | |
7218 | fi | |
7219 | fi | |
7220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7221 | $as_echo "$INSTALL" >&6; } | |
7222 | ||
7223 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7224 | # It thinks the first close brace ends the variable substitution. | |
7225 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7226 | ||
7227 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7228 | ||
7229 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7230 | |
81ecdfbb RW |
7231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7232 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7233 | LN_S=$as_ln_s |
7234 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7236 | $as_echo "yes" >&6; } | |
bec39cab | 7237 | else |
81ecdfbb RW |
7238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7239 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7240 | fi |
7241 | ||
7242 | if test -n "$ac_tool_prefix"; then | |
7243 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7244 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7246 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7247 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb | 7248 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7249 | else |
7250 | if test -n "$RANLIB"; then | |
7251 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7252 | else | |
7253 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7254 | for as_dir in $PATH | |
7255 | do | |
7256 | IFS=$as_save_IFS | |
7257 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7258 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7259 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7260 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7261 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7262 | break 2 |
7263 | fi | |
7264 | done | |
81ecdfbb RW |
7265 | done |
7266 | IFS=$as_save_IFS | |
bec39cab AC |
7267 | |
7268 | fi | |
7269 | fi | |
7270 | RANLIB=$ac_cv_prog_RANLIB | |
7271 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7273 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7274 | else |
81ecdfbb RW |
7275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7276 | $as_echo "no" >&6; } | |
bec39cab AC |
7277 | fi |
7278 | ||
81ecdfbb | 7279 | |
bec39cab AC |
7280 | fi |
7281 | if test -z "$ac_cv_prog_RANLIB"; then | |
7282 | ac_ct_RANLIB=$RANLIB | |
7283 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7284 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7286 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7287 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
81ecdfbb | 7288 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7289 | else |
7290 | if test -n "$ac_ct_RANLIB"; then | |
7291 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7292 | else | |
7293 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7294 | for as_dir in $PATH | |
7295 | do | |
7296 | IFS=$as_save_IFS | |
7297 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7298 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7299 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7300 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7301 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7302 | break 2 |
7303 | fi | |
7304 | done | |
81ecdfbb RW |
7305 | done |
7306 | IFS=$as_save_IFS | |
bec39cab | 7307 | |
bec39cab AC |
7308 | fi |
7309 | fi | |
7310 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7311 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7313 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7314 | else |
81ecdfbb RW |
7315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7316 | $as_echo "no" >&6; } | |
bec39cab AC |
7317 | fi |
7318 | ||
81ecdfbb RW |
7319 | if test "x$ac_ct_RANLIB" = x; then |
7320 | RANLIB=":" | |
7321 | else | |
7322 | case $cross_compiling:$ac_tool_warned in | |
7323 | yes:) | |
7324 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7325 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7326 | ac_tool_warned=yes ;; | |
7327 | esac | |
7328 | RANLIB=$ac_ct_RANLIB | |
7329 | fi | |
bec39cab AC |
7330 | else |
7331 | RANLIB="$ac_cv_prog_RANLIB" | |
7332 | fi | |
7333 | ||
7334 | for ac_prog in 'bison -y' byacc | |
7335 | do | |
7336 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7337 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7338 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7339 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7340 | if ${ac_cv_prog_YACC+:} false; then : |
81ecdfbb | 7341 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7342 | else |
7343 | if test -n "$YACC"; then | |
7344 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7345 | else | |
7346 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7347 | for as_dir in $PATH | |
7348 | do | |
7349 | IFS=$as_save_IFS | |
7350 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7351 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7352 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7353 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7354 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7355 | break 2 |
7356 | fi | |
7357 | done | |
81ecdfbb RW |
7358 | done |
7359 | IFS=$as_save_IFS | |
bec39cab AC |
7360 | |
7361 | fi | |
7362 | fi | |
7363 | YACC=$ac_cv_prog_YACC | |
7364 | if test -n "$YACC"; then | |
81ecdfbb RW |
7365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7366 | $as_echo "$YACC" >&6; } | |
bec39cab | 7367 | else |
81ecdfbb RW |
7368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7369 | $as_echo "no" >&6; } | |
bec39cab AC |
7370 | fi |
7371 | ||
81ecdfbb | 7372 | |
bec39cab AC |
7373 | test -n "$YACC" && break |
7374 | done | |
7375 | test -n "$YACC" || YACC="yacc" | |
7376 | ||
7377 | ||
7378 | if test -n "$ac_tool_prefix"; then | |
7379 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7380 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7382 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7383 | if ${ac_cv_prog_AR+:} false; then : |
81ecdfbb | 7384 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7385 | else |
7386 | if test -n "$AR"; then | |
7387 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7388 | else | |
7389 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7390 | for as_dir in $PATH | |
7391 | do | |
7392 | IFS=$as_save_IFS | |
7393 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7394 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7395 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7396 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7397 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7398 | break 2 |
7399 | fi | |
7400 | done | |
81ecdfbb RW |
7401 | done |
7402 | IFS=$as_save_IFS | |
bec39cab AC |
7403 | |
7404 | fi | |
7405 | fi | |
7406 | AR=$ac_cv_prog_AR | |
7407 | if test -n "$AR"; then | |
81ecdfbb RW |
7408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7409 | $as_echo "$AR" >&6; } | |
bec39cab | 7410 | else |
81ecdfbb RW |
7411 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7412 | $as_echo "no" >&6; } | |
bec39cab AC |
7413 | fi |
7414 | ||
81ecdfbb | 7415 | |
bec39cab AC |
7416 | fi |
7417 | if test -z "$ac_cv_prog_AR"; then | |
7418 | ac_ct_AR=$AR | |
7419 | # Extract the first word of "ar", so it can be a program name with args. | |
7420 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7422 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7423 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
81ecdfbb | 7424 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7425 | else |
7426 | if test -n "$ac_ct_AR"; then | |
7427 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7428 | else | |
7429 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7430 | for as_dir in $PATH | |
7431 | do | |
7432 | IFS=$as_save_IFS | |
7433 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7434 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7435 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7436 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7437 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7438 | break 2 |
7439 | fi | |
7440 | done | |
81ecdfbb RW |
7441 | done |
7442 | IFS=$as_save_IFS | |
bec39cab AC |
7443 | |
7444 | fi | |
7445 | fi | |
7446 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7447 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7449 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7450 | else |
81ecdfbb RW |
7451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7452 | $as_echo "no" >&6; } | |
bec39cab AC |
7453 | fi |
7454 | ||
81ecdfbb RW |
7455 | if test "x$ac_ct_AR" = x; then |
7456 | AR="" | |
7457 | else | |
7458 | case $cross_compiling:$ac_tool_warned in | |
7459 | yes:) | |
7460 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7461 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7462 | ac_tool_warned=yes ;; | |
7463 | esac | |
7464 | AR=$ac_ct_AR | |
7465 | fi | |
bec39cab AC |
7466 | else |
7467 | AR="$ac_cv_prog_AR" | |
7468 | fi | |
7469 | ||
7470 | if test -n "$ac_tool_prefix"; then | |
7471 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7472 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7474 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7475 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
81ecdfbb | 7476 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7477 | else |
7478 | if test -n "$DLLTOOL"; then | |
7479 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7480 | else | |
7481 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7482 | for as_dir in $PATH | |
7483 | do | |
7484 | IFS=$as_save_IFS | |
7485 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7486 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7487 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7488 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7489 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7490 | break 2 |
7491 | fi | |
7492 | done | |
81ecdfbb RW |
7493 | done |
7494 | IFS=$as_save_IFS | |
bec39cab AC |
7495 | |
7496 | fi | |
7497 | fi | |
7498 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7499 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7501 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7502 | else |
81ecdfbb RW |
7503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7504 | $as_echo "no" >&6; } | |
bec39cab AC |
7505 | fi |
7506 | ||
81ecdfbb | 7507 | |
bec39cab AC |
7508 | fi |
7509 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7510 | ac_ct_DLLTOOL=$DLLTOOL | |
7511 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7512 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7514 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7515 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
81ecdfbb | 7516 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7517 | else |
7518 | if test -n "$ac_ct_DLLTOOL"; then | |
7519 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7520 | else | |
7521 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7522 | for as_dir in $PATH | |
7523 | do | |
7524 | IFS=$as_save_IFS | |
7525 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7526 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7527 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7528 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7529 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7530 | break 2 |
7531 | fi | |
7532 | done | |
81ecdfbb RW |
7533 | done |
7534 | IFS=$as_save_IFS | |
bec39cab AC |
7535 | |
7536 | fi | |
7537 | fi | |
7538 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7539 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7541 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7542 | else |
81ecdfbb RW |
7543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7544 | $as_echo "no" >&6; } | |
bec39cab AC |
7545 | fi |
7546 | ||
81ecdfbb RW |
7547 | if test "x$ac_ct_DLLTOOL" = x; then |
7548 | DLLTOOL="" | |
7549 | else | |
7550 | case $cross_compiling:$ac_tool_warned in | |
7551 | yes:) | |
7552 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7553 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7554 | ac_tool_warned=yes ;; | |
7555 | esac | |
7556 | DLLTOOL=$ac_ct_DLLTOOL | |
7557 | fi | |
bec39cab AC |
7558 | else |
7559 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7560 | fi | |
7561 | ||
7562 | if test -n "$ac_tool_prefix"; then | |
7563 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7564 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7566 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7567 | if ${ac_cv_prog_WINDRES+:} false; then : |
81ecdfbb | 7568 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7569 | else |
7570 | if test -n "$WINDRES"; then | |
7571 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7572 | else | |
7573 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7574 | for as_dir in $PATH | |
7575 | do | |
7576 | IFS=$as_save_IFS | |
7577 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7578 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7579 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7580 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7581 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7582 | break 2 |
7583 | fi | |
7584 | done | |
81ecdfbb RW |
7585 | done |
7586 | IFS=$as_save_IFS | |
bec39cab AC |
7587 | |
7588 | fi | |
7589 | fi | |
7590 | WINDRES=$ac_cv_prog_WINDRES | |
7591 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7593 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7594 | else |
81ecdfbb RW |
7595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7596 | $as_echo "no" >&6; } | |
bec39cab AC |
7597 | fi |
7598 | ||
81ecdfbb | 7599 | |
bec39cab AC |
7600 | fi |
7601 | if test -z "$ac_cv_prog_WINDRES"; then | |
7602 | ac_ct_WINDRES=$WINDRES | |
7603 | # Extract the first word of "windres", so it can be a program name with args. | |
7604 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7606 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7607 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
81ecdfbb | 7608 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7609 | else |
7610 | if test -n "$ac_ct_WINDRES"; then | |
7611 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7612 | else | |
7613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7614 | for as_dir in $PATH | |
7615 | do | |
7616 | IFS=$as_save_IFS | |
7617 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7618 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7619 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7620 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7621 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7622 | break 2 |
7623 | fi | |
7624 | done | |
81ecdfbb RW |
7625 | done |
7626 | IFS=$as_save_IFS | |
bec39cab AC |
7627 | |
7628 | fi | |
7629 | fi | |
7630 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7631 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7633 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7634 | else |
81ecdfbb RW |
7635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7636 | $as_echo "no" >&6; } | |
c906108c | 7637 | fi |
bec39cab | 7638 | |
81ecdfbb RW |
7639 | if test "x$ac_ct_WINDRES" = x; then |
7640 | WINDRES="" | |
7641 | else | |
7642 | case $cross_compiling:$ac_tool_warned in | |
7643 | yes:) | |
7644 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7645 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7646 | ac_tool_warned=yes ;; | |
7647 | esac | |
7648 | WINDRES=$ac_ct_WINDRES | |
7649 | fi | |
c906108c | 7650 | else |
bec39cab | 7651 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7652 | fi |
7653 | ||
bec39cab | 7654 | |
036c3acb TS |
7655 | case $host_os in |
7656 | gnu*) | |
7657 | # Needed for GNU Hurd hosts. | |
7658 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7659 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7660 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7662 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7663 | if ${ac_cv_prog_MIG+:} false; then : |
81ecdfbb | 7664 | $as_echo_n "(cached) " >&6 |
c906108c | 7665 | else |
bec39cab AC |
7666 | if test -n "$MIG"; then |
7667 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7668 | else | |
7669 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7670 | for as_dir in $PATH | |
7671 | do | |
7672 | IFS=$as_save_IFS | |
7673 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7674 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7675 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7676 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7677 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7678 | break 2 |
7679 | fi | |
7680 | done | |
81ecdfbb RW |
7681 | done |
7682 | IFS=$as_save_IFS | |
bec39cab | 7683 | |
c906108c | 7684 | fi |
bec39cab AC |
7685 | fi |
7686 | MIG=$ac_cv_prog_MIG | |
7687 | if test -n "$MIG"; then | |
81ecdfbb RW |
7688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7689 | $as_echo "$MIG" >&6; } | |
c906108c | 7690 | else |
81ecdfbb RW |
7691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7692 | $as_echo "no" >&6; } | |
c906108c SS |
7693 | fi |
7694 | ||
81ecdfbb | 7695 | |
bec39cab AC |
7696 | fi |
7697 | if test -z "$ac_cv_prog_MIG"; then | |
7698 | ac_ct_MIG=$MIG | |
7699 | # Extract the first word of "mig", so it can be a program name with args. | |
7700 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
7701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7702 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7703 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
81ecdfbb | 7704 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7705 | else |
7706 | if test -n "$ac_ct_MIG"; then | |
7707 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
7708 | else | |
7709 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7710 | for as_dir in $PATH | |
7711 | do | |
7712 | IFS=$as_save_IFS | |
7713 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7714 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7715 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7716 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 7717 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7718 | break 2 |
7719 | fi | |
7720 | done | |
81ecdfbb RW |
7721 | done |
7722 | IFS=$as_save_IFS | |
c906108c | 7723 | |
bec39cab AC |
7724 | fi |
7725 | fi | |
7726 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
7727 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
7728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
7729 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 7730 | else |
81ecdfbb RW |
7731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7732 | $as_echo "no" >&6; } | |
bec39cab | 7733 | fi |
c906108c | 7734 | |
81ecdfbb RW |
7735 | if test "x$ac_ct_MIG" = x; then |
7736 | MIG="" | |
7737 | else | |
7738 | case $cross_compiling:$ac_tool_warned in | |
7739 | yes:) | |
7740 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7741 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7742 | ac_tool_warned=yes ;; | |
7743 | esac | |
7744 | MIG=$ac_ct_MIG | |
7745 | fi | |
bec39cab AC |
7746 | else |
7747 | MIG="$ac_cv_prog_MIG" | |
7748 | fi | |
c906108c | 7749 | |
036c3acb | 7750 | if test x"$MIG" = x; then |
d0ac1c44 | 7751 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
036c3acb TS |
7752 | fi |
7753 | ;; | |
7754 | esac | |
c906108c | 7755 | |
bec39cab AC |
7756 | # ---------------------- # |
7757 | # Checks for libraries. # | |
7758 | # ---------------------- # | |
c906108c | 7759 | |
bec39cab | 7760 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
7761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
7762 | $as_echo_n "checking for main in -lm... " >&6; } | |
d0ac1c44 | 7763 | if ${ac_cv_lib_m_main+:} false; then : |
81ecdfbb | 7764 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7765 | else |
7766 | ac_check_lib_save_LIBS=$LIBS | |
7767 | LIBS="-lm $LIBS" | |
81ecdfbb | 7768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7769 | /* end confdefs.h. */ |
c906108c | 7770 | |
c906108c | 7771 | |
bec39cab AC |
7772 | int |
7773 | main () | |
7774 | { | |
81ecdfbb | 7775 | return main (); |
bec39cab AC |
7776 | ; |
7777 | return 0; | |
7778 | } | |
7779 | _ACEOF | |
81ecdfbb | 7780 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7781 | ac_cv_lib_m_main=yes |
7782 | else | |
81ecdfbb | 7783 | ac_cv_lib_m_main=no |
bec39cab | 7784 | fi |
81ecdfbb RW |
7785 | rm -f core conftest.err conftest.$ac_objext \ |
7786 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7787 | LIBS=$ac_check_lib_save_LIBS |
7788 | fi | |
81ecdfbb RW |
7789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
7790 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
d0ac1c44 | 7791 | if test "x$ac_cv_lib_m_main" = xyes; then : |
bec39cab AC |
7792 | cat >>confdefs.h <<_ACEOF |
7793 | #define HAVE_LIBM 1 | |
7794 | _ACEOF | |
7795 | ||
7796 | LIBS="-lm $LIBS" | |
c906108c | 7797 | |
c906108c | 7798 | fi |
bec39cab AC |
7799 | |
7800 | ||
bec39cab | 7801 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
7802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
7803 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
d0ac1c44 | 7804 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb | 7805 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7806 | else |
7807 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7808 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7809 | /* end confdefs.h. */ |
ddc9cd0f | 7810 | |
81ecdfbb RW |
7811 | /* Override any GCC internal prototype to avoid an error. |
7812 | Use char because int might match the return type of a GCC | |
7813 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7814 | #ifdef __cplusplus |
7815 | extern "C" | |
7816 | #endif | |
bec39cab AC |
7817 | char gethostbyname (); |
7818 | int | |
7819 | main () | |
7820 | { | |
81ecdfbb | 7821 | return gethostbyname (); |
bec39cab AC |
7822 | ; |
7823 | return 0; | |
7824 | } | |
7825 | _ACEOF | |
81ecdfbb RW |
7826 | for ac_lib in '' nsl; do |
7827 | if test -z "$ac_lib"; then | |
7828 | ac_res="none required" | |
7829 | else | |
7830 | ac_res=-l$ac_lib | |
b4e70030 | 7831 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7832 | fi |
7833 | if ac_fn_c_try_link "$LINENO"; then : | |
7834 | ac_cv_search_gethostbyname=$ac_res | |
7835 | fi | |
7836 | rm -f core conftest.err conftest.$ac_objext \ | |
7837 | conftest$ac_exeext | |
d0ac1c44 | 7838 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb RW |
7839 | break |
7840 | fi | |
7841 | done | |
d0ac1c44 | 7842 | if ${ac_cv_search_gethostbyname+:} false; then : |
ddc9cd0f | 7843 | |
bec39cab | 7844 | else |
81ecdfbb | 7845 | ac_cv_search_gethostbyname=no |
bec39cab | 7846 | fi |
81ecdfbb | 7847 | rm conftest.$ac_ext |
bec39cab AC |
7848 | LIBS=$ac_func_search_save_LIBS |
7849 | fi | |
81ecdfbb RW |
7850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
7851 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
7852 | ac_res=$ac_cv_search_gethostbyname | |
7853 | if test "$ac_res" != no; then : | |
7854 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 7855 | |
bec39cab | 7856 | fi |
96baa820 | 7857 | |
c906108c | 7858 | |
b4e70030 | 7859 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
7860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
7861 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
d0ac1c44 | 7862 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb | 7863 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
7864 | else |
7865 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7866 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7867 | /* end confdefs.h. */ |
7868 | ||
81ecdfbb RW |
7869 | /* Override any GCC internal prototype to avoid an error. |
7870 | Use char because int might match the return type of a GCC | |
7871 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
7872 | #ifdef __cplusplus |
7873 | extern "C" | |
7874 | #endif | |
b4e70030 JB |
7875 | char socketpair (); |
7876 | int | |
7877 | main () | |
7878 | { | |
81ecdfbb | 7879 | return socketpair (); |
b4e70030 JB |
7880 | ; |
7881 | return 0; | |
7882 | } | |
7883 | _ACEOF | |
81ecdfbb RW |
7884 | for ac_lib in '' socket; do |
7885 | if test -z "$ac_lib"; then | |
7886 | ac_res="none required" | |
7887 | else | |
7888 | ac_res=-l$ac_lib | |
b4e70030 | 7889 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7890 | fi |
7891 | if ac_fn_c_try_link "$LINENO"; then : | |
7892 | ac_cv_search_socketpair=$ac_res | |
7893 | fi | |
7894 | rm -f core conftest.err conftest.$ac_objext \ | |
7895 | conftest$ac_exeext | |
d0ac1c44 | 7896 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb RW |
7897 | break |
7898 | fi | |
7899 | done | |
d0ac1c44 | 7900 | if ${ac_cv_search_socketpair+:} false; then : |
b4e70030 | 7901 | |
b4e70030 | 7902 | else |
81ecdfbb | 7903 | ac_cv_search_socketpair=no |
b4e70030 | 7904 | fi |
81ecdfbb | 7905 | rm conftest.$ac_ext |
b4e70030 JB |
7906 | LIBS=$ac_func_search_save_LIBS |
7907 | fi | |
81ecdfbb RW |
7908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7909 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7910 | ac_res=$ac_cv_search_socketpair | |
7911 | if test "$ac_res" != no; then : | |
7912 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7913 | |
7914 | fi | |
7915 | ||
7916 | ||
233a11ab | 7917 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 7918 | |
711a72d3 | 7919 | # Use the system's zlib library. |
39f3de7c L |
7920 | zlibdir="-L\$(top_builddir)/../zlib" |
7921 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 7922 | |
711a72d3 L |
7923 | # Check whether --with-system-zlib was given. |
7924 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
7925 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
7926 | zlibdir= | |
7927 | zlibinc= | |
7928 | fi | |
b040ad30 | 7929 | |
233a11ab | 7930 | fi |
233a11ab | 7931 | |
233a11ab | 7932 | |
233a11ab | 7933 | |
b040ad30 | 7934 | |
233a11ab | 7935 | |
25268153 | 7936 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
37773e78 | 7937 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
25268153 JB |
7938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
7939 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
d0ac1c44 | 7940 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
7941 | $as_echo_n "(cached) " >&6 |
7942 | else | |
7943 | ac_func_search_save_LIBS=$LIBS | |
7944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7945 | /* end confdefs.h. */ | |
7946 | ||
7947 | /* Override any GCC internal prototype to avoid an error. | |
7948 | Use char because int might match the return type of a GCC | |
7949 | builtin and then its argument prototype would still apply. */ | |
7950 | #ifdef __cplusplus | |
7951 | extern "C" | |
7952 | #endif | |
7953 | char kinfo_getvmmap (); | |
7954 | int | |
7955 | main () | |
7956 | { | |
7957 | return kinfo_getvmmap (); | |
7958 | ; | |
7959 | return 0; | |
7960 | } | |
7961 | _ACEOF | |
37773e78 | 7962 | for ac_lib in '' util util-freebsd; do |
25268153 JB |
7963 | if test -z "$ac_lib"; then |
7964 | ac_res="none required" | |
7965 | else | |
7966 | ac_res=-l$ac_lib | |
7967 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7968 | fi | |
7969 | if ac_fn_c_try_link "$LINENO"; then : | |
7970 | ac_cv_search_kinfo_getvmmap=$ac_res | |
7971 | fi | |
7972 | rm -f core conftest.err conftest.$ac_objext \ | |
7973 | conftest$ac_exeext | |
d0ac1c44 | 7974 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
7975 | break |
7976 | fi | |
7977 | done | |
d0ac1c44 | 7978 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
7979 | |
7980 | else | |
7981 | ac_cv_search_kinfo_getvmmap=no | |
7982 | fi | |
7983 | rm conftest.$ac_ext | |
7984 | LIBS=$ac_func_search_save_LIBS | |
7985 | fi | |
7986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
7987 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
7988 | ac_res=$ac_cv_search_kinfo_getvmmap | |
7989 | if test "$ac_res" != no; then : | |
7990 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7991 | ||
7992 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
7993 | ||
7994 | fi | |
7995 | ||
7996 | ||
92fce24d JB |
7997 | # fbsd-nat.c can also use kinfo_getfile. |
7998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 | |
7999 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
d0ac1c44 | 8000 | if ${ac_cv_search_kinfo_getfile+:} false; then : |
92fce24d JB |
8001 | $as_echo_n "(cached) " >&6 |
8002 | else | |
8003 | ac_func_search_save_LIBS=$LIBS | |
8004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8005 | /* end confdefs.h. */ | |
8006 | ||
8007 | /* Override any GCC internal prototype to avoid an error. | |
8008 | Use char because int might match the return type of a GCC | |
8009 | builtin and then its argument prototype would still apply. */ | |
8010 | #ifdef __cplusplus | |
8011 | extern "C" | |
8012 | #endif | |
8013 | char kinfo_getfile (); | |
8014 | int | |
8015 | main () | |
8016 | { | |
8017 | return kinfo_getfile (); | |
8018 | ; | |
8019 | return 0; | |
8020 | } | |
8021 | _ACEOF | |
8022 | for ac_lib in '' util util-freebsd; do | |
8023 | if test -z "$ac_lib"; then | |
8024 | ac_res="none required" | |
8025 | else | |
8026 | ac_res=-l$ac_lib | |
8027 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8028 | fi | |
8029 | if ac_fn_c_try_link "$LINENO"; then : | |
8030 | ac_cv_search_kinfo_getfile=$ac_res | |
8031 | fi | |
8032 | rm -f core conftest.err conftest.$ac_objext \ | |
8033 | conftest$ac_exeext | |
d0ac1c44 | 8034 | if ${ac_cv_search_kinfo_getfile+:} false; then : |
92fce24d JB |
8035 | break |
8036 | fi | |
8037 | done | |
d0ac1c44 | 8038 | if ${ac_cv_search_kinfo_getfile+:} false; then : |
92fce24d JB |
8039 | |
8040 | else | |
8041 | ac_cv_search_kinfo_getfile=no | |
8042 | fi | |
8043 | rm conftest.$ac_ext | |
8044 | LIBS=$ac_func_search_save_LIBS | |
8045 | fi | |
8046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
8047 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
8048 | ac_res=$ac_cv_search_kinfo_getfile | |
8049 | if test "$ac_res" != no; then : | |
8050 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
8051 | ||
8052 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | |
8053 | ||
8054 | fi | |
8055 | ||
8056 | ||
77f120bf | 8057 | |
016a3251 DD |
8058 | if test "X$prefix" = "XNONE"; then |
8059 | acl_final_prefix="$ac_default_prefix" | |
8060 | else | |
8061 | acl_final_prefix="$prefix" | |
8062 | fi | |
8063 | if test "X$exec_prefix" = "XNONE"; then | |
8064 | acl_final_exec_prefix='${prefix}' | |
8065 | else | |
8066 | acl_final_exec_prefix="$exec_prefix" | |
8067 | fi | |
8068 | acl_save_prefix="$prefix" | |
8069 | prefix="$acl_final_prefix" | |
8070 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8071 | prefix="$acl_save_prefix" | |
8072 | ||
8073 | ||
8074 | # Check whether --with-gnu-ld was given. | |
8075 | if test "${with_gnu_ld+set}" = set; then : | |
8076 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8077 | else | |
8078 | with_gnu_ld=no | |
8079 | fi | |
8080 | ||
8081 | # Prepare PATH_SEPARATOR. | |
8082 | # The user is always right. | |
8083 | if test "${PATH_SEPARATOR+set}" != set; then | |
8084 | echo "#! /bin/sh" >conf$$.sh | |
8085 | echo "exit 0" >>conf$$.sh | |
8086 | chmod +x conf$$.sh | |
8087 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8088 | PATH_SEPARATOR=';' | |
8089 | else | |
8090 | PATH_SEPARATOR=: | |
8091 | fi | |
8092 | rm -f conf$$.sh | |
8093 | fi | |
8094 | ac_prog=ld | |
8095 | if test "$GCC" = yes; then | |
8096 | # Check if gcc -print-prog-name=ld gives a path. | |
8097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8098 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8099 | case $host in | |
8100 | *-*-mingw*) | |
8101 | # gcc leaves a trailing carriage return which upsets mingw | |
8102 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8103 | *) | |
8104 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8105 | esac | |
8106 | case $ac_prog in | |
8107 | # Accept absolute paths. | |
8108 | [\\/]* | [A-Za-z]:[\\/]*) | |
8109 | re_direlt='/[^/][^/]*/\.\./' | |
8110 | # Canonicalize the path of ld | |
8111 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8112 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8113 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8114 | done | |
8115 | test -z "$LD" && LD="$ac_prog" | |
8116 | ;; | |
8117 | "") | |
8118 | # If it fails, then pretend we aren't using GCC. | |
8119 | ac_prog=ld | |
8120 | ;; | |
8121 | *) | |
8122 | # If it is relative, then search for the first ld in PATH. | |
8123 | with_gnu_ld=unknown | |
8124 | ;; | |
8125 | esac | |
8126 | elif test "$with_gnu_ld" = yes; then | |
8127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8128 | $as_echo_n "checking for GNU ld... " >&6; } | |
8129 | else | |
8130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8131 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8132 | fi | |
d0ac1c44 | 8133 | if ${acl_cv_path_LD+:} false; then : |
016a3251 DD |
8134 | $as_echo_n "(cached) " >&6 |
8135 | else | |
8136 | if test -z "$LD"; then | |
8137 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8138 | for ac_dir in $PATH; do | |
8139 | test -z "$ac_dir" && ac_dir=. | |
8140 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8141 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8142 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8143 | # but apparently some GNU ld's only accept -v. | |
8144 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8145 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8146 | test "$with_gnu_ld" != no && break | |
8147 | else | |
8148 | test "$with_gnu_ld" != yes && break | |
8149 | fi | |
8150 | fi | |
8151 | done | |
8152 | IFS="$ac_save_ifs" | |
8153 | else | |
8154 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8155 | fi | |
8156 | fi | |
8157 | ||
8158 | LD="$acl_cv_path_LD" | |
8159 | if test -n "$LD"; then | |
8160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8161 | $as_echo "$LD" >&6; } | |
8162 | else | |
8163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8164 | $as_echo "no" >&6; } | |
8165 | fi | |
d0ac1c44 | 8166 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
016a3251 DD |
8167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
8168 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
d0ac1c44 | 8169 | if ${acl_cv_prog_gnu_ld+:} false; then : |
016a3251 DD |
8170 | $as_echo_n "(cached) " >&6 |
8171 | else | |
8172 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8173 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8174 | acl_cv_prog_gnu_ld=yes | |
8175 | else | |
8176 | acl_cv_prog_gnu_ld=no | |
8177 | fi | |
8178 | fi | |
8179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8180 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8181 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8182 | ||
8183 | ||
8184 | ||
8185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8186 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
d0ac1c44 | 8187 | if ${acl_cv_rpath+:} false; then : |
016a3251 DD |
8188 | $as_echo_n "(cached) " >&6 |
8189 | else | |
8190 | ||
8191 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8192 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8193 | . ./conftest.sh | |
8194 | rm -f ./conftest.sh | |
8195 | acl_cv_rpath=done | |
8196 | ||
8197 | fi | |
8198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8199 | $as_echo "$acl_cv_rpath" >&6; } | |
8200 | wl="$acl_cv_wl" | |
8201 | libext="$acl_cv_libext" | |
8202 | shlibext="$acl_cv_shlibext" | |
8203 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8204 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8205 | hardcode_direct="$acl_cv_hardcode_direct" | |
8206 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8207 | # Check whether --enable-rpath was given. | |
8208 | if test "${enable_rpath+set}" = set; then : | |
8209 | enableval=$enable_rpath; : | |
8210 | else | |
8211 | enable_rpath=yes | |
8212 | fi | |
8213 | ||
8214 | ||
8215 | ||
8216 | ||
8217 | ||
8218 | ||
8219 | ||
8220 | ||
8221 | use_additional=yes | |
8222 | ||
8223 | acl_save_prefix="$prefix" | |
8224 | prefix="$acl_final_prefix" | |
8225 | acl_save_exec_prefix="$exec_prefix" | |
8226 | exec_prefix="$acl_final_exec_prefix" | |
8227 | ||
8228 | eval additional_includedir=\"$includedir\" | |
8229 | eval additional_libdir=\"$libdir\" | |
8230 | ||
8231 | exec_prefix="$acl_save_exec_prefix" | |
8232 | prefix="$acl_save_prefix" | |
77f120bf | 8233 | |
6c7a06a3 | 8234 | |
81ecdfbb RW |
8235 | # Check whether --with-libiconv-prefix was given. |
8236 | if test "${with_libiconv_prefix+set}" = set; then : | |
8237 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8238 | if test "X$withval" = "Xno"; then |
8239 | use_additional=no | |
8240 | else | |
8241 | if test "X$withval" = "X"; then | |
8242 | ||
8243 | acl_save_prefix="$prefix" | |
8244 | prefix="$acl_final_prefix" | |
8245 | acl_save_exec_prefix="$exec_prefix" | |
8246 | exec_prefix="$acl_final_exec_prefix" | |
8247 | ||
8248 | eval additional_includedir=\"$includedir\" | |
8249 | eval additional_libdir=\"$libdir\" | |
8250 | ||
8251 | exec_prefix="$acl_save_exec_prefix" | |
8252 | prefix="$acl_save_prefix" | |
8253 | ||
8254 | else | |
8255 | additional_includedir="$withval/include" | |
8256 | additional_libdir="$withval/lib" | |
8257 | fi | |
8258 | fi | |
6c7a06a3 | 8259 | |
81ecdfbb RW |
8260 | fi |
8261 | ||
016a3251 DD |
8262 | LIBICONV= |
8263 | LTLIBICONV= | |
8264 | INCICONV= | |
8265 | rpathdirs= | |
8266 | ltrpathdirs= | |
8267 | names_already_handled= | |
8268 | names_next_round='iconv ' | |
8269 | while test -n "$names_next_round"; do | |
8270 | names_this_round="$names_next_round" | |
8271 | names_next_round= | |
8272 | for name in $names_this_round; do | |
8273 | already_handled= | |
8274 | for n in $names_already_handled; do | |
8275 | if test "$n" = "$name"; then | |
8276 | already_handled=yes | |
8277 | break | |
8278 | fi | |
8279 | done | |
8280 | if test -z "$already_handled"; then | |
8281 | names_already_handled="$names_already_handled $name" | |
8282 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8283 | eval value=\"\$HAVE_LIB$uppername\" | |
8284 | if test -n "$value"; then | |
8285 | if test "$value" = yes; then | |
8286 | eval value=\"\$LIB$uppername\" | |
8287 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8288 | eval value=\"\$LTLIB$uppername\" | |
8289 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8290 | else | |
8291 | : | |
8292 | fi | |
8293 | else | |
8294 | found_dir= | |
8295 | found_la= | |
8296 | found_so= | |
8297 | found_a= | |
8298 | if test $use_additional = yes; then | |
8299 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8300 | found_dir="$additional_libdir" | |
8301 | found_so="$additional_libdir/lib$name.$shlibext" | |
8302 | if test -f "$additional_libdir/lib$name.la"; then | |
8303 | found_la="$additional_libdir/lib$name.la" | |
8304 | fi | |
8305 | else | |
8306 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8307 | found_dir="$additional_libdir" | |
8308 | found_a="$additional_libdir/lib$name.$libext" | |
8309 | if test -f "$additional_libdir/lib$name.la"; then | |
8310 | found_la="$additional_libdir/lib$name.la" | |
8311 | fi | |
8312 | fi | |
8313 | fi | |
8314 | fi | |
8315 | if test "X$found_dir" = "X"; then | |
8316 | for x in $LDFLAGS $LTLIBICONV; do | |
8317 | ||
8318 | acl_save_prefix="$prefix" | |
8319 | prefix="$acl_final_prefix" | |
8320 | acl_save_exec_prefix="$exec_prefix" | |
8321 | exec_prefix="$acl_final_exec_prefix" | |
8322 | eval x=\"$x\" | |
8323 | exec_prefix="$acl_save_exec_prefix" | |
8324 | prefix="$acl_save_prefix" | |
8325 | ||
8326 | case "$x" in | |
8327 | -L*) | |
8328 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8329 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8330 | found_dir="$dir" | |
8331 | found_so="$dir/lib$name.$shlibext" | |
8332 | if test -f "$dir/lib$name.la"; then | |
8333 | found_la="$dir/lib$name.la" | |
8334 | fi | |
8335 | else | |
8336 | if test -f "$dir/lib$name.$libext"; then | |
8337 | found_dir="$dir" | |
8338 | found_a="$dir/lib$name.$libext" | |
8339 | if test -f "$dir/lib$name.la"; then | |
8340 | found_la="$dir/lib$name.la" | |
8341 | fi | |
8342 | fi | |
8343 | fi | |
8344 | ;; | |
8345 | esac | |
8346 | if test "X$found_dir" != "X"; then | |
8347 | break | |
8348 | fi | |
8349 | done | |
8350 | fi | |
8351 | if test "X$found_dir" != "X"; then | |
8352 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8353 | if test "X$found_so" != "X"; then | |
8354 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8355 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8356 | else | |
8357 | haveit= | |
8358 | for x in $ltrpathdirs; do | |
8359 | if test "X$x" = "X$found_dir"; then | |
8360 | haveit=yes | |
8361 | break | |
8362 | fi | |
8363 | done | |
8364 | if test -z "$haveit"; then | |
8365 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8366 | fi | |
8367 | if test "$hardcode_direct" = yes; then | |
8368 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8369 | else | |
8370 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8371 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8372 | haveit= | |
8373 | for x in $rpathdirs; do | |
8374 | if test "X$x" = "X$found_dir"; then | |
8375 | haveit=yes | |
8376 | break | |
8377 | fi | |
8378 | done | |
8379 | if test -z "$haveit"; then | |
8380 | rpathdirs="$rpathdirs $found_dir" | |
8381 | fi | |
8382 | else | |
8383 | haveit= | |
8384 | for x in $LDFLAGS $LIBICONV; do | |
8385 | ||
8386 | acl_save_prefix="$prefix" | |
8387 | prefix="$acl_final_prefix" | |
8388 | acl_save_exec_prefix="$exec_prefix" | |
8389 | exec_prefix="$acl_final_exec_prefix" | |
8390 | eval x=\"$x\" | |
8391 | exec_prefix="$acl_save_exec_prefix" | |
8392 | prefix="$acl_save_prefix" | |
8393 | ||
8394 | if test "X$x" = "X-L$found_dir"; then | |
8395 | haveit=yes | |
8396 | break | |
8397 | fi | |
8398 | done | |
8399 | if test -z "$haveit"; then | |
8400 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8401 | fi | |
8402 | if test "$hardcode_minus_L" != no; then | |
8403 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8404 | else | |
8405 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8406 | fi | |
8407 | fi | |
8408 | fi | |
8409 | fi | |
8410 | else | |
8411 | if test "X$found_a" != "X"; then | |
8412 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8413 | else | |
8414 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8415 | fi | |
8416 | fi | |
8417 | additional_includedir= | |
8418 | case "$found_dir" in | |
8419 | */lib | */lib/) | |
8420 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8421 | additional_includedir="$basedir/include" | |
8422 | ;; | |
8423 | esac | |
8424 | if test "X$additional_includedir" != "X"; then | |
8425 | if test "X$additional_includedir" != "X/usr/include"; then | |
8426 | haveit= | |
8427 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8428 | if test -n "$GCC"; then | |
8429 | case $host_os in | |
8430 | linux*) haveit=yes;; | |
8431 | esac | |
8432 | fi | |
8433 | fi | |
8434 | if test -z "$haveit"; then | |
8435 | for x in $CPPFLAGS $INCICONV; do | |
8436 | ||
8437 | acl_save_prefix="$prefix" | |
8438 | prefix="$acl_final_prefix" | |
8439 | acl_save_exec_prefix="$exec_prefix" | |
8440 | exec_prefix="$acl_final_exec_prefix" | |
8441 | eval x=\"$x\" | |
8442 | exec_prefix="$acl_save_exec_prefix" | |
8443 | prefix="$acl_save_prefix" | |
8444 | ||
8445 | if test "X$x" = "X-I$additional_includedir"; then | |
8446 | haveit=yes | |
8447 | break | |
8448 | fi | |
8449 | done | |
8450 | if test -z "$haveit"; then | |
8451 | if test -d "$additional_includedir"; then | |
8452 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8453 | fi | |
8454 | fi | |
8455 | fi | |
8456 | fi | |
8457 | fi | |
8458 | if test -n "$found_la"; then | |
8459 | save_libdir="$libdir" | |
8460 | case "$found_la" in | |
8461 | */* | *\\*) . "$found_la" ;; | |
8462 | *) . "./$found_la" ;; | |
8463 | esac | |
8464 | libdir="$save_libdir" | |
8465 | for dep in $dependency_libs; do | |
8466 | case "$dep" in | |
8467 | -L*) | |
8468 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8469 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8470 | haveit= | |
8471 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8472 | if test -n "$GCC"; then | |
8473 | case $host_os in | |
8474 | linux*) haveit=yes;; | |
8475 | esac | |
8476 | fi | |
8477 | fi | |
8478 | if test -z "$haveit"; then | |
8479 | haveit= | |
8480 | for x in $LDFLAGS $LIBICONV; do | |
8481 | ||
8482 | acl_save_prefix="$prefix" | |
8483 | prefix="$acl_final_prefix" | |
8484 | acl_save_exec_prefix="$exec_prefix" | |
8485 | exec_prefix="$acl_final_exec_prefix" | |
8486 | eval x=\"$x\" | |
8487 | exec_prefix="$acl_save_exec_prefix" | |
8488 | prefix="$acl_save_prefix" | |
8489 | ||
8490 | if test "X$x" = "X-L$additional_libdir"; then | |
8491 | haveit=yes | |
8492 | break | |
8493 | fi | |
8494 | done | |
8495 | if test -z "$haveit"; then | |
8496 | if test -d "$additional_libdir"; then | |
8497 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8498 | fi | |
8499 | fi | |
8500 | haveit= | |
8501 | for x in $LDFLAGS $LTLIBICONV; do | |
8502 | ||
8503 | acl_save_prefix="$prefix" | |
8504 | prefix="$acl_final_prefix" | |
8505 | acl_save_exec_prefix="$exec_prefix" | |
8506 | exec_prefix="$acl_final_exec_prefix" | |
8507 | eval x=\"$x\" | |
8508 | exec_prefix="$acl_save_exec_prefix" | |
8509 | prefix="$acl_save_prefix" | |
8510 | ||
8511 | if test "X$x" = "X-L$additional_libdir"; then | |
8512 | haveit=yes | |
8513 | break | |
8514 | fi | |
8515 | done | |
8516 | if test -z "$haveit"; then | |
8517 | if test -d "$additional_libdir"; then | |
8518 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8519 | fi | |
8520 | fi | |
8521 | fi | |
8522 | fi | |
8523 | ;; | |
8524 | -R*) | |
8525 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8526 | if test "$enable_rpath" != no; then | |
8527 | haveit= | |
8528 | for x in $rpathdirs; do | |
8529 | if test "X$x" = "X$dir"; then | |
8530 | haveit=yes | |
8531 | break | |
8532 | fi | |
8533 | done | |
8534 | if test -z "$haveit"; then | |
8535 | rpathdirs="$rpathdirs $dir" | |
8536 | fi | |
8537 | haveit= | |
8538 | for x in $ltrpathdirs; do | |
8539 | if test "X$x" = "X$dir"; then | |
8540 | haveit=yes | |
8541 | break | |
8542 | fi | |
8543 | done | |
8544 | if test -z "$haveit"; then | |
8545 | ltrpathdirs="$ltrpathdirs $dir" | |
8546 | fi | |
8547 | fi | |
8548 | ;; | |
8549 | -l*) | |
8550 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8551 | ;; | |
8552 | *.la) | |
8553 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8554 | ;; | |
8555 | *) | |
8556 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8557 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8558 | ;; | |
8559 | esac | |
8560 | done | |
8561 | fi | |
8562 | else | |
8563 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8564 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8565 | fi | |
8566 | fi | |
8567 | fi | |
8568 | done | |
8569 | done | |
8570 | if test "X$rpathdirs" != "X"; then | |
8571 | if test -n "$hardcode_libdir_separator"; then | |
8572 | alldirs= | |
8573 | for found_dir in $rpathdirs; do | |
8574 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8575 | done | |
8576 | acl_save_libdir="$libdir" | |
8577 | libdir="$alldirs" | |
8578 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8579 | libdir="$acl_save_libdir" | |
8580 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8581 | else | |
8582 | for found_dir in $rpathdirs; do | |
8583 | acl_save_libdir="$libdir" | |
8584 | libdir="$found_dir" | |
8585 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8586 | libdir="$acl_save_libdir" | |
8587 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8588 | done | |
8589 | fi | |
8590 | fi | |
8591 | if test "X$ltrpathdirs" != "X"; then | |
8592 | for found_dir in $ltrpathdirs; do | |
8593 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8594 | done | |
8595 | fi | |
8596 | ||
8597 | ||
8598 | ||
8599 | ||
8600 | ||
6c7a06a3 | 8601 | |
6c7a06a3 | 8602 | |
81ecdfbb RW |
8603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8604 | $as_echo_n "checking for iconv... " >&6; } | |
d0ac1c44 | 8605 | if ${am_cv_func_iconv+:} false; then : |
81ecdfbb | 8606 | $as_echo_n "(cached) " >&6 |
d542061a | 8607 | else |
6c7a06a3 TT |
8608 | |
8609 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8610 | am_cv_lib_iconv=no | |
016a3251 DD |
8611 | am_save_CPPFLAGS="$CPPFLAGS" |
8612 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8613 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8614 | /* end confdefs.h. */ |
6c7a06a3 TT |
8615 | #include <stdlib.h> |
8616 | #include <iconv.h> | |
d542061a UW |
8617 | int |
8618 | main () | |
8619 | { | |
6c7a06a3 | 8620 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8621 | iconv(cd,NULL,NULL,NULL,NULL); |
8622 | iconv_close(cd); | |
d542061a UW |
8623 | ; |
8624 | return 0; | |
8625 | } | |
8626 | _ACEOF | |
81ecdfbb | 8627 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8628 | am_cv_func_iconv=yes |
d542061a | 8629 | fi |
81ecdfbb RW |
8630 | rm -f core conftest.err conftest.$ac_objext \ |
8631 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8632 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8633 | |
016a3251 DD |
8634 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8635 | for _libs in .libs _libs; do | |
8636 | am_save_CPPFLAGS="$CPPFLAGS" | |
8637 | am_save_LIBS="$LIBS" | |
8638 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8639 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8641 | /* end confdefs.h. */ |
6c7a06a3 TT |
8642 | #include <stdlib.h> |
8643 | #include <iconv.h> | |
d542061a UW |
8644 | int |
8645 | main () | |
8646 | { | |
6c7a06a3 | 8647 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8648 | iconv(cd,NULL,NULL,NULL,NULL); |
8649 | iconv_close(cd); | |
d542061a UW |
8650 | ; |
8651 | return 0; | |
8652 | } | |
8653 | _ACEOF | |
81ecdfbb | 8654 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8655 | INCICONV="-I../libiconv/include" |
8656 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8657 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8658 | am_cv_lib_iconv=yes | |
8659 | am_cv_func_iconv=yes | |
d542061a | 8660 | fi |
81ecdfbb RW |
8661 | rm -f core conftest.err conftest.$ac_objext \ |
8662 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8663 | CPPFLAGS="$am_save_CPPFLAGS" |
8664 | LIBS="$am_save_LIBS" | |
8665 | if test "$am_cv_func_iconv" = "yes"; then | |
8666 | break | |
8667 | fi | |
8668 | done | |
77f120bf | 8669 | fi |
94ae1714 | 8670 | |
4edb1e84 | 8671 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8672 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8673 | am_save_LIBS="$LIBS" |
016a3251 DD |
8674 | CPPFLAGS="$LIBS $INCICONV" |
8675 | LIBS="$LIBS $LIBICONV" | |
81ecdfbb | 8676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8677 | /* end confdefs.h. */ |
6c7a06a3 TT |
8678 | #include <stdlib.h> |
8679 | #include <iconv.h> | |
bec39cab AC |
8680 | int |
8681 | main () | |
8682 | { | |
6c7a06a3 TT |
8683 | iconv_t cd = iconv_open("",""); |
8684 | iconv(cd,NULL,NULL,NULL,NULL); | |
8685 | iconv_close(cd); | |
bec39cab AC |
8686 | ; |
8687 | return 0; | |
8688 | } | |
8689 | _ACEOF | |
81ecdfbb | 8690 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8691 | am_cv_lib_iconv=yes |
6c7a06a3 | 8692 | am_cv_func_iconv=yes |
627af7ea | 8693 | fi |
81ecdfbb RW |
8694 | rm -f core conftest.err conftest.$ac_objext \ |
8695 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8696 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8697 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8698 | fi |
8699 | ||
8700 | fi | |
81ecdfbb RW |
8701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8702 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8703 | if test "$am_cv_func_iconv" = yes; then |
8704 | ||
8705 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8706 | |
016a3251 | 8707 | fi |
fc3b640d | 8708 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8709 | |
8710 | for element in $INCICONV; do | |
8711 | haveit= | |
8712 | for x in $CPPFLAGS; do | |
8713 | ||
8714 | acl_save_prefix="$prefix" | |
8715 | prefix="$acl_final_prefix" | |
8716 | acl_save_exec_prefix="$exec_prefix" | |
8717 | exec_prefix="$acl_final_exec_prefix" | |
8718 | eval x=\"$x\" | |
8719 | exec_prefix="$acl_save_exec_prefix" | |
8720 | prefix="$acl_save_prefix" | |
8721 | ||
8722 | if test "X$x" = "X$element"; then | |
8723 | haveit=yes | |
8724 | break | |
8725 | fi | |
8726 | done | |
8727 | if test -z "$haveit"; then | |
8728 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8729 | fi | |
8730 | done | |
8731 | ||
8732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8733 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8735 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8736 | else |
016a3251 DD |
8737 | LIBICONV= |
8738 | LTLIBICONV= | |
fc3b640d | 8739 | fi |
94ae1714 | 8740 | |
6c7a06a3 | 8741 | |
6c7a06a3 | 8742 | |
016a3251 | 8743 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8744 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8745 | $as_echo_n "checking for iconv declaration... " >&6; } | |
d0ac1c44 | 8746 | if ${am_cv_proto_iconv+:} false; then : |
81ecdfbb | 8747 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8748 | else |
8749 | ||
81ecdfbb | 8750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8751 | /* end confdefs.h. */ |
8752 | ||
6c7a06a3 TT |
8753 | #include <stdlib.h> |
8754 | #include <iconv.h> | |
8755 | extern | |
b4e70030 | 8756 | #ifdef __cplusplus |
6c7a06a3 | 8757 | "C" |
b4e70030 | 8758 | #endif |
6c7a06a3 TT |
8759 | #if defined(__STDC__) || defined(__cplusplus) |
8760 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8761 | #else | |
8762 | size_t iconv(); | |
8763 | #endif | |
8764 | ||
b4e70030 JB |
8765 | int |
8766 | main () | |
8767 | { | |
6c7a06a3 | 8768 | |
b4e70030 JB |
8769 | ; |
8770 | return 0; | |
8771 | } | |
8772 | _ACEOF | |
81ecdfbb | 8773 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8774 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8775 | else |
81ecdfbb | 8776 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8777 | fi |
81ecdfbb | 8778 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8779 | 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);" |
8780 | fi | |
8781 | ||
8782 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8784 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8785 | $as_echo "${ac_t:- |
8786 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8787 | |
8788 | cat >>confdefs.h <<_ACEOF | |
8789 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8790 | _ACEOF | |
8791 | ||
8792 | fi | |
6c7a06a3 TT |
8793 | |
8794 | ||
478aac75 DE |
8795 | # GDB may fork/exec the iconv program to get the list of supported character |
8796 | # sets. Allow the user to specify where to find it. | |
8797 | # There are several factors affecting the choice of option name: | |
8798 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
8799 | # the build-time location of libiconv files. | |
8800 | # - The program we need to find is iconv, which comes with glibc. The user | |
8801 | # doesn't necessarily have libiconv installed. Therefore naming this | |
8802 | # --with-libiconv-foo feels wrong. | |
8803 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
8804 | # defined to work on directories not files (though it really doesn't know | |
8805 | # the difference). | |
8806 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
8807 | # with --with-libiconv-prefix. | |
8808 | # Putting these together is why the option name is --with-iconv-bin. | |
8809 | ||
8810 | ||
8811 | # Check whether --with-iconv-bin was given. | |
8812 | if test "${with_iconv_bin+set}" = set; then : | |
8813 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
8814 | ||
8815 | cat >>confdefs.h <<_ACEOF | |
8816 | #define ICONV_BIN "${iconv_bin}" | |
8817 | _ACEOF | |
8818 | ||
8819 | ||
8820 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8821 | if test "x$prefix" = xNONE; then | |
8822 | test_prefix=/usr/local | |
8823 | else | |
8824 | test_prefix=$prefix | |
8825 | fi | |
8826 | else | |
8827 | test_prefix=$exec_prefix | |
8828 | fi | |
8829 | value=0 | |
8830 | case ${iconv_bin} in | |
8831 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8832 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8833 | value=1 | |
8834 | ;; | |
8835 | esac | |
8836 | ||
8837 | cat >>confdefs.h <<_ACEOF | |
8838 | #define ICONV_BIN_RELOCATABLE $value | |
8839 | _ACEOF | |
8840 | ||
8841 | ||
8842 | ||
8843 | fi | |
8844 | ||
8845 | ||
cb01cfba | 8846 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 8847 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
8848 | prefer_curses=yes |
8849 | fi | |
8850 | ||
8851 | curses_found=no | |
8852 | if test x"$prefer_curses" = xyes; then | |
8853 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
8854 | # curses library because the latter might not provide all the | |
8855 | # functionality we need. However, this leads to problems on systems | |
8856 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
8857 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
8858 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
8859 | # a situation. | |
81ecdfbb RW |
8860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
8861 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
d0ac1c44 | 8862 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 8863 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8864 | else |
8865 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8866 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8867 | /* end confdefs.h. */ |
8868 | ||
81ecdfbb RW |
8869 | /* Override any GCC internal prototype to avoid an error. |
8870 | Use char because int might match the return type of a GCC | |
8871 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8872 | #ifdef __cplusplus |
8873 | extern "C" | |
8874 | #endif | |
6c7a06a3 TT |
8875 | char waddstr (); |
8876 | int | |
8877 | main () | |
8878 | { | |
81ecdfbb | 8879 | return waddstr (); |
6c7a06a3 TT |
8880 | ; |
8881 | return 0; | |
8882 | } | |
8883 | _ACEOF | |
5007d765 | 8884 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
8885 | if test -z "$ac_lib"; then |
8886 | ac_res="none required" | |
8887 | else | |
8888 | ac_res=-l$ac_lib | |
8889 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8890 | fi | |
8891 | if ac_fn_c_try_link "$LINENO"; then : | |
8892 | ac_cv_search_waddstr=$ac_res | |
8893 | fi | |
8894 | rm -f core conftest.err conftest.$ac_objext \ | |
8895 | conftest$ac_exeext | |
d0ac1c44 | 8896 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb RW |
8897 | break |
8898 | fi | |
8899 | done | |
d0ac1c44 | 8900 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 8901 | |
6c7a06a3 | 8902 | else |
81ecdfbb RW |
8903 | ac_cv_search_waddstr=no |
8904 | fi | |
8905 | rm conftest.$ac_ext | |
8906 | LIBS=$ac_func_search_save_LIBS | |
8907 | fi | |
8908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
8909 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
8910 | ac_res=$ac_cv_search_waddstr | |
8911 | if test "$ac_res" != no; then : | |
8912 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
8913 | |
8914 | fi | |
8915 | ||
8916 | ||
cb01cfba JB |
8917 | if test "$ac_cv_search_waddstr" != no; then |
8918 | curses_found=yes | |
8919 | fi | |
8920 | fi | |
8921 | ||
8922 | # Check whether we should enable the TUI, but only do so if we really | |
8923 | # can. | |
8924 | if test x"$enable_tui" != xno; then | |
8925 | if test -d $srcdir/tui; then | |
8926 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
8927 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
8928 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
8929 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
8930 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
8931 | else |
8932 | if test x"$enable_tui" = xyes; then | |
d0ac1c44 | 8933 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 8934 | else |
81ecdfbb RW |
8935 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
8936 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
8937 | fi |
8938 | fi | |
8939 | fi | |
8940 | fi | |
8941 | ||
8942 | # Since GDB uses Readline, we need termcap functionality. In many | |
8943 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 8944 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
8945 | |
8946 | case $host_os in | |
8947 | cygwin*) | |
8948 | if test -d $srcdir/libtermcap; then | |
8949 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
8950 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
8951 | fi ;; | |
8952 | go32* | *djgpp*) | |
8953 | ac_cv_search_tgetent="none required" | |
8954 | ;; | |
6c7a06a3 TT |
8955 | esac |
8956 | ||
8957 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
8958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
8959 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
d0ac1c44 | 8960 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb | 8961 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8962 | else |
8963 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8965 | /* end confdefs.h. */ |
8966 | ||
81ecdfbb RW |
8967 | /* Override any GCC internal prototype to avoid an error. |
8968 | Use char because int might match the return type of a GCC | |
8969 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8970 | #ifdef __cplusplus |
8971 | extern "C" | |
8972 | #endif | |
6c7a06a3 TT |
8973 | char tgetent (); |
8974 | int | |
8975 | main () | |
8976 | { | |
81ecdfbb | 8977 | return tgetent (); |
6c7a06a3 TT |
8978 | ; |
8979 | return 0; | |
8980 | } | |
8981 | _ACEOF | |
5007d765 | 8982 | for ac_lib in '' termcap tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
8983 | if test -z "$ac_lib"; then |
8984 | ac_res="none required" | |
8985 | else | |
8986 | ac_res=-l$ac_lib | |
6c7a06a3 | 8987 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8988 | fi |
8989 | if ac_fn_c_try_link "$LINENO"; then : | |
8990 | ac_cv_search_tgetent=$ac_res | |
8991 | fi | |
8992 | rm -f core conftest.err conftest.$ac_objext \ | |
8993 | conftest$ac_exeext | |
d0ac1c44 | 8994 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb RW |
8995 | break |
8996 | fi | |
8997 | done | |
d0ac1c44 | 8998 | if ${ac_cv_search_tgetent+:} false; then : |
6c7a06a3 | 8999 | |
6c7a06a3 | 9000 | else |
81ecdfbb | 9001 | ac_cv_search_tgetent=no |
6c7a06a3 | 9002 | fi |
81ecdfbb | 9003 | rm conftest.$ac_ext |
6c7a06a3 TT |
9004 | LIBS=$ac_func_search_save_LIBS |
9005 | fi | |
81ecdfbb RW |
9006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9007 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9008 | ac_res=$ac_cv_search_tgetent | |
9009 | if test "$ac_res" != no; then : | |
9010 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9011 | |
06825bd1 MK |
9012 | fi |
9013 | ||
06825bd1 | 9014 | |
bec39cab | 9015 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 9016 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
9017 | fi |
9018 | ||
3841debe | 9019 | |
81ecdfbb RW |
9020 | # Check whether --with-system-readline was given. |
9021 | if test "${with_system_readline+set}" = set; then : | |
9022 | withval=$with_system_readline; | |
9023 | fi | |
6a30b0a5 | 9024 | |
6a30b0a5 AS |
9025 | |
9026 | if test "$with_system_readline" = yes; then | |
9027 | READLINE=-lreadline | |
9028 | READLINE_DEPS= | |
9029 | READLINE_CFLAGS= | |
39037522 | 9030 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9031 | else |
9032 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9033 | READLINE_DEPS='$(READLINE)' | |
9034 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9035 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9036 | fi |
9037 | ||
9038 | ||
9039 | ||
9040 | ||
9041 | ||
f997c383 SD |
9042 | # Generate jit-reader.h |
9043 | ||
9044 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9045 | TARGET_PTR= | |
9046 | ||
9047 | # The cast to long int works around a bug in the HP C Compiler | |
9048 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9049 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9050 | # This bug is HP SR number 8606223364. | |
9051 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9052 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
d0ac1c44 | 9053 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
f997c383 SD |
9054 | $as_echo_n "(cached) " >&6 |
9055 | else | |
9056 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9057 | ||
9058 | else | |
9059 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9060 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9061 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9062 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
9063 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9064 | else |
9065 | ac_cv_sizeof_unsigned_long_long=0 | |
9066 | fi | |
9067 | fi | |
9068 | ||
9069 | fi | |
9070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9071 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9072 | ||
9073 | ||
9074 | ||
9075 | cat >>confdefs.h <<_ACEOF | |
9076 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9077 | _ACEOF | |
9078 | ||
9079 | ||
9080 | # The cast to long int works around a bug in the HP C Compiler | |
9081 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9082 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9083 | # This bug is HP SR number 8606223364. | |
9084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9085 | $as_echo_n "checking size of unsigned long... " >&6; } | |
d0ac1c44 | 9086 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
f997c383 SD |
9087 | $as_echo_n "(cached) " >&6 |
9088 | else | |
9089 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9090 | ||
9091 | else | |
9092 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9093 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9094 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9095 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
9096 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9097 | else |
9098 | ac_cv_sizeof_unsigned_long=0 | |
9099 | fi | |
9100 | fi | |
9101 | ||
9102 | fi | |
9103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9104 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9105 | ||
9106 | ||
9107 | ||
9108 | cat >>confdefs.h <<_ACEOF | |
9109 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9110 | _ACEOF | |
9111 | ||
9112 | ||
9113 | # The cast to long int works around a bug in the HP C Compiler | |
9114 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9115 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9116 | # This bug is HP SR number 8606223364. | |
9117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9118 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
d0ac1c44 | 9119 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
f997c383 SD |
9120 | $as_echo_n "(cached) " >&6 |
9121 | else | |
9122 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9123 | ||
9124 | else | |
9125 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9126 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9127 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9128 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
9129 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9130 | else |
9131 | ac_cv_sizeof_unsigned___int128=0 | |
9132 | fi | |
9133 | fi | |
9134 | ||
9135 | fi | |
9136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9137 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9138 | ||
9139 | ||
9140 | ||
9141 | cat >>confdefs.h <<_ACEOF | |
9142 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9143 | _ACEOF | |
9144 | ||
9145 | ||
9146 | ||
9147 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9148 | TARGET_PTR="unsigned long" | |
9149 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9150 | TARGET_PTR="unsigned long long" | |
9151 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9152 | TARGET_PTR="unsigned __int128" | |
9153 | else | |
9154 | TARGET_PTR="unsigned long" | |
9155 | fi | |
9156 | ||
9157 | ||
9158 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9159 | ||
9160 | ||
a2d08b9e SD |
9161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9162 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 9163 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9164 | $as_echo_n "(cached) " >&6 |
9165 | else | |
9166 | ac_func_search_save_LIBS=$LIBS | |
9167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9168 | /* end confdefs.h. */ | |
9169 | ||
9170 | /* Override any GCC internal prototype to avoid an error. | |
9171 | Use char because int might match the return type of a GCC | |
9172 | builtin and then its argument prototype would still apply. */ | |
9173 | #ifdef __cplusplus | |
9174 | extern "C" | |
9175 | #endif | |
9176 | char dlopen (); | |
9177 | int | |
9178 | main () | |
9179 | { | |
9180 | return dlopen (); | |
9181 | ; | |
9182 | return 0; | |
9183 | } | |
9184 | _ACEOF | |
9185 | for ac_lib in '' dl; do | |
9186 | if test -z "$ac_lib"; then | |
9187 | ac_res="none required" | |
9188 | else | |
9189 | ac_res=-l$ac_lib | |
9190 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9191 | fi | |
9192 | if ac_fn_c_try_link "$LINENO"; then : | |
9193 | ac_cv_search_dlopen=$ac_res | |
9194 | fi | |
9195 | rm -f core conftest.err conftest.$ac_objext \ | |
9196 | conftest$ac_exeext | |
d0ac1c44 | 9197 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9198 | break |
9199 | fi | |
9200 | done | |
d0ac1c44 | 9201 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9202 | |
9203 | else | |
9204 | ac_cv_search_dlopen=no | |
9205 | fi | |
9206 | rm conftest.$ac_ext | |
9207 | LIBS=$ac_func_search_save_LIBS | |
9208 | fi | |
9209 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9210 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9211 | ac_res=$ac_cv_search_dlopen | |
9212 | if test "$ac_res" != no; then : | |
9213 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9214 | ||
9215 | fi | |
9216 | ||
9217 | ||
39037522 | 9218 | |
b8e0a31c SD |
9219 | |
9220 | # Check whether --with-jit-reader-dir was given. | |
9221 | if test "${with_jit_reader_dir+set}" = set; then : | |
9222 | withval=$with_jit_reader_dir; | |
9223 | JIT_READER_DIR=$withval | |
9224 | else | |
9225 | JIT_READER_DIR=${libdir}/gdb | |
9226 | fi | |
9227 | ||
9228 | ||
9229 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9230 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9231 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9232 | ac_define_dir=`eval echo $ac_define_dir` | |
9233 | ||
9234 | cat >>confdefs.h <<_ACEOF | |
9235 | #define JIT_READER_DIR "$ac_define_dir" | |
9236 | _ACEOF | |
9237 | ||
9238 | ||
9239 | ||
9240 | ||
9241 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9242 | if test "x$prefix" = xNONE; then | |
9243 | test_prefix=/usr/local | |
9244 | else | |
9245 | test_prefix=$prefix | |
9246 | fi | |
9247 | else | |
9248 | test_prefix=$exec_prefix | |
9249 | fi | |
9250 | value=0 | |
9251 | case ${ac_define_dir} in | |
9252 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9253 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9254 | value=1 | |
9255 | ;; | |
9256 | esac | |
9257 | ||
9258 | cat >>confdefs.h <<_ACEOF | |
9259 | #define JIT_READER_DIR_RELOCATABLE $value | |
9260 | _ACEOF | |
9261 | ||
9262 | ||
9263 | ||
9264 | ||
9265 | ||
81ecdfbb RW |
9266 | # Check whether --with-expat was given. |
9267 | if test "${with_expat+set}" = set; then : | |
9268 | withval=$with_expat; | |
5c39566f DJ |
9269 | else |
9270 | with_expat=auto | |
81ecdfbb RW |
9271 | fi |
9272 | ||
9273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9274 | $as_echo_n "checking whether to use expat... " >&6; } | |
9275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9276 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9277 | |
9278 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9279 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9280 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9281 | HAVE_LIBEXPAT=no |
9282 | else | |
9283 | ||
3841debe DJ |
9284 | |
9285 | ||
9286 | ||
9287 | ||
9288 | ||
9289 | ||
9290 | ||
9291 | use_additional=yes | |
9292 | ||
9293 | acl_save_prefix="$prefix" | |
9294 | prefix="$acl_final_prefix" | |
9295 | acl_save_exec_prefix="$exec_prefix" | |
9296 | exec_prefix="$acl_final_exec_prefix" | |
9297 | ||
9298 | eval additional_includedir=\"$includedir\" | |
9299 | eval additional_libdir=\"$libdir\" | |
9300 | ||
9301 | exec_prefix="$acl_save_exec_prefix" | |
9302 | prefix="$acl_save_prefix" | |
9303 | ||
9304 | ||
81ecdfbb RW |
9305 | # Check whether --with-libexpat-prefix was given. |
9306 | if test "${with_libexpat_prefix+set}" = set; then : | |
9307 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9308 | if test "X$withval" = "Xno"; then |
9309 | use_additional=no | |
9310 | else | |
9311 | if test "X$withval" = "X"; then | |
9312 | ||
9313 | acl_save_prefix="$prefix" | |
9314 | prefix="$acl_final_prefix" | |
9315 | acl_save_exec_prefix="$exec_prefix" | |
9316 | exec_prefix="$acl_final_exec_prefix" | |
9317 | ||
9318 | eval additional_includedir=\"$includedir\" | |
9319 | eval additional_libdir=\"$libdir\" | |
9320 | ||
9321 | exec_prefix="$acl_save_exec_prefix" | |
9322 | prefix="$acl_save_prefix" | |
9323 | ||
9324 | else | |
9325 | additional_includedir="$withval/include" | |
9326 | additional_libdir="$withval/lib" | |
9327 | fi | |
9328 | fi | |
9329 | ||
81ecdfbb RW |
9330 | fi |
9331 | ||
3841debe DJ |
9332 | LIBEXPAT= |
9333 | LTLIBEXPAT= | |
9334 | INCEXPAT= | |
9335 | rpathdirs= | |
9336 | ltrpathdirs= | |
9337 | names_already_handled= | |
9338 | names_next_round='expat ' | |
9339 | while test -n "$names_next_round"; do | |
9340 | names_this_round="$names_next_round" | |
9341 | names_next_round= | |
9342 | for name in $names_this_round; do | |
9343 | already_handled= | |
9344 | for n in $names_already_handled; do | |
9345 | if test "$n" = "$name"; then | |
9346 | already_handled=yes | |
9347 | break | |
9348 | fi | |
9349 | done | |
9350 | if test -z "$already_handled"; then | |
9351 | names_already_handled="$names_already_handled $name" | |
9352 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9353 | eval value=\"\$HAVE_LIB$uppername\" | |
9354 | if test -n "$value"; then | |
9355 | if test "$value" = yes; then | |
9356 | eval value=\"\$LIB$uppername\" | |
9357 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9358 | eval value=\"\$LTLIB$uppername\" | |
9359 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9360 | else | |
9361 | : | |
9362 | fi | |
9363 | else | |
9364 | found_dir= | |
9365 | found_la= | |
9366 | found_so= | |
9367 | found_a= | |
9368 | if test $use_additional = yes; then | |
9369 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9370 | found_dir="$additional_libdir" | |
9371 | found_so="$additional_libdir/lib$name.$shlibext" | |
9372 | if test -f "$additional_libdir/lib$name.la"; then | |
9373 | found_la="$additional_libdir/lib$name.la" | |
9374 | fi | |
9375 | else | |
9376 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9377 | found_dir="$additional_libdir" | |
9378 | found_a="$additional_libdir/lib$name.$libext" | |
9379 | if test -f "$additional_libdir/lib$name.la"; then | |
9380 | found_la="$additional_libdir/lib$name.la" | |
9381 | fi | |
9382 | fi | |
9383 | fi | |
9384 | fi | |
9385 | if test "X$found_dir" = "X"; then | |
9386 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9387 | ||
9388 | acl_save_prefix="$prefix" | |
9389 | prefix="$acl_final_prefix" | |
9390 | acl_save_exec_prefix="$exec_prefix" | |
9391 | exec_prefix="$acl_final_exec_prefix" | |
9392 | eval x=\"$x\" | |
9393 | exec_prefix="$acl_save_exec_prefix" | |
9394 | prefix="$acl_save_prefix" | |
9395 | ||
9396 | case "$x" in | |
9397 | -L*) | |
9398 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9399 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9400 | found_dir="$dir" | |
9401 | found_so="$dir/lib$name.$shlibext" | |
9402 | if test -f "$dir/lib$name.la"; then | |
9403 | found_la="$dir/lib$name.la" | |
9404 | fi | |
9405 | else | |
9406 | if test -f "$dir/lib$name.$libext"; then | |
9407 | found_dir="$dir" | |
9408 | found_a="$dir/lib$name.$libext" | |
9409 | if test -f "$dir/lib$name.la"; then | |
9410 | found_la="$dir/lib$name.la" | |
9411 | fi | |
9412 | fi | |
9413 | fi | |
9414 | ;; | |
9415 | esac | |
9416 | if test "X$found_dir" != "X"; then | |
9417 | break | |
9418 | fi | |
9419 | done | |
9420 | fi | |
9421 | if test "X$found_dir" != "X"; then | |
9422 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9423 | if test "X$found_so" != "X"; then | |
9424 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9425 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9426 | else | |
9427 | haveit= | |
9428 | for x in $ltrpathdirs; do | |
9429 | if test "X$x" = "X$found_dir"; then | |
9430 | haveit=yes | |
9431 | break | |
9432 | fi | |
9433 | done | |
9434 | if test -z "$haveit"; then | |
9435 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9436 | fi | |
9437 | if test "$hardcode_direct" = yes; then | |
9438 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9439 | else | |
9440 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9441 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9442 | haveit= | |
9443 | for x in $rpathdirs; do | |
9444 | if test "X$x" = "X$found_dir"; then | |
9445 | haveit=yes | |
9446 | break | |
9447 | fi | |
9448 | done | |
9449 | if test -z "$haveit"; then | |
9450 | rpathdirs="$rpathdirs $found_dir" | |
9451 | fi | |
9452 | else | |
9453 | haveit= | |
9454 | for x in $LDFLAGS $LIBEXPAT; do | |
9455 | ||
9456 | acl_save_prefix="$prefix" | |
9457 | prefix="$acl_final_prefix" | |
9458 | acl_save_exec_prefix="$exec_prefix" | |
9459 | exec_prefix="$acl_final_exec_prefix" | |
9460 | eval x=\"$x\" | |
9461 | exec_prefix="$acl_save_exec_prefix" | |
9462 | prefix="$acl_save_prefix" | |
9463 | ||
9464 | if test "X$x" = "X-L$found_dir"; then | |
9465 | haveit=yes | |
9466 | break | |
9467 | fi | |
9468 | done | |
9469 | if test -z "$haveit"; then | |
9470 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9471 | fi | |
9472 | if test "$hardcode_minus_L" != no; then | |
9473 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9474 | else | |
9475 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9476 | fi | |
9477 | fi | |
9478 | fi | |
9479 | fi | |
9480 | else | |
9481 | if test "X$found_a" != "X"; then | |
9482 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9483 | else | |
9484 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9485 | fi | |
9486 | fi | |
9487 | additional_includedir= | |
9488 | case "$found_dir" in | |
9489 | */lib | */lib/) | |
9490 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9491 | additional_includedir="$basedir/include" | |
9492 | ;; | |
9493 | esac | |
9494 | if test "X$additional_includedir" != "X"; then | |
9495 | if test "X$additional_includedir" != "X/usr/include"; then | |
9496 | haveit= | |
9497 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9498 | if test -n "$GCC"; then | |
9499 | case $host_os in | |
9500 | linux*) haveit=yes;; | |
9501 | esac | |
9502 | fi | |
9503 | fi | |
9504 | if test -z "$haveit"; then | |
9505 | for x in $CPPFLAGS $INCEXPAT; do | |
9506 | ||
9507 | acl_save_prefix="$prefix" | |
9508 | prefix="$acl_final_prefix" | |
9509 | acl_save_exec_prefix="$exec_prefix" | |
9510 | exec_prefix="$acl_final_exec_prefix" | |
9511 | eval x=\"$x\" | |
9512 | exec_prefix="$acl_save_exec_prefix" | |
9513 | prefix="$acl_save_prefix" | |
9514 | ||
9515 | if test "X$x" = "X-I$additional_includedir"; then | |
9516 | haveit=yes | |
9517 | break | |
9518 | fi | |
9519 | done | |
9520 | if test -z "$haveit"; then | |
9521 | if test -d "$additional_includedir"; then | |
9522 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9523 | fi | |
9524 | fi | |
9525 | fi | |
9526 | fi | |
9527 | fi | |
9528 | if test -n "$found_la"; then | |
9529 | save_libdir="$libdir" | |
9530 | case "$found_la" in | |
9531 | */* | *\\*) . "$found_la" ;; | |
9532 | *) . "./$found_la" ;; | |
9533 | esac | |
9534 | libdir="$save_libdir" | |
9535 | for dep in $dependency_libs; do | |
9536 | case "$dep" in | |
9537 | -L*) | |
9538 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9539 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9540 | haveit= | |
9541 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9542 | if test -n "$GCC"; then | |
9543 | case $host_os in | |
9544 | linux*) haveit=yes;; | |
9545 | esac | |
9546 | fi | |
9547 | fi | |
9548 | if test -z "$haveit"; then | |
9549 | haveit= | |
9550 | for x in $LDFLAGS $LIBEXPAT; do | |
9551 | ||
9552 | acl_save_prefix="$prefix" | |
9553 | prefix="$acl_final_prefix" | |
9554 | acl_save_exec_prefix="$exec_prefix" | |
9555 | exec_prefix="$acl_final_exec_prefix" | |
9556 | eval x=\"$x\" | |
9557 | exec_prefix="$acl_save_exec_prefix" | |
9558 | prefix="$acl_save_prefix" | |
9559 | ||
9560 | if test "X$x" = "X-L$additional_libdir"; then | |
9561 | haveit=yes | |
9562 | break | |
9563 | fi | |
9564 | done | |
9565 | if test -z "$haveit"; then | |
9566 | if test -d "$additional_libdir"; then | |
9567 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9568 | fi | |
9569 | fi | |
9570 | haveit= | |
9571 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9572 | ||
9573 | acl_save_prefix="$prefix" | |
9574 | prefix="$acl_final_prefix" | |
9575 | acl_save_exec_prefix="$exec_prefix" | |
9576 | exec_prefix="$acl_final_exec_prefix" | |
9577 | eval x=\"$x\" | |
9578 | exec_prefix="$acl_save_exec_prefix" | |
9579 | prefix="$acl_save_prefix" | |
9580 | ||
9581 | if test "X$x" = "X-L$additional_libdir"; then | |
9582 | haveit=yes | |
9583 | break | |
9584 | fi | |
9585 | done | |
9586 | if test -z "$haveit"; then | |
9587 | if test -d "$additional_libdir"; then | |
9588 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9589 | fi | |
9590 | fi | |
9591 | fi | |
9592 | fi | |
9593 | ;; | |
9594 | -R*) | |
9595 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9596 | if test "$enable_rpath" != no; then | |
9597 | haveit= | |
9598 | for x in $rpathdirs; do | |
9599 | if test "X$x" = "X$dir"; then | |
9600 | haveit=yes | |
9601 | break | |
9602 | fi | |
9603 | done | |
9604 | if test -z "$haveit"; then | |
9605 | rpathdirs="$rpathdirs $dir" | |
9606 | fi | |
9607 | haveit= | |
9608 | for x in $ltrpathdirs; do | |
9609 | if test "X$x" = "X$dir"; then | |
9610 | haveit=yes | |
9611 | break | |
9612 | fi | |
9613 | done | |
9614 | if test -z "$haveit"; then | |
9615 | ltrpathdirs="$ltrpathdirs $dir" | |
9616 | fi | |
9617 | fi | |
9618 | ;; | |
9619 | -l*) | |
9620 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9621 | ;; | |
9622 | *.la) | |
9623 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9624 | ;; | |
9625 | *) | |
9626 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9627 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9628 | ;; | |
81ecdfbb RW |
9629 | esac |
9630 | done | |
9631 | fi | |
9632 | else | |
9633 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9634 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9635 | fi | |
9636 | fi | |
9637 | fi | |
9638 | done | |
9639 | done | |
9640 | if test "X$rpathdirs" != "X"; then | |
9641 | if test -n "$hardcode_libdir_separator"; then | |
9642 | alldirs= | |
9643 | for found_dir in $rpathdirs; do | |
9644 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9645 | done | |
9646 | acl_save_libdir="$libdir" | |
9647 | libdir="$alldirs" | |
9648 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9649 | libdir="$acl_save_libdir" | |
9650 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9651 | else | |
9652 | for found_dir in $rpathdirs; do | |
9653 | acl_save_libdir="$libdir" | |
9654 | libdir="$found_dir" | |
9655 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9656 | libdir="$acl_save_libdir" | |
9657 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9658 | done | |
9659 | fi | |
9660 | fi | |
9661 | if test "X$ltrpathdirs" != "X"; then | |
9662 | for found_dir in $ltrpathdirs; do | |
9663 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9664 | done | |
9665 | fi | |
a9322a30 TT |
9666 | |
9667 | ||
81ecdfbb | 9668 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9669 | |
81ecdfbb RW |
9670 | for element in $INCEXPAT; do |
9671 | haveit= | |
9672 | for x in $CPPFLAGS; do | |
a9322a30 | 9673 | |
81ecdfbb RW |
9674 | acl_save_prefix="$prefix" |
9675 | prefix="$acl_final_prefix" | |
9676 | acl_save_exec_prefix="$exec_prefix" | |
9677 | exec_prefix="$acl_final_exec_prefix" | |
9678 | eval x=\"$x\" | |
9679 | exec_prefix="$acl_save_exec_prefix" | |
9680 | prefix="$acl_save_prefix" | |
a8111142 | 9681 | |
81ecdfbb RW |
9682 | if test "X$x" = "X$element"; then |
9683 | haveit=yes | |
9684 | break | |
9685 | fi | |
9686 | done | |
9687 | if test -z "$haveit"; then | |
9688 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9689 | fi | |
9690 | done | |
a9322a30 TT |
9691 | |
9692 | ||
81ecdfbb RW |
9693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9694 | $as_echo_n "checking for libexpat... " >&6; } | |
d0ac1c44 | 9695 | if ${ac_cv_libexpat+:} false; then : |
81ecdfbb | 9696 | $as_echo_n "(cached) " >&6 |
bec39cab | 9697 | else |
bec39cab | 9698 | |
81ecdfbb RW |
9699 | ac_save_LIBS="$LIBS" |
9700 | LIBS="$LIBS $LIBEXPAT" | |
9701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9702 | /* end confdefs.h. */ |
81ecdfbb RW |
9703 | #include "expat.h" |
9704 | int | |
9705 | main () | |
9706 | { | |
9707 | XML_Parser p = XML_ParserCreate (0); | |
9708 | ; | |
9709 | return 0; | |
9710 | } | |
bec39cab | 9711 | _ACEOF |
81ecdfbb RW |
9712 | if ac_fn_c_try_link "$LINENO"; then : |
9713 | ac_cv_libexpat=yes | |
c906108c | 9714 | else |
81ecdfbb | 9715 | ac_cv_libexpat=no |
bec39cab | 9716 | fi |
81ecdfbb RW |
9717 | rm -f core conftest.err conftest.$ac_objext \ |
9718 | conftest$ac_exeext conftest.$ac_ext | |
9719 | LIBS="$ac_save_LIBS" | |
c906108c | 9720 | |
95ca63c4 | 9721 | fi |
81ecdfbb RW |
9722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9723 | $as_echo "$ac_cv_libexpat" >&6; } | |
9724 | if test "$ac_cv_libexpat" = yes; then | |
9725 | HAVE_LIBEXPAT=yes | |
bec39cab | 9726 | |
81ecdfbb | 9727 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9728 | |
81ecdfbb RW |
9729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9730 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9732 | $as_echo "$LIBEXPAT" >&6; } | |
9733 | else | |
9734 | HAVE_LIBEXPAT=no | |
9735 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9736 | LIBEXPAT= | |
9737 | LTLIBEXPAT= | |
9738 | fi | |
95ca63c4 CF |
9739 | |
9740 | ||
9741 | ||
7cb9022a MK |
9742 | |
9743 | ||
bec39cab | 9744 | |
81ecdfbb RW |
9745 | if test "$HAVE_LIBEXPAT" != yes; then |
9746 | if test "$with_expat" = yes; then | |
d0ac1c44 | 9747 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
9748 | else |
9749 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9750 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
9751 | fi | |
9752 | else | |
9753 | save_LIBS=$LIBS | |
9754 | LIBS="$LIBS $LIBEXPAT" | |
9755 | for ac_func in XML_StopParser | |
9756 | do : | |
9757 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
d0ac1c44 | 9758 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
bec39cab | 9759 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9760 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 9761 | _ACEOF |
95ca63c4 | 9762 | |
bec39cab | 9763 | fi |
bec39cab | 9764 | done |
95ca63c4 | 9765 | |
81ecdfbb RW |
9766 | LIBS=$save_LIBS |
9767 | fi | |
a9322a30 TT |
9768 | fi |
9769 | ||
2400729e UW |
9770 | |
9771 | # Check whether --with-mpfr was given. | |
9772 | if test "${with_mpfr+set}" = set; then : | |
9773 | withval=$with_mpfr; | |
9774 | else | |
9775 | with_mpfr=auto | |
9776 | fi | |
9777 | ||
9778 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
9779 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
9780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
9781 | $as_echo "$with_mpfr" >&6; } | |
9782 | ||
9783 | if test "${with_mpfr}" = no; then | |
9784 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
9785 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
9786 | HAVE_LIBMPFR=no | |
9787 | else | |
9788 | ||
9789 | ||
9790 | ||
9791 | ||
9792 | ||
9793 | ||
9794 | ||
9795 | ||
9796 | use_additional=yes | |
9797 | ||
9798 | acl_save_prefix="$prefix" | |
9799 | prefix="$acl_final_prefix" | |
9800 | acl_save_exec_prefix="$exec_prefix" | |
9801 | exec_prefix="$acl_final_exec_prefix" | |
9802 | ||
9803 | eval additional_includedir=\"$includedir\" | |
9804 | eval additional_libdir=\"$libdir\" | |
9805 | ||
9806 | exec_prefix="$acl_save_exec_prefix" | |
9807 | prefix="$acl_save_prefix" | |
9808 | ||
9809 | ||
9810 | # Check whether --with-libmpfr-prefix was given. | |
9811 | if test "${with_libmpfr_prefix+set}" = set; then : | |
9812 | withval=$with_libmpfr_prefix; | |
9813 | if test "X$withval" = "Xno"; then | |
9814 | use_additional=no | |
9815 | else | |
9816 | if test "X$withval" = "X"; then | |
9817 | ||
9818 | acl_save_prefix="$prefix" | |
9819 | prefix="$acl_final_prefix" | |
9820 | acl_save_exec_prefix="$exec_prefix" | |
9821 | exec_prefix="$acl_final_exec_prefix" | |
9822 | ||
9823 | eval additional_includedir=\"$includedir\" | |
9824 | eval additional_libdir=\"$libdir\" | |
9825 | ||
9826 | exec_prefix="$acl_save_exec_prefix" | |
9827 | prefix="$acl_save_prefix" | |
9828 | ||
9829 | else | |
9830 | additional_includedir="$withval/include" | |
9831 | additional_libdir="$withval/lib" | |
9832 | fi | |
9833 | fi | |
9834 | ||
9835 | fi | |
9836 | ||
9837 | LIBMPFR= | |
9838 | LTLIBMPFR= | |
9839 | INCMPFR= | |
9840 | rpathdirs= | |
9841 | ltrpathdirs= | |
9842 | names_already_handled= | |
9843 | names_next_round='mpfr ' | |
9844 | while test -n "$names_next_round"; do | |
9845 | names_this_round="$names_next_round" | |
9846 | names_next_round= | |
9847 | for name in $names_this_round; do | |
9848 | already_handled= | |
9849 | for n in $names_already_handled; do | |
9850 | if test "$n" = "$name"; then | |
9851 | already_handled=yes | |
9852 | break | |
9853 | fi | |
9854 | done | |
9855 | if test -z "$already_handled"; then | |
9856 | names_already_handled="$names_already_handled $name" | |
9857 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9858 | eval value=\"\$HAVE_LIB$uppername\" | |
9859 | if test -n "$value"; then | |
9860 | if test "$value" = yes; then | |
9861 | eval value=\"\$LIB$uppername\" | |
9862 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
9863 | eval value=\"\$LTLIB$uppername\" | |
9864 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
9865 | else | |
9866 | : | |
9867 | fi | |
9868 | else | |
9869 | found_dir= | |
9870 | found_la= | |
9871 | found_so= | |
9872 | found_a= | |
9873 | if test $use_additional = yes; then | |
9874 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9875 | found_dir="$additional_libdir" | |
9876 | found_so="$additional_libdir/lib$name.$shlibext" | |
9877 | if test -f "$additional_libdir/lib$name.la"; then | |
9878 | found_la="$additional_libdir/lib$name.la" | |
9879 | fi | |
9880 | else | |
9881 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9882 | found_dir="$additional_libdir" | |
9883 | found_a="$additional_libdir/lib$name.$libext" | |
9884 | if test -f "$additional_libdir/lib$name.la"; then | |
9885 | found_la="$additional_libdir/lib$name.la" | |
9886 | fi | |
9887 | fi | |
9888 | fi | |
9889 | fi | |
9890 | if test "X$found_dir" = "X"; then | |
9891 | for x in $LDFLAGS $LTLIBMPFR; do | |
9892 | ||
9893 | acl_save_prefix="$prefix" | |
9894 | prefix="$acl_final_prefix" | |
9895 | acl_save_exec_prefix="$exec_prefix" | |
9896 | exec_prefix="$acl_final_exec_prefix" | |
9897 | eval x=\"$x\" | |
9898 | exec_prefix="$acl_save_exec_prefix" | |
9899 | prefix="$acl_save_prefix" | |
9900 | ||
9901 | case "$x" in | |
9902 | -L*) | |
9903 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9904 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9905 | found_dir="$dir" | |
9906 | found_so="$dir/lib$name.$shlibext" | |
9907 | if test -f "$dir/lib$name.la"; then | |
9908 | found_la="$dir/lib$name.la" | |
9909 | fi | |
9910 | else | |
9911 | if test -f "$dir/lib$name.$libext"; then | |
9912 | found_dir="$dir" | |
9913 | found_a="$dir/lib$name.$libext" | |
9914 | if test -f "$dir/lib$name.la"; then | |
9915 | found_la="$dir/lib$name.la" | |
9916 | fi | |
9917 | fi | |
9918 | fi | |
9919 | ;; | |
9920 | esac | |
9921 | if test "X$found_dir" != "X"; then | |
9922 | break | |
9923 | fi | |
9924 | done | |
9925 | fi | |
9926 | if test "X$found_dir" != "X"; then | |
9927 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
9928 | if test "X$found_so" != "X"; then | |
9929 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9930 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9931 | else | |
9932 | haveit= | |
9933 | for x in $ltrpathdirs; do | |
9934 | if test "X$x" = "X$found_dir"; then | |
9935 | haveit=yes | |
9936 | break | |
9937 | fi | |
9938 | done | |
9939 | if test -z "$haveit"; then | |
9940 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9941 | fi | |
9942 | if test "$hardcode_direct" = yes; then | |
9943 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9944 | else | |
9945 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9946 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9947 | haveit= | |
9948 | for x in $rpathdirs; do | |
9949 | if test "X$x" = "X$found_dir"; then | |
9950 | haveit=yes | |
9951 | break | |
9952 | fi | |
9953 | done | |
9954 | if test -z "$haveit"; then | |
9955 | rpathdirs="$rpathdirs $found_dir" | |
9956 | fi | |
9957 | else | |
9958 | haveit= | |
9959 | for x in $LDFLAGS $LIBMPFR; do | |
9960 | ||
9961 | acl_save_prefix="$prefix" | |
9962 | prefix="$acl_final_prefix" | |
9963 | acl_save_exec_prefix="$exec_prefix" | |
9964 | exec_prefix="$acl_final_exec_prefix" | |
9965 | eval x=\"$x\" | |
9966 | exec_prefix="$acl_save_exec_prefix" | |
9967 | prefix="$acl_save_prefix" | |
9968 | ||
9969 | if test "X$x" = "X-L$found_dir"; then | |
9970 | haveit=yes | |
9971 | break | |
9972 | fi | |
9973 | done | |
9974 | if test -z "$haveit"; then | |
9975 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
9976 | fi | |
9977 | if test "$hardcode_minus_L" != no; then | |
9978 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9979 | else | |
9980 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
9981 | fi | |
9982 | fi | |
9983 | fi | |
9984 | fi | |
9985 | else | |
9986 | if test "X$found_a" != "X"; then | |
9987 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
9988 | else | |
9989 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
9990 | fi | |
9991 | fi | |
9992 | additional_includedir= | |
9993 | case "$found_dir" in | |
9994 | */lib | */lib/) | |
9995 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9996 | additional_includedir="$basedir/include" | |
9997 | ;; | |
9998 | esac | |
9999 | if test "X$additional_includedir" != "X"; then | |
10000 | if test "X$additional_includedir" != "X/usr/include"; then | |
10001 | haveit= | |
10002 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10003 | if test -n "$GCC"; then | |
10004 | case $host_os in | |
10005 | linux*) haveit=yes;; | |
10006 | esac | |
10007 | fi | |
10008 | fi | |
10009 | if test -z "$haveit"; then | |
10010 | for x in $CPPFLAGS $INCMPFR; do | |
10011 | ||
10012 | acl_save_prefix="$prefix" | |
10013 | prefix="$acl_final_prefix" | |
10014 | acl_save_exec_prefix="$exec_prefix" | |
10015 | exec_prefix="$acl_final_exec_prefix" | |
10016 | eval x=\"$x\" | |
10017 | exec_prefix="$acl_save_exec_prefix" | |
10018 | prefix="$acl_save_prefix" | |
10019 | ||
10020 | if test "X$x" = "X-I$additional_includedir"; then | |
10021 | haveit=yes | |
10022 | break | |
10023 | fi | |
10024 | done | |
10025 | if test -z "$haveit"; then | |
10026 | if test -d "$additional_includedir"; then | |
10027 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
10028 | fi | |
10029 | fi | |
10030 | fi | |
10031 | fi | |
10032 | fi | |
10033 | if test -n "$found_la"; then | |
10034 | save_libdir="$libdir" | |
10035 | case "$found_la" in | |
10036 | */* | *\\*) . "$found_la" ;; | |
10037 | *) . "./$found_la" ;; | |
10038 | esac | |
10039 | libdir="$save_libdir" | |
10040 | for dep in $dependency_libs; do | |
10041 | case "$dep" in | |
10042 | -L*) | |
10043 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10044 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10045 | haveit= | |
10046 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10047 | if test -n "$GCC"; then | |
10048 | case $host_os in | |
10049 | linux*) haveit=yes;; | |
10050 | esac | |
10051 | fi | |
10052 | fi | |
10053 | if test -z "$haveit"; then | |
10054 | haveit= | |
10055 | for x in $LDFLAGS $LIBMPFR; do | |
10056 | ||
10057 | acl_save_prefix="$prefix" | |
10058 | prefix="$acl_final_prefix" | |
10059 | acl_save_exec_prefix="$exec_prefix" | |
10060 | exec_prefix="$acl_final_exec_prefix" | |
10061 | eval x=\"$x\" | |
10062 | exec_prefix="$acl_save_exec_prefix" | |
10063 | prefix="$acl_save_prefix" | |
10064 | ||
10065 | if test "X$x" = "X-L$additional_libdir"; then | |
10066 | haveit=yes | |
10067 | break | |
10068 | fi | |
10069 | done | |
10070 | if test -z "$haveit"; then | |
10071 | if test -d "$additional_libdir"; then | |
10072 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10073 | fi | |
10074 | fi | |
10075 | haveit= | |
10076 | for x in $LDFLAGS $LTLIBMPFR; do | |
10077 | ||
10078 | acl_save_prefix="$prefix" | |
10079 | prefix="$acl_final_prefix" | |
10080 | acl_save_exec_prefix="$exec_prefix" | |
10081 | exec_prefix="$acl_final_exec_prefix" | |
10082 | eval x=\"$x\" | |
10083 | exec_prefix="$acl_save_exec_prefix" | |
10084 | prefix="$acl_save_prefix" | |
10085 | ||
10086 | if test "X$x" = "X-L$additional_libdir"; then | |
10087 | haveit=yes | |
10088 | break | |
10089 | fi | |
10090 | done | |
10091 | if test -z "$haveit"; then | |
10092 | if test -d "$additional_libdir"; then | |
10093 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10094 | fi | |
10095 | fi | |
10096 | fi | |
10097 | fi | |
10098 | ;; | |
10099 | -R*) | |
10100 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10101 | if test "$enable_rpath" != no; then | |
10102 | haveit= | |
10103 | for x in $rpathdirs; do | |
10104 | if test "X$x" = "X$dir"; then | |
10105 | haveit=yes | |
10106 | break | |
10107 | fi | |
10108 | done | |
10109 | if test -z "$haveit"; then | |
10110 | rpathdirs="$rpathdirs $dir" | |
10111 | fi | |
10112 | haveit= | |
10113 | for x in $ltrpathdirs; do | |
10114 | if test "X$x" = "X$dir"; then | |
10115 | haveit=yes | |
10116 | break | |
10117 | fi | |
10118 | done | |
10119 | if test -z "$haveit"; then | |
10120 | ltrpathdirs="$ltrpathdirs $dir" | |
10121 | fi | |
10122 | fi | |
10123 | ;; | |
10124 | -l*) | |
10125 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10126 | ;; | |
10127 | *.la) | |
10128 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10129 | ;; | |
10130 | *) | |
10131 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10132 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10133 | ;; | |
10134 | esac | |
10135 | done | |
10136 | fi | |
10137 | else | |
10138 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10139 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10140 | fi | |
10141 | fi | |
10142 | fi | |
10143 | done | |
10144 | done | |
10145 | if test "X$rpathdirs" != "X"; then | |
10146 | if test -n "$hardcode_libdir_separator"; then | |
10147 | alldirs= | |
10148 | for found_dir in $rpathdirs; do | |
10149 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10150 | done | |
10151 | acl_save_libdir="$libdir" | |
10152 | libdir="$alldirs" | |
10153 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10154 | libdir="$acl_save_libdir" | |
10155 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10156 | else | |
10157 | for found_dir in $rpathdirs; do | |
10158 | acl_save_libdir="$libdir" | |
10159 | libdir="$found_dir" | |
10160 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10161 | libdir="$acl_save_libdir" | |
10162 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10163 | done | |
10164 | fi | |
10165 | fi | |
10166 | if test "X$ltrpathdirs" != "X"; then | |
10167 | for found_dir in $ltrpathdirs; do | |
10168 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10169 | done | |
10170 | fi | |
10171 | ||
10172 | ||
10173 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10174 | ||
10175 | for element in $INCMPFR; do | |
10176 | haveit= | |
10177 | for x in $CPPFLAGS; do | |
10178 | ||
10179 | acl_save_prefix="$prefix" | |
10180 | prefix="$acl_final_prefix" | |
10181 | acl_save_exec_prefix="$exec_prefix" | |
10182 | exec_prefix="$acl_final_exec_prefix" | |
10183 | eval x=\"$x\" | |
10184 | exec_prefix="$acl_save_exec_prefix" | |
10185 | prefix="$acl_save_prefix" | |
10186 | ||
10187 | if test "X$x" = "X$element"; then | |
10188 | haveit=yes | |
10189 | break | |
10190 | fi | |
10191 | done | |
10192 | if test -z "$haveit"; then | |
10193 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10194 | fi | |
10195 | done | |
10196 | ||
10197 | ||
10198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10199 | $as_echo_n "checking for libmpfr... " >&6; } | |
d0ac1c44 | 10200 | if ${ac_cv_libmpfr+:} false; then : |
2400729e UW |
10201 | $as_echo_n "(cached) " >&6 |
10202 | else | |
10203 | ||
10204 | ac_save_LIBS="$LIBS" | |
10205 | LIBS="$LIBS $LIBMPFR" | |
10206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10207 | /* end confdefs.h. */ | |
10208 | #include <mpfr.h> | |
10209 | int | |
10210 | main () | |
10211 | { | |
10212 | mpfr_exp_t exp; mpfr_t x; | |
10213 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10214 | ; | |
10215 | return 0; | |
10216 | } | |
10217 | _ACEOF | |
10218 | if ac_fn_c_try_link "$LINENO"; then : | |
10219 | ac_cv_libmpfr=yes | |
10220 | else | |
10221 | ac_cv_libmpfr=no | |
10222 | fi | |
10223 | rm -f core conftest.err conftest.$ac_objext \ | |
10224 | conftest$ac_exeext conftest.$ac_ext | |
10225 | LIBS="$ac_save_LIBS" | |
10226 | ||
10227 | fi | |
10228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10229 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10230 | if test "$ac_cv_libmpfr" = yes; then | |
10231 | HAVE_LIBMPFR=yes | |
10232 | ||
10233 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
10234 | ||
10235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
10236 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
10237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
10238 | $as_echo "$LIBMPFR" >&6; } | |
10239 | else | |
10240 | HAVE_LIBMPFR=no | |
10241 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10242 | LIBMPFR= | |
10243 | LTLIBMPFR= | |
10244 | fi | |
10245 | ||
10246 | ||
10247 | ||
10248 | ||
10249 | ||
10250 | ||
10251 | if test "$HAVE_LIBMPFR" != yes; then | |
10252 | if test "$with_mpfr" = yes; then | |
d0ac1c44 | 10253 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
2400729e UW |
10254 | else |
10255 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
10256 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
10257 | fi | |
10258 | fi | |
10259 | fi | |
10260 | ||
d344e670 DE |
10261 | # --------------------- # |
10262 | # Check for libpython. # | |
10263 | # --------------------- # | |
10264 | ||
a9322a30 | 10265 | |
a9322a30 TT |
10266 | |
10267 | ||
ec685c5e | 10268 | |
0c4a4063 | 10269 | |
81ecdfbb RW |
10270 | # Check whether --with-python was given. |
10271 | if test "${with_python+set}" = set; then : | |
10272 | withval=$with_python; | |
bec39cab | 10273 | else |
81ecdfbb | 10274 | with_python=auto |
bec39cab | 10275 | fi |
bec39cab | 10276 | |
81ecdfbb RW |
10277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10278 | $as_echo_n "checking whether to use python... " >&6; } | |
10279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10280 | $as_echo "$with_python" >&6; } | |
9a156167 | 10281 | |
81ecdfbb RW |
10282 | if test "${with_python}" = no; then |
10283 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10284 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10285 | have_libpython=no | |
bec39cab | 10286 | else |
81ecdfbb | 10287 | case "${with_python}" in |
8c85a4e2 | 10288 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
10289 | if test -d ${with_python}; then |
10290 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 10291 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10292 | python_prefix= |
9c4ea6c5 JB |
10293 | # If python does not exit ${with_python}/bin, then try in |
10294 | # ${with_python}. On Windows/MinGW, this is where the Python | |
10295 | # executable is. | |
10296 | if test ! -x "${python_prog}"; then | |
10297 | python_prog="${with_python}/python" | |
10298 | python_prefix= | |
10299 | fi | |
e7a30f46 | 10300 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
10301 | # Fall back to gdb 7.0/7.1 behaviour. |
10302 | python_prog=missing | |
0c4a4063 | 10303 | python_prefix=${with_python} |
ec685c5e | 10304 | fi |
e7a30f46 | 10305 | elif test -x "${with_python}"; then |
ec685c5e DE |
10306 | # While we can't run python compiled for $host (unless host == build), |
10307 | # the user could write a script that provides the needed information, | |
10308 | # so we support that. | |
ec685c5e | 10309 | python_prog=${with_python} |
0c4a4063 | 10310 | python_prefix= |
ec685c5e | 10311 | else |
d0ac1c44 | 10312 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
ec685c5e | 10313 | fi |
81ecdfbb | 10314 | ;; |
ec685c5e DE |
10315 | */*) |
10316 | # Disallow --with-python=foo/bar. | |
d0ac1c44 | 10317 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
81ecdfbb | 10318 | ;; |
ec685c5e DE |
10319 | *) |
10320 | # The user has either specified auto, yes, or the name of the python | |
10321 | # program assumed to be in $PATH. | |
10322 | python_prefix= | |
10323 | case "${with_python}" in | |
10324 | yes | auto) | |
10325 | if test ${build} = ${host}; then | |
10326 | # Extract the first word of "python", so it can be a program name with args. | |
10327 | set dummy python; ac_word=$2 | |
10328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10329 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10330 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
10331 | $as_echo_n "(cached) " >&6 |
10332 | else | |
10333 | case $python_prog_path in | |
10334 | [\\/]* | ?:[\\/]*) | |
10335 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10336 | ;; | |
10337 | *) | |
10338 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10339 | for as_dir in $PATH | |
10340 | do | |
10341 | IFS=$as_save_IFS | |
10342 | test -z "$as_dir" && as_dir=. | |
10343 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10344 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
10345 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10346 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10347 | break 2 | |
10348 | fi | |
10349 | done | |
10350 | done | |
10351 | IFS=$as_save_IFS | |
10352 | ||
10353 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10354 | ;; | |
10355 | esac | |
10356 | fi | |
10357 | python_prog_path=$ac_cv_path_python_prog_path | |
10358 | if test -n "$python_prog_path"; then | |
10359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10360 | $as_echo "$python_prog_path" >&6; } | |
10361 | else | |
10362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10363 | $as_echo "no" >&6; } | |
10364 | fi | |
10365 | ||
10366 | ||
10367 | if test "${python_prog_path}" = missing; then | |
10368 | python_prog=missing | |
10369 | else | |
10370 | python_prog=${python_prog_path} | |
10371 | fi | |
10372 | else | |
10373 | # Not much we can do except assume the cross-compiler will find the | |
10374 | # right files. | |
10375 | python_prog=missing | |
10376 | fi | |
10377 | ;; | |
10378 | *) | |
10379 | # While we can't run python compiled for $host (unless host == build), | |
10380 | # the user could write a script that provides the needed information, | |
10381 | # so we support that. | |
10382 | python_prog="${with_python}" | |
10383 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10384 | set dummy ${python_prog}; ac_word=$2 | |
10385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10386 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10387 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
10388 | $as_echo_n "(cached) " >&6 |
10389 | else | |
10390 | case $python_prog_path in | |
10391 | [\\/]* | ?:[\\/]*) | |
10392 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10393 | ;; | |
10394 | *) | |
10395 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10396 | for as_dir in $PATH | |
10397 | do | |
10398 | IFS=$as_save_IFS | |
10399 | test -z "$as_dir" && as_dir=. | |
10400 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10401 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
10402 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10403 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10404 | break 2 | |
10405 | fi | |
10406 | done | |
10407 | done | |
10408 | IFS=$as_save_IFS | |
10409 | ||
10410 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10411 | ;; | |
10412 | esac | |
10413 | fi | |
10414 | python_prog_path=$ac_cv_path_python_prog_path | |
10415 | if test -n "$python_prog_path"; then | |
10416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10417 | $as_echo "$python_prog_path" >&6; } | |
10418 | else | |
10419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10420 | $as_echo "no" >&6; } | |
10421 | fi | |
10422 | ||
10423 | ||
10424 | if test "${python_prog_path}" = missing; then | |
d0ac1c44 | 10425 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
ec685c5e DE |
10426 | fi |
10427 | ;; | |
10428 | esac | |
81ecdfbb RW |
10429 | esac |
10430 | ||
ec685c5e | 10431 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
10432 | # We have a python program to use, but it may be too old. |
10433 | # Don't flag an error for --with-python=auto (the default). | |
10434 | have_python_config=yes | |
ec685c5e DE |
10435 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
10436 | if test $? != 0; then | |
e7a30f46 DE |
10437 | have_python_config=failed |
10438 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10439 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
e7a30f46 | 10440 | fi |
ec685c5e DE |
10441 | fi |
10442 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10443 | if test $? != 0; then | |
e7a30f46 DE |
10444 | have_python_config=failed |
10445 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10446 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
e7a30f46 | 10447 | fi |
ec685c5e | 10448 | fi |
0c4a4063 DE |
10449 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10450 | if test $? != 0; then | |
e7a30f46 DE |
10451 | have_python_config=failed |
10452 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10453 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
e7a30f46 | 10454 | fi |
0c4a4063 | 10455 | fi |
ec685c5e | 10456 | else |
ac534cba JB |
10457 | # We do not have a python executable we can use to determine where |
10458 | # to find the Python headers and libs. We cannot guess the include | |
10459 | # path from the python_prefix either, because that include path | |
10460 | # depends on the Python version. So, there is nothing much we can | |
10461 | # do except assume that the compiler will be able to find those files. | |
10462 | python_includes= | |
10463 | python_libs= | |
0c4a4063 | 10464 | have_python_config=no |
ec685c5e | 10465 | fi |
bec39cab | 10466 | |
ec685c5e DE |
10467 | # If we have python-config, only try the configuration it provides. |
10468 | # Otherwise fallback on the old way of trying different versions of | |
10469 | # python in turn. | |
81ecdfbb | 10470 | |
ec685c5e DE |
10471 | have_libpython=no |
10472 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
10473 | # Determine the Python version by extracting "-lpython<version>" |
10474 | # part of the python_libs. <version> is usually X.Y with X and Y | |
10475 | # being decimal numbers, but can also be XY (seen on Windows). | |
10476 | # | |
10477 | # The extraction is performed using sed with a regular expression. | |
10478 | # Initially, the regexp used was using the '?' quantifier to make | |
10479 | # the dot in the version number optional. Unfortunately, this | |
10480 | # does not work with non-GNU versions of sed because, because of | |
10481 | # what looks like a limitation (the '?' quantifier does not work | |
10482 | # with back-references). We work around this limitation by using | |
10483 | # the '*' quantifier instead. It means that, in theory, we might | |
10484 | # match unexpected version strings such as "-lpython2..7", but | |
10485 | # this seems unlikely in practice. And even if that happens, | |
10486 | # an error will be triggered later on, when checking that version | |
10487 | # number. | |
ec685c5e | 10488 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 10489 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
10490 | case "${python_version}" in |
10491 | python*) | |
ec685c5e DE |
10492 | |
10493 | version=${python_version} | |
10494 | ||
10495 | new_CPPFLAGS=${python_includes} | |
10496 | new_LIBS=${python_libs} | |
81ecdfbb RW |
10497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10498 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10499 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10500 | save_LIBS=$LIBS |
ec685c5e | 10501 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 10502 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 10503 | found_usable_python=no |
81ecdfbb | 10504 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10505 | /* end confdefs.h. */ |
ac534cba | 10506 | #include "Python.h" |
81ecdfbb RW |
10507 | int |
10508 | main () | |
10509 | { | |
10510 | Py_Initialize (); | |
10511 | ; | |
10512 | return 0; | |
10513 | } | |
bec39cab | 10514 | _ACEOF |
81ecdfbb | 10515 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10516 | have_libpython=${version} |
10517 | found_usable_python=yes | |
ac534cba JB |
10518 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10519 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 10520 | fi |
81ecdfbb RW |
10521 | rm -f core conftest.err conftest.$ac_objext \ |
10522 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10523 | CPPFLAGS=$save_CPPFLAGS |
10524 | LIBS=$save_LIBS | |
ec685c5e DE |
10525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10526 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10527 | |
0c4a4063 DE |
10528 | ;; |
10529 | *) | |
d0ac1c44 | 10530 | as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
10531 | ;; |
10532 | esac | |
e7a30f46 | 10533 | elif test "${have_python_config}" != failed; then |
ec685c5e | 10534 | if test "${have_libpython}" = no; then |
9a156167 | 10535 | |
420697bb TT |
10536 | version=python2.7 |
10537 | ||
10538 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 10539 | new_LIBS="-lpython2.7 ${python_libs}" |
420697bb TT |
10540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10541 | $as_echo_n "checking for ${version}... " >&6; } | |
10542 | save_CPPFLAGS=$CPPFLAGS | |
10543 | save_LIBS=$LIBS | |
10544 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 10545 | LIBS="$new_LIBS $LIBS" |
420697bb TT |
10546 | found_usable_python=no |
10547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10548 | /* end confdefs.h. */ | |
ac534cba | 10549 | #include "Python.h" |
420697bb TT |
10550 | int |
10551 | main () | |
10552 | { | |
10553 | Py_Initialize (); | |
10554 | ; | |
10555 | return 0; | |
10556 | } | |
10557 | _ACEOF | |
10558 | if ac_fn_c_try_link "$LINENO"; then : | |
10559 | have_libpython=${version} | |
10560 | found_usable_python=yes | |
ac534cba JB |
10561 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10562 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
10563 | fi |
10564 | rm -f core conftest.err conftest.$ac_objext \ | |
10565 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10566 | CPPFLAGS=$save_CPPFLAGS |
10567 | LIBS=$save_LIBS | |
420697bb TT |
10568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10569 | $as_echo "${found_usable_python}" >&6; } | |
10570 | ||
10571 | fi | |
10572 | if test "${have_libpython}" = no; then | |
10573 | ||
ec685c5e DE |
10574 | version=python2.6 |
10575 | ||
10576 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 10577 | new_LIBS="-lpython2.6 ${python_libs}" |
ec685c5e DE |
10578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10579 | $as_echo_n "checking for ${version}... " >&6; } | |
10580 | save_CPPFLAGS=$CPPFLAGS | |
10581 | save_LIBS=$LIBS | |
10582 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 10583 | LIBS="$new_LIBS $LIBS" |
ec685c5e DE |
10584 | found_usable_python=no |
10585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10586 | /* end confdefs.h. */ | |
ac534cba | 10587 | #include "Python.h" |
ec685c5e DE |
10588 | int |
10589 | main () | |
10590 | { | |
10591 | Py_Initialize (); | |
10592 | ; | |
10593 | return 0; | |
10594 | } | |
10595 | _ACEOF | |
10596 | if ac_fn_c_try_link "$LINENO"; then : | |
10597 | have_libpython=${version} | |
10598 | found_usable_python=yes | |
ac534cba JB |
10599 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10600 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
10601 | fi |
10602 | rm -f core conftest.err conftest.$ac_objext \ | |
10603 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10604 | CPPFLAGS=$save_CPPFLAGS |
10605 | LIBS=$save_LIBS | |
ec685c5e DE |
10606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10607 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10608 | |
81ecdfbb | 10609 | fi |
ec685c5e | 10610 | if test ${have_libpython} = no; then |
9a156167 | 10611 | |
81ecdfbb | 10612 | version=python2.5 |
9a156167 | 10613 | |
ec685c5e | 10614 | new_CPPFLAGS=${python_includes} |
bf27f0e2 | 10615 | new_LIBS="-lpython2.5 ${python_libs}" |
81ecdfbb RW |
10616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10617 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10618 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10619 | save_LIBS=$LIBS |
ec685c5e | 10620 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 10621 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 10622 | found_usable_python=no |
81ecdfbb | 10623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10624 | /* end confdefs.h. */ |
ac534cba | 10625 | #include "Python.h" |
81ecdfbb RW |
10626 | int |
10627 | main () | |
10628 | { | |
10629 | Py_Initialize (); | |
10630 | ; | |
10631 | return 0; | |
10632 | } | |
436868fb | 10633 | _ACEOF |
81ecdfbb | 10634 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10635 | have_libpython=${version} |
10636 | found_usable_python=yes | |
ac534cba JB |
10637 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10638 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10639 | fi |
81ecdfbb RW |
10640 | rm -f core conftest.err conftest.$ac_objext \ |
10641 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10642 | CPPFLAGS=$save_CPPFLAGS |
10643 | LIBS=$save_LIBS | |
ec685c5e DE |
10644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10645 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 10646 | |
81ecdfbb | 10647 | fi |
ec685c5e | 10648 | if test ${have_libpython} = no; then |
a9322a30 | 10649 | |
81ecdfbb | 10650 | version=python2.4 |
a9322a30 | 10651 | |
ec685c5e | 10652 | new_CPPFLAGS=${python_includes} |
bf27f0e2 | 10653 | new_LIBS="-lpython2.4 ${python_libs}" |
81ecdfbb RW |
10654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
10655 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 10656 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10657 | save_LIBS=$LIBS |
ec685c5e | 10658 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 10659 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 10660 | found_usable_python=no |
81ecdfbb | 10661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 10662 | /* end confdefs.h. */ |
ac534cba | 10663 | #include "Python.h" |
a9322a30 TT |
10664 | int |
10665 | main () | |
10666 | { | |
81ecdfbb | 10667 | Py_Initialize (); |
a9322a30 TT |
10668 | ; |
10669 | return 0; | |
10670 | } | |
436868fb | 10671 | _ACEOF |
81ecdfbb | 10672 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
10673 | have_libpython=${version} |
10674 | found_usable_python=yes | |
ac534cba JB |
10675 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10676 | PYTHON_LIBS=$new_LIBS | |
436868fb | 10677 | fi |
81ecdfbb RW |
10678 | rm -f core conftest.err conftest.$ac_objext \ |
10679 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10680 | CPPFLAGS=$save_CPPFLAGS |
10681 | LIBS=$save_LIBS | |
ec685c5e DE |
10682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10683 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10684 | |
ec685c5e DE |
10685 | fi |
10686 | fi | |
9c4ea6c5 | 10687 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
10688 | |
10689 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
10690 | ||
9c4ea6c5 | 10691 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
10692 | |
10693 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
10694 | ||
9c4ea6c5 | 10695 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
10696 | |
10697 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
10698 | ||
9c4ea6c5 | 10699 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
10700 | |
10701 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
10702 | ||
81ecdfbb | 10703 | fi |
ec685c5e DE |
10704 | |
10705 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10706 | case "${with_python}" in |
10707 | yes) | |
d0ac1c44 | 10708 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
10709 | ;; |
10710 | auto) | |
10711 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10712 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10713 | ;; | |
10714 | *) | |
d0ac1c44 | 10715 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
81ecdfbb RW |
10716 | ;; |
10717 | esac | |
0c4a4063 DE |
10718 | else |
10719 | if test -n "${python_prefix}"; then | |
10720 | ||
10721 | cat >>confdefs.h <<_ACEOF | |
10722 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10723 | _ACEOF | |
10724 | ||
10725 | ||
10726 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10727 | if test "x$prefix" = xNONE; then | |
10728 | test_prefix=/usr/local | |
10729 | else | |
10730 | test_prefix=$prefix | |
10731 | fi | |
10732 | else | |
10733 | test_prefix=$exec_prefix | |
10734 | fi | |
10735 | value=0 | |
10736 | case ${python_prefix} in | |
10737 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10738 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10739 | value=1 | |
10740 | ;; | |
10741 | esac | |
10742 | ||
10743 | cat >>confdefs.h <<_ACEOF | |
10744 | #define PYTHON_PATH_RELOCATABLE $value | |
10745 | _ACEOF | |
10746 | ||
10747 | ||
10748 | fi | |
81ecdfbb | 10749 | fi |
436868fb | 10750 | fi |
436868fb | 10751 | |
ec685c5e | 10752 | if test "${have_libpython}" != no; then |
436868fb | 10753 | |
81ecdfbb | 10754 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10755 | |
81ecdfbb RW |
10756 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10757 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10758 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 10759 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 10760 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 10761 | |
81ecdfbb RW |
10762 | # Flags needed to compile Python code (taken from python-config --cflags). |
10763 | # We cannot call python-config directly because it will output whatever was | |
10764 | # used when compiling the Python interpreter itself, including flags which | |
10765 | # would make the python-related objects be compiled differently from the | |
10766 | # rest of GDB (e.g., -O2 and -fPIC). | |
10767 | if test "${GCC}" = yes; then | |
10768 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
10769 | fi | |
436868fb | 10770 | |
81ecdfbb RW |
10771 | if test "x${tentative_python_cflags}" != x; then |
10772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10773 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10774 | for flag in ${tentative_python_cflags}; do | |
10775 | # Check that the compiler accepts it | |
10776 | saved_CFLAGS="$CFLAGS" | |
10777 | CFLAGS="$CFLAGS $flag" | |
10778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10779 | /* end confdefs.h. */ |
81ecdfbb | 10780 | |
a9322a30 TT |
10781 | int |
10782 | main () | |
10783 | { | |
a9322a30 TT |
10784 | |
10785 | ; | |
10786 | return 0; | |
10787 | } | |
bec39cab | 10788 | _ACEOF |
81ecdfbb RW |
10789 | if ac_fn_c_try_compile "$LINENO"; then : |
10790 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10791 | fi |
81ecdfbb RW |
10792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10793 | CFLAGS="$saved_CFLAGS" | |
10794 | done | |
10795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10796 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10797 | fi | |
043b6510 | 10798 | |
c83393b9 JB |
10799 | # On x64 Windows, Python's include headers, and pyconfig.h in |
10800 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
10801 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
10802 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
10803 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
10804 | # The issue was reported to the Python community, but still isn't | |
10805 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
10806 | ||
043b6510 | 10807 | case "$gdb_host" in |
c83393b9 JB |
10808 | mingw64) |
10809 | if test "${GCC}" = yes; then | |
10810 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
10811 | fi | |
10812 | ;; | |
043b6510 | 10813 | esac |
a8db4212 YPK |
10814 | |
10815 | # Note that "python -m threading" cannot be used to check for | |
10816 | # threading support due to a bug in Python 2.7.3 | |
10817 | # (http://bugs.python.org/issue15567). | |
10818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
10819 | $as_echo_n "checking whether python supports threads... " >&6; } | |
10820 | saved_CPPFLAGS="${CPPFLAGS}" | |
10821 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
10822 | # Note that the test is reversed so that python_has_threads=yes on | |
10823 | # unexpected failures. | |
10824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10825 | /* end confdefs.h. */ | |
10826 | ||
10827 | #include <Python.h> | |
10828 | #ifdef WITH_THREAD | |
10829 | # error | |
10830 | #endif | |
10831 | ||
10832 | _ACEOF | |
10833 | if ac_fn_c_try_cpp "$LINENO"; then : | |
10834 | python_has_threads=no | |
10835 | else | |
10836 | python_has_threads=yes | |
10837 | fi | |
d0ac1c44 | 10838 | rm -f conftest.err conftest.i conftest.$ac_ext |
a8db4212 YPK |
10839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 |
10840 | $as_echo "${python_has_threads}" >&6; } | |
10841 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb | 10842 | else |
6dddc817 DE |
10843 | # Even if Python support is not compiled in, we need to have this file |
10844 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 10845 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 10846 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 10847 | fi |
9a156167 | 10848 | |
a4a1c157 PA |
10849 | # Work around Python http://bugs.python.org/issue10112. See also |
10850 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
10851 | # no effect. Note that the only test after this that uses Python is | |
10852 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
10853 | # run without -export-dynamic too. | |
10854 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
10855 | ||
10856 | ||
ed3ef339 DE |
10857 | |
10858 | ||
4df42755 DE |
10859 | if test "${have_libpython}" != no; then |
10860 | HAVE_PYTHON_TRUE= | |
10861 | HAVE_PYTHON_FALSE='#' | |
10862 | else | |
10863 | HAVE_PYTHON_TRUE='#' | |
10864 | HAVE_PYTHON_FALSE= | |
10865 | fi | |
10866 | ||
ed3ef339 DE |
10867 | |
10868 | # -------------------- # | |
10869 | # Check for libguile. # | |
10870 | # -------------------- # | |
10871 | ||
10872 | ||
e1402065 DE |
10873 | |
10874 | ||
10875 | ||
10876 | ||
10877 | # Check whether --with-guile was given. | |
10878 | if test "${with_guile+set}" = set; then : | |
10879 | withval=$with_guile; | |
10880 | else | |
10881 | with_guile=auto | |
10882 | fi | |
10883 | ||
10884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
10885 | $as_echo_n "checking whether to use guile... " >&6; } | |
10886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
10887 | $as_echo "$with_guile" >&6; } | |
10888 | ||
ed3ef339 DE |
10889 | # Extract the first word of "pkg-config", so it can be a program name with args. |
10890 | set dummy pkg-config; ac_word=$2 | |
10891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10892 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10893 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
ed3ef339 DE |
10894 | $as_echo_n "(cached) " >&6 |
10895 | else | |
10896 | case $pkg_config_prog_path in | |
10897 | [\\/]* | ?:[\\/]*) | |
10898 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
10899 | ;; | |
10900 | *) | |
10901 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10902 | for as_dir in $PATH | |
10903 | do | |
10904 | IFS=$as_save_IFS | |
10905 | test -z "$as_dir" && as_dir=. | |
10906 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10907 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ed3ef339 DE |
10908 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10909 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10910 | break 2 | |
10911 | fi | |
10912 | done | |
10913 | done | |
10914 | IFS=$as_save_IFS | |
10915 | ||
10916 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
10917 | ;; | |
10918 | esac | |
10919 | fi | |
10920 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
10921 | if test -n "$pkg_config_prog_path"; then | |
10922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
10923 | $as_echo "$pkg_config_prog_path" >&6; } | |
10924 | else | |
10925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10926 | $as_echo "no" >&6; } | |
10927 | fi | |
10928 | ||
10929 | ||
10930 | ||
6e66f753 | 10931 | try_guile_versions="guile-2.0" |
ed3ef339 DE |
10932 | have_libguile=no |
10933 | case "${with_guile}" in | |
10934 | no) | |
10935 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
10936 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
10937 | ;; | |
10938 | auto) | |
e1402065 DE |
10939 | if test "${pkg_config_prog_path}" = "missing"; then |
10940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
10941 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
10942 | else | |
ed3ef339 DE |
10943 | |
10944 | pkg_config=${pkg_config_prog_path} | |
10945 | guile_version_list=${try_guile_versions} | |
10946 | flag_errors=no | |
10947 | ||
ed3ef339 DE |
10948 | found_usable_guile=checking |
10949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10950 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10951 | for guile_version in ${guile_version_list}; do | |
10952 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10953 | if test $? != 0; then | |
10954 | continue | |
10955 | fi | |
10956 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10957 | if test $? != 0; then | |
d0ac1c44 | 10958 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10959 | fi |
10960 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10961 | if test $? != 0; then | |
d0ac1c44 | 10962 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10963 | fi |
10964 | found_usable_guile=${guile_version} | |
10965 | break | |
10966 | done | |
10967 | if test "${found_usable_guile}" = "checking"; then | |
10968 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 10969 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
10970 | else |
10971 | found_usable_guile=no | |
10972 | fi | |
10973 | fi | |
10974 | if test "${found_usable_guile}" != no; then | |
10975 | save_CPPFLAGS=$CPPFLAGS | |
10976 | save_LIBS=$LIBS | |
10977 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10978 | LIBS="$LIBS $new_LIBS" | |
10979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10980 | /* end confdefs.h. */ | |
10981 | #include "libguile.h" | |
10982 | int | |
10983 | main () | |
10984 | { | |
10985 | scm_init_guile (); | |
10986 | ; | |
10987 | return 0; | |
10988 | } | |
10989 | _ACEOF | |
10990 | if ac_fn_c_try_link "$LINENO"; then : | |
10991 | have_libguile=yes | |
10992 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10993 | GUILE_LIBS=$new_LIBS | |
10994 | else | |
10995 | found_usable_guile=no | |
10996 | fi | |
10997 | rm -f core conftest.err conftest.$ac_objext \ | |
10998 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 10999 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11000 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11001 | |
11002 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11003 | ||
11004 | ||
11005 | fi | |
11006 | ||
ed3ef339 DE |
11007 | CPPFLAGS=$save_CPPFLAGS |
11008 | LIBS=$save_LIBS | |
11009 | if test "${found_usable_guile}" = no; then | |
11010 | if test "${flag_errors}" = yes; then | |
11011 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11012 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11013 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11014 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11015 | fi |
11016 | fi | |
11017 | fi | |
11018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11019 | $as_echo "${found_usable_guile}" >&6; } | |
11020 | ||
e1402065 | 11021 | fi |
ed3ef339 DE |
11022 | ;; |
11023 | yes) | |
e1402065 | 11024 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11025 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11026 | fi |
ed3ef339 DE |
11027 | |
11028 | pkg_config=${pkg_config_prog_path} | |
11029 | guile_version_list=${try_guile_versions} | |
11030 | flag_errors=yes | |
11031 | ||
ed3ef339 DE |
11032 | found_usable_guile=checking |
11033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11034 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11035 | for guile_version in ${guile_version_list}; do | |
11036 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11037 | if test $? != 0; then | |
11038 | continue | |
11039 | fi | |
11040 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11041 | if test $? != 0; then | |
d0ac1c44 | 11042 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11043 | fi |
11044 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11045 | if test $? != 0; then | |
d0ac1c44 | 11046 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11047 | fi |
11048 | found_usable_guile=${guile_version} | |
11049 | break | |
11050 | done | |
11051 | if test "${found_usable_guile}" = "checking"; then | |
11052 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11053 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11054 | else |
11055 | found_usable_guile=no | |
11056 | fi | |
11057 | fi | |
11058 | if test "${found_usable_guile}" != no; then | |
11059 | save_CPPFLAGS=$CPPFLAGS | |
11060 | save_LIBS=$LIBS | |
11061 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11062 | LIBS="$LIBS $new_LIBS" | |
11063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11064 | /* end confdefs.h. */ | |
11065 | #include "libguile.h" | |
11066 | int | |
11067 | main () | |
11068 | { | |
11069 | scm_init_guile (); | |
11070 | ; | |
11071 | return 0; | |
11072 | } | |
11073 | _ACEOF | |
11074 | if ac_fn_c_try_link "$LINENO"; then : | |
11075 | have_libguile=yes | |
11076 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11077 | GUILE_LIBS=$new_LIBS | |
11078 | else | |
11079 | found_usable_guile=no | |
11080 | fi | |
11081 | rm -f core conftest.err conftest.$ac_objext \ | |
11082 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11083 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11084 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11085 | |
11086 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11087 | ||
11088 | ||
11089 | fi | |
11090 | ||
ed3ef339 DE |
11091 | CPPFLAGS=$save_CPPFLAGS |
11092 | LIBS=$save_LIBS | |
11093 | if test "${found_usable_guile}" = no; then | |
11094 | if test "${flag_errors}" = yes; then | |
11095 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11096 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11097 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11098 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11099 | fi |
11100 | fi | |
11101 | fi | |
11102 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11103 | $as_echo "${found_usable_guile}" >&6; } | |
11104 | ||
11105 | ;; | |
11106 | [\\/]* | ?:[\\/]*) | |
e1402065 | 11107 | if test -x "${with_guile}"; then |
ed3ef339 DE |
11108 | |
11109 | pkg_config=${with_guile} | |
11110 | guile_version_list=${try_guile_versions} | |
11111 | flag_errors=yes | |
11112 | ||
ed3ef339 DE |
11113 | found_usable_guile=checking |
11114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11115 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11116 | for guile_version in ${guile_version_list}; do | |
11117 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11118 | if test $? != 0; then | |
11119 | continue | |
11120 | fi | |
11121 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11122 | if test $? != 0; then | |
d0ac1c44 | 11123 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11124 | fi |
11125 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11126 | if test $? != 0; then | |
d0ac1c44 | 11127 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11128 | fi |
11129 | found_usable_guile=${guile_version} | |
11130 | break | |
11131 | done | |
11132 | if test "${found_usable_guile}" = "checking"; then | |
11133 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11134 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11135 | else |
11136 | found_usable_guile=no | |
11137 | fi | |
11138 | fi | |
11139 | if test "${found_usable_guile}" != no; then | |
11140 | save_CPPFLAGS=$CPPFLAGS | |
11141 | save_LIBS=$LIBS | |
11142 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11143 | LIBS="$LIBS $new_LIBS" | |
11144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11145 | /* end confdefs.h. */ | |
11146 | #include "libguile.h" | |
11147 | int | |
11148 | main () | |
11149 | { | |
11150 | scm_init_guile (); | |
11151 | ; | |
11152 | return 0; | |
11153 | } | |
11154 | _ACEOF | |
11155 | if ac_fn_c_try_link "$LINENO"; then : | |
11156 | have_libguile=yes | |
11157 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11158 | GUILE_LIBS=$new_LIBS | |
11159 | else | |
11160 | found_usable_guile=no | |
11161 | fi | |
11162 | rm -f core conftest.err conftest.$ac_objext \ | |
11163 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11164 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11165 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11166 | |
11167 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11168 | ||
11169 | ||
11170 | fi | |
11171 | ||
ed3ef339 DE |
11172 | CPPFLAGS=$save_CPPFLAGS |
11173 | LIBS=$save_LIBS | |
11174 | if test "${found_usable_guile}" = no; then | |
11175 | if test "${flag_errors}" = yes; then | |
11176 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11177 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11178 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11179 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11180 | fi |
11181 | fi | |
11182 | fi | |
11183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11184 | $as_echo "${found_usable_guile}" >&6; } | |
11185 | ||
e1402065 | 11186 | else |
d0ac1c44 | 11187 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
e1402065 | 11188 | fi |
ed3ef339 DE |
11189 | ;; |
11190 | "" | */*) | |
11191 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
d0ac1c44 | 11192 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
ed3ef339 DE |
11193 | ;; |
11194 | *) | |
11195 | # A space separate list of guile versions to try, in order. | |
e1402065 | 11196 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11197 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11198 | fi |
ed3ef339 DE |
11199 | |
11200 | pkg_config=${pkg_config_prog_path} | |
11201 | guile_version_list=${with_guile} | |
11202 | flag_errors=yes | |
11203 | ||
ed3ef339 DE |
11204 | found_usable_guile=checking |
11205 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11206 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11207 | for guile_version in ${guile_version_list}; do | |
11208 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11209 | if test $? != 0; then | |
11210 | continue | |
11211 | fi | |
11212 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11213 | if test $? != 0; then | |
d0ac1c44 | 11214 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11215 | fi |
11216 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11217 | if test $? != 0; then | |
d0ac1c44 | 11218 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11219 | fi |
11220 | found_usable_guile=${guile_version} | |
11221 | break | |
11222 | done | |
11223 | if test "${found_usable_guile}" = "checking"; then | |
11224 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11225 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11226 | else |
11227 | found_usable_guile=no | |
11228 | fi | |
11229 | fi | |
11230 | if test "${found_usable_guile}" != no; then | |
11231 | save_CPPFLAGS=$CPPFLAGS | |
11232 | save_LIBS=$LIBS | |
11233 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11234 | LIBS="$LIBS $new_LIBS" | |
11235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11236 | /* end confdefs.h. */ | |
11237 | #include "libguile.h" | |
11238 | int | |
11239 | main () | |
11240 | { | |
11241 | scm_init_guile (); | |
11242 | ; | |
11243 | return 0; | |
11244 | } | |
11245 | _ACEOF | |
11246 | if ac_fn_c_try_link "$LINENO"; then : | |
11247 | have_libguile=yes | |
11248 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11249 | GUILE_LIBS=$new_LIBS | |
11250 | else | |
11251 | found_usable_guile=no | |
11252 | fi | |
11253 | rm -f core conftest.err conftest.$ac_objext \ | |
11254 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11255 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11256 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11257 | |
11258 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11259 | ||
11260 | ||
11261 | fi | |
11262 | ||
ed3ef339 DE |
11263 | CPPFLAGS=$save_CPPFLAGS |
11264 | LIBS=$save_LIBS | |
11265 | if test "${found_usable_guile}" = no; then | |
11266 | if test "${flag_errors}" = yes; then | |
11267 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11268 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11269 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11270 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11271 | fi |
11272 | fi | |
11273 | fi | |
11274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11275 | $as_echo "${found_usable_guile}" >&6; } | |
11276 | ||
11277 | ;; | |
11278 | esac | |
11279 | ||
e76c5d17 | 11280 | if test "${have_libguile}" != no; then |
d342a0da DE |
11281 | case "${with_guile}" in |
11282 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11283 | |
11284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11285 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11286 | if ${ac_cv_guild_program_name+:} false; then : |
e76c5d17 DE |
11287 | $as_echo_n "(cached) " >&6 |
11288 | else | |
d342a0da | 11289 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11290 | |
11291 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11292 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11293 | # what the program name is, at the risk of getting it wrong if | |
11294 | # Guile was configured with '--program-suffix' or similar. | |
11295 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11296 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11297 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11298 | fi | |
11299 | ||
11300 | fi | |
11301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11302 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11303 | ||
11304 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11305 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
e76c5d17 DE |
11306 | fi |
11307 | ||
11308 | GUILD="$ac_cv_guild_program_name" | |
11309 | ||
11310 | ||
d342a0da DE |
11311 | ;; |
11312 | *) | |
11313 | ||
11314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11315 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11316 | if ${ac_cv_guild_program_name+:} false; then : |
d342a0da DE |
11317 | $as_echo_n "(cached) " >&6 |
11318 | else | |
11319 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11320 | ||
11321 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11322 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11323 | # what the program name is, at the risk of getting it wrong if | |
11324 | # Guile was configured with '--program-suffix' or similar. | |
11325 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11326 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11327 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11328 | fi | |
11329 | ||
11330 | fi | |
11331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11332 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11333 | ||
11334 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11335 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
d342a0da DE |
11336 | fi |
11337 | ||
11338 | GUILD="$ac_cv_guild_program_name" | |
11339 | ||
11340 | ||
11341 | ;; | |
11342 | esac | |
e76c5d17 DE |
11343 | |
11344 | ||
11345 | if test "$cross_compiling" = no; then | |
11346 | GUILD_TARGET_FLAG= | |
11347 | else | |
11348 | GUILD_TARGET_FLAG="--target=$host" | |
11349 | fi | |
11350 | ||
11351 | ||
11352 | ||
11353 | ||
11354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
11355 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
d0ac1c44 | 11356 | if ${ac_cv_guild_ok+:} false; then : |
e76c5d17 DE |
11357 | $as_echo_n "(cached) " >&6 |
11358 | else | |
11359 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
11360 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
11361 | ac_cv_guild_ok=yes | |
11362 | else | |
11363 | ac_cv_guild_ok=no | |
11364 | fi | |
11365 | fi | |
11366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
11367 | $as_echo "$ac_cv_guild_ok" >&6; } | |
11368 | ||
11369 | if test "$ac_cv_guild_ok" = no; then | |
11370 | have_libguile=no | |
11371 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
11372 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
11373 | fi | |
11374 | fi | |
11375 | ||
ed3ef339 DE |
11376 | if test "${have_libguile}" != no; then |
11377 | ||
11378 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
11379 | ||
11380 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
11381 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
11382 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
11383 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
11384 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
11385 | |
11386 | save_LIBS="$LIBS" | |
11387 | save_CPPFLAGS="$CPPFLAGS" | |
11388 | LIBS="$GUILE_LIBS" | |
11389 | CPPFLAGS="$GUILE_CPPFLAGS" | |
11390 | for ac_func in scm_new_smob | |
11391 | do : | |
11392 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
d0ac1c44 | 11393 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
16954d5d LC |
11394 | cat >>confdefs.h <<_ACEOF |
11395 | #define HAVE_SCM_NEW_SMOB 1 | |
11396 | _ACEOF | |
11397 | ||
11398 | fi | |
11399 | done | |
11400 | ||
11401 | LIBS="$save_LIBS" | |
11402 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
11403 | else |
11404 | # Even if Guile support is not compiled in, we need to have these files | |
11405 | # included. | |
bd810fff | 11406 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
11407 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
11408 | fi | |
9a156167 | 11409 | |
ac534cba | 11410 | |
4df42755 DE |
11411 | if test "${have_libguile}" != no; then |
11412 | HAVE_GUILE_TRUE= | |
11413 | HAVE_GUILE_FALSE='#' | |
11414 | else | |
11415 | HAVE_GUILE_TRUE='#' | |
11416 | HAVE_GUILE_FALSE= | |
11417 | fi | |
11418 | ||
ac534cba | 11419 | |
d344e670 DE |
11420 | # --------------------- # |
11421 | # Check for libmcheck. # | |
11422 | # --------------------- # | |
11423 | ||
a8db4212 YPK |
11424 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
11425 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
11426 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
11427 | # and for releases. | |
17ef446e PA |
11428 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
11429 | && $development; then | |
11430 | libmcheck_default=yes | |
11431 | else | |
11432 | libmcheck_default=no | |
a8db4212 YPK |
11433 | fi |
11434 | ||
17ef446e PA |
11435 | # Check whether --enable-libmcheck was given. |
11436 | if test "${enable_libmcheck+set}" = set; then : | |
11437 | enableval=$enable_libmcheck; case "${enableval}" in | |
11438 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
11439 | no | n) ENABLE_LIBMCHECK="no" ;; | |
d0ac1c44 | 11440 | *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; |
17ef446e PA |
11441 | esac |
11442 | fi | |
11443 | ||
11444 | ||
11445 | if test -z "${ENABLE_LIBMCHECK}"; then | |
11446 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 11447 | fi |
17ef446e PA |
11448 | |
11449 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
11450 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 | 11451 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
d0ac1c44 | 11452 | if ${ac_cv_lib_mcheck_main+:} false; then : |
a8db4212 YPK |
11453 | $as_echo_n "(cached) " >&6 |
11454 | else | |
11455 | ac_check_lib_save_LIBS=$LIBS | |
11456 | LIBS="-lmcheck $LIBS" | |
11457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11458 | /* end confdefs.h. */ | |
11459 | ||
11460 | ||
11461 | int | |
11462 | main () | |
11463 | { | |
11464 | return main (); | |
11465 | ; | |
11466 | return 0; | |
11467 | } | |
11468 | _ACEOF | |
11469 | if ac_fn_c_try_link "$LINENO"; then : | |
11470 | ac_cv_lib_mcheck_main=yes | |
11471 | else | |
11472 | ac_cv_lib_mcheck_main=no | |
11473 | fi | |
11474 | rm -f core conftest.err conftest.$ac_objext \ | |
11475 | conftest$ac_exeext conftest.$ac_ext | |
11476 | LIBS=$ac_check_lib_save_LIBS | |
11477 | fi | |
11478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
11479 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
d0ac1c44 | 11480 | if test "x$ac_cv_lib_mcheck_main" = xyes; then : |
a8db4212 YPK |
11481 | cat >>confdefs.h <<_ACEOF |
11482 | #define HAVE_LIBMCHECK 1 | |
11483 | _ACEOF | |
11484 | ||
11485 | LIBS="-lmcheck $LIBS" | |
11486 | ||
11487 | fi | |
11488 | ||
17ef446e PA |
11489 | fi |
11490 | ||
11491 | ||
11492 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
11493 | -a "${have_libpython}" != "no" \ | |
11494 | -a "${python_has_threads}" = "yes" ; then | |
11495 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
11496 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
11497 | fi |
11498 | ||
58bfce93 MM |
11499 | |
11500 | # Check whether --with-intel_pt was given. | |
11501 | if test "${with_intel_pt+set}" = set; then : | |
11502 | withval=$with_intel_pt; | |
11503 | else | |
11504 | with_intel_pt=auto | |
11505 | fi | |
11506 | ||
11507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
11508 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
11509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
11510 | $as_echo "$with_intel_pt" >&6; } | |
11511 | ||
11512 | if test "${with_intel_pt}" = no; then | |
bc504a31 PA |
11513 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 |
11514 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
58bfce93 MM |
11515 | HAVE_LIBIPT=no |
11516 | else | |
5599c404 MM |
11517 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11518 | /* end confdefs.h. */ | |
11519 | ||
11520 | #include <linux/perf_event.h> | |
11521 | #ifndef PERF_ATTR_SIZE_VER5 | |
11522 | # error | |
11523 | #endif | |
11524 | ||
11525 | _ACEOF | |
11526 | if ac_fn_c_try_cpp "$LINENO"; then : | |
11527 | perf_event=yes | |
11528 | else | |
11529 | perf_event=no | |
11530 | fi | |
d0ac1c44 | 11531 | rm -f conftest.err conftest.i conftest.$ac_ext |
5599c404 MM |
11532 | if test "$perf_event" != yes; then |
11533 | if test "$with_intel_pt" = yes; then | |
d0ac1c44 | 11534 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 |
5599c404 MM |
11535 | else |
11536 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
11537 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
11538 | fi | |
11539 | fi | |
11540 | ||
58bfce93 MM |
11541 | |
11542 | ||
11543 | ||
11544 | ||
11545 | ||
11546 | ||
11547 | ||
11548 | ||
11549 | use_additional=yes | |
11550 | ||
11551 | acl_save_prefix="$prefix" | |
11552 | prefix="$acl_final_prefix" | |
11553 | acl_save_exec_prefix="$exec_prefix" | |
11554 | exec_prefix="$acl_final_exec_prefix" | |
11555 | ||
11556 | eval additional_includedir=\"$includedir\" | |
11557 | eval additional_libdir=\"$libdir\" | |
11558 | ||
11559 | exec_prefix="$acl_save_exec_prefix" | |
11560 | prefix="$acl_save_prefix" | |
11561 | ||
11562 | ||
11563 | # Check whether --with-libipt-prefix was given. | |
11564 | if test "${with_libipt_prefix+set}" = set; then : | |
11565 | withval=$with_libipt_prefix; | |
11566 | if test "X$withval" = "Xno"; then | |
11567 | use_additional=no | |
11568 | else | |
11569 | if test "X$withval" = "X"; then | |
11570 | ||
11571 | acl_save_prefix="$prefix" | |
11572 | prefix="$acl_final_prefix" | |
11573 | acl_save_exec_prefix="$exec_prefix" | |
11574 | exec_prefix="$acl_final_exec_prefix" | |
11575 | ||
11576 | eval additional_includedir=\"$includedir\" | |
11577 | eval additional_libdir=\"$libdir\" | |
11578 | ||
11579 | exec_prefix="$acl_save_exec_prefix" | |
11580 | prefix="$acl_save_prefix" | |
11581 | ||
11582 | else | |
11583 | additional_includedir="$withval/include" | |
11584 | additional_libdir="$withval/lib" | |
11585 | fi | |
11586 | fi | |
11587 | ||
11588 | fi | |
11589 | ||
11590 | LIBIPT= | |
11591 | LTLIBIPT= | |
11592 | INCIPT= | |
11593 | rpathdirs= | |
11594 | ltrpathdirs= | |
11595 | names_already_handled= | |
11596 | names_next_round='ipt ' | |
11597 | while test -n "$names_next_round"; do | |
11598 | names_this_round="$names_next_round" | |
11599 | names_next_round= | |
11600 | for name in $names_this_round; do | |
11601 | already_handled= | |
11602 | for n in $names_already_handled; do | |
11603 | if test "$n" = "$name"; then | |
11604 | already_handled=yes | |
11605 | break | |
11606 | fi | |
11607 | done | |
11608 | if test -z "$already_handled"; then | |
11609 | names_already_handled="$names_already_handled $name" | |
11610 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
11611 | eval value=\"\$HAVE_LIB$uppername\" | |
11612 | if test -n "$value"; then | |
11613 | if test "$value" = yes; then | |
11614 | eval value=\"\$LIB$uppername\" | |
11615 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
11616 | eval value=\"\$LTLIB$uppername\" | |
11617 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
11618 | else | |
11619 | : | |
11620 | fi | |
11621 | else | |
11622 | found_dir= | |
11623 | found_la= | |
11624 | found_so= | |
11625 | found_a= | |
11626 | if test $use_additional = yes; then | |
11627 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
11628 | found_dir="$additional_libdir" | |
11629 | found_so="$additional_libdir/lib$name.$shlibext" | |
11630 | if test -f "$additional_libdir/lib$name.la"; then | |
11631 | found_la="$additional_libdir/lib$name.la" | |
11632 | fi | |
11633 | else | |
11634 | if test -f "$additional_libdir/lib$name.$libext"; then | |
11635 | found_dir="$additional_libdir" | |
11636 | found_a="$additional_libdir/lib$name.$libext" | |
11637 | if test -f "$additional_libdir/lib$name.la"; then | |
11638 | found_la="$additional_libdir/lib$name.la" | |
11639 | fi | |
11640 | fi | |
11641 | fi | |
11642 | fi | |
11643 | if test "X$found_dir" = "X"; then | |
11644 | for x in $LDFLAGS $LTLIBIPT; do | |
11645 | ||
11646 | acl_save_prefix="$prefix" | |
11647 | prefix="$acl_final_prefix" | |
11648 | acl_save_exec_prefix="$exec_prefix" | |
11649 | exec_prefix="$acl_final_exec_prefix" | |
11650 | eval x=\"$x\" | |
11651 | exec_prefix="$acl_save_exec_prefix" | |
11652 | prefix="$acl_save_prefix" | |
11653 | ||
11654 | case "$x" in | |
11655 | -L*) | |
11656 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
11657 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
11658 | found_dir="$dir" | |
11659 | found_so="$dir/lib$name.$shlibext" | |
11660 | if test -f "$dir/lib$name.la"; then | |
11661 | found_la="$dir/lib$name.la" | |
11662 | fi | |
11663 | else | |
11664 | if test -f "$dir/lib$name.$libext"; then | |
11665 | found_dir="$dir" | |
11666 | found_a="$dir/lib$name.$libext" | |
11667 | if test -f "$dir/lib$name.la"; then | |
11668 | found_la="$dir/lib$name.la" | |
11669 | fi | |
11670 | fi | |
11671 | fi | |
11672 | ;; | |
11673 | esac | |
11674 | if test "X$found_dir" != "X"; then | |
11675 | break | |
11676 | fi | |
11677 | done | |
11678 | fi | |
11679 | if test "X$found_dir" != "X"; then | |
11680 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
11681 | if test "X$found_so" != "X"; then | |
11682 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
11683 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11684 | else | |
11685 | haveit= | |
11686 | for x in $ltrpathdirs; do | |
11687 | if test "X$x" = "X$found_dir"; then | |
11688 | haveit=yes | |
11689 | break | |
11690 | fi | |
11691 | done | |
11692 | if test -z "$haveit"; then | |
11693 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11694 | fi | |
11695 | if test "$hardcode_direct" = yes; then | |
11696 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11697 | else | |
11698 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11699 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11700 | haveit= | |
11701 | for x in $rpathdirs; do | |
11702 | if test "X$x" = "X$found_dir"; then | |
11703 | haveit=yes | |
11704 | break | |
11705 | fi | |
11706 | done | |
11707 | if test -z "$haveit"; then | |
11708 | rpathdirs="$rpathdirs $found_dir" | |
11709 | fi | |
11710 | else | |
11711 | haveit= | |
11712 | for x in $LDFLAGS $LIBIPT; do | |
11713 | ||
11714 | acl_save_prefix="$prefix" | |
11715 | prefix="$acl_final_prefix" | |
11716 | acl_save_exec_prefix="$exec_prefix" | |
11717 | exec_prefix="$acl_final_exec_prefix" | |
11718 | eval x=\"$x\" | |
11719 | exec_prefix="$acl_save_exec_prefix" | |
11720 | prefix="$acl_save_prefix" | |
11721 | ||
11722 | if test "X$x" = "X-L$found_dir"; then | |
11723 | haveit=yes | |
11724 | break | |
11725 | fi | |
11726 | done | |
11727 | if test -z "$haveit"; then | |
11728 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
11729 | fi | |
11730 | if test "$hardcode_minus_L" != no; then | |
11731 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
11732 | else | |
11733 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11734 | fi | |
11735 | fi | |
11736 | fi | |
11737 | fi | |
11738 | else | |
11739 | if test "X$found_a" != "X"; then | |
11740 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
11741 | else | |
11742 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
11743 | fi | |
11744 | fi | |
11745 | additional_includedir= | |
11746 | case "$found_dir" in | |
11747 | */lib | */lib/) | |
11748 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11749 | additional_includedir="$basedir/include" | |
11750 | ;; | |
11751 | esac | |
11752 | if test "X$additional_includedir" != "X"; then | |
11753 | if test "X$additional_includedir" != "X/usr/include"; then | |
11754 | haveit= | |
11755 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11756 | if test -n "$GCC"; then | |
11757 | case $host_os in | |
11758 | linux*) haveit=yes;; | |
11759 | esac | |
11760 | fi | |
11761 | fi | |
11762 | if test -z "$haveit"; then | |
11763 | for x in $CPPFLAGS $INCIPT; do | |
11764 | ||
11765 | acl_save_prefix="$prefix" | |
11766 | prefix="$acl_final_prefix" | |
11767 | acl_save_exec_prefix="$exec_prefix" | |
11768 | exec_prefix="$acl_final_exec_prefix" | |
11769 | eval x=\"$x\" | |
11770 | exec_prefix="$acl_save_exec_prefix" | |
11771 | prefix="$acl_save_prefix" | |
11772 | ||
11773 | if test "X$x" = "X-I$additional_includedir"; then | |
11774 | haveit=yes | |
11775 | break | |
11776 | fi | |
11777 | done | |
11778 | if test -z "$haveit"; then | |
11779 | if test -d "$additional_includedir"; then | |
11780 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
11781 | fi | |
11782 | fi | |
11783 | fi | |
11784 | fi | |
11785 | fi | |
11786 | if test -n "$found_la"; then | |
11787 | save_libdir="$libdir" | |
11788 | case "$found_la" in | |
11789 | */* | *\\*) . "$found_la" ;; | |
11790 | *) . "./$found_la" ;; | |
11791 | esac | |
11792 | libdir="$save_libdir" | |
11793 | for dep in $dependency_libs; do | |
11794 | case "$dep" in | |
11795 | -L*) | |
11796 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11797 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11798 | haveit= | |
11799 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11800 | if test -n "$GCC"; then | |
11801 | case $host_os in | |
11802 | linux*) haveit=yes;; | |
11803 | esac | |
11804 | fi | |
11805 | fi | |
11806 | if test -z "$haveit"; then | |
11807 | haveit= | |
11808 | for x in $LDFLAGS $LIBIPT; do | |
11809 | ||
11810 | acl_save_prefix="$prefix" | |
11811 | prefix="$acl_final_prefix" | |
11812 | acl_save_exec_prefix="$exec_prefix" | |
11813 | exec_prefix="$acl_final_exec_prefix" | |
11814 | eval x=\"$x\" | |
11815 | exec_prefix="$acl_save_exec_prefix" | |
11816 | prefix="$acl_save_prefix" | |
11817 | ||
11818 | if test "X$x" = "X-L$additional_libdir"; then | |
11819 | haveit=yes | |
11820 | break | |
11821 | fi | |
11822 | done | |
11823 | if test -z "$haveit"; then | |
11824 | if test -d "$additional_libdir"; then | |
11825 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
11826 | fi | |
11827 | fi | |
11828 | haveit= | |
11829 | for x in $LDFLAGS $LTLIBIPT; do | |
11830 | ||
11831 | acl_save_prefix="$prefix" | |
11832 | prefix="$acl_final_prefix" | |
11833 | acl_save_exec_prefix="$exec_prefix" | |
11834 | exec_prefix="$acl_final_exec_prefix" | |
11835 | eval x=\"$x\" | |
11836 | exec_prefix="$acl_save_exec_prefix" | |
11837 | prefix="$acl_save_prefix" | |
11838 | ||
11839 | if test "X$x" = "X-L$additional_libdir"; then | |
11840 | haveit=yes | |
11841 | break | |
11842 | fi | |
11843 | done | |
11844 | if test -z "$haveit"; then | |
11845 | if test -d "$additional_libdir"; then | |
11846 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
11847 | fi | |
11848 | fi | |
11849 | fi | |
11850 | fi | |
11851 | ;; | |
11852 | -R*) | |
11853 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
11854 | if test "$enable_rpath" != no; then | |
11855 | haveit= | |
11856 | for x in $rpathdirs; do | |
11857 | if test "X$x" = "X$dir"; then | |
11858 | haveit=yes | |
11859 | break | |
11860 | fi | |
11861 | done | |
11862 | if test -z "$haveit"; then | |
11863 | rpathdirs="$rpathdirs $dir" | |
11864 | fi | |
11865 | haveit= | |
11866 | for x in $ltrpathdirs; do | |
11867 | if test "X$x" = "X$dir"; then | |
11868 | haveit=yes | |
11869 | break | |
11870 | fi | |
11871 | done | |
11872 | if test -z "$haveit"; then | |
11873 | ltrpathdirs="$ltrpathdirs $dir" | |
11874 | fi | |
11875 | fi | |
11876 | ;; | |
11877 | -l*) | |
11878 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
11879 | ;; | |
11880 | *.la) | |
11881 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
11882 | ;; | |
11883 | *) | |
11884 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
11885 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
11886 | ;; | |
11887 | esac | |
11888 | done | |
11889 | fi | |
11890 | else | |
11891 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
11892 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
11893 | fi | |
11894 | fi | |
11895 | fi | |
11896 | done | |
11897 | done | |
11898 | if test "X$rpathdirs" != "X"; then | |
11899 | if test -n "$hardcode_libdir_separator"; then | |
11900 | alldirs= | |
11901 | for found_dir in $rpathdirs; do | |
11902 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11903 | done | |
11904 | acl_save_libdir="$libdir" | |
11905 | libdir="$alldirs" | |
11906 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11907 | libdir="$acl_save_libdir" | |
11908 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11909 | else | |
11910 | for found_dir in $rpathdirs; do | |
11911 | acl_save_libdir="$libdir" | |
11912 | libdir="$found_dir" | |
11913 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11914 | libdir="$acl_save_libdir" | |
11915 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
11916 | done | |
11917 | fi | |
11918 | fi | |
11919 | if test "X$ltrpathdirs" != "X"; then | |
11920 | for found_dir in $ltrpathdirs; do | |
11921 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
11922 | done | |
11923 | fi | |
11924 | ||
11925 | ||
11926 | ac_save_CPPFLAGS="$CPPFLAGS" | |
11927 | ||
11928 | for element in $INCIPT; do | |
11929 | haveit= | |
11930 | for x in $CPPFLAGS; do | |
11931 | ||
11932 | acl_save_prefix="$prefix" | |
11933 | prefix="$acl_final_prefix" | |
11934 | acl_save_exec_prefix="$exec_prefix" | |
11935 | exec_prefix="$acl_final_exec_prefix" | |
11936 | eval x=\"$x\" | |
11937 | exec_prefix="$acl_save_exec_prefix" | |
11938 | prefix="$acl_save_prefix" | |
11939 | ||
11940 | if test "X$x" = "X$element"; then | |
11941 | haveit=yes | |
11942 | break | |
11943 | fi | |
11944 | done | |
11945 | if test -z "$haveit"; then | |
11946 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11947 | fi | |
11948 | done | |
11949 | ||
11950 | ||
11951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
11952 | $as_echo_n "checking for libipt... " >&6; } | |
d0ac1c44 | 11953 | if ${ac_cv_libipt+:} false; then : |
58bfce93 MM |
11954 | $as_echo_n "(cached) " >&6 |
11955 | else | |
11956 | ||
11957 | ac_save_LIBS="$LIBS" | |
11958 | LIBS="$LIBS $LIBIPT" | |
11959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11960 | /* end confdefs.h. */ | |
11961 | #include "intel-pt.h" | |
11962 | int | |
11963 | main () | |
11964 | { | |
11965 | pt_insn_alloc_decoder (0); | |
11966 | ; | |
11967 | return 0; | |
11968 | } | |
11969 | _ACEOF | |
11970 | if ac_fn_c_try_link "$LINENO"; then : | |
11971 | ac_cv_libipt=yes | |
11972 | else | |
11973 | ac_cv_libipt=no | |
11974 | fi | |
11975 | rm -f core conftest.err conftest.$ac_objext \ | |
11976 | conftest$ac_exeext conftest.$ac_ext | |
11977 | LIBS="$ac_save_LIBS" | |
11978 | ||
11979 | fi | |
11980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 | |
11981 | $as_echo "$ac_cv_libipt" >&6; } | |
11982 | if test "$ac_cv_libipt" = yes; then | |
11983 | HAVE_LIBIPT=yes | |
11984 | ||
11985 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h | |
11986 | ||
11987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
11988 | $as_echo_n "checking how to link with libipt... " >&6; } | |
11989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
11990 | $as_echo "$LIBIPT" >&6; } | |
11991 | else | |
11992 | HAVE_LIBIPT=no | |
11993 | CPPFLAGS="$ac_save_CPPFLAGS" | |
11994 | LIBIPT= | |
11995 | LTLIBIPT= | |
11996 | fi | |
11997 | ||
11998 | ||
11999 | ||
12000 | ||
12001 | ||
12002 | ||
12003 | if test "$HAVE_LIBIPT" != yes; then | |
12004 | if test "$with_intel_pt" = yes; then | |
d0ac1c44 | 12005 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 |
58bfce93 MM |
12006 | else |
12007 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
12008 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
12009 | fi | |
c56ccc05 MM |
12010 | else |
12011 | save_LIBS=$LIBS | |
12012 | LIBS="$LIBS $LIBIPT" | |
12013 | for ac_func in pt_insn_event | |
12014 | do : | |
12015 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
d0ac1c44 | 12016 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : |
c56ccc05 MM |
12017 | cat >>confdefs.h <<_ACEOF |
12018 | #define HAVE_PT_INSN_EVENT 1 | |
12019 | _ACEOF | |
12020 | ||
12021 | fi | |
12022 | done | |
12023 | ||
12024 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> | |
12025 | " | |
d0ac1c44 | 12026 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : |
c56ccc05 MM |
12027 | |
12028 | cat >>confdefs.h <<_ACEOF | |
12029 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
12030 | _ACEOF | |
12031 | ||
12032 | ||
12033 | fi | |
12034 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
12035 | " | |
d0ac1c44 | 12036 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : |
c56ccc05 MM |
12037 | |
12038 | cat >>confdefs.h <<_ACEOF | |
12039 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
12040 | _ACEOF | |
12041 | ||
12042 | ||
12043 | fi | |
12044 | ||
12045 | LIBS=$save_LIBS | |
58bfce93 MM |
12046 | fi |
12047 | fi | |
12048 | ||
81ecdfbb RW |
12049 | # ------------------------- # |
12050 | # Checks for header files. # | |
12051 | # ------------------------- # | |
c890192f | 12052 | |
81ecdfbb RW |
12053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12054 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 12055 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 12056 | $as_echo_n "(cached) " >&6 |
bec39cab | 12057 | else |
81ecdfbb | 12058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12059 | /* end confdefs.h. */ |
81ecdfbb RW |
12060 | #include <stdlib.h> |
12061 | #include <stdarg.h> | |
12062 | #include <string.h> | |
12063 | #include <float.h> | |
12064 | ||
a9322a30 TT |
12065 | int |
12066 | main () | |
12067 | { | |
a9322a30 TT |
12068 | |
12069 | ; | |
12070 | return 0; | |
12071 | } | |
bec39cab | 12072 | _ACEOF |
81ecdfbb RW |
12073 | if ac_fn_c_try_compile "$LINENO"; then : |
12074 | ac_cv_header_stdc=yes | |
bec39cab | 12075 | else |
81ecdfbb | 12076 | ac_cv_header_stdc=no |
a9322a30 | 12077 | fi |
81ecdfbb | 12078 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12079 | |
81ecdfbb RW |
12080 | if test $ac_cv_header_stdc = yes; then |
12081 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12082 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12083 | /* end confdefs.h. */ | |
12084 | #include <string.h> | |
bec39cab | 12085 | |
81ecdfbb RW |
12086 | _ACEOF |
12087 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12088 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 12089 | |
bec39cab | 12090 | else |
81ecdfbb RW |
12091 | ac_cv_header_stdc=no |
12092 | fi | |
12093 | rm -f conftest* | |
12094 | ||
12095 | fi | |
12096 | ||
12097 | if test $ac_cv_header_stdc = yes; then | |
12098 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12100 | /* end confdefs.h. */ | |
12101 | #include <stdlib.h> | |
12102 | ||
bec39cab | 12103 | _ACEOF |
81ecdfbb RW |
12104 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
12105 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 12106 | |
81ecdfbb RW |
12107 | else |
12108 | ac_cv_header_stdc=no | |
12109 | fi | |
12110 | rm -f conftest* | |
bec39cab | 12111 | |
bec39cab | 12112 | fi |
81ecdfbb RW |
12113 | |
12114 | if test $ac_cv_header_stdc = yes; then | |
12115 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12116 | if test "$cross_compiling" = yes; then : | |
12117 | : | |
bec39cab | 12118 | else |
81ecdfbb | 12119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12120 | /* end confdefs.h. */ |
81ecdfbb RW |
12121 | #include <ctype.h> |
12122 | #include <stdlib.h> | |
12123 | #if ((' ' & 0x0FF) == 0x020) | |
12124 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12125 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12126 | #else | |
12127 | # define ISLOWER(c) \ | |
12128 | (('a' <= (c) && (c) <= 'i') \ | |
12129 | || ('j' <= (c) && (c) <= 'r') \ | |
12130 | || ('s' <= (c) && (c) <= 'z')) | |
12131 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12132 | #endif | |
12133 | ||
12134 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
12135 | int |
12136 | main () | |
12137 | { | |
81ecdfbb RW |
12138 | int i; |
12139 | for (i = 0; i < 256; i++) | |
12140 | if (XOR (islower (i), ISLOWER (i)) | |
12141 | || toupper (i) != TOUPPER (i)) | |
12142 | return 2; | |
a9322a30 TT |
12143 | return 0; |
12144 | } | |
bec39cab | 12145 | _ACEOF |
81ecdfbb RW |
12146 | if ac_fn_c_try_run "$LINENO"; then : |
12147 | ||
bec39cab | 12148 | else |
81ecdfbb RW |
12149 | ac_cv_header_stdc=no |
12150 | fi | |
12151 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12152 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12153 | fi | |
bec39cab | 12154 | |
bec39cab | 12155 | fi |
a9322a30 | 12156 | fi |
81ecdfbb RW |
12157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
12158 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12159 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 12160 | |
81ecdfbb | 12161 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 12162 | |
81ecdfbb | 12163 | fi |
bec39cab | 12164 | |
81ecdfbb | 12165 | # elf_hp.h is for HP/UX 64-bit shared library support. |
9467110b | 12166 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
161d1bec | 12167 | thread_db.h \ |
81ecdfbb RW |
12168 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
12169 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
44122162 | 12170 | sys/reg.h sys/debugreg.h sys/select.h \ |
726e1356 | 12171 | termios.h elf_hp.h \ |
9467110b | 12172 | dlfcn.h |
81ecdfbb RW |
12173 | do : |
12174 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12175 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 12176 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 12177 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12178 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12179 | _ACEOF |
c906108c | 12180 | |
bec39cab | 12181 | fi |
81ecdfbb RW |
12182 | |
12183 | done | |
12184 | ||
81ecdfbb RW |
12185 | for ac_header in sys/user.h |
12186 | do : | |
12187 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
12188 | # include <sys/param.h> | |
a9322a30 TT |
12189 | #endif |
12190 | ||
81ecdfbb | 12191 | " |
d0ac1c44 | 12192 | if test "x$ac_cv_header_sys_user_h" = xyes; then : |
81ecdfbb RW |
12193 | cat >>confdefs.h <<_ACEOF |
12194 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 12195 | _ACEOF |
bec39cab | 12196 | |
a9322a30 | 12197 | fi |
bec39cab | 12198 | |
81ecdfbb | 12199 | done |
5ee754fc | 12200 | |
5ee754fc | 12201 | |
5007d765 | 12202 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
81ecdfbb RW |
12203 | do : |
12204 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12205 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 12206 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 12207 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12208 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12209 | _ACEOF |
5ee754fc MK |
12210 | |
12211 | fi | |
12212 | ||
81ecdfbb | 12213 | done |
bec39cab | 12214 | |
81ecdfbb RW |
12215 | for ac_header in term.h |
12216 | do : | |
12217 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
12218 | # include <curses.h> | |
12219 | #endif | |
bec39cab | 12220 | |
81ecdfbb | 12221 | " |
d0ac1c44 | 12222 | if test "x$ac_cv_header_term_h" = xyes; then : |
81ecdfbb RW |
12223 | cat >>confdefs.h <<_ACEOF |
12224 | #define HAVE_TERM_H 1 | |
a8111142 | 12225 | _ACEOF |
a8111142 | 12226 | |
a8111142 | 12227 | fi |
a8111142 | 12228 | |
81ecdfbb | 12229 | done |
a8111142 TT |
12230 | |
12231 | ||
81ecdfbb RW |
12232 | # ------------------------- # |
12233 | # Checks for declarations. # | |
12234 | # ------------------------- # | |
a9322a30 | 12235 | |
07697489 PA |
12236 | |
12237 | # Check for presence and size of long long. | |
12238 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
d0ac1c44 | 12239 | if test "x$ac_cv_type_long_long" = xyes; then : |
07697489 PA |
12240 | |
12241 | cat >>confdefs.h <<_ACEOF | |
12242 | #define HAVE_LONG_LONG 1 | |
12243 | _ACEOF | |
12244 | ||
12245 | # The cast to long int works around a bug in the HP C Compiler | |
12246 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12247 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12248 | # This bug is HP SR number 8606223364. | |
12249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12250 | $as_echo_n "checking size of long long... " >&6; } | |
d0ac1c44 | 12251 | if ${ac_cv_sizeof_long_long+:} false; then : |
07697489 PA |
12252 | $as_echo_n "(cached) " >&6 |
12253 | else | |
12254 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
12255 | ||
12256 | else | |
12257 | if test "$ac_cv_type_long_long" = yes; then | |
12258 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12259 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
12260 | as_fn_error 77 "cannot compute sizeof (long long) |
12261 | See \`config.log' for more details" "$LINENO" 5; } | |
07697489 PA |
12262 | else |
12263 | ac_cv_sizeof_long_long=0 | |
12264 | fi | |
12265 | fi | |
12266 | ||
12267 | fi | |
12268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
12269 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
12270 | ||
12271 | ||
12272 | ||
12273 | cat >>confdefs.h <<_ACEOF | |
12274 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12275 | _ACEOF | |
12276 | ||
12277 | ||
12278 | fi | |
12279 | ||
12280 | ||
d0ac1c44 SM |
12281 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
12282 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
12283 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
07697489 PA |
12284 | ac_have_decl=1 |
12285 | else | |
12286 | ac_have_decl=0 | |
12287 | fi | |
12288 | ||
12289 | cat >>confdefs.h <<_ACEOF | |
12290 | #define HAVE_DECL_BASENAME $ac_have_decl | |
12291 | _ACEOF | |
12292 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
d0ac1c44 | 12293 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
07697489 PA |
12294 | ac_have_decl=1 |
12295 | else | |
12296 | ac_have_decl=0 | |
12297 | fi | |
12298 | ||
12299 | cat >>confdefs.h <<_ACEOF | |
12300 | #define HAVE_DECL_FFS $ac_have_decl | |
12301 | _ACEOF | |
12302 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
d0ac1c44 | 12303 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
07697489 PA |
12304 | ac_have_decl=1 |
12305 | else | |
12306 | ac_have_decl=0 | |
12307 | fi | |
12308 | ||
12309 | cat >>confdefs.h <<_ACEOF | |
12310 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
12311 | _ACEOF | |
12312 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
d0ac1c44 | 12313 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
07697489 PA |
12314 | ac_have_decl=1 |
12315 | else | |
12316 | ac_have_decl=0 | |
12317 | fi | |
12318 | ||
12319 | cat >>confdefs.h <<_ACEOF | |
12320 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
12321 | _ACEOF | |
12322 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
d0ac1c44 | 12323 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
07697489 PA |
12324 | ac_have_decl=1 |
12325 | else | |
12326 | ac_have_decl=0 | |
12327 | fi | |
12328 | ||
12329 | cat >>confdefs.h <<_ACEOF | |
12330 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12331 | _ACEOF | |
12332 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 12333 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
07697489 PA |
12334 | ac_have_decl=1 |
12335 | else | |
12336 | ac_have_decl=0 | |
12337 | fi | |
12338 | ||
12339 | cat >>confdefs.h <<_ACEOF | |
12340 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12341 | _ACEOF | |
12342 | ||
12343 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
d0ac1c44 | 12344 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
07697489 PA |
12345 | ac_have_decl=1 |
12346 | else | |
12347 | ac_have_decl=0 | |
12348 | fi | |
12349 | ||
12350 | cat >>confdefs.h <<_ACEOF | |
12351 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12352 | _ACEOF | |
12353 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
d0ac1c44 | 12354 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
07697489 PA |
12355 | ac_have_decl=1 |
12356 | else | |
12357 | ac_have_decl=0 | |
12358 | fi | |
12359 | ||
12360 | cat >>confdefs.h <<_ACEOF | |
12361 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
12362 | _ACEOF | |
12363 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
d0ac1c44 | 12364 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
07697489 PA |
12365 | ac_have_decl=1 |
12366 | else | |
12367 | ac_have_decl=0 | |
12368 | fi | |
12369 | ||
12370 | cat >>confdefs.h <<_ACEOF | |
12371 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12372 | _ACEOF | |
12373 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
d0ac1c44 | 12374 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
07697489 PA |
12375 | ac_have_decl=1 |
12376 | else | |
12377 | ac_have_decl=0 | |
12378 | fi | |
12379 | ||
12380 | cat >>confdefs.h <<_ACEOF | |
12381 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
12382 | _ACEOF | |
12383 | ||
12384 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
d0ac1c44 | 12385 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : |
07697489 PA |
12386 | ac_have_decl=1 |
12387 | else | |
12388 | ac_have_decl=0 | |
12389 | fi | |
12390 | ||
12391 | cat >>confdefs.h <<_ACEOF | |
12392 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12393 | _ACEOF | |
12394 | ||
12395 | ||
12396 | ||
81ecdfbb | 12397 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
d0ac1c44 | 12398 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
81ecdfbb RW |
12399 | ac_have_decl=1 |
12400 | else | |
12401 | ac_have_decl=0 | |
5ee754fc | 12402 | fi |
81ecdfbb RW |
12403 | |
12404 | cat >>confdefs.h <<_ACEOF | |
12405 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
a9322a30 | 12406 | _ACEOF |
5ee754fc | 12407 | |
5ee754fc | 12408 | |
81ecdfbb RW |
12409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
12410 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
d0ac1c44 | 12411 | if ${am_cv_val_LC_MESSAGES+:} false; then : |
81ecdfbb | 12412 | $as_echo_n "(cached) " >&6 |
bec39cab | 12413 | else |
81ecdfbb | 12414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12415 | /* end confdefs.h. */ |
81ecdfbb | 12416 | #include <locale.h> |
a9322a30 TT |
12417 | int |
12418 | main () | |
12419 | { | |
81ecdfbb | 12420 | return LC_MESSAGES |
a9322a30 TT |
12421 | ; |
12422 | return 0; | |
12423 | } | |
bec39cab | 12424 | _ACEOF |
81ecdfbb RW |
12425 | if ac_fn_c_try_link "$LINENO"; then : |
12426 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12427 | else |
81ecdfbb RW |
12428 | am_cv_val_LC_MESSAGES=no |
12429 | fi | |
12430 | rm -f core conftest.err conftest.$ac_objext \ | |
12431 | conftest$ac_exeext conftest.$ac_ext | |
12432 | fi | |
12433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
12434 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12435 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12436 | |
81ecdfbb RW |
12437 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
12438 | ||
12439 | fi | |
12440 | ||
12441 | ||
12442 | # ----------------------- # | |
12443 | # Checks for structures. # | |
12444 | # ----------------------- # | |
12445 | ||
12446 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
d0ac1c44 | 12447 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : |
81ecdfbb RW |
12448 | |
12449 | cat >>confdefs.h <<_ACEOF | |
12450 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 12451 | _ACEOF |
7eb368b3 | 12452 | |
81ecdfbb | 12453 | |
7eb368b3 | 12454 | fi |
81ecdfbb | 12455 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
d0ac1c44 | 12456 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : |
7eb368b3 | 12457 | |
a9322a30 TT |
12458 | cat >>confdefs.h <<_ACEOF |
12459 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
12460 | _ACEOF |
12461 | ||
a9322a30 | 12462 | |
7eb368b3 NR |
12463 | fi |
12464 | ||
7eb368b3 | 12465 | |
a9322a30 TT |
12466 | # ------------------ # |
12467 | # Checks for types. # | |
12468 | # ------------------ # | |
7eb368b3 | 12469 | |
81ecdfbb | 12470 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
12471 | #include <sys/socket.h> |
12472 | ||
81ecdfbb | 12473 | " |
d0ac1c44 | 12474 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
bec39cab | 12475 | |
a9322a30 TT |
12476 | cat >>confdefs.h <<_ACEOF |
12477 | #define HAVE_SOCKLEN_T 1 | |
12478 | _ACEOF | |
12479 | ||
12480 | ||
12481 | fi | |
12482 | ||
12483 | ||
12484 | # ------------------------------------- # | |
12485 | # Checks for compiler characteristics. # | |
12486 | # ------------------------------------- # | |
12487 | ||
81ecdfbb RW |
12488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12489 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
d0ac1c44 | 12490 | if ${ac_cv_c_const+:} false; then : |
81ecdfbb | 12491 | $as_echo_n "(cached) " >&6 |
a9322a30 | 12492 | else |
81ecdfbb | 12493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12494 | /* end confdefs.h. */ |
a9322a30 TT |
12495 | |
12496 | int | |
12497 | main () | |
12498 | { | |
d0ac1c44 | 12499 | |
a9322a30 | 12500 | #ifndef __cplusplus |
d0ac1c44 | 12501 | /* Ultrix mips cc rejects this sort of thing. */ |
a9322a30 | 12502 | typedef int charset[2]; |
d0ac1c44 | 12503 | const charset cs = { 0, 0 }; |
a9322a30 | 12504 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
12505 | char const *const *pcpcc; |
12506 | char **ppc; | |
a9322a30 TT |
12507 | /* NEC SVR4.0.2 mips cc rejects this. */ |
12508 | struct point {int x, y;}; | |
12509 | static struct point const zero = {0,0}; | |
12510 | /* AIX XL C 1.02.0.0 rejects this. | |
12511 | It does not let you subtract one const X* pointer from another in | |
12512 | an arm of an if-expression whose if-part is not a constant | |
12513 | expression */ | |
12514 | const char *g = "string"; | |
81ecdfbb | 12515 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 12516 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
12517 | ++pcpcc; |
12518 | ppc = (char**) pcpcc; | |
12519 | pcpcc = (char const *const *) ppc; | |
d0ac1c44 SM |
12520 | { /* SCO 3.2v4 cc rejects this sort of thing. */ |
12521 | char tx; | |
12522 | char *t = &tx; | |
a9322a30 TT |
12523 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
12524 | ||
12525 | *t++ = 0; | |
81ecdfbb | 12526 | if (s) return 0; |
a9322a30 TT |
12527 | } |
12528 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12529 | int x[] = {25, 17}; | |
12530 | const int *foo = &x[0]; | |
12531 | ++foo; | |
12532 | } | |
12533 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12534 | typedef const int *iptr; | |
12535 | iptr p = 0; | |
12536 | ++p; | |
12537 | } | |
d0ac1c44 | 12538 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying |
a9322a30 | 12539 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
d0ac1c44 SM |
12540 | struct s { int j; const int *ap[3]; } bx; |
12541 | struct s *b = &bx; b->j = 5; | |
a9322a30 TT |
12542 | } |
12543 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12544 | const int foo = 10; | |
81ecdfbb | 12545 | if (!foo) return 0; |
a9322a30 | 12546 | } |
81ecdfbb | 12547 | return !cs[0] && !zero.x; |
a9322a30 TT |
12548 | #endif |
12549 | ||
12550 | ; | |
12551 | return 0; | |
12552 | } | |
bec39cab | 12553 | _ACEOF |
81ecdfbb | 12554 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12555 | ac_cv_c_const=yes |
5ee754fc | 12556 | else |
81ecdfbb | 12557 | ac_cv_c_const=no |
5ee754fc | 12558 | fi |
81ecdfbb | 12559 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 12560 | fi |
81ecdfbb RW |
12561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12562 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 12563 | if test $ac_cv_c_const = no; then |
bec39cab | 12564 | |
81ecdfbb | 12565 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12566 | |
5ee754fc | 12567 | fi |
bec39cab | 12568 | |
81ecdfbb RW |
12569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
12570 | $as_echo_n "checking for inline... " >&6; } | |
d0ac1c44 | 12571 | if ${ac_cv_c_inline+:} false; then : |
81ecdfbb | 12572 | $as_echo_n "(cached) " >&6 |
bec39cab | 12573 | else |
a9322a30 TT |
12574 | ac_cv_c_inline=no |
12575 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 12576 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12577 | /* end confdefs.h. */ |
a9322a30 TT |
12578 | #ifndef __cplusplus |
12579 | typedef int foo_t; | |
12580 | static $ac_kw foo_t static_foo () {return 0; } | |
12581 | $ac_kw foo_t foo () {return 0; } | |
12582 | #endif | |
12583 | ||
bec39cab | 12584 | _ACEOF |
81ecdfbb RW |
12585 | if ac_fn_c_try_compile "$LINENO"; then : |
12586 | ac_cv_c_inline=$ac_kw | |
bec39cab | 12587 | fi |
81ecdfbb RW |
12588 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12589 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 12590 | done |
bec39cab | 12591 | |
5ee754fc | 12592 | fi |
81ecdfbb RW |
12593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
12594 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 12595 | |
a9322a30 TT |
12596 | case $ac_cv_c_inline in |
12597 | inline | yes) ;; | |
12598 | *) | |
12599 | case $ac_cv_c_inline in | |
12600 | no) ac_val=;; | |
12601 | *) ac_val=$ac_cv_c_inline;; | |
12602 | esac | |
12603 | cat >>confdefs.h <<_ACEOF | |
12604 | #ifndef __cplusplus | |
12605 | #define inline $ac_val | |
12606 | #endif | |
12607 | _ACEOF | |
bec39cab AC |
12608 | ;; |
12609 | esac | |
bec39cab | 12610 | |
81ecdfbb RW |
12611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12612 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
d0ac1c44 | 12613 | if ${ac_cv_c_bigendian+:} false; then : |
81ecdfbb | 12614 | $as_echo_n "(cached) " >&6 |
bec39cab | 12615 | else |
81ecdfbb RW |
12616 | ac_cv_c_bigendian=unknown |
12617 | # See if we're dealing with a universal compiler. | |
12618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12619 | /* end confdefs.h. */ | |
12620 | #ifndef __APPLE_CC__ | |
12621 | not a universal capable compiler | |
12622 | #endif | |
12623 | typedef int dummy; | |
12624 | ||
12625 | _ACEOF | |
12626 | if ac_fn_c_try_compile "$LINENO"; then : | |
12627 | ||
12628 | # Check for potential -arch flags. It is not universal unless | |
12629 | # there are at least two -arch flags with different values. | |
12630 | ac_arch= | |
12631 | ac_prev= | |
12632 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12633 | if test -n "$ac_prev"; then | |
12634 | case $ac_word in | |
12635 | i?86 | x86_64 | ppc | ppc64) | |
12636 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12637 | ac_arch=$ac_word | |
12638 | else | |
12639 | ac_cv_c_bigendian=universal | |
12640 | break | |
12641 | fi | |
12642 | ;; | |
12643 | esac | |
12644 | ac_prev= | |
12645 | elif test "x$ac_word" = "x-arch"; then | |
12646 | ac_prev=arch | |
12647 | fi | |
12648 | done | |
12649 | fi | |
12650 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12651 | if test $ac_cv_c_bigendian = unknown; then | |
12652 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12653 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12654 | /* end confdefs.h. */ |
a9322a30 | 12655 | #include <sys/types.h> |
81ecdfbb | 12656 | #include <sys/param.h> |
a9322a30 TT |
12657 | |
12658 | int | |
12659 | main () | |
12660 | { | |
81ecdfbb RW |
12661 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
12662 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12663 | && LITTLE_ENDIAN) | |
12664 | bogus endian macros | |
12665 | #endif | |
a9322a30 TT |
12666 | |
12667 | ; | |
12668 | return 0; | |
12669 | } | |
bec39cab | 12670 | _ACEOF |
81ecdfbb | 12671 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12672 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 12673 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12674 | /* end confdefs.h. */ |
a9322a30 | 12675 | #include <sys/types.h> |
81ecdfbb | 12676 | #include <sys/param.h> |
a9322a30 TT |
12677 | |
12678 | int | |
12679 | main () | |
12680 | { | |
12681 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
12682 | not big endian |
12683 | #endif | |
a9322a30 TT |
12684 | |
12685 | ; | |
12686 | return 0; | |
12687 | } | |
bec39cab | 12688 | _ACEOF |
81ecdfbb | 12689 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12690 | ac_cv_c_bigendian=yes |
5ee754fc | 12691 | else |
81ecdfbb | 12692 | ac_cv_c_bigendian=no |
5ee754fc | 12693 | fi |
81ecdfbb RW |
12694 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12695 | fi | |
12696 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12697 | fi | |
12698 | if test $ac_cv_c_bigendian = unknown; then | |
12699 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12701 | /* end confdefs.h. */ | |
12702 | #include <limits.h> | |
bec39cab | 12703 | |
81ecdfbb RW |
12704 | int |
12705 | main () | |
12706 | { | |
12707 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12708 | bogus endian macros | |
12709 | #endif | |
12710 | ||
12711 | ; | |
12712 | return 0; | |
12713 | } | |
7eb368b3 | 12714 | _ACEOF |
81ecdfbb RW |
12715 | if ac_fn_c_try_compile "$LINENO"; then : |
12716 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 12718 | /* end confdefs.h. */ |
81ecdfbb RW |
12719 | #include <limits.h> |
12720 | ||
7eb368b3 NR |
12721 | int |
12722 | main () | |
12723 | { | |
81ecdfbb RW |
12724 | #ifndef _BIG_ENDIAN |
12725 | not big endian | |
12726 | #endif | |
12727 | ||
7eb368b3 NR |
12728 | ; |
12729 | return 0; | |
12730 | } | |
12731 | _ACEOF | |
81ecdfbb | 12732 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 12733 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
12734 | else |
12735 | ac_cv_c_bigendian=no | |
a9322a30 | 12736 | fi |
81ecdfbb | 12737 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 12738 | fi |
81ecdfbb RW |
12739 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12740 | fi | |
12741 | if test $ac_cv_c_bigendian = unknown; then | |
12742 | # Compile a test program. | |
12743 | if test "$cross_compiling" = yes; then : | |
12744 | # Try to guess by grepping values from an object file. | |
12745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12746 | /* end confdefs.h. */ | |
12747 | short int ascii_mm[] = | |
12748 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12749 | short int ascii_ii[] = | |
12750 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12751 | int use_ascii (int i) { | |
12752 | return ascii_mm[i] + ascii_ii[i]; | |
12753 | } | |
12754 | short int ebcdic_ii[] = | |
12755 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12756 | short int ebcdic_mm[] = | |
12757 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12758 | int use_ebcdic (int i) { | |
12759 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12760 | } | |
12761 | extern int foo; | |
7eb368b3 | 12762 | |
81ecdfbb RW |
12763 | int |
12764 | main () | |
12765 | { | |
12766 | return use_ascii (foo) == use_ebcdic (foo); | |
12767 | ; | |
12768 | return 0; | |
12769 | } | |
12770 | _ACEOF | |
12771 | if ac_fn_c_try_compile "$LINENO"; then : | |
12772 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12773 | ac_cv_c_bigendian=yes | |
12774 | fi | |
12775 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12776 | if test "$ac_cv_c_bigendian" = unknown; then | |
12777 | ac_cv_c_bigendian=no | |
12778 | else | |
12779 | # finding both strings is unlikely to happen, but who knows? | |
12780 | ac_cv_c_bigendian=unknown | |
12781 | fi | |
12782 | fi | |
7eb368b3 | 12783 | fi |
81ecdfbb | 12784 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12785 | else |
81ecdfbb | 12786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12787 | /* end confdefs.h. */ |
81ecdfbb | 12788 | $ac_includes_default |
d3ea6809 MM |
12789 | int |
12790 | main () | |
12791 | { | |
81ecdfbb RW |
12792 | |
12793 | /* Are we little or big endian? From Harbison&Steele. */ | |
12794 | union | |
12795 | { | |
12796 | long int l; | |
12797 | char c[sizeof (long int)]; | |
12798 | } u; | |
12799 | u.l = 1; | |
12800 | return u.c[sizeof (long int) - 1] == 1; | |
12801 | ||
12802 | ; | |
12803 | return 0; | |
d3ea6809 MM |
12804 | } |
12805 | _ACEOF | |
81ecdfbb | 12806 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12807 | ac_cv_c_bigendian=no |
d3ea6809 | 12808 | else |
81ecdfbb | 12809 | ac_cv_c_bigendian=yes |
d3ea6809 | 12810 | fi |
81ecdfbb RW |
12811 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12812 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12813 | fi |
a9322a30 | 12814 | |
81ecdfbb RW |
12815 | fi |
12816 | fi | |
12817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
12818 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12819 | case $ac_cv_c_bigendian in #( | |
12820 | yes) | |
12821 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12822 | ;; #( | |
12823 | no) | |
12824 | ;; #( | |
12825 | universal) | |
12826 | ||
12827 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
12828 | ||
12829 | ;; #( | |
12830 | *) | |
d0ac1c44 | 12831 | as_fn_error $? "unknown endianness |
81ecdfbb RW |
12832 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
12833 | esac | |
d3ea6809 MM |
12834 | |
12835 | ||
a9322a30 TT |
12836 | # ------------------------------ # |
12837 | # Checks for library functions. # | |
12838 | # ------------------------------ # | |
d3ea6809 | 12839 | |
d0ac1c44 SM |
12840 | |
12841 | ||
12842 | ||
12843 | for ac_header in $ac_header_list | |
81ecdfbb RW |
12844 | do : |
12845 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
d0ac1c44 SM |
12846 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default |
12847 | " | |
12848 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
bec39cab | 12849 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12850 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12851 | _ACEOF |
b757528f | 12852 | |
b757528f | 12853 | fi |
bec39cab | 12854 | |
a9322a30 | 12855 | done |
a3828db0 | 12856 | |
d0ac1c44 SM |
12857 | |
12858 | ||
12859 | ||
12860 | ||
12861 | ||
12862 | ||
12863 | ||
a9322a30 | 12864 | for ac_func in getpagesize |
81ecdfbb RW |
12865 | do : |
12866 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d0ac1c44 | 12867 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
bec39cab | 12868 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12869 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12870 | _ACEOF |
bcb3dc3d | 12871 | |
bcb3dc3d MK |
12872 | fi |
12873 | done | |
12874 | ||
81ecdfbb RW |
12875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12876 | $as_echo_n "checking for working mmap... " >&6; } | |
d0ac1c44 | 12877 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
81ecdfbb | 12878 | $as_echo_n "(cached) " >&6 |
a9322a30 | 12879 | else |
81ecdfbb | 12880 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12881 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12882 | else |
81ecdfbb | 12883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12884 | /* end confdefs.h. */ |
a9322a30 TT |
12885 | $ac_includes_default |
12886 | /* malloc might have been renamed as rpl_malloc. */ | |
12887 | #undef malloc | |
bec39cab | 12888 | |
a9322a30 TT |
12889 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12890 | Here is a matrix of mmap possibilities: | |
12891 | mmap private not fixed | |
12892 | mmap private fixed at somewhere currently unmapped | |
12893 | mmap private fixed at somewhere already mapped | |
12894 | mmap shared not fixed | |
12895 | mmap shared fixed at somewhere currently unmapped | |
12896 | mmap shared fixed at somewhere already mapped | |
12897 | For private mappings, we should verify that changes cannot be read() | |
12898 | back from the file, nor mmap's back from the file at a different | |
12899 | address. (There have been systems where private was not correctly | |
12900 | implemented like the infamous i386 svr4.0, and systems where the | |
12901 | VM page cache was not coherent with the file system buffer cache | |
12902 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12903 | For shared mappings, we should conversely verify that changes get | |
12904 | propagated back to all the places they're supposed to be. | |
bec39cab | 12905 | |
a9322a30 TT |
12906 | Grep wants private fixed already mapped. |
12907 | The main things grep needs to know about mmap are: | |
12908 | * does it exist and is it safe to write into the mmap'd area | |
12909 | * how to use it (BSD variants) */ | |
8b9cf735 | 12910 | |
a9322a30 TT |
12911 | #include <fcntl.h> |
12912 | #include <sys/mman.h> | |
8b9cf735 | 12913 | |
81ecdfbb | 12914 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12915 | char *malloc (); |
a3828db0 MK |
12916 | #endif |
12917 | ||
a9322a30 | 12918 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12919 | #ifndef HAVE_GETPAGESIZE |
a9322a30 TT |
12920 | # ifdef _SC_PAGESIZE |
12921 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12922 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12923 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12924 | # include <sys/param.h> |
12925 | # ifdef EXEC_PAGESIZE | |
12926 | # define getpagesize() EXEC_PAGESIZE | |
12927 | # else /* no EXEC_PAGESIZE */ | |
12928 | # ifdef NBPG | |
12929 | # define getpagesize() NBPG * CLSIZE | |
12930 | # ifndef CLSIZE | |
12931 | # define CLSIZE 1 | |
12932 | # endif /* no CLSIZE */ | |
12933 | # else /* no NBPG */ | |
12934 | # ifdef NBPC | |
12935 | # define getpagesize() NBPC | |
12936 | # else /* no NBPC */ | |
12937 | # ifdef PAGESIZE | |
12938 | # define getpagesize() PAGESIZE | |
12939 | # endif /* PAGESIZE */ | |
12940 | # endif /* no NBPC */ | |
12941 | # endif /* no NBPG */ | |
12942 | # endif /* no EXEC_PAGESIZE */ | |
12943 | # else /* no HAVE_SYS_PARAM_H */ | |
12944 | # define getpagesize() 8192 /* punt totally */ | |
12945 | # endif /* no HAVE_SYS_PARAM_H */ | |
12946 | # endif /* no _SC_PAGESIZE */ | |
12947 | ||
12948 | #endif /* no HAVE_GETPAGESIZE */ | |
12949 | ||
bec39cab AC |
12950 | int |
12951 | main () | |
12952 | { | |
a9322a30 | 12953 | char *data, *data2, *data3; |
d0ac1c44 | 12954 | const char *cdata2; |
a9322a30 | 12955 | int i, pagesize; |
d0ac1c44 | 12956 | int fd, fd2; |
a9322a30 TT |
12957 | |
12958 | pagesize = getpagesize (); | |
12959 | ||
12960 | /* First, make a file with some known garbage in it. */ | |
12961 | data = (char *) malloc (pagesize); | |
12962 | if (!data) | |
81ecdfbb | 12963 | return 1; |
a9322a30 TT |
12964 | for (i = 0; i < pagesize; ++i) |
12965 | *(data + i) = rand (); | |
12966 | umask (0); | |
12967 | fd = creat ("conftest.mmap", 0600); | |
12968 | if (fd < 0) | |
d0ac1c44 | 12969 | return 2; |
a9322a30 | 12970 | if (write (fd, data, pagesize) != pagesize) |
d0ac1c44 | 12971 | return 3; |
a9322a30 TT |
12972 | close (fd); |
12973 | ||
d0ac1c44 SM |
12974 | /* Next, check that the tail of a page is zero-filled. File must have |
12975 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
12976 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
12977 | if (fd2 < 0) | |
12978 | return 4; | |
12979 | cdata2 = ""; | |
12980 | if (write (fd2, cdata2, 1) != 1) | |
12981 | return 5; | |
12982 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
12983 | if (data2 == MAP_FAILED) | |
12984 | return 6; | |
12985 | for (i = 0; i < pagesize; ++i) | |
12986 | if (*(data2 + i)) | |
12987 | return 7; | |
12988 | close (fd2); | |
12989 | if (munmap (data2, pagesize)) | |
12990 | return 8; | |
12991 | ||
a9322a30 TT |
12992 | /* Next, try to mmap the file at a fixed address which already has |
12993 | something else allocated at it. If we can, also make sure that | |
12994 | we see the same garbage. */ | |
12995 | fd = open ("conftest.mmap", O_RDWR); | |
12996 | if (fd < 0) | |
d0ac1c44 | 12997 | return 9; |
a9322a30 TT |
12998 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12999 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
d0ac1c44 | 13000 | return 10; |
a9322a30 TT |
13001 | for (i = 0; i < pagesize; ++i) |
13002 | if (*(data + i) != *(data2 + i)) | |
d0ac1c44 | 13003 | return 11; |
a9322a30 TT |
13004 | |
13005 | /* Finally, make sure that changes to the mapped area do not | |
13006 | percolate back to the file as seen by read(). (This is a bug on | |
13007 | some variants of i386 svr4.0.) */ | |
13008 | for (i = 0; i < pagesize; ++i) | |
13009 | *(data2 + i) = *(data2 + i) + 1; | |
13010 | data3 = (char *) malloc (pagesize); | |
13011 | if (!data3) | |
d0ac1c44 | 13012 | return 12; |
a9322a30 | 13013 | if (read (fd, data3, pagesize) != pagesize) |
d0ac1c44 | 13014 | return 13; |
a9322a30 TT |
13015 | for (i = 0; i < pagesize; ++i) |
13016 | if (*(data + i) != *(data3 + i)) | |
d0ac1c44 | 13017 | return 14; |
a9322a30 | 13018 | close (fd); |
81ecdfbb | 13019 | return 0; |
bec39cab AC |
13020 | } |
13021 | _ACEOF | |
81ecdfbb | 13022 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13023 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 13024 | else |
81ecdfbb | 13025 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 13026 | fi |
81ecdfbb RW |
13027 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13028 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 13029 | fi |
81ecdfbb | 13030 | |
a9322a30 | 13031 | fi |
81ecdfbb RW |
13032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
13033 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
13034 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
13035 | ||
81ecdfbb | 13036 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 13037 | |
086ec9eb | 13038 | fi |
d0ac1c44 | 13039 | rm -f conftest.mmap conftest.txt |
a3828db0 | 13040 | |
81ecdfbb | 13041 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
d0ac1c44 | 13042 | if test "x$ac_cv_type_pid_t" = xyes; then : |
bec39cab | 13043 | |
a9322a30 TT |
13044 | else |
13045 | ||
13046 | cat >>confdefs.h <<_ACEOF | |
13047 | #define pid_t int | |
bec39cab | 13048 | _ACEOF |
086ec9eb MK |
13049 | |
13050 | fi | |
13051 | ||
81ecdfbb RW |
13052 | for ac_header in vfork.h |
13053 | do : | |
13054 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 13055 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
a3828db0 | 13056 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13057 | #define HAVE_VFORK_H 1 |
bec39cab | 13058 | _ACEOF |
c906108c SS |
13059 | |
13060 | fi | |
a9322a30 | 13061 | |
a3828db0 | 13062 | done |
c906108c | 13063 | |
a9322a30 | 13064 | for ac_func in fork vfork |
81ecdfbb RW |
13065 | do : |
13066 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13067 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13068 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
a3828db0 | 13069 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13070 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 13071 | _ACEOF |
b83266a0 | 13072 | |
97bf5e38 | 13073 | fi |
a3828db0 | 13074 | done |
b83266a0 | 13075 | |
a9322a30 | 13076 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
13077 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
13078 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 13079 | if ${ac_cv_func_fork_works+:} false; then : |
81ecdfbb | 13080 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13081 | else |
81ecdfbb | 13082 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13083 | ac_cv_func_fork_works=cross |
13084 | else | |
81ecdfbb RW |
13085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13086 | /* end confdefs.h. */ | |
13087 | $ac_includes_default | |
13088 | int | |
13089 | main () | |
13090 | { | |
13091 | ||
13092 | /* By Ruediger Kuhlmann. */ | |
13093 | return fork () < 0; | |
13094 | ||
13095 | ; | |
13096 | return 0; | |
13097 | } | |
a9322a30 | 13098 | _ACEOF |
81ecdfbb | 13099 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13100 | ac_cv_func_fork_works=yes |
13101 | else | |
81ecdfbb | 13102 | ac_cv_func_fork_works=no |
a9322a30 | 13103 | fi |
81ecdfbb RW |
13104 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13105 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13106 | fi |
81ecdfbb | 13107 | |
a9322a30 | 13108 | fi |
81ecdfbb RW |
13109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13110 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13111 | |
13112 | else | |
13113 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13114 | fi | |
13115 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13116 | case $host in | |
13117 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13118 | # Override, as these systems have only a dummy fork() stub | |
13119 | ac_cv_func_fork_works=no | |
13120 | ;; | |
13121 | *) | |
13122 | ac_cv_func_fork_works=yes | |
13123 | ;; | |
13124 | esac | |
81ecdfbb RW |
13125 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13126 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13127 | fi |
13128 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13129 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13131 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 13132 | if ${ac_cv_func_vfork_works+:} false; then : |
81ecdfbb | 13133 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13134 | else |
81ecdfbb | 13135 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13136 | ac_cv_func_vfork_works=cross |
13137 | else | |
81ecdfbb | 13138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13139 | /* end confdefs.h. */ |
13140 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13141 | $ac_includes_default |
a9322a30 | 13142 | #include <sys/wait.h> |
81ecdfbb | 13143 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13144 | # include <vfork.h> |
13145 | #endif | |
13146 | /* On some sparc systems, changes by the child to local and incoming | |
13147 | argument registers are propagated back to the parent. The compiler | |
13148 | is told about this with #include <vfork.h>, but some compilers | |
13149 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13150 | static variable whose address is put into a register that is | |
13151 | clobbered by the vfork. */ | |
13152 | static void | |
13153 | #ifdef __cplusplus | |
13154 | sparc_address_test (int arg) | |
13155 | # else | |
13156 | sparc_address_test (arg) int arg; | |
13157 | #endif | |
13158 | { | |
13159 | static pid_t child; | |
13160 | if (!child) { | |
13161 | child = vfork (); | |
13162 | if (child < 0) { | |
13163 | perror ("vfork"); | |
13164 | _exit(2); | |
13165 | } | |
13166 | if (!child) { | |
13167 | arg = getpid(); | |
13168 | write(-1, "", 0); | |
13169 | _exit (arg); | |
13170 | } | |
13171 | } | |
13172 | } | |
13173 | ||
13174 | int | |
13175 | main () | |
13176 | { | |
13177 | pid_t parent = getpid (); | |
13178 | pid_t child; | |
13179 | ||
13180 | sparc_address_test (0); | |
13181 | ||
13182 | child = vfork (); | |
13183 | ||
13184 | if (child == 0) { | |
13185 | /* Here is another test for sparc vfork register problems. This | |
13186 | test uses lots of local variables, at least as many local | |
13187 | variables as main has allocated so far including compiler | |
13188 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13189 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13190 | reuse the register of parent for one of the local variables, | |
13191 | since it will think that parent can't possibly be used any more | |
13192 | in this routine. Assigning to the local variable will thus | |
13193 | munge parent in the parent process. */ | |
13194 | pid_t | |
13195 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13196 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13197 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13198 | use the same hardware register for all 8 local variables. */ | |
13199 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13200 | || p != p5 || p != p6 || p != p7) | |
13201 | _exit(1); | |
13202 | ||
13203 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13204 | from child file descriptors. If the child closes a descriptor | |
13205 | before it execs or exits, this munges the parent's descriptor | |
13206 | as well. Test for this by closing stdout in the child. */ | |
13207 | _exit(close(fileno(stdout)) != 0); | |
13208 | } else { | |
13209 | int status; | |
13210 | struct stat st; | |
13211 | ||
13212 | while (wait(&status) != child) | |
13213 | ; | |
81ecdfbb | 13214 | return ( |
a9322a30 TT |
13215 | /* Was there some problem with vforking? */ |
13216 | child < 0 | |
13217 | ||
13218 | /* Did the child fail? (This shouldn't happen.) */ | |
13219 | || status | |
13220 | ||
13221 | /* Did the vfork/compiler bug occur? */ | |
13222 | || parent != getpid() | |
13223 | ||
13224 | /* Did the file descriptor bug occur? */ | |
13225 | || fstat(fileno(stdout), &st) != 0 | |
13226 | ); | |
13227 | } | |
13228 | } | |
13229 | _ACEOF | |
81ecdfbb | 13230 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13231 | ac_cv_func_vfork_works=yes |
13232 | else | |
81ecdfbb | 13233 | ac_cv_func_vfork_works=no |
a9322a30 | 13234 | fi |
81ecdfbb RW |
13235 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13236 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13237 | fi |
81ecdfbb | 13238 | |
a9322a30 | 13239 | fi |
81ecdfbb RW |
13240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13241 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13242 | |
13243 | fi; | |
13244 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13245 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13246 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13247 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13248 | fi |
13249 | ||
13250 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13251 | ||
81ecdfbb | 13252 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13253 | |
13254 | else | |
13255 | ||
81ecdfbb | 13256 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13257 | |
13258 | fi | |
13259 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13260 | ||
81ecdfbb | 13261 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13262 | |
13263 | fi | |
13264 | ||
cdf43629 | 13265 | for ac_func in getauxval getrusage getuid getgid \ |
bdca27a2 | 13266 | pipe poll pread pread64 pwrite resize_term \ |
e671cd59 | 13267 | sbrk getpgid setpgid setpgrp setsid \ |
9467110b | 13268 | sigaction sigprocmask sigsetmask socketpair \ |
110ed339 | 13269 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
3332aaf2 | 13270 | setrlimit getrlimit posix_madvise waitpid \ |
4b8b5e72 | 13271 | ptrace64 sigaltstack mkdtemp setns |
81ecdfbb RW |
13272 | do : |
13273 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13274 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13275 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
6c7a06a3 | 13276 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13277 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13278 | _ACEOF |
13279 | ||
13280 | fi | |
13281 | done | |
13282 | ||
13283 | ||
81ecdfbb RW |
13284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
13285 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d0ac1c44 | 13286 | if ${am_cv_langinfo_codeset+:} false; then : |
81ecdfbb | 13287 | $as_echo_n "(cached) " >&6 |
6c7a06a3 | 13288 | else |
81ecdfbb | 13289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
13290 | /* end confdefs.h. */ |
13291 | #include <langinfo.h> | |
13292 | int | |
13293 | main () | |
13294 | { | |
13295 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
13296 | ; |
13297 | return 0; | |
13298 | } | |
13299 | _ACEOF | |
81ecdfbb | 13300 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 13301 | am_cv_langinfo_codeset=yes |
a4db0f07 | 13302 | else |
81ecdfbb | 13303 | am_cv_langinfo_codeset=no |
a4db0f07 | 13304 | fi |
81ecdfbb RW |
13305 | rm -f core conftest.err conftest.$ac_objext \ |
13306 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 13307 | |
a4db0f07 | 13308 | fi |
81ecdfbb RW |
13309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
13310 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
13311 | if test $am_cv_langinfo_codeset = yes; then |
13312 | ||
81ecdfbb | 13313 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 13314 | |
6c7a06a3 | 13315 | fi |
c906108c | 13316 | |
d0ac1c44 SM |
13317 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
13318 | if test "x$ac_cv_type_size_t" = xyes; then : | |
13319 | ||
13320 | else | |
13321 | ||
13322 | cat >>confdefs.h <<_ACEOF | |
13323 | #define size_t unsigned int | |
13324 | _ACEOF | |
13325 | ||
13326 | fi | |
13327 | ||
06825bd1 | 13328 | |
3266f10b TT |
13329 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
13330 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 13331 | if ${ac_cv_header_stdc+:} false; then : |
3266f10b TT |
13332 | $as_echo_n "(cached) " >&6 |
13333 | else | |
13334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13335 | /* end confdefs.h. */ | |
13336 | #include <stdlib.h> | |
13337 | #include <stdarg.h> | |
13338 | #include <string.h> | |
13339 | #include <float.h> | |
13340 | ||
13341 | int | |
13342 | main () | |
13343 | { | |
13344 | ||
13345 | ; | |
13346 | return 0; | |
13347 | } | |
13348 | _ACEOF | |
13349 | if ac_fn_c_try_compile "$LINENO"; then : | |
13350 | ac_cv_header_stdc=yes | |
13351 | else | |
13352 | ac_cv_header_stdc=no | |
13353 | fi | |
13354 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13355 | ||
13356 | if test $ac_cv_header_stdc = yes; then | |
13357 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
13358 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13359 | /* end confdefs.h. */ | |
13360 | #include <string.h> | |
13361 | ||
13362 | _ACEOF | |
13363 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13364 | $EGREP "memchr" >/dev/null 2>&1; then : | |
13365 | ||
13366 | else | |
13367 | ac_cv_header_stdc=no | |
13368 | fi | |
13369 | rm -f conftest* | |
13370 | ||
13371 | fi | |
13372 | ||
13373 | if test $ac_cv_header_stdc = yes; then | |
13374 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
13375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13376 | /* end confdefs.h. */ | |
13377 | #include <stdlib.h> | |
13378 | ||
13379 | _ACEOF | |
13380 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13381 | $EGREP "free" >/dev/null 2>&1; then : | |
13382 | ||
13383 | else | |
13384 | ac_cv_header_stdc=no | |
13385 | fi | |
13386 | rm -f conftest* | |
13387 | ||
13388 | fi | |
13389 | ||
13390 | if test $ac_cv_header_stdc = yes; then | |
13391 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13392 | if test "$cross_compiling" = yes; then : | |
13393 | : | |
13394 | else | |
13395 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13396 | /* end confdefs.h. */ | |
13397 | #include <ctype.h> | |
13398 | #include <stdlib.h> | |
13399 | #if ((' ' & 0x0FF) == 0x020) | |
13400 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13401 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13402 | #else | |
13403 | # define ISLOWER(c) \ | |
13404 | (('a' <= (c) && (c) <= 'i') \ | |
13405 | || ('j' <= (c) && (c) <= 'r') \ | |
13406 | || ('s' <= (c) && (c) <= 'z')) | |
13407 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13408 | #endif | |
13409 | ||
13410 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
13411 | int | |
13412 | main () | |
13413 | { | |
13414 | int i; | |
13415 | for (i = 0; i < 256; i++) | |
13416 | if (XOR (islower (i), ISLOWER (i)) | |
13417 | || toupper (i) != TOUPPER (i)) | |
13418 | return 2; | |
13419 | return 0; | |
13420 | } | |
13421 | _ACEOF | |
13422 | if ac_fn_c_try_run "$LINENO"; then : | |
13423 | ||
13424 | else | |
13425 | ac_cv_header_stdc=no | |
13426 | fi | |
13427 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13428 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13429 | fi | |
13430 | ||
13431 | fi | |
13432 | fi | |
13433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
13434 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13435 | if test $ac_cv_header_stdc = yes; then | |
13436 | ||
13437 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
13438 | ||
3266f10b TT |
13439 | fi |
13440 | ||
13441 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
13442 | # for constant arguments. Useless! | |
13443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
13444 | $as_echo_n "checking for working alloca.h... " >&6; } | |
d0ac1c44 | 13445 | if ${ac_cv_working_alloca_h+:} false; then : |
3266f10b TT |
13446 | $as_echo_n "(cached) " >&6 |
13447 | else | |
13448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13449 | /* end confdefs.h. */ | |
13450 | #include <alloca.h> | |
13451 | int | |
13452 | main () | |
13453 | { | |
13454 | char *p = (char *) alloca (2 * sizeof (int)); | |
13455 | if (p) return 0; | |
13456 | ; | |
13457 | return 0; | |
13458 | } | |
13459 | _ACEOF | |
13460 | if ac_fn_c_try_link "$LINENO"; then : | |
13461 | ac_cv_working_alloca_h=yes | |
13462 | else | |
13463 | ac_cv_working_alloca_h=no | |
13464 | fi | |
13465 | rm -f core conftest.err conftest.$ac_objext \ | |
13466 | conftest$ac_exeext conftest.$ac_ext | |
13467 | fi | |
13468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
13469 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
13470 | if test $ac_cv_working_alloca_h = yes; then | |
13471 | ||
13472 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
13473 | ||
13474 | fi | |
13475 | ||
13476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
13477 | $as_echo_n "checking for alloca... " >&6; } | |
d0ac1c44 | 13478 | if ${ac_cv_func_alloca_works+:} false; then : |
3266f10b TT |
13479 | $as_echo_n "(cached) " >&6 |
13480 | else | |
13481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13482 | /* end confdefs.h. */ | |
13483 | #ifdef __GNUC__ | |
13484 | # define alloca __builtin_alloca | |
13485 | #else | |
13486 | # ifdef _MSC_VER | |
13487 | # include <malloc.h> | |
13488 | # define alloca _alloca | |
13489 | # else | |
13490 | # ifdef HAVE_ALLOCA_H | |
13491 | # include <alloca.h> | |
13492 | # else | |
13493 | # ifdef _AIX | |
13494 | #pragma alloca | |
13495 | # else | |
13496 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
d0ac1c44 | 13497 | void *alloca (size_t); |
3266f10b TT |
13498 | # endif |
13499 | # endif | |
13500 | # endif | |
13501 | # endif | |
13502 | #endif | |
13503 | ||
13504 | int | |
13505 | main () | |
13506 | { | |
13507 | char *p = (char *) alloca (1); | |
13508 | if (p) return 0; | |
13509 | ; | |
13510 | return 0; | |
13511 | } | |
13512 | _ACEOF | |
13513 | if ac_fn_c_try_link "$LINENO"; then : | |
13514 | ac_cv_func_alloca_works=yes | |
13515 | else | |
13516 | ac_cv_func_alloca_works=no | |
13517 | fi | |
13518 | rm -f core conftest.err conftest.$ac_objext \ | |
13519 | conftest$ac_exeext conftest.$ac_ext | |
13520 | fi | |
13521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
13522 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
13523 | ||
13524 | if test $ac_cv_func_alloca_works = yes; then | |
13525 | ||
13526 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
13527 | ||
13528 | else | |
13529 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13530 | # that cause trouble. Some versions do not even contain alloca or | |
13531 | # contain a buggy version. If you still want to use their alloca, | |
13532 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
13533 | ||
13534 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
13535 | ||
13536 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
13537 | ||
13538 | ||
13539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
13540 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
d0ac1c44 | 13541 | if ${ac_cv_os_cray+:} false; then : |
3266f10b TT |
13542 | $as_echo_n "(cached) " >&6 |
13543 | else | |
13544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13545 | /* end confdefs.h. */ | |
13546 | #if defined CRAY && ! defined CRAY2 | |
13547 | webecray | |
13548 | #else | |
13549 | wenotbecray | |
13550 | #endif | |
13551 | ||
13552 | _ACEOF | |
13553 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13554 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13555 | ac_cv_os_cray=yes | |
13556 | else | |
13557 | ac_cv_os_cray=no | |
13558 | fi | |
13559 | rm -f conftest* | |
13560 | ||
13561 | fi | |
13562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13563 | $as_echo "$ac_cv_os_cray" >&6; } | |
13564 | if test $ac_cv_os_cray = yes; then | |
13565 | for ac_func in _getb67 GETB67 getb67; do | |
13566 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13567 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13568 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
3266f10b TT |
13569 | |
13570 | cat >>confdefs.h <<_ACEOF | |
13571 | #define CRAY_STACKSEG_END $ac_func | |
13572 | _ACEOF | |
13573 | ||
13574 | break | |
13575 | fi | |
13576 | ||
13577 | done | |
13578 | fi | |
13579 | ||
13580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13581 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
d0ac1c44 | 13582 | if ${ac_cv_c_stack_direction+:} false; then : |
3266f10b TT |
13583 | $as_echo_n "(cached) " >&6 |
13584 | else | |
13585 | if test "$cross_compiling" = yes; then : | |
13586 | ac_cv_c_stack_direction=0 | |
13587 | else | |
13588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13589 | /* end confdefs.h. */ | |
13590 | $ac_includes_default | |
13591 | int | |
d0ac1c44 | 13592 | find_stack_direction (int *addr, int depth) |
3266f10b | 13593 | { |
d0ac1c44 SM |
13594 | int dir, dummy = 0; |
13595 | if (! addr) | |
13596 | addr = &dummy; | |
13597 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
13598 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
13599 | return dir + dummy; | |
3266f10b TT |
13600 | } |
13601 | ||
13602 | int | |
d0ac1c44 | 13603 | main (int argc, char **argv) |
3266f10b | 13604 | { |
d0ac1c44 | 13605 | return find_stack_direction (0, argc + !argv + 20) < 0; |
3266f10b TT |
13606 | } |
13607 | _ACEOF | |
13608 | if ac_fn_c_try_run "$LINENO"; then : | |
13609 | ac_cv_c_stack_direction=1 | |
13610 | else | |
13611 | ac_cv_c_stack_direction=-1 | |
13612 | fi | |
13613 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13614 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13615 | fi | |
13616 | ||
13617 | fi | |
13618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13619 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13620 | cat >>confdefs.h <<_ACEOF | |
13621 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13622 | _ACEOF | |
13623 | ||
13624 | ||
13625 | fi | |
13626 | ||
13627 | ||
13628 | ||
13629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13630 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d0ac1c44 | 13631 | if ${am_cv_langinfo_codeset+:} false; then : |
3266f10b TT |
13632 | $as_echo_n "(cached) " >&6 |
13633 | else | |
13634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13635 | /* end confdefs.h. */ | |
13636 | #include <langinfo.h> | |
13637 | int | |
13638 | main () | |
13639 | { | |
13640 | char* cs = nl_langinfo(CODESET); | |
13641 | ; | |
13642 | return 0; | |
13643 | } | |
13644 | _ACEOF | |
13645 | if ac_fn_c_try_link "$LINENO"; then : | |
13646 | am_cv_langinfo_codeset=yes | |
13647 | else | |
13648 | am_cv_langinfo_codeset=no | |
13649 | fi | |
13650 | rm -f core conftest.err conftest.$ac_objext \ | |
13651 | conftest$ac_exeext conftest.$ac_ext | |
13652 | ||
13653 | fi | |
13654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13655 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13656 | if test $am_cv_langinfo_codeset = yes; then | |
13657 | ||
13658 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13659 | ||
13660 | fi | |
13661 | ||
13662 | ||
44122162 | 13663 | for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h |
3266f10b TT |
13664 | do : |
13665 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13666 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 13667 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
3266f10b TT |
13668 | cat >>confdefs.h <<_ACEOF |
13669 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13670 | _ACEOF | |
13671 | ||
13672 | fi | |
13673 | ||
13674 | done | |
13675 | ||
13676 | ||
f348d89a | 13677 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction |
3266f10b TT |
13678 | do : |
13679 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13680 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13681 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
3266f10b TT |
13682 | cat >>confdefs.h <<_ACEOF |
13683 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13684 | _ACEOF | |
13685 | ||
13686 | fi | |
13687 | done | |
13688 | ||
13689 | ||
13690 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" | |
d0ac1c44 | 13691 | if test "x$ac_cv_have_decl_strerror" = xyes; then : |
3266f10b TT |
13692 | ac_have_decl=1 |
13693 | else | |
13694 | ac_have_decl=0 | |
13695 | fi | |
13696 | ||
13697 | cat >>confdefs.h <<_ACEOF | |
13698 | #define HAVE_DECL_STRERROR $ac_have_decl | |
13699 | _ACEOF | |
13700 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
d0ac1c44 | 13701 | if test "x$ac_cv_have_decl_strstr" = xyes; then : |
3266f10b TT |
13702 | ac_have_decl=1 |
13703 | else | |
13704 | ac_have_decl=0 | |
13705 | fi | |
13706 | ||
13707 | cat >>confdefs.h <<_ACEOF | |
13708 | #define HAVE_DECL_STRSTR $ac_have_decl | |
13709 | _ACEOF | |
13710 | ||
13711 | ||
e9bcb658 GB |
13712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
13713 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
d0ac1c44 | 13714 | if ${gdb_cv_func_sigsetjmp+:} false; then : |
e9bcb658 GB |
13715 | $as_echo_n "(cached) " >&6 |
13716 | else | |
13717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13718 | /* end confdefs.h. */ | |
13719 | ||
13720 | #include <setjmp.h> | |
13721 | ||
13722 | int | |
13723 | main () | |
13724 | { | |
13725 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
13726 | ; | |
13727 | return 0; | |
13728 | } | |
13729 | _ACEOF | |
13730 | if ac_fn_c_try_compile "$LINENO"; then : | |
13731 | gdb_cv_func_sigsetjmp=yes | |
13732 | else | |
13733 | gdb_cv_func_sigsetjmp=no | |
13734 | fi | |
13735 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13736 | fi | |
13737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
13738 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
13739 | if test $gdb_cv_func_sigsetjmp = yes; then | |
13740 | ||
13741 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h | |
13742 | ||
13743 | fi | |
13744 | ||
3266f10b | 13745 | |
54019719 PA |
13746 | # Check the return and argument types of ptrace. |
13747 | ||
13748 | ||
54019719 PA |
13749 | for ac_header in sys/ptrace.h ptrace.h |
13750 | do : | |
13751 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13752 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 13753 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
54019719 PA |
13754 | cat >>confdefs.h <<_ACEOF |
13755 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13756 | _ACEOF | |
13757 | ||
13758 | fi | |
13759 | ||
13760 | done | |
13761 | ||
13762 | ||
a3828db0 | 13763 | gdb_ptrace_headers=' |
4ff70b84 | 13764 | #include <sys/types.h> |
a3828db0 MK |
13765 | #if HAVE_SYS_PTRACE_H |
13766 | # include <sys/ptrace.h> | |
13767 | #endif | |
13768 | #if HAVE_UNISTD_H | |
13769 | # include <unistd.h> | |
13770 | #endif | |
13771 | ' | |
13772 | # There is no point in checking if we don't have a prototype. | |
9b30624b | 13773 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
81ecdfbb | 13774 | " |
d0ac1c44 | 13775 | if test "x$ac_cv_have_decl_ptrace" = xyes; then : |
81ecdfbb | 13776 | ac_have_decl=1 |
06825bd1 | 13777 | else |
81ecdfbb | 13778 | ac_have_decl=0 |
06825bd1 | 13779 | fi |
06825bd1 | 13780 | |
a3828db0 | 13781 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13782 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 13783 | _ACEOF |
81ecdfbb | 13784 | if test $ac_have_decl = 1; then : |
bec39cab | 13785 | |
a3828db0 | 13786 | else |
a3828db0 MK |
13787 | |
13788 | : ${gdb_cv_func_ptrace_ret='int'} | |
13789 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13790 | ||
06825bd1 MK |
13791 | fi |
13792 | ||
064ef605 DJ |
13793 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
13794 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
13795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
13796 | $as_echo_n "checking return type of ptrace... " >&6; } | |
d0ac1c44 | 13797 | if ${gdb_cv_func_ptrace_ret+:} false; then : |
81ecdfbb | 13798 | $as_echo_n "(cached) " >&6 |
bec39cab | 13799 | else |
81ecdfbb | 13800 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13801 | /* end confdefs.h. */ |
a3828db0 | 13802 | $gdb_ptrace_headers |
bec39cab AC |
13803 | int |
13804 | main () | |
13805 | { | |
064ef605 DJ |
13806 | extern long ptrace (enum __ptrace_request, ...); |
13807 | ; | |
13808 | return 0; | |
13809 | } | |
13810 | _ACEOF | |
9b30624b | 13811 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
13812 | gdb_cv_func_ptrace_ret='long' |
13813 | else | |
81ecdfbb | 13814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13815 | /* end confdefs.h. */ |
13816 | $gdb_ptrace_headers | |
13817 | int | |
13818 | main () | |
13819 | { | |
a3828db0 | 13820 | extern int ptrace (); |
bec39cab AC |
13821 | ; |
13822 | return 0; | |
13823 | } | |
13824 | _ACEOF | |
9b30624b | 13825 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 13826 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 13827 | else |
81ecdfbb | 13828 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 13829 | fi |
81ecdfbb | 13830 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 13831 | fi |
81ecdfbb | 13832 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 13833 | fi |
81ecdfbb RW |
13834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
13835 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 13836 | |
a3828db0 MK |
13837 | cat >>confdefs.h <<_ACEOF |
13838 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 13839 | _ACEOF |
70f9f479 | 13840 | |
a3828db0 | 13841 | # Check argument types. |
81ecdfbb RW |
13842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
13843 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
d0ac1c44 | 13844 | if ${gdb_cv_func_ptrace_args+:} false; then : |
81ecdfbb | 13845 | $as_echo_n "(cached) " >&6 |
bec39cab | 13846 | else |
a3828db0 | 13847 | |
81ecdfbb | 13848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
13849 | /* end confdefs.h. */ |
13850 | $gdb_ptrace_headers | |
13851 | int | |
13852 | main () | |
13853 | { | |
13854 | extern long ptrace (enum __ptrace_request, ...); | |
13855 | ; | |
13856 | return 0; | |
13857 | } | |
13858 | _ACEOF | |
9b30624b | 13859 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 13860 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
064ef605 | 13861 | else |
064ef605 | 13862 | |
a3828db0 MK |
13863 | for gdb_arg1 in 'int' 'long'; do |
13864 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 13865 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 13866 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 13867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13868 | /* end confdefs.h. */ |
a3828db0 | 13869 | $gdb_ptrace_headers |
bec39cab AC |
13870 | int |
13871 | main () | |
13872 | { | |
a3828db0 MK |
13873 | |
13874 | extern $gdb_cv_func_ptrace_ret | |
13875 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
13876 | ||
bec39cab AC |
13877 | ; |
13878 | return 0; | |
13879 | } | |
13880 | _ACEOF | |
9b30624b | 13881 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13882 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
13883 | break 4; | |
5c7f2947 | 13884 | fi |
81ecdfbb | 13885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 13886 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 13887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13888 | /* end confdefs.h. */ |
a3828db0 | 13889 | $gdb_ptrace_headers |
bec39cab AC |
13890 | int |
13891 | main () | |
13892 | { | |
a3828db0 MK |
13893 | |
13894 | extern $gdb_cv_func_ptrace_ret | |
13895 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
13896 | ||
bec39cab AC |
13897 | ; |
13898 | return 0; | |
13899 | } | |
13900 | _ACEOF | |
9b30624b | 13901 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
13902 | |
13903 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
13904 | break 5; | |
78434e59 | 13905 | fi |
81ecdfbb | 13906 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
13907 | done |
13908 | done | |
13909 | done | |
13910 | done | |
13911 | done | |
13912 | # Provide a safe default value. | |
13913 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
13914 | ||
064ef605 | 13915 | fi |
81ecdfbb | 13916 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 13917 | fi |
81ecdfbb RW |
13918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
13919 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
13920 | ac_save_IFS=$IFS; IFS=',' |
13921 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
13922 | IFS=$ac_save_IFS | |
13923 | shift | |
bec39cab | 13924 | |
54019719 PA |
13925 | cat >>confdefs.h <<_ACEOF |
13926 | #define PTRACE_TYPE_ARG1 $1 | |
13927 | _ACEOF | |
13928 | ||
13929 | ||
a3828db0 MK |
13930 | cat >>confdefs.h <<_ACEOF |
13931 | #define PTRACE_TYPE_ARG3 $3 | |
13932 | _ACEOF | |
13933 | ||
96d7229d LM |
13934 | |
13935 | cat >>confdefs.h <<_ACEOF | |
13936 | #define PTRACE_TYPE_ARG4 $4 | |
13937 | _ACEOF | |
13938 | ||
a3828db0 MK |
13939 | if test -n "$5"; then |
13940 | ||
13941 | cat >>confdefs.h <<_ACEOF | |
13942 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 13943 | _ACEOF |
78434e59 MK |
13944 | |
13945 | fi | |
13946 | ||
54019719 | 13947 | |
a3828db0 | 13948 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
13949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13950 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
d0ac1c44 | 13951 | if ${ac_cv_func_setpgrp_void+:} false; then : |
81ecdfbb | 13952 | $as_echo_n "(cached) " >&6 |
a3828db0 | 13953 | else |
81ecdfbb | 13954 | if test "$cross_compiling" = yes; then : |
d0ac1c44 | 13955 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 |
bec39cab | 13956 | else |
81ecdfbb | 13957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13958 | /* end confdefs.h. */ |
81ecdfbb | 13959 | $ac_includes_default |
bec39cab AC |
13960 | int |
13961 | main () | |
13962 | { | |
a3828db0 MK |
13963 | /* If this system has a BSD-style setpgrp which takes arguments, |
13964 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
13965 | exit successfully. */ | |
81ecdfbb | 13966 | return setpgrp (1,1) != -1; |
bec39cab AC |
13967 | ; |
13968 | return 0; | |
13969 | } | |
13970 | _ACEOF | |
81ecdfbb | 13971 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 13972 | ac_cv_func_setpgrp_void=no |
c906108c | 13973 | else |
81ecdfbb | 13974 | ac_cv_func_setpgrp_void=yes |
c906108c | 13975 | fi |
81ecdfbb RW |
13976 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13977 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 13978 | fi |
81ecdfbb | 13979 | |
a3828db0 | 13980 | fi |
81ecdfbb RW |
13981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
13982 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
13983 | if test $ac_cv_func_setpgrp_void = yes; then |
13984 | ||
81ecdfbb | 13985 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
13986 | |
13987 | fi | |
a3828db0 MK |
13988 | |
13989 | else | |
81ecdfbb RW |
13990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
13991 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
d0ac1c44 | 13992 | if ${ac_cv_func_setpgrp_void+:} false; then : |
81ecdfbb | 13993 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 13994 | else |
81ecdfbb | 13995 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13996 | /* end confdefs.h. */ |
a3828db0 MK |
13997 | |
13998 | #include <unistd.h> | |
13999 | ||
bec39cab AC |
14000 | int |
14001 | main () | |
14002 | { | |
a3828db0 MK |
14003 | |
14004 | if (setpgrp(1,1) == -1) | |
14005 | exit (0); | |
14006 | else | |
14007 | exit (1); | |
14008 | ||
bec39cab AC |
14009 | ; |
14010 | return 0; | |
14011 | } | |
14012 | _ACEOF | |
81ecdfbb | 14013 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14014 | ac_cv_func_setpgrp_void=no |
c906108c | 14015 | else |
81ecdfbb | 14016 | ac_cv_func_setpgrp_void=yes |
c906108c | 14017 | fi |
81ecdfbb | 14018 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14019 | fi |
81ecdfbb RW |
14020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
14021 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 14022 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 14023 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 14024 | |
a3828db0 | 14025 | fi |
c906108c SS |
14026 | fi |
14027 | ||
db1ff28b JK |
14028 | # Assume we'll default to using the included libiberty regex. |
14029 | gdb_use_included_regex=yes | |
14030 | ||
14031 | # However, if the system regex is GNU regex, then default to *not* | |
14032 | # using the included regex. | |
14033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
14034 | $as_echo_n "checking for GNU regex... " >&6; } | |
d0ac1c44 | 14035 | if ${gdb_cv_have_gnu_regex+:} false; then : |
db1ff28b JK |
14036 | $as_echo_n "(cached) " >&6 |
14037 | else | |
14038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14039 | /* end confdefs.h. */ | |
14040 | #include <gnu-versions.h> | |
14041 | int | |
14042 | main () | |
14043 | { | |
14044 | #define REGEX_INTERFACE_VERSION 1 | |
14045 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
14046 | # error "Version mismatch" | |
14047 | #endif | |
14048 | ; | |
14049 | return 0; | |
14050 | } | |
14051 | _ACEOF | |
14052 | if ac_fn_c_try_compile "$LINENO"; then : | |
14053 | gdb_cv_have_gnu_regex=yes | |
14054 | else | |
14055 | gdb_cv_have_gnu_regex=no | |
14056 | fi | |
14057 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14058 | fi | |
14059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
14060 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
14061 | if test $gdb_cv_have_gnu_regex = yes; then | |
14062 | gdb_use_included_regex=no | |
14063 | fi | |
14064 | ||
14065 | ||
14066 | # Check whether --with-included-regex was given. | |
14067 | if test "${with_included_regex+set}" = set; then : | |
14068 | withval=$with_included_regex; gdb_with_regex=$withval | |
14069 | else | |
14070 | gdb_with_regex=$gdb_use_included_regex | |
14071 | fi | |
14072 | ||
14073 | if test "$gdb_with_regex" = yes; then | |
14074 | ||
14075 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
14076 | ||
14077 | fi | |
14078 | ||
81ecdfbb RW |
14079 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
14080 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
14081 | #include <sys/proc.h> | |
14082 | ||
14083 | " | |
d0ac1c44 | 14084 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
c906108c | 14085 | |
5c45e068 | 14086 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 14087 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 14088 | _ACEOF |
c906108c | 14089 | |
5c45e068 | 14090 | |
97bf5e38 | 14091 | fi |
c906108c | 14092 | |
5c45e068 | 14093 | |
a3828db0 | 14094 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
14095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
14096 | $as_echo_n "checking for struct lwp... " >&6; } | |
d0ac1c44 | 14097 | if ${gdb_cv_struct_lwp+:} false; then : |
81ecdfbb | 14098 | $as_echo_n "(cached) " >&6 |
bec39cab | 14099 | else |
81ecdfbb | 14100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14101 | /* end confdefs.h. */ |
a3828db0 | 14102 | #include <sys/param.h> |
c49fbc6c | 14103 | #define _KMEMUSER |
a3828db0 | 14104 | #include <sys/lwp.h> |
bec39cab AC |
14105 | int |
14106 | main () | |
14107 | { | |
a3828db0 | 14108 | struct lwp l; |
bec39cab AC |
14109 | ; |
14110 | return 0; | |
14111 | } | |
14112 | _ACEOF | |
81ecdfbb | 14113 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14114 | gdb_cv_struct_lwp=yes |
c906108c | 14115 | else |
81ecdfbb | 14116 | gdb_cv_struct_lwp=no |
c906108c | 14117 | fi |
81ecdfbb | 14118 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14119 | fi |
81ecdfbb RW |
14120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
14121 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 14122 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 14123 | |
81ecdfbb | 14124 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 14125 | |
97bf5e38 | 14126 | fi |
c906108c | 14127 | |
a3828db0 | 14128 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
14129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
14130 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
d0ac1c44 | 14131 | if ${gdb_cv_struct_reg+:} false; then : |
81ecdfbb | 14132 | $as_echo_n "(cached) " >&6 |
bec39cab | 14133 | else |
81ecdfbb | 14134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14135 | /* end confdefs.h. */ |
a3828db0 MK |
14136 | #include <sys/types.h> |
14137 | #include <machine/reg.h> | |
bec39cab AC |
14138 | int |
14139 | main () | |
14140 | { | |
a3828db0 | 14141 | struct reg r; |
bec39cab AC |
14142 | ; |
14143 | return 0; | |
14144 | } | |
14145 | _ACEOF | |
81ecdfbb | 14146 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14147 | gdb_cv_struct_reg=yes |
27ca5dad | 14148 | else |
81ecdfbb | 14149 | gdb_cv_struct_reg=no |
27ca5dad | 14150 | fi |
81ecdfbb | 14151 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 14152 | fi |
81ecdfbb RW |
14153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
14154 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 14155 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 14156 | |
81ecdfbb | 14157 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
14158 | |
14159 | fi | |
97bf5e38 | 14160 | |
a3828db0 MK |
14161 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
14162 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
a6e69c1f JB |
14163 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> |
14164 | #include <machine/reg.h> | |
81ecdfbb | 14165 | " |
d0ac1c44 | 14166 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : |
5c45e068 MK |
14167 | |
14168 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14169 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 14170 | _ACEOF |
3862412b | 14171 | |
5c45e068 | 14172 | |
97bf5e38 | 14173 | fi |
a6e69c1f JB |
14174 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> |
14175 | #include <machine/reg.h> | |
81ecdfbb | 14176 | " |
d0ac1c44 | 14177 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : |
5c45e068 MK |
14178 | |
14179 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14180 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 14181 | _ACEOF |
3862412b | 14182 | |
5c45e068 | 14183 | |
97bf5e38 | 14184 | fi |
3862412b | 14185 | |
5c45e068 | 14186 | |
6fea9e18 L |
14187 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
14188 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
14189 | # `struct user_regs_struct'. | |
f517c180 EA |
14190 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h> |
14191 | #include <sys/user.h> | |
6fea9e18 | 14192 | " |
d0ac1c44 | 14193 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then : |
6fea9e18 L |
14194 | |
14195 | cat >>confdefs.h <<_ACEOF | |
14196 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
14197 | _ACEOF | |
14198 | ||
14199 | ||
14200 | fi | |
f517c180 EA |
14201 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h> |
14202 | #include <sys/user.h> | |
6fea9e18 | 14203 | " |
d0ac1c44 | 14204 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then : |
6fea9e18 L |
14205 | |
14206 | cat >>confdefs.h <<_ACEOF | |
14207 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
14208 | _ACEOF | |
14209 | ||
14210 | ||
14211 | fi | |
14212 | ||
14213 | ||
a3828db0 | 14214 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
14215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
14216 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
d0ac1c44 | 14217 | if ${gdb_cv_have_ptrace_getregs+:} false; then : |
81ecdfbb | 14218 | $as_echo_n "(cached) " >&6 |
451928c5 | 14219 | else |
81ecdfbb | 14220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14221 | /* end confdefs.h. */ |
a3828db0 | 14222 | #include <sys/ptrace.h> |
bec39cab AC |
14223 | int |
14224 | main () | |
14225 | { | |
a3828db0 | 14226 | PTRACE_GETREGS; |
bec39cab AC |
14227 | ; |
14228 | return 0; | |
14229 | } | |
14230 | _ACEOF | |
81ecdfbb | 14231 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14232 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 14233 | else |
81ecdfbb | 14234 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 14235 | fi |
81ecdfbb | 14236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14237 | fi |
14238 | ||
81ecdfbb RW |
14239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
14240 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 14241 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 14242 | |
81ecdfbb | 14243 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 14244 | |
97bf5e38 | 14245 | fi |
451928c5 | 14246 | |
a3828db0 | 14247 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
14248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
14249 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
d0ac1c44 | 14250 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : |
81ecdfbb | 14251 | $as_echo_n "(cached) " >&6 |
451928c5 | 14252 | else |
81ecdfbb | 14253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14254 | /* end confdefs.h. */ |
a3828db0 | 14255 | #include <sys/ptrace.h> |
bec39cab AC |
14256 | int |
14257 | main () | |
14258 | { | |
a3828db0 | 14259 | PTRACE_GETFPXREGS; |
bec39cab AC |
14260 | ; |
14261 | return 0; | |
14262 | } | |
14263 | _ACEOF | |
81ecdfbb | 14264 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14265 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 14266 | else |
81ecdfbb | 14267 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 14268 | fi |
81ecdfbb | 14269 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14270 | fi |
14271 | ||
81ecdfbb RW |
14272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
14273 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 14274 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 14275 | |
81ecdfbb | 14276 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 14277 | |
97bf5e38 | 14278 | fi |
451928c5 | 14279 | |
a3828db0 | 14280 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
14281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
14282 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
d0ac1c44 | 14283 | if ${gdb_cv_have_pt_getdbregs+:} false; then : |
81ecdfbb | 14284 | $as_echo_n "(cached) " >&6 |
3862412b | 14285 | else |
81ecdfbb | 14286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14287 | /* end confdefs.h. */ |
a3828db0 MK |
14288 | #include <sys/types.h> |
14289 | #include <sys/ptrace.h> | |
bec39cab AC |
14290 | int |
14291 | main () | |
14292 | { | |
a3828db0 | 14293 | PT_GETDBREGS; |
bec39cab AC |
14294 | ; |
14295 | return 0; | |
14296 | } | |
14297 | _ACEOF | |
81ecdfbb | 14298 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14299 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 14300 | else |
81ecdfbb | 14301 | gdb_cv_have_pt_getdbregs=no |
3862412b | 14302 | fi |
81ecdfbb | 14303 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14304 | fi |
14305 | ||
81ecdfbb RW |
14306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
14307 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 14308 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 14309 | |
81ecdfbb | 14310 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 14311 | |
97bf5e38 | 14312 | fi |
3862412b | 14313 | |
a3828db0 | 14314 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
14315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
14316 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
d0ac1c44 | 14317 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : |
81ecdfbb | 14318 | $as_echo_n "(cached) " >&6 |
3862412b | 14319 | else |
81ecdfbb | 14320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14321 | /* end confdefs.h. */ |
a3828db0 MK |
14322 | #include <sys/types.h> |
14323 | #include <sys/ptrace.h> | |
bec39cab AC |
14324 | int |
14325 | main () | |
14326 | { | |
a3828db0 | 14327 | PT_GETXMMREGS; |
bec39cab AC |
14328 | ; |
14329 | return 0; | |
14330 | } | |
14331 | _ACEOF | |
81ecdfbb | 14332 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14333 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 14334 | else |
81ecdfbb | 14335 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 14336 | fi |
81ecdfbb | 14337 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14338 | fi |
14339 | ||
81ecdfbb RW |
14340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
14341 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 14342 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 14343 | |
81ecdfbb | 14344 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 14345 | |
97bf5e38 | 14346 | fi |
3862412b | 14347 | |
6e9567fe JB |
14348 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
14349 | # Older FreeBSD versions don't have the pl_tdname member of | |
14350 | # `struct ptrace_lwpinfo'. | |
14351 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
14352 | " | |
d0ac1c44 | 14353 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : |
6e9567fe JB |
14354 | |
14355 | cat >>confdefs.h <<_ACEOF | |
14356 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
14357 | _ACEOF | |
14358 | ||
14359 | ||
14360 | fi | |
14361 | ||
14362 | ||
e6cdd38e JB |
14363 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
14364 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
14365 | # FreeBSD 10.3. | |
14366 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h> | |
14367 | " | |
d0ac1c44 | 14368 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : |
e6cdd38e JB |
14369 | |
14370 | cat >>confdefs.h <<_ACEOF | |
14371 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
14372 | _ACEOF | |
14373 | ||
14374 | ||
14375 | fi | |
14376 | ||
6e9567fe | 14377 | |
97bf5e38 | 14378 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
81ecdfbb RW |
14379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
14380 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
d0ac1c44 | 14381 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : |
81ecdfbb | 14382 | $as_echo_n "(cached) " >&6 |
596c9d4b | 14383 | else |
81ecdfbb | 14384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14385 | /* end confdefs.h. */ |
596c9d4b KB |
14386 | |
14387 | #define _SYSCALL32 | |
d30c5336 JK |
14388 | /* Needed for new procfs interface on sparc-solaris. */ |
14389 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 14390 | #include <sys/procfs.h> |
bec39cab AC |
14391 | int |
14392 | main () | |
14393 | { | |
97bf5e38 | 14394 | gregset_t avar |
bec39cab AC |
14395 | ; |
14396 | return 0; | |
14397 | } | |
14398 | _ACEOF | |
81ecdfbb | 14399 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14400 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 14401 | else |
81ecdfbb | 14402 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 14403 | |
596c9d4b | 14404 | fi |
81ecdfbb | 14405 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
14406 | fi |
14407 | ||
97bf5e38 | 14408 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 14409 | |
81ecdfbb | 14410 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
14411 | |
14412 | fi | |
81ecdfbb RW |
14413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
14414 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 14415 | |
81ecdfbb RW |
14416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
14417 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
d0ac1c44 | 14418 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : |
81ecdfbb | 14419 | $as_echo_n "(cached) " >&6 |
d84dd0c5 | 14420 | else |
81ecdfbb | 14421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14422 | /* end confdefs.h. */ |
97bf5e38 MK |
14423 | |
14424 | #define _SYSCALL32 | |
d30c5336 JK |
14425 | /* Needed for new procfs interface on sparc-solaris. */ |
14426 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 14427 | #include <sys/procfs.h> |
bec39cab AC |
14428 | int |
14429 | main () | |
14430 | { | |
97bf5e38 | 14431 | fpregset_t avar |
bec39cab AC |
14432 | ; |
14433 | return 0; | |
14434 | } | |
14435 | _ACEOF | |
81ecdfbb | 14436 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14437 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 14438 | else |
81ecdfbb | 14439 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 14440 | |
d84dd0c5 | 14441 | fi |
81ecdfbb | 14442 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
14443 | fi |
14444 | ||
97bf5e38 | 14445 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 14446 | |
81ecdfbb | 14447 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 14448 | |
97bf5e38 | 14449 | fi |
81ecdfbb RW |
14450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
14451 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 14452 | |
81ecdfbb RW |
14453 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
14454 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
d0ac1c44 | 14455 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : |
81ecdfbb | 14456 | $as_echo_n "(cached) " >&6 |
c906108c | 14457 | else |
81ecdfbb | 14458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14459 | /* end confdefs.h. */ |
c906108c | 14460 | |
97bf5e38 | 14461 | #define _SYSCALL32 |
d30c5336 JK |
14462 | /* Needed for new procfs interface on sparc-solaris. */ |
14463 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14464 | #include <sys/procfs.h> |
bec39cab AC |
14465 | int |
14466 | main () | |
14467 | { | |
97bf5e38 | 14468 | prgregset_t avar |
bec39cab AC |
14469 | ; |
14470 | return 0; | |
14471 | } | |
14472 | _ACEOF | |
81ecdfbb | 14473 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14474 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 14475 | else |
81ecdfbb | 14476 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 14477 | |
c906108c | 14478 | fi |
81ecdfbb | 14479 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14480 | fi |
14481 | ||
97bf5e38 | 14482 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 14483 | |
81ecdfbb | 14484 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 14485 | |
97bf5e38 | 14486 | fi |
81ecdfbb RW |
14487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
14488 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 14489 | |
81ecdfbb RW |
14490 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
14491 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
d0ac1c44 | 14492 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : |
81ecdfbb | 14493 | $as_echo_n "(cached) " >&6 |
d45fe813 | 14494 | else |
81ecdfbb | 14495 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14496 | /* end confdefs.h. */ |
97bf5e38 MK |
14497 | |
14498 | #define _SYSCALL32 | |
d30c5336 JK |
14499 | /* Needed for new procfs interface on sparc-solaris. */ |
14500 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14501 | #include <sys/procfs.h> |
bec39cab AC |
14502 | int |
14503 | main () | |
14504 | { | |
97bf5e38 | 14505 | prfpregset_t avar |
bec39cab AC |
14506 | ; |
14507 | return 0; | |
14508 | } | |
14509 | _ACEOF | |
81ecdfbb | 14510 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14511 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 14512 | else |
81ecdfbb | 14513 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 14514 | |
d45fe813 | 14515 | fi |
81ecdfbb | 14516 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14517 | fi |
14518 | ||
97bf5e38 | 14519 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 14520 | |
81ecdfbb | 14521 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 14522 | |
97bf5e38 | 14523 | fi |
81ecdfbb RW |
14524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
14525 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 14526 | |
81ecdfbb RW |
14527 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
14528 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
d0ac1c44 | 14529 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : |
81ecdfbb | 14530 | $as_echo_n "(cached) " >&6 |
d45fe813 | 14531 | else |
81ecdfbb | 14532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14533 | /* end confdefs.h. */ |
97bf5e38 MK |
14534 | |
14535 | #define _SYSCALL32 | |
d30c5336 JK |
14536 | /* Needed for new procfs interface on sparc-solaris. */ |
14537 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14538 | #include <sys/procfs.h> |
bec39cab AC |
14539 | int |
14540 | main () | |
14541 | { | |
97bf5e38 | 14542 | prgregset32_t avar |
bec39cab AC |
14543 | ; |
14544 | return 0; | |
14545 | } | |
14546 | _ACEOF | |
81ecdfbb | 14547 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14548 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 14549 | else |
81ecdfbb | 14550 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 14551 | |
d45fe813 | 14552 | fi |
81ecdfbb | 14553 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14554 | fi |
14555 | ||
97bf5e38 | 14556 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 14557 | |
81ecdfbb | 14558 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 14559 | |
97bf5e38 | 14560 | fi |
81ecdfbb RW |
14561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
14562 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 14563 | |
81ecdfbb RW |
14564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
14565 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
d0ac1c44 | 14566 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : |
81ecdfbb | 14567 | $as_echo_n "(cached) " >&6 |
d45fe813 | 14568 | else |
81ecdfbb | 14569 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14570 | /* end confdefs.h. */ |
97bf5e38 | 14571 | |
d45fe813 | 14572 | #define _SYSCALL32 |
d30c5336 JK |
14573 | /* Needed for new procfs interface on sparc-solaris. */ |
14574 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14575 | #include <sys/procfs.h> |
bec39cab AC |
14576 | int |
14577 | main () | |
14578 | { | |
97bf5e38 | 14579 | lwpid_t avar |
bec39cab AC |
14580 | ; |
14581 | return 0; | |
14582 | } | |
14583 | _ACEOF | |
81ecdfbb | 14584 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14585 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 14586 | else |
81ecdfbb | 14587 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 14588 | |
d45fe813 | 14589 | fi |
81ecdfbb | 14590 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
14591 | fi |
14592 | ||
97bf5e38 | 14593 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 14594 | |
81ecdfbb | 14595 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 14596 | |
97bf5e38 | 14597 | fi |
81ecdfbb RW |
14598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
14599 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 14600 | |
81ecdfbb RW |
14601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
14602 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
d0ac1c44 | 14603 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : |
81ecdfbb | 14604 | $as_echo_n "(cached) " >&6 |
c906108c | 14605 | else |
81ecdfbb | 14606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14607 | /* end confdefs.h. */ |
c906108c | 14608 | |
97bf5e38 | 14609 | #define _SYSCALL32 |
d30c5336 JK |
14610 | /* Needed for new procfs interface on sparc-solaris. */ |
14611 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 14612 | #include <sys/procfs.h> |
bec39cab AC |
14613 | int |
14614 | main () | |
14615 | { | |
97bf5e38 | 14616 | psaddr_t avar |
bec39cab AC |
14617 | ; |
14618 | return 0; | |
14619 | } | |
14620 | _ACEOF | |
81ecdfbb | 14621 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 14622 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 14623 | else |
81ecdfbb | 14624 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 14625 | |
c906108c | 14626 | fi |
81ecdfbb | 14627 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
14628 | fi |
14629 | ||
97bf5e38 | 14630 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 14631 | |
81ecdfbb | 14632 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 14633 | |
97bf5e38 | 14634 | fi |
81ecdfbb RW |
14635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
14636 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 14637 | |
97bf5e38 MK |
14638 | |
14639 | ||
14640 | ||
97bf5e38 | 14641 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
14642 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
14643 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
d0ac1c44 | 14644 | if ${gdb_cv_prfpregset_t_broken+:} false; then : |
81ecdfbb | 14645 | $as_echo_n "(cached) " >&6 |
c906108c | 14646 | else |
81ecdfbb | 14647 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 14648 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 14649 | else |
81ecdfbb | 14650 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14651 | /* end confdefs.h. */ |
97bf5e38 MK |
14652 | #include <sys/procfs.h> |
14653 | int main () | |
14654 | { | |
14655 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
14656 | return 1; | |
14657 | return 0; | |
14658 | } | |
bec39cab | 14659 | _ACEOF |
81ecdfbb | 14660 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14661 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
14662 | else |
14663 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 14664 | fi |
81ecdfbb RW |
14665 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14666 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14667 | fi |
81ecdfbb | 14668 | |
c906108c SS |
14669 | fi |
14670 | ||
81ecdfbb RW |
14671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
14672 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 14673 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 14674 | |
81ecdfbb | 14675 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 14676 | |
97bf5e38 MK |
14677 | fi |
14678 | fi | |
c906108c | 14679 | fi |
c906108c | 14680 | |
bc8bcb4b | 14681 | # Check if the compiler supports the `long long' type. |
c906108c | 14682 | |
81ecdfbb RW |
14683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
14684 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
d0ac1c44 | 14685 | if ${gdb_cv_c_long_long+:} false; then : |
81ecdfbb | 14686 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 14687 | else |
81ecdfbb | 14688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14689 | /* end confdefs.h. */ |
bc8bcb4b | 14690 | extern long long foo; |
bec39cab AC |
14691 | int |
14692 | main () | |
14693 | { | |
bc8bcb4b | 14694 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
14695 | ; |
14696 | return 0; | |
14697 | } | |
14698 | _ACEOF | |
81ecdfbb | 14699 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
14700 | gdb_cv_c_long_long=yes |
14701 | else | |
81ecdfbb | 14702 | gdb_cv_c_long_long=no |
97bf5e38 | 14703 | fi |
81ecdfbb | 14704 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14705 | fi |
81ecdfbb RW |
14706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
14707 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
14708 | if test $gdb_cv_c_long_long != yes; then |
14709 | # libdecnumber requires long long. | |
d0ac1c44 | 14710 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
97bf5e38 MK |
14711 | fi |
14712 | ||
bc8bcb4b | 14713 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 14714 | |
81ecdfbb RW |
14715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
14716 | $as_echo_n "checking for long long support in printf... " >&6; } | |
d0ac1c44 | 14717 | if ${gdb_cv_printf_has_long_long+:} false; then : |
81ecdfbb | 14718 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 14719 | else |
81ecdfbb | 14720 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14721 | gdb_cv_printf_has_long_long=no |
14722 | else | |
81ecdfbb | 14723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14724 | /* end confdefs.h. */ |
bc8bcb4b MK |
14725 | $ac_includes_default |
14726 | int | |
14727 | main () | |
14728 | { | |
14729 | char buf[32]; | |
97bf5e38 MK |
14730 | long long l = 0; |
14731 | l = (l << 16) + 0x0123; | |
14732 | l = (l << 16) + 0x4567; | |
14733 | l = (l << 16) + 0x89ab; | |
14734 | l = (l << 16) + 0xcdef; | |
14735 | sprintf (buf, "0x%016llx", l); | |
14736 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
14737 | ; |
14738 | return 0; | |
c906108c | 14739 | } |
bec39cab | 14740 | _ACEOF |
81ecdfbb | 14741 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14742 | gdb_cv_printf_has_long_long=yes |
14743 | else | |
81ecdfbb | 14744 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 14745 | fi |
81ecdfbb RW |
14746 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14747 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14748 | fi |
81ecdfbb | 14749 | |
97bf5e38 | 14750 | fi |
81ecdfbb RW |
14751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
14752 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 14753 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 14754 | |
81ecdfbb | 14755 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
14756 | |
14757 | fi | |
97bf5e38 | 14758 | |
1a619819 LM |
14759 | # Check if the compiler and runtime support printing decfloats. |
14760 | ||
81ecdfbb RW |
14761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
14762 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
d0ac1c44 | 14763 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
81ecdfbb | 14764 | $as_echo_n "(cached) " >&6 |
1a619819 | 14765 | else |
81ecdfbb | 14766 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
14767 | gdb_cv_printf_has_decfloat=no |
14768 | else | |
81ecdfbb | 14769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
14770 | /* end confdefs.h. */ |
14771 | $ac_includes_default | |
14772 | int | |
14773 | main () | |
14774 | { | |
14775 | char buf[64]; | |
14776 | _Decimal32 d32 = 1.2345df; | |
14777 | _Decimal64 d64 = 1.2345dd; | |
14778 | _Decimal128 d128 = 1.2345dl; | |
14779 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
14780 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
14781 | ; | |
14782 | return 0; | |
14783 | } | |
14784 | _ACEOF | |
81ecdfbb | 14785 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
14786 | gdb_cv_printf_has_decfloat=yes |
14787 | else | |
81ecdfbb | 14788 | gdb_cv_printf_has_decfloat=no |
1a619819 | 14789 | fi |
81ecdfbb RW |
14790 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14791 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 14792 | fi |
81ecdfbb | 14793 | |
1a619819 | 14794 | fi |
81ecdfbb RW |
14795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
14796 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
14797 | if test $gdb_cv_printf_has_decfloat = yes; then |
14798 | ||
81ecdfbb | 14799 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
14800 | |
14801 | fi | |
14802 | ||
bc8bcb4b MK |
14803 | # Check if the compiler supports the `long double' type. We can't use |
14804 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
14805 | # constants defined in <float.h> that fail on some systems, | |
14806 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 14807 | |
81ecdfbb RW |
14808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
14809 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
d0ac1c44 | 14810 | if ${gdb_cv_c_long_double+:} false; then : |
81ecdfbb | 14811 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 14812 | else |
81ecdfbb | 14813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14814 | /* end confdefs.h. */ |
97bf5e38 | 14815 | long double foo; |
bec39cab | 14816 | _ACEOF |
81ecdfbb | 14817 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 14818 | gdb_cv_c_long_double=yes |
97bf5e38 | 14819 | else |
81ecdfbb | 14820 | gdb_cv_c_long_double=no |
97bf5e38 | 14821 | fi |
81ecdfbb | 14822 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14823 | fi |
81ecdfbb RW |
14824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
14825 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 14826 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 14827 | |
81ecdfbb | 14828 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14829 | |
14830 | fi | |
14831 | ||
bc8bcb4b | 14832 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 14833 | |
81ecdfbb RW |
14834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
14835 | $as_echo_n "checking for long double support in printf... " >&6; } | |
d0ac1c44 | 14836 | if ${gdb_cv_printf_has_long_double+:} false; then : |
81ecdfbb | 14837 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 14838 | else |
81ecdfbb | 14839 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14840 | gdb_cv_printf_has_long_double=no |
14841 | else | |
81ecdfbb | 14842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14843 | /* end confdefs.h. */ |
bc8bcb4b MK |
14844 | $ac_includes_default |
14845 | int | |
14846 | main () | |
14847 | { | |
14848 | char buf[16]; | |
97bf5e38 MK |
14849 | long double f = 3.141592653; |
14850 | sprintf (buf, "%Lg", f); | |
14851 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
14852 | ; |
14853 | return 0; | |
97bf5e38 | 14854 | } |
bec39cab | 14855 | _ACEOF |
81ecdfbb | 14856 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 14857 | gdb_cv_printf_has_long_double=yes |
c906108c | 14858 | else |
81ecdfbb | 14859 | gdb_cv_printf_has_long_double=no |
c906108c | 14860 | fi |
81ecdfbb RW |
14861 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14862 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 14863 | fi |
81ecdfbb | 14864 | |
c906108c | 14865 | fi |
81ecdfbb RW |
14866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
14867 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 14868 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 14869 | |
81ecdfbb | 14870 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14871 | |
14872 | fi | |
97bf5e38 | 14873 | |
bc8bcb4b | 14874 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 14875 | |
81ecdfbb RW |
14876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
14877 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
d0ac1c44 | 14878 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
81ecdfbb | 14879 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 14880 | else |
81ecdfbb | 14881 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
14882 | gdb_cv_scanf_has_long_double=no |
14883 | else | |
81ecdfbb | 14884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14885 | /* end confdefs.h. */ |
bc8bcb4b MK |
14886 | #include <stdio.h> |
14887 | int | |
14888 | main () | |
14889 | { | |
14890 | char *buf = "3.141592653"; | |
97bf5e38 MK |
14891 | long double f = 0; |
14892 | sscanf (buf, "%Lg", &f); | |
14893 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
14894 | ; |
14895 | return 0; | |
97bf5e38 | 14896 | } |
bec39cab | 14897 | _ACEOF |
81ecdfbb | 14898 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
14899 | gdb_cv_scanf_has_long_double=yes |
14900 | else | |
81ecdfbb | 14901 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 14902 | fi |
81ecdfbb RW |
14903 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14904 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14905 | fi |
81ecdfbb | 14906 | |
c906108c | 14907 | fi |
81ecdfbb RW |
14908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
14909 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 14910 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 14911 | |
81ecdfbb | 14912 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
14913 | |
14914 | fi | |
c906108c | 14915 | |
438013df AO |
14916 | case ${host_os} in |
14917 | aix*) | |
81ecdfbb RW |
14918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
14919 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d0ac1c44 | 14920 | if ${gdb_cv_bigtoc+:} false; then : |
81ecdfbb | 14921 | $as_echo_n "(cached) " >&6 |
438013df | 14922 | else |
bec39cab | 14923 | |
438013df AO |
14924 | SAVE_LDFLAGS=$LDFLAGS |
14925 | ||
14926 | case $GCC in | |
14927 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
14928 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
14929 | esac | |
14930 | ||
14931 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 14932 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14933 | /* end confdefs.h. */ |
438013df | 14934 | |
bec39cab AC |
14935 | int |
14936 | main () | |
14937 | { | |
438013df | 14938 | int i; |
bec39cab AC |
14939 | ; |
14940 | return 0; | |
14941 | } | |
14942 | _ACEOF | |
81ecdfbb | 14943 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14944 | |
81ecdfbb RW |
14945 | else |
14946 | gdb_cv_bigtoc= | |
438013df | 14947 | fi |
81ecdfbb RW |
14948 | rm -f core conftest.err conftest.$ac_objext \ |
14949 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 14950 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 14951 | |
bec39cab | 14952 | fi |
81ecdfbb RW |
14953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
14954 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
14955 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
14956 | ;; | |
14957 | esac | |
14958 | ||
38f6b338 | 14959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 14960 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
14961 | dynamic_list=false |
14962 | if test "${gdb_native}" = yes; then | |
14963 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
14964 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
14965 | # may not be supported there. | |
14966 | old_LDFLAGS="$LDFLAGS" | |
14967 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
14968 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
14969 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
14970 | if test "${have_libpython}" = no; then | |
14971 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
14972 | /* end confdefs.h. */ |
14973 | ||
14974 | int | |
14975 | main () | |
14976 | { | |
14977 | ||
14978 | ; | |
14979 | return 0; | |
14980 | } | |
14981 | _ACEOF | |
14982 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
14983 | dynamic_list=true |
14984 | fi | |
14985 | rm -f core conftest.err conftest.$ac_objext \ | |
14986 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
14987 | else |
14988 | # Workaround http://bugs.python.org/issue4434 where static | |
14989 | # libpythonX.Y.a would get its symbols required for | |
14990 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
14991 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
14992 | |
14993 | # Note the workaround for Python | |
14994 | # http://bugs.python.org/issue10112 earlier has removed | |
14995 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
14996 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
14997 | # always pass. | |
38f6b338 JK |
14998 | old_CFLAGS="$CFLAGS" |
14999 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
15000 | old_LIBS="$LIBS" |
15001 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
15002 | old_CPPFLAGS="$CPPFLAGS" |
15003 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 15004 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 15005 | true |
f6528abd | 15006 | else |
3bebe2f2 JK |
15007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15008 | /* end confdefs.h. */ | |
1b4f615e | 15009 | #include "Python.h" |
3bebe2f2 JK |
15010 | int |
15011 | main () | |
15012 | { | |
15013 | int err; | |
38f6b338 JK |
15014 | Py_Initialize (); |
15015 | err = PyRun_SimpleString ("import itertools\n"); | |
15016 | Py_Finalize (); | |
15017 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
15018 | ; |
15019 | return 0; | |
15020 | } | |
15021 | _ACEOF | |
15022 | if ac_fn_c_try_run "$LINENO"; then : | |
15023 | dynamic_list=true | |
15024 | fi | |
15025 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15026 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15027 | fi | |
15028 | ||
8c1fb155 | 15029 | LIBS="$old_LIBS" |
38f6b338 | 15030 | CFLAGS="$old_CFLAGS" |
1b4f615e | 15031 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
15032 | fi |
15033 | LDFLAGS="$old_LDFLAGS" | |
15034 | fi | |
15035 | if $dynamic_list; then | |
15036 | found="-Wl,--dynamic-list" | |
15037 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 15038 | else |
38f6b338 JK |
15039 | found="-rdynamic" |
15040 | RDYNAMIC="-rdynamic" | |
f6528abd | 15041 | fi |
f6528abd | 15042 | |
38f6b338 | 15043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 15044 | $as_echo "$found" >&6; } |
0407b3f1 | 15045 | |
f6528abd | 15046 | |
0407b3f1 | 15047 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 15048 | case ${host_os} in |
d92419e5 | 15049 | aix*) |
81ecdfbb RW |
15050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
15051 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
d0ac1c44 | 15052 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
81ecdfbb | 15053 | $as_echo_n "(cached) " >&6 |
bec39cab | 15054 | else |
81ecdfbb | 15055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15056 | /* end confdefs.h. */ |
d92419e5 | 15057 | #include <sys/pthdebug.h> |
bec39cab AC |
15058 | int |
15059 | main () | |
15060 | { | |
d92419e5 JB |
15061 | #ifndef PTHDB_VERSION_3 |
15062 | #error | |
15063 | #endif | |
bec39cab AC |
15064 | ; |
15065 | return 0; | |
15066 | } | |
15067 | _ACEOF | |
81ecdfbb | 15068 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
15069 | gdb_cv_have_aix_thread_debug=yes |
15070 | else | |
81ecdfbb | 15071 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 15072 | fi |
81ecdfbb | 15073 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
15074 | fi |
15075 | ||
81ecdfbb RW |
15076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
15077 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
15078 | if test $gdb_cv_have_aix_thread_debug = yes; then |
15079 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 15080 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 15081 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
15082 | |
15083 | # Older versions of AIX do not provide the declaration for | |
15084 | # the getthrds function (it appears that it was introduced | |
15085 | # with AIX 6.x). | |
15086 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
15087 | " | |
d0ac1c44 | 15088 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
d645e32e JB |
15089 | ac_have_decl=1 |
15090 | else | |
15091 | ac_have_decl=0 | |
15092 | fi | |
15093 | ||
15094 | cat >>confdefs.h <<_ACEOF | |
15095 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
15096 | _ACEOF | |
15097 | ||
d92419e5 JB |
15098 | fi |
15099 | ;; | |
c906108c | 15100 | esac |
bec39cab | 15101 | |
c906108c SS |
15102 | fi |
15103 | ||
3f47be5c | 15104 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
15105 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
15106 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
d0ac1c44 | 15107 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
81ecdfbb | 15108 | $as_echo_n "(cached) " >&6 |
bec39cab | 15109 | else |
81ecdfbb | 15110 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15111 | /* end confdefs.h. */ |
3f47be5c | 15112 | #include <thread_db.h> |
bec39cab AC |
15113 | int |
15114 | main () | |
15115 | { | |
3f47be5c | 15116 | int i = TD_NOTALLOC; |
bec39cab AC |
15117 | ; |
15118 | return 0; | |
15119 | } | |
15120 | _ACEOF | |
81ecdfbb | 15121 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
15122 | gdb_cv_thread_db_h_has_td_notalloc=yes |
15123 | else | |
81ecdfbb | 15124 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 15125 | |
3f47be5c | 15126 | fi |
81ecdfbb | 15127 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 15128 | |
bec39cab | 15129 | fi |
81ecdfbb RW |
15130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
15131 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
15132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
15133 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
d0ac1c44 | 15134 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
81ecdfbb | 15135 | $as_echo_n "(cached) " >&6 |
59f80f10 | 15136 | else |
81ecdfbb | 15137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15138 | /* end confdefs.h. */ |
15139 | #include <thread_db.h> | |
15140 | int | |
15141 | main () | |
15142 | { | |
15143 | int i = TD_VERSION; | |
15144 | ; | |
15145 | return 0; | |
15146 | } | |
15147 | _ACEOF | |
81ecdfbb | 15148 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15149 | gdb_cv_thread_db_h_has_td_version=yes |
15150 | else | |
81ecdfbb | 15151 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
15152 | |
15153 | fi | |
81ecdfbb | 15154 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15155 | |
15156 | fi | |
81ecdfbb RW |
15157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
15158 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
15159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
15160 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
d0ac1c44 | 15161 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
81ecdfbb | 15162 | $as_echo_n "(cached) " >&6 |
59f80f10 | 15163 | else |
81ecdfbb | 15164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15165 | /* end confdefs.h. */ |
15166 | #include <thread_db.h> | |
15167 | int | |
15168 | main () | |
15169 | { | |
15170 | int i = TD_NOTLS; | |
15171 | ; | |
15172 | return 0; | |
15173 | } | |
15174 | _ACEOF | |
81ecdfbb | 15175 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15176 | gdb_cv_thread_db_h_has_td_notls=yes |
15177 | else | |
81ecdfbb | 15178 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
15179 | |
15180 | fi | |
81ecdfbb | 15181 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15182 | |
15183 | fi | |
81ecdfbb RW |
15184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
15185 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
15186 | fi |
15187 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 15188 | |
81ecdfbb | 15189 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 15190 | |
59f80f10 DJ |
15191 | fi |
15192 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
15193 | ||
81ecdfbb | 15194 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
15195 | |
15196 | fi | |
15197 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
15198 | ||
81ecdfbb | 15199 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 15200 | |
3f47be5c EZ |
15201 | fi |
15202 | ||
81ecdfbb RW |
15203 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
15204 | " | |
d0ac1c44 | 15205 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : |
81ecdfbb | 15206 | ac_have_decl=1 |
10568435 | 15207 | else |
81ecdfbb | 15208 | ac_have_decl=0 |
10568435 | 15209 | fi |
10568435 JK |
15210 | |
15211 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 15212 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
15213 | _ACEOF |
15214 | ||
15215 | ||
81ecdfbb RW |
15216 | if test "$cross_compiling" = yes; then : |
15217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
15218 | /* end confdefs.h. */ |
15219 | #include <sys/personality.h> | |
15220 | int | |
15221 | main () | |
15222 | { | |
15223 | ||
15224 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15225 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15226 | # endif | |
15227 | /* Test the flag could be set and stays set. */ | |
15228 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15229 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15230 | return 1 | |
15231 | ; | |
15232 | return 0; | |
15233 | } | |
15234 | _ACEOF | |
81ecdfbb | 15235 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
15236 | have_personality=true |
15237 | else | |
81ecdfbb | 15238 | have_personality=false |
10568435 | 15239 | fi |
81ecdfbb RW |
15240 | rm -f core conftest.err conftest.$ac_objext \ |
15241 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 15242 | else |
81ecdfbb | 15243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
15244 | /* end confdefs.h. */ |
15245 | #include <sys/personality.h> | |
15246 | int | |
15247 | main () | |
15248 | { | |
15249 | ||
15250 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
15251 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
15252 | # endif | |
15253 | /* Test the flag could be set and stays set. */ | |
15254 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
15255 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
15256 | return 1 | |
15257 | ; | |
15258 | return 0; | |
15259 | } | |
15260 | _ACEOF | |
81ecdfbb | 15261 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
15262 | have_personality=true |
15263 | else | |
81ecdfbb | 15264 | have_personality=false |
10568435 | 15265 | fi |
81ecdfbb RW |
15266 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15267 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 15268 | fi |
81ecdfbb | 15269 | |
10568435 JK |
15270 | if $have_personality |
15271 | then | |
15272 | ||
81ecdfbb | 15273 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
15274 | |
15275 | fi | |
15276 | ||
e655c1a2 PA |
15277 | case $host_os in |
15278 | go32* | *djgpp*) | |
15279 | gdbinit=gdb.ini | |
15280 | ;; | |
15281 | *) | |
15282 | gdbinit=.gdbinit | |
15283 | ;; | |
15284 | esac | |
15285 | ||
15286 | cat >>confdefs.h <<_ACEOF | |
15287 | #define GDBINIT "$gdbinit" | |
15288 | _ACEOF | |
15289 | ||
15290 | ||
fb40c209 | 15291 | |
f83d8a90 DE |
15292 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
15293 | # except that the argument to --with-sysroot is optional. | |
15294 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
15295 | if test "x$with_sysroot" = xyes; then | |
15296 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
15297 | fi | |
bec39cab | 15298 | |
81ecdfbb RW |
15299 | # Check whether --with-sysroot was given. |
15300 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
15301 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
15302 | else | |
15303 | TARGET_SYSTEM_ROOT= | |
15304 | fi | |
030292b7 | 15305 | |
030292b7 | 15306 | |
f83d8a90 DE |
15307 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
15308 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15309 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
15310 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 15311 | |
f83d8a90 DE |
15312 | cat >>confdefs.h <<_ACEOF |
15313 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
15314 | _ACEOF | |
bec39cab | 15315 | |
030292b7 | 15316 | |
b14b1491 | 15317 | |
f83d8a90 DE |
15318 | |
15319 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
15320 | if test "x$prefix" = xNONE; then | |
15321 | test_prefix=/usr/local | |
15322 | else | |
15323 | test_prefix=$prefix | |
15324 | fi | |
15325 | else | |
15326 | test_prefix=$exec_prefix | |
15327 | fi | |
15328 | value=0 | |
15329 | case ${ac_define_dir} in | |
15330 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15331 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15332 | value=1 | |
15333 | ;; | |
15334 | esac | |
15335 | ||
15336 | cat >>confdefs.h <<_ACEOF | |
15337 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
15338 | _ACEOF | |
030292b7 DJ |
15339 | |
15340 | ||
15341 | ||
16e7150e | 15342 | |
16e7150e | 15343 | |
81ecdfbb RW |
15344 | # Check whether --with-system-gdbinit was given. |
15345 | if test "${with_system_gdbinit+set}" = set; then : | |
15346 | withval=$with_system_gdbinit; | |
b14b1491 TT |
15347 | SYSTEM_GDBINIT=$withval |
15348 | else | |
15349 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
15350 | fi |
15351 | ||
16e7150e JG |
15352 | |
15353 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
15354 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 15355 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
15356 | ac_define_dir=`eval echo $ac_define_dir` |
15357 | ||
15358 | cat >>confdefs.h <<_ACEOF | |
15359 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
15360 | _ACEOF | |
15361 | ||
15362 | ||
15363 | ||
0c4a4063 | 15364 | |
b14b1491 TT |
15365 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
15366 | if test "x$prefix" = xNONE; then | |
15367 | test_prefix=/usr/local | |
15368 | else | |
15369 | test_prefix=$prefix | |
15370 | fi | |
15371 | else | |
15372 | test_prefix=$exec_prefix | |
15373 | fi | |
15374 | value=0 | |
15375 | case ${ac_define_dir} in | |
15376 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15377 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15378 | value=1 | |
15379 | ;; | |
15380 | esac | |
16e7150e | 15381 | |
b14b1491 TT |
15382 | cat >>confdefs.h <<_ACEOF |
15383 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
15384 | _ACEOF |
15385 | ||
b14b1491 | 15386 | |
16e7150e | 15387 | |
0c4a4063 | 15388 | |
b835bb52 | 15389 | |
81ecdfbb RW |
15390 | # Check whether --enable-werror was given. |
15391 | if test "${enable_werror+set}" = set; then : | |
15392 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
15393 | yes | y) ERROR_ON_WARNING="yes" ;; |
15394 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 15395 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 15396 | esac |
81ecdfbb RW |
15397 | fi |
15398 | ||
094a342e | 15399 | |
9a084706 PA |
15400 | # Enable -Werror by default when using gcc. Turn it off for releases. |
15401 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
15402 | ERROR_ON_WARNING=yes |
15403 | fi | |
15404 | ||
15405 | WERROR_CFLAGS="" | |
15406 | if test "${ERROR_ON_WARNING}" = yes ; then | |
15407 | WERROR_CFLAGS="-Werror" | |
15408 | fi | |
15409 | ||
cf6de44d | 15410 | # The options we'll try to enable. |
aac331e4 | 15411 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 15412 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
aac331e4 | 15413 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 15414 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
8465943a | 15415 | -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 15416 | -Wno-mismatched-tags \ |
632e107b | 15417 | -Wno-error=deprecated-register \ |
85e26832 | 15418 | -Wsuggest-override \ |
1a34f210 | 15419 | -Wimplicit-fallthrough=3 \ |
aff689d3 | 15420 | -Wduplicated-cond" |
3bc3d82a | 15421 | |
3526781e | 15422 | case "${host}" in |
4fa7574e RO |
15423 | *-*-mingw32*) |
15424 | # Enable -Wno-format by default when using gcc on mingw since many | |
15425 | # GCC versions complain about %I64. | |
15426 | build_warnings="$build_warnings -Wno-format" ;; | |
15427 | *-*-solaris*) | |
15428 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
15429 | # doesn't understand. | |
15430 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
15431 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
15432 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
d3685d60 | 15433 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
15434 | esac |
15435 | ||
81ecdfbb RW |
15436 | # Check whether --enable-build-warnings was given. |
15437 | if test "${enable_build_warnings+set}" = set; then : | |
15438 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
15439 | yes) ;; |
15440 | no) build_warnings="-w";; | |
15441 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15442 | build_warnings="${build_warnings} ${t}";; | |
15443 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15444 | build_warnings="${t} ${build_warnings}";; | |
15445 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15446 | esac | |
d4f3574e | 15447 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 15448 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 15449 | fi |
81ecdfbb RW |
15450 | fi |
15451 | # Check whether --enable-gdb-build-warnings was given. | |
15452 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
15453 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
15454 | yes) ;; |
15455 | no) build_warnings="-w";; | |
15456 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15457 | build_warnings="${build_warnings} ${t}";; | |
15458 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
15459 | build_warnings="${t} ${build_warnings}";; | |
15460 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
15461 | esac | |
15462 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
15463 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
15464 | fi | |
81ecdfbb | 15465 | fi |
3bc3d82a PA |
15466 | |
15467 | # The set of warnings supported by a C++ compiler is not the same as | |
15468 | # of the C compiler. | |
cf6de44d | 15469 | ac_ext=cpp |
3bc3d82a PA |
15470 | ac_cpp='$CXXCPP $CPPFLAGS' |
15471 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15472 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15473 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
15474 | ||
3bc3d82a | 15475 | |
81ecdfbb | 15476 | WARN_CFLAGS="" |
c906108c SS |
15477 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
15478 | then | |
81ecdfbb RW |
15479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
15480 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
15481 | # Separate out the -Werror flag as some files just cannot be |
15482 | # compiled with it enabled. | |
15483 | for w in ${build_warnings}; do | |
7544db95 PA |
15484 | # GCC does not complain about -Wno-unknown-warning. Invert |
15485 | # and test -Wunknown-warning instead. | |
15486 | case $w in | |
15487 | -Wno-*) | |
15488 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
15489 | *) | |
15490 | wtest=$w ;; | |
15491 | esac | |
15492 | ||
746a987d AC |
15493 | case $w in |
15494 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
15495 | *) |
15496 | # Check whether GCC accepts it. | |
4536bbc6 | 15497 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 15498 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 15499 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 15500 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
15501 | if test "x$w" = "x-Wunused-variable"; then |
15502 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
15503 | # fixed in GCC 4.9. This test is derived from the gdb | |
15504 | # source code that triggered this bug in GCC. | |
15505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15506 | /* end confdefs.h. */ | |
15507 | struct scoped_restore_base {}; | |
15508 | struct scoped_restore_tmpl : public scoped_restore_base { | |
15509 | ~scoped_restore_tmpl() {} | |
15510 | }; | |
15511 | int | |
15512 | main () | |
15513 | { | |
15514 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
15515 | ; | |
15516 | return 0; | |
15517 | } | |
15518 | _ACEOF | |
15519 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
15520 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
15521 | fi | |
15522 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15523 | else | |
15524 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15525 | /* end confdefs.h. */ |
4536bbc6 | 15526 | |
bec39cab AC |
15527 | int |
15528 | main () | |
15529 | { | |
4536bbc6 | 15530 | |
bec39cab AC |
15531 | ; |
15532 | return 0; | |
15533 | } | |
15534 | _ACEOF | |
3bc3d82a | 15535 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 15536 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 15537 | fi |
81ecdfbb | 15538 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a0de763e | 15539 | fi |
4536bbc6 | 15540 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 15541 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
15542 | esac |
15543 | done | |
81ecdfbb RW |
15544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
15545 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
15546 | fi |
15547 | ||
15548 | ||
104c1213 | 15549 | |
cf6de44d | 15550 | ac_ext=c |
3bc3d82a PA |
15551 | ac_cpp='$CPP $CPPFLAGS' |
15552 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
15553 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
15554 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
15555 | ||
3bc3d82a | 15556 | |
b835bb52 | 15557 | |
7a292a7a | 15558 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
15559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
15560 | $as_echo_n "checking for cygwin... " >&6; } | |
d0ac1c44 | 15561 | if ${gdb_cv_os_cygwin+:} false; then : |
81ecdfbb | 15562 | $as_echo_n "(cached) " >&6 |
bec39cab | 15563 | else |
81ecdfbb | 15564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15565 | /* end confdefs.h. */ |
7a292a7a SS |
15566 | |
15567 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
15568 | lose | |
15569 | #endif | |
bec39cab | 15570 | _ACEOF |
7a292a7a | 15571 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 15572 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
15573 | gdb_cv_os_cygwin=yes |
15574 | else | |
7a292a7a SS |
15575 | gdb_cv_os_cygwin=no |
15576 | fi | |
15577 | rm -f conftest* | |
15578 | ||
15579 | fi | |
81ecdfbb RW |
15580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
15581 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 15582 | |
aff38e61 | 15583 | |
3eb25fda | 15584 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 15585 | case ${host} in |
95cbc983 AC |
15586 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
15587 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 15588 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
15589 | esac |
15590 | ||
15591 | ||
cd0fc7c3 SS |
15592 | # libreadline needs libuser32.a in a cygwin environment |
15593 | WIN32LIBS= | |
15594 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
15595 | WIN32LIBS="-luser32" |
15596 | case "${target}" in | |
15597 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
15598 | ;; | |
15599 | esac | |
cd0fc7c3 | 15600 | fi |
c906108c | 15601 | |
b4505029 MM |
15602 | # The ser-tcp.c module requires sockets. |
15603 | case ${host} in | |
15604 | *mingw32*) | |
15605 | ||
81ecdfbb | 15606 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
15607 | |
15608 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
15609 | ;; | |
15610 | esac | |
15611 | ||
7a292a7a | 15612 | |
31d99776 | 15613 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
15614 | |
15615 | OLD_CFLAGS=$CFLAGS | |
15616 | OLD_LDFLAGS=$LDFLAGS | |
15617 | OLD_LIBS=$LIBS | |
15618 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15619 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15620 | # always want our bfd. | |
15621 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15622 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15623 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 15624 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15625 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 15626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb | 15627 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
d0ac1c44 | 15628 | if ${gdb_cv_var_elf+:} false; then : |
81ecdfbb | 15629 | $as_echo_n "(cached) " >&6 |
31d99776 | 15630 | else |
81ecdfbb | 15631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
15632 | /* end confdefs.h. */ |
15633 | #include <stdlib.h> | |
def63ff0 TT |
15634 | #include "bfd.h" |
15635 | #include "elf-bfd.h" | |
31d99776 DJ |
15636 | |
15637 | int | |
15638 | main () | |
15639 | { | |
def63ff0 | 15640 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
15641 | ; |
15642 | return 0; | |
15643 | } | |
15644 | _ACEOF | |
81ecdfbb | 15645 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
15646 | gdb_cv_var_elf=yes |
15647 | else | |
81ecdfbb | 15648 | gdb_cv_var_elf=no |
31d99776 | 15649 | fi |
81ecdfbb RW |
15650 | rm -f core conftest.err conftest.$ac_objext \ |
15651 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 15652 | fi |
81ecdfbb RW |
15653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
15654 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
15655 | CFLAGS=$OLD_CFLAGS |
15656 | LDFLAGS=$OLD_LDFLAGS | |
15657 | LIBS=$OLD_LIBS | |
31d99776 | 15658 | if test $gdb_cv_var_elf = yes; then |
d4777acb | 15659 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 15660 | |
81ecdfbb | 15661 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 15662 | |
075ff26d JK |
15663 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
15664 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
15665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
15666 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 15667 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
15668 | $as_echo_n "(cached) " >&6 |
15669 | else | |
15670 | ac_func_search_save_LIBS=$LIBS | |
15671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15672 | /* end confdefs.h. */ | |
15673 | ||
15674 | /* Override any GCC internal prototype to avoid an error. | |
15675 | Use char because int might match the return type of a GCC | |
15676 | builtin and then its argument prototype would still apply. */ | |
15677 | #ifdef __cplusplus | |
15678 | extern "C" | |
15679 | #endif | |
15680 | char dlopen (); | |
15681 | int | |
15682 | main () | |
15683 | { | |
15684 | return dlopen (); | |
15685 | ; | |
15686 | return 0; | |
15687 | } | |
15688 | _ACEOF | |
15689 | for ac_lib in '' dl; do | |
15690 | if test -z "$ac_lib"; then | |
15691 | ac_res="none required" | |
15692 | else | |
15693 | ac_res=-l$ac_lib | |
15694 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
15695 | fi | |
15696 | if ac_fn_c_try_link "$LINENO"; then : | |
15697 | ac_cv_search_dlopen=$ac_res | |
15698 | fi | |
15699 | rm -f core conftest.err conftest.$ac_objext \ | |
15700 | conftest$ac_exeext | |
d0ac1c44 | 15701 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
15702 | break |
15703 | fi | |
15704 | done | |
d0ac1c44 | 15705 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
15706 | |
15707 | else | |
15708 | ac_cv_search_dlopen=no | |
15709 | fi | |
15710 | rm conftest.$ac_ext | |
15711 | LIBS=$ac_func_search_save_LIBS | |
15712 | fi | |
15713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
15714 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
15715 | ac_res=$ac_cv_search_dlopen | |
15716 | if test "$ac_res" != no; then : | |
15717 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
15718 | ||
15719 | fi | |
15720 | ||
075ff26d | 15721 | fi |
31d99776 | 15722 | fi |
31d99776 | 15723 | |
4f05add4 TT |
15724 | # Add macho support to GDB, but only if BFD includes it. |
15725 | ||
15726 | OLD_CFLAGS=$CFLAGS | |
15727 | OLD_LDFLAGS=$LDFLAGS | |
15728 | OLD_LIBS=$LIBS | |
15729 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
15730 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
15731 | # always want our bfd. | |
15732 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
15733 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
15734 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 15735 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 15736 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
15737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
15738 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
d0ac1c44 | 15739 | if ${gdb_cv_var_macho+:} false; then : |
4f05add4 TT |
15740 | $as_echo_n "(cached) " >&6 |
15741 | else | |
15742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15743 | /* end confdefs.h. */ | |
15744 | #include <stdlib.h> | |
15745 | #include "bfd.h" | |
15746 | #include "mach-o.h" | |
15747 | ||
15748 | int | |
15749 | main () | |
15750 | { | |
15751 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
15752 | ; | |
15753 | return 0; | |
15754 | } | |
15755 | _ACEOF | |
15756 | if ac_fn_c_try_link "$LINENO"; then : | |
15757 | gdb_cv_var_macho=yes | |
15758 | else | |
15759 | gdb_cv_var_macho=no | |
15760 | fi | |
15761 | rm -f core conftest.err conftest.$ac_objext \ | |
15762 | conftest$ac_exeext conftest.$ac_ext | |
15763 | fi | |
15764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
15765 | $as_echo "$gdb_cv_var_macho" >&6; } | |
15766 | CFLAGS=$OLD_CFLAGS | |
15767 | LDFLAGS=$OLD_LDFLAGS | |
15768 | LIBS=$OLD_LIBS | |
15769 | if test $gdb_cv_var_macho = yes; then | |
15770 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
15771 | fi | |
15772 | ||
121ce6e5 DJ |
15773 | # Add any host-specific objects to GDB. |
15774 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
15775 | ||
608e2dbb TT |
15776 | # If building on ELF, look for lzma support for embedded compressed debug info. |
15777 | if test $gdb_cv_var_elf = yes; then | |
15778 | ||
15779 | # Check whether --with-lzma was given. | |
15780 | if test "${with_lzma+set}" = set; then : | |
15781 | withval=$with_lzma; | |
15782 | else | |
15783 | with_lzma=auto | |
15784 | fi | |
15785 | ||
15786 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
15787 | $as_echo_n "checking whether to use lzma... " >&6; } | |
15788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
15789 | $as_echo "$with_lzma" >&6; } | |
15790 | ||
15791 | if test "${with_lzma}" != no; then | |
15792 | ||
15793 | ||
15794 | ||
15795 | ||
15796 | ||
15797 | ||
15798 | ||
15799 | ||
15800 | use_additional=yes | |
15801 | ||
15802 | acl_save_prefix="$prefix" | |
15803 | prefix="$acl_final_prefix" | |
15804 | acl_save_exec_prefix="$exec_prefix" | |
15805 | exec_prefix="$acl_final_exec_prefix" | |
15806 | ||
15807 | eval additional_includedir=\"$includedir\" | |
15808 | eval additional_libdir=\"$libdir\" | |
15809 | ||
15810 | exec_prefix="$acl_save_exec_prefix" | |
15811 | prefix="$acl_save_prefix" | |
15812 | ||
15813 | ||
15814 | # Check whether --with-liblzma-prefix was given. | |
15815 | if test "${with_liblzma_prefix+set}" = set; then : | |
15816 | withval=$with_liblzma_prefix; | |
15817 | if test "X$withval" = "Xno"; then | |
15818 | use_additional=no | |
15819 | else | |
15820 | if test "X$withval" = "X"; then | |
15821 | ||
15822 | acl_save_prefix="$prefix" | |
15823 | prefix="$acl_final_prefix" | |
15824 | acl_save_exec_prefix="$exec_prefix" | |
15825 | exec_prefix="$acl_final_exec_prefix" | |
15826 | ||
15827 | eval additional_includedir=\"$includedir\" | |
15828 | eval additional_libdir=\"$libdir\" | |
15829 | ||
15830 | exec_prefix="$acl_save_exec_prefix" | |
15831 | prefix="$acl_save_prefix" | |
15832 | ||
15833 | else | |
15834 | additional_includedir="$withval/include" | |
15835 | additional_libdir="$withval/lib" | |
15836 | fi | |
15837 | fi | |
15838 | ||
15839 | fi | |
15840 | ||
15841 | LIBLZMA= | |
15842 | LTLIBLZMA= | |
15843 | INCLZMA= | |
15844 | rpathdirs= | |
15845 | ltrpathdirs= | |
15846 | names_already_handled= | |
15847 | names_next_round='lzma ' | |
15848 | while test -n "$names_next_round"; do | |
15849 | names_this_round="$names_next_round" | |
15850 | names_next_round= | |
15851 | for name in $names_this_round; do | |
15852 | already_handled= | |
15853 | for n in $names_already_handled; do | |
15854 | if test "$n" = "$name"; then | |
15855 | already_handled=yes | |
15856 | break | |
15857 | fi | |
15858 | done | |
15859 | if test -z "$already_handled"; then | |
15860 | names_already_handled="$names_already_handled $name" | |
15861 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
15862 | eval value=\"\$HAVE_LIB$uppername\" | |
15863 | if test -n "$value"; then | |
15864 | if test "$value" = yes; then | |
15865 | eval value=\"\$LIB$uppername\" | |
15866 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
15867 | eval value=\"\$LTLIB$uppername\" | |
15868 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
15869 | else | |
15870 | : | |
15871 | fi | |
15872 | else | |
15873 | found_dir= | |
15874 | found_la= | |
15875 | found_so= | |
15876 | found_a= | |
15877 | if test $use_additional = yes; then | |
15878 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
15879 | found_dir="$additional_libdir" | |
15880 | found_so="$additional_libdir/lib$name.$shlibext" | |
15881 | if test -f "$additional_libdir/lib$name.la"; then | |
15882 | found_la="$additional_libdir/lib$name.la" | |
15883 | fi | |
15884 | else | |
15885 | if test -f "$additional_libdir/lib$name.$libext"; then | |
15886 | found_dir="$additional_libdir" | |
15887 | found_a="$additional_libdir/lib$name.$libext" | |
15888 | if test -f "$additional_libdir/lib$name.la"; then | |
15889 | found_la="$additional_libdir/lib$name.la" | |
15890 | fi | |
15891 | fi | |
15892 | fi | |
15893 | fi | |
15894 | if test "X$found_dir" = "X"; then | |
15895 | for x in $LDFLAGS $LTLIBLZMA; do | |
15896 | ||
15897 | acl_save_prefix="$prefix" | |
15898 | prefix="$acl_final_prefix" | |
15899 | acl_save_exec_prefix="$exec_prefix" | |
15900 | exec_prefix="$acl_final_exec_prefix" | |
15901 | eval x=\"$x\" | |
15902 | exec_prefix="$acl_save_exec_prefix" | |
15903 | prefix="$acl_save_prefix" | |
15904 | ||
15905 | case "$x" in | |
15906 | -L*) | |
15907 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
15908 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
15909 | found_dir="$dir" | |
15910 | found_so="$dir/lib$name.$shlibext" | |
15911 | if test -f "$dir/lib$name.la"; then | |
15912 | found_la="$dir/lib$name.la" | |
15913 | fi | |
15914 | else | |
15915 | if test -f "$dir/lib$name.$libext"; then | |
15916 | found_dir="$dir" | |
15917 | found_a="$dir/lib$name.$libext" | |
15918 | if test -f "$dir/lib$name.la"; then | |
15919 | found_la="$dir/lib$name.la" | |
15920 | fi | |
15921 | fi | |
15922 | fi | |
15923 | ;; | |
15924 | esac | |
15925 | if test "X$found_dir" != "X"; then | |
15926 | break | |
15927 | fi | |
15928 | done | |
15929 | fi | |
15930 | if test "X$found_dir" != "X"; then | |
15931 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
15932 | if test "X$found_so" != "X"; then | |
15933 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
15934 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15935 | else | |
15936 | haveit= | |
15937 | for x in $ltrpathdirs; do | |
15938 | if test "X$x" = "X$found_dir"; then | |
15939 | haveit=yes | |
15940 | break | |
15941 | fi | |
15942 | done | |
15943 | if test -z "$haveit"; then | |
15944 | ltrpathdirs="$ltrpathdirs $found_dir" | |
15945 | fi | |
15946 | if test "$hardcode_direct" = yes; then | |
15947 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15948 | else | |
15949 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
15950 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15951 | haveit= | |
15952 | for x in $rpathdirs; do | |
15953 | if test "X$x" = "X$found_dir"; then | |
15954 | haveit=yes | |
15955 | break | |
15956 | fi | |
15957 | done | |
15958 | if test -z "$haveit"; then | |
15959 | rpathdirs="$rpathdirs $found_dir" | |
15960 | fi | |
15961 | else | |
15962 | haveit= | |
15963 | for x in $LDFLAGS $LIBLZMA; do | |
15964 | ||
15965 | acl_save_prefix="$prefix" | |
15966 | prefix="$acl_final_prefix" | |
15967 | acl_save_exec_prefix="$exec_prefix" | |
15968 | exec_prefix="$acl_final_exec_prefix" | |
15969 | eval x=\"$x\" | |
15970 | exec_prefix="$acl_save_exec_prefix" | |
15971 | prefix="$acl_save_prefix" | |
15972 | ||
15973 | if test "X$x" = "X-L$found_dir"; then | |
15974 | haveit=yes | |
15975 | break | |
15976 | fi | |
15977 | done | |
15978 | if test -z "$haveit"; then | |
15979 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
15980 | fi | |
15981 | if test "$hardcode_minus_L" != no; then | |
15982 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
15983 | else | |
15984 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
15985 | fi | |
15986 | fi | |
15987 | fi | |
15988 | fi | |
15989 | else | |
15990 | if test "X$found_a" != "X"; then | |
15991 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
15992 | else | |
15993 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
15994 | fi | |
15995 | fi | |
15996 | additional_includedir= | |
15997 | case "$found_dir" in | |
15998 | */lib | */lib/) | |
15999 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
16000 | additional_includedir="$basedir/include" | |
16001 | ;; | |
16002 | esac | |
16003 | if test "X$additional_includedir" != "X"; then | |
16004 | if test "X$additional_includedir" != "X/usr/include"; then | |
16005 | haveit= | |
16006 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
16007 | if test -n "$GCC"; then | |
16008 | case $host_os in | |
16009 | linux*) haveit=yes;; | |
16010 | esac | |
16011 | fi | |
16012 | fi | |
16013 | if test -z "$haveit"; then | |
16014 | for x in $CPPFLAGS $INCLZMA; do | |
16015 | ||
16016 | acl_save_prefix="$prefix" | |
16017 | prefix="$acl_final_prefix" | |
16018 | acl_save_exec_prefix="$exec_prefix" | |
16019 | exec_prefix="$acl_final_exec_prefix" | |
16020 | eval x=\"$x\" | |
16021 | exec_prefix="$acl_save_exec_prefix" | |
16022 | prefix="$acl_save_prefix" | |
16023 | ||
16024 | if test "X$x" = "X-I$additional_includedir"; then | |
16025 | haveit=yes | |
16026 | break | |
16027 | fi | |
16028 | done | |
16029 | if test -z "$haveit"; then | |
16030 | if test -d "$additional_includedir"; then | |
16031 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
16032 | fi | |
16033 | fi | |
16034 | fi | |
16035 | fi | |
16036 | fi | |
16037 | if test -n "$found_la"; then | |
16038 | save_libdir="$libdir" | |
16039 | case "$found_la" in | |
16040 | */* | *\\*) . "$found_la" ;; | |
16041 | *) . "./$found_la" ;; | |
16042 | esac | |
16043 | libdir="$save_libdir" | |
16044 | for dep in $dependency_libs; do | |
16045 | case "$dep" in | |
16046 | -L*) | |
16047 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
16048 | if test "X$additional_libdir" != "X/usr/lib"; then | |
16049 | haveit= | |
16050 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
16051 | if test -n "$GCC"; then | |
16052 | case $host_os in | |
16053 | linux*) haveit=yes;; | |
16054 | esac | |
16055 | fi | |
16056 | fi | |
16057 | if test -z "$haveit"; then | |
16058 | haveit= | |
16059 | for x in $LDFLAGS $LIBLZMA; do | |
16060 | ||
16061 | acl_save_prefix="$prefix" | |
16062 | prefix="$acl_final_prefix" | |
16063 | acl_save_exec_prefix="$exec_prefix" | |
16064 | exec_prefix="$acl_final_exec_prefix" | |
16065 | eval x=\"$x\" | |
16066 | exec_prefix="$acl_save_exec_prefix" | |
16067 | prefix="$acl_save_prefix" | |
16068 | ||
16069 | if test "X$x" = "X-L$additional_libdir"; then | |
16070 | haveit=yes | |
16071 | break | |
16072 | fi | |
16073 | done | |
16074 | if test -z "$haveit"; then | |
16075 | if test -d "$additional_libdir"; then | |
16076 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
16077 | fi | |
16078 | fi | |
16079 | haveit= | |
16080 | for x in $LDFLAGS $LTLIBLZMA; do | |
16081 | ||
16082 | acl_save_prefix="$prefix" | |
16083 | prefix="$acl_final_prefix" | |
16084 | acl_save_exec_prefix="$exec_prefix" | |
16085 | exec_prefix="$acl_final_exec_prefix" | |
16086 | eval x=\"$x\" | |
16087 | exec_prefix="$acl_save_exec_prefix" | |
16088 | prefix="$acl_save_prefix" | |
16089 | ||
16090 | if test "X$x" = "X-L$additional_libdir"; then | |
16091 | haveit=yes | |
16092 | break | |
16093 | fi | |
16094 | done | |
16095 | if test -z "$haveit"; then | |
16096 | if test -d "$additional_libdir"; then | |
16097 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
16098 | fi | |
16099 | fi | |
16100 | fi | |
16101 | fi | |
16102 | ;; | |
16103 | -R*) | |
16104 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
16105 | if test "$enable_rpath" != no; then | |
16106 | haveit= | |
16107 | for x in $rpathdirs; do | |
16108 | if test "X$x" = "X$dir"; then | |
16109 | haveit=yes | |
16110 | break | |
16111 | fi | |
16112 | done | |
16113 | if test -z "$haveit"; then | |
16114 | rpathdirs="$rpathdirs $dir" | |
16115 | fi | |
16116 | haveit= | |
16117 | for x in $ltrpathdirs; do | |
16118 | if test "X$x" = "X$dir"; then | |
16119 | haveit=yes | |
16120 | break | |
16121 | fi | |
16122 | done | |
16123 | if test -z "$haveit"; then | |
16124 | ltrpathdirs="$ltrpathdirs $dir" | |
16125 | fi | |
16126 | fi | |
16127 | ;; | |
16128 | -l*) | |
16129 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
16130 | ;; | |
16131 | *.la) | |
16132 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
16133 | ;; | |
16134 | *) | |
16135 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
16136 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
16137 | ;; | |
16138 | esac | |
16139 | done | |
16140 | fi | |
16141 | else | |
16142 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
16143 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
16144 | fi | |
16145 | fi | |
16146 | fi | |
16147 | done | |
16148 | done | |
16149 | if test "X$rpathdirs" != "X"; then | |
16150 | if test -n "$hardcode_libdir_separator"; then | |
16151 | alldirs= | |
16152 | for found_dir in $rpathdirs; do | |
16153 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
16154 | done | |
16155 | acl_save_libdir="$libdir" | |
16156 | libdir="$alldirs" | |
16157 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16158 | libdir="$acl_save_libdir" | |
16159 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16160 | else | |
16161 | for found_dir in $rpathdirs; do | |
16162 | acl_save_libdir="$libdir" | |
16163 | libdir="$found_dir" | |
16164 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16165 | libdir="$acl_save_libdir" | |
16166 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16167 | done | |
16168 | fi | |
16169 | fi | |
16170 | if test "X$ltrpathdirs" != "X"; then | |
16171 | for found_dir in $ltrpathdirs; do | |
16172 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
16173 | done | |
16174 | fi | |
16175 | ||
16176 | ||
16177 | ac_save_CPPFLAGS="$CPPFLAGS" | |
16178 | ||
16179 | for element in $INCLZMA; do | |
16180 | haveit= | |
16181 | for x in $CPPFLAGS; do | |
16182 | ||
16183 | acl_save_prefix="$prefix" | |
16184 | prefix="$acl_final_prefix" | |
16185 | acl_save_exec_prefix="$exec_prefix" | |
16186 | exec_prefix="$acl_final_exec_prefix" | |
16187 | eval x=\"$x\" | |
16188 | exec_prefix="$acl_save_exec_prefix" | |
16189 | prefix="$acl_save_prefix" | |
16190 | ||
16191 | if test "X$x" = "X$element"; then | |
16192 | haveit=yes | |
16193 | break | |
16194 | fi | |
16195 | done | |
16196 | if test -z "$haveit"; then | |
16197 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
16198 | fi | |
16199 | done | |
16200 | ||
16201 | ||
16202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
16203 | $as_echo_n "checking for liblzma... " >&6; } | |
d0ac1c44 | 16204 | if ${ac_cv_liblzma+:} false; then : |
608e2dbb TT |
16205 | $as_echo_n "(cached) " >&6 |
16206 | else | |
16207 | ||
16208 | ac_save_LIBS="$LIBS" | |
16209 | LIBS="$LIBS $LIBLZMA" | |
16210 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16211 | /* end confdefs.h. */ | |
16212 | #include "lzma.h" | |
16213 | int | |
16214 | main () | |
16215 | { | |
16216 | lzma_index_iter iter; | |
16217 | lzma_index_iter_init (&iter, 0); | |
16218 | lzma_mf_is_supported (LZMA_MF_HC3); | |
16219 | ; | |
16220 | return 0; | |
16221 | } | |
16222 | _ACEOF | |
16223 | if ac_fn_c_try_link "$LINENO"; then : | |
16224 | ac_cv_liblzma=yes | |
16225 | else | |
16226 | ac_cv_liblzma=no | |
16227 | fi | |
16228 | rm -f core conftest.err conftest.$ac_objext \ | |
16229 | conftest$ac_exeext conftest.$ac_ext | |
16230 | LIBS="$ac_save_LIBS" | |
16231 | ||
16232 | fi | |
16233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
16234 | $as_echo "$ac_cv_liblzma" >&6; } | |
16235 | if test "$ac_cv_liblzma" = yes; then | |
16236 | HAVE_LIBLZMA=yes | |
16237 | ||
16238 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
16239 | ||
16240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
16241 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
16242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
16243 | $as_echo "$LIBLZMA" >&6; } | |
16244 | else | |
16245 | HAVE_LIBLZMA=no | |
16246 | CPPFLAGS="$ac_save_CPPFLAGS" | |
16247 | LIBLZMA= | |
16248 | LTLIBLZMA= | |
16249 | fi | |
16250 | ||
16251 | ||
16252 | ||
16253 | ||
16254 | ||
16255 | ||
16256 | if test "$HAVE_LIBLZMA" != yes; then | |
16257 | if test "$with_lzma" = yes; then | |
d0ac1c44 | 16258 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
608e2dbb TT |
16259 | fi |
16260 | fi | |
16261 | fi | |
16262 | fi | |
16263 | ||
3fc11d3e JM |
16264 | LIBGUI="../libgui/src/libgui.a" |
16265 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
16266 | ||
16267 | ||
7a292a7a | 16268 | |
3fc11d3e JM |
16269 | WIN32LDAPP= |
16270 | ||
16271 | ||
16272 | ||
d91670b9 | 16273 | case "${host}" in |
686a5eed | 16274 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
16275 | configdir="win" |
16276 | ;; | |
16277 | *) | |
16278 | configdir="unix" | |
16279 | ;; | |
16280 | esac | |
3fc11d3e JM |
16281 | |
16282 | GDBTKLIBS= | |
16283 | if test "${enable_gdbtk}" = "yes"; then | |
16284 | ||
d1c3b63a KS |
16285 | # Gdbtk must have an absolute path to srcdir in order to run |
16286 | # properly when not installed. | |
16287 | here=`pwd` | |
16288 | cd ${srcdir} | |
16289 | GDBTK_SRC_DIR=`pwd` | |
16290 | cd $here | |
16291 | ||
bec39cab | 16292 | |
5062cc19 KS |
16293 | # |
16294 | # Ok, lets find the tcl configuration | |
16295 | # First, look for one uninstalled. | |
16296 | # the alternative search directory is invoked by --with-tcl | |
16297 | # | |
3fc11d3e | 16298 | |
5062cc19 KS |
16299 | if test x"${no_tcl}" = x ; then |
16300 | # we reset no_tcl in case something fails here | |
16301 | no_tcl=true | |
bec39cab | 16302 | |
81ecdfbb RW |
16303 | # Check whether --with-tcl was given. |
16304 | if test "${with_tcl+set}" = set; then : | |
16305 | withval=$with_tcl; with_tclconfig=${withval} | |
16306 | fi | |
16307 | ||
16308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
16309 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
d0ac1c44 | 16310 | if ${ac_cv_c_tclconfig+:} false; then : |
81ecdfbb | 16311 | $as_echo_n "(cached) " >&6 |
3fc11d3e | 16312 | else |
bec39cab | 16313 | |
3fc11d3e | 16314 | |
5062cc19 KS |
16315 | # First check to see if --with-tcl was specified. |
16316 | case "${host}" in | |
16317 | *-*-cygwin*) platDir="win" ;; | |
16318 | *) platDir="unix" ;; | |
16319 | esac | |
16320 | if test x"${with_tclconfig}" != x ; then | |
16321 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
16322 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
16323 | else | |
d0ac1c44 | 16324 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16325 | fi |
16326 | fi | |
16327 | ||
16328 | # then check for a private Tcl installation | |
16329 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16330 | for i in \ | |
16331 | ../tcl \ | |
16332 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16333 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
16334 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16335 | ../../tcl \ | |
16336 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16337 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16338 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16339 | ../../../tcl \ | |
16340 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16341 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16342 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16343 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16344 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16345 | break | |
16346 | fi | |
16347 | done | |
16348 | fi | |
16349 | ||
16350 | # on Darwin, check in Framework installation locations | |
16351 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
16352 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16353 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16354 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16355 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16356 | ; do | |
16357 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
16358 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
16359 | break | |
16360 | fi | |
16361 | done | |
16362 | fi | |
16363 | ||
16364 | # check in a few common install locations | |
16365 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16366 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16367 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16368 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16369 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16370 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16371 | `ls -d /usr/lib 2>/dev/null` \ | |
16372 | ; do | |
16373 | if test -f "$i/tclConfig.sh" ; then | |
16374 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
16375 | break | |
16376 | fi | |
16377 | done | |
16378 | fi | |
3fc11d3e | 16379 | |
5062cc19 KS |
16380 | # check in a few other private locations |
16381 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16382 | for i in \ | |
16383 | ${srcdir}/../tcl \ | |
16384 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16385 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
16386 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16387 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16388 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16389 | break | |
16390 | fi | |
16391 | done | |
16392 | fi | |
bec39cab | 16393 | |
3fc11d3e JM |
16394 | fi |
16395 | ||
5062cc19 KS |
16396 | |
16397 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16398 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
16399 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
16400 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
16401 | else |
16402 | no_tcl= | |
16403 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
16404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16405 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
16406 | fi |
16407 | fi | |
3fc11d3e | 16408 | |
bec39cab | 16409 | |
85541719 DE |
16410 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
16411 | # point to doing Tcl. | |
bec39cab | 16412 | |
5062cc19 KS |
16413 | # |
16414 | # Ok, lets find the tk configuration | |
16415 | # First, look for one uninstalled. | |
16416 | # the alternative search directory is invoked by --with-tk | |
16417 | # | |
3fc11d3e | 16418 | |
5062cc19 KS |
16419 | if test x"${no_tk}" = x ; then |
16420 | # we reset no_tk in case something fails here | |
16421 | no_tk=true | |
bec39cab | 16422 | |
81ecdfbb RW |
16423 | # Check whether --with-tk was given. |
16424 | if test "${with_tk+set}" = set; then : | |
16425 | withval=$with_tk; with_tkconfig=${withval} | |
16426 | fi | |
16427 | ||
16428 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
16429 | $as_echo_n "checking for Tk configuration... " >&6; } | |
d0ac1c44 | 16430 | if ${ac_cv_c_tkconfig+:} false; then : |
81ecdfbb | 16431 | $as_echo_n "(cached) " >&6 |
bec39cab | 16432 | else |
3fc11d3e JM |
16433 | |
16434 | ||
5062cc19 KS |
16435 | # First check to see if --with-tkconfig was specified. |
16436 | if test x"${with_tkconfig}" != x ; then | |
16437 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
16438 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
16439 | else | |
d0ac1c44 | 16440 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16441 | fi |
16442 | fi | |
3fc11d3e | 16443 | |
5062cc19 KS |
16444 | # then check for a private Tk library |
16445 | case "${host}" in | |
16446 | *-*-cygwin*) platDir="win" ;; | |
16447 | *) platDir="unix" ;; | |
16448 | esac | |
16449 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16450 | for i in \ | |
16451 | ../tk \ | |
16452 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16453 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
16454 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
16455 | ../../tk \ | |
16456 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16457 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
16458 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
16459 | ../../../tk \ | |
16460 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16461 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
16462 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16463 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16464 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16465 | break | |
16466 | fi | |
16467 | done | |
16468 | fi | |
16469 | ||
16470 | # on Darwin, check in Framework installation locations | |
16471 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
16472 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16473 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16474 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16475 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16476 | ; do | |
16477 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
16478 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
16479 | break | |
16480 | fi | |
16481 | done | |
16482 | fi | |
16483 | ||
16484 | # check in a few common install locations | |
16485 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16486 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16487 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16488 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16489 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16490 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16491 | `ls -d /usr/lib 2>/dev/null` \ | |
16492 | ; do | |
16493 | if test -f "$i/tkConfig.sh" ; then | |
16494 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
16495 | break | |
16496 | fi | |
16497 | done | |
16498 | fi | |
16499 | # check in a few other private locations | |
16500 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16501 | for i in \ | |
16502 | ${srcdir}/../tk \ | |
16503 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16504 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
16505 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16506 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16507 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16508 | break | |
16509 | fi | |
16510 | done | |
16511 | fi | |
3fc11d3e | 16512 | |
3fc11d3e JM |
16513 | fi |
16514 | ||
16515 | ||
5062cc19 KS |
16516 | if test x"${ac_cv_c_tkconfig}" = x ; then |
16517 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
16518 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
16519 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
16520 | else |
16521 | no_tk= | |
16522 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
16523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16524 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 16525 | fi |
3fc11d3e | 16526 | fi |
dd2504ab | 16527 | |
dd2504ab | 16528 | |
85541719 DE |
16529 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
16530 | ||
81ecdfbb RW |
16531 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16532 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
16533 | |
16534 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
16535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16536 | $as_echo "loading" >&6; } | |
85541719 DE |
16537 | . ${TCL_BIN_DIR}/tclConfig.sh |
16538 | else | |
81ecdfbb RW |
16539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16540 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
16541 | fi |
16542 | ||
16543 | # eval is required to do the TCL_DBGX substitution | |
16544 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
16545 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
16546 | ||
16547 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
16548 | # then set the common variable name to the value of the build variables. | |
16549 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
16550 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
16551 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
16552 | # installed and uninstalled version of Tcl. | |
16553 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
16554 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
16555 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
16556 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
16557 | elif test "`uname -s`" = "Darwin"; then | |
16558 | # If Tcl was built as a framework, attempt to use the libraries | |
16559 | # from the framework at the given location so that linking works | |
a68ffae9 | 16560 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
16561 | case ${TCL_DEFS} in |
16562 | *TCL_FRAMEWORK*) | |
16563 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
16564 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
16565 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
16566 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
16567 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
16568 | break | |
16569 | fi | |
16570 | done | |
16571 | fi | |
16572 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
16573 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
16574 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
16575 | fi | |
16576 | ;; | |
16577 | esac | |
16578 | fi | |
16579 | ||
16580 | # eval is required to do the TCL_DBGX substitution | |
16581 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
16582 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
16583 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
16584 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
16585 | ||
16586 | ||
16587 | ||
16588 | ||
16589 | ||
16590 | ||
16591 | ||
16592 | ||
16593 | ||
16594 | ||
16595 | ||
16596 | ||
16597 | ||
16598 | ||
16599 | ||
16600 | # Check for in-tree tcl | |
16601 | here=`pwd` | |
16602 | cd ${srcdir}/.. | |
16603 | topdir=`pwd` | |
16604 | cd ${here} | |
16605 | ||
16606 | intree="no" | |
16607 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
16608 | intree="yes" | |
16609 | fi | |
16610 | ||
16611 | # Find Tcl private headers | |
16612 | if test x"${intree}" = xno; then | |
16613 | ||
81ecdfbb RW |
16614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
16615 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
16616 | private_dir="" |
16617 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
16618 | if test -f ${dir}/tclInt.h ; then | |
16619 | private_dir=${dir} | |
16620 | fi | |
16621 | ||
16622 | if test x"${private_dir}" = x; then | |
d0ac1c44 | 16623 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
16624 | else |
16625 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
16626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16627 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
16628 | fi |
16629 | ||
16630 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
16631 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
16632 | TCL_DEPS="" | |
16633 | else | |
16634 | # If building tcl in the same src tree, private headers | |
16635 | # are not needed, but we need to be sure to use the right | |
16636 | # headers library | |
16637 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
16638 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
16639 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
16640 | fi | |
16641 | ||
16642 | ||
16643 | ||
16644 | ||
16645 | ||
81ecdfbb RW |
16646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16647 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 16648 | |
5062cc19 | 16649 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
16650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
16651 | $as_echo "loading" >&6; } | |
5062cc19 | 16652 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 16653 | else |
81ecdfbb RW |
16654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
16655 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 16656 | fi |
bec39cab | 16657 | |
5062cc19 KS |
16658 | # eval is required to do the TK_DBGX substitution |
16659 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
16660 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
16661 | ||
16662 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
16663 | # then set the common variable name to the value of the build variables. | |
16664 | # For example, the variable TK_LIB_SPEC will be set to the value | |
16665 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
16666 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
16667 | # installed and uninstalled version of Tcl. | |
85541719 | 16668 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
16669 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
16670 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
16671 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
16672 | elif test "`uname -s`" = "Darwin"; then | |
16673 | # If Tk was built as a framework, attempt to use the libraries | |
16674 | # from the framework at the given location so that linking works | |
a68ffae9 | 16675 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
16676 | case ${TK_DEFS} in |
16677 | *TK_FRAMEWORK*) | |
85541719 | 16678 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
16679 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
16680 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
16681 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
16682 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
16683 | break | |
16684 | fi | |
16685 | done | |
16686 | fi | |
85541719 | 16687 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
16688 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
16689 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
16690 | fi | |
16691 | ;; | |
16692 | esac | |
3fc11d3e JM |
16693 | fi |
16694 | ||
5062cc19 KS |
16695 | # eval is required to do the TK_DBGX substitution |
16696 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
16697 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
16698 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
16699 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 16700 | |
3fc11d3e JM |
16701 | |
16702 | ||
bec39cab AC |
16703 | |
16704 | ||
16705 | ||
16706 | ||
16707 | ||
16708 | ||
16709 | ||
3fc11d3e | 16710 | |
3fc11d3e | 16711 | |
bec39cab | 16712 | |
bec39cab | 16713 | |
85541719 DE |
16714 | # Check for in-tree Tk |
16715 | intree="no" | |
16716 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
16717 | intree="yes" | |
16718 | fi | |
3fc11d3e | 16719 | |
85541719 DE |
16720 | # Find Tk private headers |
16721 | if test x"${intree}" = xno; then | |
3fc11d3e | 16722 | |
81ecdfbb RW |
16723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
16724 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
16725 | private_dir="" |
16726 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
16727 | if test -f ${dir}/tkInt.h; then | |
16728 | private_dir=${dir} | |
3fc11d3e | 16729 | fi |
bec39cab | 16730 | |
5062cc19 | 16731 | if test x"${private_dir}" = x; then |
d0ac1c44 | 16732 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 16733 | else |
5062cc19 | 16734 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
16735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
16736 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 16737 | fi |
3fc11d3e | 16738 | |
85541719 DE |
16739 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
16740 | TK_LIBRARY=${TK_LIB_SPEC} | |
16741 | TK_DEPS="" | |
16742 | else | |
16743 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
16744 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
16745 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
16746 | fi | |
3fc11d3e JM |
16747 | |
16748 | ||
3fc11d3e JM |
16749 | |
16750 | ||
3fc11d3e | 16751 | |
85541719 | 16752 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 16753 | |
85541719 DE |
16754 | # Include some libraries that Tcl and Tk want. |
16755 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
16756 | # Yes, the ordering seems wrong here. But it isn't. | |
16757 | # TK_LIBS is the list of libraries that need to be linked | |
16758 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
16759 | # were in LIBS then any link tests after this point would | |
16760 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
16761 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 16762 | |
85541719 DE |
16763 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
16764 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
16765 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
16766 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
16767 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
16768 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
16769 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 16770 | |
85541719 DE |
16771 | if test x$gdb_cv_os_cygwin = xyes; then |
16772 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
16773 | WIN32LDAPP="-Wl,--subsystem,console" | |
16774 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 16775 | fi |
ffc6a242 | 16776 | |
81ecdfbb | 16777 | subdirs="$subdirs gdbtk" |
3ace7edb | 16778 | |
85541719 | 16779 | fi |
3fc11d3e JM |
16780 | fi |
16781 | ||
16782 | ||
16783 | ||
16784 | ||
16785 | ||
16786 | ||
16787 | ||
16788 | ||
81ecdfbb RW |
16789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
16790 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 16791 | |
c906108c | 16792 | |
81ecdfbb RW |
16793 | # Check whether --with-x was given. |
16794 | if test "${with_x+set}" = set; then : | |
16795 | withval=$with_x; | |
16796 | fi | |
c906108c SS |
16797 | |
16798 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
16799 | if test "x$with_x" = xno; then | |
16800 | # The user explicitly disabled X. | |
16801 | have_x=disabled | |
16802 | else | |
81ecdfbb | 16803 | case $x_includes,$x_libraries in #( |
d0ac1c44 SM |
16804 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
16805 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
81ecdfbb | 16806 | $as_echo_n "(cached) " >&6 |
c906108c SS |
16807 | else |
16808 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 16809 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 16810 | rm -f -r conftest.dir |
bec39cab AC |
16811 | if mkdir conftest.dir; then |
16812 | cd conftest.dir | |
bec39cab | 16813 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
16814 | incroot: |
16815 | @echo incroot='${INCROOT}' | |
16816 | usrlibdir: | |
16817 | @echo usrlibdir='${USRLIBDIR}' | |
16818 | libdir: | |
16819 | @echo libdir='${LIBDIR}' | |
16820 | _ACEOF | |
16821 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d0ac1c44 | 16822 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
81ecdfbb RW |
16823 | for ac_var in incroot usrlibdir libdir; do |
16824 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
16825 | done | |
c906108c | 16826 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
16827 | for ac_extension in a so sl dylib la dll; do |
16828 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
16829 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 16830 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
16831 | fi |
16832 | done | |
16833 | # Screen out bogus values from the imake configuration. They are | |
16834 | # bogus both because they are the default anyway, and because | |
16835 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 16836 | case $ac_im_incroot in |
81ecdfbb | 16837 | /usr/include) ac_x_includes= ;; |
bec39cab | 16838 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 16839 | esac |
bec39cab | 16840 | case $ac_im_usrlibdir in |
81ecdfbb | 16841 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 16842 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
16843 | esac |
16844 | fi | |
16845 | cd .. | |
81ecdfbb | 16846 | rm -f -r conftest.dir |
c906108c SS |
16847 | fi |
16848 | ||
bec39cab AC |
16849 | # Standard set of common directories for X headers. |
16850 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
16851 | ac_x_header_dirs=' | |
16852 | /usr/X11/include | |
81ecdfbb | 16853 | /usr/X11R7/include |
bec39cab AC |
16854 | /usr/X11R6/include |
16855 | /usr/X11R5/include | |
16856 | /usr/X11R4/include | |
16857 | ||
16858 | /usr/include/X11 | |
81ecdfbb | 16859 | /usr/include/X11R7 |
bec39cab AC |
16860 | /usr/include/X11R6 |
16861 | /usr/include/X11R5 | |
16862 | /usr/include/X11R4 | |
16863 | ||
16864 | /usr/local/X11/include | |
81ecdfbb | 16865 | /usr/local/X11R7/include |
bec39cab AC |
16866 | /usr/local/X11R6/include |
16867 | /usr/local/X11R5/include | |
16868 | /usr/local/X11R4/include | |
16869 | ||
16870 | /usr/local/include/X11 | |
81ecdfbb | 16871 | /usr/local/include/X11R7 |
bec39cab AC |
16872 | /usr/local/include/X11R6 |
16873 | /usr/local/include/X11R5 | |
16874 | /usr/local/include/X11R4 | |
16875 | ||
16876 | /usr/X386/include | |
16877 | /usr/x386/include | |
16878 | /usr/XFree86/include/X11 | |
16879 | ||
16880 | /usr/include | |
16881 | /usr/local/include | |
16882 | /usr/unsupported/include | |
16883 | /usr/athena/include | |
16884 | /usr/local/x11r5/include | |
16885 | /usr/lpp/Xamples/include | |
16886 | ||
16887 | /usr/openwin/include | |
16888 | /usr/openwin/share/include' | |
16889 | ||
16890 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 16891 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 16892 | # First, try using that file with no special directory specified. |
81ecdfbb | 16893 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16894 | /* end confdefs.h. */ |
81ecdfbb | 16895 | #include <X11/Xlib.h> |
bec39cab | 16896 | _ACEOF |
81ecdfbb | 16897 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
16898 | # We can compile using X headers with no special include directory. |
16899 | ac_x_includes= | |
16900 | else | |
bec39cab | 16901 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 16902 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
16903 | ac_x_includes=$ac_dir |
16904 | break | |
16905 | fi | |
16906 | done | |
c906108c | 16907 | fi |
d0ac1c44 | 16908 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 16909 | fi # $ac_x_includes = no |
c906108c | 16910 | |
bec39cab | 16911 | if test "$ac_x_libraries" = no; then |
c906108c | 16912 | # Check for the libraries. |
c906108c SS |
16913 | # See if we find them without any special options. |
16914 | # Don't add to $LIBS permanently. | |
bec39cab | 16915 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
16916 | LIBS="-lX11 $LIBS" |
16917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16918 | /* end confdefs.h. */ |
81ecdfbb | 16919 | #include <X11/Xlib.h> |
bec39cab AC |
16920 | int |
16921 | main () | |
16922 | { | |
81ecdfbb | 16923 | XrmInitialize () |
bec39cab AC |
16924 | ; |
16925 | return 0; | |
16926 | } | |
16927 | _ACEOF | |
81ecdfbb | 16928 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16929 | LIBS=$ac_save_LIBS |
c906108c SS |
16930 | # We can link X programs with no special library path. |
16931 | ac_x_libraries= | |
16932 | else | |
81ecdfbb RW |
16933 | LIBS=$ac_save_LIBS |
16934 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 16935 | do |
bec39cab | 16936 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
16937 | for ac_extension in a so sl dylib la dll; do |
16938 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
16939 | ac_x_libraries=$ac_dir |
16940 | break 2 | |
16941 | fi | |
16942 | done | |
16943 | done | |
16944 | fi | |
81ecdfbb RW |
16945 | rm -f core conftest.err conftest.$ac_objext \ |
16946 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 16947 | fi # $ac_x_libraries = no |
c906108c | 16948 | |
81ecdfbb RW |
16949 | case $ac_x_includes,$ac_x_libraries in #( |
16950 | no,* | *,no | *\'*) | |
16951 | # Didn't find X, or a directory has "'" in its name. | |
16952 | ac_cv_have_x="have_x=no";; #( | |
16953 | *) | |
16954 | # Record where we found X for the cache. | |
16955 | ac_cv_have_x="have_x=yes\ | |
16956 | ac_x_includes='$ac_x_includes'\ | |
16957 | ac_x_libraries='$ac_x_libraries'" | |
16958 | esac | |
c906108c | 16959 | fi |
81ecdfbb RW |
16960 | ;; #( |
16961 | *) have_x=yes;; | |
16962 | esac | |
c906108c SS |
16963 | eval "$ac_cv_have_x" |
16964 | fi # $with_x != no | |
16965 | ||
16966 | if test "$have_x" != yes; then | |
81ecdfbb RW |
16967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
16968 | $as_echo "$have_x" >&6; } | |
c906108c SS |
16969 | no_x=yes |
16970 | else | |
16971 | # If each of the values was on the command line, it overrides each guess. | |
16972 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
16973 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
16974 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
16975 | ac_cv_have_x="have_x=yes\ |
16976 | ac_x_includes='$x_includes'\ | |
16977 | ac_x_libraries='$x_libraries'" | |
16978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
16979 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
16980 | fi |
16981 | ||
16982 | ||
bec39cab | 16983 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 16984 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
16985 | # This code just checks for a few cases where we'd like to ignore those |
16986 | # definitions, even when they're present in the '.mt' file. These cases | |
16987 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 16988 | # not part of the source tree. |
7a292a7a | 16989 | # |
81ecdfbb RW |
16990 | # Check whether --enable-sim was given. |
16991 | if test "${enable_sim+set}" = set; then : | |
16992 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
16993 | echo "enableval = ${enableval}"; |
16994 | case "${enableval}" in | |
16995 | yes) ignore_sim=false ;; | |
16996 | no) ignore_sim=true ;; | |
16997 | *) ignore_sim=false ;; | |
16998 | esac | |
16999 | else | |
17000 | ignore_sim=false | |
81ecdfbb RW |
17001 | fi |
17002 | ||
7a292a7a SS |
17003 | |
17004 | if test ! -d "${srcdir}/../sim"; then | |
17005 | ignore_sim=true | |
17006 | fi | |
17007 | ||
9b624dbe UW |
17008 | SIM= |
17009 | SIM_OBS= | |
17010 | if test "${ignore_sim}" = "false"; then | |
17011 | if test x"${gdb_sim}" != x ; then | |
17012 | SIM="${gdb_sim}" | |
17013 | SIM_OBS="remote-sim.o" | |
60ca704f | 17014 | |
81ecdfbb | 17015 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 17016 | |
976102cd PA |
17017 | |
17018 | # Some tdep code should only be compiled in when the ppc sim is | |
17019 | # built. PR sim/13418. | |
17020 | case $target in | |
17021 | powerpc*-*-*) | |
17022 | ||
17023 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
17024 | ||
17025 | ;; | |
17026 | esac | |
9b624dbe | 17027 | fi |
7a292a7a SS |
17028 | fi |
17029 | ||
17030 | ||
17031 | ||
c906108c SS |
17032 | |
17033 | ||
17034 | ||
17035 | ||
17036 | ||
17037 | ||
dfcd3bfb | 17038 | |
e56ac5c3 AC |
17039 | |
17040 | ||
b3a90332 AC |
17041 | |
17042 | ||
c35f4ffc | 17043 | # List of host floatformats. |
bec39cab AC |
17044 | |
17045 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17046 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 17047 | _ACEOF |
c35f4ffc | 17048 | |
bec39cab AC |
17049 | |
17050 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17051 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
17052 | _ACEOF |
17053 | ||
c35f4ffc | 17054 | |
bec39cab | 17055 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 17056 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 17057 | _ACEOF |
c35f4ffc AC |
17058 | |
17059 | ||
c906108c SS |
17060 | # target_subdir is used by the testsuite to find the target libraries. |
17061 | target_subdir= | |
17062 | if test "${host}" != "${target}"; then | |
17063 | target_subdir="${target_alias}/" | |
17064 | fi | |
17065 | ||
17066 | ||
21ea5acd | 17067 | # Import nat definitions. |
2b351b19 | 17068 | nat_makefile_frag=/dev/null |
771b4502 | 17069 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
17070 | . ${srcdir}/configure.nat |
17071 | nativefile=$NAT_FILE | |
c906108c | 17072 | fi |
c906108c | 17073 | |
c906108c SS |
17074 | |
17075 | ||
17076 | ||
21ea5acd SDJ |
17077 | |
17078 | ||
17079 | ||
17080 | ||
17081 | ||
c906108c SS |
17082 | |
17083 | ||
b00a8037 | 17084 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
17085 | |
17086 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 17087 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 17088 | _ACEOF |
b00a8037 DJ |
17089 | |
17090 | fi | |
17091 | ||
8dcde887 | 17092 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
17093 | # Check whether --enable-multi-ice was given. |
17094 | if test "${enable_multi_ice+set}" = set; then : | |
17095 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
17096 | yes | no) |
17097 | ;; | |
d0ac1c44 | 17098 | *) as_fn_error $? "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 17099 | esac |
81ecdfbb | 17100 | fi |
b4e70030 | 17101 | |
81ecdfbb RW |
17102 | if test "x$enable_multi_ice" = xyes; then |
17103 | subdirs="$subdirs multi-ice" | |
3ace7edb | 17104 | |
a85f51e7 DJ |
17105 | fi |
17106 | ||
496c0e1b JB |
17107 | # Check whether --enable-gdbserver was given. |
17108 | if test "${enable_gdbserver+set}" = set; then : | |
17109 | enableval=$enable_gdbserver; case "${enableval}" in | |
17110 | yes| no|auto) ;; | |
d0ac1c44 | 17111 | *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; |
496c0e1b JB |
17112 | esac |
17113 | else | |
17114 | enable_gdbserver=auto | |
17115 | fi | |
17116 | ||
17117 | ||
17118 | # We only build gdbserver automatically in a native configuration, and | |
17119 | # only if the user did not explicitly disable its build. | |
17120 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
17121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
17122 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 17123 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
17124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17125 | $as_echo "yes" >&6; } | |
17126 | subdirs="$subdirs gdbserver" | |
3ace7edb | 17127 | |
496c0e1b | 17128 | gdbserver_build_enabled=yes |
8dcde887 | 17129 | else |
81ecdfbb RW |
17130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17131 | $as_echo "no" >&6; } | |
8dcde887 MK |
17132 | fi |
17133 | fi | |
17134 | ||
496c0e1b JB |
17135 | # If the user explicitly request the gdbserver to be built, verify that |
17136 | # we were in fact able to enable it. | |
17137 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
d0ac1c44 | 17138 | as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 |
496c0e1b JB |
17139 | fi |
17140 | ||
393fd4c3 YQ |
17141 | # Check for babeltrace and babeltrace-ctf |
17142 | ||
17143 | # Check whether --with-babeltrace was given. | |
17144 | if test "${with_babeltrace+set}" = set; then : | |
17145 | withval=$with_babeltrace; | |
17146 | else | |
17147 | with_babeltrace=auto | |
17148 | fi | |
17149 | ||
17150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
17151 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
17152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
17153 | $as_echo "$with_babeltrace" >&6; } | |
17154 | ||
17155 | if test "x$with_babeltrace" = "xno"; then | |
17156 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
17157 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
17158 | else | |
17159 | # Append -Werror to CFLAGS so that configure can catch the warning | |
17160 | # "assignment from incompatible pointer type", which is related to | |
17161 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
17162 | # in GDB, while babeltrace 1.0.3 is broken. | |
17163 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
17164 | # safe to save and restore CFLAGS here. | |
17165 | saved_CFLAGS=$CFLAGS | |
17166 | CFLAGS="$CFLAGS -Werror" | |
17167 | ||
17168 | ||
17169 | ||
17170 | ||
17171 | ||
17172 | ||
17173 | ||
17174 | ||
17175 | use_additional=yes | |
17176 | ||
17177 | acl_save_prefix="$prefix" | |
17178 | prefix="$acl_final_prefix" | |
17179 | acl_save_exec_prefix="$exec_prefix" | |
17180 | exec_prefix="$acl_final_exec_prefix" | |
17181 | ||
17182 | eval additional_includedir=\"$includedir\" | |
17183 | eval additional_libdir=\"$libdir\" | |
17184 | ||
17185 | exec_prefix="$acl_save_exec_prefix" | |
17186 | prefix="$acl_save_prefix" | |
17187 | ||
17188 | ||
17189 | # Check whether --with-libbabeltrace-prefix was given. | |
17190 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
17191 | withval=$with_libbabeltrace_prefix; | |
17192 | if test "X$withval" = "Xno"; then | |
17193 | use_additional=no | |
17194 | else | |
17195 | if test "X$withval" = "X"; then | |
17196 | ||
17197 | acl_save_prefix="$prefix" | |
17198 | prefix="$acl_final_prefix" | |
17199 | acl_save_exec_prefix="$exec_prefix" | |
17200 | exec_prefix="$acl_final_exec_prefix" | |
17201 | ||
17202 | eval additional_includedir=\"$includedir\" | |
17203 | eval additional_libdir=\"$libdir\" | |
17204 | ||
17205 | exec_prefix="$acl_save_exec_prefix" | |
17206 | prefix="$acl_save_prefix" | |
17207 | ||
17208 | else | |
17209 | additional_includedir="$withval/include" | |
17210 | additional_libdir="$withval/lib" | |
17211 | fi | |
17212 | fi | |
17213 | ||
17214 | fi | |
17215 | ||
17216 | LIBBABELTRACE= | |
17217 | LTLIBBABELTRACE= | |
17218 | INCBABELTRACE= | |
17219 | rpathdirs= | |
17220 | ltrpathdirs= | |
17221 | names_already_handled= | |
17222 | names_next_round='babeltrace babeltrace-ctf' | |
17223 | while test -n "$names_next_round"; do | |
17224 | names_this_round="$names_next_round" | |
17225 | names_next_round= | |
17226 | for name in $names_this_round; do | |
17227 | already_handled= | |
17228 | for n in $names_already_handled; do | |
17229 | if test "$n" = "$name"; then | |
17230 | already_handled=yes | |
17231 | break | |
17232 | fi | |
17233 | done | |
17234 | if test -z "$already_handled"; then | |
17235 | names_already_handled="$names_already_handled $name" | |
17236 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17237 | eval value=\"\$HAVE_LIB$uppername\" | |
17238 | if test -n "$value"; then | |
17239 | if test "$value" = yes; then | |
17240 | eval value=\"\$LIB$uppername\" | |
17241 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
17242 | eval value=\"\$LTLIB$uppername\" | |
17243 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
17244 | else | |
17245 | : | |
17246 | fi | |
17247 | else | |
17248 | found_dir= | |
17249 | found_la= | |
17250 | found_so= | |
17251 | found_a= | |
17252 | if test $use_additional = yes; then | |
17253 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
17254 | found_dir="$additional_libdir" | |
17255 | found_so="$additional_libdir/lib$name.$shlibext" | |
17256 | if test -f "$additional_libdir/lib$name.la"; then | |
17257 | found_la="$additional_libdir/lib$name.la" | |
17258 | fi | |
17259 | else | |
17260 | if test -f "$additional_libdir/lib$name.$libext"; then | |
17261 | found_dir="$additional_libdir" | |
17262 | found_a="$additional_libdir/lib$name.$libext" | |
17263 | if test -f "$additional_libdir/lib$name.la"; then | |
17264 | found_la="$additional_libdir/lib$name.la" | |
17265 | fi | |
17266 | fi | |
17267 | fi | |
17268 | fi | |
17269 | if test "X$found_dir" = "X"; then | |
17270 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17271 | ||
17272 | acl_save_prefix="$prefix" | |
17273 | prefix="$acl_final_prefix" | |
17274 | acl_save_exec_prefix="$exec_prefix" | |
17275 | exec_prefix="$acl_final_exec_prefix" | |
17276 | eval x=\"$x\" | |
17277 | exec_prefix="$acl_save_exec_prefix" | |
17278 | prefix="$acl_save_prefix" | |
17279 | ||
17280 | case "$x" in | |
17281 | -L*) | |
17282 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
17283 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
17284 | found_dir="$dir" | |
17285 | found_so="$dir/lib$name.$shlibext" | |
17286 | if test -f "$dir/lib$name.la"; then | |
17287 | found_la="$dir/lib$name.la" | |
17288 | fi | |
17289 | else | |
17290 | if test -f "$dir/lib$name.$libext"; then | |
17291 | found_dir="$dir" | |
17292 | found_a="$dir/lib$name.$libext" | |
17293 | if test -f "$dir/lib$name.la"; then | |
17294 | found_la="$dir/lib$name.la" | |
17295 | fi | |
17296 | fi | |
17297 | fi | |
17298 | ;; | |
17299 | esac | |
17300 | if test "X$found_dir" != "X"; then | |
17301 | break | |
17302 | fi | |
17303 | done | |
17304 | fi | |
17305 | if test "X$found_dir" != "X"; then | |
17306 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
17307 | if test "X$found_so" != "X"; then | |
17308 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17309 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17310 | else | |
17311 | haveit= | |
17312 | for x in $ltrpathdirs; do | |
17313 | if test "X$x" = "X$found_dir"; then | |
17314 | haveit=yes | |
17315 | break | |
17316 | fi | |
17317 | done | |
17318 | if test -z "$haveit"; then | |
17319 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17320 | fi | |
17321 | if test "$hardcode_direct" = yes; then | |
17322 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17323 | else | |
17324 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17325 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17326 | haveit= | |
17327 | for x in $rpathdirs; do | |
17328 | if test "X$x" = "X$found_dir"; then | |
17329 | haveit=yes | |
17330 | break | |
17331 | fi | |
17332 | done | |
17333 | if test -z "$haveit"; then | |
17334 | rpathdirs="$rpathdirs $found_dir" | |
17335 | fi | |
17336 | else | |
17337 | haveit= | |
17338 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17339 | ||
17340 | acl_save_prefix="$prefix" | |
17341 | prefix="$acl_final_prefix" | |
17342 | acl_save_exec_prefix="$exec_prefix" | |
17343 | exec_prefix="$acl_final_exec_prefix" | |
17344 | eval x=\"$x\" | |
17345 | exec_prefix="$acl_save_exec_prefix" | |
17346 | prefix="$acl_save_prefix" | |
17347 | ||
17348 | if test "X$x" = "X-L$found_dir"; then | |
17349 | haveit=yes | |
17350 | break | |
17351 | fi | |
17352 | done | |
17353 | if test -z "$haveit"; then | |
17354 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
17355 | fi | |
17356 | if test "$hardcode_minus_L" != no; then | |
17357 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
17358 | else | |
17359 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17360 | fi | |
17361 | fi | |
17362 | fi | |
17363 | fi | |
17364 | else | |
17365 | if test "X$found_a" != "X"; then | |
17366 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
17367 | else | |
17368 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
17369 | fi | |
17370 | fi | |
17371 | additional_includedir= | |
17372 | case "$found_dir" in | |
17373 | */lib | */lib/) | |
17374 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17375 | additional_includedir="$basedir/include" | |
17376 | ;; | |
17377 | esac | |
17378 | if test "X$additional_includedir" != "X"; then | |
17379 | if test "X$additional_includedir" != "X/usr/include"; then | |
17380 | haveit= | |
17381 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17382 | if test -n "$GCC"; then | |
17383 | case $host_os in | |
17384 | linux*) haveit=yes;; | |
17385 | esac | |
17386 | fi | |
17387 | fi | |
17388 | if test -z "$haveit"; then | |
17389 | for x in $CPPFLAGS $INCBABELTRACE; do | |
17390 | ||
17391 | acl_save_prefix="$prefix" | |
17392 | prefix="$acl_final_prefix" | |
17393 | acl_save_exec_prefix="$exec_prefix" | |
17394 | exec_prefix="$acl_final_exec_prefix" | |
17395 | eval x=\"$x\" | |
17396 | exec_prefix="$acl_save_exec_prefix" | |
17397 | prefix="$acl_save_prefix" | |
17398 | ||
17399 | if test "X$x" = "X-I$additional_includedir"; then | |
17400 | haveit=yes | |
17401 | break | |
17402 | fi | |
17403 | done | |
17404 | if test -z "$haveit"; then | |
17405 | if test -d "$additional_includedir"; then | |
17406 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
17407 | fi | |
17408 | fi | |
17409 | fi | |
17410 | fi | |
17411 | fi | |
17412 | if test -n "$found_la"; then | |
17413 | save_libdir="$libdir" | |
17414 | case "$found_la" in | |
17415 | */* | *\\*) . "$found_la" ;; | |
17416 | *) . "./$found_la" ;; | |
17417 | esac | |
17418 | libdir="$save_libdir" | |
17419 | for dep in $dependency_libs; do | |
17420 | case "$dep" in | |
17421 | -L*) | |
17422 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17423 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17424 | haveit= | |
17425 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17426 | if test -n "$GCC"; then | |
17427 | case $host_os in | |
17428 | linux*) haveit=yes;; | |
17429 | esac | |
17430 | fi | |
17431 | fi | |
17432 | if test -z "$haveit"; then | |
17433 | haveit= | |
17434 | for x in $LDFLAGS $LIBBABELTRACE; do | |
17435 | ||
17436 | acl_save_prefix="$prefix" | |
17437 | prefix="$acl_final_prefix" | |
17438 | acl_save_exec_prefix="$exec_prefix" | |
17439 | exec_prefix="$acl_final_exec_prefix" | |
17440 | eval x=\"$x\" | |
17441 | exec_prefix="$acl_save_exec_prefix" | |
17442 | prefix="$acl_save_prefix" | |
17443 | ||
17444 | if test "X$x" = "X-L$additional_libdir"; then | |
17445 | haveit=yes | |
17446 | break | |
17447 | fi | |
17448 | done | |
17449 | if test -z "$haveit"; then | |
17450 | if test -d "$additional_libdir"; then | |
17451 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
17452 | fi | |
17453 | fi | |
17454 | haveit= | |
17455 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17456 | ||
17457 | acl_save_prefix="$prefix" | |
17458 | prefix="$acl_final_prefix" | |
17459 | acl_save_exec_prefix="$exec_prefix" | |
17460 | exec_prefix="$acl_final_exec_prefix" | |
17461 | eval x=\"$x\" | |
17462 | exec_prefix="$acl_save_exec_prefix" | |
17463 | prefix="$acl_save_prefix" | |
17464 | ||
17465 | if test "X$x" = "X-L$additional_libdir"; then | |
17466 | haveit=yes | |
17467 | break | |
17468 | fi | |
17469 | done | |
17470 | if test -z "$haveit"; then | |
17471 | if test -d "$additional_libdir"; then | |
17472 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
17473 | fi | |
17474 | fi | |
17475 | fi | |
17476 | fi | |
17477 | ;; | |
17478 | -R*) | |
17479 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17480 | if test "$enable_rpath" != no; then | |
17481 | haveit= | |
17482 | for x in $rpathdirs; do | |
17483 | if test "X$x" = "X$dir"; then | |
17484 | haveit=yes | |
17485 | break | |
17486 | fi | |
17487 | done | |
17488 | if test -z "$haveit"; then | |
17489 | rpathdirs="$rpathdirs $dir" | |
17490 | fi | |
17491 | haveit= | |
17492 | for x in $ltrpathdirs; do | |
17493 | if test "X$x" = "X$dir"; then | |
17494 | haveit=yes | |
17495 | break | |
17496 | fi | |
17497 | done | |
17498 | if test -z "$haveit"; then | |
17499 | ltrpathdirs="$ltrpathdirs $dir" | |
17500 | fi | |
17501 | fi | |
17502 | ;; | |
17503 | -l*) | |
17504 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17505 | ;; | |
17506 | *.la) | |
17507 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17508 | ;; | |
17509 | *) | |
17510 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
17511 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
17512 | ;; | |
17513 | esac | |
17514 | done | |
17515 | fi | |
17516 | else | |
17517 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
17518 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
17519 | fi | |
17520 | fi | |
17521 | fi | |
17522 | done | |
17523 | done | |
17524 | if test "X$rpathdirs" != "X"; then | |
17525 | if test -n "$hardcode_libdir_separator"; then | |
17526 | alldirs= | |
17527 | for found_dir in $rpathdirs; do | |
17528 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17529 | done | |
17530 | acl_save_libdir="$libdir" | |
17531 | libdir="$alldirs" | |
17532 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17533 | libdir="$acl_save_libdir" | |
17534 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17535 | else | |
17536 | for found_dir in $rpathdirs; do | |
17537 | acl_save_libdir="$libdir" | |
17538 | libdir="$found_dir" | |
17539 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17540 | libdir="$acl_save_libdir" | |
17541 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
17542 | done | |
17543 | fi | |
17544 | fi | |
17545 | if test "X$ltrpathdirs" != "X"; then | |
17546 | for found_dir in $ltrpathdirs; do | |
17547 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
17548 | done | |
17549 | fi | |
17550 | ||
17551 | ||
17552 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17553 | ||
17554 | for element in $INCBABELTRACE; do | |
17555 | haveit= | |
17556 | for x in $CPPFLAGS; do | |
17557 | ||
17558 | acl_save_prefix="$prefix" | |
17559 | prefix="$acl_final_prefix" | |
17560 | acl_save_exec_prefix="$exec_prefix" | |
17561 | exec_prefix="$acl_final_exec_prefix" | |
17562 | eval x=\"$x\" | |
17563 | exec_prefix="$acl_save_exec_prefix" | |
17564 | prefix="$acl_save_prefix" | |
17565 | ||
17566 | if test "X$x" = "X$element"; then | |
17567 | haveit=yes | |
17568 | break | |
17569 | fi | |
17570 | done | |
17571 | if test -z "$haveit"; then | |
17572 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17573 | fi | |
17574 | done | |
17575 | ||
17576 | ||
17577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
17578 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
d0ac1c44 | 17579 | if ${ac_cv_libbabeltrace+:} false; then : |
393fd4c3 YQ |
17580 | $as_echo_n "(cached) " >&6 |
17581 | else | |
17582 | ||
17583 | ac_save_LIBS="$LIBS" | |
17584 | LIBS="$LIBS $LIBBABELTRACE" | |
17585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17586 | /* end confdefs.h. */ | |
17587 | #include <babeltrace/babeltrace.h> | |
17588 | #include <babeltrace/ctf/events.h> | |
17589 | #include <babeltrace/ctf/iterator.h> | |
17590 | int | |
17591 | main () | |
17592 | { | |
17593 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
17594 | struct bt_ctf_event *event = NULL; | |
17595 | const struct bt_definition *scope; | |
17596 | ||
13cdc2af | 17597 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 17598 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
17599 | scope = bt_ctf_get_top_level_scope (event, |
17600 | BT_STREAM_EVENT_HEADER); | |
17601 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
17602 | ||
17603 | ; | |
17604 | return 0; | |
17605 | } | |
17606 | _ACEOF | |
17607 | if ac_fn_c_try_link "$LINENO"; then : | |
17608 | ac_cv_libbabeltrace=yes | |
17609 | else | |
17610 | ac_cv_libbabeltrace=no | |
17611 | fi | |
17612 | rm -f core conftest.err conftest.$ac_objext \ | |
17613 | conftest$ac_exeext conftest.$ac_ext | |
17614 | LIBS="$ac_save_LIBS" | |
17615 | ||
17616 | fi | |
17617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
17618 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
17619 | if test "$ac_cv_libbabeltrace" = yes; then | |
17620 | HAVE_LIBBABELTRACE=yes | |
17621 | ||
17622 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
17623 | ||
17624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
17625 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
17626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
17627 | $as_echo "$LIBBABELTRACE" >&6; } | |
17628 | else | |
17629 | HAVE_LIBBABELTRACE=no | |
17630 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17631 | LIBBABELTRACE= | |
17632 | LTLIBBABELTRACE= | |
17633 | fi | |
17634 | ||
17635 | ||
17636 | ||
17637 | ||
17638 | ||
17639 | ||
17640 | CFLAGS=$saved_CFLAGS | |
17641 | ||
17642 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
17643 | if test "$with_babeltrace" = yes; then | |
d0ac1c44 | 17644 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
393fd4c3 YQ |
17645 | else |
17646 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
17647 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
17648 | fi | |
17649 | fi | |
17650 | fi | |
17651 | ||
21ea5acd SDJ |
17652 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an |
17653 | # empty version. | |
c906108c SS |
17654 | |
17655 | files= | |
17656 | links= | |
5a2402b8 | 17657 | |
c906108c SS |
17658 | rm -f nm.h |
17659 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
17660 | case "${nativefile}" in |
17661 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
17662 | * ) GDB_NM_FILE="${nativefile}" | |
17663 | esac | |
5a2402b8 AC |
17664 | files="${files} ${GDB_NM_FILE}" |
17665 | links="${links} nm.h" | |
60ca704f SE |
17666 | |
17667 | cat >>confdefs.h <<_ACEOF | |
b78960be | 17668 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 17669 | _ACEOF |
5a2402b8 | 17670 | |
c906108c | 17671 | fi |
5a2402b8 AC |
17672 | |
17673 | ||
e3487908 GKB |
17674 | for ac_prog in xsltproc |
17675 | do | |
17676 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
17677 | set dummy $ac_prog; ac_word=$2 | |
17678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
17679 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 17680 | if ${ac_cv_path_XSLTPROC+:} false; then : |
e3487908 GKB |
17681 | $as_echo_n "(cached) " >&6 |
17682 | else | |
17683 | case $XSLTPROC in | |
17684 | [\\/]* | ?:[\\/]*) | |
17685 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
17686 | ;; | |
17687 | *) | |
17688 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17689 | for as_dir in $PATH | |
17690 | do | |
17691 | IFS=$as_save_IFS | |
17692 | test -z "$as_dir" && as_dir=. | |
17693 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 17694 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e3487908 GKB |
17695 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
17696 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
17697 | break 2 | |
17698 | fi | |
17699 | done | |
17700 | done | |
17701 | IFS=$as_save_IFS | |
17702 | ||
17703 | ;; | |
17704 | esac | |
17705 | fi | |
17706 | XSLTPROC=$ac_cv_path_XSLTPROC | |
17707 | if test -n "$XSLTPROC"; then | |
17708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
17709 | $as_echo "$XSLTPROC" >&6; } | |
17710 | else | |
17711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
17712 | $as_echo "no" >&6; } | |
17713 | fi | |
17714 | ||
17715 | ||
17716 | test -n "$XSLTPROC" && break | |
17717 | done | |
17718 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
17719 | ||
17720 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
17721 | if test "${XSLTPROC}" = missing; then | |
d0ac1c44 | 17722 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
e3487908 GKB |
17723 | fi |
17724 | fi | |
17725 | ||
17726 | ||
bec39cab AC |
17727 | ac_sources="$files" |
17728 | ac_dests="$links" | |
17729 | while test -n "$ac_sources"; do | |
17730 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
17731 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
17732 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
17733 | done | |
81ecdfbb | 17734 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
17735 | |
17736 | ||
c906108c SS |
17737 | |
17738 | ||
c906108c | 17739 | |
81ecdfbb | 17740 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 17741 | |
bec39cab | 17742 | |
dcd1f979 TT |
17743 | if $development; then |
17744 | ||
17745 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
17746 | ||
b5884fa7 | 17747 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o" |
1e5ded6c | 17748 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c" |
dcd1f979 TT |
17749 | fi |
17750 | ||
b292c783 | 17751 | |
f6a88844 JM |
17752 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
17753 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
17754 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
17755 | GDB_TRANSFORM_NAME=gdb | |
17756 | fi | |
17757 | ||
17758 | ||
17759 | ||
17760 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
17761 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
17762 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
17763 | GCORE_TRANSFORM_NAME=gcore | |
17764 | fi | |
17765 | ||
b292c783 JK |
17766 | |
17767 | ac_config_files="$ac_config_files gcore" | |
17768 | ||
141ec9f6 | 17769 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
81ecdfbb | 17770 | |
89a34d1b | 17771 | |
bec39cab AC |
17772 | cat >confcache <<\_ACEOF |
17773 | # This file is a shell script that caches the results of configure | |
17774 | # tests run on this system so they can be shared between configure | |
17775 | # scripts and configure runs, see configure's option --config-cache. | |
17776 | # It is not useful on other systems. If it contains results you don't | |
17777 | # want to keep, you may remove or edit it. | |
17778 | # | |
17779 | # config.status only pays attention to the cache file if you give it | |
17780 | # the --recheck option to rerun configure. | |
17781 | # | |
17782 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
17783 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17784 | # following values. | |
17785 | ||
17786 | _ACEOF | |
17787 | ||
17788 | # The following way of writing the cache mishandles newlines in values, | |
17789 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 17790 | # So, we kill variables containing newlines. |
bec39cab AC |
17791 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17792 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
17793 | ( |
17794 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17795 | eval ac_val=\$$ac_var | |
17796 | case $ac_val in #( | |
17797 | *${as_nl}*) | |
17798 | case $ac_var in #( | |
17799 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
17800 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
17801 | esac | |
17802 | case $ac_var in #( | |
17803 | _ | IFS | as_nl) ;; #( | |
17804 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
17805 | *) { eval $ac_var=; unset $ac_var;} ;; | |
17806 | esac ;; | |
17807 | esac | |
17808 | done | |
17809 | ||
bec39cab | 17810 | (set) 2>&1 | |
81ecdfbb RW |
17811 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
17812 | *${as_nl}ac_space=\ *) | |
17813 | # `set' does not quote correctly, so add quotes: double-quote | |
17814 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
17815 | sed -n \ |
17816 | "s/'/'\\\\''/g; | |
17817 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 17818 | ;; #( |
bec39cab AC |
17819 | *) |
17820 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 17821 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 17822 | ;; |
81ecdfbb RW |
17823 | esac | |
17824 | sort | |
17825 | ) | | |
bec39cab | 17826 | sed ' |
81ecdfbb | 17827 | /^ac_cv_env_/b end |
bec39cab | 17828 | t clear |
81ecdfbb | 17829 | :clear |
bec39cab AC |
17830 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17831 | t end | |
81ecdfbb RW |
17832 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17833 | :end' >>confcache | |
17834 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17835 | if test -w "$cache_file"; then | |
d0ac1c44 | 17836 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
17837 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
17838 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
17839 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
17840 | cat confcache >"$cache_file" | |
17841 | else | |
17842 | case $cache_file in #( | |
17843 | */* | ?:*) | |
17844 | mv -f confcache "$cache_file"$$ && | |
17845 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
17846 | *) | |
17847 | mv -f confcache "$cache_file" ;; | |
17848 | esac | |
17849 | fi | |
17850 | fi | |
bec39cab | 17851 | else |
81ecdfbb RW |
17852 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
17853 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
17854 | fi |
17855 | fi | |
17856 | rm -f confcache | |
17857 | ||
17858 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17859 | # Let make expand exec_prefix. | |
17860 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17861 | ||
bec39cab AC |
17862 | DEFS=-DHAVE_CONFIG_H |
17863 | ||
17864 | ac_libobjs= | |
17865 | ac_ltlibobjs= | |
d0ac1c44 | 17866 | U= |
bec39cab AC |
17867 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
17868 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
17869 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
17870 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
17871 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17872 | # will be set to the directory where LIBOBJS objects are built. | |
17873 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17874 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
17875 | done |
17876 | LIBOBJS=$ac_libobjs | |
17877 | ||
17878 | LTLIBOBJS=$ac_ltlibobjs | |
17879 | ||
17880 | ||
85981d60 | 17881 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 17882 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
81ecdfbb | 17883 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
85981d60 | 17884 | fi |
4df42755 | 17885 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
d0ac1c44 | 17886 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
4df42755 DE |
17887 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
17888 | fi | |
17889 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
d0ac1c44 | 17890 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
4df42755 DE |
17891 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
17892 | fi | |
81ecdfbb RW |
17893 | |
17894 | ||
d0ac1c44 | 17895 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 17896 | ac_write_fail=0 |
bec39cab AC |
17897 | ac_clean_files_save=$ac_clean_files |
17898 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
17899 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
17900 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17901 | as_write_fail=0 | |
17902 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
17903 | #! $SHELL |
17904 | # Generated by $as_me. | |
17905 | # Run this file to recreate the current configuration. | |
17906 | # Compiler output produced by configure, useful for debugging | |
17907 | # configure, is in config.log if it exists. | |
17908 | ||
17909 | debug=false | |
17910 | ac_cs_recheck=false | |
17911 | ac_cs_silent=false | |
bec39cab | 17912 | |
81ecdfbb RW |
17913 | SHELL=\${CONFIG_SHELL-$SHELL} |
17914 | export SHELL | |
17915 | _ASEOF | |
17916 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
17917 | ## -------------------- ## | |
17918 | ## M4sh Initialization. ## | |
17919 | ## -------------------- ## | |
17920 | ||
17921 | # Be more Bourne compatible | |
17922 | DUALCASE=1; export DUALCASE # for MKS sh | |
17923 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
17924 | emulate sh |
17925 | NULLCMD=: | |
81ecdfbb | 17926 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
17927 | # is contrary to our usage. Disable this feature. |
17928 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
17929 | setopt NO_GLOB_SUBST |
17930 | else | |
17931 | case `(set -o) 2>/dev/null` in #( | |
17932 | *posix*) : | |
17933 | set -o posix ;; #( | |
17934 | *) : | |
17935 | ;; | |
17936 | esac | |
bec39cab | 17937 | fi |
bec39cab | 17938 | |
81ecdfbb RW |
17939 | |
17940 | as_nl=' | |
17941 | ' | |
17942 | export as_nl | |
17943 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
17944 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
17945 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
17946 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
17947 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
17948 | # but without wasting forks for bash or zsh. | |
17949 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
17950 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17951 | as_echo='print -r --' | |
17952 | as_echo_n='print -rn --' | |
17953 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17954 | as_echo='printf %s\n' | |
17955 | as_echo_n='printf %s' | |
17956 | else | |
17957 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
17958 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
17959 | as_echo_n='/usr/ucb/echo -n' | |
17960 | else | |
17961 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
17962 | as_echo_n_body='eval | |
17963 | arg=$1; | |
17964 | case $arg in #( | |
17965 | *"$as_nl"*) | |
17966 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
17967 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
17968 | esac; | |
17969 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
17970 | ' | |
17971 | export as_echo_n_body | |
17972 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
17973 | fi | |
17974 | export as_echo_body | |
17975 | as_echo='sh -c $as_echo_body as_echo' | |
17976 | fi | |
17977 | ||
17978 | # The user is always right. | |
17979 | if test "${PATH_SEPARATOR+set}" != set; then | |
17980 | PATH_SEPARATOR=: | |
17981 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
17982 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
17983 | PATH_SEPARATOR=';' | |
17984 | } | |
bec39cab AC |
17985 | fi |
17986 | ||
17987 | ||
81ecdfbb RW |
17988 | # IFS |
17989 | # We need space, tab and new line, in precisely that order. Quoting is | |
17990 | # there to prevent editors from complaining about space-tab. | |
17991 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17992 | # splitting by setting IFS to empty value.) | |
17993 | IFS=" "" $as_nl" | |
17994 | ||
17995 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 17996 | as_myself= |
81ecdfbb RW |
17997 | case $0 in #(( |
17998 | *[\\/]* ) as_myself=$0 ;; | |
17999 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
18000 | for as_dir in $PATH | |
18001 | do | |
18002 | IFS=$as_save_IFS | |
18003 | test -z "$as_dir" && as_dir=. | |
18004 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
18005 | done | |
18006 | IFS=$as_save_IFS | |
18007 | ||
18008 | ;; | |
18009 | esac | |
18010 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
18011 | # in which case we are not to be found in the path. | |
18012 | if test "x$as_myself" = x; then | |
18013 | as_myself=$0 | |
18014 | fi | |
18015 | if test ! -f "$as_myself"; then | |
18016 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
18017 | exit 1 | |
18018 | fi | |
18019 | ||
18020 | # Unset variables that we do not need and which cause bugs (e.g. in | |
18021 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
18022 | # suppresses any "Segmentation fault" message there. '((' could | |
18023 | # trigger a bug in pdksh 5.2.14. | |
18024 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
18025 | do eval test x\${$as_var+set} = xset \ | |
18026 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
18027 | done | |
bec39cab AC |
18028 | PS1='$ ' |
18029 | PS2='> ' | |
18030 | PS4='+ ' | |
18031 | ||
18032 | # NLS nuisances. | |
81ecdfbb RW |
18033 | LC_ALL=C |
18034 | export LC_ALL | |
18035 | LANGUAGE=C | |
18036 | export LANGUAGE | |
18037 | ||
18038 | # CDPATH. | |
18039 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
18040 | ||
18041 | ||
d0ac1c44 SM |
18042 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
18043 | # ---------------------------------------- | |
81ecdfbb RW |
18044 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
18045 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 18046 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
18047 | as_fn_error () |
18048 | { | |
d0ac1c44 SM |
18049 | as_status=$1; test $as_status -eq 0 && as_status=1 |
18050 | if test "$4"; then | |
18051 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
18052 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 18053 | fi |
d0ac1c44 | 18054 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
18055 | as_fn_exit $as_status |
18056 | } # as_fn_error | |
18057 | ||
18058 | ||
18059 | # as_fn_set_status STATUS | |
18060 | # ----------------------- | |
18061 | # Set $? to STATUS, without forking. | |
18062 | as_fn_set_status () | |
18063 | { | |
18064 | return $1 | |
18065 | } # as_fn_set_status | |
18066 | ||
18067 | # as_fn_exit STATUS | |
18068 | # ----------------- | |
18069 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
18070 | as_fn_exit () | |
18071 | { | |
18072 | set +e | |
18073 | as_fn_set_status $1 | |
18074 | exit $1 | |
18075 | } # as_fn_exit | |
18076 | ||
18077 | # as_fn_unset VAR | |
18078 | # --------------- | |
18079 | # Portably unset VAR. | |
18080 | as_fn_unset () | |
18081 | { | |
18082 | { eval $1=; unset $1;} | |
18083 | } | |
18084 | as_unset=as_fn_unset | |
18085 | # as_fn_append VAR VALUE | |
18086 | # ---------------------- | |
18087 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
18088 | # advantage of any shell optimizations that allow amortized linear growth over | |
18089 | # repeated appends, instead of the typical quadratic growth present in naive | |
18090 | # implementations. | |
18091 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
18092 | eval 'as_fn_append () | |
18093 | { | |
18094 | eval $1+=\$2 | |
18095 | }' | |
18096 | else | |
18097 | as_fn_append () | |
18098 | { | |
18099 | eval $1=\$$1\$2 | |
18100 | } | |
18101 | fi # as_fn_append | |
18102 | ||
18103 | # as_fn_arith ARG... | |
18104 | # ------------------ | |
18105 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
18106 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
18107 | # must be portable across $(()) and expr. | |
18108 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
18109 | eval 'as_fn_arith () | |
18110 | { | |
18111 | as_val=$(( $* )) | |
18112 | }' | |
18113 | else | |
18114 | as_fn_arith () | |
18115 | { | |
18116 | as_val=`expr "$@" || test $? -eq 1` | |
18117 | } | |
18118 | fi # as_fn_arith | |
bec39cab | 18119 | |
81ecdfbb RW |
18120 | |
18121 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
18122 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
18123 | as_expr=expr |
18124 | else | |
18125 | as_expr=false | |
18126 | fi | |
18127 | ||
81ecdfbb | 18128 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
18129 | as_basename=basename |
18130 | else | |
18131 | as_basename=false | |
18132 | fi | |
18133 | ||
81ecdfbb RW |
18134 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
18135 | as_dirname=dirname | |
18136 | else | |
18137 | as_dirname=false | |
18138 | fi | |
bec39cab | 18139 | |
81ecdfbb | 18140 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
18141 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
18142 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18143 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
18144 | $as_echo X/"$0" | | |
18145 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
18146 | s//\1/ | |
18147 | q | |
18148 | } | |
18149 | /^X\/\(\/\/\)$/{ | |
18150 | s//\1/ | |
18151 | q | |
18152 | } | |
18153 | /^X\/\(\/\).*/{ | |
18154 | s//\1/ | |
18155 | q | |
18156 | } | |
18157 | s/.*/./; q'` | |
b4e70030 | 18158 | |
b4e70030 JB |
18159 | # Avoid depending upon Character Ranges. |
18160 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
18161 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
18162 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
18163 | as_cr_digits='0123456789' | |
18164 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
18165 | ||
81ecdfbb RW |
18166 | ECHO_C= ECHO_N= ECHO_T= |
18167 | case `echo -n x` in #((((( | |
18168 | -n*) | |
18169 | case `echo 'xy\c'` in | |
18170 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
18171 | xy) ECHO_C='\c';; | |
18172 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
18173 | ECHO_T=' ';; | |
18174 | esac;; | |
18175 | *) | |
18176 | ECHO_N='-n';; | |
bec39cab AC |
18177 | esac |
18178 | ||
81ecdfbb RW |
18179 | rm -f conf$$ conf$$.exe conf$$.file |
18180 | if test -d conf$$.dir; then | |
18181 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 18182 | else |
81ecdfbb RW |
18183 | rm -f conf$$.dir |
18184 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 18185 | fi |
81ecdfbb RW |
18186 | if (echo >conf$$.file) 2>/dev/null; then |
18187 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 18188 | as_ln_s='ln -s' |
81ecdfbb RW |
18189 | # ... but there are two gotchas: |
18190 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
18191 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 18192 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 18193 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 18194 | as_ln_s='cp -pR' |
81ecdfbb RW |
18195 | elif ln conf$$.file conf$$ 2>/dev/null; then |
18196 | as_ln_s=ln | |
18197 | else | |
d0ac1c44 | 18198 | as_ln_s='cp -pR' |
b4e70030 | 18199 | fi |
bec39cab | 18200 | else |
d0ac1c44 | 18201 | as_ln_s='cp -pR' |
bec39cab | 18202 | fi |
81ecdfbb RW |
18203 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
18204 | rmdir conf$$.dir 2>/dev/null | |
18205 | ||
18206 | ||
18207 | # as_fn_mkdir_p | |
18208 | # ------------- | |
18209 | # Create "$as_dir" as a directory, including parents if necessary. | |
18210 | as_fn_mkdir_p () | |
18211 | { | |
18212 | ||
18213 | case $as_dir in #( | |
18214 | -*) as_dir=./$as_dir;; | |
18215 | esac | |
18216 | test -d "$as_dir" || eval $as_mkdir_p || { | |
18217 | as_dirs= | |
18218 | while :; do | |
18219 | case $as_dir in #( | |
18220 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
18221 | *) as_qdir=$as_dir;; | |
18222 | esac | |
18223 | as_dirs="'$as_qdir' $as_dirs" | |
18224 | as_dir=`$as_dirname -- "$as_dir" || | |
18225 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18226 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
18227 | X"$as_dir" : 'X\(//\)$' \| \ | |
18228 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
18229 | $as_echo X"$as_dir" | | |
18230 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18231 | s//\1/ | |
18232 | q | |
18233 | } | |
18234 | /^X\(\/\/\)[^/].*/{ | |
18235 | s//\1/ | |
18236 | q | |
18237 | } | |
18238 | /^X\(\/\/\)$/{ | |
18239 | s//\1/ | |
18240 | q | |
18241 | } | |
18242 | /^X\(\/\).*/{ | |
18243 | s//\1/ | |
18244 | q | |
18245 | } | |
18246 | s/.*/./; q'` | |
18247 | test -d "$as_dir" && break | |
18248 | done | |
18249 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 18250 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb | 18251 | |
bec39cab | 18252 | |
81ecdfbb | 18253 | } # as_fn_mkdir_p |
bec39cab | 18254 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 18255 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
18256 | else |
18257 | test -d ./-p && rmdir ./-p | |
18258 | as_mkdir_p=false | |
18259 | fi | |
18260 | ||
d0ac1c44 SM |
18261 | |
18262 | # as_fn_executable_p FILE | |
18263 | # ----------------------- | |
18264 | # Test if FILE is an executable regular file. | |
18265 | as_fn_executable_p () | |
18266 | { | |
18267 | test -f "$1" && test -x "$1" | |
18268 | } # as_fn_executable_p | |
18269 | as_test_x='test -x' | |
18270 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
18271 | |
18272 | # Sed expression to map a string onto a valid CPP name. | |
18273 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
18274 | ||
18275 | # Sed expression to map a string onto a valid variable name. | |
18276 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
18277 | ||
18278 | ||
bec39cab | 18279 | exec 6>&1 |
81ecdfbb RW |
18280 | ## ----------------------------------- ## |
18281 | ## Main body of $CONFIG_STATUS script. ## | |
18282 | ## ----------------------------------- ## | |
18283 | _ASEOF | |
18284 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
18285 | ||
18286 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18287 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 18288 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
18289 | # values after options handling. |
18290 | ac_log=" | |
bec39cab | 18291 | This file was extended by $as_me, which was |
d0ac1c44 | 18292 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
18293 | |
18294 | CONFIG_FILES = $CONFIG_FILES | |
18295 | CONFIG_HEADERS = $CONFIG_HEADERS | |
18296 | CONFIG_LINKS = $CONFIG_LINKS | |
18297 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
18298 | $ $0 $@ | |
18299 | ||
81ecdfbb RW |
18300 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
18301 | " | |
18302 | ||
bec39cab AC |
18303 | _ACEOF |
18304 | ||
81ecdfbb RW |
18305 | case $ac_config_files in *" |
18306 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
18307 | esac | |
234b45d4 | 18308 | |
81ecdfbb RW |
18309 | case $ac_config_headers in *" |
18310 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
18311 | esac | |
b4e70030 | 18312 | |
b4e70030 | 18313 | |
81ecdfbb RW |
18314 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
18315 | # Files that config.status was made for. | |
18316 | config_files="$ac_config_files" | |
18317 | config_headers="$ac_config_headers" | |
18318 | config_links="$ac_config_links" | |
18319 | config_commands="$ac_config_commands" | |
234b45d4 | 18320 | |
81ecdfbb | 18321 | _ACEOF |
b4e70030 | 18322 | |
81ecdfbb | 18323 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 18324 | ac_cs_usage="\ |
81ecdfbb RW |
18325 | \`$as_me' instantiates files and other configuration actions |
18326 | from templates according to the current configuration. Unless the files | |
18327 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 18328 | |
81ecdfbb | 18329 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 18330 | |
bec39cab | 18331 | -h, --help print this help, then exit |
81ecdfbb | 18332 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 18333 | --config print configuration, then exit |
81ecdfbb RW |
18334 | -q, --quiet, --silent |
18335 | do not print progress messages | |
bec39cab AC |
18336 | -d, --debug don't remove temporary files |
18337 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
18338 | --file=FILE[:TEMPLATE] |
18339 | instantiate the configuration file FILE | |
18340 | --header=FILE[:TEMPLATE] | |
18341 | instantiate the configuration header FILE | |
234b45d4 | 18342 | |
bec39cab AC |
18343 | Configuration files: |
18344 | $config_files | |
234b45d4 | 18345 | |
bec39cab AC |
18346 | Configuration headers: |
18347 | $config_headers | |
234b45d4 | 18348 | |
bec39cab AC |
18349 | Configuration links: |
18350 | $config_links | |
234b45d4 | 18351 | |
bec39cab AC |
18352 | Configuration commands: |
18353 | $config_commands | |
18354 | ||
81ecdfbb | 18355 | Report bugs to the package provider." |
b4e70030 | 18356 | |
81ecdfbb RW |
18357 | _ACEOF |
18358 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 18359 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
18360 | ac_cs_version="\\ |
18361 | config.status | |
d0ac1c44 SM |
18362 | configured by $0, generated by GNU Autoconf 2.69, |
18363 | with options \\"\$ac_cs_config\\" | |
bec39cab | 18364 | |
d0ac1c44 | 18365 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
18366 | This config.status script is free software; the Free Software Foundation |
18367 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
18368 | |
18369 | ac_pwd='$ac_pwd' | |
18370 | srcdir='$srcdir' | |
18371 | INSTALL='$INSTALL' | |
81ecdfbb RW |
18372 | AWK='$AWK' |
18373 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
18374 | _ACEOF |
18375 | ||
81ecdfbb RW |
18376 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18377 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
18378 | ac_need_defaults=: |
18379 | while test $# != 0 | |
18380 | do | |
18381 | case $1 in | |
d0ac1c44 | 18382 | --*=?*) |
81ecdfbb RW |
18383 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18384 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 18385 | ac_shift=: |
c906108c | 18386 | ;; |
d0ac1c44 SM |
18387 | --*=) |
18388 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
18389 | ac_optarg= | |
18390 | ac_shift=: | |
18391 | ;; | |
81ecdfbb | 18392 | *) |
bec39cab AC |
18393 | ac_option=$1 |
18394 | ac_optarg=$2 | |
18395 | ac_shift=shift | |
c906108c | 18396 | ;; |
bec39cab | 18397 | esac |
c906108c | 18398 | |
bec39cab AC |
18399 | case $ac_option in |
18400 | # Handling of the options. | |
bec39cab AC |
18401 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
18402 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
18403 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
18404 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
18405 | --config | --confi | --conf | --con | --co | --c ) |
18406 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 18407 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
18408 | debug=: ;; |
18409 | --file | --fil | --fi | --f ) | |
18410 | $ac_shift | |
81ecdfbb RW |
18411 | case $ac_optarg in |
18412 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 18413 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
18414 | esac |
18415 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
18416 | ac_need_defaults=false;; |
18417 | --header | --heade | --head | --hea ) | |
18418 | $ac_shift | |
81ecdfbb RW |
18419 | case $ac_optarg in |
18420 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18421 | esac | |
18422 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 18423 | ac_need_defaults=false;; |
81ecdfbb RW |
18424 | --he | --h) |
18425 | # Conflict between --help and --header | |
d0ac1c44 | 18426 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
18427 | Try \`$0 --help' for more information.";; |
18428 | --help | --hel | -h ) | |
18429 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
18430 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
18431 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18432 | ac_cs_silent=: ;; | |
c906108c | 18433 | |
bec39cab | 18434 | # This is an error. |
d0ac1c44 | 18435 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 18436 | Try \`$0 --help' for more information." ;; |
c906108c | 18437 | |
81ecdfbb RW |
18438 | *) as_fn_append ac_config_targets " $1" |
18439 | ac_need_defaults=false ;; | |
c906108c | 18440 | |
bec39cab AC |
18441 | esac |
18442 | shift | |
18443 | done | |
c906108c | 18444 | |
bec39cab | 18445 | ac_configure_extra_args= |
c906108c | 18446 | |
bec39cab AC |
18447 | if $ac_cs_silent; then |
18448 | exec 6>/dev/null | |
18449 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
18450 | fi | |
c906108c | 18451 | |
bec39cab | 18452 | _ACEOF |
81ecdfbb | 18453 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 18454 | if \$ac_cs_recheck; then |
d0ac1c44 | 18455 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
18456 | shift |
18457 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
18458 | CONFIG_SHELL='$SHELL' | |
18459 | export CONFIG_SHELL | |
18460 | exec "\$@" | |
bec39cab AC |
18461 | fi |
18462 | ||
18463 | _ACEOF | |
81ecdfbb RW |
18464 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18465 | exec 5>>config.log | |
18466 | { | |
18467 | echo | |
18468 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18469 | ## Running $as_me. ## | |
18470 | _ASBOX | |
18471 | $as_echo "$ac_log" | |
18472 | } >&5 | |
bec39cab | 18473 | |
81ecdfbb RW |
18474 | _ACEOF |
18475 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 18476 | # |
81ecdfbb | 18477 | # INIT-COMMANDS |
c906108c | 18478 | # |
a417dc56 | 18479 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 18480 | |
bec39cab AC |
18481 | _ACEOF |
18482 | ||
81ecdfbb | 18483 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 18484 | |
81ecdfbb | 18485 | # Handling of arguments. |
bec39cab | 18486 | for ac_config_target in $ac_config_targets |
c906108c | 18487 | do |
81ecdfbb RW |
18488 | case $ac_config_target in |
18489 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
18490 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 18491 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 18492 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 18493 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 18494 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 18495 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
141ec9f6 | 18496 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
5ae98d25 | 18497 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 18498 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb | 18499 | |
d0ac1c44 | 18500 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c906108c SS |
18501 | esac |
18502 | done | |
18503 | ||
81ecdfbb | 18504 | |
bec39cab AC |
18505 | # If the user did not use the arguments to specify the items to instantiate, |
18506 | # then the envvar interface is used. Set only those that are not. | |
18507 | # We use the long form for the default assignment because of an extremely | |
18508 | # bizarre bug on SunOS 4.1.3. | |
18509 | if $ac_need_defaults; then | |
18510 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18511 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18512 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
18513 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18514 | fi | |
18515 | ||
b4e70030 | 18516 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 18517 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 18518 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
18519 | # Hook for its removal unless debugging. |
18520 | # Note that there is a small window in which the directory will not be cleaned: | |
18521 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
18522 | $debug || |
18523 | { | |
d0ac1c44 | 18524 | tmp= ac_tmp= |
81ecdfbb | 18525 | trap 'exit_status=$? |
d0ac1c44 SM |
18526 | : "${ac_tmp:=$tmp}" |
18527 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
18528 | ' 0 |
18529 | trap 'as_fn_exit 1' 1 2 13 15 | |
18530 | } | |
18531 | # Create a (secure) tmp directory for tmp files. | |
18532 | ||
18533 | { | |
18534 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 18535 | test -d "$tmp" |
81ecdfbb RW |
18536 | } || |
18537 | { | |
18538 | tmp=./conf$$-$RANDOM | |
18539 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
18540 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
18541 | ac_tmp=$tmp | |
81ecdfbb RW |
18542 | |
18543 | # Set up the scripts for CONFIG_FILES section. | |
18544 | # No need to generate them if there are no CONFIG_FILES. | |
18545 | # This happens for instance with `./config.status config.h'. | |
18546 | if test -n "$CONFIG_FILES"; then | |
18547 | ||
18548 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
18549 | ac_cs_awk_getline=: | |
18550 | ac_cs_awk_pipe_init= | |
18551 | ac_cs_awk_read_file=' | |
18552 | while ((getline aline < (F[key])) > 0) | |
18553 | print(aline) | |
18554 | close(F[key])' | |
18555 | ac_cs_awk_pipe_fini= | |
18556 | else | |
18557 | ac_cs_awk_getline=false | |
18558 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
18559 | ac_cs_awk_read_file=' | |
18560 | print "|#_!!_#|" | |
18561 | print "cat " F[key] " &&" | |
18562 | '$ac_cs_awk_pipe_init | |
18563 | # The final `:' finishes the AND list. | |
18564 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
18565 | fi | |
18566 | ac_cr=`echo X | tr X '\015'` | |
18567 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
18568 | # But we know of no other shell where ac_cr would be empty at this | |
18569 | # point, so we can use a bashism as a fallback. | |
18570 | if test "x$ac_cr" = x; then | |
18571 | eval ac_cr=\$\'\\r\' | |
18572 | fi | |
18573 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
18574 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 18575 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
18576 | else |
18577 | ac_cs_awk_cr=$ac_cr | |
18578 | fi | |
18579 | ||
d0ac1c44 | 18580 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
18581 | _ACEOF |
18582 | ||
18583 | # Create commands to substitute file output variables. | |
18584 | { | |
18585 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d0ac1c44 | 18586 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
81ecdfbb RW |
18587 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
18588 | echo "_ACAWK" && | |
18589 | echo "_ACEOF" | |
18590 | } >conf$$files.sh && | |
18591 | . ./conf$$files.sh || | |
d0ac1c44 | 18592 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
18593 | rm -f conf$$files.sh |
18594 | ||
18595 | { | |
18596 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
18597 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
18598 | echo "_ACEOF" | |
18599 | } >conf$$subs.sh || | |
d0ac1c44 SM |
18600 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
18601 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
18602 | ac_delim='%!_!# ' |
18603 | for ac_last_try in false false false false false :; do | |
18604 | . ./conf$$subs.sh || | |
d0ac1c44 | 18605 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
18606 | |
18607 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
18608 | if test $ac_delim_n = $ac_delim_num; then | |
18609 | break | |
18610 | elif $ac_last_try; then | |
d0ac1c44 | 18611 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
18612 | else |
18613 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18614 | fi | |
18615 | done | |
18616 | rm -f conf$$subs.sh | |
18617 | ||
18618 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 18619 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
18620 | _ACEOF |
18621 | sed -n ' | |
18622 | h | |
18623 | s/^/S["/; s/!.*/"]=/ | |
18624 | p | |
18625 | g | |
18626 | s/^[^!]*!// | |
18627 | :repl | |
18628 | t repl | |
18629 | s/'"$ac_delim"'$// | |
18630 | t delim | |
18631 | :nl | |
18632 | h | |
d0ac1c44 | 18633 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
18634 | t more1 |
18635 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
18636 | p | |
18637 | n | |
18638 | b repl | |
18639 | :more1 | |
18640 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18641 | p | |
18642 | g | |
18643 | s/.\{148\}// | |
18644 | t nl | |
18645 | :delim | |
18646 | h | |
d0ac1c44 | 18647 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
18648 | t more2 |
18649 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
18650 | p | |
18651 | b | |
18652 | :more2 | |
18653 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18654 | p | |
18655 | g | |
18656 | s/.\{148\}// | |
18657 | t delim | |
18658 | ' <conf$$subs.awk | sed ' | |
18659 | /^[^""]/{ | |
18660 | N | |
18661 | s/\n// | |
18662 | } | |
18663 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
18664 | rm -f conf$$subs.awk | |
18665 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18666 | _ACAWK | |
d0ac1c44 | 18667 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
18668 | for (key in S) S_is_set[key] = 1 |
18669 | FS = "\a" | |
18670 | \$ac_cs_awk_pipe_init | |
18671 | } | |
18672 | { | |
18673 | line = $ 0 | |
18674 | nfields = split(line, field, "@") | |
18675 | substed = 0 | |
18676 | len = length(field[1]) | |
18677 | for (i = 2; i < nfields; i++) { | |
18678 | key = field[i] | |
18679 | keylen = length(key) | |
18680 | if (S_is_set[key]) { | |
18681 | value = S[key] | |
18682 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
18683 | len += length(value) + length(field[++i]) | |
18684 | substed = 1 | |
18685 | } else | |
18686 | len += 1 + keylen | |
18687 | } | |
18688 | if (nfields == 3 && !substed) { | |
18689 | key = field[2] | |
18690 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
18691 | \$ac_cs_awk_read_file | |
18692 | next | |
18693 | } | |
18694 | } | |
18695 | print line | |
b4e70030 | 18696 | } |
81ecdfbb RW |
18697 | \$ac_cs_awk_pipe_fini |
18698 | _ACAWK | |
18699 | _ACEOF | |
18700 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18701 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
18702 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
18703 | else | |
18704 | cat | |
d0ac1c44 SM |
18705 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
18706 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
81ecdfbb RW |
18707 | _ACEOF |
18708 | ||
d0ac1c44 SM |
18709 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
18710 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
18711 | # trailing colons and then remove the whole line if VPATH becomes empty |
18712 | # (actually we leave an empty line to preserve line numbers). | |
18713 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
18714 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
18715 | h | |
18716 | s/// | |
18717 | s/^/:/ | |
18718 | s/[ ]*$/:/ | |
18719 | s/:\$(srcdir):/:/g | |
18720 | s/:\${srcdir}:/:/g | |
18721 | s/:@srcdir@:/:/g | |
18722 | s/^:*// | |
81ecdfbb | 18723 | s/:*$// |
d0ac1c44 SM |
18724 | x |
18725 | s/\(=[ ]*\).*/\1/ | |
18726 | G | |
18727 | s/\n// | |
81ecdfbb RW |
18728 | s/^[^=]*=[ ]*$// |
18729 | }' | |
18730 | fi | |
18731 | ||
18732 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18733 | fi # test -n "$CONFIG_FILES" | |
18734 | ||
18735 | # Set up the scripts for CONFIG_HEADERS section. | |
18736 | # No need to generate them if there are no CONFIG_HEADERS. | |
18737 | # This happens for instance with `./config.status Makefile'. | |
18738 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 18739 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb RW |
18740 | BEGIN { |
18741 | _ACEOF | |
18742 | ||
18743 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
18744 | # here-document in config.status, that substitutes the proper values into | |
18745 | # config.h.in to produce config.h. | |
4e8d927d | 18746 | |
81ecdfbb RW |
18747 | # Create a delimiter string that does not exist in confdefs.h, to ease |
18748 | # handling of long lines. | |
18749 | ac_delim='%!_!# ' | |
18750 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
18751 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
18752 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
18753 | break |
18754 | elif $ac_last_try; then | |
d0ac1c44 | 18755 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
18756 | else |
18757 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18758 | fi | |
18759 | done | |
4e8d927d | 18760 | |
81ecdfbb RW |
18761 | # For the awk script, D is an array of macro values keyed by name, |
18762 | # likewise P contains macro parameters if any. Preserve backslash | |
18763 | # newline sequences. | |
18764 | ||
18765 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18766 | sed -n ' | |
18767 | s/.\{148\}/&'"$ac_delim"'/g | |
18768 | t rset | |
18769 | :rset | |
18770 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
18771 | t def | |
18772 | d | |
18773 | :def | |
18774 | s/\\$// | |
18775 | t bsnl | |
18776 | s/["\\]/\\&/g | |
18777 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18778 | D["\1"]=" \3"/p | |
18779 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
18780 | d | |
18781 | :bsnl | |
18782 | s/["\\]/\\&/g | |
18783 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18784 | D["\1"]=" \3\\\\\\n"\\/p | |
18785 | t cont | |
18786 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
18787 | t cont | |
18788 | d | |
18789 | :cont | |
18790 | n | |
18791 | s/.\{148\}/&'"$ac_delim"'/g | |
18792 | t clear | |
18793 | :clear | |
18794 | s/\\$// | |
18795 | t bsnlc | |
18796 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
18797 | d | |
18798 | :bsnlc | |
18799 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
18800 | b cont | |
18801 | ' <confdefs.h | sed ' | |
18802 | s/'"$ac_delim"'/"\\\ | |
18803 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
18804 | ||
18805 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18806 | for (key in D) D_is_set[key] = 1 | |
18807 | FS = "\a" | |
18808 | } | |
18809 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
18810 | line = \$ 0 | |
18811 | split(line, arg, " ") | |
18812 | if (arg[1] == "#") { | |
18813 | defundef = arg[2] | |
18814 | mac1 = arg[3] | |
18815 | } else { | |
18816 | defundef = substr(arg[1], 2) | |
18817 | mac1 = arg[2] | |
18818 | } | |
18819 | split(mac1, mac2, "(") #) | |
18820 | macro = mac2[1] | |
18821 | prefix = substr(line, 1, index(line, defundef) - 1) | |
18822 | if (D_is_set[macro]) { | |
18823 | # Preserve the white space surrounding the "#". | |
18824 | print prefix "define", macro P[macro] D[macro] | |
18825 | next | |
18826 | } else { | |
18827 | # Replace #undef with comments. This is necessary, for example, | |
18828 | # in the case of _POSIX_SOURCE, which is predefined and required | |
18829 | # on some systems where configure will not decide to define it. | |
18830 | if (defundef == "undef") { | |
18831 | print "/*", prefix defundef, macro, "*/" | |
18832 | next | |
18833 | } | |
18834 | } | |
b4e70030 | 18835 | } |
81ecdfbb RW |
18836 | { print } |
18837 | _ACAWK | |
b4e70030 | 18838 | _ACEOF |
81ecdfbb | 18839 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 18840 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb | 18841 | fi # test -n "$CONFIG_HEADERS" |
4e8d927d | 18842 | |
4e8d927d | 18843 | |
81ecdfbb RW |
18844 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
18845 | shift | |
18846 | for ac_tag | |
18847 | do | |
18848 | case $ac_tag in | |
18849 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18850 | esac | |
18851 | case $ac_mode$ac_tag in | |
18852 | :[FHL]*:*);; | |
d0ac1c44 | 18853 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
18854 | :[FH]-) ac_tag=-:-;; |
18855 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18856 | esac | |
18857 | ac_save_IFS=$IFS | |
18858 | IFS=: | |
18859 | set x $ac_tag | |
18860 | IFS=$ac_save_IFS | |
18861 | shift | |
18862 | ac_file=$1 | |
18863 | shift | |
4e8d927d | 18864 | |
81ecdfbb RW |
18865 | case $ac_mode in |
18866 | :L) ac_source=$1;; | |
18867 | :[FH]) | |
18868 | ac_file_inputs= | |
18869 | for ac_f | |
18870 | do | |
18871 | case $ac_f in | |
d0ac1c44 | 18872 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
18873 | *) # Look for the file first in the build tree, then in the source tree |
18874 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18875 | # because $ac_f cannot contain `:'. | |
18876 | test -f "$ac_f" || | |
18877 | case $ac_f in | |
18878 | [\\/$]*) false;; | |
18879 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18880 | esac || | |
d0ac1c44 | 18881 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
18882 | esac |
18883 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
18884 | as_fn_append ac_file_inputs " '$ac_f'" | |
18885 | done | |
18886 | ||
18887 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18888 | # use $as_me), people would be surprised to read: | |
18889 | # /* config.h. Generated by config.status. */ | |
18890 | configure_input='Generated from '` | |
18891 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
18892 | `' by configure.' | |
18893 | if test x"$ac_file" != x-; then | |
18894 | configure_input="$ac_file. $configure_input" | |
18895 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
18896 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 18897 | fi |
81ecdfbb RW |
18898 | # Neutralize special characters interpreted by sed in replacement strings. |
18899 | case $configure_input in #( | |
18900 | *\&* | *\|* | *\\* ) | |
18901 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
18902 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
18903 | *) ac_sed_conf_input=$configure_input;; | |
18904 | esac | |
4e8d927d | 18905 | |
81ecdfbb | 18906 | case $ac_tag in |
d0ac1c44 SM |
18907 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
18908 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
18909 | esac |
18910 | ;; | |
c906108c SS |
18911 | esac |
18912 | ||
81ecdfbb | 18913 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
18914 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
18915 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18916 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18917 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
18918 | $as_echo X"$ac_file" | | |
18919 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18920 | s//\1/ | |
18921 | q | |
18922 | } | |
18923 | /^X\(\/\/\)[^/].*/{ | |
18924 | s//\1/ | |
18925 | q | |
18926 | } | |
18927 | /^X\(\/\/\)$/{ | |
18928 | s//\1/ | |
18929 | q | |
18930 | } | |
18931 | /^X\(\/\).*/{ | |
18932 | s//\1/ | |
18933 | q | |
18934 | } | |
18935 | s/.*/./; q'` | |
18936 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
18937 | ac_builddir=. |
18938 | ||
81ecdfbb RW |
18939 | case "$ac_dir" in |
18940 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18941 | *) | |
18942 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18943 | # A ".." for each directory in $ac_dir_suffix. | |
18944 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18945 | case $ac_top_builddir_sub in | |
18946 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18947 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18948 | esac ;; | |
18949 | esac | |
18950 | ac_abs_top_builddir=$ac_pwd | |
18951 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18952 | # for backward compatibility: | |
18953 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
18954 | |
18955 | case $srcdir in | |
81ecdfbb | 18956 | .) # We are building in place. |
bec39cab | 18957 | ac_srcdir=. |
81ecdfbb RW |
18958 | ac_top_srcdir=$ac_top_builddir_sub |
18959 | ac_abs_top_srcdir=$ac_pwd ;; | |
18960 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 18961 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
18962 | ac_top_srcdir=$srcdir |
18963 | ac_abs_top_srcdir=$srcdir ;; | |
18964 | *) # Relative name. | |
18965 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18966 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18967 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 18968 | esac |
81ecdfbb | 18969 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 18970 | |
c906108c | 18971 | |
81ecdfbb RW |
18972 | case $ac_mode in |
18973 | :F) | |
18974 | # | |
18975 | # CONFIG_FILE | |
18976 | # | |
c906108c | 18977 | |
bec39cab AC |
18978 | case $INSTALL in |
18979 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 18980 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 18981 | esac |
81ecdfbb | 18982 | _ACEOF |
121ce6e5 | 18983 | |
81ecdfbb RW |
18984 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18985 | # If the template does not know about datarootdir, expand it. | |
18986 | # FIXME: This hack should be removed a few years after 2.60. | |
18987 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18988 | ac_sed_dataroot=' | |
18989 | /datarootdir/ { | |
18990 | p | |
18991 | q | |
18992 | } | |
18993 | /@datadir@/p | |
18994 | /@docdir@/p | |
18995 | /@infodir@/p | |
18996 | /@localedir@/p | |
18997 | /@mandir@/p' | |
18998 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
18999 | *datarootdir*) ac_datarootdir_seen=yes;; | |
19000 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
19001 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
19002 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
19003 | _ACEOF | |
19004 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
19005 | ac_datarootdir_hack=' | |
19006 | s&@datadir@&$datadir&g | |
19007 | s&@docdir@&$docdir&g | |
19008 | s&@infodir@&$infodir&g | |
19009 | s&@localedir@&$localedir&g | |
19010 | s&@mandir@&$mandir&g | |
19011 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
19012 | esac | |
4e8d927d | 19013 | _ACEOF |
81ecdfbb RW |
19014 | |
19015 | # Neutralize VPATH when `$srcdir' = `.'. | |
19016 | # Shell code in configure.ac might set extrasub. | |
19017 | # FIXME: do we really want to maintain this feature? | |
19018 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
19019 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
19020 | $extrasub |
19021 | _ACEOF | |
81ecdfbb | 19022 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
19023 | :t |
19024 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
19025 | s|@configure_input@|$ac_sed_conf_input|;t t |
19026 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
19027 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
19028 | s&@srcdir@&$ac_srcdir&;t t | |
19029 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
19030 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
19031 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
19032 | s&@builddir@&$ac_builddir&;t t | |
19033 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
19034 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
19035 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
19036 | $ac_datarootdir_hack |
19037 | " | |
19038 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
19039 | if $ac_cs_awk_getline; then | |
d0ac1c44 | 19040 | $AWK -f "$ac_tmp/subs.awk" |
81ecdfbb | 19041 | else |
d0ac1c44 SM |
19042 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
19043 | fi \ | |
19044 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
19045 | |
19046 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
19047 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
19048 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
19049 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 19050 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 19051 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 19052 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 19053 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 19054 | |
d0ac1c44 | 19055 | rm -f "$ac_tmp/stdin" |
bec39cab | 19056 | case $ac_file in |
d0ac1c44 SM |
19057 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
19058 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 19059 | esac \ |
d0ac1c44 | 19060 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
19061 | ;; |
19062 | :H) | |
19063 | # | |
19064 | # CONFIG_HEADER | |
19065 | # | |
bec39cab | 19066 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
19067 | { |
19068 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
19069 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
19070 | } >"$ac_tmp/config.h" \ | |
19071 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
19072 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
19073 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
19074 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 19075 | else |
81ecdfbb | 19076 | rm -f "$ac_file" |
d0ac1c44 SM |
19077 | mv "$ac_tmp/config.h" "$ac_file" \ |
19078 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
19079 | fi |
19080 | else | |
81ecdfbb | 19081 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
19082 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
19083 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
bec39cab | 19084 | fi |
81ecdfbb RW |
19085 | ;; |
19086 | :L) | |
19087 | # | |
19088 | # CONFIG_LINK | |
19089 | # | |
c906108c | 19090 | |
81ecdfbb RW |
19091 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
19092 | : | |
b4e70030 | 19093 | else |
81ecdfbb RW |
19094 | # Prefer the file from the source tree if names are identical. |
19095 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
19096 | ac_source=$srcdir/$ac_source | |
19097 | fi | |
b4e70030 | 19098 | |
81ecdfbb RW |
19099 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
19100 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 19101 | |
81ecdfbb | 19102 | if test ! -r "$ac_source"; then |
d0ac1c44 | 19103 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
81ecdfbb RW |
19104 | fi |
19105 | rm -f "$ac_file" | |
bec39cab | 19106 | |
81ecdfbb | 19107 | # Try a relative symlink, then a hard link, then a copy. |
d0ac1c44 | 19108 | case $ac_source in |
81ecdfbb RW |
19109 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
19110 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
19111 | esac | |
19112 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
19113 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
19114 | cp -p "$ac_source" "$ac_file" || | |
d0ac1c44 | 19115 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
81ecdfbb RW |
19116 | fi |
19117 | ;; | |
19118 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
19119 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
19120 | ;; | |
c906108c | 19121 | esac |
b4e70030 | 19122 | |
bec39cab | 19123 | |
81ecdfbb RW |
19124 | case $ac_file$ac_mode in |
19125 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 19126 | "gcore":F) chmod +x gcore ;; |
1e94266c SM |
19127 | "Makefile":F) |
19128 | case x$CONFIG_HEADERS in | |
19129 | xconfig.h:config.in) | |
19130 | echo > stamp-h ;; | |
19131 | esac | |
19132 | ;; | |
19133 | "gdb-gdb.gdb":F) | |
19134 | case x$CONFIG_HEADERS in | |
19135 | xconfig.h:config.in) | |
19136 | echo > stamp-h ;; | |
141ec9f6 SM |
19137 | esac |
19138 | ;; | |
19139 | "gdb-gdb.py":F) | |
19140 | case x$CONFIG_HEADERS in | |
19141 | xconfig.h:config.in) | |
19142 | echo > stamp-h ;; | |
1e94266c SM |
19143 | esac |
19144 | ;; | |
19145 | "doc/Makefile":F) | |
19146 | case x$CONFIG_HEADERS in | |
19147 | xconfig.h:config.in) | |
19148 | echo > stamp-h ;; | |
19149 | esac | |
19150 | ;; | |
19151 | "data-directory/Makefile":F) | |
c906108c SS |
19152 | case x$CONFIG_HEADERS in |
19153 | xconfig.h:config.in) | |
19154 | echo > stamp-h ;; | |
19155 | esac | |
bec39cab | 19156 | ;; |
81ecdfbb | 19157 | |
bec39cab | 19158 | esac |
81ecdfbb | 19159 | done # for ac_tag |
c906108c | 19160 | |
bec39cab | 19161 | |
81ecdfbb | 19162 | as_fn_exit 0 |
bec39cab | 19163 | _ACEOF |
bec39cab AC |
19164 | ac_clean_files=$ac_clean_files_save |
19165 | ||
81ecdfbb | 19166 | test $ac_write_fail = 0 || |
d0ac1c44 | 19167 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 19168 | |
bec39cab AC |
19169 | |
19170 | # configure is writing to config.log, and then calls config.status. | |
19171 | # config.status does its own redirection, appending to config.log. | |
19172 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
19173 | # by configure, so config.status won't be able to write to it; its | |
19174 | # output is simply discarded. So we exec the FD to /dev/null, | |
19175 | # effectively closing config.log, so it can be properly (re)opened and | |
19176 | # appended to by config.status. When coming back to configure, we | |
19177 | # need to make the FD available again. | |
19178 | if test "$no_create" != yes; then | |
19179 | ac_cs_success=: | |
19180 | ac_config_status_args= | |
19181 | test "$silent" = yes && | |
19182 | ac_config_status_args="$ac_config_status_args --quiet" | |
19183 | exec 5>/dev/null | |
19184 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
19185 | exec 5>>config.log | |
19186 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
19187 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 19188 | $ac_cs_success || as_fn_exit 1 |
bec39cab | 19189 | fi |
c906108c | 19190 | |
bec39cab | 19191 | # |
81ecdfbb | 19192 | # CONFIG_SUBDIRS section. |
bec39cab | 19193 | # |
c906108c SS |
19194 | if test "$no_recursion" != yes; then |
19195 | ||
81ecdfbb RW |
19196 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
19197 | # so they do not pile up. | |
c906108c SS |
19198 | ac_sub_configure_args= |
19199 | ac_prev= | |
fdc59709 PB |
19200 | eval "set x $ac_configure_args" |
19201 | shift | |
19202 | for ac_arg | |
19203 | do | |
c906108c SS |
19204 | if test -n "$ac_prev"; then |
19205 | ac_prev= | |
19206 | continue | |
19207 | fi | |
bec39cab | 19208 | case $ac_arg in |
c906108c SS |
19209 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
19210 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
19211 | ac_prev=cache_file ;; | |
19212 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
19213 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
19214 | | --c=*) | |
19215 | ;; | |
19216 | --config-cache | -C) | |
c906108c SS |
19217 | ;; |
19218 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
19219 | ac_prev=srcdir ;; | |
19220 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
19221 | ;; | |
bec39cab AC |
19222 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
19223 | ac_prev=prefix ;; | |
19224 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
19225 | ;; | |
81ecdfbb RW |
19226 | --disable-option-checking) |
19227 | ;; | |
fdc59709 PB |
19228 | *) |
19229 | case $ac_arg in | |
81ecdfbb | 19230 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19231 | esac |
81ecdfbb | 19232 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
19233 | esac |
19234 | done | |
19235 | ||
bec39cab AC |
19236 | # Always prepend --prefix to ensure using the same prefix |
19237 | # in subdir configurations. | |
fdc59709 PB |
19238 | ac_arg="--prefix=$prefix" |
19239 | case $ac_arg in | |
81ecdfbb | 19240 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19241 | esac |
81ecdfbb RW |
19242 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
19243 | ||
19244 | # Pass --silent | |
19245 | if test "$silent" = yes; then | |
19246 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
19247 | fi | |
19248 | ||
19249 | # Always prepend --disable-option-checking to silence warnings, since | |
19250 | # different subdirs can have different --enable and --with options. | |
19251 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 19252 | |
b4e70030 | 19253 | ac_popdir=`pwd` |
bec39cab | 19254 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
19255 | |
19256 | # Do not complain, so a configure script can configure whichever | |
19257 | # parts of a large source tree are present. | |
fdc59709 | 19258 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 19259 | |
81ecdfbb RW |
19260 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
19261 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
19262 | $as_echo "$ac_msg" >&6 | |
19263 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
19264 | ac_builddir=. |
19265 | ||
81ecdfbb RW |
19266 | case "$ac_dir" in |
19267 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19268 | *) | |
19269 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
19270 | # A ".." for each directory in $ac_dir_suffix. | |
19271 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
19272 | case $ac_top_builddir_sub in | |
19273 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19274 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
19275 | esac ;; | |
19276 | esac | |
19277 | ac_abs_top_builddir=$ac_pwd | |
19278 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
19279 | # for backward compatibility: | |
19280 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
19281 | |
19282 | case $srcdir in | |
81ecdfbb | 19283 | .) # We are building in place. |
bec39cab | 19284 | ac_srcdir=. |
81ecdfbb RW |
19285 | ac_top_srcdir=$ac_top_builddir_sub |
19286 | ac_abs_top_srcdir=$ac_pwd ;; | |
19287 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 19288 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
19289 | ac_top_srcdir=$srcdir |
19290 | ac_abs_top_srcdir=$srcdir ;; | |
19291 | *) # Relative name. | |
19292 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
19293 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
19294 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 19295 | esac |
81ecdfbb | 19296 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 19297 | |
c906108c | 19298 | |
fdc59709 | 19299 | cd "$ac_dir" |
c906108c SS |
19300 | |
19301 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
19302 | if test -f "$ac_srcdir/configure.gnu"; then |
19303 | ac_sub_configure=$ac_srcdir/configure.gnu | |
19304 | elif test -f "$ac_srcdir/configure"; then | |
19305 | ac_sub_configure=$ac_srcdir/configure | |
19306 | elif test -f "$ac_srcdir/configure.in"; then | |
19307 | # This should be Cygnus configure. | |
19308 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 19309 | else |
81ecdfbb RW |
19310 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
19311 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
19312 | ac_sub_configure= |
19313 | fi | |
19314 | ||
19315 | # The recursion is here. | |
19316 | if test -n "$ac_sub_configure"; then | |
c906108c | 19317 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
19318 | case $cache_file in |
19319 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
19320 | *) # Relative name. |
19321 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 19322 | esac |
c906108c | 19323 | |
81ecdfbb RW |
19324 | { $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 |
19325 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 19326 | # The eval makes quoting arguments work. |
fdc59709 PB |
19327 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
19328 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 19329 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
19330 | fi |
19331 | ||
fdc59709 | 19332 | cd "$ac_popdir" |
c906108c SS |
19333 | done |
19334 | fi | |
81ecdfbb RW |
19335 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
19336 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
19337 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
19338 | fi | |
c906108c | 19339 |